@live-change/frontend-base 0.2.31 → 0.2.32

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 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
- window.api = clientApi({
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 app = createSSRApp(App)
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.31",
3
+ "version": "0.2.32",
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,7 +20,7 @@
20
20
  "debug": "node --inspect-brk server"
21
21
  },
22
22
  "dependencies": {
23
- "@live-change/cli": "0.7.12",
23
+ "@live-change/cli": "0.7.15",
24
24
  "@live-change/dao": "0.5.9",
25
25
  "@live-change/dao-vue3": "0.5.9",
26
26
  "@live-change/dao-websocket": "0.5.9",
@@ -28,11 +28,11 @@
28
28
  "@live-change/password-authentication-service": "0.3.15",
29
29
  "@live-change/secret-code-service": "0.3.15",
30
30
  "@live-change/secret-link-service": "0.3.15",
31
- "@live-change/security-frontend": "^0.2.31",
31
+ "@live-change/security-frontend": "^0.2.32",
32
32
  "@live-change/session-service": "0.3.15",
33
33
  "@live-change/user-service": "0.3.15",
34
- "@live-change/vue3-components": "0.2.16",
35
- "@live-change/vue3-ssr": "0.2.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.12",
61
+ "@live-change/codeceptjs-helper": "0.7.15",
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": "dc19ff2b41b59579f9eea2a85db2bf44ff009568"
73
+ "gitHead": "465b10fdd09dd7e4eca79672a4ac8c12b8809658"
74
74
  }