@fugood/bricks-cli 2.25.10 → 2.25.12

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/lib/907.js CHANGED
@@ -1,4 +1,4 @@
1
- export const __rspack_esm_id=907;export const __rspack_esm_ids=[907];export const __webpack_modules__={85382(e,i,t){t.r(i),t.d(i,{BricksClient:()=>b,BricksPublicClient:()=>I,createClient:()=>S,createFetchForUrl:()=>g.P,createPublicClient:()=>k});var a,n,r,o,s=t(99436),d=t(5018),l=t(44668),c=t(54506),u=t(78549),p=t(94370),m=t(43741),$=t(89293),g=t(75149),_=c.ApolloClient,v=c.InMemoryCache,h=c.HttpLink,y=u.o,f={query:"query",mutation:"mutate"},I=l(function e(i){d(this,e),this.baseUrl=i,this.endpoint="/api/graphql-nonauth";var t=new h({uri:`${i}${this.endpoint}`,fetch:(0,g.P)(i)});this.apolloClient=new _({link:t,cache:new v,defaultOptions:{query:{errorPolicy:"all",fetchPolicy:"no-cache"}}})},[{key:"checkWorkspaceOTP",value:(a=s(function*(e){var i=(0,p.default)`
1
+ export const __rspack_esm_id=907;export const __rspack_esm_ids=[907];export const __webpack_modules__={85382(e,i,t){t.r(i),t.d(i,{BricksClient:()=>S,BricksPublicClient:()=>I,createClient:()=>b,createFetchForUrl:()=>g.P,createPublicClient:()=>k});var a,n,o,r,s=t(99436),d=t(5018),c=t(44668),l=t(54506),u=t(78549),p=t(94370),m=t(43741),$=t(89293),g=t(75149),_=l.ApolloClient,v=l.InMemoryCache,h=l.HttpLink,y=u.o,f={query:"query",mutation:"mutate"},I=c(function e(i){d(this,e),this.baseUrl=i,this.endpoint="/api/graphql-nonauth";var t=new h({uri:`${i}${this.endpoint}`,fetch:(0,g.P)(i)});this.apolloClient=new _({link:t,cache:new v,defaultOptions:{query:{errorPolicy:"all",fetchPolicy:"no-cache"}}})},[{key:"checkWorkspaceOTP",value:(a=s(function*(e){var i=(0,p.default)`
2
2
  query checkWorkspaceOTP($passcode: String!) {
3
3
  checkWorkspaceOTP(passcode: $passcode)
4
4
  }
@@ -12,7 +12,7 @@ export const __rspack_esm_id=907;export const __rspack_esm_ids=[907];export cons
12
12
  }
13
13
  `,t=yield this.apolloClient.mutate({mutation:i,variables:{passcode:e}}),a=t.data,n=t.errors;if(n?.length>0)throw Error(n.map(({message:e})=>e).join("\n"));return a.exchangeWorkspaceOTP}),function(e){return n.apply(this,arguments)})}]),k=e=>new I(e),A="Note: OAuth workspace access is awaiting the next production server release. Until then, use workspace auth (passcode or token; CLI: `bricks auth login-workspace`).",C=(e,i)=>{if(i?.kind!=="oauth")return e;var t=e?.message||String(e);if(!(403===(e?.statusCode||e?.networkError?.statusCode||e?.cause?.statusCode)||/\b403\b|invalid algorithm/i.test(t))||t.includes(A))return e;var a=Error(`${t}
14
14
 
15
- ${A}`);return a.cause=e,a},b=l(function e(i,t){var a,n=this;d(this,e),this.baseUrl=i,this.auth=(e=>{if(!e)return null;if("string"==typeof e){var i;return{kind:"token",token:e,getHeaders:(i=s(function*(){return{authorization:`Bearer ${e}`}}),function(){return i.apply(this,arguments)})}}return e})(t),this.token=this.auth?.token,this.endpoint="/api/graphql-workspace";var r=new h({uri:`${i}${this.endpoint}`,fetch:(0,g.P)(i)}),o=y((a=s(function*(e,{headers:i}){return{headers:{...i,...n.auth?yield n.auth.getHeaders():{}}}}),function(e,i){return a.apply(this,arguments)}));this.apolloClient=new _({link:o.concat(r),cache:new v,defaultOptions:{watchQuery:{errorPolicy:"all",fetchPolicy:"no-cache"},query:{errorPolicy:"all",fetchPolicy:"no-cache"}}}),this.queries=m,this.mutations=$,this.generateMethods()},[{key:"generateMethods",value:function(){var e=this,i=i=>([t,a])=>{if(!this[t]){var n,r=(n=s(function*(n,r){try{var o=e.apolloClient[f[i]].bind(e.apolloClient),s=yield o({[i]:a,variables:n,...r}),d=s.data,l=s.errors;if(l)throw Error(l.map(({message:e})=>e).join("\n"));return d[t]}catch(e){if(e.cause?.result?.errors)throw Error(e.cause.result.errors.map(({message:e})=>e).join("\n"));throw e}}),function(e,i){return n.apply(this,arguments)});this[t]=s(function*(i={},t={}){try{return yield r(i,t)}catch(a){if(e.auth?.kind==="oauth"&&e.auth.refresh&&/401|unauthoriz|jwt expired|token.*expired|invalid.*token/i.test(a?.message||"")){yield e.auth.refresh();try{return yield r(i,t)}catch(i){throw C(i,e.auth)}}throw C(a,e.auth)}})}};Object.entries(this.queries).forEach(i("query")),Object.entries(this.mutations).forEach(i("mutation"))}},{key:"query",value:(r=s(function*(e,i={}){var t=yield this.apolloClient.query({query:e,variables:i,fetchPolicy:"no-cache"}),a=t.data,n=t.errors;if(n?.length>0)throw Error(n.map(({message:e})=>e).join("\n"));return a}),function(e){return r.apply(this,arguments)})},{key:"mutate",value:(o=s(function*(e,i={}){var t=yield this.apolloClient.mutate({mutation:e,variables:i}),a=t.data,n=t.errors;if(n?.length>0)throw Error(n.map(({message:e})=>e).join("\n"));return a}),function(e){return o.apply(this,arguments)})}]),S=(e,i)=>new b(e,i)},75149(e,i,t){t.d(i,{P:()=>r});var a=t(79657),n=t(64007);function r(e){var i=process.env.HTTPS_PROXY||process.env.https_proxy;if(!i||!e.startsWith("https://"))return a.Ay;var t=new n(i);return(e,i={})=>(0,a.Ay)(e,{...i,agent:t})}},48596(e,i,t){t.d(i,{$7:()=>c,$V:()=>u,F3:()=>r,J6:()=>p,NJ:()=>s,VZ:()=>o,Yi:()=>n,lI:()=>l,mJ:()=>d});var a=t(94370),n=(0,a.default)`
15
+ ${A}`);return a.cause=e,a},S=c(function e(i,t){var a,n=this;d(this,e),this.baseUrl=i,this.auth=(e=>{if(!e)return null;if("string"==typeof e){var i;return{kind:"token",token:e,getHeaders:(i=s(function*(){return{authorization:`Bearer ${e}`}}),function(){return i.apply(this,arguments)})}}return e})(t),this.token=this.auth?.token,this.endpoint="/api/graphql-workspace";var o=new h({uri:`${i}${this.endpoint}`,fetch:(0,g.P)(i)}),r=y((a=s(function*(e,{headers:i}){return{headers:{...i,...n.auth?yield n.auth.getHeaders():{}}}}),function(e,i){return a.apply(this,arguments)}));this.apolloClient=new _({link:r.concat(o),cache:new v,defaultOptions:{watchQuery:{errorPolicy:"all",fetchPolicy:"no-cache"},query:{errorPolicy:"all",fetchPolicy:"no-cache"}}}),this.queries=m,this.mutations=$,this.generateMethods()},[{key:"generateMethods",value:function(){var e=this,i=i=>([t,a])=>{if(!this[t]){var n,o=(n=s(function*(n,o){try{var r=e.apolloClient[f[i]].bind(e.apolloClient),s=yield r({[i]:a,variables:n,...o}),d=s.data,c=s.errors;if(c)throw Error(c.map(({message:e})=>e).join("\n"));return d[t]}catch(e){if(e.cause?.result?.errors)throw Error(e.cause.result.errors.map(({message:e})=>e).join("\n"));throw e}}),function(e,i){return n.apply(this,arguments)});this[t]=s(function*(i={},t={}){try{return yield o(i,t)}catch(a){if(e.auth?.kind==="oauth"&&e.auth.refresh&&/401|unauthoriz|jwt expired|token.*expired|invalid.*token/i.test(a?.message||"")){yield e.auth.refresh();try{return yield o(i,t)}catch(i){throw C(i,e.auth)}}throw C(a,e.auth)}})}};Object.entries(this.queries).forEach(i("query")),Object.entries(this.mutations).forEach(i("mutation"))}},{key:"query",value:(o=s(function*(e,i={}){var t=yield this.apolloClient.query({query:e,variables:i,fetchPolicy:"no-cache"}),a=t.data,n=t.errors;if(n?.length>0)throw Error(n.map(({message:e})=>e).join("\n"));return a}),function(e){return o.apply(this,arguments)})},{key:"mutate",value:(r=s(function*(e,i={}){var t=yield this.apolloClient.mutate({mutation:e,variables:i}),a=t.data,n=t.errors;if(n?.length>0)throw Error(n.map(({message:e})=>e).join("\n"));return a}),function(e){return r.apply(this,arguments)})}]),b=(e,i)=>new S(e,i)},75149(e,i,t){t.d(i,{P:()=>o});var a=t(79657),n=t(64007);function o(e){var i=process.env.HTTPS_PROXY||process.env.https_proxy;if(!i||!e.startsWith("https://"))return a.Ay;var t=new n(i);return(e,i={})=>(0,a.Ay)(e,{...i,agent:t})}},48596(e,i,t){t.d(i,{$7:()=>l,$V:()=>u,F3:()=>o,J6:()=>p,NJ:()=>s,VZ:()=>r,Yi:()=>n,lI:()=>c,mJ:()=>d});var a=t(94370),n=(0,a.default)`
16
16
  fragment cliWorkspaceArguments on Workspace {
17
17
  _id
18
18
  name
@@ -38,7 +38,7 @@ ${A}`);return a.cause=e,a},b=l(function e(i,t){var a,n=this;d(this,e),this.baseU
38
38
  }
39
39
  }
40
40
  }
41
- `,r=(0,a.default)`
41
+ `,o=(0,a.default)`
42
42
  fragment cliDeviceArguments on Device {
43
43
  _id
44
44
  name
@@ -113,18 +113,28 @@ ${A}`);return a.cause=e,a},b=l(function e(i,t){var a,n=this;d(this,e),this.baseU
113
113
  env {
114
114
  variables
115
115
  }
116
+ lock {
117
+ enabled
118
+ }
119
+ activity_log {
120
+ enabled
121
+ filter
122
+ screenshot_enabled
123
+ }
124
+ # Stored settings; entry_detail.local_sync is the runtime status reported by the device
125
+ local_sync {
126
+ enabled
127
+ priority_as_main
128
+ disable_dynamic_latency
129
+ latency_offset
130
+ }
116
131
  used_workspace {
117
132
  _id
118
- media_resource {
119
- enable_media_workspace
120
- system_media_box_id
121
- system_media_box_passcode
122
- }
123
133
  }
124
134
  create_datetime
125
135
  last_modify_datetime
126
136
  }
127
- `,o=(0,a.default)`
137
+ `,r=(0,a.default)`
128
138
  fragment cliDevicePanelArguments on Device {
129
139
  _id
130
140
  name
@@ -192,7 +202,7 @@ ${A}`);return a.cause=e,a},b=l(function e(i,t){var a,n=this;d(this,e),this.baseU
192
202
  create_datetime
193
203
  last_modify_datetime
194
204
  }
195
- `,l=(0,a.default)`
205
+ `,c=(0,a.default)`
196
206
  fragment cliApplicationArguments on Application {
197
207
  _id
198
208
  name
@@ -209,13 +219,16 @@ ${A}`);return a.cause=e,a},b=l(function e(i,t){var a,n=this;d(this,e),this.baseU
209
219
  }
210
220
  short_edit {
211
221
  enabled
222
+ use_unstable_features
212
223
  ref_map
213
224
  }
214
225
  canvas_control {
215
226
  enabled
227
+ use_unstable_features
216
228
  }
217
229
  device_control {
218
230
  enabled
231
+ use_unstable_features
219
232
  }
220
233
  lock {
221
234
  enabled
@@ -224,6 +237,12 @@ ${A}`);return a.cause=e,a},b=l(function e(i,t){var a,n=this;d(this,e),this.baseU
224
237
  device_id
225
238
  status
226
239
  frame
240
+ run_test
241
+ cron_tests {
242
+ test_id
243
+ cron
244
+ bind_id
245
+ }
227
246
  }
228
247
  id_for_devices
229
248
  sync_key
@@ -231,7 +250,7 @@ ${A}`);return a.cause=e,a},b=l(function e(i,t){var a,n=this;d(this,e),this.baseU
231
250
  create_datetime
232
251
  last_modify_datetime
233
252
  }
234
- `,c=(0,a.default)`
253
+ `,l=(0,a.default)`
235
254
  fragment cliApplicationShortArguments on Application {
236
255
  _id
237
256
  name
@@ -269,14 +288,14 @@ ${A}`);return a.cause=e,a},b=l(function e(i,t){var a,n=this;d(this,e),this.baseU
269
288
  description
270
289
  current_version
271
290
  }
272
- `},89293(e,i,t){t.r(i),t.d(i,{bindApplication:()=>_,bindButtressServer:()=>S,controlDevice:()=>o,createApplication:()=>u,createApplicationWithShareVersion:()=>p,createDevice:()=>r,createMediaFileUploadRequest:()=>C,createModule:()=>h,createVirtualDevice:()=>s,dispatchDeviceGroupAction:()=>c,issueButtressAccessToken:()=>w,issueDevtoolsAccessToken:()=>L,releaseApplication:()=>A,releaseModule:()=>b,removeApplication:()=>$,removeDevice:()=>l,removeModule:()=>f,shortEditApplication:()=>g,shortEditModule:()=>I,triggerApplicationCanvasControl:()=>v,unbindButtressServer:()=>D,updateApplication:()=>m,updateModule:()=>y,updateVirtualDevice:()=>d,updateWorkspace:()=>k});var a=t(94370),n=t(48596),r=(0,a.default)`
291
+ `},89293(e,i,t){t.r(i),t.d(i,{bindApplication:()=>h,bindButtressServer:()=>L,controlDevice:()=>r,createApplication:()=>p,createApplicationWithShareVersion:()=>m,createDevice:()=>o,createMediaFileUploadRequest:()=>b,createModule:()=>f,createVirtualDevice:()=>s,dispatchDeviceGroupAction:()=>u,issueButtressAccessToken:()=>P,issueDevtoolsAccessToken:()=>B,releaseApplication:()=>S,releaseModule:()=>D,removeApplication:()=>_,removeDevice:()=>l,removeModule:()=>k,shortEditApplication:()=>v,shortEditModule:()=>A,triggerApplicationCanvasControl:()=>y,unbindButtressServer:()=>w,updateApplication:()=>$,updateDevice:()=>c,updateModule:()=>I,updateVirtualDevice:()=>d,updateWorkspace:()=>C,useApplicationReleaseVersion:()=>g});var a=t(94370),n=t(48596),o=(0,a.default)`
273
292
  mutation CLI_createDevice($bindPasscode: String, $name: String, $deviceName: String) {
274
293
  createDevice(bindPasscode: $bindPasscode, name: $name, deviceName: $deviceName) {
275
294
  ...cliDeviceArguments
276
295
  }
277
296
  }
278
297
  ${n.F3}
279
- `,o=(0,a.default)`
298
+ `,r=(0,a.default)`
280
299
  mutation CLI_controlDevice($id: ID!, $type: String!, $eventPayload: JSON) {
281
300
  controlDevice(id: $id, type: $type, eventPayload: $eventPayload) {
282
301
  _id
@@ -303,18 +322,45 @@ ${A}`);return a.cause=e,a},b=l(function e(i,t){var a,n=this;d(this,e),this.baseU
303
322
  }
304
323
  }
305
324
  ${n.F3}
325
+ `,c=(0,a.default)`
326
+ mutation CLI_updateDevice(
327
+ $id: ID!
328
+ $name: String
329
+ $description: String
330
+ $tags: [String]
331
+ $env: DeviceEnvInput
332
+ $activityLog: ActivityLogInput
333
+ $localSync: LocalSyncInput
334
+ $lock: DeviceLockInput
335
+ $forceNotifyDevice: Boolean
336
+ ) {
337
+ updateDevice(
338
+ id: $id
339
+ name: $name
340
+ description: $description
341
+ tags: $tags
342
+ env: $env
343
+ activityLog: $activityLog
344
+ localSync: $localSync
345
+ lock: $lock
346
+ forceNotifyDevice: $forceNotifyDevice
347
+ ) {
348
+ ...cliDeviceArguments
349
+ }
350
+ }
351
+ ${n.F3}
306
352
  `,l=(0,a.default)`
307
353
  mutation CLI_removeDevice($id: ID!) {
308
354
  removeDevice(id: $id)
309
355
  }
310
- `,c=(0,a.default)`
356
+ `,u=(0,a.default)`
311
357
  mutation CLI_dispatchDeviceGroupAction($id: ID!, $action: String!) {
312
358
  dispatchDeviceGroupAction(id: $id, action: $action) {
313
359
  dispatched
314
360
  devices
315
361
  }
316
362
  }
317
- `,u=(0,a.default)`
363
+ `,p=(0,a.default)`
318
364
  mutation CLI_createApplication(
319
365
  $name: String
320
366
  $description: String
@@ -331,7 +377,7 @@ ${A}`);return a.cause=e,a},b=l(function e(i,t){var a,n=this;d(this,e),this.baseU
331
377
  }
332
378
  }
333
379
  ${n.$7}
334
- `,p=(0,a.default)`
380
+ `,m=(0,a.default)`
335
381
  mutation CLI_createApplicationWithShareVersion(
336
382
  $name: String
337
383
  $description: String
@@ -348,12 +394,14 @@ ${A}`);return a.cause=e,a},b=l(function e(i,t){var a,n=this;d(this,e),this.baseU
348
394
  }
349
395
  }
350
396
  ${n.$7}
351
- `,m=(0,a.default)`
397
+ `,$=(0,a.default)`
352
398
  mutation CLI_updateApplication(
353
399
  $id: ID!
354
400
  $config: String
355
401
  $name: String
356
402
  $description: String
403
+ $tags: [String]
404
+ $lock: ApplicationLockInput
357
405
  $validateConfig: Boolean
358
406
  $lastCommitId: String
359
407
  ) {
@@ -362,20 +410,33 @@ ${A}`);return a.cause=e,a},b=l(function e(i,t){var a,n=this;d(this,e),this.baseU
362
410
  config: $config
363
411
  name: $name
364
412
  description: $description
413
+ tags: $tags
414
+ lock: $lock
365
415
  validateConfig: $validateConfig
366
416
  lastCommitId: $lastCommitId
367
417
  ) {
368
418
  ...cliApplicationShortArguments
369
419
  config
370
420
  has_unreleased_changes
421
+ tags
422
+ lock {
423
+ enabled
424
+ }
371
425
  }
372
426
  }
373
427
  ${n.$7}
374
- `,$=(0,a.default)`
428
+ `,g=(0,a.default)`
429
+ mutation CLI_useApplicationReleaseVersion($id: ID!, $versionId: ID!) {
430
+ useApplicationReleaseVersion: updateApplication(id: $id, useReleaseVersion: $versionId) {
431
+ ...cliApplicationShortArguments
432
+ }
433
+ }
434
+ ${n.$7}
435
+ `,_=(0,a.default)`
375
436
  mutation CLI_removeApplication($id: ID!) {
376
437
  removeApplication(id: $id)
377
438
  }
378
- `,g=(0,a.default)`
439
+ `,v=(0,a.default)`
379
440
  mutation CLI_shortEditApplication(
380
441
  $id: ID!
381
442
  $list: [ShortEditInput]!
@@ -387,7 +448,7 @@ ${A}`);return a.cause=e,a},b=l(function e(i,t){var a,n=this;d(this,e),this.baseU
387
448
  }
388
449
  }
389
450
  ${n.$7}
390
- `,_=(0,a.default)`
451
+ `,h=(0,a.default)`
391
452
  mutation CLI_bindApplication(
392
453
  $id: ID!
393
454
  $bindDevices: [ID]
@@ -408,7 +469,7 @@ ${A}`);return a.cause=e,a},b=l(function e(i,t){var a,n=this;d(this,e),this.baseU
408
469
  }
409
470
  }
410
471
  }
411
- `,v=(0,a.default)`
472
+ `,y=(0,a.default)`
412
473
  mutation CLI_triggerApplicationCanvasControl(
413
474
  $id: ID!
414
475
  $testId: String!
@@ -426,7 +487,7 @@ ${A}`);return a.cause=e,a},b=l(function e(i,t){var a,n=this;d(this,e),this.baseU
426
487
  _id
427
488
  }
428
489
  }
429
- `,h=(0,a.default)`
490
+ `,f=(0,a.default)`
430
491
  mutation CLI_createModule(
431
492
  $name: String
432
493
  $description: String
@@ -451,7 +512,7 @@ ${A}`);return a.cause=e,a},b=l(function e(i,t){var a,n=this;d(this,e),this.baseU
451
512
  }
452
513
  }
453
514
  ${n.$V}
454
- `,y=(0,a.default)`
515
+ `,I=(0,a.default)`
455
516
  mutation CLI_updateModule(
456
517
  $id: ID!
457
518
  $config: String
@@ -472,11 +533,11 @@ ${A}`);return a.cause=e,a},b=l(function e(i,t){var a,n=this;d(this,e),this.baseU
472
533
  }
473
534
  }
474
535
  ${n.$V}
475
- `,f=(0,a.default)`
536
+ `,k=(0,a.default)`
476
537
  mutation CLI_removeModule($id: ID!) {
477
538
  removeModule(id: $id)
478
539
  }
479
- `,I=(0,a.default)`
540
+ `,A=(0,a.default)`
480
541
  mutation CLI_shortEditModule(
481
542
  $id: ID!
482
543
  $list: [ShortEditInput]!
@@ -488,7 +549,7 @@ ${A}`);return a.cause=e,a},b=l(function e(i,t){var a,n=this;d(this,e),this.baseU
488
549
  name
489
550
  }
490
551
  }
491
- `,k=(0,a.default)`
552
+ `,C=(0,a.default)`
492
553
  mutation CLI_updateWorkspace(
493
554
  $name: String
494
555
  $description: String
@@ -512,11 +573,12 @@ ${A}`);return a.cause=e,a},b=l(function e(i,t){var a,n=this;d(this,e),this.baseU
512
573
  }
513
574
  }
514
575
  }
