@fugood/bricks-cli 2.25.11 → 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
  }
@@ -10,9 +10,9 @@ export const __rspack_esm_id=907;export const __rspack_esm_ids=[907];export cons
10
10
  workspaceName
11
11
  }
12
12
  }
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),C="Note: OAuth workspace access is awaiting the next production server release. Until then, use workspace auth (passcode or token; CLI: `bricks auth login-workspace`).",A=(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(C))return e;var a=Error(`${t}
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
- ${C}`);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 A(i,e.auth)}}throw A(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 @@ ${C}`);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 @@ ${C}`);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 @@ ${C}`);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
@@ -240,7 +250,7 @@ ${C}`);return a.cause=e,a},b=l(function e(i,t){var a,n=this;d(this,e),this.baseU
240
250
  create_datetime
241
251
  last_modify_datetime
242
252
  }
243
- `,c=(0,a.default)`
253
+ `,l=(0,a.default)`
244
254
  fragment cliApplicationShortArguments on Application {
245
255
  _id
246
256
  name
@@ -278,14 +288,14 @@ ${C}`);return a.cause=e,a},b=l(function e(i,t){var a,n=this;d(this,e),this.baseU
278
288
  description
279
289
  current_version
280
290
  }
281
- `},89293(e,i,t){t.r(i),t.d(i,{bindApplication:()=>_,bindButtressServer:()=>S,controlDevice:()=>o,createApplication:()=>u,createApplicationWithShareVersion:()=>p,createDevice:()=>r,createMediaFileUploadRequest:()=>A,createModule:()=>h,createVirtualDevice:()=>s,dispatchDeviceGroupAction:()=>c,issueButtressAccessToken:()=>w,issueDevtoolsAccessToken:()=>L,releaseApplication:()=>C,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)`
282
292
  mutation CLI_createDevice($bindPasscode: String, $name: String, $deviceName: String) {
283
293
  createDevice(bindPasscode: $bindPasscode, name: $name, deviceName: $deviceName) {
284
294
  ...cliDeviceArguments
285
295
  }
286
296
  }
287
297
  ${n.F3}
288
- `,o=(0,a.default)`
298
+ `,r=(0,a.default)`
289
299
  mutation CLI_controlDevice($id: ID!, $type: String!, $eventPayload: JSON) {
290
300
  controlDevice(id: $id, type: $type, eventPayload: $eventPayload) {
291
301
  _id
@@ -312,18 +322,45 @@ ${C}`);return a.cause=e,a},b=l(function e(i,t){var a,n=this;d(this,e),this.baseU
312
322
  }
313
323
  }
314
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}
315
352
  `,l=(0,a.default)`
316
353
  mutation CLI_removeDevice($id: ID!) {
317
354
  removeDevice(id: $id)
318
355
  }
319
- `,c=(0,a.default)`
356
+ `,u=(0,a.default)`
320
357
  mutation CLI_dispatchDeviceGroupAction($id: ID!, $action: String!) {
321
358
  dispatchDeviceGroupAction(id: $id, action: $action) {
322
359
  dispatched
323
360
  devices
324
361
  }
325
362
  }
326
- `,u=(0,a.default)`
363
+ `,p=(0,a.default)`
327
364
  mutation CLI_createApplication(
328
365
  $name: String
329
366
  $description: String
@@ -340,7 +377,7 @@ ${C}`);return a.cause=e,a},b=l(function e(i,t){var a,n=this;d(this,e),this.baseU
340
377
  }
341
378
  }
342
379
  ${n.$7}
343
- `,p=(0,a.default)`
380
+ `,m=(0,a.default)`
344
381
  mutation CLI_createApplicationWithShareVersion(
345
382
  $name: String
346
383
  $description: String
@@ -357,12 +394,14 @@ ${C}`);return a.cause=e,a},b=l(function e(i,t){var a,n=this;d(this,e),this.baseU
357
394
  }
358
395
  }
359
396
  ${n.$7}
