@fugood/bricks-cli 2.25.0-beta.79 → 2.25.0-beta.80

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
@@ -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 o=new v({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 h,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,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 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 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:(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)})}]),S=(e,i)=>new b(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:()=>c,F3:()=>o,J6:()=>u,NJ:()=>r,Yi:()=>n,lI:()=>d,mJ:()=>s});var a=t(94370),n=(0,a.default)`
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 o=new v({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 h,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,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 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)})}]),S=(e,i)=>new b(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:()=>c,$V:()=>u,F3:()=>o,J6:()=>p,NJ:()=>s,VZ:()=>r,Yi:()=>n,lI:()=>l,mJ:()=>d});var a=t(94370),n=(0,a.default)`
16
16
  fragment cliWorkspaceArguments on Workspace {
17
17
  _id
18
18
  name
@@ -125,23 +125,60 @@ ${C}`);return a.cause=e,a},b=l(function e(i,t){var a,n=this;d(this,e),this.baseU
125
125
  last_modify_datetime
126
126
  }
127
127
  `,r=(0,a.default)`
128
- fragment cliDeviceShortArguments on Device {
128
+ fragment cliDevicePanelArguments on Device {
129
129
  _id
130
130
  name
131
131
  device_name
132
132
  description
133
133
  entry_detail {
134
+ unique_id
135
+ type
136
+ operation_mode
137
+ operation_version
134
138
  watch_dog_timer {
135
139
  alive
140
+ last_launch_time
136
141
  last_alive_time
137
142
  }
143
+ screen {
144
+ title
145
+ master
146
+ resolution {
147
+ width
148
+ height
149
+ }
150
+ }
151
+ memory_usage
152
+ disk_usage
138
153
  application {
139
154
  _id
140
155
  name
141
156
  }
157
+ update {
158
+ need_update
159
+ current_version
160
+ running_mode
161
+ }
142
162
  }
143
163
  }
144
164
  `,s=(0,a.default)`
165
+ fragment cliDeviceShortArguments on Device {
166
+ _id
167
+ name
168
+ device_name
169
+ description
170
+ entry_detail {
171
+ watch_dog_timer {
172
+ alive
173
+ last_alive_time
174
+ }
175
+ application {
176
+ _id
177
+ name
178
+ }
179
+ }
180
+ }
181
+ `,d=(0,a.default)`
145
182
  fragment cliDeviceGroupArguments on DeviceGroup {
146
183
  _id
147
184
  name
@@ -154,7 +191,7 @@ ${C}`);return a.cause=e,a},b=l(function e(i,t){var a,n=this;d(this,e),this.baseU
154
191
  create_datetime
155
192
  last_modify_datetime
156
193
  }
157
- `,d=(0,a.default)`
194
+ `,l=(0,a.default)`
158
195
  fragment cliApplicationArguments on Application {
159
196
  _id
160
197
  name
@@ -193,7 +230,7 @@ ${C}`);return a.cause=e,a},b=l(function e(i,t){var a,n=this;d(this,e),this.baseU
193
230
  create_datetime
194
231
  last_modify_datetime
195
232
  }
196
- `,l=(0,a.default)`
233
+ `,c=(0,a.default)`
197
234
  fragment cliApplicationShortArguments on Application {
198
235
  _id
199
236
  name
@@ -201,7 +238,7 @@ ${C}`);return a.cause=e,a},b=l(function e(i,t){var a,n=this;d(this,e),this.baseU
201
238
  has_unreleased_changes
202
239
  current_version
203
240
  }
204
- `,c=(0,a.default)`
241
+ `,u=(0,a.default)`
205
242
  fragment cliModuleArguments on Module {
206
243
  _id
207
244
  name
@@ -224,14 +261,14 @@ ${C}`);return a.cause=e,a},b=l(function e(i,t){var a,n=this;d(this,e),this.baseU
224
261
  create_datetime
225
262
  last_modify_datetime
226
263
  }
227
- `,u=(0,a.default)`
264
+ `,p=(0,a.default)`
228
265
  fragment cliModuleShortArguments on Module {
229
266
  _id
230
267
  name
231
268
  description
232
269
  current_version
233
270
  }
234
- `},89293(e,i,t){t.r(i),t.d(i,{bindApplication:()=>$,bindButtressServer:()=>A,controlDevice:()=>r,createApplication:()=>l,createApplicationWithShareVersion:()=>c,createDevice:()=>o,createMediaFileUploadRequest:()=>k,createModule:()=>_,dispatchDeviceGroupAction:()=>d,issueButtressAccessToken:()=>S,issueDevtoolsAccessToken:()=>D,releaseApplication:()=>I,releaseModule:()=>C,removeApplication:()=>p,removeDevice:()=>s,removeModule:()=>v,shortEditApplication:()=>m,shortEditModule:()=>y,triggerApplicationCanvasControl:()=>g,unbindButtressServer:()=>b,updateApplication:()=>u,updateModule:()=>h,updateWorkspace:()=>f});var a=t(94370),n=t(48596),o=(0,a.default)`
271
+ `},89293(e,i,t){t.r(i),t.d(i,{bindApplication:()=>$,bindButtressServer:()=>C,controlDevice:()=>r,createApplication:()=>l,createApplicationWithShareVersion:()=>c,createDevice:()=>o,createMediaFileUploadRequest:()=>k,createModule:()=>_,dispatchDeviceGroupAction:()=>d,issueButtressAccessToken:()=>S,issueDevtoolsAccessToken:()=>w,releaseApplication:()=>I,releaseModule:()=>A,removeApplication:()=>p,removeDevice:()=>s,removeModule:()=>v,shortEditApplication:()=>m,shortEditModule:()=>y,triggerApplicationCanvasControl:()=>g,unbindButtressServer:()=>b,updateApplication:()=>u,updateModule:()=>h,updateWorkspace:()=>f});var a=t(94370),n=t(48596),o=(0,a.default)`
235
272
  mutation CLI_createDevice($bindPasscode: String, $name: String, $deviceName: String) {
236
273
  createDevice(bindPasscode: $bindPasscode, name: $name, deviceName: $deviceName) {
237
274
  ...cliDeviceArguments
@@ -500,7 +537,7 @@ ${C}`);return a.cause=e,a},b=l(function e(i,t){var a,n=this;d(this,e),this.baseU
500
537
  }
501
538
  }
