@stim-cli/server 1.21.0 → 1.23.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.
@@ -32,6 +32,116 @@ var protocol_exports = /* @__PURE__ */ __exportAll({ protocolJsonSchema: () => p
32
32
  import * as import__stim_cli_core_protocol from "@stim-cli/core/protocol";
33
33
  __reExport(protocol_exports, import__stim_cli_core_protocol);
34
34
  const requestId = { type: ["integer", "string"] };
35
+ const runText = {
36
+ type: "string",
37
+ minLength: 1,
38
+ maxLength: 1024,
39
+ pattern: "^[^\\u0000]+$"
40
+ };
41
+ const runSelector = { oneOf: [runText, { type: "boolean" }] };
42
+ const nativeRunProperties = {
43
+ slot: runText,
44
+ remote: runText,
45
+ remoteBuild: runText,
46
+ easProfile: runText,
47
+ device: runSelector,
48
+ wait: runSelector,
49
+ metroCheck: { type: "boolean" },
50
+ buildCache: { type: "boolean" }
51
+ };
52
+ const platformRunOptions = { oneOf: [
53
+ {
54
+ type: "object",
55
+ required: ["platform"],
56
+ additionalProperties: false,
57
+ properties: {
58
+ platform: { const: "ios" },
59
+ ...nativeRunProperties,
60
+ configuration: runText,
61
+ scheme: runText,
62
+ deviceType: runText,
63
+ runtime: runText,
64
+ simulatorApp: runText
65
+ }
66
+ },
67
+ {
68
+ type: "object",
69
+ required: ["platform"],
70
+ additionalProperties: false,
71
+ properties: {
72
+ platform: { const: "android" },
73
+ ...nativeRunProperties,
74
+ variant: runText,
75
+ systemImage: runText,
76
+ deviceProfile: runText
77
+ }
78
+ },
79
+ {
80
+ type: "object",
81
+ required: ["platform"],
82
+ additionalProperties: false,
83
+ properties: {
84
+ platform: { const: "macos" },
85
+ remote: runText,
86
+ remoteBuild: runText
87
+ }
88
+ },
89
+ {
90
+ type: "object",
91
+ required: ["platform"],
92
+ additionalProperties: false,
93
+ properties: {
94
+ platform: { const: "web" },
95
+ headed: { type: "boolean" }
96
+ }
97
+ }
98
+ ] };
99
+ const platformBuildOptions = { oneOf: [
100
+ {
101
+ type: "object",
102
+ required: ["platform"],
103
+ additionalProperties: false,
104
+ properties: {
105
+ platform: { const: "ios" },
106
+ configuration: runText,
107
+ scheme: runText,
108
+ arch: { enum: [
109
+ "arm64",
110
+ "x86_64",
111
+ "all"
112
+ ] },
113
+ buildCache: { type: "boolean" },
114
+ remoteBuild: runText
115
+ }
116
+ },
117
+ {
118
+ type: "object",
119
+ required: ["platform"],
120
+ additionalProperties: false,
121
+ properties: {
122
+ platform: { const: "android" },
123
+ variant: runText,
124
+ abi: { enum: [
125
+ "arm64-v8a",
126
+ "armeabi-v7a",
127
+ "x86",
128
+ "x86_64",
129
+ "all"
130
+ ] },
131
+ buildCache: { type: "boolean" },
132
+ remoteBuild: runText
133
+ }
134
+ },
135
+ {
136
+ type: "object",
137
+ required: ["platform"],
138
+ additionalProperties: false,
139
+ properties: {
140
+ platform: { const: "macos" },
141
+ remoteBuild: runText
142
+ }
143
+ }
144
+ ] };
35
145
  const protocolError = {
36
146
  type: "object",
37
147
  required: ["code", "message"],
@@ -41,6 +151,10 @@ const protocolError = {
41
151
  message: { type: "string" }
42
152
  }
43
153
  };
154
+ const sha256 = {
155
+ type: "string",
156
+ pattern: "^[0-9a-f]{64}$"
157
+ };
44
158
  const buildRepo = {
45
159
  type: "string",
46
160
  pattern: BUILD_REPO_PATTERN
@@ -62,6 +176,304 @@ const buildArtifactIdentity = {
62
176
  }
63
177
  }
64
178
  };
179
+ const gradleArtifactQuery = {
180
+ type: "object",
181
+ required: [
182
+ "project",
183
+ "sourceDigest",
184
+ "inputs",
185
+ "android"
186
+ ],
187
+ additionalProperties: false,
188
+ properties: {
189
+ project: { type: "string" },
190
+ sourceDigest: sha256,
191
+ inputs: {
192
+ type: "object",
193
+ required: [
194
+ "complete",
195
+ "ignored",
196
+ "outputs"
197
+ ],
198
+ additionalProperties: false,
199
+ properties: {
200
+ complete: { const: true },
201
+ ignored: {
202
+ type: "array",
203
+ items: {
204
+ type: "string",
205
+ minLength: 1
206
+ }
207
+ },
208
+ outputs: {
209
+ type: "array",
210
+ items: {
211
+ type: "string",
212
+ minLength: 1
213
+ }
214
+ }
215
+ }
216
+ },
217
+ android: {
218
+ type: "object",
219
+ required: [
220
+ "variant",
221
+ "abi",
222
+ "gradleBuildCache",
223
+ "pch",
224
+ "compilerCache"
225
+ ],
226
+ additionalProperties: false,
227
+ properties: {
228
+ variant: {
229
+ type: "string",
230
+ minLength: 1
231
+ },
232
+ abi: { type: ["string", "null"] },
233
+ gradleBuildCache: { type: "boolean" },
234
+ pch: { enum: [
235
+ "auto",
236
+ "on",
237
+ "off"
238
+ ] },
239
+ compilerCache: { enum: ["ccache", "none"] },
240
+ gradleRoot: { type: ["string", "null"] },
241
+ module: { type: ["string", "null"] }
242
+ }
243
+ }
244
+ }
245
+ };
246
+ const swiftpmArtifactInputs = {
247
+ type: "object",
248
+ required: [
249
+ "complete",
250
+ "ignored",
251
+ "outputs",
252
+ "localFiles",
253
+ "environment"
254
+ ],
255
+ additionalProperties: false,
256
+ properties: {
257
+ complete: { const: true },
258
+ ignored: {
259
+ type: "array",
260
+ maxItems: 1e3,
261
+ items: {
262
+ type: "string",
263
+ minLength: 1
264
+ }
265
+ },
266
+ outputs: {
267
+ type: "array",
268
+ maxItems: 1e3,
269
+ items: {
270
+ type: "string",
271
+ minLength: 1
272
+ }
273
+ },
274
+ localFiles: {
275
+ type: "array",
276
+ maxItems: 1e3,
277
+ items: {
278
+ type: "string",
279
+ minLength: 1,
280
+ maxLength: 4096
281
+ }
282
+ },
283
+ environment: {
284
+ type: "array",
285
+ maxItems: 1e3,
286
+ items: {
287
+ type: "string",
288
+ pattern: "^[A-Za-z_][A-Za-z0-9_]*$"
289
+ }
290
+ }
291
+ }
292
+ };
293
+ const swiftpmArtifactQuery = {
294
+ type: "object",
295
+ required: [
296
+ "project",
297
+ "sourceDigest",
298
+ "stimBuild",
299
+ "inputs",
300
+ "build"
301
+ ],
302
+ additionalProperties: false,
303
+ properties: {
304
+ project: { type: "string" },
305
+ sourceDigest: sha256,
306
+ stimBuild: {
307
+ type: "string",
308
+ minLength: 1,
309
+ maxLength: 256
310
+ },
311
+ inputs: swiftpmArtifactInputs,
312
+ build: {
313
+ type: "object",
314
+ required: [
315
+ "product",
316
+ "infoPlist",
317
+ "resources",
318
+ "assetCatalog"
319
+ ],
320
+ additionalProperties: false,
321
+ properties: {
322
+ product: {
323
+ type: "string",
324
+ pattern: "^[A-Za-z0-9_.-]{1,100}$"
325
+ },
326
+ infoPlist: {
327
+ type: "string",
328
+ minLength: 1
329
+ },
330
+ resources: {
331
+ type: "object",
332
+ maxProperties: 256,
333
+ additionalProperties: { type: "string" }
334
+ },
335
+ assetCatalog: {
336
+ type: ["string", "null"],
337
+ minLength: 1
338
+ }
339
+ }
340
+ }
341
+ }
342
+ };
343
+ const reactNativeArtifactQuery = {
344
+ type: "object",
345
+ required: [
346
+ "project",
347
+ "fingerprint",
348
+ "isExpo",
349
+ "platform",
350
+ "toolchain"
351
+ ],
352
+ additionalProperties: false,
353
+ oneOf: [{
354
+ properties: {
355
+ platform: { const: "ios" },
356
+ toolchain: { required: [
357
+ "arch",
358
+ "xcode",
359
+ "simulatorSdk",
360
+ "cocoapods"
361
+ ] }
362
+ },
363
+ required: ["ios"]
364
+ }, {
365
+ properties: {
366
+ platform: { const: "android" },
367
+ toolchain: { required: ["jdk"] }
368
+ },
369
+ required: ["android"]
370
+ }],
371
+ properties: {
372
+ project: { type: "string" },
373
+ fingerprint: {
374
+ type: "string",
375
+ minLength: 1,
376
+ maxLength: 256
377
+ },
378
+ isExpo: { type: "boolean" },
379
+ platform: { enum: ["ios", "android"] },
380
+ toolchain: {
381
+ type: "object",
382
+ required: ["stimBuild"],
383
+ additionalProperties: false,
384
+ properties: {
385
+ stimBuild: {
386
+ type: "string",
387
+ minLength: 1
388
+ },
389
+ arch: {
390
+ type: "string",
391
+ minLength: 1
392
+ },
393
+ xcode: {
394
+ type: "string",
395
+ minLength: 1
396
+ },
397
+ simulatorSdk: {
398
+ type: "string",
399
+ minLength: 1
400
+ },
401
+ cocoapods: {
402
+ type: "string",
403
+ minLength: 1
404
+ },
405
+ jdk: {
406
+ type: "string",
407
+ minLength: 1
408
+ }
409
+ }
410
+ },
411
+ ios: {
412
+ type: "object",
413
+ required: [
414
+ "runtime",
415
+ "configuration",
416
+ "scheme",
417
+ "projectPath",
418
+ "optimizations"
419
+ ],
420
+ additionalProperties: false,
421
+ properties: {
422
+ runtime: {
423
+ type: "string",
424
+ minLength: 1
425
+ },
426
+ configuration: {
427
+ type: "string",
428
+ minLength: 1
429
+ },
430
+ scheme: { type: ["string", "null"] },
431
+ projectPath: {
432
+ type: "string",
433
+ minLength: 1
434
+ },
435
+ optimizations: {
436
+ type: "object",
437
+ required: [
438
+ "compilationCache",
439
+ "swiftCompilationCache",
440
+ "prefixMapping"
441
+ ],
442
+ additionalProperties: false,
443
+ properties: {
444
+ compilationCache: { type: "boolean" },
445
+ swiftCompilationCache: { type: ["boolean", "null"] },
446
+ prefixMapping: { type: "boolean" }
447
+ }
448
+ }
449
+ }
450
+ },
451
+ android: {
452
+ type: "object",
453
+ required: [
454
+ "variant",
455
+ "abi",
456
+ "gradleBuildCache",
457
+ "pch",
458
+ "compilerCache"
459
+ ],
460
+ additionalProperties: false,
461
+ properties: {
462
+ variant: { type: ["string", "null"] },
463
+ abi: { type: ["string", "null"] },
464
+ gradleBuildCache: { type: "boolean" },
465
+ pch: { enum: [
466
+ "auto",
467
+ "on",
468
+ "off"
469
+ ] },
470
+ compilerCache: { enum: ["ccache", "none"] },
471
+ gradleRoot: { type: ["string", "null"] },
472
+ module: { type: ["string", "null"] }
473
+ }
474
+ }
475
+ }
476
+ };
65
477
  const workspaceRef = {
66
478
  type: "object",
67
479
  required: ["workspace"],
@@ -88,10 +500,6 @@ const keyedDelta = (description) => ({
88
500
  }
89
501
  }
90
502
  });
