dce-expresskit 4.3.4 → 4.3.5
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/helpers/initExpressKitCollections.d.ts +6 -0
- package/lib/helpers/initExpressKitCollections.js +24 -1
- package/lib/helpers/initExpressKitCollections.js.map +1 -1
- package/lib/index.d.ts +2 -2
- package/lib/index.js +37 -2
- package/lib/index.js.map +1 -1
- package/package.json +1 -1
- package/src/helpers/initExpressKitCollections.ts +17 -0
- package/src/index.ts +2 -1
|
@@ -23,6 +23,12 @@ export declare const internalGetSelectAdminCollection: () => Promise<MangoCollec
|
|
|
23
23
|
* @author Yuen Ler Chow
|
|
24
24
|
*/
|
|
25
25
|
export declare const internalGetLogReviewerAdminCollection: () => Promise<MangoCollection<LogReviewerAdmin>>;
|
|
26
|
+
/**
|
|
27
|
+
* Get the log collection. Resolves after the collection has been initialized
|
|
28
|
+
* @author Yuen Ler Chow
|
|
29
|
+
* @returns a promise that resolves with the log collection
|
|
30
|
+
*/
|
|
31
|
+
export declare const getLogCollection: () => Promise<MangoCollection<Log>>;
|
|
26
32
|
/**
|
|
27
33
|
* Initialize all collections required for expresskit
|
|
28
34
|
* @author Gardenia Liu
|
|
@@ -36,7 +36,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
36
36
|
}
|
|
37
37
|
};
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.internalGetLogReviewerAdminCollection = exports.internalGetSelectAdminCollection = exports.internalGetCrossServerCredentialCollection = exports.internalGetLogCollection = void 0;
|
|
39
|
+
exports.getLogCollection = exports.internalGetLogReviewerAdminCollection = exports.internalGetSelectAdminCollection = exports.internalGetCrossServerCredentialCollection = exports.internalGetLogCollection = void 0;
|
|
40
40
|
/*------------------------------------------------------------------------*/
|
|
41
41
|
/* ------------------------- Collection Storage ------------------------- */
|
|
42
42
|
/*------------------------------------------------------------------------*/
|
|
@@ -132,6 +132,29 @@ var internalGetLogReviewerAdminCollection = function () { return __awaiter(void
|
|
|
132
132
|
}); };
|
|
133
133
|
exports.internalGetLogReviewerAdminCollection = internalGetLogReviewerAdminCollection;
|
|
134
134
|
/*------------------------------------------------------------------------*/
|
|
135
|
+
/* ----------------------- Public Collection Getters -------------------- */
|
|
136
|
+
/*------------------------------------------------------------------------*/
|
|
137
|
+
/**
|
|
138
|
+
* Get the log collection. Resolves after the collection has been initialized
|
|
139
|
+
* @author Yuen Ler Chow
|
|
140
|
+
* @returns a promise that resolves with the log collection
|
|
141
|
+
*/
|
|
142
|
+
var getLogCollection = function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
143
|
+
return __generator(this, function (_a) {
|
|
144
|
+
switch (_a.label) {
|
|
145
|
+
case 0:
|
|
146
|
+
// Wait for collections to be initialized
|
|
147
|
+
return [4 /*yield*/, collectionsInitialized];
|
|
148
|
+
case 1:
|
|
149
|
+
// Wait for collections to be initialized
|
|
150
|
+
_a.sent();
|
|
151
|
+
// Return the log collection
|
|
152
|
+
return [2 /*return*/, logCollection];
|
|
153
|
+
}
|
|
154
|
+
});
|
|
155
|
+
}); };
|
|
156
|
+
exports.getLogCollection = getLogCollection;
|
|
157
|
+
/*------------------------------------------------------------------------*/
|
|
135
158
|
/* -------------------------------- Main -------------------------------- */
|
|
136
159
|
/*------------------------------------------------------------------------*/
|
|
137
160
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"initExpressKitCollections.js","sourceRoot":"","sources":["../../src/helpers/initExpressKitCollections.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAWA,4EAA4E;AAC5E,4EAA4E;AAC5E,4EAA4E;AAE5E,iCAAiC;AACjC,IAAI,aAAmC,CAAC;AACxC,IAAI,+BAAuE,CAAC;AAC5E,IAAI,qBAAmD,CAAC;AACxD,IAAI,0BAA6D,CAAC;AAElE,6DAA6D;AAC7D,IAAI,6BAAoD,CAAC;AACz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I,UAAU,CAC5B,KAAK,EACL;YACE,cAAc,EAAE,IAAI;YACpB,SAAS,EAAE;gBACT,UAAU;gBACV,SAAS;gBACT,YAAY;gBACZ,MAAM;gBACN,MAAM;gBACN,OAAO;gBACP,KAAK;gBACL,MAAM;gBACN,MAAM;aACP;SACF,CACF,CAAC;QAEF,sDAAsD;QACtD,+BAA+B,GAAG,IAAI,UAAU,CAC9C,uBAAuB,EACvB;YACE,cAAc,EAAE,KAAK;SACtB,CACF,CAAC;QAEF,2CAA2C;QAC3C,qBAAqB,GAAG,IAAI,UAAU,CACpC,aAAa,EACb;YACE,cAAc,EAAE,IAAI;SACrB,CACF,CAAC;QAEF,iDAAiD;QACjD,0BAA0B,GAAG,IAAI,UAAU,CACzC,kBAAkB,EAClB;YACE,cAAc,EAAE,IAAI;SACrB,CACF,CAAC;QAEF,gCAAgC;QAChC,6BAA6B,EAAE,CAAC;IAClC,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,OAAO,4BAA4B,CAAC,GAAY,CAAC,CAAC;IACpD,CAAC;AACH,CAAC,CAAC;AAEF,kBAAe,yBAAyB,CAAC"}
|
|
1
|
+
{"version":3,"file":"initExpressKitCollections.js","sourceRoot":"","sources":["../../src/helpers/initExpressKitCollections.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAWA,4EAA4E;AAC5E,4EAA4E;AAC5E,4EAA4E;AAE5E,iCAAiC;AACjC,IAAI,aAAmC,CAAC;AACxC,IAAI,+BAAuE,CAAC;AAC5E,IAAI,qBAAmD,CAAC;AACxD,IAAI,0BAA6D,CAAC;AAElE,6DAA6D;AAC7D,IAAI,6BAAoD,CAAC;AACzD,IAAI,4BAAoD,CAAC;AACzD,IAAM,sBAAsB,GAAG,IAAI,OAAO,CAAC,UAAC,OAAO,EAAE,MAAM;IACzD,6BAA6B,GAAG,OAAO,CAAC;IACxC,4BAA4B,GAAG,MAAM,CAAC;AACxC,CAAC,CAAC,CA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M,yBAAyB,GAAG,UAAC,UAAkC;IACnE,IAAI,CAAC;QACH,kCAAkC;QAClC,aAAa,GAAG,IAAI,UAAU,CAC5B,KAAK,EACL;YACE,cAAc,EAAE,IAAI;YACpB,SAAS,EAAE;gBACT,UAAU;gBACV,SAAS;gBACT,YAAY;gBACZ,MAAM;gBACN,MAAM;gBACN,OAAO;gBACP,KAAK;gBACL,MAAM;gBACN,MAAM;aACP;SACF,CACF,CAAC;QAEF,sDAAsD;QACtD,+BAA+B,GAAG,IAAI,UAAU,CAC9C,uBAAuB,EACvB;YACE,cAAc,EAAE,KAAK;SACtB,CACF,CAAC;QAEF,2CAA2C;QAC3C,qBAAqB,GAAG,IAAI,UAAU,CACpC,aAAa,EACb;YACE,cAAc,EAAE,IAAI;SACrB,CACF,CAAC;QAEF,iDAAiD;QACjD,0BAA0B,GAAG,IAAI,UAAU,CACzC,kBAAkB,EAClB;YACE,cAAc,EAAE,IAAI;SACrB,CACF,CAAC;QAEF,gCAAgC;QAChC,6BAA6B,EAAE,CAAC;IAClC,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,OAAO,4BAA4B,CAAC,GAAY,CAAC,CAAC;IACpD,CAAC;AACH,CAAC,CAAC;AAEF,kBAAe,yBAAyB,CAAC"}
|
package/lib/index.d.ts
CHANGED
|
@@ -5,6 +5,6 @@ import handleError from './helpers/handleError';
|
|
|
5
5
|
import handleSuccess from './helpers/handleSuccess';
|
|
6
6
|
import addDBEditorEndpoints from './helpers/addDBEditorEndpoints';
|
|
7
7
|
import visitEndpointOnAnotherServer from './helpers/visitEndpointOnAnotherServer';
|
|
8
|
-
import initExpressKitCollections from './helpers/initExpressKitCollections';
|
|
8
|
+
import initExpressKitCollections, { getLogCollection } from './helpers/initExpressKitCollections';
|
|
9
9
|
import CrossServerCredential from './types/CrossServerCredential';
|
|
10
|
-
export { ErrorWithCode, MINUTE_IN_MS, HOUR_IN_MS, DAY_IN_MS, abbreviate, avg, ceilToNumDecimals, floorToNumDecimals, forceNumIntoBounds, padDecimalZeros, padZerosLeft, roundToNumDecimals, sum, waitMs, getOrdinal, getTimeInfoInET, getTimestampFromTimeInfoInET, startMinWait, getHumanReadableDate, getPartOfDay, stringsToHumanReadableList, onlyKeepLetters, parallelLimit, getMonthName, genCSV, extractProp, compareArraysByProp, genCommaList, getLocalTimeInfo, prefixWithAOrAn, everyAsync, filterAsync, forEachAsync, mapAsync, someAsync, capitalize, shuffleArray, initServer, genRouteHandler, handleError, handleSuccess, initExpressKitCollections, addDBEditorEndpoints, visitEndpointOnAnotherServer, DayOfWeek, Log, LogType, LogSource, LogAction, LogBuiltInMetadata, LogMetadataType, LogFunction, CrossServerCredential, ParamType, };
|
|
10
|
+
export { ErrorWithCode, MINUTE_IN_MS, HOUR_IN_MS, DAY_IN_MS, abbreviate, avg, ceilToNumDecimals, floorToNumDecimals, forceNumIntoBounds, padDecimalZeros, padZerosLeft, roundToNumDecimals, sum, waitMs, getOrdinal, getTimeInfoInET, getTimestampFromTimeInfoInET, startMinWait, getHumanReadableDate, getPartOfDay, stringsToHumanReadableList, onlyKeepLetters, parallelLimit, getMonthName, genCSV, extractProp, compareArraysByProp, genCommaList, getLocalTimeInfo, prefixWithAOrAn, everyAsync, filterAsync, forEachAsync, mapAsync, someAsync, capitalize, shuffleArray, initServer, genRouteHandler, handleError, handleSuccess, initExpressKitCollections, getLogCollection, addDBEditorEndpoints, visitEndpointOnAnotherServer, DayOfWeek, Log, LogType, LogSource, LogAction, LogBuiltInMetadata, LogMetadataType, LogFunction, CrossServerCredential, ParamType, };
|
package/lib/index.js
CHANGED
|
@@ -1,9 +1,43 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
2
35
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
36
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
37
|
};
|
|
5
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.
|
|
39
|
+
exports.LogBuiltInMetadata = exports.LogAction = exports.LogSource = exports.LogType = exports.DayOfWeek = exports.visitEndpointOnAnotherServer = exports.addDBEditorEndpoints = exports.getLogCollection = exports.initExpressKitCollections = exports.handleSuccess = exports.handleError = exports.genRouteHandler = exports.initServer = exports.shuffleArray = exports.capitalize = exports.someAsync = exports.mapAsync = exports.forEachAsync = exports.filterAsync = exports.everyAsync = exports.prefixWithAOrAn = exports.getLocalTimeInfo = exports.genCommaList = exports.compareArraysByProp = exports.extractProp = exports.genCSV = exports.getMonthName = exports.parallelLimit = exports.onlyKeepLetters = exports.stringsToHumanReadableList = exports.getPartOfDay = exports.getHumanReadableDate = exports.startMinWait = exports.getTimestampFromTimeInfoInET = exports.getTimeInfoInET = exports.getOrdinal = exports.waitMs = exports.sum = exports.roundToNumDecimals = exports.padZerosLeft = exports.padDecimalZeros = exports.forceNumIntoBounds = exports.floorToNumDecimals = exports.ceilToNumDecimals = exports.avg = exports.abbreviate = exports.DAY_IN_MS = exports.HOUR_IN_MS = exports.MINUTE_IN_MS = exports.ErrorWithCode = void 0;
|
|
40
|
+
exports.ParamType = void 0;
|
|
7
41
|
// Import dce-reactkit
|
|
8
42
|
var dce_reactkit_1 = require("dce-reactkit");
|
|
9
43
|
Object.defineProperty(exports, "abbreviate", { enumerable: true, get: function () { return dce_reactkit_1.abbreviate; } });
|
|
@@ -62,6 +96,7 @@ var addDBEditorEndpoints_1 = __importDefault(require("./helpers/addDBEditorEndpo
|
|
|
62
96
|
exports.addDBEditorEndpoints = addDBEditorEndpoints_1.default;
|
|
63
97
|
var visitEndpointOnAnotherServer_1 = __importDefault(require("./helpers/visitEndpointOnAnotherServer"));
|
|
64
98
|
exports.visitEndpointOnAnotherServer = visitEndpointOnAnotherServer_1.default;
|
|
65
|
-
var initExpressKitCollections_1 =
|
|
99
|
+
var initExpressKitCollections_1 = __importStar(require("./helpers/initExpressKitCollections"));
|
|
66
100
|
exports.initExpressKitCollections = initExpressKitCollections_1.default;
|
|
101
|
+
Object.defineProperty(exports, "getLogCollection", { enumerable: true, get: function () { return initExpressKitCollections_1.getLogCollection; } });
|
|
67
102
|
//# sourceMappingURL=index.js.map
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,sBAAsB;AACtB,6CA+CsB;AAuBpB,2FArEA,yBAAU,OAqEA;AACV,oFArEA,kBAAG,OAqEA;AACH,kGArEA,gCAAiB,OAqEA;AACjB,mGArEA,iCAAkB,OAqEA;AAClB,mGArEA,iCAAkB,OAqEA;AAClB,gGArEA,8BAAe,OAqEA;AACf,6FArEA,2BAAY,OAqEA;AACZ,mGArEA,iCAAkB,OAqEA;AAClB,oFArEA,kBAAG,OAqEA;AACH,uFArEA,qBAAM,OAqEA;AACN,2FArEA,yBAAU,OAqEA;AACV,gGArEA,8BAAe,OAqEA;AACf,6GArEA,2CAA4B,OAqEA;AAC5B,6FArEA,2BAAY,OAqEA;AACZ,qGArEA,mCAAoB,OAqEA;AACpB,6FArEA,2BAAY,OAqEA;AACZ,2GArEA,yCAA0B,OAqEA;AAC1B,gGArEA,8BAAe,OAqEA;AACf,8FArEA,4BAAa,OAqEA;AACb,6FArEA,2BAAY,OAqEA;AACZ,uFArEA,qBAAM,OAqEA;AACN,4FArEA,0BAAW,OAqEA;AACX,oGArEA,kCAAmB,OAqEA;AAEnB,iGAtEA,+BAAgB,OAsEA;AADhB,6FApEA,2BAAY,OAoEA;AAEZ,gGArEA,8BAAe,OAqEA;AACf,2FArEA,yBAAU,OAqEA;AACV,4FArEA,0BAAW,OAqEA;AACX,6FArEA,2BAAY,OAqEA;AACZ,yFArEA,uBAAQ,OAqEA;AACR,0FArEA,wBAAS,OAqEA;AACT,2FArEA,yBAAU,OAqEA;AACV,6FArEA,2BAAY,OAqEA;AAWZ,0FA/EA,wBAAS,OA+EA;AAET,wFA/EA,sBAAO,OA+EA;AACP,0FA/EA,wBAAS,OA+EA;AACT,0FA/EA,wBAAS,OA+EA;AACT,mGA/EA,iCAAkB,OA+EA;AApDlB,6FAxBA,2BAAY,OAwBA;AACZ,2FAxBA,yBAAU,OAwBA;AACV,0FAxBA,wBAAS,OAwBA;AAJT,8FAnBA,4BAAa,OAmBA;AA2Db,0FA7EA,wBAAS,OA6EA;AA1EX,iBAAiB;AACjB,oEAA8C;AAsD5C,qBAtDK,oBAAU,CAsDL;AArDZ,8EAAwD;AAsDtD,0BAtDK,yBAAe,CAsDL;AArDjB,sEAAgD;AAsD9C,sBAtDK,qBAAW,CAsDL;AArDb,0EAAoD;AAsDlD,wBAtDK,uBAAa,CAsDL;AArDf,wFAAkE;AAwDhE,+BAxDK,8BAAoB,CAwDL;AAvDtB,wGAAkF;AAwDhF,uCAxDK,sCAA4B,CAwDL;AAvD9B,+FAAkG;AAoDhG,oCApDK,mCAAyB,CAoDL;AACzB,iGArDkC,4CAAgB,OAqDlC"}
|
package/package.json
CHANGED
|
@@ -79,6 +79,23 @@ export const internalGetLogReviewerAdminCollection = async () => {
|
|
|
79
79
|
return logReviewerAdminCollection;
|
|
80
80
|
};
|
|
81
81
|
|
|
82
|
+
/*------------------------------------------------------------------------*/
|
|
83
|
+
/* ----------------------- Public Collection Getters -------------------- */
|
|
84
|
+
/*------------------------------------------------------------------------*/
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* Get the log collection. Resolves after the collection has been initialized
|
|
88
|
+
* @author Yuen Ler Chow
|
|
89
|
+
* @returns a promise that resolves with the log collection
|
|
90
|
+
*/
|
|
91
|
+
export const getLogCollection = async () => {
|
|
92
|
+
// Wait for collections to be initialized
|
|
93
|
+
await collectionsInitialized;
|
|
94
|
+
|
|
95
|
+
// Return the log collection
|
|
96
|
+
return logCollection;
|
|
97
|
+
};
|
|
98
|
+
|
|
82
99
|
/*------------------------------------------------------------------------*/
|
|
83
100
|
/* -------------------------------- Main -------------------------------- */
|
|
84
101
|
/*------------------------------------------------------------------------*/
|
package/src/index.ts
CHANGED
|
@@ -55,7 +55,7 @@ import handleError from './helpers/handleError';
|
|
|
55
55
|
import handleSuccess from './helpers/handleSuccess';
|
|
56
56
|
import addDBEditorEndpoints from './helpers/addDBEditorEndpoints';
|
|
57
57
|
import visitEndpointOnAnotherServer from './helpers/visitEndpointOnAnotherServer';
|
|
58
|
-
import initExpressKitCollections from './helpers/initExpressKitCollections';
|
|
58
|
+
import initExpressKitCollections, { getLogCollection } from './helpers/initExpressKitCollections';
|
|
59
59
|
|
|
60
60
|
// Import types
|
|
61
61
|
import CrossServerCredential from './types/CrossServerCredential';
|
|
@@ -108,6 +108,7 @@ export {
|
|
|
108
108
|
handleError,
|
|
109
109
|
handleSuccess,
|
|
110
110
|
initExpressKitCollections,
|
|
111
|
+
getLogCollection,
|
|
111
112
|
addDBEditorEndpoints,
|
|
112
113
|
visitEndpointOnAnotherServer,
|
|
113
114
|
// Types
|