515
- `,A=(0,a.default)`
576
+ `,S=(0,a.default)`
516
577
  mutation CLI_releaseApplication(
517
578
  $id: ID!
518
579
  $config: String
519
580
  $name: String
581
+ $validateConfig: Boolean
520
582
  $releaseCurrentVersion: String
521
583
  $releaseCurrentVersionNote: String
522
584
  ) {
@@ -524,6 +586,7 @@ ${A}`);return a.cause=e,a},b=l(function e(i,t){var a,n=this;d(this,e),this.baseU
524
586
  id: $id
525
587
  config: $config
526
588
  name: $name
589
+ validateConfig: $validateConfig
527
590
  releaseCurrentVersion: $releaseCurrentVersion
528
591
  releaseCurrentVersionNote: $releaseCurrentVersionNote
529
592
  ) {
@@ -531,7 +594,7 @@ ${A}`);return a.cause=e,a},b=l(function e(i,t){var a,n=this;d(this,e),this.baseU
531
594
  name
532
595
  }
533
596
  }
534
- `,C=(0,a.default)`
597
+ `,b=(0,a.default)`
535
598
  mutation CLI_createMediaFileUploadRequest(
536
599
  $name: String!
537
600
  $description: String!
@@ -558,7 +621,7 @@ ${A}`);return a.cause=e,a},b=l(function e(i,t){var a,n=this;d(this,e),this.baseU
558
621
  }
559
622
  }
560
623
  }
561
- `,b=(0,a.default)`
624
+ `,D=(0,a.default)`
562
625
  mutation CLI_releaseModule(
563
626
  $id: ID!
564
627
  $config: String
@@ -578,7 +641,7 @@ ${A}`);return a.cause=e,a},b=l(function e(i,t){var a,n=this;d(this,e),this.baseU
578
641
  name
579
642
  }
580
643
  }
