@tyndall/test-playwright 0.0.1 → 0.0.3
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/app/AppLauncher.js +4 -4
- package/package.json +3 -3
package/dist/app/AppLauncher.js
CHANGED
|
@@ -19,8 +19,8 @@ export class AppLauncher {
|
|
|
19
19
|
const baseUrl = `http://${host}:${port}`;
|
|
20
20
|
const readyPath = options.readyPath ?? "/";
|
|
21
21
|
const timeoutMs = options.timeoutMs ?? DEFAULT_TIMEOUT_MS;
|
|
22
|
-
if (options.mode === "ssg") {
|
|
23
|
-
await this.runBuild(options);
|
|
22
|
+
if (options.mode === "ssg" || options.mode === "ssr") {
|
|
23
|
+
await this.runBuild(options, options.mode);
|
|
24
24
|
}
|
|
25
25
|
await this.ensurePortAvailable(host, port);
|
|
26
26
|
const command = this.buildCommand(options, host, port);
|
|
@@ -56,11 +56,11 @@ export class AppLauncher {
|
|
|
56
56
|
args: [...baseArgs, "start", "--host", host, "--port", String(port)],
|
|
57
57
|
};
|
|
58
58
|
}
|
|
59
|
-
async runBuild(options) {
|
|
59
|
+
async runBuild(options, mode) {
|
|
60
60
|
const base = options.command ?? ["cloud-front"];
|
|
61
61
|
const [command, ...baseArgs] = base;
|
|
62
62
|
const outDir = options.outDir ?? "dist";
|
|
63
|
-
const buildArgs = [...baseArgs, "build", "--mode",
|
|
63
|
+
const buildArgs = [...baseArgs, "build", "--mode", mode, "--outDir", outDir];
|
|
64
64
|
const output = { stdout: [], stderr: [] };
|
|
65
65
|
const child = this.spawnProcess({ command, args: buildArgs }, options.cwd, options.env, output);
|
|
66
66
|
const exitCode = await new Promise((resolve) => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tyndall/test-playwright",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.3",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"exports": {
|
|
11
11
|
".": {
|
|
12
12
|
"types": "./dist/index.d.ts",
|
|
13
|
-
"bun": "./
|
|
13
|
+
"bun": "./dist/index.js",
|
|
14
14
|
"default": "./dist/index.js"
|
|
15
15
|
}
|
|
16
16
|
},
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"build": "tsc -p tsconfig.json"
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@tyndall/core": "
|
|
24
|
+
"@tyndall/core": "^0.0.3",
|
|
25
25
|
"playwright": "^1.44.0",
|
|
26
26
|
"yaml": "^2.4.5"
|
|
27
27
|
}
|