@platformatic/service 3.2.0 → 3.2.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/lib/generator.js +11 -9
- package/package.json +7 -7
- package/schema.json +2 -2
package/lib/generator.js
CHANGED
|
@@ -116,7 +116,7 @@ const TEST_HELPER_JS = `
|
|
|
116
116
|
|
|
117
117
|
const { join } = require('node:path')
|
|
118
118
|
const { readFile } = require('node:fs/promises')
|
|
119
|
-
const {
|
|
119
|
+
const { create } = require('$__MOD__')
|
|
120
120
|
$__REQUIRES__
|
|
121
121
|
|
|
122
122
|
async function getServer (t) {
|
|
@@ -129,10 +129,11 @@ $__PRE__
|
|
|
129
129
|
config.watch = false
|
|
130
130
|
$__CONFIG__
|
|
131
131
|
// Add your config customizations here
|
|
132
|
-
const server = await
|
|
133
|
-
|
|
132
|
+
const server = await create(join(__dirname, '../'),config)
|
|
133
|
+
await server.start({}) // sets .getApplication()
|
|
134
|
+
t.after(() => server.stop())
|
|
134
135
|
$__POST__
|
|
135
|
-
return server
|
|
136
|
+
return server.getApplication()
|
|
136
137
|
}
|
|
137
138
|
|
|
138
139
|
module.exports.getServer = getServer
|
|
@@ -141,7 +142,7 @@ module.exports.getServer = getServer
|
|
|
141
142
|
const TEST_HELPER_TS = `
|
|
142
143
|
import { join } from 'node:path'
|
|
143
144
|
import { readFile } from 'node:fs/promises'
|
|
144
|
-
import {
|
|
145
|
+
import { create } from '$__MOD__'
|
|
145
146
|
import { test } from 'node:test'
|
|
146
147
|
$__REQUIRES__
|
|
147
148
|
|
|
@@ -151,7 +152,7 @@ type TestContext = Parameters<Exclude<testfn, undefined>>[0]
|
|
|
151
152
|
export async function getServer (t: TestContext) {
|
|
152
153
|
$__PRE__
|
|
153
154
|
// We go up two folder because this files executes in the dist folder
|
|
154
|
-
const config = JSON.parse(await readFile(join(
|
|
155
|
+
const config = JSON.parse(await readFile(join(import.meta.dirname, "..", "watt.json"), 'utf8'))
|
|
155
156
|
// Add your config customizations here. For example you want to set
|
|
156
157
|
// all things that are set in the config file to read from an env variable
|
|
157
158
|
config.server ||= {}
|
|
@@ -160,10 +161,11 @@ $__PRE__
|
|
|
160
161
|
config.watch = false
|
|
161
162
|
$__CONFIG__
|
|
162
163
|
// Add your config customizations here
|
|
163
|
-
const server = await
|
|
164
|
-
|
|
164
|
+
const server = await create(join(import.meta.dirname, "../"), config)
|
|
165
|
+
await server.start({}) // sets .getApplication()
|
|
166
|
+
t.after(() => server.stop())
|
|
165
167
|
$__POST__
|
|
166
|
-
return server
|
|
168
|
+
return server.getApplication();
|
|
167
169
|
}
|
|
168
170
|
`
|
|
169
171
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@platformatic/service",
|
|
3
|
-
"version": "3.2.
|
|
3
|
+
"version": "3.2.1",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"types": "index.d.ts",
|
|
@@ -67,12 +67,12 @@
|
|
|
67
67
|
"rfdc": "^1.3.1",
|
|
68
68
|
"semgrator": "^0.3.0",
|
|
69
69
|
"undici": "^7.0.0",
|
|
70
|
-
"@platformatic/basic": "3.2.
|
|
71
|
-
"@platformatic/foundation": "3.2.
|
|
72
|
-
"@platformatic/
|
|
73
|
-
"@platformatic/
|
|
74
|
-
"@platformatic/
|
|
75
|
-
"@platformatic/
|
|
70
|
+
"@platformatic/basic": "3.2.1",
|
|
71
|
+
"@platformatic/foundation": "3.2.1",
|
|
72
|
+
"@platformatic/scalar-theme": "3.2.1",
|
|
73
|
+
"@platformatic/metrics": "3.2.1",
|
|
74
|
+
"@platformatic/telemetry": "3.2.1",
|
|
75
|
+
"@platformatic/generators": "3.2.1"
|
|
76
76
|
},
|
|
77
77
|
"engines": {
|
|
78
78
|
"node": ">=22.19.0"
|
package/schema.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
|
-
"$id": "https://schemas.platformatic.dev/@platformatic/service/3.2.
|
|
3
|
-
"version": "3.2.
|
|
2
|
+
"$id": "https://schemas.platformatic.dev/@platformatic/service/3.2.1.json",
|
|
3
|
+
"version": "3.2.1",
|
|
4
4
|
"title": "Platformatic Service Config",
|
|
5
5
|
"type": "object",
|
|
6
6
|
"properties": {
|