@bardioc/create-bardioc-app 0.6.0 → 0.6.1
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 +1 -1
- package/templates/angular/package.json +1 -1
- package/templates/angular/src/main.ts +0 -1
- package/templates/nextjs/app/page.tsx +1 -7
- package/templates/nextjs/package.json +1 -1
- package/templates/preact/package.json +1 -1
- package/templates/preact/src/main.tsx +1 -7
- package/templates/solid/package.json +1 -1
- package/templates/solid/src/main.tsx +1 -7
- package/templates/svelte/package.json +1 -1
- package/templates/svelte/src/main.ts +1 -7
- package/templates/vite/package.json +1 -1
- package/templates/vite/src/main.tsx +1 -7
- package/templates/vue/package.json +1 -1
- package/templates/vue/src/main.ts +1 -7
package/package.json
CHANGED
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"@angular/platform-browser": "^19.2.12",
|
|
29
29
|
"@angular/platform-browser-dynamic": "^19.2.12",
|
|
30
30
|
"@angular/router": "^19.2.12",
|
|
31
|
-
"@bardioc/app-sdk": "^1.0.
|
|
31
|
+
"@bardioc/app-sdk": "^1.0.1",
|
|
32
32
|
"rxjs": "~7.8.2",
|
|
33
33
|
"tslib": "^2.8.1",
|
|
34
34
|
"zone.js": "~0.15.1"
|
|
@@ -10,8 +10,6 @@ type ResultState =
|
|
|
10
10
|
| { status: 'success'; request: string; data: unknown }
|
|
11
11
|
| { status: 'error'; request: string; message: string };
|
|
12
12
|
|
|
13
|
-
const APP_NAME = process.env.NEXT_PUBLIC_APP_NAME?.trim();
|
|
14
|
-
|
|
15
13
|
// The port the app falls back to when it is not being served over HTTP (LOCALHOST_PORT moves it).
|
|
16
14
|
const DEFAULT_PORT = Number('{{PORT}}');
|
|
17
15
|
|
|
@@ -141,16 +139,12 @@ function PreviewShell() {
|
|
|
141
139
|
export default function Page() {
|
|
142
140
|
const useSdkProvider = isInsideIframe() || isDevStandalone();
|
|
143
141
|
|
|
144
|
-
if (!APP_NAME) {
|
|
145
|
-
throw new Error('Missing NEXT_PUBLIC_APP_NAME for runtime');
|
|
146
|
-
}
|
|
147
|
-
|
|
148
142
|
useEffect(() => {
|
|
149
143
|
if (isDevStandalone()) {
|
|
150
144
|
// scripts/dev.mjs runs the dev-auth proxy on the app port + 100, so read the port the page
|
|
151
145
|
// is actually served on rather than the one baked in at scaffold time.
|
|
152
146
|
const appPort = Number(window.location.port) || DEFAULT_PORT;
|
|
153
|
-
installDevHost({
|
|
147
|
+
installDevHost({ apiBaseUrl: `http://127.0.0.1:${appPort + 100}/rest` });
|
|
154
148
|
}
|
|
155
149
|
}, []);
|
|
156
150
|
|
|
@@ -4,18 +4,12 @@ import { render } from 'preact';
|
|
|
4
4
|
import { App } from './App';
|
|
5
5
|
import './index.css';
|
|
6
6
|
|
|
7
|
-
const APP_NAME = import.meta.env.VITE_APP_NAME?.trim();
|
|
8
|
-
|
|
9
|
-
if (!APP_NAME) {
|
|
10
|
-
throw new Error('Missing VITE_APP_NAME for runtime');
|
|
11
|
-
}
|
|
12
|
-
|
|
13
7
|
const insideIframe = isInsideIframe();
|
|
14
8
|
const devStandalone = isDevStandalone();
|
|
15
9
|
const useSdkProvider = insideIframe || devStandalone;
|
|
16
10
|
|
|
17
11
|
if (devStandalone) {
|
|
18
|
-
installDevHost(
|
|
12
|
+
installDevHost();
|
|
19
13
|
}
|
|
20
14
|
|
|
21
15
|
render(
|
|
@@ -5,18 +5,12 @@ import { App } from './App';
|
|
|
5
5
|
import { AppSdkProvider } from './bardioc-sdk';
|
|
6
6
|
import './index.css';
|
|
7
7
|
|
|
8
|
-
const APP_NAME = import.meta.env.VITE_APP_NAME?.trim();
|
|
9
|
-
|
|
10
|
-
if (!APP_NAME) {
|
|
11
|
-
throw new Error('Missing VITE_APP_NAME for runtime');
|
|
12
|
-
}
|
|
13
|
-
|
|
14
8
|
const insideIframe = isInsideIframe();
|
|
15
9
|
const devStandalone = isDevStandalone();
|
|
16
10
|
const useSdkProvider = insideIframe || devStandalone;
|
|
17
11
|
|
|
18
12
|
if (devStandalone) {
|
|
19
|
-
installDevHost(
|
|
13
|
+
installDevHost();
|
|
20
14
|
}
|
|
21
15
|
|
|
22
16
|
const root = document.getElementById('root')!;
|
|
@@ -4,18 +4,12 @@ import { mount } from 'svelte';
|
|
|
4
4
|
import App from './App.svelte';
|
|
5
5
|
import './index.css';
|
|
6
6
|
|
|
7
|
-
const APP_NAME = import.meta.env.VITE_APP_NAME?.trim();
|
|
8
|
-
|
|
9
|
-
if (!APP_NAME) {
|
|
10
|
-
throw new Error('Missing VITE_APP_NAME for runtime');
|
|
11
|
-
}
|
|
12
|
-
|
|
13
7
|
const insideIframe = isInsideIframe();
|
|
14
8
|
const devStandalone = isDevStandalone();
|
|
15
9
|
const useSdkProvider = insideIframe || devStandalone;
|
|
16
10
|
|
|
17
11
|
if (devStandalone) {
|
|
18
|
-
installDevHost(
|
|
12
|
+
installDevHost();
|
|
19
13
|
}
|
|
20
14
|
|
|
21
15
|
const bardioc = useSdkProvider ? await connect() : null;
|
|
@@ -6,18 +6,12 @@ import { App } from './App';
|
|
|
6
6
|
import { AppI18nProvider } from './i18n';
|
|
7
7
|
import './index.css';
|
|
8
8
|
|
|
9
|
-
const APP_NAME = import.meta.env.VITE_APP_NAME?.trim();
|
|
10
|
-
|
|
11
|
-
if (!APP_NAME) {
|
|
12
|
-
throw new Error('Missing VITE_APP_NAME for runtime');
|
|
13
|
-
}
|
|
14
|
-
|
|
15
9
|
const insideIframe = isInsideIframe();
|
|
16
10
|
const devStandalone = isDevStandalone();
|
|
17
11
|
const useSdkProvider = insideIframe || devStandalone;
|
|
18
12
|
|
|
19
13
|
if (devStandalone) {
|
|
20
|
-
installDevHost(
|
|
14
|
+
installDevHost();
|
|
21
15
|
}
|
|
22
16
|
|
|
23
17
|
createRoot(document.getElementById('root')!).render(
|
|
@@ -5,18 +5,12 @@ import App from './App.vue';
|
|
|
5
5
|
import { BARDIOC_KEY } from './bardioc-sdk';
|
|
6
6
|
import './index.css';
|
|
7
7
|
|
|
8
|
-
const APP_NAME = import.meta.env.VITE_APP_NAME?.trim();
|
|
9
|
-
|
|
10
|
-
if (!APP_NAME) {
|
|
11
|
-
throw new Error('Missing VITE_APP_NAME for runtime');
|
|
12
|
-
}
|
|
13
|
-
|
|
14
8
|
const insideIframe = isInsideIframe();
|
|
15
9
|
const devStandalone = isDevStandalone();
|
|
16
10
|
const useSdkProvider = insideIframe || devStandalone;
|
|
17
11
|
|
|
18
12
|
if (devStandalone) {
|
|
19
|
-
installDevHost(
|
|
13
|
+
installDevHost();
|
|
20
14
|
}
|
|
21
15
|
|
|
22
16
|
const app = createApp(App);
|