360
- `,m=(0,a.default)`
397
+ `,$=(0,a.default)`
361
398
  mutation CLI_updateApplication(
362
399
  $id: ID!
363
400
  $config: String
364
401
  $name: String
365
402
  $description: String
403
+ $tags: [String]
404
+ $lock: ApplicationLockInput
366
405
  $validateConfig: Boolean
367
406
  $lastCommitId: String
368
407
  ) {
@@ -371,20 +410,33 @@ ${C}`);return a.cause=e,a},b=l(function e(i,t){var a,n=this;d(this,e),this.baseU
371
410
  config: $config
372
411
  name: $name
373
412
  description: $description
413
+ tags: $tags
414
+ lock: $lock
374
415
  validateConfig: $validateConfig
375
416
  lastCommitId: $lastCommitId
376
417
  ) {
377
418
  ...cliApplicationShortArguments
378
419
  config
379
420
  has_unreleased_changes
421
+ tags
422
+ lock {
423
+ enabled
424
+ }
380
425
  }
381
426
  }
382
427
  ${n.$7}
383
- `,$=(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)`
384
436
  mutation CLI_removeApplication($id: ID!) {
385
437
  removeApplication(id: $id)
386
438
  }
387
- `,g=(0,a.default)`
439
+ `,v=(0,a.default)`
388
440
  mutation CLI_shortEditApplication(
389
441
  $id: ID!
390
442
  $list: [ShortEditInput]!
@@ -396,7 +448,7 @@ ${C}`);return a.cause=e,a},b=l(function e(i,t){var a,n=this;d(this,e),this.baseU
396
448
  }
397
449
  }
398
450
  ${n.$7}
399
- `,_=(0,a.default)`
451
+ `,h=(0,a.default)`
400
452
  mutation CLI_bindApplication(
401
453
  $id: ID!
402
454
  $bindDevices: [ID]
@@ -417,7 +469,7 @@ ${C}`);return a.cause=e,a},b=l(function e(i,t){var a,n=this;d(this,e),this.baseU
417
469
  }
418
470
  }
419
471
  }
420
- `,v=(0,a.default)`
472
+ `,y=(0,a.default)`
421
473
  mutation CLI_triggerApplicationCanvasControl(
422
474
  $id: ID!
423
475
  $testId: String!
@@ -435,7 +487,7 @@ ${C}`);return a.cause=e,a},b=l(function e(i,t){var a,n=this;d(this,e),this.baseU
435
487
  _id
436
488
  }
437
489
  }
438
- `,h=(0,a.default)`
490
+ `,f=(0,a.default)`
439
491
  mutation CLI_createModule(
440
492
  $name: String
441
493
  $description: String
@@ -460,7 +512,7 @@ ${C}`);return a.cause=e,a},b=l(function e(i,t){var a,n=this;d(this,e),this.baseU
460
512
  }
461
513
  }
462
514
  ${n.$V}
463
- `,y=(0,a.default)`
515
+ `,I=(0,a.default)`
464
516
  mutation CLI_updateModule(
465
517
  $id: ID!
466
518
  $config: String
@@ -481,11 +533,11 @@ ${C}`);return a.cause=e,a},b=l(function e(i,t){var a,n=this;d(this,e),this.baseU
481
533
  }
482
534
  }
483
535
  ${n.$V}
484
- `,f=(0,a.default)`
536
+ `,k=(0,a.default)`
485
537
  mutation CLI_removeModule($id: ID!) {
486
538
  removeModule(id: $id)
487
539
  }
488
- `,I=(0,a.default)`
540
+ `,A=(0,a.default)`
489
541
  mutation CLI_shortEditModule(
490
542
  $id: ID!
491
543
  $list: [ShortEditInput]!
@@ -497,7 +549,7 @@ ${C}`);return a.cause=e,a},b=l(function e(i,t){var a,n=this;d(this,e),this.baseU
497
549
  name
498
550
  }
499
551
  }
500
- `,k=(0,a.default)`
552
+ `,C=(0,a.default)`
501
553
  mutation CLI_updateWorkspace(
502
554
  $name: String
503
555
  $description: String
@@ -521,7 +573,7 @@ ${C}`);return a.cause=e,a},b=l(function e(i,t){var a,n=this;d(this,e),this.baseU
521
573
  }
522
574
  }
