@nestledjs/api 2.3.0 → 2.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/package.json +1 -1
- package/src/core/files/data-access/src/lib/api-core-pub-sub.ts__tmpl__ +2 -0
- package/src/core/files/feature/src/lib/api-core-feature.module.ts__tmpl__ +1 -1
- package/src/core/generator.js +2 -1
- package/src/core/generator.js.map +1 -1
- package/src/core/schema.d.ts +1 -0
- package/src/core/schema.json +5 -0
package/package.json
CHANGED
|
@@ -46,6 +46,8 @@ function createRedisPubSub(): RedisPubSub | PubSub {
|
|
|
46
46
|
rejectUnauthorized: false,
|
|
47
47
|
},
|
|
48
48
|
}),
|
|
49
|
+
// Force IPv6 for Railway private networking
|
|
50
|
+
family: 6,
|
|
49
51
|
// Retry strategy to handle temporary connection issues
|
|
50
52
|
retryStrategy: (times: number) => {
|
|
51
53
|
if (times > 3) {
|
|
@@ -40,7 +40,7 @@ const redisPubSubProvider = {
|
|
|
40
40
|
const cookies = rawHeaders[i + 1].split(';')
|
|
41
41
|
for (const cookie of cookies) {
|
|
42
42
|
const [name, value] = cookie.trim().split('=')
|
|
43
|
-
if (name === '
|
|
43
|
+
if (name === '<%= cookieName %>') {
|
|
44
44
|
token = value
|
|
45
45
|
break
|
|
46
46
|
}
|
package/src/core/generator.js
CHANGED
|
@@ -8,6 +8,7 @@ function generateLibraries(tree_1) {
|
|
|
8
8
|
return tslib_1.__awaiter(this, arguments, void 0, function* (tree, options = {}) {
|
|
9
9
|
const templateRootPath = (0, devkit_1.joinPathFragments)(__dirname, './files');
|
|
10
10
|
const overwrite = options.overwrite === true;
|
|
11
|
+
const cookieName = options.cookieName || '__session';
|
|
11
12
|
const dependencies = {
|
|
12
13
|
'graphql-type-json': '^0.3.2',
|
|
13
14
|
'@nestjs/graphql': '^13.2.0',
|
|
@@ -25,7 +26,7 @@ function generateLibraries(tree_1) {
|
|
|
25
26
|
};
|
|
26
27
|
yield (0, utils_1.installPlugins)(tree, dependencies, devDependencies);
|
|
27
28
|
yield (0, utils_1.apiLibraryGenerator)(tree, { name: 'core', overwrite }, templateRootPath, 'data-access');
|
|
28
|
-
yield (0, utils_1.apiLibraryGenerator)(tree, { name: 'core', overwrite }, templateRootPath, 'feature', true);
|
|
29
|
+
yield (0, utils_1.apiLibraryGenerator)(tree, { name: 'core', overwrite, cookieName }, templateRootPath, 'feature', true);
|
|
29
30
|
yield (0, utils_1.apiLibraryGenerator)(tree, { name: 'core', overwrite }, templateRootPath, 'models');
|
|
30
31
|
yield (0, utils_1.apiLibraryGenerator)(tree, { name: 'core', overwrite }, templateRootPath, 'helpers');
|
|
31
32
|
yield (0, devkit_1.formatFiles)(tree);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generator.js","sourceRoot":"","sources":["../../../../../generators/api/src/core/generator.ts"],"names":[],"mappings":";;AAIA,
|
|
1
|
+
{"version":3,"file":"generator.js","sourceRoot":"","sources":["../../../../../generators/api/src/core/generator.ts"],"names":[],"mappings":";;AAIA,oCAqCC;;AAzCD,uCAAyG;AACzG,4CAAsE;AAGtE,SAA8B,iBAAiB;iEAC7C,IAAU,EACV,UAAkC,EAAE;QAEpC,MAAM,gBAAgB,GAAG,IAAA,0BAAiB,EAAC,SAAS,EAAE,SAAS,CAAC,CAAA;QAChE,MAAM,SAAS,GAAG,OAAO,CAAC,SAAS,KAAK,IAAI,CAAA;QAC5C,MAAM,UAAU,GAAG,OAAO,CAAC,UAAU,IAAI,WAAW,CAAA;QAEpD,MAAM,YAAY,GAAG;YACnB,mBAAmB,EAAE,QAAQ;YAC7B,iBAAiB,EAAE,SAAS;YAC5B,gBAAgB,EAAE,SAAS;YAC3B,kBAAkB,EAAE,SAAS;YAC7B,eAAe,EAAE,QAAQ;YACzB,gBAAgB,EAAE,QAAQ;YAC1B,gBAAgB,EAAE,QAAQ;YAC1B,gBAAgB,EAAE,QAAQ;YAC1B,YAAY,EAAE,SAAS;YACvB,6BAA6B,EAAE,QAAQ;SACxC,CAAA;QAED,MAAM,eAAe,GAAG;YACtB,uBAAuB,EAAE,QAAQ;SAClC,CAAA;QAED,MAAM,IAAA,sBAAc,EAAC,IAAI,EAAE,YAAY,EAAE,eAAe,CAAC,CAAA;QAEzD,MAAM,IAAA,2BAAmB,EAAC,IAAI,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,EAAE,gBAAgB,EAAE,aAAa,CAAC,CAAA;QAC7F,MAAM,IAAA,2BAAmB,EAAC,IAAI,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,UAAU,EAAE,EAAE,gBAAgB,EAAE,SAAS,EAAE,IAAI,CAAC,CAAA;QAC3G,MAAM,IAAA,2BAAmB,EAAC,IAAI,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,EAAE,gBAAgB,EAAE,QAAQ,CAAC,CAAA;QACxF,MAAM,IAAA,2BAAmB,EAAC,IAAI,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,EAAE,gBAAgB,EAAE,SAAS,CAAC,CAAA;QAEzF,MAAM,IAAA,oBAAW,EAAC,IAAI,CAAC,CAAA;QAEvB,OAAO,GAAG,EAAE;YACV,IAAA,4BAAmB,EAAC,IAAI,CAAC,CAAA;QAC3B,CAAC,CAAA;IACH,CAAC;CAAA"}
|
package/src/core/schema.d.ts
CHANGED
package/src/core/schema.json
CHANGED
|
@@ -8,6 +8,11 @@
|
|
|
8
8
|
"type": "boolean",
|
|
9
9
|
"description": "Whether to overwrite existing core libraries if they exist.",
|
|
10
10
|
"default": false
|
|
11
|
+
},
|
|
12
|
+
"cookieName": {
|
|
13
|
+
"type": "string",
|
|
14
|
+
"description": "The name of the session cookie used for WebSocket authentication.",
|
|
15
|
+
"default": "__session"
|
|
11
16
|
}
|
|
12
17
|
}
|
|
13
18
|
}
|