@memberjunction/cli 5.37.0 → 5.38.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.
Files changed (150) hide show
  1. package/README.md +74 -0
  2. package/dist/baseline/cli-helpers.d.ts +12 -0
  3. package/dist/baseline/cli-helpers.d.ts.map +1 -0
  4. package/dist/baseline/cli-helpers.js +40 -0
  5. package/dist/baseline/cli-helpers.js.map +1 -0
  6. package/dist/baseline/comparator.d.ts +26 -0
  7. package/dist/baseline/comparator.d.ts.map +1 -0
  8. package/dist/baseline/comparator.js +527 -0
  9. package/dist/baseline/comparator.js.map +1 -0
  10. package/dist/baseline/connection.d.ts +39 -0
  11. package/dist/baseline/connection.d.ts.map +1 -0
  12. package/dist/baseline/connection.js +104 -0
  13. package/dist/baseline/connection.js.map +1 -0
  14. package/dist/baseline/data-dumper.d.ts +23 -0
  15. package/dist/baseline/data-dumper.d.ts.map +1 -0
  16. package/dist/baseline/data-dumper.js +94 -0
  17. package/dist/baseline/data-dumper.js.map +1 -0
  18. package/dist/baseline/emitter.d.ts +36 -0
  19. package/dist/baseline/emitter.d.ts.map +1 -0
  20. package/dist/baseline/emitter.js +512 -0
  21. package/dist/baseline/emitter.js.map +1 -0
  22. package/dist/baseline/index.d.ts +18 -0
  23. package/dist/baseline/index.d.ts.map +1 -0
  24. package/dist/baseline/index.js +14 -0
  25. package/dist/baseline/index.js.map +1 -0
  26. package/dist/baseline/introspector-mssql.d.ts +15 -0
  27. package/dist/baseline/introspector-mssql.d.ts.map +1 -0
  28. package/dist/baseline/introspector-mssql.js +673 -0
  29. package/dist/baseline/introspector-mssql.js.map +1 -0
  30. package/dist/baseline/introspector-postgres.d.ts +14 -0
  31. package/dist/baseline/introspector-postgres.d.ts.map +1 -0
  32. package/dist/baseline/introspector-postgres.js +277 -0
  33. package/dist/baseline/introspector-postgres.js.map +1 -0
  34. package/dist/baseline/report.d.ts +7 -0
  35. package/dist/baseline/report.d.ts.map +1 -0
  36. package/dist/baseline/report.js +105 -0
  37. package/dist/baseline/report.js.map +1 -0
  38. package/dist/baseline/types.d.ts +286 -0
  39. package/dist/baseline/types.d.ts.map +1 -0
  40. package/dist/baseline/types.js +10 -0
  41. package/dist/baseline/types.js.map +1 -0
  42. package/dist/baseline/util.d.ts +112 -0
  43. package/dist/baseline/util.d.ts.map +1 -0
  44. package/dist/baseline/util.js +325 -0
  45. package/dist/baseline/util.js.map +1 -0
  46. package/dist/commands/baseline/build.d.ts +29 -0
  47. package/dist/commands/baseline/build.d.ts.map +1 -0
  48. package/dist/commands/baseline/build.js +188 -0
  49. package/dist/commands/baseline/build.js.map +1 -0
  50. package/dist/commands/baseline/compare.d.ts +19 -0
  51. package/dist/commands/baseline/compare.d.ts.map +1 -0
  52. package/dist/commands/baseline/compare.js +133 -0
  53. package/dist/commands/baseline/compare.js.map +1 -0
  54. package/dist/commands/baseline/roundtrip.d.ts +23 -0
  55. package/dist/commands/baseline/roundtrip.d.ts.map +1 -0
  56. package/dist/commands/baseline/roundtrip.js +245 -0
  57. package/dist/commands/baseline/roundtrip.js.map +1 -0
  58. package/dist/commands/test/compare.d.ts +3 -0
  59. package/dist/commands/test/compare.d.ts.map +1 -1
  60. package/dist/commands/test/compare.js +23 -3
  61. package/dist/commands/test/compare.js.map +1 -1
  62. package/dist/commands/test/regression/build.d.ts +14 -0
  63. package/dist/commands/test/regression/build.d.ts.map +1 -0
  64. package/dist/commands/test/regression/build.js +48 -0
  65. package/dist/commands/test/regression/build.js.map +1 -0
  66. package/dist/commands/test/regression/compare.d.ts +15 -0
  67. package/dist/commands/test/regression/compare.d.ts.map +1 -0
  68. package/dist/commands/test/regression/compare.js +66 -0
  69. package/dist/commands/test/regression/compare.js.map +1 -0
  70. package/dist/commands/test/regression/down.d.ts +10 -0
  71. package/dist/commands/test/regression/down.d.ts.map +1 -0
  72. package/dist/commands/test/regression/down.js +29 -0
  73. package/dist/commands/test/regression/down.js.map +1 -0
  74. package/dist/commands/test/regression/export.d.ts +11 -0
  75. package/dist/commands/test/regression/export.d.ts.map +1 -0
  76. package/dist/commands/test/regression/export.js +56 -0
  77. package/dist/commands/test/regression/export.js.map +1 -0
  78. package/dist/commands/test/regression/gen-forms.d.ts +7 -0
  79. package/dist/commands/test/regression/gen-forms.d.ts.map +1 -0
  80. package/dist/commands/test/regression/gen-forms.js +18 -0
  81. package/dist/commands/test/regression/gen-forms.js.map +1 -0
  82. package/dist/commands/test/regression/index.d.ts +7 -0
  83. package/dist/commands/test/regression/index.d.ts.map +1 -0
  84. package/dist/commands/test/regression/index.js +33 -0
  85. package/dist/commands/test/regression/index.js.map +1 -0
  86. package/dist/commands/test/regression/init.d.ts +21 -0
  87. package/dist/commands/test/regression/init.d.ts.map +1 -0
  88. package/dist/commands/test/regression/init.js +111 -0
  89. package/dist/commands/test/regression/init.js.map +1 -0
  90. package/dist/commands/test/regression/remote.d.ts +23 -0
  91. package/dist/commands/test/regression/remote.d.ts.map +1 -0
  92. package/dist/commands/test/regression/remote.js +140 -0
  93. package/dist/commands/test/regression/remote.js.map +1 -0
  94. package/dist/commands/test/regression/up.d.ts +21 -0
  95. package/dist/commands/test/regression/up.d.ts.map +1 -0
  96. package/dist/commands/test/regression/up.js +111 -0
  97. package/dist/commands/test/regression/up.js.map +1 -0
  98. package/dist/commands/test/run.d.ts +1 -0
  99. package/dist/commands/test/run.d.ts.map +1 -1
  100. package/dist/commands/test/run.js +6 -0
  101. package/dist/commands/test/run.js.map +1 -1
  102. package/dist/commands/test/suite.d.ts +5 -0
  103. package/dist/commands/test/suite.d.ts.map +1 -1
  104. package/dist/commands/test/suite.js +27 -0
  105. package/dist/commands/test/suite.js.map +1 -1
  106. package/dist/commands/translate-sql/index.d.ts.map +1 -1
  107. package/dist/commands/translate-sql/index.js +3 -2
  108. package/dist/commands/translate-sql/index.js.map +1 -1
  109. package/dist/init-templates/bring-your-own-app/README.md +74 -0
  110. package/dist/init-templates/bring-your-own-app/byo-metadata/.mj-sync.json +10 -0
  111. package/dist/init-templates/bring-your-own-app/byo-metadata/test-suites/.byo-suite.json +51 -0
  112. package/dist/init-templates/bring-your-own-app/byo-metadata/test-suites/.mj-sync.json +12 -0
  113. package/dist/init-templates/bring-your-own-app/byo-metadata/tests/.T01-counter-increment.json +63 -0
  114. package/dist/init-templates/bring-your-own-app/byo-metadata/tests/.T02-contact-form-submit.json +63 -0
  115. package/dist/init-templates/bring-your-own-app/byo-metadata/tests/.mj-sync.json +12 -0
  116. package/dist/init-templates/bring-your-own-app/docker-compose.app.yml +76 -0
  117. package/dist/init-templates/bring-your-own-app/target.json +23 -0
  118. package/dist/init-templates/generic-web/README.md +115 -0
  119. package/dist/init-templates/generic-web/metadata/.mj-sync.json +10 -0
  120. package/dist/init-templates/generic-web/metadata/test-suites/.generic-web-suite.json +48 -0
  121. package/dist/init-templates/generic-web/metadata/test-suites/.mj-sync.json +12 -0
  122. package/dist/init-templates/generic-web/metadata/tests/.GW01-home-loads.json +74 -0
  123. package/dist/init-templates/generic-web/metadata/tests/.GW02-search-array-map.json +82 -0
  124. package/dist/init-templates/generic-web/metadata/tests/.mj-sync.json +12 -0
  125. package/dist/init-templates/generic-web/oracles/mdn-oracles.cjs +121 -0
  126. package/dist/init-templates/generic-web/target.json +25 -0
  127. package/dist/init-templates/github-actions/README.md +26 -0
  128. package/dist/init-templates/github-actions/regression.yml +52 -0
  129. package/dist/init-templates/remote-mj/README.md +95 -0
  130. package/dist/init-templates/remote-mj/target.json +22 -0
  131. package/dist/init-templates/static-file-server/Dockerfile +23 -0
  132. package/dist/init-templates/static-file-server/README.md +88 -0
  133. package/dist/init-templates/static-file-server/docker-compose.app.yml +44 -0
  134. package/dist/init-templates/static-file-server/metadata/.mj-sync.json +10 -0
  135. package/dist/init-templates/static-file-server/metadata/test-suites/.mj-sync.json +12 -0
  136. package/dist/init-templates/static-file-server/metadata/test-suites/.static-server-suite.json +27 -0
  137. package/dist/init-templates/static-file-server/metadata/tests/.SS01-home-loads.json +45 -0
  138. package/dist/init-templates/static-file-server/metadata/tests/.SS02-navigate-about.json +45 -0
  139. package/dist/init-templates/static-file-server/metadata/tests/.mj-sync.json +12 -0
  140. package/dist/init-templates/static-file-server/public/about.html +12 -0
  141. package/dist/init-templates/static-file-server/public/index.html +27 -0
  142. package/dist/init-templates/static-file-server/target.json +16 -0
  143. package/dist/lib/regression/docker-helpers.d.ts +98 -0
  144. package/dist/lib/regression/docker-helpers.d.ts.map +1 -0
  145. package/dist/lib/regression/docker-helpers.js +184 -0
  146. package/dist/lib/regression/docker-helpers.js.map +1 -0
  147. package/oclif.manifest.json +1356 -509
  148. package/package.json +22 -17
  149. package/regression-compose/docker-compose.bacpac-standalone.yml +109 -0
  150. package/regression-compose/docker-compose.standalone.yml +50 -0
