lim 0.15.5 → 0.16.1

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 (44) hide show
  1. package/dist/commands/asset/list.d.ts +1 -0
  2. package/dist/commands/asset/list.d.ts.map +1 -1
  3. package/dist/commands/asset/list.js +10 -4
  4. package/dist/commands/asset/list.js.map +1 -1
  5. package/dist/commands/ios/create.d.ts +4 -0
  6. package/dist/commands/ios/create.d.ts.map +1 -1
  7. package/dist/commands/ios/create.js +54 -0
  8. package/dist/commands/ios/create.js.map +1 -1
  9. package/dist/commands/ios/keychain/export.d.ts +23 -0
  10. package/dist/commands/ios/keychain/export.d.ts.map +1 -0
  11. package/dist/commands/ios/keychain/export.js +86 -0
  12. package/dist/commands/ios/keychain/export.js.map +1 -0
  13. package/dist/commands/{xcode/rbe/install.d.ts → ios/keychain/generate-key.d.ts} +2 -7
  14. package/dist/commands/ios/keychain/generate-key.d.ts.map +1 -0
  15. package/dist/commands/ios/keychain/generate-key.js +19 -0
  16. package/dist/commands/ios/keychain/generate-key.js.map +1 -0
  17. package/dist/commands/ios/keychain/import.d.ts +24 -0
  18. package/dist/commands/ios/keychain/import.d.ts.map +1 -0
  19. package/dist/commands/ios/keychain/import.js +109 -0
  20. package/dist/commands/ios/keychain/import.js.map +1 -0
  21. package/dist/commands/xcode/rbe.d.ts +3 -7
  22. package/dist/commands/xcode/rbe.d.ts.map +1 -1
  23. package/dist/commands/xcode/rbe.js +31 -106
  24. package/dist/commands/xcode/rbe.js.map +1 -1
  25. package/dist/lib/keychain-encryption-key.d.ts +8 -0
  26. package/dist/lib/keychain-encryption-key.d.ts.map +1 -0
  27. package/dist/lib/keychain-encryption-key.js +53 -0
  28. package/dist/lib/keychain-encryption-key.js.map +1 -0
  29. package/dist/lib/rbe-session.d.ts +0 -13
  30. package/dist/lib/rbe-session.d.ts.map +1 -1
  31. package/dist/lib/rbe-session.js +0 -15
  32. package/dist/lib/rbe-session.js.map +1 -1
  33. package/dist/lib/rbe-workspace.d.ts +13 -33
  34. package/dist/lib/rbe-workspace.d.ts.map +1 -1
  35. package/dist/lib/rbe-workspace.js +18 -47
  36. package/dist/lib/rbe-workspace.js.map +1 -1
  37. package/package.json +3 -3
  38. package/dist/commands/xcode/rbe/install.d.ts.map +0 -1
  39. package/dist/commands/xcode/rbe/install.js +0 -128
  40. package/dist/commands/xcode/rbe/install.js.map +0 -1
  41. package/dist/lib/rbe-bep-watcher.d.ts +0 -41
  42. package/dist/lib/rbe-bep-watcher.d.ts.map +0 -1
  43. package/dist/lib/rbe-bep-watcher.js +0 -267
  44. package/dist/lib/rbe-bep-watcher.js.map +0 -1
@@ -1,26 +1,13 @@
1
1
  /**
2
- * Generates the .limrun/ workspace companion for `lim xcode rbe`: a Bazel
2
+ * Generates the .limrun/ workspace companion for Limrun remote execution: a Bazel
3
3
  * package pinning the remote fleet's Xcode version and an rc fragment with the
4
4
  * remote-execution flags under the `limrun` config. The caller learns the
5
5
  * fleet's version key from the instance's RBE status, so the generated config
6
- * always matches the fleet without any user action; rerunning the command
7
- * after a fleet Xcode upgrade regenerates the pin.
6
+ * always matches the fleet without any user action; regenerating the files
7
+ * after a fleet Xcode upgrade refreshes the pin.
8
8
  */
9
9
  export declare const LIMRUN_DIR = ".limrun";
10
10
  export declare const TRY_IMPORT_LINE = "try-import %workspace%/.limrun/bazelrc";
