@memberjunction/cli 6.2.0-edge.0 → 6.2.0-edge.2
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/dist/baseline/cli-helpers.d.ts +4 -0
- package/dist/baseline/cli-helpers.d.ts.map +1 -1
- package/dist/baseline/cli-helpers.js +18 -10
- package/dist/baseline/cli-helpers.js.map +1 -1
- package/dist/baseline/comparator.d.ts +5 -3
- package/dist/baseline/comparator.d.ts.map +1 -1
- package/dist/baseline/comparator.js +142 -138
- package/dist/baseline/comparator.js.map +1 -1
- package/dist/baseline/connection.d.ts +8 -6
- package/dist/baseline/connection.d.ts.map +1 -1
- package/dist/baseline/connection.js +16 -12
- package/dist/baseline/connection.js.map +1 -1
- package/dist/baseline/data-dumper.d.ts +7 -3
- package/dist/baseline/data-dumper.d.ts.map +1 -1
- package/dist/baseline/data-dumper.js +33 -25
- package/dist/baseline/data-dumper.js.map +1 -1
- package/dist/baseline/emitter.d.ts +5 -3
- package/dist/baseline/emitter.d.ts.map +1 -1
- package/dist/baseline/emitter.js +114 -110
- package/dist/baseline/emitter.js.map +1 -1
- package/dist/baseline/index.d.ts +7 -7
- package/dist/baseline/index.d.ts.map +1 -1
- package/dist/baseline/index.js +7 -7
- package/dist/baseline/index.js.map +1 -1
- package/dist/baseline/introspector-mssql.d.ts +2 -0
- package/dist/baseline/introspector-mssql.d.ts.map +1 -1
- package/dist/baseline/introspector-mssql.js +68 -64
- package/dist/baseline/introspector-mssql.js.map +1 -1
- package/dist/baseline/introspector-postgres.d.ts +2 -0
- package/dist/baseline/introspector-postgres.d.ts.map +1 -1
- package/dist/baseline/introspector-postgres.js +34 -30
- package/dist/baseline/introspector-postgres.js.map +1 -1
- package/dist/baseline/report.d.ts +4 -0
- package/dist/baseline/report.d.ts.map +1 -1
- package/dist/baseline/report.js +25 -17
- package/dist/baseline/report.js.map +1 -1
- package/dist/baseline/types.d.ts +71 -71
- package/dist/baseline/util.d.ts +54 -6
- package/dist/baseline/util.d.ts.map +1 -1
- package/dist/baseline/util.js +112 -36
- package/dist/baseline/util.js.map +1 -1
- package/dist/commands/agent/init.d.ts +12 -0
- package/dist/commands/agent/init.d.ts.map +1 -1
- package/dist/commands/agent/init.js +42 -8
- package/dist/commands/agent/init.js.map +1 -1
- package/dist/commands/ai/actions/list.js +7 -7
- package/dist/commands/ai/actions/run.js +7 -7
- package/dist/commands/ai/agents/list.js +7 -7
- package/dist/commands/ai/agents/run.js +9 -9
- package/dist/commands/ai/audit/agent-run.js +7 -7
- package/dist/commands/ai/prompts/run.js +7 -7
- package/dist/commands/app/check-updates.js +5 -5
- package/dist/commands/app/disable.js +2 -2
- package/dist/commands/app/enable.js +2 -2
- package/dist/commands/app/info.js +2 -2
- package/dist/commands/app/install.js +2 -2
- package/dist/commands/app/list.js +2 -2
- package/dist/commands/app/remove.js +4 -4
- package/dist/commands/app/upgrade.js +2 -2
- package/dist/commands/artifacts/reclassify.js +2 -2
- package/dist/commands/baseline/build.js +31 -31
- package/dist/commands/baseline/build.js.map +1 -1
- package/dist/commands/baseline/compare.js +36 -36
- package/dist/commands/baseline/roundtrip.js +56 -54
- package/dist/commands/baseline/roundtrip.js.map +1 -1
- package/dist/commands/bundle/index.js +4 -4
- package/dist/commands/clean/index.js +3 -3
- package/dist/commands/codegen/manifest.d.ts +2 -0
- package/dist/commands/codegen/manifest.d.ts.map +1 -1
- package/dist/commands/codegen/manifest.js +8 -4
- package/dist/commands/codegen/manifest.js.map +1 -1
- package/dist/commands/dev/workspace/index.d.ts +2 -0
- package/dist/commands/dev/workspace/index.d.ts.map +1 -1
- package/dist/commands/dev/workspace/index.js +8 -4
- package/dist/commands/dev/workspace/index.js.map +1 -1
- package/dist/commands/install/claude.d.ts +2 -0
- package/dist/commands/install/claude.d.ts.map +1 -1
- package/dist/commands/install/claude.js +11 -7
- package/dist/commands/install/claude.js.map +1 -1
- package/dist/commands/install/index.js +3 -3
- package/dist/commands/migrate/convert.d.ts +21 -0
- package/dist/commands/migrate/convert.d.ts.map +1 -1
- package/dist/commands/migrate/convert.js +37 -7
- package/dist/commands/migrate/convert.js.map +1 -1
- package/dist/commands/migrate/create.js +2 -2
- package/dist/commands/migrate/index.js +16 -16
- package/dist/commands/migrate/rebake.d.ts.map +1 -1
- package/dist/commands/migrate/rebake.js +7 -0
- package/dist/commands/migrate/rebake.js.map +1 -1
- package/dist/commands/rubric/diff.d.ts +11 -0
- package/dist/commands/rubric/diff.d.ts.map +1 -0
- package/dist/commands/rubric/diff.js +20 -0
- package/dist/commands/rubric/diff.js.map +1 -0
- package/dist/commands/rubric/evaluate.d.ts +12 -0
- package/dist/commands/rubric/evaluate.d.ts.map +1 -0
- package/dist/commands/rubric/evaluate.js +21 -0
- package/dist/commands/rubric/evaluate.js.map +1 -0
- package/dist/commands/rubric/index.d.ts +6 -0
- package/dist/commands/rubric/index.d.ts.map +1 -0
- package/dist/commands/rubric/index.js +13 -0
- package/dist/commands/rubric/index.js.map +1 -0
- package/dist/commands/rubric/list.d.ts +6 -0
- package/dist/commands/rubric/list.d.ts.map +1 -0
- package/dist/commands/rubric/list.js +14 -0
- package/dist/commands/rubric/list.js.map +1 -0
- package/dist/commands/rubric/show.d.ts +9 -0
- package/dist/commands/rubric/show.d.ts.map +1 -0
- package/dist/commands/rubric/show.js +16 -0
- package/dist/commands/rubric/show.js.map +1 -0
- package/dist/commands/rubric/validate.d.ts +9 -0
- package/dist/commands/rubric/validate.d.ts.map +1 -0
- package/dist/commands/rubric/validate.js +16 -0
- package/dist/commands/rubric/validate.js.map +1 -0
- package/dist/commands/sync/file-reset.js +2 -2
- package/dist/commands/sync/init.js +3 -3
- package/dist/commands/test/compare.js +6 -6
- package/dist/commands/test/history.js +6 -6
- package/dist/commands/test/index.d.ts.map +1 -1
- package/dist/commands/test/index.js +2 -0
- package/dist/commands/test/index.js.map +1 -1
- package/dist/commands/test/list.js +6 -6
- package/dist/commands/test/promote-criteria.d.ts +10 -0
- package/dist/commands/test/promote-criteria.d.ts.map +1 -0
- package/dist/commands/test/promote-criteria.js +25 -0
- package/dist/commands/test/promote-criteria.js.map +1 -0
- package/dist/commands/test/regression/build.js +5 -5
- package/dist/commands/test/regression/compare.js +3 -3
- package/dist/commands/test/regression/down.js +4 -4
- package/dist/commands/test/regression/export.js +4 -4
- package/dist/commands/test/regression/gen-forms.js +3 -3
- package/dist/commands/test/regression/remote.js +10 -10
- package/dist/commands/test/regression/up.js +6 -6
- package/dist/commands/test/report.d.ts +9 -0
- package/dist/commands/test/report.d.ts.map +1 -0
- package/dist/commands/test/report.js +18 -0
- package/dist/commands/test/report.js.map +1 -0
- package/dist/commands/test/run.d.ts +1 -0
- package/dist/commands/test/run.d.ts.map +1 -1
- package/dist/commands/test/run.js +10 -6
- package/dist/commands/test/run.js.map +1 -1
- package/dist/commands/test/suite.d.ts +1 -0
- package/dist/commands/test/suite.d.ts.map +1 -1
- package/dist/commands/test/suite.js +10 -6
- package/dist/commands/test/suite.js.map +1 -1
- package/dist/commands/test/validate.js +6 -6
- package/dist/commands/translate-sql/index.js +25 -25
- package/dist/commands/update/claude.js +7 -7
- package/dist/commands/usage.js +4 -4
- package/dist/config.d.ts +175 -1
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +23 -9
- package/dist/config.js.map +1 -1
- package/dist/hooks/postrun.js +2 -2
- package/dist/hooks/prerun.js +2 -2
- package/dist/hooks/prerun.js.map +1 -1
- package/dist/init-templates/citizen-builder/.env.example +6 -0
- package/dist/init-templates/citizen-builder/docker/Dockerfile +10 -2
- package/dist/init-templates/citizen-builder/docker-compose.yml +6 -0
- package/dist/init-templates/citizen-builder/scripts/docker-entrypoint.sh +56 -20
- package/dist/lib/claude-pack/ManagedBlockEditor.d.ts +6 -0
- package/dist/lib/claude-pack/ManagedBlockEditor.d.ts.map +1 -1
- package/dist/lib/claude-pack/ManagedBlockEditor.js +18 -6
- package/dist/lib/claude-pack/ManagedBlockEditor.js.map +1 -1
- package/dist/lib/claude-pack/PackFetcher.d.ts +8 -3
- package/dist/lib/claude-pack/PackFetcher.d.ts.map +1 -1
- package/dist/lib/claude-pack/PackFetcher.js +26 -18
- package/dist/lib/claude-pack/PackFetcher.js.map +1 -1
- package/dist/lib/claude-pack/PackInstaller.d.ts +6 -2
- package/dist/lib/claude-pack/PackInstaller.d.ts.map +1 -1
- package/dist/lib/claude-pack/PackInstaller.js +19 -13
- package/dist/lib/claude-pack/PackInstaller.js.map +1 -1
- package/dist/lib/claude-pack/PackMerger.d.ts +8 -0
- package/dist/lib/claude-pack/PackMerger.d.ts.map +1 -1
- package/dist/lib/claude-pack/PackMerger.js +63 -57
- package/dist/lib/claude-pack/PackMerger.js.map +1 -1
- package/dist/lib/claude-pack/PackOutputFormatter.d.ts +4 -0
- package/dist/lib/claude-pack/PackOutputFormatter.d.ts.map +1 -1
- package/dist/lib/claude-pack/PackOutputFormatter.js +10 -2
- package/dist/lib/claude-pack/PackOutputFormatter.js.map +1 -1
- package/dist/lib/claude-pack/PackPaths.d.ts +12 -0
- package/dist/lib/claude-pack/PackPaths.d.ts.map +1 -1
- package/dist/lib/claude-pack/PackPaths.js +31 -7
- package/dist/lib/claude-pack/PackPaths.js.map +1 -1
- package/dist/lib/claude-pack/PackTypes.d.ts +18 -14
- package/dist/lib/claude-pack/PackTypes.d.ts.map +1 -1
- package/dist/lib/claude-pack/PackTypes.js +11 -3
- package/dist/lib/claude-pack/PackTypes.js.map +1 -1
- package/dist/lib/claude-pack/SettingsMerger.d.ts +10 -0
- package/dist/lib/claude-pack/SettingsMerger.d.ts.map +1 -1
- package/dist/lib/claude-pack/SettingsMerger.js +36 -16
- package/dist/lib/claude-pack/SettingsMerger.js.map +1 -1
- package/dist/lib/cli-plugins.d.ts +2 -0
- package/dist/lib/cli-plugins.d.ts.map +1 -1
- package/dist/lib/cli-plugins.js +8 -4
- package/dist/lib/cli-plugins.js.map +1 -1
- package/dist/lib/db-preflight.d.ts +2 -0
- package/dist/lib/db-preflight.d.ts.map +1 -1
- package/dist/lib/db-preflight.js +12 -8
- package/dist/lib/db-preflight.js.map +1 -1
- package/dist/lib/db-version.d.ts +2 -0
- package/dist/lib/db-version.d.ts.map +1 -1
- package/dist/lib/db-version.js +5 -1
- package/dist/lib/db-version.js.map +1 -1
- package/dist/lib/derived-usage.d.ts +14 -8
- package/dist/lib/derived-usage.d.ts.map +1 -1
- package/dist/lib/derived-usage.js +30 -18
- package/dist/lib/derived-usage.js.map +1 -1
- package/dist/lib/domain-profiles.d.ts +4 -2
- package/dist/lib/domain-profiles.d.ts.map +1 -1
- package/dist/lib/domain-profiles.js +53 -49
- package/dist/lib/domain-profiles.js.map +1 -1
- package/dist/lib/domain-usage-command.js +4 -4
- package/dist/lib/dynamic-packages.d.ts +4 -2
- package/dist/lib/dynamic-packages.d.ts.map +1 -1
- package/dist/lib/dynamic-packages.js +9 -5
- package/dist/lib/dynamic-packages.js.map +1 -1
- package/dist/lib/format-compat.d.ts +9 -7
- package/dist/lib/format-compat.d.ts.map +1 -1
- package/dist/lib/format-compat.js +12 -8
- package/dist/lib/format-compat.js.map +1 -1
- package/dist/lib/interactive-guard.d.ts +16 -0
- package/dist/lib/interactive-guard.d.ts.map +1 -1
- package/dist/lib/interactive-guard.js +18 -6
- package/dist/lib/interactive-guard.js.map +1 -1
- package/dist/lib/migration-fetch.d.ts +16 -4
- package/dist/lib/migration-fetch.d.ts.map +1 -1
- package/dist/lib/migration-fetch.js +30 -18
- package/dist/lib/migration-fetch.js.map +1 -1
- package/dist/lib/regression/docker-helpers.d.ts +24 -0
- package/dist/lib/regression/docker-helpers.d.ts.map +1 -1
- package/dist/lib/regression/docker-helpers.js +46 -10
- package/dist/lib/regression/docker-helpers.js.map +1 -1
- package/dist/lib/usage-render.d.ts +6 -0
- package/dist/lib/usage-render.d.ts.map +1 -1
- package/dist/lib/usage-render.js +15 -3
- package/dist/lib/usage-render.js.map +1 -1
- package/dist/translate-sql/groundTruth.d.ts +3 -3
- package/dist/translate-sql/groundTruth.js +40 -40
- package/dist/translate-sql/reportGenerator.d.ts +7 -7
- package/dist/translate-sql/reportGenerator.js +18 -18
- package/dist/translate-sql/ruleTranslator.d.ts +3 -3
- package/dist/translate-sql/ruleTranslator.js +8 -8
- package/dist/translate-sql/ruleTranslator.js.map +1 -1
- package/dist/utils/open-app-context.d.ts +21 -0
- package/dist/utils/open-app-context.d.ts.map +1 -1
- package/dist/utils/open-app-context.js +26 -10
- package/dist/utils/open-app-context.js.map +1 -1
- package/oclif.manifest.json +1419 -1160
- package/package.json +22 -22
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interactive-guard.d.ts","sourceRoot":"","sources":["../../src/lib/interactive-guard.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,EACL,mBAAmB,EACnB,kBAAkB,EAElB,eAAe,EACf,KAAK,kBAAkB,EACxB,MAAM,0BAA0B,CAAC;AAElC,OAAO,EAAE,mBAAmB,EAAE,CAAC;AAE/B;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,SAAS,GAAE,kBAAuB,GAAG,OAAO,CAE5E;AAED;;;;;GAKG;AACH,eAAO,MAAM,eAAe,wBAAkB,CAAC;AAE/C,iFAAiF;AACjF,eAAO,MAAM,kBAAkB,2BAAqB,CAAC;AAErD;;;;;;;;;GASG;AACH,wBAAgB,oBAAoB,CAClC,OAAO,EAAE;IAAE,KAAK,EAAE,CAAC,OAAO,EAAE,MAAM,GAAG,KAAK,EAAE,OAAO,CAAC,EAAE;QAAE,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,WAAW,CAAC,EAAE,MAAM,EAAE,CAAA;KAAE,KAAK,KAAK,CAAA;CAAE,EAC3G,KAAK,EAAE,OAAO,GACb,KAAK,CAKP;AAED;;;;GAIG;AACH,wBAAsB,0BAA0B,CAAC,CAAC,EAChD,OAAO,EAAE;IAAE,KAAK,EAAE,CAAC,OAAO,EAAE,MAAM,GAAG,KAAK,EAAE,OAAO,CAAC,EAAE;QAAE,IAAI,CAAC,EA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3G,KAAK,EAAE,OAAO,GACb,KAAK,CAEP;AAED;;;;GAIG;AACH,wBAAsB,0BAA0B,CAAC,CAAC,EAChD,OAAO,EAAE;IAAE,KAAK,EAAE,CAAC,OAAO,EAAE,MAAM,GAAG,KAAK,EAAE,OAAO,CAAC,EAAE;QAAE,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,WAAW,CAAC,EAAE,MAAM,EAAE,CAAA;KAAE,KAAK,KAAK,CAAA;CAAE,EAC3G,IAAI,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,GACrB,OAAO,CAAC,CAAC,CAAC,CAMZ;AAED,0DAA0D;AAC1D,wBAAsB,0BAA0B,CAAC,CAAC,EAChD,OAAO,EAAE;IAAE,KAAK,EAAE,CAAC,OAAO,EAAE,MAAM,GAAG,KAAK,EAAE,OAAO,CAAC,EAAE;QAAE,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,WAAW,CAAC,EAAE,MAAM,EAAE,CAAA;KAAE,KAAK,KAAK,CAAA;CAAE,EAC3G,IAAI,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,GACrB,OAAO,CAAC,CAAC,CAAC,CAEZ"}
|
|
@@ -16,18 +16,22 @@ export { NonInteractiveError };
|
|
|
16
16
|
* running in CI. Reads the env var the prerun hook sets from the global `--interactive`
|
|
17
17
|
* / `--no-interactive` flags, then falls back to detecting the terminal.
|
|
18
18
|
*/
|
|
19
|
-
export function
|
|
19
|
+
export function IsInteractiveRun(overrides = {}) {
|
|
20
20
|
return ResolveInteractivity(overrides).interactive;
|
|
21
21
|
}
|
|
22
|
+
/** @deprecated Use {@link IsInteractiveRun}. */
|
|
23
|
+
export function isInteractiveRun(overrides = {}) {
|
|
24
|
+
return IsInteractiveRun(overrides);
|
|
25
|
+
}
|
|
22
26
|
/**
|
|
23
27
|
* Asks for one value, or fails fast naming the flag that supplies it.
|
|
24
28
|
*
|
|
25
29
|
* Thin re-export of cli-core's `ResolveOrPrompt` so unmigrated commands import from
|
|
26
30
|
* one place and pick up the env-based interactivity default automatically.
|
|
27
31
|
*/
|
|
28
|
-
export const resolveOrPrompt = ResolveOrPrompt;
|
|
32
|
+
export const resolveOrPrompt = ResolveOrPrompt; // case-violation-ok-legacy-back-compat: the PascalCase name is already taken in this scope
|
|
29
33
|
/** Guards a command that is interactive by nature and has no flag equivalent. */
|
|
30
|
-
export const requireInteractive = RequireInteractive;
|
|
34
|
+
export const requireInteractive = RequireInteractive; // case-violation-ok-legacy-back-compat: the PascalCase name is already taken in this scope
|
|
31
35
|
/**
|
|
32
36
|
* Renders a {@link NonInteractiveError} through oclif's error path for commands that
|
|
33
37
|
* aren't `BaseCLIPlugin` subclasses (which get the structured envelope instead).
|
|
@@ -38,23 +42,31 @@ export const requireInteractive = RequireInteractive;
|
|
|
38
42
|
*
|
|
39
43
|
* Re-throws anything that isn't a `NonInteractiveError` untouched.
|
|
40
44
|
*/
|
|
41
|
-
export function
|
|
45
|
+
export function FailOnNonInteractive(command, error) {
|
|
42
46
|
if (error instanceof NonInteractiveError) {
|
|
43
47
|
command.error(error.message, { exit: 1, suggestions: [error.suggestion] });
|
|
44
48
|
}
|
|
45
49
|
throw error;
|
|
46
50
|
}
|
|
51
|
+
/** @deprecated Use {@link FailOnNonInteractive}. */
|
|
52
|
+
export function failOnNonInteractive(command, error) {
|
|
53
|
+
return FailOnNonInteractive(command, error);
|
|
54
|
+
}
|
|
47
55
|
/**
|
|
48
56
|
* Wraps a command body so any {@link NonInteractiveError} raised anywhere inside it
|
|
49
57
|
* — including deep in a service callback — surfaces as a clean, actionable failure
|
|
50
58
|
* instead of an unhandled rejection.
|
|
51
59
|
*/
|
|
52
|
-
export async function
|
|
60
|
+
export async function WithNonInteractiveHandling(command, body) {
|
|
53
61
|
try {
|
|
54
62
|
return await body();
|
|
55
63
|
}
|
|
56
64
|
catch (e) {
|
|
57
|
-
return
|
|
65
|
+
return FailOnNonInteractive(command, e);
|
|
58
66
|
}
|
|
59
67
|
}
|
|
68
|
+
/** @deprecated Use {@link WithNonInteractiveHandling}. */
|
|
69
|
+
export async function withNonInteractiveHandling(command, body) {
|
|
70
|
+
return WithNonInteractiveHandling(command, body);
|
|
71
|
+
}
|
|
60
72
|
//# sourceMappingURL=interactive-guard.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interactive-guard.js","sourceRoot":"","sources":["../../src/lib/interactive-guard.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,EACL,mBAAmB,EACnB,kBAAkB,EAClB,oBAAoB,EACpB,eAAe,GAEhB,MAAM,0BAA0B,CAAC;AAElC,OAAO,EAAE,mBAAmB,EAAE,CAAC;AAE/B;;;;GAIG;AACH,MAAM,UAAU,gBAAgB,CAAC,YAAgC,EAAE;IACjE,OAAO,oBAAoB,CAAC,SAAS,CAAC,CAAC,WAAW,CAAC;AACrD,CAAC;AAED;;;;;GAKG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"interactive-guard.js","sourceRoot":"","sources":["../../src/lib/interactive-guard.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,EACL,mBAAmB,EACnB,kBAAkB,EAClB,oBAAoB,EACpB,eAAe,GAEhB,MAAM,0BAA0B,CAAC;AAElC,OAAO,EAAE,mBAAmB,EAAE,CAAC;AAE/B;;;;GAIG;AACH,MAAM,UAAU,gBAAgB,CAAC,YAAgC,EAAE;IACjE,OAAO,oBAAoB,CAAC,SAAS,CAAC,CAAC,WAAW,CAAC;AACrD,CAAC;AAED,gDAAgD;AAChD,MAAM,UAAU,gBAAgB,CAAC,YAAgC,EAAE;IACjE,OAAO,gBAAgB,CAAC,SAAS,CAAC,CAAC;AACrC,CAAC;AAED;;;;;GAKG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,eAAe,CAAC,CAAE,2FAA2F;AAE5I,iFAAiF;AACjF,MAAM,CAAC,MAAM,kBAAkB,GAAG,kBAAkB,CAAC,CAAE,2FAA2F;AAElJ;;;;;;;;;GASG;AACH,MAAM,UAAU,oBAAoB,CAClC,OAA2G,EAC3G,KAAc;IAEd,IAAI,KAAK,YAAY,mBAAmB,EAAE,CAAC;QACzC,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,OAAO,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE,WAAW,EAAE,CAAC,KAAK,CAAC,UAAU,CAAC,EAAE,CAAC,CAAC;IAC7E,CAAC;IACD,MAAM,KAAK,CAAC;AACd,CAAC;AAED,oDAAoD;AACpD,MAAM,UAAU,oBAAoB,CAClC,OAA2G,EAC3G,KAAc;IAEd,OAAO,oBAAoB,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;AAC9C,CAAC;AAED;;;;GAIG;AACH,MAAM,CAAC,KAAK,UAAU,0BAA0B,CAC9C,OAA2G,EAC3G,IAAsB;IAEtB,IAAI,CAAC;QACH,OAAO,MAAM,IAAI,EAAE,CAAC;IACtB,CAAC;IAAC,OAAO,CAAC,EAAE,CAAC;QACX,OAAO,oBAAoB,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC;IAC1C,CAAC;AACH,CAAC;AAED,0DAA0D;AAC1D,MAAM,CAAC,KAAK,UAAU,0BAA0B,CAC9C,OAA2G,EAC3G,IAAsB;IAEtB,OAAO,0BAA0B,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;AACnD,CAAC"}
|
|
@@ -1,19 +1,21 @@
|
|
|
1
1
|
export type MigrationDialect = 'sqlserver' | 'postgresql';
|
|
2
2
|
export interface MigrationFetchResult {
|
|
3
3
|
/** Temp clone root to hand to Skyway as the migration location. */
|
|
4
|
-
|
|
4
|
+
Dir: string;
|
|
5
5
|
/** Repo-relative migration paths checked out (empty when the full-history fallback was used). */
|
|
6
|
-
|
|
6
|
+
Selected: string[];
|
|
7
7
|
/** True when partial clone was unavailable and the full `migrations/` dir was fetched instead. */
|
|
8
|
-
|
|
8
|
+
UsedFallback: boolean;
|
|
9
9
|
/** Removes the temp clone. Callers MUST invoke this in a finally on every exit path. */
|
|
10
|
-
|
|
10
|
+
Cleanup: () => Promise<void>;
|
|
11
11
|
}
|
|
12
12
|
/**
|
|
13
13
|
* Resolves a user-supplied tag/branch into a git ref.
|
|
14
14
|
* A semantic version (`2.123.0` / `v2.123.0`) maps to the `vX.Y.Z` release tag;
|
|
15
15
|
* anything else (e.g. `main`) is treated as a branch name unchanged.
|
|
16
16
|
*/
|
|
17
|
+
export declare function ResolveGitRef(tagOrBranch: string): string;
|
|
18
|
+
/** @deprecated Use {@link ResolveGitRef}. */
|
|
17
19
|
export declare function resolveGitRef(tagOrBranch: string): string;
|
|
18
20
|
/**
|
|
19
21
|
* Pure selector: given the repo-relative migration paths present at a ref, return
|
|
@@ -33,12 +35,22 @@ export declare function resolveGitRef(tagOrBranch: string): string;
|
|
|
33
35
|
*
|
|
34
36
|
* With no baseline present (e.g. legacy v2) the fresh path returns the full versioned history.
|
|
35
37
|
*/
|
|
38
|
+
export declare function SelectMigrationSlice(paths: readonly string[], currentVersion?: string | null): string[];
|
|
39
|
+
/** @deprecated Use {@link SelectMigrationSlice}. */
|
|
36
40
|
export declare function selectMigrationSlice(paths: readonly string[], currentVersion?: string | null): string[];
|
|
37
41
|
/**
|
|
38
42
|
* SIDE EFFECTS: clones from `repoUrl` over the network into a temp dir and checks out
|
|
39
43
|
* only the selected migration slice. Returns the temp dir plus a `cleanup` the caller
|
|
40
44
|
* MUST run in a finally. On any internal failure the temp dir is removed before throwing.
|
|
41
45
|
*/
|
|
46
|
+
export declare function FetchMigrationSlice(opts: {
|
|
47
|
+
repoUrl: string;
|
|
48
|
+
ref: string;
|
|
49
|
+
dialect: MigrationDialect;
|
|
50
|
+
/** Highest version already applied to the target DB; `null`/omitted = fresh install (baseline + tail). */
|
|
51
|
+
currentVersion?: string | null;
|
|
52
|
+
}): Promise<MigrationFetchResult>;
|
|
53
|
+
/** @deprecated Use {@link FetchMigrationSlice}. */
|
|
42
54
|
export declare function fetchMigrationSlice(opts: {
|
|
43
55
|
repoUrl: string;
|
|
44
56
|
ref: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"migration-fetch.d.ts","sourceRoot":"","sources":["../../src/lib/migration-fetch.ts"],"names":[],"mappings":"AAyBA,MAAM,MAAM,gBAAgB,GAAG,WAAW,GAAG,YAAY,CAAC;AAE1D,MAAM,WAAW,oBAAoB;IACnC,mEAAmE;IACnE,GAAG,EAAE,MAAM,CAAC;IACZ,iGAAiG;IACjG,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,kGAAkG;IAClG,YAAY,EAAE,OAAO,CAAC;IACtB,wFAAwF;IACxF,OAAO,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;CAC9B;AAKD;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,CAIzD;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,EAAE,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,MAAM,EAAE,CAcvG;AA4BD;;;;GAIG;AACH,wBAAsB,mBAAmB,CAAC,IAAI,EAAE;IAC9C,OAAO,EAAE,MAAM,CAAC;IAChB,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,EAAE,gBAAgB,CAAC;IAC1B,0GAA0G;IAC1G,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAChC,GAAG,OAAO,CAAC,oBAAoB,CAAC,CA2BhC"}
|
|
1
|
+
{"version":3,"file":"migration-fetch.d.ts","sourceRoot":"","sources":["../../src/lib/migration-fetch.ts"],"names":[],"mappings":"AAyBA,MAAM,MAAM,gBAAgB,GAAG,WAAW,GAAG,YAAY,CAAC;AAE1D,MAAM,WAAW,oBAAoB;IACnC,mEAAmE;IACnE,GAAG,EAAE,MAAM,CAAC;IACZ,iGAAiG;IACjG,QAAQ,EAAE,MAAM,EA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path from 'node:path';
|
|
23
|
-
import {
|
|
23
|
+
import { ParseMigrationFilename } from '../baseline/util.js';
|
|
24
24
|
/** Matches Flyway/Skyway repeatable migrations (`R__<desc>.sql`), which always run. */
|
|
25
25
|
const REPEATABLE_PATTERN = /^R__.+\.sql$/i;
|
|
26
26
|
/**
|
|
@@ -28,12 +28,16 @@ const REPEATABLE_PATTERN = /^R__.+\.sql$/i;
|
|
|
28
28
|
* A semantic version (`2.123.0` / `v2.123.0`) maps to the `vX.Y.Z` release tag;
|
|
29
29
|
* anything else (e.g. `main`) is treated as a branch name unchanged.
|
|
30
30
|
*/
|
|
31
|
-
export function
|
|
31
|
+
export function ResolveGitRef(tagOrBranch) {
|
|
32
32
|
const isSemver = /^v?\d+\.\d+\.\d+$/.test(tagOrBranch);
|
|
33
33
|
if (!isSemver)
|
|
34
34
|
return tagOrBranch;
|
|
35
35
|
return tagOrBranch.startsWith('v') ? tagOrBranch : `v${tagOrBranch}`;
|
|
36
36
|
}
|
|
37
|
+
/** @deprecated Use {@link ResolveGitRef}. */
|
|
38
|
+
export function resolveGitRef(tagOrBranch) {
|
|
39
|
+
return ResolveGitRef(tagOrBranch);
|
|
40
|
+
}
|
|
37
41
|
/**
|
|
38
42
|
* Pure selector: given the repo-relative migration paths present at a ref, return
|
|
39
43
|
* the minimal slice Skyway needs. Repeatable migrations are always included.
|
|
@@ -52,7 +56,7 @@ export function resolveGitRef(tagOrBranch) {
|
|
|
52
56
|
*
|
|
53
57
|
* With no baseline present (e.g. legacy v2) the fresh path returns the full versioned history.
|
|
54
58
|
*/
|
|
55
|
-
export function
|
|
59
|
+
export function SelectMigrationSlice(paths, currentVersion) {
|
|
56
60
|
const sqlPaths = paths.filter((p) => p.toLowerCase().endsWith('.sql'));
|
|
57
61
|
const repeatables = sqlPaths.filter((p) => REPEATABLE_PATTERN.test(path.basename(p)));
|
|
58
62
|
if (currentVersion != null) {
|
|
@@ -65,40 +69,44 @@ export function selectMigrationSlice(paths, currentVersion) {
|
|
|
65
69
|
const versioned = sqlPaths.filter((p) => isInVersionedSlice(p, floorTimestamp));
|
|
66
70
|
return Array.from(new Set([...versioned, ...repeatables]));
|
|
67
71
|
}
|
|
72
|
+
/** @deprecated Use {@link SelectMigrationSlice}. */
|
|
73
|
+
export function selectMigrationSlice(paths, currentVersion) {
|
|
74
|
+
return SelectMigrationSlice(paths, currentVersion);
|
|
75
|
+
}
|
|
68
76
|
/** True if `filePath` is a versioned (`V`) migration whose timestamp is strictly after `currentVersion`. */
|
|
69
77
|
function isVersionedAfter(filePath, currentVersion) {
|
|
70
|
-
const parsed =
|
|
71
|
-
return parsed?.
|
|
78
|
+
const parsed = ParseMigrationFilename(path.basename(filePath));
|
|
79
|
+
return parsed?.Kind === 'V' && parsed.Timestamp > currentVersion;
|
|
72
80
|
}
|
|
73
81
|
/** Returns the timestamp of the latest `B` baseline among the paths, or null if none. */
|
|
74
82
|
function highestBaselineTimestamp(sqlPaths) {
|
|
75
83
|
let floor = null;
|
|
76
84
|
for (const p of sqlPaths) {
|
|
77
|
-
const parsed =
|
|
78
|
-
if (!parsed || parsed.
|
|
85
|
+
const parsed = ParseMigrationFilename(path.basename(p));
|
|
86
|
+
if (!parsed || parsed.Kind !== 'B')
|
|
79
87
|
continue;
|
|
80
|
-
if (floor === null || parsed.
|
|
81
|
-
floor = parsed.
|
|
88
|
+
if (floor === null || parsed.Timestamp > floor)
|
|
89
|
+
floor = parsed.Timestamp;
|
|
82
90
|
}
|
|
83
91
|
return floor;
|
|
84
92
|
}
|
|
85
93
|
/** True if a versioned/baseline path belongs in the slice given the baseline floor. */
|
|
86
94
|
function isInVersionedSlice(filePath, floorTimestamp) {
|
|
87
|
-
const parsed =
|
|
95
|
+
const parsed = ParseMigrationFilename(path.basename(filePath));
|
|
88
96
|
if (!parsed)
|
|
89
97
|
return false; // repeatables and non-migration files handled elsewhere
|
|
90
98
|
if (floorTimestamp === null)
|
|
91
|
-
return parsed.
|
|
92
|
-
if (parsed.
|
|
93
|
-
return parsed.
|
|
94
|
-
return parsed.
|
|
99
|
+
return parsed.Kind === 'V'; // no baseline → all versioned
|
|
100
|
+
if (parsed.Kind === 'B')
|
|
101
|
+
return parsed.Timestamp === floorTimestamp; // only the floor baseline
|
|
102
|
+
return parsed.Timestamp > floorTimestamp; // versioned migrations strictly after the baseline
|
|
95
103
|
}
|
|
96
104
|
/**
|
|
97
105
|
* SIDE EFFECTS: clones from `repoUrl` over the network into a temp dir and checks out
|
|
98
106
|
* only the selected migration slice. Returns the temp dir plus a `cleanup` the caller
|
|
99
107
|
* MUST run in a finally. On any internal failure the temp dir is removed before throwing.
|
|
100
108
|
*/
|
|
101
|
-
export async function
|
|
109
|
+
export async function FetchMigrationSlice(opts) {
|
|
102
110
|
const migrationsRoot = opts.dialect === 'postgresql' ? 'migrations-pg' : 'migrations';
|
|
103
111
|
const dir = mkdtempSync(path.join(tmpdir(), 'mj-migrations-'));
|
|
104
112
|
const cleanup = async () => {
|
|
@@ -112,20 +120,24 @@ export async function fetchMigrationSlice(opts) {
|
|
|
112
120
|
const partialOk = await tryPartialClone(git, opts.repoUrl, opts.ref, dir);
|
|
113
121
|
if (!partialOk) {
|
|
114
122
|
await fullSparseClone(git, opts.repoUrl, opts.ref, dir, migrationsRoot);
|
|
115
|
-
return { dir,
|
|
123
|
+
return { Dir: dir, Selected: [], UsedFallback: true, Cleanup: cleanup };
|
|
116
124
|
}
|
|
117
125
|
const allPaths = await listTreePaths(git, migrationsRoot);
|
|
118
|
-
const selected =
|
|
126
|
+
const selected = SelectMigrationSlice(allPaths, opts.currentVersion);
|
|
119
127
|
const checkoutTargets = selected.length > 0 ? selected : [migrationsRoot];
|
|
120
128
|
await git.raw(['sparse-checkout', 'set', '--no-cone', ...checkoutTargets]);
|
|
121
129
|
await git.raw(['checkout']);
|
|
122
|
-
return { dir, selected,
|
|
130
|
+
return { Dir: dir, Selected: selected, UsedFallback: false, Cleanup: cleanup };
|
|
123
131
|
}
|
|
124
132
|
catch (err) {
|
|
125
133
|
await cleanup();
|
|
126
134
|
throw err;
|
|
127
135
|
}
|
|
128
136
|
}
|
|
137
|
+
/** @deprecated Use {@link FetchMigrationSlice}. */
|
|
138
|
+
export async function fetchMigrationSlice(opts) {
|
|
139
|
+
return FetchMigrationSlice(opts);
|
|
140
|
+
}
|
|
129
141
|
/** Attempts a blobless, no-checkout shallow clone. Returns false if the server/git rejects the filter. */
|
|
130
142
|
async function tryPartialClone(git, repoUrl, ref, dir) {
|
|
131
143
|
try {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"migration-fetch.js","sourceRoot":"","sources":["../../src/lib/migration-fetch.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AACH,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AACtC,OAAO,EAAE,EAAE,EAAE,MAAM,kBAAkB,CAAC;AACtC,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACjC,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,OAAO,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAC;AAe1D,uFAAuF;AACvF,MAAM,kBAAkB,GAAG,eAAe,CAAC;AAE3C;;;;GAIG;AACH,MAAM,UAAU,aAAa,CAAC,WAAmB;IAC/C,MAAM,QAAQ,GAAG,mBAAmB,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;IACvD,IAAI,CAAC,QAAQ;QAAE,OAAO,WAAW,CAAC;IAClC,OAAO,WAAW,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,IAAI,WAAW,EAAE,CAAC;AACvE,CAAC;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,UAAU,oBAAoB,CAAC,KAAwB,EAAE,cAA8B;IAC3F,MAAM,QAAQ,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC,QAAQ,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AM,GAAG,CAAC,GAAG,CAAC,CAAC,iBAAiB,EAAE,KAAK,EAAE,cAAc,CAAC,CAAC,CAAC;AAC5D,CAAC;AAED,+FAA+F;AAC/F,KAAK,UAAU,aAAa,CAAC,GAAc,EAAE,cAAsB;IACjE,MAAM,GAAG,GAAG,MAAM,GAAG,CAAC,GAAG,CAAC,CAAC,SAAS,EAAE,IAAI,EAAE,aAAa,EAAE,MAAM,EAAE,IAAI,EAAE,cAAc,CAAC,CAAC,CAAC;IAC1F,OAAO,GAAG;SACP,KAAK,CAAC,IAAI,CAAC;SACX,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC;SAC1B,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;AACvC,CAAC"}
|
|
@@ -19,6 +19,8 @@ export declare const BACPAC_STANDALONE_COMPOSE = "docker/regression/docker-compo
|
|
|
19
19
|
* who only `npm i -g @memberjunction/cli` still have it. Returns the first path
|
|
20
20
|
* that exists, or the bundled path (so the caller can surface a clear error).
|
|
21
21
|
*/
|
|
22
|
+
export declare function ResolveStandaloneCompose(monorepoRelPath: string): string;
|
|
23
|
+
/** @deprecated Use {@link ResolveStandaloneCompose}. */
|
|
22
24
|
export declare function resolveStandaloneCompose(monorepoRelPath: string): string;
|
|
23
25
|
export declare const ENV_FILE = "docker/regression/.env.test";
|
|
24
26
|
export declare const TARGETS_DIR = "docker/regression/targets";
|
|
@@ -38,6 +40,8 @@ export declare const AGENTIC_TEST_RUNNER_IMAGE = "memberjunction/agentic-test-ru
|
|
|
38
40
|
* print a helpful message and exit. Phase 4 still requires the user to be in
|
|
39
41
|
* the monorepo; Phase 8 will publish the docker image and lift this guard.
|
|
40
42
|
*/
|
|
43
|
+
export declare function RequireMonorepoRoot(): void;
|
|
44
|
+
/** @deprecated Use {@link RequireMonorepoRoot}. */
|
|
41
45
|
export declare function requireMonorepoRoot(): void;
|
|
42
46
|
/**
|
|
43
47
|
* Soft check — returns true when there's an MJ monorepo at-or-above cwd.
|
|
@@ -48,20 +52,31 @@ export declare function requireMonorepoRoot(): void;
|
|
|
48
52
|
* The sentinel is the regression base compose file: it lives in every
|
|
49
53
|
* monorepo checkout and is never present in an external `npm i -g` install.
|
|
50
54
|
*/
|
|
55
|
+
export declare function IsInsideMonorepo(startDir?: string): boolean;
|
|
56
|
+
/** @deprecated Use {@link IsInsideMonorepo}. */
|
|
51
57
|
export declare function isInsideMonorepo(startDir?: string): boolean;
|
|
52
58
|
/** Returns true when `<cwd>/<ENV_FILE>` exists (e.g. user copied .env.test.example). */
|
|
59
|
+
export declare function EnvFileExists(): boolean;
|
|
60
|
+
/** @deprecated Use {@link EnvFileExists}. */
|
|
53
61
|
export declare function envFileExists(): boolean;
|
|
54
62
|
/**
|
|
55
63
|
* Spawn a child process inheriting stdio. Resolves with the exit code.
|
|
56
64
|
* The promise NEVER rejects on a non-zero exit code — callers inspect the
|
|
57
65
|
* resolved number and propagate it to the user.
|
|
58
66
|
*/
|
|
67
|
+
export declare function SpawnInherit(command: string, args: string[], options?: SpawnOptions): Promise<number>;
|
|
68
|
+
/** @deprecated Use {@link SpawnInherit}. */
|
|
59
69
|
export declare function spawnInherit(command: string, args: string[], options?: SpawnOptions): Promise<number>;
|
|
60
70
|
/**
|
|
61
71
|
* Capture stdout from a child process (stderr inherited so errors surface).
|
|
62
72
|
* Resolves with { code, stdout }. Used by the remote subcommand to read the
|
|
63
73
|
* target-profile loader's JSON output without printing it to the user.
|
|
64
74
|
*/
|
|
75
|
+
export declare function SpawnCapture(command: string, args: string[], options?: SpawnOptions): Promise<{
|
|
76
|
+
code: number;
|
|
77
|
+
stdout: string;
|
|
78
|
+
}>;
|
|
79
|
+
/** @deprecated Use {@link SpawnCapture}. */
|
|
65
80
|
export declare function spawnCapture(command: string, args: string[], options?: SpawnOptions): Promise<{
|
|
66
81
|
code: number;
|
|
67
82
|
stdout: string;
|
|
@@ -76,6 +91,8 @@ export declare function spawnCapture(command: string, args: string[], options?:
|
|
|
76
91
|
* directory (the base compose file at `docker/regression/`), NOT against the
|
|
77
92
|
* overlay's own location.
|
|
78
93
|
*/
|
|
94
|
+
export declare function DockerComposeArgs(profile?: string, extra?: string[], overlays?: string[]): string[];
|
|
95
|
+
/** @deprecated Use {@link DockerComposeArgs}. */
|
|
79
96
|
export declare function dockerComposeArgs(profile?: string, extra?: string[], overlays?: string[]): string[];
|
|
80
97
|
/**
|
|
81
98
|
* Resolve a target-profile argument to an absolute path. Accepts:
|
|
@@ -84,6 +101,8 @@ export declare function dockerComposeArgs(profile?: string, extra?: string[], ov
|
|
|
84
101
|
* - "./my/elsewhere.target.json" → ./my/elsewhere.target.json (passthrough)
|
|
85
102
|
* - absolute path → unchanged
|
|
86
103
|
*/
|
|
104
|
+
export declare function ResolveTargetPath(input: string): string;
|
|
105
|
+
/** @deprecated Use {@link ResolveTargetPath}. */
|
|
87
106
|
export declare function resolveTargetPath(input: string): string;
|
|
88
107
|
/**
|
|
89
108
|
* Build a `docker run …` argument list for the published image (external,
|
|
@@ -91,6 +110,11 @@ export declare function resolveTargetPath(input: string): string;
|
|
|
91
110
|
* injected with `--env-file`; `host.docker.internal` is always mapped so a DB
|
|
92
111
|
* published on the host is reachable on Linux too.
|
|
93
112
|
*/
|
|
113
|
+
export declare function DockerRunArgs(image: string, subArgs: string[], opts?: {
|
|
114
|
+
mounts?: Array<[string, string]>;
|
|
115
|
+
envFile?: string;
|
|
116
|
+
}): string[];
|
|
117
|
+
/** @deprecated Use {@link DockerRunArgs}. */
|
|
94
118
|
export declare function dockerRunArgs(image: string, subArgs: string[], opts?: {
|
|
95
119
|
mounts?: Array<[string, string]>;
|
|
96
120
|
envFile?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"docker-helpers.d.ts","sourceRoot":"","sources":["../../../src/lib/regression/docker-helpers.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH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AK,GAAE,MAAM,EAAO,EACpB,QAAQ,GAAE,MAAM,EAAO,GACtB,MAAM,EAAE,CAYV;AAED,iDAAiD;AACjD,wBAAgB,iBAAiB,CAC/B,OAAO,CAAC,EAAE,MAAM,EAChB,KAAK,GAAE,MAAM,EAAO,EACpB,QAAQ,GAAE,MAAM,EAAO,GACtB,MAAM,EAAE,CAEV;AAED;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAKvD;AAED,iDAAiD;AACjD,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAEvD;AAED;;;;;GAKG;AACH,wBAAgB,aAAa,CAC3B,KAAK,EAAE,MAAM,EACb,OAAO,EAAE,MAAM,EAAE,EACjB,IAAI,GAAE;IAAE,MAAM,CAAC,EAAE,KAAK,CAAC,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAA;CAAO,GAChE,MAAM,EAAE,CAUV;AAED,6CAA6C;AAC7C,wBAAgB,aAAa,CAC3B,KAAK,EAAE,MAAM,EACb,OAAO,EAAE,MAAM,EAAE,EACjB,IAAI,GAAE;IAAE,MAAM,CAAC,EAAE,KAAK,CAAC,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAA;CAAO,GAChE,MAAM,EAAE,CAEV"}
|
|
@@ -28,13 +28,17 @@ const PKG_ROOT = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..'
|
|
|
28
28
|
* who only `npm i -g @memberjunction/cli` still have it. Returns the first path
|
|
29
29
|
* that exists, or the bundled path (so the caller can surface a clear error).
|
|
30
30
|
*/
|
|
31
|
-
export function
|
|
31
|
+
export function ResolveStandaloneCompose(monorepoRelPath) {
|
|
32
32
|
const monorepo = path.resolve(monorepoRelPath);
|
|
33
33
|
if (existsSync(monorepo))
|
|
34
34
|
return monorepo;
|
|
35
35
|
const bundled = path.join(PKG_ROOT, 'regression-compose', path.basename(monorepoRelPath));
|
|
36
36
|
return existsSync(bundled) ? bundled : monorepo;
|
|
37
37
|
}
|
|
38
|
+
/** @deprecated Use {@link ResolveStandaloneCompose}. */
|
|
39
|
+
export function resolveStandaloneCompose(monorepoRelPath) {
|
|
40
|
+
return ResolveStandaloneCompose(monorepoRelPath);
|
|
41
|
+
}
|
|
38
42
|
export const ENV_FILE = `${REGRESSION_DIR}/.env.test`;
|
|
39
43
|
export const TARGETS_DIR = `${REGRESSION_DIR}/targets`;
|
|
40
44
|
export const LOAD_TARGET_SCRIPT = `${REGRESSION_DIR}/scripts/load-target-profile.cjs`;
|
|
@@ -53,7 +57,7 @@ export const AGENTIC_TEST_RUNNER_IMAGE = 'memberjunction/agentic-test-runner:lat
|
|
|
53
57
|
* print a helpful message and exit. Phase 4 still requires the user to be in
|
|
54
58
|
* the monorepo; Phase 8 will publish the docker image and lift this guard.
|
|
55
59
|
*/
|
|
56
|
-
export function
|
|
60
|
+
export function RequireMonorepoRoot() {
|
|
57
61
|
if (!existsSync(COMPOSE_FILE)) {
|
|
58
62
|
process.stderr.write(`✗ Expected to find ${COMPOSE_FILE} relative to the current directory.\n` +
|
|
59
63
|
` 'mj test regression *' commands must be run from the MemberJunction\n` +
|
|
@@ -62,6 +66,10 @@ export function requireMonorepoRoot() {
|
|
|
62
66
|
process.exit(1);
|
|
63
67
|
}
|
|
64
68
|
}
|
|
69
|
+
/** @deprecated Use {@link RequireMonorepoRoot}. */
|
|
70
|
+
export function requireMonorepoRoot() {
|
|
71
|
+
return RequireMonorepoRoot();
|
|
72
|
+
}
|
|
65
73
|
/**
|
|
66
74
|
* Soft check — returns true when there's an MJ monorepo at-or-above cwd.
|
|
67
75
|
* Used by commands (compare, up, export, remote) to pick monorepo-relative
|
|
@@ -71,7 +79,7 @@ export function requireMonorepoRoot() {
|
|
|
71
79
|
* The sentinel is the regression base compose file: it lives in every
|
|
72
80
|
* monorepo checkout and is never present in an external `npm i -g` install.
|
|
73
81
|
*/
|
|
74
|
-
export function
|
|
82
|
+
export function IsInsideMonorepo(startDir = process.cwd()) {
|
|
75
83
|
let dir = path.resolve(startDir);
|
|
76
84
|
const root = path.parse(dir).root;
|
|
77
85
|
while (dir !== root) {
|
|
@@ -81,16 +89,24 @@ export function isInsideMonorepo(startDir = process.cwd()) {
|
|
|
81
89
|
}
|
|
82
90
|
return false;
|
|
83
91
|
}
|
|
92
|
+
/** @deprecated Use {@link IsInsideMonorepo}. */
|
|
93
|
+
export function isInsideMonorepo(startDir = process.cwd()) {
|
|
94
|
+
return IsInsideMonorepo(startDir);
|
|
95
|
+
}
|
|
84
96
|
/** Returns true when `<cwd>/<ENV_FILE>` exists (e.g. user copied .env.test.example). */
|
|
85
|
-
export function
|
|
97
|
+
export function EnvFileExists() {
|
|
86
98
|
return existsSync(ENV_FILE);
|
|
87
99
|
}
|
|
100
|
+
/** @deprecated Use {@link EnvFileExists}. */
|
|
101
|
+
export function envFileExists() {
|
|
102
|
+
return EnvFileExists();
|
|
103
|
+
}
|
|
88
104
|
/**
|
|
89
105
|
* Spawn a child process inheriting stdio. Resolves with the exit code.
|
|
90
106
|
* The promise NEVER rejects on a non-zero exit code — callers inspect the
|
|
91
107
|
* resolved number and propagate it to the user.
|
|
92
108
|
*/
|
|
93
|
-
export function
|
|
109
|
+
export function SpawnInherit(command, args, options = {}) {
|
|
94
110
|
return new Promise((resolve) => {
|
|
95
111
|
const child = spawn(command, args, {
|
|
96
112
|
stdio: 'inherit',
|
|
@@ -103,12 +119,16 @@ export function spawnInherit(command, args, options = {}) {
|
|
|
103
119
|
});
|
|
104
120
|
});
|
|
105
121
|
}
|
|
122
|
+
/** @deprecated Use {@link SpawnInherit}. */
|
|
123
|
+
export function spawnInherit(command, args, options = {}) {
|
|
124
|
+
return SpawnInherit(command, args, options);
|
|
125
|
+
}
|
|
106
126
|
/**
|
|
107
127
|
* Capture stdout from a child process (stderr inherited so errors surface).
|
|
108
128
|
* Resolves with { code, stdout }. Used by the remote subcommand to read the
|
|
109
129
|
* target-profile loader's JSON output without printing it to the user.
|
|
110
130
|
*/
|
|
111
|
-
export function
|
|
131
|
+
export function SpawnCapture(command, args, options = {}) {
|
|
112
132
|
return new Promise((resolve) => {
|
|
113
133
|
const child = spawn(command, args, {
|
|
114
134
|
stdio: ['inherit', 'pipe', 'inherit'],
|
|
@@ -126,6 +146,10 @@ export function spawnCapture(command, args, options = {}) {
|
|
|
126
146
|
});
|
|
127
147
|
});
|
|
128
148
|
}
|
|
149
|
+
/** @deprecated Use {@link SpawnCapture}. */
|
|
150
|
+
export function spawnCapture(command, args, options = {}) {
|
|
151
|
+
return SpawnCapture(command, args, options);
|
|
152
|
+
}
|
|
129
153
|
/**
|
|
130
154
|
* Build the base `docker compose -f <file> --env-file <file>` argument list.
|
|
131
155
|
* Optionally prepends a profile and additional overlay files (Mode D).
|
|
@@ -136,12 +160,12 @@ export function spawnCapture(command, args, options = {}) {
|
|
|
136
160
|
* directory (the base compose file at `docker/regression/`), NOT against the
|
|
137
161
|
* overlay's own location.
|
|
138
162
|
*/
|
|
139
|
-
export function
|
|
163
|
+
export function DockerComposeArgs(profile, extra = [], overlays = []) {
|
|
140
164
|
const args = ['compose', '-f', COMPOSE_FILE];
|
|
141
165
|
for (const overlay of overlays) {
|
|
142
166
|
args.push('-f', overlay);
|
|
143
167
|
}
|
|
144
|
-
if (
|
|
168
|
+
if (EnvFileExists()) {
|
|
145
169
|
args.push('--env-file', ENV_FILE);
|
|
146
170
|
}
|
|
147
171
|
if (profile) {
|
|
@@ -149,6 +173,10 @@ export function dockerComposeArgs(profile, extra = [], overlays = []) {
|
|
|
149
173
|
}
|
|
150
174
|
return args.concat(extra);
|
|
151
175
|
}
|
|
176
|
+
/** @deprecated Use {@link DockerComposeArgs}. */
|
|
177
|
+
export function dockerComposeArgs(profile, extra = [], overlays = []) {
|
|
178
|
+
return DockerComposeArgs(profile, extra, overlays);
|
|
179
|
+
}
|
|
152
180
|
/**
|
|
153
181
|
* Resolve a target-profile argument to an absolute path. Accepts:
|
|
154
182
|
* - "staging-mj" → docker/regression/targets/staging-mj.target.json
|
|
@@ -156,7 +184,7 @@ export function dockerComposeArgs(profile, extra = [], overlays = []) {
|
|
|
156
184
|
* - "./my/elsewhere.target.json" → ./my/elsewhere.target.json (passthrough)
|
|
157
185
|
* - absolute path → unchanged
|
|
158
186
|
*/
|
|
159
|
-
export function
|
|
187
|
+
export function ResolveTargetPath(input) {
|
|
160
188
|
if (path.isAbsolute(input))
|
|
161
189
|
return input;
|
|
162
190
|
if (input.includes('/'))
|
|
@@ -164,13 +192,17 @@ export function resolveTargetPath(input) {
|
|
|
164
192
|
const withSuffix = input.endsWith('.target.json') ? input : `${input}.target.json`;
|
|
165
193
|
return path.resolve(TARGETS_DIR, withSuffix);
|
|
166
194
|
}
|
|
195
|
+
/** @deprecated Use {@link ResolveTargetPath}. */
|
|
196
|
+
export function resolveTargetPath(input) {
|
|
197
|
+
return ResolveTargetPath(input);
|
|
198
|
+
}
|
|
167
199
|
/**
|
|
168
200
|
* Build a `docker run …` argument list for the published image (external,
|
|
169
201
|
* no-monorepo path). Mounts are [hostPath, containerPath] pairs; envFile is
|
|
170
202
|
* injected with `--env-file`; `host.docker.internal` is always mapped so a DB
|
|
171
203
|
* published on the host is reachable on Linux too.
|
|
172
204
|
*/
|
|
173
|
-
export function
|
|
205
|
+
export function DockerRunArgs(image, subArgs, opts = {}) {
|
|
174
206
|
const args = ['run', '--rm', '--add-host', 'host.docker.internal:host-gateway'];
|
|
175
207
|
if (opts.envFile && existsSync(opts.envFile)) {
|
|
176
208
|
args.push('--env-file', opts.envFile);
|
|
@@ -181,4 +213,8 @@ export function dockerRunArgs(image, subArgs, opts = {}) {
|
|
|
181
213
|
args.push(image, ...subArgs);
|
|
182
214
|
return args;
|
|
183
215
|
}
|
|
216
|
+
/** @deprecated Use {@link DockerRunArgs}. */
|
|
217
|
+
export function dockerRunArgs(image, subArgs, opts = {}) {
|
|
218
|
+
return DockerRunArgs(image, subArgs, opts);
|
|
219
|
+
}
|
|
184
220
|
//# sourceMappingURL=docker-helpers.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"docker-helpers.js","sourceRoot":"","sources":["../../../src/lib/regression/docker-helpers.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,EAAE,KAAK,EAAqB,MAAM,oBAAoB,CAAC;AAC9D,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,MAAM,CAAC,MAAM,cAAc,GAAG,mBAAmB,CAAC;AAClD,MAAM,CAAC,MAAM,YAAY,GAAG,GAAG,cAAc,0BAA0B,CAAC;AACxE,MAAM,CAAC,MAAM,cAAc,GAAG,GAAG,cAAc,4BAA4B,CAAC;AAC5E,MAAM,CAAC,MAAM,kBAAkB,GAAG,GAAG,cAAc,gCAAgC,CAAC;AACpF,MAAM,CAAC,MAAM,yBAAyB,GAAG,GAAG,cAAc,uCAAuC,CAAC;AAElG;;;;GAIG;AACH,MAAM,QAAQ,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;AAE9F;;;;;;GAMG;AACH,MAAM,UAAU,wBAAwB,CAAC,eAAuB;IAC9D,MAAM,QAAQ,GAAG,IAAI,CAAC,OAAO,CAAC,eAAe,CAAC,CAAC;IAC/C,IAAI,UAAU,CAAC,QAAQ,CAAC;QAAE,OAAO,QAAQ,CAAC;IAC1C,MAAM,OAAO,GAAG,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,oBAAoB,EAAE,IAAI,CAAC,QAAQ,CAAC,eAAe,CAAC,CAAC,CAAC;IAC1F,OAAO,U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I,CAAC,IAAI,CAAC,YAAY,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;IACxC,CAAC;IACD,KAAK,MAAM,CAAC,QAAQ,EAAE,aAAa,CAAC,IAAI,IAAI,CAAC,MAAM,IAAI,EAAE,EAAE,CAAC;QAC1D,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,GAAG,QAAQ,IAAI,aAAa,EAAE,CAAC,CAAC;IAClD,CAAC;IACD,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE,GAAG,OAAO,CAAC,CAAC;IAC7B,OAAO,IAAI,CAAC;AACd,CAAC;AAED,6CAA6C;AAC7C,MAAM,UAAU,aAAa,CAC3B,KAAa,EACb,OAAiB,EACjB,OAA+D,EAAE;IAEjE,OAAO,aAAa,CAAC,KAAK,EAAE,OAAO,EAAE,IAAI,CAAC,CAAC;AAC7C,CAAC"}
|
|
@@ -5,10 +5,16 @@ type LogFn = (message: string) => void;
|
|
|
5
5
|
* {@link SerializeResult} the runtime host uses (single source of truth). For
|
|
6
6
|
* `text`, the caller supplies pre-rendered human lines.
|
|
7
7
|
*/
|
|
8
|
+
export declare function EmitUsage(log: LogFn, format: OutputFormat, result: MJCLIResult, textLines: string[]): void;
|
|
9
|
+
/** @deprecated Use {@link EmitUsage}. */
|
|
8
10
|
export declare function emitUsage(log: LogFn, format: OutputFormat, result: MJCLIResult, textLines: string[]): void;
|
|
9
11
|
/** Human-readable tier-1 domain map. */
|
|
12
|
+
export declare function RenderDomainMap(map: UsageDomainMap): string[];
|
|
13
|
+
/** @deprecated Use {@link RenderDomainMap}. */
|
|
10
14
|
export declare function renderDomainMap(map: UsageDomainMap): string[];
|
|
11
15
|
/** Human-readable tier-2 domain detail. */
|
|
16
|
+
export declare function RenderDomainDetail(detail: UsageDomainDetail): string[];
|
|
17
|
+
/** @deprecated Use {@link RenderDomainDetail}. */
|
|
12
18
|
export declare function renderDomainDetail(detail: UsageDomainDetail): string[];
|
|
13
19
|
export {};
|
|
14
20
|
//# sourceMappingURL=usage-render.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"usage-render.d.ts","sourceRoot":"","sources":["../../src/lib/usage-render.ts"],"names":[],"mappings":"AACA,OAAO,EAAmB,KAAK,WAAW,EAAE,KAAK,YAAY,EAAoB,KAAK,iBAAiB,EAAE,KAAK,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAE/J,KAAK,KAAK,GAAG,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;AAEvC;;;;GAIG;AACH,wBAAgB,SAAS,CAAC,GAAG,EAAE,KAAK,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,EAAE,GAAG,IAAI,CAO1G;AAED,wCAAwC;AACxC,wBAAgB,eAAe,CAAC,GAAG,EAAE,cAAc,GAAG,MAAM,EAAE,CAa7D;AAED,2CAA2C;AAC3C,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,iBAAiB,GAAG,MAAM,EAAE,CAsBtE"}
|
|
1
|
+
{"version":3,"file":"usage-render.d.ts","sourceRoot":"","sources":["../../src/lib/usage-render.ts"],"names":[],"mappings":"AACA,OAAO,EAAmB,KAAK,WAAW,EAAE,KAAK,YAAY,EAAoB,KAAK,iBAAiB,EAAE,KAAK,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAE/J,KAAK,KAAK,GAAG,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;AAEvC;;;;GAIG;AACH,wBAAgB,SAAS,CAAC,GAAG,EAAE,KAAK,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,EAAE,GAAG,IAAI,CAO1G;AAED,yCAAyC;AACzC,wBAAgB,SAAS,CAAC,GAAG,EAAE,KAAK,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,EAAE,GAAG,IAAI,CAE1G;AAED,wCAAwC;AACxC,wBAAgB,eAAe,CAAC,GAAG,EAAE,cAAc,GAAG,MAAM,EAAE,CAa7D;AAED,+CAA+C;AAC/C,wBAAgB,eAAe,CAAC,GAAG,EAAE,cAAc,GAAG,MAAM,EAAE,CAE7D;AAED,2CAA2C;AAC3C,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,iBAAiB,GAAG,MAAM,EAAE,CAsBtE;AAED,kDAAkD;AAClD,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,iBAAiB,GAAG,MAAM,EAAE,CAEtE"}
|
package/dist/lib/usage-render.js
CHANGED
|
@@ -5,7 +5,7 @@ import { SerializeResult } from '@memberjunction/cli-core';
|
|
|
5
5
|
* {@link SerializeResult} the runtime host uses (single source of truth). For
|
|
6
6
|
* `text`, the caller supplies pre-rendered human lines.
|
|
7
7
|
*/
|
|
8
|
-
export function
|
|
8
|
+
export function EmitUsage(log, format, result, textLines) {
|
|
9
9
|
if (format === 'json' || format === 'md') {
|
|
10
10
|
// Pretty only when a human is watching; a pipe gets one compact line.
|
|
11
11
|
log(SerializeResult(result, format, { pretty: process.stdout.isTTY === true }));
|
|
@@ -14,8 +14,12 @@ export function emitUsage(log, format, result, textLines) {
|
|
|
14
14
|
textLines.forEach((line) => log(line));
|
|
15
15
|
}
|
|
16
16
|
}
|
|
17
|
+
/** @deprecated Use {@link EmitUsage}. */
|
|
18
|
+
export function emitUsage(log, format, result, textLines) {
|
|
19
|
+
return EmitUsage(log, format, result, textLines);
|
|
20
|
+
}
|
|
17
21
|
/** Human-readable tier-1 domain map. */
|
|
18
|
-
export function
|
|
22
|
+
export function RenderDomainMap(map) {
|
|
19
23
|
const lines = [];
|
|
20
24
|
lines.push(chalk.bold('\nmj — command domains'));
|
|
21
25
|
lines.push(chalk.gray(map.guidance) + '\n');
|
|
@@ -29,8 +33,12 @@ export function renderDomainMap(map) {
|
|
|
29
33
|
lines.push(chalk.gray('Next: `mj <domain> usage` for that domain\'s commands, flags, and timeouts.'));
|
|
30
34
|
return lines;
|
|
31
35
|
}
|
|
36
|
+
/** @deprecated Use {@link RenderDomainMap}. */
|
|
37
|
+
export function renderDomainMap(map) {
|
|
38
|
+
return RenderDomainMap(map);
|
|
39
|
+
}
|
|
32
40
|
/** Human-readable tier-2 domain detail. */
|
|
33
|
-
export function
|
|
41
|
+
export function RenderDomainDetail(detail) {
|
|
34
42
|
const lines = [];
|
|
35
43
|
lines.push(chalk.bold(`\nmj ${detail.domain} — commands`));
|
|
36
44
|
if (detail.commands.length === 0) {
|
|
@@ -56,6 +64,10 @@ export function renderDomainDetail(detail) {
|
|
|
56
64
|
}
|
|
57
65
|
return lines;
|
|
58
66
|
}
|
|
67
|
+
/** @deprecated Use {@link RenderDomainDetail}. */
|
|
68
|
+
export function renderDomainDetail(detail) {
|
|
69
|
+
return RenderDomainDetail(detail);
|
|
70
|
+
}
|
|
59
71
|
function formatRuntime(cmd) {
|
|
60
72
|
const r = cmd.runtime;
|
|
61
73
|
const secs = r.typicalSeconds ? `~${r.typicalSeconds}s` : '';
|