amalgm 0.1.81 → 0.1.82

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/lib/updater.js +9 -0
  2. package/package.json +1 -1
package/lib/updater.js CHANGED
@@ -1,6 +1,8 @@
1
1
  'use strict';
2
2
 
3
3
  const { spawn } = require('child_process');
4
+ const os = require('os');
5
+ const path = require('path');
4
6
  const {
5
7
  AMALGM_RUNTIME_LABEL,
6
8
  } = require('./paths');
@@ -11,6 +13,7 @@ const {
11
13
  const PACKAGE_VERSION = require('../package.json').version;
12
14
  const DEFAULT_VIEW_TIMEOUT_MS = 15_000;
13
15
  const DEFAULT_INSTALL_TIMEOUT_MS = 10 * 60_000;
16
+ const DEFAULT_NPM_UPDATE_CACHE = path.join(os.tmpdir(), 'amalgm-npm-cache');
14
17
 
15
18
  function parseSemver(value) {
16
19
  const raw = String(value || '').trim().replace(/^v/, '');
@@ -68,10 +71,16 @@ function npmInstallTag(options = {}) {
68
71
  }
69
72
 
70
73
  function npmEnv(env = process.env) {
74
+ const safeCache = env.npm_config_cache
75
+ || env.NPM_CONFIG_CACHE
76
+ || env.AMALGM_NPM_UPDATE_CACHE
77
+ || DEFAULT_NPM_UPDATE_CACHE;
71
78
  return {
72
79
  ...env,
73
80
  npm_config_audit: 'false',
74
81
  npm_config_fund: 'false',
82
+ npm_config_cache: safeCache,
83
+ npm_config_prefer_online: 'true',
75
84
  };
76
85
  }
77
86
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "amalgm",
3
- "version": "0.1.81",
3
+ "version": "0.1.82",
4
4
  "description": "Amalgm local computer runtime: login, MCP, chat, events, previews, and tunnels.",
5
5
  "license": "UNLICENSED",
6
6
  "private": false,