@essential-apps/shopify-test-runner 1.0.11 → 1.0.13
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/lib/guestVnc.d.ts +31 -0
- package/dist/lib/guestVnc.d.ts.map +1 -0
- package/dist/lib/guestVnc.js +111 -0
- package/dist/lib/guestVnc.js.map +1 -0
- package/dist/probes/runProbe.js +0 -0
- package/dist/scripts/addStore.js +0 -0
- package/dist/scripts/buildImage.d.ts +3 -0
- package/dist/scripts/buildImage.d.ts.map +1 -0
- package/dist/scripts/{buildDockerImage.js → buildImage.js} +12 -10
- package/dist/scripts/buildImage.js.map +1 -0
- package/dist/scripts/captureAuth.js +0 -0
- package/dist/scripts/captureContracts.js +0 -0
- package/dist/scripts/captureRestContracts.js +0 -0
- package/dist/scripts/captureSharedContracts.d.ts +3 -0
- package/dist/scripts/captureSharedContracts.d.ts.map +1 -0
- package/dist/scripts/captureSharedContracts.js +209 -0
- package/dist/scripts/captureSharedContracts.js.map +1 -0
- package/dist/scripts/checkOperationCoverage.js +0 -0
- package/dist/scripts/cleanupStores.js +0 -0
- package/dist/scripts/createStores.js +0 -0
- package/dist/scripts/deployAppVersion.js +0 -0
- package/dist/scripts/devOnlineBackend.js +0 -0
- package/dist/scripts/installApp.js +0 -0
- package/dist/scripts/listStores.js +0 -0
- package/dist/scripts/runOffline.js +83 -1
- package/dist/scripts/runOffline.js.map +1 -1
- package/dist/scripts/runOfflineFullTests.js +82 -6
- package/dist/scripts/runOfflineFullTests.js.map +1 -1
- package/dist/scripts/runTests.js +0 -0
- package/dist/scripts/runVm.js +0 -0
- package/dist/scripts/runVmAuth.js +0 -0
- package/dist/scripts/setupTestDb.js +0 -0
- package/dist/scripts/verifyContracts.js +20 -29
- package/dist/scripts/verifyContracts.js.map +1 -1
- package/dist/scripts/verifyRestContracts.js +17 -30
- package/dist/scripts/verifyRestContracts.js.map +1 -1
- package/docker/Dockerfile.vm +1 -0
- package/package.json +11 -9
- package/src/lib/guestVnc.ts +147 -0
- package/src/scripts/{buildDockerImage.ts → buildImage.ts} +11 -9
- package/src/scripts/captureSharedContracts.ts +228 -0
- package/src/scripts/runOffline.ts +87 -1
- package/src/scripts/runOfflineFullTests.ts +94 -6
- package/src/scripts/verifyContracts.ts +22 -38
- package/src/scripts/verifyRestContracts.ts +23 -42
- package/dist/edge/nodeShim.d.ts +0 -2
- package/dist/edge/nodeShim.d.ts.map +0 -1
- package/dist/edge/nodeShim.js +0 -217
- package/dist/edge/nodeShim.js.map +0 -1
- package/dist/scripts/_probeSourceUrl.d.ts +0 -3
- package/dist/scripts/_probeSourceUrl.d.ts.map +0 -1
- package/dist/scripts/_probeSourceUrl.js +0 -119
- package/dist/scripts/_probeSourceUrl.js.map +0 -1
- package/dist/scripts/buildDockerImage.d.ts +0 -3
- package/dist/scripts/buildDockerImage.d.ts.map +0 -1
- package/dist/scripts/buildDockerImage.js.map +0 -1
- package/dist/scripts/devE2eBackend.d.ts +0 -3
- package/dist/scripts/devE2eBackend.d.ts.map +0 -1
- package/dist/scripts/devE2eBackend.js +0 -117
- package/dist/scripts/devE2eBackend.js.map +0 -1
- package/dist/scripts/runDocker.d.ts +0 -3
- package/dist/scripts/runDocker.d.ts.map +0 -1
- package/dist/scripts/runDocker.js +0 -88
- package/dist/scripts/runDocker.js.map +0 -1
- package/dist/scripts/runDockerAuth.d.ts +0 -3
- package/dist/scripts/runDockerAuth.d.ts.map +0 -1
- package/dist/scripts/runDockerAuth.js +0 -108
- package/dist/scripts/runDockerAuth.js.map +0 -1
- package/dist/scripts/runDockerOffline.d.ts +0 -3
- package/dist/scripts/runDockerOffline.d.ts.map +0 -1
- package/dist/scripts/runDockerOffline.js +0 -129
- package/dist/scripts/runDockerOffline.js.map +0 -1
- package/dist/scripts/runDockerOfflineExplore.d.ts +0 -3
- package/dist/scripts/runDockerOfflineExplore.d.ts.map +0 -1
- package/dist/scripts/runDockerOfflineExplore.js +0 -116
- package/dist/scripts/runDockerOfflineExplore.js.map +0 -1
- package/dist/scripts/runIsolatedDockerOffline.d.ts +0 -3
- package/dist/scripts/runIsolatedDockerOffline.d.ts.map +0 -1
- package/dist/scripts/runIsolatedDockerOffline.js +0 -351
- package/dist/scripts/runIsolatedDockerOffline.js.map +0 -1
- package/dist/scripts/runOfflineE2e.d.ts +0 -3
- package/dist/scripts/runOfflineE2e.d.ts.map +0 -1
- package/dist/scripts/runOfflineE2e.js +0 -408
- package/dist/scripts/runOfflineE2e.js.map +0 -1
- package/dist/scripts/runSupermachine.d.ts +0 -3
- package/dist/scripts/runSupermachine.d.ts.map +0 -1
- package/dist/scripts/runSupermachine.js +0 -474
- package/dist/scripts/runSupermachine.js.map +0 -1
- package/dist/scripts/runSupermachineAuth.d.ts +0 -3
- package/dist/scripts/runSupermachineAuth.d.ts.map +0 -1
- package/dist/scripts/runSupermachineAuth.js +0 -454
- package/dist/scripts/runSupermachineAuth.js.map +0 -1
- package/dist/vite/offlineConfig.d.ts +0 -34
- package/dist/vite/offlineConfig.d.ts.map +0 -1
- package/dist/vite/offlineConfig.js +0 -61
- package/dist/vite/offlineConfig.js.map +0 -1
- package/src/scripts/runDockerAuth.ts +0 -120
|
@@ -1,129 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
/**
|
|
3
|
-
* Run the OFFLINE-FULL test suite inside Apple's `container`
|
|
4
|
-
* (libkrun-based microVM) — same image as `runDocker.ts`, different
|
|
5
|
-
* entrypoint.
|
|
6
|
-
*
|
|
7
|
-
* Why a separate script vs. `runDocker`:
|
|
8
|
-
* - runDocker invokes `runTests.js` (live tests against real cloud Shopify)
|
|
9
|
-
* - runDockerOffline invokes `runOfflineFullTests.js` (mock stack, no internet)
|
|
10
|
-
*
|
|
11
|
-
* Why offline tests in a container at all (vs. running host-native,
|
|
12
|
-
* which also works):
|
|
13
|
-
* - /etc/hosts + system CA trust eliminate three layers of bypass
|
|
14
|
-
* we'd otherwise need on host: --host-resolver-rules,
|
|
15
|
-
* --ignore-certificate-errors, and the Node socket shim.
|
|
16
|
-
* - Production-shape DNS + TLS: real getaddrinfo, real cert trust
|
|
17
|
-
* chain, real port 443 binding. Closer to "1-to-1 production
|
|
18
|
-
* recreation" than the host-native approach.
|
|
19
|
-
* - Architectural consistency: live tests already run in this
|
|
20
|
-
* container, offline tests should too.
|
|
21
|
-
*
|
|
22
|
-
* Architecture mirrors runDocker.ts: bind-mount the app repo and a
|
|
23
|
-
* cached Linux node_modules, plus the shopify-test repo if it lives
|
|
24
|
-
* outside the app (for `file:`-symlink stability).
|
|
25
|
-
*/
|
|
26
|
-
import { spawn } from 'node:child_process';
|
|
27
|
-
import { existsSync, mkdirSync, readFileSync } from 'node:fs';
|
|
28
|
-
import { homedir } from 'node:os';
|
|
29
|
-
import { resolve } from 'node:path';
|
|
30
|
-
const repoRoot = process.cwd();
|
|
31
|
-
function readAppName() {
|
|
32
|
-
const pkgPath = resolve(repoRoot, 'package.json');
|
|
33
|
-
if (!existsSync(pkgPath)) {
|
|
34
|
-
throw new Error(`No package.json at ${pkgPath}. Run this from the consuming app's repo root.`);
|
|
35
|
-
}
|
|
36
|
-
const pkg = JSON.parse(readFileSync(pkgPath, 'utf8'));
|
|
37
|
-
if (!pkg.name) {
|
|
38
|
-
throw new Error(`package.json at ${pkgPath} has no \`name\` field.`);
|
|
39
|
-
}
|
|
40
|
-
return pkg.name.replace(/^@[^/]+\//, '');
|
|
41
|
-
}
|
|
42
|
-
async function main() {
|
|
43
|
-
const appName = readAppName();
|
|
44
|
-
const image = process.env['E2E_IMAGE'] ?? `${appName}-e2e:latest`;
|
|
45
|
-
const linuxModules = process.env['E2E_LINUX_NODE_MODULES'] ??
|
|
46
|
-
resolve(homedir(), `.cache/${appName}-e2e/node_modules`);
|
|
47
|
-
mkdirSync(linuxModules, { recursive: true });
|
|
48
|
-
// Forward any extra args (e.g. `--grep "..."`) to the offline
|
|
49
|
-
// runner. The container's bash -c sees a single string; we
|
|
50
|
-
// JSON-escape each forwarded arg.
|
|
51
|
-
const forwarded = process.argv
|
|
52
|
-
.slice(2)
|
|
53
|
-
.map((a) => JSON.stringify(a))
|
|
54
|
-
.join(' ');
|
|
55
|
-
// Most envs flow through process.env naturally because of how
|
|
56
|
-
// `container run` inherits env. Two we explicitly set:
|
|
57
|
-
// - E2E_OFFLINE_EXTENSIONS_JSON: extensions to mount in storefront
|
|
58
|
-
// - E2E_OFFLINE_POST_PURCHASE_EXT: post-purchase extension JS path
|
|
59
|
-
// The consuming app provides these in its `npm run e2e:offline-full`
|
|
60
|
-
// script; we forward them so the equivalent docker run picks them up.
|
|
61
|
-
const passthroughEnv = [
|
|
62
|
-
'E2E_OFFLINE_EXTENSIONS_JSON',
|
|
63
|
-
'E2E_OFFLINE_POST_PURCHASE_EXT',
|
|
64
|
-
'E2E_OFFLINE_WORKERS',
|
|
65
|
-
'E2E_OFFLINE_FIXTURE_DEBUG',
|
|
66
|
-
'E2E_OFFLINE_EDGE_DEBUG',
|
|
67
|
-
'E2E_OFFLINE_SHIM_DEBUG',
|
|
68
|
-
'E2E_OFFLINE_SKIP_LEAK_CHECK',
|
|
69
|
-
'E2E_OFFLINE_STRICT_GRAPHQL',
|
|
70
|
-
// Contract-conformance toggles (see docs/CONTRACTS.md). The
|
|
71
|
-
// capture mode for Liquid contracts is driven by an env var
|
|
72
|
-
// because Playwright specs don't otherwise take CLI flags;
|
|
73
|
-
// `LIQUID_CONTRACTS_CAPTURE=true npm run e2e:offline-full`
|
|
74
|
-
// does a one-time bootstrap write.
|
|
75
|
-
'LIQUID_CONTRACTS_CAPTURE',
|
|
76
|
-
'CONTRACTS_LIVE_ENDPOINT',
|
|
77
|
-
'CONTRACTS_LIVE_ACCESS_TOKEN',
|
|
78
|
-
'CONTRACTS_LIVE_SHOP',
|
|
79
|
-
]
|
|
80
|
-
.flatMap((k) => process.env[k] !== undefined ? ['--env', `${k}=${process.env[k]}`] : []);
|
|
81
|
-
const args = [
|
|
82
|
-
'run',
|
|
83
|
-
'--rm',
|
|
84
|
-
'--arch',
|
|
85
|
-
'amd64',
|
|
86
|
-
'--memory',
|
|
87
|
-
'8192M',
|
|
88
|
-
'--cpus',
|
|
89
|
-
'4',
|
|
90
|
-
...passthroughEnv,
|
|
91
|
-
'--mount',
|
|
92
|
-
`type=bind,source=${repoRoot},target=/workspace`,
|
|
93
|
-
'--mount',
|
|
94
|
-
`type=bind,source=${linuxModules},target=/workspace/node_modules`,
|
|
95
|
-
'-w',
|
|
96
|
-
'/workspace',
|
|
97
|
-
image,
|
|
98
|
-
'bash',
|
|
99
|
-
'-c',
|
|
100
|
-
[
|
|
101
|
-
// Run `npm install` if node_modules looks empty OR partial.
|
|
102
|
-
// A previous failed install can leave package dirs without
|
|
103
|
-
// their package.json — ESM resolution then crashes on import.
|
|
104
|
-
// Use `node_modules/.package-lock.json` as the "install
|
|
105
|
-
// completed cleanly" signal (npm writes this after success),
|
|
106
|
-
// and hono's package.json as a sentinel for transitively-
|
|
107
|
-
// required deps.
|
|
108
|
-
'if [ ! -f node_modules/.package-lock.json ] || [ ! -f node_modules/hono/package.json ]; then ' +
|
|
109
|
-
'echo "[runDockerOffline] node_modules empty/partial — running fresh npm install…"; ' +
|
|
110
|
-
'rm -rf node_modules; ' +
|
|
111
|
-
'npm install --legacy-peer-deps --engine-strict=false; ' +
|
|
112
|
-
'fi',
|
|
113
|
-
// The offline runner uses TSX-compiled source for stack-trace
|
|
114
|
-
// fidelity. Inside the container we have the same node_modules
|
|
115
|
-
// layout as the host, so the same `--import tsx` works.
|
|
116
|
-
`node --env-file=.env.test --import tsx node_modules/@essential-apps/shopify-test-runner/src/scripts/runOfflineFullTests.ts ${forwarded}`,
|
|
117
|
-
].join(' && '),
|
|
118
|
-
];
|
|
119
|
-
console.log('[runDockerOffline] container run', args.slice(0, 14).join(' '), '…');
|
|
120
|
-
const p = spawn('container', args, { stdio: 'inherit' });
|
|
121
|
-
p.on('exit', (code) => process.exit(code ?? 0));
|
|
122
|
-
process.on('SIGINT', () => p.kill('SIGINT'));
|
|
123
|
-
process.on('SIGTERM', () => p.kill('SIGTERM'));
|
|
124
|
-
}
|
|
125
|
-
main().catch((err) => {
|
|
126
|
-
console.error(err);
|
|
127
|
-
process.exit(1);
|
|
128
|
-
});
|
|
129
|
-
//# sourceMappingURL=runDockerOffline.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"runDockerOffline.js","sourceRoot":"","sources":["../../src/scripts/runDockerOffline.ts"],"names":[],"mappings":";AACA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAC9D,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,MAAM,QAAQ,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC;AAM/B,SAAS,WAAW;IAClB,MAAM,OAAO,GAAG,OAAO,CAAC,QAAQ,EAAE,cAAc,CAAC,CAAC;IAClD,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,EAAE,CAAC;QACzB,MAAM,IAAI,KAAK,CACb,sBAAsB,OAAO,gDAAgD,CAC9E,CAAC;IACJ,CAAC;IACD,MAAM,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,OAAO,EAAE,MAAM,CAAC,CAAgB,CAAC;IACrE,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC;QACd,MAAM,IAAI,KAAK,CAAC,mBAAmB,OAAO,yBAAyB,CAAC,CAAC;IACvE,CAAC;IACD,OAAO,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,WAAW,EAAE,EAAE,CAAC,CAAC;AAC3C,CAAC;AAED,KAAK,UAAU,IAAI;IACjB,MAAM,OAAO,GAAG,WAAW,EAAE,CAAC;IAC9B,MAAM,KAAK,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,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"runDockerOfflineExplore.d.ts","sourceRoot":"","sources":["../../src/scripts/runDockerOfflineExplore.ts"],"names":[],"mappings":""}
|
|
@@ -1,116 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
/**
|
|
3
|
-
* Spawn the offline e2e container in EXPLORE mode — interactive
|
|
4
|
-
* "click around the offline Shopify dev store" workflow.
|
|
5
|
-
*
|
|
6
|
-
* What this gets you:
|
|
7
|
-
* - The full offline stack (Postgres + Remix backend + mocks +
|
|
8
|
-
* edge proxy) running inside the container, same as the test
|
|
9
|
-
* runner.
|
|
10
|
-
* - A non-headless Chrome instance inside the container, pointed
|
|
11
|
-
* at the admin app's URL.
|
|
12
|
-
* - The container's Xvfb display exposed via VNC on
|
|
13
|
-
* 127.0.0.1:5900 (password: `e2e`).
|
|
14
|
-
*
|
|
15
|
-
* Connect: `open vnc://localhost:5900` on macOS, or any VNC client
|
|
16
|
-
* elsewhere. You'll see a desktop with Chrome open at the admin
|
|
17
|
-
* URL — click anywhere, mutate state via the app, navigate to
|
|
18
|
-
* https://test-shop.myshopify.com/ to see the storefront, etc.
|
|
19
|
-
*
|
|
20
|
-
* Stop: Ctrl-C in the terminal where this script runs (or close
|
|
21
|
-
* Chrome).
|
|
22
|
-
*
|
|
23
|
-
* Mirrors `runDockerOffline.ts` (the test runner inside the
|
|
24
|
-
* container) but with three differences:
|
|
25
|
-
* 1. `E2E_VNC=1` to make the entrypoint start x11vnc
|
|
26
|
-
* 2. `--publish 127.0.0.1:5900:5900` to expose VNC to the host
|
|
27
|
-
* 3. `E2E_OFFLINE_EXPLORE=true` to make the orchestrator skip
|
|
28
|
-
* Playwright and launch Chrome instead
|
|
29
|
-
*/
|
|
30
|
-
import { spawn } from 'node:child_process';
|
|
31
|
-
import { existsSync, mkdirSync, readFileSync } from 'node:fs';
|
|
32
|
-
import { homedir } from 'node:os';
|
|
33
|
-
import { resolve } from 'node:path';
|
|
34
|
-
const repoRoot = process.cwd();
|
|
35
|
-
function readAppName() {
|
|
36
|
-
const pkgPath = resolve(repoRoot, 'package.json');
|
|
37
|
-
if (!existsSync(pkgPath)) {
|
|
38
|
-
throw new Error(`No package.json at ${pkgPath}. Run this from the consuming app's repo root.`);
|
|
39
|
-
}
|
|
40
|
-
const pkg = JSON.parse(readFileSync(pkgPath, 'utf8'));
|
|
41
|
-
if (!pkg.name) {
|
|
42
|
-
throw new Error(`package.json at ${pkgPath} has no \`name\` field.`);
|
|
43
|
-
}
|
|
44
|
-
return pkg.name.replace(/^@[^/]+\//, '');
|
|
45
|
-
}
|
|
46
|
-
async function main() {
|
|
47
|
-
const appName = readAppName();
|
|
48
|
-
const image = process.env['E2E_IMAGE'] ?? `${appName}-e2e:latest`;
|
|
49
|
-
const linuxModules = process.env['E2E_LINUX_NODE_MODULES'] ??
|
|
50
|
-
resolve(homedir(), `.cache/${appName}-e2e/node_modules`);
|
|
51
|
-
mkdirSync(linuxModules, { recursive: true });
|
|
52
|
-
const passthroughEnv = [
|
|
53
|
-
'E2E_OFFLINE_EXTENSIONS_JSON',
|
|
54
|
-
'E2E_OFFLINE_POST_PURCHASE_EXT',
|
|
55
|
-
'E2E_OFFLINE_FIXTURE_DEBUG',
|
|
56
|
-
'E2E_OFFLINE_EDGE_DEBUG',
|
|
57
|
-
'E2E_OFFLINE_EXPLORE_URL',
|
|
58
|
-
].flatMap((k) => process.env[k] !== undefined ? ['--env', `${k}=${process.env[k]}`] : []);
|
|
59
|
-
const args = [
|
|
60
|
-
'run',
|
|
61
|
-
'--rm',
|
|
62
|
-
'--arch',
|
|
63
|
-
'amd64',
|
|
64
|
-
'--memory',
|
|
65
|
-
'8192M',
|
|
66
|
-
'--cpus',
|
|
67
|
-
'4',
|
|
68
|
-
// Expose Xvfb display via VNC to the host. The entrypoint starts
|
|
69
|
-
// x11vnc when E2E_VNC=1 is set (see tests/e2e/docker/entrypoint.sh).
|
|
70
|
-
'--publish',
|
|
71
|
-
'127.0.0.1:5900:5900',
|
|
72
|
-
'--env',
|
|
73
|
-
'E2E_VNC=1',
|
|
74
|
-
'--env',
|
|
75
|
-
'E2E_OFFLINE_EXPLORE=true',
|
|
76
|
-
...passthroughEnv,
|
|
77
|
-
'--mount',
|
|
78
|
-
`type=bind,source=${repoRoot},target=/workspace`,
|
|
79
|
-
'--mount',
|
|
80
|
-
`type=bind,source=${linuxModules},target=/workspace/node_modules`,
|
|
81
|
-
'-w',
|
|
82
|
-
'/workspace',
|
|
83
|
-
image,
|
|
84
|
-
'bash',
|
|
85
|
-
'-c',
|
|
86
|
-
[
|
|
87
|
-
// Run `npm install` if node_modules looks empty OR partial.
|
|
88
|
-
// A previous failed install can leave package dirs without
|
|
89
|
-
// their package.json — ESM resolution then crashes on import.
|
|
90
|
-
// Use `node_modules/.package-lock.json` as the "install
|
|
91
|
-
// completed cleanly" signal (npm writes this after success).
|
|
92
|
-
'if [ ! -f node_modules/.package-lock.json ] || [ ! -f node_modules/hono/package.json ]; then ' +
|
|
93
|
-
'echo "[explore] node_modules empty/partial — running fresh npm install…"; ' +
|
|
94
|
-
'rm -rf node_modules; ' +
|
|
95
|
-
'npm install --legacy-peer-deps --engine-strict=false; ' +
|
|
96
|
-
'fi',
|
|
97
|
-
// Boot the orchestrator. The E2E_OFFLINE_EXPLORE=true env we
|
|
98
|
-
// set above makes it launch Chrome instead of Playwright.
|
|
99
|
-
'node --env-file=.env.test --import tsx node_modules/@essential-apps/shopify-test-runner/src/scripts/runOfflineFullTests.ts',
|
|
100
|
-
].join(' && '),
|
|
101
|
-
];
|
|
102
|
-
console.log('[runDockerOfflineExplore] starting interactive offline e2e container…');
|
|
103
|
-
console.log('[runDockerOfflineExplore] once you see "explore mode — launching Chrome",');
|
|
104
|
-
console.log('[runDockerOfflineExplore] connect with: open vnc://localhost:5900');
|
|
105
|
-
console.log('[runDockerOfflineExplore] password: e2e');
|
|
106
|
-
console.log('');
|
|
107
|
-
const p = spawn('container', args, { stdio: 'inherit' });
|
|
108
|
-
p.on('exit', (code) => process.exit(code ?? 0));
|
|
109
|
-
process.on('SIGINT', () => p.kill('SIGINT'));
|
|
110
|
-
process.on('SIGTERM', () => p.kill('SIGTERM'));
|
|
111
|
-
}
|
|
112
|
-
main().catch((err) => {
|
|
113
|
-
console.error(err);
|
|
114
|
-
process.exit(1);
|
|
115
|
-
});
|
|
116
|
-
//# sourceMappingURL=runDockerOfflineExplore.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"runDockerOfflineExplore.js","sourceRoot":"","sources":["../../src/scripts/runDockerOfflineExplore.ts"],"names":[],"mappings":";AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAC9D,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,MAAM,QAAQ,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC;AAM/B,SAAS,WAAW;IAClB,MAAM,OAAO,GAAG,OAAO,CAAC,QAAQ,EAAE,cAAc,CAAC,CAAC;IAClD,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,EAAE,CAAC;QACzB,MAAM,IAAI,KAAK,CACb,sBAAsB,OAAO,gDAAgD,CAC9E,CAAC;IACJ,CAAC;IACD,MAAM,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,OAAO,EAAE,MAAM,CAAC,CAAgB,CAAC;IACrE,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC;QACd,MAAM,IAAI,KAAK,CAAC,mBAAmB,OAAO,yBAAyB,CAAC,CAAC;IACvE,CAAC;IACD,OAAO,GAAG,CAAC,IAAI,CAAC,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|
|
2
|
-
/**
|
|
3
|
-
* runIsolatedDockerOffline — one libkrun microVM per test.
|
|
4
|
-
*
|
|
5
|
-
* Same target as `runDockerOffline.ts`, different parallelism model.
|
|
6
|
-
*
|
|
7
|
-
* runDockerOffline:
|
|
8
|
-
* One container. One Postgres. One Remix. Playwright runs all
|
|
9
|
-
* tests serially (or sharded via `E2E_OFFLINE_WORKERS=N` which
|
|
10
|
-
* forks shards INSIDE the container, sharing the kernel + image).
|
|
11
|
-
*
|
|
12
|
-
* runIsolatedDockerOffline (this script):
|
|
13
|
-
* N microVMs in parallel, one per test. Each VM gets its own
|
|
14
|
-
* filesystem, kernel, Postgres binary, Remix backend, mock stack,
|
|
15
|
-
* Chromium. A buggy test cannot leak processes, file handles, or
|
|
16
|
-
* in-memory state into the next test — the entire VM is
|
|
17
|
-
* destroyed after each test.
|
|
18
|
-
*
|
|
19
|
-
* Same isolation model the live-test suite already uses (#2 in the
|
|
20
|
-
* architecture doc). Offline mode now matches.
|
|
21
|
-
*
|
|
22
|
-
* Pool model:
|
|
23
|
-
* - Host enumerates tests once via `playwright --list --reporter=json`.
|
|
24
|
-
* - Worker pool of `E2E_PARALLEL_VMS` slots (default: cpus/2).
|
|
25
|
-
* - Each slot claims the next test off the queue, spawns
|
|
26
|
-
* `container run` with env identifying the test, waits for exit,
|
|
27
|
-
* loops until queue empty.
|
|
28
|
-
*
|
|
29
|
-
* Per-test container envelope:
|
|
30
|
-
* - The whole runOfflineFullTests.ts boot runs inside, but
|
|
31
|
-
* Playwright is invoked with `<file> --grep "<exact title>"` so
|
|
32
|
-
* only ONE test runs. The Postgres/Remix/mock-server boot is
|
|
33
|
-
* overhead-per-test (~5-8s); accept it for the isolation
|
|
34
|
-
* guarantee.
|
|
35
|
-
*
|
|
36
|
-
* Reporting:
|
|
37
|
-
* - Per-test stdout/stderr is captured to
|
|
38
|
-
* `<repo>/test-results-isolated/<slug>/output.log`.
|
|
39
|
-
* - JUnit XML per test (Playwright's built-in reporter) lands in
|
|
40
|
-
* the same dir.
|
|
41
|
-
* - This script aggregates final pass/fail counts to stdout and
|
|
42
|
-
* prints failed-test names + log paths for triage.
|
|
43
|
-
*/
|
|
44
|
-
import { spawn, execSync } from 'node:child_process';
|
|
45
|
-
import { existsSync, mkdirSync, readFileSync, writeFileSync, createWriteStream } from 'node:fs';
|
|
46
|
-
import { homedir, cpus } from 'node:os';
|
|
47
|
-
import { resolve, relative } from 'node:path';
|
|
48
|
-
const repoRoot = process.cwd();
|
|
49
|
-
function readAppName() {
|
|
50
|
-
const pkgPath = resolve(repoRoot, 'package.json');
|
|
51
|
-
if (!existsSync(pkgPath)) {
|
|
52
|
-
throw new Error(`No package.json at ${pkgPath}. Run this from the consuming app's repo root.`);
|
|
53
|
-
}
|
|
54
|
-
const pkg = JSON.parse(readFileSync(pkgPath, 'utf8'));
|
|
55
|
-
if (!pkg.name) {
|
|
56
|
-
throw new Error(`package.json at ${pkgPath} has no \`name\` field.`);
|
|
57
|
-
}
|
|
58
|
-
return pkg.name.replace(/^@[^/]+\//, '');
|
|
59
|
-
}
|
|
60
|
-
/**
|
|
61
|
-
* Slug-ify a test title for use as a directory name. Keep it human-
|
|
62
|
-
* readable: strip emoji-like chars and tag markers, collapse spaces
|
|
63
|
-
* to dashes, truncate. Collisions (two tests sharing the same slug)
|
|
64
|
-
* are appended with an index — the caller handles that.
|
|
65
|
-
*/
|
|
66
|
-
function slugify(s) {
|
|
67
|
-
return s
|
|
68
|
-
.toLowerCase()
|
|
69
|
-
.replace(/[^a-z0-9]+/g, '-')
|
|
70
|
-
.replace(/^-+|-+$/g, '')
|
|
71
|
-
.slice(0, 80);
|
|
72
|
-
}
|
|
73
|
-
/**
|
|
74
|
-
* Enumerate tests via Playwright's JSON list output. Runs on the
|
|
75
|
-
* HOST (not inside the container) because `--list` doesn't construct
|
|
76
|
-
* fixtures — it just parses test files and emits structure. Means
|
|
77
|
-
* the host needs a `node_modules` deep enough to load Playwright +
|
|
78
|
-
* the spec imports, which it already does (the same dir is
|
|
79
|
-
* bind-mounted into containers).
|
|
80
|
-
*/
|
|
81
|
-
function discoverTests(playwrightConfig, grep) {
|
|
82
|
-
const args = [
|
|
83
|
-
'playwright',
|
|
84
|
-
'test',
|
|
85
|
-
'--config',
|
|
86
|
-
playwrightConfig,
|
|
87
|
-
'--list',
|
|
88
|
-
'--reporter=json',
|
|
89
|
-
];
|
|
90
|
-
if (grep)
|
|
91
|
-
args.push('--grep', grep);
|
|
92
|
-
let output;
|
|
93
|
-
try {
|
|
94
|
-
output = execSync(`npx ${args.map((a) => JSON.stringify(a)).join(' ')}`, {
|
|
95
|
-
encoding: 'utf8',
|
|
96
|
-
stdio: ['ignore', 'pipe', 'pipe'],
|
|
97
|
-
});
|
|
98
|
-
}
|
|
99
|
-
catch (err) {
|
|
100
|
-
const stderr = err.stderr?.toString() ?? '';
|
|
101
|
-
throw new Error(`playwright --list failed:\n${stderr || err.message}`);
|
|
102
|
-
}
|
|
103
|
-
const data = JSON.parse(output);
|
|
104
|
-
// Playwright reports `spec.file` relative to testDir, not cwd. To
|
|
105
|
-
// pass that file back to `playwright test <file>` we need a path
|
|
106
|
-
// Playwright can resolve — easiest is testDir-relative (Playwright
|
|
107
|
-
// resolves positional args against testDir first) but we'll go
|
|
108
|
-
// cwd-relative to be unambiguous. Walk the config tree to find
|
|
109
|
-
// the testDir for project 0 (we have one project).
|
|
110
|
-
const testDirAbs = data.config?.projects?.[0]?.testDir ?? '';
|
|
111
|
-
const testDirRelToCwd = testDirAbs ? relative(repoRoot, testDirAbs) : '';
|
|
112
|
-
const tests = [];
|
|
113
|
-
const usedSlugs = new Map();
|
|
114
|
-
const walk = (suite, ancestors) => {
|
|
115
|
-
// Skip the file-level suite from the title path. Playwright
|
|
116
|
-
// emits the tree as: project ("") → file (titled with the spec
|
|
117
|
-
// file path) → describe → … → spec. `--grep` matches against
|
|
118
|
-
// the test's full name which is `describe > … > spec`, NOT
|
|
119
|
-
// including the file. So we drop any suite whose title looks
|
|
120
|
-
// like a spec file path.
|
|
121
|
-
const isFileSuite = !!suite.title && /\.spec\.[tj]sx?$/.test(suite.title);
|
|
122
|
-
const path = suite.title && !isFileSuite ? [...ancestors, suite.title] : ancestors;
|
|
123
|
-
for (const child of suite.suites ?? [])
|
|
124
|
-
walk(child, path);
|
|
125
|
-
for (const spec of suite.specs ?? []) {
|
|
126
|
-
// A spec maps to ONE test name (its title). Tests array under
|
|
127
|
-
// it lists projected runs (per-project / browser config) —
|
|
128
|
-
// we have one project, so length 1.
|
|
129
|
-
const fileRelToTestDir = spec.file ?? '';
|
|
130
|
-
const fileRelToCwd = testDirRelToCwd
|
|
131
|
-
? `${testDirRelToCwd}/${fileRelToTestDir}`
|
|
132
|
-
: fileRelToTestDir;
|
|
133
|
-
const displayTitle = [...path, spec.title].join(' > ');
|
|
134
|
-
// Playwright's --grep target: describes + test title joined
|
|
135
|
-
// by single spaces. See the comment on DiscoveredTest.grepTitle.
|
|
136
|
-
const grepTitle = [...path, spec.title].join(' ');
|
|
137
|
-
const baseSlug = slugify(`${fileRelToTestDir.split('/').pop() ?? 'spec'}-${spec.title}`);
|
|
138
|
-
const count = usedSlugs.get(baseSlug) ?? 0;
|
|
139
|
-
usedSlugs.set(baseSlug, count + 1);
|
|
140
|
-
const slug = count === 0 ? baseSlug : `${baseSlug}-${count + 1}`;
|
|
141
|
-
tests.push({ file: fileRelToCwd, displayTitle, grepTitle, slug });
|
|
142
|
-
}
|
|
143
|
-
};
|
|
144
|
-
for (const root of data.suites ?? [])
|
|
145
|
-
walk(root, []);
|
|
146
|
-
return tests;
|
|
147
|
-
}
|
|
148
|
-
/**
|
|
149
|
-
* Spawn one libkrun container that runs exactly one test, wait for
|
|
150
|
-
* exit, return the result. Stdout/stderr are streamed to a per-test
|
|
151
|
-
* log file AND mirrored to the host stdout with a `[slot K] ` prefix
|
|
152
|
-
* so live runs show progress.
|
|
153
|
-
*/
|
|
154
|
-
async function runOneTestInContainer(test, slot, ctx) {
|
|
155
|
-
const outDir = resolve(ctx.outRoot, test.slug);
|
|
156
|
-
mkdirSync(outDir, { recursive: true });
|
|
157
|
-
const logPath = resolve(outDir, 'output.log');
|
|
158
|
-
const logStream = createWriteStream(logPath);
|
|
159
|
-
const escapedTitle = escapeForGrep(test.grepTitle);
|
|
160
|
-
// `${file} --grep "${title}"` — Playwright's positional file arg
|
|
161
|
-
// restricts to that spec, --grep restricts to that test title.
|
|
162
|
-
// The runOfflineFullTests script forwards any extra argv to
|
|
163
|
-
// playwright.
|
|
164
|
-
//
|
|
165
|
-
// `--output` is critical when running multiple VMs in parallel.
|
|
166
|
-
// `/workspace` is bind-mounted from the host into every VM, so a
|
|
167
|
-
// shared `test-results/` write path causes traces + screenshots
|
|
168
|
-
// from one VM to overwrite the other (Playwright's
|
|
169
|
-
// `.playwright-artifacts-N` temp files in particular race and
|
|
170
|
-
// throw ENOENT on cleanup). Per-test output dir under
|
|
171
|
-
// `test-results-isolated/<slug>/` keeps each VM's artifacts in
|
|
172
|
-
// its own slot.
|
|
173
|
-
const forwarded = [
|
|
174
|
-
JSON.stringify(test.file),
|
|
175
|
-
'--grep',
|
|
176
|
-
JSON.stringify(escapedTitle),
|
|
177
|
-
'--output',
|
|
178
|
-
JSON.stringify(`test-results-isolated/${test.slug}/playwright`),
|
|
179
|
-
].join(' ');
|
|
180
|
-
const innerCmd = [
|
|
181
|
-
// Same node_modules guard as runDockerOffline: tolerate stale
|
|
182
|
-
// caches from previous failed installs.
|
|
183
|
-
'if [ ! -f node_modules/.package-lock.json ] || [ ! -f node_modules/hono/package.json ]; then ' +
|
|
184
|
-
'echo "[runIsolated] node_modules empty/partial — running fresh npm install…"; ' +
|
|
185
|
-
'rm -rf node_modules; ' +
|
|
186
|
-
'npm install --legacy-peer-deps --engine-strict=false; ' +
|
|
187
|
-
'fi',
|
|
188
|
-
`node --env-file=.env.test --import tsx node_modules/@essential-apps/shopify-test-runner/src/scripts/runOfflineFullTests.ts ${forwarded}`,
|
|
189
|
-
].join(' && ');
|
|
190
|
-
const args = [
|
|
191
|
-
'run',
|
|
192
|
-
'--rm',
|
|
193
|
-
'--arch',
|
|
194
|
-
'amd64',
|
|
195
|
-
// Smaller per-VM footprint than `runDockerOffline` (8 GB) — we
|
|
196
|
-
// run many in parallel and each is doing one test's worth of
|
|
197
|
-
// work. Bump if your tests need more.
|
|
198
|
-
'--memory',
|
|
199
|
-
ctx.perVmMemory,
|
|
200
|
-
'--cpus',
|
|
201
|
-
ctx.perVmCpus,
|
|
202
|
-
...ctx.passthroughEnv,
|
|
203
|
-
'--env',
|
|
204
|
-
// Each VM gets its own slot index so anything that wants a
|
|
205
|
-
// deterministic per-slot value (port base, log prefix) can use it.
|
|
206
|
-
`E2E_ISOLATED_SLOT=${slot}`,
|
|
207
|
-
'--env',
|
|
208
|
-
`E2E_ISOLATED_TEST_SLUG=${test.slug}`,
|
|
209
|
-
'--mount',
|
|
210
|
-
`type=bind,source=${repoRoot},target=/workspace`,
|
|
211
|
-
'--mount',
|
|
212
|
-
`type=bind,source=${ctx.linuxModules},target=/workspace/node_modules`,
|
|
213
|
-
'-w',
|
|
214
|
-
'/workspace',
|
|
215
|
-
ctx.image,
|
|
216
|
-
'bash',
|
|
217
|
-
'-c',
|
|
218
|
-
innerCmd,
|
|
219
|
-
];
|
|
220
|
-
const start = Date.now();
|
|
221
|
-
return new Promise((resolveRun) => {
|
|
222
|
-
const proc = spawn('container', args, { stdio: ['ignore', 'pipe', 'pipe'] });
|
|
223
|
-
const prefix = `[slot ${slot} | ${test.slug}] `;
|
|
224
|
-
const relay = (chunk) => {
|
|
225
|
-
const text = chunk.toString('utf8');
|
|
226
|
-
logStream.write(text);
|
|
227
|
-
// Prefix each non-empty line on the host stdout so logs
|
|
228
|
-
// interleave readably across slots.
|
|
229
|
-
for (const line of text.split('\n')) {
|
|
230
|
-
if (line.length > 0)
|
|
231
|
-
process.stdout.write(prefix + line + '\n');
|
|
232
|
-
}
|
|
233
|
-
};
|
|
234
|
-
proc.stdout.on('data', relay);
|
|
235
|
-
proc.stderr.on('data', relay);
|
|
236
|
-
proc.on('exit', (code) => {
|
|
237
|
-
logStream.end();
|
|
238
|
-
resolveRun({
|
|
239
|
-
test,
|
|
240
|
-
exitCode: code ?? 1,
|
|
241
|
-
durationMs: Date.now() - start,
|
|
242
|
-
logPath,
|
|
243
|
-
});
|
|
244
|
-
});
|
|
245
|
-
});
|
|
246
|
-
}
|
|
247
|
-
/**
|
|
248
|
-
* Playwright's `--grep` is interpreted as a regex. Test titles
|
|
249
|
-
* frequently contain regex meta-characters (parens, brackets, `?`,
|
|
250
|
-
* `+`) so we escape them to a literal match.
|
|
251
|
-
*/
|
|
252
|
-
function escapeForGrep(s) {
|
|
253
|
-
return s.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
|
|
254
|
-
}
|
|
255
|
-
async function main() {
|
|
256
|
-
const appName = readAppName();
|
|
257
|
-
const image = process.env['E2E_IMAGE'] ?? `${appName}-e2e:latest`;
|
|
258
|
-
const linuxModules = process.env['E2E_LINUX_NODE_MODULES'] ??
|
|
259
|
-
resolve(homedir(), `.cache/${appName}-e2e/node_modules`);
|
|
260
|
-
mkdirSync(linuxModules, { recursive: true });
|
|
261
|
-
const playwrightConfig = process.env['E2E_PLAYWRIGHT_CONFIG'] ??
|
|
262
|
-
'tests/e2e/playwright.offline-full.config.ts';
|
|
263
|
-
// Forward any positional non-flag arg as a `--grep` filter so
|
|
264
|
-
// `npm run e2e:offline-full:isolated -- --grep "cart-page"` works.
|
|
265
|
-
// We don't parse arbitrary playwright flags here — keep this
|
|
266
|
-
// script's surface small.
|
|
267
|
-
const argv = process.argv.slice(2);
|
|
268
|
-
let listGrep;
|
|
269
|
-
for (let i = 0; i < argv.length; i++) {
|
|
270
|
-
if (argv[i] === '--grep' && i + 1 < argv.length) {
|
|
271
|
-
listGrep = argv[i + 1];
|
|
272
|
-
i++;
|
|
273
|
-
}
|
|
274
|
-
}
|
|
275
|
-
console.log(`[runIsolated] enumerating tests via Playwright (config=${playwrightConfig})…`);
|
|
276
|
-
const tests = discoverTests(playwrightConfig, listGrep);
|
|
277
|
-
if (tests.length === 0) {
|
|
278
|
-
console.error('[runIsolated] no tests discovered — exiting');
|
|
279
|
-
process.exit(1);
|
|
280
|
-
}
|
|
281
|
-
console.log(`[runIsolated] discovered ${tests.length} test(s)`);
|
|
282
|
-
const concurrency = Math.max(1, Number(process.env['E2E_PARALLEL_VMS'] ?? Math.max(2, Math.floor(cpus().length / 2))));
|
|
283
|
-
console.log(`[runIsolated] parallelism: ${concurrency} VM(s)`);
|
|
284
|
-
const outRoot = resolve(repoRoot, 'test-results-isolated');
|
|
285
|
-
mkdirSync(outRoot, { recursive: true });
|
|
286
|
-
const passthroughEnv = [
|
|
287
|
-
'E2E_OFFLINE_EXTENSIONS_JSON',
|
|
288
|
-
'E2E_OFFLINE_POST_PURCHASE_EXT',
|
|
289
|
-
'E2E_OFFLINE_FIXTURE_DEBUG',
|
|
290
|
-
'E2E_OFFLINE_EDGE_DEBUG',
|
|
291
|
-
'E2E_OFFLINE_SHIM_DEBUG',
|
|
292
|
-
'E2E_OFFLINE_SKIP_LEAK_CHECK',
|
|
293
|
-
'E2E_OFFLINE_STRICT_GRAPHQL',
|
|
294
|
-
].flatMap((k) => process.env[k] !== undefined ? ['--env', `${k}=${process.env[k]}`] : []);
|
|
295
|
-
const ctx = {
|
|
296
|
-
image,
|
|
297
|
-
linuxModules,
|
|
298
|
-
outRoot,
|
|
299
|
-
perVmMemory: process.env['E2E_PER_VM_MEMORY'] ?? '4096M',
|
|
300
|
-
perVmCpus: process.env['E2E_PER_VM_CPUS'] ?? '2',
|
|
301
|
-
passthroughEnv,
|
|
302
|
-
};
|
|
303
|
-
const queue = [...tests];
|
|
304
|
-
const results = [];
|
|
305
|
-
const startedAt = Date.now();
|
|
306
|
-
await Promise.all(Array.from({ length: concurrency }, async (_, slot) => {
|
|
307
|
-
while (queue.length > 0) {
|
|
308
|
-
const test = queue.shift();
|
|
309
|
-
if (!test)
|
|
310
|
-
return;
|
|
311
|
-
console.log(`[runIsolated] slot ${slot} starting: ${test.slug} (${queue.length} left in queue)`);
|
|
312
|
-
const result = await runOneTestInContainer(test, slot, ctx);
|
|
313
|
-
results.push(result);
|
|
314
|
-
const verb = result.exitCode === 0 ? '✓' : '✗';
|
|
315
|
-
console.log(`[runIsolated] slot ${slot} ${verb} ${test.slug} (${(result.durationMs / 1000).toFixed(1)}s, exit=${result.exitCode})`);
|
|
316
|
-
}
|
|
317
|
-
}));
|
|
318
|
-
const totalMs = Date.now() - startedAt;
|
|
319
|
-
const passed = results.filter((r) => r.exitCode === 0);
|
|
320
|
-
const failed = results.filter((r) => r.exitCode !== 0);
|
|
321
|
-
console.log(`\n[runIsolated] done: ${passed.length}/${results.length} passed in ${(totalMs / 1000).toFixed(1)}s wall-clock`);
|
|
322
|
-
if (failed.length > 0) {
|
|
323
|
-
console.log(`\n[runIsolated] failed tests:`);
|
|
324
|
-
for (const f of failed) {
|
|
325
|
-
console.log(` ✗ ${f.test.displayTitle}`);
|
|
326
|
-
console.log(` file: ${f.test.file}`);
|
|
327
|
-
console.log(` log: ${relative(repoRoot, f.logPath)}`);
|
|
328
|
-
}
|
|
329
|
-
}
|
|
330
|
-
// Summary JSON for CI consumers — single source of truth on
|
|
331
|
-
// pass/fail counts + per-test outcomes.
|
|
332
|
-
writeFileSync(resolve(outRoot, 'summary.json'), JSON.stringify({
|
|
333
|
-
totalMs,
|
|
334
|
-
concurrency,
|
|
335
|
-
passed: passed.length,
|
|
336
|
-
failed: failed.length,
|
|
337
|
-
tests: results.map((r) => ({
|
|
338
|
-
file: r.test.file,
|
|
339
|
-
title: r.test.displayTitle,
|
|
340
|
-
slug: r.test.slug,
|
|
341
|
-
exitCode: r.exitCode,
|
|
342
|
-
durationMs: r.durationMs,
|
|
343
|
-
})),
|
|
344
|
-
}, null, 2));
|
|
345
|
-
process.exit(failed.length === 0 ? 0 : 1);
|
|
346
|
-
}
|
|
347
|
-
main().catch((err) => {
|
|
348
|
-
console.error(err);
|
|
349
|
-
process.exit(1);
|
|
350
|
-
});
|
|
351
|
-
//# sourceMappingURL=runIsolatedDockerOffline.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"runIsolatedDockerOffline.js","sourceRoot":"","sources":["../../src/scripts/runIsolatedDockerOffline.ts"],"names":[],"mappings":";AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AACH,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,YAAY,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAChG,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AACxC,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAE9C,MAAM,QAAQ,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC;AAsB/B,SAAS,WAAW;IAClB,MAAM,OAAO,GAAG,OAAO,CAAC,QAAQ,EAAE,cAAc,CAAC,CAAC;IAClD,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,EAAE,CAAC;QACzB,MAAM,IAAI,KAAK,CACb,sBAAsB,OAAO,gDAAgD,CAC9E,CAAC;IACJ,CAAC;IACD,MAAM,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,OAAO,EAAE,MAAM,CAAC,CAAgB,CAAC;IACrE,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC;QACd,MAAM,IAAI,KAAK,CAAC,mBAAmB,OAAO,yBAAyB,CAAC,CAAC;IACvE,CAAC;IACD,OAAO,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,WAAW,EAAE,EAAE,CAAC,CAAC;AAC3C,CAAC;AAED;;;;;GAKG;AACH,SAAS,OAAO,CAAC,CAAS;IACxB,OAAO,CAAC;SACL,WAAW,EAAE;SACb,OAAO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