viagen 0.2.3 → 0.2.5

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/cli.js CHANGED
@@ -19835,12 +19835,13 @@ ${payload.err.frame || ""}`
19835
19835
  logBuffer.push("warn", `[viagen] Could not checkout ${gitBranch} (dirty working tree?): ${msg}`);
19836
19836
  }
19837
19837
  }
19838
+ const isChildProcess = process.env["__VIAGEN_CHILD"] === "1";
19838
19839
  const authToken = env["VIAGEN_AUTH_TOKEN"];
19839
- if (authToken) {
19840
+ if (authToken && !isChildProcess) {
19840
19841
  debug("server", "auth middleware enabled (VIAGEN_AUTH_TOKEN set)");
19841
19842
  server.middlewares.use(createAuthMiddleware(authToken));
19842
19843
  } else {
19843
- debug("server", "auth middleware DISABLED (no VIAGEN_AUTH_TOKEN)");
19844
+ debug("server", `auth middleware DISABLED (${isChildProcess ? "child process" : "no VIAGEN_AUTH_TOKEN"})`);
19844
19845
  }
19845
19846
  const platformToken = env["VIAGEN_USER_TOKEN"] || env["VIAGEN_AUTH_TOKEN"];
19846
19847
  const platformUrl = env["VIAGEN_PLATFORM_URL"] || "https://app.viagen.dev";
@@ -19957,7 +19958,6 @@ Page URL: ${pageUrl}`);
19957
19958
  let processManager;
19958
19959
  const rawAppCmd = options?.standalone ? env["VIAGEN_APP_COMMAND"] || process.env["VIAGEN_APP_COMMAND"] : void 0;
19959
19960
  const appCommand = rawAppCmd?.replace(/^["']|["']$/g, "") || void 0;
19960
- const isChildProcess = process.env["__VIAGEN_CHILD"] === "1";
19961
19961
  if (isChildProcess) {
19962
19962
  debug("server", "skipping process manager (running as child process)");
19963
19963
  } else if (appCommand) {
package/dist/index.js CHANGED
@@ -111,7 +111,7 @@ function registerHealthRoutes(server, env, errorRef) {
111
111
  );
112
112
  }
113
113
  });
114
- const currentVersion = true ? "0.2.3" : "0.0.0";
114
+ const currentVersion = true ? "0.2.5" : "0.0.0";
115
115
  debug("health", `version resolved: ${currentVersion}`);
116
116
  let versionCache = null;
117
117
  server.middlewares.use("/via/version", (_req, res) => {
@@ -19752,12 +19752,13 @@ ${payload.err.frame || ""}`
19752
19752
  logBuffer.push("warn", `[viagen] Could not checkout ${gitBranch} (dirty working tree?): ${msg}`);
19753
19753
  }
19754
19754
  }
19755
+ const isChildProcess = process.env["__VIAGEN_CHILD"] === "1";
19755
19756
  const authToken = env["VIAGEN_AUTH_TOKEN"];
19756
- if (authToken) {
19757
+ if (authToken && !isChildProcess) {
19757
19758
  debug("server", "auth middleware enabled (VIAGEN_AUTH_TOKEN set)");
19758
19759
  server.middlewares.use(createAuthMiddleware(authToken));
19759
19760
  } else {
19760
- debug("server", "auth middleware DISABLED (no VIAGEN_AUTH_TOKEN)");
19761
+ debug("server", `auth middleware DISABLED (${isChildProcess ? "child process" : "no VIAGEN_AUTH_TOKEN"})`);
19761
19762
  }
19762
19763
  const platformToken = env["VIAGEN_USER_TOKEN"] || env["VIAGEN_AUTH_TOKEN"];
19763
19764
  const platformUrl = env["VIAGEN_PLATFORM_URL"] || "https://app.viagen.dev";
@@ -19874,7 +19875,6 @@ Page URL: ${pageUrl}`);
19874
19875
  let processManager;
19875
19876
  const rawAppCmd = options?.standalone ? env["VIAGEN_APP_COMMAND"] || process.env["VIAGEN_APP_COMMAND"] : void 0;
19876
19877
  const appCommand = rawAppCmd?.replace(/^["']|["']$/g, "") || void 0;
19877
- const isChildProcess = process.env["__VIAGEN_CHILD"] === "1";
19878
19878
  if (isChildProcess) {
19879
19879
  debug("server", "skipping process manager (running as child process)");
19880
19880
  } else if (appCommand) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "viagen",
3
- "version": "0.2.3",
3
+ "version": "0.2.5",
4
4
  "description": "Vite dev server plugin that exposes endpoints for chatting with Claude Code SDK",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",