create-astro 4.2.0 โ†’ 4.3.0

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.
Files changed (3) hide show
  1. package/README.md +5 -2
  2. package/dist/index.js +34 -27
  3. package/package.json +4 -1
package/README.md CHANGED
@@ -47,13 +47,16 @@ May be provided in place of prompts
47
47
 
48
48
  | Name | Description |
49
49
  | :--------------------------- | :----------------------------------------------------- |
50
+ | `--help` (`-h`) | Display available flags. |
50
51
  | `--template <name>` | Specify your template. |
51
52
  | `--install` / `--no-install` | Install dependencies (or not). |
52
53
  | `--git` / `--no-git` | Initialize git repo (or not). |
53
- | `--yes` (`-y`) | Skip all prompt by accepting defaults. |
54
- | `--no` (`-n`) | Skip all prompt by declining defaults. |
54
+ | `--yes` (`-y`) | Skip all prompts by accepting defaults. |
55
+ | `--no` (`-n`) | Skip all prompts by declining defaults. |
55
56
  | `--dry-run` | Walk through steps without executing. |
56
57
  | `--skip-houston` | Skip Houston animation. |
58
+ | `--ref` | Specify an Astro branch (default: latest). |
59
+ | `--fancy` | Enable full Unicode support for Windows. |
57
60
  | `--typescript <option>` | TypeScript option: `strict` / `strictest` / `relaxed`. |
58
61
 
59
62
  [examples]: https://github.com/withastro/astro/tree/main/examples
package/dist/index.js CHANGED
@@ -249,24 +249,31 @@ async function spinner(args) {
249
249
  }
250
250
  var title = (text2) => align(label(text2), "end", 7) + " ";
251
251
  var welcome = [
252
- `Let's claim your corner of the internet.`,
253
- `I'll be your assistant today.`,
254
- `Let's build something awesome!`,
255
- `Let's build something great!`,
256
- `Let's build something fast!`,
257
- `Let's build the web we want.`,
258
- `Let's make the web weird!`,
259
- `Let's make the web a better place!`,
260
- `Let's create a new project!`,
261
- `Let's create something unique!`,
262
- `Time to build a new website.`,
263
- `Time to build a faster website.`,
264
- `Time to build a sweet new website.`,
265
- `We're glad to have you on board.`,
266
- `Keeping the internet weird since 2021.`,
267
- `Initiating launch sequence...`,
268
- `Initiating launch sequence... right... now!`,
269
- `Awaiting further instructions.`
252
+ // `Let's claim your corner of the internet.`,
253
+ // `I'll be your assistant today.`,
254
+ // `Let's build something awesome!`,
255
+ // `Let's build something great!`,
256
+ // `Let's build something fast!`,
257
+ // `Let's build the web we want.`,
258
+ // `Let's make the web weird!`,
259
+ // `Let's make the web a better place!`,
260
+ // `Let's create a new project!`,
261
+ // `Let's create something unique!`,
262
+ // `Time to build a new website.`,
263
+ // `Time to build a faster website.`,
264
+ // `Time to build a sweet new website.`,
265
+ // `We're glad to have you on board.`,
266
+ // `Keeping the internet weird since 2021.`,
267
+ // `Initiating launch sequence...`,
268
+ // `Initiating launch sequence... right... now!`,
269
+ // `Awaiting further instructions.`,
270
+ `Booo! Let's scare the interwebs!`,
271
+ `Get ready to haunt the internet with Halloween vibes.`,
272
+ `Harness the power of the web for your frightful ideas.`,
273
+ `It's time to conjure up an online spooktacular masterpiece.`,
274
+ `Prepare for a web of Halloween wonders to be woven.`,
275
+ `Chills and thrills await as you embark on your web journey`,
276
+ `The internet is about to get a whole lot creepier thanks to your new project.`
270
277
  ];
