create-astro 3.0.4 → 3.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.
Files changed (2) hide show
  1. package/dist/index.js +8 -6
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -362,7 +362,7 @@ function printHelp({
362
362
  if (headline) {
363
363
  message.push(
364
364
  linebreak(),
365
- `${title(commandName)} ${color.green(`v${"3.0.4"}`)} ${headline}`
365
+ `${title(commandName)} ${color.green(`v${"3.0.5"}`)} ${headline}`
366
366
  );
367
367
  }
368
368
  if (usage) {
@@ -753,17 +753,19 @@ async function template(ctx) {
753
753
  }
754
754
  var FILES_TO_REMOVE = ["sandbox.config.json", "CHANGELOG.md"];
755
755
  var FILES_TO_UPDATE = {
756
- "package.json": (file, overrides) => fs3.promises.readFile(file, "utf-8").then(
757
- (value) => fs3.promises.writeFile(
756
+ "package.json": (file, overrides) => fs3.promises.readFile(file, "utf-8").then((value) => {
757
+ var _a;
758
+ const indent = ((_a = /(^\s+)/m.exec(value)) == null ? void 0 : _a[1]) ?? " ";
759
+ fs3.promises.writeFile(
758
760
  file,
759
761
  JSON.stringify(
760
762
  Object.assign(JSON.parse(value), Object.assign(overrides, { private: void 0 })),
761
763
  null,
762
- " "
764
+ indent
763
765
  ),
764
766
  "utf-8"
765
- )
766
- )
767
+ );
768
+ })
767
769
  };
768
770
  async function copyTemplate(tmpl, ctx) {
769
771
  const ref = ctx.ref || "latest";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-astro",
3
- "version": "3.0.4",
3
+ "version": "3.0.5",
4
4
  "type": "module",
5
5
  "author": "withastro",
6
6
  "license": "MIT",