@live-change/vue3-ssr 0.9.86 → 0.9.87

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 (3) hide show
  1. package/Api.js +1 -0
  2. package/index.js +16 -1
  3. package/package.json +4 -4
package/Api.js CHANGED
@@ -72,6 +72,7 @@ class Api extends DaoProxy {
72
72
  const versionMismatch = computed(() => {
73
73
  if(!version) return
74
74
  if(!softwareVersion) return
75
+ if(softwareVersion.value === 'unknown') return false
75
76
  return version.value !== softwareVersion.value
76
77
  })
77
78
  const client = computed(() => api?.value?.client)
package/index.js CHANGED
@@ -53,6 +53,21 @@ async function rangeBuckets(pathFunction, options, app = getCurrentInstance()) {
53
53
  }
54
54
  }
55
55
 
56
+ async function rangeBucketsRaw(pathFunction, options, app = getCurrentInstance()) {
57
+ const lc = useApi(app?.appContext)
58
+ const extendedPathFunction = (range) => pathFunction(range, lc.fetch)
59
+ const buckets = new RangeBuckets(lc, extendedPathFunction, options)
60
+ if(app) {
61
+ onUnmounted(() => {
62
+ buckets.dispose()
63
+ })
64
+ } else {
65
+ console.error("live fetch outside component instance - possible memory leak")
66
+ }
67
+ await buckets.wait()
68
+ return buckets
69
+ }
70
+
56
71
  function reverseRange(range) {
57
72
  return {
58
73
  gt: range.lt,
@@ -160,7 +175,7 @@ const uid = useUid
160
175
  export {
161
176
  usePath, useLive, useFetch, useApi, useViews, useActions, useUid, useClient, useTimeSynchronization,
162
177
  path, live, fetch, api, view, actions, uid, client,
163
- rangeBuckets, reverseRange,
178
+ rangeBuckets, rangeBucketsRaw, reverseRange,
164
179
  inboxReader,
165
180
  serviceDefinition
166
181
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@live-change/vue3-ssr",
3
- "version": "0.9.86",
3
+ "version": "0.9.87",
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-stack",
23
23
  "dependencies": {
24
- "@live-change/dao-vue3": "^0.9.86",
25
- "@live-change/uid": "^0.9.86",
24
+ "@live-change/dao-vue3": "^0.9.87",
25
+ "@live-change/uid": "^0.9.87",
26
26
  "@vueuse/core": "^12.3.0",
27
27
  "debug": "^4.3.4"
28
28
  },
29
- "gitHead": "7b0013ef101d9033402eeec45fd1be60e151aada"
29
+ "gitHead": "7a7694ad2801b7ffa16f347aed441ca5f81ab5fd"
30
30
  }