@batijs/cli 0.0.69 → 0.0.70

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 (20) hide show
  1. package/dist/boilerplates/@batijs/edgedb/files/$package.json.js +1 -1
  2. package/dist/boilerplates/@batijs/edgedb/{package-LS4N573U.js → package-562PRDA5.js} +1 -1
  3. package/dist/boilerplates/@batijs/express/files/$package.json.js +1 -1
  4. package/dist/boilerplates/@batijs/express/{package-HUSTD3AA.js → package-Y3HBW6TZ.js} +3 -3
  5. package/dist/boilerplates/@batijs/hattip/files/$package.json.js +1 -1
  6. package/dist/boilerplates/@batijs/hattip/{package-H54ANVLS.js → package-OHT2RKHN.js} +3 -3
  7. package/dist/boilerplates/@batijs/prisma/files/$package.json.js +1 -1
  8. package/dist/boilerplates/@batijs/prisma/{package-ML7OLGIV.js → package-C3YKOB7I.js} +1 -1
  9. package/dist/boilerplates/@batijs/react/files/$package.json.js +1 -1
  10. package/dist/boilerplates/@batijs/react/{package-YA6MIN7J.js → package-7OPRREQL.js} +1 -1
  11. package/dist/boilerplates/@batijs/solid/files/$package.json.js +1 -1
  12. package/dist/boilerplates/@batijs/solid/{package-2QJ7AU5D.js → package-XS4RS3KO.js} +1 -1
  13. package/dist/boilerplates/@batijs/tailwindcss/files/$package.json.js +1 -1
  14. package/dist/boilerplates/@batijs/tailwindcss/{package-O545P6XC.js → package-TCXHQCAL.js} +1 -1
  15. package/dist/boilerplates/@batijs/telefunc/files/$package.json.js +1 -1
  16. package/dist/boilerplates/@batijs/telefunc/{package-WTKGDPTF.js → package-VO4UYQPG.js} +2 -2
  17. package/dist/boilerplates/@batijs/vue/files/$package.json.js +1 -1
  18. package/dist/boilerplates/@batijs/vue/{package-EV6NMSSH.js → package-5EXMRHUV.js} +5 -5
  19. package/dist/index.js +38 -25
  20. package/package.json +6 -6
