@cedarjs/api-server 6.0.0-canary.2789 → 6.0.0-canary.2793
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 +29 -72
- package/dist/cjs/apiCLIConfig.d.ts +0 -6
- package/dist/cjs/apiCLIConfig.d.ts.map +0 -1
- package/dist/cjs/apiCLIConfig.js +0 -71
- package/dist/cjs/apiCLIConfigHandler.d.ts +0 -3
- package/dist/cjs/apiCLIConfigHandler.d.ts.map +0 -1
- package/dist/cjs/apiCLIConfigHandler.js +0 -67
- package/dist/cjs/bin.d.ts +0 -2
- package/dist/cjs/bin.d.ts.map +0 -1
- package/dist/cjs/bin.js +0 -1007
- package/dist/cjs/bothCLIConfig.d.ts +0 -6
- package/dist/cjs/bothCLIConfig.d.ts.map +0 -1
- package/dist/cjs/bothCLIConfig.js +0 -76
- package/dist/cjs/bothCLIConfigHandler.d.ts +0 -3
- package/dist/cjs/bothCLIConfigHandler.d.ts.map +0 -1
- package/dist/cjs/bothCLIConfigHandler.js +0 -107
- package/dist/cjs/buildManager.d.ts +0 -15
- package/dist/cjs/buildManager.d.ts.map +0 -1
- package/dist/cjs/buildManager.js +0 -79
- package/dist/cjs/cliHelpers.d.ts +0 -6
- package/dist/cjs/cliHelpers.d.ts.map +0 -1
- package/dist/cjs/cliHelpers.js +0 -57
- package/dist/cjs/createServer.d.ts +0 -30
- package/dist/cjs/createServer.d.ts.map +0 -1
- package/dist/cjs/createServer.js +0 -145
- package/dist/cjs/createServerHelpers.d.ts +0 -38
- package/dist/cjs/createServerHelpers.d.ts.map +0 -1
- package/dist/cjs/createServerHelpers.js +0 -112
- package/dist/cjs/fastify.d.ts +0 -13
- package/dist/cjs/fastify.d.ts.map +0 -1
- package/dist/cjs/fastify.js +0 -96
- package/dist/cjs/logFormatter/ambient.d.js +0 -1
- package/dist/cjs/logFormatter/bin.d.ts +0 -2
- package/dist/cjs/logFormatter/bin.d.ts.map +0 -1
- package/dist/cjs/logFormatter/bin.js +0 -369
- package/dist/cjs/logFormatter/formatters.d.ts +0 -30
- package/dist/cjs/logFormatter/formatters.d.ts.map +0 -1
- package/dist/cjs/logFormatter/formatters.js +0 -275
- package/dist/cjs/logFormatter/index.d.ts +0 -2
- package/dist/cjs/logFormatter/index.d.ts.map +0 -1
- package/dist/cjs/logFormatter/index.js +0 -184
- package/dist/cjs/package.json +0 -1
- package/dist/cjs/plugins/api.d.ts +0 -14
- package/dist/cjs/plugins/api.d.ts.map +0 -1
- package/dist/cjs/plugins/api.js +0 -78
- package/dist/cjs/plugins/graphql.d.ts +0 -10
- package/dist/cjs/plugins/graphql.d.ts.map +0 -1
- package/dist/cjs/plugins/graphql.js +0 -135
- package/dist/cjs/plugins/lambdaLoader.d.ts +0 -34
- package/dist/cjs/plugins/lambdaLoader.d.ts.map +0 -1
- package/dist/cjs/plugins/lambdaLoader.js +0 -199
- package/dist/cjs/requestHandlers/awsLambdaFastify.d.ts +0 -5
- package/dist/cjs/requestHandlers/awsLambdaFastify.d.ts.map +0 -1
- package/dist/cjs/requestHandlers/awsLambdaFastify.js +0 -105
- package/dist/cjs/requestHandlers/utils.d.ts +0 -26
- package/dist/cjs/requestHandlers/utils.d.ts.map +0 -1
- package/dist/cjs/requestHandlers/utils.js +0 -55
- package/dist/cjs/serverManager.d.ts +0 -8
- package/dist/cjs/serverManager.d.ts.map +0 -1
- package/dist/cjs/serverManager.js +0 -137
- package/dist/cjs/types.d.ts +0 -19
- package/dist/cjs/types.d.ts.map +0 -1
- package/dist/cjs/utils.d.ts +0 -6
- package/dist/cjs/utils.d.ts.map +0 -1
- package/dist/cjs/utils.js +0 -58
- package/dist/cjs/watch.d.ts +0 -10
- package/dist/cjs/watch.d.ts.map +0 -1
- package/dist/cjs/watch.js +0 -399
- package/dist/cjs/watchPaths.d.ts +0 -3
- package/dist/cjs/watchPaths.d.ts.map +0 -1
- package/dist/cjs/watchPaths.js +0 -140
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cedarjs/api-server",
|
|
3
|
-
"version": "6.0.0-canary.
|
|
3
|
+
"version": "6.0.0-canary.2793",
|
|
4
4
|
"description": "CedarJS's HTTP server for Serverless Functions",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -11,120 +11,78 @@
|
|
|
11
11
|
"type": "module",
|
|
12
12
|
"exports": {
|
|
13
13
|
".": {
|
|
14
|
-
"
|
|
14
|
+
"default": {
|
|
15
15
|
"types": "./dist/createServer.d.ts",
|
|
16
16
|
"default": "./dist/createServer.js"
|
|
17
|
-
},
|
|
18
|
-
"require": {
|
|
19
|
-
"types": "./dist/cjs/createServer.d.ts",
|
|
20
|
-
"default": "./dist/cjs/createServer.js"
|
|
21
17
|
}
|
|
22
18
|
},
|
|
23
19
|
"./package.json": "./package.json",
|
|
24
20
|
"./apiCliConfig": {
|
|
25
|
-
"
|
|
21
|
+
"default": {
|
|
26
22
|
"types": "./dist/apiCLIConfig.d.ts",
|
|
27
23
|
"default": "./dist/apiCLIConfig.js"
|
|
28
|
-
},
|
|
29
|
-
"require": {
|
|
30
|
-
"types": "./dist/cjs/apiCLIConfig.d.ts",
|
|
31
|
-
"default": "./dist/cjs/apiCLIConfig.js"
|
|
32
24
|
}
|
|
33
25
|
},
|
|
34
26
|
"./bothCliConfig": {
|
|
35
|
-
"
|
|
27
|
+
"default": {
|
|
36
28
|
"types": "./dist/bothCLIConfig.d.ts",
|
|
37
29
|
"default": "./dist/bothCLIConfig.js"
|
|
38
|
-
},
|
|
39
|
-
"require": {
|
|
40
|
-
"types": "./dist/cjs/bothCLIConfig.d.ts",
|
|
41
|
-
"default": "./dist/cjs/bothCLIConfig.js"
|
|
42
30
|
}
|
|
43
31
|
},
|
|
44
32
|
"./apiCliConfigHandler": {
|
|
45
|
-
"
|
|
33
|
+
"default": {
|
|
46
34
|
"types": "./dist/apiCLIConfigHandler.d.ts",
|
|
47
35
|
"default": "./dist/apiCLIConfigHandler.js"
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
"./bothCliConfigHandler": {
|
|
39
|
+
"default": {
|
|
40
|
+
"types": "./dist/bothCLIConfigHandler.d.ts",
|
|
41
|
+
"default": "./dist/bothCLIConfigHandler.js"
|
|
52
42
|
}
|
|
53
43
|
},
|
|
54
44
|
"./cliHelpers": {
|
|
55
|
-
"
|
|
45
|
+
"default": {
|
|
56
46
|
"types": "./dist/cliHelpers.d.ts",
|
|
57
47
|
"default": "./dist/cliHelpers.js"
|
|
58
|
-
},
|
|
59
|
-
"require": {
|
|
60
|
-
"types": "./dist/cjs/cliHelpers.d.ts",
|
|
61
|
-
"default": "./dist/cjs/cliHelpers.js"
|
|
62
48
|
}
|
|
63
49
|
},
|
|
64
|
-
"./cjs/apiCliConfigHandler": {
|
|
65
|
-
"types": "./dist/cjs/apiCLIConfigHandler.d.ts",
|
|
66
|
-
"default": "./dist/cjs/apiCLIConfigHandler.js"
|
|
67
|
-
},
|
|
68
|
-
"./cjs/cliHelpers": {
|
|
69
|
-
"types": "./dist/cjs/cliHelpers.d.ts",
|
|
70
|
-
"default": "./dist/cjs/cliHelpers.js"
|
|
71
|
-
},
|
|
72
|
-
"./cjs/bothCliConfigHandler": {
|
|
73
|
-
"types": "./dist/cjs/bothCLIConfigHandler.d.ts",
|
|
74
|
-
"default": "./dist/cjs/bothCLIConfigHandler.js"
|
|
75
|
-
},
|
|
76
50
|
"./fastify": {
|
|
77
|
-
"
|
|
51
|
+
"default": {
|
|
78
52
|
"types": "./dist/fastify.d.ts",
|
|
79
53
|
"default": "./dist/fastify.js"
|
|
80
|
-
},
|
|
81
|
-
"require": {
|
|
82
|
-
"types": "./dist/cjs/fastify.d.ts",
|
|
83
|
-
"default": "./dist/cjs/fastify.js"
|
|
84
54
|
}
|
|
85
55
|
},
|
|
86
56
|
"./watch": {
|
|
87
|
-
"
|
|
57
|
+
"default": {
|
|
88
58
|
"types": "./dist/watch.d.ts",
|
|
89
59
|
"default": "./dist/watch.js"
|
|
90
|
-
},
|
|
91
|
-
"require": {
|
|
92
|
-
"types": "./dist/cjs/watch.d.ts",
|
|
93
|
-
"default": "./dist/cjs/watch.js"
|
|
94
60
|
}
|
|
95
61
|
},
|
|
96
62
|
"./logFormatter": {
|
|
97
|
-
"
|
|
63
|
+
"default": {
|
|
98
64
|
"types": "./dist/logFormatter/index.d.ts",
|
|
99
65
|
"default": "./dist/logFormatter/index.js"
|
|
100
|
-
},
|
|
101
|
-
"require": {
|
|
102
|
-
"types": "./dist/cjs/logFormatter/index.d.ts",
|
|
103
|
-
"default": "./dist/cjs/logFormatter/index.js"
|
|
104
66
|
}
|
|
105
67
|
},
|
|
106
68
|
"./requestHandlers": {
|
|
107
|
-
"
|
|
69
|
+
"default": {
|
|
108
70
|
"types": "./dist/requestHandlers/awsLambdaFastify.d.ts",
|
|
109
71
|
"default": "./dist/requestHandlers/awsLambdaFastify.js"
|
|
110
|
-
},
|
|
111
|
-
"require": {
|
|
112
|
-
"types": "./dist/cjs/requestHandlers/awsLambdaFastify.d.ts",
|
|
113
|
-
"default": "./dist/cjs/requestHandlers/awsLambdaFastify.js"
|
|
114
72
|
}
|
|
115
73
|
}
|
|
116
74
|
},
|
|
117
75
|
"main": "./dist/createServer.js",
|
|
118
76
|
"types": "./dist/createServer.d.ts",
|
|
119
77
|
"bin": {
|
|
120
|
-
"cedar-api-server-watch": "./dist/
|
|
121
|
-
"cedar-log-formatter": "./dist/
|
|
122
|
-
"cedar-server": "./dist/
|
|
78
|
+
"cedar-api-server-watch": "./dist/watch.js",
|
|
79
|
+
"cedar-log-formatter": "./dist/logFormatter/bin.js",
|
|
80
|
+
"cedar-server": "./dist/bin.js",
|
|
123
81
|
"cedarjs-api-server-watch": "./dist/watch.js",
|
|
124
82
|
"cedarjs-log-formatter": "./dist/logFormatter/bin.js",
|
|
125
83
|
"cedarjs-server": "./dist/bin.js",
|
|
126
|
-
"rw-log-formatter": "./dist/
|
|
127
|
-
"rw-server": "./dist/
|
|
84
|
+
"rw-log-formatter": "./dist/logFormatter/bin.js",
|
|
85
|
+
"rw-server": "./dist/bin.js"
|
|
128
86
|
},
|
|
129
87
|
"files": [
|
|
130
88
|
"dist"
|
|
@@ -133,7 +91,6 @@
|
|
|
133
91
|
"build": "node ./build.mts",
|
|
134
92
|
"build:pack": "yarn pack -o cedarjs-api-server.tgz",
|
|
135
93
|
"build:types": "tsc --build --verbose tsconfig.build.json",
|
|
136
|
-
"build:types-cjs": "tsc --build --verbose tsconfig.cjs.json",
|
|
137
94
|
"build:watch": "nodemon --watch src --ext \"js,jsx,ts,tsx\" --ignore dist --exec \"yarn build && yarn fix:permissions\"",
|
|
138
95
|
"check:attw": "yarn cedar-fwtools-attw",
|
|
139
96
|
"check:package": "concurrently npm:check:attw yarn:publint",
|
|
@@ -143,12 +100,12 @@
|
|
|
143
100
|
"test:watch": "vitest watch"
|
|
144
101
|
},
|
|
145
102
|
"dependencies": {
|
|
146
|
-
"@cedarjs/api": "6.0.0-canary.
|
|
147
|
-
"@cedarjs/context": "6.0.0-canary.
|
|
148
|
-
"@cedarjs/fastify-web": "6.0.0-canary.
|
|
149
|
-
"@cedarjs/internal": "6.0.0-canary.
|
|
150
|
-
"@cedarjs/project-config": "6.0.0-canary.
|
|
151
|
-
"@cedarjs/web-server": "6.0.0-canary.
|
|
103
|
+
"@cedarjs/api": "6.0.0-canary.2793",
|
|
104
|
+
"@cedarjs/context": "6.0.0-canary.2793",
|
|
105
|
+
"@cedarjs/fastify-web": "6.0.0-canary.2793",
|
|
106
|
+
"@cedarjs/internal": "6.0.0-canary.2793",
|
|
107
|
+
"@cedarjs/project-config": "6.0.0-canary.2793",
|
|
108
|
+
"@cedarjs/web-server": "6.0.0-canary.2793",
|
|
152
109
|
"@fastify/multipart": "9.4.0",
|
|
153
110
|
"@fastify/url-data": "6.0.3",
|
|
154
111
|
"ansis": "4.3.1",
|
|
@@ -166,7 +123,7 @@
|
|
|
166
123
|
"yargs": "17.7.3"
|
|
167
124
|
},
|
|
168
125
|
"devDependencies": {
|
|
169
|
-
"@cedarjs/framework-tools": "6.0.0-canary.
|
|
126
|
+
"@cedarjs/framework-tools": "6.0.0-canary.2793",
|
|
170
127
|
"@types/aws-lambda": "8.10.162",
|
|
171
128
|
"@types/dotenv-defaults": "^5.0.0",
|
|
172
129
|
"@types/split2": "4.2.3",
|
|
@@ -181,7 +138,7 @@
|
|
|
181
138
|
"vitest": "4.1.10"
|
|
182
139
|
},
|
|
183
140
|
"peerDependencies": {
|
|
184
|
-
"@cedarjs/graphql-server": "6.0.0-canary.
|
|
141
|
+
"@cedarjs/graphql-server": "6.0.0-canary.2793"
|
|
185
142
|
},
|
|
186
143
|
"peerDependenciesMeta": {
|
|
187
144
|
"@cedarjs/graphql-server": {
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import type { Argv } from 'yargs';
|
|
2
|
-
import type { APIParsedOptions } from './types.js';
|
|
3
|
-
export declare const description = "Start a server for serving the api side";
|
|
4
|
-
export declare function builder(yargs: Argv<APIParsedOptions>): void;
|
|
5
|
-
export declare function handler(options: APIParsedOptions): Promise<void>;
|
|
6
|
-
//# sourceMappingURL=apiCLIConfig.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"apiCLIConfig.d.ts","sourceRoot":"","sources":["../../src/apiCLIConfig.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,OAAO,CAAA;AAEjC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAA;AAElD,eAAO,MAAM,WAAW,4CAA4C,CAAA;AAEpE,wBAAgB,OAAO,CAAC,KAAK,EAAE,IAAI,CAAC,gBAAgB,CAAC,QA0BpD;AAED,wBAAsB,OAAO,CAAC,OAAO,EAAE,gBAAgB,iBAGtD"}
|
package/dist/cjs/apiCLIConfig.js
DELETED
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __create = Object.create;
|
|
3
|
-
var __defProp = Object.defineProperty;
|
|
4
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
-
var __export = (target, all) => {
|
|
9
|
-
for (var name in all)
|
|
10
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
-
};
|
|
12
|
-
var __copyProps = (to, from, except, desc) => {
|
|
13
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
-
for (let key of __getOwnPropNames(from))
|
|
15
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
-
}
|
|
18
|
-
return to;
|
|
19
|
-
};
|
|
20
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
-
mod
|
|
27
|
-
));
|
|
28
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
var apiCLIConfig_exports = {};
|
|
30
|
-
__export(apiCLIConfig_exports, {
|
|
31
|
-
builder: () => builder,
|
|
32
|
-
description: () => description,
|
|
33
|
-
handler: () => handler
|
|
34
|
-
});
|
|
35
|
-
module.exports = __toCommonJS(apiCLIConfig_exports);
|
|
36
|
-
const description = "Start a server for serving the api side";
|
|
37
|
-
function builder(yargs) {
|
|
38
|
-
yargs.options({
|
|
39
|
-
port: {
|
|
40
|
-
description: "The port to listen at",
|
|
41
|
-
type: "number",
|
|
42
|
-
alias: "p"
|
|
43
|
-
},
|
|
44
|
-
host: {
|
|
45
|
-
description: "The host to listen at. Note that you most likely want this to be '0.0.0.0' in production",
|
|
46
|
-
type: "string"
|
|
47
|
-
},
|
|
48
|
-
apiRootPath: {
|
|
49
|
-
description: "Root path where your api functions are served",
|
|
50
|
-
type: "string",
|
|
51
|
-
alias: ["api-root-path", "rootPath", "root-path"],
|
|
52
|
-
default: "/"
|
|
53
|
-
},
|
|
54
|
-
// This became a no-op in v7 because env files weren't loaded by default
|
|
55
|
-
// but removing it would break yargs parsing for older projects,
|
|
56
|
-
// so leaving it here so that yargs doesn't throw an error
|
|
57
|
-
loadEnvFiles: {
|
|
58
|
-
hidden: true
|
|
59
|
-
}
|
|
60
|
-
});
|
|
61
|
-
}
|
|
62
|
-
async function handler(options) {
|
|
63
|
-
const { handler: handler2 } = await import("./apiCLIConfigHandler.js");
|
|
64
|
-
await handler2(options);
|
|
65
|
-
}
|
|
66
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
67
|
-
0 && (module.exports = {
|
|
68
|
-
builder,
|
|
69
|
-
description,
|
|
70
|
-
handler
|
|
71
|
-
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"apiCLIConfigHandler.d.ts","sourceRoot":"","sources":["../../src/apiCLIConfigHandler.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAA;AAElD,wBAAsB,OAAO,CAAC,OAAO,GAAE,gBAAqB,iBAoC3D"}
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __create = Object.create;
|
|
3
|
-
var __defProp = Object.defineProperty;
|
|
4
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
-
var __export = (target, all) => {
|
|
9
|
-
for (var name in all)
|
|
10
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
-
};
|
|
12
|
-
var __copyProps = (to, from, except, desc) => {
|
|
13
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
-
for (let key of __getOwnPropNames(from))
|
|
15
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
-
}
|
|
18
|
-
return to;
|
|
19
|
-
};
|
|
20
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
-
mod
|
|
27
|
-
));
|
|
28
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
var apiCLIConfigHandler_exports = {};
|
|
30
|
-
__export(apiCLIConfigHandler_exports, {
|
|
31
|
-
handler: () => handler
|
|
32
|
-
});
|
|
33
|
-
module.exports = __toCommonJS(apiCLIConfigHandler_exports);
|
|
34
|
-
var import_ansis = __toESM(require("ansis"), 1);
|
|
35
|
-
var import_fastify_web = require("@cedarjs/fastify-web");
|
|
36
|
-
var import_createServer = require("./createServer.js");
|
|
37
|
-
async function handler(options = {}) {
|
|
38
|
-
const timeStart = Date.now();
|
|
39
|
-
console.log(import_ansis.default.dim.italic("Starting API Server..."));
|
|
40
|
-
options.apiRootPath = (0, import_fastify_web.coerceRootPath)(options.apiRootPath ?? "/");
|
|
41
|
-
const fastify = await (0, import_createServer.createServer)({
|
|
42
|
-
apiRootPath: options.apiRootPath,
|
|
43
|
-
apiHost: options.host,
|
|
44
|
-
apiPort: options.port
|
|
45
|
-
});
|
|
46
|
-
await fastify.start();
|
|
47
|
-
fastify.log.trace(
|
|
48
|
-
{ custom: { ...fastify.initialConfig } },
|
|
49
|
-
"Fastify server configuration"
|
|
50
|
-
);
|
|
51
|
-
fastify.log.trace(`Registered plugins
|
|
52
|
-
${fastify.printPlugins()}`);
|
|
53
|
-
console.log(import_ansis.default.dim.italic("Took " + (Date.now() - timeStart) + " ms"));
|
|
54
|
-
let address = fastify.listeningOrigin;
|
|
55
|
-
if (process.env.NODE_ENV !== "production") {
|
|
56
|
-
address = address.replace(/http:\/\/\[::\]/, "http://localhost");
|
|
57
|
-
}
|
|
58
|
-
const apiServer = import_ansis.default.magenta(`${address}${options.apiRootPath}`);
|
|
59
|
-
const graphqlEndpoint = import_ansis.default.magenta(`${apiServer}graphql`);
|
|
60
|
-
console.log(`API server listening at ${apiServer}`);
|
|
61
|
-
console.log(`GraphQL endpoint at ${graphqlEndpoint}`);
|
|
62
|
-
process?.send?.("ready");
|
|
63
|
-
}
|
|
64
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
65
|
-
0 && (module.exports = {
|
|
66
|
-
handler
|
|
67
|
-
});
|
package/dist/cjs/bin.d.ts
DELETED
package/dist/cjs/bin.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"bin.d.ts","sourceRoot":"","sources":["../../src/bin.ts"],"names":[],"mappings":""}
|