-
Notifications
You must be signed in to change notification settings - Fork 1
fix(audit): scope asset publish details audit to the exported stack #326
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 3 commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
95063df
fix(audit): scope asset publish details audit to the exported stack
f6eaf00
test(audit): cover the DX-9739 symptom and the missing stack.json path
a65f5b7
Merge branch 'v2-dev' into fix/DX-9739
netrajpatel 07e0d47
Merge branch 'v2-dev' into fix/DX-9739
netrajpatel ae18246
Merge branch 'v2-dev' into fix/DX-9739
netrajpatel f2b7c30
fix(audit): report skipped publish details accurately when the source…
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 6 additions & 0 deletions
6
...ges/contentstack-audit/test/unit/mock/am-contents-no-stack/environments/environments.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| { | ||
| "env_own_dev": { | ||
| "name": "development", | ||
| "uid": "env_own_dev" | ||
| } | ||
| } |
8 changes: 8 additions & 0 deletions
8
packages/contentstack-audit/test/unit/mock/am-contents-no-stack/locales/master-locale.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| { | ||
| "locale-uid-1": { | ||
| "code": "en-us", | ||
| "fallback_locale": null, | ||
| "uid": "locale-uid-1", | ||
| "name": "English - United States" | ||
| } | ||
| } |
1 change: 1 addition & 0 deletions
1
...ontentstack-audit/test/unit/mock/am-contents-no-stack/spaces/space_one/assets/assets.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| { "1": "chunk0-assets.json" } |
18 changes: 18 additions & 0 deletions
18
...tack-audit/test/unit/mock/am-contents-no-stack/spaces/space_one/assets/chunk0-assets.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| { | ||
| "am_asset_tagged": { | ||
| "uid": "am_asset_tagged", | ||
| "title": "Api key tagged publish details, unverifiable without stack.json", | ||
| "publish_details": [ | ||
| { "locale": "en-us", "environment": "env_own_missing", "api_key": "blt_own_stack" }, | ||
| { "locale": "de-de", "environment": "env_other_dev", "api_key": "blt_other_stack_one" } | ||
| ] | ||
| }, | ||
| "am_asset_legacy_pd": { | ||
| "uid": "am_asset_legacy_pd", | ||
| "title": "Legacy publish details without api_key stay auditable", | ||
| "publish_details": [ | ||
| { "locale": "en-us", "environment": "env_own_dev" }, | ||
| { "locale": "en-us", "environment": "env_own_missing" } | ||
| ] | ||
| } | ||
| } |
10 changes: 10 additions & 0 deletions
10
packages/contentstack-audit/test/unit/mock/am-contents/environments/environments.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| { | ||
| "env_own_dev": { | ||
| "name": "development", | ||
| "uid": "env_own_dev" | ||
| }, | ||
| "env_own_prod": { | ||
| "name": "production", | ||
| "uid": "env_own_prod" | ||
| } | ||
| } |
8 changes: 8 additions & 0 deletions
8
packages/contentstack-audit/test/unit/mock/am-contents/locales/master-locale.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| { | ||
| "locale-uid-1": { | ||
| "code": "en-us", | ||
| "fallback_locale": null, | ||
| "uid": "locale-uid-1", | ||
| "name": "English - United States" | ||
| } | ||
| } |
1 change: 1 addition & 0 deletions
1
packages/contentstack-audit/test/unit/mock/am-contents/spaces/space_clean/assets/assets.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| { "1": "chunk0-assets.json" } |
10 changes: 10 additions & 0 deletions
10
...ontentstack-audit/test/unit/mock/am-contents/spaces/space_clean/assets/chunk0-assets.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| { | ||
| "am_asset_clean": { | ||
| "uid": "am_asset_clean", | ||
| "title": "Nothing to fix here", | ||
| "publish_details": [ | ||
| { "locale": "en-us", "environment": "env_own_prod", "api_key": "blt_own_stack" }, | ||
| { "locale": "en-us", "environment": "env_other_prod", "api_key": "blt_other_stack_two" } | ||
| ] | ||
| } | ||
| } |
1 change: 1 addition & 0 deletions
1
.../contentstack-audit/test/unit/mock/am-contents/spaces/space_cross_only/assets/assets.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| { "1": "chunk0-assets.json" } |
19 changes: 19 additions & 0 deletions
19
...tstack-audit/test/unit/mock/am-contents/spaces/space_cross_only/assets/chunk0-assets.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| { | ||
| "am_asset_other_stacks_only_a": { | ||
| "uid": "am_asset_other_stacks_only_a", | ||
| "title": "Published only into other stacks, unknown env and locale here", | ||
| "publish_details": [ | ||
| { "locale": "en-us", "environment": "env_other_dev", "api_key": "blt_other_stack_one" }, | ||
| { "locale": "de-de", "environment": "env_other_prod", "api_key": "blt_other_stack_two" } | ||
| ] | ||
| }, | ||
| "am_asset_other_stacks_only_b": { | ||
| "uid": "am_asset_other_stacks_only_b", | ||
| "title": "Published only into other stacks, multiple environments", | ||
| "publish_details": [ | ||
| { "locale": "fr-fr", "environment": "env_other_dev", "api_key": "blt_other_stack_one" }, | ||
| { "locale": "fr-fr", "environment": "env_other_stage", "api_key": "blt_other_stack_one" }, | ||
| { "locale": "ja-jp", "environment": "env_other_prod", "api_key": "blt_other_stack_two" } | ||
| ] | ||
| } | ||
| } |
1 change: 1 addition & 0 deletions
1
packages/contentstack-audit/test/unit/mock/am-contents/spaces/space_one/assets/assets.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| { "1": "chunk0-assets.json" } |
37 changes: 37 additions & 0 deletions
37
.../contentstack-audit/test/unit/mock/am-contents/spaces/space_one/assets/chunk0-assets.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,37 @@ | ||
| { | ||
| "am_asset_cross_only": { | ||
| "uid": "am_asset_cross_only", | ||
| "title": "Published only into other stacks", | ||
| "publish_details": [ | ||
| { "locale": "en-us", "environment": "env_other_dev", "api_key": "blt_other_stack_one" }, | ||
| { "locale": "fr-fr", "environment": "env_other_prod", "api_key": "blt_other_stack_two" } | ||
| ] | ||
| }, | ||
| "am_asset_mixed": { | ||
| "uid": "am_asset_mixed", | ||
| "title": "Own stack plus other stacks", | ||
| "publish_details": [ | ||
| { "locale": "en-us", "environment": "env_own_dev", "api_key": "blt_own_stack" }, | ||
| { "locale": "en-us", "environment": "env_other_dev", "api_key": "blt_other_stack_one" }, | ||
| { "locale": "en-us", "environment": "env_own_missing", "api_key": "blt_own_stack" } | ||
| ] | ||
| }, | ||
| "am_asset_bad_locale": { | ||
| "uid": "am_asset_bad_locale", | ||
| "title": "Own stack with unknown locale", | ||
| "publish_details": [{ "locale": "de-de", "environment": "env_own_prod", "api_key": "blt_own_stack" }] | ||
| }, | ||
| "am_asset_bad_both": { | ||
| "uid": "am_asset_bad_both", | ||
| "title": "Own stack with unknown locale and environment", | ||
| "publish_details": [{ "locale": "de-de", "environment": "env_own_missing", "api_key": "blt_own_stack" }] | ||
| }, | ||
| "am_asset_legacy_pd": { | ||
| "uid": "am_asset_legacy_pd", | ||
| "title": "Legacy publish details without api_key", | ||
| "publish_details": [ | ||
| { "locale": "en-us", "environment": "env_own_dev" }, | ||
| { "locale": "en-us", "environment": "env_own_missing" } | ||
| ] | ||
| } | ||
| } |
9 changes: 9 additions & 0 deletions
9
packages/contentstack-audit/test/unit/mock/am-contents/stack/stack.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| { | ||
| "uid": "blt_own_stack_uid", | ||
| "name": "AM Mock Stack", | ||
| "api_key": "blt_own_stack", | ||
| "master_locale": "en-us", | ||
| "stackHeaders": { | ||
| "api_key": "blt_own_stack" | ||
| } | ||
| } |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.