@iebh/tera-fy 2.3.1 → 2.3.2
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/.vscode/settings.json +5 -0
- package/CHANGELOG.md +15 -0
- package/api.md +34 -35
- package/dist/lib/projectFile.d.ts +3 -3
- package/dist/lib/projectFile.js +4 -3
- package/dist/lib/projectFile.js.map +1 -1
- package/dist/lib/syncro/entities.js +11 -10
- package/dist/lib/syncro/entities.js.map +1 -1
- package/dist/lib/syncro/keyed.d.ts +2 -2
- package/dist/lib/syncro/keyed.js +23 -23
- package/dist/lib/syncro/keyed.js.map +1 -1
- package/dist/lib/syncro/syncro.d.ts +15 -13
- package/dist/lib/syncro/syncro.js +84 -59
- package/dist/lib/syncro/syncro.js.map +1 -1
- package/dist/lib/terafy.bootstrapper.d.ts +2 -2
- package/dist/lib/terafy.bootstrapper.js +15 -16
- package/dist/lib/terafy.bootstrapper.js.map +1 -1
- package/dist/lib/terafy.client.d.ts +24 -25
- package/dist/lib/terafy.client.js +50 -48
- package/dist/lib/terafy.client.js.map +1 -1
- package/dist/lib/terafy.proxy.js +4 -2
- package/dist/lib/terafy.proxy.js.map +1 -1
- package/dist/lib/terafy.server.d.ts +21 -7
- package/dist/lib/terafy.server.js +51 -53
- package/dist/lib/terafy.server.js.map +1 -1
- package/dist/plugin.vue2.es2019.js +210 -1224
- package/dist/plugins/base.d.ts +2 -2
- package/dist/plugins/base.js +1 -0
- package/dist/plugins/base.js.map +1 -1
- package/dist/plugins/firebase.d.ts +4 -4
- package/dist/plugins/firebase.js +7 -7
- package/dist/plugins/firebase.js.map +1 -1
- package/dist/plugins/vue2.d.ts +1 -1
- package/dist/plugins/vue2.js +6 -5
- package/dist/plugins/vue2.js.map +1 -1
- package/dist/plugins/vue3.js +6 -5
- package/dist/plugins/vue3.js.map +1 -1
- package/dist/terafy.bootstrapper.es2019.js +2 -2
- package/dist/terafy.bootstrapper.js +2 -2
- package/dist/terafy.es2019.js +2 -2
- package/dist/terafy.js +2 -2
- package/dist/utils/mixin.js +1 -1
- package/dist/utils/mixin.js.map +1 -1
- package/dist/utils/pDefer.d.ts +5 -1
- package/dist/utils/pDefer.js +6 -1
- package/dist/utils/pDefer.js.map +1 -1
- package/dist/utils/pathTools.d.ts +1 -1
- package/dist/utils/pathTools.js +2 -2
- package/dist/utils/pathTools.js.map +1 -1
- package/eslint.config.js +21 -7
- package/lib/projectFile.ts +5 -4
- package/lib/syncro/entities.ts +11 -10
- package/lib/syncro/keyed.ts +24 -24
- package/lib/syncro/syncro.ts +97 -60
- package/lib/terafy.bootstrapper.ts +15 -16
- package/lib/terafy.client.ts +61 -61
- package/lib/terafy.proxy.ts +8 -5
- package/lib/terafy.server.ts +72 -57
- package/package.json +5 -3
- package/plugins/base.ts +3 -2
- package/plugins/firebase.ts +12 -11
- package/plugins/vue2.ts +7 -6
- package/plugins/vue3.ts +6 -5
- package/utils/mixin.ts +1 -1
- package/utils/pDefer.ts +7 -2
- package/utils/pathTools.ts +3 -3
package/utils/mixin.ts
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* @returns {Object} A shallow copy of the input instance extended with the assignments
|
|
10
10
|
*/
|
|
11
11
|
export default function mixin(instance: any, assignments: any) {
|
|
12
|
-
|
|
12
|
+
const output = Object.assign(
|
|
13
13
|
Object.create(Object.getPrototypeOf(instance)),
|
|
14
14
|
instance,
|
|
15
15
|
assignments,
|
package/utils/pDefer.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/* eslint-disable no-unused-vars */
|
|
1
2
|
/**
|
|
2
3
|
* Returns a defer object which represents a promise object which can resolve in the future - but without enclosing a function
|
|
3
4
|
* The defer object has the keys {promise, resolve(), reject()}
|
|
@@ -6,12 +7,16 @@
|
|
|
6
7
|
|
|
7
8
|
interface Defer {
|
|
8
9
|
promise: Promise<unknown>;
|
|
9
|
-
resolve: (value?: unknown
|
|
10
|
+
resolve: (value?: unknown) => void;
|
|
10
11
|
reject: (reason?: any) => void;
|
|
11
12
|
}
|
|
12
13
|
|
|
14
|
+
/**
|
|
15
|
+
* Default export
|
|
16
|
+
* @returns Deferred promise
|
|
17
|
+
*/
|
|
13
18
|
export default function(): Defer {
|
|
14
|
-
|
|
19
|
+
const deferred = {} as Defer;
|
|
15
20
|
|
|
16
21
|
deferred.promise = new Promise((resolve, reject) => {
|
|
17
22
|
deferred.resolve = resolve;
|
package/utils/pathTools.ts
CHANGED
|
@@ -34,13 +34,13 @@ import {
|
|
|
34
34
|
* @returns {*} The set value
|
|
35
35
|
*/
|
|
36
36
|
export function set(target: any, path: string | (string | number)[], value: any, options?: any): any {
|
|
37
|
-
|
|
37
|
+
const settings = {
|
|
38
38
|
strategy: 'overwrite',
|
|
39
39
|
...options,
|
|
40
40
|
};
|
|
41
41
|
|
|
42
42
|
// Fetch the existing value if the strategy calls for it
|
|
43
|
-
|
|
43
|
+
const hasExistingValue = ['merge', 'defaults'].includes(settings.strategy)
|
|
44
44
|
? has(target, path)
|
|
45
45
|
: undefined;
|
|
46
46
|
|
|
@@ -119,7 +119,7 @@ export function merge(target: any, path: string | (string | number)[], value: an
|
|
|
119
119
|
*
|
|
120
120
|
* @returns {*} The resulting object with defaults applied
|
|
121
121
|
*/
|
|
122
|
-
export function defaults(target: any, path: string | (string | number)[]
|
|
122
|
+
export function defaults(target: any, path: string | (string | number)[], value?: any): any {
|
|
123
123
|
if (typeof path == 'string' || Array.isArray(path)) { // Called as (target, path, value)
|
|
124
124
|
if (!has(target, path)) { // Target path doesn't exist at all
|
|
125
125
|
return set(target, path, value);
|