11
- /**
12
- * Where Bazel writes its build-event log by default — under the self-gitignored
13
- * `.limrun/`, the directory this module owns and writes the generated config
14
- * into. Single source of truth for the default path the watcher reads and the
15
- * generated bazelrc points `--build_event_json_file` at.
16
- */
17
- export declare function defaultBepPath(workspaceRoot: string): string;
18
- /**
19
- * Resolves the BEP path for a run: an explicit `--bep-file` (made absolute
20
- * against the invocation cwd, so it resolves regardless of bazel's cwd) or the
21
- * default under `.limrun/`.
22
- */
23
- export declare function resolveBepPath(workspaceRoot: string, bepFileFlag?: string): string;
24
11
  /**
25
12
  * Finds the Bazel workspace root by walking up from `startDir` to the first
26
13
  * ancestor containing a MODULE.bazel / WORKSPACE / WORKSPACE.bazel, mirroring
@@ -34,7 +21,7 @@ export declare function findBazelWorkspaceRoot(startDir: string): string | null;
34
21
  * Best-effort guess of a single buildable app target to show in the printed
35
22
  * build command, so it reads `//App` instead of a `//your:target` placeholder.
36
23
  * Scans the workspace's BUILD files (buildifier-formatted) for apple
37
- * `*_application` rules — no bazel invocation — and returns the label in short
24
+ * `*_application` rules (no bazel invocation) and returns the label in short
38
25
  * form (`//pkg` when the target name matches the package's last segment).
39
26
  * Returns null when there are zero or multiple candidates (ambiguous → caller
40
27
  * keeps the placeholder).
@@ -123,26 +110,19 @@ export declare function renderXcodeConfigBuild(remoteVersionKey: string, emitLoa
123
110
  * - `--ios_multi_cpus=sim_arm64` pins the app to the **arm64 iOS simulator**.
124
111
  * Limrun's Mac fleet (workers and the attached simulators) is Apple Silicon,
125
112
  * so the build product must be arm64. Without this, the simulator cpu follows
126
- * the CLIENT's Bazel default — `sim_arm64` on an Apple Silicon Mac, but
127
- * `x86_64` on an Intel Mac or a Linux client — and an x86_64 app installed on
113
+ * the CLIENT's Bazel default (`sim_arm64` on an Apple Silicon Mac, but
114
+ * `x86_64` on an Intel Mac or a Linux client), and an x86_64 app installed on
128
115
  * the arm64 fleet simulator fails to launch with "needs to be updated by the
129
116
  * developer to work on this version of iOS". The pin makes the artifact match
130
117
  * the fleet regardless of where bazel runs (the whole point of RBE).
131
118
  * - PATH includes /usr/sbin:/sbin so genrules that probe `sysctl` (e.g.
132
119
  * `hw.logicalcpu` for `make -j`) resolve it on the worker.
133
120
  * - `--remote_download_outputs=minimal` keeps the built .ipa in the instance's
134
- * CAS instead of downloading it; `lim xcode rbe install` installs it server-side
135
- * from there, so the bytes never round-trip. It's not needed for install to work
136
- * (a remote output keeps its bytestream:// CAS digest in the BEP either way), so
137
- * the printed `lim xcode rbe` output tells users to add
138
- * `--remote_download_outputs=toplevel` on the command line when they want the
139
- * .ipa materialized locally (a command-line flag overrides this rc setting).
140
- * - `--build_event_json_file` writes the Build Event Protocol to .limrun/bep.json;
141
- * `lim xcode rbe install` reads the built target's .ipa CAS digest from it. The
142
- * path is ABSOLUTE on purpose: Bazel expands `%workspace%` only in
143
- * import/try-import, NOT in flag values (it would be taken literally and create
144
- * a junk `%workspace%/` dir), and a relative path resolves against bazel's cwd
145
- * rather than the workspace root.
121
+ * CAS instead of downloading it; the daemon auto-installs it server-side from
122
+ * there (driven by the BES stream), so the bytes never round-trip. The printed
123
+ * `lim xcode rbe` output tells users to add `--remote_download_outputs=toplevel`
124
+ * on the command line when they want the .ipa materialized locally (a
125
+ * command-line flag overrides this rc setting).
146
126
  * - `--extra_execution_platforms` is emitted ONLY for non-mac clients: a Linux
147
127
  * host has no auto-detected darwin execution platform, so the Apple/Swift
148
128
  * toolchain (exec_compatible_with macos) needs one registered to route
@@ -163,7 +143,7 @@ export declare function renderXcodeConfigBuild(remoteVersionKey: string, emitLoa
163
143
  * override hook, so callers can extend or override the generated config
164
144
  * without editing this file or passing flags on the command line.
165
145
  */
166
- export declare function renderLimrunBazelrc(port: number, versionKey: string, isMacClient: boolean, bepPath: string): string;
146
+ export declare function renderLimrunBazelrc(port: number, versionKey: string, isMacClient: boolean): string;
167
147
  /**
168
148
  * Idempotently ensures the workspace .bazelrc try-imports the generated
169
149
  * fragment. Creates .bazelrc when missing. Returns true when the file changed.
@@ -179,5 +159,5 @@ export type RbeWorkspaceFiles = {
179
159
  * try-import. The .gitignore containing "*" makes the directory self-ignoring
180
160
  * so nothing else in the user's repo needs to change.
181
161
  */
182
- export declare function writeRbeWorkspaceFiles(workspaceDir: string, xcodeVersionKey: string, port: number, bepFile?: string, isMacClient?: boolean, bazelMajor?: number | null): RbeWorkspaceFiles;
162
+ export declare function writeRbeWorkspaceFiles(workspaceDir: string, xcodeVersionKey: string, port: number, isMacClient?: boolean, bazelMajor?: number | null): RbeWorkspaceFiles;
183
163
  //# sourceMappingURL=rbe-workspace.d.ts.map
