@ms-cloudpack/overlay 0.5.0 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.json +37 -1
- package/CHANGELOG.md +19 -2
- package/dist/lib/index.js +25 -8
- package/dist/ori-input.json +1 -0
- package/dist/ori-output.json +2 -2
- package/lib/components/CloudpackProvider/createCloudpackClient.js +8 -0
- package/lib/components/CloudpackProvider/createCloudpackClient.js.map +1 -1
- package/lib/components/ErrorDialog/PathError.js +4 -4
- package/lib/components/ErrorDialog/PathError.js.map +1 -1
- package/lib/components/ErrorDialog/useErrorEvents.d.ts +1 -1
- package/lib/components/ErrorDialog/useErrorEvents.js +14 -4
- package/lib/components/ErrorDialog/useErrorEvents.js.map +1 -1
- package/lib/tsdoc-metadata.json +1 -1
- package/package.json +2 -1
package/CHANGELOG.json
CHANGED
|
@@ -2,7 +2,43 @@
|
|
|
2
2
|
"name": "@ms-cloudpack/overlay",
|
|
3
3
|
"entries": [
|
|
4
4
|
{
|
|
5
|
-
"date": "
|
|
5
|
+
"date": "Wed, 19 Oct 2022 08:16:26 GMT",
|
|
6
|
+
"tag": "@ms-cloudpack/overlay_v0.7.0",
|
|
7
|
+
"version": "0.7.0",
|
|
8
|
+
"comments": {
|
|
9
|
+
"minor": [
|
|
10
|
+
{
|
|
11
|
+
"author": "dake.3601@gmail.com",
|
|
12
|
+
"package": "@ms-cloudpack/overlay",
|
|
13
|
+
"commit": "2824621f7a1a5712c0f516bdaedbee0992df0eb9",
|
|
14
|
+
"comment": "If sequence cookie is outdated, reload."
|
|
15
|
+
}
|
|
16
|
+
]
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"date": "Sat, 15 Oct 2022 08:11:31 GMT",
|
|
21
|
+
"tag": "@ms-cloudpack/overlay_v0.6.0",
|
|
22
|
+
"version": "0.6.0",
|
|
23
|
+
"comments": {
|
|
24
|
+
"minor": [
|
|
25
|
+
{
|
|
26
|
+
"author": "dake.3601@gmail.com",
|
|
27
|
+
"package": "@ms-cloudpack/overlay",
|
|
28
|
+
"commit": "962ebd9eb867b159565e221c9f5e800a8eb0ec84",
|
|
29
|
+
"comment": "Using parse import string to parse unsupported path error."
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"author": "beachball",
|
|
33
|
+
"package": "@ms-cloudpack/overlay",
|
|
34
|
+
"comment": "Bump @ms-cloudpack/path-string-parsing to v1.0.0",
|
|
35
|
+
"commit": "cc252ba3e978d70205028b940070eac18e0d33aa"
|
|
36
|
+
}
|
|
37
|
+
]
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"date": "Tue, 11 Oct 2022 08:16:37 GMT",
|
|
6
42
|
"tag": "@ms-cloudpack/overlay_v0.5.0",
|
|
7
43
|
"version": "0.5.0",
|
|
8
44
|
"comments": {
|
package/CHANGELOG.md
CHANGED
|
@@ -1,12 +1,29 @@
|
|
|
1
1
|
# Change Log - @ms-cloudpack/overlay
|
|
2
2
|
|
|
3
|
-
This log was last generated on
|
|
3
|
+
This log was last generated on Wed, 19 Oct 2022 08:16:26 GMT and should not be manually modified.
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
+
## 0.7.0
|
|
8
|
+
|
|
9
|
+
Wed, 19 Oct 2022 08:16:26 GMT
|
|
10
|
+
|
|
11
|
+
### Minor changes
|
|
12
|
+
|
|
13
|
+
- If sequence cookie is outdated, reload. (dake.3601@gmail.com)
|
|
14
|
+
|
|
15
|
+
## 0.6.0
|
|
16
|
+
|
|
17
|
+
Sat, 15 Oct 2022 08:11:31 GMT
|
|
18
|
+
|
|
19
|
+
### Minor changes
|
|
20
|
+
|
|
21
|
+
- Using parse import string to parse unsupported path error. (dake.3601@gmail.com)
|
|
22
|
+
- Bump @ms-cloudpack/path-string-parsing to v1.0.0
|
|
23
|
+
|
|
7
24
|
## 0.5.0
|
|
8
25
|
|
|
9
|
-
Tue, 11 Oct 2022 08:16:
|
|
26
|
+
Tue, 11 Oct 2022 08:16:37 GMT
|
|
10
27
|
|
|
11
28
|
### Minor changes
|
|
12
29
|
|
package/dist/lib/index.js
CHANGED
|
@@ -41,6 +41,7 @@ function createCloudpackClient() {
|
|
|
41
41
|
const enqueuedMessages = [];
|
|
42
42
|
const sessionId = cookies["cloudpack-session-id"];
|
|
43
43
|
const apiUrl = cookies["cloudpack-api-url"];
|
|
44
|
+
const currentSequence = cookies["cloudpack-session-sequence"];
|
|
44
45
|
let socket;
|
|
45
46
|
function openConnection() {
|
|
46
47
|
if (apiUrl && sessionId) {
|
|
@@ -87,6 +88,13 @@ function createCloudpackClient() {
|
|
|
87
88
|
window.location.reload();
|
|
88
89
|
break;
|
|
89
90
|
}
|
|
91
|
+
case "sequence": {
|
|
92
|
+
const { sequence } = response;
|
|
93
|
+
if (Number(sequence) > Number(currentSequence)) {
|
|
94
|
+
window.location.reload();
|
|
95
|
+
}
|
|
96
|
+
break;
|
|
97
|
+
}
|
|
90
98
|
}
|
|
91
99
|
}
|
|
92
100
|
function subscribe(path, callback) {
|
|
@@ -1088,7 +1096,7 @@ import React9 from "react";
|
|
|
1088
1096
|
import { default as cx3 } from "classnames";
|
|
1089
1097
|
function PathError(props) {
|
|
1090
1098
|
const [showContent, setshowContent] = React9.useState(false);
|
|
1091
|
-
const { packageName,
|
|
1099
|
+
const { packageName, importPath } = props;
|
|
1092
1100
|
return /* @__PURE__ */ React9.createElement("div", {
|
|
1093
1101
|
className: TaskStatus_module_default.root
|
|
1094
1102
|
}, /* @__PURE__ */ React9.createElement("div", {
|
|
@@ -1106,7 +1114,7 @@ function PathError(props) {
|
|
|
1106
1114
|
alt: ""
|
|
1107
1115
|
}), /* @__PURE__ */ React9.createElement("div", {
|
|
1108
1116
|
className: TaskStatus_module_default.title
|
|
1109
|
-
}, `${packageName}/${
|
|
1117
|
+
}, `${packageName}/${importPath}`)), showContent && /* @__PURE__ */ React9.createElement("div", {
|
|
1110
1118
|
className: TaskStatus_module_default.content
|
|
1111
1119
|
}, /* @__PURE__ */ React9.createElement("div", {
|
|
1112
1120
|
className: TaskStatus_module_default.title
|
|
@@ -1116,13 +1124,13 @@ function PathError(props) {
|
|
|
1116
1124
|
className: TaskStatus_module_default.name
|
|
1117
1125
|
}, "Problem"), /* @__PURE__ */ React9.createElement("div", {
|
|
1118
1126
|
className: TaskStatus_module_default.value
|
|
1119
|
-
}, `A deep import "${packageName}" was imported, but was unrecognized as an exported entry path.`)), /* @__PURE__ */ React9.createElement("div", {
|
|
1127
|
+
}, `A deep import package name: "${packageName}" was imported, but was unrecognized as an exported entry path: "${importPath}".`)), /* @__PURE__ */ React9.createElement("div", {
|
|
1120
1128
|
className: TaskStatus_module_default.nameValueArea
|
|
1121
1129
|
}, /* @__PURE__ */ React9.createElement("div", {
|
|
1122
1130
|
className: TaskStatus_module_default.name
|
|
1123
1131
|
}, "Solution"), /* @__PURE__ */ React9.createElement("div", {
|
|
1124
1132
|
className: TaskStatus_module_default.value
|
|
1125
|
-
}, `Remove the path from the import in your source. (Import from "${packageName}" rather than "${packageName}/${
|
|
1133
|
+
}, `Remove the path from the import in your source. (Import from "${packageName}" rather than "${packageName}/${importPath}")`))));
|
|
1126
1134
|
}
|
|
1127
1135
|
|
|
1128
1136
|
// src/components/ErrorDialog/ErrorDialog.tsx
|
|
@@ -1148,16 +1156,25 @@ function ErrorDialog({ unsupported }) {
|
|
|
1148
1156
|
|
|
1149
1157
|
// src/components/ErrorDialog/useErrorEvents.ts
|
|
1150
1158
|
import { useEffect as useEffect4, useState as useState5 } from "react";
|
|
1159
|
+
import { parseImportString } from "@ms-cloudpack/path-string-parsing";
|
|
1151
1160
|
var useErrorEvents = () => {
|
|
1152
1161
|
const [events, setEvents] = useState5({ unsupported: [] });
|
|
1153
1162
|
useEffect4(() => {
|
|
1154
1163
|
const handleError = (event) => {
|
|
1155
|
-
const
|
|
1156
|
-
const match = event.message.match(
|
|
1157
|
-
if (match
|
|
1164
|
+
const errorRegex = /[Mm]odule specifier,? ['"](.*?)['"]/;
|
|
1165
|
+
const match = event.message.match(errorRegex);
|
|
1166
|
+
if (match) {
|
|
1167
|
+
const importString = parseImportString(match[1]);
|
|
1168
|
+
const { packageName = "" } = importString;
|
|
1169
|
+
let { importPath = "" } = importString;
|
|
1170
|
+
if (importPath.startsWith("/")) {
|
|
1171
|
+
importPath = importPath.slice(1);
|
|
1172
|
+
} else if (importPath.startsWith("./")) {
|
|
1173
|
+
importPath = importPath.slice(2);
|
|
1174
|
+
}
|
|
1158
1175
|
setEvents((prevEvents) => ({
|
|
1159
1176
|
...prevEvents,
|
|
1160
|
-
unsupported: [...prevEvents.unsupported, { packageName
|
|
1177
|
+
unsupported: [...prevEvents.unsupported, { packageName, importPath }]
|
|
1161
1178
|
}));
|
|
1162
1179
|
}
|
|
1163
1180
|
};
|
package/dist/ori-input.json
CHANGED
package/dist/ori-output.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"type": "buildStatus",
|
|
3
|
-
"buildId": "
|
|
3
|
+
"buildId": "c7c0df0f-8a87-4ae7-a973-1a5903569ae5",
|
|
4
4
|
"buildStatus": "complete",
|
|
5
5
|
"internalError": null,
|
|
6
6
|
"warnings": [],
|
|
@@ -8,5 +8,5 @@
|
|
|
8
8
|
"outputFilePaths": [
|
|
9
9
|
"/home/runner/work/cloudpack/cloudpack/packages/overlay/dist/lib/index.js"
|
|
10
10
|
],
|
|
11
|
-
"metafile": "{\n \"inputs\": {\n \"src/components/CloudpackProvider/getCookies.ts\": {\n \"bytes\": 452,\n \"imports\": []\n },\n \"src/components/CloudpackProvider/createCloudpackClient.ts\": {\n \"bytes\": 3807,\n \"imports\": [\n {\n \"path\": \"src/components/CloudpackProvider/getCookies.ts\",\n \"kind\": \"import-statement\"\n }\n ]\n },\n \"src/components/CloudpackProvider/CloudpackProvider.tsx\": {\n \"bytes\": 552,\n \"imports\": [\n {\n \"path\": \"src/components/CloudpackProvider/createCloudpackClient.ts\",\n \"kind\": \"import-statement\"\n }\n ]\n },\n \"src/hooks/useDraggable.ts\": {\n \"bytes\": 2050,\n \"imports\": []\n },\n \"src/components/StatusBadge/StatusBadge.module.css\": {\n \"bytes\": 3405,\n \"imports\": []\n },\n \"src/components/CloudpackProvider/useStatus.ts\": {\n \"bytes\": 866,\n \"imports\": [\n {\n \"path\": \"src/components/CloudpackProvider/CloudpackProvider.tsx\",\n \"kind\": \"import-statement\"\n }\n ]\n },\n \"src/images/open-16-filled.inline.svg\": {\n \"bytes\": 852,\n \"imports\": []\n },\n \"src/components/StatusBadge/StatusBadge.tsx\": {\n \"bytes\": 2867,\n \"imports\": [\n {\n \"path\": \"src/hooks/useDraggable.ts\",\n \"kind\": \"import-statement\"\n },\n {\n \"path\": \"src/components/StatusBadge/StatusBadge.module.css\",\n \"kind\": \"import-statement\"\n },\n {\n \"path\": \"src/components/CloudpackProvider/useStatus.ts\",\n \"kind\": \"import-statement\"\n },\n {\n \"path\": \"src/images/open-16-filled.inline.svg\",\n \"kind\": \"import-statement\"\n }\n ]\n },\n \"src/components/StatusDialog/TaskResultItem.module.css\": {\n \"bytes\": 2067,\n \"imports\": []\n },\n \"src/components/StatusDialog/TaskResultItem.tsx\": {\n \"bytes\": 1433,\n \"imports\": [\n {\n \"path\": \"src/components/CloudpackProvider/CloudpackProvider.tsx\",\n \"kind\": \"import-statement\"\n },\n {\n \"path\": \"src/components/StatusDialog/TaskResultItem.module.css\",\n \"kind\": \"import-statement\"\n }\n ]\n },\n \"src/components/StatusDialog/TaskStatus.module.css\": {\n \"bytes\": 3922,\n \"imports\": []\n },\n \"src/images/error-24.inline.svg\": {\n \"bytes\": 1024,\n \"imports\": []\n },\n \"src/images/success-24.inline.svg\": {\n \"bytes\": 562,\n \"imports\": []\n },\n \"src/images/chevrondown-20.inline.svg\": {\n \"bytes\": 450,\n \"imports\": []\n },\n \"src/components/StatusDialog/TaskStatus.tsx\": {\n \"bytes\": 4225,\n \"imports\": [\n {\n \"path\": \"src/components/StatusDialog/TaskResultItem.tsx\",\n \"kind\": \"import-statement\"\n },\n {\n \"path\": \"src/components/StatusDialog/TaskStatus.module.css\",\n \"kind\": \"import-statement\"\n },\n {\n \"path\": \"src/images/error-24.inline.svg\",\n \"kind\": \"import-statement\"\n },\n {\n \"path\": \"src/images/success-24.inline.svg\",\n \"kind\": \"import-statement\"\n },\n {\n \"path\": \"src/images/chevrondown-20.inline.svg\",\n \"kind\": \"import-statement\"\n },\n {\n \"path\": \"src/components/CloudpackProvider/CloudpackProvider.tsx\",\n \"kind\": \"import-statement\"\n }\n ]\n },\n \"src/components/CloudpackProvider/useStatusDetails.ts\": {\n \"bytes\": 844,\n \"imports\": [\n {\n \"path\": \"src/components/CloudpackProvider/CloudpackProvider.tsx\",\n \"kind\": \"import-statement\"\n }\n ]\n },\n \"src/components/StatusDialog/TaskList.module.css\": {\n \"bytes\": 615,\n \"imports\": []\n },\n \"src/components/StatusDialog/TaskList.tsx\": {\n \"bytes\": 1015,\n \"imports\": [\n {\n \"path\": \"src/components/StatusDialog/TaskStatus.tsx\",\n \"kind\": \"import-statement\"\n },\n {\n \"path\": \"src/components/CloudpackProvider/useStatusDetails.ts\",\n \"kind\": \"import-statement\"\n },\n {\n \"path\": \"src/components/StatusDialog/TaskList.module.css\",\n \"kind\": \"import-statement\"\n }\n ]\n },\n \"src/components/Button/Button.module.css\": {\n \"bytes\": 2080,\n \"imports\": []\n },\n \"src/components/Button/Button.tsx\": {\n \"bytes\": 360,\n \"imports\": [\n {\n \"path\": \"src/components/Button/Button.module.css\",\n \"kind\": \"import-statement\"\n }\n ]\n },\n \"src/components/Dialog/Dialog.module.css\": {\n \"bytes\": 2454,\n \"imports\": []\n },\n \"src/images/dismiss-16-filled.inline.svg\": {\n \"bytes\": 718,\n \"imports\": []\n },\n \"src/components/Dialog/Dialog.tsx\": {\n \"bytes\": 1525,\n \"imports\": [\n {\n \"path\": \"src/components/Dialog/Dialog.module.css\",\n \"kind\": \"import-statement\"\n },\n {\n \"path\": \"src/hooks/useDraggable.ts\",\n \"kind\": \"import-statement\"\n },\n {\n \"path\": \"src/images/dismiss-16-filled.inline.svg\",\n \"kind\": \"import-statement\"\n }\n ]\n },\n \"src/components/StatusDialog/StatusDialog.tsx\": {\n \"bytes\": 721,\n \"imports\": [\n {\n \"path\": \"src/components/StatusDialog/TaskList.tsx\",\n \"kind\": \"import-statement\"\n },\n {\n \"path\": \"src/components/CloudpackProvider/CloudpackProvider.tsx\",\n \"kind\": \"import-statement\"\n },\n {\n \"path\": \"src/components/Button/Button.tsx\",\n \"kind\": \"import-statement\"\n },\n {\n \"path\": \"src/components/Dialog/Dialog.tsx\",\n \"kind\": \"import-statement\"\n }\n ]\n },\n \"src/components/ErrorDialog/PathError.tsx\": {\n \"bytes\": 1750,\n \"imports\": [\n {\n \"path\": \"src/components/StatusDialog/TaskStatus.module.css\",\n \"kind\": \"import-statement\"\n },\n {\n \"path\": \"src/images/error-24.inline.svg\",\n \"kind\": \"import-statement\"\n },\n {\n \"path\": \"src/images/chevrondown-20.inline.svg\",\n \"kind\": \"import-statement\"\n }\n ]\n },\n \"src/components/ErrorDialog/ErrorDialog.tsx\": {\n \"bytes\": 996,\n \"imports\": [\n {\n \"path\": \"src/components/Button/Button.tsx\",\n \"kind\": \"import-statement\"\n },\n {\n \"path\": \"src/components/CloudpackProvider/CloudpackProvider.tsx\",\n \"kind\": \"import-statement\"\n },\n {\n \"path\": \"src/components/ErrorDialog/PathError.tsx\",\n \"kind\": \"import-statement\"\n },\n {\n \"path\": \"src/components/StatusDialog/TaskList.module.css\",\n \"kind\": \"import-statement\"\n },\n {\n \"path\": \"src/components/Dialog/Dialog.tsx\",\n \"kind\": \"import-statement\"\n }\n ]\n },\n \"src/components/ErrorDialog/useErrorEvents.ts\": {\n \"bytes\": 1265,\n \"imports\": []\n },\n \"src/components/StatusOverlay/StatusOverlay.tsx\": {\n \"bytes\": 1437,\n \"imports\": [\n {\n \"path\": \"src/components/StatusBadge/StatusBadge.tsx\",\n \"kind\": \"import-statement\"\n },\n {\n \"path\": \"src/components/StatusDialog/StatusDialog.tsx\",\n \"kind\": \"import-statement\"\n },\n {\n \"path\": \"src/components/CloudpackProvider/useStatus.ts\",\n \"kind\": \"import-statement\"\n },\n {\n \"path\": \"src/components/ErrorDialog/ErrorDialog.tsx\",\n \"kind\": \"import-statement\"\n },\n {\n \"path\": \"src/components/ErrorDialog/useErrorEvents.ts\",\n \"kind\": \"import-statement\"\n }\n ]\n },\n \"src/components/ThemeProvider/ThemeProvider.module.css\": {\n \"bytes\": 630,\n \"imports\": []\n },\n \"src/components/ThemeProvider/ThemeProvider.tsx\": {\n \"bytes\": 210,\n \"imports\": [\n {\n \"path\": \"src/components/ThemeProvider/ThemeProvider.module.css\",\n \"kind\": \"import-statement\"\n }\n ]\n },\n \"src/index.tsx\": {\n \"bytes\": 532,\n \"imports\": [\n {\n \"path\": \"src/components/CloudpackProvider/CloudpackProvider.tsx\",\n \"kind\": \"import-statement\"\n },\n {\n \"path\": \"src/components/StatusOverlay/StatusOverlay.tsx\",\n \"kind\": \"import-statement\"\n },\n {\n \"path\": \"src/components/ThemeProvider/ThemeProvider.tsx\",\n \"kind\": \"import-statement\"\n }\n ]\n }\n },\n \"outputs\": {\n \"dist/lib/index.js\": {\n \"imports\": [],\n \"exports\": [],\n \"entryPoint\": \"src/index.tsx\",\n \"inputs\": {\n \"src/index.tsx\": {\n \"bytesInOutput\": 360\n },\n \"src/components/CloudpackProvider/CloudpackProvider.tsx\": {\n \"bytesInOutput\": 372\n },\n \"src/components/CloudpackProvider/getCookies.ts\": {\n \"bytesInOutput\": 317\n },\n \"src/components/CloudpackProvider/createCloudpackClient.ts\": {\n \"bytesInOutput\": 2507\n },\n \"src/components/StatusOverlay/StatusOverlay.tsx\": {\n \"bytesInOutput\": 1076\n },\n \"src/components/StatusBadge/StatusBadge.tsx\": {\n \"bytesInOutput\": 3035\n },\n \"src/hooks/useDraggable.ts\": {\n \"bytesInOutput\": 1937\n },\n \"src/components/StatusBadge/StatusBadge.module.css\": {\n \"bytesInOutput\": 3118\n },\n \"src/components/CloudpackProvider/useStatus.ts\": {\n \"bytesInOutput\": 448\n },\n \"src/images/open-16-filled.inline.svg\": {\n \"bytesInOutput\": 1202\n },\n \"src/components/StatusDialog/StatusDialog.tsx\": {\n \"bytesInOutput\": 484\n },\n \"src/components/StatusDialog/TaskList.tsx\": {\n \"bytesInOutput\": 750\n },\n \"src/components/StatusDialog/TaskStatus.tsx\": {\n \"bytesInOutput\": 4697\n },\n \"src/components/StatusDialog/TaskResultItem.tsx\": {\n \"bytesInOutput\": 1421\n },\n \"src/components/StatusDialog/TaskResultItem.module.css\": {\n \"bytesInOutput\": 1881\n },\n \"src/components/StatusDialog/TaskStatus.module.css\": {\n \"bytesInOutput\": 3651\n },\n \"src/images/error-24.inline.svg\": {\n \"bytesInOutput\": 1428\n },\n \"src/images/success-24.inline.svg\": {\n \"bytesInOutput\": 814\n },\n \"src/images/chevrondown-20.inline.svg\": {\n \"bytesInOutput\": 666\n },\n \"src/components/CloudpackProvider/useStatusDetails.ts\": {\n \"bytesInOutput\": 299\n },\n \"src/components/StatusDialog/TaskList.module.css\": {\n \"bytesInOutput\": 541\n },\n \"src/components/Button/Button.tsx\": {\n \"bytesInOutput\": 312\n },\n \"src/components/Button/Button.module.css\": {\n \"bytesInOutput\": 1942\n },\n \"src/components/Dialog/Dialog.tsx\": {\n \"bytesInOutput\": 1399\n },\n \"src/components/Dialog/Dialog.module.css\": {\n \"bytesInOutput\": 2280\n },\n \"src/images/dismiss-16-filled.inline.svg\": {\n \"bytesInOutput\": 1029\n },\n \"src/components/ErrorDialog/ErrorDialog.tsx\": {\n \"bytesInOutput\": 657\n },\n \"src/components/ErrorDialog/PathError.tsx\": {\n \"bytesInOutput\": 2171\n },\n \"src/components/ErrorDialog/useErrorEvents.ts\": {\n \"bytesInOutput\": 866\n },\n \"src/components/ThemeProvider/ThemeProvider.tsx\": {\n \"bytesInOutput\": 191\n },\n \"src/components/ThemeProvider/ThemeProvider.module.css\": {\n \"bytesInOutput\": 561\n }\n },\n \"bytes\": 44489\n }\n }\n}\n"
|
|
11
|
+
"metafile": "{\n \"inputs\": {\n \"src/components/CloudpackProvider/getCookies.ts\": {\n \"bytes\": 452,\n \"imports\": []\n },\n \"src/components/CloudpackProvider/createCloudpackClient.ts\": {\n \"bytes\": 4064,\n \"imports\": [\n {\n \"path\": \"src/components/CloudpackProvider/getCookies.ts\",\n \"kind\": \"import-statement\"\n }\n ]\n },\n \"src/components/CloudpackProvider/CloudpackProvider.tsx\": {\n \"bytes\": 552,\n \"imports\": [\n {\n \"path\": \"src/components/CloudpackProvider/createCloudpackClient.ts\",\n \"kind\": \"import-statement\"\n }\n ]\n },\n \"src/hooks/useDraggable.ts\": {\n \"bytes\": 2050,\n \"imports\": []\n },\n \"src/components/StatusBadge/StatusBadge.module.css\": {\n \"bytes\": 3405,\n \"imports\": []\n },\n \"src/components/CloudpackProvider/useStatus.ts\": {\n \"bytes\": 866,\n \"imports\": [\n {\n \"path\": \"src/components/CloudpackProvider/CloudpackProvider.tsx\",\n \"kind\": \"import-statement\"\n }\n ]\n },\n \"src/images/open-16-filled.inline.svg\": {\n \"bytes\": 852,\n \"imports\": []\n },\n \"src/components/StatusBadge/StatusBadge.tsx\": {\n \"bytes\": 2867,\n \"imports\": [\n {\n \"path\": \"src/hooks/useDraggable.ts\",\n \"kind\": \"import-statement\"\n },\n {\n \"path\": \"src/components/StatusBadge/StatusBadge.module.css\",\n \"kind\": \"import-statement\"\n },\n {\n \"path\": \"src/components/CloudpackProvider/useStatus.ts\",\n \"kind\": \"import-statement\"\n },\n {\n \"path\": \"src/images/open-16-filled.inline.svg\",\n \"kind\": \"import-statement\"\n }\n ]\n },\n \"src/components/StatusDialog/TaskResultItem.module.css\": {\n \"bytes\": 2067,\n \"imports\": []\n },\n \"src/components/StatusDialog/TaskResultItem.tsx\": {\n \"bytes\": 1433,\n \"imports\": [\n {\n \"path\": \"src/components/CloudpackProvider/CloudpackProvider.tsx\",\n \"kind\": \"import-statement\"\n },\n {\n \"path\": \"src/components/StatusDialog/TaskResultItem.module.css\",\n \"kind\": \"import-statement\"\n }\n ]\n },\n \"src/components/StatusDialog/TaskStatus.module.css\": {\n \"bytes\": 3922,\n \"imports\": []\n },\n \"src/images/error-24.inline.svg\": {\n \"bytes\": 1024,\n \"imports\": []\n },\n \"src/images/success-24.inline.svg\": {\n \"bytes\": 562,\n \"imports\": []\n },\n \"src/images/chevrondown-20.inline.svg\": {\n \"bytes\": 450,\n \"imports\": []\n },\n \"src/components/StatusDialog/TaskStatus.tsx\": {\n \"bytes\": 4225,\n \"imports\": [\n {\n \"path\": \"src/components/StatusDialog/TaskResultItem.tsx\",\n \"kind\": \"import-statement\"\n },\n {\n \"path\": \"src/components/StatusDialog/TaskStatus.module.css\",\n \"kind\": \"import-statement\"\n },\n {\n \"path\": \"src/images/error-24.inline.svg\",\n \"kind\": \"import-statement\"\n },\n {\n \"path\": \"src/images/success-24.inline.svg\",\n \"kind\": \"import-statement\"\n },\n {\n \"path\": \"src/images/chevrondown-20.inline.svg\",\n \"kind\": \"import-statement\"\n },\n {\n \"path\": \"src/components/CloudpackProvider/CloudpackProvider.tsx\",\n \"kind\": \"import-statement\"\n }\n ]\n },\n \"src/components/CloudpackProvider/useStatusDetails.ts\": {\n \"bytes\": 844,\n \"imports\": [\n {\n \"path\": \"src/components/CloudpackProvider/CloudpackProvider.tsx\",\n \"kind\": \"import-statement\"\n }\n ]\n },\n \"src/components/StatusDialog/TaskList.module.css\": {\n \"bytes\": 615,\n \"imports\": []\n },\n \"src/components/StatusDialog/TaskList.tsx\": {\n \"bytes\": 1015,\n \"imports\": [\n {\n \"path\": \"src/components/StatusDialog/TaskStatus.tsx\",\n \"kind\": \"import-statement\"\n },\n {\n \"path\": \"src/components/CloudpackProvider/useStatusDetails.ts\",\n \"kind\": \"import-statement\"\n },\n {\n \"path\": \"src/components/StatusDialog/TaskList.module.css\",\n \"kind\": \"import-statement\"\n }\n ]\n },\n \"src/components/Button/Button.module.css\": {\n \"bytes\": 2080,\n \"imports\": []\n },\n \"src/components/Button/Button.tsx\": {\n \"bytes\": 360,\n \"imports\": [\n {\n \"path\": \"src/components/Button/Button.module.css\",\n \"kind\": \"import-statement\"\n }\n ]\n },\n \"src/components/Dialog/Dialog.module.css\": {\n \"bytes\": 2454,\n \"imports\": []\n },\n \"src/images/dismiss-16-filled.inline.svg\": {\n \"bytes\": 718,\n \"imports\": []\n },\n \"src/components/Dialog/Dialog.tsx\": {\n \"bytes\": 1525,\n \"imports\": [\n {\n \"path\": \"src/components/Dialog/Dialog.module.css\",\n \"kind\": \"import-statement\"\n },\n {\n \"path\": \"src/hooks/useDraggable.ts\",\n \"kind\": \"import-statement\"\n },\n {\n \"path\": \"src/images/dismiss-16-filled.inline.svg\",\n \"kind\": \"import-statement\"\n }\n ]\n },\n \"src/components/StatusDialog/StatusDialog.tsx\": {\n \"bytes\": 721,\n \"imports\": [\n {\n \"path\": \"src/components/StatusDialog/TaskList.tsx\",\n \"kind\": \"import-statement\"\n },\n {\n \"path\": \"src/components/CloudpackProvider/CloudpackProvider.tsx\",\n \"kind\": \"import-statement\"\n },\n {\n \"path\": \"src/components/Button/Button.tsx\",\n \"kind\": \"import-statement\"\n },\n {\n \"path\": \"src/components/Dialog/Dialog.tsx\",\n \"kind\": \"import-statement\"\n }\n ]\n },\n \"src/components/ErrorDialog/PathError.tsx\": {\n \"bytes\": 1799,\n \"imports\": [\n {\n \"path\": \"src/components/StatusDialog/TaskStatus.module.css\",\n \"kind\": \"import-statement\"\n },\n {\n \"path\": \"src/images/error-24.inline.svg\",\n \"kind\": \"import-statement\"\n },\n {\n \"path\": \"src/images/chevrondown-20.inline.svg\",\n \"kind\": \"import-statement\"\n }\n ]\n },\n \"src/components/ErrorDialog/ErrorDialog.tsx\": {\n \"bytes\": 996,\n \"imports\": [\n {\n \"path\": \"src/components/Button/Button.tsx\",\n \"kind\": \"import-statement\"\n },\n {\n \"path\": \"src/components/CloudpackProvider/CloudpackProvider.tsx\",\n \"kind\": \"import-statement\"\n },\n {\n \"path\": \"src/components/ErrorDialog/PathError.tsx\",\n \"kind\": \"import-statement\"\n },\n {\n \"path\": \"src/components/StatusDialog/TaskList.module.css\",\n \"kind\": \"import-statement\"\n },\n {\n \"path\": \"src/components/Dialog/Dialog.tsx\",\n \"kind\": \"import-statement\"\n }\n ]\n },\n \"src/components/ErrorDialog/useErrorEvents.ts\": {\n \"bytes\": 1659,\n \"imports\": []\n },\n \"src/components/StatusOverlay/StatusOverlay.tsx\": {\n \"bytes\": 1437,\n \"imports\": [\n {\n \"path\": \"src/components/StatusBadge/StatusBadge.tsx\",\n \"kind\": \"import-statement\"\n },\n {\n \"path\": \"src/components/StatusDialog/StatusDialog.tsx\",\n \"kind\": \"import-statement\"\n },\n {\n \"path\": \"src/components/CloudpackProvider/useStatus.ts\",\n \"kind\": \"import-statement\"\n },\n {\n \"path\": \"src/components/ErrorDialog/ErrorDialog.tsx\",\n \"kind\": \"import-statement\"\n },\n {\n \"path\": \"src/components/ErrorDialog/useErrorEvents.ts\",\n \"kind\": \"import-statement\"\n }\n ]\n },\n \"src/components/ThemeProvider/ThemeProvider.module.css\": {\n \"bytes\": 630,\n \"imports\": []\n },\n \"src/components/ThemeProvider/ThemeProvider.tsx\": {\n \"bytes\": 210,\n \"imports\": [\n {\n \"path\": \"src/components/ThemeProvider/ThemeProvider.module.css\",\n \"kind\": \"import-statement\"\n }\n ]\n },\n \"src/index.tsx\": {\n \"bytes\": 532,\n \"imports\": [\n {\n \"path\": \"src/components/CloudpackProvider/CloudpackProvider.tsx\",\n \"kind\": \"import-statement\"\n },\n {\n \"path\": \"src/components/StatusOverlay/StatusOverlay.tsx\",\n \"kind\": \"import-statement\"\n },\n {\n \"path\": \"src/components/ThemeProvider/ThemeProvider.tsx\",\n \"kind\": \"import-statement\"\n }\n ]\n }\n },\n \"outputs\": {\n \"dist/lib/index.js\": {\n \"imports\": [],\n \"exports\": [],\n \"entryPoint\": \"src/index.tsx\",\n \"inputs\": {\n \"src/index.tsx\": {\n \"bytesInOutput\": 360\n },\n \"src/components/CloudpackProvider/CloudpackProvider.tsx\": {\n \"bytesInOutput\": 372\n },\n \"src/components/CloudpackProvider/getCookies.ts\": {\n \"bytesInOutput\": 317\n },\n \"src/components/CloudpackProvider/createCloudpackClient.ts\": {\n \"bytesInOutput\": 2763\n },\n \"src/components/StatusOverlay/StatusOverlay.tsx\": {\n \"bytesInOutput\": 1076\n },\n \"src/components/StatusBadge/StatusBadge.tsx\": {\n \"bytesInOutput\": 3035\n },\n \"src/hooks/useDraggable.ts\": {\n \"bytesInOutput\": 1937\n },\n \"src/components/StatusBadge/StatusBadge.module.css\": {\n \"bytesInOutput\": 3118\n },\n \"src/components/CloudpackProvider/useStatus.ts\": {\n \"bytesInOutput\": 448\n },\n \"src/images/open-16-filled.inline.svg\": {\n \"bytesInOutput\": 1202\n },\n \"src/components/StatusDialog/StatusDialog.tsx\": {\n \"bytesInOutput\": 484\n },\n \"src/components/StatusDialog/TaskList.tsx\": {\n \"bytesInOutput\": 750\n },\n \"src/components/StatusDialog/TaskStatus.tsx\": {\n \"bytesInOutput\": 4697\n },\n \"src/components/StatusDialog/TaskResultItem.tsx\": {\n \"bytesInOutput\": 1421\n },\n \"src/components/StatusDialog/TaskResultItem.module.css\": {\n \"bytesInOutput\": 1881\n },\n \"src/components/StatusDialog/TaskStatus.module.css\": {\n \"bytesInOutput\": 3651\n },\n \"src/images/error-24.inline.svg\": {\n \"bytesInOutput\": 1428\n },\n \"src/images/success-24.inline.svg\": {\n \"bytesInOutput\": 814\n },\n \"src/images/chevrondown-20.inline.svg\": {\n \"bytesInOutput\": 666\n },\n \"src/components/CloudpackProvider/useStatusDetails.ts\": {\n \"bytesInOutput\": 299\n },\n \"src/components/StatusDialog/TaskList.module.css\": {\n \"bytesInOutput\": 541\n },\n \"src/components/Button/Button.tsx\": {\n \"bytesInOutput\": 312\n },\n \"src/components/Button/Button.module.css\": {\n \"bytesInOutput\": 1942\n },\n \"src/components/Dialog/Dialog.tsx\": {\n \"bytesInOutput\": 1399\n },\n \"src/components/Dialog/Dialog.module.css\": {\n \"bytesInOutput\": 2280\n },\n \"src/images/dismiss-16-filled.inline.svg\": {\n \"bytesInOutput\": 1029\n },\n \"src/components/ErrorDialog/ErrorDialog.tsx\": {\n \"bytesInOutput\": 657\n },\n \"src/components/ErrorDialog/PathError.tsx\": {\n \"bytesInOutput\": 2220\n },\n \"src/components/ErrorDialog/useErrorEvents.ts\": {\n \"bytesInOutput\": 1251\n },\n \"src/components/ThemeProvider/ThemeProvider.tsx\": {\n \"bytesInOutput\": 191\n },\n \"src/components/ThemeProvider/ThemeProvider.module.css\": {\n \"bytesInOutput\": 561\n }\n },\n \"bytes\": 45179\n }\n }\n}\n"
|
|
12
12
|
}
|
|
@@ -23,6 +23,7 @@ export function createCloudpackClient() {
|
|
|
23
23
|
const enqueuedMessages = [];
|
|
24
24
|
const sessionId = cookies['cloudpack-session-id'];
|
|
25
25
|
const apiUrl = cookies['cloudpack-api-url'];
|
|
26
|
+
const currentSequence = cookies['cloudpack-session-sequence'];
|
|
26
27
|
let socket;
|
|
27
28
|
/**
|
|
28
29
|
* Attempts to open the websocket connection.
|
|
@@ -83,6 +84,13 @@ export function createCloudpackClient() {
|
|
|
83
84
|
window.location.reload();
|
|
84
85
|
break;
|
|
85
86
|
}
|
|
87
|
+
case 'sequence': {
|
|
88
|
+
const { sequence } = response;
|
|
89
|
+
if (Number(sequence) > Number(currentSequence)) {
|
|
90
|
+
window.location.reload();
|
|
91
|
+
}
|
|
92
|
+
break;
|
|
93
|
+
}
|
|
86
94
|
}
|
|
87
95
|
}
|
|
88
96
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createCloudpackClient.js","sourceRoot":"","sources":["../../../src/components/CloudpackProvider/createCloudpackClient.ts"],"names":[],"mappings":"AAAA,uDAAuD;AACvD,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IAAI,EAAE,IAAI,EAAE,GAAG,QAAQ,CAAC;gBAEhC,GAAG,CAAC,OAAO,CAAC,IAAgB,EAAE,IAAI,CAAC,CAAC;gBACpC,MAAM;aACP;YAED,KAAK,QAAQ,CAAC,CAAC;gBACb,MAAM,CAAC,QAAQ,CAAC,MAAM,EAAE,CAAC;gBACzB,MAAM;aACP;SACF;IACH,CAAC;IAED;;OAEG;IACH,SAAS,SAAS,CAAC,IAAc,EAAE,QAAgD;QACjF,MAAM,WAAW,GAAG,CAAC,SAAS,EAAE,GAAG,IAAI,CAAC,CAAC;QAEzC,OAAO,GAAG,CAAC,SAAS,CAAC,WAAW,EAAE,QAAQ,CAAC,CAAC;IAC9C,CAAC;IAED,SAAS,QAAQ,CAAC,IAAc;QAC9B,MAAM,WAAW,GAAG,CAAC,SAAS,EAAE,GAAG,IAAI,CAAC,CAAC;QAEzC,OAAO,GAAG,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC;IAClC,CAAC;IAED,SAAS,UAAU,CAAC,OAAiF;QACnG,WAAW,CAAC,YAAY,EAAE,OAAO,CAAC,CAAC;IACrC,CAAC;IAED,SAAS,IAAI,CAAC,OAAoD;QAChE,WAAW,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC/B,CAAC;IAED,SAAS,YAAY;QACnB,WAAW,CAAC,cAAc,EAAE,EAAE,CAAC,CAAC;IAClC,CAAC;IAED,wBAAwB;IACxB,cAAc,EAAE,CAAC;IAEjB,yBAAyB;IACzB,OAAO;QACL,OAAO;QACP,QAAQ;QACR,IAAI;QACJ,UAAU;QACV,SAAS;QACT,YAAY;KACb,CAAC;AACJ,CAAC"}
|
|
1
|
+
{"version":3,"file":"createCloudpackClient.js","sourceRoot":"","sources":["../../../src/components/CloudpackProvider/createCloudpackClient.ts"],"names":[],"mappings":"AAAA,uDAAuD;AACvD,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB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5,20 +5,20 @@ import { default as cx } from 'classnames';
|
|
|
5
5
|
import ChevronDownIcon from '../../images/chevrondown-20.inline.svg';
|
|
6
6
|
export function PathError(props) {
|
|
7
7
|
const [showContent, setshowContent] = React.useState(false);
|
|
8
|
-
const { packageName,
|
|
8
|
+
const { packageName, importPath } = props;
|
|
9
9
|
return (React.createElement("div", { className: styles.root },
|
|
10
10
|
React.createElement("div", { className: cx(styles.header, styles.error) },
|
|
11
11
|
React.createElement("button", { className: styles.expandButton, onClick: () => setshowContent(!showContent) },
|
|
12
12
|
React.createElement("img", { className: cx(styles.expandIcon, !showContent && styles.collapsed), src: ChevronDownIcon, alt: "" })),
|
|
13
13
|
React.createElement("img", { className: styles.errorIcon, src: ErrorIcon, alt: "" }),
|
|
14
|
-
React.createElement("div", { className: styles.title }, `${packageName}/${
|
|
14
|
+
React.createElement("div", { className: styles.title }, `${packageName}/${importPath}`)),
|
|
15
15
|
showContent && (React.createElement("div", { className: styles.content },
|
|
16
16
|
React.createElement("div", { className: styles.title }, "Details"),
|
|
17
17
|
React.createElement("div", { className: styles.nameValueArea },
|
|
18
18
|
React.createElement("div", { className: styles.name }, "Problem"),
|
|
19
|
-
React.createElement("div", { className: styles.value }, `A deep import "${packageName}" was imported, but was unrecognized as an exported entry path.`)),
|
|
19
|
+
React.createElement("div", { className: styles.value }, `A deep import package name: "${packageName}" was imported, but was unrecognized as an exported entry path: "${importPath}".`)),
|
|
20
20
|
React.createElement("div", { className: styles.nameValueArea },
|
|
21
21
|
React.createElement("div", { className: styles.name }, "Solution"),
|
|
22
|
-
React.createElement("div", { className: styles.value }, `Remove the path from the import in your source. (Import from "${packageName}" rather than "${packageName}/${
|
|
22
|
+
React.createElement("div", { className: styles.value }, `Remove the path from the import in your source. (Import from "${packageName}" rather than "${packageName}/${importPath}")`))))));
|
|
23
23
|
}
|
|
24
24
|
//# sourceMappingURL=PathError.js.map
|
|
@@ -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;AAGrE,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,
|
|
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;AAGrE,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,GAAG,KAAK,CAAC;IAE1C,OAAO,CACL,6BAAK,SAAS,EAAE,MAAM,CAAC,IAAI;QACzB,6BAAK,SAAS,EAAE,EAAE,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,KAAK,CAAC;YAC7C,gCAAQ,SAAS,EAAE,MAAM,CAAC,YAAY,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,cAAc,CAAC,CAAC,WAAW,CAAC;gBACjF,6BAAK,SAAS,EAAE,EAAE,CAAC,MAAM,CAAC,UAAU,EAAE,CAAC,WAAW,IAAI,MAAM,CAAC,SAAS,CAAC,EAAE,GAAG,EAAE,eAAe,EAAE,GAAG,EAAC,EAAE,GAAG,CACjG;YACT,6BAAK,SAAS,EAAE,MAAM,CAAC,SAAS,EAAE,GAAG,EAAE,SAAS,EAAE,GAAG,EAAC,EAAE,GAAG;YAC3D,6BAAK,SAAS,EAAE,MAAM,CAAC,KAAK,IAAG,GAAG,WAAW,IAAI,UAAU,EAAE,CAAO,CAChE;QACL,WAAW,IAAI,CACd,6BAAK,SAAS,EAAE,MAAM,CAAC,OAAO;YAC5B,6BAAK,SAAS,EAAE,MAAM,CAAC,KAAK,cAAe;YAE3C,6BAAK,SAAS,EAAE,MAAM,CAAC,aAAa;gBAClC,6BAAK,SAAS,EAAE,MAAM,CAAC,IAAI,cAAe;gBAC1C,6BAAK,SAAS,EAAE,MAAM,CAAC,KAAK,IACzB,gCAAgC,WAAW,oEAAoE,UAAU,IAAI,CAC1H,CACF;YACN,6BAAK,SAAS,EAAE,MAAM,CAAC,aAAa;gBAClC,6BAAK,SAAS,EAAE,MAAM,CAAC,IAAI,eAAgB;gBAC3C,6BAAK,SAAS,EAAE,MAAM,CAAC,KAAK,IACzB,iEAAiE,WAAW,kBAAkB,WAAW,IAAI,UAAU,IAAI,CACxH,CACF,CACF,CACP,CACG,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -1,15 +1,25 @@
|
|
|
1
1
|
import { useEffect, useState } from 'react';
|
|
2
|
+
import { parseImportString } from '@ms-cloudpack/path-string-parsing';
|
|
2
3
|
export const useErrorEvents = () => {
|
|
3
4
|
const [events, setEvents] = useState({ unsupported: [] });
|
|
4
5
|
useEffect(() => {
|
|
5
6
|
// Append unsupported paths to the list.
|
|
6
7
|
const handleError = (event) => {
|
|
7
|
-
const
|
|
8
|
-
const match = event.message.match(
|
|
9
|
-
if (match
|
|
8
|
+
const errorRegex = /[Mm]odule specifier,? ['"](.*?)['"]/;
|
|
9
|
+
const match = event.message.match(errorRegex);
|
|
10
|
+
if (match) {
|
|
11
|
+
const importString = parseImportString(match[1]);
|
|
12
|
+
const { packageName = '' } = importString;
|
|
13
|
+
let { importPath = '' } = importString;
|
|
14
|
+
if (importPath.startsWith('/')) {
|
|
15
|
+
importPath = importPath.slice(1);
|
|
16
|
+
}
|
|
17
|
+
else if (importPath.startsWith('./')) {
|
|
18
|
+
importPath = importPath.slice(2);
|
|
19
|
+
}
|
|
10
20
|
setEvents((prevEvents) => ({
|
|
11
21
|
...prevEvents,
|
|
12
|
-
unsupported: [...prevEvents.unsupported, { packageName
|
|
22
|
+
unsupported: [...prevEvents.unsupported, { packageName, importPath }],
|
|
13
23
|
}));
|
|
14
24
|
}
|
|
15
25
|
};
|
|
@@ -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;
|
|
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;AAatE,MAAM,CAAC,MAAM,cAAc,GAAG,GAAG,EAAE;IACjC,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,QAAQ,CAA2C,EAAE,WAAW,EAAE,EAAE,EAAE,CAAC,CAAC;IAEpG,SAAS,CAAC,GAAG,EAAE;QACb,wCAAwC;QACxC,MAAM,WAAW,GAAG,CAAC,KAAiB,EAAE,EAAE;YACxC,MAAM,UAAU,GAAG,qCAAqC,CAAC;YACzD,MAAM,KAAK,GAAG,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC;YAE9C,IAAI,KAAK,EAAE;gBACT,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
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.0",
|
|
4
4
|
"description": "The Cloudpack overlay ux.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"types": "./lib/index.d.ts",
|
|
@@ -23,6 +23,7 @@
|
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
25
|
"@ms-cloudpack/data-bus": "^0.1.0",
|
|
26
|
+
"@ms-cloudpack/path-string-parsing": "^1.0.0",
|
|
26
27
|
"react": "^17.0.2",
|
|
27
28
|
"react-dom": "^17.0.2",
|
|
28
29
|
"classnames": "^2.3.1"
|