create-astro 3.1.0 → 3.1.1
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 +10 -3
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -16,6 +16,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
16
16
|
return to;
|
|
17
17
|
};
|
|
18
18
|
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
19
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
20
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
21
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
22
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
19
23
|
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
20
24
|
mod
|
|
21
25
|
));
|
|
@@ -134,7 +138,8 @@ var require_arg = __commonJS({
|
|
|
134
138
|
if (isFlag) {
|
|
135
139
|
result[argName] = type(true, argName, result[argName]);
|
|
136
140
|
} else if (argStr === void 0) {
|
|
137
|
-
if (argv.length < i + 2 || argv[i + 1].length > 1 && argv[i + 1][0] === "-" && !(argv[i + 1].match(/^-?\d*(\.(?=\d))?\d*$/) && (type === Number ||
|
|
141
|
+
if (argv.length < i + 2 || argv[i + 1].length > 1 && argv[i + 1][0] === "-" && !(argv[i + 1].match(/^-?\d*(\.(?=\d))?\d*$/) && (type === Number || // eslint-disable-next-line no-undef
|
|
142
|
+
typeof BigInt !== "undefined" && type === BigInt))) {
|
|
138
143
|
const extended = originalArgName === argName ? "" : ` (alias for ${argName})`;
|
|
139
144
|
throw new ArgError(
|
|
140
145
|
`option requires argument: ${originalArgName}${extended}`,
|
|
@@ -314,10 +319,11 @@ var nextSteps = async ({ projectDir, devCmd }) => {
|
|
|
314
319
|
);
|
|
315
320
|
await sleep(100);
|
|
316
321
|
if (projectDir !== "") {
|
|
322
|
+
projectDir = projectDir.includes(" ") ? `"./${projectDir}"` : `./${projectDir}`;
|
|
317
323
|
const enter = [
|
|
318
324
|
`
|
|
319
325
|
${prefix}Enter your project directory using`,
|
|
320
|
-
color.cyan(`cd
|
|
326
|
+
color.cyan(`cd ${projectDir}`, "")
|
|
321
327
|
];
|
|
322
328
|
const len = enter[0].length + stripAnsi(enter[1]).length;
|
|
323
329
|
log(enter.join(len > max ? "\n" + prefix : " "));
|
|
@@ -362,7 +368,7 @@ function printHelp({
|
|
|
362
368
|
if (headline) {
|
|
363
369
|
message.push(
|
|
364
370
|
linebreak(),
|
|
365
|
-
`${title(commandName)} ${color.green(`v${"3.1.
|
|
371
|
+
`${title(commandName)} ${color.green(`v${"3.1.1"}`)} ${headline}`
|
|
366
372
|
);
|
|
367
373
|
}
|
|
368
374
|
if (usage) {
|
|
@@ -999,6 +1005,7 @@ async function main() {
|
|
|
999
1005
|
template,
|
|
1000
1006
|
dependencies,
|
|
1001
1007
|
typescript,
|
|
1008
|
+
// Steps which write to files need to go above git
|
|
1002
1009
|
git,
|
|
1003
1010
|
next
|
|
1004
1011
|
];
|