@stim-cli/ci 1.36.0 → 1.37.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/README.md CHANGED
@@ -36,6 +36,22 @@ device with `STIM_NO_RECORDED_BUILD`, and the failure's `remedy` names the comma
36
36
  to run first, such as `stim-ci build --platform ios --scheme App`. `build` and
37
37
  `run` must use the same Stim home: pass the same `--home`, or keep the default.
38
38
 
39
+ Every iOS and Android `run` on this machine starts the app from clean state on
40
+ the workspace's own simulator or emulator, including when the device already
41
+ has this build.
42
+ Before it installs, `run` uninstalls every other user app except XCUITest
43
+ runner apps, such as the ones agent-device installs. On iOS it also clears the
44
+ app's defaults and data container and resets the simulator keychain; on Android
45
+ it runs `pm clear` on the app. Simulator-wide settings such as privacy grants
46
+ are kept. A local simulator or emulator Stim does not own refuses with
47
+ `STIM_BAD_ARG` instead of skipping the cleanup. A run that `ios.remote` or
48
+ `android.remote` places on another machine or on EAS is not cleaned, and a
49
+ physical device is refused. `build` always compiles on this machine and ignores
50
+ `remote.build`. By default it compiles an iOS app, and an Android Debug app,
51
+ for this machine's architecture only, so when `run` can land on another
52
+ machine or on EAS, build
53
+ for that device too with `--arch all` (iOS) or `--abi all` (Android).
54
+
39
55
  `--eas-profile <name>` (iOS and Android, build only) downloads a completed EAS
40
56
  development build instead of compiling, as `stim ios --eas-profile` does; `run`
41
57
  then installs it. Stim never starts an EAS build.
@@ -1,4 +1,4 @@
1
- import { n as buildCI, t as runCI } from "./src-Gwd9CN7Z.mjs";
1
+ import { n as buildCI, t as runCI } from "./src-CFd6F73i.mjs";
2
2
  import { parseArgs } from "node:util";
3
3
  //#region src/cli.ts
4
4
  const HELP = `Usage: stim-ci build --platform <ios|android|macos> [options]
@@ -131,7 +131,7 @@ function parse(argv) {
131
131
  }
132
132
  async function main(argv = process.argv.slice(2)) {
133
133
  if (argv.length === 1 && argv[0] === "--version") {
134
- process.stdout.write(`1.36.0\n`);
134
+ process.stdout.write(`1.37.0\n`);
135
135
  return;
136
136
  }
137
137
  if (argv.length === 0 || argv[0] === "--help" || (argv[0] === "run" || argv[0] === "build") && argv[1] === "--help") {
package/dist/index.d.mts CHANGED
@@ -22,9 +22,10 @@ interface CommandResult {
22
22
  }
23
23
  //#endregion
24
24
  //#region src/build.d.ts
25
- type WithoutSignal<T> = T extends unknown ? Omit<T, "signal"> : never;
25
+ type WithoutKeys$1<T, K extends PropertyKey> = T extends unknown ? Omit<T, K> : never;
26
26
  interface CIBuildOptions extends CIContextOptions {
27
- build: WithoutSignal<StimBuildOptions>;
27
+ /** Always compiles on this machine; `remoteBuild` is not accepted. */
28
+ build: WithoutKeys$1<StimBuildOptions, "signal" | "remoteBuild">;
28
29
  /** Also writes the app here as a portable APK (Android) or tar.gz (iOS, macOS); without it the build is only recorded for `run`. */
29
30
  exportPath?: string;
30
31
  }
@@ -56,7 +57,7 @@ declare function buildCI(input: CIBuildOptions): Promise<CIBuildResult>;
56
57
  type WithoutKeys<T, K extends PropertyKey> = T extends unknown ? Omit<T, K> : never;
57
58
  interface CIOptions extends CIContextOptions {
58
59
  /** Selectors of the recorded build to run. `run` never builds, so build-time options such as `easProfile` belong to `buildCI`. */
59
- run: WithoutKeys<StimRunOptions, "signal" | "recordedBuild" | "easProfile">;
60
+ run: WithoutKeys<StimRunOptions, "signal" | "recordedBuild" | "cleanAppState" | "easProfile">;
60
61
  command: readonly [string, ...string[]];
61
62
  }
62
63
  interface CIFailure {
package/dist/index.mjs CHANGED
@@ -1,2 +1,2 @@
1
- import { n as buildCI, t as runCI } from "./src-Gwd9CN7Z.mjs";
1
+ import { n as buildCI, t as runCI } from "./src-CFd6F73i.mjs";
2
2
  export { buildCI, runCI };
@@ -201,6 +201,7 @@ async function buildCI(input) {
201
201
  attempted = true;
202
202
  result.build = await stim.build({
203
203
  ...options.build,
204
+ remoteBuild: "local",
204
205
  signal
205
206
  });
206
207
  signal?.throwIfAborted();
@@ -341,6 +342,7 @@ async function runCI(options) {
341
342
  result.run = await stim.run({
342
343
  ...options.run,
343
344
  recordedBuild: true,
345
+ cleanAppState: true,
344
346
  signal
345
347
  });
346
348
  signal?.throwIfAborted();
package/dist/stim-ci.mjs CHANGED
@@ -6,6 +6,6 @@ const minor = parts[1] ?? 0;
6
6
  if (major < 22 || major === 22 && minor < 12) {
7
7
  process.stderr.write(`stim-ci requires Node.js 22.12.0 or later; this is ${process.versions.node}.\n`);
8
8
  process.exitCode = 1;
9
- } else import("./cli-BhFWDeM1.mjs").then(({ main }) => main());
9
+ } else import("./cli-BCFk6LoD.mjs").then(({ main }) => main());
10
10
  //#endregion
11
11
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stim-cli/ci",
3
- "version": "1.36.0",
3
+ "version": "1.37.0",
4
4
  "description": "Build Stim app artifacts or run Stim apps and test commands in CI with diagnostics and scoped cleanup.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -33,7 +33,7 @@
33
33
  },
34
34
  "dependencies": {
35
35
  "cross-spawn": "^7.0.6",
36
- "stim": "1.36.0"
36
+ "stim": "1.37.0"
37
37
  },
38
38
  "devDependencies": {
39
39
  "@types/cross-spawn": "^6.0.6"