@@ -1 +1 @@
1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G;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO,CAiB7D;AAED,MAAM,MAAM,iBAAiB,GAAG;IAC9B,SAAS,EAAE,MAAM,CAAC;IAClB,eAAe,EAAE,MAAM,CAAC;IACxB,cAAc,EAAE,OAAO,CAAC;CACzB,CAAC;AAEF;;;;GAIG;AACH,wBAAgB,sBAAsB,CACpC,YAAY,EAAE,MAAM,EACpB,eAAe,EAAE,MAAM,EACvB,IAAI,EAAE,MAAM,EACZ,WAAW,GAAE,OAAuC,EACpD,UAAU,GAAE,MAAM,GAAG,IAA4C,GAChE,iBAAiB,CAcnB"}
@@ -4,8 +4,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.TRY_IMPORT_LINE = exports.LIMRUN_DIR = void 0;
7
- exports.defaultBepPath = defaultBepPath;
8
- exports.resolveBepPath = resolveBepPath;
9
7
  exports.findBazelWorkspaceRoot = findBazelWorkspaceRoot;
10
8
  exports.inferBuildTarget = inferBuildTarget;
11
9
  exports.detectBazelMajorVersion = detectBazelMajorVersion;
@@ -14,36 +12,22 @@ exports.renderXcodeConfigBuild = renderXcodeConfigBuild;
14
12
  exports.renderLimrunBazelrc = renderLimrunBazelrc;
15
13
  exports.ensureTryImport = ensureTryImport;
16
14
  exports.writeRbeWorkspaceFiles = writeRbeWorkspaceFiles;
15
+ // Mirrored between src/rbe-workspace.ts (canonical) and packages/cli/src/lib/rbe-workspace.ts
16
+ // until the CLI imports it from a published @limrun/api; tests/rbe-copy-sync.test.ts keeps the
17
+ // two copies byte-identical. Apply any edit to both.
17
18
  const fs_1 = __importDefault(require("fs"));
18
19
  const path_1 = __importDefault(require("path"));
19
20
  /**
20
- * Generates the .limrun/ workspace companion for `lim xcode rbe`: a Bazel
21
+ * Generates the .limrun/ workspace companion for Limrun remote execution: a Bazel
21
22
  * package pinning the remote fleet's Xcode version and an rc fragment with the
22
23
  * remote-execution flags under the `limrun` config. The caller learns the
23
24
  * fleet's version key from the instance's RBE status, so the generated config
24
- * always matches the fleet without any user action; rerunning the command
25
- * after a fleet Xcode upgrade regenerates the pin.
25
+ * always matches the fleet without any user action; regenerating the files
26
+ * after a fleet Xcode upgrade refreshes the pin.
26
27
  */
27
28
  exports.LIMRUN_DIR = '.limrun';
28
29
  exports.TRY_IMPORT_LINE = 'try-import %workspace%/.limrun/bazelrc';
29
- const TRY_IMPORT_COMMENT = '# Added by lim xcode rbe: loads the generated remote-execution config.';
30
- /**
31
- * Where Bazel writes its build-event log by default — under the self-gitignored
32
- * `.limrun/`, the directory this module owns and writes the generated config
33
- * into. Single source of truth for the default path the watcher reads and the
34
- * generated bazelrc points `--build_event_json_file` at.
35
- */
36
- function defaultBepPath(workspaceRoot) {
37
- return path_1.default.join(workspaceRoot, exports.LIMRUN_DIR, 'bep.json');
38
- }
39
- /**
40
- * Resolves the BEP path for a run: an explicit `--bep-file` (made absolute
41
- * against the invocation cwd, so it resolves regardless of bazel's cwd) or the
42
- * default under `.limrun/`.
43
- */
44
- function resolveBepPath(workspaceRoot, bepFileFlag) {
45
- return bepFileFlag ? path_1.default.resolve(bepFileFlag) : defaultBepPath(workspaceRoot);
46
- }
30
+ const TRY_IMPORT_COMMENT = '# Added by Limrun remote-execution setup: loads the generated config.';
47
31
  const WORKSPACE_MARKERS = ['MODULE.bazel', 'WORKSPACE', 'WORKSPACE.bazel'];
