sf-plugin-permission-sets 0.2.0 → 0.3.1

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.
Files changed (78) hide show
  1. package/README.md +47 -30
  2. package/lib/adapters/connection-org-client.d.ts +1 -0
  3. package/lib/adapters/connection-org-client.d.ts.map +1 -0
  4. package/lib/commands/ps/apply.d.ts +2 -1
  5. package/lib/commands/ps/apply.d.ts.map +1 -0
  6. package/lib/commands/ps/apply.js +10 -6
  7. package/lib/commands/ps/apply.js.map +1 -1
  8. package/lib/commands/ps/check.d.ts +1 -0
  9. package/lib/commands/ps/check.d.ts.map +1 -0
  10. package/lib/commands/ps/export.d.ts +1 -1
  11. package/lib/commands/ps/export.d.ts.map +1 -0
  12. package/lib/commands/ps/export.js +1 -2
  13. package/lib/commands/ps/export.js.map +1 -1
  14. package/lib/commands/ps/plan.d.ts +34 -7
  15. package/lib/commands/ps/plan.d.ts.map +1 -0
  16. package/lib/commands/ps/plan.js +106 -29
  17. package/lib/commands/ps/plan.js.map +1 -1
  18. package/lib/commands/ps/validate.d.ts +1 -1
  19. package/lib/commands/ps/validate.d.ts.map +1 -0
  20. package/lib/commands/ps/validate.js +1 -2
  21. package/lib/commands/ps/validate.js.map +1 -1
  22. package/lib/core/diff.d.ts +1 -0
  23. package/lib/core/diff.d.ts.map +1 -0
  24. package/lib/core/diff.js +1 -0
  25. package/lib/core/diff.js.map +1 -1
  26. package/lib/core/finding.d.ts +1 -0
  27. package/lib/core/finding.d.ts.map +1 -0
  28. package/lib/core/load.d.ts +1 -0
  29. package/lib/core/load.d.ts.map +1 -0
  30. package/lib/core/model.d.ts +5 -0
  31. package/lib/core/model.d.ts.map +1 -0
  32. package/lib/core/normalize.d.ts +1 -0
  33. package/lib/core/normalize.d.ts.map +1 -0
  34. package/lib/core/normalize.js +43 -25
  35. package/lib/core/normalize.js.map +1 -1
  36. package/lib/core/parse.d.ts +1 -0
  37. package/lib/core/parse.d.ts.map +1 -0
  38. package/lib/core/report.d.ts +12 -5
  39. package/lib/core/report.d.ts.map +1 -0
  40. package/lib/core/report.js +64 -23
  41. package/lib/core/report.js.map +1 -1
  42. package/lib/core/resolve.d.ts +1 -0
  43. package/lib/core/resolve.d.ts.map +1 -0
  44. package/lib/core/schema.d.ts +1 -0
  45. package/lib/core/schema.d.ts.map +1 -0
  46. package/lib/core/schema.js +15 -10
  47. package/lib/core/schema.js.map +1 -1
  48. package/lib/core/serialize.d.ts +1 -0
  49. package/lib/core/serialize.d.ts.map +1 -0
  50. package/lib/core/serialize.js +3 -3
  51. package/lib/core/serialize.js.map +1 -1
  52. package/lib/index.d.ts +1 -0
  53. package/lib/index.d.ts.map +1 -0
  54. package/lib/services/adapters/org-client.d.ts +1 -0
  55. package/lib/services/adapters/org-client.d.ts.map +1 -0
  56. package/lib/services/apply.d.ts +1 -2
  57. package/lib/services/apply.d.ts.map +1 -0
  58. package/lib/services/apply.js +3 -27
  59. package/lib/services/apply.js.map +1 -1
  60. package/lib/services/check.d.ts +1 -0
  61. package/lib/services/check.d.ts.map +1 -0
  62. package/lib/services/export.d.ts +1 -0
  63. package/lib/services/export.d.ts.map +1 -0
  64. package/lib/services/plan.d.ts +1 -2
  65. package/lib/services/plan.d.ts.map +1 -0
  66. package/lib/services/plan.js +3 -27
  67. package/lib/services/plan.js.map +1 -1
  68. package/lib/services/resolution.d.ts +17 -0
  69. package/lib/services/resolution.d.ts.map +1 -0
  70. package/lib/services/resolution.js +36 -0
  71. package/lib/services/resolution.js.map +1 -0
  72. package/lib/services/validate.d.ts +1 -0
  73. package/lib/services/validate.d.ts.map +1 -0
  74. package/messages/ps.apply.md +4 -0
  75. package/messages/ps.plan.md +47 -7
  76. package/package.json +17 -35
  77. package/oclif.lock +0 -7888
  78. package/oclif.manifest.json +0 -406
