@simplysf/simply-cicd 0.19.0 → 0.21.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -75,24 +75,25 @@ GLOBAL FLAGS
75
75
  DESCRIPTION
76
76
  Fail the pipeline when any generated permission set in the repo has drifted from its source metadata.
77
77
 
78
- Finds every permission sets file in the repo, meaning every file whose name ends in `.psbuild.json` (the JSON format
79
- `sf simply permissions build --file` reads), and checks each permission set it declares, the same way `sf simply
80
- permissions build --file <file> --check` does. Nothing is written. Files are found by walking the directory tree from
78
+ Finds every permission set build file in the repo, meaning every file whose name ends in `.psbuild.json`, each of
79
+ which defines one permission set (see `sf simply permissions build`). It checks each of those permission sets the same
80
+ way `sf simply permissions build --check` does. Nothing is written. Files are found by walking the directory tree from
81
81
  the current directory, skipping `node_modules`, `.git`, `.sf`, and `.sfdx`, so `find . -name '*.psbuild.json'` lists
82
- what will be checked. Relative paths in a permission sets file resolve against the current directory, so run this from
83
- the repo root.
82
+ what will be checked. Relative paths in a permission set build file resolve against the current directory, so run this
83
+ from the repo root.
84
84
 
85
- Every file is checked before the command fails, so one run lists every permission set that has drifted or is missing,
86
- along with the command that regenerates each file. A `.psbuild.json` file that fails validation fails the command
87
- immediately. A repo with no `.psbuild.json` files is skipped with exit code 0, so the job is safe to include in a
88
- shared pipeline template. Formatting differences, such as indentation, line endings, or comments, don't count as
89
- drift.
85
+ Every file is loaded and validated before any permission set is checked: a `.psbuild.json` file that fails validation,
86
+ one in the old `permissionSets` list format, or two files that define the same permission set name fail the command
87
+ immediately. Every permission set is then checked before the command fails, so one run lists every permission set that
88
+ has drifted or is missing, with the file that defines it and the command that regenerates them. A repo with no
89
+ `.psbuild.json` files is skipped with exit code 0, so the job is safe to include in a shared pipeline template.
90
+ Formatting differences, such as indentation, line endings, or comments, don't count as drift.
90
91
 
91
92
  EXAMPLES
92
93
  $ sf simply cicd build check-permission-sets
93
94
  ```
94
95
 
95
- _See code: [lib/commands/simply/cicd/build/check-permission-sets.js](https://github.com/SimplySF/simply-plugins/blob/@simplysf/simply-cicd@0.19.0/packages/simply-cicd/lib/commands/simply/cicd/build/check-permission-sets.js)_
96
+ _See code: [lib/commands/simply/cicd/build/check-permission-sets.js](https://github.com/SimplySF/simply-plugins/blob/@simplysf/simply-cicd@0.21.0/packages/simply-cicd/lib/commands/simply/cicd/build/check-permission-sets.js)_
96
97
 
97
98
  ## `sf simply cicd build cleanup-scratch-orgs`
98
99
 
@@ -123,7 +124,7 @@ EXAMPLES
123
124
  $ sf simply cicd build cleanup-scratch-orgs --dev-hub my-devhub
124
125
  ```
125
126
 
