owservable 1.0.94 → 1.0.96
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/lib/_types/cronjob.type.d.ts +1 -1
- package/lib/_types/watcher.type.d.ts +1 -1
- package/lib/_types/worker.type.d.ts +1 -1
- package/lib/functions/performance/get.hrtime.as.number.d.ts +2 -0
- package/lib/functions/performance/get.hrtime.as.number.js +6 -0
- package/lib/functions/performance/get.hrtime.as.number.js.map +1 -0
- package/lib/functions/performance/get.milliseconds.from.d.ts +2 -0
- package/lib/functions/performance/get.milliseconds.from.js +6 -0
- package/lib/functions/performance/get.milliseconds.from.js.map +1 -0
- package/lib/functions/performance/get.seconds.from.d.ts +3 -0
- package/lib/functions/performance/get.seconds.from.js +8 -0
- package/lib/functions/performance/get.seconds.from.js.map +1 -0
- package/lib/mongodb/functions/process.models.js.map +1 -1
- package/lib/owservable.client.js +7 -11
- package/lib/owservable.client.js.map +1 -1
- package/lib/owservable.d.ts +1 -2
- package/lib/owservable.js +1 -3
- package/lib/owservable.js.map +1 -1
- package/lib/store/a.store.d.ts +5 -5
- package/lib/store/a.store.js +17 -12
- package/lib/store/a.store.js.map +1 -1
- package/lib/store/collection.store.d.ts +1 -1
- package/lib/store/collection.store.js +12 -10
- package/lib/store/collection.store.js.map +1 -1
- package/lib/store/count.store.js +4 -2
- package/lib/store/count.store.js.map +1 -1
- package/lib/store/document.store.js +10 -7
- package/lib/store/document.store.js.map +1 -1
- package/package.json +10 -10
- package/lib/mongodb/functions/index/add.both.indices.to.attributes.d.ts +0 -3
- package/lib/mongodb/functions/index/add.both.indices.to.attributes.js +0 -9
- package/lib/mongodb/functions/index/add.both.indices.to.attributes.js.map +0 -1
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const node_process_1 = require("node:process");
|
|
4
|
+
const getHrtimeAsNumber = () => Number(node_process_1.hrtime.bigint());
|
|
5
|
+
exports.default = getHrtimeAsNumber;
|
|
6
|
+
//# sourceMappingURL=get.hrtime.as.number.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get.hrtime.as.number.js","sourceRoot":"","sources":["../../../src/functions/performance/get.hrtime.as.number.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,+CAAoC;AAEpC,MAAM,iBAAiB,GAAG,GAAW,EAAE,CAAC,MAAM,CAAC,qBAAM,CAAC,MAAM,EAAE,CAAC,CAAC;AAChE,kBAAe,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const get_seconds_from_1 = require("./get.seconds.from");
|
|
4
|
+
const getMillisecondsFrom = (start) => (0, get_seconds_from_1.default)(start) * 1000;
|
|
5
|
+
exports.default = getMillisecondsFrom;
|
|
6
|
+
//# sourceMappingURL=get.milliseconds.from.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get.milliseconds.from.js","sourceRoot":"","sources":["../../../src/functions/performance/get.milliseconds.from.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,yDAAgD;AAEhD,MAAM,mBAAmB,GAAG,CAAC,KAAa,EAAU,EAAE,CAAC,IAAA,0BAAc,EAAC,KAAK,CAAC,GAAG,IAAI,CAAC;AACpF,kBAAe,mBAAmB,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NS_PER_SEC = void 0;
|
|
4
|
+
const get_hrtime_as_number_1 = require("./get.hrtime.as.number");
|
|
5
|
+
exports.NS_PER_SEC = 1e9;
|
|
6
|
+
const getSecondsFrom = (start) => Number((0, get_hrtime_as_number_1.default)() - start) / exports.NS_PER_SEC;
|
|
7
|
+
exports.default = getSecondsFrom;
|
|
8
|
+
//# sourceMappingURL=get.seconds.from.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get.seconds.from.js","sourceRoot":"","sources":["../../../src/functions/performance/get.seconds.from.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;AAEb,iEAAuD;AAE1C,QAAA,UAAU,GAAW,GAAG,CAAC;AAEtC,MAAM,cAAc,GAAG,CAAC,KAAa,EAAU,EAAE,CAAC,MAAM,CAAC,IAAA,8BAAiB,GAAE,GAAG,KAAK,CAAC,GAAG,kBAAU,CAAC;AACnG,kBAAe,cAAc,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"process.models.js","sourceRoot":"","sources":["../../../src/mongodb/functions/process.models.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,yBAAyB;AACzB,6BAA6B;AAE7B,mCAA8D;AAC9D,iDAAyD;AAEzD,sEAA6D;
|
|
1
|
+
{"version":3,"file":"process.models.js","sourceRoot":"","sources":["../../../src/mongodb/functions/process.models.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,yBAAyB;AACzB,6BAA6B;AAE7B,mCAA8D;AAC9D,iDAAyD;AAEzD,sEAA6D;AAE7D,MAAM,YAAY,GAAG,CAAC,MAAc,EAAE,IAAY,EAAQ,EAAE;IAC3D,MAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;IACzC,MAAM,KAAK,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC,OAAO,CAAC;IACxC,IAAI,CAAC,KAAK;QAAE,MAAM,IAAI,KAAK,CAAC,sBAAsB,MAAM,IAAI,IAAI,EAAE,CAAC,CAAC;IACpE,gCAAoB,CAAC,2BAA2B,CAAC,KAAK,CAAC,CAAC;AACzD,CAAC,CAAC;AAEF,MAAM,WAAW,GAAG,CAAC,MAAc,EAAE,OAA0B,EAAW,EAAE;IAC3E,IAAI,CAAC,OAAO;QA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IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC;AACjF,CAAC,CAAC;AAEF,MAAM,aAAa,GAAG,CAAC,IAAY,EAAE,OAAe,QAAQ,EAAE,OAA2B,EAAQ,EAAE;IAClG,MAAM,OAAO,GAAa,IAAA,8BAAoB,EAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IAC3D,IAAA,aAAI,EAAC,OAAO,EAAE,CAAC,MAAc,EAAE,EAAE,CAAC,cAAc,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;AACpE,CAAC,CAAC;AACF,kBAAe,aAAa,CAAC"}
|
package/lib/owservable.client.js
CHANGED
|
@@ -36,25 +36,21 @@ class OwservableClient extends rxjs_1.Subject {
|
|
|
36
36
|
return __awaiter(this, void 0, void 0, function* () {
|
|
37
37
|
switch (message.type) {
|
|
38
38
|
case 'pong':
|
|
39
|
-
this._processPong(message);
|
|
40
|
-
return;
|
|
39
|
+
return this._processPong(message);
|
|
41
40
|
case 'authenticate':
|
|
42
41
|
this._connectionManager.connected(message.jwt);
|
|
43
|
-
this._checkSession();
|
|
44
|
-
|
|
45
|
-
case 'location':
|
|
42
|
+
return this._checkSession();
|
|
43
|
+
case 'location': {
|
|
46
44
|
const { path } = message;
|
|
47
45
|
this.location = path;
|
|
48
46
|
return;
|
|
47
|
+
}
|
|
49
48
|
case 'subscribe':
|
|
50
|
-
this.updateSubscription(message);
|
|
51
|
-
return;
|
|
49
|
+
return this.updateSubscription(message);
|
|
52
50
|
case 'unsubscribe':
|
|
53
|
-
this.removeSubscription(message.target);
|
|
54
|
-
return;
|
|
51
|
+
return this.removeSubscription(message.target);
|
|
55
52
|
case 'reload':
|
|
56
|
-
this.reloadData(message.target);
|
|
57
|
-
return;
|
|
53
|
+
return this.reloadData(message.target);
|
|
58
54
|
}
|
|
59
55
|
});
|
|
60
56
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"owservable.client.js","sourceRoot":"","sources":["../src/owservable.client.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;;;;;;;;;AAGb,mCAA2C;AAC3C,+BAA2C;AAG3C,mEAA2D;AAE3D,0EAAiE;
|
|
1
|
+
{"version":3,"file":"owservable.client.js","sourceRoot":"","sources":["../src/owservable.client.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;;;;;;;;;AAGb,mCAA2C;AAC3C,+BAA2C;AAG3C,mEAA2D;AAE3D,0EAAiE;AAIjE,MAAqB,gBAAiB,SAAQ,cAAY;IASzD,YAAmB,iBAAqC;QACvD,KAAK,EAAE,CAAC;QAPD,UAAK,GAAW,CAAC,CAAC;QAQzB,IAAI,CAAC,kBAAkB,GAAG,iBAAiB,CAAC;QAC5C,IAAI,CAAC,OAAO,GAAG,IAAI,GAAG,EAAkB,CAAC;QACzC,IAAI,CAAC,cAAc,GAAG,IAAI,GAAG,EAAwB,CAAC;IACvD,CAAC;IAEM,YAAY;QAElB,IAAI,CAAC,kBAAkB,EAAE,CAAC;QAC1B,IAAI,CAAC,kBAAkB,CAAC,YAAY,EAAE,CAAC;QACvC,YAAY,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IAC7B,CAAC;IAED,IAAY,QAAQ,CAAC,QAAgB;QAEpC,IAAI,QAAQ,KAAK,IAAI,CAAC,SAAS;YAAE,OAAO;QACxC,IAAI,CAAC,SAAS,GAAG,QAAQ,CAAC;QAE1B,IAAI,CAAC,kBAAkB,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;IAC5C,CAAC;IAEY,OAAO,CAAC,OAAY;;YAGhC,QAAQ,OAAO,CAAC,IAAI,EAAE,CAAC;gBACtB,KAAK,MAAM;oBACV,OAAO,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC;gBAEnC,KAAK,cAAc;oBAClB,IAAI,CAAC,kBAAkB,CAAC,SAAS,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;oBAC/C,OAAO,IAAI,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CACD;AA5KD,mCA4KC"}
|
package/lib/owservable.d.ts
CHANGED
|
@@ -29,13 +29,12 @@ import observableDatabase from './mongodb/functions/observable.database';
|
|
|
29
29
|
import addIndexToAttributes from './mongodb/functions/index/add.index.to.attributes';
|
|
30
30
|
import addUpIndicesToAttributes from './mongodb/functions/index/add.up.indices.to.attributes';
|
|
31
31
|
import addDownIndicesToAttributes from './mongodb/functions/index/add.down.indices.to.attributes';
|
|
32
|
-
import addBothIndicesToAttributes from './mongodb/functions/index/add.both.indices.to.attributes';
|
|
33
32
|
import addUpAndDownIndicesToAttributes from './mongodb/functions/index/add.up.and.down.indices.to.attributes';
|
|
34
33
|
import AStore from './store/a.store';
|
|
35
34
|
import CountStore from './store/count.store';
|
|
36
35
|
import DocumentStore from './store/document.store';
|
|
37
36
|
import CollectionStore from './store/collection.store';
|
|
38
37
|
import storeFactory from './store/factories/store.factory';
|
|
39
|
-
export { OwservableClient, EStoreType, ConnectionManagerRefreshType, CronJobType, StoreScopeType, StoreSubscriptionConfigType, StoreSubscriptionUpdateType, SubscriptionMethodsType, WatcherType, WorkerType, IConnectionManager, initiateCronjobs, initiateWatchers, initiateWorkers, addActionCronjobs, addActionWatchers, addActionWorkers, executeCronjob, executeWatcher, executeWorker, executeProcessesInFolder, executeOnFilesRecursively, DataMiddlewareMap, MongoDBConnector, CollectionsModelsMap, processModels, observableModel, observableDatabase, addIndexToAttributes, addUpIndicesToAttributes, addDownIndicesToAttributes,
|
|
38
|
+
export { OwservableClient, EStoreType, ConnectionManagerRefreshType, CronJobType, StoreScopeType, StoreSubscriptionConfigType, StoreSubscriptionUpdateType, SubscriptionMethodsType, WatcherType, WorkerType, IConnectionManager, initiateCronjobs, initiateWatchers, initiateWorkers, addActionCronjobs, addActionWatchers, addActionWorkers, executeCronjob, executeWatcher, executeWorker, executeProcessesInFolder, executeOnFilesRecursively, DataMiddlewareMap, MongoDBConnector, CollectionsModelsMap, processModels, observableModel, observableDatabase, addIndexToAttributes, addUpIndicesToAttributes, addDownIndicesToAttributes, addUpAndDownIndicesToAttributes, AStore, CountStore, DocumentStore, CollectionStore, storeFactory };
|
|
40
39
|
declare const Owservable: {};
|
|
41
40
|
export default Owservable;
|
package/lib/owservable.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.storeFactory = exports.CollectionStore = exports.DocumentStore = exports.CountStore = exports.AStore = exports.addUpAndDownIndicesToAttributes = exports.
|
|
3
|
+
exports.storeFactory = exports.CollectionStore = exports.DocumentStore = exports.CountStore = exports.AStore = exports.addUpAndDownIndicesToAttributes = exports.addDownIndicesToAttributes = exports.addUpIndicesToAttributes = exports.addIndexToAttributes = exports.observableDatabase = exports.observableModel = exports.processModels = exports.CollectionsModelsMap = exports.MongoDBConnector = exports.DataMiddlewareMap = exports.executeOnFilesRecursively = exports.executeProcessesInFolder = exports.executeWorker = exports.executeWatcher = exports.executeCronjob = exports.addActionWorkers = exports.addActionWatchers = exports.addActionCronjobs = exports.initiateWorkers = exports.initiateWatchers = exports.initiateCronjobs = exports.EStoreType = exports.OwservableClient = void 0;
|
|
4
4
|
const owservable_client_1 = require("./owservable.client");
|
|
5
5
|
exports.OwservableClient = owservable_client_1.default;
|
|
6
6
|
const store_type_enum_1 = require("./_enums/store.type.enum");
|
|
@@ -45,8 +45,6 @@ const add_up_indices_to_attributes_1 = require("./mongodb/functions/index/add.up
|
|
|
45
45
|
exports.addUpIndicesToAttributes = add_up_indices_to_attributes_1.default;
|
|
46
46
|
const add_down_indices_to_attributes_1 = require("./mongodb/functions/index/add.down.indices.to.attributes");
|
|
47
47
|
exports.addDownIndicesToAttributes = add_down_indices_to_attributes_1.default;
|
|
48
|
-
const add_both_indices_to_attributes_1 = require("./mongodb/functions/index/add.both.indices.to.attributes");
|
|
49
|
-
exports.addBothIndicesToAttributes = add_both_indices_to_attributes_1.default;
|
|
50
48
|
const add_up_and_down_indices_to_attributes_1 = require("./mongodb/functions/index/add.up.and.down.indices.to.attributes");
|
|
51
49
|
exports.addUpAndDownIndicesToAttributes = add_up_and_down_indices_to_attributes_1.default;
|
|
52
50
|
const a_store_1 = require("./store/a.store");
|
package/lib/owservable.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"owservable.js","sourceRoot":"","sources":["../src/owservable.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;AAEb,2DAAmD;
|
|
1
|
+
{"version":3,"file":"owservable.js","sourceRoot":"","sources":["../src/owservable.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;AAEb,2DAAmD;AA6DlD,2BA7DM,2BAAgB,CA6DN;AA1DjB,8DAAkD;AA6DjD,qBA7DM,yBAAU,CA6DN;AA7CX,mEAA2D;AA+D1D,0BA/DM,0BAAe,CA+DN;AA9DhB,qEAA6D;AA4D5D,2BA5DM,2BAAgB,CA4DN;AA3DjB,qEAA6D;AA4D5D,2BA5DM,2BAAgB,CA4DN;AAzDjB,gFAAuE;AA6DtE,4BA7DM,6BAAiB,CA6DN;AA5DlB,gFAAuE;AA6DtE,4BA7DM,6BAAiB,CA6DN;AA5DlB,8EAAqE;AA6DpE,2BA7DM,4BAAgB,CA6DN;AA1DjB,yEAAiE;AA6DhE,yBA7DM,yBAAc,CA6DN;AA5Df,yEAAiE;AA6DhE,yBA7DM,yBAAc,CA6DN;AA5Df,uEAA+D;AA6D9D,wBA7DM,wBAAa,CA6DN;AA5Dd,iGAAuF;AA6DtF,mCA7DM,qCAAwB,CA6DN;AA5DzB,mGAAyF;AA6DxF,oCA7DM,sCAAyB,CA6DN;AA1D1B,0EAAiE;AA6DhE,4BA7DM,6BAAiB,CA6DN;AA1DlB,mEAA2D;AA6D1D,2BA7DM,2BAAgB,CA6DN;AA5DjB,6EAAoE;AA6DnE,+BA7DM,gCAAoB,CA6DN;AA1DrB,uEAA+D;AA6D9D,wBA7DM,wBAAa,CA6DN;AA5Dd,2EAAmE;AA6DlE,0BA7DM,0BAAe,CA6DN;AA5DhB,iFAAyE;AA6DxE,6BA7DM,6BAAkB,CA6DN;AA5DnB,+FAAqF;AA6DpF,+BA7DM,iCAAoB,CA6DN;AA5DrB,yGAA8F;AA6D7F,mCA7DM,sCAAwB,CA6DN;AA5DzB,6GAAkG;AA6DjG,qCA7DM,wCAA0B,CA6DN;AA5D3B,2HAA8G;AA6D7G,0CA7DM,+CAA+B,CA6DN;AA1DhC,6CAAqC;AA6DpC,iBA7DM,iBAAM,CA6DN;AA5DP,qDAA6C;AA6D5C,qBA7DM,qBAAU,CA6DN;AA5DX,2DAAmD;AA6DlD,wBA7DM,wBAAa,CA6DN;AA5Dd,+DAAuD;AA6DtD,0BA7DM,0BAAe,CA6DN;AA1DhB,mEAA2D;AA6D1D,uBA7DM,uBAAY,CA6DN;AAGb,MAAM,UAAU,GAAG,EAAE,CAAC;AACtB,kBAAe,UAAU,CAAC"}
|
package/lib/store/a.store.d.ts
CHANGED
|
@@ -28,11 +28,11 @@ export default abstract class AStore extends Subject<any> {
|
|
|
28
28
|
protected testDocument(document: any): boolean;
|
|
29
29
|
protected set subscription(subscription: Subscription);
|
|
30
30
|
protected get model(): Model<any>;
|
|
31
|
-
protected emitOne(subscriptionId: string, update?: any): void;
|
|
32
|
-
protected emitMany(subscriptionId: string, update?: any): void;
|
|
33
|
-
protected emitTotal(subscriptionId: string, total: any): void;
|
|
34
|
-
protected emitDelete(subscriptionId: string, deleted: any): void;
|
|
35
|
-
protected emitError(subscriptionId: string, error: any): void;
|
|
31
|
+
protected emitOne(startTime: number, subscriptionId: string, update?: any): void;
|
|
32
|
+
protected emitMany(startTime: number, subscriptionId: string, update?: any): void;
|
|
33
|
+
protected emitTotal(startTime: number, subscriptionId: string, total: any): void;
|
|
34
|
+
protected emitDelete(startTime: number, subscriptionId: string, deleted: any): void;
|
|
35
|
+
protected emitError(startTime: number, subscriptionId: string, error: any): void;
|
|
36
36
|
protected shouldConsiderFields(): boolean;
|
|
37
37
|
set config(config: StoreSubscriptionConfigType);
|
|
38
38
|
get target(): string;
|
package/lib/store/a.store.js
CHANGED
|
@@ -8,6 +8,8 @@ const operators_1 = require("rxjs/operators");
|
|
|
8
8
|
const rxjs_1 = require("rxjs");
|
|
9
9
|
const store_type_enum_1 = require("../_enums/store.type.enum");
|
|
10
10
|
const observable_model_1 = require("../mongodb/functions/observable.model");
|
|
11
|
+
const get_milliseconds_from_1 = require("../functions/performance/get.milliseconds.from");
|
|
12
|
+
const DEFAULT_DELAY = 100;
|
|
11
13
|
const diffPatcher = jsondiffpatch.create({
|
|
12
14
|
propertyFilter: (name) => name !== 'subscriptionId'
|
|
13
15
|
});
|
|
@@ -28,7 +30,7 @@ class AStore extends rxjs_1.Subject {
|
|
|
28
30
|
this._paging = {};
|
|
29
31
|
this._populates = [];
|
|
30
32
|
this._virtuals = [];
|
|
31
|
-
this._delay =
|
|
33
|
+
this._delay = DEFAULT_DELAY;
|
|
32
34
|
this._config = {
|
|
33
35
|
query: { ___initial___: true },
|
|
34
36
|
strict: false,
|
|
@@ -54,7 +56,7 @@ class AStore extends rxjs_1.Subject {
|
|
|
54
56
|
return (0, lodash_1.isEmpty)(change);
|
|
55
57
|
}
|
|
56
58
|
extractFromConfig() {
|
|
57
|
-
const { subscriptionId = (0, node_crypto_1.randomUUID)(), query = {}, sort = {}, fields = {}, populates = [], virtuals = [], delay =
|
|
59
|
+
const { subscriptionId = (0, node_crypto_1.randomUUID)(), query = {}, sort = {}, fields = {}, populates = [], virtuals = [], delay = DEFAULT_DELAY } = this._config;
|
|
58
60
|
this._subscriptionId = subscriptionId;
|
|
59
61
|
this._query = query;
|
|
60
62
|
this._sort = sort;
|
|
@@ -87,12 +89,12 @@ class AStore extends rxjs_1.Subject {
|
|
|
87
89
|
get model() {
|
|
88
90
|
return this._model;
|
|
89
91
|
}
|
|
90
|
-
emitOne(subscriptionId, update = {}) {
|
|
92
|
+
emitOne(startTime, subscriptionId, update = {}) {
|
|
91
93
|
const message = _baseMessage(this._target, this._incremental);
|
|
92
94
|
(0, lodash_1.set)(message.payload, this._target, update);
|
|
93
|
-
this.next(Object.assign({ subscriptionId }, message));
|
|
95
|
+
this.next(Object.assign(Object.assign({ subscriptionId }, message), { execution_time: (0, get_milliseconds_from_1.default)(startTime).toFixed(2) }));
|
|
94
96
|
}
|
|
95
|
-
emitMany(subscriptionId, update = { total: 0, data: [], recounting: false }) {
|
|
97
|
+
emitMany(startTime, subscriptionId, update = { total: 0, data: [], recounting: false }) {
|
|
96
98
|
const { total, data, recounting } = update;
|
|
97
99
|
const message = _baseMessage(this._target, this._incremental);
|
|
98
100
|
(0, lodash_1.set)(message.payload, this._target, data);
|
|
@@ -100,25 +102,27 @@ class AStore extends rxjs_1.Subject {
|
|
|
100
102
|
(0, lodash_1.set)(message.payload, '_' + this._target + 'Count', total);
|
|
101
103
|
if (recounting)
|
|
102
104
|
(0, lodash_1.set)(message.payload, '_' + this._target + 'Recounting', true);
|
|
103
|
-
this.next(Object.assign({ subscriptionId }, message));
|
|
105
|
+
this.next(Object.assign(Object.assign({ subscriptionId }, message), { execution_time: (0, get_milliseconds_from_1.default)(startTime).toFixed(2) }));
|
|
104
106
|
}
|
|
105
|
-
emitTotal(subscriptionId, total) {
|
|
107
|
+
emitTotal(startTime, subscriptionId, total) {
|
|
106
108
|
this.next({
|
|
107
109
|
subscriptionId,
|
|
108
110
|
type: 'total',
|
|
109
111
|
target: this._target,
|
|
110
|
-
total
|
|
112
|
+
total,
|
|
113
|
+
execution_time: (0, get_milliseconds_from_1.default)(startTime).toFixed(2)
|
|
111
114
|
});
|
|
112
115
|
}
|
|
113
|
-
emitDelete(subscriptionId, deleted) {
|
|
116
|
+
emitDelete(startTime, subscriptionId, deleted) {
|
|
114
117
|
this.next({
|
|
115
118
|
subscriptionId,
|
|
116
119
|
type: 'delete',
|
|
117
120
|
target: this._target,
|
|
118
|
-
payload: deleted
|
|
121
|
+
payload: deleted,
|
|
122
|
+
execution_time: (0, get_milliseconds_from_1.default)(startTime).toFixed(2)
|
|
119
123
|
});
|
|
120
124
|
}
|
|
121
|
-
emitError(subscriptionId, error) {
|
|
125
|
+
emitError(startTime, subscriptionId, error) {
|
|
122
126
|
this.next({
|
|
123
127
|
subscriptionId,
|
|
124
128
|
type: 'error',
|
|
@@ -129,7 +133,8 @@ class AStore extends rxjs_1.Subject {
|
|
|
129
133
|
fields: this._fields,
|
|
130
134
|
paging: this._paging,
|
|
131
135
|
populates: this._populates,
|
|
132
|
-
virtuals: this._virtuals
|
|
136
|
+
virtuals: this._virtuals,
|
|
137
|
+
execution_time: (0, get_milliseconds_from_1.default)(startTime).toFixed(2)
|
|
133
138
|
});
|
|
134
139
|
}
|
|
135
140
|
shouldConsiderFields() {
|
package/lib/store/a.store.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"a.store.js","sourceRoot":"","sources":["../../src/store/a.store.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,+BAAwB;AACxB,6CAAuC;AACvC,+CAA+C;AAC/C,mCAA2F;AAI3F,8CAA4C;AAC5C,+BAA2D;AAE3D,+DAAmD;AACnD,4EAAoE;
|
|
1
|
+
{"version":3,"file":"a.store.js","sourceRoot":"","sources":["../../src/store/a.store.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,+BAAwB;AACxB,6CAAuC;AACvC,+CAA+C;AAC/C,mCAA2F;AAI3F,8CAA4C;AAC5C,+BAA2D;AAE3D,+DAAmD;AACnD,4EAAoE;AACpE,0FAAiF;AAGjF,MAAM,aAAa,GAAW,GAAG,CAAC;AAElC,MAAM,WAAW,GAA8B,aAAa,CAAC,MAAM,CAAC;IACnE,cAAc,EAAE,CAAC,IAAY,EAAW,EAAE,CAAC,IAAI,KAAK,gBAAgB;CACpE,CAAC,CAAC;AAGH,MAAM,YAAY,GAAG,CAAC,MAAc,EAAE,WAAW,GAAG,KAAK,EAAO,EAAE,CAAC,CAAC;IACnE,IAAI,EAAE,WAAW,CA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,IAAI,CAAC,iBAAiB,EAAE,CAAC;QACzB,IAAI,CAAC,mBAAmB,EAAE,CAAC;IAC5B,CAAC;IAED,IAAW,MAAM;QAChB,OAAO,IAAI,CAAC,OAAO,CAAC;IACrB,CAAC;IAEO,cAAc,CAAC,MAAmC;QACzD,IAAI,CAAC,MAAM;YAAE,OAAO,KAAK,CAAC;QAE1B,MAAM,IAAI,GAAG,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;QACpD,OAAO,CAAC,IAAA,gBAAO,EAAC,IAAI,CAAC,CAAC;IACvB,CAAC;IAEO,oBAAoB,CAAC,KAAa,EAAE,IAAa;QACxD,IAAI,CAAC,kBAAkB,CAAC,GAAG,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;IAC1C,CAAC;IAES,sBAAsB,CAAC,KAAa;QAC7C,IAAI,CAAC,kBAAkB,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IACvC,CAAC;IAES,aAAa,CAAC,KAAa;QACpC,OAAO,CAAC,CAAC,IAAI,CAAC,kBAAkB,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;IAC7C,CAAC;CACD;AApND,yBAoNC"}
|
|
@@ -5,7 +5,7 @@ export default class CollectionStore extends AStore {
|
|
|
5
5
|
private _totalCount;
|
|
6
6
|
constructor(model: Model<any>, target: string);
|
|
7
7
|
protected shouldReload(change: any): boolean;
|
|
8
|
-
protected sendCount(subscriptionId: string): Promise<void>;
|
|
8
|
+
protected sendCount(startTime: number, subscriptionId: string): Promise<void>;
|
|
9
9
|
protected delaySendCount: _.DebouncedFuncLeading<any>;
|
|
10
10
|
protected load(change: any): Promise<void>;
|
|
11
11
|
protected extractFromConfig(): void;
|
|
@@ -12,6 +12,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
12
12
|
const _ = require("lodash");
|
|
13
13
|
const a_store_1 = require("./a.store");
|
|
14
14
|
const store_type_enum_1 = require("../_enums/store.type.enum");
|
|
15
|
+
const get_hrtime_as_number_1 = require("../functions/performance/get.hrtime.as.number");
|
|
15
16
|
class CollectionStore extends a_store_1.default {
|
|
16
17
|
constructor(model, target) {
|
|
17
18
|
super(model, target);
|
|
@@ -42,17 +43,18 @@ class CollectionStore extends a_store_1.default {
|
|
|
42
43
|
}
|
|
43
44
|
return false;
|
|
44
45
|
}
|
|
45
|
-
sendCount(subscriptionId) {
|
|
46
|
+
sendCount(startTime, subscriptionId) {
|
|
46
47
|
return __awaiter(this, void 0, void 0, function* () {
|
|
47
48
|
this._totalCount = yield this._model.countDocuments(this._query);
|
|
48
|
-
this.emitTotal(subscriptionId, this._totalCount);
|
|
49
|
+
this.emitTotal(startTime, subscriptionId, this._totalCount);
|
|
49
50
|
});
|
|
50
51
|
}
|
|
51
52
|
load(change) {
|
|
52
53
|
return __awaiter(this, void 0, void 0, function* () {
|
|
54
|
+
const startTime = (0, get_hrtime_as_number_1.default)();
|
|
53
55
|
const currentLoadSubscriptionId = this._subscriptionId + '';
|
|
54
56
|
if (_.isEmpty(this._config))
|
|
55
|
-
return this.emitMany(currentLoadSubscriptionId);
|
|
57
|
+
return this.emitMany(startTime, currentLoadSubscriptionId);
|
|
56
58
|
if (!this.shouldReload(change))
|
|
57
59
|
return;
|
|
58
60
|
try {
|
|
@@ -60,17 +62,17 @@ class CollectionStore extends a_store_1.default {
|
|
|
60
62
|
const key = _.get(documentKey, '_id', '').toString();
|
|
61
63
|
if (document && this._incremental) {
|
|
62
64
|
if ('delete' === type)
|
|
63
|
-
return this.emitDelete(currentLoadSubscriptionId, key);
|
|
65
|
+
return this.emitDelete(startTime, currentLoadSubscriptionId, key);
|
|
64
66
|
for (const populate of this._populates) {
|
|
65
67
|
yield this._model.populate(document, populate);
|
|
66
68
|
}
|
|
67
69
|
if (_.isEmpty(this._virtuals))
|
|
68
|
-
return this.emitMany(currentLoadSubscriptionId, { data: document });
|
|
70
|
+
return this.emitMany(startTime, currentLoadSubscriptionId, { data: document });
|
|
69
71
|
const replacement = _.cloneDeep(_.omit(document.toJSON(), this._virtuals));
|
|
70
72
|
for (const virtual of this._virtuals) {
|
|
71
73
|
replacement[virtual] = yield Promise.resolve(document[virtual]);
|
|
72
74
|
}
|
|
73
|
-
return this.emitMany(currentLoadSubscriptionId, { data: replacement });
|
|
75
|
+
return this.emitMany(startTime, currentLoadSubscriptionId, { data: replacement });
|
|
74
76
|
}
|
|
75
77
|
else {
|
|
76
78
|
let data = yield this._model
|
|
@@ -94,11 +96,11 @@ class CollectionStore extends a_store_1.default {
|
|
|
94
96
|
data = replacements;
|
|
95
97
|
}
|
|
96
98
|
if (this.isQueryChange(currentLoadSubscriptionId)) {
|
|
97
|
-
this.emitMany(currentLoadSubscriptionId, { total: this._totalCount, data, recounting: true });
|
|
98
|
-
yield this.sendCount(currentLoadSubscriptionId);
|
|
99
|
+
this.emitMany(startTime, currentLoadSubscriptionId, { total: this._totalCount, data, recounting: true });
|
|
100
|
+
yield this.sendCount(startTime, currentLoadSubscriptionId);
|
|
99
101
|
}
|
|
100
102
|
else {
|
|
101
|
-
this.emitMany(currentLoadSubscriptionId, { total: this._totalCount, data });
|
|
103
|
+
this.emitMany(startTime, currentLoadSubscriptionId, { total: this._totalCount, data });
|
|
102
104
|
this.delaySendCount(currentLoadSubscriptionId);
|
|
103
105
|
}
|
|
104
106
|
this.removeSubscriptionDiff(currentLoadSubscriptionId);
|
|
@@ -106,7 +108,7 @@ class CollectionStore extends a_store_1.default {
|
|
|
106
108
|
}
|
|
107
109
|
catch (error) {
|
|
108
110
|
console.error('[@owservable] -> CollectionStore::load Error:', { change, error });
|
|
109
|
-
this.emitError(currentLoadSubscriptionId, error);
|
|
111
|
+
this.emitError(startTime, currentLoadSubscriptionId, error);
|
|
110
112
|
}
|
|
111
113
|
});
|
|
112
114
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"collection.store.js","sourceRoot":"","sources":["../../src/store/collection.store.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;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,CAAC,CAAC;wBAErF,IAAI,CAAC,cAAc,CAAC,yBAAyB,CAAC,CAAC;oBAChD,CAAC;oBAED,IAAI,CAAC,sBAAsB,CAAC,yBAAyB,CAAC,CAAC;gBACxD,CAAC;YACF,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBAChB,OAAO,CAAC,KAAK,CAAC,+CAA+C,EAAE,EAAC,MAAM,EAAE,KAAK,EAAC,CAAC,CAAC;gBAChF,IAAI,CAAC,SAAS,CAAC,SAAS,EAAE,yBAAyB,EAAE,KAAK,CAAC,CAAC;YAC7D,CAAC;QACF,CAAC;KAAA;IAES,iBAAiB;QAC1B,KAAK,CAAC,iBAAiB,EAAE,CAAC;QAE1B,MAAM,EAAC,WAAW,GAAG,KAAK,EAAE,IAAI,GAAG,CAAC,EAAE,QAAQ,EAAC,GAAG,IAAI,CAAC,OAAO,CAAC;QAC/D,IAAI,CAAC,YAAY,GAAG,WAAW,CAAC;QAEhC,IAAI,CAAC,OAAO,GAAG,EAAE,CAAC;QAClB,IAAI,QAAQ,EAAE,CAAC;YACd,IAAI,CAAC,OAAO,GAAG;gBACd,IAAI,EAAE,CAAC,IAAI,GAAG,CAAC,CAAC,GAAG,QAAQ;gBAC3B,KAAK,EAAE,QAAQ;aACf,CAAC;QACH,CAAC;IACF,CAAC;CACD;AAhID,kCAgIC"}
|
package/lib/store/count.store.js
CHANGED
|
@@ -12,6 +12,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
12
12
|
const lodash_1 = require("lodash");
|
|
13
13
|
const a_store_1 = require("./a.store");
|
|
14
14
|
const store_type_enum_1 = require("../_enums/store.type.enum");
|
|
15
|
+
const get_hrtime_as_number_1 = require("../functions/performance/get.hrtime.as.number");
|
|
15
16
|
class CountStore extends a_store_1.default {
|
|
16
17
|
constructor(model, target) {
|
|
17
18
|
super(model, target);
|
|
@@ -34,12 +35,13 @@ class CountStore extends a_store_1.default {
|
|
|
34
35
|
}
|
|
35
36
|
load(change) {
|
|
36
37
|
return __awaiter(this, void 0, void 0, function* () {
|
|
38
|
+
const startTime = (0, get_hrtime_as_number_1.default)();
|
|
37
39
|
if ((0, lodash_1.isEmpty)(this._config))
|
|
38
|
-
return this.emitOne(this._subscriptionId);
|
|
40
|
+
return this.emitOne(startTime, this._subscriptionId);
|
|
39
41
|
if (!this.shouldReload(change))
|
|
40
42
|
return;
|
|
41
43
|
const count = yield this._model.countDocuments(this._query);
|
|
42
|
-
this.emitOne(this._subscriptionId, count);
|
|
44
|
+
this.emitOne(startTime, this._subscriptionId, count);
|
|
43
45
|
});
|
|
44
46
|
}
|
|
45
47
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"count.store.js","sourceRoot":"","sources":["../../src/store/count.store.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;;;;;;;;;AACb,mCAA+B;AAG/B,uCAA+B;AAC/B,+DAAmD;
|
|
1
|
+
{"version":3,"file":"count.store.js","sourceRoot":"","sources":["../../src/store/count.store.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;;;;;;;;;AACb,mCAA+B;AAG/B,uCAA+B;AAC/B,+DAAmD;AACnD,wFAA8E;AAE9E,MAAqB,UAAW,SAAQ,iBAAM;IAC7C,YAAY,KAAiB,EAAE,MAAc;QAC5C,KAAK,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;QACrB,IAAI,CAAC,KAAK,GAAG,yBAAU,CAAC,KAAK,CAAC;QAC9B,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,UAAU,CAAC,SAAS,CAAC,CAAC;IACnD,CAAC;IAES,YAAY,CAAC,MAAW;QACjC,IAAI,IAAI,CAAC,qBAAqB,CAAC,MAAM,CAAC;YAAE,OAAO,IAAI,CAAC;QAEpD,MAAM,EAAC,aAAa,EAAE,IAAI,EAAC,GAAG,MAAM,CAAC;QACrC,QAAQ,IAAI,EAAE,CAAC;YACd,KAAK,QAAQ,CAAC;YACd,KAAK,QAAQ;gBACZ,OAAO,IAAI,CAAC;YAEb,KAAK,SAAS,CAAC;YACf,KAAK,QAAQ,CAAC;YACd;gBACC,OAAO,KAAK,CAAC;QACf,CAAC;IACF,CAAC;IAEe,IAAI,CAAC,MAAW;;YAC/B,MAAM,SAAS,GAAW,IAAA,8BAAiB,GAAE,CAAC;YAE9C,IAAI,IAAA,gBAAO,EAAC,IAAI,CAAC,OAAO,CAAC;gBAAE,OAAO,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,IAAI,CAAC,eAAe,CAAC,CAAC;YAChF,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC;gBAAE,OAAO;YAEvC,MAAM,KAAK,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,cAAc,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;YAC5D,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,IAAI,CAAC,eAAe,EAAE,KAAK,CAAC,CAAC;QACtD,CAAC;KAAA;CACD;AAhCD,6BAgCC"}
|
|
@@ -15,6 +15,7 @@ const operators_1 = require("rxjs/operators");
|
|
|
15
15
|
const a_store_1 = require("./a.store");
|
|
16
16
|
const store_type_enum_1 = require("../_enums/store.type.enum");
|
|
17
17
|
const observable_model_1 = require("../mongodb/functions/observable.model");
|
|
18
|
+
const get_hrtime_as_number_1 = require("../functions/performance/get.hrtime.as.number");
|
|
18
19
|
const _getIdFromQuery = (query) => (_.isString(query) ? query : _.get(query, '_id', '').toString());
|
|
19
20
|
class DocumentStore extends a_store_1.default {
|
|
20
21
|
constructor(model, target) {
|
|
@@ -49,7 +50,7 @@ class DocumentStore extends a_store_1.default {
|
|
|
49
50
|
case 'insert':
|
|
50
51
|
return !id;
|
|
51
52
|
case 'replace':
|
|
52
|
-
case 'update':
|
|
53
|
+
case 'update': {
|
|
53
54
|
if (id && id === key)
|
|
54
55
|
return true;
|
|
55
56
|
if (!description)
|
|
@@ -60,20 +61,22 @@ class DocumentStore extends a_store_1.default {
|
|
|
60
61
|
const us = _.concat(removedFields, _.keys(updatedFields));
|
|
61
62
|
const qs = _.keys(this._fields);
|
|
62
63
|
return !_.isEmpty(_.intersection(qs, us));
|
|
64
|
+
}
|
|
63
65
|
}
|
|
64
66
|
return false;
|
|
65
67
|
}
|
|
66
68
|
load(change) {
|
|
67
69
|
return __awaiter(this, void 0, void 0, function* () {
|
|
70
|
+
const startTime = (0, get_hrtime_as_number_1.default)();
|
|
68
71
|
if (_.isEmpty(this._config))
|
|
69
|
-
return this.emitOne(this._subscriptionId);
|
|
72
|
+
return this.emitOne(startTime, this._subscriptionId);
|
|
70
73
|
if (!this.shouldReload(change))
|
|
71
74
|
return;
|
|
72
75
|
const id = _getIdFromQuery(this._query);
|
|
73
76
|
const { operationType: type, documentKey } = change;
|
|
74
77
|
const key = _.get(documentKey, '_id', '').toString();
|
|
75
78
|
if (type === 'delete' && id === key)
|
|
76
|
-
return this.emitDelete(this._subscriptionId, key);
|
|
79
|
+
return this.emitDelete(startTime, this._subscriptionId, key);
|
|
77
80
|
try {
|
|
78
81
|
let data;
|
|
79
82
|
if (!_.isEmpty(this._sort))
|
|
@@ -81,22 +84,22 @@ class DocumentStore extends a_store_1.default {
|
|
|
81
84
|
else
|
|
82
85
|
data = id ? yield this._loadDocumentById(id) : yield this._loadDocument();
|
|
83
86
|
if (!data)
|
|
84
|
-
return this.emitOne(this._subscriptionId);
|
|
87
|
+
return this.emitOne(startTime, this._subscriptionId);
|
|
85
88
|
for (const populate of this._populates) {
|
|
86
89
|
if (data === null || data === void 0 ? void 0 : data.populate)
|
|
87
90
|
yield data.populate(populate);
|
|
88
91
|
}
|
|
89
92
|
if (_.isEmpty(this._virtuals))
|
|
90
|
-
return this.emitOne(this._subscriptionId, data.toJSON());
|
|
93
|
+
return this.emitOne(startTime, this._subscriptionId, data.toJSON());
|
|
91
94
|
const jsonData = _.cloneDeep(_.omit(data.toJSON(), this._virtuals));
|
|
92
95
|
for (const virtual of this._virtuals) {
|
|
93
96
|
jsonData[virtual] = yield Promise.resolve(data[virtual]);
|
|
94
97
|
}
|
|
95
|
-
this.emitOne(this._subscriptionId, jsonData);
|
|
98
|
+
this.emitOne(startTime, this._subscriptionId, jsonData);
|
|
96
99
|
}
|
|
97
100
|
catch (error) {
|
|
98
101
|
console.error('[@owservable] -> DocumentStore::load Error:', { change, error });
|
|
99
|
-
this.emitError(this._subscriptionId, error);
|
|
102
|
+
this.emitError(startTime, this._subscriptionId, error);
|
|
100
103
|
}
|
|
101
104
|
});
|
|
102
105
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"document.store.js","sourceRoot":"","sources":["../../src/store/document.store.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;;;;;;;;;AAEb,4BAA4B;AAE5B,+BAAoC;AACpC,8CAAoD;AAEpD,uCAA+B;AAC/B,+DAAmD;AACnD,4EAAoE;
|
|
1
|
+
{"version":3,"file":"document.store.js","sourceRoot":"","sources":["../../src/store/document.store.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;;;;;;;;;AAEb,4BAA4B;AAE5B,+BAAoC;AACpC,8CAAoD;AAEpD,uCAA+B;AAC/B,+DAAmD;AACnD,4EAAoE;AACpE,wFAA8E;AAG9E,MAAM,eAAe,GAAG,CAAC,KAAU,EAAU,EAAE,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE,CAAC,CAAC,QAAQ,EAAE,CAAC,CAAC;AAEjH,MAAqB,aAAc,SAAQ,iBAAM;IAChD,YAAY,KAAU,EAAE,MAAc;QACrC,KAAK,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;QACrB,IAAI,CAAC,KAAK,GAAG,yBAAU,CAAC,QAAQ,CAAC;QACjC,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,aAAa,CAAC,SAAS,CAAC,CAAC;IACtD,CAAC;IAES,iBAAi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AAM;iBACjC,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,OAAO,CAAC;iBAE7C,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC;iBAChB,UAAU,CAAC,EAAC,YAAY,EAAE,IAAI,EAAC,CAAC,CAAC;YACnC,OAAO,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QACtB,CAAC;KAAA;IAEa,aAAa;;YAC1B,OAAO,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;QACvD,CAAC;KAAA;CACD;AA1HD,gCA0HC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "owservable",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.96",
|
|
4
4
|
"description": "owservable backend",
|
|
5
5
|
"engines": {
|
|
6
6
|
"node": ">=20"
|
|
@@ -36,15 +36,15 @@
|
|
|
36
36
|
"srctree": "dir src /s /b > srctree.txt"
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@owservable/actions": "^0.1.
|
|
40
|
-
"@owservable/folders": "^0.1.
|
|
41
|
-
"@types/lodash": "^4.17.
|
|
42
|
-
"@types/node": "^
|
|
39
|
+
"@owservable/actions": "^0.1.101",
|
|
40
|
+
"@owservable/folders": "^0.1.101",
|
|
41
|
+
"@types/lodash": "^4.17.13",
|
|
42
|
+
"@types/node": "^22.9.0",
|
|
43
43
|
"@types/node-cron": "^3.0.11",
|
|
44
44
|
"deprecated-decorator": "^0.1.6",
|
|
45
45
|
"jsondiffpatch": "^0.5.0",
|
|
46
46
|
"lodash": "^4.17.20",
|
|
47
|
-
"mongoose": "^8.
|
|
47
|
+
"mongoose": "^8.8.0",
|
|
48
48
|
"node-cron": "^3.0.3",
|
|
49
49
|
"rxjs": "^7.8.1",
|
|
50
50
|
"sift": "^17.1.3"
|
|
@@ -57,20 +57,20 @@
|
|
|
57
57
|
"chai": "4.4.0",
|
|
58
58
|
"chai-rx": "^0.0.4",
|
|
59
59
|
"coveralls": "^3.0.9",
|
|
60
|
-
"mocha": "^10.
|
|
60
|
+
"mocha": "^10.8.2",
|
|
61
61
|
"nyc": "^17.1.0",
|
|
62
62
|
"prettier": "^3.3.3",
|
|
63
63
|
"rewire": "^7.0.0",
|
|
64
|
-
"skeletest": "^0.5.
|
|
64
|
+
"skeletest": "^0.5.3",
|
|
65
65
|
"sonarjs": "^1.0.0",
|
|
66
66
|
"source-map-support": "^0.5.21",
|
|
67
|
-
"strictr": "^0.2.
|
|
67
|
+
"strictr": "^0.2.7",
|
|
68
68
|
"ts-node": "^10.9.2",
|
|
69
69
|
"tslint": "^6.1.3",
|
|
70
70
|
"tslint-config-prettier": "^1.18.0",
|
|
71
71
|
"tslint-etc": "^1.13.7",
|
|
72
72
|
"tslint-no-unused-expression-chai": "^0.1.4",
|
|
73
|
-
"typedoc": "^0.26.
|
|
73
|
+
"typedoc": "^0.26.11",
|
|
74
74
|
"typescript": "^5.6.3"
|
|
75
75
|
}
|
|
76
76
|
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const add_up_and_down_indices_to_attributes_1 = require("./add.up.and.down.indices.to.attributes");
|
|
4
|
-
const addBothIndicesToAttributes = (schema, attributes) => {
|
|
5
|
-
console.warn('\n - Calling deprecated function "addUpAndDownIndicesToAttributes"! Please use "addUpAndDownIndicesToAttributes", instead!\n');
|
|
6
|
-
(0, add_up_and_down_indices_to_attributes_1.default)(schema, attributes);
|
|
7
|
-
};
|
|
8
|
-
exports.default = addBothIndicesToAttributes;
|
|
9
|
-
//# sourceMappingURL=add.both.indices.to.attributes.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"add.both.indices.to.attributes.js","sourceRoot":"","sources":["../../../../src/mongodb/functions/index/add.both.indices.to.attributes.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAMb,mGAAsF;AAOtF,MAAM,0BAA0B,GAAG,CAAC,MAAc,EAAE,UAAoB,EAAQ,EAAE;IACjF,OAAO,CAAC,IAAI,CAAC,iIAAiI,CAAC,CAAC;IAChJ,IAAA,+CAA+B,EAAC,MAAM,EAAE,UAAU,CAAC,CAAC;AAErD,CAAC,CAAC;AACF,kBAAe,0BAA0B,CAAC"}
|