@ranger1/dx 0.1.60 → 0.1.61
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/cli/commands/deploy.js +15 -1
- package/package.json +1 -1
|
@@ -86,8 +86,22 @@ export async function handleDeploy(cli, args) {
|
|
|
86
86
|
})
|
|
87
87
|
}
|
|
88
88
|
|
|
89
|
-
//
|
|
89
|
+
// 默认仅在缺失/占位时覆盖,避免破坏显式传入的环境变量。
|
|
90
|
+
// 但对 Vercel 部署关键变量,强制使用当前环境层,确保不受 shell 残留值影响。
|
|
91
|
+
const vercelCriticalKeys = new Set([
|
|
92
|
+
'VERCEL_TOKEN',
|
|
93
|
+
'VERCEL_ORG_ID',
|
|
94
|
+
'VERCEL_PROJECT_ID_FRONT',
|
|
95
|
+
'VERCEL_PROJECT_ID_ADMIN',
|
|
96
|
+
'VERCEL_PROJECT_ID_TELEGRAM_BOT',
|
|
97
|
+
])
|
|
98
|
+
|
|
90
99
|
for (const [key, value] of Object.entries(layeredEnv)) {
|
|
100
|
+
if (vercelCriticalKeys.has(key)) {
|
|
101
|
+
process.env[key] = value
|
|
102
|
+
continue
|
|
103
|
+
}
|
|
104
|
+
|
|
91
105
|
const currentValue = process.env[key]
|
|
92
106
|
if (!currentValue || envManager.isPlaceholderEnvValue(currentValue)) {
|
|
93
107
|
process.env[key] = value
|