502
539
  }
503
- `,C=(0,a.default)`
540
+ `,A=(0,a.default)`
504
541
  mutation CLI_releaseModule(
505
542
  $id: ID!
506
543
  $config: String
@@ -520,7 +557,7 @@ ${C}`);return a.cause=e,a},b=l(function e(i,t){var a,n=this;d(this,e),this.baseU
520
557
  name
521
558
  }
522
559
  }
523
- `,A=(0,a.default)`
560
+ `,C=(0,a.default)`
524
561
  mutation CLI_bindButtressServer(
525
562
  $serverId: String!
526
563
  $name: String
@@ -549,7 +586,7 @@ ${C}`);return a.cause=e,a},b=l(function e(i,t){var a,n=this;d(this,e),this.baseU
549
586
  jti
550
587
  }
551
588
  }
552
- `,D=(0,a.default)`
589
+ `,w=(0,a.default)`
553
590
  mutation CLI_issueDevtoolsAccessToken($ttlSeconds: Int) {
554
591
  issueDevtoolsAccessToken(ttlSeconds: $ttlSeconds) {
555
592
  token
@@ -558,7 +595,7 @@ ${C}`);return a.cause=e,a},b=l(function e(i,t){var a,n=this;d(this,e),this.baseU
558
595
  jti
559
596
  }
560
597
  }
561
- `},43741(e,i,t){t.r(i),t.d(i,{application:()=>u,applicationProject:()=>A,applications:()=>p,buttressServers:()=>S,checkBindDevicePasscode:()=>h,device:()=>r,deviceGroup:()=>d,deviceGroups:()=>l,deviceUsage:()=>C,devices:()=>s,devicesByGroup:()=>c,mediaBox:()=>I,mediaBoxes:()=>f,mediaFile:()=>k,mediaFiles:()=>v,mediaWorkspace:()=>y,module:()=>$,moduleProject:()=>b,modules:()=>g,publicApplicationShareInfo:()=>m,publicModules:()=>_,workspace:()=>o});var a=t(94370),n=t(48596),o=(0,a.default)`
598
+ `},43741(e,i,t){t.r(i),t.d(i,{application:()=>p,applicationProject:()=>b,applications:()=>m,buttressServers:()=>w,checkBindDevicePasscode:()=>v,device:()=>r,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:()=>h,workspace:()=>o});var a=t(94370),n=t(48596),o=(0,a.default)`
562
599
  query CLI_workspace {
563
600
  workspace {
564
601
  ...cliWorkspaceArguments
@@ -580,20 +617,27 @@ ${C}`);return a.cause=e,a},b=l(function e(i,t){var a,n=this;d(this,e),this.baseU
580
617
  }
581
618
  ${n.NJ}
582
619
  `,d=(0,a.default)`
620
+ query CLI_devicesPanel($keyword: String, $paginate: Paginate) {
621
+ devicesPanel: devices(keyword: $keyword, paginate: $paginate) {
622
+ ...cliDevicePanelArguments
623
+ }
624
+ }
625
+ ${n.VZ}
626
+ `,l=(0,a.default)`
583
627
  query CLI_deviceGroup($id: ID) {
584
628
  deviceGroup(id: $id) {
585
629
  ...cliDeviceGroupArguments
586
630
  }
587
631
  }
588
632
  ${n.mJ}
589
- `,l=(0,a.default)`
633
+ `,c=(0,a.default)`
590
634
  query CLI_deviceGroups($paginate: Paginate) {
591
635
  deviceGroups(paginate: $paginate) {
592
636
  ...cliDeviceGroupArguments
593
637
  }
594
638
  }
595
639
  ${n.mJ}
596
- `,c=(0,a.default)`
640
+ `,u=(0,a.default)`
597
641
  query CLI_devicesByGroup($id: ID) {
598
642
  devicesByGroup(id: $id) {
599
643
  target_name
@@ -614,21 +658,21 @@ ${C}`);return a.cause=e,a},b=l(function e(i,t){var a,n=this;d(this,e),this.baseU
614
658
  }
615
659
  }
616
660
  }
617
- `,u=(0,a.default)`
661
+ `,p=(0,a.default)`
618
662
  query CLI_application($id: ID!, $composed: Boolean, $debug: Boolean) {
619
663
  application(id: $id, composed: $composed, debug: $debug) {
620
664
  ...cliApplicationArguments
621
665
  }
622
666
  }
623
667
  ${n.lI}
624
- `,p=(0,a.default)`
668
+ `,m=(0,a.default)`
625
669
  query CLI_applications($keyword: String, $paginate: Paginate) {
626
670
  applications(keyword: $keyword, paginate: $paginate) {
627
671
  ...cliApplicationShortArguments
628
672
  }
629
673
  }
630
674
  ${n.$7}
631
- `,m=(0,a.default)`
675
+ `,$=(0,a.default)`
632
676
  query CLI_publicApplicationShareInfo($id: ID!) {
633
677
  publicApplicationShareInfo(id: $id) {
634
678
  _id
@@ -653,32 +697,32 @@ ${C}`);return a.cause=e,a},b=l(function e(i,t){var a,n=this;d(this,e),this.baseU
653
697
  }
654
698
  }
655
699
  }