91
- const sha256 = {
92
- type: "string",
93
- pattern: "^[0-9a-f]{64}$"
94
- };
95
503
  const buildJob = {
96
504
  type: "object",
97
505
  required: ["job"],
@@ -2001,6 +2409,10 @@ function protocolJsonSchema() {
2001
2409
  type: "object",
2002
2410
  maxProperties: 0
2003
2411
  }),
2412
+ optionalParams("desktop.settings.schema", {
2413
+ type: "object",
2414
+ maxProperties: 0
2415
+ }),
2004
2416
  request("desktop.settings.get", {
2005
2417
  type: "object",
2006
2418
  required: ["cwd"],
@@ -2071,6 +2483,22 @@ function protocolJsonSchema() {
2071
2483
  }
2072
2484
  }
2073
2485
  }),
2486
+ request("desktop.machine-access.subscribe", {
2487
+ type: "object",
2488
+ required: ["cwd"],
2489
+ additionalProperties: false,
2490
+ properties: {
2491
+ cwd: {
2492
+ type: "string",
2493
+ minLength: 1,
2494
+ maxLength: 4096
2495
+ },
2496
+ ticket: {
2497
+ type: "string",
2498
+ pattern: "^[A-Za-z0-9_-]{43}$"
2499
+ }
2500
+ }
2501
+ }),
2074
2502
  request("desktop.reload.subscribe", {
2075
2503
  type: "object",
2076
2504
  required: ["cwd"],
@@ -2084,6 +2512,155 @@ function protocolJsonSchema() {
2084
2512
  platform: { enum: [...RELOAD_PLATFORMS] }
2085
2513
  }
2086
2514
  }),
