@platformatic/service 0.44.0 → 0.45.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 +80 -2
- package/lib/openapi-schema-defs.js +0 -12
- package/package.json +6 -6
- package/test/cli/compile-1.test.mjs +3 -2
package/config.d.ts
CHANGED
|
@@ -108,7 +108,6 @@ export interface PlatformaticService {
|
|
|
108
108
|
strictPreflight?: boolean;
|
|
109
109
|
hideOptionsRoute?: boolean;
|
|
110
110
|
};
|
|
111
|
-
[k: string]: unknown;
|
|
112
111
|
};
|
|
113
112
|
plugins?: Plugins;
|
|
114
113
|
metrics?:
|
|
@@ -121,8 +120,10 @@ export interface PlatformaticService {
|
|
|
121
120
|
password: string;
|
|
122
121
|
};
|
|
123
122
|
};
|
|
123
|
+
telemetry?: OpenTelemetry;
|
|
124
124
|
watch?:
|
|
125
125
|
| {
|
|
126
|
+
enabled?: boolean | string;
|
|
126
127
|
/**
|
|
127
128
|
* @minItems 1
|
|
128
129
|
*/
|
|
@@ -175,6 +176,17 @@ export interface Plugins {
|
|
|
175
176
|
path?: string;
|
|
176
177
|
encapsulate?: boolean;
|
|
177
178
|
maxDepth?: number;
|
|
179
|
+
autoHooks?: boolean;
|
|
180
|
+
autoHooksPattern?: string;
|
|
181
|
+
cascadeHooks?: boolean;
|
|
182
|
+
overwriteHooks?: boolean;
|
|
183
|
+
routeParams?: boolean;
|
|
184
|
+
forceESM?: boolean;
|
|
185
|
+
ignoreFilter?: string;
|
|
186
|
+
matchFilter?: string;
|
|
187
|
+
ignorePattern?: string;
|
|
188
|
+
scriptPattern?: string;
|
|
189
|
+
indexPattern?: string;
|
|
178
190
|
options?: {
|
|
179
191
|
[k: string]: unknown;
|
|
180
192
|
};
|
|
@@ -193,6 +205,73 @@ export interface Plugins {
|
|
|
193
205
|
| boolean
|
|
194
206
|
| string;
|
|
195
207
|
}
|
|
208
|
+
export interface OpenTelemetry {
|
|
209
|
+
/**
|
|
210
|
+
* The name of the service. Defaults to the folder name if not specified.
|
|
211
|
+
*/
|
|
212
|
+
serviceName: string;
|
|
213
|
+
/**
|
|
214
|
+
* The version of the service (optional)
|
|
215
|
+
*/
|
|
216
|
+
version?: string;
|
|
217
|
+
/**
|
|
218
|
+
* An array of paths to skip when creating spans. Useful for health checks and other endpoints that do not need to be traced.
|
|
219
|
+
*/
|
|
220
|
+
skip?: {
|
|
221
|
+
/**
|
|
222
|
+
* The path to skip. Can be a string or a regex.
|
|
223
|
+
*/
|
|
224
|
+
path?: string;
|
|
225
|
+
/**
|
|
226
|
+
* HTTP method to skip
|
|
227
|
+
*/
|
|
228
|
+
method?: "GET" | "POST" | "PUT" | "DELETE" | "PATCH" | "HEAD" | "OPTIONS";
|
|
229
|
+
[k: string]: unknown;
|
|
230
|
+
}[];
|
|
231
|
+
exporter?:
|
|
232
|
+
| {
|
|
233
|
+
type?: "console" | "otlp" | "zipkin" | "memory";
|
|
234
|
+
/**
|
|
235
|
+
* Options for the exporter. These are passed directly to the exporter.
|
|
236
|
+
*/
|
|
237
|
+
options?: {
|
|
238
|
+
/**
|
|
239
|
+
* The URL to send the traces to. Not used for console or memory exporters.
|
|
240
|
+
*/
|
|
241
|
+
url?: string;
|
|
242
|
+
/**
|
|
243
|
+
* Headers to send to the exporter. Not used for console or memory exporters.
|
|
244
|
+
*/
|
|
245
|
+
headers?: {
|
|
246
|
+
[k: string]: unknown;
|
|
247
|
+
};
|
|
248
|
+
[k: string]: unknown;
|
|
249
|
+
};
|
|
250
|
+
additionalProperties?: never;
|
|
251
|
+
[k: string]: unknown;
|
|
252
|
+
}[]
|
|
253
|
+
| {
|
|
254
|
+
type?: "console" | "otlp" | "zipkin" | "memory";
|
|
255
|
+
/**
|
|
256
|
+
* Options for the exporter. These are passed directly to the exporter.
|
|
257
|
+
*/
|
|
258
|
+
options?: {
|
|
259
|
+
/**
|
|
260
|
+
* The URL to send the traces to. Not used for console or memory exporters.
|
|
261
|
+
*/
|
|
262
|
+
url?: string;
|
|
263
|
+
/**
|
|
264
|
+
* Headers to send to the exporter. Not used for console or memory exporters.
|
|
265
|
+
*/
|
|
266
|
+
headers?: {
|
|
267
|
+
[k: string]: unknown;
|
|
268
|
+
};
|
|
269
|
+
[k: string]: unknown;
|
|
270
|
+
};
|
|
271
|
+
additionalProperties?: never;
|
|
272
|
+
[k: string]: unknown;
|
|
273
|
+
};
|
|
274
|
+
}
|
|
196
275
|
export interface Info {
|
|
197
276
|
title: string;
|
|
198
277
|
summary?: string;
|
|
@@ -293,7 +372,6 @@ export interface Operation {
|
|
|
293
372
|
callbacks?: {
|
|
294
373
|
[k: string]: CallbacksOrReference;
|
|
295
374
|
};
|
|
296
|
-
deprecated?: boolean;
|
|
297
375
|
security?: SecurityRequirement[];
|
|
298
376
|
servers?: Server[];
|
|
299
377
|
/**
|
|
@@ -290,10 +290,6 @@ const $defs = {
|
|
|
290
290
|
$ref: '#/$defs/callbacks-or-reference'
|
|
291
291
|
}
|
|
292
292
|
},
|
|
293
|
-
deprecated: {
|
|
294
|
-
default: false,
|
|
295
|
-
type: 'boolean'
|
|
296
|
-
},
|
|
297
293
|
security: {
|
|
298
294
|
type: 'array',
|
|
299
295
|
items: {
|
|
@@ -347,10 +343,6 @@ const $defs = {
|
|
|
347
343
|
default: false,
|
|
348
344
|
type: 'boolean'
|
|
349
345
|
},
|
|
350
|
-
deprecated: {
|
|
351
|
-
default: false,
|
|
352
|
-
type: 'boolean'
|
|
353
|
-
},
|
|
354
346
|
content: {
|
|
355
347
|
type: 'object',
|
|
356
348
|
$ref: '#/$defs/content',
|
|
@@ -712,10 +704,6 @@ const $defs = {
|
|
|
712
704
|
default: false,
|
|
713
705
|
type: 'boolean'
|
|
714
706
|
},
|
|
715
|
-
deprecated: {
|
|
716
|
-
default: false,
|
|
717
|
-
type: 'boolean'
|
|
718
|
-
},
|
|
719
707
|
content: {
|
|
720
708
|
type: 'object',
|
|
721
709
|
$ref: '#/$defs/content',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@platformatic/service",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.45.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"bin": {
|
|
@@ -65,11 +65,11 @@
|
|
|
65
65
|
"pino-pretty": "^10.0.0",
|
|
66
66
|
"rfdc": "^1.3.0",
|
|
67
67
|
"ua-parser-js": "^1.0.35",
|
|
68
|
-
"@platformatic/client": "0.
|
|
69
|
-
"@platformatic/config": "0.
|
|
70
|
-
"@platformatic/swagger-ui-theme": "0.
|
|
71
|
-
"@platformatic/utils": "0.
|
|
72
|
-
"@platformatic/telemetry": "0.
|
|
68
|
+
"@platformatic/client": "0.45.0",
|
|
69
|
+
"@platformatic/config": "0.45.0",
|
|
70
|
+
"@platformatic/swagger-ui-theme": "0.45.0",
|
|
71
|
+
"@platformatic/utils": "0.45.0",
|
|
72
|
+
"@platformatic/telemetry": "0.45.0"
|
|
73
73
|
},
|
|
74
74
|
"standard": {
|
|
75
75
|
"ignore": [
|
|
@@ -9,8 +9,9 @@ import { cliPath, safeKill } from './helper.mjs'
|
|
|
9
9
|
import { fileURLToPath } from 'url'
|
|
10
10
|
|
|
11
11
|
let count = 0
|
|
12
|
+
const isWin = os.platform() === 'win32'
|
|
12
13
|
|
|
13
|
-
if (
|
|
14
|
+
if (!isWin) {
|
|
14
15
|
t.jobs = 5
|
|
15
16
|
}
|
|
16
17
|
t.setTimeout(360000)
|
|
@@ -266,7 +267,7 @@ t.test('should compile typescript plugin with start command with different cwd',
|
|
|
266
267
|
t.fail('should compile typescript plugin with start command')
|
|
267
268
|
})
|
|
268
269
|
|
|
269
|
-
t.test('valid tsconfig file inside an inner folder', async (t) => {
|
|
270
|
+
t.test('valid tsconfig file inside an inner folder', { skip: isWin }, async (t) => {
|
|
270
271
|
const testDir = path.join(urlDirname(import.meta.url), '..', 'fixtures', 'typescript-plugin')
|
|
271
272
|
const cwd = await getCWD(t)
|
|
272
273
|
|