@ms-cloudpack/overlay 0.16.113 → 0.17.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser-esm/lib/index.js +113 -204
- package/dist/browser-esm/lib/index.js.map +4 -4
- package/dist/browser-esm/ori-output.json +53 -67
- package/dist/browser-esm/result.json +1 -1
- package/lib/components/CloudpackProvider/CloudpackProvider.d.ts +3 -2
- package/lib/components/CloudpackProvider/CloudpackProvider.d.ts.map +1 -1
- package/lib/components/CloudpackProvider/CloudpackProvider.js +2 -4
- package/lib/components/CloudpackProvider/CloudpackProvider.js.map +1 -1
- package/lib/components/CloudpackProvider/useStatus.d.ts.map +1 -1
- package/lib/components/CloudpackProvider/useStatus.js +12 -3
- package/lib/components/CloudpackProvider/useStatus.js.map +1 -1
- package/lib/components/CloudpackProvider/useStatusDetails.d.ts +52 -16
- package/lib/components/CloudpackProvider/useStatusDetails.d.ts.map +1 -1
- package/lib/components/CloudpackProvider/useStatusDetails.js +11 -2
- package/lib/components/CloudpackProvider/useStatusDetails.js.map +1 -1
- package/lib/components/ErrorDialog/ErrorDialog.js +1 -1
- package/lib/components/ErrorDialog/ErrorDialog.js.map +1 -1
- package/lib/components/ErrorDialog/PathError.js +2 -2
- package/lib/components/ErrorDialog/PathError.js.map +1 -1
- package/lib/components/ErrorDialog/useErrorEvents.js +1 -1
- package/lib/components/ErrorDialog/useErrorEvents.js.map +1 -1
- package/lib/components/StatusDialog/StatusDialog.js +1 -1
- package/lib/components/StatusDialog/StatusDialog.js.map +1 -1
- package/lib/components/StatusDialog/TaskList.d.ts.map +1 -1
- package/lib/components/StatusDialog/TaskList.js +10 -1
- package/lib/components/StatusDialog/TaskList.js.map +1 -1
- package/lib/components/StatusDialog/TaskResultItem.js +2 -2
- package/lib/components/StatusDialog/TaskResultItem.js.map +1 -1
- package/lib/components/StatusDialog/TaskStatus.d.ts +2 -2
- package/lib/components/StatusDialog/TaskStatus.d.ts.map +1 -1
- package/lib/components/StatusDialog/TaskStatus.js +39 -28
- package/lib/components/StatusDialog/TaskStatus.js.map +1 -1
- package/lib/hooks/usePageLoadTimeReporter.js +2 -2
- package/lib/hooks/usePageLoadTimeReporter.js.map +1 -1
- package/lib/index.js +27 -7
- package/lib/index.js.map +1 -1
- package/package.json +4 -6
- package/lib/components/CloudpackProvider/createCloudpackClient.d.ts +0 -27
- package/lib/components/CloudpackProvider/createCloudpackClient.d.ts.map +0 -1
- package/lib/components/CloudpackProvider/createCloudpackClient.js +0 -163
- package/lib/components/CloudpackProvider/createCloudpackClient.js.map +0 -1
- /package/dist/ori/logs/{2g8DL8XvNNiSPBsWRhfIm0Mk1wF-logger.log → 2gF9H33FLWBeGWnbGfi7Fvtkg3i-logger.log} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"type": "builder:notify",
|
|
3
|
-
"buildId": "
|
|
3
|
+
"buildId": "build_3ce6fa22-3ab0-4bc7-b276-89d476d0adf5",
|
|
4
4
|
"buildStatus": "complete",
|
|
5
5
|
"internalError": null,
|
|
6
6
|
"warnings": [],
|
|
@@ -21,34 +21,8 @@
|
|
|
21
21
|
"imports": [],
|
|
22
22
|
"format": "esm"
|
|
23
23
|
},
|
|
24
|
-
"packages/overlay/src/components/CloudpackProvider/getCookies.ts": {
|
|
25
|
-
"bytes": 452,
|
|
26
|
-
"imports": [],
|
|
27
|
-
"format": "esm"
|
|
28
|
-
},
|
|
29
|
-
"packages/overlay/src/components/CloudpackProvider/createCloudpackClient.ts": {
|
|
30
|
-
"bytes": 6197,
|
|
31
|
-
"imports": [
|
|
32
|
-
{
|
|
33
|
-
"path": "packages/overlay/src/components/CloudpackProvider/getCookies.ts",
|
|
34
|
-
"kind": "import-statement",
|
|
35
|
-
"original": "./getCookies.js"
|
|
36
|
-
},
|
|
37
|
-
{
|
|
38
|
-
"path": "@ms-cloudpack/data-bus",
|
|
39
|
-
"kind": "import-statement",
|
|
40
|
-
"external": true
|
|
41
|
-
},
|
|
42
|
-
{
|
|
43
|
-
"path": "packages/overlay/src/constants.ts",
|
|
44
|
-
"kind": "import-statement",
|
|
45
|
-
"original": "../../constants.js"
|
|
46
|
-
}
|
|
47
|
-
],
|
|
48
|
-
"format": "esm"
|
|
49
|
-
},
|
|
50
24
|
"packages/overlay/src/components/CloudpackProvider/CloudpackProvider.tsx": {
|
|
51
|
-
"bytes":
|
|
25
|
+
"bytes": 505,
|
|
52
26
|
"imports": [
|
|
53
27
|
{
|
|
54
28
|
"path": "react",
|
|
@@ -56,9 +30,9 @@
|
|
|
56
30
|
"external": true
|
|
57
31
|
},
|
|
58
32
|
{
|
|
59
|
-
"path": "
|
|
33
|
+
"path": "@ms-cloudpack/api-server/browser",
|
|
60
34
|
"kind": "import-statement",
|
|
61
|
-
"
|
|
35
|
+
"external": true
|
|
62
36
|
}
|
|
63
37
|
],
|
|
64
38
|
"format": "esm"
|
|
@@ -80,7 +54,7 @@
|
|
|
80
54
|
"format": "esm"
|
|
81
55
|
},
|
|
82
56
|
"packages/overlay/src/components/CloudpackProvider/useStatus.ts": {
|
|
83
|
-
"bytes":
|
|
57
|
+
"bytes": 798,
|
|
84
58
|
"imports": [
|
|
85
59
|
{
|
|
86
60
|
"path": "react",
|
|
@@ -142,7 +116,7 @@
|
|
|
142
116
|
"format": "esm"
|
|
143
117
|
},
|
|
144
118
|
"packages/overlay/src/components/StatusDialog/TaskResultItem.tsx": {
|
|
145
|
-
"bytes":
|
|
119
|
+
"bytes": 1408,
|
|
146
120
|
"imports": [
|
|
147
121
|
{
|
|
148
122
|
"path": "react",
|
|
@@ -201,7 +175,7 @@
|
|
|
201
175
|
"format": "esm"
|
|
202
176
|
},
|
|
203
177
|
"packages/overlay/src/components/StatusDialog/TaskStatus.tsx": {
|
|
204
|
-
"bytes":
|
|
178
|
+
"bytes": 5249,
|
|
205
179
|
"imports": [
|
|
206
180
|
{
|
|
207
181
|
"path": "react",
|
|
@@ -252,7 +226,7 @@
|
|
|
252
226
|
"format": "esm"
|
|
253
227
|
},
|
|
254
228
|
"packages/overlay/src/components/CloudpackProvider/useStatusDetails.ts": {
|
|
255
|
-
"bytes":
|
|
229
|
+
"bytes": 608,
|
|
256
230
|
"imports": [
|
|
257
231
|
{
|
|
258
232
|
"path": "react",
|
|
@@ -278,7 +252,7 @@
|
|
|
278
252
|
"format": "esm"
|
|
279
253
|
},
|
|
280
254
|
"packages/overlay/src/components/StatusDialog/TaskList.tsx": {
|
|
281
|
-
"bytes":
|
|
255
|
+
"bytes": 1729,
|
|
282
256
|
"imports": [
|
|
283
257
|
{
|
|
284
258
|
"path": "react",
|
|
@@ -360,7 +334,7 @@
|
|
|
360
334
|
"format": "esm"
|
|
361
335
|
},
|
|
362
336
|
"packages/overlay/src/components/StatusDialog/StatusDialog.tsx": {
|
|
363
|
-
"bytes":
|
|
337
|
+
"bytes": 1538,
|
|
364
338
|
"imports": [
|
|
365
339
|
{
|
|
366
340
|
"path": "react",
|
|
@@ -401,7 +375,7 @@
|
|
|
401
375
|
"format": "esm"
|
|
402
376
|
},
|
|
403
377
|
"packages/overlay/src/components/ErrorDialog/PathError.tsx": {
|
|
404
|
-
"bytes":
|
|
378
|
+
"bytes": 2972,
|
|
405
379
|
"imports": [
|
|
406
380
|
{
|
|
407
381
|
"path": "react",
|
|
@@ -442,7 +416,7 @@
|
|
|
442
416
|
"format": "esm"
|
|
443
417
|
},
|
|
444
418
|
"packages/overlay/src/components/ErrorDialog/ErrorDialog.tsx": {
|
|
445
|
-
"bytes":
|
|
419
|
+
"bytes": 1120,
|
|
446
420
|
"imports": [
|
|
447
421
|
{
|
|
448
422
|
"path": "react",
|
|
@@ -483,7 +457,7 @@
|
|
|
483
457
|
"format": "esm"
|
|
484
458
|
},
|
|
485
459
|
"packages/overlay/src/components/ErrorDialog/useErrorEvents.ts": {
|
|
486
|
-
"bytes":
|
|
460
|
+
"bytes": 3061,
|
|
487
461
|
"imports": [
|
|
488
462
|
{
|
|
489
463
|
"path": "react",
|
|
@@ -504,7 +478,7 @@
|
|
|
504
478
|
"format": "esm"
|
|
505
479
|
},
|
|
506
480
|
"packages/overlay/src/hooks/usePageLoadTimeReporter.ts": {
|
|
507
|
-
"bytes":
|
|
481
|
+
"bytes": 857,
|
|
508
482
|
"imports": [
|
|
509
483
|
{
|
|
510
484
|
"path": "react",
|
|
@@ -581,8 +555,13 @@
|
|
|
581
555
|
],
|
|
582
556
|
"format": "esm"
|
|
583
557
|
},
|
|
558
|
+
"packages/overlay/src/components/CloudpackProvider/getCookies.ts": {
|
|
559
|
+
"bytes": 452,
|
|
560
|
+
"imports": [],
|
|
561
|
+
"format": "esm"
|
|
562
|
+
},
|
|
584
563
|
"packages/overlay/src/index.tsx": {
|
|
585
|
-
"bytes":
|
|
564
|
+
"bytes": 1423,
|
|
586
565
|
"imports": [
|
|
587
566
|
{
|
|
588
567
|
"path": "react",
|
|
@@ -613,6 +592,16 @@
|
|
|
613
592
|
"path": "packages/overlay/src/constants.ts",
|
|
614
593
|
"kind": "import-statement",
|
|
615
594
|
"original": "./constants.js"
|
|
595
|
+
},
|
|
596
|
+
{
|
|
597
|
+
"path": "@ms-cloudpack/api-server/browser",
|
|
598
|
+
"kind": "import-statement",
|
|
599
|
+
"external": true
|
|
600
|
+
},
|
|
601
|
+
{
|
|
602
|
+
"path": "packages/overlay/src/components/CloudpackProvider/getCookies.ts",
|
|
603
|
+
"kind": "import-statement",
|
|
604
|
+
"original": "./components/CloudpackProvider/getCookies.js"
|
|
616
605
|
}
|
|
617
606
|
],
|
|
618
607
|
"format": "esm"
|
|
@@ -644,7 +633,7 @@
|
|
|
644
633
|
"imports": [],
|
|
645
634
|
"exports": [],
|
|
646
635
|
"inputs": {},
|
|
647
|
-
"bytes":
|
|
636
|
+
"bytes": 76131
|
|
648
637
|
},
|
|
649
638
|
"packages/overlay/dist/browser-esm/lib/index.js": {
|
|
650
639
|
"imports": [
|
|
@@ -667,11 +656,6 @@
|
|
|
667
656
|
"kind": "import-statement",
|
|
668
657
|
"external": true
|
|
669
658
|
},
|
|
670
|
-
{
|
|
671
|
-
"path": "@ms-cloudpack/data-bus",
|
|
672
|
-
"kind": "import-statement",
|
|
673
|
-
"external": true
|
|
674
|
-
},
|
|
675
659
|
{
|
|
676
660
|
"path": "react",
|
|
677
661
|
"kind": "import-statement",
|
|
@@ -786,22 +770,21 @@
|
|
|
786
770
|
"path": "react",
|
|
787
771
|
"kind": "import-statement",
|
|
788
772
|
"external": true
|
|
773
|
+
},
|
|
774
|
+
{
|
|
775
|
+
"path": "@ms-cloudpack/api-server/browser",
|
|
776
|
+
"kind": "import-statement",
|
|
777
|
+
"external": true
|
|
789
778
|
}
|
|
790
779
|
],
|
|
791
780
|
"exports": [],
|
|
792
781
|
"entryPoint": "packages/overlay/src/index.tsx",
|
|
793
782
|
"inputs": {
|
|
794
783
|
"packages/overlay/src/index.tsx": {
|
|
795
|
-
"bytesInOutput":
|
|
784
|
+
"bytesInOutput": 1094
|
|
796
785
|
},
|
|
797
786
|
"packages/overlay/src/components/CloudpackProvider/CloudpackProvider.tsx": {
|
|
798
|
-
"bytesInOutput":
|
|
799
|
-
},
|
|
800
|
-
"packages/overlay/src/components/CloudpackProvider/getCookies.ts": {
|
|
801
|
-
"bytesInOutput": 317
|
|
802
|
-
},
|
|
803
|
-
"packages/overlay/src/components/CloudpackProvider/createCloudpackClient.ts": {
|
|
804
|
-
"bytesInOutput": 4040
|
|
787
|
+
"bytesInOutput": 312
|
|
805
788
|
},
|
|
806
789
|
"packages/overlay/src/components/StatusOverlay/StatusOverlay.tsx": {
|
|
807
790
|
"bytesInOutput": 1087
|
|
@@ -810,25 +793,25 @@
|
|
|
810
793
|
"bytesInOutput": 4214
|
|
811
794
|
},
|
|
812
795
|
"packages/overlay/src/hooks/useDraggable.ts": {
|
|
813
|
-
"bytesInOutput":
|
|
796
|
+
"bytesInOutput": 1789
|
|
814
797
|
},
|
|
815
798
|
"packages/overlay/src/components/StatusBadge/StatusBadge.module.css": {
|
|
816
799
|
"bytesInOutput": 3601
|
|
817
800
|
},
|
|
818
801
|
"packages/overlay/src/components/CloudpackProvider/useStatus.ts": {
|
|
819
|
-
"bytesInOutput":
|
|
802
|
+
"bytesInOutput": 643
|
|
820
803
|
},
|
|
821
804
|
"packages/overlay/src/components/StatusDialog/StatusDialog.tsx": {
|
|
822
|
-
"bytesInOutput":
|
|
805
|
+
"bytesInOutput": 1239
|
|
823
806
|
},
|
|
824
807
|
"packages/overlay/src/components/StatusDialog/TaskList.tsx": {
|
|
825
|
-
"bytesInOutput":
|
|
808
|
+
"bytesInOutput": 1303
|
|
826
809
|
},
|
|
827
810
|
"packages/overlay/src/components/StatusDialog/TaskStatus.tsx": {
|
|
828
|
-
"bytesInOutput":
|
|
811
|
+
"bytesInOutput": 5447
|
|
829
812
|
},
|
|
830
813
|
"packages/overlay/src/components/StatusDialog/TaskResultItem.tsx": {
|
|
831
|
-
"bytesInOutput":
|
|
814
|
+
"bytesInOutput": 1361
|
|
832
815
|
},
|
|
833
816
|
"packages/overlay/src/components/StatusDialog/TaskResultItem.module.css": {
|
|
834
817
|
"bytesInOutput": 1838
|
|
@@ -852,7 +835,7 @@
|
|
|
852
835
|
"bytesInOutput": 2094
|
|
853
836
|
},
|
|
854
837
|
"packages/overlay/src/components/CloudpackProvider/useStatusDetails.ts": {
|
|
855
|
-
"bytesInOutput":
|
|
838
|
+
"bytesInOutput": 531
|
|
856
839
|
},
|
|
857
840
|
"packages/overlay/src/components/StatusDialog/TaskList.module.css": {
|
|
858
841
|
"bytesInOutput": 548
|
|
@@ -873,25 +856,28 @@
|
|
|
873
856
|
"bytesInOutput": 786
|
|
874
857
|
},
|
|
875
858
|
"packages/overlay/src/components/ErrorDialog/ErrorDialog.tsx": {
|
|
876
|
-
"bytesInOutput":
|
|
859
|
+
"bytesInOutput": 741
|
|
877
860
|
},
|
|
878
861
|
"packages/overlay/src/components/ErrorDialog/PathError.tsx": {
|
|
879
|
-
"bytesInOutput":
|
|
862
|
+
"bytesInOutput": 3168
|
|
880
863
|
},
|
|
881
864
|
"packages/overlay/src/components/ErrorDialog/useErrorEvents.ts": {
|
|
882
|
-
"bytesInOutput":
|
|
865
|
+
"bytesInOutput": 1921
|
|
883
866
|
},
|
|
884
867
|
"packages/overlay/src/hooks/usePageLoadTimeReporter.ts": {
|
|
885
|
-
"bytesInOutput":
|
|
868
|
+
"bytesInOutput": 692
|
|
886
869
|
},
|
|
887
870
|
"packages/overlay/src/components/ThemeProvider/ThemeProvider.tsx": {
|
|
888
871
|
"bytesInOutput": 185
|
|
889
872
|
},
|
|
890
873
|
"packages/overlay/src/components/ThemeProvider/ThemeProvider.module.css": {
|
|
891
874
|
"bytesInOutput": 614
|
|
875
|
+
},
|
|
876
|
+
"packages/overlay/src/components/CloudpackProvider/getCookies.ts": {
|
|
877
|
+
"bytesInOutput": 317
|
|
892
878
|
}
|
|
893
879
|
},
|
|
894
|
-
"bytes":
|
|
880
|
+
"bytes": 49702
|
|
895
881
|
},
|
|
896
882
|
"packages/overlay/dist/browser-esm/chunks/js/chunk-PDWQRLCD.js.map": {
|
|
897
883
|
"imports": [],
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { type CloudpackClient } from '
|
|
2
|
+
import { type CloudpackClient } from '@ms-cloudpack/api-server/browser';
|
|
3
3
|
export declare const CloudpackContext: React.Context<CloudpackClient>;
|
|
4
|
-
export declare function CloudpackProvider({ children }: {
|
|
4
|
+
export declare function CloudpackProvider({ client, children }: {
|
|
5
|
+
client: CloudpackClient;
|
|
5
6
|
children: React.ReactNode;
|
|
6
7
|
}): React.JSX.Element;
|
|
7
8
|
export declare const useCloudpack: () => CloudpackClient;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CloudpackProvider.d.ts","sourceRoot":"","sources":["../../../src/components/CloudpackProvider/CloudpackProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"CloudpackProvider.d.ts","sourceRoot":"","sources":["../../../src/components/CloudpackProvider/CloudpackProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoC,MAAM,OAAO,CAAC;AACzD,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,kCAAkC,CAAC;AAExE,eAAO,MAAM,gBAAgB,gCAAqE,CAAC;AAEnG,wBAAgB,iBAAiB,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,EAAE;IAAE,MAAM,EAAE,eAAe,CAAC;IAAC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;CAAE,qBAE7G;AAED,eAAO,MAAM,YAAY,uBAAqC,CAAC"}
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
import React, { createContext,
|
|
2
|
-
import { createCloudpackClient } from './createCloudpackClient.js';
|
|
1
|
+
import React, { createContext, useContext } from 'react';
|
|
3
2
|
export const CloudpackContext = createContext(null);
|
|
4
|
-
export function CloudpackProvider({ children }) {
|
|
5
|
-
const [client] = useState(createCloudpackClient);
|
|
3
|
+
export function CloudpackProvider({ client, children }) {
|
|
6
4
|
return React.createElement(CloudpackContext.Provider, { value: client }, children);
|
|
7
5
|
}
|
|
8
6
|
export const useCloudpack = () => useContext(CloudpackContext);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CloudpackProvider.js","sourceRoot":"","sources":["../../../src/components/CloudpackProvider/CloudpackProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,aAAa,EAAE,
|
|
1
|
+
{"version":3,"file":"CloudpackProvider.js","sourceRoot":"","sources":["../../../src/components/CloudpackProvider/CloudpackProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAGzD,MAAM,CAAC,MAAM,gBAAgB,GAAG,aAAa,CAAkB,IAAkC,CAAC,CAAC;AAEnG,MAAM,UAAU,iBAAiB,CAAC,EAAE,MAAM,EAAE,QAAQ,EAA0D;IAC5G,OAAO,oBAAC,gBAAgB,CAAC,QAAQ,IAAC,KAAK,EAAE,MAAM,IAAG,QAAQ,CAA6B,CAAC;AAC1F,CAAC;AAED,MAAM,CAAC,MAAM,YAAY,GAAG,GAAG,EAAE,CAAC,UAAU,CAAC,gBAAgB,CAAC,CAAC","sourcesContent":["import React, { createContext, useContext } from 'react';\nimport { type CloudpackClient } from '@ms-cloudpack/api-server/browser';\n\nexport const CloudpackContext = createContext<CloudpackClient>(null as unknown as CloudpackClient);\n\nexport function CloudpackProvider({ client, children }: { client: CloudpackClient; children: React.ReactNode }) {\n return <CloudpackContext.Provider value={client}>{children}</CloudpackContext.Provider>;\n}\n\nexport const useCloudpack = () => useContext(CloudpackContext);\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useStatus.d.ts","sourceRoot":"","sources":["../../../src/components/CloudpackProvider/useStatus.ts"],"names":[],"mappings":"AAEA,OAAO,EAAmB,KAAK,SAAS,EAAE,MAAM,kCAAkC,CAAC;AAEnF,MAAM,MAAM,eAAe,GAAG,SAAS,CAAC;AAUxC,eAAO,MAAM,SAAS;;;;;;
|
|
1
|
+
{"version":3,"file":"useStatus.d.ts","sourceRoot":"","sources":["../../../src/components/CloudpackProvider/useStatus.ts"],"names":[],"mappings":"AAEA,OAAO,EAAmB,KAAK,SAAS,EAAE,MAAM,kCAAkC,CAAC;AAEnF,MAAM,MAAM,eAAe,GAAG,SAAS,CAAC;AAUxC,eAAO,MAAM,SAAS;;;;;;CAiBrB,CAAC"}
|
|
@@ -9,9 +9,18 @@ const defaultStatus = {
|
|
|
9
9
|
totalWarnings: 0,
|
|
10
10
|
};
|
|
11
11
|
export const useStatus = () => {
|
|
12
|
-
const
|
|
13
|
-
const [status, setStatus] = useState(
|
|
14
|
-
useEffect(() =>
|
|
12
|
+
const cloudpack = useCloudpack();
|
|
13
|
+
const [status, setStatus] = useState(defaultStatus);
|
|
14
|
+
useEffect(() => {
|
|
15
|
+
const subscription = cloudpack?.onDataChanged.subscribe(taskStatsSource, {
|
|
16
|
+
onData: (data) => {
|
|
17
|
+
setStatus(data);
|
|
18
|
+
},
|
|
19
|
+
});
|
|
20
|
+
return () => {
|
|
21
|
+
subscription.unsubscribe();
|
|
22
|
+
};
|
|
23
|
+
}, [cloudpack]);
|
|
15
24
|
return status;
|
|
16
25
|
};
|
|
17
26
|
//# sourceMappingURL=useStatus.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useStatus.js","sourceRoot":"","sources":["../../../src/components/CloudpackProvider/useStatus.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC5C,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACtD,OAAO,EAAE,eAAe,EAAkB,MAAM,kCAAkC,CAAC;AAInF,MAAM,aAAa,GAAoB;IACrC,MAAM,EAAE,SAAS;IACjB,cAAc,EAAE,CAAC;IACjB,UAAU,EAAE,CAAC;IACb,WAAW,EAAE,CAAC;IACd,aAAa,EAAE,CAAC;CACjB,CAAC;AAEF,MAAM,CAAC,MAAM,SAAS,GAAG,GAAG,EAAE;IAC5B,MAAM,
|
|
1
|
+
{"version":3,"file":"useStatus.js","sourceRoot":"","sources":["../../../src/components/CloudpackProvider/useStatus.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC5C,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACtD,OAAO,EAAE,eAAe,EAAkB,MAAM,kCAAkC,CAAC;AAInF,MAAM,aAAa,GAAoB;IACrC,MAAM,EAAE,SAAS;IACjB,cAAc,EAAE,CAAC;IACjB,UAAU,EAAE,CAAC;IACb,WAAW,EAAE,CAAC;IACd,aAAa,EAAE,CAAC;CACjB,CAAC;AAEF,MAAM,CAAC,MAAM,SAAS,GAAG,GAAG,EAAE;IAC5B,MAAM,SAAS,GAAG,YAAY,EAAE,CAAC;IACjC,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,QAAQ,CAAkB,aAAa,CAAC,CAAC;IAErE,SAAS,CAAC,GAAG,EAAE;QACb,MAAM,YAAY,GAAG,SAAS,EAAE,aAAa,CAAC,SAAS,CAAC,eAAe,EAAE;YACvE,MAAM,EAAE,CAAC,IAAI,EAAE,EAAE;gBACf,SAAS,CAAC,IAAuB,CAAC,CAAC;YACrC,CAAC;SACF,CAAC,CAAC;QAEH,OAAO,GAAG,EAAE;YACV,YAAY,CAAC,WAAW,EAAE,CAAC;QAC7B,CAAC,CAAC;IACJ,CAAC,EAAE,CAAC,SAAS,CAAC,CAAC,CAAC;IAEhB,OAAO,MAAM,CAAC;AAChB,CAAC,CAAC","sourcesContent":["import { useEffect, useState } from 'react';\nimport { useCloudpack } from './CloudpackProvider.js';\nimport { taskStatsSource, type TaskStats } from '@ms-cloudpack/api-server/browser';\n\nexport type CloudpackStatus = TaskStats;\n\nconst defaultStatus: CloudpackStatus = {\n status: 'unknown',\n remainingTasks: 0,\n totalTasks: 0,\n totalErrors: 0,\n totalWarnings: 0,\n};\n\nexport const useStatus = () => {\n const cloudpack = useCloudpack();\n const [status, setStatus] = useState<CloudpackStatus>(defaultStatus);\n\n useEffect(() => {\n const subscription = cloudpack?.onDataChanged.subscribe(taskStatsSource, {\n onData: (data) => {\n setStatus(data as CloudpackStatus);\n },\n });\n\n return () => {\n subscription.unsubscribe();\n };\n }, [cloudpack]);\n\n return status;\n};\n"]}
|
|
@@ -1,17 +1,53 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
1
|
+
export declare const useStatusDetails: () => {
|
|
2
|
+
tasks: {
|
|
3
|
+
id: string;
|
|
4
|
+
startTime: number;
|
|
5
|
+
status?: "pending" | "complete" | undefined;
|
|
6
|
+
name?: string | undefined;
|
|
7
|
+
inputPath?: string | undefined;
|
|
8
|
+
outputPath?: string | undefined;
|
|
9
|
+
errors?: {
|
|
10
|
+
text: string;
|
|
11
|
+
source: string;
|
|
12
|
+
location?: {
|
|
13
|
+
file: string;
|
|
14
|
+
line?: number | undefined;
|
|
15
|
+
column?: number | undefined;
|
|
16
|
+
} | undefined;
|
|
17
|
+
notes?: {
|
|
18
|
+
text: string;
|
|
19
|
+
location?: {
|
|
20
|
+
file: string;
|
|
21
|
+
line?: number | undefined;
|
|
22
|
+
column?: number | undefined;
|
|
23
|
+
} | undefined;
|
|
24
|
+
}[] | undefined;
|
|
25
|
+
}[] | undefined;
|
|
26
|
+
warnings?: {
|
|
27
|
+
text: string;
|
|
28
|
+
source: string;
|
|
29
|
+
location?: {
|
|
30
|
+
file: string;
|
|
31
|
+
line?: number | undefined;
|
|
32
|
+
column?: number | undefined;
|
|
33
|
+
} | undefined;
|
|
34
|
+
notes?: {
|
|
35
|
+
text: string;
|
|
36
|
+
location?: {
|
|
37
|
+
file: string;
|
|
38
|
+
line?: number | undefined;
|
|
39
|
+
column?: number | undefined;
|
|
40
|
+
} | undefined;
|
|
41
|
+
}[] | undefined;
|
|
42
|
+
}[] | undefined;
|
|
43
|
+
timings?: {
|
|
44
|
+
name: string;
|
|
45
|
+
start: number;
|
|
46
|
+
end?: number | undefined;
|
|
47
|
+
threwException?: boolean | undefined;
|
|
48
|
+
}[] | undefined;
|
|
49
|
+
durationMilliseconds?: number | undefined;
|
|
50
|
+
lastUpdated?: number | undefined;
|
|
51
|
+
}[];
|
|
52
|
+
};
|
|
17
53
|
//# sourceMappingURL=useStatusDetails.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useStatusDetails.d.ts","sourceRoot":"","sources":["../../../src/components/CloudpackProvider/useStatusDetails.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useStatusDetails.d.ts","sourceRoot":"","sources":["../../../src/components/CloudpackProvider/useStatusDetails.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiB5B,CAAC"}
|
|
@@ -2,9 +2,18 @@ import { useEffect, useState } from 'react';
|
|
|
2
2
|
import { useCloudpack } from './CloudpackProvider.js';
|
|
3
3
|
import { taskListSource } from '@ms-cloudpack/api-server/browser';
|
|
4
4
|
export const useStatusDetails = () => {
|
|
5
|
-
const
|
|
5
|
+
const cloudpack = useCloudpack();
|
|
6
6
|
const [details, setDetails] = useState({ tasks: [] });
|
|
7
|
-
useEffect(() =>
|
|
7
|
+
useEffect(() => {
|
|
8
|
+
const subscription = cloudpack?.onDataChanged.subscribe(taskListSource, {
|
|
9
|
+
onData: (data) => {
|
|
10
|
+
setDetails(data);
|
|
11
|
+
},
|
|
12
|
+
});
|
|
13
|
+
return () => {
|
|
14
|
+
subscription.unsubscribe();
|
|
15
|
+
};
|
|
16
|
+
}, [cloudpack]);
|
|
8
17
|
return details;
|
|
9
18
|
};
|
|
10
19
|
//# sourceMappingURL=useStatusDetails.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useStatusDetails.js","sourceRoot":"","sources":["../../../src/components/CloudpackProvider/useStatusDetails.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC5C,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACtD,OAAO,EAAE,cAAc,
|
|
1
|
+
{"version":3,"file":"useStatusDetails.js","sourceRoot":"","sources":["../../../src/components/CloudpackProvider/useStatusDetails.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC5C,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACtD,OAAO,EAAE,cAAc,EAAiB,MAAM,kCAAkC,CAAC;AAEjF,MAAM,CAAC,MAAM,gBAAgB,GAAG,GAAG,EAAE;IACnC,MAAM,SAAS,GAAG,YAAY,EAAE,CAAC;IACjC,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,GAAG,QAAQ,CAAW,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,CAAC;IAEhE,SAAS,CAAC,GAAG,EAAE;QACb,MAAM,YAAY,GAAG,SAAS,EAAE,aAAa,CAAC,SAAS,CAAC,cAAc,EAAE;YACtE,MAAM,EAAE,CAAC,IAAI,EAAE,EAAE;gBACf,UAAU,CAAC,IAAgB,CAAC,CAAC;YAC/B,CAAC;SACF,CAAC,CAAC;QAEH,OAAO,GAAG,EAAE;YACV,YAAY,CAAC,WAAW,EAAE,CAAC;QAC7B,CAAC,CAAC;IACJ,CAAC,EAAE,CAAC,SAAS,CAAC,CAAC,CAAC;IAEhB,OAAO,OAAO,CAAC;AACjB,CAAC,CAAC","sourcesContent":["import { useEffect, useState } from 'react';\nimport { useCloudpack } from './CloudpackProvider.js';\nimport { taskListSource, type TaskList } from '@ms-cloudpack/api-server/browser';\n\nexport const useStatusDetails = () => {\n const cloudpack = useCloudpack();\n const [details, setDetails] = useState<TaskList>({ tasks: [] });\n\n useEffect(() => {\n const subscription = cloudpack?.onDataChanged.subscribe(taskListSource, {\n onData: (data) => {\n setDetails(data as TaskList);\n },\n });\n\n return () => {\n subscription.unsubscribe();\n };\n }, [cloudpack]);\n\n return details;\n};\n"]}
|
|
@@ -8,7 +8,7 @@ import { elementIds } from '../../constants.js';
|
|
|
8
8
|
export function ErrorDialog({ unsupported }) {
|
|
9
9
|
const cloudpack = useCloudpack();
|
|
10
10
|
const reload = () => {
|
|
11
|
-
cloudpack.restartAllTasks();
|
|
11
|
+
void cloudpack.restartAllTasks.mutate();
|
|
12
12
|
};
|
|
13
13
|
return (React.createElement(Dialog, { title: "Found unsupported paths in your project", id: elementIds.errorDialogRoot, style: "error", commands: [
|
|
14
14
|
React.createElement(Button, { primary: true, onClick: reload, key: "1" }, "Restart all tasks"),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ErrorDialog.js","sourceRoot":"","sources":["../../../src/components/ErrorDialog/ErrorDialog.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,OAAO,CAAC;AACzC,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EAAE,YAAY,EAAE,MAAM,2CAA2C,CAAC;AACzE,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,MAAM,MAAM,qCAAqC,CAAC;AAEzD,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAMhD,MAAM,UAAU,WAAW,CAAC,EAAE,WAAW,EAAoB;IAC3D,MAAM,SAAS,GAAG,YAAY,EAAE,CAAC;IAEjC,MAAM,MAAM,GAAG,GAAG,EAAE;QAClB,SAAS,CAAC,eAAe,EAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"ErrorDialog.js","sourceRoot":"","sources":["../../../src/components/ErrorDialog/ErrorDialog.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,OAAO,CAAC;AACzC,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EAAE,YAAY,EAAE,MAAM,2CAA2C,CAAC;AACzE,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,MAAM,MAAM,qCAAqC,CAAC;AAEzD,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAMhD,MAAM,UAAU,WAAW,CAAC,EAAE,WAAW,EAAoB;IAC3D,MAAM,SAAS,GAAG,YAAY,EAAE,CAAC;IAEjC,MAAM,MAAM,GAAG,GAAG,EAAE;QAClB,KAAK,SAAS,CAAC,eAAe,CAAC,MAAM,EAAE,CAAC;IAC1C,CAAC,CAAC;IAEF,OAAO,CACL,oBAAC,MAAM,IACL,KAAK,EAAC,yCAAyC,EAC/C,EAAE,EAAE,UAAU,CAAC,eAAe,EAC9B,KAAK,EAAC,OAAO,EACb,QAAQ,EAAE;YACR,oBAAC,MAAM,IAAC,OAAO,QAAC,OAAO,EAAE,MAAM,EAAE,GAAG,EAAC,GAAG,wBAE/B;SACV;QAED,6BAAK,SAAS,EAAE,MAAM,CAAC,IAAI,IACxB,WAAW,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC,CAChC,oBAAC,SAAS,OAAK,IAAI,EAAE,GAAG,EAAE,KAAK,GAAI,CACpC,CAAC,CACE,CACC,CACV,CAAC;AACJ,CAAC","sourcesContent":["import { default as React } from 'react';\nimport { Button } from '../Button/Button.js';\nimport { useCloudpack } from '../CloudpackProvider/CloudpackProvider.js';\nimport { PathError } from './PathError.js';\nimport styles from '../StatusDialog/TaskList.module.css';\nimport type { UnsupportedErrorEvent } from './useErrorEvents.js';\nimport { Dialog } from '../Dialog/Dialog.js';\nimport { elementIds } from '../../constants.js';\n\nexport interface ErrorDialogProps {\n unsupported: UnsupportedErrorEvent[];\n}\n\nexport function ErrorDialog({ unsupported }: ErrorDialogProps) {\n const cloudpack = useCloudpack();\n\n const reload = () => {\n void cloudpack.restartAllTasks.mutate();\n };\n\n return (\n <Dialog\n title=\"Found unsupported paths in your project\"\n id={elementIds.errorDialogRoot}\n style=\"error\"\n commands={[\n <Button primary onClick={reload} key=\"1\">\n Restart all tasks\n </Button>,\n ]}\n >\n <div className={styles.root}>\n {unsupported.map((data, index) => (\n <PathError {...data} key={index} />\n ))}\n </div>\n </Dialog>\n );\n}\n"]}
|
|
@@ -10,10 +10,10 @@ export function PathError(props) {
|
|
|
10
10
|
const { packageName, importPath, issuerUrl, fixable } = props;
|
|
11
11
|
const cloudpack = useCloudpack();
|
|
12
12
|
const editConfig = () => {
|
|
13
|
-
cloudpack.
|
|
13
|
+
void cloudpack.openConfigEditor.mutate();
|
|
14
14
|
};
|
|
15
15
|
const addOverride = () => {
|
|
16
|
-
cloudpack.
|
|
16
|
+
void cloudpack.addPackageOverride.mutate({ packageName, importPath, issuerUrl });
|
|
17
17
|
};
|
|
18
18
|
return (React.createElement("div", { className: styles.root },
|
|
19
19
|
React.createElement("div", { className: cx(styles.header, styles.error) },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PathError.js","sourceRoot":"","sources":["../../../src/components/ErrorDialog/PathError.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,MAAM,MAAM,uCAAuC,CAAC;AAC3D,OAAO,SAAS,MAAM,kCAAkC,CAAC;AACzD,OAAO,EAAE,OAAO,IAAI,EAAE,EAAE,MAAM,YAAY,CAAC;AAC3C,OAAO,eAAe,MAAM,wCAAwC,CAAC;AAErE,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EAAE,YAAY,EAAE,MAAM,2CAA2C,CAAC;AAEzE,MAAM,UAAU,SAAS,CAAC,KAA4B;IACpD,MAAM,CAAC,WAAW,EAAE,cAAc,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAU,KAAK,CAAC,CAAC;IACrE,MAAM,EAAE,WAAW,EAAE,UAAU,EAAE,SAAS,EAAE,OAAO,EAAE,GAAG,KAAK,CAAC;IAC9D,MAAM,SAAS,GAAG,YAAY,EAAE,CAAC;IAEjC,MAAM,UAAU,GAAG,GAAG,EAAE;QACtB,SAAS,CAAC,
|
|
1
|
+
{"version":3,"file":"PathError.js","sourceRoot":"","sources":["../../../src/components/ErrorDialog/PathError.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAA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import React from 'react';\nimport styles from '../StatusDialog/TaskStatus.module.css';\nimport ErrorIcon from '../../images/error-24.inline.svg';\nimport { default as cx } from 'classnames';\nimport ChevronDownIcon from '../../images/chevrondown-20.inline.svg';\nimport type { UnsupportedErrorEvent } from './useErrorEvents.js';\nimport { Button } from '../Button/Button.js';\nimport { useCloudpack } from '../CloudpackProvider/CloudpackProvider.js';\n\nexport function PathError(props: UnsupportedErrorEvent) {\n const [showContent, setshowContent] = React.useState<boolean>(false);\n const { packageName, importPath, issuerUrl, fixable } = props;\n const cloudpack = useCloudpack();\n\n const editConfig = () => {\n void cloudpack.openConfigEditor.mutate();\n };\n\n const addOverride = () => {\n void cloudpack.addPackageOverride.mutate({ packageName, importPath, issuerUrl });\n };\n\n return (\n <div className={styles.root}>\n <div className={cx(styles.header, styles.error)}>\n <button\n className={styles.expandButton}\n onClick={() => setshowContent(!showContent)}\n aria-label={showContent ? `Minimize ${packageName}/${importPath}` : `Expand ${packageName}/${importPath}`}\n >\n <img\n className={cx(styles.expandIcon, !showContent && styles.collapsed)}\n src={ChevronDownIcon}\n alt=\"Chevron down icon\"\n />\n </button>\n <img className={styles.errorIcon} src={ErrorIcon} alt=\"Error icon\" />\n <div className={styles.title}>{`${packageName}/${importPath}`}</div>\n </div>\n {showContent && (\n <>\n <div className={styles.commands}>\n {fixable && <Button onClick={addOverride}>Add override</Button>}\n <Button onClick={editConfig}>Edit config file</Button>\n </div>\n <div className={styles.content}>\n <div className={styles.title}>Details</div>\n\n <div className={styles.nameValueArea}>\n <div className={styles.name}>Problem</div>\n <div className={styles.value}>\n {importPath === '.'\n ? `An unrecognized package \"${packageName}\" was imported.`\n : `Path \"${importPath}\" was imported from package \"${packageName}\" but was not recognized as an exported path.`}\n </div>\n </div>\n <div className={styles.nameValueArea}>\n <div className={styles.name}>Solution</div>\n <div className={styles.value}>\n {fixable\n ? `Remove the path from the import in your source. (Import from \"${packageName}\" rather than \"${packageName}/${importPath}\")`\n : importPath === '.'\n ? `Make sure the package name is valid.`\n : `Import not found on package. Make sure the import path is valid.`}\n </div>\n </div>\n </div>\n </>\n )}\n </div>\n );\n}\n"]}
|
|
@@ -21,7 +21,7 @@ export const useErrorEvents = () => {
|
|
|
21
21
|
const { packageName } = importString;
|
|
22
22
|
const importPath = importString.importPath.replace(/^\.\//, '');
|
|
23
23
|
(async () => {
|
|
24
|
-
const { fixable } = await cloudpack.
|
|
24
|
+
const { fixable } = await cloudpack.validatePackageOverride.query({ packageName, importPath, issuerUrl });
|
|
25
25
|
setErrorEvents((prev) => ({
|
|
26
26
|
...prev,
|
|
27
27
|
unsupported: [...prev.unsupported, { packageName, importPath, issuerUrl: issuerUrl, fixable }],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useErrorEvents.js","sourceRoot":"","sources":["../../../src/components/ErrorDialog/useErrorEvents.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC5C,OAAO,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AACtE,OAAO,EAAE,YAAY,EAAE,MAAM,2CAA2C,CAAC;AAsBzE,iCAAiC;AACjC,MAAM,cAAc,GAAG,CAAC,KAA4B,EAAyB,EAAE;IAC7E,OAAO,OAAO,KAAK,CAAC,MAAM,KAAK,QAAQ,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,KAAK,CAAC,MAAM,KAAK,IAAI,CAAC;AACnG,CAAC,CAAC;AAEF,qDAAqD;AACrD,MAAM,UAAU,GAAG,CAAC,KAA4B,EAAyB,EAAE;IACzE,OAAO,cAAc,CAAC,KAAK,CAAC,IAAI,OAAO,KAAK,CAAC,MAAM,CAAC,OAAO,KAAK,QAAQ,CAAC;AAC3E,CAAC,CAAC;AAIF,MAAM,CAAC,MAAM,cAAc,GAAG,GAAG,EAAE;IACjC,MAAM,CAAC,WAAW,EAAE,cAAc,CAAC,GAAG,QAAQ,CA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;QAEF,MAAM,UAAU,GAAG,MAAM,CAAC,YAAY,CAAC;QAEvC,UAAU,CAAC,UAAU,EAAE,CAAC;QAExB,wCAAwC;QACxC,MAAM,CAAC,gBAAgB,CAAC,OAAO,EAAE,CAAC,KAAiB,EAAE,EAAE;YACrD,sBAAsB,CAAC,KAAK,CAAC,OAAO,EAAE,KAAK,CAAC,QAAQ,CAAC,CAAC;QACxD,CAAC,CAAC,CAAC;QAEH,yCAAyC;QACzC,KAAK,MAAM,KAAK,IAAI,UAAU,CAAC,cAAc,EAAE,CAAC;YAC9C,sBAAsB,CAAC,KAAK,CAAC,OAAO,EAAE,KAAK,CAAC,QAAQ,CAAC,CAAC;QACxD,CAAC;QAED,wCAAwC;QACxC,MAAM,CAAC,gBAAgB,CAAC,oBAAoB,EAAE,CAAC,KAA4B,EAAE,EAAE;YAC7E,UAAU,CAAC,KAAK,CAAC,IAAI,sBAAsB,CAAC,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;QACpE,CAAC,CAAC,CAAC;QAEH,6CAA6C;QAC7C,KAAK,MAAM,KAAK,IAAI,UAAU,CAAC,kBAAkB,EAAE,CAAC;YAClD,UAAU,CAAC,KAAK,CAAC,IAAI,sBAAsB,CAAC,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;QACpE,CAAC;IACH,CAAC,EAAE,CAAC,SAAS,CAAC,CAAC,CAAC;IAEhB,OAAO,WAAW,CAAC;AACrB,CAAC,CAAC","sourcesContent":["import { useEffect, useState } from 'react';\nimport { parseImportString } from '@ms-cloudpack/path-string-parsing';\nimport { useCloudpack } from '../CloudpackProvider/CloudpackProvider.js';\n\ndeclare global {\n interface Window {\n __pageErrors: {\n uncaughtErrors: ErrorEvent[];\n uncaughtRejections: PromiseRejectionEvent[];\n unregister: () => void;\n };\n }\n}\n\n// Interface with reason as a record.\ninterface ReasonRecord extends PromiseRejectionEvent {\n readonly reason: Record<string, unknown>;\n}\n\n// Interface with message as a string.\ninterface ReasonString extends ReasonRecord {\n readonly reason: { message: string };\n}\n\n// Verify the reason is a record.\nconst reasonIsRecord = (event: PromiseRejectionEvent): event is ReasonRecord => {\n return typeof event.reason === 'object' && !Array.isArray(event.reason) && event.reason !== null;\n};\n\n// Verify the reason has a message which is a string.\nconst hasMessage = (event: PromiseRejectionEvent): event is ReasonString => {\n return reasonIsRecord(event) && typeof event.reason.message === 'string';\n};\n\nexport type UnsupportedErrorEvent = { packageName: string; importPath: string; issuerUrl?: string; fixable?: boolean };\n\nexport const useErrorEvents = () => {\n const [errorEvents, setErrorEvents] = useState<{ unsupported: UnsupportedErrorEvent[] }>({ unsupported: [] });\n const cloudpack = useCloudpack();\n\n useEffect(() => {\n const handleUnsupportedError = (message: string, issuerUrl?: string): void => {\n const errorRegex = /[Mm]odule specifier,? ['\"](.*?)['\"]/;\n const match = message.match(errorRegex);\n\n if (match) {\n const importString = parseImportString(match[1]);\n const { packageName } = importString;\n const importPath = importString.importPath.replace(/^\\.\\//, '');\n\n (async () => {\n const { fixable } = await cloudpack.validatePackageOverride.query({ packageName, importPath, issuerUrl });\n setErrorEvents((prev) => ({\n ...prev,\n unsupported: [...prev.unsupported, { packageName, importPath, issuerUrl: issuerUrl, fixable }],\n }));\n })().catch(() => {\n // no-op\n });\n }\n };\n\n const pageErrors = window.__pageErrors;\n\n pageErrors.unregister();\n\n // Append unsupported paths to the list.\n window.addEventListener('error', (event: ErrorEvent) => {\n handleUnsupportedError(event.message, event.filename);\n });\n\n // Handle errors caught before rendering.\n for (const error of pageErrors.uncaughtErrors) {\n handleUnsupportedError(error.message, error.filename);\n }\n\n // Append unsupported paths to the list.\n window.addEventListener('unhandledrejection', (event: PromiseRejectionEvent) => {\n hasMessage(event) && handleUnsupportedError(event.reason.message);\n });\n\n // Handle rejections caught before rendering.\n for (const error of pageErrors.uncaughtRejections) {\n hasMessage(error) && handleUnsupportedError(error.reason.message);\n }\n }, [cloudpack]);\n\n return errorEvents;\n};\n"]}
|
|
@@ -14,7 +14,7 @@ export function StatusDialog({ onClose }) {
|
|
|
14
14
|
setSearchFilter(event.target.value);
|
|
15
15
|
}, []);
|
|
16
16
|
const restartAllTasks = () => {
|
|
17
|
-
cloudpack.restartAllTasks();
|
|
17
|
+
void cloudpack.restartAllTasks.mutate();
|
|
18
18
|
};
|
|
19
19
|
const toggleIssuesOnly = () => setIssuesOnly((value) => !value);
|
|
20
20
|
return (React.createElement(Dialog, { title: "Task results", id: elementIds.statusDialogRoot, draggable: true, onClose: onClose, commands: [
|