@platformatic/node 2.0.0-alpha.5 → 2.0.0-alpha.6
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/package.json +7 -7
- package/schema.json +1 -1
- package/test/node.test.js +10 -13
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@platformatic/node",
|
|
3
|
-
"version": "2.0.0-alpha.
|
|
3
|
+
"version": "2.0.0-alpha.6",
|
|
4
4
|
"description": "Platformatic Node.js Stackable",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -16,20 +16,20 @@
|
|
|
16
16
|
"homepage": "https://github.com/platformatic/platformatic#readme",
|
|
17
17
|
"dependencies": {
|
|
18
18
|
"light-my-request": "^5.13.0",
|
|
19
|
-
"@platformatic/basic": "2.0.0-alpha.
|
|
20
|
-
"@platformatic/
|
|
21
|
-
"@platformatic/
|
|
19
|
+
"@platformatic/basic": "2.0.0-alpha.6",
|
|
20
|
+
"@platformatic/utils": "2.0.0-alpha.6",
|
|
21
|
+
"@platformatic/config": "2.0.0-alpha.6"
|
|
22
22
|
},
|
|
23
23
|
"devDependencies": {
|
|
24
24
|
"borp": "^0.17.0",
|
|
25
25
|
"express": "^4.19.2",
|
|
26
26
|
"eslint": "9",
|
|
27
27
|
"fastify": "^4.28.1",
|
|
28
|
+
"json-schema-to-typescript": "^15.0.1",
|
|
28
29
|
"neostandard": "^0.11.1",
|
|
29
|
-
"json-schema-to-typescript": "^15.0.0",
|
|
30
30
|
"typescript": "^5.5.4",
|
|
31
|
-
"@platformatic/composer": "2.0.0-alpha.
|
|
32
|
-
"@platformatic/service": "2.0.0-alpha.
|
|
31
|
+
"@platformatic/composer": "2.0.0-alpha.6",
|
|
32
|
+
"@platformatic/service": "2.0.0-alpha.6"
|
|
33
33
|
},
|
|
34
34
|
"scripts": {
|
|
35
35
|
"test": "npm run lint && borp --concurrency=1 --timeout=180000",
|
package/schema.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"$id": "https://schemas.platformatic.dev/@platformatic/vite/2.0.0-alpha.
|
|
2
|
+
"$id": "https://schemas.platformatic.dev/@platformatic/vite/2.0.0-alpha.6.json",
|
|
3
3
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
4
4
|
"title": "Platformatic Node.js Stackable",
|
|
5
5
|
"type": "object",
|
package/test/node.test.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { deepStrictEqual, ifError } from 'node:assert'
|
|
1
|
+
import { deepStrictEqual, ifError, ok } from 'node:assert'
|
|
2
2
|
import { resolve } from 'node:path'
|
|
3
3
|
import { test } from 'node:test'
|
|
4
4
|
import {
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
getLogs,
|
|
7
7
|
setFixturesDir,
|
|
8
8
|
verifyJSONViaHTTP,
|
|
9
|
-
verifyJSONViaInject
|
|
9
|
+
verifyJSONViaInject
|
|
10
10
|
} from '../../basic/test/helper.js'
|
|
11
11
|
|
|
12
12
|
const packageRoot = resolve(import.meta.dirname, '..')
|
|
@@ -22,11 +22,11 @@ test('can detect and start a Node.js application with no configuration files', a
|
|
|
22
22
|
await verifyJSONViaHTTP(url, '/direct', 200, { ok: true })
|
|
23
23
|
await verifyJSONViaInject(runtime, 'main', 'GET', '/direct', 200, { ok: true })
|
|
24
24
|
|
|
25
|
+
const missingConfigurationMessage =
|
|
26
|
+
'The service main had no valid entrypoint defined in the package.json file. Falling back to the file index.js.'
|
|
27
|
+
|
|
25
28
|
const logs = await getLogs(runtime)
|
|
26
|
-
|
|
27
|
-
logs.map(m => m.msg),
|
|
28
|
-
['The service main had no valid entrypoint defined in the package.json file. Falling back to the file index.js.']
|
|
29
|
-
)
|
|
29
|
+
ok(logs.map(m => m.msg).includes(missingConfigurationMessage))
|
|
30
30
|
})
|
|
31
31
|
|
|
32
32
|
test('can detect and start a Node.js application with no configuration files and when not the entrypoint', async t => {
|
|
@@ -39,14 +39,11 @@ test('can detect and start a Node.js application with no configuration files and
|
|
|
39
39
|
await verifyJSONViaHTTP(url, '/mesh', 200, { ok: true })
|
|
40
40
|
await verifyJSONViaInject(runtime, 'main', 'GET', '/mesh', 200, { ok: true })
|
|
41
41
|
|
|
42
|
-
const
|
|
42
|
+
const missingConfigurationMessage =
|
|
43
|
+
'The service internal had no valid entrypoint defined in the package.json file. Falling back to the file index.js.'
|
|
43
44
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
[
|
|
47
|
-
'The service internal had no valid entrypoint defined in the package.json file. Falling back to the file index.js.',
|
|
48
|
-
]
|
|
49
|
-
)
|
|
45
|
+
const logs = await getLogs(runtime)
|
|
46
|
+
ok(logs.map(m => m.msg).includes(missingConfigurationMessage))
|
|
50
47
|
})
|
|
51
48
|
|
|
52
49
|
test('can detect and start a Node.js application with no build function defined', async t => {
|