@roamcode.ai/server 1.0.1 → 1.0.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.js CHANGED
@@ -1954,6 +1954,13 @@ function npmInvocation(npmCommand, args, nodePath) {
1954
1954
  return { command: nodePath, args: [npmCommand, ...args] };
1955
1955
  return { command: npmCommand, args };
1956
1956
  }
1957
+ function npmProjectEnv(env = process.env) {
1958
+ const clean = { ...env };
1959
+ for (const key of Object.keys(clean)) {
1960
+ if (key.toLowerCase() === "npm_config_allow_scripts") delete clean[key];
1961
+ }
1962
+ return clean;
1963
+ }
1957
1964
  async function npmIntegrity(npmCommand, packageName, version, nodePath, log) {
1958
1965
  let output = "";
1959
1966
  const invocation = npmInvocation(
@@ -1962,7 +1969,10 @@ async function npmIntegrity(npmCommand, packageName, version, nodePath, log) {
1962
1969
  nodePath
1963
1970
  );
1964
1971
  await new Promise((resolvePromise, reject) => {
1965
- const child = spawn(invocation.command, invocation.args, { stdio: ["ignore", "pipe", "pipe"] });
1972
+ const child = spawn(invocation.command, invocation.args, {
1973
+ env: npmProjectEnv(),
1974
+ stdio: ["ignore", "pipe", "pipe"]
1975
+ });
1966
1976
  child.stdout?.on("data", (chunk) => output += chunk.toString());
1967
1977
  child.stderr?.on("data", (chunk) => log(chunk.toString()));
1968
1978
  child.on("error", reject);
@@ -2098,7 +2108,7 @@ async function installManagedRelease(opts) {
2098
2108
  ],
2099
2109
  nodePath
2100
2110
  );
2101
- await runLogged(invocation.command, invocation.args, { log });
2111
+ await runLogged(invocation.command, invocation.args, { env: npmProjectEnv(), log });
2102
2112
  const installed = versionFromReleaseDir(stage);
2103
2113
  if (installed !== opts.version)
2104
2114
  throw new Error(`installed roamcode ${installed ?? "unknown"}, expected ${opts.version}`);
@@ -2181,7 +2191,7 @@ async function installManagedRelease(opts) {
2181
2191
  }
2182
2192
 
2183
2193
  // src/updater.ts
2184
- var RUNNING_VERSION = "1.0.1" ? "1.0.1".replace(/^v/, "") : packageVersion();
2194
+ var RUNNING_VERSION = "1.0.3" ? "1.0.3".replace(/^v/, "") : packageVersion();
2185
2195
  var RUNNING_BUILD = RUNNING_VERSION;
2186
2196
  var RELEASES_API = "https://api.github.com/repos/burakgon/roamcode/releases?per_page=100";
2187
2197
  var RELEASE_MANIFEST_ASSET = "roamcode-release.json";
@@ -367,6 +367,13 @@ function npmInvocation(npmCommand, args, nodePath) {
367
367
  return { command: nodePath, args: [npmCommand, ...args] };
368
368
  return { command: npmCommand, args };
369
369
  }
370
+ function npmProjectEnv(env = process.env) {
371
+ const clean = { ...env };
372
+ for (const key of Object.keys(clean)) {
373
+ if (key.toLowerCase() === "npm_config_allow_scripts") delete clean[key];
374
+ }
375
+ return clean;
376
+ }
370
377
  async function npmIntegrity(npmCommand, packageName, version, nodePath, log) {
371
378
  let output = "";
372
379
  const invocation = npmInvocation(
@@ -375,7 +382,10 @@ async function npmIntegrity(npmCommand, packageName, version, nodePath, log) {
375
382
  nodePath
376
383
  );
377
384
  await new Promise((resolvePromise, reject) => {
378
- const child = spawn(invocation.command, invocation.args, { stdio: ["ignore", "pipe", "pipe"] });
385
+ const child = spawn(invocation.command, invocation.args, {
386
+ env: npmProjectEnv(),
387
+ stdio: ["ignore", "pipe", "pipe"]
388
+ });
379
389
  child.stdout?.on("data", (chunk) => output += chunk.toString());
380
390
  child.stderr?.on("data", (chunk) => log(chunk.toString()));
381
391
  child.on("error", reject);
@@ -511,7 +521,7 @@ async function installManagedRelease(opts) {
511
521
  ],
512
522
  nodePath
513
523
  );
514
- await runLogged(invocation.command, invocation.args, { log });
524
+ await runLogged(invocation.command, invocation.args, { env: npmProjectEnv(), log });
515
525
  const installed = versionFromReleaseDir(stage);
516
526
  if (installed !== opts.version)
517
527
  throw new Error(`installed roamcode ${installed ?? "unknown"}, expected ${opts.version}`);
package/dist/start.js CHANGED
@@ -765,7 +765,7 @@ function readPreviousVersion(root) {
765
765
  }
766
766
 
767
767
  // src/updater.ts
768
- var RUNNING_VERSION = "1.0.1" ? "1.0.1".replace(/^v/, "") : packageVersion();
768
+ var RUNNING_VERSION = "1.0.3" ? "1.0.3".replace(/^v/, "") : packageVersion();
769
769
  var RELEASES_API = "https://api.github.com/repos/burakgon/roamcode/releases?per_page=100";
770
770
  var RELEASE_MANIFEST_ASSET = "roamcode-release.json";
771
771
  var CHECK_CACHE_MS = 15 * 6e4;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@roamcode.ai/server",
3
- "version": "1.0.1",
3
+ "version": "1.0.3",
4
4
  "description": "Host-native server for RoamCode",
5
5
  "homepage": "https://roamcode.ai",
6
6
  "bugs": "https://github.com/burakgon/roamcode/issues",
@@ -40,7 +40,7 @@
40
40
  "node-pty": "1.1.0",
41
41
  "web-push": "^3.6.7",
42
42
  "zod": "^4.4.3",
43
- "@roamcode.ai/web": "1.0.1"
43
+ "@roamcode.ai/web": "1.0.3"
44
44
  },
45
45
  "devDependencies": {
46
46
  "@types/better-sqlite3": "^7.6.13",