@platformatic/service 2.5.5 → 2.5.6-alpha.2

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 CHANGED
@@ -364,13 +364,13 @@ export interface PathItem {
364
364
  servers?: Server[];
365
365
  parameters?: ParameterOrReference[];
366
366
  get?: Operation;
367
- put?: Operation;
368
- post?: Operation;
369
- delete?: Operation;
370
- options?: Operation;
371
- head?: Operation;
372
- patch?: Operation;
373
- trace?: Operation;
367
+ put?: Operation1;
368
+ post?: Operation1;
369
+ delete?: Operation1;
370
+ options?: Operation1;
371
+ head?: Operation1;
372
+ patch?: Operation1;
373
+ trace?: Operation1;
374
374
  /**
375
375
  * This interface was referenced by `PathItem`'s JSON-Schema definition
376
376
  * via the `patternProperty` "^x-".
@@ -424,6 +424,26 @@ export interface CallbacksOrReference {
424
424
  export interface SecurityRequirement {
425
425
  [k: string]: string[];
426
426
  }
427
+ export interface Operation1 {
428
+ tags?: string[];
429
+ summary?: string;
430
+ description?: string;
431
+ externalDocs?: ExternalDocumentation;
432
+ operationId?: string;
433
+ parameters?: ParameterOrReference[];
434
+ requestBody?: RequestBodyOrReference;
435
+ responses?: Responses;
436
+ callbacks?: {
437
+ [k: string]: CallbacksOrReference;
438
+ };
439
+ security?: SecurityRequirement[];
440
+ servers?: Server[];
441
+ /**
442
+ * This interface was referenced by `Operation1`'s JSON-Schema definition
443
+ * via the `patternProperty` "^x-".
444
+ */
445
+ [k: string]: unknown;
446
+ }
427
447
  export interface PathItemOrReference {
428
448
  [k: string]: unknown;
429
449
  }
package/lib/stackable.js CHANGED
@@ -9,6 +9,8 @@ const { extractTypeScriptCompileOptionsFromConfig } = require('./compile')
9
9
  const { compile } = require('@platformatic/ts-compiler')
10
10
  const { deepmerge } = require('@platformatic/utils')
11
11
 
12
+ const kITC = Symbol.for('plt.runtime.itc')
13
+
12
14
  class ServiceStackable {
13
15
  constructor (options) {
14
16
  this.app = null
@@ -34,7 +36,8 @@ class ServiceStackable {
34
36
  this.registerGlobals({
35
37
  setOpenapiSchema: this.setOpenapiSchema.bind(this),
36
38
  setGraphqlSchema: this.setGraphqlSchema.bind(this),
37
- setBasePath: this.setBasePath.bind(this)
39
+ setBasePath: this.setBasePath.bind(this),
40
+ invalidateHttpCache: this.#invalidateHttpCache.bind(this)
38
41
  })
39
42
  }
40
43
 
@@ -218,6 +221,10 @@ class ServiceStackable {
218
221
  globalThis.platformatic = Object.assign(globalThis.platformatic ?? {}, globals)
219
222
  }
220
223
 
224
+ async #invalidateHttpCache (opts = {}) {
225
+ await globalThis[kITC].send('invalidateHttpCache', opts)
226
+ }
227
+
221
228
  #setHttpMetrics () {
222
229
  this.app.register(httpMetrics, {
223
230
  registry: this.metricsRegistry,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@platformatic/service",
3
- "version": "2.5.5",
3
+ "version": "2.5.6-alpha.2",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "bin": {
@@ -20,7 +20,7 @@
20
20
  "@fastify/aws-lambda": "^5.0.0",
21
21
  "@fastify/compress": "^8.0.0",
22
22
  "bindings": "^1.5.0",
23
- "borp": "^0.17.0",
23
+ "borp": "^0.18.0",
24
24
  "eslint": "9",
25
25
  "json-schema-to-typescript": "^15.0.0",
26
26
  "neostandard": "^0.11.1",
@@ -76,14 +76,14 @@
76
76
  "rfdc": "^1.3.1",
77
77
  "semgrator": "^0.3.0",
78
78
  "undici": "^6.9.0",
79
- "@platformatic/client": "2.5.5",
80
- "@platformatic/metrics": "2.5.5",
81
- "@platformatic/generators": "2.5.5",
82
- "@platformatic/config": "2.5.5",
83
- "@platformatic/scalar-theme": "2.5.5",
84
- "@platformatic/ts-compiler": "2.5.5",
85
- "@platformatic/utils": "2.5.5",
86
- "@platformatic/telemetry": "2.5.5"
79
+ "@platformatic/client": "2.5.6-alpha.2",
80
+ "@platformatic/config": "2.5.6-alpha.2",
81
+ "@platformatic/metrics": "2.5.6-alpha.2",
82
+ "@platformatic/generators": "2.5.6-alpha.2",
83
+ "@platformatic/ts-compiler": "2.5.6-alpha.2",
84
+ "@platformatic/scalar-theme": "2.5.6-alpha.2",
85
+ "@platformatic/telemetry": "2.5.6-alpha.2",
86
+ "@platformatic/utils": "2.5.6-alpha.2"
87
87
  },
88
88
  "scripts": {
89
89
  "test": "pnpm run lint && borp -T --concurrency=1 --timeout=180000 && tsd",
package/schema.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
- "$id": "https://schemas.platformatic.dev/@platformatic/service/2.5.5.json",
3
- "version": "2.5.5",
2
+ "$id": "https://schemas.platformatic.dev/@platformatic/service/2.5.6-alpha.2.json",
3
+ "version": "2.5.6-alpha.2",
4
4
  "title": "Platformatic Service",
5
5
  "type": "object",
6
6
  "properties": {