48
32
  /**
49
33
  * Finds the Bazel workspace root by walking up from `startDir` to the first
@@ -73,7 +57,7 @@ const TARGET_SCAN_SKIP_DIRS = new Set(['.git', 'node_modules', '.limrun']);
73
57
  * Best-effort guess of a single buildable app target to show in the printed
74
58
  * build command, so it reads `//App` instead of a `//your:target` placeholder.
75
59
  * Scans the workspace's BUILD files (buildifier-formatted) for apple
76
- * `*_application` rules — no bazel invocation — and returns the label in short
60
+ * `*_application` rules (no bazel invocation) and returns the label in short
77
61
  * form (`//pkg` when the target name matches the package's last segment).
78
62
  * Returns null when there are zero or multiple candidates (ambiguous → caller
79
63
  * keeps the placeholder).
@@ -308,26 +292,19 @@ xcode_config(
308
292
  * - `--ios_multi_cpus=sim_arm64` pins the app to the **arm64 iOS simulator**.
309
293
  * Limrun's Mac fleet (workers and the attached simulators) is Apple Silicon,
310
294
  * so the build product must be arm64. Without this, the simulator cpu follows
311
- * the CLIENT's Bazel default — `sim_arm64` on an Apple Silicon Mac, but
312
- * `x86_64` on an Intel Mac or a Linux client — and an x86_64 app installed on
295
+ * the CLIENT's Bazel default (`sim_arm64` on an Apple Silicon Mac, but
296
+ * `x86_64` on an Intel Mac or a Linux client), and an x86_64 app installed on
313
297
  * the arm64 fleet simulator fails to launch with "needs to be updated by the
314
298
  * developer to work on this version of iOS". The pin makes the artifact match
315
299
  * the fleet regardless of where bazel runs (the whole point of RBE).
316
300
  * - PATH includes /usr/sbin:/sbin so genrules that probe `sysctl` (e.g.
317
301
  * `hw.logicalcpu` for `make -j`) resolve it on the worker.
318
302
  * - `--remote_download_outputs=minimal` keeps the built .ipa in the instance's
319
- * CAS instead of downloading it; `lim xcode rbe install` installs it server-side
320
- * from there, so the bytes never round-trip. It's not needed for install to work
321
- * (a remote output keeps its bytestream:// CAS digest in the BEP either way), so
322
- * the printed `lim xcode rbe` output tells users to add
323
- * `--remote_download_outputs=toplevel` on the command line when they want the
324
- * .ipa materialized locally (a command-line flag overrides this rc setting).
325
- * - `--build_event_json_file` writes the Build Event Protocol to .limrun/bep.json;
326
- * `lim xcode rbe install` reads the built target's .ipa CAS digest from it. The
327
- * path is ABSOLUTE on purpose: Bazel expands `%workspace%` only in
328
- * import/try-import, NOT in flag values (it would be taken literally and create
329
- * a junk `%workspace%/` dir), and a relative path resolves against bazel's cwd
330
- * rather than the workspace root.
303
+ * CAS instead of downloading it; the daemon auto-installs it server-side from
304
+ * there (driven by the BES stream), so the bytes never round-trip. The printed
305
+ * `lim xcode rbe` output tells users to add `--remote_download_outputs=toplevel`
306
+ * on the command line when they want the .ipa materialized locally (a
307
+ * command-line flag overrides this rc setting).
331
308
  * - `--extra_execution_platforms` is emitted ONLY for non-mac clients: a Linux
332
309
  * host has no auto-detected darwin execution platform, so the Apple/Swift
333
310
  * toolchain (exec_compatible_with macos) needs one registered to route
@@ -348,7 +325,7 @@ xcode_config(
348
325
  * override hook, so callers can extend or override the generated config
349
326
  * without editing this file or passing flags on the command line.
350
327
  */
