create-disposabl-app 0.20.5 → 0.20.6
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/disposabl.js +1 -1
- package/dist/index.js +20 -4
- package/package.json +1 -1
package/dist/disposabl.js
CHANGED
package/dist/index.js
CHANGED
|
@@ -1563,7 +1563,7 @@ import { fileURLToPath as fileURLToPath2 } from "node:url";
|
|
|
1563
1563
|
import { Command, CommanderError } from "commander";
|
|
1564
1564
|
import * as p2 from "@clack/prompts";
|
|
1565
1565
|
// package.json
|
|
1566
|
-
var version = "0.20.
|
|
1566
|
+
var version = "0.20.6";
|
|
1567
1567
|
|
|
1568
1568
|
// ../cli/telemetry.ts
|
|
1569
1569
|
var import_proper_lockfile2 = __toESM(require_proper_lockfile(), 1);
|
|
@@ -9523,6 +9523,22 @@ async function safeRead(root, path) {
|
|
|
9523
9523
|
}
|
|
9524
9524
|
return readFile5(target);
|
|
9525
9525
|
}
|
|
9526
|
+
function sameStarterFile(path, left, right) {
|
|
9527
|
+
if (left.equals(right))
|
|
9528
|
+
return true;
|
|
9529
|
+
if (path !== "turbo.json")
|
|
9530
|
+
return false;
|
|
9531
|
+
const tokens = (value) => {
|
|
9532
|
+
const text = value.toString("utf8");
|
|
9533
|
+
JSON.parse(text);
|
|
9534
|
+
return text.replace(/"(?:\\.|[^"\\])*"|[\x20\t\r\n]+/g, (part) => part.startsWith('"') ? part : "");
|
|
9535
|
+
};
|
|
9536
|
+
try {
|
|
9537
|
+
return tokens(left) === tokens(right);
|
|
9538
|
+
} catch {
|
|
9539
|
+
return false;
|
|
9540
|
+
}
|
|
9541
|
+
}
|
|
9526
9542
|
async function reconfigureApp(template, directory, version, options) {
|
|
9527
9543
|
const configPath = "disposabl.json";
|
|
9528
9544
|
const raw = await safeRead(directory, configPath);
|
|
@@ -9612,17 +9628,17 @@ async function reconfigureApp(template, directory, version, options) {
|
|
|
9612
9628
|
return;
|
|
9613
9629
|
throw error;
|
|
9614
9630
|
});
|
|
9615
|
-
if (prior
|
|
9631
|
+
if (prior && sameStarterFile(path, prior, next))
|
|
9616
9632
|
continue;
|
|
9617
9633
|
if (!current) {
|
|
9618
9634
|
if (prior)
|
|
9619
9635
|
throw new Error(`Cannot reconfigure: ${path} was removed or customized. Restore the matching starter file and retry.`);
|
|
9620
9636
|
changes.push({ path, content: next });
|
|
9621
|
-
} else if (current
|
|
9637
|
+
} else if (sameStarterFile(path, current, next))
|
|
9622
9638
|
continue;
|
|
9623
9639
|
else if (!prior)
|
|
9624
9640
|
continue;
|
|
9625
|
-
else if (current
|
|
9641
|
+
else if (sameStarterFile(path, current, prior))
|
|
9626
9642
|
changes.push({ path, content: next });
|
|
9627
9643
|
else {
|
|
9628
9644
|
const merged = basename2(path) === "package.json" ? mergePurchasesManifest(prior, next, current) : undefined;
|