quiesco 0.8.0 → 0.9.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.
- package/dist/cli.d.ts +1 -1
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +2 -1
- package/dist/cli.js.map +1 -1
- package/dist/commands/build.d.ts +1 -1
- package/dist/commands/build.d.ts.map +1 -1
- package/dist/commands/build.js +22 -8
- package/dist/commands/build.js.map +1 -1
- package/package.json +2 -2
- package/src/cli.ts +2 -1
- package/src/commands/build.ts +22 -8
package/dist/cli.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** Command dispatch for the `quiesco` binary (requirements.md §6.12). */
|
|
2
2
|
import type { CliContext } from './context.js';
|
|
3
|
-
export declare const HELP = "Usage: quiesco <command> [options]\n\nCommands:\n init Set Quiesco up in this Expo project (dependencies, config plugin, Metro, entry, config, features)\n --platforms ios,android,web --runner vitest|jest|cucumber (asked when not given; default vitest)\n --packages <dir> (install from tarballs) --skip-install\n --upgrade: bring a project set up by an older version to this one (packages, config, files)\n --dry-run (list the changes only) --app-dir <dir> (the app, when the tests are elsewhere)\n build Build the app for e2e tests (prebuild + xcodebuild / gradle) into apps.<platform>.binaryPath\n ios|android --force (also when the native inputs did not change) --app-dir <dir>\n test Run the tests with the project's runner (or --runner vitest|jest|cucumber); other arguments go to the runner unchanged\n --platform ios|android|web --workers N (N devices in parallel) (quiesco test --help for more)\n ui Open the test UI: run tests from the browser and watch them live (needs @quiesco/ui)\n --platform ios|android|web --runner \u2026 --port N --no-open\n list List the tests the runner would run, without running them\n --runner cucumber|jest|vitest --json\n doctor Check the tools and the project setup\n --platform ios|android|web --app-dir <dir> (the app, when the tests are elsewhere; or appDir in quiesco.config)\n tree Print the element tree of the running app (to find testIDs)\n --launch (boot the device and launch the app first) --json --timeout <ms> --platform \u2026\n devices List the simulators / AVDs Quiesco created for parallel workers\n --prune (shut them down and delete them)\n\nOptions:\n -h, --help Show this help\n -v, --version Show the version";
|
|
3
|
+
export declare const HELP = "Usage: quiesco <command> [options]\n\nCommands:\n init Set Quiesco up in this Expo project (dependencies, config plugin, Metro, entry, config, features)\n --platforms ios,android,web --runner vitest|jest|cucumber (asked when not given; default vitest)\n --packages <dir> (install from tarballs) --skip-install\n --upgrade: bring a project set up by an older version to this one (packages, config, files)\n --dry-run (list the changes only) --app-dir <dir> (the app, when the tests are elsewhere)\n build Build the app for e2e tests (prebuild + xcodebuild / gradle) into apps.<platform>.binaryPath\n ios|android --force (also when the native inputs did not change)\n --clean (delete and generate ios/ / android/ again: expo prebuild --clean) --app-dir <dir>\n test Run the tests with the project's runner (or --runner vitest|jest|cucumber); other arguments go to the runner unchanged\n --platform ios|android|web --workers N (N devices in parallel) (quiesco test --help for more)\n ui Open the test UI: run tests from the browser and watch them live (needs @quiesco/ui)\n --platform ios|android|web --runner \u2026 --port N --no-open\n list List the tests the runner would run, without running them\n --runner cucumber|jest|vitest --json\n doctor Check the tools and the project setup\n --platform ios|android|web --app-dir <dir> (the app, when the tests are elsewhere; or appDir in quiesco.config)\n tree Print the element tree of the running app (to find testIDs)\n --launch (boot the device and launch the app first) --json --timeout <ms> --platform \u2026\n devices List the simulators / AVDs Quiesco created for parallel workers\n --prune (shut them down and delete them)\n\nOptions:\n -h, --help Show this help\n -v, --version Show the version";
|
|
4
4
|
export declare function main(argv: readonly string[], ctx?: CliContext): Promise<number>;
|
|
5
5
|
//# sourceMappingURL=cli.d.ts.map
|
package/dist/cli.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":"AAAA,yEAAyE;AAUzE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAG/C,eAAO,MAAM,IAAI,
|
|
1
|
+
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":"AAAA,yEAAyE;AAUzE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAG/C,eAAO,MAAM,IAAI,o7DA0BiB,CAAC;AAEnC,wBAAsB,IAAI,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,EAAE,GAAG,GAAE,UAA6B,GAAG,OAAO,CAAC,MAAM,CAAC,CAsCvG"}
|
package/dist/cli.js
CHANGED
|
@@ -17,7 +17,8 @@ Commands:
|
|
|
17
17
|
--upgrade: bring a project set up by an older version to this one (packages, config, files)
|
|
18
18
|
--dry-run (list the changes only) --app-dir <dir> (the app, when the tests are elsewhere)
|
|
19
19
|
build Build the app for e2e tests (prebuild + xcodebuild / gradle) into apps.<platform>.binaryPath
|
|
20
|
-
ios|android --force (also when the native inputs did not change)
|
|
20
|
+
ios|android --force (also when the native inputs did not change)
|
|
21
|
+
--clean (delete and generate ios/ / android/ again: expo prebuild --clean) --app-dir <dir>
|
|
21
22
|
test Run the tests with the project's runner (or --runner vitest|jest|cucumber); other arguments go to the runner unchanged
|
|
22
23
|
--platform ios|android|web --workers N (N devices in parallel) (quiesco test --help for more)
|
|
23
24
|
ui Open the test UI: run tests from the browser and watch them live (needs @quiesco/ui)
|
package/dist/cli.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":"AAAA,yEAAyE;AAEzE,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EA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AAG,CAAC,CAAC;YACpC,KAAK,MAAM;gBACT,OAAO,MAAM,WAAW,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;YACtC,KAAK,QAAQ;gBACX,OAAO,MAAM,aAAa,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;YACxC,KAAK,MAAM;gBACT,OAAO,MAAM,WAAW,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;YACtC,KAAK,SAAS;gBACZ,OAAO,MAAM,cAAc,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;YACzC,KAAK,IAAI,CAAC;YACV,KAAK,WAAW;gBACd,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;gBACrB,OAAO,CAAC,CAAC;YACX,KAAK,SAAS,CAAC;YACf,KAAK,IAAI,CAAC;YACV,KAAK,QAAQ,CAAC;YACd,KAAK,MAAM;gBACT,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;gBACd,OAAO,CAAC,CAAC;YACX;gBACE,GAAG,CAAC,GAAG,CAAC,6BAA6B,OAAO,QAAQ,IAAI,EAAE,CAAC,CAAC;gBAC5D,OAAO,CAAC,CAAC;QACb,CAAC;IACH,CAAC;IAAC,OAAO,CAAC,EAAE,CAAC;QACX,GAAG,CAAC,GAAG,CAAC,WAAW,OAAO,KAAM,CAAW,CAAC,OAAO,EAAE,CAAC,CAAC;QACvD,OAAO,CAAC,CAAC;IACX,CAAC;AACH,CAAC"}
|
package/dist/commands/build.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { QuiescoConfig } from '@quiesco/core';
|
|
2
2
|
import type { CliContext } from '../context.js';
|
|
3
|
-
export declare const BUILD_HELP = "Usage: quiesco build ios|android [--force] [--app-dir <dir>]\n\nBuilds the app for e2e tests (EXPO_PUBLIC_QUIESCO=1: expo prebuild, then xcodebuild / gradle) and writes it\nto apps.<platform>.binaryPath in quiesco.config. A Debug build is skipped when the native inputs (app config,\ndependencies) did not change since the last one; --force builds anyway. The app is the one in appDir\n(quiesco.config) or --app-dir when the tests are in a package of their own.";
|
|
3
|
+
export declare const BUILD_HELP = "Usage: quiesco build ios|android [--force] [--clean] [--app-dir <dir>]\n\nBuilds the app for e2e tests (EXPO_PUBLIC_QUIESCO=1: expo prebuild, then xcodebuild / gradle) and writes it\nto apps.<platform>.binaryPath in quiesco.config. A Debug build is skipped when the native inputs (app config,\ndependencies) did not change since the last one; --force builds anyway. --clean deletes ios/ / android/ and\ngenerates them again (expo prebuild --clean; changes made by hand in them are lost), then builds. The app is the one in appDir\n(quiesco.config) or --app-dir when the tests are in a package of their own.";
|
|
4
4
|
export interface BuildDeps {
|
|
5
5
|
loadConfig: (cwd: string) => Promise<QuiescoConfig>;
|
|
6
6
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build.d.ts","sourceRoot":"","sources":["../../src/commands/build.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"build.d.ts","sourceRoot":"","sources":["../../src/commands/build.ts"],"names":[],"mappings":"AAkBA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAInD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAGhD,eAAO,MAAM,UAAU,mmBAMqD,CAAC;AAE7E,MAAM,WAAW,SAAS;IACxB,UAAU,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,aAAa,CAAC,CAAC;CACrD;AAMD,iHAAiH;AACjH,wBAAgB,cAAc,CAAC,UAAU,EAAE,MAAM,GAAG;IAAE,WAAW,EAAE,MAAM,CAAC;IAAC,aAAa,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,CAItH;AAED,mGAAmG;AACnG,wBAAgB,cAAc,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,GAAG,SAAS,CAEtE;AAID;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,UAAU,EAAE,QAAQ,EAAE,KAAK,GAAG,SAAS,EAAE,UAAU,EAAE,MAAM,GAAG,MAAM,CAe1G;AAED,wBAAsB,YAAY,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,EAAE,GAAG,EAAE,UAAU,EAAE,IAAI,GAAE,SAA4B,GAAG,OAAO,CAAC,MAAM,CAAC,CA6FhI"}
|
package/dist/commands/build.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* `quiesco build ios|android [--force]` (issue #5): the e2e build of the app, written where the config's
|
|
2
|
+
* `quiesco build ios|android [--force] [--clean]` (issue #5): the e2e build of the app, written where the config's
|
|
3
3
|
* `binaryPath` says, so `quiesco test` finds it. `expo prebuild` with EXPO_PUBLIC_QUIESCO=1, then
|
|
4
4
|
* - iOS: `xcodebuild` for the simulator, with the derived data path, configuration and scheme read from
|
|
5
5
|
* `apps.ios.binaryPath` (`<derivedData>/Build/Products/<Configuration>-iphonesimulator/<Name>.app`);
|
|
@@ -7,7 +7,8 @@
|
|
|
7
7
|
* `binaryPath` when that is somewhere else.
|
|
8
8
|
* A Debug build is skipped when its native inputs (app config, dependencies and their installed versions)
|
|
9
9
|
* did not change since the last build and the binary is still there; `--force` builds anyway. Release builds
|
|
10
|
-
* embed the JS bundle, so they are always built.
|
|
10
|
+
* embed the JS bundle, so they are always built. `--clean` runs `expo prebuild --clean` (ios/ / android/ are
|
|
11
|
+
* deleted and generated again) and so builds anyway too.
|
|
11
12
|
* With `appDir` (or `--app-dir`, issue #54) the app is built in that directory; `binaryPath` stays relative
|
|
12
13
|
* to the working directory (the config's).
|
|
13
14
|
*/
|
|
@@ -17,11 +18,12 @@ import path from 'node:path';
|
|
|
17
18
|
import { loadConfig } from '@quiesco/core';
|
|
18
19
|
import { APP_DIR_OPTION, appContext } from '../app-dir.js';
|
|
19
20
|
import { takeOption } from '../context.js';
|
|
20
|
-
export const BUILD_HELP = `Usage: quiesco build ios|android [--force] [--app-dir <dir>]
|
|
21
|
+
export const BUILD_HELP = `Usage: quiesco build ios|android [--force] [--clean] [--app-dir <dir>]
|
|
21
22
|
|
|
22
23
|
Builds the app for e2e tests (EXPO_PUBLIC_QUIESCO=1: expo prebuild, then xcodebuild / gradle) and writes it
|
|
23
24
|
to apps.<platform>.binaryPath in quiesco.config. A Debug build is skipped when the native inputs (app config,
|
|
24
|
-
dependencies) did not change since the last one; --force builds anyway.
|
|
25
|
+
dependencies) did not change since the last one; --force builds anyway. --clean deletes ios/ / android/ and
|
|
26
|
+
generates them again (expo prebuild --clean; changes made by hand in them are lost), then builds. The app is the one in appDir
|
|
25
27
|
(quiesco.config) or --app-dir when the tests are in a package of their own.`;
|
|
26
28
|
const defaultBuildDeps = {
|
|
27
29
|
loadConfig: async (cwd) => (await loadConfig({ cwd, worker: { workerIndex: 0, workerCount: 1 } })).config,
|
|
@@ -64,9 +66,20 @@ export async function buildCommand(args, ctx, deps = defaultBuildDeps) {
|
|
|
64
66
|
ctx.out(BUILD_HELP);
|
|
65
67
|
return 0;
|
|
66
68
|
}
|
|
67
|
-
const
|
|
68
|
-
const
|
|
69
|
+
const clean = args.includes('--clean');
|
|
70
|
+
const force = clean || args.includes('--force');
|
|
71
|
+
const appDirOpt = takeOption(args.filter((a) => a !== '--force' && a !== '--clean'), APP_DIR_OPTION);
|
|
69
72
|
const rest = takeOption(appDirOpt.rest, '--platform');
|
|
73
|
+
const unknown = rest.rest.find((a) => a.startsWith('-'));
|
|
74
|
+
if (unknown !== undefined) {
|
|
75
|
+
ctx.err(`quiesco build: unknown option ${unknown}\n\n${BUILD_HELP}`);
|
|
76
|
+
return 2;
|
|
77
|
+
}
|
|
78
|
+
const extra = rest.value === undefined ? rest.rest.slice(1) : rest.rest;
|
|
79
|
+
if (extra.length > 0) {
|
|
80
|
+
ctx.err(`quiesco build: unexpected argument ${extra[0]}\n\n${BUILD_HELP}`);
|
|
81
|
+
return 2;
|
|
82
|
+
}
|
|
70
83
|
const platform = rest.value ?? rest.rest[0];
|
|
71
84
|
if (platform !== 'ios' && platform !== 'android') {
|
|
72
85
|
ctx.err(`quiesco build: choose ios or android (quiesco build ios). The web needs no build: quiesco test starts Metro, or export it with EXPO_PUBLIC_QUIESCO=1 npx expo export --platform web.`);
|
|
@@ -103,10 +116,11 @@ export async function buildCommand(args, ctx, deps = defaultBuildDeps) {
|
|
|
103
116
|
}
|
|
104
117
|
}
|
|
105
118
|
const env = { ...ctx.env, EXPO_PUBLIC_QUIESCO: '1' };
|
|
106
|
-
|
|
119
|
+
const prebuild = ['expo', 'prebuild', '--platform', platform, ...(clean ? ['--clean'] : [])];
|
|
120
|
+
ctx.out(`quiesco build: ${prebuild.join(' ')} (EXPO_PUBLIC_QUIESCO=1)`);
|
|
107
121
|
if (app !== ctx)
|
|
108
122
|
ctx.out(`quiesco build: the app in ${app.cwd}`);
|
|
109
|
-
let code = await ctx.run('npx',
|
|
123
|
+
let code = await ctx.run('npx', prebuild, { cwd: app.cwd, env });
|
|
110
124
|
if (code !== 0)
|
|
111
125
|
return fail(ctx, 'expo prebuild', code);
|
|
112
126
|
if (ios !== null) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build.js","sourceRoot":"","sources":["../../src/commands/build.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"build.js","sourceRoot":"","sources":["../../src/commands/build.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAG7B,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,OAAO,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3D,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,MAAM,CAAC,MAAM,UAAU,GAAG;;;;;;4EAMkD,CAAC;AAM7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,CAAC;IACX,CAAC;IACD,GAAG,CAAC,SAAS,CAAC,SAAS,EAAE,GAAG,IAAI,CAAC,SAAS,CAAC,EAAE,WAAW,EAAE,UAAU,EAAE,OAAO,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC;IACzH,GAAG,CAAC,GAAG,CAAC,kBAAkB,UAAU,YAAY,CAAC,CAAC;IAClD,OAAO,CAAC,CAAC;AACX,CAAC;AAED,SAAS,IAAI,CAAC,GAAe,EAAE,IAAY,EAAE,IAAY;IACvD,GAAG,CAAC,GAAG,CAAC,kBAAkB,IAAI,sBAAsB,IAAI,IAAI,CAAC,CAAC;IAC9D,OAAO,IAAI,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;AAC/B,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "quiesco",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.9.0",
|
|
4
4
|
"description": "Quiesco command line: init, test (with a progress bar), ui, list, doctor, tree",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "h2nology",
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"src"
|
|
45
45
|
],
|
|
46
46
|
"dependencies": {
|
|
47
|
-
"@quiesco/core": "0.
|
|
47
|
+
"@quiesco/core": "0.9.0"
|
|
48
48
|
},
|
|
49
49
|
"scripts": {
|
|
50
50
|
"build": "tsc -b",
|
package/src/cli.ts
CHANGED
|
@@ -20,7 +20,8 @@ Commands:
|
|
|
20
20
|
--upgrade: bring a project set up by an older version to this one (packages, config, files)
|
|
21
21
|
--dry-run (list the changes only) --app-dir <dir> (the app, when the tests are elsewhere)
|
|
22
22
|
build Build the app for e2e tests (prebuild + xcodebuild / gradle) into apps.<platform>.binaryPath
|
|
23
|
-
ios|android --force (also when the native inputs did not change)
|
|
23
|
+
ios|android --force (also when the native inputs did not change)
|
|
24
|
+
--clean (delete and generate ios/ / android/ again: expo prebuild --clean) --app-dir <dir>
|
|
24
25
|
test Run the tests with the project's runner (or --runner vitest|jest|cucumber); other arguments go to the runner unchanged
|
|
25
26
|
--platform ios|android|web --workers N (N devices in parallel) (quiesco test --help for more)
|
|
26
27
|
ui Open the test UI: run tests from the browser and watch them live (needs @quiesco/ui)
|
package/src/commands/build.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* `quiesco build ios|android [--force]` (issue #5): the e2e build of the app, written where the config's
|
|
2
|
+
* `quiesco build ios|android [--force] [--clean]` (issue #5): the e2e build of the app, written where the config's
|
|
3
3
|
* `binaryPath` says, so `quiesco test` finds it. `expo prebuild` with EXPO_PUBLIC_QUIESCO=1, then
|
|
4
4
|
* - iOS: `xcodebuild` for the simulator, with the derived data path, configuration and scheme read from
|
|
5
5
|
* `apps.ios.binaryPath` (`<derivedData>/Build/Products/<Configuration>-iphonesimulator/<Name>.app`);
|
|
@@ -7,7 +7,8 @@
|
|
|
7
7
|
* `binaryPath` when that is somewhere else.
|
|
8
8
|
* A Debug build is skipped when its native inputs (app config, dependencies and their installed versions)
|
|
9
9
|
* did not change since the last build and the binary is still there; `--force` builds anyway. Release builds
|
|
10
|
-
* embed the JS bundle, so they are always built.
|
|
10
|
+
* embed the JS bundle, so they are always built. `--clean` runs `expo prebuild --clean` (ios/ / android/ are
|
|
11
|
+
* deleted and generated again) and so builds anyway too.
|
|
11
12
|
* With `appDir` (or `--app-dir`, issue #54) the app is built in that directory; `binaryPath` stays relative
|
|
12
13
|
* to the working directory (the config's).
|
|
13
14
|
*/
|
|
@@ -22,11 +23,12 @@ import { APP_DIR_OPTION, appContext } from '../app-dir.js';
|
|
|
22
23
|
import type { CliContext } from '../context.js';
|
|
23
24
|
import { takeOption } from '../context.js';
|
|
24
25
|
|
|
25
|
-
export const BUILD_HELP = `Usage: quiesco build ios|android [--force] [--app-dir <dir>]
|
|
26
|
+
export const BUILD_HELP = `Usage: quiesco build ios|android [--force] [--clean] [--app-dir <dir>]
|
|
26
27
|
|
|
27
28
|
Builds the app for e2e tests (EXPO_PUBLIC_QUIESCO=1: expo prebuild, then xcodebuild / gradle) and writes it
|
|
28
29
|
to apps.<platform>.binaryPath in quiesco.config. A Debug build is skipped when the native inputs (app config,
|
|
29
|
-
dependencies) did not change since the last one; --force builds anyway.
|
|
30
|
+
dependencies) did not change since the last one; --force builds anyway. --clean deletes ios/ / android/ and
|
|
31
|
+
generates them again (expo prebuild --clean; changes made by hand in them are lost), then builds. The app is the one in appDir
|
|
30
32
|
(quiesco.config) or --app-dir when the tests are in a package of their own.`;
|
|
31
33
|
|
|
32
34
|
export interface BuildDeps {
|
|
@@ -77,9 +79,20 @@ export async function buildCommand(args: readonly string[], ctx: CliContext, dep
|
|
|
77
79
|
ctx.out(BUILD_HELP);
|
|
78
80
|
return 0;
|
|
79
81
|
}
|
|
80
|
-
const
|
|
81
|
-
const
|
|
82
|
+
const clean = args.includes('--clean');
|
|
83
|
+
const force = clean || args.includes('--force');
|
|
84
|
+
const appDirOpt = takeOption(args.filter((a) => a !== '--force' && a !== '--clean'), APP_DIR_OPTION);
|
|
82
85
|
const rest = takeOption(appDirOpt.rest, '--platform');
|
|
86
|
+
const unknown = rest.rest.find((a) => a.startsWith('-'));
|
|
87
|
+
if (unknown !== undefined) {
|
|
88
|
+
ctx.err(`quiesco build: unknown option ${unknown}\n\n${BUILD_HELP}`);
|
|
89
|
+
return 2;
|
|
90
|
+
}
|
|
91
|
+
const extra = rest.value === undefined ? rest.rest.slice(1) : rest.rest;
|
|
92
|
+
if (extra.length > 0) {
|
|
93
|
+
ctx.err(`quiesco build: unexpected argument ${extra[0]}\n\n${BUILD_HELP}`);
|
|
94
|
+
return 2;
|
|
95
|
+
}
|
|
83
96
|
const platform = rest.value ?? rest.rest[0];
|
|
84
97
|
if (platform !== 'ios' && platform !== 'android') {
|
|
85
98
|
ctx.err(`quiesco build: choose ios or android (quiesco build ios). The web needs no build: quiesco test starts Metro, or export it with EXPO_PUBLIC_QUIESCO=1 npx expo export --platform web.`);
|
|
@@ -116,9 +129,10 @@ export async function buildCommand(args: readonly string[], ctx: CliContext, dep
|
|
|
116
129
|
}
|
|
117
130
|
|
|
118
131
|
const env = { ...ctx.env, EXPO_PUBLIC_QUIESCO: '1' };
|
|
119
|
-
|
|
132
|
+
const prebuild = ['expo', 'prebuild', '--platform', platform, ...(clean ? ['--clean'] : [])];
|
|
133
|
+
ctx.out(`quiesco build: ${prebuild.join(' ')} (EXPO_PUBLIC_QUIESCO=1)`);
|
|
120
134
|
if (app !== ctx) ctx.out(`quiesco build: the app in ${app.cwd}`);
|
|
121
|
-
let code = await ctx.run('npx',
|
|
135
|
+
let code = await ctx.run('npx', prebuild, { cwd: app.cwd, env });
|
|
122
136
|
if (code !== 0) return fail(ctx, 'expo prebuild', code);
|
|
123
137
|
|
|
124
138
|
if (ios !== null) {
|