@resolveio/server-lib 12.5.52 → 12.5.54
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/.nodemon.json +5 -0
- package/.vscode/settings.json +3 -0
- package/README.md +22 -0
- package/compileDTS.pl +64 -0
- package/gulpfile.js +127 -0
- package/mongodbensurers.js +2 -0
- package/mongostop.js +3 -0
- package/package.json +1 -1
- package/settings.development.json +13 -0
- package/src/client-server-app.ts +7 -0
- package/src/collections/app-status.collection.ts +51 -0
- package/src/collections/counter.collection.ts +54 -0
- package/src/collections/cron-job-history.collection.ts +82 -0
- package/src/collections/cron-job.collection.ts +85 -0
- package/src/collections/email-history.collection.ts +66 -0
- package/src/collections/email-verified.collection.ts +61 -0
- package/src/collections/file.collection.ts +73 -0
- package/src/collections/flag.collection.ts +56 -0
- package/src/collections/log-method-latency.collection.ts +64 -0
- package/src/collections/log-subscription.collection.ts +68 -0
- package/src/collections/log-ts.collection.ts +78 -0
- package/src/collections/log.collection.ts +77 -0
- package/src/collections/logged-in-users.collection.ts +65 -0
- package/src/collections/method-response.collection.ts +66 -0
- package/src/collections/monitor-cpu.collection.ts +63 -0
- package/src/collections/monitor-memory.collection.ts +75 -0
- package/src/collections/monitor-mongo.collection.ts +69 -0
- package/src/collections/notification.collection.ts +51 -0
- package/src/collections/report-builder-dashboard-builder.collection.ts +109 -0
- package/src/collections/report-builder-library.collection.ts +89 -0
- package/src/collections/report-builder-report.collection.ts +149 -0
- package/src/collections/user-group.collection.ts +90 -0
- package/src/collections/user-guide.collection.ts +57 -0
- package/src/collections/user.collection.ts +259 -0
- package/src/cron/cron.ts +188 -0
- package/src/fixtures/cron-jobs.ts +25 -0
- package/src/fixtures/init.ts +10 -0
- package/src/http/auth.ts +732 -0
- package/src/http/health.ts +7 -0
- package/src/http/home.ts +71 -0
- package/src/index.ts +71 -0
- package/src/managers/cron.manager.ts +208 -0
- package/src/managers/method.manager.ts +607 -0
- package/src/managers/mongo.manager.ts +2282 -0
- package/src/managers/monitor.manager.ts +323 -0
- package/src/managers/subscription.manager.ts +1196 -0
- package/{managers/subscription.performance.js → src/managers/subscription.performance.ts} +68 -33
- package/src/methods/accounts.ts +202 -0
- package/src/methods/aws.ts +507 -0
- package/src/methods/collections.ts +512 -0
- package/src/methods/counters.ts +75 -0
- package/src/methods/cron-jobs.ts +1454 -0
- package/src/methods/flags.ts +7 -0
- package/src/methods/logs.ts +327 -0
- package/src/methods/monitor.ts +548 -0
- package/src/methods/pdf.ts +615 -0
- package/src/methods/report-builder.ts +876 -0
- package/src/methods/support.ts +146 -0
- package/{models/app-status.model.d.ts → src/models/app-status.model.ts} +3 -2
- package/{models/billing-logged-in-users.model.d.ts → src/models/billing-logged-in-users.model.ts} +5 -4
- package/src/models/collection-document.model.ts +22 -0
- package/{models/counter.model.d.ts → src/models/counter.model.ts} +4 -3
- package/src/models/cron-job-history.model.ts +13 -0
- package/src/models/cron-job.model.ts +14 -0
- package/src/models/dialog.model.ts +25 -0
- package/{models/email-history.model.d.ts → src/models/email-history.model.ts} +8 -7
- package/{models/email-verified.model.d.ts → src/models/email-verified.model.ts} +6 -5
- package/{models/file.model.d.ts → src/models/file.model.ts} +8 -7
- package/{models/flag.model.d.ts → src/models/flag.model.ts} +4 -3
- package/{models/log-method-latency.model.d.ts → src/models/log-method-latency.model.ts} +5 -4
- package/{models/log-subscription.model.d.ts → src/models/log-subscription.model.ts} +8 -6
- package/{models/log.model.d.ts → src/models/log.model.ts} +12 -10
- package/{models/logged-in-users.model.d.ts → src/models/logged-in-users.model.ts} +6 -5
- package/{models/method-response.model.d.ts → src/models/method-response.model.ts} +7 -6
- package/src/models/method.model.ts +11 -0
- package/{models/monitor-cpu.model.d.ts → src/models/monitor-cpu.model.ts} +9 -7
- package/src/models/monitor-memory.model.ts +17 -0
- package/src/models/monitor-mongo.model.ts +15 -0
- package/{models/notification.model.d.ts → src/models/notification.model.ts} +3 -2
- package/src/models/pagination.model.ts +30 -0
- package/src/models/permission.model.ts +14 -0
- package/src/models/report-builder-dashboard-builder.model.ts +29 -0
- package/src/models/report-builder-library.model.ts +20 -0
- package/src/models/report-builder-report.model.ts +110 -0
- package/src/models/report-builder.model.ts +68 -0
- package/src/models/select-data-label.model.ts +9 -0
- package/src/models/server-response.model.ts +5 -0
- package/src/models/subscription.model.ts +64 -0
- package/src/models/support-ticket.model.ts +81 -0
- package/src/models/user-group.model.ts +23 -0
- package/{models/user-guide.model.d.ts → src/models/user-guide.model.ts} +5 -4
- package/src/models/user.model.ts +79 -0
- package/{public_api.d.ts → src/public_api.ts} +1 -1
- package/src/publications/app-status.ts +13 -0
- package/src/publications/cron-jobs.ts +30 -0
- package/src/publications/files.ts +34 -0
- package/src/publications/flags.ts +20 -0
- package/src/publications/logs.ts +164 -0
- package/src/publications/method-responses.ts +13 -0
- package/src/publications/notifications.ts +13 -0
- package/src/publications/report-builder-dashboard-builders.ts +39 -0
- package/src/publications/report-builder-libraries.ts +41 -0
- package/src/publications/report-builder-reports.ts +48 -0
- package/src/publications/super-admin.ts +13 -0
- package/src/publications/user-groups.ts +12 -0
- package/src/publications/user-guides.ts +12 -0
- package/src/server-app.ts +769 -0
- package/src/util/common.ts +519 -0
- package/src/util/schema-report-builder.ts +413 -0
- package/tsconfig.json +30 -0
- package/tslint.json +143 -0
- package/client-server-app.d.ts +0 -1
- package/client-server-app.js +0 -48
- package/client-server-app.js.map +0 -1
- package/collections/app-status.collection.d.ts +0 -3
- package/collections/app-status.collection.js +0 -51
- package/collections/app-status.collection.js.map +0 -1
- package/collections/counter.collection.d.ts +0 -3
- package/collections/counter.collection.js +0 -54
- package/collections/counter.collection.js.map +0 -1
- package/collections/cron-job-history.collection.d.ts +0 -3
- package/collections/cron-job-history.collection.js +0 -82
- package/collections/cron-job-history.collection.js.map +0 -1
- package/collections/cron-job.collection.d.ts +0 -3
- package/collections/cron-job.collection.js +0 -85
- package/collections/cron-job.collection.js.map +0 -1
- package/collections/email-history.collection.d.ts +0 -3
- package/collections/email-history.collection.js +0 -66
- package/collections/email-history.collection.js.map +0 -1
- package/collections/email-verified.collection.d.ts +0 -3
- package/collections/email-verified.collection.js +0 -61
- package/collections/email-verified.collection.js.map +0 -1
- package/collections/file.collection.d.ts +0 -3
- package/collections/file.collection.js +0 -73
- package/collections/file.collection.js.map +0 -1
- package/collections/flag.collection.d.ts +0 -3
- package/collections/flag.collection.js +0 -56
- package/collections/flag.collection.js.map +0 -1
- package/collections/log-method-latency.collection.d.ts +0 -3
- package/collections/log-method-latency.collection.js +0 -64
- package/collections/log-method-latency.collection.js.map +0 -1
- package/collections/log-subscription.collection.d.ts +0 -3
- package/collections/log-subscription.collection.js +0 -68
- package/collections/log-subscription.collection.js.map +0 -1
- package/collections/log-ts.collection.d.ts +0 -3
- package/collections/log-ts.collection.js +0 -78
- package/collections/log-ts.collection.js.map +0 -1
- package/collections/log.collection.d.ts +0 -3
- package/collections/log.collection.js +0 -77
- package/collections/log.collection.js.map +0 -1
- package/collections/logged-in-users.collection.d.ts +0 -3
- package/collections/logged-in-users.collection.js +0 -65
- package/collections/logged-in-users.collection.js.map +0 -1
- package/collections/method-response.collection.d.ts +0 -3
- package/collections/method-response.collection.js +0 -66
- package/collections/method-response.collection.js.map +0 -1
- package/collections/monitor-cpu.collection.d.ts +0 -3
- package/collections/monitor-cpu.collection.js +0 -63
- package/collections/monitor-cpu.collection.js.map +0 -1
- package/collections/monitor-memory.collection.d.ts +0 -3
- package/collections/monitor-memory.collection.js +0 -75
- package/collections/monitor-memory.collection.js.map +0 -1
- package/collections/monitor-mongo.collection.d.ts +0 -3
- package/collections/monitor-mongo.collection.js +0 -69
- package/collections/monitor-mongo.collection.js.map +0 -1
- package/collections/notification.collection.d.ts +0 -3
- package/collections/notification.collection.js +0 -51
- package/collections/notification.collection.js.map +0 -1
- package/collections/report-builder-dashboard-builder.collection.d.ts +0 -3
- package/collections/report-builder-dashboard-builder.collection.js +0 -109
- package/collections/report-builder-dashboard-builder.collection.js.map +0 -1
- package/collections/report-builder-library.collection.d.ts +0 -3
- package/collections/report-builder-library.collection.js +0 -87
- package/collections/report-builder-library.collection.js.map +0 -1
- package/collections/report-builder-report.collection.d.ts +0 -4
- package/collections/report-builder-report.collection.js +0 -149
- package/collections/report-builder-report.collection.js.map +0 -1
- package/collections/user-group.collection.d.ts +0 -4
- package/collections/user-group.collection.js +0 -90
- package/collections/user-group.collection.js.map +0 -1
- package/collections/user-guide.collection.d.ts +0 -3
- package/collections/user-guide.collection.js +0 -57
- package/collections/user-guide.collection.js.map +0 -1
- package/collections/user.collection.d.ts +0 -4
- package/collections/user.collection.js +0 -259
- package/collections/user.collection.js.map +0 -1
- package/cron/cron.d.ts +0 -5
- package/cron/cron.js +0 -162
- package/cron/cron.js.map +0 -1
- package/fixtures/cron-jobs.d.ts +0 -1
- package/fixtures/cron-jobs.js +0 -73
- package/fixtures/cron-jobs.js.map +0 -1
- package/fixtures/init.d.ts +0 -1
- package/fixtures/init.js +0 -59
- package/fixtures/init.js.map +0 -1
- package/http/auth.d.ts +0 -2
- package/http/auth.js +0 -763
- package/http/auth.js.map +0 -1
- package/http/health.d.ts +0 -1
- package/http/health.js +0 -12
- package/http/health.js.map +0 -1
- package/http/home.d.ts +0 -2
- package/http/home.js +0 -66
- package/http/home.js.map +0 -1
- package/index.d.ts +0 -23
- package/index.js +0 -127
- package/index.js.map +0 -1
- package/managers/cron.manager.d.ts +0 -17
- package/managers/cron.manager.js +0 -242
- package/managers/cron.manager.js.map +0 -1
- package/managers/method.manager.d.ts +0 -38
- package/managers/method.manager.js +0 -595
- package/managers/method.manager.js.map +0 -1
- package/managers/mongo.manager.d.ts +0 -178
- package/managers/mongo.manager.js +0 -2221
- package/managers/mongo.manager.js.map +0 -1
- package/managers/monitor.manager.d.ts +0 -59
- package/managers/monitor.manager.js +0 -351
- package/managers/monitor.manager.js.map +0 -1
- package/managers/subscription.manager.d.ts +0 -50
- package/managers/subscription.manager.js +0 -1091
- package/managers/subscription.manager.js.map +0 -1
- package/managers/subscription.performance.d.ts +0 -1
- package/managers/subscription.performance.js.map +0 -1
- package/methods/accounts.d.ts +0 -2
- package/methods/accounts.js +0 -274
- package/methods/accounts.js.map +0 -1
- package/methods/aws.d.ts +0 -2
- package/methods/aws.js +0 -617
- package/methods/aws.js.map +0 -1
- package/methods/collections.d.ts +0 -2
- package/methods/collections.js +0 -499
- package/methods/collections.js.map +0 -1
- package/methods/counters.d.ts +0 -2
- package/methods/counters.js +0 -122
- package/methods/counters.js.map +0 -1
- package/methods/cron-jobs.d.ts +0 -2
- package/methods/cron-jobs.js +0 -1315
- package/methods/cron-jobs.js.map +0 -1
- package/methods/flags.d.ts +0 -2
- package/methods/flags.js +0 -9
- package/methods/flags.js.map +0 -1
- package/methods/logs.d.ts +0 -2
- package/methods/logs.js +0 -371
- package/methods/logs.js.map +0 -1
- package/methods/monitor.d.ts +0 -2
- package/methods/monitor.js +0 -565
- package/methods/monitor.js.map +0 -1
- package/methods/pdf.d.ts +0 -2
- package/methods/pdf.js +0 -324
- package/methods/pdf.js.map +0 -1
- package/methods/report-builder.d.ts +0 -2
- package/methods/report-builder.js +0 -858
- package/methods/report-builder.js.map +0 -1
- package/methods/support.d.ts +0 -2
- package/methods/support.js +0 -246
- package/methods/support.js.map +0 -1
- package/models/app-status.model.js +0 -4
- package/models/app-status.model.js.map +0 -1
- package/models/billing-logged-in-users.model.js +0 -4
- package/models/billing-logged-in-users.model.js.map +0 -1
- package/models/collection-document.model.d.ts +0 -19
- package/models/collection-document.model.js +0 -4
- package/models/collection-document.model.js.map +0 -1
- package/models/counter.model.js +0 -4
- package/models/counter.model.js.map +0 -1
- package/models/cron-job-history.model.d.ts +0 -12
- package/models/cron-job-history.model.js +0 -4
- package/models/cron-job-history.model.js.map +0 -1
- package/models/cron-job.model.d.ts +0 -13
- package/models/cron-job.model.js +0 -4
- package/models/cron-job.model.js.map +0 -1
- package/models/dialog.model.d.ts +0 -23
- package/models/dialog.model.js +0 -4
- package/models/dialog.model.js.map +0 -1
- package/models/email-history.model.js +0 -4
- package/models/email-history.model.js.map +0 -1
- package/models/email-verified.model.js +0 -4
- package/models/email-verified.model.js.map +0 -1
- package/models/file.model.js +0 -4
- package/models/file.model.js.map +0 -1
- package/models/flag.model.js +0 -4
- package/models/flag.model.js.map +0 -1
- package/models/log-method-latency.model.js +0 -4
- package/models/log-method-latency.model.js.map +0 -1
- package/models/log-subscription.model.js +0 -4
- package/models/log-subscription.model.js.map +0 -1
- package/models/log.model.js +0 -4
- package/models/log.model.js.map +0 -1
- package/models/logged-in-users.model.js +0 -4
- package/models/logged-in-users.model.js.map +0 -1
- package/models/method-response.model.js +0 -4
- package/models/method-response.model.js.map +0 -1
- package/models/method.model.d.ts +0 -9
- package/models/method.model.js +0 -4
- package/models/method.model.js.map +0 -1
- package/models/monitor-cpu.model.js +0 -4
- package/models/monitor-cpu.model.js.map +0 -1
- package/models/monitor-memory.model.d.ts +0 -15
- package/models/monitor-memory.model.js +0 -4
- package/models/monitor-memory.model.js.map +0 -1
- package/models/monitor-mongo.model.d.ts +0 -13
- package/models/monitor-mongo.model.js +0 -4
- package/models/monitor-mongo.model.js.map +0 -1
- package/models/notification.model.js +0 -4
- package/models/notification.model.js.map +0 -1
- package/models/pagination.model.d.ts +0 -10
- package/models/pagination.model.js +0 -24
- package/models/pagination.model.js.map +0 -1
- package/models/permission.model.d.ts +0 -12
- package/models/permission.model.js +0 -4
- package/models/permission.model.js.map +0 -1
- package/models/report-builder-dashboard-builder.model.d.ts +0 -25
- package/models/report-builder-dashboard-builder.model.js +0 -4
- package/models/report-builder-dashboard-builder.model.js.map +0 -1
- package/models/report-builder-library.model.d.ts +0 -17
- package/models/report-builder-library.model.js +0 -4
- package/models/report-builder-library.model.js.map +0 -1
- package/models/report-builder-report.model.d.ts +0 -98
- package/models/report-builder-report.model.js +0 -4
- package/models/report-builder-report.model.js.map +0 -1
- package/models/report-builder.model.d.ts +0 -61
- package/models/report-builder.model.js +0 -4
- package/models/report-builder.model.js.map +0 -1
- package/models/select-data-label.model.d.ts +0 -9
- package/models/select-data-label.model.js +0 -4
- package/models/select-data-label.model.js.map +0 -1
- package/models/server-response.model.d.ts +0 -5
- package/models/server-response.model.js +0 -4
- package/models/server-response.model.js.map +0 -1
- package/models/subscription.model.d.ts +0 -23
- package/models/subscription.model.js +0 -4
- package/models/subscription.model.js.map +0 -1
- package/models/support-ticket.model.d.ts +0 -72
- package/models/support-ticket.model.js +0 -4
- package/models/support-ticket.model.js.map +0 -1
- package/models/user-group.model.d.ts +0 -19
- package/models/user-group.model.js +0 -4
- package/models/user-group.model.js.map +0 -1
- package/models/user-guide.model.js +0 -4
- package/models/user-guide.model.js.map +0 -1
- package/models/user.model.d.ts +0 -70
- package/models/user.model.js +0 -4
- package/models/user.model.js.map +0 -1
- package/public_api.js +0 -75
- package/public_api.js.map +0 -1
- package/publications/app-status.d.ts +0 -2
- package/publications/app-status.js +0 -17
- package/publications/app-status.js.map +0 -1
- package/publications/cron-jobs.d.ts +0 -2
- package/publications/cron-jobs.js +0 -33
- package/publications/cron-jobs.js.map +0 -1
- package/publications/files.d.ts +0 -2
- package/publications/files.js +0 -37
- package/publications/files.js.map +0 -1
- package/publications/flags.d.ts +0 -2
- package/publications/flags.js +0 -23
- package/publications/flags.js.map +0 -1
- package/publications/logs.d.ts +0 -2
- package/publications/logs.js +0 -165
- package/publications/logs.js.map +0 -1
- package/publications/method-responses.d.ts +0 -2
- package/publications/method-responses.js +0 -17
- package/publications/method-responses.js.map +0 -1
- package/publications/notifications.d.ts +0 -2
- package/publications/notifications.js +0 -17
- package/publications/notifications.js.map +0 -1
- package/publications/report-builder-dashboard-builders.d.ts +0 -2
- package/publications/report-builder-dashboard-builders.js +0 -43
- package/publications/report-builder-dashboard-builders.js.map +0 -1
- package/publications/report-builder-libraries.d.ts +0 -2
- package/publications/report-builder-libraries.js +0 -90
- package/publications/report-builder-libraries.js.map +0 -1
- package/publications/report-builder-reports.d.ts +0 -2
- package/publications/report-builder-reports.js +0 -51
- package/publications/report-builder-reports.js.map +0 -1
- package/publications/super-admin.d.ts +0 -2
- package/publications/super-admin.js +0 -17
- package/publications/super-admin.js.map +0 -1
- package/publications/user-groups.d.ts +0 -1
- package/publications/user-groups.js +0 -17
- package/publications/user-groups.js.map +0 -1
- package/publications/user-guides.d.ts +0 -1
- package/publications/user-guides.js +0 -17
- package/publications/user-guides.js.map +0 -1
- package/server-app.d.ts +0 -52
- package/server-app.js +0 -739
- package/server-app.js.map +0 -1
- package/util/common.d.ts +0 -25
- package/util/common.js +0 -524
- package/util/common.js.map +0 -1
- package/util/schema-report-builder.d.ts +0 -6
- package/util/schema-report-builder.js +0 -453
- package/util/schema-report-builder.js.map +0 -1
- /package/{private → src/private}/email-templates/enrollment.html +0 -0
- /package/{private → src/private}/email-templates/forgot-password.html +0 -0
- /package/{private → src/private}/email-templates/support-ticket-deleted.html +0 -0
- /package/{private → src/private}/email-templates/support-ticket-modified.html +0 -0
- /package/{private → src/private}/email-templates/support-ticket.html +0 -0
- /package/{private → src/private}/images/ResolveIO.png +0 -0
|
@@ -0,0 +1,413 @@
|
|
|
1
|
+
import { ResolveIOServer } from '../index';
|
|
2
|
+
import { CollectionTree } from '../models/report-builder.model';
|
|
3
|
+
import { toTitleCase } from './common';
|
|
4
|
+
|
|
5
|
+
export function getReportLookupSchemas(collection_root: string) {
|
|
6
|
+
let lookupTrees: CollectionTree[] = [];
|
|
7
|
+
lookupTrees.push({ collection_name: collection_root, tree: ResolveIOServer.getMongoManager().collection(collection_root)['rbSchema'], is_root: true });
|
|
8
|
+
let schemaObj = ResolveIOServer.getMongoManager().collection(collection_root)['rbSchema'];
|
|
9
|
+
let modelKeys = Object.keys(schemaObj);
|
|
10
|
+
modelKeys.forEach(field => {
|
|
11
|
+
if (schemaObj[field].lookup_collection) {
|
|
12
|
+
let collectionName = schemaObj[field].lookup_collection;
|
|
13
|
+
let collectionModel = ResolveIOServer.getMongoManager().collection(collectionName);
|
|
14
|
+
|
|
15
|
+
if (!lookupTrees.filter(a => a.collection_name === collectionName).length) {
|
|
16
|
+
lookupTrees.push({ collection_name: collectionName, tree: collectionModel['rbSchema'], is_root: false });
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
return lookupTrees;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export function buildTree(current_root, schemaTree, lookup?) {
|
|
25
|
+
let res = [];
|
|
26
|
+
|
|
27
|
+
Object.keys(schemaTree).filter(a => a !== '_id' && a !== 'id' && a !== '__v').forEach(key => {
|
|
28
|
+
// Object.keys(schemaTree).filter(a => a !== '__v').forEach(key => {
|
|
29
|
+
if (!lookup || (lookup && !schemaTree[key].lookup_collection)) {
|
|
30
|
+
let treeItemSplit = key.split('.');
|
|
31
|
+
|
|
32
|
+
// debugger;
|
|
33
|
+
|
|
34
|
+
if (treeItemSplit.length === 1) {
|
|
35
|
+
if (schemaTree[key].rbType === 'String' || schemaTree[key].rbType === 'Number' || schemaTree[key].rbType === 'Boolean' || schemaTree[key].rbType === 'Date') {
|
|
36
|
+
res.push({
|
|
37
|
+
collection_name: current_root,
|
|
38
|
+
columnName: toTitleCase(key.replace(/\_/g, ' ')),
|
|
39
|
+
fieldName: key,
|
|
40
|
+
fieldType: schemaTree[key].rbType,
|
|
41
|
+
fieldTypeName: schemaTree[key].rbType === 'String' ? 'Text' : (schemaTree[key].rbType === 'Boolean' ? 'T/F' : schemaTree[key].rbType),
|
|
42
|
+
distinctFieldValues: [],
|
|
43
|
+
fieldPath: lookup ? lookup.lookup_as + '.$.' + key : key,
|
|
44
|
+
fieldPathName: lookup ? (toTitleCase(lookup.lookup_as.replace(/\.\$\./g, ' (List) -> ').replace(/\./g, ' (Group) -> '))) + ' (List) -> ' + (toTitleCase(key.replace(/\.\$\./g, ' (List) -> ').replace(/\./g, ' (Group) -> '))) : toTitleCase(key.replace(/\.\$\./g, ' (List) -> ').replace(/\./g, ' (Group) -> ')),
|
|
45
|
+
lookup_collection: lookup ? lookup.lookup_collection : (schemaTree[key].lookup_collection ? schemaTree[key].lookup_collection : ''),
|
|
46
|
+
lookup_local_key: lookup ? lookup.lookup_local_key : (schemaTree[key].lookup_collection ? schemaTree[key].local_key : ''),
|
|
47
|
+
lookup_foreign_key: lookup ? lookup.lookup_foreign_key : (schemaTree[key].lookup_collection ? schemaTree[key].lookup_key : ''),
|
|
48
|
+
lookup_as: lookup ? lookup.lookup_as : (schemaTree[key].lookup_collection ? schemaTree[key].lookup_as : ''),
|
|
49
|
+
text: toTitleCase(key.replace(/\_/g, ' ')),
|
|
50
|
+
value: key,
|
|
51
|
+
isLeaf: true,
|
|
52
|
+
isActive: false,
|
|
53
|
+
isSelected: false,
|
|
54
|
+
depth: 0,
|
|
55
|
+
leafValueType: '',
|
|
56
|
+
leafValueTypes: getLeafValueTypes(schemaTree[key], key),
|
|
57
|
+
leafFormatType: '',
|
|
58
|
+
leafFormatTypes: getLeafFormatTypes(schemaTree[key], key)
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
else {
|
|
62
|
+
res.push({
|
|
63
|
+
collection_name: current_root,
|
|
64
|
+
columnName: toTitleCase(key.replace(/\_/g, ' ')),
|
|
65
|
+
fieldName: key,
|
|
66
|
+
fieldType: schemaTree[key].lookup_collection ? 'Lookup' : schemaTree[key].rbType,
|
|
67
|
+
fieldTypeName: schemaTree[key].lookup_collection ? 'Lookup' : (schemaTree[key].rbType === 'Array' ? 'List' : 'Group'),
|
|
68
|
+
distinctFieldValues: [],
|
|
69
|
+
fieldPath: lookup ? lookup.lookup_as + '.$.' + key : key,
|
|
70
|
+
fieldPathName: lookup ? (toTitleCase(lookup.lookup_as.replace(/\.\$\./g, ' (List) -> ').replace(/\./g, ' (Group) -> '))) + ' (List) -> ' + (toTitleCase(key.replace(/\.\$\./g, ' (List) -> ').replace(/\./g, ' (Group) -> '))) : toTitleCase(key.replace(/\.\$\./g, ' (List) -> ').replace(/\./g, ' (Group) -> ')),
|
|
71
|
+
lookup_collection: lookup ? lookup.lookup_collection : (schemaTree[key].lookup_collection ? schemaTree[key].lookup_collection : ''),
|
|
72
|
+
lookup_local_key: lookup ? lookup.lookup_local_key : (schemaTree[key].lookup_collection ? schemaTree[key].local_key : ''),
|
|
73
|
+
lookup_foreign_key: lookup ? lookup.lookup_foreign_key : (schemaTree[key].lookup_collection ? schemaTree[key].lookup_key : ''),
|
|
74
|
+
lookup_as: lookup ? lookup.lookup_as : (schemaTree[key].lookup_collection ? schemaTree[key].lookup_as : ''),
|
|
75
|
+
text: toTitleCase(key.replace(/\_/g, ' ')),
|
|
76
|
+
value: key,
|
|
77
|
+
isLeaf: false,
|
|
78
|
+
isActive: false,
|
|
79
|
+
isSelected: false,
|
|
80
|
+
depth: 0,
|
|
81
|
+
leafValueType: '',
|
|
82
|
+
leafFormatType: '',
|
|
83
|
+
children: []
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
res = res.sort((a, b) => a.fieldName.localeCompare(b.fieldName));
|
|
88
|
+
}
|
|
89
|
+
else {
|
|
90
|
+
let child = null;
|
|
91
|
+
|
|
92
|
+
treeItemSplit.forEach((layer, index) => {
|
|
93
|
+
if (!child) {
|
|
94
|
+
child = res.filter(a => a.fieldName === layer)[0];
|
|
95
|
+
}
|
|
96
|
+
else {
|
|
97
|
+
if (child.children.filter(a => a.fieldName === layer)[0]) {
|
|
98
|
+
child = child.children.filter(a => a.fieldName === layer)[0];
|
|
99
|
+
}
|
|
100
|
+
else {
|
|
101
|
+
if (schemaTree[key].rbType === 'String' || schemaTree[key].rbType === 'Number' || schemaTree[key].rbType === 'Boolean' || schemaTree[key].rbType === 'Date') {
|
|
102
|
+
child.children.push({
|
|
103
|
+
collection_name: current_root,
|
|
104
|
+
columnName: toTitleCase(key.replace(/\_/g, ' ')),
|
|
105
|
+
fieldName: layer,
|
|
106
|
+
fieldType: schemaTree[key].rbType,
|
|
107
|
+
fieldTypeName: schemaTree[key].rbType === 'String' ? 'Text' : (schemaTree[key].rbType === 'Boolean' ? 'T/F' : schemaTree[key].rbType),
|
|
108
|
+
distinctFieldValues: [],
|
|
109
|
+
fieldPath: lookup ? lookup.lookup_as + '.$.' + key : key,
|
|
110
|
+
fieldPathName: lookup ? (toTitleCase(lookup.lookup_as.replace(/\.\$\./g, ' (List) -> ').replace(/\./g, ' (Group) -> '))) + ' (List) -> ' + (toTitleCase(key.replace(/\.\$\./g, ' (List) -> ').replace(/\./g, ' (Group) -> '))) : toTitleCase(key.replace(/\.\$\./g, ' (List) -> ').replace(/\./g, ' (Group) -> ')),
|
|
111
|
+
lookup_collection: lookup ? lookup.lookup_collection : (schemaTree[key].lookup_collection ? schemaTree[key].lookup_collection : ''),
|
|
112
|
+
lookup_local_key: lookup ? lookup.lookup_local_key : (schemaTree[key].lookup_collection ? schemaTree[key].local_key : ''),
|
|
113
|
+
lookup_foreign_key: lookup ? lookup.lookup_foreign_key : (schemaTree[key].lookup_collection ? schemaTree[key].lookup_key : ''),
|
|
114
|
+
lookup_as: lookup ? lookup.lookup_as : (schemaTree[key].lookup_collection ? schemaTree[key].lookup_as : ''),
|
|
115
|
+
text: toTitleCase(layer.replace(/\_/g, ' ')),
|
|
116
|
+
value: layer,
|
|
117
|
+
isLeaf: true,
|
|
118
|
+
isActive: false,
|
|
119
|
+
isSelected: false,
|
|
120
|
+
depth: index,
|
|
121
|
+
leafValueType: '',
|
|
122
|
+
leafValueTypes: getLeafValueTypes(schemaTree[key], key),
|
|
123
|
+
leafFormatType: '',
|
|
124
|
+
leafFormatTypes: getLeafFormatTypes(schemaTree[key], key)
|
|
125
|
+
});
|
|
126
|
+
}
|
|
127
|
+
else {
|
|
128
|
+
child.children.push({
|
|
129
|
+
collection_name: current_root,
|
|
130
|
+
columnName: toTitleCase(key.replace(/\_/g, ' ')),
|
|
131
|
+
fieldName: layer,
|
|
132
|
+
fieldType: schemaTree[key].lookup_collection ? 'Lookup' : schemaTree[key].rbType,
|
|
133
|
+
fieldTypeName: schemaTree[key].lookup_collection ? 'Lookup' : (schemaTree[key].rbType === 'Array' ? 'List' : 'Group'),
|
|
134
|
+
distinctFieldValues: [],
|
|
135
|
+
fieldPath: lookup ? lookup.lookup_as + '.$.' + key : key,
|
|
136
|
+
fieldPathName: lookup ? (toTitleCase(lookup.lookup_as.replace(/\.\$\./g, ' (List) -> ').replace(/\./g, ' (Group) -> '))) + ' (List) -> ' + (toTitleCase(key.replace(/\.\$\./g, ' (List) -> ').replace(/\./g, ' (Group) -> '))) : toTitleCase(key.replace(/\.\$\./g, ' (List) -> ').replace(/\./g, ' (Group) -> ')),
|
|
137
|
+
lookup_collection: lookup ? lookup.lookup_collection : (schemaTree[key].lookup_collection ? schemaTree[key].lookup_collection : ''),
|
|
138
|
+
lookup_local_key: lookup ? lookup.lookup_local_key : (schemaTree[key].lookup_collection ? schemaTree[key].local_key : ''),
|
|
139
|
+
lookup_foreign_key: lookup ? lookup.lookup_foreign_key : (schemaTree[key].lookup_collection ? schemaTree[key].lookup_key : ''),
|
|
140
|
+
lookup_as: lookup ? lookup.lookup_as : (schemaTree[key].lookup_collection ? schemaTree[key].lookup_as : ''),
|
|
141
|
+
text: toTitleCase(layer.replace(/\_/g, ' ')),
|
|
142
|
+
value: layer,
|
|
143
|
+
isLeaf: false,
|
|
144
|
+
isActive: false,
|
|
145
|
+
isSelected: false,
|
|
146
|
+
depth: index,
|
|
147
|
+
leafValueType: '',
|
|
148
|
+
leafFormatType: '',
|
|
149
|
+
children: []
|
|
150
|
+
});
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
child.children = child.children.sort((a, b) => a.fieldName.localeCompare(b.fieldName));
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
});
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
});
|
|
160
|
+
|
|
161
|
+
return res;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
export function getLeafValueTypes(schemaTree, fieldPath) {
|
|
165
|
+
let leafTypes = [];
|
|
166
|
+
|
|
167
|
+
if (schemaTree.rbType === 'String') {
|
|
168
|
+
leafTypes = [
|
|
169
|
+
{
|
|
170
|
+
text: 'As Value',
|
|
171
|
+
value: 'Value'
|
|
172
|
+
},
|
|
173
|
+
{
|
|
174
|
+
text: 'Unique',
|
|
175
|
+
value: 'Unique'
|
|
176
|
+
},
|
|
177
|
+
{
|
|
178
|
+
text: 'As Count',
|
|
179
|
+
value: 'Count'
|
|
180
|
+
},
|
|
181
|
+
{
|
|
182
|
+
text: 'First',
|
|
183
|
+
value: 'First'
|
|
184
|
+
},
|
|
185
|
+
{
|
|
186
|
+
text: 'Last',
|
|
187
|
+
value: 'Last'
|
|
188
|
+
}
|
|
189
|
+
];
|
|
190
|
+
}
|
|
191
|
+
else if (schemaTree.rbType === 'Number') {
|
|
192
|
+
leafTypes = [
|
|
193
|
+
{
|
|
194
|
+
text: 'As Value',
|
|
195
|
+
value: 'Value'
|
|
196
|
+
},
|
|
197
|
+
{
|
|
198
|
+
text: 'Unique',
|
|
199
|
+
value: 'Unique'
|
|
200
|
+
},
|
|
201
|
+
{
|
|
202
|
+
text: 'As Average',
|
|
203
|
+
value: 'Average'
|
|
204
|
+
},
|
|
205
|
+
{
|
|
206
|
+
text: 'As Count',
|
|
207
|
+
value: 'Count'
|
|
208
|
+
},
|
|
209
|
+
{
|
|
210
|
+
text: 'As Sum',
|
|
211
|
+
value: 'Sum'
|
|
212
|
+
},
|
|
213
|
+
{
|
|
214
|
+
text: 'Minimum',
|
|
215
|
+
value: 'Minimum'
|
|
216
|
+
},
|
|
217
|
+
{
|
|
218
|
+
text: 'Maximum',
|
|
219
|
+
value: 'Maximum'
|
|
220
|
+
},
|
|
221
|
+
{
|
|
222
|
+
text: 'First',
|
|
223
|
+
value: 'First'
|
|
224
|
+
},
|
|
225
|
+
{
|
|
226
|
+
text: 'Last',
|
|
227
|
+
value: 'Last'
|
|
228
|
+
}
|
|
229
|
+
];
|
|
230
|
+
}
|
|
231
|
+
else if (schemaTree.rbType === 'Boolean') {
|
|
232
|
+
leafTypes = [
|
|
233
|
+
{
|
|
234
|
+
text: 'As Value',
|
|
235
|
+
value: 'Value'
|
|
236
|
+
},
|
|
237
|
+
{
|
|
238
|
+
text: 'Unique',
|
|
239
|
+
value: 'Unique'
|
|
240
|
+
},
|
|
241
|
+
{
|
|
242
|
+
text: 'As Count',
|
|
243
|
+
value: 'Count'
|
|
244
|
+
},
|
|
245
|
+
{
|
|
246
|
+
text: 'First',
|
|
247
|
+
value: 'First'
|
|
248
|
+
},
|
|
249
|
+
{
|
|
250
|
+
text: 'Last',
|
|
251
|
+
value: 'Last'
|
|
252
|
+
}
|
|
253
|
+
];
|
|
254
|
+
}
|
|
255
|
+
else if (schemaTree.rbType === 'Date') {
|
|
256
|
+
leafTypes = [
|
|
257
|
+
{
|
|
258
|
+
text: 'As Value',
|
|
259
|
+
value: 'Value'
|
|
260
|
+
},
|
|
261
|
+
{
|
|
262
|
+
text: 'Unique',
|
|
263
|
+
value: 'Unique'
|
|
264
|
+
},
|
|
265
|
+
{
|
|
266
|
+
text: 'As Count',
|
|
267
|
+
value: 'Count'
|
|
268
|
+
},
|
|
269
|
+
{
|
|
270
|
+
text: 'Minimum',
|
|
271
|
+
value: 'Minimum'
|
|
272
|
+
},
|
|
273
|
+
{
|
|
274
|
+
text: 'Maximum',
|
|
275
|
+
value: 'Maximum'
|
|
276
|
+
},
|
|
277
|
+
{
|
|
278
|
+
text: 'First',
|
|
279
|
+
value: 'First'
|
|
280
|
+
},
|
|
281
|
+
{
|
|
282
|
+
text: 'Last',
|
|
283
|
+
value: 'Last'
|
|
284
|
+
}
|
|
285
|
+
];
|
|
286
|
+
}
|
|
287
|
+
return leafTypes;
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
export function getLeafFormatTypes(schemaTree, fieldPath) {
|
|
291
|
+
let leafTypes = [];
|
|
292
|
+
|
|
293
|
+
if (schemaTree.rbType === 'String') {
|
|
294
|
+
leafTypes = [
|
|
295
|
+
{
|
|
296
|
+
text: 'As Text',
|
|
297
|
+
value: 'String'
|
|
298
|
+
},
|
|
299
|
+
{
|
|
300
|
+
text: 'As Number',
|
|
301
|
+
value: 'Number'
|
|
302
|
+
}
|
|
303
|
+
];
|
|
304
|
+
}
|
|
305
|
+
else if (schemaTree.rbType === 'Number') {
|
|
306
|
+
leafTypes = [
|
|
307
|
+
{
|
|
308
|
+
text: 'As Number',
|
|
309
|
+
value: 'Number'
|
|
310
|
+
},
|
|
311
|
+
{
|
|
312
|
+
text: 'As Currency',
|
|
313
|
+
value: 'Currency'
|
|
314
|
+
},
|
|
315
|
+
{
|
|
316
|
+
text: 'As Text',
|
|
317
|
+
value: 'String'
|
|
318
|
+
}
|
|
319
|
+
];
|
|
320
|
+
}
|
|
321
|
+
else if (schemaTree.rbType === 'Boolean') {
|
|
322
|
+
leafTypes = [
|
|
323
|
+
{
|
|
324
|
+
text: 'As Number',
|
|
325
|
+
value: 'Number'
|
|
326
|
+
},
|
|
327
|
+
{
|
|
328
|
+
text: 'As Boolean (True/False)',
|
|
329
|
+
value: 'Boolean'
|
|
330
|
+
},
|
|
331
|
+
{
|
|
332
|
+
text: 'As Text (Yes/No)',
|
|
333
|
+
value: 'String'
|
|
334
|
+
},
|
|
335
|
+
{
|
|
336
|
+
text: 'As Number (1/0)',
|
|
337
|
+
value: 'Boolean_Number'
|
|
338
|
+
}
|
|
339
|
+
];
|
|
340
|
+
}
|
|
341
|
+
else if (schemaTree.rbType === 'Date') {
|
|
342
|
+
leafTypes = [
|
|
343
|
+
{
|
|
344
|
+
text: 'As Number',
|
|
345
|
+
value: 'Number'
|
|
346
|
+
},
|
|
347
|
+
{
|
|
348
|
+
text: 'As Date (Short Format)',
|
|
349
|
+
value: 'Date'
|
|
350
|
+
},
|
|
351
|
+
{
|
|
352
|
+
text: 'As Time (Short Format)',
|
|
353
|
+
value: 'Time'
|
|
354
|
+
},
|
|
355
|
+
{
|
|
356
|
+
text: 'As Date/Time (Short Format)',
|
|
357
|
+
value: 'DateTime'
|
|
358
|
+
},
|
|
359
|
+
{
|
|
360
|
+
text: 'As Date (Long Format)',
|
|
361
|
+
value: 'Date_long'
|
|
362
|
+
},
|
|
363
|
+
{
|
|
364
|
+
text: 'As Date/Time (Long Format)',
|
|
365
|
+
value: 'DateTime_long'
|
|
366
|
+
},
|
|
367
|
+
{
|
|
368
|
+
text: 'As Timestamp (MS since 1970)',
|
|
369
|
+
value: 'Timestamp'
|
|
370
|
+
}
|
|
371
|
+
];
|
|
372
|
+
}
|
|
373
|
+
return leafTypes;
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
|
|
377
|
+
|
|
378
|
+
|
|
379
|
+
|
|
380
|
+
export async function mongoCommand(commandstr: string, collection: string, field?: any) {
|
|
381
|
+
let tmpObj;
|
|
382
|
+
try {
|
|
383
|
+
// Count the number of non-empty fields in a given collection:
|
|
384
|
+
if (commandstr === 'count') {
|
|
385
|
+
let obj = {
|
|
386
|
+
count: collection,
|
|
387
|
+
query: {}
|
|
388
|
+
};
|
|
389
|
+
obj.query[field] = {$ne: null};
|
|
390
|
+
tmpObj = await ResolveIOServer.getMainDB().command(obj);
|
|
391
|
+
}
|
|
392
|
+
// Get all distinct values in a given field.
|
|
393
|
+
else if (commandstr === 'distinct') {
|
|
394
|
+
let obj = {
|
|
395
|
+
distinct: collection,
|
|
396
|
+
query: {},
|
|
397
|
+
key: field,
|
|
398
|
+
};
|
|
399
|
+
tmpObj = await ResolveIOServer.getMainDB().command(obj);
|
|
400
|
+
}
|
|
401
|
+
else if (commandstr === 'listIndexes') {
|
|
402
|
+
// tmpObj = await this.mainDb.db[collection].getIndexes();
|
|
403
|
+
// let obj = { 'listIndexes': collection };
|
|
404
|
+
// tmpObj = await this.mainDb.db.getIndexes(obj);
|
|
405
|
+
}
|
|
406
|
+
} catch (err) {
|
|
407
|
+
// console.log('----------- mongoCommand err: ', err);
|
|
408
|
+
return -1;
|
|
409
|
+
}
|
|
410
|
+
if (tmpObj) {
|
|
411
|
+
return tmpObj.values;
|
|
412
|
+
}
|
|
413
|
+
}
|
package/tsconfig.json
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compileOnSave": false,
|
|
3
|
+
"compilerOptions": {
|
|
4
|
+
"outDir": "./dist/out-tsc",
|
|
5
|
+
"sourceMap": true,
|
|
6
|
+
"baseUrl": ".",
|
|
7
|
+
"declaration": true,
|
|
8
|
+
"module": "commonjs",
|
|
9
|
+
"moduleResolution": "node",
|
|
10
|
+
"emitDecoratorMetadata": true,
|
|
11
|
+
"experimentalDecorators": true,
|
|
12
|
+
"target": "es5",
|
|
13
|
+
"skipLibCheck": true,
|
|
14
|
+
"stripInternal": true,
|
|
15
|
+
"noImplicitAny": false,
|
|
16
|
+
"typeRoots": [
|
|
17
|
+
"node_modules/@types"
|
|
18
|
+
],
|
|
19
|
+
"lib": [
|
|
20
|
+
"es2017",
|
|
21
|
+
"dom"
|
|
22
|
+
]
|
|
23
|
+
},
|
|
24
|
+
"include": [
|
|
25
|
+
"./**/*.ts"
|
|
26
|
+
],
|
|
27
|
+
"exclude": [
|
|
28
|
+
"node_modules"
|
|
29
|
+
]
|
|
30
|
+
}
|
package/tslint.json
ADDED
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
{
|
|
2
|
+
"rulesDirectory": [
|
|
3
|
+
"node_modules/codelyzer"
|
|
4
|
+
],
|
|
5
|
+
"rules": {
|
|
6
|
+
"arrow-return-shorthand": true,
|
|
7
|
+
"callable-types": true,
|
|
8
|
+
"class-name": true,
|
|
9
|
+
"comment-format": [
|
|
10
|
+
false,
|
|
11
|
+
"check-space"
|
|
12
|
+
],
|
|
13
|
+
"curly": true,
|
|
14
|
+
"deprecation": {
|
|
15
|
+
"severity": "warn"
|
|
16
|
+
},
|
|
17
|
+
"eofline": false,
|
|
18
|
+
"forin": true,
|
|
19
|
+
"import-blacklist": [
|
|
20
|
+
false,
|
|
21
|
+
"rxjs",
|
|
22
|
+
"rxjs/Rx"
|
|
23
|
+
],
|
|
24
|
+
"import-spacing": true,
|
|
25
|
+
"indent": [
|
|
26
|
+
true,
|
|
27
|
+
"tabs"
|
|
28
|
+
],
|
|
29
|
+
"interface-over-type-literal": true,
|
|
30
|
+
"label-position": true,
|
|
31
|
+
"max-line-length": [
|
|
32
|
+
false,
|
|
33
|
+
140
|
|
34
|
+
],
|
|
35
|
+
"member-access": false,
|
|
36
|
+
"member-ordering": [
|
|
37
|
+
true,
|
|
38
|
+
{
|
|
39
|
+
"order": [
|
|
40
|
+
"static-field",
|
|
41
|
+
"instance-field",
|
|
42
|
+
"static-method",
|
|
43
|
+
"instance-method"
|
|
44
|
+
]
|
|
45
|
+
}
|
|
46
|
+
],
|
|
47
|
+
"no-arg": true,
|
|
48
|
+
"no-bitwise": true,
|
|
49
|
+
"no-console": [
|
|
50
|
+
true,
|
|
51
|
+
"debug",
|
|
52
|
+
"info",
|
|
53
|
+
"time",
|
|
54
|
+
"timeEnd",
|
|
55
|
+
"trace"
|
|
56
|
+
],
|
|
57
|
+
"no-construct": true,
|
|
58
|
+
"no-debugger": true,
|
|
59
|
+
"no-duplicate-super": true,
|
|
60
|
+
"no-empty": false,
|
|
61
|
+
"no-empty-interface": true,
|
|
62
|
+
"no-eval": true,
|
|
63
|
+
"no-inferrable-types": [
|
|
64
|
+
true,
|
|
65
|
+
"ignore-params"
|
|
66
|
+
],
|
|
67
|
+
"no-misused-new": true,
|
|
68
|
+
"no-non-null-assertion": true,
|
|
69
|
+
"no-shadowed-variable": true,
|
|
70
|
+
"no-string-literal": false,
|
|
71
|
+
"no-string-throw": true,
|
|
72
|
+
"no-switch-case-fall-through": true,
|
|
73
|
+
"no-trailing-whitespace": false,
|
|
74
|
+
"no-unnecessary-initializer": true,
|
|
75
|
+
"no-unused-expression": true,
|
|
76
|
+
"no-use-before-declare": true,
|
|
77
|
+
"no-var-keyword": true,
|
|
78
|
+
"object-literal-sort-keys": false,
|
|
79
|
+
"one-line": [
|
|
80
|
+
false,
|
|
81
|
+
"check-open-brace",
|
|
82
|
+
"check-catch",
|
|
83
|
+
"check-else",
|
|
84
|
+
"check-whitespace"
|
|
85
|
+
],
|
|
86
|
+
"prefer-const": false,
|
|
87
|
+
"quotemark": [
|
|
88
|
+
true,
|
|
89
|
+
"single"
|
|
90
|
+
],
|
|
91
|
+
"radix": false,
|
|
92
|
+
"semicolon": [
|
|
93
|
+
true,
|
|
94
|
+
"always"
|
|
95
|
+
],
|
|
96
|
+
"triple-equals": [
|
|
97
|
+
true,
|
|
98
|
+
"allow-null-check"
|
|
99
|
+
],
|
|
100
|
+
"typedef-whitespace": [
|
|
101
|
+
true,
|
|
102
|
+
{
|
|
103
|
+
"call-signature": "nospace",
|
|
104
|
+
"index-signature": "nospace",
|
|
105
|
+
"parameter": "nospace",
|
|
106
|
+
"property-declaration": "nospace",
|
|
107
|
+
"variable-declaration": "nospace"
|
|
108
|
+
}
|
|
109
|
+
],
|
|
110
|
+
"unified-signatures": true,
|
|
111
|
+
"variable-name": false,
|
|
112
|
+
"whitespace": [
|
|
113
|
+
true,
|
|
114
|
+
"check-branch",
|
|
115
|
+
"check-decl",
|
|
116
|
+
"check-operator",
|
|
117
|
+
"check-separator",
|
|
118
|
+
"check-type"
|
|
119
|
+
],
|
|
120
|
+
"directive-selector": [
|
|
121
|
+
false,
|
|
122
|
+
"attribute",
|
|
123
|
+
"app",
|
|
124
|
+
"camelCase"
|
|
125
|
+
],
|
|
126
|
+
"component-selector": [
|
|
127
|
+
false,
|
|
128
|
+
"element",
|
|
129
|
+
"app",
|
|
130
|
+
"kebab-case"
|
|
131
|
+
],
|
|
132
|
+
"no-output-on-prefix": false,
|
|
133
|
+
"use-input-property-decorator": true,
|
|
134
|
+
"use-output-property-decorator": true,
|
|
135
|
+
"use-host-property-decorator": true,
|
|
136
|
+
"no-input-rename": true,
|
|
137
|
+
"no-output-rename": true,
|
|
138
|
+
"use-life-cycle-interface": true,
|
|
139
|
+
"use-pipe-transform-interface": true,
|
|
140
|
+
"component-class-suffix": true,
|
|
141
|
+
"directive-class-suffix": true
|
|
142
|
+
}
|
|
143
|
+
}
|
package/client-server-app.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/client-server-app.js
DELETED
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
12
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
13
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
14
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
|
-
function step(op) {
|
|
16
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
-
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
18
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
|
-
switch (op[0]) {
|
|
21
|
-
case 0: case 1: t = op; break;
|
|
22
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
23
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
24
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
25
|
-
default:
|
|
26
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
27
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
28
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
29
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
30
|
-
if (t[2]) _.ops.pop();
|
|
31
|
-
_.trys.pop(); continue;
|
|
32
|
-
}
|
|
33
|
-
op = body.call(thisArg, _);
|
|
34
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
35
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
var serverConfig = require('./settings.json');
|
|
40
|
-
var index_1 = require("./index");
|
|
41
|
-
new index_1.ResolveIOServer(serverConfig, [], 'ResolveIO Server Library', __dirname);
|
|
42
|
-
index_1.ResolveIOServer.connectAndRun().then(function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
43
|
-
return __generator(this, function (_a) {
|
|
44
|
-
return [2 /*return*/];
|
|
45
|
-
});
|
|
46
|
-
}); });
|
|
47
|
-
|
|
48
|
-
//# sourceMappingURL=client-server-app.js.map
|
package/client-server-app.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/client-server-app.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAI,YAAY,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAAC;AAC9C,iCAA0C;AAE1C,IAAI,uBAAe,CAAC,YAAY,EAAE,EAAE,EAAE,0BAA0B,EAAE,SAAS,CAAC,CAAC;AAC7E,uBAAe,CAAC,aAAa,EAAE,CAAC,IAAI,CAAC;;;;KAEpC,CAAC,CAAC","file":"client-server-app.js","sourcesContent":["let serverConfig = require('./settings.json');\nimport { ResolveIOServer } from './index';\n\nnew ResolveIOServer(serverConfig, [], 'ResolveIO Server Library', __dirname);\nResolveIOServer.connectAndRun().then(async () => {\n\t\n});"]}
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.AppStatus = void 0;
|
|
4
|
-
var index_1 = require("../index");
|
|
5
|
-
var mongo_manager_1 = require("../managers/mongo.manager");
|
|
6
|
-
var schema = {
|
|
7
|
-
_id: {
|
|
8
|
-
type: String,
|
|
9
|
-
optional: true
|
|
10
|
-
},
|
|
11
|
-
__v: {
|
|
12
|
-
type: Number,
|
|
13
|
-
optional: true
|
|
14
|
-
},
|
|
15
|
-
updatedAt: {
|
|
16
|
-
type: Date,
|
|
17
|
-
optional: true
|
|
18
|
-
},
|
|
19
|
-
createdAt: {
|
|
20
|
-
type: Date,
|
|
21
|
-
optional: true
|
|
22
|
-
},
|
|
23
|
-
message: {
|
|
24
|
-
type: String
|
|
25
|
-
}
|
|
26
|
-
};
|
|
27
|
-
exports.AppStatus = null;
|
|
28
|
-
initializeCollection();
|
|
29
|
-
function initializeCollection() {
|
|
30
|
-
if (index_1.ResolveIOServer && index_1.ResolveIOServer.getMainDB()) {
|
|
31
|
-
var model = new mongo_manager_1.MongoManagerModel({
|
|
32
|
-
collectionName: 'app-statuses',
|
|
33
|
-
schema: schema,
|
|
34
|
-
useVersionCollection: false,
|
|
35
|
-
useReportBuilder: false,
|
|
36
|
-
reportBuilderLookupTables: [],
|
|
37
|
-
timestamps: true,
|
|
38
|
-
createLogs: false,
|
|
39
|
-
checkSchema: true,
|
|
40
|
-
collectionOptions: null
|
|
41
|
-
});
|
|
42
|
-
exports.AppStatus = model.collection_main;
|
|
43
|
-
}
|
|
44
|
-
else {
|
|
45
|
-
setTimeout(function () {
|
|
46
|
-
initializeCollection();
|
|
47
|
-
}, 1);
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
//# sourceMappingURL=app-status.collection.js.map
|