656
- `,$=(0,a.default)`
700
+ `,g=(0,a.default)`
657
701
  query CLI_module($id: ID!) {
658
702
  module(id: $id) {
659
703
  ...cliModuleArguments
660
704
  }
661
705
  }
662
706
  ${n.$V}
663
- `,g=(0,a.default)`
707
+ `,_=(0,a.default)`
664
708
  query CLI_modules($keyword: String, $paginate: Paginate) {
665
709
  modules(keyword: $keyword, paginate: $paginate) {
666
710
  ...cliModuleShortArguments
667
711
  }
668
712
  }
669
713
  ${n.J6}
670
- `,_=(0,a.default)`
714
+ `,h=(0,a.default)`
671
715
  query CLI_publicModules($keyword: String!, $limit: Int) {
672
716
  publicModules(keyword: $keyword, paginate: { limit: $limit }) {
673
717
  ...cliModuleShortArguments
674
718
  }
675
719
  }
676
720
  ${n.J6}
677
- `,h=(0,a.default)`
721
+ `,v=(0,a.default)`
678
722
  query CLI_checkBindDevicePasscode($passcode: String!) {
679
723
  checkBindDevicePasscode(passcode: $passcode)
680
724
  }
681
- `,v=(0,a.default)`
725
+ `,y=(0,a.default)`
682
726
  query CLI_mediaFiles(
683
727
  $boxId: ID!
684
728
  $includeTypes: [String]
@@ -721,7 +765,7 @@ ${C}`);return a.cause=e,a},b=l(function e(i,t){var a,n=this;d(this,e),this.baseU
721
765
  }
722
766
  }
723
767
  }
724
- `,y=(0,a.default)`
768
+ `,f=(0,a.default)`
725
769
  query CLI_mediaWorkspace {
726
770
  mediaWorkspace {
727
771
  id
@@ -734,7 +778,7 @@ ${C}`);return a.cause=e,a},b=l(function e(i,t){var a,n=this;d(this,e),this.baseU
734
778
  updatedAt
735
779
  }
736
780
  }
