create-astro 3.1.10 → 3.1.11

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 (2) hide show
  1. package/dist/index.js +6 -7
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -175,7 +175,7 @@ import os from "node:os";
175
175
  import detectPackageManager2 from "which-pm-runs";
176
176
 
177
177
  // src/messages.ts
178
- import { color, label, say as houston, spinner as load } from "@astrojs/cli-kit";
178
+ import { color, say as houston, label, spinner as load } from "@astrojs/cli-kit";
179
179
  import { align, sleep } from "@astrojs/cli-kit/utils";
180
180
  import { execa } from "execa";
181
181
  import fetch from "node-fetch-native";
@@ -261,7 +261,8 @@ var getVersion = () => new Promise(async (resolve) => {
261
261
  return resolve(v);
262
262
  let registry = await getRegistry();
263
263
  const { version } = await fetch(`${registry}/astro/latest`, { redirect: "follow" }).then(
264
- (res) => res.json()
264
+ (res) => res.json(),
265
+ () => ({ version: "" })
265
266
  );
266
267
  v = version;
267
268
  resolve(version);
@@ -269,9 +270,7 @@ var getVersion = () => new Promise(async (resolve) => {
269
270
  var log = (message) => stdout.write(message + "\n");
270
271
  var banner = async (version) => log(
271
272
  `
272
- ${label("astro", color.bgGreen, color.black)} ${color.green(
273
- color.bold(`v${version}`)
274
- )} ${color.bold("Launch sequence initiated.")}`
273
+ ${label("astro", color.bgGreen, color.black)} ${version ? color.green(color.bold(`v${version}`)) : ""} ${color.bold("Launch sequence initiated.")}`
275
274
  );
276
275
  var info = async (prefix, text) => {
277
276
  await sleep(100);
@@ -356,7 +355,7 @@ function printHelp({
356
355
  if (headline) {
357
356
  message.push(
358
357
  linebreak(),
359
- `${title(commandName)} ${color.green(`v${"3.1.10"}`)} ${headline}`
358
+ `${title(commandName)} ${color.green(`v${"3.1.11"}`)} ${headline}`
360
359
  );
361
360
  }
362
361
  if (usage) {
@@ -596,7 +595,7 @@ async function intro(ctx) {
596
595
  "Welcome",
597
596
  "to",
598
597
  label2("astro", color4.bgGreen, color4.black),
599
- color4.green(`v${ctx.version}`) + ",",
598
+ (ctx.version ? color4.green(`v${ctx.version}`) : "") + ",",
600
599
  `${ctx.username}!`
601
600
  ],
602
601
  random(welcome)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-astro",
3
- "version": "3.1.10",
3
+ "version": "3.1.11",
4
4
  "type": "module",
5
5
  "author": "withastro",
6
6
  "license": "MIT",