@lenne.tech/nest-server 11.25.0 → 11.25.1
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lenne.tech/nest-server",
|
|
3
|
-
"version": "11.25.
|
|
3
|
+
"version": "11.25.1",
|
|
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",
|
package/src/test/test.helper.ts
CHANGED
|
@@ -78,6 +78,19 @@ export interface TestGraphQLOptions {
|
|
|
78
78
|
*/
|
|
79
79
|
convertEnums?: boolean | string[];
|
|
80
80
|
|
|
81
|
+
/**
|
|
82
|
+
* Cookies for the request. Three usage modes (same as `TestRestOptions.cookies`):
|
|
83
|
+
* - string (plain token without = or ;): Auto-detected as session token
|
|
84
|
+
* and converted via `buildBetterAuthCookies()` to all relevant cookie names
|
|
85
|
+
* (iam.session_token, token)
|
|
86
|
+
* - string (with = or ;): Used as-is as a cookie string
|
|
87
|
+
* - Record<string, string>: Key-value pairs joined into a cookie string
|
|
88
|
+
*
|
|
89
|
+
* Use this for cookie-based authentication (default since 11.25.0). Can be
|
|
90
|
+
* combined with `token` — both headers will be sent.
|
|
91
|
+
*/
|
|
92
|
+
cookies?: Record<string, string> | string;
|
|
93
|
+
|
|
81
94
|
/**
|
|
82
95
|
* Count of subscription messages, specifies how many messages are to be received on subscription
|
|
83
96
|
*/
|
|
@@ -305,7 +318,7 @@ export class TestHelper {
|
|
|
305
318
|
};
|
|
306
319
|
|
|
307
320
|
// Init vars
|
|
308
|
-
const { language, log, logError, statusCode, token, variables } = config;
|
|
321
|
+
const { cookies, language, log, logError, statusCode, token, variables } = config;
|
|
309
322
|
|
|
310
323
|
// Init
|
|
311
324
|
let query = '';
|
|
@@ -402,6 +415,7 @@ export class TestHelper {
|
|
|
402
415
|
|
|
403
416
|
// Request configuration
|
|
404
417
|
const requestConfig: any = {
|
|
418
|
+
cookies,
|
|
405
419
|
method: 'POST',
|
|
406
420
|
payload: { query },
|
|
407
421
|
url: '/graphql',
|