2515
+ request("desktop.start.subscribe", {
2516
+ type: "object",
2517
+ required: ["cwd"],
2518
+ additionalProperties: false,
2519
+ properties: {
2520
+ cwd: {
2521
+ type: "string",
2522
+ minLength: 1,
2523
+ maxLength: 4096
2524
+ },
2525
+ remote: { type: "boolean" },
2526
+ resetCache: { type: "boolean" },
2527
+ waitSeconds: {
2528
+ type: "integer",
2529
+ minimum: 1,
2530
+ maximum: Number.MAX_SAFE_INTEGER
2531
+ }
2532
+ }
2533
+ }),
2534
+ request("desktop.run.subscribe", {
2535
+ type: "object",
2536
+ required: ["cwd", "options"],
2537
+ additionalProperties: false,
2538
+ properties: {
2539
+ cwd: {
2540
+ type: "string",
2541
+ minLength: 1,
2542
+ maxLength: 4096
2543
+ },
2544
+ options: platformRunOptions
2545
+ }
2546
+ }),
2547
+ request("desktop.plan.get", { oneOf: [{
2548
+ type: "object",
2549
+ required: ["cwd", "platform"],
2550
+ additionalProperties: false,
2551
+ properties: {
2552
+ cwd: {
2553
+ type: "string",
2554
+ minLength: 1,
2555
+ maxLength: 4096
2556
+ },
2557
+ platform: { enum: ["ios", "android"] },
2558
+ slot: {
2559
+ type: "string",
2560
+ pattern: "^[A-Za-z0-9][A-Za-z0-9_-]{0,63}$"
2561
+ },
2562
+ request: {
2563
+ type: "string",
2564
+ pattern: "^[A-Za-z0-9_-]{1,128}$"
2565
+ }
2566
+ }
2567
+ }, {
2568
+ type: "object",
2569
+ required: ["cwd", "platform"],
2570
+ additionalProperties: false,
2571
+ properties: {
2572
+ cwd: {
2573
+ type: "string",
2574
+ minLength: 1,
2575
+ maxLength: 4096
2576
+ },
2577
+ platform: { const: "macos" },
2578
+ request: {
2579
+ type: "string",
2580
+ pattern: "^[A-Za-z0-9_-]{1,128}$"
2581
+ }
2582
+ }
2583
+ }] }),
2584
+ request("desktop.plan.cancel", {
2585
+ type: "object",
2586
+ required: ["request"],
2587
+ additionalProperties: false,
2588
+ properties: { request: {
2589
+ type: "string",
2590
+ pattern: "^[A-Za-z0-9_-]{1,128}$"
2591
+ } }
2592
+ }),
2593
+ request("desktop.build.subscribe", {
2594
+ type: "object",
2595
+ required: ["cwd", "options"],
2596
+ additionalProperties: false,
2597
+ properties: {
2598
+ cwd: {
2599
+ type: "string",
2600
+ minLength: 1,
2601
+ maxLength: 4096
2602
+ },
2603
+ options: platformBuildOptions
2604
+ }
2605
+ }),
2606
+ request("desktop.gc.subscribe", {
2607
+ type: "object",
2608
+ required: ["cwd"],
2609
+ additionalProperties: false,
2610
+ properties: {
2611
+ cwd: {
2612
+ type: "string",
2613
+ minLength: 1,
2614
+ maxLength: 4096
2615
+ },
2616
+ cache: {
2617
+ type: "string",
2618
+ minLength: 1,
2619
+ maxLength: 1024,
2620
+ pattern: "^.*\\S.*$"
2621
+ },
2622
+ olderThan: {
2623
+ type: "integer",
2624
+ minimum: Number.MIN_SAFE_INTEGER,
2625
+ maximum: Number.MAX_SAFE_INTEGER
2626
+ },
2627
+ worktrees: { type: "boolean" },
2628
+ delete: { type: "boolean" },
2629
+ idleMs: {
2630
+ type: "integer",
2631
+ minimum: 1,
2632
+ maximum: Number.MAX_SAFE_INTEGER
2633
+ }
2634
+ }
2635
+ }),
2636
+ request("desktop.worktree.warm.subscribe", {
2637
+ type: "object",
2638
+ required: ["cwd"],
2639
+ additionalProperties: false,
2640
+ properties: { cwd: {
2641
+ type: "string",
2642
+ minLength: 1,
2643
+ maxLength: 4096
2644
+ } }
2645
+ }),
2646
+ request("desktop.worktree.remove.subscribe", {
2647
+ type: "object",
2648
+ required: ["cwd"],
2649
+ additionalProperties: false,
2650
+ properties: {
2651
+ cwd: {
2652
+ type: "string",
2653
+ minLength: 1,
2654
+ maxLength: 4096
2655
+ },
2656
+ target: {
2657
+ type: "string",
2658
+ minLength: 1,
2659
+ maxLength: 4096
2660
+ },
2661
+ force: { type: "boolean" }
2662
+ }
2663
+ }),
2087
2664
  request("status.subscribe"),