523
575
  }
524
- `,C=(0,a.default)`
576
+ `,S=(0,a.default)`
525
577
  mutation CLI_releaseApplication(
526
578
  $id: ID!
527
579
  $config: String
@@ -542,7 +594,7 @@ ${C}`);return a.cause=e,a},b=l(function e(i,t){var a,n=this;d(this,e),this.baseU
542
594
  name
543
595
  }
544
596
  }
545
- `,A=(0,a.default)`
597
+ `,b=(0,a.default)`
546
598
  mutation CLI_createMediaFileUploadRequest(
547
599
  $name: String!
548
600
  $description: String!
@@ -569,7 +621,7 @@ ${C}`);return a.cause=e,a},b=l(function e(i,t){var a,n=this;d(this,e),this.baseU
569
621
  }
570
622
  }
571
623
  }
572
- `,b=(0,a.default)`
624
+ `,D=(0,a.default)`
573
625
  mutation CLI_releaseModule(
574
626
  $id: ID!
575
627
  $config: String
@@ -589,7 +641,7 @@ ${C}`);return a.cause=e,a},b=l(function e(i,t){var a,n=this;d(this,e),this.baseU
589
641
  name
590
642
  }
591
643
  }
592
- `,S=(0,a.default)`
644
+ `,L=(0,a.default)`
593
645
  mutation CLI_bindButtressServer(
594
646
  $serverId: String!
595
647
  $name: String
@@ -605,11 +657,11 @@ ${C}`);return a.cause=e,a},b=l(function e(i,t){var a,n=this;d(this,e),this.baseU
605
657
  }
606
658
  }
607
659
  }
608
- `,D=(0,a.default)`
660
+ `,w=(0,a.default)`
609
661
  mutation CLI_unbindButtressServer($serverId: String!) {
610
662
  unbindButtressServer(serverId: $serverId)
611
663
  }
612
- `,w=(0,a.default)`
664
+ `,P=(0,a.default)`
613
665
  mutation CLI_issueButtressAccessToken($ttlSeconds: Int) {
614
666
  issueButtressAccessToken(ttlSeconds: $ttlSeconds) {
615
667
  token
@@ -618,7 +670,7 @@ ${C}`);return a.cause=e,a},b=l(function e(i,t){var a,n=this;d(this,e),this.baseU
618
670
  jti
619
671
  }
620
672
  }
621
- `,L=(0,a.default)`
673
+ `,B=(0,a.default)`
622
674
  mutation CLI_issueDevtoolsAccessToken($ttlSeconds: Int) {
623
675
  issueDevtoolsAccessToken(ttlSeconds: $ttlSeconds) {
624
676
  token
@@ -627,14 +679,14 @@ ${C}`);return a.cause=e,a},b=l(function e(i,t){var a,n=this;d(this,e),this.baseU
627
679
  jti
628
680
  }
629
681
  }
630
- `},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:()=>A,devices:()=>s,devicesByGroup:()=>u,devicesPanel:()=>d,mediaBox:()=>k,mediaBoxes:()=>I,mediaFile:()=>C,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)`
631
683
  query CLI_workspace {
632
684
  workspace {
633
685
  ...cliWorkspaceArguments
634
686
  }
635
687
  }
636
688
  ${n.Yi}
