@wix/wix-code-diagnostics-plugin 1.1.2 → 1.1.3
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/index.d.ts.map +1 -1
- package/dist/index.mjs +14 -25
- package/package.json +2 -2
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAgB5C,eAAO,MAAM,wBAAwB,QAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAgB5C,eAAO,MAAM,wBAAwB,QAAO,YAqB3C,CAAC;AAEF,YAAY,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAC5C,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC"}
|
package/dist/index.mjs
CHANGED
|
@@ -60,32 +60,21 @@ var mark = (line) => {
|
|
|
60
60
|
} catch {
|
|
61
61
|
}
|
|
62
62
|
};
|
|
63
|
-
var wixCodeDiagnosticsPlugin = () =>
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
mark(`
|
|
70
|
-
console.
|
|
71
|
-
|
|
72
|
-
hasEndpoint: Boolean(endpoint),
|
|
73
|
-
hasToken: Boolean(token)
|
|
74
|
-
});
|
|
75
|
-
if (!endpoint || !token) {
|
|
76
|
-
return;
|
|
77
|
-
}
|
|
78
|
-
try {
|
|
79
|
-
await reportDiagnostic({ endpoint, token, phase: cmd, status: "success" });
|
|
80
|
-
mark("report: ok");
|
|
81
|
-
console.log("[wix-code-diagnostics] reported diagnostic", { cmd });
|
|
82
|
-
} catch (error) {
|
|
83
|
-
mark(`report: error ${error instanceof Error ? error.message : String(error)}`);
|
|
84
|
-
console.error("[wix-code-diagnostics] failed to report diagnostic:", error);
|
|
85
|
-
}
|
|
86
|
-
}
|
|
63
|
+
var wixCodeDiagnosticsPlugin = () => {
|
|
64
|
+
const endpoint = process.env[ENV_ENDPOINT];
|
|
65
|
+
const token = process.env[ENV_TOKEN];
|
|
66
|
+
mark(`factory endpoint=${Boolean(endpoint)} token=${Boolean(token)}`);
|
|
67
|
+
if (endpoint && token) {
|
|
68
|
+
void reportDiagnostic({ endpoint, token, phase: "build", status: "success" }).then(() => mark("report: ok")).catch((error) => {
|
|
69
|
+
mark(`report: error ${error instanceof Error ? error.message : String(error)}`);
|
|
70
|
+
console.error("[wix-code-diagnostics] failed to report diagnostic:", error);
|
|
71
|
+
});
|
|
87
72
|
}
|
|
88
|
-
|
|
73
|
+
return {
|
|
74
|
+
name: "wix-code-diagnostics",
|
|
75
|
+
hooks: {}
|
|
76
|
+
};
|
|
77
|
+
};
|
|
89
78
|
export {
|
|
90
79
|
readAppConfig,
|
|
91
80
|
reportDiagnostic,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wix/wix-code-diagnostics-plugin",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.3",
|
|
4
4
|
"description": "Wix CLI plugin that forwards CLI build/preview/dev diagnostics to the code-project-orchestrator over HTTP",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.mjs",
|
|
@@ -38,5 +38,5 @@
|
|
|
38
38
|
"esbuild": "^0.24.0",
|
|
39
39
|
"typescript": "^5.9.3"
|
|
40
40
|
},
|
|
41
|
-
"falconPackageHash": "
|
|
41
|
+
"falconPackageHash": "1d81f14e2c1e4939f4bd44e7ce9849653d340ca837b95f2c5f036443"
|
|
42
42
|
}
|