@git.zone/cli 6.11.0 → 6.13.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (41) hide show
  1. package/dist_ts/00_commitinfo_data.js +1 -1
  2. package/dist_ts/gitzone.cli.js +6 -1
  3. package/dist_ts/helpers.changelog.d.ts +4 -0
  4. package/dist_ts/helpers.changelog.js +73 -24
  5. package/dist_ts/helpers.climode.js +47 -3
  6. package/dist_ts/helpers.workflow.d.ts +2 -2
  7. package/dist_ts/helpers.workflow.js +42 -6
  8. package/dist_ts/mod_commit/helpers.manual.d.ts +10 -0
  9. package/dist_ts/mod_commit/helpers.manual.js +97 -0
  10. package/dist_ts/mod_commit/index.js +156 -35
  11. package/dist_ts/mod_commit/mod.plugins.d.ts +7 -7
  12. package/dist_ts/mod_commit/mod.plugins.js +9 -8
  13. package/dist_ts/mod_release/helpers.releasepreparation.d.ts +2 -0
  14. package/dist_ts/mod_release/helpers.releasepreparation.js +12 -8
  15. package/dist_ts/mod_release/index.js +23 -4
  16. package/dist_ts/mod_standard/index.js +8 -2
  17. package/dist_ts/mod_testing/classes.commands.d.ts +27 -0
  18. package/dist_ts/mod_testing/classes.commands.js +407 -0
  19. package/dist_ts/mod_testing/classes.runtime.d.ts +37 -0
  20. package/dist_ts/mod_testing/classes.runtime.js +252 -0
  21. package/dist_ts/mod_testing/index.d.ts +4 -0
  22. package/dist_ts/mod_testing/index.js +149 -0
  23. package/dist_ts/plugins.d.ts +7 -1
  24. package/dist_ts/plugins.js +6 -2
  25. package/package.json +3 -1
  26. package/readme.md +161 -10
  27. package/ts/00_commitinfo_data.ts +1 -1
  28. package/ts/gitzone.cli.ts +5 -0
  29. package/ts/helpers.changelog.ts +108 -32
  30. package/ts/helpers.climode.ts +51 -2
  31. package/ts/helpers.workflow.ts +46 -5
  32. package/ts/mod_commit/helpers.manual.ts +156 -0
  33. package/ts/mod_commit/index.ts +272 -53
  34. package/ts/mod_commit/mod.plugins.ts +8 -7
  35. package/ts/mod_release/helpers.releasepreparation.ts +17 -7
  36. package/ts/mod_release/index.ts +26 -2
  37. package/ts/mod_standard/index.ts +7 -1
  38. package/ts/mod_testing/classes.commands.ts +620 -0
  39. package/ts/mod_testing/classes.runtime.ts +310 -0
  40. package/ts/mod_testing/index.ts +197 -0
  41. package/ts/plugins.ts +10 -0
@@ -12,7 +12,10 @@ import {
12
12
  assertNpmPackageName,
13
13
  hashReleaseDestination,
14
14
  } from "./helpers.npmartifact.js";
15
- import { canonicalReleaseJson } from "./helpers.tsdockerprotocol.js";
15
+ import {
16
+ canonicalReleaseJson,
17
+ type IReleaseQualificationRequest,
18
+ } from "./helpers.tsdockerprotocol.js";
16
19
 