637
- `,o=(0,a.default)`
689
+ `,r=(0,a.default)`
638
690
  query CLI_device($id: ID) {
639
691
  device(id: $id) {
640
692
  ...cliDeviceArguments
@@ -655,14 +707,14 @@ ${C}`);return a.cause=e,a},b=l(function e(i,t){var a,n=this;d(this,e),this.baseU
655
707
  }
656
708
  }
657
709
  ${n.VZ}
658
- `,l=(0,a.default)`
710
+ `,c=(0,a.default)`
659
711
  query CLI_deviceGroup($id: ID) {
660
712
  deviceGroup(id: $id) {
661
713
  ...cliDeviceGroupArguments
662
714
  }
663
715
  }
664
716
  ${n.mJ}
665
- `,c=(0,a.default)`
717
+ `,l=(0,a.default)`
666
718
  query CLI_deviceGroups($paginate: Paginate) {
667
719
  deviceGroups(paginate: $paginate) {
668
720
  ...cliDeviceGroupArguments
@@ -698,13 +750,47 @@ ${C}`);return a.cause=e,a},b=l(function e(i,t){var a,n=this;d(this,e),this.baseU
698
750
  }
699
751
  ${n.lI}
700
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)`
701
787
  query CLI_applications($keyword: String, $paginate: Paginate) {
702
788
  applications(keyword: $keyword, paginate: $paginate) {
703
789
  ...cliApplicationShortArguments
704
790
  }
705
791
  }
706
792
  ${n.$7}
707
- `,$=(0,a.default)`
793
+ `,_=(0,a.default)`
708
794
  query CLI_publicApplicationShareInfo($id: ID!) {
709
795
  publicApplicationShareInfo(id: $id) {
710
796
  _id
@@ -729,32 +815,32 @@ ${C}`);return a.cause=e,a},b=l(function e(i,t){var a,n=this;d(this,e),this.baseU
729
815
  }
730
816
  }
731
817
  }
732
- `,g=(0,a.default)`
818
+ `,v=(0,a.default)`
733
819
  query CLI_module($id: ID!) {
734
820
  module(id: $id) {
735
821
  ...cliModuleArguments
736
822
  }
737
823
  }
738
824
  ${n.$V}
739
- `,_=(0,a.default)`
825
+ `,h=(0,a.default)`
740
826
  query CLI_modules($keyword: String, $paginate: Paginate) {
741
827
  modules(keyword: $keyword, paginate: $paginate) {
742
828
  ...cliModuleShortArguments
743
829
  }
744
830
  }
745
831
  ${n.J6}
746
- `,v=(0,a.default)`
832
+ `,y=(0,a.default)`
747
833
  query CLI_publicModules($keyword: String!, $limit: Int) {
748
834
  publicModules(keyword: $keyword, paginate: { limit: $limit }) {
749
835
  ...cliModuleShortArguments
750
836
  }
751
837
  }
752
838
  ${n.J6}
753
- `,h=(0,a.default)`
839
+ `,f=(0,a.default)`
754
840
  query CLI_checkBindDevicePasscode($passcode: String!) {
755
841
  checkBindDevicePasscode(passcode: $passcode)
756
842
  }
757
- `,y=(0,a.default)`
843
+ `,I=(0,a.default)`
758
844
  query CLI_mediaFiles(
759
845
  $boxId: ID!
760
846
  $includeTypes: [String]
@@ -797,7 +883,7 @@ ${C}`);return a.cause=e,a},b=l(function e(i,t){var a,n=this;d(this,e),this.baseU
797
883
  }
798
884
  }
799
885
  }
800
- `,f=(0,a.default)`
886
+ `,k=(0,a.default)`
801
887
  query CLI_mediaWorkspace {
802
888
  mediaWorkspace {
803
889
  id
@@ -810,7 +896,7 @@ ${C}`);return a.cause=e,a},b=l(function e(i,t){var a,n=this;d(this,e),this.baseU
810
896
  updatedAt
811
897
  }
812
898
  }
