@live-change/vue3-ssr 0.2.19 → 0.2.21

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.
Files changed (2) hide show
  1. package/clientApi.js +20 -1
  2. package/package.json +3 -3
package/clientApi.js CHANGED
@@ -2,6 +2,7 @@ import { createReactiveObject } from '@live-change/vue3-components'
2
2
  import * as lcdao from '@live-change/dao'
3
3
  import { reactiveMixin, reactivePrefetchMixin, ReactiveObservableList } from '@live-change/dao-vue3'
4
4
  import SockJsConnection from '@live-change/dao-sockjs'
5
+ import MessageConnection from '@live-change/dao-message'
5
6
  import Api from "./Api.js"
6
7
 
7
8
  function clientApi(settings = {}) {
@@ -20,13 +21,31 @@ function clientApi(settings = {}) {
20
21
  }
21
22
  }
22
23
 
24
+ const remote = {}
25
+ for(const key in settings.remote) {
26
+ remote[key] = settings.remote[key]
27
+ }
28
+
29
+ for(const key in settings.worker) {
30
+ remote[key] = {
31
+ type: 'remote',
32
+ url: key,
33
+ protocol: 'message',
34
+ settings: {
35
+ target: settings.worker[key]
36
+ }
37
+ }
38
+ }
39
+
23
40
  const dao = new lcdao.Dao(credentials, {
24
41
  remoteUrl: settings.remoteUrl || document.location.protocol + '//' + document.location.host + "/api/sockjs",
25
42
  protocols: {
26
- 'sockjs': SockJsConnection
43
+ 'sockjs': SockJsConnection,
44
+ 'message': MessageConnection
27
45
  },
28
46
 
29
47
  ...local,
48
+ ...remote,
30
49
 
31
50
  connectionSettings: {
32
51
  fastAuth: (!settings.credentials && window.hasOwnProperty('__DAO_CACHE__'))
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@live-change/vue3-ssr",
3
- "version": "0.2.19",
3
+ "version": "0.2.21",
4
4
  "description": "Live Change Framework - vue components",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -21,10 +21,10 @@
21
21
  },
22
22
  "homepage": "https://github.com/live-change/live-change-framework-vue3",
23
23
  "dependencies": {
24
- "@live-change/dao-vue3": "0.5.10",
24
+ "@live-change/dao-vue3": "0.5.12",
25
25
  "@live-change/uid": "0.7.18",
26
26
  "@vueuse/core": "^9.1.0",
27
27
  "debug": "^4.3.4"
28
28
  },
29
- "gitHead": "90a9050401e8ac3f2b45505526153b07ccde3839"
29
+ "gitHead": "2e73ce206de85f5f0d58a319ed52c147a239db5b"
30
30
  }