sf-plugin-permission-sets 0.0.0-dev.30 → 0.0.0-dev.32
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 +6 -11
- package/lib/core/resolve.d.ts.map +1 -1
- package/package.json +8 -5
package/README.md
CHANGED
|
@@ -183,9 +183,9 @@ A run performs three operations: **add** missing assignments, **update** changed
|
|
|
183
183
|
|
|
184
184
|
| Mode | Adds missing | Updates expirations | Removes undeclared | Use when… |
|
|
185
185
|
| ------------- | :----------: | :-----------------: | :----------------: | --------------------------------------------------------------------- |
|
|
186
|
+
| `sync` | ✅ | ✅ | ✅ | Full reconcile: make the org exactly match the YAML (`sync` = `additive` + `destructive`). |
|
|
186
187
|
| `additive` | ✅ | ✅ | ❌ | **Default.** Grant access, never revoke. Safe rollout. |
|
|
187
188
|
| `destructive` | ❌ | ❌ | ✅ | Prune/revoke access that isn't declared, without granting anything new. |
|
|
188
|
-
| `sync` | ✅ | ✅ | ✅ | Full reconcile: make the org exactly match the YAML (`sync` = `additive` + `destructive`). |
|
|
189
189
|
|
|
190
190
|
`plan` always shows the *full* picture (adds, expiration updates, **and** would-be removes) regardless of mode, so you can preview the impact before running it. Whatever the chosen mode won't act on is surfaced as **drift**.
|
|
191
191
|
|
|
@@ -195,10 +195,10 @@ Every run checks the files first. `check` runs the offline checks with no org, a
|
|
|
195
195
|
|
|
196
196
|
| Situation | Checked by | Severity | Result |
|
|
197
197
|
| --- | --- | :---: | --- |
|
|
198
|
-
| Same
|
|
198
|
+
| Same user in two files with different targets | `check` (offline) | ✅ ok | Merged into one model, the point of slicing |
|
|
199
199
|
| Same target listed twice for a user | `check` (offline) | ⚠️ warning | Deduped |
|
|
200
200
|
| A user with no scopes, or an empty list | `check` (offline) | ⚠️ warning | Ignored as a no-op |
|
|
201
|
-
| Same
|
|
201
|
+
| Same username key appears twice in one file | `check` (offline) | ❌ error | Rejected, the intent is ambiguous |
|
|
202
202
|
| Declared user, permission set, group, or license missing or not unique | `validate` (online) | ❌ error | Run fails before any change |
|
|
203
203
|
|
|
204
204
|
## Commands
|
|
@@ -217,12 +217,11 @@ Fully offline: runs in any CI job or pre-commit hook without org credentials.
|
|
|
217
217
|
|
|
218
218
|
```
|
|
219
219
|
USAGE
|
|
220
|
-
$ sf ps check -f <glob>... [--strict] [--
|
|
220
|
+
$ sf ps check -f <glob>... [--strict] [--json]
|
|
221
221
|
|
|
222
222
|
FLAGS
|
|
223
223
|
-f, --file=<glob>... (required) YAML file(s) to read. Repeatable, globs are expanded by the plugin.
|
|
224
224
|
--strict Treat warnings as errors.
|
|
225
|
-
-w, --watch Re-run on every change to a matched file. Stays in the foreground until you stop it (Ctrl-C).
|
|
226
225
|
|
|
227
226
|
CHECKS
|
|
228
227
|
- valid YAML & schema (unknown keys rejected)
|
|
@@ -232,18 +231,15 @@ CHECKS
|
|
|
232
231
|
- internal referential integrity
|
|
233
232
|
```
|
|
234
233
|
|
|
235
|
-
`--watch` is for the local edit loop: leave it running while you tweak the YAML and the findings refresh on every save. It re-expands the globs each run, so files you add or delete are picked up too. It's a foreground, interactive mode, so it can't be combined with `--json` and isn't meant for CI, where a single gated `check` run is what you want.
|
|
236
|
-
|
|
237
234
|
### `sf ps validate`
|
|
238
235
|
|
|
239
236
|
```
|
|
240
237
|
USAGE
|
|
241
|
-
$ sf ps validate -o <org> -f <glob>... [--
|
|
238
|
+
$ sf ps validate -o <org> -f <glob>... [--json]
|
|
242
239
|
|
|
243
240
|
FLAGS
|
|
244
241
|
-o, --target-org=<org> (required) Org to resolve against.
|
|
245
242
|
-f, --file=<glob>... (required) YAML file(s) to read. Repeatable, globs expanded by the plugin.
|
|
246
|
-
-w, --watch Re-run on every change to a matched file. Read-only, but each run queries the org, so point it at a scratch or dev org.
|
|
247
243
|
|
|
248
244
|
Runs all offline checks, then verifies that every user (active), permission set,
|
|
249
245
|
group, and license referenced actually exists and resolves uniquely.
|
|
@@ -253,13 +249,12 @@ group, and license referenced actually exists and resolves uniquely.
|
|
|
253
249
|
|
|
254
250
|
```
|
|
255
251
|
USAGE
|
|
256
|
-
$ sf ps plan -o <org> -f <glob>... [--mode <value>] [--
|
|
252
|
+
$ sf ps plan -o <org> -f <glob>... [--mode <value>] [--json]
|
|
257
253
|
|
|
258
254
|
FLAGS
|
|
259
255
|
-o, --target-org=<org> (required)
|
|
260
256
|
-f, --file=<glob>... (required) YAML file(s) to read. Repeatable, globs expanded by the plugin.
|
|
261
257
|
--mode=<value> additive | destructive | sync [default: additive]
|
|
262
|
-
-w, --watch Re-diff against the org on every change to a matched file. Read-only (never applies), but each run queries the org.
|
|
263
258
|
```
|
|
264
259
|
|
|
265
260
|
Example output:
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolve.d.ts","sourceRoot":"","sources":["../../src/core/resolve.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACzE,OAAO,EAAE,OAAO,EAAmF,MAAM,cAAc,CAAC;AASxH,eAAO,MAAM,KAAK,
|
|
1
|
+
{"version":3,"file":"resolve.d.ts","sourceRoot":"","sources":["../../src/core/resolve.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACzE,OAAO,EAAE,OAAO,EAAmF,MAAM,cAAc,CAAC;AASxH,eAAO,MAAM,KAAK,EAA8B,IAAI,EAAE,CAAC;AAMvD,8DAA8D;AAC9D,wBAAgB,iBAAiB,CAAC,WAAW,EAAE,iBAAiB,EAAE,GAAG,MAAM,EAAE,CAE5E;AAED,+DAA+D;AAC/D,wBAAgB,eAAe,CAAC,WAAW,EAAE,iBAAiB,EAAE,EAAE,IAAI,EAAE,IAAI,GAAG,MAAM,EAAE,CAItF;AAED,+DAA+D;AAC/D,wBAAgB,aAAa,CAAC,QAAQ,EAAE,MAAM,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE,GAAG,OAAO,EAAE,CAgB7E;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,OAAO,EAAE,CAmB1F;AAED,2FAA2F;AAC3F,wBAAgB,cAAc,CAAC,KAAK,EAAE,OAAO,EAAE,GAAG,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAQpE;AAED,iGAAiG;AACjG,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,SAAS,EAAE,GAAG,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAexE"}
|
package/package.json
CHANGED
|
@@ -16,9 +16,10 @@
|
|
|
16
16
|
"devDependencies": {
|
|
17
17
|
"@eslint/js": "^10.0.1",
|
|
18
18
|
"eslint": "^10.6.0",
|
|
19
|
+
"execa": "^9.6.1",
|
|
19
20
|
"globals": "^17.7.0",
|
|
20
21
|
"ts-node": "^10.9.2",
|
|
21
|
-
"typescript": "^
|
|
22
|
+
"typescript": "^6.0.3",
|
|
22
23
|
"typescript-eslint": "^8.62.1",
|
|
23
24
|
"vitest": "^4.1.9",
|
|
24
25
|
"wireit": "^0.14.0"
|
|
@@ -108,13 +109,15 @@
|
|
|
108
109
|
},
|
|
109
110
|
"test:only": {
|
|
110
111
|
"command": "vitest run",
|
|
112
|
+
"dependencies": [
|
|
113
|
+
"compile"
|
|
114
|
+
],
|
|
111
115
|
"env": {
|
|
112
116
|
"FORCE_COLOR": "2"
|
|
113
117
|
},
|
|
114
118
|
"files": [
|
|
115
|
-
"
|
|
116
|
-
"vitest.config.
|
|
117
|
-
"**/tsconfig.json"
|
|
119
|
+
"test/**",
|
|
120
|
+
"vitest.config.js"
|
|
118
121
|
],
|
|
119
122
|
"output": []
|
|
120
123
|
}
|
|
@@ -122,5 +125,5 @@
|
|
|
122
125
|
"exports": "./lib/index.js",
|
|
123
126
|
"type": "module",
|
|
124
127
|
"author": "Isaac Ferreira",
|
|
125
|
-
"version": "0.0.0-dev.
|
|
128
|
+
"version": "0.0.0-dev.32"
|
|
126
129
|
}
|