581
- `,S=(0,a.default)`
644
+ `,L=(0,a.default)`
582
645
  mutation CLI_bindButtressServer(
583
646
  $serverId: String!
584
647
  $name: String
@@ -594,11 +657,11 @@ ${A}`);return a.cause=e,a},b=l(function e(i,t){var a,n=this;d(this,e),this.baseU
594
657
  }
595
658
  }
596
659
  }
597
- `,D=(0,a.default)`
660
+ `,w=(0,a.default)`
598
661
  mutation CLI_unbindButtressServer($serverId: String!) {
599
662
  unbindButtressServer(serverId: $serverId)
600
663
  }
601
- `,w=(0,a.default)`
664
+ `,P=(0,a.default)`
602
665
  mutation CLI_issueButtressAccessToken($ttlSeconds: Int) {
603
666
  issueButtressAccessToken(ttlSeconds: $ttlSeconds) {
604
667
  token
@@ -607,7 +670,7 @@ ${A}`);return a.cause=e,a},b=l(function e(i,t){var a,n=this;d(this,e),this.baseU
607
670
  jti
608
671
  }
609
672
  }
610
- `,L=(0,a.default)`
673
+ `,B=(0,a.default)`
611
674
  mutation CLI_issueDevtoolsAccessToken($ttlSeconds: Int) {
612
675
  issueDevtoolsAccessToken(ttlSeconds: $ttlSeconds) {
613
676
  token
@@ -616,14 +679,14 @@ ${A}`);return a.cause=e,a},b=l(function e(i,t){var a,n=this;d(this,e),this.baseU
616
679
  jti
617
680
  }
618
681
  }
619
- `},43741(e,i,t){t.r(i),t.d(i,{application:()=>p,applicationProject:()=>b,applications:()=>m,buttressServers:()=>D,checkBindDevicePasscode:()=>h,device:()=>o,deviceGroup:()=>l,deviceGroups:()=>c,deviceUsage:()=>C,devices:()=>s,devicesByGroup:()=>u,devicesPanel:()=>d,mediaBox:()=>k,mediaBoxes:()=>I,mediaFile:()=>A,mediaFiles:()=>y,mediaWorkspace:()=>f,module:()=>g,moduleProject:()=>S,modules:()=>_,publicApplicationShareInfo:()=>$,publicModules:()=>v,workspace:()=>r});var a=t(94370),n=t(48596),r=(0,a.default)`
682
+ `},43741(e,i,t){t.r(i),t.d(i,{application:()=>p,applicationDeviceSettings:()=>m,applicationProject:()=>D,applicationReleaseVersions:()=>$,applications:()=>g,buttressServers:()=>w,checkBindDevicePasscode:()=>f,device:()=>r,deviceGroup:()=>c,deviceGroups:()=>l,deviceUsage:()=>b,devices:()=>s,devicesByGroup:()=>u,devicesPanel:()=>d,mediaBox:()=>C,mediaBoxes:()=>A,mediaFile:()=>S,mediaFiles:()=>I,mediaWorkspace:()=>k,module:()=>v,moduleProject:()=>L,modules:()=>h,publicApplicationShareInfo:()=>_,publicModules:()=>y,workspace:()=>o});var a=t(94370),n=t(48596),o=(0,a.default)`
620
683
  query CLI_workspace {
621
684
  workspace {
622
685
  ...cliWorkspaceArguments
623
686
  }
624
687
  }
625
688
  ${n.Yi}
626
- `,o=(0,a.default)`
689
+ `,r=(0,a.default)`
627
690
  query CLI_device($id: ID) {
628
691
  device(id: $id) {
629
692
  ...cliDeviceArguments
@@ -644,14 +707,14 @@ ${A}`);return a.cause=e,a},b=l(function e(i,t){var a,n=this;d(this,e),this.baseU
644
707
  }
645
708
  }