271
278
  var getName = () => new Promise((resolve) => {
272
279
  exec("git config user.name", { encoding: "utf-8" }, (_1, gitName) => {
@@ -384,7 +391,7 @@ function printHelp({
384
391
  if (headline) {
385
392
  message.push(
386
393
  linebreak(),
387
- `${title(commandName)} ${color.green(`v${"4.2.0"}`)} ${headline}`
394
+ `${title(commandName)} ${color.green(`v${"4.3.0"}`)} ${headline}`
388
395
  );
389
396
  }
390
397
  if (usage) {
@@ -470,7 +477,8 @@ async function getContext(argv) {
470
477
  projectName: projectName2,
471
478
  template: template2,
472
479
  ref: ref ?? "latest",
473
- hat: fancy ? random(["\u{1F3A9}", "\u{1F3A9}", "\u{1F3A9}", "\u{1F3A9}", "\u{1F393}", "\u{1F451}", "\u{1F9E2}", "\u{1F366}"]) : void 0,
480
+ hat: random(["\u{1F383}", "\u{1F47B}", "\u{1F56F}\uFE0F"]),
481
+ //fancy ? random(['๐ŸŽฉ', '๐ŸŽฉ', '๐ŸŽฉ', '๐ŸŽฉ', '๐ŸŽ“', '๐Ÿ‘‘', '๐Ÿงข', '๐Ÿฆ']) : undefined,
474
482
  yes,
475
483
  install: install2 ?? (noInstall ? false : void 0),
476
484
  git: git2 ?? (noGit ? false : void 0),
@@ -612,12 +620,12 @@ function help() {
612
620
  ["--template <name>", "Specify your template."],
613
621
  ["--install / --no-install", "Install dependencies (or not)."],
614
622
  ["--git / --no-git", "Initialize git repo (or not)."],
615
- ["--yes (-y)", "Skip all prompt by accepting defaults."],
616
- ["--no (-n)", "Skip all prompt by declining defaults."],
623
+ ["--yes (-y)", "Skip all prompts by accepting defaults."],
624
+ ["--no (-n)", "Skip all prompts by declining defaults."],
617
625
  ["--dry-run", "Walk through steps without executing."],
618
626
  ["--skip-houston", "Skip Houston animation."],
619
627
  ["--ref", "Choose astro branch (default: latest)."],
620
- ["--fancy", "Enable full unicode support for Windows."],
628
+ ["--fancy", "Enable full Unicode support for Windows."],
621
629
  ["--typescript <option>", "TypeScript option: strict | strictest | relaxed."]
622
630
  ]
623
631
  }
@@ -780,10 +788,11 @@ import { downloadTemplate } from "giget";
780
788
  import fs4 from "node:fs";
781
789
  import path5 from "node:path";
782
790
  async function template(ctx) {
783
- if (ctx.yes) {
791
+ if (!ctx.template && ctx.yes)
784
792
  ctx.template = "basics";
793
+ if (ctx.template) {
785
794
  await info("tmpl", `Using ${color6.reset(ctx.template)}${color6.dim(" as project template")}`);
786
- } else if (!ctx.template) {
795
+ } else {
787
796
  const { template: tmpl } = await ctx.prompt({
788
797
  name: "template",
789
798
  type: "select",
@@ -797,8 +806,6 @@ async function template(ctx) {
797
806
  ]
798
807
  });
799
808
  ctx.template = tmpl;
800
- } else {
801
- await info("tmpl", `Using ${color6.reset(ctx.template)}${color6.dim(" as project template")}`);
802
809
  }
803
810
  if (ctx.dryRun) {
804
811
  await info("--dry-run", `Skipping template copying`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-astro",
3
- "version": "4.2.0",
3
+ "version": "4.3.0",
4
4
  "type": "module",
5
5
  "author": "withastro",
6
6
  "license": "MIT",
@@ -39,6 +39,9 @@
39
39
  "engines": {
40
40
  "node": ">=18.14.1"
41
41
  },
42
+ "publishConfig": {
43
+ "provenance": true
44
+ },
42
45
  "scripts": {
43
46
  "build": "astro-scripts build \"src/index.ts\" --bundle && tsc",
44
47
  "build:ci": "astro-scripts build \"src/index.ts\" --bundle",