create-astro 5.0.4 → 5.0.5
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/index.js +9 -4
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -289,15 +289,20 @@ import { align, sleep } from "@astrojs/cli-kit/utils";
|
|
|
289
289
|
// src/shell.ts
|
|
290
290
|
import { spawn } from "node:child_process";
|
|
291
291
|
import { text as textFromStream } from "node:stream/consumers";
|
|
292
|
-
var WINDOWS_CMD_SHIMS = /* @__PURE__ */ new Set(["npm", "npx", "pnpm", "pnpx", "yarn", "yarnpkg"
|
|
292
|
+
var WINDOWS_CMD_SHIMS = /* @__PURE__ */ new Set(["npm", "npx", "pnpm", "pnpx", "yarn", "yarnpkg"]);
|
|
293
|
+
var WINDOWS_EXE_SHIMS = /* @__PURE__ */ new Set(["bun", "bunx"]);
|
|
293
294
|
var text = (stream) => stream ? textFromStream(stream).then((t) => t.trimEnd()) : "";
|
|
294
295
|
function resolveCommand(command, flags) {
|
|
295
296
|
if (process.platform !== "win32") return [command, flags];
|
|
296
297
|
if (command.includes("/") || command.includes("\\") || command.includes("."))
|
|
297
298
|
return [command, flags];
|
|
298
|
-
|
|
299
|
+
const cmd = command.toLowerCase();
|
|
300
|
+
if (WINDOWS_CMD_SHIMS.has(cmd)) {
|
|
299
301
|
return ["cmd.exe", ["/d", "/s", "/c", `${command}.cmd`, ...flags]];
|
|
300
302
|
}
|
|
303
|
+
if (WINDOWS_EXE_SHIMS.has(cmd)) {
|
|
304
|
+
return [`${command}.exe`, flags];
|
|
305
|
+
}
|
|
301
306
|
return [command, flags];
|
|
302
307
|
}
|
|
303
308
|
async function shell(command, flags, opts = {}) {
|
|
@@ -465,7 +470,7 @@ function printHelp({
|
|
|
465
470
|
if (headline) {
|
|
466
471
|
message.push(
|
|
467
472
|
linebreak(),
|
|
468
|
-
`${title(commandName)} ${color.green(`v${"5.0.
|
|
473
|
+
`${title(commandName)} ${color.green(`v${"5.0.5"}`)} ${headline}`
|
|
469
474
|
);
|
|
470
475
|
}
|
|
471
476
|
if (usage) {
|
|
@@ -564,7 +569,7 @@ async function getContext(argv) {
|
|
|
564
569
|
packageManager,
|
|
565
570
|
"astro",
|
|
566
571
|
getPackageTag(packageSpecifier),
|
|
567
|
-
"6.1.
|
|
572
|
+
"6.1.2"
|
|
568
573
|
),
|
|
569
574
|
skipHouston,
|
|
570
575
|
fancy,
|