646
709
  ${n.VZ}
647
- `,l=(0,a.default)`
710
+ `,c=(0,a.default)`
648
711
  query CLI_deviceGroup($id: ID) {
649
712
  deviceGroup(id: $id) {
650
713
  ...cliDeviceGroupArguments
651
714
  }
652
715
  }
653
716
  ${n.mJ}
654
- `,c=(0,a.default)`
717
+ `,l=(0,a.default)`
655
718
  query CLI_deviceGroups($paginate: Paginate) {
656
719
  deviceGroups(paginate: $paginate) {
657
720
  ...cliDeviceGroupArguments
@@ -687,13 +750,47 @@ ${A}`);return a.cause=e,a},b=l(function e(i,t){var a,n=this;d(this,e),this.baseU
687
750
  }
688
751
  ${n.lI}
689
752
  `,m=(0,a.default)`
753
+ query CLI_applicationDeviceSettings($id: ID!) {
754
+ applicationDeviceSettings: application(id: $id) {
755
+ _id
756
+ devices {
757
+ device_id
758
+ frame
759
+ run_test
760
+ short_edit
761
+ canvas_control
762
+ device_control
763
+ env
764
+ cron_tests {
765
+ test_id
766
+ cron
767
+ date_range {
768
+ start
769
+ end
770
+ }
771
+ update_screenshot
772
+ bind_id
773
+ }
774
+ }
775
+ }
776
+ }
777
+ `,$=(0,a.default)`
778
+ query CLI_applicationReleaseVersions($id: ID!) {
779
+ applicationReleaseVersions(id: $id) {
780
+ _id
781
+ version
782
+ note
783
+ create_datetime
784
+ }
785
+ }
786
+ `,g=(0,a.default)`
690
787
  query CLI_applications($keyword: String, $paginate: Paginate) {
691
788
  applications(keyword: $keyword, paginate: $paginate) {
692
789
  ...cliApplicationShortArguments
693
790
  }
694
791
  }
695
792
  ${n.$7}
696
- `,$=(0,a.default)`
793
+ `,_=(0,a.default)`
697
794
  query CLI_publicApplicationShareInfo($id: ID!) {
698
795
  publicApplicationShareInfo(id: $id) {
699
796
  _id
@@ -718,32 +815,32 @@ ${A}`);return a.cause=e,a},b=l(function e(i,t){var a,n=this;d(this,e),this.baseU
718
815
  }
719
816
  }
