@lenne.tech/nest-server 9.3.0 → 9.4.0
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/dist/config.env.js +0 -3
- package/dist/config.env.js.map +1 -1
- package/dist/core/common/args/filter.args.js.map +1 -1
- package/dist/core/common/args/pagination.args.js.map +1 -1
- package/dist/core/common/filters/http-exception-log.filter.js.map +1 -1
- package/dist/core/common/helpers/input.helper.d.ts +2 -0
- package/dist/core/common/helpers/input.helper.js +27 -1
- package/dist/core/common/helpers/input.helper.js.map +1 -1
- package/dist/core/common/inputs/combined-filter.input.js.map +1 -1
- package/dist/core/common/inputs/filter.input.js.map +1 -1
- package/dist/core/common/inputs/single-filter.input.js.map +1 -1
- package/dist/core/common/inputs/sort.input.js.map +1 -1
- package/dist/core/common/interceptors/check-response.interceptor.js.map +1 -1
- package/dist/core/common/interceptors/check-security.interceptor.js.map +1 -1
- package/dist/core/common/middlewares/to-lower-case.middleware.d.ts +2 -0
- package/dist/core/common/middlewares/to-lower-case.middleware.js +9 -0
- package/dist/core/common/middlewares/to-lower-case.middleware.js.map +1 -0
- package/dist/core/common/models/core-persistence.model.js.map +1 -1
- package/dist/core/common/pipes/check-input.pipe.js.map +1 -1
- package/dist/core/common/pipes/map-and-validate.pipe.js.map +1 -1
- package/dist/core/common/plugins/complexity.plugin.js.map +1 -1
- package/dist/core/common/scalars/any.scalar.js.map +1 -1
- package/dist/core/common/scalars/date-timestamp.scalar.d.ts +7 -0
- package/dist/core/common/scalars/date-timestamp.scalar.js +30 -0
- package/dist/core/common/scalars/date-timestamp.scalar.js.map +1 -0
- package/dist/core/common/scalars/date.scalar.js +3 -20
- package/dist/core/common/scalars/date.scalar.js.map +1 -1
- package/dist/core/common/scalars/json.scalar.js.map +1 -1
- package/dist/core/common/services/config.service.js +1 -1
- package/dist/core/common/services/config.service.js.map +1 -1
- package/dist/core/common/services/email.service.js.map +1 -1
- package/dist/core/common/services/mailjet.service.js.map +1 -1
- package/dist/core/common/services/template.service.js.map +1 -1
- package/dist/core/modules/auth/core-auth.controller.js.map +1 -1
- package/dist/core/modules/auth/core-auth.model.js.map +1 -1
- package/dist/core/modules/auth/core-auth.module.js.map +1 -1
- package/dist/core/modules/auth/core-auth.resolver.js.map +1 -1
- package/dist/core/modules/auth/guards/refresh-token.guard.js.map +1 -1
- package/dist/core/modules/auth/guards/roles.guard.js.map +1 -1
- package/dist/core/modules/auth/inputs/core-auth-sign-in.input.js.map +1 -1
- package/dist/core/modules/auth/inputs/core-auth-sign-up.input.js.map +1 -1
- package/dist/core/modules/auth/services/core-auth.service.js.map +1 -1
- package/dist/core/modules/auth/strategies/jwt-refresh.strategy.js.map +1 -1
- package/dist/core/modules/auth/strategies/jwt.strategy.js.map +1 -1
- package/dist/core/modules/file/core-file-info.model.js.map +1 -1
- package/dist/core/modules/file/core-file.controller.js.map +1 -1
- package/dist/core/modules/file/core-file.resolver.js.map +1 -1
- package/dist/core/modules/user/core-user.model.js +1 -1
- package/dist/core/modules/user/core-user.model.js.map +1 -1
- package/dist/core/modules/user/inputs/core-user-create.input.js.map +1 -1
- package/dist/core/modules/user/inputs/core-user.input.js.map +1 -1
- package/dist/core.module.js.map +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/server/common/models/persistence.model.js.map +1 -1
- package/dist/server/common/services/cron-jobs.service.js.map +1 -1
- package/dist/server/modules/auth/auth.controller.js.map +1 -1
- package/dist/server/modules/auth/auth.model.js.map +1 -1
- package/dist/server/modules/auth/auth.module.js.map +1 -1
- package/dist/server/modules/auth/auth.resolver.js.map +1 -1
- package/dist/server/modules/auth/auth.service.js.map +1 -1
- package/dist/server/modules/auth/inputs/auth-sign-in.input.js.map +1 -1
- package/dist/server/modules/auth/inputs/auth-sign-up.input.js.map +1 -1
- package/dist/server/modules/file/file-info.model.js.map +1 -1
- package/dist/server/modules/file/file.controller.js.map +1 -1
- package/dist/server/modules/file/file.module.js.map +1 -1
- package/dist/server/modules/file/file.resolver.js.map +1 -1
- package/dist/server/modules/file/file.service.js.map +1 -1
- package/dist/server/modules/file/multer-config.service.js.map +1 -1
- package/dist/server/modules/user/avatar.controller.js.map +1 -1
- package/dist/server/modules/user/inputs/user-create.input.js.map +1 -1
- package/dist/server/modules/user/inputs/user.input.js.map +1 -1
- package/dist/server/modules/user/outputs/find-and-count-users-result.output.js.map +1 -1
- package/dist/server/modules/user/user.model.js.map +1 -1
- package/dist/server/modules/user/user.module.js.map +1 -1
- package/dist/server/modules/user/user.resolver.js.map +1 -1
- package/dist/server/modules/user/user.service.js.map +1 -1
- package/dist/server/server.controller.js.map +1 -1
- package/dist/server/server.module.js.map +1 -1
- package/dist/test/test.helper.js +1 -0
- package/dist/test/test.helper.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +28 -28
- package/src/config.env.ts +0 -3
- package/src/core/common/helpers/input.helper.ts +44 -0
- package/src/core/common/middlewares/to-lower-case.middleware.ts +9 -0
- package/src/core/common/scalars/date-timestamp.scalar.ts +32 -0
- package/src/core/common/scalars/date.scalar.ts +3 -34
- package/src/core/modules/user/core-user.model.ts +1 -1
- package/src/core/modules/user/inputs/core-user.input.ts +1 -0
- package/src/index.ts +2 -0
- package/src/test/test.helper.ts +2 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lenne.tech/nest-server",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.4.0",
|
|
4
4
|
"description": "Modern, fast, powerful Node.js web framework in TypeScript based on Nest with a GraphQL API and a connection to MongoDB (or other databases).",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"node",
|
|
@@ -60,15 +60,15 @@
|
|
|
60
60
|
"node": ">= 16.13.0"
|
|
61
61
|
},
|
|
62
62
|
"dependencies": {
|
|
63
|
-
"@apollo/gateway": "2.
|
|
64
|
-
"@nestjs/apollo": "
|
|
65
|
-
"@nestjs/common": "9.3.
|
|
66
|
-
"@nestjs/core": "9.3.
|
|
67
|
-
"@nestjs/graphql": "
|
|
63
|
+
"@apollo/gateway": "2.4.0",
|
|
64
|
+
"@nestjs/apollo": "11.0.4",
|
|
65
|
+
"@nestjs/common": "9.3.12",
|
|
66
|
+
"@nestjs/core": "9.3.12",
|
|
67
|
+
"@nestjs/graphql": "11.0.4",
|
|
68
68
|
"@nestjs/jwt": "10.0.2",
|
|
69
|
-
"@nestjs/mongoose": "9.2.
|
|
69
|
+
"@nestjs/mongoose": "9.2.2",
|
|
70
70
|
"@nestjs/passport": "9.0.3",
|
|
71
|
-
"@nestjs/platform-express": "9.3.
|
|
71
|
+
"@nestjs/platform-express": "9.3.12",
|
|
72
72
|
"@nestjs/schedule": "2.2.0",
|
|
73
73
|
"apollo-server-core": "3.11.1",
|
|
74
74
|
"apollo-server-express": "3.11.1",
|
|
@@ -77,48 +77,48 @@
|
|
|
77
77
|
"class-validator": "0.14.0",
|
|
78
78
|
"compression": "1.7.4",
|
|
79
79
|
"cookie-parser": "1.4.6",
|
|
80
|
-
"ejs": "3.1.
|
|
80
|
+
"ejs": "3.1.9",
|
|
81
81
|
"graphql": "16.6.0",
|
|
82
82
|
"graphql-query-complexity": "0.12.0",
|
|
83
83
|
"graphql-subscriptions": "2.0.0",
|
|
84
84
|
"graphql-upload": "15.0.2",
|
|
85
85
|
"js-sha256": "0.9.0",
|
|
86
86
|
"json-to-graphql-query": "2.2.5",
|
|
87
|
-
"light-my-request": "5.
|
|
87
|
+
"light-my-request": "5.9.1",
|
|
88
88
|
"lodash": "4.17.21",
|
|
89
89
|
"mongodb": "4.14.0",
|
|
90
|
-
"mongoose": "6.
|
|
90
|
+
"mongoose": "6.10.4",
|
|
91
91
|
"mongoose-gridfs": "1.3.0",
|
|
92
92
|
"multer": "1.4.5-lts.1",
|
|
93
93
|
"multer-gridfs-storage": "5.0.2",
|
|
94
94
|
"node-mailjet": "6.0.2",
|
|
95
95
|
"nodemailer": "6.9.1",
|
|
96
|
-
"nodemon": "2.0.
|
|
96
|
+
"nodemon": "2.0.22",
|
|
97
97
|
"passport": "0.6.0",
|
|
98
98
|
"passport-jwt": "4.0.1",
|
|
99
99
|
"reflect-metadata": "0.1.13",
|
|
100
100
|
"rfdc": "1.3.0",
|
|
101
|
-
"rimraf": "4.1
|
|
101
|
+
"rimraf": "4.4.1",
|
|
102
102
|
"rxjs": "7.8.0"
|
|
103
103
|
},
|
|
104
104
|
"devDependencies": {
|
|
105
|
-
"@nestjs/testing": "9.3.
|
|
105
|
+
"@nestjs/testing": "9.3.12",
|
|
106
106
|
"@types/compression": "1.7.2",
|
|
107
107
|
"@types/cookie-parser": "1.4.3",
|
|
108
|
-
"@types/cron": "2.0.
|
|
109
|
-
"@types/ejs": "3.1.
|
|
110
|
-
"@types/jest": "29.
|
|
111
|
-
"@types/lodash": "4.14.
|
|
108
|
+
"@types/cron": "2.0.1",
|
|
109
|
+
"@types/ejs": "3.1.2",
|
|
110
|
+
"@types/jest": "29.5.0",
|
|
111
|
+
"@types/lodash": "4.14.192",
|
|
112
112
|
"@types/multer": "1.4.7",
|
|
113
|
-
"@types/node": "18.
|
|
113
|
+
"@types/node": "18.15.10",
|
|
114
114
|
"@types/nodemailer": "6.4.7",
|
|
115
|
-
"@types/passport": "1.0.
|
|
115
|
+
"@types/passport": "1.0.12",
|
|
116
116
|
"@types/supertest": "2.0.12",
|
|
117
|
-
"@typescript-eslint/eslint-plugin": "5.
|
|
118
|
-
"@typescript-eslint/parser": "5.
|
|
117
|
+
"@typescript-eslint/eslint-plugin": "5.57.0",
|
|
118
|
+
"@typescript-eslint/parser": "5.57.0",
|
|
119
119
|
"coffeescript": "2.7.0",
|
|
120
|
-
"eslint": "8.
|
|
121
|
-
"eslint-config-prettier": "8.
|
|
120
|
+
"eslint": "8.36.0",
|
|
121
|
+
"eslint-config-prettier": "8.8.0",
|
|
122
122
|
"find-file-up": "2.0.1",
|
|
123
123
|
"grunt": "1.6.1",
|
|
124
124
|
"grunt-bg-shell": "2.3.3",
|
|
@@ -126,17 +126,17 @@
|
|
|
126
126
|
"grunt-contrib-watch": "1.1.0",
|
|
127
127
|
"grunt-sync": "0.8.2",
|
|
128
128
|
"husky": "8.0.3",
|
|
129
|
-
"jest": "29.
|
|
129
|
+
"jest": "29.5.0",
|
|
130
130
|
"npm-watch": "0.11.0",
|
|
131
|
-
"pm2": "5.
|
|
132
|
-
"prettier": "2.8.
|
|
131
|
+
"pm2": "5.3.0",
|
|
132
|
+
"prettier": "2.8.7",
|
|
133
133
|
"pretty-quick": "3.1.3",
|
|
134
134
|
"supertest": "6.3.3",
|
|
135
135
|
"ts-jest": "29.0.5",
|
|
136
136
|
"ts-morph": "17.0.1",
|
|
137
137
|
"ts-node": "10.9.1",
|
|
138
138
|
"tsconfig-paths": "4.1.2",
|
|
139
|
-
"typescript": "
|
|
139
|
+
"typescript": "5.0.2",
|
|
140
140
|
"yalc": "1.0.0-pre.53"
|
|
141
141
|
},
|
|
142
142
|
"overrides": {
|
package/src/config.env.ts
CHANGED
|
@@ -51,7 +51,6 @@ const config: { [env: string]: IServerOptions } = {
|
|
|
51
51
|
},
|
|
52
52
|
graphQl: {
|
|
53
53
|
driver: {
|
|
54
|
-
debug: true,
|
|
55
54
|
introspection: true,
|
|
56
55
|
},
|
|
57
56
|
maxComplexity: 20,
|
|
@@ -125,7 +124,6 @@ const config: { [env: string]: IServerOptions } = {
|
|
|
125
124
|
},
|
|
126
125
|
graphQl: {
|
|
127
126
|
driver: {
|
|
128
|
-
debug: true,
|
|
129
127
|
introspection: true,
|
|
130
128
|
},
|
|
131
129
|
maxComplexity: 20,
|
|
@@ -199,7 +197,6 @@ const config: { [env: string]: IServerOptions } = {
|
|
|
199
197
|
},
|
|
200
198
|
graphQl: {
|
|
201
199
|
driver: {
|
|
202
|
-
debug: false,
|
|
203
200
|
introspection: true,
|
|
204
201
|
},
|
|
205
202
|
maxComplexity: 20,
|
|
@@ -2,6 +2,7 @@ import { BadRequestException, HttpException, UnauthorizedException } from '@nest
|
|
|
2
2
|
import { plainToInstance } from 'class-transformer';
|
|
3
3
|
import { validate } from 'class-validator';
|
|
4
4
|
import { ValidatorOptions } from 'class-validator/types/validation/ValidatorOptions';
|
|
5
|
+
import { Kind } from 'graphql/index';
|
|
5
6
|
import * as _ from 'lodash';
|
|
6
7
|
import * as rfdc from 'rfdc';
|
|
7
8
|
import { checkRestricted } from '../decorators/restricted.decorator';
|
|
@@ -300,6 +301,25 @@ export async function check(
|
|
|
300
301
|
return value;
|
|
301
302
|
}
|
|
302
303
|
|
|
304
|
+
/**
|
|
305
|
+
* Check if input is a valid Date format and return a new Date
|
|
306
|
+
*/
|
|
307
|
+
export function checkAndGetDate(input: any): Date {
|
|
308
|
+
// Create date from value
|
|
309
|
+
const date = new Date(input);
|
|
310
|
+
|
|
311
|
+
// Check value
|
|
312
|
+
if (date.toString() === 'Invalid Date') {
|
|
313
|
+
throw new Error('Invalid value for date');
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
// Check if range is valid
|
|
317
|
+
date.toISOString();
|
|
318
|
+
|
|
319
|
+
// Return date if everything is fine
|
|
320
|
+
return date;
|
|
321
|
+
}
|
|
322
|
+
|
|
303
323
|
/**
|
|
304
324
|
* Clone object
|
|
305
325
|
* @param object Any object
|
|
@@ -379,6 +399,30 @@ export function filterProperties<T = Record<string, any>>(
|
|
|
379
399
|
.reduce((res, key) => Object.assign(res, { [key]: obj[key] }), {});
|
|
380
400
|
}
|
|
381
401
|
|
|
402
|
+
export function getDateFromGraphQL(input: any): Date {
|
|
403
|
+
// Check value
|
|
404
|
+
if (input.value === undefined || input.value === null) {
|
|
405
|
+
return input.value;
|
|
406
|
+
}
|
|
407
|
+
|
|
408
|
+
// Check nullable
|
|
409
|
+
if (!input.value) {
|
|
410
|
+
throw new Error('Invalid value for date');
|
|
411
|
+
}
|
|
412
|
+
|
|
413
|
+
// Check value type
|
|
414
|
+
if (input.kind !== Kind.INT && input.kind !== Kind.STRING) {
|
|
415
|
+
throw new Error('Invalid value type for date');
|
|
416
|
+
}
|
|
417
|
+
|
|
418
|
+
// Check format if value is a string
|
|
419
|
+
if (input.kind === Kind.STRING && isNaN(Date.parse(input.value))) {
|
|
420
|
+
throw new Error('Invalid ISO 8601 format for date');
|
|
421
|
+
}
|
|
422
|
+
|
|
423
|
+
return checkAndGetDate(input.value);
|
|
424
|
+
}
|
|
425
|
+
|
|
382
426
|
/**
|
|
383
427
|
* Get plain copy of object
|
|
384
428
|
*/
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { FieldMiddleware, MiddlewareContext, NextFn } from '@nestjs/graphql';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Field middleware to convert string to lowercase letters
|
|
5
|
+
*/
|
|
6
|
+
export const toLowerCase: FieldMiddleware = async (ctx: MiddlewareContext, next: NextFn) => {
|
|
7
|
+
const value = await next();
|
|
8
|
+
return value?.toLowerCase();
|
|
9
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { CustomScalar, Scalar } from '@nestjs/graphql';
|
|
2
|
+
import { Kind } from 'graphql';
|
|
3
|
+
import { checkAndGetDate, getDateFromGraphQL } from '../helpers/input.helper';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Date-Timestamp-Scalar to convert timestamp to date and vice versa
|
|
7
|
+
*/
|
|
8
|
+
@Scalar('Date', (type) => Date)
|
|
9
|
+
export class DateTimestampScalar implements CustomScalar<number, Date> {
|
|
10
|
+
description = 'Date (by Timestamp) custom scalar type';
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Parse value from the client input variables
|
|
14
|
+
*/
|
|
15
|
+
parseValue(value: number): Date {
|
|
16
|
+
return checkAndGetDate(value); // value from the client
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Serialize value to send to the client
|
|
21
|
+
*/
|
|
22
|
+
serialize(value: Date): number {
|
|
23
|
+
return value.getTime(); // value sent to the client
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Parse value from the client query
|
|
28
|
+
*/
|
|
29
|
+
parseLiteral(ast: any): Date {
|
|
30
|
+
return getDateFromGraphQL(ast);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { CustomScalar, Scalar } from '@nestjs/graphql';
|
|
2
2
|
import { Kind } from 'graphql';
|
|
3
|
+
import { checkAndGetDate, getDateFromGraphQL } from '../helpers/input.helper';
|
|
3
4
|
|
|
4
5
|
/**
|
|
5
6
|
* Date scalar to convert string into date
|
|
@@ -12,7 +13,7 @@ export class DateScalar implements CustomScalar<string, Date> {
|
|
|
12
13
|
* Parse value from the client input variables
|
|
13
14
|
*/
|
|
14
15
|
parseValue(value: number): Date {
|
|
15
|
-
return
|
|
16
|
+
return checkAndGetDate(value); // value from the client
|
|
16
17
|
}
|
|
17
18
|
|
|
18
19
|
/**
|
|
@@ -26,38 +27,6 @@ export class DateScalar implements CustomScalar<string, Date> {
|
|
|
26
27
|
* Parse value from the client query
|
|
27
28
|
*/
|
|
28
29
|
parseLiteral(ast: any): Date {
|
|
29
|
-
|
|
30
|
-
if (ast.value === undefined || ast.value === null) {
|
|
31
|
-
return ast.value;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
// Check nullable
|
|
35
|
-
if (!ast.value) {
|
|
36
|
-
throw new Error('Invalid value for date');
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
// Check value type
|
|
40
|
-
if (ast.kind !== Kind.INT && ast.kind !== Kind.STRING) {
|
|
41
|
-
throw new Error('Invalid value type for date');
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
// Check format if value is a string
|
|
45
|
-
if (ast.kind === Kind.STRING && isNaN(Date.parse(ast.value))) {
|
|
46
|
-
throw new Error('Invalid ISO 8601 format for date');
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
// Create date from value
|
|
50
|
-
const date = new Date(ast.value);
|
|
51
|
-
|
|
52
|
-
// Check value
|
|
53
|
-
if (date.toString() === 'Invalid Date') {
|
|
54
|
-
throw new Error('Invalid value for date');
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
// Check if range is valid
|
|
58
|
-
date.toISOString();
|
|
59
|
-
|
|
60
|
-
// Return date if everything is fine
|
|
61
|
-
return date;
|
|
30
|
+
return getDateFromGraphQL(ast);
|
|
62
31
|
}
|
|
63
32
|
}
|
|
@@ -22,7 +22,7 @@ export abstract class CoreUserModel extends CorePersistenceModel {
|
|
|
22
22
|
*/
|
|
23
23
|
@Field({ description: 'Email of the user', nullable: true })
|
|
24
24
|
@IsEmail()
|
|
25
|
-
@Prop({ unique: true })
|
|
25
|
+
@Prop({ unique: true, lowercase: true, trim: true })
|
|
26
26
|
email: string = undefined;
|
|
27
27
|
|
|
28
28
|
/**
|
|
@@ -4,6 +4,7 @@ import { Restricted } from '../../../common/decorators/restricted.decorator';
|
|
|
4
4
|
import { ProcessType } from '../../../common/enums/process-type.enum';
|
|
5
5
|
import { RoleEnum } from '../../../common/enums/role.enum';
|
|
6
6
|
import { CoreInput } from '../../../common/inputs/core-input.input';
|
|
7
|
+
import { toLowerCase } from '../../../common/middlewares/to-lower-case.middleware';
|
|
7
8
|
|
|
8
9
|
/**
|
|
9
10
|
* User input to update a user
|
package/src/index.ts
CHANGED
|
@@ -48,6 +48,7 @@ export * from './core/common/interfaces/prepare-output-options.interface';
|
|
|
48
48
|
export * from './core/common/interfaces/resolve-selector.interface';
|
|
49
49
|
export * from './core/common/interfaces/server-options.interface';
|
|
50
50
|
export * from './core/common/interfaces/service-options.interface';
|
|
51
|
+
export * from './core/common/middlewares/to-lower-case.middleware';
|
|
51
52
|
export * from './core/common/models/core-model.model';
|
|
52
53
|
export * from './core/common/models/core-persistence.model';
|
|
53
54
|
export * from './core/common/pipes/check-input.pipe';
|
|
@@ -56,6 +57,7 @@ export * from './core/common/plugins/complexity.plugin';
|
|
|
56
57
|
export * from './core/common/plugins/mongoose-id.plugin';
|
|
57
58
|
export * from './core/common/scalars/any.scalar';
|
|
58
59
|
export * from './core/common/scalars/date.scalar';
|
|
60
|
+
export * from './core/common/scalars/date-timestamp.scalar';
|
|
59
61
|
export * from './core/common/scalars/json.scalar';
|
|
60
62
|
export * from './core/common/services/config.service';
|
|
61
63
|
export * from './core/common/services/core-cron-jobs.service';
|
package/src/test/test.helper.ts
CHANGED
|
@@ -520,6 +520,8 @@ export class TestHelper {
|
|
|
520
520
|
// Add variables as attachment or field
|
|
521
521
|
mapArray.forEach((variable, i) => {
|
|
522
522
|
if (variable.type === 'attachment') {
|
|
523
|
+
// See https://stackoverflow.com/questions/74581070/apollo-client-this-operation-has-been-blocked-as-a-potential-cross-site-request
|
|
524
|
+
request.set('Apollo-Require-Preflight', 'true');
|
|
523
525
|
if (typeof variable.value === 'object' && variable.value.file) {
|
|
524
526
|
request.attach(`${i}`, variable.value.file, variable.value.options);
|
|
525
527
|
} else {
|