owservable 0.8.28 → 0.8.31
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/connection.manager.refresh.type.d.ts +1 -1
- package/lib/_types/cronjob.type.d.ts +1 -1
- package/lib/_types/store.scope.type.d.ts +1 -1
- package/lib/_types/store.subscription.config.type.d.ts +1 -1
- package/lib/_types/store.subscription.update.type.d.ts +1 -1
- package/lib/_types/subscription.methods.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/action/add.action.cronjobs.d.ts +1 -0
- package/lib/functions/action/add.action.cronjobs.js +25 -0
- package/lib/functions/action/add.action.cronjobs.js.map +1 -0
- package/lib/functions/action/add.action.watchers.d.ts +1 -0
- package/lib/functions/action/add.action.watchers.js +22 -0
- package/lib/functions/action/add.action.watchers.js.map +1 -0
- package/lib/functions/action/add.action.workers.d.ts +1 -0
- package/lib/functions/action/add.action.workers.js +22 -0
- package/lib/functions/action/add.action.workers.js.map +1 -0
- package/lib/functions/execute/execute.cronjob.d.ts +3 -0
- package/lib/functions/execute/execute.cronjob.js +13 -0
- package/lib/functions/execute/execute.cronjob.js.map +1 -0
- package/lib/functions/execute/execute.on.files.recursively.d.ts +2 -0
- package/lib/functions/execute/execute.on.files.recursively.js +18 -0
- package/lib/functions/execute/execute.on.files.recursively.js.map +1 -0
- package/lib/functions/execute/execute.processes.in.folder.d.ts +2 -0
- package/lib/functions/execute/execute.processes.in.folder.js +11 -0
- package/lib/functions/execute/execute.processes.in.folder.js.map +1 -0
- package/lib/functions/execute/execute.watcher.d.ts +3 -0
- package/lib/functions/execute/execute.watcher.js +12 -0
- package/lib/functions/execute/execute.watcher.js.map +1 -0
- package/lib/functions/execute/execute.worker.d.ts +3 -0
- package/lib/functions/execute/execute.worker.js +12 -0
- package/lib/functions/execute/execute.worker.js.map +1 -0
- package/lib/functions/initiate.cronjobs.d.ts +1 -1
- package/lib/functions/initiate.cronjobs.js +4 -12
- package/lib/functions/initiate.cronjobs.js.map +1 -1
- package/lib/functions/initiate.watchers.d.ts +1 -1
- package/lib/functions/initiate.watchers.js +4 -11
- package/lib/functions/initiate.watchers.js.map +1 -1
- package/lib/functions/initiate.workers.d.ts +1 -1
- package/lib/functions/initiate.workers.js +4 -11
- package/lib/functions/initiate.workers.js.map +1 -1
- package/lib/mongodb/functions/index/add.both.indices.to.attributes.d.ts +3 -0
- package/lib/mongodb/functions/index/add.both.indices.to.attributes.js +10 -0
- package/lib/mongodb/functions/index/add.both.indices.to.attributes.js.map +1 -0
- package/lib/mongodb/functions/index/add.down.indices.to.attributes.d.ts +3 -0
- package/lib/mongodb/functions/index/add.down.indices.to.attributes.js +6 -0
- package/lib/mongodb/functions/index/add.down.indices.to.attributes.js.map +1 -0
- package/lib/mongodb/functions/index/add.index.to.attributes.d.ts +3 -0
- package/lib/mongodb/functions/index/add.index.to.attributes.js +12 -0
- package/lib/mongodb/functions/index/add.index.to.attributes.js.map +1 -0
- package/lib/mongodb/functions/index/add.up.indices.to.attributes.d.ts +3 -0
- package/lib/mongodb/functions/index/add.up.indices.to.attributes.js +6 -0
- package/lib/mongodb/functions/index/add.up.indices.to.attributes.js.map +1 -0
- package/lib/mongodb/functions/observable.database.js +5 -5
- package/lib/mongodb/functions/observable.database.js.map +1 -1
- package/lib/mongodb/functions/observable.model.js +3 -3
- package/lib/mongodb/functions/observable.model.js.map +1 -1
- package/lib/mongodb/functions/process.models.js +2 -2
- package/lib/mongodb/functions/process.models.js.map +1 -1
- package/lib/mongodb/mongodb.connector.js +1 -1
- package/lib/mongodb/mongodb.connector.js.map +1 -1
- package/lib/owservable.d.ts +13 -1
- package/lib/owservable.js +25 -1
- package/lib/owservable.js.map +1 -1
- package/package.json +71 -70
- package/lib/functions/initiate.processes.d.ts +0 -2
- package/lib/functions/initiate.processes.js +0 -23
- package/lib/functions/initiate.processes.js.map +0 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
type StoreScopeType = 'count' | 'one' | 'many';
|
|
2
2
|
export default StoreScopeType;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import StoreScopeType from './store.scope.type';
|
|
2
2
|
import StoreSubscriptionConfigType from './store.subscription.config.type';
|
|
3
|
-
|
|
3
|
+
type StoreSubscriptionUpdateType = {
|
|
4
4
|
target: string;
|
|
5
5
|
scope: StoreScopeType;
|
|
6
6
|
config: StoreSubscriptionConfigType;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function addActionCronjobs(root: string, folderName: string): void;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const lodash_1 = require("lodash");
|
|
4
|
+
const folders_1 = require("@owservable/folders");
|
|
5
|
+
const execute_cronjob_1 = require("../execute/execute.cronjob");
|
|
6
|
+
function addActionCronjobs(root, folderName) {
|
|
7
|
+
const actionPaths = (0, folders_1.listSubfoldersFilesByFolderName)(root, folderName);
|
|
8
|
+
for (const actionPath of actionPaths) {
|
|
9
|
+
const ActionClass = require(actionPath).default;
|
|
10
|
+
const action = new ActionClass();
|
|
11
|
+
if ((0, lodash_1.isFunction)(action.schedule) && (0, lodash_1.isFunction)(action.asCronjob)) {
|
|
12
|
+
const job = {
|
|
13
|
+
schedule: action.schedule(),
|
|
14
|
+
job: action.asCronjob
|
|
15
|
+
};
|
|
16
|
+
if ((0, lodash_1.isFunction)(action.cronjobOptions))
|
|
17
|
+
(0, lodash_1.set)(job, 'options', action.cronjobOptions());
|
|
18
|
+
if ((0, lodash_1.isFunction)(action.asCronjobInit))
|
|
19
|
+
(0, lodash_1.set)(job, 'init', action.asCronjobInit());
|
|
20
|
+
(0, execute_cronjob_1.default)(job);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
exports.default = addActionCronjobs;
|
|
25
|
+
//# sourceMappingURL=add.action.cronjobs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"add.action.cronjobs.js","sourceRoot":"","sources":["../../../src/functions/action/add.action.cronjobs.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,mCAAuC;AAGvC,iDAAoE;AAGpE,gEAAwD;AAExD,SAAwB,iBAAiB,CAAC,IAAY,EAAE,UAAkB;IACzE,MAAM,WAAW,GAAa,IAAA,yCAA+B,EAAC,IAAI,EAAE,UAAU,CAAC,CAAC;IAEhF,KAAK,MAAM,UAAU,IAAI,WAAW,EAAE;QAErC,MAAM,WAAW,GAAuC,OAAO,CAAC,UAAU,CAAC,CAAC,OAAO,CAAC;QACpF,MAAM,MAAM,GAA6B,IAAI,WAAW,EAAE,CAAC;QAE3D,IAAI,IAAA,mBAAU,EAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,IAAA,mBAAU,EAAC,MAAM,CAAC,SAAS,CAAC,EAAE;YAChE,MAAM,GAAG,GAAgB;gBACxB,QAAQ,EAAE,MAAM,CAAC,QAAQ,EAAE;gBAC3B,GAAG,EAAE,MAAM,CAAC,SAAS;aACrB,CAAC;YAEF,IAAI,IAAA,mBAAU,EAAC,MAAM,CAAC,cAAc,CAAC;gBAAE,IAAA,YAAG,EAAC,GAAG,EAAE,SAAS,EAAE,MAAM,CAAC,cAAc,EAAE,CAAC,CAAC;YACpF,IAAI,IAAA,mBAAU,EAAC,MAAM,CAAC,aAAa,CAAC;gBAAE,IAAA,YAAG,EAAC,GAAG,EAAE,MAAM,EAAE,MAAM,CAAC,aAAa,EAAE,CAAC,CAAC;YAE/E,IAAA,yBAAc,EAAC,GAAG,CAAC,CAAC;SACpB;KACD;AACF,CAAC;AApBD,oCAoBC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function addActionWatchers(root: string, folderName: string): void;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const lodash_1 = require("lodash");
|
|
4
|
+
const folders_1 = require("@owservable/folders");
|
|
5
|
+
const execute_watcher_1 = require("../execute/execute.watcher");
|
|
6
|
+
function addActionWatchers(root, folderName) {
|
|
7
|
+
const actionPaths = (0, folders_1.listSubfoldersFilesByFolderName)(root, folderName);
|
|
8
|
+
for (const actionPath of actionPaths) {
|
|
9
|
+
const ActionClass = require(actionPath).default;
|
|
10
|
+
const action = new ActionClass();
|
|
11
|
+
if ((0, lodash_1.isFunction)(action.asWatcher)) {
|
|
12
|
+
const job = {
|
|
13
|
+
watch: action.asWatcher
|
|
14
|
+
};
|
|
15
|
+
if ((0, lodash_1.isFunction)(action.asWatcherInit))
|
|
16
|
+
(0, lodash_1.set)(job, 'init', action.asWatcherInit());
|
|
17
|
+
(0, execute_watcher_1.default)(job);
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
exports.default = addActionWatchers;
|
|
22
|
+
//# sourceMappingURL=add.action.watchers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"add.action.watchers.js","sourceRoot":"","sources":["../../../src/functions/action/add.action.watchers.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,mCAAuC;AAGvC,iDAAoE;AAGpE,gEAAwD;AAExD,SAAwB,iBAAiB,CAAC,IAAY,EAAE,UAAkB;IACzE,MAAM,WAAW,GAAa,IAAA,yCAA+B,EAAC,IAAI,EAAE,UAAU,CAAC,CAAC;IAEhF,KAAK,MAAM,UAAU,IAAI,WAAW,EAAE;QAErC,MAAM,WAAW,GAAuC,OAAO,CAAC,UAAU,CAAC,CAAC,OAAO,CAAC;QACpF,MAAM,MAAM,GAA6B,IAAI,WAAW,EAAE,CAAC;QAE3D,IAAI,IAAA,mBAAU,EAAC,MAAM,CAAC,SAAS,CAAC,EAAE;YACjC,MAAM,GAAG,GAAgB;gBACxB,KAAK,EAAE,MAAM,CAAC,SAAS;aACvB,CAAC;YACF,IAAI,IAAA,mBAAU,EAAC,MAAM,CAAC,aAAa,CAAC;gBAAE,IAAA,YAAG,EAAC,GAAG,EAAE,MAAM,EAAE,MAAM,CAAC,aAAa,EAAE,CAAC,CAAC;YAE/E,IAAA,yBAAc,EAAC,GAAG,CAAC,CAAC;SACpB;KACD;AACF,CAAC;AAjBD,oCAiBC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function addActionWorkers(root: string, folderName: string): void;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const lodash_1 = require("lodash");
|
|
4
|
+
const folders_1 = require("@owservable/folders");
|
|
5
|
+
const execute_worker_1 = require("../execute/execute.worker");
|
|
6
|
+
function addActionWorkers(root, folderName) {
|
|
7
|
+
const actionPaths = (0, folders_1.listSubfoldersFilesByFolderName)(root, folderName);
|
|
8
|
+
for (const actionPath of actionPaths) {
|
|
9
|
+
const ActionClass = require(actionPath).default;
|
|
10
|
+
const action = new ActionClass();
|
|
11
|
+
if ((0, lodash_1.isFunction)(action.asWorker)) {
|
|
12
|
+
const job = {
|
|
13
|
+
work: action.asWorker
|
|
14
|
+
};
|
|
15
|
+
if ((0, lodash_1.isFunction)(action.asWorkerInit))
|
|
16
|
+
(0, lodash_1.set)(job, 'init', action.asWorkerInit());
|
|
17
|
+
(0, execute_worker_1.default)(job);
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
exports.default = addActionWorkers;
|
|
22
|
+
//# sourceMappingURL=add.action.workers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"add.action.workers.js","sourceRoot":"","sources":["../../../src/functions/action/add.action.workers.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,mCAAuC;AAGvC,iDAAoE;AAGpE,8DAAsD;AAEtD,SAAwB,gBAAgB,CAAC,IAAY,EAAE,UAAkB;IACxE,MAAM,WAAW,GAAa,IAAA,yCAA+B,EAAC,IAAI,EAAE,UAAU,CAAC,CAAC;IAEhF,KAAK,MAAM,UAAU,IAAI,WAAW,EAAE;QAErC,MAAM,WAAW,GAAsC,OAAO,CAAC,UAAU,CAAC,CAAC,OAAO,CAAC;QACnF,MAAM,MAAM,GAA4B,IAAI,WAAW,EAAE,CAAC;QAE1D,IAAI,IAAA,mBAAU,EAAC,MAAM,CAAC,QAAQ,CAAC,EAAE;YAChC,MAAM,GAAG,GAAe;gBACvB,IAAI,EAAE,MAAM,CAAC,QAAQ;aACrB,CAAC;YACF,IAAI,IAAA,mBAAU,EAAC,MAAM,CAAC,YAAY,CAAC;gBAAE,IAAA,YAAG,EAAC,GAAG,EAAE,MAAM,EAAE,MAAM,CAAC,YAAY,EAAE,CAAC,CAAC;YAE7E,IAAA,wBAAa,EAAC,GAAG,CAAC,CAAC;SACnB;KACD;AACF,CAAC;AAjBD,mCAiBC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const cron = require("node-cron");
|
|
4
|
+
const lodash_1 = require("lodash");
|
|
5
|
+
const executeCronjob = (obj) => {
|
|
6
|
+
const { schedule, job, options, init } = obj;
|
|
7
|
+
if ((0, lodash_1.isFunction)(init))
|
|
8
|
+
init().then(() => cron.schedule(schedule, job, options));
|
|
9
|
+
else
|
|
10
|
+
cron.schedule(schedule, job, options);
|
|
11
|
+
};
|
|
12
|
+
exports.default = executeCronjob;
|
|
13
|
+
//# sourceMappingURL=execute.cronjob.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"execute.cronjob.js","sourceRoot":"","sources":["../../../src/functions/execute/execute.cronjob.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,kCAAkC;AAElC,mCAAkC;AAIlC,MAAM,cAAc,GAAG,CAAC,GAAgB,EAAE,EAAE;IAC3C,MAAM,EAAC,QAAQ,EAAE,GAAG,EAAE,OAAO,EAAE,IAAI,EAAC,GAAG,GAAG,CAAC;IAC3C,IAAI,IAAA,mBAAU,EAAC,IAAI,CAAC;QAAE,IAAI,EAAE,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,QAAQ,EAAE,GAAG,EAAE,OAAO,CAAC,CAAC,CAAC;;QAC1E,IAAI,CAAC,QAAQ,CAAC,QAAQ,EAAE,GAAG,EAAE,OAAO,CAAC,CAAC;AAC5C,CAAC,CAAC;AACF,kBAAe,cAAc,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const fs = require("fs");
|
|
4
|
+
const path = require("path");
|
|
5
|
+
const lodash_1 = require("lodash");
|
|
6
|
+
const executeOnFilesRecursively = (folder, execute) => {
|
|
7
|
+
const children = fs.readdirSync(folder);
|
|
8
|
+
const files = (0, lodash_1.filter)(children, (name) => !fs.lstatSync(path.join(folder, name)).isDirectory());
|
|
9
|
+
(0, lodash_1.each)(files, (file) => {
|
|
10
|
+
const absoluteFilePath = path.join(folder, file);
|
|
11
|
+
const obj = require(absoluteFilePath).default;
|
|
12
|
+
execute(obj);
|
|
13
|
+
});
|
|
14
|
+
const folders = (0, lodash_1.filter)(children, (name) => fs.lstatSync(path.join(folder, name)).isDirectory());
|
|
15
|
+
(0, lodash_1.each)(folders, (sub) => executeOnFilesRecursively(path.join(folder, sub), execute));
|
|
16
|
+
};
|
|
17
|
+
exports.default = executeOnFilesRecursively;
|
|
18
|
+
//# sourceMappingURL=execute.on.files.recursively.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"execute.on.files.recursively.js","sourceRoot":"","sources":["../../../src/functions/execute/execute.on.files.recursively.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,yBAAyB;AACzB,6BAA6B;AAE7B,mCAAoC;AAEpC,MAAM,yBAAyB,GAAG,CAAC,MAAc,EAAE,OAAiB,EAAQ,EAAE;IAC7E,MAAM,QAAQ,GAAG,EAAE,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;IACxC,MAAM,KAAK,GAAG,IAAA,eAAM,EAAC,QAAQ,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,EAAE,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC;IAC/F,IAAA,aAAI,EAAC,KAAK,EAAE,CAAC,IAAY,EAAE,EAAE;QAC5B,MAAM,gBAAgB,GAAG,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;QACjD,MAAM,GAAG,GAAQ,OAAO,CAAC,gBAAgB,CAAC,CAAC,OAAO,CAAC;QACnD,OAAO,CAAC,GAAG,CAAC,CAAC;IACd,CAAC,CAAC,CAAC;IAEH,MAAM,OAAO,GAAG,IAAA,eAAM,EAAC,QAAQ,EAAE,CAAC,IAAY,EAAE,EAAE,CAAC,EAAE,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC;IACxG,IAAA,aAAI,EAAC,OAAO,EAAE,CAAC,GAAW,EAAE,EAAE,CAAC,yBAAyB,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC;AAC5F,CAAC,CAAC;AACF,kBAAe,yBAAyB,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const lodash_1 = require("lodash");
|
|
4
|
+
const folders_1 = require("@owservable/folders");
|
|
5
|
+
const execute_on_files_recursively_1 = require("./execute.on.files.recursively");
|
|
6
|
+
const executeProcessesInFolder = (root, folder, execute) => {
|
|
7
|
+
const folders = (0, folders_1.listSubfoldersByName)(root, folder);
|
|
8
|
+
(0, lodash_1.each)(folders, (folder) => (0, execute_on_files_recursively_1.default)(folder, execute));
|
|
9
|
+
};
|
|
10
|
+
exports.default = executeProcessesInFolder;
|
|
11
|
+
//# sourceMappingURL=execute.processes.in.folder.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"execute.processes.in.folder.js","sourceRoot":"","sources":["../../../src/functions/execute/execute.processes.in.folder.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,mCAA4B;AAC5B,iDAAyD;AAEzD,iFAAuE;AAEvE,MAAM,wBAAwB,GAAG,CAAC,IAAY,EAAE,MAAc,EAAE,OAAiB,EAAQ,EAAE;IAC1F,MAAM,OAAO,GAAa,IAAA,8BAAoB,EAAC,IAAI,EAAE,MAAM,CAAC,CAAC;IAC7D,IAAA,aAAI,EAAC,OAAO,EAAE,CAAC,MAAc,EAAE,EAAE,CAAC,IAAA,sCAAyB,EAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;AAC/E,CAAC,CAAC;AACF,kBAAe,wBAAwB,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const lodash_1 = require("lodash");
|
|
4
|
+
const executeWatcher = (obj) => {
|
|
5
|
+
const { init, watch } = obj;
|
|
6
|
+
if ((0, lodash_1.isFunction)(init))
|
|
7
|
+
init().then(() => watch === null || watch === void 0 ? void 0 : watch());
|
|
8
|
+
else
|
|
9
|
+
watch === null || watch === void 0 ? void 0 : watch();
|
|
10
|
+
};
|
|
11
|
+
exports.default = executeWatcher;
|
|
12
|
+
//# sourceMappingURL=execute.watcher.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"execute.watcher.js","sourceRoot":"","sources":["../../../src/functions/execute/execute.watcher.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,mCAAkC;AAIlC,MAAM,cAAc,GAAG,CAAC,GAAgB,EAAE,EAAE;IAC3C,MAAM,EAAC,IAAI,EAAE,KAAK,EAAC,GAAG,GAAG,CAAC;IAC1B,IAAI,IAAA,mBAAU,EAAC,IAAI,CAAC;QAAE,IAAI,EAAE,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,KAAK,aAAL,KAAK,uBAAL,KAAK,EAAI,CAAC,CAAC;;QAC9C,KAAK,aAAL,KAAK,uBAAL,KAAK,EAAI,CAAC;AAChB,CAAC,CAAC;AACF,kBAAe,cAAc,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const lodash_1 = require("lodash");
|
|
4
|
+
const executeWorker = (obj) => {
|
|
5
|
+
const { init, work } = obj;
|
|
6
|
+
if ((0, lodash_1.isFunction)(init))
|
|
7
|
+
init().then(() => work === null || work === void 0 ? void 0 : work());
|
|
8
|
+
else
|
|
9
|
+
work === null || work === void 0 ? void 0 : work();
|
|
10
|
+
};
|
|
11
|
+
exports.default = executeWorker;
|
|
12
|
+
//# sourceMappingURL=execute.worker.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"execute.worker.js","sourceRoot":"","sources":["../../../src/functions/execute/execute.worker.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,mCAAkC;AAIlC,MAAM,aAAa,GAAG,CAAC,GAAe,EAAE,EAAE;IACzC,MAAM,EAAC,IAAI,EAAE,IAAI,EAAC,GAAG,GAAG,CAAC;IACzB,IAAI,IAAA,mBAAU,EAAC,IAAI,CAAC;QAAE,IAAI,EAAE,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,IAAI,aAAJ,IAAI,uBAAJ,IAAI,EAAI,CAAC,CAAC;;QAC7C,IAAI,aAAJ,IAAI,uBAAJ,IAAI,EAAI,CAAC;AACf,CAAC,CAAC;AACF,kBAAe,aAAa,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const initiateCronjobs: (root: string,
|
|
1
|
+
declare const initiateCronjobs: (root: string, folder?: string) => void;
|
|
2
2
|
export default initiateCronjobs;
|
|
@@ -1,17 +1,9 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const
|
|
4
|
-
const
|
|
5
|
-
const
|
|
6
|
-
|
|
7
|
-
const { schedule, job, options, init } = obj;
|
|
8
|
-
if ((0, lodash_1.isFunction)(init))
|
|
9
|
-
init().then(() => cron.schedule(schedule, job, options));
|
|
10
|
-
else
|
|
11
|
-
cron.schedule(schedule, job, options);
|
|
12
|
-
};
|
|
13
|
-
const initiateCronjobs = (root, name = 'cronjobs') => {
|
|
14
|
-
(0, initiate_processes_1.default)(root, name, _execute);
|
|
3
|
+
const execute_cronjob_1 = require("./execute/execute.cronjob");
|
|
4
|
+
const execute_processes_in_folder_1 = require("./execute/execute.processes.in.folder");
|
|
5
|
+
const initiateCronjobs = (root, folder = 'cronjobs') => {
|
|
6
|
+
(0, execute_processes_in_folder_1.default)(root, folder, execute_cronjob_1.default);
|
|
15
7
|
};
|
|
16
8
|
exports.default = initiateCronjobs;
|
|
17
9
|
//# sourceMappingURL=initiate.cronjobs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"initiate.cronjobs.js","sourceRoot":"","sources":["../../src/functions/initiate.cronjobs.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb
|
|
1
|
+
{"version":3,"file":"initiate.cronjobs.js","sourceRoot":"","sources":["../../src/functions/initiate.cronjobs.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,+DAAuD;AACvD,uFAA6E;AAE7E,MAAM,gBAAgB,GAAG,CAAC,IAAY,EAAE,SAAiB,UAAU,EAAQ,EAAE;IAC5E,IAAA,qCAAwB,EAAC,IAAI,EAAE,MAAM,EAAE,yBAAc,CAAC,CAAC;AACxD,CAAC,CAAC;AACF,kBAAe,gBAAgB,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const initiateWatchers: (root: string,
|
|
1
|
+
declare const initiateWatchers: (root: string, folder?: string) => void;
|
|
2
2
|
export default initiateWatchers;
|
|
@@ -1,16 +1,9 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const
|
|
4
|
-
const
|
|
5
|
-
const
|
|
6
|
-
|
|
7
|
-
if ((0, lodash_1.isFunction)(init))
|
|
8
|
-
init().then(() => watch === null || watch === void 0 ? void 0 : watch());
|
|
9
|
-
else
|
|
10
|
-
watch === null || watch === void 0 ? void 0 : watch();
|
|
11
|
-
};
|
|
12
|
-
const initiateWatchers = (root, name = 'watchers') => {
|
|
13
|
-
(0, initiate_processes_1.default)(root, name, _execute);
|
|
3
|
+
const execute_watcher_1 = require("./execute/execute.watcher");
|
|
4
|
+
const execute_processes_in_folder_1 = require("./execute/execute.processes.in.folder");
|
|
5
|
+
const initiateWatchers = (root, folder = 'watchers') => {
|
|
6
|
+
(0, execute_processes_in_folder_1.default)(root, folder, execute_watcher_1.default);
|
|
14
7
|
};
|
|
15
8
|
exports.default = initiateWatchers;
|
|
16
9
|
//# sourceMappingURL=initiate.watchers.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"initiate.watchers.js","sourceRoot":"","sources":["../../src/functions/initiate.watchers.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb
|
|
1
|
+
{"version":3,"file":"initiate.watchers.js","sourceRoot":"","sources":["../../src/functions/initiate.watchers.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,+DAAuD;AACvD,uFAA6E;AAE7E,MAAM,gBAAgB,GAAG,CAAC,IAAY,EAAE,SAAiB,UAAU,EAAQ,EAAE;IAC5E,IAAA,qCAAwB,EAAC,IAAI,EAAE,MAAM,EAAE,yBAAc,CAAC,CAAC;AACxD,CAAC,CAAC;AACF,kBAAe,gBAAgB,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const initiateWorkers: (root: string,
|
|
1
|
+
declare const initiateWorkers: (root: string, folder?: string) => void;
|
|
2
2
|
export default initiateWorkers;
|
|
@@ -1,16 +1,9 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const
|
|
4
|
-
const
|
|
5
|
-
const
|
|
6
|
-
|
|
7
|
-
if ((0, lodash_1.isFunction)(init))
|
|
8
|
-
init().then(() => work === null || work === void 0 ? void 0 : work());
|
|
9
|
-
else
|
|
10
|
-
work === null || work === void 0 ? void 0 : work();
|
|
11
|
-
};
|
|
12
|
-
const initiateWorkers = (root, name = 'workers') => {
|
|
13
|
-
(0, initiate_processes_1.default)(root, name, _execute);
|
|
3
|
+
const execute_worker_1 = require("./execute/execute.worker");
|
|
4
|
+
const execute_processes_in_folder_1 = require("./execute/execute.processes.in.folder");
|
|
5
|
+
const initiateWorkers = (root, folder = 'workers') => {
|
|
6
|
+
(0, execute_processes_in_folder_1.default)(root, folder, execute_worker_1.default);
|
|
14
7
|
};
|
|
15
8
|
exports.default = initiateWorkers;
|
|
16
9
|
//# sourceMappingURL=initiate.workers.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"initiate.workers.js","sourceRoot":"","sources":["../../src/functions/initiate.workers.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,
|
|
1
|
+
{"version":3,"file":"initiate.workers.js","sourceRoot":"","sources":["../../src/functions/initiate.workers.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,6DAAqD;AACrD,uFAA6E;AAE7E,MAAM,eAAe,GAAG,CAAC,IAAY,EAAE,SAAiB,SAAS,EAAQ,EAAE;IAC1E,IAAA,qCAAwB,EAAC,IAAI,EAAE,MAAM,EAAE,wBAAa,CAAC,CAAC;AACvD,CAAC,CAAC;AACF,kBAAe,eAAe,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const add_up_indices_to_attributes_1 = require("./add.up.indices.to.attributes");
|
|
4
|
+
const add_down_indices_to_attributes_1 = require("./add.down.indices.to.attributes");
|
|
5
|
+
const addBothIndicesToAttributes = (schema, attributes) => {
|
|
6
|
+
(0, add_up_indices_to_attributes_1.default)(schema, attributes);
|
|
7
|
+
(0, add_down_indices_to_attributes_1.default)(schema, attributes);
|
|
8
|
+
};
|
|
9
|
+
exports.default = addBothIndicesToAttributes;
|
|
10
|
+
//# sourceMappingURL=add.both.indices.to.attributes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
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;;AAIb,iFAAsE;AACtE,qFAA0E;AAE1E,MAAM,0BAA0B,GAAG,CAAC,MAAc,EAAE,UAAoB,EAAQ,EAAE;IACjF,IAAA,sCAAwB,EAAC,MAAM,EAAE,UAAU,CAAC,CAAC;IAC7C,IAAA,wCAA0B,EAAC,MAAM,EAAE,UAAU,CAAC,CAAC;AAChD,CAAC,CAAC;AACF,kBAAe,0BAA0B,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const add_index_to_attributes_1 = require("./add.index.to.attributes");
|
|
4
|
+
const addDownIndicesToAttributes = (schema, attributes) => (0, add_index_to_attributes_1.default)(schema, attributes, -1);
|
|
5
|
+
exports.default = addDownIndicesToAttributes;
|
|
6
|
+
//# sourceMappingURL=add.down.indices.to.attributes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"add.down.indices.to.attributes.js","sourceRoot":"","sources":["../../../../src/mongodb/functions/index/add.down.indices.to.attributes.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAIb,uEAA6D;AAE7D,MAAM,0BAA0B,GAAG,CAAC,MAAc,EAAE,UAAoB,EAAQ,EAAE,CAAC,IAAA,iCAAoB,EAAC,MAAM,EAAE,UAAU,EAAE,CAAC,CAAC,CAAC,CAAC;AAChI,kBAAe,0BAA0B,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const lodash_1 = require("lodash");
|
|
4
|
+
const addIndexToAttributes = (schema, attributes, index) => {
|
|
5
|
+
(0, lodash_1.each)(attributes, (attribute) => {
|
|
6
|
+
const ind = {};
|
|
7
|
+
(0, lodash_1.set)(ind, attribute, index);
|
|
8
|
+
schema.index(ind);
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
exports.default = addIndexToAttributes;
|
|
12
|
+
//# sourceMappingURL=add.index.to.attributes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"add.index.to.attributes.js","sourceRoot":"","sources":["../../../../src/mongodb/functions/index/add.index.to.attributes.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAGb,mCAAiC;AAEjC,MAAM,oBAAoB,GAAG,CAAC,MAAc,EAAE,UAAoB,EAAE,KAAa,EAAQ,EAAE;IAC1F,IAAA,aAAI,EAAC,UAAU,EAAE,CAAC,SAAiB,EAAE,EAAE;QACtC,MAAM,GAAG,GAAG,EAAE,CAAC;QACf,IAAA,YAAG,EAAC,GAAG,EAAE,SAAS,EAAE,KAAK,CAAC,CAAC;QAC3B,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IACnB,CAAC,CAAC,CAAC;AACJ,CAAC,CAAC;AACF,kBAAe,oBAAoB,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const add_index_to_attributes_1 = require("./add.index.to.attributes");
|
|
4
|
+
const addUpIndicesToAttributes = (schema, attributes) => (0, add_index_to_attributes_1.default)(schema, attributes, 1);
|
|
5
|
+
exports.default = addUpIndicesToAttributes;
|
|
6
|
+
//# sourceMappingURL=add.up.indices.to.attributes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"add.up.indices.to.attributes.js","sourceRoot":"","sources":["../../../../src/mongodb/functions/index/add.up.indices.to.attributes.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAIb,uEAA6D;AAE7D,MAAM,wBAAwB,GAAG,CAAC,MAAc,EAAE,UAAoB,EAAQ,EAAE,CAAC,IAAA,iCAAoB,EAAC,MAAM,EAAE,UAAU,EAAE,CAAC,CAAC,CAAC;AAC7H,kBAAe,wBAAwB,CAAC"}
|
|
@@ -4,6 +4,11 @@ const lodash_1 = require("lodash");
|
|
|
4
4
|
const rxjs_1 = require("rxjs");
|
|
5
5
|
const mongoose = require("mongoose");
|
|
6
6
|
class ObservableDatabase extends rxjs_1.Subject {
|
|
7
|
+
static init() {
|
|
8
|
+
if (!ObservableDatabase._instance)
|
|
9
|
+
ObservableDatabase._instance = new ObservableDatabase();
|
|
10
|
+
return ObservableDatabase._instance;
|
|
11
|
+
}
|
|
7
12
|
constructor() {
|
|
8
13
|
super();
|
|
9
14
|
const db = mongoose.connection.db;
|
|
@@ -12,11 +17,6 @@ class ObservableDatabase extends rxjs_1.Subject {
|
|
|
12
17
|
this.next((0, lodash_1.pick)(change, ['ns', 'documentKey', 'operationType', 'updateDescription', 'fullDocument']));
|
|
13
18
|
});
|
|
14
19
|
}
|
|
15
|
-
static init() {
|
|
16
|
-
if (!ObservableDatabase._instance)
|
|
17
|
-
ObservableDatabase._instance = new ObservableDatabase();
|
|
18
|
-
return ObservableDatabase._instance;
|
|
19
|
-
}
|
|
20
20
|
}
|
|
21
21
|
const observableDatabase = () => ObservableDatabase.init();
|
|
22
22
|
exports.default = observableDatabase;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"observable.database.js","sourceRoot":"","sources":["../../../src/mongodb/functions/observable.database.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,mCAA4B;AAC5B,+BAA6B;AAC7B,qCAAqC;AAGrC,MAAM,kBAAmB,SAAQ,cAAY;
|
|
1
|
+
{"version":3,"file":"observable.database.js","sourceRoot":"","sources":["../../../src/mongodb/functions/observable.database.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,mCAA4B;AAC5B,+BAA6B;AAC7B,qCAAqC;AAGrC,MAAM,kBAAmB,SAAQ,cAAY;IAIrC,MAAM,CAAC,IAAI;QACjB,IAAI,CAAC,kBAAkB,CAAC,SAAS;YAAE,kBAAkB,CAAC,SAAS,GAAG,IAAI,kBAAkB,EAAE,CAAC;QAC3F,OAAO,kBAAkB,CAAC,SAAS,CAAC;IACrC,CAAC;IAED;QACC,KAAK,EAAE,CAAC;QACR,MAAM,EAAE,GAAG,QAAQ,CAAC,UAAU,CAAC,EAAE,CAAC;QAClC,IAAI,CAAC,OAAO,GAAG,EAAE,CAAC,KAAK,CAAC,EAAE,EAAE,EAAC,YAAY,EAAE,cAAc,EAAC,CAAC,CAAC;QAC5D,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC,QAAQ,EAAE,CAAC,MAAM,EAAE,EAAE;YACpC,IAAI,CAAC,IAAI,CAAC,IAAA,aAAI,EAAC,MAAM,EAAE,CAAC,IAAI,EAAE,aAAa,EAAE,eAAe,EAAE,mBAAmB,EAAE,cAAc,CAAC,CAAC,CAAC,CAAC;QACtG,CAAC,CAAC,CAAC;IACJ,CAAC;CACD;AAED,MAAM,kBAAkB,GAAG,GAAiB,EAAE,CAAC,kBAAkB,CAAC,IAAI,EAAE,CAAC;AACzE,kBAAe,kBAAkB,CAAC"}
|
|
@@ -20,9 +20,6 @@ class ObservableModel extends rxjs_1.Subject {
|
|
|
20
20
|
}
|
|
21
21
|
}
|
|
22
22
|
class ObservableModelsMap {
|
|
23
|
-
constructor() {
|
|
24
|
-
this._map = new Map();
|
|
25
|
-
}
|
|
26
23
|
static init() {
|
|
27
24
|
if (!ObservableModelsMap._instance)
|
|
28
25
|
ObservableModelsMap._instance = new ObservableModelsMap();
|
|
@@ -36,6 +33,9 @@ class ObservableModelsMap {
|
|
|
36
33
|
map.set(collectionName, new ObservableModel(collectionName));
|
|
37
34
|
return map.get(collectionName);
|
|
38
35
|
}
|
|
36
|
+
constructor() {
|
|
37
|
+
this._map = new Map();
|
|
38
|
+
}
|
|
39
39
|
}
|
|
40
40
|
const observableModel = (model) => ObservableModelsMap.get(model);
|
|
41
41
|
exports.default = observableModel;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"observable.model.js","sourceRoot":"","sources":["../../../src/mongodb/functions/observable.model.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,mCAA4B;AAG5B,+BAA2C;AAC3C,8CAAsC;AAEtC,+DAAuD;AAEvD,MAAM,eAAgB,SAAQ,cAAY;IAkBzC,YAAY,UAAkB;QAC7B,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,WAAW,GAAG,UAAU,CAAC;QAE9B,IAAI,CAAC,aAAa,GAAG,IAAA,6BAAkB,GAAE;aACvC,IAAI,CAAC,IAAA,kBAAM,EAAC,CAAC,MAAM,EAAE,EAAE,CAAC,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC,CAAC;aAClD,SAAS,CAAC;YACV,IAAI,EAAE,CAAC,MAAW,EAAQ,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,IAAA,aAAI,EAAC,MAAM,EAAE,CAAC,IAAI,EAAE,aAAa,EAAE,eAAe,EAAE,mBAAmB,EAAE,cAAc,CAAC,CAAC,CAAC;SACjI,CAAC,CAAC;IACL,CAAC;IAEO,WAAW,CAAC,MAAW;QAC9B,M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AM,QAAQ,GAAG,mBAAmB,CAAC,IAAI,EAAE,CAAC;QAC5C,MAAM,GAAG,GAAG,QAAQ,CAAC,IAAI,CAAC;QAC1B,MAAM,cAAc,GAAG,KAAK,CAAC,UAAU,CAAC,cAAc,CAAC;QAGvD,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,cAAc,CAAC;YAAE,GAAG,CAAC,GAAG,CAAC,cAAc,EAAE,IAAI,eAAe,CAAC,cAAc,CAAC,CAAC,CAAC;QAC3F,OAAO,GAAG,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;IAChC,CAAC;IAID;QACC,IAAI,CAAC,IAAI,GAAG,IAAI,GAAG,EAA2B,CAAC;IAChD,CAAC;CACD;AAED,MAAM,eAAe,GAAG,CAAC,KAAiB,EAAgB,EAAE,CAAC,mBAAmB,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;AAC5F,kBAAe,eAAe,CAAC"}
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
const fs = require("fs");
|
|
4
4
|
const path = require("path");
|
|
5
5
|
const lodash_1 = require("lodash");
|
|
6
|
-
const
|
|
6
|
+
const folders_1 = require("@owservable/folders");
|
|
7
7
|
const collections_models_map_1 = require("../collections.models.map");
|
|
8
8
|
const _processFile = (folder, file) => {
|
|
9
9
|
const fullPath = path.join(folder, file);
|
|
@@ -34,7 +34,7 @@ const _processModels = (folder, exclude) => {
|
|
|
34
34
|
(0, lodash_1.each)(folders, (sub) => _processModels(path.join(folder, sub), exclude));
|
|
35
35
|
};
|
|
36
36
|
const processModels = (root, name = 'models', exclude) => {
|
|
37
|
-
const folders = (0,
|
|
37
|
+
const folders = (0, folders_1.listSubfoldersByName)(root, name);
|
|
38
38
|
(0, lodash_1.each)(folders, (folder) => _processModels(folder, exclude));
|
|
39
39
|
};
|
|
40
40
|
exports.default = processModels;
|
|
@@ -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,
|
|
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;QAAE,OAAO,KAAK,CAAC;IAC3B,OAAO,IAAA,iBAAQ,EAAC,OAAO,CAAC;QACvB,CAAC,CAAC,IAAA,iBAAQ,EAAC,MAAM,EAAE,OAAO,CAAC;QAC3B,CAAC,CAAC,CAAC,CAAC,IAAA,aAAI,EAAC,OAAO,EAAE,CAAC,CAAS,EAAE,EAAE,CAAC,IAAA,iBAAQ,EAAC,MAAM,EAAE,CAAC,CAAC,CAAC,CAAC;AACxD,CAAC,CAAC;AAEF,MAAM,cAAc,GAAG,CAAC,MAAc,EAAE,OAA2B,EAAQ,EAAE;IAC5E,IAAI,WAAW,CAAC,MAAM,EAAE,OAAO,CAAC;QAAE,OAAO;IAEzC,MAAM,cAAc,GAAG,EAAE,CAAC,WAAW,CAA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, _arguments, P, ge
|
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
const mongoose = require("mongoose");
|
|
13
13
|
class MongoDBConnector {
|
|
14
|
-
constructor() { }
|
|
15
14
|
static init(mongoDbUri) {
|
|
16
15
|
return __awaiter(this, void 0, void 0, function* () {
|
|
17
16
|
if (!this._connection) {
|
|
@@ -47,6 +46,7 @@ class MongoDBConnector {
|
|
|
47
46
|
static get connection() {
|
|
48
47
|
return this._connection;
|
|
49
48
|
}
|
|
49
|
+
constructor() { }
|
|
50
50
|
}
|
|
51
51
|
exports.default = MongoDBConnector;
|
|
52
52
|
//# sourceMappingURL=mongodb.connector.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mongodb.connector.js","sourceRoot":"","sources":["../../src/mongodb/mongodb.connector.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;;;;;;;;;AAEb,qCAAqC;AAGrC,MAAqB,gBAAgB;
|
|
1
|
+
{"version":3,"file":"mongodb.connector.js","sourceRoot":"","sources":["../../src/mongodb/mongodb.connector.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;;;;;;;;;AAEb,qCAAqC;AAGrC,MAAqB,gBAAgB;IAC7B,MAAM,CAAO,IAAI,CAAC,UAAkB;;YAC1C,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE;gBACtB,OAAO,IAAI,OAAO,CAAC,CAAO,OAAO,EAAE,MAAM,EAAE,EAAE;oBAC5C,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;oBAChB,QAAQ;yBACN,OAAO,CAAC,UAAU,EAAE;wBACpB,QAAQ,EAAE,EAAE;wBAEZ,eAAe,EAAE,IAAI;wBACrB,kBAAkB,EAAE,IAAI;wBAExB,SAAS,EAAE,IAAI;wBACf,qBAAqB,EAAE,MAAM;qBAC7B,CAAC;yBACD,IAAI,CAAC,GAAG,EAAE;wBACV,IAAI,CAAC,WAAW,GAAG,QAAQ,CAAC,UAAU,C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,IAAI,CAAC,WAAW,CAAC;IACzB,CAAC;IAID,gBAAuB,CAAC;CACxB;AA5CD,mCA4CC"}
|
package/lib/owservable.d.ts
CHANGED
|
@@ -12,9 +12,21 @@ import IConnectionManager from './auth/i.connection.manager';
|
|
|
12
12
|
import initiateWorkers from './functions/initiate.workers';
|
|
13
13
|
import initiateCronjobs from './functions/initiate.cronjobs';
|
|
14
14
|
import initiateWatchers from './functions/initiate.watchers';
|
|
15
|
+
import addActionCronjobs from './functions/action/add.action.cronjobs';
|
|
16
|
+
import addActionWatchers from './functions/action/add.action.watchers';
|
|
17
|
+
import addActionWorkers from './functions/action/add.action.workers';
|
|
18
|
+
import executeCronjob from './functions/execute/execute.cronjob';
|
|
19
|
+
import executeWatcher from './functions/execute/execute.watcher';
|
|
20
|
+
import executeWorker from './functions/execute/execute.worker';
|
|
21
|
+
import executeProcessesInFolder from './functions/execute/execute.processes.in.folder';
|
|
22
|
+
import executeOnFilesRecursively from './functions/execute/execute.on.files.recursively';
|
|
15
23
|
import DataMiddlewareMap from './middleware/data.middleware.map';
|
|
16
24
|
import MongoDBConnector from './mongodb/mongodb.connector';
|
|
17
25
|
import CollectionsModelsMap from './mongodb/collections.models.map';
|
|
26
|
+
import addBothIndicesToAttributes from './mongodb/functions/index/add.both.indices.to.attributes';
|
|
27
|
+
import addDownIndicesToAttributes from './mongodb/functions/index/add.down.indices.to.attributes';
|
|
28
|
+
import addIndexToAttributes from './mongodb/functions/index/add.index.to.attributes';
|
|
29
|
+
import addUpIndicesToAttributes from './mongodb/functions/index/add.up.indices.to.attributes';
|
|
18
30
|
import processModels from './mongodb/functions/process.models';
|
|
19
31
|
import observableModel from './mongodb/functions/observable.model';
|
|
20
32
|
import observableDatabase from './mongodb/functions/observable.database';
|
|
@@ -23,6 +35,6 @@ import CountStore from './store/count.store';
|
|
|
23
35
|
import DocumentStore from './store/document.store';
|
|
24
36
|
import CollectionStore from './store/collection.store';
|
|
25
37
|
import storeFactory from './store/factories/store.factory';
|
|
26
|
-
export { OwservableClient, EStoreType, ConnectionManagerRefreshType, CronJobType, StoreScopeType, StoreSubscriptionConfigType, StoreSubscriptionUpdateType, SubscriptionMethodsType, WatcherType, WorkerType, IConnectionManager, initiateCronjobs, initiateWatchers, initiateWorkers, DataMiddlewareMap, MongoDBConnector, CollectionsModelsMap, processModels, observableModel, observableDatabase, AStore, CountStore, DocumentStore, CollectionStore, storeFactory };
|
|
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, addBothIndicesToAttributes, addDownIndicesToAttributes, addIndexToAttributes, addUpIndicesToAttributes, processModels, observableModel, observableDatabase, AStore, CountStore, DocumentStore, CollectionStore, storeFactory };
|
|
27
39
|
declare const Owservable: {};
|
|
28
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.observableDatabase = exports.observableModel = exports.processModels = exports.CollectionsModelsMap = exports.MongoDBConnector = exports.DataMiddlewareMap = exports.initiateWorkers = exports.initiateWatchers = exports.initiateCronjobs = exports.EStoreType = exports.OwservableClient = void 0;
|
|
3
|
+
exports.storeFactory = exports.CollectionStore = exports.DocumentStore = exports.CountStore = exports.AStore = exports.observableDatabase = exports.observableModel = exports.processModels = exports.addUpIndicesToAttributes = exports.addIndexToAttributes = exports.addDownIndicesToAttributes = exports.addBothIndicesToAttributes = 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");
|
|
@@ -11,12 +11,36 @@ const initiate_cronjobs_1 = require("./functions/initiate.cronjobs");
|
|
|
11
11
|
exports.initiateCronjobs = initiate_cronjobs_1.default;
|
|
12
12
|
const initiate_watchers_1 = require("./functions/initiate.watchers");
|
|
13
13
|
exports.initiateWatchers = initiate_watchers_1.default;
|
|
14
|
+
const add_action_cronjobs_1 = require("./functions/action/add.action.cronjobs");
|
|
15
|
+
exports.addActionCronjobs = add_action_cronjobs_1.default;
|
|
16
|
+
const add_action_watchers_1 = require("./functions/action/add.action.watchers");
|
|
17
|
+
exports.addActionWatchers = add_action_watchers_1.default;
|
|
18
|
+
const add_action_workers_1 = require("./functions/action/add.action.workers");
|
|
19
|
+
exports.addActionWorkers = add_action_workers_1.default;
|
|
20
|
+
const execute_cronjob_1 = require("./functions/execute/execute.cronjob");
|
|
21
|
+
exports.executeCronjob = execute_cronjob_1.default;
|
|
22
|
+
const execute_watcher_1 = require("./functions/execute/execute.watcher");
|
|
23
|
+
exports.executeWatcher = execute_watcher_1.default;
|
|
24
|
+
const execute_worker_1 = require("./functions/execute/execute.worker");
|
|
25
|
+
exports.executeWorker = execute_worker_1.default;
|
|
26
|
+
const execute_processes_in_folder_1 = require("./functions/execute/execute.processes.in.folder");
|
|
27
|
+
exports.executeProcessesInFolder = execute_processes_in_folder_1.default;
|
|
28
|
+
const execute_on_files_recursively_1 = require("./functions/execute/execute.on.files.recursively");
|
|
29
|
+
exports.executeOnFilesRecursively = execute_on_files_recursively_1.default;
|
|
14
30
|
const data_middleware_map_1 = require("./middleware/data.middleware.map");
|
|
15
31
|
exports.DataMiddlewareMap = data_middleware_map_1.default;
|
|
16
32
|
const mongodb_connector_1 = require("./mongodb/mongodb.connector");
|
|
17
33
|
exports.MongoDBConnector = mongodb_connector_1.default;
|
|
18
34
|
const collections_models_map_1 = require("./mongodb/collections.models.map");
|
|
19
35
|
exports.CollectionsModelsMap = collections_models_map_1.default;
|
|
36
|
+
const add_both_indices_to_attributes_1 = require("./mongodb/functions/index/add.both.indices.to.attributes");
|
|
37
|
+
exports.addBothIndicesToAttributes = add_both_indices_to_attributes_1.default;
|
|
38
|
+
const add_down_indices_to_attributes_1 = require("./mongodb/functions/index/add.down.indices.to.attributes");
|
|
39
|
+
exports.addDownIndicesToAttributes = add_down_indices_to_attributes_1.default;
|
|
40
|
+
const add_index_to_attributes_1 = require("./mongodb/functions/index/add.index.to.attributes");
|
|
41
|
+
exports.addIndexToAttributes = add_index_to_attributes_1.default;
|
|
42
|
+
const add_up_indices_to_attributes_1 = require("./mongodb/functions/index/add.up.indices.to.attributes");
|
|
43
|
+
exports.addUpIndicesToAttributes = add_up_indices_to_attributes_1.default;
|
|
20
44
|
const process_models_1 = require("./mongodb/functions/process.models");
|
|
21
45
|
exports.processModels = process_models_1.default;
|
|
22
46
|
const observable_model_1 = require("./mongodb/functions/observable.model");
|
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;AA9Dh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G,EAAE,CAAC;AACtB,kBAAe,UAAU,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,70 +1,71 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "owservable",
|
|
3
|
-
"version": "0.8.
|
|
4
|
-
"description": "owservable backend",
|
|
5
|
-
"engines": {
|
|
6
|
-
"node": ">=16"
|
|
7
|
-
},
|
|
8
|
-
"main": "./lib/owservable.js",
|
|
9
|
-
"types": "./lib/owservable.d.ts",
|
|
10
|
-
"author": "Predrag Stojadinovic <predrag@stojadinovic.net>",
|
|
11
|
-
"license": "Unlicense",
|
|
12
|
-
"files": [
|
|
13
|
-
"lib/**/*"
|
|
14
|
-
],
|
|
15
|
-
"repository": {
|
|
16
|
-
"type": "git",
|
|
17
|
-
"url": "git+https://github.com/owservable/owservable.git"
|
|
18
|
-
},
|
|
19
|
-
"scripts": {
|
|
20
|
-
"all": "yarn & tsc & yarn clean & yarn build & yarn test & yarn test_qube & yarn docs",
|
|
21
|
-
"build": "del /S /Q lib\\* && tsc",
|
|
22
|
-
"build:watch": "tsc --watch",
|
|
23
|
-
"lint": "tslint -p tsconfig.json",
|
|
24
|
-
"clean": "tslint --config tslint-imports.json --fix --project .",
|
|
25
|
-
"format": "prettier --write \"src/**/*.ts\"",
|
|
26
|
-
"docs": "typedoc --readme none --out docs ./src/owservable.ts",
|
|
27
|
-
"test": "nyc --all --reporter=lcov --reporter=html mocha -r ts-node/register test/**/*.spec.ts --code-coverage",
|
|
28
|
-
"coveralls": "cat ./coverage/lcov.info | node node_modules/.bin/coveralls",
|
|
29
|
-
"sonar": "sonarjs -e .sonarlint/**,node_modules/**,coverage/**,.nyc_output/**",
|
|
30
|
-
"test_qube": "nyc --reporter=lcov mocha -R @danmasta/mocha-sonar -r ts-node/register test/**/*.spec.ts",
|
|
31
|
-
"up": "yarn upgrade-interactive",
|
|
32
|
-
"latest": "yarn upgrade-interactive --latest",
|
|
33
|
-
"srctree": "dir src /s /b > srctree.txt"
|
|
34
|
-
},
|
|
35
|
-
"dependencies": {
|
|
36
|
-
"@owservable/
|
|
37
|
-
"@
|
|
38
|
-
"@types/
|
|
39
|
-
"@types/
|
|
40
|
-
"@types/node
|
|
41
|
-
"
|
|
42
|
-
"
|
|
43
|
-
"
|
|
44
|
-
"
|
|
45
|
-
"
|
|
46
|
-
"
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
"@
|
|
51
|
-
"@types/
|
|
52
|
-
"@types/
|
|
53
|
-
"
|
|
54
|
-
"chai
|
|
55
|
-
"
|
|
56
|
-
"
|
|
57
|
-
"
|
|
58
|
-
"
|
|
59
|
-
"
|
|
60
|
-
"
|
|
61
|
-
"
|
|
62
|
-
"
|
|
63
|
-
"
|
|
64
|
-
"tslint
|
|
65
|
-
"tslint-
|
|
66
|
-
"tslint-
|
|
67
|
-
"
|
|
68
|
-
"
|
|
69
|
-
|
|
70
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "owservable",
|
|
3
|
+
"version": "0.8.31",
|
|
4
|
+
"description": "owservable backend",
|
|
5
|
+
"engines": {
|
|
6
|
+
"node": ">=16"
|
|
7
|
+
},
|
|
8
|
+
"main": "./lib/owservable.js",
|
|
9
|
+
"types": "./lib/owservable.d.ts",
|
|
10
|
+
"author": "Predrag Stojadinovic <predrag@stojadinovic.net>",
|
|
11
|
+
"license": "Unlicense",
|
|
12
|
+
"files": [
|
|
13
|
+
"lib/**/*"
|
|
14
|
+
],
|
|
15
|
+
"repository": {
|
|
16
|
+
"type": "git",
|
|
17
|
+
"url": "git+https://github.com/owservable/owservable.git"
|
|
18
|
+
},
|
|
19
|
+
"scripts": {
|
|
20
|
+
"all": "yarn & tsc & yarn clean & yarn build & yarn test & yarn test_qube & yarn docs",
|
|
21
|
+
"build": "del /S /Q lib\\* && tsc",
|
|
22
|
+
"build:watch": "tsc --watch",
|
|
23
|
+
"lint": "tslint -p tsconfig.json",
|
|
24
|
+
"clean": "tslint --config tslint-imports.json --fix --project .",
|
|
25
|
+
"format": "prettier --write \"src/**/*.ts\"",
|
|
26
|
+
"docs": "typedoc --readme none --out docs ./src/owservable.ts",
|
|
27
|
+
"test": "nyc --all --reporter=lcov --reporter=html mocha -r ts-node/register test/**/*.spec.ts --code-coverage",
|
|
28
|
+
"coveralls": "cat ./coverage/lcov.info | node node_modules/.bin/coveralls",
|
|
29
|
+
"sonar": "sonarjs -e .sonarlint/**,node_modules/**,coverage/**,.nyc_output/**",
|
|
30
|
+
"test_qube": "nyc --reporter=lcov mocha -R @danmasta/mocha-sonar -r ts-node/register test/**/*.spec.ts",
|
|
31
|
+
"up": "yarn upgrade-interactive",
|
|
32
|
+
"latest": "yarn upgrade-interactive --latest",
|
|
33
|
+
"srctree": "dir src /s /b > srctree.txt"
|
|
34
|
+
},
|
|
35
|
+
"dependencies": {
|
|
36
|
+
"@owservable/actions": "^0.0.3",
|
|
37
|
+
"@owservable/folders": "^0.0.4",
|
|
38
|
+
"@types/lodash": "^4.14.186",
|
|
39
|
+
"@types/mongoose": "^5.7.36",
|
|
40
|
+
"@types/node": "^18.11.7",
|
|
41
|
+
"@types/node-cron": "^3.0.4",
|
|
42
|
+
"jsondiffpatch": "^0.4.1",
|
|
43
|
+
"lodash": "^4.17.20",
|
|
44
|
+
"mongoose": "^5.13.3",
|
|
45
|
+
"node-cron": "^3.0.2",
|
|
46
|
+
"rxjs": "^7.5.7",
|
|
47
|
+
"sift": "^16.0.0"
|
|
48
|
+
},
|
|
49
|
+
"devDependencies": {
|
|
50
|
+
"@danmasta/mocha-sonar": "^1.0.1",
|
|
51
|
+
"@types/chai": "^4.3.3",
|
|
52
|
+
"@types/mocha": "^10.0.0",
|
|
53
|
+
"@types/rewire": "^2.5.28",
|
|
54
|
+
"chai": "^4.3.6",
|
|
55
|
+
"chai-rx": "^0.0.4",
|
|
56
|
+
"coveralls": "^3.0.9",
|
|
57
|
+
"mocha": "^10.1.0",
|
|
58
|
+
"nyc": "^15.1.0",
|
|
59
|
+
"prettier": "^2.7.1",
|
|
60
|
+
"rewire": "^6.0.0",
|
|
61
|
+
"sonarjs": "^1.0.0",
|
|
62
|
+
"source-map-support": "^0.5.21",
|
|
63
|
+
"ts-node": "^10.9.1",
|
|
64
|
+
"tslint": "^6.1.3",
|
|
65
|
+
"tslint-config-prettier": "^1.18.0",
|
|
66
|
+
"tslint-etc": "^1.13.7",
|
|
67
|
+
"tslint-no-unused-expression-chai": "^0.1.4",
|
|
68
|
+
"typedoc": "^0.23.18",
|
|
69
|
+
"typescript": "^4.8.4"
|
|
70
|
+
}
|
|
71
|
+
}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const fs = require("fs");
|
|
4
|
-
const path = require("path");
|
|
5
|
-
const lodash_1 = require("lodash");
|
|
6
|
-
const list_subfolders_by_name_1 = require("@owservable/list-subfolders-by-name");
|
|
7
|
-
const _initiate = (folder, execute) => {
|
|
8
|
-
const subfolderNames = fs.readdirSync(folder);
|
|
9
|
-
const files = (0, lodash_1.filter)(subfolderNames, (name) => !fs.lstatSync(path.join(folder, name)).isDirectory());
|
|
10
|
-
(0, lodash_1.each)(files, (file) => {
|
|
11
|
-
const absoluteFilePath = path.join(folder, file);
|
|
12
|
-
const obj = require(absoluteFilePath).default;
|
|
13
|
-
execute(obj);
|
|
14
|
-
});
|
|
15
|
-
const folders = (0, lodash_1.filter)(subfolderNames, (name) => fs.lstatSync(path.join(folder, name)).isDirectory());
|
|
16
|
-
(0, lodash_1.each)(folders, (sub) => _initiate(path.join(folder, sub), execute));
|
|
17
|
-
};
|
|
18
|
-
const initiateProcesses = (root, name, execute) => {
|
|
19
|
-
const folders = (0, list_subfolders_by_name_1.default)(root, name);
|
|
20
|
-
(0, lodash_1.each)(folders, (folder) => _initiate(folder, execute));
|
|
21
|
-
};
|
|
22
|
-
exports.default = initiateProcesses;
|
|
23
|
-
//# sourceMappingURL=initiate.processes.js.map
|
|
@@ -1 +0,0 @@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