@platformatic/runtime 3.65.0 → 3.67.0
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/config.d.ts +2 -0
- package/index.d.ts +13 -0
- package/lib/errors.js +5 -0
- package/lib/management-api.js +97 -28
- package/lib/runtime.js +69 -17
- package/package.json +19 -18
- package/schema.json +9 -1
package/config.d.ts
CHANGED
|
@@ -17,6 +17,7 @@ export type PlatformaticRuntimeConfig = {
|
|
|
17
17
|
options?: {
|
|
18
18
|
[k: string]: unknown;
|
|
19
19
|
};
|
|
20
|
+
build?: boolean;
|
|
20
21
|
}
|
|
21
22
|
| (
|
|
22
23
|
| string
|
|
@@ -25,6 +26,7 @@ export type PlatformaticRuntimeConfig = {
|
|
|
25
26
|
options?: {
|
|
26
27
|
[k: string]: unknown;
|
|
27
28
|
};
|
|
29
|
+
build?: boolean;
|
|
28
30
|
}
|
|
29
31
|
)[];
|
|
30
32
|
entrypoint?: string;
|
package/index.d.ts
CHANGED
|
@@ -344,7 +344,20 @@ export interface RuntimeExtensionContext {
|
|
|
344
344
|
health: RuntimeExtensionHealth
|
|
345
345
|
}
|
|
346
346
|
|
|
347
|
+
export interface RuntimeExtensionBuildContext {
|
|
348
|
+
applicationId: string
|
|
349
|
+
applicationPath: string
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
export type RuntimeExtensionBuild = () => Promise<unknown>
|
|
353
|
+
|
|
347
354
|
export interface RuntimeExtensionInstance {
|
|
355
|
+
preBuild?: (context: RuntimeExtensionBuildContext) => void | Promise<void>
|
|
356
|
+
onBuild?: (
|
|
357
|
+
context: RuntimeExtensionBuildContext,
|
|
358
|
+
build: RuntimeExtensionBuild
|
|
359
|
+
) => unknown | Promise<unknown>
|
|
360
|
+
postBuild?: (context: RuntimeExtensionBuildContext, result: unknown) => void | Promise<void>
|
|
348
361
|
start?: () => void | Promise<void>
|
|
349
362
|
stop?: () => void | Promise<void>
|
|
350
363
|
close?: () => void | Promise<void>
|
package/lib/errors.js
CHANGED
|
@@ -191,6 +191,11 @@ export const DuplicateITCHandlerNameError = createError(
|
|
|
191
191
|
'The ITC command "%s" has already been registered'
|
|
192
192
|
)
|
|
193
193
|
|
|
194
|
+
export const RuntimeExtensionBuildAlreadyCalledError = createError(
|
|
195
|
+
`${ERROR_PREFIX}_EXTENSION_BUILD_ALREADY_CALLED`,
|
|
196
|
+
'The build function can only be called once by each runtime extension.'
|
|
197
|
+
)
|
|
198
|
+
|
|
194
199
|
export const MetricFamilyCollisionError = createError(
|
|
195
200
|
`${ERROR_PREFIX}_METRIC_FAMILY_COLLISION`,
|
|
196
201
|
'Extension "%s" registered metric family "%s" which collides with %s'
|
package/lib/management-api.js
CHANGED
|
@@ -18,6 +18,53 @@ import { prepareApplication } from './config.js'
|
|
|
18
18
|
|
|
19
19
|
const PLATFORMATIC_TMP_DIR = join(tmpdir(), 'platformatic', 'runtimes')
|
|
20
20
|
|
|
21
|
+
const loggerLevels = ['fatal', 'error', 'warn', 'info', 'debug', 'trace']
|
|
22
|
+
|
|
23
|
+
/*
|
|
24
|
+
Endpoints which are frequently polled by clients (the CLI, the dashboard or any other
|
|
25
|
+
monitoring tool) do not log the request/response pair to avoid flooding the runtime logs.
|
|
26
|
+
*/
|
|
27
|
+
const quiet = { logLevel: 'warn' }
|
|
28
|
+
|
|
29
|
+
/*
|
|
30
|
+
The management API is closed after the runtime has been closed (see the "closed" event handler
|
|
31
|
+
in startManagementApi), so that the POST /stop endpoint can reply. By then the runtime logger
|
|
32
|
+
has been destroyed and writing to its destination throws.
|
|
33
|
+
|
|
34
|
+
To avoid that, the logger is never captured: it is resolved - and its children are recreated -
|
|
35
|
+
on each call, so that logging becomes a no-op as soon as the runtime replaces its logger with
|
|
36
|
+
the abstract one.
|
|
37
|
+
*/
|
|
38
|
+
function createRuntimeLoggerProxy (getParent, bindings, options) {
|
|
39
|
+
let parent
|
|
40
|
+
let logger
|
|
41
|
+
|
|
42
|
+
function resolve () {
|
|
43
|
+
const current = getParent()
|
|
44
|
+
|
|
45
|
+
if (current !== parent) {
|
|
46
|
+
parent = current
|
|
47
|
+
logger = bindings ? parent.child(bindings, options) : parent
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
return logger
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
const proxy = {
|
|
54
|
+
child (childBindings, childOptions) {
|
|
55
|
+
return createRuntimeLoggerProxy(resolve, childBindings, childOptions)
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
for (const level of loggerLevels) {
|
|
60
|
+
proxy[level] = function (...args) {
|
|
61
|
+
return resolve()[level](...args)
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
return proxy
|
|
66
|
+
}
|
|
67
|
+
|
|
21
68
|
export async function managementApiPlugin (app, opts) {
|
|
22
69
|
app.register(fastifyAccepts)
|
|
23
70
|
|
|
@@ -43,16 +90,16 @@ export async function managementApiPlugin (app, opts) {
|
|
|
43
90
|
return removed
|
|
44
91
|
}
|
|
45
92
|
|
|
46
|
-
app.get('/status', async () => {
|
|
93
|
+
app.get('/status', quiet, async () => {
|
|
47
94
|
const status = runtime.getRuntimeStatus()
|
|
48
95
|
return { status }
|
|
49
96
|
})
|
|
50
97
|
|
|
51
|
-
app.get('/metadata', async () => {
|
|
98
|
+
app.get('/metadata', quiet, async () => {
|
|
52
99
|
return runtime.getRuntimeMetadata()
|
|
53
100
|
})
|
|
54
101
|
|
|
55
|
-
app.get('/config', async request => {
|
|
102
|
+
app.get('/config', quiet, async request => {
|
|
56
103
|
const metadata = request.query.metadata === 'true'
|
|
57
104
|
const rawConfig = await runtime.getRuntimeConfig(metadata)
|
|
58
105
|
|
|
@@ -64,7 +111,7 @@ export async function managementApiPlugin (app, opts) {
|
|
|
64
111
|
return rawConfig
|
|
65
112
|
})
|
|
66
113
|
|
|
67
|
-
app.get('/env', async () => {
|
|
114
|
+
app.get('/env', quiet, async () => {
|
|
68
115
|
return { ...process.env, ...runtime.getRuntimeEnv() }
|
|
69
116
|
})
|
|
70
117
|
|
|
@@ -96,7 +143,7 @@ export async function managementApiPlugin (app, opts) {
|
|
|
96
143
|
return runtime.runSchedulerJob(request.params.name)
|
|
97
144
|
})
|
|
98
145
|
|
|
99
|
-
app.get('/applications', async () => {
|
|
146
|
+
app.get('/applications', quiet, async () => {
|
|
100
147
|
return runtime.getApplications()
|
|
101
148
|
})
|
|
102
149
|
|
|
@@ -144,9 +191,9 @@ export async function managementApiPlugin (app, opts) {
|
|
|
144
191
|
return deleteApplications(request.body, reply)
|
|
145
192
|
})
|
|
146
193
|
|
|
147
|
-
app.get('/applications/:id', async request => {
|
|
194
|
+
app.get('/applications/:id', quiet, async request => {
|
|
148
195
|
const { id } = request.params
|
|
149
|
-
app.log.debug('get application details'
|
|
196
|
+
app.log.debug({ id }, 'get application details')
|
|
150
197
|
return runtime.getApplicationDetails(id)
|
|
151
198
|
})
|
|
152
199
|
|
|
@@ -154,45 +201,45 @@ export async function managementApiPlugin (app, opts) {
|
|
|
154
201
|
return deleteApplications([request.params.id], reply)
|
|
155
202
|
})
|
|
156
203
|
|
|
157
|
-
app.get('/applications/:id/config', async request => {
|
|
204
|
+
app.get('/applications/:id/config', quiet, async request => {
|
|
158
205
|
const { id } = request.params
|
|
159
|
-
app.log.debug('get application config'
|
|
206
|
+
app.log.debug({ id }, 'get application config')
|
|
160
207
|
return runtime.getApplicationConfig(id)
|
|
161
208
|
})
|
|
162
209
|
|
|
163
|
-
app.get('/applications/:id/env', async request => {
|
|
210
|
+
app.get('/applications/:id/env', quiet, async request => {
|
|
164
211
|
const { id } = request.params
|
|
165
|
-
app.log.debug('get application
|
|
212
|
+
app.log.debug({ id }, 'get application env')
|
|
166
213
|
return runtime.getApplicationEnv(id)
|
|
167
214
|
})
|
|
168
215
|
|
|
169
|
-
app.get('/applications/:id/openapi-schema', async request => {
|
|
216
|
+
app.get('/applications/:id/openapi-schema', quiet, async request => {
|
|
170
217
|
const { id } = request.params
|
|
171
|
-
app.log.debug('get openapi-schema'
|
|
218
|
+
app.log.debug({ id }, 'get openapi-schema')
|
|
172
219
|
return runtime.getApplicationOpenapiSchema(id)
|
|
173
220
|
})
|
|
174
221
|
|
|
175
|
-
app.get('/applications/:id/graphql-schema', async request => {
|
|
222
|
+
app.get('/applications/:id/graphql-schema', quiet, async request => {
|
|
176
223
|
const { id } = request.params
|
|
177
|
-
app.log.debug('get graphql-schema'
|
|
224
|
+
app.log.debug({ id }, 'get graphql-schema')
|
|
178
225
|
return runtime.getApplicationGraphqlSchema(id)
|
|
179
226
|
})
|
|
180
227
|
|
|
181
228
|
app.post('/applications/:id/start', async request => {
|
|
182
229
|
const { id } = request.params
|
|
183
|
-
app.log.debug('start application'
|
|
230
|
+
app.log.debug({ id }, 'start application')
|
|
184
231
|
await runtime.startApplication(id)
|
|
185
232
|
})
|
|
186
233
|
|
|
187
234
|
app.post('/applications/:id/stop', async request => {
|
|
188
235
|
const { id } = request.params
|
|
189
|
-
app.log.debug('stop application'
|
|
236
|
+
app.log.debug({ id }, 'stop application')
|
|
190
237
|
await runtime.stopApplication(id)
|
|
191
238
|
})
|
|
192
239
|
|
|
193
|
-
app.all('/applications/:id/proxy/*', async (request, reply) => {
|
|
240
|
+
app.all('/applications/:id/proxy/*', quiet, async (request, reply) => {
|
|
194
241
|
const { id, '*': requestUrl } = request.params
|
|
195
|
-
app.log.debug(
|
|
242
|
+
app.log.debug({ id, requestUrl }, 'proxy request')
|
|
196
243
|
|
|
197
244
|
delete request.headers.connection
|
|
198
245
|
delete request.headers['content-length']
|
|
@@ -217,7 +264,7 @@ export async function managementApiPlugin (app, opts) {
|
|
|
217
264
|
|
|
218
265
|
app.post('/applications/:id/pprof/start', async (request, reply) => {
|
|
219
266
|
const { id } = request.params
|
|
220
|
-
app.log.debug('start profiling'
|
|
267
|
+
app.log.debug({ id }, 'start profiling')
|
|
221
268
|
|
|
222
269
|
const options = request.body || {}
|
|
223
270
|
const result = await runtime.startApplicationProfiling(id, options)
|
|
@@ -226,7 +273,7 @@ export async function managementApiPlugin (app, opts) {
|
|
|
226
273
|
|
|
227
274
|
app.post('/applications/:id/pprof/stop', async (request, reply) => {
|
|
228
275
|
const { id } = request.params
|
|
229
|
-
app.log.debug('stop profiling'
|
|
276
|
+
app.log.debug({ id }, 'stop profiling')
|
|
230
277
|
|
|
231
278
|
const options = request.body || {}
|
|
232
279
|
const profileData = await runtime.stopApplicationProfiling(id, options)
|
|
@@ -248,14 +295,14 @@ export async function managementApiPlugin (app, opts) {
|
|
|
248
295
|
|
|
249
296
|
app.post('/applications/:id/heap-snapshot', async (request, reply) => {
|
|
250
297
|
const { id } = request.params
|
|
251
|
-
app.log.debug('take heap snapshot'
|
|
298
|
+
app.log.debug({ id }, 'take heap snapshot')
|
|
252
299
|
|
|
253
300
|
const stream = await runtime.takeApplicationHeapSnapshot(id)
|
|
254
301
|
reply.type('application/octet-stream').send(stream)
|
|
255
302
|
return reply
|
|
256
303
|
})
|
|
257
304
|
|
|
258
|
-
app.get('/metrics',
|
|
305
|
+
app.get('/metrics', quiet, async (req, reply) => {
|
|
259
306
|
const config = await runtime.getRuntimeConfig()
|
|
260
307
|
|
|
261
308
|
if (config.metrics?.enabled === false) {
|
|
@@ -280,7 +327,7 @@ export async function managementApiPlugin (app, opts) {
|
|
|
280
327
|
})
|
|
281
328
|
|
|
282
329
|
// TODO: Remove in next major version - deprecated endpoint
|
|
283
|
-
app.get('/metrics/live', { websocket: true }, async socket => {
|
|
330
|
+
app.get('/metrics/live', { ...quiet, websocket: true }, async socket => {
|
|
284
331
|
const config = await runtime.getRuntimeConfig()
|
|
285
332
|
|
|
286
333
|
if (config.metrics?.enabled === false) {
|
|
@@ -326,7 +373,7 @@ export async function managementApiPlugin (app, opts) {
|
|
|
326
373
|
socket.on('close', cleanup)
|
|
327
374
|
})
|
|
328
375
|
|
|
329
|
-
app.get('/logs/live', { websocket: true }, async socket => {
|
|
376
|
+
app.get('/logs/live', { ...quiet, websocket: true }, async socket => {
|
|
330
377
|
runtime.addLoggerDestination(createWebSocketStream(socket))
|
|
331
378
|
})
|
|
332
379
|
|
|
@@ -394,7 +441,10 @@ export async function startManagementApi (runtime, config) {
|
|
|
394
441
|
socketPath = join(runtimePIDDir, 'socket')
|
|
395
442
|
}
|
|
396
443
|
|
|
397
|
-
const managementApi = fastify(
|
|
444
|
+
const managementApi = fastify({
|
|
445
|
+
loggerInstance: createRuntimeLoggerProxy(() => runtime.logger, { name: 'management-api' })
|
|
446
|
+
})
|
|
447
|
+
|
|
398
448
|
managementApi.register(fastifyWebsocket)
|
|
399
449
|
managementApi.register(managementApiPlugin, { runtime, prefix: '/api/v1' })
|
|
400
450
|
|
|
@@ -416,10 +466,29 @@ export async function startManagementApi (runtime, config) {
|
|
|
416
466
|
*/
|
|
417
467
|
for (let i = 0; i < 5; i++) {
|
|
418
468
|
try {
|
|
419
|
-
|
|
469
|
+
// Fastify always logs listen() at info. The management API binds a private unix
|
|
470
|
+
// socket/pipe, so that message is noise and also breaks helpers that treat the first
|
|
471
|
+
// "listening at" log as the application URL. Downgrade it to debug for this call.
|
|
472
|
+
const { log } = managementApi
|
|
473
|
+
const originalInfo = log.info
|
|
474
|
+
log.info = function (...args) {
|
|
475
|
+
const text = typeof args[0] === 'string' ? args[0] : args[1]
|
|
476
|
+
if (typeof text === 'string' && text.startsWith('Server listening at')) {
|
|
477
|
+
return log.debug(...args)
|
|
478
|
+
}
|
|
479
|
+
|
|
480
|
+
return originalInfo.apply(this, args)
|
|
481
|
+
}
|
|
482
|
+
|
|
483
|
+
try {
|
|
484
|
+
await managementApi.listen({ path: socketPath })
|
|
485
|
+
} finally {
|
|
486
|
+
log.info = originalInfo
|
|
487
|
+
}
|
|
488
|
+
|
|
420
489
|
break
|
|
421
490
|
} catch (e) {
|
|
422
|
-
if (i ===
|
|
491
|
+
if (i === 4) {
|
|
423
492
|
throw e
|
|
424
493
|
}
|
|
425
494
|
|
package/lib/runtime.js
CHANGED
|
@@ -54,6 +54,7 @@ import {
|
|
|
54
54
|
MissingPprofCapture,
|
|
55
55
|
ReservedITCHandlerNameError,
|
|
56
56
|
RuntimeAbortedError,
|
|
57
|
+
RuntimeExtensionBuildAlreadyCalledError,
|
|
57
58
|
WorkerInterceptorJoinTimeoutError,
|
|
58
59
|
WorkerNotFoundError
|
|
59
60
|
} from './errors.js'
|
|
@@ -320,10 +321,6 @@ export class Runtime extends EventEmitter {
|
|
|
320
321
|
|
|
321
322
|
const config = this.#config
|
|
322
323
|
|
|
323
|
-
if (config.managementApi) {
|
|
324
|
-
this.#managementApi = await startManagementApi(this, config.managementApi)
|
|
325
|
-
}
|
|
326
|
-
|
|
327
324
|
if (config.metrics) {
|
|
328
325
|
// Use the configured application label name for metrics (defaults to 'applicationId')
|
|
329
326
|
this.#metricsLabelName = config.metrics.applicationLabel || 'applicationId'
|
|
@@ -340,12 +337,17 @@ export class Runtime extends EventEmitter {
|
|
|
340
337
|
collectProcessMetrics(this.#processMetricsRegistry)
|
|
341
338
|
}
|
|
342
339
|
|
|
343
|
-
// Create the logger before extensions and health/metrics servers
|
|
340
|
+
// Create the logger before the management API, the extensions and the health/metrics servers
|
|
341
|
+
// so that all of them can use it.
|
|
344
342
|
const [logger, destination, context] = await createLogger(config)
|
|
345
343
|
this.logger = logger
|
|
346
344
|
this.#loggerDestination = destination
|
|
347
345
|
this.#loggerContext = context
|
|
348
346
|
|
|
347
|
+
if (config.managementApi) {
|
|
348
|
+
this.#managementApi = await startManagementApi(this, config.managementApi)
|
|
349
|
+
}
|
|
350
|
+
|
|
349
351
|
await this.#startOpenTelemetryMetricsForwarder(config.metrics?.opentelemetry)
|
|
350
352
|
|
|
351
353
|
this.#createWorkersBroadcastChannel()
|
|
@@ -920,19 +922,63 @@ export class Runtime extends EventEmitter {
|
|
|
920
922
|
|
|
921
923
|
async buildApplication (id) {
|
|
922
924
|
const application = await this.#getApplicationById(id)
|
|
925
|
+
const applicationConfig = this.#applications.get(id)
|
|
926
|
+
const context = Object.freeze({
|
|
927
|
+
applicationId: id,
|
|
928
|
+
applicationPath: applicationConfig.path
|
|
929
|
+
})
|
|
923
930
|
|
|
924
931
|
this.emitAndNotify('application:building', id)
|
|
925
|
-
|
|
926
|
-
await
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
+
for (const extension of this.#extensions) {
|
|
933
|
+
await extension.instance?.preBuild?.(context)
|
|
934
|
+
}
|
|
935
|
+
|
|
936
|
+
let buildHandlerMissing = false
|
|
937
|
+
const build = this.#extensions.reduceRight(
|
|
938
|
+
(next, extension) => {
|
|
939
|
+
if (typeof extension.instance?.onBuild !== 'function') {
|
|
940
|
+
return next
|
|
941
|
+
}
|
|
942
|
+
|
|
943
|
+
return () => {
|
|
944
|
+
let called = false
|
|
945
|
+
const build = () => {
|
|
946
|
+
if (called) {
|
|
947
|
+
throw new RuntimeExtensionBuildAlreadyCalledError()
|
|
948
|
+
}
|
|
949
|
+
|
|
950
|
+
called = true
|
|
951
|
+
return next()
|
|
952
|
+
}
|
|
953
|
+
|
|
954
|
+
return extension.instance.onBuild(context, build)
|
|
955
|
+
}
|
|
956
|
+
},
|
|
957
|
+
async () => {
|
|
958
|
+
try {
|
|
959
|
+
return await sendViaITC(application, 'build')
|
|
960
|
+
} catch (e) {
|
|
961
|
+
// The application exports no meta, return an empty object
|
|
962
|
+
if (e.code === 'PLT_ITC_HANDLER_NOT_FOUND') {
|
|
963
|
+
buildHandlerMissing = true
|
|
964
|
+
return {}
|
|
965
|
+
}
|
|
966
|
+
|
|
967
|
+
throw e
|
|
968
|
+
}
|
|
932
969
|
}
|
|
970
|
+
)
|
|
933
971
|
|
|
934
|
-
|
|
972
|
+
const result = await build()
|
|
973
|
+
|
|
974
|
+
for (const extension of [...this.#extensions].reverse()) {
|
|
975
|
+
await extension.instance?.postBuild?.(context, result)
|
|
976
|
+
}
|
|
977
|
+
|
|
978
|
+
if (!buildHandlerMissing) {
|
|
979
|
+
this.emitAndNotify('application:built', id)
|
|
935
980
|
}
|
|
981
|
+
return result
|
|
936
982
|
}
|
|
937
983
|
|
|
938
984
|
async startApplicationProfiling (id, options = {}, ensureStarted = true) {
|
|
@@ -2824,7 +2870,7 @@ export class Runtime extends EventEmitter {
|
|
|
2824
2870
|
if (attempt === MAX_BOOTSTRAP_ATTEMPTS) {
|
|
2825
2871
|
const error = new RuntimeAbortedError({ cause: e })
|
|
2826
2872
|
error.message = `Unable to initialize the ${errorLabel}.`
|
|
2827
|
-
throw
|
|
2873
|
+
throw error
|
|
2828
2874
|
}
|
|
2829
2875
|
|
|
2830
2876
|
if (e.code !== 'PLT_RUNTIME_APPLICATION_WORKER_EXIT') {
|
|
@@ -4342,8 +4388,7 @@ export class Runtime extends EventEmitter {
|
|
|
4342
4388
|
async #loadExtensions () {
|
|
4343
4389
|
let extensions = this.#config.extensions
|
|
4344
4390
|
|
|
4345
|
-
|
|
4346
|
-
if (!extensions || this.#context.build) {
|
|
4391
|
+
if (!extensions) {
|
|
4347
4392
|
return
|
|
4348
4393
|
}
|
|
4349
4394
|
|
|
@@ -4352,7 +4397,14 @@ export class Runtime extends EventEmitter {
|
|
|
4352
4397
|
}
|
|
4353
4398
|
|
|
4354
4399
|
for (const extension of extensions) {
|
|
4355
|
-
const { path, options } = typeof extension === 'string' ? { path: extension } : extension
|
|
4400
|
+
const { path, options, build } = typeof extension === 'string' ? { path: extension } : extension
|
|
4401
|
+
|
|
4402
|
+
// Runtime extensions historically were not loaded by `wattpm build`.
|
|
4403
|
+
// Preserve that behavior unless an extension explicitly opts into the
|
|
4404
|
+
// build lifecycle.
|
|
4405
|
+
if (this.#context.build && !build) {
|
|
4406
|
+
continue
|
|
4407
|
+
}
|
|
4356
4408
|
|
|
4357
4409
|
let imported
|
|
4358
4410
|
try {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@platformatic/runtime",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.67.0",
|
|
4
4
|
"description": "Platformatic runtime",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -36,17 +36,17 @@
|
|
|
36
36
|
"pino-sentry-transport": "^1.6.0",
|
|
37
37
|
"split2": "^4.2.0",
|
|
38
38
|
"tstyche": "^6.2.0",
|
|
39
|
-
"typescript": "
|
|
39
|
+
"typescript": "~6.0.3",
|
|
40
40
|
"undici-oidc-interceptor": "^0.9.0",
|
|
41
41
|
"why-is-node-running": "^2.2.2",
|
|
42
|
-
"@platformatic/composer": "3.
|
|
43
|
-
"@platformatic/
|
|
44
|
-
"@platformatic/node": "3.
|
|
45
|
-
"@platformatic/service": "3.
|
|
46
|
-
"@platformatic/
|
|
47
|
-
"@platformatic/sql-
|
|
48
|
-
"@platformatic/
|
|
49
|
-
"@platformatic/
|
|
42
|
+
"@platformatic/composer": "3.67.0",
|
|
43
|
+
"@platformatic/db": "3.67.0",
|
|
44
|
+
"@platformatic/node": "3.67.0",
|
|
45
|
+
"@platformatic/service": "3.67.0",
|
|
46
|
+
"@platformatic/sql-graphql": "3.67.0",
|
|
47
|
+
"@platformatic/sql-mapper": "3.67.0",
|
|
48
|
+
"@platformatic/wattpm-pprof-capture": "3.67.0",
|
|
49
|
+
"@platformatic/gateway": "3.67.0"
|
|
50
50
|
},
|
|
51
51
|
"dependencies": {
|
|
52
52
|
"@fastify/accepts": "^5.0.0",
|
|
@@ -77,13 +77,13 @@
|
|
|
77
77
|
"undici": "^7.27.2",
|
|
78
78
|
"undici-thread-interceptor": "^1.3.1",
|
|
79
79
|
"ws": "^8.16.0",
|
|
80
|
-
"@platformatic/basic": "3.
|
|
81
|
-
"@platformatic/generators": "3.
|
|
82
|
-
"@platformatic/
|
|
83
|
-
"@platformatic/itc": "3.
|
|
84
|
-
"@platformatic/
|
|
85
|
-
"@platformatic/
|
|
86
|
-
"@platformatic/
|
|
80
|
+
"@platformatic/basic": "3.67.0",
|
|
81
|
+
"@platformatic/generators": "3.67.0",
|
|
82
|
+
"@platformatic/foundation": "3.67.0",
|
|
83
|
+
"@platformatic/itc": "3.67.0",
|
|
84
|
+
"@platformatic/globals": "3.67.0",
|
|
85
|
+
"@platformatic/telemetry": "3.67.0",
|
|
86
|
+
"@platformatic/metrics": "3.67.0"
|
|
87
87
|
},
|
|
88
88
|
"engines": {
|
|
89
89
|
"node": ">=22.19.0"
|
|
@@ -99,6 +99,7 @@
|
|
|
99
99
|
"gen-schema": "node lib/schema.js > schema.json",
|
|
100
100
|
"gen-types": "json2ts > config.d.ts < schema.json",
|
|
101
101
|
"build": "npm run gen-schema && npm run gen-types",
|
|
102
|
-
"lint": "eslint"
|
|
102
|
+
"lint": "eslint",
|
|
103
|
+
"lint:fix": "eslint --fix"
|
|
103
104
|
}
|
|
104
105
|
}
|
package/schema.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"$id": "https://schemas.platformatic.dev/@platformatic/runtime/3.
|
|
2
|
+
"$id": "https://schemas.platformatic.dev/@platformatic/runtime/3.67.0.json",
|
|
3
3
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
4
4
|
"title": "Platformatic Runtime Config",
|
|
5
5
|
"type": "object",
|
|
@@ -42,6 +42,10 @@
|
|
|
42
42
|
"options": {
|
|
43
43
|
"type": "object",
|
|
44
44
|
"additionalProperties": true
|
|
45
|
+
},
|
|
46
|
+
"build": {
|
|
47
|
+
"type": "boolean",
|
|
48
|
+
"default": false
|
|
45
49
|
}
|
|
46
50
|
}
|
|
47
51
|
},
|
|
@@ -67,6 +71,10 @@
|
|
|
67
71
|
"options": {
|
|
68
72
|
"type": "object",
|
|
69
73
|
"additionalProperties": true
|
|
74
|
+
},
|
|
75
|
+
"build": {
|
|
76
|
+
"type": "boolean",
|
|
77
|
+
"default": false
|
|
70
78
|
}
|
|
71
79
|
}
|
|
72
80
|
}
|