vite-plugin-prism-design 0.1.5 → 0.1.7

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.
Files changed (2) hide show
  1. package/dist/index.js +4 -5
  2. package/package.json +1 -1
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 (!agentUrlOverride && agentAutoStart) {
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 (agentUrlOverride) {
122
- agentUrl = agentUrlOverride;
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.5",
3
+ "version": "0.1.7",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.js",