17
20
  interface IRecoveryRefs {
18
21
  mainOid: string;
@@ -26,6 +29,7 @@ export interface IReleasePreparationRecovery {
26
29
  refs: IRecoveryRefs;
27
30
  version: string;
28
31
  store: ReleaseJournalStore;
32
+ dockerRequest?: IReleaseQualificationRequest;
29
33
  }
30
34
 
31
35
  const git = async (
@@ -50,10 +54,13 @@ export const assertPackageReleaseRecovery = async (
50
54
  ): Promise<string> => {
51
55
  const { workflow, branch, version } = options;
52
56
  if (
53
- workflow.targets.length !== 2 ||
57
+ workflow.targets.length < 2 ||
58
+ workflow.targets.some(
59
+ (target) => !["git", "npm", "docker"].includes(target),
60
+ ) ||
54
61
  !workflow.targets.includes("git") ||
55
- !workflow.targets.includes("npm") ||
56
- workflow.npmPackageSource !== "root" ||
62
+ (workflow.targets.includes("npm") &&
63
+ workflow.npmPackageSource !== "root") ||
57
64
  !workflow.pushBranch ||
58
65
  !workflow.pushTags ||
59
66
  branch.sourceBranch !== "main" ||
@@ -61,7 +68,7 @@ export const assertPackageReleaseRecovery = async (
61
68
  !branch.remoteMainOid
62
69
  ) {
63
70
  throw new Error(
64
- "Release recover requires configured Git and root npm targets from clean main.",
71
+ "Release recover requires configured Git with root npm and/or Docker targets from clean main.",
65
72
  );
66
73
  }
67
74
  const manifest = JSON.parse(
@@ -149,8 +156,10 @@ export const assertRecoveryUnpublished = async (
149
156
  throw new Error(
150
157
  "Recovery cannot adopt an existing remote release tag. Use its original journal.",
151
158
  );
152
- for (const registry of options.workflow.npmRegistries)
153
- await assertNpmVersionAbsent(registry, packageName, options.version);
159
+ if (options.workflow.targets.includes("npm")) {
160
+ for (const registry of options.workflow.npmRegistries)
161
+ await assertNpmVersionAbsent(registry, packageName, options.version);
162
+ }
154
163
  };
155
164
 
156
165
  const preparationBinding = (options: IReleasePreparationRecovery) => ({
@@ -165,6 +174,7 @@ const preparationBinding = (options: IReleasePreparationRecovery) => ({
165
174
  workflow: JSON.parse(
166
175
  JSON.stringify({ ...options.workflow, confirmation: "auto" }),
167
176
  ),
177
+ ...(options.dockerRequest ? { dockerRequest: options.dockerRequest } : {}),
168
178
  });
169
179
 
170
180
  const bindPreparation = async (
@@ -815,7 +815,26 @@ const runReleaseRecover = async (
815
815
  version,
816
816
  branch.sourceOid,
817
817
  );
818
- const options = { smartshell: shell, workflow, branch, refs, version, store };
818
+ const tsdocker = workflow.targets.includes("docker")
819
+ ? new TsdockerReleaseClient(shell, paths.cwd)
820
+ : undefined;
821
+ const dockerRequest = tsdocker
822
+ ? createDockerQualificationRequest(
823
+ workflow,
824
+ paths.cwd,
825
+ version,
826
+ refs.mainOid,
827
+ )
828
+ : undefined;
829
+ const options = {
830
+ smartshell: shell,
831
+ workflow,
832
+ branch,
833
+ refs,
834
+ version,
835
+ store,
836
+ dockerRequest,
837
+ };
819
838
  const packageName = await assertPackageReleaseRecovery(options);
820
839
  if (!branch.planAncestryVerified) {
821
840
  console.log(
@@ -823,7 +842,7 @@ const runReleaseRecover = async (
823
842
  );
824
843
  }
825
844
  console.log(
826
- `Recover existing ${packageName}@${version}\ncommit: ${refs.mainOid}\ntag object: ${refs.tagOid}\nGit destination: ${branch.gitRemote}\nnpm registries: ${workflow.npmRegistries.join(", ")}\nBuild and pack an isolated checkout, install its journal, then publish configured targets.`,
845
+ `Recover existing ${packageName}@${version}\ncommit: ${refs.mainOid}\ntag object: ${refs.tagOid}\nGit destination: ${branch.gitRemote}\nTargets: ${workflow.targets.join(", ")}\n${workflow.targets.includes("npm") ? `npm registries: ${workflow.npmRegistries.join(", ")}\n` : ""}Run configured checks in an isolated checkout, install its journal, then ${tsdocker ? "qualify Docker before publishing configured targets" : "publish configured targets"}.`,
827
846
  );
828
847
  if (argvArg.plan) return;
829
848
  const pnpmCapability = await assertFreshReleaseCapabilities(
@@ -831,7 +850,9 @@ const runReleaseRecover = async (
831
850
  workflow,
832
851
  paths.cwd,
833
852
  branch.pushUrl,
853
+ tsdocker,
834
854
  );
855
+ if (tsdocker && dockerRequest) await tsdocker.validate(dockerRequest);
835
856
  if (!mode.yes) {
836
857
  if (!mode.interactive)
837
858
  throw new Error(
@@ -874,6 +895,8 @@ const runReleaseRecover = async (
874
895
  expectedRemoteMainOid: branch.remoteMainOid,
875
896
  version,
876
897
  refs,
898
+ dockerRequest,
899
+ tsdocker,
877
900
  ensurePublicationState: async () => {
878
901
  await ensureCheckout();
879
902
  await ensureUnpublished();
@@ -887,6 +910,7 @@ const runReleaseRecover = async (
887
910
  store: context.store,
888
911
  journal: context.journal,
889
912
  pushUrl: branch.pushUrl,
913
+ tsdocker,
890
914
  ensurePublicationState: ensureState,
891
915
  });
892
916
  printReleaseJournalSummary(result);
@@ -17,12 +17,13 @@ const commandSummaries: ICommandHelpSummary[] = [
17
17
  {
18
18
  name: "commit",
19
19
  description:
20
- "Analyze changes and create semantic source commits",
20
+ "Create semantic source commits from AI or manual input",
21
21
  },
22
22
  { name: "release", description: "Create versioned releases from pending changelog entries" },
23
23
  { name: "format", description: "Plan or apply project formatting changes" },
24
24
  { name: "config", description: "Read and change .smartconfig.json settings" },
25
25
  { name: "services", description: "Manage or configure development services" },
26
+ { name: "testing", description: "Use approved dcrouter testing domains, certificates, and DNS" },
26
27
  { name: "tools", description: "Manage the global @git.zone toolchain" },
27
28
  { name: "template", description: "Create a project from a template" },
28
29
  { name: "open", description: "Open project assets and CI pages" },
@@ -218,6 +219,11 @@ async function showCommandHelp(
218
219
  mode: ICliMode,
219
220
  ): Promise<boolean> {
220
221
  switch (commandName) {
222
+ case "testing": {
223
+ const modTesting = await import("../mod_testing/index.js");
224
+ modTesting.showHelp(mode);
225
+ return true;
226
+ }
221
227
  case "commit": {
222
228
  const modCommit = await import("../mod_commit/index.js");
223
229
  modCommit.showHelp(mode);