@jskit-ai/create-app 0.1.41 → 0.1.43

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.41",
3
+ "version": "0.1.43",
4
4
  "description": "Scaffold minimal JSKIT app shells.",
5
5
  "type": "module",
6
6
  "files": [
@@ -628,22 +628,12 @@ export async function runCli(
628
628
  stdout.write("- npm install\n");
629
629
  stdout.write("- npm run dev\n");
630
630
 
631
- stdout.write("\n");
632
631
  if (result.selectedSetupCommands.length > 0) {
632
+ stdout.write("\n");
633
633
  stdout.write(`Initial framework setup commands (${result.initialBundles}):\n`);
634
634
  for (const command of result.selectedSetupCommands) {
635
635
  stdout.write(`- ${command}\n`);
636
636
  }
637
- } else {
638
- stdout.write("First of all run npm install.:\n");
639
- stdout.write("Then add framework capabilities:\n");
640
- stdout.write("- npx jskit add package auth-provider-supabase-core --auth-supabase-url \"https://YOUR-PROJECT.supabase.co\" --auth-supabase-publishable-key \"sb_publishable_...\" --app-public-url \"http://localhost:5173\"\n");
641
- stdout.write("- npx jskit add bundle auth-base\n");
642
- stdout.write("- npx jskit list\n");
643
- stdout.write("Run server and client to see it in action:\n");
644
- stdout.write("- npm run dev\n");
645
- stdout.write("- npx run server\n");
646
-
647
637
  }
648
638
  }
649
639
 
@@ -18,13 +18,3 @@ config.surfaceDefinitions.home = {
18
18
  accessPolicyId: "public",
19
19
  origin: ""
20
20
  };
21
- config.surfaceDefinitions.console = {
22
- id: "console",
23
- label: "Console",
24
- pagesRoot: "console",
25
- enabled: true,
26
- requiresAuth: true,
27
- requiresWorkspace: false,
28
- accessPolicyId: "console_owner",
29
- origin: ""
30
- };
@@ -1,12 +1,3 @@
1
1
  export const surfaceAccessPolicies = {};
2
2
 
3
3
  surfaceAccessPolicies.public = {};
4
-
5
- surfaceAccessPolicies.authenticated = {
6
- requireAuth: true
7
- };
8
-
9
- surfaceAccessPolicies.console_owner = {
10
- requireAuth: true,
11
- requireFlagsAll: ["console_owner"]
12
- };
@@ -11,17 +11,14 @@
11
11
  "server": "node ./bin/server.js",
12
12
  "server:all": "node ./bin/server.js",
13
13
  "server:home": "SERVER_SURFACE=home node ./bin/server.js",
14
- "server:console": "SERVER_SURFACE=console node ./bin/server.js",
15
14
  "start": "node ./bin/server.js",
16
15
  "devlinks": "bash ./scripts/link-local-jskit-packages.sh",
17
16
  "dev": "vite",
18
17
  "dev:all": "vite",
19
18
  "dev:home": "VITE_SURFACE=home vite",
20
- "dev:console": "VITE_SURFACE=console vite",
21
19
  "build": "vite build",
22
20
  "build:all": "vite build",
23
21
  "build:home": "VITE_SURFACE=home vite build",
24
- "build:console": "VITE_SURFACE=console vite build",
25
22
  "preview": "vite preview",
26
23
  "lint": "eslint .",
27
24
  "test": "node --test",
@@ -1,28 +1,15 @@
1
1
  const mainClientComponents = [];
2
2
 
3
- function registerMainClientComponent(componentToken, resolveComponent) {
4
- const token = String(componentToken || "").trim();
5
- if (!token || typeof resolveComponent !== "function") {
6
- return;
7
- }
8
- mainClientComponents.push(
9
- Object.freeze({
10
- token,
11
- resolveComponent
12
- })
13
- );
3
+ function registerMainClientComponent(token, resolveComponent) {
4
+ mainClientComponents.push({ token, resolveComponent });
14
5
  }
15
6
 
16
7
  class MainClientProvider {
17
8
  static id = "local.main.client";
18
9
 
19
10
  register(app) {
20
- if (!app || typeof app.singleton !== "function") {
21
- throw new Error("MainClientProvider requires application singleton().");
22
- }
23
-
24
- for (const entry of mainClientComponents) {
25
- app.singleton(entry.token, entry.resolveComponent);
11
+ for (const { token, resolveComponent } of mainClientComponents) {
12
+ app.singleton(token, resolveComponent);
26
13
  }
27
14
  }
28
15
  }
@@ -9,6 +9,7 @@ set -euo pipefail
9
9
 
10
10
  APP_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
11
11
  SCOPE_DIR="$APP_ROOT/node_modules/@jskit-ai"
12
+ VITE_CACHE_DIR="$APP_ROOT/node_modules/.vite"
12
13
 
13
14
  is_valid_jskit_repo_root() {
14
15
  local candidate_root="$1"
@@ -197,4 +198,9 @@ while IFS=$'\t' read -r package_dir_name source_dir; do
197
198
  linked_count=$((linked_count + 1))
198
199
  done < <(discover_local_package_map)
199
200
 
201
+ if [[ -d "$VITE_CACHE_DIR" ]]; then
202
+ rm -rf "$VITE_CACHE_DIR"
203
+ echo "[link-local] cleared Vite cache at $VITE_CACHE_DIR"
204
+ fi
205
+
200
206
  echo "[link-local] done. linked=$linked_count"
@@ -104,8 +104,7 @@ async function createServer() {
104
104
  appRoot,
105
105
  profile: resolveRuntimeProfileFromSurface({
106
106
  surfaceRuntime,
107
- serverSurface: runtimeEnv.SERVER_SURFACE,
108
- defaultProfile: "app"
107
+ serverSurface: runtimeEnv.SERVER_SURFACE
109
108
  }),
110
109
  env: runtimeEnv,
111
110
  logger: app.log,
@@ -1,12 +0,0 @@
1
- <template>
2
- <v-card class="mx-auto" max-width="960" rounded="xl" border elevation="1">
3
- <v-card-item class="px-6 py-5 px-md-8 py-md-7">
4
- <v-card-title class="text-h4">console</v-card-title>
5
- <v-card-subtitle class="text-subtitle-1 mt-2">operations surface</v-card-subtitle>
6
- </v-card-item>
7
- <v-divider />
8
- <v-card-text class="px-6 py-5 px-md-8 py-md-7 text-body-1 text-medium-emphasis">
9
- This surface is intended for operational tooling.
10
- </v-card-text>
11
- </v-card>
12
- </template>
@@ -1,13 +0,0 @@
1
- <route lang="json">
2
- {
3
- "meta": {
4
- "jskit": {
5
- "surface": "console"
6
- }
7
- }
8
- }
9
- </route>
10
-
11
- <template>
12
- <RouterView />
13
- </template>