126
- _See code: [lib/commands/simply/cicd/build/cleanup-scratch-orgs.js](https://github.com/SimplySF/simply-plugins/blob/@simplysf/simply-cicd@0.19.0/packages/simply-cicd/lib/commands/simply/cicd/build/cleanup-scratch-orgs.js)_
127
+ _See code: [lib/commands/simply/cicd/build/cleanup-scratch-orgs.js](https://github.com/SimplySF/simply-plugins/blob/@simplysf/simply-cicd@0.21.0/packages/simply-cicd/lib/commands/simply/cicd/build/cleanup-scratch-orgs.js)_
127
128
 
128
129
  ## `sf simply cicd build create-fallback-tag`
129
130
 
@@ -180,7 +181,7 @@ EXAMPLES
180
181
  $ sf simply cicd build create-fallback-tag --ci-commit-ref-name main --ci-project-path group/project --project-access-token glpat-... --ci-pipeline-id 123
181
182
  ```
182
183
 
183
- _See code: [lib/commands/simply/cicd/build/create-fallback-tag.js](https://github.com/SimplySF/simply-plugins/blob/@simplysf/simply-cicd@0.19.0/packages/simply-cicd/lib/commands/simply/cicd/build/create-fallback-tag.js)_
184
+ _See code: [lib/commands/simply/cicd/build/create-fallback-tag.js](https://github.com/SimplySF/simply-plugins/blob/@simplysf/simply-cicd@0.21.0/packages/simply-cicd/lib/commands/simply/cicd/build/create-fallback-tag.js)_
184
185
 
185
186
  ## `sf simply cicd build create-package-version`
186
187
 
@@ -253,7 +254,7 @@ EXAMPLES
253
254
  $ sf simply cicd build create-package-version --ci-commit-ref-name main --ci-commit-sha a1b2c3d --ci-pipeline-id 123 --ci-pipeline-url https://gitlab.example.com/pipelines/123 --ci-project-path group/project --project-access-token glpat-... --packaging-devhub my-packaging-devhub
254
255
  ```
255
256
 
256
- _See code: [lib/commands/simply/cicd/build/create-package-version.js](https://github.com/SimplySF/simply-plugins/blob/@simplysf/simply-cicd@0.19.0/packages/simply-cicd/lib/commands/simply/cicd/build/create-package-version.js)_
257
+ _See code: [lib/commands/simply/cicd/build/create-package-version.js](https://github.com/SimplySF/simply-plugins/blob/@simplysf/simply-cicd@0.21.0/packages/simply-cicd/lib/commands/simply/cicd/build/create-package-version.js)_
257
258
 
258
259
  ## `sf simply cicd build create-scratch`
259
260
 
@@ -294,7 +295,7 @@ EXAMPLES
294
295
  $ sf simply cicd build create-scratch --dev-hub my-devhub
295
296
  ```
296
297
 
297
- _See code: [lib/commands/simply/cicd/build/create-scratch.js](https://github.com/SimplySF/simply-plugins/blob/@simplysf/simply-cicd@0.19.0/packages/simply-cicd/lib/commands/simply/cicd/build/create-scratch.js)_
298
+ _See code: [lib/commands/simply/cicd/build/create-scratch.js](https://github.com/SimplySF/simply-plugins/blob/@simplysf/simply-cicd@0.21.0/packages/simply-cicd/lib/commands/simply/cicd/build/create-scratch.js)_
298
299
 
299
300
  ## `sf simply cicd build delete-scratch`
300
301
 
@@ -333,7 +334,7 @@ EXAMPLES
333
334
  $ sf simply cicd build delete-scratch --dev-hub my-devhub
334
335
  ```
335
336
 
336
- _See code: [lib/commands/simply/cicd/build/delete-scratch.js](https://github.com/SimplySF/simply-plugins/blob/@simplysf/simply-cicd@0.19.0/packages/simply-cicd/lib/commands/simply/cicd/build/delete-scratch.js)_
337
+ _See code: [lib/commands/simply/cicd/build/delete-scratch.js](https://github.com/SimplySF/simply-plugins/blob/@simplysf/simply-cicd@0.21.0/packages/simply-cicd/lib/commands/simply/cicd/build/delete-scratch.js)_
337
338
 
338
339
  ## `sf simply cicd build determine-package-changes`
339
340
 
@@ -366,7 +367,7 @@ EXAMPLES
366
367
  $ sf simply cicd build determine-package-changes --out changes.env
367
368
  ```
368
369
 
369
- _See code: [lib/commands/simply/cicd/build/determine-package-changes.js](https://github.com/SimplySF/simply-plugins/blob/@simplysf/simply-cicd@0.19.0/packages/simply-cicd/lib/commands/simply/cicd/build/determine-package-changes.js)_
370
+ _See code: [lib/commands/simply/cicd/build/determine-package-changes.js](https://github.com/SimplySF/simply-plugins/blob/@simplysf/simply-cicd@0.21.0/packages/simply-cicd/lib/commands/simply/cicd/build/determine-package-changes.js)_
370
371
 
371
372
  ## `sf simply cicd build generate-flexipage-diff`
372
373
 
@@ -424,7 +425,7 @@ EXAMPLES
424
425
  $ sf simply cicd build generate-flexipage-diff --vcs-provider github --ci-repository my-org/my-repo --ci-pull-request-number 45 --ci-run-id 987 --from abc123 --to def456 --project-access-token ghp-...
425
426
  ```
426
427
 
427
- _See code: [lib/commands/simply/cicd/build/generate-flexipage-diff.js](https://github.com/SimplySF/simply-plugins/blob/@simplysf/simply-cicd@0.19.0/packages/simply-cicd/lib/commands/simply/cicd/build/generate-flexipage-diff.js)_
428
+ _See code: [lib/commands/simply/cicd/build/generate-flexipage-diff.js](https://github.com/SimplySF/simply-plugins/blob/@simplysf/simply-cicd@0.21.0/packages/simply-cicd/lib/commands/simply/cicd/build/generate-flexipage-diff.js)_
428
429
 
429
430
  ## `sf simply cicd build generate-flow-diff`
430
431
 
@@ -482,7 +483,7 @@ EXAMPLES
482
483
  $ sf simply cicd build generate-flow-diff --vcs-provider github --ci-repository my-org/my-repo --ci-pull-request-number 45 --ci-run-id 987 --from abc123 --to def456 --project-access-token ghp-...
483
484
  ```
484
485
 
485
- _See code: [lib/commands/simply/cicd/build/generate-flow-diff.js](https://github.com/SimplySF/simply-plugins/blob/@simplysf/simply-cicd@0.19.0/packages/simply-cicd/lib/commands/simply/cicd/build/generate-flow-diff.js)_
486
+ _See code: [lib/commands/simply/cicd/build/generate-flow-diff.js](https://github.com/SimplySF/simply-plugins/blob/@simplysf/simply-cicd@0.21.0/packages/simply-cicd/lib/commands/simply/cicd/build/generate-flow-diff.js)_
486
487
 
487
488
  ## `sf simply cicd build install-dependencies`
488
489
 
@@ -533,7 +534,7 @@ FLAG DESCRIPTIONS
533
534
  prompt in a pipeline, it is auto-approved.
534
535
  ```
535
536
 
536
- _See code: [lib/commands/simply/cicd/build/install-dependencies.js](https://github.com/SimplySF/simply-plugins/blob/@simplysf/simply-cicd@0.19.0/packages/simply-cicd/lib/commands/simply/cicd/build/install-dependencies.js)_
537
+ _See code: [lib/commands/simply/cicd/build/install-dependencies.js](https://github.com/SimplySF/simply-plugins/blob/@simplysf/simply-cicd@0.21.0/packages/simply-cicd/lib/commands/simply/cicd/build/install-dependencies.js)_
537
538
 
538
539
  ## `sf simply cicd build lwc-jest`
539
540
 
@@ -573,7 +574,7 @@ EXAMPLES
573
574
  $ sf simply cicd build lwc-jest --lwc-jest-fail-on-test-failure
574
575
  ```
575
576
 
576
- _See code: [lib/commands/simply/cicd/build/lwc-jest.js](https://github.com/SimplySF/simply-plugins/blob/@simplysf/simply-cicd@0.19.0/packages/simply-cicd/lib/commands/simply/cicd/build/lwc-jest.js)_
577
+ _See code: [lib/commands/simply/cicd/build/lwc-jest.js](https://github.com/SimplySF/simply-plugins/blob/@simplysf/simply-cicd@0.21.0/packages/simply-cicd/lib/commands/simply/cicd/build/lwc-jest.js)_
577
578
 
578
579
  ## `sf simply cicd build publish-utam-page-objects`
579
580
 
@@ -676,7 +677,7 @@ EXAMPLES
676
677
  --subscriber-package-version-id 04tXXXXXXXXXXXXXXX --dry-run
677
678
  ```
678
679
 
679
- _See code: [lib/commands/simply/cicd/build/publish-utam-page-objects.js](https://github.com/SimplySF/simply-plugins/blob/@simplysf/simply-cicd@0.19.0/packages/simply-cicd/lib/commands/simply/cicd/build/publish-utam-page-objects.js)_
680
+ _See code: [lib/commands/simply/cicd/build/publish-utam-page-objects.js](https://github.com/SimplySF/simply-plugins/blob/@simplysf/simply-cicd@0.21.0/packages/simply-cicd/lib/commands/simply/cicd/build/publish-utam-page-objects.js)_
680
681
 
681
682
  ## `sf simply cicd build push-scratch`
682
683
 
@@ -717,7 +718,7 @@ EXAMPLES
717
718
  $ sf simply cicd build push-scratch --jwt-key-file ./server.key
718
719
  ```
719
720
 
720
- _See code: [lib/commands/simply/cicd/build/push-scratch.js](https://github.com/SimplySF/simply-plugins/blob/@simplysf/simply-cicd@0.19.0/packages/simply-cicd/lib/commands/simply/cicd/build/push-scratch.js)_
721
+ _See code: [lib/commands/simply/cicd/build/push-scratch.js](https://github.com/SimplySF/simply-plugins/blob/@simplysf/simply-cicd@0.21.0/packages/simply-cicd/lib/commands/simply/cicd/build/push-scratch.js)_
721
722
 
722
723
  ## `sf simply cicd build test-scratch`
723
724
 
@@ -753,7 +754,7 @@ EXAMPLES
753
754
  $ sf simply cicd build test-scratch --jwt-key-file ./server.key
754
755
  ```
755
756
 
756
- _See code: [lib/commands/simply/cicd/build/test-scratch.js](https://github.com/SimplySF/simply-plugins/blob/@simplysf/simply-cicd@0.19.0/packages/simply-cicd/lib/commands/simply/cicd/build/test-scratch.js)_
757
+ _See code: [lib/commands/simply/cicd/build/test-scratch.js](https://github.com/SimplySF/simply-plugins/blob/@simplysf/simply-cicd@0.21.0/packages/simply-cicd/lib/commands/simply/cicd/build/test-scratch.js)_
757
758
 
758
759
  ## `sf simply cicd deploy happy-soup deploy-unpackaged`
759
760
 
@@ -804,7 +805,7 @@ EXAMPLES
804
805
  $ sf simply cicd deploy happy-soup deploy-unpackaged --ci-job-token $CI_JOB_TOKEN --alias my-org --source-branch-name release/uat
805
806
  ```
806
807
 
807
- _See code: [lib/commands/simply/cicd/deploy/happy-soup/deploy-unpackaged.js](https://github.com/SimplySF/simply-plugins/blob/@simplysf/simply-cicd@0.19.0/packages/simply-cicd/lib/commands/simply/cicd/deploy/happy-soup/deploy-unpackaged.js)_
808
+ _See code: [lib/commands/simply/cicd/deploy/happy-soup/deploy-unpackaged.js](https://github.com/SimplySF/simply-plugins/blob/@simplysf/simply-cicd@0.21.0/packages/simply-cicd/lib/commands/simply/cicd/deploy/happy-soup/deploy-unpackaged.js)_
808
809
 
809
810
  ## `sf simply cicd deploy happy-soup deployment-close-out`
810
811
 
@@ -858,7 +859,7 @@ EXAMPLES
858
859
  $ sf simply cicd deploy happy-soup deployment-close-out --ci-commit-ref-name main --ci-pipeline-id 123 --ci-project-path group/project --project-access-token $PROJECT_ACCESS_TOKEN --deploy-release-date 2026-01-15
859
860
  ```
860
861
 
861
- _See code: [lib/commands/simply/cicd/deploy/happy-soup/deployment-close-out.js](https://github.com/SimplySF/simply-plugins/blob/@simplysf/simply-cicd@0.19.0/packages/simply-cicd/lib/commands/simply/cicd/deploy/happy-soup/deployment-close-out.js)_
862
+ _See code: [lib/commands/simply/cicd/deploy/happy-soup/deployment-close-out.js](https://github.com/SimplySF/simply-plugins/blob/@simplysf/simply-cicd@0.21.0/packages/simply-cicd/lib/commands/simply/cicd/deploy/happy-soup/deployment-close-out.js)_
862
863
 
863
864
  ## `sf simply cicd deploy happy-soup install-packaged`
864
865
 
@@ -918,7 +919,7 @@ FLAG DESCRIPTIONS
918
919
  prompt in a pipeline, it is auto-approved.
919
920
  ```
920
921
 
921
- _See code: [lib/commands/simply/cicd/deploy/happy-soup/install-packaged.js](https://github.com/SimplySF/simply-plugins/blob/@simplysf/simply-cicd@0.19.0/packages/simply-cicd/lib/commands/simply/cicd/deploy/happy-soup/install-packaged.js)_
922
+ _See code: [lib/commands/simply/cicd/deploy/happy-soup/install-packaged.js](https://github.com/SimplySF/simply-plugins/blob/@simplysf/simply-cicd@0.21.0/packages/simply-cicd/lib/commands/simply/cicd/deploy/happy-soup/install-packaged.js)_
922
923
 
923
924
  ## `sf simply cicd deploy happy-soup post-deploy`
924
925
 
@@ -969,7 +970,7 @@ EXAMPLES
969
970
  $ sf simply cicd deploy happy-soup post-deploy --ci-job-token $CI_JOB_TOKEN --alias my-org --source-branch-name release/uat
970
971
  ```
971
972
 
972
- _See code: [lib/commands/simply/cicd/deploy/happy-soup/post-deploy.js](https://github.com/SimplySF/simply-plugins/blob/@simplysf/simply-cicd@0.19.0/packages/simply-cicd/lib/commands/simply/cicd/deploy/happy-soup/post-deploy.js)_
973
+ _See code: [lib/commands/simply/cicd/deploy/happy-soup/post-deploy.js](https://github.com/SimplySF/simply-plugins/blob/@simplysf/simply-cicd@0.21.0/packages/simply-cicd/lib/commands/simply/cicd/deploy/happy-soup/post-deploy.js)_
973
974
 
974
975
  ## `sf simply cicd deploy happy-soup post-destructive`
975
976
 
@@ -1020,7 +1021,7 @@ EXAMPLES
1020
1021
  $ sf simply cicd deploy happy-soup post-destructive --ci-job-token $CI_JOB_TOKEN --alias my-org --source-branch-name release/uat
1021
1022
  ```
1022
1023
 
1023
- _See code: [lib/commands/simply/cicd/deploy/happy-soup/post-destructive.js](https://github.com/SimplySF/simply-plugins/blob/@simplysf/simply-cicd@0.19.0/packages/simply-cicd/lib/commands/simply/cicd/deploy/happy-soup/post-destructive.js)_
1024
+ _See code: [lib/commands/simply/cicd/deploy/happy-soup/post-destructive.js](https://github.com/SimplySF/simply-plugins/blob/@simplysf/simply-cicd@0.21.0/packages/simply-cicd/lib/commands/simply/cicd/deploy/happy-soup/post-destructive.js)_
1024
1025
 
1025
1026
  ## `sf simply cicd deploy happy-soup pre-destructive`
1026
1027
 
@@ -1071,7 +1072,7 @@ EXAMPLES
1071
1072
  $ sf simply cicd deploy happy-soup pre-destructive --ci-job-token $CI_JOB_TOKEN --alias my-org --source-branch-name release/uat
1072
1073
  ```
1073
1074
 
1074
- _See code: [lib/commands/simply/cicd/deploy/happy-soup/pre-destructive.js](https://github.com/SimplySF/simply-plugins/blob/@simplysf/simply-cicd@0.19.0/packages/simply-cicd/lib/commands/simply/cicd/deploy/happy-soup/pre-destructive.js)_
1075
+ _See code: [lib/commands/simply/cicd/deploy/happy-soup/pre-destructive.js](https://github.com/SimplySF/simply-plugins/blob/@simplysf/simply-cicd@0.21.0/packages/simply-cicd/lib/commands/simply/cicd/deploy/happy-soup/pre-destructive.js)_
1075
1076
 
1076
1077
  ## `sf simply cicd deploy happy-soup tag-deployment`
1077
1078
 
@@ -1123,7 +1124,7 @@ EXAMPLES
1123
1124
  $ sf simply cicd deploy happy-soup tag-deployment --alias my-org --ci-pipeline-id 123 --ci-pipeline-url https://gitlab.example.com/group/project/-/pipelines/123 --ci-project-path group/project --ci-merge-request-iid 45 --ci-merge-request-project-url https://gitlab.example.com/group/project --project-access-token $PROJECT_ACCESS_TOKEN
1124
1125
  ```
1125
1126
 
1126
- _See code: [lib/commands/simply/cicd/deploy/happy-soup/tag-deployment.js](https://github.com/SimplySF/simply-plugins/blob/@simplysf/simply-cicd@0.19.0/packages/simply-cicd/lib/commands/simply/cicd/deploy/happy-soup/tag-deployment.js)_
1127
+ _See code: [lib/commands/simply/cicd/deploy/happy-soup/tag-deployment.js](https://github.com/SimplySF/simply-plugins/blob/@simplysf/simply-cicd@0.21.0/packages/simply-cicd/lib/commands/simply/cicd/deploy/happy-soup/tag-deployment.js)_
1127
1128
 
1128
1129
  ## `sf simply cicd deploy happy-soup validate`
1129
1130
 
@@ -1161,7 +1162,7 @@ EXAMPLES
1161
1162
  $ sf simply cicd deploy happy-soup validate --deploy-config-file deployment-configs/uat.json --deploy-rules-file config/deploy-rules.json
1162
1163
  ```
1163
1164
 
1164
- _See code: [lib/commands/simply/cicd/deploy/happy-soup/validate.js](https://github.com/SimplySF/simply-plugins/blob/@simplysf/simply-cicd@0.19.0/packages/simply-cicd/lib/commands/simply/cicd/deploy/happy-soup/validate.js)_
1165
+ _See code: [lib/commands/simply/cicd/deploy/happy-soup/validate.js](https://github.com/SimplySF/simply-plugins/blob/@simplysf/simply-cicd@0.21.0/packages/simply-cicd/lib/commands/simply/cicd/deploy/happy-soup/validate.js)_
1165
1166
 
1166
1167
  ## `sf simply cicd deploy project deploy-unpackaged`
1167
1168
 
@@ -1209,7 +1210,7 @@ EXAMPLES
1209
1210
  $ sf simply cicd deploy project deploy-unpackaged --ci-job-token $CI_JOB_TOKEN --alias my-org
1210
1211
  ```
1211
1212
 
1212
- _See code: [lib/commands/simply/cicd/deploy/project/deploy-unpackaged.js](https://github.com/SimplySF/simply-plugins/blob/@simplysf/simply-cicd@0.19.0/packages/simply-cicd/lib/commands/simply/cicd/deploy/project/deploy-unpackaged.js)_
1213
+ _See code: [lib/commands/simply/cicd/deploy/project/deploy-unpackaged.js](https://github.com/SimplySF/simply-plugins/blob/@simplysf/simply-cicd@0.21.0/packages/simply-cicd/lib/commands/simply/cicd/deploy/project/deploy-unpackaged.js)_
1213
1214
 
1214
1215
  ## `sf simply cicd deploy project install-packaged`
1215
1216
 
@@ -1273,7 +1274,7 @@ FLAG DESCRIPTIONS
1273
1274
  prompt in a pipeline, it is auto-approved.
1274
1275
  ```
1275
1276
 
1276
- _See code: [lib/commands/simply/cicd/deploy/project/install-packaged.js](https://github.com/SimplySF/simply-plugins/blob/@simplysf/simply-cicd@0.19.0/packages/simply-cicd/lib/commands/simply/cicd/deploy/project/install-packaged.js)_
1277
+ _See code: [lib/commands/simply/cicd/deploy/project/install-packaged.js](https://github.com/SimplySF/simply-plugins/blob/@simplysf/simply-cicd@0.21.0/packages/simply-cicd/lib/commands/simply/cicd/deploy/project/install-packaged.js)_
1277
1278
 
1278
1279
  ## `sf simply cicd deploy project post-deploy`
1279
1280
 
@@ -1321,7 +1322,7 @@ EXAMPLES
1321
1322
  $ sf simply cicd deploy project post-deploy --ci-job-token $CI_JOB_TOKEN --alias my-org
1322
1323
  ```
1323
1324
 
1324
- _See code: [lib/commands/simply/cicd/deploy/project/post-deploy.js](https://github.com/SimplySF/simply-plugins/blob/@simplysf/simply-cicd@0.19.0/packages/simply-cicd/lib/commands/simply/cicd/deploy/project/post-deploy.js)_
1325
+ _See code: [lib/commands/simply/cicd/deploy/project/post-deploy.js](https://github.com/SimplySF/simply-plugins/blob/@simplysf/simply-cicd@0.21.0/packages/simply-cicd/lib/commands/simply/cicd/deploy/project/post-deploy.js)_
1325
1326
 
1326
1327
  ## `sf simply cicd deploy project post-destructive`
1327
1328
 
@@ -1369,7 +1370,7 @@ EXAMPLES
1369
1370
  $ sf simply cicd deploy project post-destructive --ci-job-token $CI_JOB_TOKEN --alias my-org
1370
1371
  ```
1371
1372
 
1372
- _See code: [lib/commands/simply/cicd/deploy/project/post-destructive.js](https://github.com/SimplySF/simply-plugins/blob/@simplysf/simply-cicd@0.19.0/packages/simply-cicd/lib/commands/simply/cicd/deploy/project/post-destructive.js)_
1373
+ _See code: [lib/commands/simply/cicd/deploy/project/post-destructive.js](https://github.com/SimplySF/simply-plugins/blob/@simplysf/simply-cicd@0.21.0/packages/simply-cicd/lib/commands/simply/cicd/deploy/project/post-destructive.js)_
1373
1374
 
1374
1375
  ## `sf simply cicd deploy project pre-destructive`
1375
1376
 
@@ -1417,7 +1418,7 @@ EXAMPLES
1417
1418
  $ sf simply cicd deploy project pre-destructive --ci-job-token $CI_JOB_TOKEN --alias my-org
1418
1419
  ```
1419
1420
 
1420
- _See code: [lib/commands/simply/cicd/deploy/project/pre-destructive.js](https://github.com/SimplySF/simply-plugins/blob/@simplysf/simply-cicd@0.19.0/packages/simply-cicd/lib/commands/simply/cicd/deploy/project/pre-destructive.js)_
1421
+ _See code: [lib/commands/simply/cicd/deploy/project/pre-destructive.js](https://github.com/SimplySF/simply-plugins/blob/@simplysf/simply-cicd@0.21.0/packages/simply-cicd/lib/commands/simply/cicd/deploy/project/pre-destructive.js)_
1421
1422
 
1422
1423
  ## `sf simply cicd deploy project run-apex-tests`
1423
1424
 
@@ -1464,7 +1465,7 @@ EXAMPLES
1464
1465
  $ sf simply cicd deploy project run-apex-tests --ci-job-token $CI_JOB_TOKEN --alias my-org
1465
1466
  ```
1466
1467
 
1467
- _See code: [lib/commands/simply/cicd/deploy/project/run-apex-tests.js](https://github.com/SimplySF/simply-plugins/blob/@simplysf/simply-cicd@0.19.0/packages/simply-cicd/lib/commands/simply/cicd/deploy/project/run-apex-tests.js)_
1468
+ _See code: [lib/commands/simply/cicd/deploy/project/run-apex-tests.js](https://github.com/SimplySF/simply-plugins/blob/@simplysf/simply-cicd@0.21.0/packages/simply-cicd/lib/commands/simply/cicd/deploy/project/run-apex-tests.js)_
1468
1469
 
1469
1470
  ## `sf simply cicd deploy project validate`
1470
1471
 
@@ -1499,7 +1500,7 @@ EXAMPLES
1499
1500
  $ sf simply cicd deploy project validate --deploy-config-file config/deploy.json --deploy-rules-file config/deploy-rules.json
1500
1501
  ```
1501
1502
 
1502
- _See code: [lib/commands/simply/cicd/deploy/project/validate.js](https://github.com/SimplySF/simply-plugins/blob/@simplysf/simply-cicd@0.19.0/packages/simply-cicd/lib/commands/simply/cicd/deploy/project/validate.js)_
1503
+ _See code: [lib/commands/simply/cicd/deploy/project/validate.js](https://github.com/SimplySF/simply-plugins/blob/@simplysf/simply-cicd@0.21.0/packages/simply-cicd/lib/commands/simply/cicd/deploy/project/validate.js)_
1503
1504
 
1504
1505
  ## `sf simply cicd deploy validate`
1505
1506
 
@@ -1533,7 +1534,7 @@ EXAMPLES
1533
1534
  $ sf simply cicd deploy validate --deploy-config-file config/deploy.json --deploy-rules-file config/deploy-rules.json
1534
1535
  ```
1535
1536
 
1536
- _See code: [lib/commands/simply/cicd/deploy/validate.js](https://github.com/SimplySF/simply-plugins/blob/@simplysf/simply-cicd@0.19.0/packages/simply-cicd/lib/commands/simply/cicd/deploy/validate.js)_
1537
+ _See code: [lib/commands/simply/cicd/deploy/validate.js](https://github.com/SimplySF/simply-plugins/blob/@simplysf/simply-cicd@0.21.0/packages/simply-cicd/lib/commands/simply/cicd/deploy/validate.js)_
1537
1538
 
1538
1539
  ## `sf simply cicd notify build`
1539
1540
 
@@ -1609,7 +1610,7 @@ EXAMPLES
1609
1610
  --teams-webhook-url https://outlook.office.com/webhook/... --enabled
1610
1611
  ```
1611
1612
 
1612
- _See code: [lib/commands/simply/cicd/notify/build.js](https://github.com/SimplySF/simply-plugins/blob/@simplysf/simply-cicd@0.19.0/packages/simply-cicd/lib/commands/simply/cicd/notify/build.js)_
1613
+ _See code: [lib/commands/simply/cicd/notify/build.js](https://github.com/SimplySF/simply-plugins/blob/@simplysf/simply-cicd@0.21.0/packages/simply-cicd/lib/commands/simply/cicd/notify/build.js)_
1613
1614
 
1614
1615
  ## `sf simply cicd notify happy-soup`
1615
1616
 
@@ -1682,7 +1683,7 @@ EXAMPLES
1682
1683
  $ sf simply cicd notify happy-soup --after-script --is-final-job --notify-on-completion --ci-job-status success --teams-webhook-url https://outlook.office.com/webhook/... --enabled
1683
1684
  ```
1684
1685
 
1685
- _See code: [lib/commands/simply/cicd/notify/happy-soup.js](https://github.com/SimplySF/simply-plugins/blob/@simplysf/simply-cicd@0.19.0/packages/simply-cicd/lib/commands/simply/cicd/notify/happy-soup.js)_
1686
+ _See code: [lib/commands/simply/cicd/notify/happy-soup.js](https://github.com/SimplySF/simply-plugins/blob/@simplysf/simply-cicd@0.21.0/packages/simply-cicd/lib/commands/simply/cicd/notify/happy-soup.js)_
1686
1687
 
1687
1688
  ## `sf simply cicd notify project`
1688
1689
 
@@ -1756,7 +1757,7 @@ EXAMPLES
1756
1757
  $ sf simply cicd notify project --after-script --ci-job-stage post-destructive --ci-job-status success --teams-webhook-url https://outlook.office.com/webhook/... --enabled
1757
1758
  ```
1758
1759
 
1759
- _See code: [lib/commands/simply/cicd/notify/project.js](https://github.com/SimplySF/simply-plugins/blob/@simplysf/simply-cicd@0.19.0/packages/simply-cicd/lib/commands/simply/cicd/notify/project.js)_
1760
+ _See code: [lib/commands/simply/cicd/notify/project.js](https://github.com/SimplySF/simply-plugins/blob/@simplysf/simply-cicd@0.21.0/packages/simply-cicd/lib/commands/simply/cicd/notify/project.js)_
1760
1761
 
1761
1762
  ## `sf simply cicd notify teams`
1762
1763
 
@@ -1788,7 +1789,7 @@ EXAMPLES
1788
1789
  $ sf simply cicd notify teams --payload '{"text":"Deployment complete"}' --webhook-url https://outlook.office.com/webhook/... --enabled
1789
1790
  ```
1790
1791
 
1791
- _See code: [lib/commands/simply/cicd/notify/teams.js](https://github.com/SimplySF/simply-plugins/blob/@simplysf/simply-cicd@0.19.0/packages/simply-cicd/lib/commands/simply/cicd/notify/teams.js)_
1792
+ _See code: [lib/commands/simply/cicd/notify/teams.js](https://github.com/SimplySF/simply-plugins/blob/@simplysf/simply-cicd@0.21.0/packages/simply-cicd/lib/commands/simply/cicd/notify/teams.js)_
1792
1793
 
1793
1794
  ## `sf simply cicd sfdx-dependabot`
1794
1795
 
@@ -1864,7 +1865,7 @@ FLAG DESCRIPTIONS
1864
1865
  Defaults to the selected provider's public instance if not provided.
1865
1866
  ```
1866
1867
 
1867
- _See code: [lib/commands/simply/cicd/sfdx-dependabot.js](https://github.com/SimplySF/simply-plugins/blob/@simplysf/simply-cicd@0.19.0/packages/simply-cicd/lib/commands/simply/cicd/sfdx-dependabot.js)_
1868
+ _See code: [lib/commands/simply/cicd/sfdx-dependabot.js](https://github.com/SimplySF/simply-plugins/blob/@simplysf/simply-cicd@0.21.0/packages/simply-cicd/lib/commands/simply/cicd/sfdx-dependabot.js)_
1868
1869
  <!-- commandsstop -->
1869
1870
 
1870
1871
  ## License
@@ -2,20 +2,21 @@ import { type PermissionSetCheckResult } from '@simplysf/simply-permissions-core
2
2
  export type RunCheckPermissionSetsOptions = {
3
3
  disabled?: boolean;
4
4
  };
5
- export type PermissionSetsFileCheck = {
5
+ export type PermissionSetBuildFileCheck = {
6
6
  file: string;
7
- permissionSets: PermissionSetCheckResult[];
7
+ permissionSet: PermissionSetCheckResult;
8
8
  };
9
9
  export type RunCheckPermissionSetsResult = {
10
10
  skipped: boolean;
11
- files: PermissionSetsFileCheck[];
11
+ files: PermissionSetBuildFileCheck[];
12
12
  };
13
13
  /**
14
- * Finds every permission sets file in the repo and checks each permission set it declares against
15
- * the generated file on disk, writing nothing. A repo with no permission sets files is a skip. Every
16
- * file is checked before failing, so one run reports every stale permission set; an invalid file
17
- * fails at once.
14
+ * Finds every permission set build file in the repo and checks the permission set each defines
15
+ * against the generated file on disk, writing nothing. A repo with no permission set build files is
16
+ * a skip. Every file is loaded and validated, and names are checked for duplicates across files,
17
+ * before anything is checked; then every permission set is checked before failing, so one run
18
+ * reports every stale permission set.
18
19
  *
19
- * @throws When any permission set has drifted or is missing, or a permission sets file is invalid.
20
+ * @throws When any permission set has drifted or is missing, or a permission set build file is invalid.
20
21
  */
21
22
  export declare function runCheckPermissionSets(options: RunCheckPermissionSetsOptions): Promise<RunCheckPermissionSetsResult>;
@@ -13,7 +13,7 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
- import { checkPermissionSets, findPermissionSetsFiles, loadPermissionSetsFile, PermissionSetBuildError, } from '@simplysf/simply-permissions-core';
16
+ import { assertUniquePermissionSetNames, checkPermissionSets, findPermissionSetBuildFiles, loadPermissionSetBuildFile, PermissionSetBuildError, } from '@simplysf/simply-permissions-core';
17
17
  import { logger } from '../logger.js';
18
18
  /** The same text `simply permissions build` reports for each `PermissionSetBuildError` code. */
19
19
  function describeBuildError(error) {
@@ -26,65 +26,77 @@ function describeBuildError(error) {
26
26
  return `The configuration file ${error.args[0]} does not exist.`;
27
27
  case 'directory-not-found':
28
28
  return `The source directory ${error.args[0]} for permission set ${error.args[1]} does not exist.`;
29
+ case 'legacy-format':
30
+ return `${error.args[0]} uses the old format, a "permissionSets" list, which is no longer supported. Split it into one .psbuild.json file per permission set, with each permission set's settings at the top level.`;
31
+ case 'duplicate-name':
32
+ return `Permission set ${error.args[0]} is defined by both ${error.args[1]} and ${error.args[2]}. Each permission set must be defined by exactly one .psbuild.json file.`;
29
33
  }
30
34
  }
31
- async function checkFile(file) {
35
+ /** Logs `message` and throws it, keeping the build error as the cause. */
36
+ function fail(message, cause) {
37
+ logger.error(message);
38
+ throw new Error(message, { cause });
39
+ }
40
+ /** Loads every file in order, naming the file in any validation error, then checks names are unique across files. */
41
+ async function loadFiles(files) {
42
+ const entries = [];
43
+ for (const file of files) {
44
+ logger.info(`Loading permission set build file ${file}...`);
45
+ try {
46
+ // eslint-disable-next-line no-await-in-loop -- files are loaded in order so the first invalid one is the one reported
47
+ entries.push({ file, spec: await loadPermissionSetBuildFile(file) });
48
+ }
49
+ catch (error) {
50
+ if (error instanceof PermissionSetBuildError) {
51
+ fail(`Permission set build file ${file}: ${describeBuildError(error)}`, error);
52
+ }
53
+ throw error;
54
+ }
55
+ }
32
56
  try {
33
- return { file, permissionSets: await checkPermissionSets(await loadPermissionSetsFile(file)) };
57
+ assertUniquePermissionSetNames(entries);
34
58
  }
35
59
  catch (error) {
36
60
  if (error instanceof PermissionSetBuildError) {
37
- const message = `Permission sets file ${file}: ${describeBuildError(error)}`;
38
- logger.error(message);
39
- throw new Error(message, { cause: error });
61
+ fail(describeBuildError(error), error);
40
62
  }
41
63
  throw error;
42
64
  }
65
+ return entries;
43
66
  }
44
67
  /**
45
- * Finds every permission sets file in the repo and checks each permission set it declares against
46
- * the generated file on disk, writing nothing. A repo with no permission sets files is a skip. Every
47
- * file is checked before failing, so one run reports every stale permission set; an invalid file
48
- * fails at once.
68
+ * Finds every permission set build file in the repo and checks the permission set each defines
69
+ * against the generated file on disk, writing nothing. A repo with no permission set build files is
70
+ * a skip. Every file is loaded and validated, and names are checked for duplicates across files,
71
+ * before anything is checked; then every permission set is checked before failing, so one run
72
+ * reports every stale permission set.
49
73
  *
50
- * @throws When any permission set has drifted or is missing, or a permission sets file is invalid.
74
+ * @throws When any permission set has drifted or is missing, or a permission set build file is invalid.
51
75
  */
52
76
  export async function runCheckPermissionSets(options) {
53
77
  if (options.disabled) {
54
78
  logger.warn('check-permission-sets is disabled. Skipping.');
55
79
  return { skipped: true, files: [] };
56
80
  }
57
- const files = await findPermissionSetsFiles();
81
+ const files = await findPermissionSetBuildFiles();
58
82
  if (files.length === 0) {
59
- logger.warn('No permission sets files found. Skipping.');
83
+ logger.warn('No permission set build files found. Skipping.');
60
84
  return { skipped: true, files: [] };
61
85
  }
62
- const checks = [];
63
- let total = 0;
64
- let stale = 0;
65
- for (const file of files) {
66
- logger.info(`Checking permission sets file ${file}...`);
67
- // eslint-disable-next-line no-await-in-loop -- files are checked in order so the log reads top to bottom
68
- const check = await checkFile(file);
69
- checks.push(check);
70
- const staleSets = check.permissionSets.filter((permissionSet) => permissionSet.status !== 'up-to-date');
71
- total += check.permissionSets.length;
72
- stale += staleSets.length;
73
- if (staleSets.length === 0) {
74
- logger.success(`${check.permissionSets.length} permission set(s) up to date.`);
75
- continue;
76
- }
77
- for (const permissionSet of staleSets) {
78
- logger.error(`${permissionSet.name} ${permissionSet.status} ${permissionSet.path}`);
79
- }
80
- logger.log(`Regenerate with: sf simply permissions build --file ${file}`);
86
+ const entries = await loadFiles(files);
87
+ const results = await checkPermissionSets(entries.map(({ spec }) => spec));
88
+ const checks = entries.map(({ file }, i) => ({ file, permissionSet: results[i] }));
89
+ const stale = checks.filter(({ permissionSet }) => permissionSet.status !== 'up-to-date');
90
+ for (const { file, permissionSet } of stale) {
91
+ logger.error(`${permissionSet.name} ${permissionSet.status} ${permissionSet.path} (${file})`);
81
92
  }
82
- if (stale > 0) {
83
- const message = `${stale} of ${total} permission set(s) have drifted from their source metadata or are missing.`;
93
+ if (stale.length > 0) {
94
+ logger.log('Regenerate with: sf simply permissions build');
95
+ const message = `${stale.length} of ${checks.length} permission set(s) have drifted from their source metadata or are missing.`;
84
96
  logger.error(message);
85
97
  throw new Error(message);
86
98
  }
87
- logger.success(`All ${total} permission set(s) in ${files.length} permission sets file(s) are up to date.`);
99
+ logger.success(`All ${checks.length} permission set(s) are up to date.`);
88
100
  return { skipped: false, files: checks };
89
101
  }
90
102
  //# sourceMappingURL=checkPermissionSets.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"checkPermissionSets.js","sourceRoot":"","sources":["../../../src/common/build/checkPermissionSets.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EACL,mBAAmB,EACnB,uBAAuB,EACvB,sBAAs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a,EAAE,EAAE,EAAE,CAAC,aAAa,CAAC,MAAM,KAAK,YAAY,CAAC,CAAC;IAC1F,KAAK,MAAM,EAAE,IAAI,EAAE,aAAa,EAAE,IAAI,KAAK,EAAE,CAAC;QAC5C,MAAM,CAAC,KAAK,CAAC,GAAG,aAAa,CAAC,IAAI,IAAI,aAAa,CAAC,MAAM,IAAI,aAAa,CAAC,IAAI,KAAK,IAAI,GAAG,CAAC,CAAC;IAChG,CAAC;IAED,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACrB,MAAM,CAAC,GAAG,CAAC,8CAA8C,CAAC,CAAC;QAC3D,MAAM,OAAO,GAAG,GAAG,KAAK,CAAC,MAAM,OAAO,MAAM,CAAC,MAAM,4EAA4E,CAAC;QAChI,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;QACtB,MAAM,IAAI,KAAK,CAAC,OAAO,CAAC,CAAC;IAC3B,CAAC;IAED,MAAM,CAAC,OAAO,CAAC,OAAO,MAAM,CAAC,MAAM,oCAAoC,CAAC,CAAC;IACzE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC;AAC3C,CAAC"}
@@ -4,9 +4,9 @@ Fail the pipeline when any generated permission set in the repo has drifted from
4
4
 
5
5
  # description
6
6
 
7
- Finds every permission sets file in the repo, meaning every file whose name ends in `.psbuild.json` (the JSON format `sf simply permissions build --file` reads), and checks each permission set it declares, the same way `sf simply permissions build --file <file> --check` does. Nothing is written. Files are found by walking the directory tree from the current directory, skipping `node_modules`, `.git`, `.sf`, and `.sfdx`, so `find . -name '*.psbuild.json'` lists what will be checked. Relative paths in a permission sets file resolve against the current directory, so run this from the repo root.
7
+ Finds every permission set build file in the repo, meaning every file whose name ends in `.psbuild.json`, each of which defines one permission set (see `sf simply permissions build`). It checks each of those permission sets the same way `sf simply permissions build --check` does. Nothing is written. Files are found by walking the directory tree from the current directory, skipping `node_modules`, `.git`, `.sf`, and `.sfdx`, so `find . -name '*.psbuild.json'` lists what will be checked. Relative paths in a permission set build file resolve against the current directory, so run this from the repo root.
8
8
 
9
- Every file is checked before the command fails, so one run lists every permission set that has drifted or is missing, along with the command that regenerates each file. A `.psbuild.json` file that fails validation fails the command immediately. A repo with no `.psbuild.json` files is skipped with exit code 0, so the job is safe to include in a shared pipeline template. Formatting differences, such as indentation, line endings, or comments, don't count as drift.
9
+ Every file is loaded and validated before any permission set is checked: a `.psbuild.json` file that fails validation, one in the old `permissionSets` list format, or two files that define the same permission set name fail the command immediately. Every permission set is then checked before the command fails, so one run lists every permission set that has drifted or is missing, with the file that defines it and the command that regenerates them. A repo with no `.psbuild.json` files is skipped with exit code 0, so the job is safe to include in a shared pipeline template. Formatting differences, such as indentation, line endings, or comments, don't count as drift.
10
10
 
11
11
  # examples
12
12