sf-plugin-permission-sets 0.0.0-dev → 0.0.0-dev.10

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
@@ -16,10 +16,12 @@ Stop clicking through Setup to grant access. Commit a YAML file, open a PR, let
16
16
  - [Quick start](#quick-start)
17
17
  - [Permission files](#permission-files)
18
18
  - [Organizing files](#organizing-files)
19
+ - [Validations](#validations)
19
20
  - [Modes](#modes)
20
21
  - [Commands](#commands)
21
22
  - [CI/CD](#cicd)
22
23
  - [Inspiration & equivalents](#inspiration--equivalents)
24
+ - [Versioning](#versioning)
23
25
 
24
26
  ---
25
27
 
@@ -153,6 +155,18 @@ sf ps apply -o qa --file "permissions/qa/*.yml"
153
155
 
154
156
  The two compose: a directory per environment, each split into functional files.
155
157
 
158
+ ## Validations
159
+
160
+ Every run checks the files first. `check` runs the offline checks with no org, and `validate` adds the org-side checks. When files merge, most overlaps are unions rather than errors.
161
+
162
+ | Situation | Checked by | Severity | Result |
163
+ | --- | --- | :---: | --- |
164
+ | Same username key appears twice in one file | `check` (offline) | ❌ error | Rejected, the intent is ambiguous |
165
+ | Same target listed twice for a user, like `[Sales_Manager, Sales_Manager]` | `check` (offline) | ⚠️ warning | Deduped |
166
+ | A user with no scopes, or an empty list | `check` (offline) | ⚠️ warning | Ignored as a no-op |
167
+ | Same user in two files with different targets | `check` (offline) | ✅ ok | Merged into one model, the point of slicing |
168
+ | Declared user, permission set, group, or license missing or not unique | `validate` (online) | ❌ error | Run fails before any change |
169
+
156
170
  ## Modes
157
171
 
158
172
  A run performs two atomic operations: **add** missing assignments and **remove** undeclared ones. The mode selects which it actually executes. Set it with `--mode` (default `additive`):
@@ -341,6 +355,30 @@ The command surface borrows deliberately from tools you already know:
341
355
  | `ps export` | `terraform import` | n/a | n/a |
342
356
  | `--fail-on-drift` | drift in plan exit code | `cfn detect-stack-drift` | n/a |
343
357
 
358
+ ## Versioning
359
+
360
+ Releases follow [semantic versioning](https://semver.org). You choose the bump by the git tag you create, and CI stamps and routes it to the right npm dist-tag.
361
+
362
+ | Bump | When | Example tag |
363
+ | --- | --- | --- |
364
+ | patch | bug fix, no behavior change | `v0.1.1` |
365
+ | minor | new backward-compatible feature | `v0.2.0` |
366
+ | major | breaking change to a command, flag, or the YAML schema | `v1.0.0` |
367
+
368
+ | dist-tag | Source | Install |
369
+ | --- | --- | --- |
370
+ | `latest` | a GitHub Release with a normal tag like `v1.2.0` | `sf plugins install sf-plugin-permission-sets` |
371
+ | `next` | a Release whose tag has a hyphen, like `v1.3.0-beta.1` | `sf plugins install sf-plugin-permission-sets@next` |
372
+ | `dev` | every push to `main`, published as `0.0.0-dev.<run>` | `sf plugins install sf-plugin-permission-sets@dev` |
373
+
374
+ Cut a release with a tag off `main`:
375
+
376
+ ```bash
377
+ gh release create v0.2.0 --target main --title v0.2.0 --notes "Add ps export"
378
+ ```
379
+
380
+ The `next` tag is selected whenever the version contains a hyphen, not by GitHub's prerelease checkbox. The `dev` snapshots publish automatically on every push to `main`, so they need no command.
381
+
344
382
  ## License
345
383
 
346
384
  BSD-3-Clause © Isaac Ferreira
@@ -0,0 +1,11 @@
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
+ }
@@ -0,0 +1,17 @@
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
@@ -0,0 +1 @@
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;IAChD,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;QACd,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;IAC/B,CAAC"}
package/lib/index.d.ts ADDED
@@ -0,0 +1,2 @@
1
+ declare const _default: {};
2
+ export default _default;
package/lib/index.js ADDED
@@ -0,0 +1,2 @@
1
+ export default {};
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,eAAe,EAAE,CAAC"}
@@ -0,0 +1,17 @@
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