@platformatic/basic 2.27.1 → 2.28.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.
- package/index.js +11 -3
- package/package.json +7 -6
- package/schema.json +1 -1
package/index.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { createRequire } from '@platformatic/utils'
|
|
2
|
+
import jsonPatch from 'fast-json-patch'
|
|
2
3
|
import { existsSync } from 'node:fs'
|
|
3
4
|
import { readFile } from 'node:fs/promises'
|
|
4
5
|
import { relative, resolve } from 'node:path'
|
|
@@ -109,7 +110,10 @@ export async function importStackableAndConfig (root, config) {
|
|
|
109
110
|
|
|
110
111
|
async function buildStackable (opts) {
|
|
111
112
|
const hadConfig = !!opts.config
|
|
112
|
-
const { stackable, config, autodetectDescription, moduleName } = await importStackableAndConfig(
|
|
113
|
+
const { stackable, config, autodetectDescription, moduleName } = await importStackableAndConfig(
|
|
114
|
+
opts.context.directory,
|
|
115
|
+
opts.config
|
|
116
|
+
)
|
|
113
117
|
opts.config = config
|
|
114
118
|
|
|
115
119
|
const serviceRoot = relative(process.cwd(), opts.context.directory)
|
|
@@ -136,8 +140,12 @@ async function buildStackable (opts) {
|
|
|
136
140
|
}
|
|
137
141
|
|
|
138
142
|
/* c8 ignore next 3 */
|
|
139
|
-
export function transformConfig () {
|
|
140
|
-
|
|
143
|
+
export async function transformConfig () {
|
|
144
|
+
const patch = workerData?.serviceConfig?.configPatch
|
|
145
|
+
|
|
146
|
+
if (Array.isArray(patch)) {
|
|
147
|
+
this.current = jsonPatch.applyPatch(this.current, patch).newDocument
|
|
148
|
+
}
|
|
141
149
|
}
|
|
142
150
|
|
|
143
151
|
export const schemaOptions = {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@platformatic/basic",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.28.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -17,17 +17,18 @@
|
|
|
17
17
|
"dependencies": {
|
|
18
18
|
"@fastify/error": "^4.0.0",
|
|
19
19
|
"execa": "^9.3.1",
|
|
20
|
+
"fast-json-patch": "^3.1.1",
|
|
20
21
|
"pino": "^9.3.2",
|
|
21
22
|
"pino-abstract-transport": "^2.0.0",
|
|
22
23
|
"semver": "^7.6.3",
|
|
23
24
|
"split2": "^4.2.0",
|
|
24
25
|
"undici": "^7.0.0",
|
|
25
26
|
"ws": "^8.18.0",
|
|
26
|
-
"@platformatic/
|
|
27
|
-
"@platformatic/
|
|
28
|
-
"@platformatic/metrics": "2.
|
|
29
|
-
"@platformatic/utils": "2.
|
|
30
|
-
"@platformatic/telemetry": "2.
|
|
27
|
+
"@platformatic/config": "2.28.0",
|
|
28
|
+
"@platformatic/itc": "2.28.0",
|
|
29
|
+
"@platformatic/metrics": "2.28.0",
|
|
30
|
+
"@platformatic/utils": "2.28.0",
|
|
31
|
+
"@platformatic/telemetry": "2.28.0"
|
|
31
32
|
},
|
|
32
33
|
"devDependencies": {
|
|
33
34
|
"borp": "^0.19.0",
|
package/schema.json
CHANGED