@jskit-ai/create-app 0.1.13 → 0.1.14

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jskit-ai/create-app",
3
- "version": "0.1.13",
3
+ "version": "0.1.14",
4
4
  "description": "Scaffold minimal JSKIT app shells.",
5
5
  "type": "module",
6
6
  "files": [
@@ -20,7 +20,9 @@
20
20
  "./server": "./src/server/index.js",
21
21
  "./client": "./src/client/index.js"
22
22
  },
23
- "dependencies": {},
23
+ "dependencies": {
24
+ "@jskit-ai/cli-runtime": "0.1.0"
25
+ },
24
26
  "engines": {
25
27
  "node": "20.x"
26
28
  },
@@ -1,4 +1,4 @@
1
- import process from "node:process";
1
+ import { runCliEntrypoint } from "@jskit-ai/cli-runtime/server";
2
2
 
3
3
  function shellQuote(value) {
4
4
  const raw = String(value ?? "");
@@ -11,15 +11,4 @@ function shellQuote(value) {
11
11
  return `'${raw.replace(/'/g, "'\\''")}'`;
12
12
  }
13
13
 
14
- async function runCliEntrypoint(runCli, argv = process.argv.slice(2)) {
15
- if (typeof runCli !== "function") {
16
- throw new TypeError("runCliEntrypoint requires a runCli function");
17
- }
18
-
19
- const exitCode = await runCli(argv);
20
- if (exitCode !== 0) {
21
- process.exit(exitCode);
22
- }
23
- }
24
-
25
14
  export { shellQuote, runCliEntrypoint };
@@ -3,6 +3,7 @@ import path from "node:path";
3
3
  import process from "node:process";
4
4
  import { createInterface } from "node:readline/promises";
5
5
  import { fileURLToPath } from "node:url";
6
+ import { createCliError } from "@jskit-ai/cli-runtime/server";
6
7
  import { shellQuote } from "./cliEntrypoint.js";
7
8
 
8
9
  const DEFAULT_TEMPLATE = "base-shell";
@@ -13,13 +14,6 @@ const ALLOWED_EXISTING_TARGET_ENTRIES = new Set([".git"]);
13
14
  const PACKAGE_ROOT = path.resolve(path.dirname(fileURLToPath(import.meta.url)), "../..");
14
15
  const TEMPLATES_ROOT = path.join(PACKAGE_ROOT, "templates");
15
16
 
16
- function createCliError(message, { showUsage = false, exitCode = 1 } = {}) {
17
- const error = new Error(String(message || "Command failed."));
18
- error.showUsage = Boolean(showUsage);
19
- error.exitCode = Number.isInteger(exitCode) ? exitCode : 1;
20
- return error;
21
- }
22
-
23
17
  function toAppTitle(appName) {
24
18
  const words = String(appName)
25
19
  .trim()
@@ -12,28 +12,16 @@
12
12
  "server:all": "node ./bin/server.js",
13
13
  "server:home": "SERVER_SURFACE=home node ./bin/server.js",
14
14
  "server:console": "SERVER_SURFACE=console node ./bin/server.js",
15
- "server:account": "SERVER_SURFACE=account node ./bin/server.js",
16
- "server:auth": "SERVER_SURFACE=auth node ./bin/server.js",
17
- "server:app": "SERVER_SURFACE=app node ./bin/server.js",
18
- "server:admin": "SERVER_SURFACE=admin node ./bin/server.js",
19
15
  "start": "node ./bin/server.js",
20
16
  "link:local:jskit": "bash ./scripts/link-local-jskit-packages.sh",
21
17
  "dev": "vite",
22
18
  "dev:all": "vite",
23
19
  "dev:home": "VITE_SURFACE=home vite",
24
20
  "dev:console": "VITE_SURFACE=console vite",
25
- "dev:account": "VITE_SURFACE=account vite",
26
- "dev:auth": "VITE_SURFACE=auth vite",
27
- "dev:app": "VITE_SURFACE=app vite",
28
- "dev:admin": "VITE_SURFACE=admin vite",
29
21
  "build": "vite build",
30
22
  "build:all": "vite build",
31
23
  "build:home": "VITE_SURFACE=home vite build",
32
24
  "build:console": "VITE_SURFACE=console vite build",
33
- "build:account": "VITE_SURFACE=account vite build",
34
- "build:auth": "VITE_SURFACE=auth vite build",
35
- "build:app": "VITE_SURFACE=app vite build",
36
- "build:admin": "VITE_SURFACE=admin vite build",
37
25
  "preview": "vite preview",
38
26
  "lint": "eslint .",
39
27
  "test": "node --test",
@@ -52,7 +40,7 @@
52
40
  },
53
41
  "devDependencies": {
54
42
  "@jskit-ai/config-eslint": "0.1.8",
55
- "@jskit-ai/jskit-cli": "0.2.11",
43
+ "@jskit-ai/jskit-cli": "0.2.12",
56
44
  "@vitejs/plugin-vue": "^5.2.1",
57
45
  "eslint": "^9.39.1",
58
46
  "unplugin-vue-router": "^0.19.2",
@@ -41,31 +41,7 @@ const vuetify = createVuetify({
41
41
  components,
42
42
  directives,
43
43
  theme: {
44
- defaultTheme: "light",
45
- themes: {
46
- light: {
47
- colors: {
48
- primary: "#0f6b54",
49
- secondary: "#3f5150",
50
- background: "#eef3ee",
51
- surface: "#f7fbf6",
52
- "surface-variant": "#dfe8df",
53
- "on-surface-variant": "#3b4c44",
54
- error: "#9f1d1d"
55
- }
56
- },
57
- dark: {
58
- colors: {
59
- primary: "#6fd0b5",
60
- secondary: "#9db2af",
61
- background: "#0f1715",
62
- surface: "#16211e",
63
- "surface-variant": "#253430",
64
- "on-surface-variant": "#c5d6d2",
65
- error: "#ffb4ab"
66
- }
67
- }
68
- }
44
+ defaultTheme: "light"
69
45
  },
70
46
  icons: {
71
47
  defaultSet: "mdi",