itrm-tools 1.2.6 → 1.2.8
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.
|
@@ -28,6 +28,8 @@ class CheckableAPIRouter extends APIRouter_1.APIRouter {
|
|
|
28
28
|
return __awaiter(this, void 0, void 0, function* () {
|
|
29
29
|
var _a, _b, _c, _d;
|
|
30
30
|
try {
|
|
31
|
+
if (req.body && !req.body.raw)
|
|
32
|
+
req.body.raw = JSON.parse(JSON.stringify(req.body));
|
|
31
33
|
let route = APIService_1.ITRMAPIServiceGlobal.routers[req.baseUrl];
|
|
32
34
|
route.setHeaders(res);
|
|
33
35
|
let result = yield route.checker.applyChecks(req);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CheckableAPIRouter.js","sourceRoot":"","sources":["../../../src/api/check/CheckableAPIRouter.ts"],"names":[],"mappings":";;;;;;;;;;;;AACA,4CAAyC;AACzC,8CAAqD;AACrD,6CAA+E;AAE/E,MAAsB,kBAAmB,SAAQ,qBAAS;IAGtD,YAAY,IAAY,EAAE,OAAuB;QAC7C,KAAK,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;QAHjB,YAAO,GAAe,IAAI,uBAAU,EAAE,CAAC;IAI/C,CAAC;IAEM,IAAI;QACP,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAChC,CAAC;IAEM,QAAQ,CAAC,OAAiB;QAC7B,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;IACnC,CAAC;IAEY,KAAK,CAAC,GAAY,EAAE,GAAa,EAAE,IAAkB;;;YAC9D,IAAI,CAAC;gBACD,IAAI,KAAK,GAAuB,iCAAoB,CAAC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;gBAC1E,KAAK,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC;gBACtB,IAAI,MAAM,GAAmB,MAAM,KAAK,CAA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I,CAAC;gBACD,IAAI,GAAG,CAAC,IAAI,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG;oBACzB,GAAG,CAAC,IAAI,CAAC,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC;gBACxD,IAAI,KAAK,GAAuB,iCAAoB,CAAC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;gBAC1E,KAAK,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC;gBACtB,IAAI,MAAM,GAAmB,MAAM,KAAK,CAAC,OAAO,CAAC,WAAW,CAAC,GAAG,CAAC,CAAA;gBACjE,IAAI,MAAM,CAAC,QAAQ;oBACf,OAAO,KAAK,CAAC,aAAa,CAAC,GAAG,EAAE,GAAG,EAAE,IAAI,CAAC,CAAC;gBAC/C,OAAO,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC;YAC7C,CAAC;YAAC,OAAO,KAAU,EAAE,CAAC;gBAClB,OAAO,MAAM,GAAG,CAAC,MAAM,CAAC,MAAA,MAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,QAAQ,0CAAE,MAAM,mCAAI,GAAG,CAAC,CAAC,IAAI,CAAC;oBACzD,IAAI,EAAE,0BAA0B;oBAChC,KAAK,EAAE,4DAA4D;oBACnE,OAAO,EAAE,MAAA,MAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,QAAQ,0CAAE,IAAI,mCAAI,KAAK;iBAC1C,CAAC,CAAC;YACP,CAAC;QACL,CAAC;KAAA;CAGJ;AAnCD,gDAmCC"}
|
|
@@ -3,11 +3,11 @@ export declare class MongooseModelManager<S> {
|
|
|
3
3
|
collection: string;
|
|
4
4
|
protected model: Model<S>;
|
|
5
5
|
constructor(collection: string, definition: ObtainDocumentType<any, S, DefaultSchemaOptions> | SchemaDefinition<SchemaDefinitionType<S>>, options?: SchemaOptions | ResolveSchemaOptions<any>);
|
|
6
|
-
create(datum: S): Promise<(import("mongoose").Document<unknown, {}, S, {}> & {
|
|
6
|
+
create(datum: S): Promise<(import("mongoose").Document<unknown, {}, S, {}, {}> & {
|
|
7
7
|
_id: import("mongoose").Types.ObjectId;
|
|
8
8
|
} & {
|
|
9
9
|
__v: number;
|
|
10
|
-
}) | (import("mongoose").Document<unknown, {}, S, {}> & {
|
|
10
|
+
}) | (import("mongoose").Document<unknown, {}, S, {}, {}> & {
|
|
11
11
|
_id?: unknown;
|
|
12
12
|
} & Required<{
|
|
13
13
|
_id: unknown;
|
|
@@ -16,14 +16,46 @@ export declare class MongooseModelManager<S> {
|
|
|
16
16
|
})>;
|
|
17
17
|
createMany(data: S[]): Promise<any>;
|
|
18
18
|
exists(filter: FilterQuery<S>): import("mongoose").Query<{
|
|
19
|
-
_id: import("
|
|
20
|
-
} | null, import("mongoose").IfAny<S, any, import("mongoose").Document<unknown, {}, S, {}> & import("mongoose").
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
19
|
+
_id: import("mongodb").InferIdType<S>;
|
|
20
|
+
} | null, import("mongoose").IfAny<S, any, import("mongoose").Document<unknown, {}, S, {}, {}> & (import("mongoose").Require_id<S> extends infer T ? T extends import("mongoose").Require_id<S> ? T extends {
|
|
21
|
+
__v?: infer U;
|
|
22
|
+
} ? T : T & {
|
|
23
|
+
__v: number;
|
|
24
|
+
} : never : never)>, {}, S, "findOne", {}>;
|
|
25
|
+
find(filter: FilterQuery<S>): import("mongoose").Query<import("mongoose").IfAny<S, any, import("mongoose").Document<unknown, {}, S, {}, {}> & (import("mongoose").Require_id<S> extends infer T ? T extends import("mongoose").Require_id<S> ? T extends {
|
|
26
|
+
__v?: infer U;
|
|
27
|
+
} ? T : T & {
|
|
28
|
+
__v: number;
|
|
29
|
+
} : never : never)> | null, import("mongoose").IfAny<S, any, import("mongoose").Document<unknown, {}, S, {}, {}> & (import("mongoose").Require_id<S> extends infer T_1 ? T_1 extends import("mongoose").Require_id<S> ? T_1 extends {
|
|
30
|
+
__v?: infer U;
|
|
31
|
+
} ? T_1 : T_1 & {
|
|
32
|
+
__v: number;
|
|
33
|
+
} : never : never)>, {}, S, "findOne", {}>;
|
|
34
|
+
findMany(filter: FilterQuery<S>): import("mongoose").Query<import("mongoose").IfAny<S, any, import("mongoose").Document<unknown, {}, S, {}, {}> & (import("mongoose").Require_id<S> extends infer T ? T extends import("mongoose").Require_id<S> ? T extends {
|
|
35
|
+
__v?: infer U;
|
|
36
|
+
} ? T : T & {
|
|
37
|
+
__v: number;
|
|
38
|
+
} : never : never)>[], import("mongoose").IfAny<S, any, import("mongoose").Document<unknown, {}, S, {}, {}> & (import("mongoose").Require_id<S> extends infer T_1 ? T_1 extends import("mongoose").Require_id<S> ? T_1 extends {
|
|
39
|
+
__v?: infer U;
|
|
40
|
+
} ? T_1 : T_1 & {
|
|
41
|
+
__v: number;
|
|
42
|
+
} : never : never)>, {}, S, "find", {}>;
|
|
43
|
+
batch(filter: FilterQuery<S>, from: number, size: number): import("mongoose").Query<import("mongoose").IfAny<S, any, import("mongoose").Document<unknown, {}, S, {}, {}> & (import("mongoose").Require_id<S> extends infer T ? T extends import("mongoose").Require_id<S> ? T extends {
|
|
44
|
+
__v?: infer U;
|
|
45
|
+
} ? T : T & {
|
|
46
|
+
__v: number;
|
|
47
|
+
} : never : never)>[], import("mongoose").IfAny<S, any, import("mongoose").Document<unknown, {}, S, {}, {}> & (import("mongoose").Require_id<S> extends infer T_1 ? T_1 extends import("mongoose").Require_id<S> ? T_1 extends {
|
|
48
|
+
__v?: infer U;
|
|
49
|
+
} ? T_1 : T_1 & {
|
|
50
|
+
__v: number;
|
|
51
|
+
} : never : never)>, {}, S, "find", {}>;
|
|
24
52
|
updateOne(filter: FilterQuery<S>, data: UpdateWithAggregationPipeline | UpdateQuery<S>): any;
|
|
25
53
|
bulkWrite(writes: any[], options?: MongooseBulkWriteOptions): Promise<any>;
|
|
26
54
|
delete(filter: FilterQuery<S>): any;
|
|
27
55
|
deleteMany(filter: FilterQuery<S>): any;
|
|
28
|
-
countDocuments(filter: FilterQuery<S>): import("mongoose").Query<number, import("mongoose").IfAny<S, any, import("mongoose").Document<unknown, {}, S, {}> & import("mongoose").
|
|
56
|
+
countDocuments(filter: FilterQuery<S>): import("mongoose").Query<number, import("mongoose").IfAny<S, any, import("mongoose").Document<unknown, {}, S, {}, {}> & (import("mongoose").Require_id<S> extends infer T ? T extends import("mongoose").Require_id<S> ? T extends {
|
|
57
|
+
__v?: infer U;
|
|
58
|
+
} ? T : T & {
|
|
59
|
+
__v: number;
|
|
60
|
+
} : never : never)>, {}, S, "countDocuments", {}>;
|
|
29
61
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "itrm-tools",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.8",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -31,7 +31,6 @@
|
|
|
31
31
|
},
|
|
32
32
|
"homepage": "https://github.com/ITRMachines/itrm-tools#readme",
|
|
33
33
|
"devDependencies": {
|
|
34
|
-
"@sequelize/core": "^7.0.0-alpha.43",
|
|
35
34
|
"@sequelize/sqlite3": "^7.0.0-alpha.43",
|
|
36
35
|
"@types/cors": "^2.8.19",
|
|
37
36
|
"@types/crypto-js": "^4.2.2",
|
|
@@ -39,30 +38,31 @@
|
|
|
39
38
|
"@types/jest": "^30.0.0",
|
|
40
39
|
"@types/morgan": "^1.9.10",
|
|
41
40
|
"@types/multer": "^2.0.0",
|
|
42
|
-
"@types/node": "^24.
|
|
41
|
+
"@types/node": "^24.3.0",
|
|
43
42
|
"@types/swagger-ui-express": "^4.1.8",
|
|
44
43
|
"@types/uuid": "^10.0.0",
|
|
45
44
|
"@types/ws": "^8.18.1",
|
|
46
45
|
"axios-mock-adapter": "^2.1.0",
|
|
47
|
-
"jest": "^30.
|
|
46
|
+
"jest": "^30.1.2",
|
|
48
47
|
"jest-puppeteer": "^11.0.0",
|
|
49
|
-
"mongodb-memory-server": "^10.
|
|
50
|
-
"puppeteer": "^24.
|
|
51
|
-
"redis": "^5.
|
|
48
|
+
"mongodb-memory-server": "^10.2.0",
|
|
49
|
+
"puppeteer": "^24.18.0",
|
|
50
|
+
"redis": "^5.8.2",
|
|
52
51
|
"rimraf": "^6.0.1",
|
|
53
52
|
"sqlite3": "^5.1.7",
|
|
54
|
-
"ts-jest": "^29.4.
|
|
55
|
-
"typescript": "^5.
|
|
53
|
+
"ts-jest": "^29.4.1",
|
|
54
|
+
"typescript": "^5.9.2",
|
|
56
55
|
"uuid": "^11.1.0"
|
|
57
56
|
},
|
|
58
57
|
"dependencies": {
|
|
58
|
+
"@sequelize/core": "^7.0.0-alpha.43",
|
|
59
59
|
"axios": "^1.11.0",
|
|
60
60
|
"axios-retry": "^4.5.0",
|
|
61
61
|
"cors": "^2.8.5",
|
|
62
62
|
"crypto-js": "^4.2.0",
|
|
63
63
|
"express": "^5.1.0",
|
|
64
64
|
"https": "^1.0.0",
|
|
65
|
-
"mongoose": "^8.
|
|
65
|
+
"mongoose": "^8.18.0",
|
|
66
66
|
"morgan": "^1.10.0",
|
|
67
67
|
"multer": "^2.0.1",
|
|
68
68
|
"pg": "^8.16.3",
|