platformatic 0.26.1 → 0.28.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/cli.js +4 -2
- package/help/help.txt +4 -3
- package/help/start.txt +1 -1
- package/package.json +19 -18
- package/test/platformatic.test.js +3 -2
- package/test/start.test.js +2 -0
package/cli.js
CHANGED
|
@@ -6,8 +6,9 @@ import { runDB } from '@platformatic/db/db.mjs'
|
|
|
6
6
|
import { run as runRuntime } from '@platformatic/runtime/runtime.mjs'
|
|
7
7
|
import { runService } from '@platformatic/service/service.mjs'
|
|
8
8
|
import { runComposer } from '@platformatic/composer/composer.mjs'
|
|
9
|
-
import
|
|
9
|
+
import platformaticStart from '@platformatic/start'
|
|
10
10
|
import { login } from '@platformatic/authenticate/authenticate.js'
|
|
11
|
+
import { command as frontend } from '@platformatic/frontend-template'
|
|
11
12
|
import { command as client } from '@platformatic/client-cli'
|
|
12
13
|
import { readFile } from 'fs/promises'
|
|
13
14
|
import { join } from 'desm'
|
|
@@ -42,7 +43,7 @@ const ensureCommand = async ({ output, help }) => {
|
|
|
42
43
|
program.register('db', async (args) => ensureCommand(await runDB(args)))
|
|
43
44
|
program.register('runtime', async (args) => ensureCommand(await runRuntime(args)))
|
|
44
45
|
program.register('service', async (args) => ensureCommand(await runService(args)))
|
|
45
|
-
program.register('start',
|
|
46
|
+
program.register('start', platformaticStart.startCommandInRuntime)
|
|
46
47
|
program.register('composer', async (args) => ensureCommand(await runComposer(args)))
|
|
47
48
|
program.register('upgrade', upgrade)
|
|
48
49
|
program.register('client', client)
|
|
@@ -53,6 +54,7 @@ program.register('help service', async (args) => runService(['help', ...args]))
|
|
|
53
54
|
program.register({ command: 'login', strict: true }, login)
|
|
54
55
|
program.register('gh', gh)
|
|
55
56
|
program.register('deploy', deploy)
|
|
57
|
+
program.register('frontend', frontend)
|
|
56
58
|
|
|
57
59
|
const args = minimist(process.argv.slice(2), {
|
|
58
60
|
boolean: ['help', 'version'],
|
package/help/help.txt
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
Welcome to Platformatic. Available commands are:
|
|
2
2
|
|
|
3
|
-
* help -
|
|
4
|
-
* help <command> -
|
|
3
|
+
* help - display this message
|
|
4
|
+
* help <command> - show more information about a command.
|
|
5
5
|
* db - start Platformatic DB; type `platformatic db help` to know more.
|
|
6
6
|
* service - start Platformatic Service; type `platformatic service help` to know more.
|
|
7
7
|
* upgrade - upgrade the Platformatic configuration to the latest version.
|
|
8
|
-
* gh -
|
|
8
|
+
* gh - create a new gh action for Platformatic deployments
|
|
9
9
|
* deploy - deploy a Platformatic application to the cloud
|
|
10
10
|
* runtime - start Platformatic Runtime; type `platformatic runtime help` to know more.
|
|
11
11
|
* start - start a Platformatic application
|
|
12
|
+
* frontend - create frontend code to consume the REST APIs
|
package/help/start.txt
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "platformatic",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.28.1",
|
|
4
4
|
"description": "Platformatic CLI",
|
|
5
5
|
"main": "cli.js",
|
|
6
6
|
"type": "module",
|
|
@@ -27,38 +27,39 @@
|
|
|
27
27
|
"mercurius"
|
|
28
28
|
],
|
|
29
29
|
"devDependencies": {
|
|
30
|
-
"c8": "^
|
|
30
|
+
"c8": "^8.0.0",
|
|
31
31
|
"execa": "^7.1.1",
|
|
32
|
-
"fastify": "^4.
|
|
32
|
+
"fastify": "^4.18.0",
|
|
33
33
|
"license-checker": "^25.0.1",
|
|
34
34
|
"mkdirp": "^2.1.6",
|
|
35
35
|
"snazzy": "^9.0.0",
|
|
36
36
|
"split2": "^4.2.0",
|
|
37
|
-
"standard": "^17.
|
|
38
|
-
"tap": "^16.3.
|
|
37
|
+
"standard": "^17.1.0",
|
|
38
|
+
"tap": "^16.3.6",
|
|
39
39
|
"undici": "^5.22.1"
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
42
|
"colorette": "^2.0.20",
|
|
43
43
|
"commist": "^3.2.0",
|
|
44
44
|
"desm": "^1.3.0",
|
|
45
|
-
"dotenv": "^16.1.
|
|
45
|
+
"dotenv": "^16.1.4",
|
|
46
46
|
"help-me": "^4.2.0",
|
|
47
|
-
"inquirer": "^9.2.
|
|
47
|
+
"inquirer": "^9.2.7",
|
|
48
48
|
"minimist": "^1.2.8",
|
|
49
49
|
"pino": "^8.14.1",
|
|
50
50
|
"pino-pretty": "^10.0.0",
|
|
51
|
-
"@platformatic/authenticate": "0.
|
|
52
|
-
"@platformatic/client-cli": "0.
|
|
53
|
-
"@platformatic/
|
|
54
|
-
"@platformatic/
|
|
55
|
-
"@platformatic/db": "0.
|
|
56
|
-
"@platformatic/deploy-client": "0.
|
|
57
|
-
"@platformatic/
|
|
58
|
-
"@platformatic/
|
|
59
|
-
"@platformatic/
|
|
60
|
-
"@platformatic/start": "0.
|
|
61
|
-
"
|
|
51
|
+
"@platformatic/authenticate": "0.28.1",
|
|
52
|
+
"@platformatic/client-cli": "0.28.1",
|
|
53
|
+
"@platformatic/composer": "0.28.1",
|
|
54
|
+
"@platformatic/config": "0.28.1",
|
|
55
|
+
"@platformatic/db": "0.28.1",
|
|
56
|
+
"@platformatic/deploy-client": "0.28.1",
|
|
57
|
+
"@platformatic/frontend-template": "0.28.1",
|
|
58
|
+
"@platformatic/metaconfig": "0.28.1",
|
|
59
|
+
"@platformatic/runtime": "0.28.1",
|
|
60
|
+
"@platformatic/start": "0.28.1",
|
|
61
|
+
"@platformatic/service": "0.28.1",
|
|
62
|
+
"create-platformatic": "0.28.1"
|
|
62
63
|
},
|
|
63
64
|
"scripts": {
|
|
64
65
|
"test": "standard | snazzy && c8 --100 tap --no-coverage test/*.test.js",
|
|
@@ -147,8 +147,9 @@ async function start (...args) {
|
|
|
147
147
|
|
|
148
148
|
for await (const messages of on(output, 'data')) {
|
|
149
149
|
for (const message of messages) {
|
|
150
|
-
const
|
|
151
|
-
if (
|
|
150
|
+
const text = message.msg
|
|
151
|
+
if (text && text.includes('Server listening at')) {
|
|
152
|
+
const url = text.match(/Server listening at (.*)/)[1]
|
|
152
153
|
clearTimeout(errorTimeout)
|
|
153
154
|
return { child, url, output }
|
|
154
155
|
}
|