813
- `,I=(0,a.default)`
899
+ `,A=(0,a.default)`
814
900
  query CLI_mediaBoxes {
815
901
  mediaBoxes {
816
902
  id
@@ -831,7 +917,7 @@ ${C}`);return a.cause=e,a},b=l(function e(i,t){var a,n=this;d(this,e),this.baseU
831
917
  }
832
918
  }
833
919
  }
834
- `,k=(0,a.default)`
920
+ `,C=(0,a.default)`
835
921
  query CLI_mediaBox($id: ID!) {
836
922
  mediaBox(id: $id) {
837
923
  id
@@ -852,7 +938,7 @@ ${C}`);return a.cause=e,a},b=l(function e(i,t){var a,n=this;d(this,e),this.baseU
852
938
  }
853
939
  }
854
940
  }
855
- `,C=(0,a.default)`
941
+ `,S=(0,a.default)`
856
942
  query CLI_mediaFile($id: ID!) {
857
943
  mediaFile(id: $id) {
858
944
  id
@@ -883,7 +969,7 @@ ${C}`);return a.cause=e,a},b=l(function e(i,t){var a,n=this;d(this,e),this.baseU
883
969
  }
884
970
  }
885
971
  }
886
- `,A=(0,a.default)`
972
+ `,b=(0,a.default)`
887
973
  query CLI_deviceUsage($deviceId: ID, $startDate: Date, $endDate: Date) {
888
974
  deviceUsage(deviceId: $deviceId, startDate: $startDate, endDate: $endDate) {
889
975
  _id
@@ -902,7 +988,7 @@ ${C}`);return a.cause=e,a},b=l(function e(i,t){var a,n=this;d(this,e),this.baseU
902
988
  }
903
989
  }
904
990
  }
905
- `,b=(0,a.default)`
991
+ `,D=(0,a.default)`
906
992
  query CLI_applicationProject(
907
993
  $id: ID!
908
994
  $buildApplicationOnly: Boolean
@@ -920,7 +1006,7 @@ ${C}`);return a.cause=e,a},b=l(function e(i,t){var a,n=this;d(this,e),this.baseU
920
1006
  setupGeminiCLI: $setupGeminiCLI
921
1007
  )
922
1008
  }
923
- `,S=(0,a.default)`
1009
+ `,L=(0,a.default)`
924
1010
  query CLI_moduleProject(
925
1011
  $id: ID!
926
1012
  $buildApplicationOnly: Boolean
@@ -938,7 +1024,7 @@ ${C}`);return a.cause=e,a},b=l(function e(i,t){var a,n=this;d(this,e),this.baseU
938
1024
  setupGeminiCLI: $setupGeminiCLI
939
1025
  )
940
1026
  }
