@b64hub/sfpm-cli 0.3.0 → 0.4.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
@@ -20,7 +20,7 @@ $ npm install -g @b64hub/sfpm-cli
20
20
  $ sfpm COMMAND
21
21
  running command...
22
22
  $ sfpm (--version)
23
- @b64hub/sfpm-cli/0.3.0 linux-x64 node-v22.23.2
23
+ @b64hub/sfpm-cli/0.4.0 linux-x64 node-v22.23.3
24
24
  $ sfpm --help [COMMAND]
25
25
  USAGE
26
26
  $ sfpm COMMAND
@@ -58,6 +58,8 @@ USAGE
58
58
  * [`sfpm project sync`](#sfpm-project-sync)
59
59
  * [`sfpm project version bump`](#sfpm-project-version-bump)
60
60
  * [`sfpm publish [PACKAGES]`](#sfpm-publish-packages)
61
+ * [`sfpm release create [PACKAGES]`](#sfpm-release-create-packages)
62
+ * [`sfpm release run FILE`](#sfpm-release-run-file)
61
63
  * [`sfpm watch cancel ID`](#sfpm-watch-cancel-id)
62
64
  * [`sfpm watch clean`](#sfpm-watch-clean)
63
65
  * [`sfpm watch status`](#sfpm-watch-status)
@@ -88,7 +90,7 @@ EXAMPLES
88
90
  $ sfpm add @myorg/package-a @myorg/package-b
89
91
  ```
90
92
 
91
- _See code: [dist/commands/add.js](https://github.com/b64hub/sfpm/blob/v0.3.0/dist/commands/add.js)_
93
+ _See code: [dist/commands/add.js](https://github.com/b64hub/sfpm/blob/v0.4.0/dist/commands/add.js)_
92
94
 
93
95
  ## `sfpm bootstrap`
94
96
 
@@ -122,7 +124,7 @@ EXAMPLES
122
124
  $ sfpm bootstrap -o my-prod-org --force
123
125
  ```
124
126
 
125
- _See code: [dist/commands/bootstrap.js](https://github.com/b64hub/sfpm/blob/v0.3.0/dist/commands/bootstrap.js)_
127
+ _See code: [dist/commands/bootstrap.js](https://github.com/b64hub/sfpm/blob/v0.4.0/dist/commands/bootstrap.js)_
126
128
 
127
129
  ## `sfpm build PACKAGES`
128
130
 
@@ -173,7 +175,7 @@ EXAMPLES
173
175
  $ sfpm build package-a package-b -v my-devhub
174
176
  ```
175
177
 
176
- _See code: [dist/commands/build/index.js](https://github.com/b64hub/sfpm/blob/v0.3.0/dist/commands/build/index.js)_
178
+ _See code: [dist/commands/build/index.js](https://github.com/b64hub/sfpm/blob/v0.4.0/dist/commands/build/index.js)_
177
179
 
178
180
  ## `sfpm build status`
179
181
 
@@ -201,7 +203,7 @@ EXAMPLES
201
203
  $ sfpm build status --poll
202
204
  ```
203
205
 
204
- _See code: [dist/commands/build/status.js](https://github.com/b64hub/sfpm/blob/v0.3.0/dist/commands/build/status.js)_
206
+ _See code: [dist/commands/build/status.js](https://github.com/b64hub/sfpm/blob/v0.4.0/dist/commands/build/status.js)_
205
207
 
206
208
  ## `sfpm deploy PACKAGES`
207
209
 
@@ -243,7 +245,7 @@ EXAMPLES
243
245
  $ sfpm deploy package-a package-b -o my-sandbox
244
246
  ```
245
247
 
246
- _See code: [dist/commands/deploy/index.js](https://github.com/b64hub/sfpm/blob/v0.3.0/dist/commands/deploy/index.js)_
248
+ _See code: [dist/commands/deploy/index.js](https://github.com/b64hub/sfpm/blob/v0.4.0/dist/commands/deploy/index.js)_
247
249
 
248
250
  ## `sfpm deploy artifact PACKAGES`
249
251
 
@@ -285,7 +287,7 @@ EXAMPLES
285
287
  $ sfpm deploy artifact package-a package-b -o my-sandbox
286
288
  ```
287
289
 
288
- _See code: [dist/commands/deploy/artifact.js](https://github.com/b64hub/sfpm/blob/v0.3.0/dist/commands/deploy/artifact.js)_
290
+ _See code: [dist/commands/deploy/artifact.js](https://github.com/b64hub/sfpm/blob/v0.4.0/dist/commands/deploy/artifact.js)_
289
291
 
290
292
  ## `sfpm help [COMMAND]`
291
293
 
@@ -348,7 +350,7 @@ EXAMPLES
348
350
  $ sfpm install package-a package-b -o my-sandbox
349
351
  ```
350
352
 
351
- _See code: [dist/commands/install.js](https://github.com/b64hub/sfpm/blob/v0.3.0/dist/commands/install.js)_
353
+ _See code: [dist/commands/install.js](https://github.com/b64hub/sfpm/blob/v0.4.0/dist/commands/install.js)_
352
354
 
353
355
  ## `sfpm package create`
354
356
 
@@ -385,7 +387,7 @@ EXAMPLES
385
387
  $ sfpm package create --json
386
388
  ```
387
389
 
388
- _See code: [dist/commands/package/create.js](https://github.com/b64hub/sfpm/blob/v0.3.0/dist/commands/package/create.js)_
390
+ _See code: [dist/commands/package/create.js](https://github.com/b64hub/sfpm/blob/v0.4.0/dist/commands/package/create.js)_
389
391
 
390
392
  ## `sfpm plugins`
391
393
 
@@ -715,7 +717,7 @@ EXAMPLES
715
717
  $ sfpm pool delete --tag dev-pool -v my-devhub --json
716
718
  ```
717
719
 
718
- _See code: [dist/commands/pool/delete.js](https://github.com/b64hub/sfpm/blob/v0.3.0/dist/commands/pool/delete.js)_
720
+ _See code: [dist/commands/pool/delete.js](https://github.com/b64hub/sfpm/blob/v0.4.0/dist/commands/pool/delete.js)_
719
721
 
720
722
  ## `sfpm pool fetch`
721
723
 
@@ -760,7 +762,7 @@ EXAMPLES
760
762
  $ sfpm pool fetch --tag dev-pool -v my-devhub --json
761
763
  ```
762
764
 
763
- _See code: [dist/commands/pool/fetch.js](https://github.com/b64hub/sfpm/blob/v0.3.0/dist/commands/pool/fetch.js)_
765
+ _See code: [dist/commands/pool/fetch.js](https://github.com/b64hub/sfpm/blob/v0.4.0/dist/commands/pool/fetch.js)_
764
766
 
765
767
  ## `sfpm pool fill`
766
768
 
@@ -801,7 +803,7 @@ EXAMPLES
801
803
  $ sfpm pool fill --tag dev-pool --max 10 -d config/project-scratch-def.json -v my-devhub --json
802
804
  ```
803
805
 
804
- _See code: [dist/commands/pool/fill.js](https://github.com/b64hub/sfpm/blob/v0.3.0/dist/commands/pool/fill.js)_
806
+ _See code: [dist/commands/pool/fill.js](https://github.com/b64hub/sfpm/blob/v0.4.0/dist/commands/pool/fill.js)_
805
807
 
806
808
  ## `sfpm pool list`
807
809
 
@@ -836,7 +838,7 @@ EXAMPLES
836
838
  $ sfpm pool list --tag dev-pool -v my-devhub --json
837
839
  ```
838
840
 
839
- _See code: [dist/commands/pool/list.js](https://github.com/b64hub/sfpm/blob/v0.3.0/dist/commands/pool/list.js)_
841
+ _See code: [dist/commands/pool/list.js](https://github.com/b64hub/sfpm/blob/v0.4.0/dist/commands/pool/list.js)_
840
842
 
841
843
  ## `sfpm project`
842
844
 
@@ -860,7 +862,7 @@ EXAMPLES
860
862
  $ sfpm project
861
863
  ```
862
864
 
863
- _See code: [dist/commands/project/index.js](https://github.com/b64hub/sfpm/blob/v0.3.0/dist/commands/project/index.js)_
865
+ _See code: [dist/commands/project/index.js](https://github.com/b64hub/sfpm/blob/v0.4.0/dist/commands/project/index.js)_
864
866
 
865
867
  ## `sfpm project init`
866
868
 
@@ -886,7 +888,7 @@ EXAMPLES
886
888
  $ sfpm project init --fix
887
889
  ```
888
890
 
889
- _See code: [dist/commands/project/init/index.js](https://github.com/b64hub/sfpm/blob/v0.3.0/dist/commands/project/init/index.js)_
891
+ _See code: [dist/commands/project/init/index.js](https://github.com/b64hub/sfpm/blob/v0.4.0/dist/commands/project/init/index.js)_
890
892
 
891
893
  ## `sfpm project init turbo`
892
894
 
@@ -924,7 +926,7 @@ EXAMPLES
924
926
  $ sfpm project init turbo --json
925
927
  ```
926
928
 
927
- _See code: [dist/commands/project/init/turbo.js](https://github.com/b64hub/sfpm/blob/v0.3.0/dist/commands/project/init/turbo.js)_
929
+ _See code: [dist/commands/project/init/turbo.js](https://github.com/b64hub/sfpm/blob/v0.4.0/dist/commands/project/init/turbo.js)_
928
930
 
929
931
  ## `sfpm project sync`
930
932
 
@@ -950,7 +952,7 @@ EXAMPLES
950
952
  $ sfpm project sync --api-version 63.0
951
953
  ```
952
954
 
953
- _See code: [dist/commands/project/sync.js](https://github.com/b64hub/sfpm/blob/v0.3.0/dist/commands/project/sync.js)_
955
+ _See code: [dist/commands/project/sync.js](https://github.com/b64hub/sfpm/blob/v0.4.0/dist/commands/project/sync.js)_
954
956
 
955
957
  ## `sfpm project version bump`
956
958
 
@@ -994,7 +996,7 @@ EXAMPLES
994
996
  $ sfp project version bump --package mypackage --patch --projectfile path/to/sfdx-project.json
995
997
  ```
996
998
 
997
- _See code: [dist/commands/project/version/bump.js](https://github.com/b64hub/sfpm/blob/v0.3.0/dist/commands/project/version/bump.js)_
999
+ _See code: [dist/commands/project/version/bump.js](https://github.com/b64hub/sfpm/blob/v0.4.0/dist/commands/project/version/bump.js)_
998
1000
 
999
1001
  ## `sfpm publish [PACKAGES]`
1000
1002
 
@@ -1027,7 +1029,82 @@ EXAMPLES
1027
1029
  $ sfpm publish all
1028
1030
  ```
1029
1031
 
1030
- _See code: [dist/commands/publish.js](https://github.com/b64hub/sfpm/blob/v0.3.0/dist/commands/publish.js)_
1032
+ _See code: [dist/commands/publish.js](https://github.com/b64hub/sfpm/blob/v0.4.0/dist/commands/publish.js)_
1033
+
1034
+ ## `sfpm release create [PACKAGES]`
1035
+
1036
+ Create a release definition by resolving package versions from git tags. Run with no arguments in an interactive terminal for a guided walkthrough.
1037
+
1038
+ ```
1039
+ USAGE
1040
+ $ sfpm release create [PACKAGES...] [--json | --plain] [--log-level trace|debug|info|warn|error] [-f] [-n <value>]
1041
+ [-o <value>] [-p <value>] [-r <value>] [-t <value>...]
1042
+
1043
+ ARGUMENTS
1044
+ [PACKAGES...] Package names to include (scoped or unscoped)
1045
+
1046
+ FLAGS
1047
+ -f, --force Overwrite existing release file
1048
+ -n, --name=<value> Release name (used for filename). Omit along with all selection flags to launch the guided
1049
+ walkthrough.
1050
+ -o, --output=<value> Output file path (overrides default release/<name>.yaml)
1051
+ -p, --path=<value> Include only packages in this directory (and descendants)
1052
+ -r, --ref=<value> [default: main] Git ref to resolve package versions from
1053
+ -t, --tag=<value>... Include packages carrying this tag — an sfpm package tag stored in package.json keywords
1054
+ (repeatable, comma-separated)
1055
+ --json output result as JSON
1056
+ --log-level=<option> [default: error, env: SFPM_LOG_LEVEL] diagnostic log level
1057
+ <options: trace|debug|info|warn|error>
1058
+ --plain non-interactive output (no spinners or cursor movement)
1059
+
1060
+ DESCRIPTION
1061
+ Create a release definition by resolving package versions from git tags. Run with no arguments in an interactive
1062
+ terminal for a guided walkthrough.
1063
+
1064
+ EXAMPLES
1065
+ $ sfpm release create
1066
+
1067
+ $ sfpm release create -n summer-2025 pkg-a pkg-b
1068
+
1069
+ $ sfpm release create -n summer-2025 --tag core,sales
1070
+
1071
+ $ sfpm release create -n summer-2025 --path packages/core
1072
+
1073
+ $ sfpm release create -n summer-2025
1074
+ ```
1075
+
1076
+ _See code: [dist/commands/release/create.js](https://github.com/b64hub/sfpm/blob/v0.4.0/dist/commands/release/create.js)_
1077
+
1078
+ ## `sfpm release run FILE`
1079
+
1080
+ Run a release by installing packages from a release definition
1081
+
1082
+ ```
1083
+ USAGE
1084
+ $ sfpm release run FILE -o <value> [--json | --plain] [--log-level trace|debug|info|warn|error]
1085
+ [--skip-version-check]
1086
+
1087
+ ARGUMENTS
1088
+ FILE Path to the release YAML file
1089
+
1090
+ FLAGS
1091
+ -o, --target-org=<value> (required) [env: SF_TARGET_ORG] Target org username
1092
+ --json output result as JSON
1093
+ --log-level=<option> [default: error, env: SFPM_LOG_LEVEL] diagnostic log level
1094
+ <options: trace|debug|info|warn|error>
1095
+ --plain non-interactive output (no spinners or cursor movement)
1096
+ --skip-version-check Skip version mismatch checks (still validates packages are present)
1097
+
1098
+ DESCRIPTION
1099
+ Run a release by installing packages from a release definition
1100
+
1101
+ EXAMPLES
1102
+ $ sfpm release run release/summer-2025.yaml -o my-sandbox
1103
+
1104
+ $ sfpm release run release/summer-2025.yaml -o my-sandbox --json
1105
+ ```
1106
+
1107
+ _See code: [dist/commands/release/run.js](https://github.com/b64hub/sfpm/blob/v0.4.0/dist/commands/release/run.js)_
1031
1108
 
1032
1109
  ## `sfpm watch cancel ID`
1033
1110
 
@@ -1053,7 +1130,7 @@ EXAMPLES
1053
1130
  $ sfpm watch cancel 1234567890-abc123
1054
1131
  ```
1055
1132
 
1056
- _See code: [dist/commands/watch/cancel.js](https://github.com/b64hub/sfpm/blob/v0.3.0/dist/commands/watch/cancel.js)_
1133
+ _See code: [dist/commands/watch/cancel.js](https://github.com/b64hub/sfpm/blob/v0.4.0/dist/commands/watch/cancel.js)_
1057
1134
 
1058
1135
  ## `sfpm watch clean`
1059
1136
 
@@ -1082,7 +1159,7 @@ EXAMPLES
1082
1159
  $ sfpm watch clean --json
1083
1160
  ```
1084
1161
 
1085
- _See code: [dist/commands/watch/clean.js](https://github.com/b64hub/sfpm/blob/v0.3.0/dist/commands/watch/clean.js)_
1162
+ _See code: [dist/commands/watch/clean.js](https://github.com/b64hub/sfpm/blob/v0.4.0/dist/commands/watch/clean.js)_
1086
1163
 
1087
1164
  ## `sfpm watch status`
1088
1165
 
@@ -1115,5 +1192,5 @@ EXAMPLES
1115
1192
  $ sfpm watch status --json
1116
1193
  ```
1117
1194
 
1118
- _See code: [dist/commands/watch/status.js](https://github.com/b64hub/sfpm/blob/v0.3.0/dist/commands/watch/status.js)_
1195
+ _See code: [dist/commands/watch/status.js](https://github.com/b64hub/sfpm/blob/v0.4.0/dist/commands/watch/status.js)_
1119
1196
  <!-- commandsstop -->
@@ -0,0 +1,25 @@
1
+ import SfpmCommand from '../../sfpm-command.js';
2
+ export default class ReleaseCreate extends SfpmCommand {
3
+ static args: {
4
+ packages: import("@oclif/core/interfaces").Arg<string | undefined, Record<string, unknown>>;
5
+ };
6
+ static description: string;
7
+ static examples: string[];
8
+ static flags: {
9
+ force: import("@oclif/core/interfaces").BooleanFlag<boolean>;
10
+ name: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
11
+ output: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
12
+ path: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
13
+ ref: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
14
+ tag: import("@oclif/core/interfaces").OptionFlag<string[] | undefined, import("@oclif/core/interfaces").CustomOptions>;
15
+ };
16
+ static strict: boolean;
17
+ execute(): Promise<any>;
18
+ /**
19
+ * Guided, step-by-step walkthrough for `release create` when invoked with
20
+ * no package-selection or naming signal at all. Reuses the same
21
+ * SelectionMode/selectPackageNames engine as the flag-driven path — only
22
+ * how the mode gets built differs.
23
+ */
24
+ private runInteractiveWizard;
25
+ }
@@ -0,0 +1,291 @@
1
+ import { readLatestPackageVersionTags, RELEASE_DIR, writeReleaseDefinition, } from '@b64hub/sfpm-core';
2
+ import { Git, WorkspaceProvider } from '@b64hub/sfpm-core';
3
+ import { checkbox, confirm, input, select, } from '@inquirer/prompts';
4
+ import { Args, Flags } from '@oclif/core';
5
+ import { existsSync, readFileSync } from 'node:fs';
6
+ import path from 'node:path';
7
+ import SfpmCommand from '../../sfpm-command.js';
8
+ import { getDistinctTags, isBareInvocation, resolveSelectionMode, selectPackageNames, } from '../../types/release.js';
9
+ import { infoBox, successBox } from '../../ui/boxes.js';
10
+ import { resolvePackageInputs } from '../../utils/package-resolver.js';
11
+ import { resolveCliProjectDir } from '../../utils/project-dir.js';
12
+ export default class ReleaseCreate extends SfpmCommand {
13
+ static args = {
14
+ packages: Args.string({
15
+ description: 'Package names to include (scoped or unscoped)',
16
+ required: false,
17
+ }),
18
+ };
19
+ static description = [
20
+ 'Create a release definition by resolving package versions from git tags.',
21
+ 'Run with no arguments in an interactive terminal for a guided walkthrough.',
22
+ ].join(' ');
23
+ static examples = [
24
+ '<%= config.bin %> <%= command.id %>',
25
+ '<%= config.bin %> <%= command.id %> -n summer-2025 pkg-a pkg-b',
26
+ '<%= config.bin %> <%= command.id %> -n summer-2025 --tag core,sales',
27
+ '<%= config.bin %> <%= command.id %> -n summer-2025 --path packages/core',
28
+ '<%= config.bin %> <%= command.id %> -n summer-2025',
29
+ ];
30
+ static flags = {
31
+ force: Flags.boolean({
32
+ char: 'f',
33
+ description: 'Overwrite existing release file',
34
+ }),
35
+ name: Flags.string({
36
+ char: 'n',
37
+ description: 'Release name (used for filename). Omit along with all selection flags to launch the guided walkthrough.',
38
+ }),
39
+ output: Flags.string({
40
+ char: 'o',
41
+ description: 'Output file path (overrides default release/<name>.yaml)',
42
+ }),
43
+ path: Flags.string({
44
+ char: 'p',
45
+ description: 'Include only packages in this directory (and descendants)',
46
+ }),
47
+ ref: Flags.string({
48
+ char: 'r',
49
+ default: 'main',
50
+ description: 'Git ref to resolve package versions from',
51
+ }),
52
+ tag: Flags.string({
53
+ char: 't',
54
+ description: 'Include packages carrying this tag — an sfpm package tag stored in package.json keywords (repeatable, comma-separated)',
55
+ multiple: true,
56
+ }),
57
+ };
58
+ static strict = false;
59
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any,complexity
60
+ async execute() {
61
+ const { argv, flags } = await this.parse(ReleaseCreate);
62
+ const projectDir = resolveCliProjectDir();
63
+ // Step 1: Load workspace packages
64
+ const provider = new WorkspaceProvider({ logger: this.sfpmLogger, projectDir });
65
+ // Step 2: Build candidates with keywords
66
+ const candidates = [];
67
+ for (const name of provider.getAllPackageNames()) {
68
+ const pkgDir = provider.getPackageDir(name);
69
+ if (!pkgDir)
70
+ continue;
71
+ let keywords = [];
72
+ try {
73
+ const pkgJsonPath = path.join(pkgDir, 'package.json');
74
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
75
+ const pkgJson = JSON.parse(readFileSync(pkgJsonPath, 'utf8'));
76
+ if (Array.isArray(pkgJson.keywords)) {
77
+ keywords = pkgJson.keywords;
78
+ }
79
+ }
80
+ catch (error) {
81
+ // If we can't read keywords, just use empty array
82
+ this.sfpmLogger.debug(`Could not read keywords for ${name}: ${error instanceof Error ? error.message : String(error)}`);
83
+ }
84
+ candidates.push({ dir: pkgDir, keywords, name });
85
+ }
86
+ // Step 3: Bare invocation (no selection/name signal at all) -> guided walkthrough
87
+ const isBare = isBareInvocation(argv, { name: flags.name, path: flags.path, tag: flags.tag });
88
+ let releaseName;
89
+ let ref;
90
+ let mode;
91
+ if (isBare) {
92
+ if (this.outputMode !== 'interactive') {
93
+ this.error([
94
+ 'No packages specified. Provide package names, --tag, --path, and --name,',
95
+ 'or run this command in an interactive terminal for the guided walkthrough.',
96
+ ].join(' '));
97
+ }
98
+ if (candidates.length === 0) {
99
+ this.error('No workspace packages found.');
100
+ }
101
+ ({ mode, ref, releaseName } = await this.runInteractiveWizard(candidates));
102
+ }
103
+ else {
104
+ if (!flags.name) {
105
+ this.error('Missing required flag name (-n, --name)');
106
+ }
107
+ releaseName = flags.name;
108
+ ref = flags.ref;
109
+ // Step 4: Resolve selection mode
110
+ mode = resolveSelectionMode(argv.length > 0 ? argv : [], flags.tag?.length ? flags.tag : undefined, flags.path);
111
+ // Step 5: If explicit, resolve package names via resolvePackageInputs
112
+ if (mode.kind === 'explicit') {
113
+ try {
114
+ const resolved = await resolvePackageInputs(mode.names, provider, { json: this.outputMode === 'json' });
115
+ mode = { kind: 'explicit', names: resolved };
116
+ }
117
+ catch (error) {
118
+ this.error(error instanceof Error ? error.message : String(error));
119
+ }
120
+ }
121
+ }
122
+ // Step 6: Select packages
123
+ const selected = selectPackageNames(candidates, mode);
124
+ if (selected.length === 0) {
125
+ this.error('No packages matched the selection.');
126
+ }
127
+ // Step 7: Read git tags
128
+ const git = new Git(projectDir, this.sfpmLogger);
129
+ let latest;
130
+ try {
131
+ latest = await readLatestPackageVersionTags(git, ref);
132
+ }
133
+ catch (error) {
134
+ this.error(error instanceof Error ? error.message : String(error));
135
+ }
136
+ // Step 8 & 9: Resolve versions for selected packages
137
+ const packages = [];
138
+ const skipped = [];
139
+ for (const name of selected) {
140
+ const version = latest.get(name);
141
+ if (!version) {
142
+ if (mode.kind === 'explicit') {
143
+ this.error(`No package tag found for "${name}" merged into "${ref}".`);
144
+ }
145
+ else {
146
+ this.sfpmLogger.warn(`Skipping ${name}: no package tag merged into "${ref}"`);
147
+ skipped.push(name);
148
+ continue;
149
+ }
150
+ }
151
+ packages.push({ name, version });
152
+ }
153
+ // Step 10: Ensure we have at least some packages
154
+ if (packages.length === 0) {
155
+ this.error(`No tagged packages found for ref "${ref}".`);
156
+ }
157
+ // Step 11: Determine output path
158
+ const outPath = flags.output
159
+ ? path.resolve(flags.output)
160
+ : path.join(projectDir, RELEASE_DIR, `${releaseName}.yaml`);
161
+ // Step 12: Check if file exists
162
+ if (existsSync(outPath) && !flags.force) {
163
+ if (isBare) {
164
+ const overwrite = await confirm({ default: false, message: `${outPath} already exists. Overwrite?` });
165
+ if (!overwrite)
166
+ this.error('Aborted — release file already exists.');
167
+ }
168
+ else {
169
+ this.error(`${outPath} already exists. Use --force to overwrite.`);
170
+ }
171
+ }
172
+ // Step 13: Confirm before writing (wizard only — flag-driven invocations stay scriptable)
173
+ if (isBare) {
174
+ this.log(infoBox('Release Summary', {
175
+ Packages: packages.map(p => `${p.name}@${p.version}`).join('\n'),
176
+ Ref: ref,
177
+ Release: releaseName,
178
+ ...(skipped.length > 0 && { Skipped: skipped.join(', ') }),
179
+ }));
180
+ const proceed = await confirm({ default: true, message: `Write ${outPath}?` });
181
+ if (!proceed)
182
+ this.error('Aborted.');
183
+ }
184
+ // Step 14: Write release definition
185
+ const definition = {
186
+ packages,
187
+ ref,
188
+ release: releaseName,
189
+ };
190
+ try {
191
+ writeReleaseDefinition(outPath, definition);
192
+ }
193
+ catch (error) {
194
+ this.error(error instanceof Error ? error.message : String(error));
195
+ }
196
+ // Step 15: Return result
197
+ const result = {
198
+ packageCount: packages.length,
199
+ path: outPath,
200
+ release: releaseName,
201
+ ...(skipped.length > 0 && { skipped }),
202
+ };
203
+ if (isBare) {
204
+ this.log(successBox('Release Created', {
205
+ File: outPath,
206
+ Packages: String(packages.length),
207
+ }));
208
+ }
209
+ else if (this.outputMode !== 'json') {
210
+ this.log(`Release manifest created: ${outPath}`);
211
+ this.log(` Release: ${releaseName}`);
212
+ this.log(` Packages: ${packages.length}`);
213
+ if (skipped.length > 0) {
214
+ this.log(` Skipped: ${skipped.length}`);
215
+ }
216
+ }
217
+ return result;
218
+ }
219
+ // ====================================================================
220
+ // Private helpers
221
+ // ====================================================================
222
+ /**
223
+ * Guided, step-by-step walkthrough for `release create` when invoked with
224
+ * no package-selection or naming signal at all. Reuses the same
225
+ * SelectionMode/selectPackageNames engine as the flag-driven path — only
226
+ * how the mode gets built differs.
227
+ */
228
+ async runInteractiveWizard(candidates) {
229
+ this.log(infoBox('Release Create — Guided Walkthrough', {
230
+ 'Workspace packages': String(candidates.length),
231
+ }));
232
+ const strategy = await select({
233
+ choices: [
234
+ { name: 'All packages', value: 'all' },
235
+ { name: 'Pick packages individually', value: 'explicit' },
236
+ { name: 'Filter by tag', value: 'tag' },
237
+ { name: 'Filter by workspace path', value: 'path' },
238
+ ],
239
+ message: 'How do you want to select packages for this release?',
240
+ });
241
+ let mode;
242
+ switch (strategy) {
243
+ case 'explicit': {
244
+ const names = await checkbox({
245
+ choices: candidates.map(c => ({
246
+ name: c.keywords.length > 0 ? `${c.name} (${c.keywords.join(', ')})` : c.name,
247
+ value: c.name,
248
+ })),
249
+ message: 'Select packages to include:',
250
+ required: true,
251
+ });
252
+ mode = { kind: 'explicit', names };
253
+ break;
254
+ }
255
+ case 'path': {
256
+ const dir = await input({
257
+ message: 'Workspace path (packages under this directory will be included):',
258
+ validate: (value) => value.trim().length > 0 || 'A path is required',
259
+ });
260
+ mode = { dir, kind: 'path' };
261
+ break;
262
+ }
263
+ case 'tag': {
264
+ const tags = getDistinctTags(candidates);
265
+ if (tags.length === 0) {
266
+ this.error('No workspace packages have any tags (package.json keywords) yet — pick a different selection strategy.');
267
+ }
268
+ const selectedTags = await checkbox({
269
+ choices: tags.map(t => ({ name: t, value: t })),
270
+ message: 'Select tag(s) to include:',
271
+ required: true,
272
+ });
273
+ mode = { kind: 'tag', tags: selectedTags };
274
+ break;
275
+ }
276
+ default: {
277
+ mode = { kind: 'all' };
278
+ }
279
+ }
280
+ const releaseName = await input({
281
+ message: 'Release name:',
282
+ validate: (value) => value.trim().length > 0 || 'A release name is required',
283
+ });
284
+ const ref = await input({
285
+ default: 'main',
286
+ message: 'Git ref to resolve package versions from:',
287
+ });
288
+ return { mode, ref, releaseName };
289
+ }
290
+ }
291
+ //# sourceMappingURL=create.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create.js","sourceRoot":"","sources":["../../../src/commands/release/create.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,4BAA4B,EAAE,WAAW,EAA0B,sBAAsB,GAC1F,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAC,GAAG,EAAE,iBAAiB,EAAC,MAAM,mBAAmB,CAAC;AACzD,OAAO,EACL,QAAQ,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,GACjC,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAC,IAAI,EAAE,KAAK,EAAC,MAAM,aAAa,CAAC;AACxC,OAAO,EAAC,UAAU,EAAE,YAAY,EAAC,MAAM,SAAS,CAAC;AACjD,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,OAAO,WAAW,MAAM,uBAAuB,CAAC;AAChD,OAAO,EACL,eAAe,EAAE,gBAAgB,EAAE,oBAAoB,EAAsB,kBAAkB,GAChG,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAC,OAAO,EAAE,UAAU,EAAC,MAAM,mBAAmB,CAAC;AACtD,OAAO,EAAC,oBAAoB,EAAC,MAAM,iCAAiC,CAAC;AACrE,OAAO,EAAC,oBAAoB,EAAC,MAAM,4BAA4B,CAAC;AAEhE,MAAM,CAAC,OAAO,OAAO,aAAc,SAAQ,WAAW;IACpD,MAAM,CAAU,IAAI,GAAG;QACrB,QAAQ,EAAE,IAAI,CAAC,MAAM,CAAC;YACpB,WAAW,EAAE,+CAA+C;YAC5D,QAAQ,EAAE,KAAK;SAChB,CAAC;KACH,CAAA;IACD,MAAM,CAAU,WAAW,GAAG;QAC5B,0EAA0E;QAC1E,4EAA4E;KAC7E,CAAC,IAAI,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IAAI,GAAG,EAAC,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,YAAY,EAAC,CAAC;gBAEzC,MAAM;YACR,CAAC;YAED,OAAO,CAAC,CAAC,CAAC;gBACR,IAAI,GAAG,EAAC,IAAI,EAAE,KAAK,EAAC,CAAC;YACvB,CAAC;QACD,CAAC;QAED,MAAM,WAAW,GAAG,MAAM,KAAK,CAAC;YAC9B,OAAO,EAAE,eAAe;YACxB,QAAQ,EAAE,CAAC,KAAa,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,MAAM,GAAG,CAAC,IAAI,4BAA4B;SACrF,CAAC,CAAC;QAEH,MAAM,GAAG,GAAG,MAAM,KAAK,CAAC;YACtB,OAAO,EAAE,MAAM;YACf,OAAO,EAAE,2CAA2C;SACrD,CAAC,CAAC;QAEH,OAAO,EAAC,IAAI,EAAE,GAAG,EAAE,WAAW,EAAC,CAAC;IAClC,CAAC"}
@@ -0,0 +1,13 @@
1
+ import SfpmCommand from '../../sfpm-command.js';
2
+ export default class ReleaseRun extends SfpmCommand {
3
+ static args: {
4
+ file: import("@oclif/core/interfaces").Arg<string, Record<string, unknown>>;
5
+ };
6
+ static description: string;
7
+ static examples: string[];
8
+ static flags: {
9
+ 'skip-version-check': import("@oclif/core/interfaces").BooleanFlag<boolean>;
10
+ 'target-org': import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
11
+ };
12
+ execute(): Promise<any>;
13
+ }
@@ -0,0 +1,142 @@
1
+ import { ArtifactProvider, InstallOrchestrator, LifecycleEngine, ProjectService, readReleaseDefinition, } from '@b64hub/sfpm-core';
2
+ import { createTracer } from '@b64hub/sfpm-telemetry';
3
+ import { Args, Flags } from '@oclif/core';
4
+ import { Org } from '@salesforce/core';
5
+ import EventEmitter from 'node:events';
6
+ import path from 'node:path';
7
+ import SfpmCommand from '../../sfpm-command.js';
8
+ import { reconcileManifest } from '../../types/release.js';
9
+ import { attachInstallBridge } from '../../ui/adapters/install-event-bridge.js';
10
+ import { renderApp } from '../../ui/renderers/run-orchestrator.js';
11
+ import { resolveCliProjectDir } from '../../utils/project-dir.js';
12
+ export default class ReleaseRun extends SfpmCommand {
13
+ static args = {
14
+ file: Args.string({
15
+ description: 'Path to the release YAML file',
16
+ required: true,
17
+ }),
18
+ };
19
+ static description = 'Run a release by installing packages from a release definition';
20
+ static examples = [
21
+ '<%= config.bin %> <%= command.id %> release/summer-2025.yaml -o my-sandbox',
22
+ '<%= config.bin %> <%= command.id %> release/summer-2025.yaml -o my-sandbox --json',
23
+ ];
24
+ static flags = {
25
+ 'skip-version-check': Flags.boolean({
26
+ description: 'Skip version mismatch checks (still validates packages are present)',
27
+ }),
28
+ 'target-org': Flags.string({
29
+ char: 'o',
30
+ description: 'Target org username',
31
+ env: 'SF_TARGET_ORG',
32
+ required: true,
33
+ }),
34
+ };
35
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any,complexity
36
+ async execute() {
37
+ const { args, flags } = await this.parse(ReleaseRun);
38
+ const projectDir = resolveCliProjectDir();
39
+ // Step 1 & 2: Read and parse release definition
40
+ let definition;
41
+ try {
42
+ definition = readReleaseDefinition(path.resolve(args.file));
43
+ }
44
+ catch (error) {
45
+ this.error(error instanceof Error ? error.message : String(error));
46
+ }
47
+ // Step 3: Extract package names
48
+ const names = definition.packages.map(p => p.name);
49
+ // Step 4: Create ArtifactProvider
50
+ const artifactProvider = new ArtifactProvider({ logger: this.sfpmLogger, packages: names, projectDir });
51
+ // Step 5: Create ProjectService and resolve graph
52
+ let projectService;
53
+ try {
54
+ projectService = await ProjectService.create(projectDir, artifactProvider);
55
+ }
56
+ catch (error) {
57
+ this.error(error instanceof Error ? error.message : String(error));
58
+ }
59
+ const projectConfig = projectService.getDefinitionProvider();
60
+ const projectGraph = projectService.getProjectGraph();
61
+ // Step 6: TRUST BOUNDARY GATE — reconcile manifest vs node_modules
62
+ const resolvedVersions = new Map(projectConfig.getAllPackageDefinitions().map(p => [p.name, p.version]));
63
+ const { mismatched, missing } = reconcileManifest(definition.packages, resolvedVersions, { skipVersionCheck: flags['skip-version-check'] });
64
+ if (missing.length > 0) {
65
+ const msg = [
66
+ `Release "${definition.release}" declares packages not present in node_modules: ${missing.join(', ')}.`,
67
+ "Run 'npm ci' (or 'npm install --no-save <name>@<version>') before 'release run'.",
68
+ ].join(' ');
69
+ this.error(msg);
70
+ }
71
+ if (mismatched.length > 0) {
72
+ const msg = [
73
+ `Version mismatch for: ${mismatched.map(m => `${m.name} (expected ${m.expected}, found ${m.actual})`).join('; ')}.`,
74
+ 'Re-install the declared versions or pass --skip-version-check.',
75
+ ].join(' ');
76
+ this.error(msg);
77
+ }
78
+ // Step 7: Resolve all packages (includes transitive sfpm deps)
79
+ const resolvedPackages = projectConfig.getAllPackageNames();
80
+ // Step 8: Load sfpm config and lifecycle hooks
81
+ const sfpmConfig = projectService.getSfpmConfig();
82
+ const lifecycle = LifecycleEngine.stage('install');
83
+ for (const hooks of sfpmConfig.hooks ?? []) {
84
+ lifecycle.use(hooks);
85
+ }
86
+ // Step 9: Create target org
87
+ let targetOrg;
88
+ try {
89
+ targetOrg = await Org.create({ aliasOrUsername: flags['target-org'] });
90
+ }
91
+ catch (error) {
92
+ this.error(error instanceof Error ? error.message : String(error));
93
+ }
94
+ // Step 10: Setup logging and UI
95
+ const mode = this.outputMode;
96
+ const isInk = mode !== 'json';
97
+ const uiBus = isInk ? new EventEmitter() : undefined;
98
+ const { logger: pinoLogger, logPath } = this.createRunLogger(uiBus);
99
+ // Step 11: Create orchestrator with manifest options
100
+ const orchestrator = InstallOrchestrator.forArtifact(targetOrg, projectConfig, projectGraph, {
101
+ force: definition.options?.force,
102
+ includeDependencies: definition.options?.includeDependencies ?? true,
103
+ regressionTest: definition.options?.regressionTest,
104
+ testLevel: definition.options?.testLevel,
105
+ unlocked: definition.options?.unlocked,
106
+ }, pinoLogger);
107
+ // Step 12: Setup ink UI bridge if needed
108
+ let inkInstance;
109
+ if (isInk) {
110
+ attachInstallBridge(orchestrator.installBus, orchestrator.orchestrationBus, uiBus);
111
+ inkInstance = renderApp(uiBus, { logPath, mode: mode === 'interactive' ? 'interactive' : 'plain' });
112
+ }
113
+ // Setup telemetry tracer
114
+ const tracer = createTracer({ serviceName: 'sfpm-cli' });
115
+ tracer.subscribe({ install: orchestrator.installBus, orchestration: orchestrator.orchestrationBus });
116
+ try {
117
+ // Run installation
118
+ const result = await orchestrator.installAll(resolvedPackages);
119
+ await tracer.shutdown();
120
+ // Let the app self-exit after rendering its terminal state
121
+ if (inkInstance) {
122
+ await inkInstance.waitUntilExit();
123
+ inkInstance = undefined;
124
+ }
125
+ if (!result.success) {
126
+ const failedNames = result.failedPackages.join(', ');
127
+ this.error(`Install failed for: ${failedNames}`, { exit: 2 });
128
+ }
129
+ return { release: definition.release, ...result };
130
+ }
131
+ catch (error) {
132
+ if (error instanceof Error) {
133
+ this.error(error.message, { exit: 2 });
134
+ }
135
+ throw error;
136
+ }
137
+ finally {
138
+ inkInstance?.unmount();
139
+ }
140
+ }
141
+ }
142
+ //# sourceMappingURL=run.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"run.js","sourceRoot":"","sources":["../../../src/commands/release/run.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gBAAgB,EAAE,mBAAmB,EAAE,eAAe,EAAE,cAAc,EAAE,qBAAqB,GAC9F,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAC,YAAY,EAAC,MAAM,wBAAwB,CAAC;AACpD,OAAO,EAAC,IAAI,EAAE,KAAK,EAAC,MAAM,aAAa,CAAC;AACxC,OAAO,EAAC,GAAG,EAAC,MAAM,kBAAkB,CAAC;AACrC,OAAO,YAAY,MAAM,aAAa,CAAC;AACvC,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,OAAO,WAAW,MAAM,uBAAuB,CAAC;AAChD,OAAO,EAAC,iBAAiB,EAAC,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAC,mBAAmB,EAAC,MAAM,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AAC;YACH,mBAAmB;YACnB,MAAM,MAAM,GAAG,MAAM,YAAY,CAAC,UAAU,CAAC,gBAAgB,CAAC,CAAC;YAE/D,MAAM,MAAM,CAAC,QAAQ,EAAE,CAAC;YAExB,2DAA2D;YAC3D,IAAI,WAAW,EAAE,CAAC;gBAChB,MAAM,WAAW,CAAC,aAAa,EAAE,CAAC;gBAClC,WAAW,GAAG,SAAS,CAAC;YAC1B,CAAC;YAED,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC;gBACpB,MAAM,WAAW,GAAG,MAAM,CAAC,cAAc,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;gBACrD,IAAI,CAAC,KAAK,CAAC,uBAAuB,WAAW,EAAE,EAAE,EAAC,IAAI,EAAE,CAAC,EAAC,CAAC,CAAC;YAC9D,CAAC;YAED,OAAO,EAAC,OAAO,EAAE,UAAW,CAAC,OAAO,EAAE,GAAG,MAAM,EAAC,CAAC;QACnD,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,IAAI,KAAK,YAAY,KAAK,EAAE,CAAC;gBAC3B,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,OAAO,EAAE,EAAC,IAAI,EAAE,CAAC,EAAC,CAAC,CAAC;YACvC,CAAC;YAED,MAAM,KAAK,CAAC;QACd,CAAC;gBAAS,CAAC;YACT,WAAW,EAAE,OAAO,EAAE,CAAC;QACzB,CAAC;IACH,CAAC"}
@@ -0,0 +1,110 @@
1
+ /**
2
+ * Workspace candidate for package selection.
3
+ * Combines a package's identity with its keywords, which double as sfpm's
4
+ * package tags (an arbitrary, user-assigned label — no reserved prefix,
5
+ * no enforced vocabulary), for tag-based filtering.
6
+ */
7
+ export interface WorkspaceCandidate {
8
+ /** Absolute path to the package directory */
9
+ dir: string;
10
+ /** Keywords from package.json — the storage field backing sfpm's package tags */
11
+ keywords: string[];
12
+ /** Package name (scoped or unscoped) */
13
+ name: string;
14
+ }
15
+ /**
16
+ * A selection mode: which strategy to use for picking packages.
17
+ */
18
+ export type SelectionMode = {
19
+ dir: string;
20
+ kind: 'path';
21
+ } | {
22
+ kind: 'all';
23
+ } | {
24
+ kind: 'explicit';
25
+ names: string[];
26
+ } | {
27
+ kind: 'tag';
28
+ tags: string[];
29
+ };
30
+ /**
31
+ * Determine the package selection mode from supplied flags.
32
+ *
33
+ * Ensures exactly one selection strategy is active; throws if multiple are specified.
34
+ *
35
+ * @param names - Explicitly named packages from argv
36
+ * @param tags - Package tags specified via --tag (matched against package.json keywords)
37
+ * @param dir - Directory path specified via --path
38
+ * @returns SelectionMode configured for the active strategy
39
+ * @throws Error if more than one selection mode is active
40
+ */
41
+ export declare function resolveSelectionMode(names: string[], tags?: string[], dir?: string): SelectionMode;
42
+ /**
43
+ * Decide whether `release create` was invoked with no selection or naming
44
+ * signal at all — i.e. bare `sfpm release create`, which should launch the
45
+ * interactive guided walkthrough instead of failing on a missing --name.
46
+ *
47
+ * @param argv - Positional package name arguments
48
+ * @param flags - The subset of flags that count as a selection/naming signal
49
+ * @param flags.name - The --name flag value, if supplied
50
+ * @param flags.path - The --path flag value, if supplied
51
+ * @param flags.tag - The --tag flag value(s), if supplied
52
+ * @returns true when nothing was supplied and the wizard should run
53
+ */
54
+ export declare function isBareInvocation(argv: string[], flags: {
55
+ name?: string;
56
+ path?: string;
57
+ tag?: string[];
58
+ }): boolean;
59
+ /**
60
+ * Collect the distinct package tags (package.json keywords) present across
61
+ * a set of workspace candidates, sorted for stable prompt/display order.
62
+ *
63
+ * @param candidates - Available workspace packages with metadata
64
+ * @returns Sorted array of distinct tag values
65
+ */
66
+ export declare function getDistinctTags(candidates: WorkspaceCandidate[]): string[];
67
+ /**
68
+ * Select package names from candidates using the specified selection mode.
69
+ *
70
+ * @param candidates - Available workspace packages with metadata
71
+ * @param mode - The selection strategy to apply
72
+ * @returns Array of selected package names
73
+ */
74
+ export declare function selectPackageNames(candidates: WorkspaceCandidate[], mode: SelectionMode): string[];
75
+ /**
76
+ * Version mismatch detail in reconciliation.
77
+ */
78
+ export interface ReconcileMismatch {
79
+ actual: string;
80
+ expected: string;
81
+ name: string;
82
+ }
83
+ /**
84
+ * Result of manifest reconciliation.
85
+ */
86
+ export interface ReconcileResult {
87
+ mismatched: ReconcileMismatch[];
88
+ missing: string[];
89
+ }
90
+ /**
91
+ * Reconcile a release manifest against what's currently in node_modules.
92
+ *
93
+ * Checks for:
94
+ * - Missing packages (declared but not installed)
95
+ * - Version mismatches (unless --skip-version-check is set)
96
+ *
97
+ * Uses exact string comparison, not semver.eq — a release pins an exact artifact.
98
+ *
99
+ * @param declared - Packages and versions from the release manifest
100
+ * @param resolved - Packages and versions currently in node_modules (from ArtifactProvider)
101
+ * @param options - Control behavior
102
+ * @param options.skipVersionCheck - Skip version mismatch checks (still validates packages are present)
103
+ * @returns Reconciliation result with missing and mismatched arrays
104
+ */
105
+ export declare function reconcileManifest(declared: {
106
+ name: string;
107
+ version: string;
108
+ }[], resolved: Map<string, string>, options?: {
109
+ skipVersionCheck?: boolean;
110
+ }): ReconcileResult;
@@ -0,0 +1,142 @@
1
+ import path from 'node:path';
2
+ /**
3
+ * Determine the package selection mode from supplied flags.
4
+ *
5
+ * Ensures exactly one selection strategy is active; throws if multiple are specified.
6
+ *
7
+ * @param names - Explicitly named packages from argv
8
+ * @param tags - Package tags specified via --tag (matched against package.json keywords)
9
+ * @param dir - Directory path specified via --path
10
+ * @returns SelectionMode configured for the active strategy
11
+ * @throws Error if more than one selection mode is active
12
+ */
13
+ export function resolveSelectionMode(names, tags, dir) {
14
+ // Identify which modes are active
15
+ const active = [];
16
+ if (names.length > 0)
17
+ active.push('packages');
18
+ if (tags?.length)
19
+ active.push('--tag');
20
+ if (dir)
21
+ active.push('--path');
22
+ if (active.length > 1) {
23
+ throw new Error(`Select packages by exactly one of: package names, --tag, or --path (got ${active.join(', ')}).`);
24
+ }
25
+ if (names.length > 0)
26
+ return { kind: 'explicit', names };
27
+ if (tags?.length)
28
+ return { kind: 'tag', tags };
29
+ if (dir)
30
+ return { dir, kind: 'path' };
31
+ return { kind: 'all' };
32
+ }
33
+ /**
34
+ * Check if a child directory is within a parent directory.
35
+ *
36
+ * Both paths are resolved to absolute form.
37
+ * Returns true if child is exactly parent or a descendant of parent (not a sibling).
38
+ *
39
+ * @param parent - Parent directory path
40
+ * @param child - Child directory path
41
+ * @returns true if child is parent or within parent
42
+ */
43
+ function isWithin(parent, child) {
44
+ const absParent = path.resolve(parent);
45
+ const absChild = path.resolve(child);
46
+ // Exact match
47
+ if (absParent === absChild)
48
+ return true;
49
+ const rel = path.relative(absParent, absChild);
50
+ // rel starts with '..' => child is outside parent
51
+ // isAbsolute(rel) => child is on a different drive (windows)
52
+ // otherwise, rel is a relative path from parent to child
53
+ return !rel.startsWith('..') && !path.isAbsolute(rel);
54
+ }
55
+ /**
56
+ * Decide whether `release create` was invoked with no selection or naming
57
+ * signal at all — i.e. bare `sfpm release create`, which should launch the
58
+ * interactive guided walkthrough instead of failing on a missing --name.
59
+ *
60
+ * @param argv - Positional package name arguments
61
+ * @param flags - The subset of flags that count as a selection/naming signal
62
+ * @param flags.name - The --name flag value, if supplied
63
+ * @param flags.path - The --path flag value, if supplied
64
+ * @param flags.tag - The --tag flag value(s), if supplied
65
+ * @returns true when nothing was supplied and the wizard should run
66
+ */
67
+ export function isBareInvocation(argv, flags) {
68
+ return argv.length === 0 && !flags.tag?.length && !flags.path && !flags.name;
69
+ }
70
+ /**
71
+ * Collect the distinct package tags (package.json keywords) present across
72
+ * a set of workspace candidates, sorted for stable prompt/display order.
73
+ *
74
+ * @param candidates - Available workspace packages with metadata
75
+ * @returns Sorted array of distinct tag values
76
+ */
77
+ export function getDistinctTags(candidates) {
78
+ const tags = new Set();
79
+ for (const candidate of candidates) {
80
+ for (const keyword of candidate.keywords) {
81
+ tags.add(keyword);
82
+ }
83
+ }
84
+ return [...tags].sort();
85
+ }
86
+ /**
87
+ * Select package names from candidates using the specified selection mode.
88
+ *
89
+ * @param candidates - Available workspace packages with metadata
90
+ * @param mode - The selection strategy to apply
91
+ * @returns Array of selected package names
92
+ */
93
+ export function selectPackageNames(candidates, mode) {
94
+ switch (mode.kind) {
95
+ case 'all': {
96
+ return candidates.map(c => c.name);
97
+ }
98
+ case 'explicit': {
99
+ return mode.names;
100
+ }
101
+ case 'path': {
102
+ return candidates.filter(c => isWithin(mode.dir, c.dir)).map(c => c.name);
103
+ }
104
+ case 'tag': {
105
+ return candidates
106
+ .filter(c => mode.tags.some(t => c.keywords.includes(t)))
107
+ .map(c => c.name);
108
+ }
109
+ }
110
+ }
111
+ /**
112
+ * Reconcile a release manifest against what's currently in node_modules.
113
+ *
114
+ * Checks for:
115
+ * - Missing packages (declared but not installed)
116
+ * - Version mismatches (unless --skip-version-check is set)
117
+ *
118
+ * Uses exact string comparison, not semver.eq — a release pins an exact artifact.
119
+ *
120
+ * @param declared - Packages and versions from the release manifest
121
+ * @param resolved - Packages and versions currently in node_modules (from ArtifactProvider)
122
+ * @param options - Control behavior
123
+ * @param options.skipVersionCheck - Skip version mismatch checks (still validates packages are present)
124
+ * @returns Reconciliation result with missing and mismatched arrays
125
+ */
126
+ export function reconcileManifest(declared, resolved, options) {
127
+ const mismatched = [];
128
+ const missing = [];
129
+ for (const { name, version } of declared) {
130
+ const actual = resolved.get(name);
131
+ if (actual === undefined) {
132
+ missing.push(name);
133
+ continue;
134
+ }
135
+ // Only check version mismatch if not explicitly skipped
136
+ if (!options?.skipVersionCheck && actual !== version) {
137
+ mismatched.push({ actual, expected: version, name });
138
+ }
139
+ }
140
+ return { mismatched, missing };
141
+ }
142
+ //# sourceMappingURL=release.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"release.js","sourceRoot":"","sources":["../../src/types/release.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAA;AAsB5B;;;;;;;;;;GAUG;AACH,MAAM,UAAU,oBAAoB,CAAC,KAAe,EAAE,IAAe,EAAE,GAAY;IACjF,kCAAkC;IAClC,MAAM,MAAM,GAAa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,OAAO,UAAU;iBAChB,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC;iBACxD,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAA;QACnB,CAAC;IACD,CAAC;AACH,CAAC;AAmBD;;;;;;;;;;;;;;GAcG;AACH,MAAM,UAAU,iBAAiB,CAC/B,QAA2C,EAC3C,QAA6B,EAC7B,OAAsC;IAEtC,MAAM,UAAU,GAAwB,EAAE,CAAA;IAC1C,MAAM,OAAO,GAAa,EAAE,CAAA;IAE5B,KAAK,MAAM,EAAC,IAAI,EAAE,OAAO,EAAC,IAAI,QAAQ,EAAE,CAAC;QACvC,MAAM,MAAM,GAAG,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,CAAA;QAEjC,IAAI,MAAM,KAAK,SAAS,EAAE,CAAC;YACzB,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;YAClB,SAAQ;QACV,CAAC;QAED,wDAAwD;QACxD,IAAI,CAAC,OAAO,EAAE,gBAAgB,IAAI,MAAM,KAAK,OAAO,EAAE,CAAC;YACrD,UAAU,CAAC,IAAI,CAAC,EAAC,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,IAAI,EAAC,CAAC,CAAA;QACpD,CAAC;IACH,CAAC;IAED,OAAO,EAAC,UAAU,EAAE,OAAO,EAAC,CAAA;AAC9B,CAAC"}
@@ -1774,6 +1774,205 @@
1774
1774
  "sync.js"
1775
1775
  ]
1776
1776
  },
1777
+ "release:create": {
1778
+ "aliases": [],
1779
+ "args": {
1780
+ "packages": {
1781
+ "description": "Package names to include (scoped or unscoped)",
1782
+ "name": "packages",
1783
+ "required": false
1784
+ }
1785
+ },
1786
+ "description": "Create a release definition by resolving package versions from git tags. Run with no arguments in an interactive terminal for a guided walkthrough.",
1787
+ "examples": [
1788
+ "<%= config.bin %> <%= command.id %>",
1789
+ "<%= config.bin %> <%= command.id %> -n summer-2025 pkg-a pkg-b",
1790
+ "<%= config.bin %> <%= command.id %> -n summer-2025 --tag core,sales",
1791
+ "<%= config.bin %> <%= command.id %> -n summer-2025 --path packages/core",
1792
+ "<%= config.bin %> <%= command.id %> -n summer-2025"
1793
+ ],
1794
+ "flags": {
1795
+ "json": {
1796
+ "description": "output result as JSON",
1797
+ "exclusive": [
1798
+ "plain"
1799
+ ],
1800
+ "name": "json",
1801
+ "allowNo": false,
1802
+ "type": "boolean"
1803
+ },
1804
+ "log-level": {
1805
+ "description": "diagnostic log level",
1806
+ "env": "SFPM_LOG_LEVEL",
1807
+ "name": "log-level",
1808
+ "default": "error",
1809
+ "hasDynamicHelp": false,
1810
+ "multiple": false,
1811
+ "options": [
1812
+ "trace",
1813
+ "debug",
1814
+ "info",
1815
+ "warn",
1816
+ "error"
1817
+ ],
1818
+ "type": "option"
1819
+ },
1820
+ "plain": {
1821
+ "description": "non-interactive output (no spinners or cursor movement)",
1822
+ "exclusive": [
1823
+ "json"
1824
+ ],
1825
+ "name": "plain",
1826
+ "allowNo": false,
1827
+ "type": "boolean"
1828
+ },
1829
+ "force": {
1830
+ "char": "f",
1831
+ "description": "Overwrite existing release file",
1832
+ "name": "force",
1833
+ "allowNo": false,
1834
+ "type": "boolean"
1835
+ },
1836
+ "name": {
1837
+ "char": "n",
1838
+ "description": "Release name (used for filename). Omit along with all selection flags to launch the guided walkthrough.",
1839
+ "name": "name",
1840
+ "hasDynamicHelp": false,
1841
+ "multiple": false,
1842
+ "type": "option"
1843
+ },
1844
+ "output": {
1845
+ "char": "o",
1846
+ "description": "Output file path (overrides default release/<name>.yaml)",
1847
+ "name": "output",
1848
+ "hasDynamicHelp": false,
1849
+ "multiple": false,
1850
+ "type": "option"
1851
+ },
1852
+ "path": {
1853
+ "char": "p",
1854
+ "description": "Include only packages in this directory (and descendants)",
1855
+ "name": "path",
1856
+ "hasDynamicHelp": false,
1857
+ "multiple": false,
1858
+ "type": "option"
1859
+ },
1860
+ "ref": {
1861
+ "char": "r",
1862
+ "description": "Git ref to resolve package versions from",
1863
+ "name": "ref",
1864
+ "default": "main",
1865
+ "hasDynamicHelp": false,
1866
+ "multiple": false,
1867
+ "type": "option"
1868
+ },
1869
+ "tag": {
1870
+ "char": "t",
1871
+ "description": "Include packages carrying this tag — an sfpm package tag stored in package.json keywords (repeatable, comma-separated)",
1872
+ "name": "tag",
1873
+ "hasDynamicHelp": false,
1874
+ "multiple": true,
1875
+ "type": "option"
1876
+ }
1877
+ },
1878
+ "hasDynamicHelp": false,
1879
+ "hiddenAliases": [],
1880
+ "id": "release:create",
1881
+ "pluginAlias": "@b64hub/sfpm-cli",
1882
+ "pluginName": "@b64hub/sfpm-cli",
1883
+ "pluginType": "core",
1884
+ "strict": false,
1885
+ "enableJsonFlag": false,
1886
+ "isESM": true,
1887
+ "relativePath": [
1888
+ "dist",
1889
+ "commands",
1890
+ "release",
1891
+ "create.js"
1892
+ ]
1893
+ },
1894
+ "release:run": {
1895
+ "aliases": [],
1896
+ "args": {
1897
+ "file": {
1898
+ "description": "Path to the release YAML file",
1899
+ "name": "file",
1900
+ "required": true
1901
+ }
1902
+ },
1903
+ "description": "Run a release by installing packages from a release definition",
1904
+ "examples": [
1905
+ "<%= config.bin %> <%= command.id %> release/summer-2025.yaml -o my-sandbox",
1906
+ "<%= config.bin %> <%= command.id %> release/summer-2025.yaml -o my-sandbox --json"
1907
+ ],
1908
+ "flags": {
1909
+ "json": {
1910
+ "description": "output result as JSON",
1911
+ "exclusive": [
1912
+ "plain"
1913
+ ],
1914
+ "name": "json",
1915
+ "allowNo": false,
1916
+ "type": "boolean"
1917
+ },
1918
+ "log-level": {
1919
+ "description": "diagnostic log level",
1920
+ "env": "SFPM_LOG_LEVEL",
1921
+ "name": "log-level",
1922
+ "default": "error",
1923
+ "hasDynamicHelp": false,
1924
+ "multiple": false,
1925
+ "options": [
1926
+ "trace",
1927
+ "debug",
1928
+ "info",
1929
+ "warn",
1930
+ "error"
1931
+ ],
1932
+ "type": "option"
1933
+ },
1934
+ "plain": {
1935
+ "description": "non-interactive output (no spinners or cursor movement)",
1936
+ "exclusive": [
1937
+ "json"
1938
+ ],
1939
+ "name": "plain",
1940
+ "allowNo": false,
1941
+ "type": "boolean"
1942
+ },
1943
+ "skip-version-check": {
1944
+ "description": "Skip version mismatch checks (still validates packages are present)",
1945
+ "name": "skip-version-check",
1946
+ "allowNo": false,
1947
+ "type": "boolean"
1948
+ },
1949
+ "target-org": {
1950
+ "char": "o",
1951
+ "description": "Target org username",
1952
+ "env": "SF_TARGET_ORG",
1953
+ "name": "target-org",
1954
+ "required": true,
1955
+ "hasDynamicHelp": false,
1956
+ "multiple": false,
1957
+ "type": "option"
1958
+ }
1959
+ },
1960
+ "hasDynamicHelp": false,
1961
+ "hiddenAliases": [],
1962
+ "id": "release:run",
1963
+ "pluginAlias": "@b64hub/sfpm-cli",
1964
+ "pluginName": "@b64hub/sfpm-cli",
1965
+ "pluginType": "core",
1966
+ "strict": true,
1967
+ "enableJsonFlag": false,
1968
+ "isESM": true,
1969
+ "relativePath": [
1970
+ "dist",
1971
+ "commands",
1972
+ "release",
1973
+ "run.js"
1974
+ ]
1975
+ },
1777
1976
  "watch:cancel": {
1778
1977
  "aliases": [],
1779
1978
  "args": {
@@ -2303,5 +2502,5 @@
2303
2502
  ]
2304
2503
  }
2305
2504
  },
2306
- "version": "0.3.0"
2505
+ "version": "0.4.0"
2307
2506
  }
package/package.json CHANGED
@@ -2,14 +2,14 @@
2
2
  "name": "@b64hub/sfpm-cli",
3
3
  "description": "Salesforce package manager - CLI",
4
4
  "release": "Seedling",
5
- "version": "0.3.0",
5
+ "version": "0.4.0",
6
6
  "author": "b64",
7
7
  "bin": {
8
8
  "sfpm": "./bin/run.js"
9
9
  },
10
10
  "bugs": "https://github.com/b64hub/sfpm/issues",
11
11
  "dependencies": {
12
- "@b64hub/sfpm-core": "^0.3.0",
12
+ "@b64hub/sfpm-core": "^0.4.0",
13
13
  "@b64hub/sfpm-orgs": "^0.2.0",
14
14
  "@b64hub/sfpm-sfdmu": "^0.2.0",
15
15
  "@b64hub/sfpm-validation": "0.2.0",
@@ -75,14 +75,17 @@
75
75
  ],
76
76
  "topicSeparator": " ",
77
77
  "topics": {
78
- "install": {
79
- "description": "Install and deploy packages to environments"
80
- },
81
78
  "build": {
82
79
  "description": "Build packages and manage async validation"
83
80
  },
81
+ "install": {
82
+ "description": "Install and deploy packages to environments"
83
+ },
84
84
  "pool": {
85
85
  "description": "Manage scratch org pools"
86
+ },
87
+ "release": {
88
+ "description": "Create and run releases"
86
89
  }
87
90
  },
88
91
  "theme": "theme.json"