vite-plugin-prism-design 0.1.4 → 0.1.6
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.js +4 -5
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -49,7 +49,7 @@ function prismDesign(options = {}) {
|
|
|
49
49
|
locale
|
|
50
50
|
} = options;
|
|
51
51
|
let agentProcess = null;
|
|
52
|
-
let agentUrl = agentUrlOverride || "";
|
|
52
|
+
let agentUrl = agentUrlOverride || process.env.PRISM_AGENT_URL || "";
|
|
53
53
|
let widgetJs = "";
|
|
54
54
|
let config;
|
|
55
55
|
return {
|
|
@@ -72,7 +72,7 @@ function prismDesign(options = {}) {
|
|
|
72
72
|
res.setHeader("Cache-Control", "no-store");
|
|
73
73
|
res.end(widgetJs);
|
|
74
74
|
});
|
|
75
|
-
if (!
|
|
75
|
+
if (!agentUrl && agentAutoStart) {
|
|
76
76
|
const agentCli = findAgentCli();
|
|
77
77
|
if (agentCli) {
|
|
78
78
|
const projectRoot = config.root || process.cwd();
|
|
@@ -118,9 +118,8 @@ function prismDesign(options = {}) {
|
|
|
118
118
|
config.logger.warn("[PrismDesign] Agent CLI not found. Install prism-design-agent or run agent manually.");
|
|
119
119
|
config.logger.info("[PrismDesign] Widget will show connection form for manual URL input.");
|
|
120
120
|
}
|
|
121
|
-
} else if (
|
|
122
|
-
|
|
123
|
-
config.logger.info(`[PrismDesign] Using agent at ${agentUrl}`);
|
|
121
|
+
} else if (agentUrl) {
|
|
122
|
+
config.logger.info(`[PrismDesign] Using existing agent at ${agentUrl}`);
|
|
124
123
|
}
|
|
125
124
|
server.httpServer?.on("close", () => {
|
|
126
125
|
if (agentProcess) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vite-plugin-prism-design",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.6",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.js",
|
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
"dist"
|
|
10
10
|
],
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"prism-design-
|
|
13
|
-
"prism-design-
|
|
12
|
+
"prism-design-widget": "0.1.4",
|
|
13
|
+
"prism-design-agent": "0.2.3"
|
|
14
14
|
},
|
|
15
15
|
"peerDependencies": {
|
|
16
16
|
"vite": ">=5.0.0"
|