sf-plugin-permission-sets 0.1.0 → 0.3.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 +65 -42
- package/lib/adapters/connection-org-client.d.ts +17 -0
- package/lib/adapters/connection-org-client.d.ts.map +1 -0
- package/lib/adapters/connection-org-client.js +248 -0
- package/lib/adapters/connection-org-client.js.map +1 -0
- package/lib/commands/ps/apply.d.ts +27 -0
- package/lib/commands/ps/apply.d.ts.map +1 -0
- package/lib/commands/ps/apply.js +124 -0
- package/lib/commands/ps/apply.js.map +1 -0
- package/lib/commands/ps/check.d.ts +2 -1
- package/lib/commands/ps/check.d.ts.map +1 -0
- package/lib/commands/ps/check.js +5 -4
- package/lib/commands/ps/check.js.map +1 -1
- package/lib/commands/ps/export.d.ts +17 -0
- package/lib/commands/ps/export.d.ts.map +1 -0
- package/lib/commands/ps/export.js +28 -0
- package/lib/commands/ps/export.js.map +1 -0
- package/lib/commands/ps/plan.d.ts +22 -0
- package/lib/commands/ps/plan.d.ts.map +1 -0
- package/lib/commands/ps/plan.js +77 -0
- package/lib/commands/ps/plan.js.map +1 -0
- package/lib/commands/ps/validate.d.ts +19 -0
- package/lib/commands/ps/validate.d.ts.map +1 -0
- package/lib/commands/ps/validate.js +47 -0
- package/lib/commands/ps/validate.js.map +1 -0
- package/lib/core/diff.d.ts +10 -0
- package/lib/core/diff.d.ts.map +1 -0
- package/lib/core/diff.js +53 -0
- package/lib/core/diff.js.map +1 -0
- package/lib/core/finding.d.ts +40 -0
- package/lib/core/finding.d.ts.map +1 -0
- package/lib/core/finding.js +68 -0
- package/lib/core/finding.js.map +1 -0
- package/lib/core/load.d.ts +2 -6
- package/lib/core/load.d.ts.map +1 -0
- package/lib/core/load.js +6 -5
- package/lib/core/load.js.map +1 -1
- package/lib/core/model.d.ts +57 -7
- package/lib/core/model.d.ts.map +1 -0
- package/lib/core/normalize.d.ts +6 -1
- package/lib/core/normalize.d.ts.map +1 -0
- package/lib/core/normalize.js +46 -29
- package/lib/core/normalize.js.map +1 -1
- package/lib/core/parse.d.ts +2 -1
- package/lib/core/parse.d.ts.map +1 -0
- package/lib/core/parse.js +4 -9
- package/lib/core/parse.js.map +1 -1
- package/lib/core/report.d.ts +8 -8
- package/lib/core/report.d.ts.map +1 -0
- package/lib/core/report.js +59 -12
- package/lib/core/report.js.map +1 -1
- package/lib/core/resolve.d.ts +20 -0
- package/lib/core/resolve.d.ts.map +1 -0
- package/lib/core/resolve.js +88 -0
- package/lib/core/resolve.js.map +1 -0
- package/lib/core/schema.d.ts +18 -5
- package/lib/core/schema.d.ts.map +1 -0
- package/lib/core/schema.js +19 -10
- package/lib/core/schema.js.map +1 -1
- package/lib/core/serialize.d.ts +9 -0
- package/lib/core/serialize.d.ts.map +1 -0
- package/lib/core/serialize.js +34 -0
- package/lib/core/serialize.js.map +1 -0
- package/lib/index.d.ts +1 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/services/adapters/org-client.d.ts +22 -0
- package/lib/services/adapters/org-client.d.ts.map +1 -0
- package/lib/services/adapters/org-client.js +2 -0
- package/lib/services/adapters/org-client.js.map +1 -0
- package/lib/services/apply.d.ts +40 -0
- package/lib/services/apply.d.ts.map +1 -0
- package/lib/services/apply.js +94 -0
- package/lib/services/apply.js.map +1 -0
- package/lib/services/check.d.ts +9 -6
- package/lib/services/check.d.ts.map +1 -0
- package/lib/services/check.js +21 -13
- package/lib/services/check.js.map +1 -1
- package/lib/services/export.d.ts +14 -0
- package/lib/services/export.d.ts.map +1 -0
- package/lib/services/export.js +25 -0
- package/lib/services/export.js.map +1 -0
- package/lib/services/plan.d.ts +35 -0
- package/lib/services/plan.d.ts.map +1 -0
- package/lib/services/plan.js +47 -0
- package/lib/services/plan.js.map +1 -0
- package/lib/services/resolution.d.ts +17 -0
- package/lib/services/resolution.d.ts.map +1 -0
- package/lib/services/resolution.js +36 -0
- package/lib/services/resolution.js.map +1 -0
- package/lib/services/validate.d.ts +21 -0
- package/lib/services/validate.d.ts.map +1 -0
- package/lib/services/validate.js +43 -0
- package/lib/services/validate.js.map +1 -0
- package/messages/ps.apply.md +81 -0
- package/messages/ps.export.md +25 -0
- package/messages/ps.plan.md +45 -0
- package/messages/ps.validate.md +29 -0
- package/package.json +27 -42
- package/lib/commands/ps/info.d.ts +0 -11
- package/lib/commands/ps/info.js +0 -17
- package/lib/commands/ps/info.js.map +0 -1
- package/messages/ps.info.md +0 -17
- package/oclif.lock +0 -7888
- package/oclif.manifest.json +0 -113
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { loadFiles } from '../core/load.js';
|
|
2
|
+
import { kinds, distinctAssignees, distinctTargets, evaluateUsers, evaluateTargets } from '../core/resolve.js';
|
|
3
|
+
import { countFindings } from '../core/finding.js';
|
|
4
|
+
/** Online validate: run the offline load, then resolve every reference against the org. */
|
|
5
|
+
export class ValidateService {
|
|
6
|
+
org;
|
|
7
|
+
files;
|
|
8
|
+
constructor(org, files) {
|
|
9
|
+
this.org = org;
|
|
10
|
+
this.files = files;
|
|
11
|
+
}
|
|
12
|
+
async run() {
|
|
13
|
+
const loaded = await loadFiles(this.files);
|
|
14
|
+
const online = await this.resolve(loaded.assignments);
|
|
15
|
+
const findings = [...loaded.findings, ...online];
|
|
16
|
+
const { errors, warnings } = countFindings(findings);
|
|
17
|
+
return {
|
|
18
|
+
files: loaded.files,
|
|
19
|
+
assignments: loaded.assignments,
|
|
20
|
+
findings,
|
|
21
|
+
errors,
|
|
22
|
+
warnings,
|
|
23
|
+
failed: errors > 0,
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
/** Look every reference up in the org (in parallel) and evaluate the results. */
|
|
27
|
+
async resolve(assignments) {
|
|
28
|
+
const tasks = [];
|
|
29
|
+
const usernames = distinctAssignees(assignments);
|
|
30
|
+
if (usernames.length > 0) {
|
|
31
|
+
tasks.push(this.org.findUsers(usernames).then((found) => evaluateUsers(usernames, found)));
|
|
32
|
+
}
|
|
33
|
+
for (const kind of kinds) {
|
|
34
|
+
const targets = distinctTargets(assignments, kind);
|
|
35
|
+
if (targets.length > 0) {
|
|
36
|
+
tasks.push(this.org.findTargets(kind, targets).then((found) => evaluateTargets(kind, targets, found.map((target) => target.name))));
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
const results = await Promise.all(tasks);
|
|
40
|
+
return results.flat();
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
//# sourceMappingURL=validate.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validate.js","sourceRoot":"","sources":["../../src/services/validate.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,KAAK,EAAE,iBAAiB,EAAE,eAAe,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAE/G,OAAO,EAAW,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAY5D,2FAA2F;AAC3F,MAAM,OAAO,eAAe;IACY;IAAiC;IAArE,YAAoC,GAAc,EAAmB,KAAe;QAAhD,QAAG,GAAH,GAAG,CAAW;QAAmB,UAAK,GAAL,KAAK,CAAU;IAAG,CAAC;IAEjF,KAAK,CAAC,GAAG;QACZ,MAAM,MAAM,GAAG,MAAM,SAAS,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QAC3C,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC;QAEtD,MAAM,QAAQ,GAAG,CAAC,GAAG,MAAM,CAAC,QAAQ,EAAE,GAAG,MAAM,CAAC,CAAC;QACjD,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,GAAG,aAAa,CAAC,QAAQ,CAAC,CAAC;QAErD,OAAO;YACH,KAAK,EAAE,MAAM,CAAC,KAAK;YACnB,WAAW,EAAE,MAAM,CAAC,WAAW;YAC/B,QAAQ;YACR,MAAM;YACN,QAAQ;YACR,MAAM,EAAE,MAAM,GAAG,CAAC;SACrB,CAAC;IACN,CAAC;IAED,iFAAiF;IACzE,KAAK,CAAC,OAAO,CAAC,WAAgC;QAClD,MAAM,KAAK,GAA8B,EAAE,CAAC;QAE5C,MAAM,SAAS,GAAG,iBAAiB,CAAC,WAAW,CAAC,CAAC;QACjD,IAAI,SAAS,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YACvB,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,aAAa,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC;QAC/F,CAAC;QAED,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;YACvB,MAAM,OAAO,GAAG,eAAe,CAAC,WAAW,EAAE,IAAI,CAAC,CAAC;YACnD,IAAI,OAAO,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;gBACrB,KAAK,CAAC,IAAI,CACN,IAAI,CAAC,GAAG,CAAC,WAAW,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,EAAE,CAC/C,eAAe,CACX,IAAI,EACJ,OAAO,EACP,KAAK,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,CACrC,CACJ,CACJ,CAAC;YACN,CAAC;QACL,CAAC;QAED,MAAM,OAAO,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;QACzC,OAAO,OAAO,CAAC,IAAI,EAAE,CAAC;IAC1B,CAAC;CACJ"}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
# summary
|
|
2
|
+
|
|
3
|
+
Reconcile a target org to match the permission set assignment files.
|
|
4
|
+
|
|
5
|
+
# description
|
|
6
|
+
|
|
7
|
+
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.
|
|
8
|
+
|
|
9
|
+
# flags.file.summary
|
|
10
|
+
|
|
11
|
+
YAML file or glob to apply. Repeatable.
|
|
12
|
+
|
|
13
|
+
# flags.mode.summary
|
|
14
|
+
|
|
15
|
+
Which half of the reconcile to run: additive adds missing assignments and updates expirations, destructive removes only, sync does both.
|
|
16
|
+
|
|
17
|
+
# flags.max-deletes.summary
|
|
18
|
+
|
|
19
|
+
Abort before any change if the run would remove more than this many assignments.
|
|
20
|
+
|
|
21
|
+
# flags.dry-run.summary
|
|
22
|
+
|
|
23
|
+
Resolve and diff, print the plan, and change nothing.
|
|
24
|
+
|
|
25
|
+
# flags.no-prompt.summary
|
|
26
|
+
|
|
27
|
+
Skip the deletion confirmation prompt. Required to delete in JSON or other non-interactive runs.
|
|
28
|
+
|
|
29
|
+
# confirm.delete
|
|
30
|
+
|
|
31
|
+
This will remove %s assignment(s) from the org. Continue?
|
|
32
|
+
|
|
33
|
+
# summary.dryRun
|
|
34
|
+
|
|
35
|
+
Dry run: %s to add, %s to update, %s to remove. Nothing was changed.
|
|
36
|
+
|
|
37
|
+
# summary.applied
|
|
38
|
+
|
|
39
|
+
Applied: %s added, %s updated, %s removed.
|
|
40
|
+
|
|
41
|
+
# summary.declined
|
|
42
|
+
|
|
43
|
+
Aborted at the confirmation prompt. Nothing was changed.
|
|
44
|
+
|
|
45
|
+
# drift.note
|
|
46
|
+
|
|
47
|
+
%s change(s) the %s mode does not act on were skipped (drift). Run plan to see them.
|
|
48
|
+
|
|
49
|
+
# failure.line
|
|
50
|
+
|
|
51
|
+
failed to %s %s on %s: %s
|
|
52
|
+
|
|
53
|
+
# error.invalid
|
|
54
|
+
|
|
55
|
+
The files do not resolve cleanly against the org. Fix the errors above, then re-run.
|
|
56
|
+
|
|
57
|
+
# error.maxDeletes
|
|
58
|
+
|
|
59
|
+
Refusing to remove %s assignment(s): over the --max-deletes limit of %s. Raise the limit or narrow the change.
|
|
60
|
+
|
|
61
|
+
# error.promptInJson
|
|
62
|
+
|
|
63
|
+
Refusing to delete without confirmation in a non-interactive run. Re-run with --no-prompt.
|
|
64
|
+
|
|
65
|
+
# error.failed
|
|
66
|
+
|
|
67
|
+
Some changes failed. See the per-record errors above.
|
|
68
|
+
|
|
69
|
+
# examples
|
|
70
|
+
|
|
71
|
+
- Preview a full reconcile of the dev org without changing anything:
|
|
72
|
+
|
|
73
|
+
<%= config.bin %> <%= command.id %> --file "permissions/*.yml" --target-org dev --mode sync --dry-run
|
|
74
|
+
|
|
75
|
+
- Grant any missing assignments (additive, the default):
|
|
76
|
+
|
|
77
|
+
<%= config.bin %> <%= command.id %> --file "permissions/*.yml" --target-org dev
|
|
78
|
+
|
|
79
|
+
- Full reconcile of production in CI, without prompts:
|
|
80
|
+
|
|
81
|
+
<%= config.bin %> <%= command.id %> --file "permissions/*.yml" --target-org prod --mode sync --no-prompt
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# summary
|
|
2
|
+
|
|
3
|
+
Generate a YAML file from the current org's permission set assignments.
|
|
4
|
+
|
|
5
|
+
# description
|
|
6
|
+
|
|
7
|
+
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.
|
|
8
|
+
|
|
9
|
+
# flags.output-file.summary
|
|
10
|
+
|
|
11
|
+
Path of the YAML file to write. Created (and its parent directories) if missing, overwritten if present.
|
|
12
|
+
|
|
13
|
+
# success
|
|
14
|
+
|
|
15
|
+
Exported %s assignments across %s users to %s.
|
|
16
|
+
|
|
17
|
+
# examples
|
|
18
|
+
|
|
19
|
+
- Export the dev org's assignments to permissions.yml:
|
|
20
|
+
|
|
21
|
+
<%= config.bin %> <%= command.id %> --target-org dev --output-file permissions.yml
|
|
22
|
+
|
|
23
|
+
- Export a production org into an environment folder:
|
|
24
|
+
|
|
25
|
+
<%= config.bin %> <%= command.id %> --target-org prod --output-file permissions/prod.yml
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# summary
|
|
2
|
+
|
|
3
|
+
Preview the changes that would reconcile a target org to the assignment files.
|
|
4
|
+
|
|
5
|
+
# description
|
|
6
|
+
|
|
7
|
+
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.
|
|
8
|
+
|
|
9
|
+
# flags.file.summary
|
|
10
|
+
|
|
11
|
+
YAML file or glob to plan. Repeatable.
|
|
12
|
+
|
|
13
|
+
# flags.mode.summary
|
|
14
|
+
|
|
15
|
+
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.
|
|
16
|
+
|
|
17
|
+
# summary.counts
|
|
18
|
+
|
|
19
|
+
Plan: %s to add, %s to update, %s to remove, %s unchanged.
|
|
20
|
+
|
|
21
|
+
# summary.next
|
|
22
|
+
|
|
23
|
+
Reviewed the plan? Apply it with the same files: sf ps apply --mode %s
|
|
24
|
+
|
|
25
|
+
# drift.note
|
|
26
|
+
|
|
27
|
+
%s change(s) the %s mode does not act on were surfaced as drift.
|
|
28
|
+
|
|
29
|
+
# error.invalid
|
|
30
|
+
|
|
31
|
+
The files do not resolve cleanly against the org. Fix the errors above, then re-run.
|
|
32
|
+
|
|
33
|
+
# examples
|
|
34
|
+
|
|
35
|
+
- Preview a full reconcile of the dev org:
|
|
36
|
+
|
|
37
|
+
<%= config.bin %> <%= command.id %> --file "permissions/*.yml" --target-org dev --mode sync
|
|
38
|
+
|
|
39
|
+
- Preview only the additions the default additive run would make:
|
|
40
|
+
|
|
41
|
+
<%= config.bin %> <%= command.id %> --file "permissions/*.yml" --target-org dev
|
|
42
|
+
|
|
43
|
+
- Preview a full reconcile of production before applying it:
|
|
44
|
+
|
|
45
|
+
<%= config.bin %> <%= command.id %> --file "permissions/*.yml" --target-org prod --mode sync
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# summary
|
|
2
|
+
|
|
3
|
+
Validate permission set assignment files against a target org.
|
|
4
|
+
|
|
5
|
+
# description
|
|
6
|
+
|
|
7
|
+
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.
|
|
8
|
+
|
|
9
|
+
# flags.file.summary
|
|
10
|
+
|
|
11
|
+
YAML file or glob to validate. Repeatable.
|
|
12
|
+
|
|
13
|
+
# summary.counts
|
|
14
|
+
|
|
15
|
+
%s errors, %s warnings.
|
|
16
|
+
|
|
17
|
+
# error.failed
|
|
18
|
+
|
|
19
|
+
Validation found problems. See the output above.
|
|
20
|
+
|
|
21
|
+
# examples
|
|
22
|
+
|
|
23
|
+
- Validate every file under permissions against the dev org:
|
|
24
|
+
|
|
25
|
+
<%= config.bin %> <%= command.id %> --file "permissions/\*.yml" --target-org dev
|
|
26
|
+
|
|
27
|
+
- Validate specific files against a named org:
|
|
28
|
+
|
|
29
|
+
<%= config.bin %> <%= command.id %> --file permissions/sales.yml --file permissions/service.yml --target-org prod
|
package/package.json
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sf-plugin-permission-sets",
|
|
3
|
-
"description": "",
|
|
4
|
-
"version": "0.1.0",
|
|
3
|
+
"description": "Declarative, GitOps-style management of permission set assignments for Salesforce orgs.",
|
|
5
4
|
"repository": {
|
|
6
5
|
"type": "git",
|
|
7
6
|
"url": "git+https://github.com/zaclummys/sf-plugin-permission-sets.git"
|
|
@@ -15,31 +14,34 @@
|
|
|
15
14
|
"zod": "^4.4.3"
|
|
16
15
|
},
|
|
17
16
|
"devDependencies": {
|
|
18
|
-
"@
|
|
19
|
-
"eslint
|
|
20
|
-
"
|
|
21
|
-
"
|
|
17
|
+
"@eslint/js": "^10.0.1",
|
|
18
|
+
"eslint": "^10.6.0",
|
|
19
|
+
"execa": "^9.6.1",
|
|
20
|
+
"globals": "^17.7.0",
|
|
22
21
|
"ts-node": "^10.9.2",
|
|
23
|
-
"typescript": "^
|
|
24
|
-
"
|
|
22
|
+
"typescript": "^6.0.3",
|
|
23
|
+
"typescript-eslint": "^8.62.1",
|
|
24
|
+
"vitest": "^4.1.9",
|
|
25
|
+
"wireit": "^0.14.0"
|
|
25
26
|
},
|
|
26
27
|
"engines": {
|
|
27
28
|
"node": ">=18.0.0"
|
|
28
29
|
},
|
|
29
30
|
"files": [
|
|
30
31
|
"/lib",
|
|
31
|
-
"/messages"
|
|
32
|
-
"/oclif.manifest.json",
|
|
33
|
-
"/oclif.lock"
|
|
32
|
+
"/messages"
|
|
34
33
|
],
|
|
35
34
|
"keywords": [
|
|
36
|
-
"force",
|
|
37
35
|
"salesforce",
|
|
38
|
-
"salesforcedx",
|
|
39
|
-
"sf",
|
|
40
36
|
"sf-plugin",
|
|
41
|
-
"sfdx",
|
|
42
|
-
"
|
|
37
|
+
"sfdx-plugin",
|
|
38
|
+
"permission-sets",
|
|
39
|
+
"permission-set-assignment",
|
|
40
|
+
"permission-set-group",
|
|
41
|
+
"access-management",
|
|
42
|
+
"user-provisioning",
|
|
43
|
+
"gitops",
|
|
44
|
+
"declarative"
|
|
43
45
|
],
|
|
44
46
|
"license": "BSD-3-Clause",
|
|
45
47
|
"oclif": {
|
|
@@ -58,17 +60,11 @@
|
|
|
58
60
|
},
|
|
59
61
|
"scripts": {
|
|
60
62
|
"build": "wireit",
|
|
61
|
-
"clean": "
|
|
62
|
-
"clean-all": "sf-clean all",
|
|
63
|
+
"clean": "rm -rf lib tmp *.tsbuildinfo .eslintcache .wireit",
|
|
63
64
|
"compile": "wireit",
|
|
64
|
-
"docs": "sf-docs",
|
|
65
|
-
"format": "wireit",
|
|
66
65
|
"lint": "wireit",
|
|
67
|
-
"
|
|
68
|
-
"postpack": "sf-clean --ignore-signing-artifacts",
|
|
69
|
-
"prepack": "sf-prepack",
|
|
66
|
+
"prepack": "npm run compile",
|
|
70
67
|
"test": "wireit",
|
|
71
|
-
"test:only": "wireit",
|
|
72
68
|
"version": "oclif readme"
|
|
73
69
|
},
|
|
74
70
|
"publishConfig": {
|
|
@@ -94,14 +90,6 @@
|
|
|
94
90
|
],
|
|
95
91
|
"clean": "if-file-deleted"
|
|
96
92
|
},
|
|
97
|
-
"format": {
|
|
98
|
-
"command": "prettier --write \"src/**/*.+(ts|js|json)\"",
|
|
99
|
-
"files": [
|
|
100
|
-
"src/**/*.ts",
|
|
101
|
-
".prettier*"
|
|
102
|
-
],
|
|
103
|
-
"output": []
|
|
104
|
-
},
|
|
105
93
|
"lint": {
|
|
106
94
|
"command": "eslint src --color --cache --cache-location .eslintcache",
|
|
107
95
|
"files": [
|
|
@@ -113,25 +101,22 @@
|
|
|
113
101
|
"output": []
|
|
114
102
|
},
|
|
115
103
|
"test": {
|
|
116
|
-
"dependencies": [
|
|
117
|
-
"test:only",
|
|
118
|
-
"lint"
|
|
119
|
-
]
|
|
120
|
-
},
|
|
121
|
-
"test:only": {
|
|
122
104
|
"command": "vitest run",
|
|
105
|
+
"dependencies": [
|
|
106
|
+
"compile"
|
|
107
|
+
],
|
|
123
108
|
"env": {
|
|
124
109
|
"FORCE_COLOR": "2"
|
|
125
110
|
},
|
|
126
111
|
"files": [
|
|
127
|
-
"
|
|
128
|
-
"vitest.config.
|
|
129
|
-
"**/tsconfig.json"
|
|
112
|
+
"test/**",
|
|
113
|
+
"vitest.config.js"
|
|
130
114
|
],
|
|
131
115
|
"output": []
|
|
132
116
|
}
|
|
133
117
|
},
|
|
134
118
|
"exports": "./lib/index.js",
|
|
135
119
|
"type": "module",
|
|
136
|
-
"author": "Isaac Ferreira"
|
|
120
|
+
"author": "Isaac Ferreira",
|
|
121
|
+
"version": "0.3.0"
|
|
137
122
|
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { SfCommand } from '@salesforce/sf-plugins-core';
|
|
2
|
-
export type PsInfoResult = {
|
|
3
|
-
name: string;
|
|
4
|
-
description: string;
|
|
5
|
-
};
|
|
6
|
-
export default class Info extends SfCommand<PsInfoResult> {
|
|
7
|
-
static readonly summary: string;
|
|
8
|
-
static readonly description: string;
|
|
9
|
-
static readonly examples: string[];
|
|
10
|
-
run(): Promise<PsInfoResult>;
|
|
11
|
-
}
|
package/lib/commands/ps/info.js
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { SfCommand } from '@salesforce/sf-plugins-core';
|
|
2
|
-
import { Messages } from '@salesforce/core';
|
|
3
|
-
Messages.importMessagesDirectoryFromMetaUrl(import.meta.url);
|
|
4
|
-
const messages = Messages.loadMessages('sf-plugin-permission-sets', 'ps.info');
|
|
5
|
-
export default class Info extends SfCommand {
|
|
6
|
-
static summary = messages.getMessage('summary');
|
|
7
|
-
static description = messages.getMessage('description');
|
|
8
|
-
static examples = messages.getMessages('examples');
|
|
9
|
-
async run() {
|
|
10
|
-
await this.parse(Info);
|
|
11
|
-
const name = 'sf-plugin-permission-sets';
|
|
12
|
-
const description = 'Declarative, GitOps-style management of permission set assignments.';
|
|
13
|
-
this.log(messages.getMessage('info.summary', [name, description]));
|
|
14
|
-
return { name, description };
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
//# sourceMappingURL=info.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"info.js","sourceRoot":"","sources":["../../../src/commands/ps/info.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AACxD,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAE5C,QAAQ,CAAC,kCAAkC,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAC7D,MAAM,QAAQ,GAAG,QAAQ,CAAC,YAAY,CAAC,2BAA2B,EAAE,SAAS,CAAC,CAAC;AAO/E,MAAM,CAAC,OAAO,OAAO,IAAK,SAAQ,SAAuB;IAC9C,MAAM,CAAU,OAAO,GAAG,QAAQ,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC;IACzD,MAAM,CAAU,WAAW,GAAG,QAAQ,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC;IACjE,MAAM,CAAU,QAAQ,GAAG,QAAQ,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC;IAE5D,KAAK,CAAC,GAAG;QACZ,MAAM,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QACvB,MAAM,IAAI,GAAG,2BAA2B,CAAC;QACzC,MAAM,WAAW,GAAG,qEAAqE,CAAC;QAC1F,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,UAAU,CAAC,cAAc,EAAE,CAAC,IAAI,EAAE,WAAW,CAAC,CAAC,CAAC,CAAC;QACnE,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,CAAC;IACjC,CAAC"}
|
package/messages/ps.info.md
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
# summary
|
|
2
|
-
|
|
3
|
-
Show information about the permission-sets plugin.
|
|
4
|
-
|
|
5
|
-
# description
|
|
6
|
-
|
|
7
|
-
Print the plugin name and what it does. A quick way to confirm the plugin is installed and working.
|
|
8
|
-
|
|
9
|
-
# examples
|
|
10
|
-
|
|
11
|
-
- Show plugin info:
|
|
12
|
-
|
|
13
|
-
<%= config.bin %> <%= command.id %>
|
|
14
|
-
|
|
15
|
-
# info.summary
|
|
16
|
-
|
|
17
|
-
%s - %s
|