@live-change/frontend-base 0.2.51 → 0.2.52
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/ViewRoot.vue +2 -2
- package/main.js +2 -6
- package/package.json +30 -31
- package/server-entry.js +10 -20
- package/vite-config.js +0 -1
package/ViewRoot.vue
CHANGED
|
@@ -41,10 +41,10 @@
|
|
|
41
41
|
|
|
42
42
|
import ProgressSpinner from 'primevue/progressspinner'
|
|
43
43
|
|
|
44
|
-
import {
|
|
44
|
+
import { useHead } from '@vueuse/head'
|
|
45
45
|
import Page from "./Page.vue"
|
|
46
46
|
|
|
47
|
-
const { meta } =
|
|
47
|
+
const { meta } = useHead({
|
|
48
48
|
meta: [
|
|
49
49
|
{ charset: 'utf-8' },
|
|
50
50
|
{ name: 'viewport',
|
package/main.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { createSSRApp, createApp as createSPAApp } from 'vue'
|
|
2
|
-
import { createMetaManager } from 'vue-meta'
|
|
3
2
|
|
|
4
3
|
import { registerComponents } from '@live-change/vue3-components'
|
|
5
4
|
import ReactiveDaoVue from '@live-change/dao-vue3'
|
|
@@ -26,6 +25,8 @@ export async function createApp(config, api, App, createRouter, host, headers, r
|
|
|
26
25
|
const isSPA = (typeof window !== 'undefined') && !window.__DAO_CACHE__
|
|
27
26
|
console.log("IS SPA", isSPA)
|
|
28
27
|
const app = isSPA ? createSPAApp(App) : createSSRApp(App)
|
|
28
|
+
|
|
29
|
+
|
|
29
30
|
app.config.devtools = true
|
|
30
31
|
|
|
31
32
|
app.config.globalProperties.$response = response
|
|
@@ -74,11 +75,6 @@ export async function createApp(config, api, App, createRouter, host, headers, r
|
|
|
74
75
|
// options...
|
|
75
76
|
})
|
|
76
77
|
|
|
77
|
-
const meta = createMetaManager({ // TODO: remove this after switching to unhead
|
|
78
|
-
isSSR
|
|
79
|
-
})
|
|
80
|
-
app.use(meta)
|
|
81
|
-
|
|
82
78
|
const head = createHead()
|
|
83
79
|
app.use(head)
|
|
84
80
|
|
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.52",
|
|
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,60 +20,59 @@
|
|
|
20
20
|
"debug": "node --inspect-brk server"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@live-change/cli": "0.7.
|
|
23
|
+
"@live-change/cli": "0.7.30",
|
|
24
24
|
"@live-change/dao": "0.5.20",
|
|
25
25
|
"@live-change/dao-message": "0.5.20",
|
|
26
26
|
"@live-change/dao-sockjs": "0.5.20",
|
|
27
27
|
"@live-change/dao-vue3": "0.5.20",
|
|
28
28
|
"@live-change/dao-websocket": "0.5.20",
|
|
29
|
-
"@live-change/email-service": "0.3.
|
|
30
|
-
"@live-change/password-authentication-service": "0.3.
|
|
31
|
-
"@live-change/secret-code-service": "0.3.
|
|
32
|
-
"@live-change/secret-link-service": "0.3.
|
|
33
|
-
"@live-change/security-frontend": "^0.2.
|
|
34
|
-
"@live-change/session-service": "0.3.
|
|
35
|
-
"@live-change/user-service": "0.3.
|
|
29
|
+
"@live-change/email-service": "0.3.29",
|
|
30
|
+
"@live-change/password-authentication-service": "0.3.29",
|
|
31
|
+
"@live-change/secret-code-service": "0.3.29",
|
|
32
|
+
"@live-change/secret-link-service": "0.3.29",
|
|
33
|
+
"@live-change/security-frontend": "^0.2.52",
|
|
34
|
+
"@live-change/session-service": "0.3.29",
|
|
35
|
+
"@live-change/user-service": "0.3.29",
|
|
36
36
|
"@live-change/vue3-components": "0.2.28",
|
|
37
37
|
"@live-change/vue3-ssr": "0.2.28",
|
|
38
|
-
"@unhead/ssr": "^1.
|
|
39
|
-
"@vitejs/plugin-vue": "^
|
|
40
|
-
"@
|
|
41
|
-
"@
|
|
42
|
-
"@vueuse/
|
|
43
|
-
"@vueuse/head": "^1.1.26",
|
|
38
|
+
"@unhead/ssr": "^1.6.2",
|
|
39
|
+
"@vitejs/plugin-vue": "^4.3.4",
|
|
40
|
+
"@vue/compiler-sfc": "^3.3.4",
|
|
41
|
+
"@vueuse/core": "^10.4.1",
|
|
42
|
+
"@vueuse/head": "^1.3.1",
|
|
44
43
|
"codeceptjs-assert": "^0.0.5",
|
|
45
44
|
"compression": "^1.7.4",
|
|
46
45
|
"cross-env": "^7.0.3",
|
|
47
46
|
"get-port-sync": "1.0.1",
|
|
48
|
-
"primeflex": "^3.3.
|
|
47
|
+
"primeflex": "^3.3.1",
|
|
49
48
|
"primeicons": "^6.0.1",
|
|
50
|
-
"primevue": "^3.
|
|
49
|
+
"primevue": "^3.34.1",
|
|
51
50
|
"rollup-plugin-node-builtins": "^2.1.2",
|
|
52
|
-
"rollup-plugin-visualizer": "5.
|
|
53
|
-
"serialize-javascript": "^6.0.
|
|
51
|
+
"rollup-plugin-visualizer": "5.9.2",
|
|
52
|
+
"serialize-javascript": "^6.0.1",
|
|
54
53
|
"serve-static": "^1.15.0",
|
|
55
|
-
"unhead": "^1.
|
|
56
|
-
"v-shared-element": "3.1.
|
|
54
|
+
"unhead": "^1.6.2",
|
|
55
|
+
"v-shared-element": "3.1.1",
|
|
57
56
|
"vite-plugin-compression": "0.5.1",
|
|
58
57
|
"vite-plugin-vue-images": "^0.6.1",
|
|
59
|
-
"vue-i18n": "^9.
|
|
58
|
+
"vue-i18n": "^9.3.0",
|
|
60
59
|
"vue-meta": "^3.0.0-alpha.9",
|
|
61
|
-
"vue-router": "^4.
|
|
62
|
-
"vue3-lazyload": "0.
|
|
60
|
+
"vue-router": "^4.2.4",
|
|
61
|
+
"vue3-lazyload": "0.3.8",
|
|
63
62
|
"vue3-scroll-border": "0.1.5"
|
|
64
63
|
},
|
|
65
64
|
"devDependencies": {
|
|
66
|
-
"@live-change/codeceptjs-helper": "0.7.
|
|
67
|
-
"@wdio/selenium-standalone-service": "^
|
|
68
|
-
"codeceptjs": "^3.
|
|
65
|
+
"@live-change/codeceptjs-helper": "0.7.30",
|
|
66
|
+
"@wdio/selenium-standalone-service": "^8.15.0",
|
|
67
|
+
"codeceptjs": "^3.5.4",
|
|
69
68
|
"generate-password": "1.7.0",
|
|
70
|
-
"playwright": "^1.
|
|
69
|
+
"playwright": "^1.37.1",
|
|
71
70
|
"random-profile-generator": "^2.3.0",
|
|
72
|
-
"txtgen": "^3.0.
|
|
73
|
-
"webdriverio": "^
|
|
71
|
+
"txtgen": "^3.0.6",
|
|
72
|
+
"webdriverio": "^8.16.6"
|
|
74
73
|
},
|
|
75
74
|
"author": "",
|
|
76
75
|
"license": "BSD-3-Clause",
|
|
77
76
|
"description": "",
|
|
78
|
-
"gitHead": "
|
|
77
|
+
"gitHead": "7c05ea8ee7cc24e95feeedf86b92b045e78e8dea"
|
|
79
78
|
}
|
package/server-entry.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { renderToString } from 'vue/server-renderer'
|
|
2
|
-
import { renderMetaToString } from 'vue-meta/ssr'
|
|
3
2
|
|
|
4
3
|
import { serverApi } from '@live-change/vue3-ssr/serverApi.js'
|
|
5
4
|
|
|
@@ -23,10 +22,6 @@ export function serverEntry(App, createRouter, config = {}) {
|
|
|
23
22
|
|
|
24
23
|
const host = headers['host']
|
|
25
24
|
console.error('URL', host, url)
|
|
26
|
-
const api = await serverApi(dao, {
|
|
27
|
-
use: [],
|
|
28
|
-
windowId
|
|
29
|
-
})
|
|
30
25
|
|
|
31
26
|
const response = {
|
|
32
27
|
status: 200,
|
|
@@ -35,10 +30,16 @@ export function serverEntry(App, createRouter, config = {}) {
|
|
|
35
30
|
}
|
|
36
31
|
}
|
|
37
32
|
|
|
33
|
+
const api = await serverApi(dao, {
|
|
34
|
+
use: [],
|
|
35
|
+
windowId
|
|
36
|
+
})
|
|
37
|
+
|
|
38
38
|
const { app, router, head } = await createApp(
|
|
39
39
|
config, api, App, createRouter, host, headers, response, url
|
|
40
40
|
)
|
|
41
41
|
|
|
42
|
+
|
|
42
43
|
app.directive('shared-element', {})
|
|
43
44
|
|
|
44
45
|
// set the router to the desired URL before rendering
|
|
@@ -47,7 +48,6 @@ export function serverEntry(App, createRouter, config = {}) {
|
|
|
47
48
|
|
|
48
49
|
// prefetch data
|
|
49
50
|
await api.preFetchRoute(router.currentRoute, router)
|
|
50
|
-
|
|
51
51
|
// passing SSR context object which will be available via useSSRContext()
|
|
52
52
|
// @vitejs/plugin-vue injects code into a component's setup() that registers
|
|
53
53
|
// itself on ctx.modules. After the render, ctx.modules would contain all the
|
|
@@ -62,21 +62,11 @@ export function serverEntry(App, createRouter, config = {}) {
|
|
|
62
62
|
// request.
|
|
63
63
|
|
|
64
64
|
const renderedHead = await renderHeadToString(head)
|
|
65
|
-
console.log("HEAD", renderedHead)
|
|
66
|
-
|
|
67
|
-
const hed= {
|
|
68
|
-
headTags: '<title>IPI Swap</title>\n' +
|
|
69
|
-
'<link rel="icon" href="/icon/icon256.png" type="image/png" sizes="256x256">\n' +
|
|
70
|
-
'<link rel="icon" href="/icon/icon128.png" type="image/png" sizes="128x128">\n' +
|
|
71
|
-
'<link rel="icon" href="/icon/icon64.png" type="image/png" sizes="64x64">\n' +
|
|
72
|
-
'<link rel="icon" href="/icon/icon32.png" type="image/png" sizes="32x32">\n' +
|
|
73
|
-
'<link rel="icon" href="/icon/icon16.png" type="image/png" sizes="16x16">',
|
|
74
|
-
bodyTags: '',
|
|
75
|
-
bodyTagsOpen: '',
|
|
76
|
-
htmlAttrs: ' lang="en" amp=""',
|
|
77
|
-
bodyAttrs: ''
|
|
78
|
-
}
|
|
79
65
|
|
|
66
|
+
/* const html = 'html'
|
|
67
|
+
const renderedHead= 'head'
|
|
68
|
+
const data = {}
|
|
69
|
+
const ctx = { modules: [] }*/
|
|
80
70
|
|
|
81
71
|
return {html, data, meta: renderedHead, modules: ctx.modules, response}
|
|
82
72
|
}
|