@bleedingdev/modern-js-bff-core 3.8.1-ultramodern.1 → 3.8.1-ultramodern.3
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.
|
@@ -114,14 +114,18 @@ const generateClient = async ({ appDir, resourcePath, apiDir, lambdaDir, prefix,
|
|
|
114
114
|
`;
|
|
115
115
|
continue;
|
|
116
116
|
}
|
|
117
|
-
const
|
|
118
|
-
const
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
117
|
+
const portExpression = 'server' === target ? `process.env.PORT || ${String(port)}` : String(port);
|
|
118
|
+
const requestOptionProperties = [
|
|
119
|
+
`path: ${JSON.stringify(routePath)}`,
|
|
120
|
+
`method: ${JSON.stringify(upperHttpMethod)}`,
|
|
121
|
+
`port: ${portExpression}`,
|
|
122
|
+
`httpMethodDecider: ${JSON.stringify(httpMethodDecider ? httpMethodDecider : 'functionName')}`
|
|
123
|
+
];
|
|
124
|
+
if (domain) requestOptionProperties.push(`domain: ${JSON.stringify(domain)}`);
|
|
125
|
+
if (fetcher) requestOptionProperties.push('fetch');
|
|
126
|
+
if (requestId) requestOptionProperties.push(`requestId: ${JSON.stringify(requestId)}`);
|
|
127
|
+
requestOptionProperties.push(`operationContext: ${JSON.stringify(operationContext)}`);
|
|
128
|
+
handlersCode += `export ${exportStatement} createRequest({ ${requestOptionProperties.join(', ')} });
|
|
125
129
|
`;
|
|
126
130
|
}
|
|
127
131
|
const serializedRequestCreator = JSON.stringify(requestCreator);
|
|
@@ -81,14 +81,18 @@ const generateClient = async ({ appDir, resourcePath, apiDir, lambdaDir, prefix,
|
|
|
81
81
|
`;
|
|
82
82
|
continue;
|
|
83
83
|
}
|
|
84
|
-
const
|
|
85
|
-
const
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
84
|
+
const portExpression = 'server' === target ? `process.env.PORT || ${String(port)}` : String(port);
|
|
85
|
+
const requestOptionProperties = [
|
|
86
|
+
`path: ${JSON.stringify(routePath)}`,
|
|
87
|
+
`method: ${JSON.stringify(upperHttpMethod)}`,
|
|
88
|
+
`port: ${portExpression}`,
|
|
89
|
+
`httpMethodDecider: ${JSON.stringify(httpMethodDecider ? httpMethodDecider : 'functionName')}`
|
|
90
|
+
];
|
|
91
|
+
if (domain) requestOptionProperties.push(`domain: ${JSON.stringify(domain)}`);
|
|
92
|
+
if (fetcher) requestOptionProperties.push('fetch');
|
|
93
|
+
if (requestId) requestOptionProperties.push(`requestId: ${JSON.stringify(requestId)}`);
|
|
94
|
+
requestOptionProperties.push(`operationContext: ${JSON.stringify(operationContext)}`);
|
|
95
|
+
handlersCode += `export ${exportStatement} createRequest({ ${requestOptionProperties.join(', ')} });
|
|
92
96
|
`;
|
|
93
97
|
}
|
|
94
98
|
const serializedRequestCreator = JSON.stringify(requestCreator);
|
|
@@ -83,14 +83,18 @@ const generateClient = async ({ appDir, resourcePath, apiDir, lambdaDir, prefix,
|
|
|
83
83
|
`;
|
|
84
84
|
continue;
|
|
85
85
|
}
|
|
86
|
-
const
|
|
87
|
-
const
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
86
|
+
const portExpression = 'server' === target ? `process.env.PORT || ${String(port)}` : String(port);
|
|
87
|
+
const requestOptionProperties = [
|
|
88
|
+
`path: ${JSON.stringify(routePath)}`,
|
|
89
|
+
`method: ${JSON.stringify(upperHttpMethod)}`,
|
|
90
|
+
`port: ${portExpression}`,
|
|
91
|
+
`httpMethodDecider: ${JSON.stringify(httpMethodDecider ? httpMethodDecider : 'functionName')}`
|
|
92
|
+
];
|
|
93
|
+
if (domain) requestOptionProperties.push(`domain: ${JSON.stringify(domain)}`);
|
|
94
|
+
if (fetcher) requestOptionProperties.push('fetch');
|
|
95
|
+
if (requestId) requestOptionProperties.push(`requestId: ${JSON.stringify(requestId)}`);
|
|
96
|
+
requestOptionProperties.push(`operationContext: ${JSON.stringify(operationContext)}`);
|
|
97
|
+
handlersCode += `export ${exportStatement} createRequest({ ${requestOptionProperties.join(', ')} });
|
|
94
98
|
`;
|
|
95
99
|
}
|
|
96
100
|
const serializedRequestCreator = JSON.stringify(requestCreator);
|
package/package.json
CHANGED
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"modern",
|
|
18
18
|
"modern.js"
|
|
19
19
|
],
|
|
20
|
-
"version": "3.8.1-ultramodern.
|
|
20
|
+
"version": "3.8.1-ultramodern.3",
|
|
21
21
|
"types": "./dist/types/index.d.ts",
|
|
22
22
|
"main": "./dist/cjs/index.js",
|
|
23
23
|
"exports": {
|
|
@@ -31,15 +31,15 @@
|
|
|
31
31
|
}
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@modern-js/utils": "npm:@bleedingdev/modern-js-utils@3.8.1-ultramodern.
|
|
34
|
+
"@modern-js/utils": "npm:@bleedingdev/modern-js-utils@3.8.1-ultramodern.3",
|
|
35
35
|
"@swc/helpers": "^0.5.23",
|
|
36
36
|
"koa-compose": "^4.1.0",
|
|
37
37
|
"reflect-metadata": "^0.2.2",
|
|
38
38
|
"type-fest": "5.8.0"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
|
-
"@modern-js/bff-runtime": "npm:@bleedingdev/modern-js-bff-runtime@3.8.1-ultramodern.
|
|
42
|
-
"@modern-js/types": "npm:@bleedingdev/modern-js-types@3.8.1-ultramodern.
|
|
41
|
+
"@modern-js/bff-runtime": "npm:@bleedingdev/modern-js-bff-runtime@3.8.1-ultramodern.3",
|
|
42
|
+
"@modern-js/types": "npm:@bleedingdev/modern-js-types@3.8.1-ultramodern.3",
|
|
43
43
|
"@rslib/core": "0.23.2",
|
|
44
44
|
"@scripts/rstest-config": "2.66.0",
|
|
45
45
|
"@types/koa-compose": "^3.2.9",
|