pantheon-cli 0.2.68 → 0.2.70
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/pantheon.mjs +14 -8
- package/package.json +1 -1
package/dist/pantheon.mjs
CHANGED
|
@@ -43179,16 +43179,22 @@ function loadMachineConfig() {
|
|
|
43179
43179
|
const configPath = join4(dir, "config.json");
|
|
43180
43180
|
const credPath = join4(dir, "credentials.json");
|
|
43181
43181
|
if (!existsSync4(configPath) || !existsSync4(credPath)) return null;
|
|
43182
|
-
|
|
43183
|
-
|
|
43184
|
-
|
|
43185
|
-
|
|
43182
|
+
try {
|
|
43183
|
+
const parsed = JSON.parse(readFileSync4(configPath, "utf8"));
|
|
43184
|
+
const config2 = normalizeMachineConfig(parsed);
|
|
43185
|
+
if (JSON.stringify(parsed) !== JSON.stringify(config2)) {
|
|
43186
|
+
writeFileSync3(configPath, `${JSON.stringify(config2, null, 2)}
|
|
43186
43187
|
`);
|
|
43188
|
+
}
|
|
43189
|
+
return {
|
|
43190
|
+
config: migrateApiUrl(config2, configPath),
|
|
43191
|
+
credentials: JSON.parse(
|
|
43192
|
+
readFileSync4(credPath, "utf8")
|
|
43193
|
+
)
|
|
43194
|
+
};
|
|
43195
|
+
} catch {
|
|
43196
|
+
return null;
|
|
43187
43197
|
}
|
|
43188
|
-
return {
|
|
43189
|
-
config: migrateApiUrl(config2, configPath),
|
|
43190
|
-
credentials: JSON.parse(readFileSync4(credPath, "utf8"))
|
|
43191
|
-
};
|
|
43192
43198
|
}
|
|
43193
43199
|
function saveMachineConfig(config2, credentials) {
|
|
43194
43200
|
const dir = configDir();
|
package/package.json
CHANGED