@@ -0,0 +1,184 @@
1
+ /**
2
+ * Shared helpers for `mj test regression *` subcommands.
3
+ *
4
+ * The CLI commands themselves are thin oclif wrappers — they just spawn
5
+ * `docker compose` / `bash` with the right flags. All the wiring (path
6
+ * resolution, profile selection, error reporting) lives here so the same
7
+ * conventions apply across every subcommand.
8
+ */
9
+ import { spawn } from 'node:child_process';
10
+ import { existsSync } from 'node:fs';
11
+ import { fileURLToPath } from 'node:url';
12
+ import path from 'node:path';
13
+ export const REGRESSION_DIR = 'docker/regression';
14
+ export const COMPOSE_FILE = `${REGRESSION_DIR}/docker-compose.test.yml`;
15
+ export const BACPAC_OVERLAY = `${REGRESSION_DIR}/docker-compose.bacpac.yml`;
16
+ export const STANDALONE_COMPOSE = `${REGRESSION_DIR}/docker-compose.standalone.yml`;
17
+ export const BACPAC_STANDALONE_COMPOSE = `${REGRESSION_DIR}/docker-compose.bacpac-standalone.yml`;
18
+ /**
19
+ * Package root of @memberjunction/cli (resolved from this compiled module at
20
+ * dist/lib/regression/docker-helpers.js → up 3). Used to locate compose assets
21
+ * bundled into the published package for external (no-monorepo) use.
22
+ */
23
+ const PKG_ROOT = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..', '..', '..');
24
+ /**
25
+ * Resolve a standalone compose file. Prefers the monorepo copy (cwd-relative
26
+ * `docker/regression/<name>`); falls back to the copy bundled into this CLI
27
+ * package at build time (`<pkg>/regression-compose/<name>`) so external users
28
+ * who only `npm i -g @memberjunction/cli` still have it. Returns the first path
29
+ * that exists, or the bundled path (so the caller can surface a clear error).
30
+ */
31
+ export function resolveStandaloneCompose(monorepoRelPath) {
32
+ const monorepo = path.resolve(monorepoRelPath);
33
+ if (existsSync(monorepo))
34
+ return monorepo;
35
+ const bundled = path.join(PKG_ROOT, 'regression-compose', path.basename(monorepoRelPath));
36
+ return existsSync(bundled) ? bundled : monorepo;
37
+ }
38
+ export const ENV_FILE = `${REGRESSION_DIR}/.env.test`;
39
+ export const TARGETS_DIR = `${REGRESSION_DIR}/targets`;
40
+ export const LOAD_TARGET_SCRIPT = `${REGRESSION_DIR}/scripts/load-target-profile.cjs`;
41
+ export const GEN_FORMS_SCRIPT = `${REGRESSION_DIR}/gen-forms.sh`;
42
+ export const RESULTS_DIR = `${REGRESSION_DIR}/test-results`;
43
+ export const INLINE_REPORT_SCRIPT = `${REGRESSION_DIR}/scripts/inline-report.cjs`;
44
+ /**
45
+ * The pinned runner image tag used when `init` (and future external invocations)
46
+ * shell out to `docker run memberjunction/agentic-test-runner …`. Kept here so
47
+ * a single bump updates every CLI command that consumes the image. The
48
+ * version is pinned to the most recent release that includes Phase 8.
49
+ */
50
+ export const AGENTIC_TEST_RUNNER_IMAGE = 'memberjunction/agentic-test-runner:latest';
51
+ /**
52
+ * Verify the current working directory is the MJ monorepo root. If it isn't,
53
+ * print a helpful message and exit. Phase 4 still requires the user to be in
54
+ * the monorepo; Phase 8 will publish the docker image and lift this guard.
55
+ */
56
+ export function requireMonorepoRoot() {
57
+ if (!existsSync(COMPOSE_FILE)) {
58
+ process.stderr.write(`✗ Expected to find ${COMPOSE_FILE} relative to the current directory.\n` +
59
+ ` 'mj test regression *' commands must be run from the MemberJunction\n` +
60
+ ` monorepo root. (Phase 8 will lift this requirement by publishing the\n` +
61
+ ` test-runner image; for now, cd into the MJ repo first.)\n`);
62
+ process.exit(1);
63
+ }
64
+ }
65
+ /**
66
+ * Soft check — returns true when there's an MJ monorepo at-or-above cwd.
67
+ * Used by commands (compare, up, export, remote) to pick monorepo-relative
68
+ * paths over external/published-image paths. Unlike `requireMonorepoRoot()`,
69
+ * this does NOT exit on failure.
70
+ *
71
+ * The sentinel is the regression base compose file: it lives in every
72
+ * monorepo checkout and is never present in an external `npm i -g` install.
73
+ */
74
+ export function isInsideMonorepo(startDir = process.cwd()) {
75
+ let dir = path.resolve(startDir);
76
+ const root = path.parse(dir).root;
77
+ while (dir !== root) {
78
+ if (existsSync(path.join(dir, COMPOSE_FILE)))
79
+ return true;
80
+ dir = path.dirname(dir);
81
+ }
82
+ return false;
83
+ }
84
+ /** Returns true when `<cwd>/<ENV_FILE>` exists (e.g. user copied .env.test.example). */
85
+ export function envFileExists() {
86
+ return existsSync(ENV_FILE);
87
+ }
88
+ /**
89
+ * Spawn a child process inheriting stdio. Resolves with the exit code.
90
+ * The promise NEVER rejects on a non-zero exit code — callers inspect the
91
+ * resolved number and propagate it to the user.
92
+ */
93
+ export function spawnInherit(command, args, options = {}) {
94
+ return new Promise((resolve) => {
95
+ const child = spawn(command, args, {
96
+ stdio: 'inherit',
97
+ ...options,
98
+ });
99
+ child.on('exit', (code) => resolve(code ?? 1));
100
+ child.on('error', (err) => {
101
+ process.stderr.write(`✗ failed to spawn ${command}: ${err.message}\n`);
102
+ resolve(1);
103
+ });
104
+ });
105
+ }
106
+ /**
107
+ * Capture stdout from a child process (stderr inherited so errors surface).
108
+ * Resolves with { code, stdout }. Used by the remote subcommand to read the
109
+ * target-profile loader's JSON output without printing it to the user.
110
+ */
111
+ export function spawnCapture(command, args, options = {}) {
112
+ return new Promise((resolve) => {
113
+ const child = spawn(command, args, {
114
+ stdio: ['inherit', 'pipe', 'inherit'],
115
+ ...options,
116
+ });
117
+ let stdout = '';
118
+ child.stdout?.setEncoding('utf8');
119
+ child.stdout?.on('data', (chunk) => {
120
+ stdout += chunk;
121
+ });
122
+ child.on('exit', (code) => resolve({ code: code ?? 1, stdout }));
123
+ child.on('error', (err) => {
124
+ process.stderr.write(`✗ failed to spawn ${command}: ${err.message}\n`);
125
+ resolve({ code: 1, stdout: '' });
126
+ });
127
+ });
128
+ }
129
+ /**
130
+ * Build the base `docker compose -f <file> --env-file <file>` argument list.
131
+ * Optionally prepends a profile and additional overlay files (Mode D).
132
+ *
133
+ * Overlays are passed as additional `-f` flags AFTER the base compose file —
134
+ * compose merges them in order, so later overlays override earlier ones.
135
+ * Relative paths inside an overlay resolve against the FIRST `-f` file's
136
+ * directory (the base compose file at `docker/regression/`), NOT against the
137
+ * overlay's own location.
138
+ */
139
+ export function dockerComposeArgs(profile, extra = [], overlays = []) {
140
+ const args = ['compose', '-f', COMPOSE_FILE];
141
+ for (const overlay of overlays) {
142
+ args.push('-f', overlay);
143
+ }
144
+ if (envFileExists()) {
145
+ args.push('--env-file', ENV_FILE);
146
+ }
147
+ if (profile) {
148
+ args.push('--profile', profile);
149
+ }
150
+ return args.concat(extra);
151
+ }
152
+ /**
153
+ * Resolve a target-profile argument to an absolute path. Accepts:
154
+ * - "staging-mj" → docker/regression/targets/staging-mj.target.json
155
+ * - "staging-mj.target.json" → docker/regression/targets/staging-mj.target.json
156
+ * - "./my/elsewhere.target.json" → ./my/elsewhere.target.json (passthrough)
157
+ * - absolute path → unchanged
158
+ */
159
+ export function resolveTargetPath(input) {
160
+ if (path.isAbsolute(input))
161
+ return input;
162
+ if (input.includes('/'))
163
+ return path.resolve(input);
164
+ const withSuffix = input.endsWith('.target.json') ? input : `${input}.target.json`;
165
+ return path.resolve(TARGETS_DIR, withSuffix);
166
+ }
167
+ /**
168
+ * Build a `docker run …` argument list for the published image (external,
169
+ * no-monorepo path). Mounts are [hostPath, containerPath] pairs; envFile is
170
+ * injected with `--env-file`; `host.docker.internal` is always mapped so a DB
171
+ * published on the host is reachable on Linux too.
172
+ */
173
+ export function dockerRunArgs(image, subArgs, opts = {}) {
174
+ const args = ['run', '--rm', '--add-host', 'host.docker.internal:host-gateway'];
175
+ if (opts.envFile && existsSync(opts.envFile)) {
176
+ args.push('--env-file', opts.envFile);
177
+ }
178
+ for (const [hostPath, containerPath] of opts.mounts ?? []) {
179
+ args.push('-v', `${hostPath}:${containerPath}`);
180
+ }
181
+ args.push(image, ...subArgs);
182
+ return args;
183
+ }
184
+ //# sourceMappingURL=docker-helpers.js.map
@@ -0,0 +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,IAA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