351
- function renderLimrunBazelrc(port, versionKey, isMacClient, bepPath) {
328
+ function renderLimrunBazelrc(port, versionKey, isMacClient) {
352
329
  const execPlatform = isMacClient ? '' : ('build:limrun --extra_execution_platforms=@build_bazel_apple_support//platforms:darwin_arm64\n');
353
330
  return `# Generated by lim xcode rbe. Do not edit; rerun the command to refresh.
354
331
  build:limrun --remote_executor=grpc://127.0.0.1:${port}
@@ -366,7 +343,6 @@ build:limrun --xcode_version_config=//.limrun:remote_xcode_config
366
343
  build:limrun --xcode_version=${shortVersion(versionKey)}
367
344
  build:limrun --ios_multi_cpus=sim_arm64
368
345
  build:limrun --remote_download_outputs=minimal
369
- build:limrun --build_event_json_file=${bepPath}
370
346
  ${execPlatform}build:limrun --action_env=PATH=/usr/bin:/bin:/usr/sbin:/sbin
371
347
 
372
348
  # A user.limrun.bazelrc at the workspace root is try-imported last, so it can
@@ -402,7 +378,7 @@ function ensureTryImport(workspaceDir) {
402
378
  * try-import. The .gitignore containing "*" makes the directory self-ignoring
403
379
  * so nothing else in the user's repo needs to change.
404
380
  */
405
- function writeRbeWorkspaceFiles(workspaceDir, xcodeVersionKey, port, bepFile = defaultBepPath(workspaceDir), isMacClient = process.platform === 'darwin', bazelMajor = detectBazelMajorVersion(workspaceDir)) {
381
+ function writeRbeWorkspaceFiles(workspaceDir, xcodeVersionKey, port, isMacClient = process.platform === 'darwin', bazelMajor = detectBazelMajorVersion(workspaceDir)) {
406
382
  const dir = path_1.default.join(workspaceDir, exports.LIMRUN_DIR);
407
383
  fs_1.default.mkdirSync(dir, { recursive: true });
408
384
  const buildFile = path_1.default.join(dir, 'BUILD');
@@ -411,13 +387,8 @@ function writeRbeWorkspaceFiles(workspaceDir, xcodeVersionKey, port, bepFile = d
411
387
  // longer native globals. On a known Bazel 8 workspace they ARE native (and
412
388
  // loading would fail), so omit the loads.
413
389
  const emitLoads = isBazel9OrLater(bazelMajor);
414
- // The BEP path is absolute so it resolves regardless of bazel's cwd; the
415
- // watcher and `lim xcode rbe install` read the same path. Defaults under the
416
- // self-gitignored .limrun/; a custom --bep-file may point elsewhere, so make
417
- // sure its parent exists before bazel tries to write it.
418
- fs_1.default.mkdirSync(path_1.default.dirname(bepFile), { recursive: true });
419
390
  fs_1.default.writeFileSync(buildFile, renderXcodeConfigBuild(xcodeVersionKey, emitLoads));
420
- fs_1.default.writeFileSync(bazelrcFragment, renderLimrunBazelrc(port, xcodeVersionKey, isMacClient, bepFile));
391
+ fs_1.default.writeFileSync(bazelrcFragment, renderLimrunBazelrc(port, xcodeVersionKey, isMacClient));
421
392
  fs_1.default.writeFileSync(path_1.default.join(dir, '.gitignore'), '*\n');
422
393
  const bazelrcUpdated = ensureTryImport(workspaceDir);
423
394
  return { buildFile, bazelrcFragment, bazelrcUpdated };
@@ -1 +1 @@
1
- {"version":3,"file":"rbe-workspace.js","sourceRoot":"","sources":["../../src/lib/rbe-workspace.ts"],"names":[],"mappings":";;;;;;AAsBA,wCAEC;AAOD,wCAEC;AAYD,wDAYC;AAeD,4CAqBC;AAgDD,0DASC;AASD,0CAEC;AAyED,wDAmCC;AA4ED,kDAkCC;AAMD,0CAiBC;AAaD,wDA0BC;AAzbD,4CAAoB;AACpB,gDAAwB;AAExB;;;;;;;GAOG;AAEU,QAAA,UAAU,GAAG,SAAS,CAAC;AACvB,QAAA,eAAe,GAAG,wCAAwC,CAAC;AACxE,MAAM,kBAAkB,GAAG,wEAAwE,CAAC;AAEpG;;;;;GAKG;AACH,SAAgB,cAAc,CAAC,aAAqB;IAClD,OAAO,cAAI,CAAC,IAAI,CAAC,aAAa,E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AC,aAAa,CAAC,SAAS,EAAE,sBAAsB,CAAC,eAAe,EAAE,SAAS,CAAC,CAAC,CAAC;IAChF,YAAE,CAAC,aAAa,CAAC,eAAe,EAAE,mBAAmB,CAAC,IAAI,EAAE,eAAe,EAAE,WAAW,CAAC,CAAC,CAAC;IAC3F,YAAE,CAAC,aAAa,CAAC,cAAI,CAAC,IAAI,CAAC,GAAG,EAAE,YAAY,CAAC,EAAE,KAAK,CAAC,CAAC;IACtD,MAAM,cAAc,GAAG,eAAe,CAAC,YAAY,CAAC,CAAC;IACrD,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,cAAc,EAAE,CAAC;AACxD,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lim",
3
- "version": "0.15.5",
3
+ "version": "0.16.1",
4
4
  "description": "Use remote XCode, iOS Simulator, Android Emulator and more to build and test apps from Linux, Windows or macOS.",
5
5
  "bin": {
6
6
  "lim": "./bin/run.js"
@@ -25,7 +25,7 @@
25
25
  "test": "jest"
26
26
  },
27
27
  "dependencies": {
28
- "@limrun/api": "^0.33.4",
28
+ "@limrun/api": "^0.37.1",
29
29
  "@oclif/core": "^4",
30
30
  "cli-progress": "^3.12.0",
31
31
  "cli-table3": "^0.6.5",
@@ -49,7 +49,7 @@
49
49
  "topicSeparator": " ",
50
50
  "topics": {
51
51
  "ios": {
52
- "description": "Execute any task on remote iOS Simulators: create, list, get, delete, info, list-apps, launch-app, terminate-app, app-log, syslog, sync, screenshot, tap, tap-element, element-tree, type, press-key, toggle-keyboard, scroll, open-url, install-app, record, perform, simctl, cp, xcrun, xcodebuild, lsof, reverse"
52
+ "description": "Execute any task on remote iOS Simulators: create, list, get, delete, info, list-apps, launch-app, terminate-app, app-log, syslog, sync, screenshot, tap, tap-element, element-tree, type, press-key, toggle-keyboard, scroll, open-url, install-app, keychain, record, perform, simctl, cp, xcrun, xcodebuild, lsof, reverse"
53
53
  },
54
54
  "android": {
55
55
  "description": "Execute any task on remote Android Emulators: create, list, get, delete, connect, screenshot, tap, tap-element, find-element, element-tree, type, press-key, scroll, open-url, install-app, record, play-on-microphone, set-wifi-bandwidth"
@@ -1 +0,0 @@
1
- {"version":3,"file":"install.d.ts","sourceRoot":"","sources":["../../../../src/commands/xcode/rbe/install.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAIpD,MAAM,CAAC,OAAO,OAAO,eAAgB,SAAQ,WAAW;IACtD,MAAM,CAAC,OAAO,SAA8E;IAC5F,MAAM,CAAC,WAAW,SAM8B;IAChD,MAAM,CAAC,QAAQ,WAA4F;IAE3G,MAAM,CAAC,IAAI;;MAMT;IAEF,MAAM,CAAC,KAAK;;;;;;;;MAYV;IAEI,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;CAwG3B"}
@@ -1,128 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- const fs_1 = __importDefault(require("fs"));
7
- const path_1 = __importDefault(require("path"));
8
- const core_1 = require("@oclif/core");
9
- const base_command_1 = require("../../../base-command");
10
- const rbe_workspace_1 = require("../../../lib/rbe-workspace");
11
- const rbe_session_1 = require("../../../lib/rbe-session");
12
- class XcodeRbeInstall extends base_command_1.BaseCommand {
13
- async run() {
14
- const { args, flags } = await this.parse(XcodeRbeInstall);
15
- // Never auto-create: install must hit the existing instance whose cache holds
16
- // the just-built artifact. Without this, a vanished pinned instance would trip
17
- // withAuth's NotFound recovery and spawn a fresh, empty Xcode instance (whose
18
- // CAS lacks the .ipa), failing confusingly after leaking an instance.
19
- this.setParsedFlags({ ...flags, create: false });
20
- const workspaceRoot = (0, rbe_workspace_1.findBazelWorkspaceRoot)(process.cwd());
21
- if (!workspaceRoot) {
22
- this.error('Not inside a Bazel workspace. Run `lim xcode rbe install` from within the workspace you built.');
23
- }
24
- // The target may be omitted when the workspace has exactly one app target;
25
- // otherwise it must be given explicitly (we never guess between several).
26
- const buildTarget = args.target ?? (0, rbe_workspace_1.inferBuildTarget)(workspaceRoot);
27
- if (!buildTarget) {
28
- this.error('Could not infer a single app target. Pass the target explicitly, e.g. ' +
29
- '`lim xcode rbe install //App:App`.');
30
- }
31
- // The generated bazelrc writes the build event log on every --config=limrun
32
- // build; read the just-built target's .ipa digest from it. Prefer an explicit
33
- // --bep-file, then the path `lim xcode rbe` recorded in the pidfile (in case a
34
- // custom --bep-file was used), then the default under .limrun/.
35
- const pidInfo = (0, rbe_session_1.readRbePidFile)(workspaceRoot);
36
- const bepPath = (flags['bep-file'] ? path_1.default.resolve(flags['bep-file']) : undefined) ??
37
- pidInfo?.bepFile ??
38
- (0, rbe_workspace_1.defaultBepPath)(workspaceRoot);
39
- let bepJson;
40
- try {
41
- bepJson = fs_1.default.readFileSync(bepPath, 'utf8');
42
- }
43
- catch {
44
- this.error(`No build event log at ${bepPath}. Build first with --config=limrun ` +
45
- `(e.g. \`bazelisk --digest_function=sha256 build --config=limrun ${buildTarget}\`), then re-run.`);
46
- }
47
- // Target the instance the background tunnel is serving for this workspace
48
- // (recorded in .limrun/rbe.pid by `lim xcode rbe`), since that's the one
49
- // whose CAS holds the build. An explicit --id wins; otherwise fall back to
50
- // the pidfile, then to the most recent Xcode target.
51
- const instanceId = flags.id ?? pidInfo?.instanceId;
52
- await this.withAuth(async () => {
53
- // Target an existing instance (do not create): install needs the instance
54
- // whose cache holds the just-built artifact.
55
- const target = await this.resolveXcodeTarget(instanceId);
56
- const client = await this.resolveXcodeClient(target);
57
- this.info(`Installing ${buildTarget} on the attached simulator...`);
58
- // The SDK parses the .ipa's CAS digest out of the BEP and installs it; a
59
- // missing target/.ipa or a non-SHA256 (BLAKE3) digest surfaces clearly here.
60
- let result;
61
- try {
62
- result = await client.installRbeBuildFromBep({ bep: bepJson, target: buildTarget });
63
- }
64
- catch (err) {
65
- this.error(err instanceof Error ? err.message : String(err));
66
- }
67
- if (flags.json) {
68
- this.outputJson({ ...result, target: buildTarget });
69
- return;
70
- }
71
- const appName = result.appName ?? result.ipaName;
72
- if (!result.installed) {
73
- // No simulator attached: nothing was installed. Attach one and re-run
74
- // (e.g. `lim xcode rbe --ios`, then `lim xcode rbe install`).
75
- this.output(`No simulator attached, so ${appName} was not installed. ` +
76
- 'Attach one (e.g. `lim xcode rbe --ios`) and re-run.');
77
- return;
78
- }
79
- const timing = result.syncDurationMs !== undefined ?
80
- ` (synced in ${result.syncDurationMs}ms, installed in ${result.installDurationMs ?? 0}ms)`
81
- : '';
82
- this.output(`Installed ${appName}${timing}`);
83
- if (result.bundleId) {
84
- this.output(`Bundle ID: ${result.bundleId}`);
85
- }
86
- // Point the stream at the attached simulator, not the Xcode host. For an
87
- // iOS-backed target the target id is the simulator; otherwise resolve it
88
- // from the attached simulator (install only reaches here with one attached).
89
- // Best-effort: the install already succeeded, so never fail over the URL.
90
- const simId = target.type === 'ios' ?
91
- target.id
92
- : await client
93
- .getSimulator()
94
- .then((s) => s.simulator?.iosInstanceId)
95
- .catch(() => undefined);
96
- if (simId) {
97
- this.output(`iOS Simulator URL: ${this.consoleStreamUrl(simId)}`);
98
- }
99
- });
100
- }
101
- }
102
- XcodeRbeInstall.summary = 'Install a Bazel RBE build on the attached simulator (no client download)';
103
- XcodeRbeInstall.description = 'After `bazelisk build --config=limrun <target>`, install the built app on the Xcode ' +
104
- "instance's attached simulator. The .ipa stays in the instance cache (it is never downloaded " +
105
- 'to this machine); its CAS digest is read from the Bazel build event log (.limrun/bep.json) ' +
106
- 'and the instance fetches, unpacks, and diff-syncs the app to the simulator. Run it AFTER the ' +
107
- 'build, with a simulator attached (e.g. via `lim xcode rbe --ios`). The target is optional ' +
108
- 'when the workspace has a single app target.';
109
- XcodeRbeInstall.examples = ['<%= config.bin %> xcode rbe install', '<%= config.bin %> xcode rbe install //App:App'];
110
- XcodeRbeInstall.args = {
111
- target: core_1.Args.string({
112
- description: 'The Bazel target that was built (e.g. //App:App). Optional: inferred when the workspace has exactly one app target.',
113
- required: false,
114
- }),
115
- };
116
- XcodeRbeInstall.flags = {
117
- ...base_command_1.BaseCommand.baseFlags,
118
- id: core_1.Flags.string({
119
- description: 'Xcode instance ID to target. Defaults to the most recent standalone Xcode target (the one `lim xcode rbe` used).',
120
- }),
121
- 'bep-file': core_1.Flags.string({
122
- description: "Bazel build event log to read the built .ipa's CAS digest from. Defaults to the path " +
123
- '`lim xcode rbe` recorded, then .limrun/bep.json; set it only for a standalone run (no running ' +
124
- '`lim xcode rbe`) whose build wrote the log to a non-default path.',
125
- }),
126
- };
127
- exports.default = XcodeRbeInstall;
128
- //# sourceMappingURL=install.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"install.js","sourceRoot":"","sources":["../../../../src/commands/xcode/rbe/install.ts"],"names":[],"mappings":";;;;;AAAA,4CAAoB;AACpB,gDAAwB;AACxB,sCAA0C;AAC1C,wDAAoD;AACpD,8DAAsG;AACtG,0DAA0D;AAE1D,MAAqB,eAAgB,SAAQ,0BAAW;IAiCtD,KAAK,CAAC,GAAG;QACP,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,eAAe,CAAC,CAAC;QAC1D,8EAA8E;QAC9E,+EAA+E;QAC/E,8EAA8E;QAC9E,sEAAsE;QACtE,IAAI,CAAC,cAAc,CAAC,EAAE,GAAG,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,CAAC;QAEjD,MAAM,aAAa,GAAG,IAAA,sCAAsB,EAAC,OAAO,CAAC,GAAG,EAAE,CAAC,CAAC;QAC5D,IAAI,CAAC,aAAa,EAAE,CAAC;YACnB,IAAI,CAAC,KAAK,CACR,gGAAgG,CACjG,CAAC;QACJ,CAAC;QAED,2EAA2E;QAC3E,0EAA0E;QAC1E,MAAM,WAAW,GAAG,IAAI,CAAC,MAAM,IAAI,IAAA,gCAAgB,EAAC,aAAa,CAAC,CAAC;Q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AAC,CAAC,MAAM,MAAM;qBACT,YAAY,EAAE;qBACd,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,SAAS,EAAE,aAAa,CAAC;qBACvC,KAAK,CAAC,GAAG,EAAE,CAAC,SAAS,CAAC,CAAC;YAC9B,IAAI,KAAK,EAAE,CAAC;gBACV,IAAI,CAAC,MAAM,CAAC,sBAAsB,IAAI,CAAC,gBAAgB,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;YACpE,CAAC;QACH,CAAC,CAAC,CAAC;IACL,CAAC;;AAvIM,uBAAO,GAAG,0EAA0E,CAAC;AACrF,2BAAW,GAChB,sFAAsF;IACtF,8FAA8F;IAC9F,6FAA6F;IAC7F,+FAA+F;IAC/F,4FAA4F;IAC5F,6CAA6C,CAAC;AACzC,wBAAQ,GAAG,CAAC,qCAAqC,EAAE,+CAA+C,CAAC,CAAC;AAEpG,oBAAI,GAAG;IACZ,MAAM,EAAE,WAAI,CAAC,MAAM,CAAC;QAClB,WAAW,EACT,qHAAqH;QACvH,QAAQ,EAAE,KAAK;KAChB,CAAC;CACH,CAAC;AAEK,qBAAK,GAAG;IACb,GAAG,0BAAW,CAAC,SAAS;IACxB,EAAE,EAAE,YAAK,CAAC,MAAM,CAAC;QACf,WAAW,EACT,kHAAkH;KACrH,CAAC;IACF,UAAU,EAAE,YAAK,CAAC,MAAM,CAAC;QACvB,WAAW,EACT,uFAAuF;YACvF,gGAAgG;YAChG,mEAAmE;KACtE,CAAC;CACH,CAAC;kBA/BiB,eAAe"}
@@ -1,41 +0,0 @@
1
- import type { XcodeClient } from '@limrun/api';
2
- /**
3
- * Watches a workspace's `.limrun/bep.json` and, after each completed build,
4
- * registers the built target's `.ipa` with the instance so it is installed on
5
- * the attached simulator now (and replayed on a later attach). This is the
6
- * client-side trigger for `lim xcode rbe` auto-install: only Bazel (on the
7
- * client) knows the build finished and which CAS digest is the top-level `.ipa`,
8
- * so the daemon holding the tunnel watches the BEP and the instance does the
9
- * install server-side.
10
- *
11
- * Robustness is the priority: this runs inside the detached daemon that holds
12
- * the only RBE tunnel, so every read/parse/HTTP error is caught and logged, and
13
- * the watcher never throws into the daemon (a crash here would drop the tunnel
14
- * mid-build). It is also idempotent: it acts once per Bazel invocation, even
15
- * when a build reproduces an earlier `.ipa` digest (e.g. a `git stash` revert),
16
- * because the instance keys "already installed" on the CAS digest.
17
- */
18
- export type BepWatcherOptions = {
19
- /** Absolute path to Bazel's build-event JSON log (`--build_event_json_file`). */
20
- bepPath: string;
21
- /** The build target to select from the BEP and install (e.g. //App:App). */
22
- target: string;
23
- /** Returns the XcodeClient to use; called per install so a refreshed client is picked up. */
24
- getClient: () => XcodeClient;
25
- /** Sink for status/diagnostic lines (the daemon redirects stdout/stderr to .limrun/rbe.log). */
26
- log: (msg: string) => void;
27
- /** Debounce window after a BEP change before acting. */
28
- debounceMs?: number;
29
- /** mtime-poll backstop interval (covers FSEvents coalescing/drops on macOS). */
30
- pollIntervalMs?: number;
31
- /** Delay before retrying a build after a transient install failure. */
32
- retryDelayMs?: number;
33
- /** Max transient-failure retries for one build before giving up (rebuild to retry). */
34
- maxRetries?: number;
35
- };
36
- export type BepWatcher = {
37
- /** Stops watching and awaits any in-flight registration. Idempotent. */
38
- close: () => Promise<void>;
39
- };
40
- export declare function startBepWatcher(opts: BepWatcherOptions): BepWatcher;
41
- //# sourceMappingURL=rbe-bep-watcher.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"rbe-bep-watcher.d.ts","sourceRoot":"","sources":["../../src/lib/rbe-bep-watcher.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAgB,WAAW,EAAE,MAAM,aAAa,CAAC;AAE7D;;;;;;;;;;;;;;;GAeG;AAEH,MAAM,MAAM,iBAAiB,GAAG;IAC9B,iFAAiF;IACjF,OAAO,EAAE,MAAM,CAAC;IAChB,4EAA4E;IAC5E,MAAM,EAAE,MAAM,CAAC;IACf,6FAA6F;IAC7F,SAAS,EAAE,MAAM,WAAW,CAAC;IAC7B,gGAAgG;IAChG,GAAG,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;IAC3B,wDAAwD;IACxD,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,gFAAgF;IAChF,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,uEAAuE;IACvE,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,uFAAuF;IACvF,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF,MAAM,MAAM,UAAU,GAAG;IACvB,wEAAwE;IACxE,KAAK,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;CAC5B,CAAC;AAEF,wBAAgB,eAAe,CAAC,IAAI,EAAE,iBAAiB,GAAG,UAAU,CAuPnE"}