@git.zone/cli 9.2.2 → 10.0.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/assets/templates/asset_binary_installer/install.sh +109 -34
- package/assets/templates/asset_binary_release_gitea/.gitea/workflows/release.yml +17 -4
- package/assets/templates/ci_rust/.gitea/workflows/rust_nottags.yaml +29 -0
- package/assets/templates/ci_rust/.gitea/workflows/rust_tags.yaml +32 -0
- package/assets/templates/gitignore/_gitignore +1 -1
- package/assets/templates/gitignore_rust/_gitignore +31 -0
- package/assets/templates/license_mit/license +4 -1
- package/assets/templates/rust/.smartscaf.yml +16 -0
- package/assets/templates/rust/_Cargo.toml +12 -0
- package/assets/templates/rust/_crate_Cargo.toml +10 -0
- package/assets/templates/rust/_crate_lib.rs +19 -0
- package/assets/templates/rust/_smartconfig.json +27 -0
- package/assets/templates/rust/readme.md +23 -0
- package/dist_ts/00_commitinfo_data.js +2 -2
- package/dist_ts/classes.gitzoneconfig.d.ts +3 -1
- package/dist_ts/classes.gitzoneconfig.js +9 -1
- package/dist_ts/helpers.managedassets.d.ts +1 -1
- package/dist_ts/helpers.managedassets.js +58 -14
- package/dist_ts/helpers.releasetargets.d.ts +6 -0
- package/dist_ts/helpers.releasetargets.js +13 -0
- package/dist_ts/helpers.smartconfigmigrations.js +42 -1
- package/dist_ts/helpers.toolconfig.d.ts +50 -0
- package/dist_ts/helpers.toolconfig.js +212 -0
- package/dist_ts/helpers.tssea.d.ts +9 -2
- package/dist_ts/helpers.tssea.js +47 -17
- package/dist_ts/helpers.tstest.d.ts +27 -8
- package/dist_ts/helpers.tstest.js +64 -26
- package/dist_ts/helpers.versionsource.d.ts +37 -0
- package/dist_ts/helpers.versionsource.js +112 -0
- package/dist_ts/helpers.workflow.d.ts +45 -1
- package/dist_ts/helpers.workflow.js +120 -5
- package/dist_ts/mod_commit/mod.helpers.d.ts +0 -24
- package/dist_ts/mod_commit/mod.helpers.js +1 -94
- package/dist_ts/mod_config/index.js +131 -18
- package/dist_ts/mod_format/formatters/assets.formatter.js +29 -27
- package/dist_ts/mod_format/formatters/gitignore.formatter.d.ts +4 -2
- package/dist_ts/mod_format/formatters/gitignore.formatter.js +10 -7
- package/dist_ts/mod_format/formatters/license.formatter.d.ts +8 -0
- package/dist_ts/mod_format/formatters/license.formatter.js +25 -2
- package/dist_ts/mod_format/formatters/packagejson.formatter.js +14 -3
- package/dist_ts/mod_format/formatters/rustfmt.formatter.d.ts +19 -0
- package/dist_ts/mod_format/formatters/rustfmt.formatter.js +97 -0
- package/dist_ts/mod_format/formatters/smartconfig.formatter.js +5 -2
- package/dist_ts/mod_format/index.js +3 -1
- package/dist_ts/mod_format/interfaces.format.js +2 -1
- package/dist_ts/mod_release/classes.releasejournal.d.ts +38 -2
- package/dist_ts/mod_release/classes.releasejournal.js +238 -66
- package/dist_ts/mod_release/helpers.cargorelease.d.ts +52 -0
- package/dist_ts/mod_release/helpers.cargorelease.js +195 -0
- package/dist_ts/mod_release/helpers.npmpackages.d.ts +18 -0
- package/dist_ts/mod_release/helpers.npmpackages.js +40 -2
- package/dist_ts/mod_release/helpers.releasecheck.d.ts +73 -0
- package/dist_ts/mod_release/helpers.releasecheck.js +269 -0
- package/dist_ts/mod_release/helpers.releasepreparation.d.ts +22 -8
- package/dist_ts/mod_release/helpers.releasepreparation.js +74 -26
- package/dist_ts/mod_release/helpers.releasepublication.d.ts +21 -1
- package/dist_ts/mod_release/helpers.releasepublication.js +249 -4
- package/dist_ts/mod_release/helpers.releaseversionsource.d.ts +10 -0
- package/dist_ts/mod_release/helpers.releaseversionsource.js +18 -0
- package/dist_ts/mod_release/helpers.rsrepoengine.d.ts +192 -0
- package/dist_ts/mod_release/helpers.rsrepoengine.js +457 -0
- package/dist_ts/mod_release/index.d.ts +3 -0
- package/dist_ts/mod_release/index.js +177 -65
- package/dist_ts/mod_template/index.js +6 -2
- package/package.json +1 -1
- package/readme.md +237 -21
- package/ts/00_commitinfo_data.ts +1 -1
- package/ts/classes.gitzoneconfig.ts +10 -1
- package/ts/helpers.managedassets.ts +64 -14
- package/ts/helpers.releasetargets.ts +13 -0
- package/ts/helpers.smartconfigmigrations.ts +48 -0
- package/ts/helpers.toolconfig.ts +280 -0
- package/ts/helpers.tssea.ts +59 -16
- package/ts/helpers.tstest.ts +105 -35
- package/ts/helpers.versionsource.ts +169 -0
- package/ts/helpers.workflow.ts +197 -5
- package/ts/mod_commit/mod.helpers.ts +0 -119
- package/ts/mod_config/index.ts +169 -19
- package/ts/mod_format/formatters/assets.formatter.ts +28 -27
- package/ts/mod_format/formatters/gitignore.formatter.ts +10 -6
- package/ts/mod_format/formatters/license.formatter.ts +26 -1
- package/ts/mod_format/formatters/packagejson.formatter.ts +14 -2
- package/ts/mod_format/formatters/rustfmt.formatter.ts +107 -0
- package/ts/mod_format/formatters/smartconfig.formatter.ts +8 -1
- package/ts/mod_format/index.ts +2 -0
- package/ts/mod_format/interfaces.format.ts +1 -0
- package/ts/mod_release/classes.releasejournal.ts +312 -39
- package/ts/mod_release/helpers.cargorelease.ts +289 -0
- package/ts/mod_release/helpers.npmpackages.ts +76 -1
- package/ts/mod_release/helpers.releasecheck.ts +409 -0
- package/ts/mod_release/helpers.releasepreparation.ts +116 -36
- package/ts/mod_release/helpers.releasepublication.ts +462 -1
- package/ts/mod_release/helpers.releaseversionsource.ts +29 -0
- package/ts/mod_release/helpers.rsrepoengine.ts +790 -0
- package/ts/mod_release/index.ts +277 -84
- package/ts/mod_template/index.ts +5 -1
package/ts/mod_release/index.ts
CHANGED
|
@@ -2,7 +2,11 @@ import * as plugins from "./mod.plugins.js";
|
|
|
2
2
|
import * as paths from "../paths.js";
|
|
3
3
|
import { logger } from "../gitzone.logging.js";
|
|
4
4
|
import type { ICliMode } from "../helpers.climode.js";
|
|
5
|
-
import {
|
|
5
|
+
import {
|
|
6
|
+
getCliMode,
|
|
7
|
+
printJson,
|
|
8
|
+
runWithSuppressedOutput,
|
|
9
|
+
} from "../helpers.climode.js";
|
|
6
10
|
import { confirm } from "../helpers.prompts.js";
|
|
7
11
|
import {
|
|
8
12
|
movePendingToVersion,
|
|
@@ -18,7 +22,25 @@ import {
|
|
|
18
22
|
type IResolvedReleaseResumeConfiguration,
|
|
19
23
|
type IResolvedReleaseWorkflow,
|
|
20
24
|
} from "../helpers.workflow.js";
|
|
21
|
-
import * as commitHelpers from "../mod_commit/mod.helpers.js";
|
|
25
|
+
import type * as commitHelpers from "../mod_commit/mod.helpers.js";
|
|
26
|
+
import type { IVersionSource } from "../helpers.versionsource.js";
|
|
27
|
+
import {
|
|
28
|
+
type IRsrepoEngineClient,
|
|
29
|
+
type IRsrepoPlanResult,
|
|
30
|
+
} from "./helpers.rsrepoengine.js";
|
|
31
|
+
import {
|
|
32
|
+
assertCargoReleasePlan,
|
|
33
|
+
assertCargoVersionsUnpublished,
|
|
34
|
+
createCargoPublishCheckout,
|
|
35
|
+
describeCargoReleasePlan,
|
|
36
|
+
describeCargoReleaseRefusal,
|
|
37
|
+
describePackedCrates,
|
|
38
|
+
findCargoReleaseProblems,
|
|
39
|
+
openCargoReleaseEngine,
|
|
40
|
+
packReleaseCrates,
|
|
41
|
+
readCargoReleasePlan,
|
|
42
|
+
} from "./helpers.cargorelease.js";
|
|
43
|
+
import { openReleaseVersionSource } from "./helpers.releaseversionsource.js";
|
|
22
44
|
import { writeCommitInfoFiles } from "./helpers.commitinfo.js";
|
|
23
45
|
import {
|
|
24
46
|
inspectReleaseBranch,
|
|
@@ -40,15 +62,17 @@ import {
|
|
|
40
62
|
normalizeReleaseVersion,
|
|
41
63
|
resolveGitCommonDirectory,
|
|
42
64
|
getReleaseArtifacts,
|
|
65
|
+
getReleaseCargo,
|
|
66
|
+
getReleaseCargoRegistries,
|
|
43
67
|
hasReleasePackages,
|
|
44
68
|
isVerificationOnlyResume,
|
|
45
|
-
releasePackageArtifactFile,
|
|
46
69
|
type IReleasePackage,
|
|
47
70
|
type IReleaseArtifact,
|
|
48
71
|
type TReleaseJournal,
|
|
49
72
|
type TReleaseNpmAccess,
|
|
50
73
|
type IReleaseJournalV1,
|
|
51
74
|
type IReleaseJournalV2,
|
|
75
|
+
type IReleaseCargoJournal,
|
|
52
76
|
releaseIntentKind,
|
|
53
77
|
type IReleaseIntent,
|
|
54
78
|
type IReleaseRecordPruneReport,
|
|
@@ -76,6 +100,7 @@ import {
|
|
|
76
100
|
import {
|
|
77
101
|
describeReleaseNpmPackages,
|
|
78
102
|
getReleaseNpmPublicationOrder,
|
|
103
|
+
packReleaseNpmModules,
|
|
79
104
|
planReleaseNpmPackages,
|
|
80
105
|
} from "./helpers.npmpackages.js";
|
|
81
106
|
import {
|
|
@@ -100,7 +125,11 @@ import {
|
|
|
100
125
|
formatReleaseDuration,
|
|
101
126
|
printReleasePhase,
|
|
102
127
|
} from "./helpers.releasephase.js";
|
|
103
|
-
import {
|
|
128
|
+
import { runTestArtifactCleanup } from "../helpers.tstest.js";
|
|
129
|
+
import {
|
|
130
|
+
describeReleaseCheckReport,
|
|
131
|
+
runReleaseCheck,
|
|
132
|
+
} from "./helpers.releasecheck.js";
|
|
104
133
|
import {
|
|
105
134
|
assertPackageReleaseRecovery,
|
|
106
135
|
assertRecoveryUnpublished,
|
|
@@ -182,6 +211,10 @@ const runInternal = async (argvArg: any): Promise<void> => {
|
|
|
182
211
|
await runReleasePrune(argvArg, mode);
|
|
183
212
|
return;
|
|
184
213
|
}
|
|
214
|
+
if (subcommand === "check") {
|
|
215
|
+
await runReleaseCheckCommand(argvArg, mode);
|
|
216
|
+
return;
|
|
217
|
+
}
|
|
185
218
|
if (subcommand !== undefined) {
|
|
186
219
|
throw new Error(`Unknown release subcommand: ${subcommand}`);
|
|
187
220
|
}
|
|
@@ -226,7 +259,7 @@ const runInternal = async (argvArg: any): Promise<void> => {
|
|
|
226
259
|
pushBranch: workflow.pushBranch,
|
|
227
260
|
pushTags: workflow.pushTags,
|
|
228
261
|
mergeRequested,
|
|
229
|
-
// A detached launch checks in the foreground
|
|
262
|
+
// A detached launch runs the plan's branch checks in the foreground, and
|
|
230
263
|
// leaves every mutation to the release it starts.
|
|
231
264
|
planMode: workflow.confirmation === "plan" || detach,
|
|
232
265
|
releaseLine: workflow.line,
|
|
@@ -244,9 +277,13 @@ const runInternal = async (argvArg: any): Promise<void> => {
|
|
|
244
277
|
workflow.changelogPendingSection,
|
|
245
278
|
);
|
|
246
279
|
const versionResolution = resolveReleaseVersion({
|
|
247
|
-
currentVersion: await
|
|
248
|
-
|
|
249
|
-
|
|
280
|
+
currentVersion: await (
|
|
281
|
+
await openReleaseVersionSource(
|
|
282
|
+
smartshellInstance,
|
|
283
|
+
workflow,
|
|
284
|
+
branchContext.sourceCwd,
|
|
285
|
+
)
|
|
286
|
+
).readCurrentVersion(),
|
|
250
287
|
pendingChangelog: pending.block,
|
|
251
288
|
levelOverride: readReleaseLevelOverride(argvArg),
|
|
252
289
|
versionFloor: workflow.versionFloor,
|
|
@@ -257,12 +294,31 @@ const runInternal = async (argvArg: any): Promise<void> => {
|
|
|
257
294
|
versionResolution.currentVersion,
|
|
258
295
|
versionResolution.version,
|
|
259
296
|
);
|
|
297
|
+
const cargoEngine = workflow.cargo
|
|
298
|
+
? await openCargoReleaseEngine(smartshellInstance, branchContext.sourceCwd)
|
|
299
|
+
: undefined;
|
|
300
|
+
const cargoPlan =
|
|
301
|
+
workflow.cargo && cargoEngine
|
|
302
|
+
? await readCargoReleasePlan(
|
|
303
|
+
cargoEngine,
|
|
304
|
+
branchContext.sourceCwd,
|
|
305
|
+
workflow.cargo,
|
|
306
|
+
)
|
|
307
|
+
: undefined;
|
|
260
308
|
await printReleasePlan(
|
|
261
309
|
smartshellInstance,
|
|
262
310
|
workflow,
|
|
263
311
|
branchContext,
|
|
264
312
|
versionResolution,
|
|
313
|
+
cargoPlan,
|
|
265
314
|
);
|
|
315
|
+
// The plan refuses what `assertCargoReleasePlan` refuses before a release
|
|
316
|
+
// creates anything.
|
|
317
|
+
if (workflow.confirmation === "plan" && workflow.cargo && cargoPlan) {
|
|
318
|
+
const problems = findCargoReleaseProblems(cargoPlan, workflow.cargo);
|
|
319
|
+
if (problems.length > 0)
|
|
320
|
+
throw new Error(describeCargoReleaseRefusal(problems.length));
|
|
321
|
+
}
|
|
266
322
|
if (workflow.confirmation === "plan") {
|
|
267
323
|
return;
|
|
268
324
|
}
|
|
@@ -309,6 +365,15 @@ const runInternal = async (argvArg: any): Promise<void> => {
|
|
|
309
365
|
nextStep: "release again",
|
|
310
366
|
});
|
|
311
367
|
}
|
|
368
|
+
if (workflow.cargo && cargoEngine && cargoPlan) {
|
|
369
|
+
assertCargoReleasePlan(cargoPlan, workflow.cargo);
|
|
370
|
+
await assertCargoVersionsUnpublished(
|
|
371
|
+
cargoEngine,
|
|
372
|
+
cargoPlan,
|
|
373
|
+
workflow.cargo,
|
|
374
|
+
newVersion,
|
|
375
|
+
);
|
|
376
|
+
}
|
|
312
377
|
if (workflow.giteaAssets) {
|
|
313
378
|
const { tokenEnv, manifestPath, ...destination } = workflow.giteaAssets;
|
|
314
379
|
const token = process.env[tokenEnv];
|
|
@@ -342,6 +407,7 @@ const runInternal = async (argvArg: any): Promise<void> => {
|
|
|
342
407
|
smartshell: smartshellInstance,
|
|
343
408
|
cwd: branchContext.sourceCwd,
|
|
344
409
|
sourceOid: branchContext.sourceOid,
|
|
410
|
+
cargo: workflow.cargoVersioned,
|
|
345
411
|
});
|
|
346
412
|
}
|
|
347
413
|
|
|
@@ -390,7 +456,10 @@ const runInternal = async (argvArg: any): Promise<void> => {
|
|
|
390
456
|
expectedRemoteMainOid = integration.expectedRemoteMainOid;
|
|
391
457
|
}
|
|
392
458
|
|
|
393
|
-
await runVersionStep(
|
|
459
|
+
await runVersionStep(
|
|
460
|
+
await openReleaseVersionSource(smartshellInstance, workflow, releaseCwd),
|
|
461
|
+
versionResolution,
|
|
462
|
+
);
|
|
394
463
|
await runChangelogStep(workflow, newVersion, releaseCwd);
|
|
395
464
|
const releaseCommitOid = await runReleaseCommitStep(
|
|
396
465
|
smartshellInstance,
|
|
@@ -480,6 +549,13 @@ const runInternal = async (argvArg: any): Promise<void> => {
|
|
|
480
549
|
giteaAssetConcurrency: workflow.giteaAssetConcurrency,
|
|
481
550
|
gitRemotePolicy: branchContext.gitRemotePolicy,
|
|
482
551
|
tsdocker: journalContext.tsdocker,
|
|
552
|
+
...cargoPublicationOptions(
|
|
553
|
+
smartshellInstance,
|
|
554
|
+
releaseCwd,
|
|
555
|
+
releaseRefs.mainOid,
|
|
556
|
+
journalContext.cargoEngine,
|
|
557
|
+
workflow.cargo?.verificationWindowMinutes,
|
|
558
|
+
),
|
|
483
559
|
ensurePublicationState,
|
|
484
560
|
},
|
|
485
561
|
workflow.recordRetention,
|
|
@@ -574,7 +650,7 @@ export const cleanTestArtifactsForCompletedRelease = async (
|
|
|
574
650
|
cleanRequestedArg: boolean,
|
|
575
651
|
): Promise<void> => {
|
|
576
652
|
if (!cleanRequestedArg || journalArg.completedAt === null) return;
|
|
577
|
-
await
|
|
653
|
+
await runTestArtifactCleanup(smartshellArg, cwdArg);
|
|
578
654
|
};
|
|
579
655
|
|
|
580
656
|
const assertFreshReleaseCapabilities = async (
|
|
@@ -729,6 +805,8 @@ interface ICreateReleaseJournalOptions {
|
|
|
729
805
|
refs: IReleaseRefs;
|
|
730
806
|
dockerRequest?: IReleaseQualificationRequest;
|
|
731
807
|
tsdocker?: ITsdockerReleaseClient;
|
|
808
|
+
/** The engine that packs the release commit's crates, when cargo is a target. */
|
|
809
|
+
cargoEngine?: IRsrepoEngineClient;
|
|
732
810
|
ensurePublicationState: (expectedRemoteMainOidArg?: string) => Promise<void>;
|
|
733
811
|
}
|
|
734
812
|
|
|
@@ -818,6 +896,7 @@ type TPrepareTaggedReleaseOptions = Omit<
|
|
|
818
896
|
| "npmPreparationDirectory"
|
|
819
897
|
| "dockerRequest"
|
|
820
898
|
| "tsdocker"
|
|
899
|
+
| "cargoEngine"
|
|
821
900
|
| "ensurePublicationState"
|
|
822
901
|
> & {
|
|
823
902
|
ensurePublicationState: () => Promise<void>;
|
|
@@ -827,8 +906,37 @@ interface IPreparedTaggedRelease {
|
|
|
827
906
|
store: ReleaseJournalStore;
|
|
828
907
|
journal: TReleaseJournal;
|
|
829
908
|
tsdocker?: ITsdockerReleaseClient;
|
|
909
|
+
cargoEngine?: IRsrepoEngineClient;
|
|
830
910
|
}
|
|
831
911
|
|
|
912
|
+
/**
|
|
913
|
+
* What publication needs for a journal with crates: the engine, the index
|
|
914
|
+
* wait, and checkouts of the release commit to run `cargo publish` in.
|
|
915
|
+
*/
|
|
916
|
+
const cargoPublicationOptions = (
|
|
917
|
+
smartshellArg: plugins.smartshell.Smartshell,
|
|
918
|
+
repositoryCwdArg: string,
|
|
919
|
+
mainOidArg: string,
|
|
920
|
+
engineArg: IRsrepoEngineClient | undefined,
|
|
921
|
+
verificationWindowMinutesArg: number | undefined,
|
|
922
|
+
): Pick<
|
|
923
|
+
IReleasePublicationOptions,
|
|
924
|
+
"cargoEngine" | "cargoVerificationWindowMs" | "withCargoPublishCheckout"
|
|
925
|
+
> =>
|
|
926
|
+
engineArg
|
|
927
|
+
? {
|
|
928
|
+
cargoEngine: engineArg,
|
|
929
|
+
...(verificationWindowMinutesArg !== undefined
|
|
930
|
+
? { cargoVerificationWindowMs: verificationWindowMinutesArg * 60_000 }
|
|
931
|
+
: {}),
|
|
932
|
+
withCargoPublishCheckout: createCargoPublishCheckout(
|
|
933
|
+
smartshellArg,
|
|
934
|
+
repositoryCwdArg,
|
|
935
|
+
mainOidArg,
|
|
936
|
+
),
|
|
937
|
+
}
|
|
938
|
+
: {};
|
|
939
|
+
|
|
832
940
|
/**
|
|
833
941
|
* Everything between the release tag and the installed journal: the Docker
|
|
834
942
|
* worktree build, the isolated build and pack, and the journal itself. A fresh
|
|
@@ -861,8 +969,12 @@ const prepareTaggedRelease = async (
|
|
|
861
969
|
await tsdocker?.assertCapabilities(
|
|
862
970
|
getReleaseDockerAliasPolicy(workflow.line),
|
|
863
971
|
);
|
|
972
|
+
const cargoEngine = workflow.cargo
|
|
973
|
+
? await openCargoReleaseEngine(smartshell, releaseCwd)
|
|
974
|
+
: undefined;
|
|
864
975
|
const journalOptions: ICreateReleaseJournalOptions = {
|
|
865
976
|
...optionsArg,
|
|
977
|
+
cargoEngine,
|
|
866
978
|
dockerRequest: tsdocker
|
|
867
979
|
? createDockerQualificationRequest(
|
|
868
980
|
workflow,
|
|
@@ -883,6 +995,7 @@ const prepareTaggedRelease = async (
|
|
|
883
995
|
mainOid: optionsArg.refs.mainOid,
|
|
884
996
|
// Preflight already ran the configured tests on this exact source.
|
|
885
997
|
...(workflow.runBuild ? { buildCommand: workflow.buildCommand } : {}),
|
|
998
|
+
cargo: workflow.cargoVersioned,
|
|
886
999
|
},
|
|
887
1000
|
async (checkout) =>
|
|
888
1001
|
createReleaseJournal({
|
|
@@ -896,7 +1009,7 @@ const prepareTaggedRelease = async (
|
|
|
896
1009
|
}),
|
|
897
1010
|
)
|
|
898
1011
|
: await createReleaseJournal(journalOptions);
|
|
899
|
-
return { ...prepared, tsdocker };
|
|
1012
|
+
return { ...prepared, tsdocker, cargoEngine };
|
|
900
1013
|
};
|
|
901
1014
|
|
|
902
1015
|
/**
|
|
@@ -1032,66 +1145,6 @@ const prepareRecordedRelease = async (
|
|
|
1032
1145
|
}
|
|
1033
1146
|
};
|
|
1034
1147
|
|
|
1035
|
-
/**
|
|
1036
|
-
* tspublish materializes the already built modules outside every repository,
|
|
1037
|
-
* so each package is packed from its own generated manifest and nothing else.
|
|
1038
|
-
*/
|
|
1039
|
-
const packReleaseModules = async (
|
|
1040
|
-
optionsArg: ICreateReleaseJournalOptions,
|
|
1041
|
-
sourceCwdArg: string,
|
|
1042
|
-
planArg: plugins.tspublish.ITsPublishPlan,
|
|
1043
|
-
artifactDirectoryArg: string,
|
|
1044
|
-
): Promise<IReleasePackage[]> => {
|
|
1045
|
-
const preparationDirectory = optionsArg.npmPreparationDirectory;
|
|
1046
|
-
if (!preparationDirectory) {
|
|
1047
|
-
throw new Error(
|
|
1048
|
-
"createReleaseJournal requires npmPreparationDirectory when tspublish modules are present.",
|
|
1049
|
-
);
|
|
1050
|
-
}
|
|
1051
|
-
// The directory is removed afterwards, so it must be one this call creates.
|
|
1052
|
-
const preparationDirectoryExists = await plugins.fs
|
|
1053
|
-
.lstat(preparationDirectory)
|
|
1054
|
-
.then(() => true)
|
|
1055
|
-
.catch((error: NodeJS.ErrnoException) => {
|
|
1056
|
-
if (error.code === "ENOENT") return false;
|
|
1057
|
-
throw error;
|
|
1058
|
-
});
|
|
1059
|
-
if (preparationDirectoryExists) {
|
|
1060
|
-
throw new Error(
|
|
1061
|
-
"createReleaseJournal requires an absent npmPreparationDirectory, because it removes that directory after packing.",
|
|
1062
|
-
);
|
|
1063
|
-
}
|
|
1064
|
-
try {
|
|
1065
|
-
const prepared = await new plugins.tspublish.TsPublish().prepare(
|
|
1066
|
-
sourceCwdArg,
|
|
1067
|
-
preparationDirectory,
|
|
1068
|
-
);
|
|
1069
|
-
if (
|
|
1070
|
-
JSON.stringify(prepared.map(({ directory, ...module }) => module)) !==
|
|
1071
|
-
JSON.stringify(planArg.modules)
|
|
1072
|
-
) {
|
|
1073
|
-
throw new Error("tspublish package plan changed during preparation.");
|
|
1074
|
-
}
|
|
1075
|
-
const packages: IReleasePackage[] = [];
|
|
1076
|
-
for (const module of prepared) {
|
|
1077
|
-
const packed = await packNpmArtifact(
|
|
1078
|
-
optionsArg.smartshell,
|
|
1079
|
-
module.directory,
|
|
1080
|
-
artifactDirectoryArg,
|
|
1081
|
-
optionsArg.version,
|
|
1082
|
-
optionsArg.pnpmCapability,
|
|
1083
|
-
releasePackageArtifactFile(module.name),
|
|
1084
|
-
);
|
|
1085
|
-
if (packed.packageName !== module.name)
|
|
1086
|
-
throw new Error("Prepared package identity changed during packing.");
|
|
1087
|
-
packages.push({ folder: module.folder, artifact: packed });
|
|
1088
|
-
}
|
|
1089
|
-
return packages;
|
|
1090
|
-
} finally {
|
|
1091
|
-
await plugins.fs.rm(preparationDirectory, { recursive: true, force: true });
|
|
1092
|
-
}
|
|
1093
|
-
};
|
|
1094
|
-
|
|
1095
1148
|
export const createReleaseJournal = async (
|
|
1096
1149
|
optionsArg: ICreateReleaseJournalOptions,
|
|
1097
1150
|
): Promise<{ store: ReleaseJournalStore; journal: TReleaseJournal }> => {
|
|
@@ -1134,9 +1187,19 @@ export const createReleaseJournal = async (
|
|
|
1134
1187
|
if (plan.version !== optionsArg.version)
|
|
1135
1188
|
throw new Error("tspublish plan version differs from the release.");
|
|
1136
1189
|
if (plan.modules.length > 0) {
|
|
1190
|
+
if (!optionsArg.npmPreparationDirectory) {
|
|
1191
|
+
throw new Error(
|
|
1192
|
+
"createReleaseJournal requires npmPreparationDirectory when tspublish modules are present.",
|
|
1193
|
+
);
|
|
1194
|
+
}
|
|
1137
1195
|
packages.push(
|
|
1138
|
-
...(await
|
|
1139
|
-
|
|
1196
|
+
...(await packReleaseNpmModules(
|
|
1197
|
+
{
|
|
1198
|
+
smartshell: optionsArg.smartshell,
|
|
1199
|
+
preparationDirectory: optionsArg.npmPreparationDirectory,
|
|
1200
|
+
version: optionsArg.version,
|
|
1201
|
+
pnpmCapability: optionsArg.pnpmCapability,
|
|
1202
|
+
},
|
|
1140
1203
|
npmSourceCwd,
|
|
1141
1204
|
plan,
|
|
1142
1205
|
temporaryDirectory,
|
|
@@ -1169,6 +1232,30 @@ export const createReleaseJournal = async (
|
|
|
1169
1232
|
await optionsArg.ensurePublicationState();
|
|
1170
1233
|
}
|
|
1171
1234
|
|
|
1235
|
+
let cargo: IReleaseCargoJournal | undefined;
|
|
1236
|
+
if (optionsArg.workflow.targets.includes("cargo")) {
|
|
1237
|
+
if (!optionsArg.workflow.cargo || !optionsArg.cargoEngine)
|
|
1238
|
+
throw new Error(
|
|
1239
|
+
"createReleaseJournal requires the cargo configuration and the rsrepo engine when cargo is a target.",
|
|
1240
|
+
);
|
|
1241
|
+
printReleasePhase("Packing the release crates");
|
|
1242
|
+
const crates = await packReleaseCrates({
|
|
1243
|
+
engine: optionsArg.cargoEngine,
|
|
1244
|
+
checkoutCwd: npmSourceCwd,
|
|
1245
|
+
artifactDirectory: temporaryDirectory,
|
|
1246
|
+
cargo: optionsArg.workflow.cargo,
|
|
1247
|
+
version: optionsArg.version,
|
|
1248
|
+
});
|
|
1249
|
+
for (const line of describePackedCrates(crates.packed)) console.log(line);
|
|
1250
|
+
cargo = crates.journal;
|
|
1251
|
+
await verifyCleanTree(
|
|
1252
|
+
optionsArg.smartshell,
|
|
1253
|
+
npmSourceCwd,
|
|
1254
|
+
"Packing the crates changed the release worktree. Aborting release.",
|
|
1255
|
+
);
|
|
1256
|
+
await optionsArg.ensurePublicationState();
|
|
1257
|
+
}
|
|
1258
|
+
|
|
1172
1259
|
const gitEnabled = optionsArg.workflow.targets.includes("git");
|
|
1173
1260
|
if (
|
|
1174
1261
|
gitEnabled &&
|
|
@@ -1287,6 +1374,7 @@ export const createReleaseJournal = async (
|
|
|
1287
1374
|
})
|
|
1288
1375
|
: [],
|
|
1289
1376
|
},
|
|
1377
|
+
...(cargo ? { cargo } : {}),
|
|
1290
1378
|
...(giteaAssets ? { giteaAssets } : {}),
|
|
1291
1379
|
...(optionsArg.dockerRequest
|
|
1292
1380
|
? {
|
|
@@ -1389,6 +1477,50 @@ const runReleaseInspect = async (
|
|
|
1389
1477
|
}
|
|
1390
1478
|
};
|
|
1391
1479
|
|
|
1480
|
+
/**
|
|
1481
|
+
* `gitzone release check`: builds and packs HEAD in a disposable checkout like
|
|
1482
|
+
* a release, prints what each artifact carries and every problem, and exits
|
|
1483
|
+
* non-zero on a problem. Nothing is versioned, committed, tagged, journaled or
|
|
1484
|
+
* published, and the checkout and the artifacts are removed again.
|
|
1485
|
+
*/
|
|
1486
|
+
const runReleaseCheckCommand = async (
|
|
1487
|
+
argvArg: any,
|
|
1488
|
+
modeArg: ICliMode,
|
|
1489
|
+
): Promise<void> => {
|
|
1490
|
+
if (argvArg._?.length > 2) {
|
|
1491
|
+
throw new Error("Usage: gitzone release check [--target <names>] [--no-build] [--json]");
|
|
1492
|
+
}
|
|
1493
|
+
for (const flag of ["plan", "merge", "detach"] as const) {
|
|
1494
|
+
if (argvArg[flag] !== undefined)
|
|
1495
|
+
throw new Error(
|
|
1496
|
+
`gitzone release check is read-only and takes no --${flag}.`,
|
|
1497
|
+
);
|
|
1498
|
+
}
|
|
1499
|
+
const smartshellInstance = new plugins.smartshell.Smartshell({
|
|
1500
|
+
executor: "bash",
|
|
1501
|
+
sourceFilePaths: [],
|
|
1502
|
+
});
|
|
1503
|
+
// The workflow resolves exactly as for `gitzone release --plan`.
|
|
1504
|
+
const workflow = await resolveReleaseWorkflow({ ...argvArg, plan: true });
|
|
1505
|
+
assertReleaseConfiguration(workflow, false);
|
|
1506
|
+
const check = () =>
|
|
1507
|
+
runReleaseCheck({
|
|
1508
|
+
smartshell: smartshellInstance,
|
|
1509
|
+
cwd: paths.cwd,
|
|
1510
|
+
workflow,
|
|
1511
|
+
log: (lineArg) => console.log(lineArg),
|
|
1512
|
+
});
|
|
1513
|
+
const report = modeArg.json
|
|
1514
|
+
? await runWithSuppressedOutput(check)
|
|
1515
|
+
: await check();
|
|
1516
|
+
if (modeArg.json) {
|
|
1517
|
+
printJson(report);
|
|
1518
|
+
} else {
|
|
1519
|
+
for (const line of describeReleaseCheckReport(report)) console.log(line);
|
|
1520
|
+
}
|
|
1521
|
+
if (!report.ok) process.exitCode = 1;
|
|
1522
|
+
};
|
|
1523
|
+
|
|
1392
1524
|
/**
|
|
1393
1525
|
* Applies record retention on demand, through the same store method a
|
|
1394
1526
|
* completed release uses. Without `--apply` it only reports.
|
|
@@ -1585,6 +1717,13 @@ const runReleaseRecover = async (
|
|
|
1585
1717
|
`gitzone release recover does not support release lines: a ${workflow.line.distTag} release records its intent, so continue it with \`gitzone release resume <version> -y\`.`,
|
|
1586
1718
|
);
|
|
1587
1719
|
}
|
|
1720
|
+
// Every gitzone that publishes crates records the release intent first, so a
|
|
1721
|
+
// tag without one predates cargo publication.
|
|
1722
|
+
if (workflow.targets.includes("cargo")) {
|
|
1723
|
+
throw new Error(
|
|
1724
|
+
"gitzone release recover does not support the cargo target: a cargo release records its intent, so continue it with `gitzone release resume <version> -y`.",
|
|
1725
|
+
);
|
|
1726
|
+
}
|
|
1588
1727
|
let branch = await inspectReleaseBranch({
|
|
1589
1728
|
smartshell: shell,
|
|
1590
1729
|
cwd: paths.cwd,
|
|
@@ -1728,6 +1867,7 @@ const assertResumeArguments = (argvArg: any): void => {
|
|
|
1728
1867
|
"allowEmpty",
|
|
1729
1868
|
"b",
|
|
1730
1869
|
"build",
|
|
1870
|
+
"cargo",
|
|
1731
1871
|
"docker",
|
|
1732
1872
|
"git",
|
|
1733
1873
|
"major",
|
|
@@ -1859,10 +1999,12 @@ const runReleaseResumeFromStore = async (optionsArg: {
|
|
|
1859
1999
|
`Release v${version} is complete and record retention removed its local artifacts; there is nothing left to resume. \`gitzone release inspect ${version}\` shows its journal.`,
|
|
1860
2000
|
);
|
|
1861
2001
|
const gitEnabled = journal.git.state !== "skipped";
|
|
2002
|
+
const journalCargo = getReleaseCargo(journal);
|
|
1862
2003
|
const resumeConfiguration = await resolveReleaseResumeConfiguration({
|
|
1863
2004
|
git: gitEnabled,
|
|
1864
2005
|
npm: journal.npm.registries.length > 0,
|
|
1865
2006
|
giteaAssets: journal.schemaVersion === 4,
|
|
2007
|
+
cargo: journalCargo !== undefined,
|
|
1866
2008
|
});
|
|
1867
2009
|
await assertResumeConfiguration(resumeConfiguration, journal, paths.cwd);
|
|
1868
2010
|
let tsdocker: ITsdockerReleaseClient | undefined;
|
|
@@ -1956,6 +2098,11 @@ const runReleaseResumeFromStore = async (optionsArg: {
|
|
|
1956
2098
|
) {
|
|
1957
2099
|
throw new Error("The Git push destination changed after journal creation.");
|
|
1958
2100
|
}
|
|
2101
|
+
// A completed journal only re-verifies what it recorded; it needs no engine.
|
|
2102
|
+
const cargoEngine =
|
|
2103
|
+
journalCargo && journal.completedAt === null
|
|
2104
|
+
? await openCargoReleaseEngine(smartshellInstance, paths.cwd)
|
|
2105
|
+
: undefined;
|
|
1959
2106
|
|
|
1960
2107
|
if (
|
|
1961
2108
|
!preparesRecordedRelease &&
|
|
@@ -2005,6 +2152,13 @@ const runReleaseResumeFromStore = async (optionsArg: {
|
|
|
2005
2152
|
giteaAssetConcurrency: resumeConfiguration.giteaAssetConcurrency,
|
|
2006
2153
|
gitRemotePolicy: branchContext.gitRemotePolicy,
|
|
2007
2154
|
tsdocker,
|
|
2155
|
+
...cargoPublicationOptions(
|
|
2156
|
+
smartshellInstance,
|
|
2157
|
+
paths.cwd,
|
|
2158
|
+
journal.release.mainOid,
|
|
2159
|
+
cargoEngine,
|
|
2160
|
+
resumeConfiguration.cargo?.verificationWindowMinutes,
|
|
2161
|
+
),
|
|
2008
2162
|
ensurePublicationState,
|
|
2009
2163
|
});
|
|
2010
2164
|
await pruneCompletedReleaseRecords(
|
|
@@ -2082,6 +2236,16 @@ const assertResumeConfiguration = async (
|
|
|
2082
2236
|
"Current npm release configuration does not match the journal.",
|
|
2083
2237
|
);
|
|
2084
2238
|
}
|
|
2239
|
+
const cargo = getReleaseCargo(journalArg);
|
|
2240
|
+
if (
|
|
2241
|
+
cargo &&
|
|
2242
|
+
JSON.stringify(workflowArg.cargo?.registries) !==
|
|
2243
|
+
JSON.stringify(getReleaseCargoRegistries(cargo))
|
|
2244
|
+
) {
|
|
2245
|
+
throw new Error(
|
|
2246
|
+
"Current cargo release registries do not match the journal.",
|
|
2247
|
+
);
|
|
2248
|
+
}
|
|
2085
2249
|
if (journalArg.schemaVersion === 4) {
|
|
2086
2250
|
const { destination, tokenEnv, manifestPath } = journalArg.giteaAssets;
|
|
2087
2251
|
if (
|
|
@@ -2140,6 +2304,13 @@ const printReleaseJournalSummary = (journalArg: TReleaseJournal): void => {
|
|
|
2140
2304
|
`artifact ${artifact.packageName}: ${artifact.integrity} (${artifact.sha256})`,
|
|
2141
2305
|
);
|
|
2142
2306
|
}
|
|
2307
|
+
const cargo = getReleaseCargo(journalArg);
|
|
2308
|
+
for (const crate of cargo?.crates ?? []) {
|
|
2309
|
+
console.log(`crate ${crate.crateName}: sha256 ${crate.sha256}`);
|
|
2310
|
+
}
|
|
2311
|
+
for (const cell of cargo?.registries ?? []) {
|
|
2312
|
+
console.log(`cargo ${cell.crate} ${cell.registry}: ${cell.state}`);
|
|
2313
|
+
}
|
|
2143
2314
|
if (journalArg.schemaVersion === 4) {
|
|
2144
2315
|
console.log(`Gitea release: ${journalArg.giteaAssets.release.state}`);
|
|
2145
2316
|
for (const entry of journalArg.giteaAssets.assets)
|
|
@@ -2252,18 +2423,19 @@ async function verifyCleanTree(
|
|
|
2252
2423
|
}
|
|
2253
2424
|
|
|
2254
2425
|
async function runVersionStep(
|
|
2426
|
+
versionSourceArg: IVersionSource,
|
|
2255
2427
|
resolutionArg: IReleaseVersionResolution,
|
|
2256
|
-
cwdArg: string,
|
|
2257
2428
|
): Promise<void> {
|
|
2258
|
-
const currentVersion = await
|
|
2429
|
+
const currentVersion = await versionSourceArg.readCurrentVersion();
|
|
2259
2430
|
assertResolvedCurrentVersion(resolutionArg, currentVersion);
|
|
2260
2431
|
logger.log(
|
|
2261
2432
|
"info",
|
|
2262
|
-
`Bumping version: ${currentVersion} -> ${resolutionArg.version}`,
|
|
2433
|
+
`Bumping version (${versionSourceArg.description}): ${currentVersion} -> ${resolutionArg.version}`,
|
|
2263
2434
|
);
|
|
2264
2435
|
|
|
2265
|
-
|
|
2266
|
-
|
|
2436
|
+
if (versionSourceArg.bakesCommitInfo)
|
|
2437
|
+
await writeCommitInfoFiles(versionSourceArg.cwd, resolutionArg.version);
|
|
2438
|
+
await versionSourceArg.writeVersion(resolutionArg.version);
|
|
2267
2439
|
}
|
|
2268
2440
|
|
|
2269
2441
|
async function runChangelogStep(
|
|
@@ -2712,6 +2884,7 @@ async function printReleasePlan(
|
|
|
2712
2884
|
workflow: IResolvedReleaseWorkflow,
|
|
2713
2885
|
branchContextArg: IReleaseBranchContext,
|
|
2714
2886
|
versionResolutionArg: IReleaseVersionResolution,
|
|
2887
|
+
cargoPlanArg?: IRsrepoPlanResult,
|
|
2715
2888
|
): Promise<void> {
|
|
2716
2889
|
console.log("");
|
|
2717
2890
|
console.log("gitzone release - resolved workflow");
|
|
@@ -2769,6 +2942,10 @@ async function printReleasePlan(
|
|
|
2769
2942
|
for (const line of describeReleaseNpmPackages(workflow.npmPackages))
|
|
2770
2943
|
console.log(line);
|
|
2771
2944
|
}
|
|
2945
|
+
if (workflow.cargo && cargoPlanArg) {
|
|
2946
|
+
for (const line of describeCargoReleasePlan(cargoPlanArg, workflow.cargo))
|
|
2947
|
+
console.log(line);
|
|
2948
|
+
}
|
|
2772
2949
|
if (workflow.giteaAssets) {
|
|
2773
2950
|
const assets = workflow.giteaAssets;
|
|
2774
2951
|
console.log(
|
|
@@ -2825,7 +3002,7 @@ export function showHelp(mode?: ICliMode): void {
|
|
|
2825
3002
|
printJson({
|
|
2826
3003
|
command: "release",
|
|
2827
3004
|
usage:
|
|
2828
|
-
"gitzone release [inspect [version]|resume <version>|recover <version>|prune] [options]",
|
|
3005
|
+
"gitzone release [check|inspect [version]|resume <version>|recover <version>|prune] [options]",
|
|
2829
3006
|
description:
|
|
2830
3007
|
"Creates a versioned release from pending changelog entries and publishes configured artifacts.",
|
|
2831
3008
|
flags: [
|
|
@@ -2847,9 +3024,14 @@ export function showHelp(mode?: ICliMode): void {
|
|
|
2847
3024
|
{
|
|
2848
3025
|
flag: "--target <names>",
|
|
2849
3026
|
description:
|
|
2850
|
-
"Replace configured targets with a non-empty subset of git,giteaAssets,npm,docker",
|
|
3027
|
+
"Replace configured targets with a non-empty subset of git,giteaAssets,npm,cargo,docker",
|
|
2851
3028
|
},
|
|
2852
3029
|
{ flag: "--npm", description: "Explicitly select the npm target" },
|
|
3030
|
+
{
|
|
3031
|
+
flag: "--cargo",
|
|
3032
|
+
description:
|
|
3033
|
+
"Select the cargo target: crates in dependency order through the rsrepo engine",
|
|
3034
|
+
},
|
|
2853
3035
|
{
|
|
2854
3036
|
flag: "--docker",
|
|
2855
3037
|
description:
|
|
@@ -2858,7 +3040,7 @@ export function showHelp(mode?: ICliMode): void {
|
|
|
2858
3040
|
{
|
|
2859
3041
|
flag: "--no-publish",
|
|
2860
3042
|
description:
|
|
2861
|
-
"Remove Gitea assets, npm and Docker without implicitly enabling Git",
|
|
3043
|
+
"Remove Gitea assets, npm, cargo and Docker without implicitly enabling Git",
|
|
2862
3044
|
},
|
|
2863
3045
|
{
|
|
2864
3046
|
flag: "--merge",
|
|
@@ -2870,6 +3052,11 @@ export function showHelp(mode?: ICliMode): void {
|
|
|
2870
3052
|
description:
|
|
2871
3053
|
"Show the workflow without fetching or mutating refs, files, the index, or worktrees",
|
|
2872
3054
|
},
|
|
3055
|
+
{
|
|
3056
|
+
flag: "check [--json]",
|
|
3057
|
+
description:
|
|
3058
|
+
"Build and pack HEAD of a clean tree in a disposable checkout like a release (npm tarballs with their checks, crates through rsrepo), print the contents and every problem, remove everything, and exit non-zero on a problem; never versions, commits, tags, journals or publishes",
|
|
3059
|
+
},
|
|
2873
3060
|
{
|
|
2874
3061
|
flag: "inspect [version]",
|
|
2875
3062
|
description:
|
|
@@ -2907,7 +3094,7 @@ export function showHelp(mode?: ICliMode): void {
|
|
|
2907
3094
|
|
|
2908
3095
|
console.log("");
|
|
2909
3096
|
console.log(
|
|
2910
|
-
"Usage: gitzone release [inspect [version]|resume <version>|recover <version>|prune] [options]",
|
|
3097
|
+
"Usage: gitzone release [check|inspect [version]|resume <version>|recover <version>|prune] [options]",
|
|
2911
3098
|
);
|
|
2912
3099
|
console.log("");
|
|
2913
3100
|
console.log("Creates a versioned release from changelog Pending entries.");
|
|
@@ -2921,14 +3108,17 @@ export function showHelp(mode?: ICliMode): void {
|
|
|
2921
3108
|
console.log(" --no-build Disable the post-metadata release build");
|
|
2922
3109
|
console.log(" -p, --push Explicitly select the git target");
|
|
2923
3110
|
console.log(
|
|
2924
|
-
" --target <names> Replace configured targets with a non-empty subset of git,giteaAssets,npm,docker",
|
|
3111
|
+
" --target <names> Replace configured targets with a non-empty subset of git,giteaAssets,npm,cargo,docker",
|
|
2925
3112
|
);
|
|
2926
3113
|
console.log(" --npm Explicitly select the npm target");
|
|
3114
|
+
console.log(
|
|
3115
|
+
" --cargo Select the cargo target: crates in dependency order through rsrepo",
|
|
3116
|
+
);
|
|
2927
3117
|
console.log(
|
|
2928
3118
|
" --docker Select digest-qualified Docker publication through project-local tSDocker >= 3.5.1",
|
|
2929
3119
|
);
|
|
2930
3120
|
console.log(
|
|
2931
|
-
" --no-publish Remove Gitea assets, npm and Docker without implicitly enabling Git",
|
|
3121
|
+
" --no-publish Remove Gitea assets, npm, cargo and Docker without implicitly enabling Git",
|
|
2932
3122
|
);
|
|
2933
3123
|
console.log(
|
|
2934
3124
|
" --merge Fast-forward and lease-push a cleanly rebased feature branch before release metadata",
|
|
@@ -2939,6 +3129,9 @@ export function showHelp(mode?: ICliMode): void {
|
|
|
2939
3129
|
console.log(
|
|
2940
3130
|
" --plan Show workflow without fetching or mutating refs, files, index, or worktrees",
|
|
2941
3131
|
);
|
|
3132
|
+
console.log(
|
|
3133
|
+
" check [--json] Build and pack HEAD in a disposable checkout, print contents and problems; publishes nothing",
|
|
3134
|
+
);
|
|
2942
3135
|
console.log(
|
|
2943
3136
|
" inspect [version] Read one or all durable release journals without mutation",
|
|
2944
3137
|
);
|
package/ts/mod_template/index.ts
CHANGED
|
@@ -22,6 +22,10 @@ export const getTemplate = async (templateNameArg: string) => {
|
|
|
22
22
|
getTemplatePath(templateNameArg),
|
|
23
23
|
);
|
|
24
24
|
await localScafTemplate.readTemplateFromDir();
|
|
25
|
+
// The license template dates its copyright.
|
|
26
|
+
await localScafTemplate.supplyVariables({
|
|
27
|
+
date: { year: String(new Date().getFullYear()) },
|
|
28
|
+
});
|
|
25
29
|
return localScafTemplate;
|
|
26
30
|
} else {
|
|
27
31
|
return null;
|
|
@@ -38,7 +42,7 @@ export const run = async (argvArg: any) => {
|
|
|
38
42
|
message:
|
|
39
43
|
'What template do you want to scaffold? (Only showing mpost common options)',
|
|
40
44
|
name: 'templateName',
|
|
41
|
-
choices: stringChoices(['npm', 'service', 'wcc', 'website']),
|
|
45
|
+
choices: stringChoices(['npm', 'service', 'wcc', 'website', 'rust']),
|
|
42
46
|
}, answerDefaultsWithoutTerminal);
|
|
43
47
|
}
|
|
44
48
|
|