@webkrafters/react-eagleeye 1.1.0-alpha.9 → 1.1.0
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/dist/main/index.js
CHANGED
|
@@ -40,6 +40,7 @@ interface Entry {
|
|
|
40
40
|
}
|
|
41
41
|
interface Handle<W extends WeakKey> {
|
|
42
42
|
readonly resource: W;
|
|
43
|
+
release(force: boolean): void;
|
|
43
44
|
}
|
|
44
45
|
declare class ObserverHandle<W extends AbstractObservable<ObservableTemplate<W>>> implements Handle<W> {
|
|
45
46
|
private _wObs;
|
|
@@ -63,6 +64,7 @@ declare class StreamerHandle<W extends Channel> implements Handle<W> {
|
|
|
63
64
|
get size(): number;
|
|
64
65
|
dec(): void;
|
|
65
66
|
inc(): void;
|
|
67
|
+
release(force?: boolean): void;
|
|
66
68
|
}
|
|
67
69
|
interface IResource<W extends WeakKey> {
|
|
68
70
|
acquire(desc: string, resource: W): Handle<W>;
|
|
@@ -110,7 +112,7 @@ export declare class ObservableUniverse<T extends State> {
|
|
|
110
112
|
provide<const ID extends string>(props?: ProviderProps<T, ID>): Point<T, ID>;
|
|
111
113
|
provide<const ID extends string>(props?: ProviderPropsRaw<T, ID>): Point<T, ID>;
|
|
112
114
|
provide<const ID extends string>(props?: ProviderPropsPrimitive<T, ID>): Point<T, ID>;
|
|
113
|
-
secureResourceMapFor(requestor: Utility<T>): ObsResource<AbstractObservable<
|
|
115
|
+
secureResourceMapFor(requestor: Utility<T>): ObsResource<AbstractObservable<T>>;
|
|
114
116
|
stream<const S extends SelectorMap>(selectorMap?: S): {
|
|
115
117
|
into<P>(WrappedComponent: ComponentType<Store<T, S> & P>): FC<P>;
|
|
116
118
|
};
|
|
@@ -123,11 +123,22 @@ var StreamerHandle = /*#__PURE__*/function () {
|
|
|
123
123
|
}, {
|
|
124
124
|
key: "dec",
|
|
125
125
|
value: function dec() {
|
|
126
|
-
if (
|
|
126
|
+
if (this.size < 1) {
|
|
127
127
|
return;
|
|
128
128
|
}
|
|
129
129
|
this._entry.numConnections--;
|
|
130
|
-
|
|
130
|
+
this.release();
|
|
131
|
+
}
|
|
132
|
+
}, {
|
|
133
|
+
key: "inc",
|
|
134
|
+
value: function inc() {
|
|
135
|
+
this.isValid && this._entry.numConnections++;
|
|
136
|
+
}
|
|
137
|
+
}, {
|
|
138
|
+
key: "release",
|
|
139
|
+
value: function release() {
|
|
140
|
+
var force = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
|
|
141
|
+
if (!force && this.size > 0) {
|
|
131
142
|
return;
|
|
132
143
|
}
|
|
133
144
|
this.resource.endStream();
|
|
@@ -135,11 +146,6 @@ var StreamerHandle = /*#__PURE__*/function () {
|
|
|
135
146
|
this._entry.channel = null;
|
|
136
147
|
this._chs.finalize(this._sMapHash);
|
|
137
148
|
}
|
|
138
|
-
}, {
|
|
139
|
-
key: "inc",
|
|
140
|
-
value: function inc() {
|
|
141
|
-
this.isValid && this._entry.numConnections++;
|
|
142
|
-
}
|
|
143
149
|
}]);
|
|
144
150
|
}();
|
|
145
151
|
var AbstractResource = /*#__PURE__*/function () {
|
package/package.json
CHANGED
|
@@ -54,7 +54,6 @@
|
|
|
54
54
|
"lodash.isobject": "^3.0.2",
|
|
55
55
|
"lodash.isplainobject": "^4.0.6",
|
|
56
56
|
"lodash.omit": "^4.5.0",
|
|
57
|
-
"npm": "^4.0.6",
|
|
58
57
|
"react": "^19.2.3",
|
|
59
58
|
"react-dom": "^19.2.3",
|
|
60
59
|
"setimmediate": "^1.0.5",
|
|
@@ -120,15 +119,16 @@
|
|
|
120
119
|
},
|
|
121
120
|
"scripts": {
|
|
122
121
|
"build": "eslint --fix && rm -rf dist && tsc && babel dist -d dist",
|
|
122
|
+
"pack": "npm run build && npm pack",
|
|
123
123
|
"test": "eslint --fix && jest --coverage --updateSnapshot",
|
|
124
124
|
"test:clean": "jest --clearCache",
|
|
125
125
|
"test:core": "jest --updateSnapshot",
|
|
126
126
|
"test:watch": "eslint --fix && jest --updateSnapshot --watchAll"
|
|
127
127
|
},
|
|
128
128
|
"types": "dist/index.d.ts",
|
|
129
|
-
"version": "1.1.0
|
|
129
|
+
"version": "1.1.0",
|
|
130
130
|
"dependencies": {
|
|
131
|
-
"@webkrafters/eagleeye": "^1.0.
|
|
131
|
+
"@webkrafters/eagleeye": "^1.0.11",
|
|
132
132
|
"js-sha512": "^0.9.0",
|
|
133
133
|
"safe-stable-stringify": "^2.5.0"
|
|
134
134
|
}
|