@sparkelf/dsh-plus 0.1.0-rc.40 → 0.1.0-rc.41
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/lib/bin.js +5 -1
- package/lib/types/standalone-profile.js +8 -1
- package/package.json +10 -11
package/lib/bin.js
CHANGED
|
@@ -447,7 +447,11 @@ const MAINLAND_REGISTRY = "https://registry.npmmirror.com";
|
|
|
447
447
|
function registryOrder() {
|
|
448
448
|
const configured = process.env.DSH_PLUS_INSTALL_REGISTRY;
|
|
449
449
|
if (configured !== void 0 && configured !== "") return [configured, MAINLAND_REGISTRY];
|
|
450
|
-
const locale =
|
|
450
|
+
const locale = [
|
|
451
|
+
process.env.LANG,
|
|
452
|
+
process.env.LC_ALL,
|
|
453
|
+
Intl.DateTimeFormat().resolvedOptions().locale
|
|
454
|
+
].filter((value) => value !== void 0).join(" ").toLowerCase();
|
|
451
455
|
return locale.includes("zh") || locale.includes("cn") ? [MAINLAND_REGISTRY, OFFICIAL_REGISTRY] : [OFFICIAL_REGISTRY, MAINLAND_REGISTRY];
|
|
452
456
|
}
|
|
453
457
|
/**
|
|
@@ -243,7 +243,14 @@ export function registryOrder() {
|
|
|
243
243
|
const configured = process.env.DSH_PLUS_INSTALL_REGISTRY;
|
|
244
244
|
if (configured !== undefined && configured !== '')
|
|
245
245
|
return [configured, MAINLAND_REGISTRY];
|
|
246
|
-
|
|
246
|
+
// Intl reports the system locale on every platform. The POSIX variables are empty on
|
|
247
|
+
// Windows, so reading them alone classified every Windows console as non-mainland and
|
|
248
|
+
// reached the origin first — measured in a consumer's log, which showed npmjs failing
|
|
249
|
+
// before the mirror answered.
|
|
250
|
+
const locale = [process.env.LANG, process.env.LC_ALL, Intl.DateTimeFormat().resolvedOptions().locale]
|
|
251
|
+
.filter(value => value !== undefined)
|
|
252
|
+
.join(' ')
|
|
253
|
+
.toLowerCase();
|
|
247
254
|
const mainlandFirst = locale.includes('zh') || locale.includes('cn');
|
|
248
255
|
return mainlandFirst ? [MAINLAND_REGISTRY, OFFICIAL_REGISTRY] : [OFFICIAL_REGISTRY, MAINLAND_REGISTRY];
|
|
249
256
|
}
|
package/package.json
CHANGED
|
@@ -58,16 +58,15 @@
|
|
|
58
58
|
],
|
|
59
59
|
"profile": {
|
|
60
60
|
"allowBuilds": {
|
|
61
|
-
"@deepseek-ai/dsh-subprocess-local
|
|
62
|
-
"@google/genai
|
|
63
|
-
"@officecli/officecli
|
|
64
|
-
"cpu-features
|
|
65
|
-
"koffi
|
|
66
|
-
"node-pty
|
|
67
|
-
"
|
|
68
|
-
"
|
|
69
|
-
"
|
|
70
|
-
"ssh2@1.17.0": true
|
|
61
|
+
"@deepseek-ai/dsh-subprocess-local": true,
|
|
62
|
+
"@google/genai": false,
|
|
63
|
+
"@officecli/officecli": true,
|
|
64
|
+
"cpu-features": false,
|
|
65
|
+
"koffi": true,
|
|
66
|
+
"node-pty": true,
|
|
67
|
+
"oracledb": true,
|
|
68
|
+
"protobufjs": false,
|
|
69
|
+
"ssh2": true
|
|
71
70
|
},
|
|
72
71
|
"bundles": [
|
|
73
72
|
"@deepseek-ai/dsh-base",
|
|
@@ -166,5 +165,5 @@
|
|
|
166
165
|
},
|
|
167
166
|
"type": "module",
|
|
168
167
|
"types": "lib/types/index.d.ts",
|
|
169
|
-
"version": "0.1.0-rc.
|
|
168
|
+
"version": "0.1.0-rc.41"
|
|
170
169
|
}
|