create-windy 0.3.12 → 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 +14 -16
- 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 = "";
|
|
@@ -8496,7 +8493,7 @@ import { tmpdir } from "os";
|
|
|
8496
8493
|
import { join as join18 } from "path";
|
|
8497
8494
|
|
|
8498
8495
|
// src/update/process.ts
|
|
8499
|
-
import { spawn as
|
|
8496
|
+
import { spawn as spawn2 } from "child_process";
|
|
8500
8497
|
var LOCAL_GIT_ENVIRONMENT_VARIABLES = [
|
|
8501
8498
|
"GIT_ALTERNATE_OBJECT_DIRECTORIES",
|
|
8502
8499
|
"GIT_CONFIG",
|
|
@@ -8516,7 +8513,7 @@ var LOCAL_GIT_ENVIRONMENT_VARIABLES = [
|
|
|
8516
8513
|
];
|
|
8517
8514
|
async function captureProcess(command, args, cwd, inherit = false) {
|
|
8518
8515
|
return await new Promise((resolve6, reject) => {
|
|
8519
|
-
const child =
|
|
8516
|
+
const child = spawn2(command, args, {
|
|
8520
8517
|
cwd,
|
|
8521
8518
|
env: withoutParentGitRepository(process.env),
|
|
8522
8519
|
stdio: inherit ? "inherit" : ["ignore", "pipe", "pipe"]
|
|
@@ -9101,7 +9098,8 @@ var recipes = [
|
|
|
9101
9098
|
{ id: "starter-0.3.8-to-0.3.9", from: "0.3.8", to: "0.3.9" },
|
|
9102
9099
|
{ id: "starter-0.3.9-to-0.3.10", from: "0.3.9", to: "0.3.10" },
|
|
9103
9100
|
{ id: "starter-0.3.10-to-0.3.11", from: "0.3.10", to: "0.3.11" },
|
|
9104
|
-
{ id: "starter-0.3.11-to-0.3.12", from: "0.3.11", to: "0.3.12" }
|
|
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" }
|
|
9105
9103
|
];
|
|
9106
9104
|
function resolveRecipeChain(sourceVersion, targetVersion) {
|
|
9107
9105
|
if (sourceVersion === targetVersion)
|
package/package.json
CHANGED