create-windy 0.3.11 → 0.3.13
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 +22 -18
- package/package.json +1 -1
- package/template/.windy-template.json +2 -2
package/dist/cli.js
CHANGED
|
@@ -853,8 +853,6 @@ var helpText = `create-windy <\u9879\u76EE\u540D> [\u9009\u9879]
|
|
|
853
853
|
import { mkdir as mkdir4, readdir as readdir6, rm as rm4 } from "fs/promises";
|
|
854
854
|
|
|
855
855
|
// src/commands.ts
|
|
856
|
-
import { spawn } from "child_process";
|
|
857
|
-
|
|
858
856
|
class CommandExecutionError extends Error {
|
|
859
857
|
constructor(command, args, exitCode, signal) {
|
|
860
858
|
const outcome = signal ? `\u4FE1\u53F7 ${signal}` : `\u9000\u51FA\u7801 ${exitCode ?? "\u672A\u77E5"}`;
|
|
@@ -863,16 +861,15 @@ class CommandExecutionError extends Error {
|
|
|
863
861
|
}
|
|
864
862
|
}
|
|
865
863
|
async function runCommand(command, args, cwd) {
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
resolve2();
|
|
872
|
-
else
|
|
873
|
-
reject(new CommandExecutionError(command, args, code, signal));
|
|
874
|
-
});
|
|
864
|
+
const child = Bun.spawn([command, ...args], {
|
|
865
|
+
cwd,
|
|
866
|
+
stderr: "inherit",
|
|
867
|
+
stdin: "inherit",
|
|
868
|
+
stdout: "inherit"
|
|
875
869
|
});
|
|
870
|
+
const exitCode = await child.exited;
|
|
871
|
+
if (exitCode !== 0)
|
|
872
|
+
throw new CommandExecutionError(command, args, exitCode, null);
|
|
876
873
|
}
|
|
877
874
|
async function installAndVerify(targetDirectory, install, verify, includeOxc, execute = runCommand) {
|
|
878
875
|
if (install || verify)
|
|
@@ -887,7 +884,7 @@ async function installAndVerify(targetDirectory, install, verify, includeOxc, ex
|
|
|
887
884
|
}
|
|
888
885
|
|
|
889
886
|
// src/bun-runtime.ts
|
|
890
|
-
import { spawn
|
|
887
|
+
import { spawn } from "child_process";
|
|
891
888
|
var minimumBunVersion = "1.3.14";
|
|
892
889
|
async function assertSupportedBun(readVersion = readBunVersion) {
|
|
893
890
|
let version;
|
|
@@ -907,7 +904,7 @@ async function assertSupportedBun(readVersion = readBunVersion) {
|
|
|
907
904
|
}
|
|
908
905
|
async function readBunVersion() {
|
|
909
906
|
return await new Promise((resolve2, reject) => {
|
|
910
|
-
const child =
|
|
907
|
+
const child = spawn("bun", ["--version"], {
|
|
911
908
|
stdio: ["ignore", "pipe", "pipe"]
|
|
912
909
|
});
|
|
913
910
|
let stdout = "";
|
|
@@ -7369,8 +7366,13 @@ async function unresolvedPreservePaths(root, backupPath, state) {
|
|
|
7369
7366
|
unresolved.push(path2);
|
|
7370
7367
|
continue;
|
|
7371
7368
|
}
|
|
7372
|
-
const
|
|
7373
|
-
|
|
7369
|
+
const backup = entry.existed ? await backupExpectation(root, backupPath, entry.path, entry.mode) : { kind: "missing" };
|
|
7370
|
+
const actualHash = await hashSafePath(root, path2);
|
|
7371
|
+
const actualMode = await safeFileMode(root, path2);
|
|
7372
|
+
const mutation = state.mutationEvidence?.find((evidence) => evidence.path === path2);
|
|
7373
|
+
const matchesBackup = matchesExpected(actualHash, actualMode, backup, entry.mode);
|
|
7374
|
+
const matchesOutcome = Boolean(mutation?.linearized && mutation.outcome && matchesExpected(actualHash, actualMode, mutation.outcome, mutation.outcomeMode));
|
|
7375
|
+
if (!matchesBackup && !matchesOutcome) {
|
|
7374
7376
|
unresolved.push(path2);
|
|
7375
7377
|
}
|
|
7376
7378
|
}
|
|
@@ -8491,7 +8493,7 @@ import { tmpdir } from "os";
|
|
|
8491
8493
|
import { join as join18 } from "path";
|
|
8492
8494
|
|
|
8493
8495
|
// src/update/process.ts
|
|
8494
|
-
import { spawn as
|
|
8496
|
+
import { spawn as spawn2 } from "child_process";
|
|
8495
8497
|
var LOCAL_GIT_ENVIRONMENT_VARIABLES = [
|
|
8496
8498
|
"GIT_ALTERNATE_OBJECT_DIRECTORIES",
|
|
8497
8499
|
"GIT_CONFIG",
|
|
@@ -8511,7 +8513,7 @@ var LOCAL_GIT_ENVIRONMENT_VARIABLES = [
|
|
|
8511
8513
|
];
|
|
8512
8514
|
async function captureProcess(command, args, cwd, inherit = false) {
|
|
8513
8515
|
return await new Promise((resolve6, reject) => {
|
|
8514
|
-
const child =
|
|
8516
|
+
const child = spawn2(command, args, {
|
|
8515
8517
|
cwd,
|
|
8516
8518
|
env: withoutParentGitRepository(process.env),
|
|
8517
8519
|
stdio: inherit ? "inherit" : ["ignore", "pipe", "pipe"]
|
|
@@ -9095,7 +9097,9 @@ var recipes = [
|
|
|
9095
9097
|
{ id: "starter-0.3.7-to-0.3.8", from: "0.3.7", to: "0.3.8" },
|
|
9096
9098
|
{ id: "starter-0.3.8-to-0.3.9", from: "0.3.8", to: "0.3.9" },
|
|
9097
9099
|
{ id: "starter-0.3.9-to-0.3.10", from: "0.3.9", to: "0.3.10" },
|
|
9098
|
-
{ id: "starter-0.3.10-to-0.3.11", from: "0.3.10", to: "0.3.11" }
|
|
9100
|
+
{ id: "starter-0.3.10-to-0.3.11", from: "0.3.10", to: "0.3.11" },
|
|
9101
|
+
{ id: "starter-0.3.11-to-0.3.12", from: "0.3.11", to: "0.3.12" },
|
|
9102
|
+
{ id: "starter-0.3.12-to-0.3.13", from: "0.3.12", to: "0.3.13" }
|
|
9099
9103
|
];
|
|
9100
9104
|
function resolveRecipeChain(sourceVersion, targetVersion) {
|
|
9101
9105
|
if (sourceVersion === targetVersion)
|
package/package.json
CHANGED