2088
2665
  request("workspaces.subscribe"),
2089
2666
  request("workspace.subscribe", workspaceRef),
@@ -2406,12 +2983,24 @@ function protocolJsonSchema() {
2406
2983
  properties: {
2407
2984
  repo: buildRepo,
2408
2985
  lockfile: sha256,
2986
+ dependencies: {
2987
+ type: "object",
2988
+ required: ["project", "packageName"],
2989
+ additionalProperties: false,
2990
+ properties: {
2991
+ project: { type: "string" },
2992
+ packageName: { type: ["string", "null"] }
2993
+ }
2994
+ },
2409
2995
  rubyVersion: {
2410
2996
  type: "string",
2411
2997
  pattern: BUILD_RUBY_VERSION_PATTERN
2412
2998
  },
2413
2999
  native: { enum: ["xcode", "gradle"] },
2414
- artifact: buildArtifactIdentity
3000
+ artifact: buildArtifactIdentity,
3001
+ gradleArtifact: gradleArtifactQuery,
3002
+ reactNativeArtifact: reactNativeArtifactQuery,
3003
+ swiftpmArtifact: swiftpmArtifactQuery
2415
3004
  }
2416
3005
  }),
2417
3006
  request("build.sync", {
@@ -2555,6 +3144,20 @@ function protocolJsonSchema() {
2555
3144
  properties: {
2556
3145
  provider: { const: "gradle" },
2557
3146
  sourceDigest: sha256,
3147
+ cache: {
3148
+ type: "object",
3149
+ required: [
3150
+ "read",
3151
+ "write",
3152
+ "remote"
3153
+ ],
3154
+ additionalProperties: false,
3155
+ properties: {
3156
+ read: { type: "boolean" },
3157
+ write: { type: "boolean" },
3158
+ remote: { type: "boolean" }
3159
+ }
3160
+ },
2558
3161
  inputs: {
2559
3162
  type: "object",
2560
3163
  required: [
@@ -2629,6 +3232,7 @@ function protocolJsonSchema() {
2629
3232
  type: "string",
2630
3233
  pattern: "^[A-Za-z0-9][A-Za-z0-9.-]{0,199}$"
2631
3234
  },
3235
+ artifactInputs: swiftpmArtifactInputs,
2632
3236
  resources: {
2633
3237
  type: "object",
2634
3238
  maxProperties: 256,
@@ -2640,6 +3244,7 @@ function protocolJsonSchema() {
2640
3244
  }
2641
3245
  }
2642
3246
  },
3247
+ cacheArtifact: { type: "boolean" },
2643
3248
  stimBuild: {
2644
3249
  type: "string",
2645
3250
  minLength: 1
@@ -2654,7 +3259,10 @@ function protocolJsonSchema() {
2654
3259
  additionalProperties: false,
2655
3260
  properties: {
2656
3261
  repo: buildRepo,
2657
- artifact: buildArtifactIdentity
3262
+ artifact: buildArtifactIdentity,
3263
+ gradleArtifact: gradleArtifactQuery,
3264
+ reactNativeArtifact: reactNativeArtifactQuery,
3265
+ swiftpmArtifact: swiftpmArtifactQuery
2658
3266
  }
2659
3267
  }),
2660
3268
  request("build.attach", buildJob),
@@ -2920,7 +3528,17 @@ function protocolJsonSchema() {
2920
3528
  ],
2921
3529
  additionalProperties: false,
2922
3530
  properties: {
2923
- event: { enum: ["desktop-stop-progress", "desktop-reload-progress"] },
3531
+ event: { enum: [
3532
+ "desktop-stop-progress",
3533
+ "desktop-reload-progress",
3534
+ "desktop-start-progress",
3535
+ "desktop-run-progress",
3536
+ "desktop-build-progress",
3537
+ "desktop-gc-progress",
3538
+ "desktop-worktree-remove-progress",
3539
+ "desktop-worktree-warm-progress",
3540
+ "desktop-machine-access-progress"
3541
+ ] },
2924
3542
  subscription: { type: "string" },
2925
3543
  stream: { enum: ["stdout", "stderr"] },
2926
3544
  message: { type: "string" }
@@ -2937,7 +3555,17 @@ function protocolJsonSchema() {
2937
3555
  ],
2938
3556
  additionalProperties: false,
2939
3557
  properties: {
2940
- event: { enum: ["desktop-stop-ended", "desktop-reload-ended"] },
3558
+ event: { enum: [
3559
+ "desktop-stop-ended",
3560
+ "desktop-reload-ended",
3561
+ "desktop-start-ended",
3562
+ "desktop-run-ended",
3563
+ "desktop-build-ended",
3564
+ "desktop-gc-ended",
3565
+ "desktop-worktree-remove-ended",
3566
+ "desktop-worktree-warm-ended",
3567
+ "desktop-machine-access-ended"
3568
+ ] },
2941
3569
  subscription: { type: "string" },
2942
3570
  exitCode: { enum: [0, 1] },
2943
3571
  stdout: { type: "string" },