720
817
  }
721
- `,g=(0,a.default)`
818
+ `,v=(0,a.default)`
722
819
  query CLI_module($id: ID!) {
723
820
  module(id: $id) {
724
821
  ...cliModuleArguments
725
822
  }
726
823
  }
727
824
  ${n.$V}
728
- `,_=(0,a.default)`
825
+ `,h=(0,a.default)`
729
826
  query CLI_modules($keyword: String, $paginate: Paginate) {
730
827
  modules(keyword: $keyword, paginate: $paginate) {
731
828
  ...cliModuleShortArguments
732
829
  }
733
830
  }
734
831
  ${n.J6}
735
- `,v=(0,a.default)`
832
+ `,y=(0,a.default)`
736
833
  query CLI_publicModules($keyword: String!, $limit: Int) {
737
834
  publicModules(keyword: $keyword, paginate: { limit: $limit }) {
738
835
  ...cliModuleShortArguments
739
836
  }
740
837
  }
741
838
  ${n.J6}
742
- `,h=(0,a.default)`
839
+ `,f=(0,a.default)`
743
840
  query CLI_checkBindDevicePasscode($passcode: String!) {
744
841
  checkBindDevicePasscode(passcode: $passcode)
745
842
  }
746
- `,y=(0,a.default)`
843
+ `,I=(0,a.default)`
747
844
  query CLI_mediaFiles(
748
845
  $boxId: ID!
749
846
  $includeTypes: [String]
@@ -786,7 +883,7 @@ ${A}`);return a.cause=e,a},b=l(function e(i,t){var a,n=this;d(this,e),this.baseU
786
883
  }
787
884
  }
788
885
  }
789
- `,f=(0,a.default)`
886
+ `,k=(0,a.default)`
790
887
  query CLI_mediaWorkspace {
791
888
  mediaWorkspace {
792
889
  id
@@ -799,7 +896,7 @@ ${A}`);return a.cause=e,a},b=l(function e(i,t){var a,n=this;d(this,e),this.baseU
799
896
  updatedAt
800
897
  }
801
898
  }
802
- `,I=(0,a.default)`
899
+ `,A=(0,a.default)`
803
900
  query CLI_mediaBoxes {
804
901
  mediaBoxes {
805
902
  id
@@ -820,7 +917,7 @@ ${A}`);return a.cause=e,a},b=l(function e(i,t){var a,n=this;d(this,e),this.baseU
820
917
  }
821
918
  }
822
919
  }
823
- `,k=(0,a.default)`
920
+ `,C=(0,a.default)`
824
921
  query CLI_mediaBox($id: ID!) {
825
922
  mediaBox(id: $id) {
826
923
  id
@@ -841,7 +938,7 @@ ${A}`);return a.cause=e,a},b=l(function e(i,t){var a,n=this;d(this,e),this.baseU
841
938
  }
842
939
  }
843
940
  }
844
- `,A=(0,a.default)`
941
+ `,S=(0,a.default)`
845
942
  query CLI_mediaFile($id: ID!) {
846
943
  mediaFile(id: $id) {
847
944
  id
@@ -872,7 +969,7 @@ ${A}`);return a.cause=e,a},b=l(function e(i,t){var a,n=this;d(this,e),this.baseU
872
969
  }
873
970
  }
874
971
  }
875
- `,C=(0,a.default)`
972
+ `,b=(0,a.default)`
876
973
  query CLI_deviceUsage($deviceId: ID, $startDate: Date, $endDate: Date) {
877
974
  deviceUsage(deviceId: $deviceId, startDate: $startDate, endDate: $endDate) {
878
975
  _id
@@ -891,7 +988,7 @@ ${A}`);return a.cause=e,a},b=l(function e(i,t){var a,n=this;d(this,e),this.baseU
891
988
  }
892
989
  }
893
990
  }
894
- `,b=(0,a.default)`
991
+ `,D=(0,a.default)`
895
992
  query CLI_applicationProject(
896
993
  $id: ID!
897
994
  $buildApplicationOnly: Boolean
@@ -909,7 +1006,7 @@ ${A}`);return a.cause=e,a},b=l(function e(i,t){var a,n=this;d(this,e),this.baseU
909
1006
  setupGeminiCLI: $setupGeminiCLI
910
1007
  )
911
1008
  }
912
- `,S=(0,a.default)`
1009
+ `,L=(0,a.default)`
913
1010
  query CLI_moduleProject(
914
1011
  $id: ID!
915
1012
  $buildApplicationOnly: Boolean
@@ -927,7 +1024,7 @@ ${A}`);return a.cause=e,a},b=l(function e(i,t){var a,n=this;d(this,e),this.baseU
927
1024
  setupGeminiCLI: $setupGeminiCLI
928
1025
  )
929
1026
  }