@@ -1,406 +0,0 @@
1
- {
2
- "commands": {
3
- "ps:apply": {
4
- "aliases": [],
5
- "args": {},
6
- "description": "Load the files, resolve every user and target against the org, diff the desired state against what the org currently has, then add, update expirations, and/or remove assignments per the mode. Additions, expiration updates, and removals run through the sObject Collections API with partial success, so one bad record does not roll back the rest. Deletions are capped by --max-deletes and confirmed before they run. Run validate and a --dry-run first.",
7
- "examples": [
8
- "Preview a full reconcile of the dev org without changing anything:\n<%= config.bin %> <%= command.id %> --file \"permissions/*.yml\" --target-org dev --mode sync --dry-run",
9
- "Grant any missing assignments (additive, the default):\n<%= config.bin %> <%= command.id %> --file \"permissions/*.yml\" --target-org dev",
10
- "Full reconcile of production in CI, without prompts:\n<%= config.bin %> <%= command.id %> --file \"permissions/*.yml\" --target-org prod --mode sync --no-prompt"
11
- ],
12
- "flags": {
13
- "json": {
14
- "description": "Format output as json.",
15
- "helpGroup": "GLOBAL",
16
- "name": "json",
17
- "allowNo": false,
18
- "type": "boolean"
19
- },
20
- "flags-dir": {
21
- "helpGroup": "GLOBAL",
22
- "name": "flags-dir",
23
- "summary": "Import flag values from a directory.",
24
- "hasDynamicHelp": false,
25
- "multiple": false,
26
- "type": "option"
27
- },
28
- "target-org": {
29
- "char": "o",
30
- "name": "target-org",
31
- "noCacheDefault": true,
32
- "required": true,
33
- "summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
34
- "hasDynamicHelp": true,
35
- "multiple": false,
36
- "type": "option"
37
- },
38
- "api-version": {
39
- "description": "Override the api version used for api requests made by this command",
40
- "name": "api-version",
41
- "hasDynamicHelp": false,
42
- "multiple": false,
43
- "type": "option"
44
- },
45
- "file": {
46
- "char": "f",
47
- "name": "file",
48
- "required": true,
49
- "summary": "YAML file or glob to apply. Repeatable.",
50
- "hasDynamicHelp": false,
51
- "multiple": true,
52
- "type": "option"
53
- },
54
- "mode": {
55
- "name": "mode",
56
- "summary": "Which half of the reconcile to run: additive adds missing assignments and updates expirations, destructive removes only, sync does both.",
57
- "default": "additive",
58
- "hasDynamicHelp": false,
59
- "multiple": false,
60
- "options": [
61
- "additive",
62
- "destructive",
63
- "sync"
64
- ],
65
- "type": "option"
66
- },
67
- "max-deletes": {
68
- "name": "max-deletes",
69
- "summary": "Abort before any change if the run would remove more than this many assignments.",
70
- "default": 50,
71
- "hasDynamicHelp": false,
72
- "multiple": false,
73
- "type": "option"
74
- },
75
- "dry-run": {
76
- "name": "dry-run",
77
- "summary": "Resolve and diff, print the plan, and change nothing.",
78
- "allowNo": false,
79
- "type": "boolean"
80
- },
81
- "no-prompt": {
82
- "name": "no-prompt",
83
- "summary": "Skip the deletion confirmation prompt. Required to delete in JSON or other non-interactive runs.",
84
- "allowNo": false,
85
- "type": "boolean"
86
- }
87
- },
88
- "hasDynamicHelp": true,
89
- "hiddenAliases": [],
90
- "id": "ps:apply",
91
- "pluginAlias": "sf-plugin-permission-sets",
92
- "pluginName": "sf-plugin-permission-sets",
93
- "pluginType": "core",
94
- "strict": true,
95
- "summary": "Reconcile a target org to match the permission set assignment files.",
96
- "enableJsonFlag": true,
97
- "isESM": true,
98
- "relativePath": [
99
- "lib",
100
- "commands",
101
- "ps",
102
- "apply.js"
103
- ],
104
- "aliasPermutations": [],
105
- "permutations": [
106
- "ps:apply",
107
- "apply:ps"
108
- ]
109
- },
110
- "ps:check": {
111
- "aliases": [],
112
- "args": {},
113
- "description": "Parse and validate the YAML files offline. Reports invalid YAML, schema violations, duplicate keys, duplicate targets, and empty entries. Run it in a pre-commit hook or in CI before validate, plan, or apply.",
114
- "examples": [
115
- "Check every file under permissions:\n<%= config.bin %> <%= command.id %> --file \"permissions/*.yml\"",
116
- "Check specific files:\n<%= config.bin %> <%= command.id %> --file permissions/sales.yml --file permissions/service.yml"
117
- ],
118
- "flags": {
119
- "json": {
120
- "description": "Format output as json.",
121
- "helpGroup": "GLOBAL",
122
- "name": "json",
123
- "allowNo": false,
124
- "type": "boolean"
125
- },
126
- "flags-dir": {
127
- "helpGroup": "GLOBAL",
128
- "name": "flags-dir",
129
- "summary": "Import flag values from a directory.",
130
- "hasDynamicHelp": false,
131
- "multiple": false,
132
- "type": "option"
133
- },
134
- "file": {
135
- "char": "f",
136
- "name": "file",
137
- "required": true,
138
- "summary": "YAML file or glob to check. Repeatable.",
139
- "hasDynamicHelp": false,
140
- "multiple": true,
141
- "type": "option"
142
- },
143
- "strict": {
144
- "name": "strict",
145
- "summary": "Treat warnings as errors.",
146
- "allowNo": false,
147
- "type": "boolean"
148
- }
149
- },
150
- "hasDynamicHelp": false,
151
- "hiddenAliases": [],
152
- "id": "ps:check",
153
- "pluginAlias": "sf-plugin-permission-sets",
154
- "pluginName": "sf-plugin-permission-sets",
155
- "pluginType": "core",
156
- "strict": true,
157
- "summary": "Statically check permission set assignment files, with no org connection.",
158
- "enableJsonFlag": true,
159
- "isESM": true,
160
- "relativePath": [
161
- "lib",
162
- "commands",
163
- "ps",
164
- "check.js"
165
- ],
166
- "aliasPermutations": [],
167
- "permutations": [
168
- "ps:check",
169
- "check:ps"
170
- ]
171
- },
172
- "ps:export": {
173
- "aliases": [],
174
- "args": {},
175
- "description": "Query the target org for every assignable permission set, group, and license assignment held by active users and write them to a single user-keyed YAML file. The result is valid input for check, validate, plan, and apply, so it is a read-only way to bootstrap adoption from an org's current state. Profile-owned permission sets and inactive users are skipped.",
176
- "examples": [
177
- "Export the dev org's assignments to permissions.yml:\n<%= config.bin %> <%= command.id %> --target-org dev --output-file permissions.yml",
178
- "Export a production org into an environment folder:\n<%= config.bin %> <%= command.id %> --target-org prod --output-file permissions/prod.yml"
179
- ],
180
- "flags": {
181
- "json": {
182
- "description": "Format output as json.",
183
- "helpGroup": "GLOBAL",
184
- "name": "json",
185
- "allowNo": false,
186
- "type": "boolean"
187
- },
188
- "flags-dir": {
189
- "helpGroup": "GLOBAL",
190
- "name": "flags-dir",
191
- "summary": "Import flag values from a directory.",
192
- "hasDynamicHelp": false,
193
- "multiple": false,
194
- "type": "option"
195
- },
196
- "target-org": {
197
- "char": "o",
198
- "name": "target-org",
199
- "noCacheDefault": true,
200
- "required": true,
201
- "summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
202
- "hasDynamicHelp": true,
203
- "multiple": false,
204
- "type": "option"
205
- },
206
- "api-version": {
207
- "description": "Override the api version used for api requests made by this command",
208
- "name": "api-version",
209
- "hasDynamicHelp": false,
210
- "multiple": false,
211
- "type": "option"
212
- },
213
- "output-file": {
214
- "name": "output-file",
215
- "required": true,
216
- "summary": "Path of the YAML file to write. Created (and its parent directories) if missing, overwritten if present.",
217
- "hasDynamicHelp": false,
218
- "multiple": false,
219
- "type": "option"
220
- }
221
- },
222
- "hasDynamicHelp": true,
223
- "hiddenAliases": [],
224
- "id": "ps:export",
225
- "pluginAlias": "sf-plugin-permission-sets",
226
- "pluginName": "sf-plugin-permission-sets",
227
- "pluginType": "core",
228
- "strict": true,
229
- "summary": "Generate a YAML file from the current org's permission set assignments.",
230
- "enableJsonFlag": true,
231
- "isESM": true,
232
- "relativePath": [
233
- "lib",
234
- "commands",
235
- "ps",
236
- "export.js"
237
- ],
238
- "aliasPermutations": [],
239
- "permutations": [
240
- "ps:export",
241
- "export:ps"
242
- ]
243
- },
244
- "ps:plan": {
245
- "aliases": [],
246
- "args": {},
247
- "description": "Load the files, resolve every user and target against the org, fetch the org's current assignments, and diff the desired state against them. Read-only: it queries the org but never changes it, so it is the apply pipeline stopping before any DML. The full picture (assignments to add and would-be removes) is always shown regardless of mode, and whatever the chosen mode would not act on is surfaced as drift. Run it before apply to preview what would change.",
248
- "examples": [
249
- "Preview a full reconcile of the dev org:\n<%= config.bin %> <%= command.id %> --file \"permissions/*.yml\" --target-org dev --mode sync",
250
- "Preview only the additions the default additive run would make:\n<%= config.bin %> <%= command.id %> --file \"permissions/*.yml\" --target-org dev",
251
- "Preview a full reconcile of production before applying it:\n<%= config.bin %> <%= command.id %> --file \"permissions/*.yml\" --target-org prod --mode sync"
252
- ],
253
- "flags": {
254
- "json": {
255
- "description": "Format output as json.",
256
- "helpGroup": "GLOBAL",
257
- "name": "json",
258
- "allowNo": false,
259
- "type": "boolean"
260
- },
261
- "flags-dir": {
262
- "helpGroup": "GLOBAL",
263
- "name": "flags-dir",
264
- "summary": "Import flag values from a directory.",
265
- "hasDynamicHelp": false,
266
- "multiple": false,
267
- "type": "option"
268
- },
269
- "target-org": {
270
- "char": "o",
271
- "name": "target-org",
272
- "noCacheDefault": true,
273
- "required": true,
274
- "summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
275
- "hasDynamicHelp": true,
276
- "multiple": false,
277
- "type": "option"
278
- },
279
- "api-version": {
280
- "description": "Override the api version used for api requests made by this command",
281
- "name": "api-version",
282
- "hasDynamicHelp": false,
283
- "multiple": false,
284
- "type": "option"
285
- },
286
- "file": {
287
- "char": "f",
288
- "name": "file",
289
- "required": true,
290
- "summary": "YAML file or glob to plan. Repeatable.",
291
- "hasDynamicHelp": false,
292
- "multiple": true,
293
- "type": "option"
294
- },
295
- "mode": {
296
- "name": "mode",
297
- "summary": "Which half of the reconcile to preview: additive adds and updates expirations, destructive removes only, sync does both. Adds, expiration updates, and removes are always shown either way.",
298
- "default": "additive",
299
- "hasDynamicHelp": false,
300
- "multiple": false,
301
- "options": [
302
- "additive",
303
- "destructive",
304
- "sync"
305
- ],
306
- "type": "option"
307
- }
308
- },
309
- "hasDynamicHelp": true,
310
- "hiddenAliases": [],
311
- "id": "ps:plan",
312
- "pluginAlias": "sf-plugin-permission-sets",
313
- "pluginName": "sf-plugin-permission-sets",
314
- "pluginType": "core",
315
- "strict": true,
316
- "summary": "Preview the changes that would reconcile a target org to the assignment files.",
317
- "enableJsonFlag": true,
318
- "isESM": true,
319
- "relativePath": [
320
- "lib",
321
- "commands",
322
- "ps",
323
- "plan.js"
324
- ],
325
- "aliasPermutations": [],
326
- "permutations": [
327
- "ps:plan",
328
- "plan:ps"
329
- ]
330
- },
331
- "ps:validate": {
332
- "aliases": [],
333
- "args": {},
334
- "description": "Run every offline check, then resolve each referenced user, permission set, group, and license against the org. Reports users that are missing or inactive and targets that are missing or not unique. Read-only: it queries the org but never changes it. Run it before plan or apply.",
335
- "examples": [
336
- "Validate every file under permissions against the dev org:\n<%= config.bin %> <%= command.id %> --file \"permissions/\\*.yml\" --target-org dev",
337
- "Validate specific files against a named org:\n<%= config.bin %> <%= command.id %> --file permissions/sales.yml --file permissions/service.yml --target-org prod"
338
- ],
339
- "flags": {
340
- "json": {
341
- "description": "Format output as json.",
342
- "helpGroup": "GLOBAL",
343
- "name": "json",
344
- "allowNo": false,
345
- "type": "boolean"
346
- },
347
- "flags-dir": {
348
- "helpGroup": "GLOBAL",
349
- "name": "flags-dir",
350
- "summary": "Import flag values from a directory.",
351
- "hasDynamicHelp": false,
352
- "multiple": false,
353
- "type": "option"
354
- },
355
- "target-org": {
356
- "char": "o",
357
- "name": "target-org",
358
- "noCacheDefault": true,
359
- "required": true,
360
- "summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
361
- "hasDynamicHelp": true,
362
- "multiple": false,
363
- "type": "option"
364
- },
365
- "api-version": {
366
- "description": "Override the api version used for api requests made by this command",
367
- "name": "api-version",
368
- "hasDynamicHelp": false,
369
- "multiple": false,
370
- "type": "option"
371
- },
372
- "file": {
373
- "char": "f",
374
- "name": "file",
375
- "required": true,
376
- "summary": "YAML file or glob to validate. Repeatable.",
377
- "hasDynamicHelp": false,
378
- "multiple": true,
379
- "type": "option"
380
- }
381
- },
382
- "hasDynamicHelp": true,
383
- "hiddenAliases": [],
384
- "id": "ps:validate",
385
- "pluginAlias": "sf-plugin-permission-sets",
386
- "pluginName": "sf-plugin-permission-sets",
387
- "pluginType": "core",
388
- "strict": true,
389
- "summary": "Validate permission set assignment files against a target org.",
390
- "enableJsonFlag": true,
391
- "isESM": true,
392
- "relativePath": [
393
- "lib",
394
- "commands",
395
- "ps",
396
- "validate.js"
397
- ],
398
- "aliasPermutations": [],
399
- "permutations": [
400
- "ps:validate",
401
- "validate:ps"
402
- ]
403
- }
404
- },
405
- "version": "0.2.0"
406
- }