@bardioc/create-bardioc-app 0.5.1 → 0.5.3

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/bin/create.mjs CHANGED
@@ -67,10 +67,6 @@ if (!result.success) {
67
67
  console.log(` Done! Next steps:\n`);
68
68
  console.log(` cd ${name}`);
69
69
  console.log(` npm install`);
70
- console.log(` bardioc login`);
71
70
  console.log(` npm run dev\n`);
72
71
  console.log(` Open http://localhost:${port} to see your app.`);
73
- console.log(
74
- ` Standalone host-backed auth now refreshes automatically from your CLI login during npm run dev.`
75
- );
76
72
  console.log(` Use "pnpm dev:live" for a public tunnel/live URL.\n`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bardioc/create-bardioc-app",
3
- "version": "0.5.1",
3
+ "version": "0.5.3",
4
4
  "description": "Scaffold a Bardioc app with framework templates (vite, react, vue, angular, svelte, solid, preact, nextjs)",
5
5
  "license": "MIT",
6
6
  "private": false,
@@ -17,8 +17,8 @@ npm run dev # http://localhost:{{PORT}}
17
17
  npm run dev:live # public tunnel (BARDIOC_TUNNEL=1)
18
18
  ```
19
19
 
20
- Run `bardioc login` once; `npm run dev` then mints and refreshes the standalone dev session
21
- automatically. See `.env.example` for the required variables.
20
+ `npm run dev` runs plain Vite as a local preview shell — live SDK data comes only when the app is
21
+ opened inside the host. See `.env.example` for the required variables.
22
22
 
23
23
  ## Develop against `@bardioc/*` source (optional)
24
24
 
@@ -2,7 +2,7 @@
2
2
  VITE_APP_NAME={{APP_NAME}}
3
3
 
4
4
  # Get this from the BardiocOS AppStore after registering your app.
5
- # Required for token exchange
5
+ # Required only for standalone dev auth/token exchange; host iframe runtime can omit it.
6
6
  VITE_APP_ID=your-app-client-id-here
7
7
 
8
8
  # Opt into the host-backed standalone dev session when running outside the host iframe.
@@ -74,10 +74,9 @@ pnpm build # → dist/
74
74
  pnpm bundle # → {{APP_NAME}}.zip
75
75
  ```
76
76
 
77
- `.env` (see `.env.example`): set `VITE_APP_ID` (from the BardiocOS AppStore). For standalone
78
- host-backed dev, set `VITE_ENABLE_DEV_AUTH=true` + `DEV_AUTH_HOST_URL`, run `bardioc login` once,
79
- then `npm run dev` mints/refreshes `DEV_SESSION_KEY` automatically. Without it, `npm run dev` is a
80
- local preview shell (no transport) — the dashboard renders only inside the host or dev session.
77
+ `npm run dev` runs plain Vite — a local preview shell (no transport): the dashboard renders, but
78
+ live SDK data comes only when the app is opened inside the host. `.env` (see `.env.example`): set
79
+ `VITE_APP_ID` (from the BardiocOS AppStore) when you wire the app up to the host.
81
80
 
82
81
  ---
83
82
 
@@ -4,10 +4,10 @@
4
4
  "private": true,
5
5
  "type": "module",
6
6
  "scripts": {
7
- "dev": "bardioc-dev-session -- vite",
8
- "dev:live": "BARDIOC_TUNNEL=1 bardioc-dev-session -- vite",
7
+ "dev": "vite",
8
+ "dev:live": "BARDIOC_TUNNEL=1 vite",
9
9
  "build": "tsc && vite build && node scripts/stamp-manifest.mjs dist",
10
- "bundle": "tsc && vite build && node scripts/stamp-manifest.mjs dist && cd dist && zip -r ../{{APP_NAME}}.zip .",
10
+ "bundle": "rm -f {{APP_NAME}}.zip && tsc && vite build && node scripts/stamp-manifest.mjs dist && cd dist && zip -r ../{{APP_NAME}}.zip .",
11
11
  "preview": "vite preview",
12
12
  "check-types": "tsc --noEmit",
13
13
  "changeset": "changeset",
@@ -23,28 +23,32 @@ if (!APP_NAME) {
23
23
  const insideIframe = isInsideIframe();
24
24
  const devStandalone = standaloneDevAuthEnabled && isDevStandalone();
25
25
  const useSdkProvider = insideIframe || devStandalone;
26
+ const SDK_APP_ID = APP_ID ?? APP_NAME;
26
27
 
27
- if (useSdkProvider && !APP_ID) {
28
- throw new Error('Missing VITE_APP_ID for SDK runtime');
29
- }
30
-
31
- if (devStandalone) {
32
- await ensureDevAuthSession({ appId: APP_ID, appName: APP_NAME });
33
- installDevBridge({ appId: APP_ID, appName: APP_NAME, debug: false });
34
- }
28
+ async function bootstrap() {
29
+ if (devStandalone) {
30
+ if (!APP_ID) {
31
+ throw new Error('Missing VITE_APP_ID for standalone dev auth');
32
+ }
33
+ await ensureDevAuthSession({ appId: APP_ID, appName: APP_NAME });
34
+ installDevBridge({ appId: APP_ID, appName: APP_NAME, debug: false });
35
+ }
35
36
 
36
- createRoot(document.getElementById('root')!).render(
37
- <StrictMode>
38
- {useSdkProvider ? (
39
- <AppSdkProvider appId={APP_ID}>
40
- <AppI18nProvider syncWithOs>
37
+ createRoot(document.getElementById('root')!).render(
38
+ <StrictMode>
39
+ {useSdkProvider ? (
40
+ <AppSdkProvider appId={SDK_APP_ID}>
41
+ <AppI18nProvider syncWithOs>
42
+ <App />
43
+ </AppI18nProvider>
44
+ </AppSdkProvider>
45
+ ) : (
46
+ <AppI18nProvider>
41
47
  <App />
42
48
  </AppI18nProvider>
43
- </AppSdkProvider>
44
- ) : (
45
- <AppI18nProvider>
46
- <App />
47
- </AppI18nProvider>
48
- )}
49
- </StrictMode>
50
- );
49
+ )}
50
+ </StrictMode>
51
+ );
52
+ }
53
+
54
+ bootstrap();
@@ -2,7 +2,7 @@
2
2
 
3
3
  interface ImportMetaEnv {
4
4
  readonly VITE_APP_NAME: string;
5
- readonly VITE_APP_ID: string;
5
+ readonly VITE_APP_ID?: string;
6
6
  readonly VITE_ENABLE_DEV_AUTH?: string;
7
7
  }
8
8