@platformatic/service 1.0.0 → 1.1.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/lib/start.js +6 -3
- package/lib/utils.js +4 -0
- package/package.json +32 -31
package/lib/start.js
CHANGED
|
@@ -32,9 +32,14 @@ async function buildServer (options, app) {
|
|
|
32
32
|
await configManager.parseAndValidate()
|
|
33
33
|
}
|
|
34
34
|
|
|
35
|
+
const config = configManager.current
|
|
36
|
+
|
|
37
|
+
// The server now can be not present, so we might need to add logger
|
|
38
|
+
addLoggerToTheConfig(config)
|
|
39
|
+
|
|
35
40
|
// options is a path
|
|
36
41
|
if (typeof options === 'string') {
|
|
37
|
-
options =
|
|
42
|
+
options = config
|
|
38
43
|
}
|
|
39
44
|
|
|
40
45
|
let url = null
|
|
@@ -115,8 +120,6 @@ async function start (appType, _args) {
|
|
|
115
120
|
|
|
116
121
|
const config = configManager.current
|
|
117
122
|
|
|
118
|
-
addLoggerToTheConfig(config)
|
|
119
|
-
|
|
120
123
|
const _transformConfig = configManager._transformConfig.bind(configManager)
|
|
121
124
|
configManager._transformConfig = function () {
|
|
122
125
|
const config = configManager.current
|
package/lib/utils.js
CHANGED
|
@@ -16,6 +16,10 @@ async function isFileAccessible (filename, directory) {
|
|
|
16
16
|
|
|
17
17
|
/* c8 ignore start */
|
|
18
18
|
function addLoggerToTheConfig (config) {
|
|
19
|
+
// We might have a config with no server
|
|
20
|
+
if (!config.server) {
|
|
21
|
+
config.server = {}
|
|
22
|
+
}
|
|
19
23
|
// Set the logger if not present
|
|
20
24
|
let logger = config.server.logger
|
|
21
25
|
if (!logger) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@platformatic/service",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.1.1",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"bin": {
|
|
@@ -17,61 +17,61 @@
|
|
|
17
17
|
},
|
|
18
18
|
"homepage": "https://github.com/platformatic/platformatic#readme",
|
|
19
19
|
"devDependencies": {
|
|
20
|
-
"@fastify/aws-lambda": "^3.
|
|
20
|
+
"@fastify/aws-lambda": "^3.3.0",
|
|
21
21
|
"bindings": "^1.5.0",
|
|
22
|
-
"c8": "^8.0.
|
|
23
|
-
"
|
|
22
|
+
"c8": "^8.0.1",
|
|
23
|
+
"glob": "^10.3.10",
|
|
24
|
+
"json-schema-to-typescript": "^13.1.1",
|
|
24
25
|
"openapi-types": "^12.1.3",
|
|
25
26
|
"self-cert": "^2.0.0",
|
|
26
27
|
"snazzy": "^9.0.0",
|
|
27
28
|
"split2": "^4.2.0",
|
|
28
29
|
"standard": "^17.1.0",
|
|
29
30
|
"strip-ansi": "^7.1.0",
|
|
30
|
-
"tap": "^16.3.6",
|
|
31
31
|
"ts-standard": "^12.0.2",
|
|
32
32
|
"tsd": "^0.29.0",
|
|
33
|
-
"typescript": "^5.
|
|
34
|
-
"undici": "^5.
|
|
35
|
-
"vscode-json-languageservice": "^5.3.
|
|
33
|
+
"typescript": "^5.2.2",
|
|
34
|
+
"undici": "^5.25.4",
|
|
35
|
+
"vscode-json-languageservice": "^5.3.6",
|
|
36
36
|
"why-is-node-running": "^2.2.2",
|
|
37
|
-
"yaml": "^2.3.
|
|
37
|
+
"yaml": "^2.3.2"
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
40
|
"@fastify/accepts": "^4.2.0",
|
|
41
41
|
"@fastify/autoload": "^5.7.1",
|
|
42
42
|
"@fastify/basic-auth": "^5.0.0",
|
|
43
|
-
"@fastify/cors": "^8.
|
|
43
|
+
"@fastify/cors": "^8.4.0",
|
|
44
44
|
"@fastify/deepmerge": "^1.3.0",
|
|
45
|
-
"@fastify/restartable": "^2.1.
|
|
46
|
-
"@fastify/static": "^6.
|
|
47
|
-
"@fastify/swagger": "^8.
|
|
48
|
-
"@fastify/swagger-ui": "^1.9.
|
|
49
|
-
"@fastify/under-pressure": "^8.
|
|
45
|
+
"@fastify/restartable": "^2.1.1",
|
|
46
|
+
"@fastify/static": "^6.11.2",
|
|
47
|
+
"@fastify/swagger": "^8.10.1",
|
|
48
|
+
"@fastify/swagger-ui": "^1.9.3",
|
|
49
|
+
"@fastify/under-pressure": "^8.3.0",
|
|
50
50
|
"@mercuriusjs/federation": "^2.0.0",
|
|
51
|
-
"@types/ws": "^8.5.
|
|
51
|
+
"@types/ws": "^8.5.6",
|
|
52
52
|
"ajv": "^8.12.0",
|
|
53
53
|
"close-with-grace": "^1.2.0",
|
|
54
54
|
"commist": "^3.2.0",
|
|
55
55
|
"desm": "^1.3.0",
|
|
56
56
|
"env-schema": "^5.2.0",
|
|
57
|
-
"es-main": "^1.
|
|
58
|
-
"execa": "^8.0.
|
|
59
|
-
"fastify": "^4.
|
|
60
|
-
"fastify-metrics": "^10.3.
|
|
57
|
+
"es-main": "^1.3.0",
|
|
58
|
+
"execa": "^8.0.1",
|
|
59
|
+
"fastify": "^4.23.2",
|
|
60
|
+
"fastify-metrics": "^10.3.2",
|
|
61
61
|
"fastify-plugin": "^4.5.1",
|
|
62
|
-
"graphql": "^16.
|
|
62
|
+
"graphql": "^16.8.1",
|
|
63
63
|
"help-me": "^4.2.0",
|
|
64
|
-
"mercurius": "^13.
|
|
64
|
+
"mercurius": "^13.1.0",
|
|
65
65
|
"minimist": "^1.2.8",
|
|
66
|
-
"pino": "^8.
|
|
67
|
-
"pino-pretty": "^10.
|
|
66
|
+
"pino": "^8.15.3",
|
|
67
|
+
"pino-pretty": "^10.2.0",
|
|
68
68
|
"rfdc": "^1.3.0",
|
|
69
|
-
"ua-parser-js": "^1.0.
|
|
70
|
-
"@platformatic/client": "1.
|
|
71
|
-
"@platformatic/
|
|
72
|
-
"@platformatic/swagger-ui-theme": "1.
|
|
73
|
-
"@platformatic/
|
|
74
|
-
"@platformatic/utils": "1.
|
|
69
|
+
"ua-parser-js": "^1.0.36",
|
|
70
|
+
"@platformatic/client": "1.1.1",
|
|
71
|
+
"@platformatic/config": "1.1.1",
|
|
72
|
+
"@platformatic/swagger-ui-theme": "1.1.1",
|
|
73
|
+
"@platformatic/telemetry": "1.1.1",
|
|
74
|
+
"@platformatic/utils": "1.1.1"
|
|
75
75
|
},
|
|
76
76
|
"standard": {
|
|
77
77
|
"ignore": [
|
|
@@ -86,7 +86,8 @@
|
|
|
86
86
|
]
|
|
87
87
|
},
|
|
88
88
|
"scripts": {
|
|
89
|
-
"test": "pnpm run lint && c8
|
|
89
|
+
"test": "pnpm run lint && c8 -x fixtures -x test node ./test/runner.js && tsd",
|
|
90
|
+
"nocov": "pnpm run lint && node ./test/runner.js && tsd",
|
|
90
91
|
"build": "node lib/schema.js | json2ts > config.d.ts",
|
|
91
92
|
"lint": "standard | snazzy && ts-standard | snazzy"
|
|
92
93
|
}
|