@live-change/frontend-base 0.2.31 → 0.2.33
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/client-entry.js +3 -1
- package/main.js +5 -2
- package/package.json +16 -16
package/client-entry.js
CHANGED
|
@@ -16,10 +16,12 @@ export async function clientEntry(App, createRouter, config = {}) {
|
|
|
16
16
|
const windowId = window.__WINDOW_ID__
|
|
17
17
|
console.error("CLIENT WINDOW ID", windowId)
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
const api = clientApi({
|
|
20
20
|
use: [],
|
|
21
21
|
windowId
|
|
22
22
|
})
|
|
23
|
+
window.api = api
|
|
24
|
+
await api.readyPromise
|
|
23
25
|
|
|
24
26
|
const host = document.location.host
|
|
25
27
|
const url = document.location.pathname + document.location.search
|
package/main.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createSSRApp } from 'vue'
|
|
1
|
+
import { createSSRApp, createApp as createSPAApp } from 'vue'
|
|
2
2
|
import { createMetaManager } from 'vue-meta'
|
|
3
3
|
|
|
4
4
|
import { registerComponents } from '@live-change/vue3-components'
|
|
@@ -22,7 +22,9 @@ import { createI18n } from 'vue-i18n'
|
|
|
22
22
|
// fresh store here.
|
|
23
23
|
export async function createApp(config, api, App, createRouter, host, headers, response, url) {
|
|
24
24
|
const isSSR = response !== undefined
|
|
25
|
-
const
|
|
25
|
+
const isSPA = (typeof window !== 'undefined') && !window.__DAO_CACHE__
|
|
26
|
+
console.log("IS SPA", isSPA)
|
|
27
|
+
const app = isSPA ? createSPAApp(App) : createSSRApp(App)
|
|
26
28
|
app.config.devtools = true
|
|
27
29
|
|
|
28
30
|
app.config.globalProperties.$response = response
|
|
@@ -31,6 +33,7 @@ export async function createApp(config, api, App, createRouter, host, headers, r
|
|
|
31
33
|
api.installInstanceProperties(app.config.globalProperties)
|
|
32
34
|
|
|
33
35
|
registerComponents(app)
|
|
36
|
+
|
|
34
37
|
app.use(ReactiveDaoVue, { dao: api })
|
|
35
38
|
|
|
36
39
|
const router = createRouter(app)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@live-change/frontend-base",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.33",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"memDev": "lcli memDev --enableSessions --initScript ./init.js --templatePath ../../base-frontend/index.html",
|
|
6
6
|
"localDevInit": "rm tmp.db; lcli localDev --enableSessions --initScript ./init.js",
|
|
@@ -20,19 +20,19 @@
|
|
|
20
20
|
"debug": "node --inspect-brk server"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@live-change/cli": "0.7.
|
|
24
|
-
"@live-change/dao": "0.5.
|
|
25
|
-
"@live-change/dao-vue3": "0.5.
|
|
26
|
-
"@live-change/dao-websocket": "0.5.
|
|
27
|
-
"@live-change/email-service": "0.3.
|
|
28
|
-
"@live-change/password-authentication-service": "0.3.
|
|
29
|
-
"@live-change/secret-code-service": "0.3.
|
|
30
|
-
"@live-change/secret-link-service": "0.3.
|
|
31
|
-
"@live-change/security-frontend": "^0.2.
|
|
32
|
-
"@live-change/session-service": "0.3.
|
|
33
|
-
"@live-change/user-service": "0.3.
|
|
34
|
-
"@live-change/vue3-components": "0.2.
|
|
35
|
-
"@live-change/vue3-ssr": "0.2.
|
|
23
|
+
"@live-change/cli": "0.7.16",
|
|
24
|
+
"@live-change/dao": "0.5.10",
|
|
25
|
+
"@live-change/dao-vue3": "0.5.10",
|
|
26
|
+
"@live-change/dao-websocket": "0.5.10",
|
|
27
|
+
"@live-change/email-service": "0.3.16",
|
|
28
|
+
"@live-change/password-authentication-service": "0.3.16",
|
|
29
|
+
"@live-change/secret-code-service": "0.3.16",
|
|
30
|
+
"@live-change/secret-link-service": "0.3.16",
|
|
31
|
+
"@live-change/security-frontend": "^0.2.33",
|
|
32
|
+
"@live-change/session-service": "0.3.16",
|
|
33
|
+
"@live-change/user-service": "0.3.16",
|
|
34
|
+
"@live-change/vue3-components": "0.2.17",
|
|
35
|
+
"@live-change/vue3-ssr": "0.2.17",
|
|
36
36
|
"@vitejs/plugin-vue": "^2.3.1",
|
|
37
37
|
"@vitejs/plugin-vue-jsx": "^1.3.10",
|
|
38
38
|
"@vue/compiler-sfc": "^3.2.37",
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
"vue3-scroll-border": "0.1.4"
|
|
59
59
|
},
|
|
60
60
|
"devDependencies": {
|
|
61
|
-
"@live-change/codeceptjs-helper": "0.7.
|
|
61
|
+
"@live-change/codeceptjs-helper": "0.7.16",
|
|
62
62
|
"@wdio/selenium-standalone-service": "^7.20.8",
|
|
63
63
|
"codeceptjs": "^3.3.4",
|
|
64
64
|
"generate-password": "1.7.0",
|
|
@@ -70,5 +70,5 @@
|
|
|
70
70
|
"author": "",
|
|
71
71
|
"license": "BSD-3-Clause",
|
|
72
72
|
"description": "",
|
|
73
|
-
"gitHead": "
|
|
73
|
+
"gitHead": "c1ea795ed6c33c4bd7cc56a13323eee5ae464cfe"
|
|
74
74
|
}
|