owservable 0.6.1 → 0.6.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/lib/_types/watcher.type.d.ts +5 -0
- package/lib/_types/{observer.type.js → watcher.type.js} +1 -1
- package/lib/_types/watcher.type.js.map +1 -0
- package/lib/functions/initiate.observers.js +4 -4
- package/lib/functions/initiate.observers.js.map +1 -1
- package/lib/owservable.d.ts +2 -2
- package/package.json +1 -1
- package/lib/_types/observer.type.d.ts +0 -5
- package/lib/_types/observer.type.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"watcher.type.js","sourceRoot":"","sources":["../../src/_types/watcher.type.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC"}
|
|
@@ -9,12 +9,12 @@ const _initiateObservers = (folder) => {
|
|
|
9
9
|
const files = (0, lodash_1.filter)(subfolderNames, (name) => !fs.lstatSync(path.join(folder, name)).isDirectory());
|
|
10
10
|
(0, lodash_1.each)(files, (file) => {
|
|
11
11
|
const absoluteFilePath = path.join(folder, file);
|
|
12
|
-
const
|
|
13
|
-
const { init,
|
|
12
|
+
const watcher = require(absoluteFilePath).default;
|
|
13
|
+
const { init, watch } = watcher;
|
|
14
14
|
if ((0, lodash_1.isFunction)(init))
|
|
15
|
-
init().then(() =>
|
|
15
|
+
init().then(() => watch === null || watch === void 0 ? void 0 : watch());
|
|
16
16
|
else
|
|
17
|
-
|
|
17
|
+
watch === null || watch === void 0 ? void 0 : watch();
|
|
18
18
|
});
|
|
19
19
|
const folders = (0, lodash_1.filter)(subfolderNames, (name) => fs.lstatSync(path.join(folder, name)).isDirectory());
|
|
20
20
|
(0, lodash_1.each)(folders, (sub) => _initiateObservers(path.join(folder, sub)));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"initiate.observers.js","sourceRoot":"","sources":["../../src/functions/initiate.observers.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,yBAAyB;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C,IAAI,EAAE,KAAK,EAAC,GAAG,OAAO,CAAC;QAC9B,IAAI,IAAA,mBAAU,EAAC,IAAI,CAAC;YAAE,IAAI,EAAE,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,KAAK,aAAL,KAAK,uBAAL,KAAK,EAAI,CAAC,CAAC;;YAC9C,KAAK,aAAL,KAAK,uBAAL,KAAK,EAAI,CAAC;IAChB,CAAC,CAAC,CAAC;IAEH,MAAM,OAAO,GAAG,IAAA,eAAM,EAAC,cAAc,EAAE,CAAC,IAAY,EAAE,EAAE,CAAC,EAAE,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC;IAC9G,IAAA,aAAI,EAAC,OAAO,EAAE,CAAC,GAAW,EAAE,EAAE,CAAC,kBAAkB,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC;AAC5E,CAAC,CAAC;AAEF,MAAM,iBAAiB,GAAG,CAAC,IAAY,EAAE,OAAe,WAAW,EAAQ,EAAE;IAC5E,MAAM,OAAO,GAAa,IAAA,4CAA6B,EAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IACpE,IAAA,aAAI,EAAC,OAAO,EAAE,kBAAkB,CAAC,CAAC;AACnC,CAAC,CAAC;AACF,kBAAe,iBAAiB,CAAC"}
|
package/lib/owservable.d.ts
CHANGED
|
@@ -2,10 +2,10 @@ import OwservableClient from './owservable.client';
|
|
|
2
2
|
import EStoreType from './_enums/store.type.enum';
|
|
3
3
|
import ConnectionManagerRefreshType from './_types/connection.manager.refresh.type';
|
|
4
4
|
import CronJobType from './_types/cronjob.type';
|
|
5
|
-
import ObserverType from './_types/observer.type';
|
|
6
5
|
import StoreScopeType from './_types/store.scope.type';
|
|
7
6
|
import StoreSubscriptionConfigType from './_types/store.subscription.config.type';
|
|
8
7
|
import StoreSubscriptionUpdateType from './_types/store.subscription.update.type';
|
|
8
|
+
import WatcherType from './_types/watcher.type';
|
|
9
9
|
import WorkerType from './_types/worker.type';
|
|
10
10
|
import IConnectionManager from './auth/i.connection.manager';
|
|
11
11
|
import initiateWorkers from './functions/initiate.workers';
|
|
@@ -27,6 +27,6 @@ import CountStore from './store/count.store';
|
|
|
27
27
|
import DocumentStore from './store/document.store';
|
|
28
28
|
import CollectionStore from './store/collection.store';
|
|
29
29
|
import storeFactory from './store/factories/store.factory';
|
|
30
|
-
export { OwservableClient, EStoreType, ConnectionManagerRefreshType, CronJobType,
|
|
30
|
+
export { OwservableClient, EStoreType, ConnectionManagerRefreshType, CronJobType, StoreScopeType, StoreSubscriptionConfigType, StoreSubscriptionUpdateType, WatcherType, WorkerType, IConnectionManager, getSubfolderPathsByFolderName, initiateWorkers, initiateObservers, initiateCronjobs, DataMiddlewareMap, MongoDBConnector, CollectionsModelsMap, processModels, observableModel, observableDatabase, RoutesMap, addFastifyRoutes, cleanRelativePath, processFastifyBlipp, AStore, CountStore, DocumentStore, CollectionStore, storeFactory };
|
|
31
31
|
declare const Owservable: {};
|
|
32
32
|
export default Owservable;
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"observer.type.js","sourceRoot":"","sources":["../../src/_types/observer.type.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC"}
|