@agent-wechat/cli 2.0.0 → 2.2.0

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.
@@ -1,53 +1,53 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
- "version": "2.0.0",
3
+ "version": "2.2.0",
4
4
  "repository": "thisnick/agent-wechat",
5
- "sourceCommit": "bd15f4764495855697921c70c62c5b55dd4a290e",
5
+ "sourceCommit": "7e6ce4844ef8ddbef091c3680765ec474a896aaa",
6
6
  "sourceTreeDirty": false,
7
7
  "assets": [
8
8
  {
9
- "name": "wx-v2.0.0-darwin-arm64",
9
+ "name": "wx-v2.2.0-darwin-arm64",
10
10
  "platform": "darwin",
11
11
  "arch": "arm64",
12
12
  "rustTarget": "aarch64-apple-darwin",
13
- "bytes": 34325136,
14
- "sha256": "0c3d5943e8be849c0071cc72d2f7ca797daacfb3fb9234ed76653f2a8050ca3a"
13
+ "bytes": 34433296,
14
+ "sha256": "8a514850065e4eaabd5116c550f1f84e67679b13cb88bb4b2aa1140cd3e8ccf1"
15
15
  },
16
16
  {
17
- "name": "wx-v2.0.0-linux-arm64-gnu",
17
+ "name": "wx-v2.2.0-linux-arm64-gnu",
18
18
  "platform": "linux",
19
19
  "arch": "arm64",
20
20
  "libc": "gnu",
21
21
  "minimumGlibc": "2.36",
22
22
  "rustTarget": "aarch64-unknown-linux-gnu",
23
- "bytes": 39596600,
24
- "sha256": "73414c7747998fd53b87e694f9cf21b14157f6ac18ea0ef8556131e3752ec814"
23
+ "bytes": 39750768,
24
+ "sha256": "3f3991a2c38b13d5a48831730e70b54566ffe00afe118720b9b3f1098cffed9d"
25
25
  },
26
26
  {
27
- "name": "wx-v2.0.0-linux-x64-gnu",
27
+ "name": "wx-v2.2.0-linux-x64-gnu",
28
28
  "platform": "linux",
29
29
  "arch": "x64",
30
30
  "libc": "gnu",
31
31
  "minimumGlibc": "2.36",
32
32
  "rustTarget": "x86_64-unknown-linux-gnu",
33
- "bytes": 42755752,
34
- "sha256": "b1677d9857f6726bea653d16b1706e16f9b81f95fb7e6ff439f4eebc1e6f7d0f"
33
+ "bytes": 42913048,
34
+ "sha256": "0b59f03ace18358d0606df1eb15e0495016aabe07208da8c45dc785b70de93b3"
35
35
  },
36
36
  {
37
- "name": "wx-v2.0.0-win32-arm64.exe",
37
+ "name": "wx-v2.2.0-win32-arm64.exe",
38
38
  "platform": "win32",
39
39
  "arch": "arm64",
40
40
  "rustTarget": "aarch64-pc-windows-msvc",
41
- "bytes": 31184896,
42
- "sha256": "4f381863ce4351f069bf4a85e4652ba33795b4be1a1662ebdd1b050c88f70332"
41
+ "bytes": 31321088,
42
+ "sha256": "6a2a07c366e64ebd97f34acb9587e09fa4d88946509f1173fff88db34b82bd41"
43
43
  },
44
44
  {
45
- "name": "wx-v2.0.0-win32-x64.exe",
45
+ "name": "wx-v2.2.0-win32-x64.exe",
46
46
  "platform": "win32",
47
47
  "arch": "x64",
48
48
  "rustTarget": "x86_64-pc-windows-msvc",
49
- "bytes": 38068224,
50
- "sha256": "0794fb84ed42f547b71fb044de6b07bda8c68c081578810e6f60a2af020f806d"
49
+ "bytes": 38178304,
50
+ "sha256": "01982b5d84af1f8ce2a20cb3655a2115aca5b045c586efa0ed91fd08c54e337c"
51
51
  }
52
52
  ]
53
53
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agent-wechat/cli",
3
- "version": "2.0.0",
3
+ "version": "2.2.0",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "bin": {
@@ -68,10 +68,10 @@ export async function readManifest(root = packageRoot) {
68
68
  const manifest = JSON.parse(data);
69
69
  return { version: pkg.version, manifest, asset: validateManifest(manifest, pkg.version) };
70
70
  }
71
- export async function fetchBytes(url, maxBytes, { fetchImpl = fetch, allowHttpLoopback = false } = {}) {
71
+ export async function fetchBytes(url, maxBytes, { fetchImpl = fetch, allowHttpLoopback = false, timeoutMs = 30_000 } = {}) {
72
72
  let current = new URL(url);
73
73
  if (current.protocol === 'https:' && process.env.NODE_TLS_REJECT_UNAUTHORIZED === '0') throw new Error('Native downloads refuse disabled TLS verification');
74
- const signal = AbortSignal.timeout(30000);
74
+ const signal = AbortSignal.timeout(timeoutMs);
75
75
  for (let redirects = 0; redirects <= 3; redirects++) {
76
76
  const testLocal = allowHttpLoopback && current.protocol === 'http:' && ['127.0.0.1', '[::1]'].includes(current.hostname);
77
77
  if (current.username || current.password || current.hash || (!testLocal && (current.protocol !== 'https:' || !allowedDownloadHosts.has(current.hostname) || current.port))) {
@@ -138,7 +138,9 @@ export async function installNative({ root = packageRoot, artifactDir, fetchOpti
138
138
  if (!info.isFile() || info.isSymbolicLink() || info.size !== asset.bytes) throw new Error('Invalid offline native release file');
139
139
  bytes = await readFile(source);
140
140
  } else {
141
- bytes = await fetchBytes(downloadUrl ?? releaseUrl(version, asset.name), asset.bytes, fetchOptions);
141
+ bytes = await fetchBytes(downloadUrl ?? releaseUrl(version, asset.name), asset.bytes, {
142
+ ...fetchOptions, timeoutMs: 300_000,
143
+ });
142
144
  }
143
145
  verifyBytes(bytes, asset);
144
146
  const destination = installPath(root, version);