permachine 0.6.0 → 0.7.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.
- package/dist/cli.js +9 -2
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -6252,6 +6252,9 @@ function createBaseOnlyMergeOperation(baseFile, cwd) {
|
|
|
6252
6252
|
outputName = fullBasename.replace(".base", "").replace(".{base}", "");
|
|
6253
6253
|
} else {
|
|
6254
6254
|
outputName = fullBasename.replace(".base", "").replace(".{base}", "");
|
|
6255
|
+
if (outputName.endsWith(".jsonc")) {
|
|
6256
|
+
outputName = outputName.replace(/\.jsonc$/, ".json");
|
|
6257
|
+
}
|
|
6255
6258
|
}
|
|
6256
6259
|
const basePath = path3.join(cwd, baseFile);
|
|
6257
6260
|
const outputPath = path3.join(cwd, dir, outputName);
|
|
@@ -6274,11 +6277,14 @@ function createMergeOperation(machineFile, machineName, cwd) {
|
|
|
6274
6277
|
let outputName;
|
|
6275
6278
|
if (hasFilters(fullBasename)) {
|
|
6276
6279
|
outputName = getBaseFilename(fullBasename);
|
|
6280
|
+
if (type === "json" && outputName.endsWith(".jsonc")) {
|
|
6281
|
+
outputName = outputName.replace(/\.jsonc$/, ".json");
|
|
6282
|
+
}
|
|
6277
6283
|
if (type === "env") {
|
|
6278
6284
|
const nameWithoutExt = outputName;
|
|
6279
6285
|
baseName = nameWithoutExt + ".base";
|
|
6280
6286
|
} else {
|
|
6281
|
-
const nameWithoutExt = outputName.replace(
|
|
6287
|
+
const nameWithoutExt = outputName.replace(/\.(json|jsonc)$/, "");
|
|
6282
6288
|
baseName = nameWithoutExt + ".base" + ext2;
|
|
6283
6289
|
}
|
|
6284
6290
|
} else {
|
|
@@ -6290,7 +6296,8 @@ function createMergeOperation(machineFile, machineName, cwd) {
|
|
|
6290
6296
|
outputName = withoutMachine;
|
|
6291
6297
|
if (type !== "env") {
|
|
6292
6298
|
baseName = baseName + ext2;
|
|
6293
|
-
|
|
6299
|
+
const outputExt = ext2 === ".jsonc" ? ".json" : ext2;
|
|
6300
|
+
outputName = outputName + outputExt;
|
|
6294
6301
|
}
|
|
6295
6302
|
} else {
|
|
6296
6303
|
return null;
|