941
- `,D=(0,a.default)`
1027
+ `,w=(0,a.default)`
942
1028
  query CLI_buttressServers {
943
1029
  buttressServers {
944
1030
  serverId
package/lib/9320.js CHANGED
@@ -1,6 +1,6 @@
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),s=r(29005),i=o?o.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":i&&i in Object(e)?n(e):s(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,s=n.hasOwnProperty,i=n.toString,a=o?o.toStringTag:void 0;e.exports=function(e){var t=s.call(e,a),r=e[a];try{e[a]=void 0;var o=!0}catch(e){}var n=i.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),s=r(6131),i=Math.max,a=Math.min;e.exports=function(e,t,r){var u,c,l,p,h,d,f=0,v=!1,y=!1,m=!0;if("function"!=typeof e)throw TypeError("Expected a function");function x(t){var r=u,o=c;return u=c=void 0,f=t,p=e.apply(o,r)}function b(e){var r=e-d,o=e-f;return void 0===d||r>=t||r<0||y&&o>=l}function g(){var e,r,o,s=n();if(b(s))return w(s);h=setTimeout(g,(e=s-d,r=s-f,o=t-e,y?a(o,l-r):o))}function w(e){return(h=void 0,m&&u)?x(e):(u=c=void 0,p)}function _(){var e,r=n(),o=b(r);if(u=arguments,c=this,d=r,o){if(void 0===h)return f=e=d,h=setTimeout(g,t),v?x(e):p;if(y)return clearTimeout(h),h=setTimeout(g,t),x(d)}return void 0===h&&(h=setTimeout(g,t)),p}return t=s(t)||0,o(r)&&(v=!!r.leading,l=(y="maxWait"in r)?i(s(r.maxWait)||0,t):l,m="trailing"in r?!!r.trailing:m),_.cancel=function(){void 0!==h&&clearTimeout(h),f=0,u=d=c=h=void 0},_.flush=function(){return void 0===h?p:w(n())},_}},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),s=r(51187),i=0/0,a=/^[-+]0x[0-9a-f]+$/i,u=/^0b[01]+$/i,c=/^0o[0-7]+$/i,l=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||c.test(e)?l(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:()=>p,sh:()=>f});var o,n,s=r(90250),i=r(99436),a=r(5018),u=r(44668),c=r(31421),l=r(73024),p=()=>{var e=process.argv[1];return e&&!(e.includes("$bunfs")||e.includes("~BUN"))&&(0,l.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,c.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 l=yield new Promise((e,t)=>{i.on("error",t),i.on("close",(t,r)=>e({code:t,signal:r}))}),p=l.code,h=l.signal,d=p??1,f=Buffer.concat(a),v=Buffer.concat(u);if(0!==d&&this._throw){var y=h?`signal ${h}`:`exit ${d}`,m=Error(`sh: command failed with ${y}: ${this.args.join(" ")}`);throw m.exitCode=d,m.stdout=f,m.stderr=v,m}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,c=a.initialCwd,l=new h(u);return c&&l.cwd(c),l}},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:
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:()=>d});var o=r(99436),n=r(31421),s=r(51455),i=r(73024),a=r(80481),u=r(57975),c=r(12784),l=r(75720),p=r(16749),h=`Usage: bricks ctor simulator [options]
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
4
 
5
5
  Compile the project and run it in the web-preview Simulator. Without
6
6
  --no-keep-open the Simulator stays open and reloads on source changes.
@@ -21,4 +21,4 @@ Options:
21
21
  --clear-cache Clear the preview cache at start
22
22
  --show-menu Show the preview menu
23
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 y=!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})),y=!r["no-keep-open"]),r["capture-plan"]&&(v.push("--capture-plan",r["capture-plan"]),y=!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 m=parseInt(r["cdp-port"]||"",10)||19852;v.push("--cdp-port",String(m))}var x=!r["skip-typecheck"],b=(t=o(function*(){yield(0,l.sh)`${(0,l.p)()} ctor compile ${x?[]:["--no-check"]}`}),function(){return t.apply(this,arguments)});yield b();var g=null;if(y){var w=c(b,500);g=(0,i.watch)(`${d}/subspaces`,{recursive:!0},(e,t)=>{console.log(`Detected ${e} in ${t}`),w()})}var _=`${d}/.bricks/devtools.json`,k=()=>{try{(0,i.unlinkSync)(_)}catch{}};try{var S=JSON.parse((yield(0,s.readFile)(_,"utf8")));if(S.pid){try{process.kill(S.pid)}catch{}k()}}catch{}var j=(0,p.W)("file:///Users/jhen/workspace/mybigday-bricks-c/packages/bricks-cli/src/ctor/tools/simulator.js"),T=(0,n.spawn)("bunx",["--bun","electron",j,...v],{env:{...process.env,BRICKS_STAGE:f.stage||"production"},stdio:["inherit","pipe","inherit"]});(0,a.createInterface)({input:T.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:T.pid,address:"localhost",name:`${f.name||"Unnamed"} (CTOR Simulator)`,startedAt:new Date().toISOString()};(0,s.writeFile)(_,JSON.stringify(r,null,2))}console.log(e)}});try{var O=yield new Promise((e,t)=>{T.on("error",t),T.on("close",(t,r)=>e({code:t,signal:r}))}),$=O.code,E=O.signal;if(0!==$)throw Error(`Simulator exited with ${E?`signal ${E}`:`code ${$}`}`)}finally{k(),g&&g.close()}})).apply(this,arguments)}}};
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)}}};