@platformatic/service 1.21.1 → 1.22.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,14 @@ class ServiceGenerator extends BaseGenerator {
13
13
  }
14
14
 
15
15
  async _beforePrepare () {
16
- this.config.env = {
17
- PLT_SERVER_HOSTNAME: this.config.hostname,
18
- PLT_SERVER_LOGGER_LEVEL: 'info',
19
- PORT: 3042,
20
- ...this.config.env
21
-
16
+ if (!this.config.isRuntimeContext) {
17
+ this.addEnvVars({
18
+ PLT_SERVER_HOSTNAME: this.config.hostname,
19
+ PLT_SERVER_LOGGER_LEVEL: 'info',
20
+ PORT: 3042
21
+ })
22
22
  }
23
+
23
24
  this.config.dependencies = {
24
25
  '@platformatic/service': `^${this.platformaticVersion}`
25
26
  }
@@ -66,13 +67,6 @@ declare module 'fastify' {
66
67
  }
67
68
  `
68
69
  this.addFile({ path: '', file: 'global.d.ts', contents: GLOBAL_TYPES_TEMPLATE })
69
- if (this.config.isRuntimeContext) {
70
- // remove env variables that are not for the plugins
71
- delete this.config.env.PLT_SERVER_HOSTNAME
72
- delete this.config.env.PORT
73
- delete this.config.env.PLT_SERVER_LOGGER_LEVEL
74
- }
75
-
76
70
  this.addFile({ path: '', file: 'README.md', contents: await readFile(join(__dirname, 'README.md')) })
77
71
  }
78
72
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@platformatic/service",
3
- "version": "1.21.1",
3
+ "version": "1.22.0",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "bin": {
@@ -77,14 +77,14 @@
77
77
  "rfdc": "^1.3.1",
78
78
  "ua-parser-js": "^1.0.37",
79
79
  "undici": "^6.6.0",
80
- "@platformatic/authenticate": "1.21.1",
81
- "@platformatic/client": "1.21.1",
82
- "@platformatic/config": "1.21.1",
83
- "@platformatic/metaconfig": "1.21.1",
84
- "@platformatic/generators": "1.21.1",
85
- "@platformatic/scalar-theme": "1.21.1",
86
- "@platformatic/telemetry": "1.21.1",
87
- "@platformatic/utils": "1.21.1"
80
+ "@platformatic/authenticate": "1.22.0",
81
+ "@platformatic/client": "1.22.0",
82
+ "@platformatic/config": "1.22.0",
83
+ "@platformatic/generators": "1.22.0",
84
+ "@platformatic/metaconfig": "1.22.0",
85
+ "@platformatic/scalar-theme": "1.22.0",
86
+ "@platformatic/utils": "1.22.0",
87
+ "@platformatic/telemetry": "1.22.0"
88
88
  },
89
89
  "standard": {
90
90
  "ignore": [