737
- `,f=(0,a.default)`
781
+ `,I=(0,a.default)`
738
782
  query CLI_mediaBoxes {
739
783
  mediaBoxes {
740
784
  id
@@ -755,7 +799,7 @@ ${C}`);return a.cause=e,a},b=l(function e(i,t){var a,n=this;d(this,e),this.baseU
755
799
  }
756
800
  }
757
801
  }
758
- `,I=(0,a.default)`
802
+ `,k=(0,a.default)`
759
803
  query CLI_mediaBox($id: ID!) {
760
804
  mediaBox(id: $id) {
761
805
  id
@@ -776,7 +820,7 @@ ${C}`);return a.cause=e,a},b=l(function e(i,t){var a,n=this;d(this,e),this.baseU
776
820
  }
777
821
  }
778
822
  }
779
- `,k=(0,a.default)`
823
+ `,A=(0,a.default)`
780
824
  query CLI_mediaFile($id: ID!) {
781
825
  mediaFile(id: $id) {
782
826
  id
@@ -826,7 +870,7 @@ ${C}`);return a.cause=e,a},b=l(function e(i,t){var a,n=this;d(this,e),this.baseU
826
870
  }
827
871
  }
828
872
  }
829
- `,A=(0,a.default)`
873
+ `,b=(0,a.default)`
830
874
  query CLI_applicationProject(
831
875
  $id: ID!
832
876
  $buildApplicationOnly: Boolean
@@ -844,7 +888,7 @@ ${C}`);return a.cause=e,a},b=l(function e(i,t){var a,n=this;d(this,e),this.baseU
844
888
  setupGeminiCLI: $setupGeminiCLI
845
889
  )
846
890
  }
847
- `,b=(0,a.default)`
891
+ `,S=(0,a.default)`
848
892
  query CLI_moduleProject(
849
893
  $id: ID!
850
894
  $buildApplicationOnly: Boolean
@@ -862,7 +906,7 @@ ${C}`);return a.cause=e,a},b=l(function e(i,t){var a,n=this;d(this,e),this.baseU
862
906
  setupGeminiCLI: $setupGeminiCLI
863
907
  )
864
908
  }
865
- `,S=(0,a.default)`
909
+ `,w=(0,a.default)`
866
910
  query CLI_buttressServers {
867
911
  buttressServers {
868
912
  serverId