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 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 { startCommand } from '@platformatic/start'
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', startCommand)
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 - Display this message
4
- * help <command> - shows more information about a 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 - creates a new gh action for Platformatic deployments
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
@@ -1,5 +1,5 @@
1
1
  Start a Platformatic application with the following command:
2
2
 
3
- ``` bash
3
+ ```bash
4
4
  $ platformatic start
5
5
  ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "platformatic",
3
- "version": "0.26.1",
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": "^7.13.0",
30
+ "c8": "^8.0.0",
31
31
  "execa": "^7.1.1",
32
- "fastify": "^4.17.0",
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.0.0",
38
- "tap": "^16.3.4",
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.1",
45
+ "dotenv": "^16.1.4",
46
46
  "help-me": "^4.2.0",
47
- "inquirer": "^9.2.6",
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.26.1",
52
- "@platformatic/client-cli": "0.26.1",
53
- "@platformatic/config": "0.26.1",
54
- "@platformatic/composer": "0.26.1",
55
- "@platformatic/db": "0.26.1",
56
- "@platformatic/deploy-client": "0.26.1",
57
- "@platformatic/metaconfig": "0.26.1",
58
- "@platformatic/runtime": "0.26.1",
59
- "@platformatic/service": "0.26.1",
60
- "@platformatic/start": "0.26.1",
61
- "create-platformatic": "0.26.1"
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 url = message.url
151
- if (url !== undefined) {
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
  }
@@ -59,6 +59,8 @@ test('starts a runtime application', async ({ teardown }) => {
59
59
  timeout: 10_000
60
60
  })
61
61
 
62
+ child.stderr.pipe(process.stderr)
63
+
62
64
  teardown(async () => {
63
65
  try {
64
66
  child.kill('SIGKILL')