930
- `,D=(0,a.default)`
1027
+ `,w=(0,a.default)`
931
1028
  query CLI_buttressServers {
932
1029
  buttressServers {
933
1030
  serverId
package/lib/9320.js CHANGED
@@ -1,3 +1,24 @@
1
- export const __rspack_esm_id=9320;export const __rspack_esm_ids=[9320];export const __webpack_modules__={65650(e,t,r){e.exports=r(78942).Symbol},87379(e,t,r){var o=r(65650),n=r(8870),i=r(29005),s=o?o.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":s&&s in Object(e)?n(e):i(e)}},86403(e,t,r){var o=r(62945),n=/^\s+/;e.exports=function(e){return e?e.slice(0,o(e)+1).replace(n,""):e}},74967(e){e.exports="object"==typeof global&&global&&global.Object===Object&&global},8870(e,t,r){var o=r(65650),n=Object.prototype,i=n.hasOwnProperty,s=n.toString,a=o?o.toStringTag:void 0;e.exports=function(e){var t=i.call(e,a),r=e[a];try{e[a]=void 0;var o=!0}catch(e){}var n=s.call(e);return o&&(t?e[a]=r:delete e[a]),n}},29005(e){var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},78942(e,t,r){var o=r(74967),n="object"==typeof self&&self&&self.Object===Object&&self;e.exports=o||n||Function("return this")()},62945(e){var t=/\s/;e.exports=function(e){for(var r=e.length;r--&&t.test(e.charAt(r)););return r}},12784(e,t,r){var o=r(41580),n=r(94495),i=r(6131),s=Math.max,a=Math.min;e.exports=function(e,t,r){var u,l,c,p,f,h,d=0,v=!1,y=!1,m=!0;if("function"!=typeof e)throw TypeError("Expected a function");function b(t){var r=u,o=l;return u=l=void 0,d=t,p=e.apply(o,r)}function x(e){var r=e-h,o=e-d;return void 0===h||r>=t||r<0||y&&o>=c}function g(){var e,r,o,i=n();if(x(i))return _(i);f=setTimeout(g,(e=i-h,r=i-d,o=t-e,y?a(o,c-r):o))}function _(e){return(f=void 0,m&&u)?b(e):(u=l=void 0,p)}function w(){var e,r=n(),o=x(r);if(u=arguments,l=this,h=r,o){if(void 0===f)return d=e=h,f=setTimeout(g,t),v?b(e):p;if(y)return clearTimeout(f),f=setTimeout(g,t),b(h)}return void 0===f&&(f=setTimeout(g,t)),p}return t=i(t)||0,o(r)&&(v=!!r.leading,c=(y="maxWait"in r)?s(i(r.maxWait)||0,t):c,m="trailing"in r?!!r.trailing:m),w.cancel=function(){void 0!==f&&clearTimeout(f),d=0,u=h=l=f=void 0},w.flush=function(){return void 0===f?p:_(n())},w}},41580(e){e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},80547(e){e.exports=function(e){return null!=e&&"object"==typeof e}},51187(e,t,r){var o=r(87379),n=r(80547);e.exports=function(e){return"symbol"==typeof e||n(e)&&"[object Symbol]"==o(e)}},94495(e,t,r){var o=r(78942);e.exports=function(){return o.Date.now()}},6131(e,t,r){var o=r(86403),n=r(41580),i=r(51187),s=0/0,a=/^[-+]0x[0-9a-f]+$/i,u=/^0b[01]+$/i,l=/^0o[0-7]+$/i,c=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(i(e))return s;if(n(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=n(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=o(e);var r=u.test(e);return r||l.test(e)?c(e.slice(2),r?2:8):a.test(e)?s:+e}},5018(e){e.exports=function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")},e.exports.__esModule=!0,e.exports.default=e.exports},44668(e,t,r){var o=r(56347);function n(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,o(n.key),n)}}e.exports=function(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e},e.exports.__esModule=!0,e.exports.default=e.exports},70604(e){e.exports=function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)},e.exports.__esModule=!0,e.exports.default=e.exports},90250(e,t,r){var o=r(3634),n=r(70604),i=r(78243),s=r(5523);e.exports=function(e){return o(e)||n(e)||i(e)||s()},e.exports.__esModule=!0,e.exports.default=e.exports},23878(e,t,r){var o=r(14319).default;e.exports=function(e,t){if("object"!=o(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=o(n))return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)},e.exports.__esModule=!0,e.exports.default=e.exports},56347(e,t,r){var o=r(14319).default,n=r(23878);e.exports=function(e){var t=n(e,"string");return"symbol"==o(t)?t:t+""},e.exports.__esModule=!0,e.exports.default=e.exports},14319(e){function t(r){return e.exports=t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,t(r)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},75720(e,t,r){r.d(t,{p:()=>p,sh:()=>d});var o,n,i=r(90250),s=r(99436),a=r(5018),u=r(44668),l=r(31421),c=r(73024),p=()=>{var e=process.argv[1];return e&&!(e.includes("$bunfs")||e.includes("~BUN"))&&(0,c.existsSync)(e)?[process.execPath,e]:[process.execPath]},f=u(function e(t){a(this,e),this._cwd=void 0,this._mode="default",this._throw=!0,this._env=void 0,this._promise=null,this.args=t},[{key:"cwd",value:function(e){return this._cwd=e,this}},{key:"quiet",value:function(){return this._mode="quiet",this}},{key:"nothrow",value:function(){return this._throw=!1,this}},{key:"env",value:function(e){return this._env={...this._env,...e},this}},{key:"text",value:(o=s(function*(){return"default"===this._mode&&(this._mode="text"),(yield this.run()).stdout.toString("utf8")}),function(){return o.apply(this,arguments)})},{key:"then",value:function(e,t){return this.run().then(e,t)}},{key:"run",value:function(){return this._promise||(this._promise=this.exec()),this._promise}},{key:"exec",value:(n=s(function*(){var e=i(this.args),t=e[0],r=(function(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,o=Array(t);r<t;r++)o[r]=e[r];return o})(e).slice(1);if(!t)throw Error("sh: empty command");var o="default"===this._mode?["inherit","pipe","pipe"]:"quiet"===this._mode?["ignore","pipe","pipe"]:["inherit","pipe","pipe"],n=this._env?{...process.env,...this._env}:void 0,s=(0,l.spawn)(t,r,{cwd:this._cwd,stdio:o,env:n}),a=[],u=[];s.stdout?.on("data",e=>{a.push(e),"default"===this._mode&&process.stdout.write(e)}),s.stderr?.on("data",e=>{u.push(e),"default"===this._mode&&process.stderr.write(e)});var c=yield new Promise((e,t)=>{s.on("error",t),s.on("close",(t,r)=>e({code:t,signal:r}))}),p=c.code,f=c.signal,h=p??1,d=Buffer.concat(a),v=Buffer.concat(u);if(0!==h&&this._throw){var y=f?`signal ${f}`:`exit ${h}`,m=Error(`sh: command failed with ${y}: ${this.args.join(" ")}`);throw m.exitCode=h,m.stdout=d,m.stderr=v,m}return{exitCode:h,stdout:d,stderr:v}}),function(){return n.apply(this,arguments)})}]),h=/\s/;function d(e,...t){var r,o,n,i,s,a=(r=[],o="",n=!1,i=()=>{n&&(r.push(o),o="",n=!1)},s=e=>{o+=e,n=!0},(e.forEach((e,r)=>{for(var o=0;o<e.length;o++){var n=e[o];h.test(n)?i():s(n)}r<t.length&&(e=>{if(null!=e){if(Array.isArray(e))return e.forEach((e,t)=>{t>0&&i(),s(String(e))});s(String(e))}})(t[r])}),i(),r.length>=3&&"cd"===r[0]&&"&&"===r[2])?{tokens:r.slice(3),initialCwd:r[1]}:{tokens:r}),u=a.tokens,l=a.initialCwd,c=new f(u);return l&&c.cwd(l),c}},16749(e,t,r){r.d(t,{W:()=>s});var o=r(73024),n=r(76760),i=r(73136);function s(e){var t=(0,n.dirname)((0,i.fileURLToPath)(e)),r=[(0,n.join)(t,"simulator-main.mjs"),(0,n.join)(t,"..","simulator-main.mjs"),(0,n.join)((0,n.dirname)(process.execPath),"simulator-main.mjs")];for(var s of r)if((0,o.existsSync)(s))return s;throw Error(`Unable to locate the simulator entry (simulator-main.mjs). Probed paths:
1
+ export const __rspack_esm_id=9320;export const __rspack_esm_ids=[9320];export const __webpack_modules__={86403(e,t,r){var o=r(62945),n=/^\s+/;e.exports=function(e){return e?e.slice(0,o(e)+1).replace(n,""):e}},62945(e){var t=/\s/;e.exports=function(e){for(var r=e.length;r--&&t.test(e.charAt(r)););return r}},12784(e,t,r){var o=r(41580),n=r(94495),s=r(6131),i=Math.max,a=Math.min;e.exports=function(e,t,r){var u,p,c,l,h,d,f=0,v=!1,m=!1,y=!0;if("function"!=typeof e)throw TypeError("Expected a function");function x(t){var r=u,o=p;return u=p=void 0,f=t,l=e.apply(o,r)}function w(e){var r=e-d,o=e-f;return void 0===d||r>=t||r<0||m&&o>=c}function _(){var e,r,o,s=n();if(w(s))return g(s);h=setTimeout(_,(e=s-d,r=s-f,o=t-e,m?a(o,c-r):o))}function g(e){return(h=void 0,y&&u)?x(e):(u=p=void 0,l)}function b(){var e,r=n(),o=w(r);if(u=arguments,p=this,d=r,o){if(void 0===h)return f=e=d,h=setTimeout(_,t),v?x(e):l;if(m)return clearTimeout(h),h=setTimeout(_,t),x(d)}return void 0===h&&(h=setTimeout(_,t)),l}return t=s(t)||0,o(r)&&(v=!!r.leading,c=(m="maxWait"in r)?i(s(r.maxWait)||0,t):c,y="trailing"in r?!!r.trailing:y),b.cancel=function(){void 0!==h&&clearTimeout(h),f=0,u=d=p=h=void 0},b.flush=function(){return void 0===h?l:g(n())},b}},94495(e,t,r){var o=r(78942);e.exports=function(){return o.Date.now()}},6131(e,t,r){var o=r(86403),n=r(41580),s=r(51187),i=0/0,a=/^[-+]0x[0-9a-f]+$/i,u=/^0b[01]+$/i,p=/^0o[0-7]+$/i,c=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(s(e))return i;if(n(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=n(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=o(e);var r=u.test(e);return r||p.test(e)?c(e.slice(2),r?2:8):a.test(e)?i:+e}},5018(e){e.exports=function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")},e.exports.__esModule=!0,e.exports.default=e.exports},44668(e,t,r){var o=r(56347);function n(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,o(n.key),n)}}e.exports=function(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e},e.exports.__esModule=!0,e.exports.default=e.exports},70604(e){e.exports=function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)},e.exports.__esModule=!0,e.exports.default=e.exports},90250(e,t,r){var o=r(3634),n=r(70604),s=r(78243),i=r(5523);e.exports=function(e){return o(e)||n(e)||s(e)||i()},e.exports.__esModule=!0,e.exports.default=e.exports},23878(e,t,r){var o=r(14319).default;e.exports=function(e,t){if("object"!=o(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=o(n))return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)},e.exports.__esModule=!0,e.exports.default=e.exports},56347(e,t,r){var o=r(14319).default,n=r(23878);e.exports=function(e){var t=n(e,"string");return"symbol"==o(t)?t:t+""},e.exports.__esModule=!0,e.exports.default=e.exports},14319(e){function t(r){return e.exports=t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,t(r)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},75720(e,t,r){r.d(t,{p:()=>l,sh:()=>f});var o,n,s=r(90250),i=r(99436),a=r(5018),u=r(44668),p=r(31421),c=r(73024),l=()=>{var e=process.argv[1];return e&&!(e.includes("$bunfs")||e.includes("~BUN"))&&(0,c.existsSync)(e)?[process.execPath,e]:[process.execPath]},h=u(function e(t){a(this,e),this._cwd=void 0,this._mode="default",this._throw=!0,this._env=void 0,this._promise=null,this.args=t},[{key:"cwd",value:function(e){return this._cwd=e,this}},{key:"quiet",value:function(){return this._mode="quiet",this}},{key:"nothrow",value:function(){return this._throw=!1,this}},{key:"env",value:function(e){return this._env={...this._env,...e},this}},{key:"text",value:(o=i(function*(){return"default"===this._mode&&(this._mode="text"),(yield this.run()).stdout.toString("utf8")}),function(){return o.apply(this,arguments)})},{key:"then",value:function(e,t){return this.run().then(e,t)}},{key:"run",value:function(){return this._promise||(this._promise=this.exec()),this._promise}},{key:"exec",value:(n=i(function*(){var e=s(this.args),t=e[0],r=(function(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,o=Array(t);r<t;r++)o[r]=e[r];return o})(e).slice(1);if(!t)throw Error("sh: empty command");var o="default"===this._mode?["inherit","pipe","pipe"]:"quiet"===this._mode?["ignore","pipe","pipe"]:["inherit","pipe","pipe"],n=this._env?{...process.env,...this._env}:void 0,i=(0,p.spawn)(t,r,{cwd:this._cwd,stdio:o,env:n}),a=[],u=[];i.stdout?.on("data",e=>{a.push(e),"default"===this._mode&&process.stdout.write(e)}),i.stderr?.on("data",e=>{u.push(e),"default"===this._mode&&process.stderr.write(e)});var c=yield new Promise((e,t)=>{i.on("error",t),i.on("close",(t,r)=>e({code:t,signal:r}))}),l=c.code,h=c.signal,d=l??1,f=Buffer.concat(a),v=Buffer.concat(u);if(0!==d&&this._throw){var m=h?`signal ${h}`:`exit ${d}`,y=Error(`sh: command failed with ${m}: ${this.args.join(" ")}`);throw y.exitCode=d,y.stdout=f,y.stderr=v,y}return{exitCode:d,stdout:f,stderr:v}}),function(){return n.apply(this,arguments)})}]),d=/\s/;function f(e,...t){var r,o,n,s,i,a=(r=[],o="",n=!1,s=()=>{n&&(r.push(o),o="",n=!1)},i=e=>{o+=e,n=!0},(e.forEach((e,r)=>{for(var o=0;o<e.length;o++){var n=e[o];d.test(n)?s():i(n)}r<t.length&&(e=>{if(null!=e){if(Array.isArray(e))return e.forEach((e,t)=>{t>0&&s(),i(String(e))});i(String(e))}})(t[r])}),s(),r.length>=3&&"cd"===r[0]&&"&&"===r[2])?{tokens:r.slice(3),initialCwd:r[1]}:{tokens:r}),u=a.tokens,p=a.initialCwd,c=new h(u);return p&&c.cwd(p),c}},16749(e,t,r){r.d(t,{W:()=>i});var o=r(73024),n=r(76760),s=r(73136);function i(e){var t=(0,n.dirname)((0,s.fileURLToPath)(e)),r=[(0,n.join)(t,"simulator-main.mjs"),(0,n.join)(t,"..","simulator-main.mjs"),(0,n.join)((0,n.dirname)(process.execPath),"simulator-main.mjs")];for(var i of r)if((0,o.existsSync)(i))return i;throw Error(`Unable to locate the simulator entry (simulator-main.mjs). Probed paths:
2
2
  ${r.map(e=>` - ${e}`).join("\n")}
3
- If you installed the standalone bricks binary, re-run the installer to restore the simulator assets.`)}},7931(e,t,r){r.r(t),r.d(t,{simulator:()=>f});var o=r(99436),n=r(31421),i=r(51455),s=r(73024),a=r(80481),u=r(57975),l=r(12784),c=r(75720),p=r(16749);function f(){return h.apply(this,arguments)}function h(){return(h=o(function*(e=[]){var t,r=(0,u.parseArgs)({args:e,options:{"skip-typecheck":{type:"boolean"},"clear-cache":{type:"boolean"},screenshot:{type:"boolean"},"screenshot-delay":{type:"string"},"screenshot-width":{type:"string"},"screenshot-height":{type:"string"},"screenshot-path":{type:"string"},"screenshot-no-headless":{type:"boolean"},"show-menu":{type:"boolean"},"test-id":{type:"string"},"test-title-like":{type:"string"},"no-keep-open":{type:"boolean"},"cdp-port":{type:"string"},"no-cdp":{type:"boolean"},"capture-plan":{type:"string"}},strict:!0,allowPositionals:!0}).values,f=process.cwd(),h=JSON.parse((yield(0,i.readFile)(`${f}/application.json`,"utf8"))),d=[];r["clear-cache"]&&d.push("--clear-cache");var v=!0;if(r.screenshot&&(d.push("--take-screenshot"),d.push(JSON.stringify({delay:Number(r["screenshot-delay"])||1e3,width:Number(r["screenshot-width"])||600,height:Number(r["screenshot-height"])||480,path:r["screenshot-path"]||`${f}/screenshot.jpg`,noHeadless:r["screenshot-no-headless"]??!1})),v=!r["no-keep-open"]),r["capture-plan"]&&(d.push("--capture-plan",r["capture-plan"]),v=!1),r["show-menu"]&&d.push("--show-menu"),r["test-id"]&&d.push("--test-id",r["test-id"]),r["test-title-like"]&&d.push("--test-title-like",r["test-title-like"]),r["no-keep-open"]&&d.push("--no-keep-open"),!r["no-cdp"]){var y=parseInt(r["cdp-port"]||"",10)||19852;d.push("--cdp-port",String(y))}var m=!r["skip-typecheck"],b=(t=o(function*(){yield(0,c.sh)`${(0,c.p)()} ctor compile ${m?[]:["--no-check"]}`}),function(){return t.apply(this,arguments)});yield b();var x=null;if(v){var g=l(b,500);x=(0,s.watch)(`${f}/subspaces`,{recursive:!0},(e,t)=>{console.log(`Detected ${e} in ${t}`),g()})}var _=`${f}/.bricks/devtools.json`,w=()=>{try{(0,s.unlinkSync)(_)}catch{}};try{var k=JSON.parse((yield(0,i.readFile)(_,"utf8")));if(k.pid){try{process.kill(k.pid)}catch{}w()}}catch{}var S=(0,p.W)("file:///Users/jhen/workspace/mybigday-bricks-c/packages/bricks-cli/src/ctor/tools/simulator.js"),j=(0,n.spawn)("bunx",["--bun","electron",S,...d],{env:{...process.env,BRICKS_STAGE:h.stage||"production"},stdio:["inherit","pipe","inherit"]});(0,a.createInterface)({input:j.stdout}).on("line",e=>{if(e.startsWith("[TEST_RESULT_TOON]"))return void console.log(e.replace("[TEST_RESULT_TOON]",""));if(e){var t=e.match(/^CDP server: ws:\/\/localhost:(\d+)/);if(t){var r={port:parseInt(t[1],10),pid:j.pid,address:"localhost",name:`${h.name||"Unnamed"} (CTOR Simulator)`,startedAt:new Date().toISOString()};(0,i.writeFile)(_,JSON.stringify(r,null,2))}console.log(e)}}),yield new Promise(e=>{j.on("close",()=>e())}),w(),x&&x.close()})).apply(this,arguments)}}};
3
+ If you installed the standalone bricks binary, re-run the installer to restore the simulator assets.`)}},7931(e,t,r){r.r(t),r.d(t,{simulator:()=>d});var o=r(99436),n=r(31421),s=r(51455),i=r(73024),a=r(80481),u=r(57975),p=r(12784),c=r(75720),l=r(16749),h=`Usage: bricks ctor simulator [options]
4
+
5
+ Compile the project and run it in the web-preview Simulator. Without
6
+ --no-keep-open the Simulator stays open and reloads on source changes.
7
+
8
+ Options:
9
+ --test-id <id> Run the Automation test with this id
10
+ --test-title-like <text> Run the Automation test whose title contains the text
11
+ --screenshot Take a screenshot (see the --screenshot-* options)
12
+ --screenshot-path <file> Screenshot file (default: ./screenshot.jpg)
13
+ --screenshot-delay <ms> Wait before the screenshot (default: 1000)
14
+ --screenshot-width <px> Screenshot width (default: 600)
15
+ --screenshot-height <px> Screenshot height (default: 480)
16
+ --screenshot-no-headless Show the window during the screenshot
17
+ --no-keep-open Exit after the test / screenshot
18
+ --cdp-port <port> DevTools (CDP) port (default: 19852)
19
+ --no-cdp Do not start the DevTools (CDP) server
20
+ --skip-typecheck Compile without the type check
21
+ --clear-cache Clear the preview cache at start
22
+ --show-menu Show the preview menu
23
+ -h, --help Show this help
24
+ `;function d(){return f.apply(this,arguments)}function f(){return(f=o(function*(e=[]){var t,r=(0,u.parseArgs)({args:e,options:{help:{type:"boolean",short:"h"},"skip-typecheck":{type:"boolean"},"clear-cache":{type:"boolean"},screenshot:{type:"boolean"},"screenshot-delay":{type:"string"},"screenshot-width":{type:"string"},"screenshot-height":{type:"string"},"screenshot-path":{type:"string"},"screenshot-no-headless":{type:"boolean"},"show-menu":{type:"boolean"},"test-id":{type:"string"},"test-title-like":{type:"string"},"no-keep-open":{type:"boolean"},"cdp-port":{type:"string"},"no-cdp":{type:"boolean"},"capture-plan":{type:"string"}},strict:!0,allowPositionals:!0}).values;if(r.help)return void process.stdout.write(h);var d=process.cwd(),f=JSON.parse((yield(0,s.readFile)(`${d}/application.json`,"utf8"))),v=[];r["clear-cache"]&&v.push("--clear-cache");var m=!0;if(r.screenshot&&(v.push("--take-screenshot"),v.push(JSON.stringify({delay:Number(r["screenshot-delay"])||1e3,width:Number(r["screenshot-width"])||600,height:Number(r["screenshot-height"])||480,path:r["screenshot-path"]||`${d}/screenshot.jpg`,noHeadless:r["screenshot-no-headless"]??!1})),m=!r["no-keep-open"]),r["capture-plan"]&&(v.push("--capture-plan",r["capture-plan"]),m=!1),r["show-menu"]&&v.push("--show-menu"),r["test-id"]&&v.push("--test-id",r["test-id"]),r["test-title-like"]&&v.push("--test-title-like",r["test-title-like"]),r["no-keep-open"]&&v.push("--no-keep-open"),!r["no-cdp"]){var y=parseInt(r["cdp-port"]||"",10)||19852;v.push("--cdp-port",String(y))}var x=!r["skip-typecheck"],w=(t=o(function*(){yield(0,c.sh)`${(0,c.p)()} ctor compile ${x?[]:["--no-check"]}`}),function(){return t.apply(this,arguments)});yield w();var _=p(o(function*(){try{yield w()}catch(e){console.error(`Recompile failed: ${e.message}`)}}),500),g=null;m&&(g=(0,i.watch)(`${d}/subspaces`,{recursive:!0},(e,t)=>{console.log(`Detected ${e} in ${t}`),_()}));var b=`${d}/.bricks/devtools.json`,k=()=>{try{(0,i.unlinkSync)(b)}catch{}};try{var S=JSON.parse((yield(0,s.readFile)(b,"utf8")));if(S.pid){try{process.kill(S.pid)}catch{}k()}}catch{}var T=(0,l.W)(import.meta.url),$=(0,n.spawn)("bunx",["--bun","electron",T,...v],{env:{...process.env,BRICKS_STAGE:f.stage||"production"},stdio:["inherit","pipe","inherit"]});(0,a.createInterface)({input:$.stdout}).on("line",e=>{if(e.startsWith("[TEST_RESULT_TOON]"))return void console.log(e.replace("[TEST_RESULT_TOON]",""));if(e){var t=e.match(/^CDP server: ws:\/\/localhost:(\d+)/);if(t){var r={port:parseInt(t[1],10),pid:$.pid,address:"localhost",name:`${f.name||"Unnamed"} (CTOR Simulator)`,startedAt:new Date().toISOString()};(0,s.writeFile)(b,JSON.stringify(r,null,2))}console.log(e)}});try{var j=yield new Promise((e,t)=>{$.on("error",t),$.on("close",(t,r)=>e({code:t,signal:r}))}),E=j.code,O=j.signal;if(0!==E)throw Error(`Simulator exited with ${O?`signal ${O}`:`code ${E}`}`)}finally{_.cancel(),k(),g&&g.close()}})).apply(this,arguments)}}};