@nattyjs/express 0.0.1-beta.63 → 0.0.1-beta.65
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/index.cjs +11 -1
- package/dist/index.mjs +11 -1
- package/package.json +4 -4
package/dist/index.cjs
CHANGED
|
@@ -44,6 +44,12 @@ function getResponse(expressResponse, responseInfo) {
|
|
|
44
44
|
expressResponse.send(responseInfo.body.json);
|
|
45
45
|
} else if (responseInfo.body && responseInfo.body.buffer)
|
|
46
46
|
expressResponse.send(responseInfo.body.buffer);
|
|
47
|
+
else if (responseInfo.body && "string" in responseInfo.body)
|
|
48
|
+
expressResponse.send(responseInfo.body.string);
|
|
49
|
+
else if (responseInfo.body && "number" in responseInfo.body)
|
|
50
|
+
expressResponse.send(String(responseInfo.body.number));
|
|
51
|
+
else if (responseInfo.body && "boolean" in responseInfo.body)
|
|
52
|
+
expressResponse.send(String(responseInfo.body.boolean));
|
|
47
53
|
else
|
|
48
54
|
expressResponse.send();
|
|
49
55
|
return expressResponse;
|
|
@@ -195,7 +201,11 @@ const ExpressModule = {
|
|
|
195
201
|
if (config.autoGeneratePort == true || config.autoGeneratePort == void 0)
|
|
196
202
|
common.getPort().then((port) => {
|
|
197
203
|
app.listen(port, () => {
|
|
198
|
-
|
|
204
|
+
if (typeof process.send === "function") {
|
|
205
|
+
process.send({ kind: "natty:server-listening", port });
|
|
206
|
+
} else {
|
|
207
|
+
console.log(`[NATTYJS]:Server is running on port ${port}`);
|
|
208
|
+
}
|
|
199
209
|
});
|
|
200
210
|
});
|
|
201
211
|
return app;
|
package/dist/index.mjs
CHANGED
|
@@ -34,6 +34,12 @@ function getResponse(expressResponse, responseInfo) {
|
|
|
34
34
|
expressResponse.send(responseInfo.body.json);
|
|
35
35
|
} else if (responseInfo.body && responseInfo.body.buffer)
|
|
36
36
|
expressResponse.send(responseInfo.body.buffer);
|
|
37
|
+
else if (responseInfo.body && "string" in responseInfo.body)
|
|
38
|
+
expressResponse.send(responseInfo.body.string);
|
|
39
|
+
else if (responseInfo.body && "number" in responseInfo.body)
|
|
40
|
+
expressResponse.send(String(responseInfo.body.number));
|
|
41
|
+
else if (responseInfo.body && "boolean" in responseInfo.body)
|
|
42
|
+
expressResponse.send(String(responseInfo.body.boolean));
|
|
37
43
|
else
|
|
38
44
|
expressResponse.send();
|
|
39
45
|
return expressResponse;
|
|
@@ -185,7 +191,11 @@ const ExpressModule = {
|
|
|
185
191
|
if (config.autoGeneratePort == true || config.autoGeneratePort == void 0)
|
|
186
192
|
getPort().then((port) => {
|
|
187
193
|
app.listen(port, () => {
|
|
188
|
-
|
|
194
|
+
if (typeof process.send === "function") {
|
|
195
|
+
process.send({ kind: "natty:server-listening", port });
|
|
196
|
+
} else {
|
|
197
|
+
console.log(`[NATTYJS]:Server is running on port ${port}`);
|
|
198
|
+
}
|
|
189
199
|
});
|
|
190
200
|
});
|
|
191
201
|
return app;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nattyjs/express",
|
|
3
|
-
"version": "0.0.1-beta.
|
|
3
|
+
"version": "0.0.1-beta.65",
|
|
4
4
|
"description": "",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"author": "ajayojha <ojhaajay@outlook.com>",
|
|
@@ -19,9 +19,9 @@
|
|
|
19
19
|
"chokidar": "4.0.3",
|
|
20
20
|
"cors": "2.8.5",
|
|
21
21
|
"compression": "1.7.4",
|
|
22
|
-
"@nattyjs/core": "0.0.1-beta.
|
|
23
|
-
"@nattyjs/common": "0.0.1-beta.
|
|
24
|
-
"@nattyjs/types": "0.0.1-beta.
|
|
22
|
+
"@nattyjs/core": "0.0.1-beta.65",
|
|
23
|
+
"@nattyjs/common": "0.0.1-beta.65",
|
|
24
|
+
"@nattyjs/types": "0.0.1-beta.65"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
27
|
"@types/node": "20.3.1",
|