@@ -4,7 +4,7 @@ async function getPackageJson(currentContent) {
4
4
  const packageJson = await loadAsJson(currentContent);
5
5
  packageJson.scripts["edgedb:generate-queries"] = "@edgedb/generate queries";
6
6
  packageJson.scripts["edgedb:generate-edgeql-js"] = "@edgedb/generate edgeql-js";
7
- return addDependency(packageJson, await import("../package-LS4N573U.js"), {
7
+ return addDependency(packageJson, await import("../package-562PRDA5.js"), {
8
8
  devDependencies: ["@edgedb/generate"],
9
9
  dependencies: ["edgedb"]
10
10
  });
@@ -1,7 +1,7 @@
1
1
  // package.json
2
2
  var name = "@batijs/edgedb";
3
3
  var private2 = true;
4
- var version = "0.0.69";
4
+ var version = "0.0.70";
5
5
  var description = "";
6
6
  var type = "module";
7
7
  var scripts = {
@@ -4,7 +4,7 @@ async function getPackageJson(currentContent, meta) {
4
4
  const packageJson = await loadAsJson(currentContent);
5
5
  packageJson.scripts.dev = "tsx ./express-entry.ts";
6
6
  packageJson.scripts.build = "vite build";
7
- return addDependency(packageJson, await import("../package-HUSTD3AA.js"), {
7
+ return addDependency(packageJson, await import("../package-Y3HBW6TZ.js"), {
8
8
  devDependencies: ["@types/express"],
9
9
  dependencies: [
10
10
  "@hattip/adapter-node",
@@ -1,7 +1,7 @@
1
1
  // package.json
2
2
  var name = "@batijs/express";
3
3
  var private2 = true;
4
- var version = "0.0.69";
4
+ var version = "0.0.70";
5
5
  var description = "";
6
6
  var type = "module";
7
7
  var scripts = {
@@ -11,13 +11,13 @@ var keywords = [];
11
11
  var author = "";
12
12
  var license = "MIT";
13
13
  var devDependencies = {
14
- "@auth/core": "^0.13.0",
14
+ "@auth/core": "^0.14.0",
15
15
  "@batijs/tsup": "workspace:*",
16
16
  "@hattip/adapter-node": "^0.0.34",
17
17
  "@types/express": "^4.17.17",
18
18
  "@types/node": "^16.18.40",
19
19
  express: "^4.18.2",
20
- telefunc: "^0.1.58",
20
+ telefunc: "^0.1.59",
21
21
  tsup: "^7.2.0",
22
22
  tsx: "^3.12.8",
23
23
  "vike-authjs": "^0.0.2",
@@ -7,7 +7,7 @@ async function getPackageJson(currentContent, meta) {
7
7
  if (packageJson.scripts.preview) {
8
8
  delete packageJson.scripts.preview;
9
9
  }
10
- return addDependency(packageJson, await import("../package-H54ANVLS.js"), {
10
+ return addDependency(packageJson, await import("../package-OHT2RKHN.js"), {
11
11
  devDependencies: ["@hattip/vite", "@hattip/adapter-node"],
12
12
  dependencies: [
13
13
  "@hattip/router",
@@ -1,7 +1,7 @@
1
1
  // package.json
2
2
  var name = "@batijs/hattip";
3
3
  var private2 = true;
4
- var version = "0.0.69";
4
+ var version = "0.0.70";
5
5
  var description = "";
6
6
  var type = "module";
7
7
  var scripts = {
@@ -11,14 +11,14 @@ var keywords = [];
11
11
  var author = "";
12
12
  var license = "MIT";
13
13
  var devDependencies = {
14
- "@auth/core": "^0.13.0",
14
+ "@auth/core": "^0.14.0",
15
15
  "@batijs/tsup": "workspace:*",
16
16
  "@hattip/adapter-node": "^0.0.34",
17
17
  "@hattip/router": "^0.0.34",
18
18
  "@hattip/vite": "^0.0.34",
19
19
  "@types/node": "^16.18.40",
20
20
  hattip: "^0.0.33",
21
- telefunc: "^0.1.58",
21
+ telefunc: "^0.1.59",
22
22
  tsup: "^7.2.0",
23
23
  "vike-authjs": "^0.0.2",
24
24
  vite: "^4.4.9",
@@ -4,7 +4,7 @@ async function getPackageJson(currentContent) {
4
4
  const packageJson = await loadAsJson(currentContent);
5
5
  packageJson.scripts["prisma:studio"] = "prisma studio";
6
6
  packageJson.scripts["prisma:generate"] = "prisma generate";
7
- return addDependency(packageJson, await import("../package-ML7OLGIV.js"), {
7
+ return addDependency(packageJson, await import("../package-C3YKOB7I.js"), {
8
8
  devDependencies: ["prisma"],
9
9
  dependencies: ["@prisma/client"]
10
10
  });
@@ -1,7 +1,7 @@
1
1
  // package.json
2
2
  var name = "@batijs/prisma";
3
3
  var private2 = true;
4
- var version = "0.0.69";
4
+ var version = "0.0.70";
5
5
  var description = "";
6
6
  var type = "module";
7
7
  var scripts = {
@@ -2,7 +2,7 @@
2
2
  import { addDependency, loadAsJson } from "@batijs/core";
3
3
  async function getPackageJson(currentContent) {
4
4
  const packageJson = await loadAsJson(currentContent);
5
- return addDependency(packageJson, await import("../package-YA6MIN7J.js"), {
5
+ return addDependency(packageJson, await import("../package-7OPRREQL.js"), {
6
6
  devDependencies: ["vite", "@types/react", "@types/react-dom"],
7
7
  dependencies: ["@vitejs/plugin-react", "cross-fetch", "react", "react-dom", "vite-plugin-ssr", "vike-react"]
8
8
  });
@@ -1,7 +1,7 @@
1
1
  // package.json
2
2
  var name = "@batijs/react";
3
3
  var private2 = true;
4
- var version = "0.0.69";
4
+ var version = "0.0.70";
5
5
  var description = "";
6
6
  var type = "module";
7
7
  var scripts = {
@@ -2,7 +2,7 @@
2
2
  import { addDependency, loadAsJson } from "@batijs/core";
3
3
  async function getPackageJson(currentContent) {
4
4
  const packageJson = await loadAsJson(currentContent);
5
- return addDependency(packageJson, await import("../package-2QJ7AU5D.js"), {
5
+ return addDependency(packageJson, await import("../package-XS4RS3KO.js"), {
6
6
  devDependencies: ["vite"],
7
7
  dependencies: ["cross-fetch", "solid-js", "vike-solid", "vite-plugin-ssr"]
8
8
  });
@@ -1,7 +1,7 @@
1
1
  // package.json
2
2
  var name = "@batijs/solid";
3
3
  var private2 = true;
4
- var version = "0.0.69";
4
+ var version = "0.0.70";
5
5
  var description = "";
6
6
  var type = "module";
7
7
  var scripts = {
@@ -2,7 +2,7 @@
2
2
  import { addDependency, loadAsJson } from "@batijs/core";
3
3
  async function getPackageJson(currentContent, meta) {
4
4
  const packageJson = await loadAsJson(currentContent);
5
- return addDependency(packageJson, await import("../package-O545P6XC.js"), {
5
+ return addDependency(packageJson, await import("../package-TCXHQCAL.js"), {
6
6
  devDependencies: ["tailwindcss", "postcss", "autoprefixer"]
7
7
  });
8
8
  }
@@ -1,7 +1,7 @@
1
1
  // package.json
2
2
  var name = "@batijs/tailwindcss";
3
3
  var private2 = true;
4
- var version = "0.0.69";
4
+ var version = "0.0.70";
5
5
  var description = "";
6
6
  var type = "module";
7
7
  var scripts = {
@@ -2,7 +2,7 @@
2
2
  import { addDependency, loadAsJson } from "@batijs/core";
3
3
  async function getPackageJson(currentContent) {
4
4
  const packageJson = await loadAsJson(currentContent);
5
- return addDependency(packageJson, await import("../package-WTKGDPTF.js"), {
5
+ return addDependency(packageJson, await import("../package-VO4UYQPG.js"), {
6
6
  dependencies: ["telefunc"]
7
7
  });
8
8
  }
@@ -1,7 +1,7 @@
1
1
  // package.json
2
2
  var name = "@batijs/telefunc";
3
3
  var private2 = true;
4
- var version = "0.0.69";
4
+ var version = "0.0.70";
5
5
  var description = "";
6
6
  var type = "module";
7
7
  var scripts = {
@@ -13,7 +13,7 @@ var license = "MIT";
13
13
  var devDependencies = {
14
14
  "@batijs/tsup": "workspace:*",
15
15
  "@types/node": "^16.18.40",
16
- telefunc: "^0.1.58",
16
+ telefunc: "^0.1.59",
17
17
  tsup: "^7.2.0",
18
18
  vite: "^4.4.9",
19
19
  "vite-plugin-ssr": "^0.4.140"
@@ -2,7 +2,7 @@
2
2
  import { addDependency, loadAsJson } from "@batijs/core";
3
3
  async function getPackageJson(currentContent) {
4
4
  const packageJson = await loadAsJson(currentContent);
5
- return addDependency(packageJson, await import("../package-EV6NMSSH.js"), {
5
+ return addDependency(packageJson, await import("../package-5EXMRHUV.js"), {
6
6
  devDependencies: ["vite"],
7
7
  dependencies: [
8
8
  "@vitejs/plugin-vue",
@@ -1,7 +1,7 @@
1
1
  // package.json
2
2
  var name = "@batijs/vue";
3
3
  var private2 = true;
4
- var version = "0.0.69";
4
+ var version = "0.0.70";
5
5
  var description = "";
6
6
  var type = "module";
7
7
  var scripts = {
@@ -13,13 +13,13 @@ var license = "MIT";
13
13
  var devDependencies = {
14
14
  "@batijs/tsup": "workspace:*",
15
15
  "@types/node": "^16.18.40",
16
- "@vitejs/plugin-vue": "^4.0.0",
17
- "@vue/compiler-sfc": "^3.2.47",
18
- "@vue/server-renderer": "^3.2.47",
16
+ "@vitejs/plugin-vue": "^4.3.4",
17
+ "@vue/compiler-sfc": "^3.3.4",
18
+ "@vue/server-renderer": "^3.3.4",
19
19
  "cross-fetch": "^4.0.0",
20
20
  tailwindcss: "^3.3.3",
21
21
  tsup: "^7.2.0",
22
- typescript: "^5.1.6",
22
+ typescript: "^5.2.2",
23
23
  "unplugin-vue-markdown": "^0.24.3",
24
24
  "vike-vue": "^0.2.3",
25
25
  vite: "^4.4.9",
package/dist/index.js CHANGED
@@ -4,7 +4,7 @@ import {
4
4
  consola
5
5
  } from "./chunk-chunk-HOVHXSZ5.js";
6
6
 
7
- // ../../node_modules/.pnpm/citty@0.1.3/node_modules/citty/dist/index.mjs
7
+ // ../../node_modules/.pnpm/citty@0.1.4/node_modules/citty/dist/index.mjs
8
8
  function toArray(val) {
9
9
  if (Array.isArray(val)) {
10
10
  return val;
@@ -287,30 +287,37 @@ async function runCommand(cmd, opts) {
287
287
  if (typeof cmd.setup === "function") {
288
288
  await cmd.setup(context);
289
289
  }
290
- const subCommands = await resolveValue(cmd.subCommands);
291
- if (subCommands && Object.keys(subCommands).length > 0) {
292
- const subCommandArgIndex = opts.rawArgs.findIndex(
293
- (arg) => !arg.startsWith("-")
294
- );
295
- const subCommandName = opts.rawArgs[subCommandArgIndex];
296
- if (!subCommandName && !cmd.run) {
297
- throw new CLIError(`No command specified.`, "E_NO_COMMAND");
298
- }
299
- if (!subCommands[subCommandName]) {
300
- throw new CLIError(
301
- `Unknown command \`${subCommandName}\``,
302
- "E_UNKNOWN_COMMAND"
290
+ try {
291
+ const subCommands = await resolveValue(cmd.subCommands);
292
+ if (subCommands && Object.keys(subCommands).length > 0) {
293
+ const subCommandArgIndex = opts.rawArgs.findIndex(
294
+ (arg) => !arg.startsWith("-")
303
295
  );
296
+ const subCommandName = opts.rawArgs[subCommandArgIndex];
297
+ if (subCommandName) {
298
+ if (!subCommands[subCommandName]) {
299
+ throw new CLIError(
300
+ `Unknown command \`${subCommandName}\``,
301
+ "E_UNKNOWN_COMMAND"
302
+ );
303
+ }
304
+ const subCommand = await resolveValue(subCommands[subCommandName]);
305
+ if (subCommand) {
306
+ await runCommand(subCommand, {
307
+ rawArgs: opts.rawArgs.slice(subCommandArgIndex + 1)
308
+ });
309
+ }
310
+ } else if (!cmd.run) {
311
+ throw new CLIError(`No command specified.`, "E_NO_COMMAND");
312
+ }
304
313
  }
305
- const subCommand = await resolveValue(subCommands[subCommandName]);
306
- if (subCommand) {
307
- await runCommand(subCommand, {
308
- rawArgs: opts.rawArgs.slice(subCommandArgIndex + 1)
309
- });
314
+ if (typeof cmd.run === "function") {
315
+ await cmd.run(context);
316
+ }
317
+ } finally {
318
+ if (typeof cmd.cleanup === "function") {
319
+ await cmd.cleanup(context);
310
320
  }
311
- }
312
- if (typeof cmd.run === "function") {
313
- await cmd.run(context);
314
321
  }
315
322
  }
316
323
  async function resolveSubCommand(cmd, rawArgs, parent) {
@@ -419,6 +426,12 @@ async function runMain(cmd, opts = {}) {
419
426
  if (rawArgs.includes("--help") || rawArgs.includes("-h")) {
420
427
  await showUsage(...await resolveSubCommand(cmd, rawArgs));
421
428
  process.exit(0);
429
+ } else if (rawArgs.length === 1 && rawArgs[0] === "--version") {
430
+ const meta = typeof cmd.meta === "function" ? await cmd.meta() : await cmd.meta;
431
+ if (!meta?.version) {
432
+ throw new CLIError("No version specified", "E_NO_VERSION");
433
+ }
434
+ consola.log(meta.version);
422
435
  } else {
423
436
  await runCommand(cmd, { rawArgs });
424
437
  }
@@ -551,7 +564,7 @@ Please report this issue to https://github.com/magne4000/bati`
551
564
  // package.json
552
565
  var package_default = {
553
566
  name: "@batijs/cli",
554
- version: "0.0.69",
567
+ version: "0.0.70",
555
568
  type: "module",
556
569
  scripts: {
557
570
  prerelease: "rimraf ./dist",
@@ -569,7 +582,7 @@ var package_default = {
569
582
  "@batijs/tsup": "workspace:*",
570
583
  "@types/node": "^16.18.40",
571
584
  "@types/which": "^3.0.0",
572
- citty: "^0.1.3",
585
+ citty: "^0.1.4",
573
586
  colorette: "^2.0.20",
574
587
  esbuild: "^0.19.2",
575
588
  espree: "^9.6.1",
@@ -581,7 +594,7 @@ var package_default = {
581
594
  tsup: "^7.2.0",
582
595
  typescript: "^5.2.2",
583
596
  vite: "^4.4.9",
584
- vitest: "^0.34.3",
597
+ vitest: "^0.34.4",
585
598
  which: "^4.0.0"
586
599
  },
587
600
  dependencies: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@batijs/cli",
3
- "version": "0.0.69",
3
+ "version": "0.0.70",
4
4
  "type": "module",
5
5
  "keywords": [],
6
6
  "description": "Next-gen scaffolder. Get started with fully-functional apps, and choose any tool you want",
@@ -10,7 +10,7 @@
10
10
  "devDependencies": {
11
11
  "@types/node": "^16.18.40",
12
12
  "@types/which": "^3.0.0",
13
- "citty": "^0.1.3",
13
+ "citty": "^0.1.4",
14
14
  "colorette": "^2.0.20",
15
15
  "esbuild": "^0.19.2",
16
16
  "espree": "^9.6.1",
@@ -22,13 +22,13 @@
22
22
  "tsup": "^7.2.0",
23
23
  "typescript": "^5.2.2",
24
24
  "vite": "^4.4.9",
25
- "vitest": "^0.34.3",
25
+ "vitest": "^0.34.4",
26
26
  "which": "^4.0.0",
27
- "@batijs/build": "0.0.69",
28
- "@batijs/tsup": "0.0.69"
27
+ "@batijs/build": "0.0.70",
28
+ "@batijs/tsup": "0.0.70"
29
29
  },
30
30
  "dependencies": {
31
- "@batijs/core": "0.0.69"
31
+ "@batijs/core": "0.0.70"
32
32
  },
33
33
  "bin": "./dist/index.js",
34
34
  "exports": {