@platformatic/service 0.47.6 → 1.1.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.
@@ -13,13 +13,13 @@
13
13
  overflow-y: hidden;
14
14
  --text-color: #FFFFFF;
15
15
  --bg-color: #001825;
16
- --theme-img: url('./light_mode.svg')
16
+ --theme-img: url('./images/light_mode.svg')
17
17
  }
18
18
 
19
19
  body.light-theme {
20
20
  --text-color: #001825;
21
21
  --bg-color: #FFFFFF;
22
- --theme-img: url('./dark_mode.svg')
22
+ --theme-img: url('./images/dark_mode.svg')
23
23
  }
24
24
 
25
25
  body {
@@ -125,7 +125,7 @@
125
125
  }
126
126
 
127
127
  .polygon14 {
128
- background-image: url("background_polygon_14.svg");
128
+ background-image: url("images/background_polygon_14.svg");
129
129
  background-repeat: no-repeat;
130
130
  position: fixed;
131
131
  height: 868px;
@@ -138,7 +138,7 @@
138
138
  }
139
139
 
140
140
  .polygon28 {
141
- background-image: url("background_polygon_28.svg");
141
+ background-image: url("images/background_polygon_28.svg");
142
142
  background-repeat: no-repeat;
143
143
  position: absolute;
144
144
  height: 212px;
@@ -194,7 +194,7 @@
194
194
  <div id="root">
195
195
  <div class="polygon14"></div>
196
196
  <div class="polygon28"></div>
197
- <img class="topFrame" src="background_frame.svg" />
197
+ <img class="topFrame" src="images/background_frame.svg" />
198
198
  <button id="button-theme-selector" type="button" class="theme-selector" alt="theme selector" onclick="toggleLightMode()"></button>
199
199
 
200
200
  <div id="content">
@@ -221,18 +221,18 @@
221
221
  const prefersLightScheme = window.matchMedia('(prefers-color-scheme: light)');
222
222
  if (prefersLightScheme.matches) {
223
223
  document.body.classList.add('light-theme');
224
- document.getElementById('logo').src = 'platformatic-logo-light.svg'
224
+ document.getElementById('logo').src = 'images/platformatic-logo-light.svg'
225
225
  } else {
226
226
  document.body.classList.remove('light-theme');
227
- document.getElementById('logo').src = 'platformatic-logo-dark.svg'
227
+ document.getElementById('logo').src = 'images/platformatic-logo-dark.svg'
228
228
  }
229
229
 
230
230
  const toggleLightMode = function() {
231
231
  document.body.classList.toggle('light-theme');
232
232
  if (document.body.classList.contains('light-theme')) {
233
- document.getElementById('logo').src = 'platformatic-logo-light.svg'
233
+ document.getElementById('logo').src = 'images/platformatic-logo-light.svg'
234
234
  } else {
235
- document.getElementById('logo').src = 'platformatic-logo-dark.svg'
235
+ document.getElementById('logo').src = 'images/platformatic-logo-dark.svg'
236
236
  }
237
237
  }
238
238
  </script>
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 = configManager.current
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": "0.47.6",
3
+ "version": "1.1.0",
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.2.0",
20
+ "@fastify/aws-lambda": "^3.3.0",
21
21
  "bindings": "^1.5.0",
22
- "c8": "^8.0.0",
23
- "json-schema-to-typescript": "^13.0.2",
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.1.3",
34
- "undici": "^5.22.1",
35
- "vscode-json-languageservice": "^5.3.5",
33
+ "typescript": "^5.2.2",
34
+ "undici": "^5.25.3",
35
+ "vscode-json-languageservice": "^5.3.6",
36
36
  "why-is-node-running": "^2.2.2",
37
- "yaml": "^2.3.1"
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.3.0",
43
+ "@fastify/cors": "^8.4.0",
44
44
  "@fastify/deepmerge": "^1.3.0",
45
- "@fastify/restartable": "^2.1.0",
46
- "@fastify/static": "^6.10.2",
47
- "@fastify/swagger": "^8.5.1",
48
- "@fastify/swagger-ui": "^1.9.0",
49
- "@fastify/under-pressure": "^8.2.0",
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.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.2.0",
58
- "execa": "^8.0.0",
59
- "fastify": "^4.18.0",
60
- "fastify-metrics": "^10.3.0",
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.6.0",
62
+ "graphql": "^16.8.1",
63
63
  "help-me": "^4.2.0",
64
- "mercurius": "^13.0.0",
64
+ "mercurius": "^13.1.0",
65
65
  "minimist": "^1.2.8",
66
- "pino": "^8.14.1",
67
- "pino-pretty": "^10.0.0",
66
+ "pino": "^8.15.3",
67
+ "pino-pretty": "^10.2.0",
68
68
  "rfdc": "^1.3.0",
69
- "ua-parser-js": "^1.0.35",
70
- "@platformatic/client": "0.47.6",
71
- "@platformatic/config": "0.47.6",
72
- "@platformatic/swagger-ui-theme": "0.47.6",
73
- "@platformatic/telemetry": "0.47.6",
74
- "@platformatic/utils": "0.47.6"
69
+ "ua-parser-js": "^1.0.36",
70
+ "@platformatic/client": "1.1.0",
71
+ "@platformatic/config": "1.1.0",
72
+ "@platformatic/telemetry": "1.1.0",
73
+ "@platformatic/swagger-ui-theme": "1.1.0",
74
+ "@platformatic/utils": "1.1.0"
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 --100 tap test/*test.js test/*/*.test.mjs && tsd",
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
  }