platformatic 1.33.0 → 1.35.2
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/cli.js +1 -1
- package/help/inject.txt +1 -0
- package/lib/upgrade.js +11 -3
- package/package.json +15 -14
package/cli.js
CHANGED
|
@@ -72,7 +72,7 @@ const args = minimist(process.argv.slice(2), {
|
|
|
72
72
|
}
|
|
73
73
|
})
|
|
74
74
|
|
|
75
|
-
if (args.version && !args._.includes('versions')) {
|
|
75
|
+
if (args.version && !args._.includes('versions') && !args._.includes('inject')) {
|
|
76
76
|
const version = JSON.parse(await readFile(join(import.meta.url, 'package.json'))).version
|
|
77
77
|
console.log('v' + version)
|
|
78
78
|
process.exit(0)
|
package/help/inject.txt
CHANGED
|
@@ -16,6 +16,7 @@ Options:
|
|
|
16
16
|
* `-H, --header <string>` - The request header. Can be used multiple times.
|
|
17
17
|
* `-d, --data <string>` - The request data.
|
|
18
18
|
* `-i, --include <boolean>` - Include the response headers in the output. Default is `false`.
|
|
19
|
+
* `-v, --verbose <boolean>` - Make the operation more talkative. Default is `false`.
|
|
19
20
|
* `-o, --output <file>` - Write the response to the specified file.
|
|
20
21
|
|
|
21
22
|
The `inject` command sends a request to the runtime service and prints the
|
package/lib/upgrade.js
CHANGED
|
@@ -7,6 +7,7 @@ import { platformaticComposer } from '@platformatic/composer'
|
|
|
7
7
|
import { platformaticRuntime } from '@platformatic/runtime'
|
|
8
8
|
import pino from 'pino'
|
|
9
9
|
import pretty from 'pino-pretty'
|
|
10
|
+
import fjs from 'fast-json-stringify'
|
|
10
11
|
|
|
11
12
|
export async function upgrade (argv) {
|
|
12
13
|
const args = parseArgs(argv, {
|
|
@@ -42,16 +43,23 @@ async function upgradeApp (config, logger) {
|
|
|
42
43
|
overrides: {
|
|
43
44
|
fixPaths: false,
|
|
44
45
|
onMissingEnv (key) {
|
|
45
|
-
return ''
|
|
46
|
+
return '{' + key + '}'
|
|
46
47
|
}
|
|
47
48
|
}
|
|
48
49
|
})
|
|
49
50
|
|
|
50
|
-
await configManager.parseAndValidate()
|
|
51
|
+
await configManager.parseAndValidate(false)
|
|
52
|
+
config = configManager.current
|
|
53
|
+
|
|
54
|
+
// If the schema is present, we use it to format the config
|
|
55
|
+
if (configManager.schema) {
|
|
56
|
+
const stringify = fjs(configManager.schema)
|
|
57
|
+
config = JSON.parse(stringify(config))
|
|
58
|
+
}
|
|
51
59
|
|
|
52
60
|
const stringify = getStringifier(configManager.fullPath)
|
|
53
61
|
|
|
54
|
-
const newConfig = stringify(
|
|
62
|
+
const newConfig = stringify(config)
|
|
55
63
|
|
|
56
64
|
await writeFile(configManager.fullPath, newConfig, 'utf8')
|
|
57
65
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "platformatic",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.35.2",
|
|
4
4
|
"description": "Platformatic CLI",
|
|
5
5
|
"main": "cli.js",
|
|
6
6
|
"type": "module",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"mercurius"
|
|
28
28
|
],
|
|
29
29
|
"devDependencies": {
|
|
30
|
-
"borp": "^0.
|
|
30
|
+
"borp": "^0.11.0",
|
|
31
31
|
"c8": "^9.1.0",
|
|
32
32
|
"fastify": "^4.26.2",
|
|
33
33
|
"license-checker": "^25.0.1",
|
|
@@ -43,6 +43,7 @@
|
|
|
43
43
|
"desm": "^1.3.1",
|
|
44
44
|
"dotenv": "^16.4.5",
|
|
45
45
|
"execa": "^8.0.1",
|
|
46
|
+
"fast-json-stringify": "^5.14.1",
|
|
46
47
|
"graphql": "^16.8.1",
|
|
47
48
|
"help-me": "^5.0.0",
|
|
48
49
|
"inquirer": "^9.2.16",
|
|
@@ -50,18 +51,18 @@
|
|
|
50
51
|
"pino": "^8.19.0",
|
|
51
52
|
"pino-pretty": "^10.3.1",
|
|
52
53
|
"undici": "^6.9.0",
|
|
53
|
-
"@platformatic/authenticate": "1.
|
|
54
|
-
"@platformatic/client-cli": "1.
|
|
55
|
-
"@platformatic/config": "1.
|
|
56
|
-
"@platformatic/composer": "1.
|
|
57
|
-
"@platformatic/control": "1.
|
|
58
|
-
"@platformatic/db": "1.
|
|
59
|
-
"@platformatic/deploy-client": "1.
|
|
60
|
-
"@platformatic/
|
|
61
|
-
"@platformatic/
|
|
62
|
-
"@platformatic/
|
|
63
|
-
"@platformatic/utils": "1.
|
|
64
|
-
"create-platformatic": "1.
|
|
54
|
+
"@platformatic/authenticate": "1.35.2",
|
|
55
|
+
"@platformatic/client-cli": "1.35.2",
|
|
56
|
+
"@platformatic/config": "1.35.2",
|
|
57
|
+
"@platformatic/composer": "1.35.2",
|
|
58
|
+
"@platformatic/control": "1.35.2",
|
|
59
|
+
"@platformatic/db": "1.35.2",
|
|
60
|
+
"@platformatic/deploy-client": "1.35.2",
|
|
61
|
+
"@platformatic/frontend-template": "1.35.2",
|
|
62
|
+
"@platformatic/runtime": "1.35.2",
|
|
63
|
+
"@platformatic/service": "1.35.2",
|
|
64
|
+
"@platformatic/utils": "1.35.2",
|
|
65
|
+
"create-platformatic": "1.35.2"
|
|
65
66
|
},
|
|
66
67
|
"scripts": {
|
|
67
68
|
"test": "pnpm run lint && borp --timeout 120000 --concurrency 1",
|