@platformatic/gateway 3.31.0 → 3.32.0-alpha.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.
Files changed (3) hide show
  1. package/config.d.ts +12 -0
  2. package/package.json +7 -7
  3. package/schema.json +21 -1
package/config.d.ts CHANGED
@@ -563,6 +563,18 @@ export interface PlatformaticGatewayConfig {
563
563
  maxSize?: number;
564
564
  maxEntrySize?: number;
565
565
  maxCount?: number;
566
+ /**
567
+ * Whitelist of origins to cache. Supports exact strings and regex patterns (e.g., "/https:\\/\\/.*\\.example\\.com/").
568
+ */
569
+ origins?: string[];
570
+ /**
571
+ * Default cache duration in seconds for responses without explicit expiration headers.
572
+ */
573
+ cacheByDefault?: number;
574
+ /**
575
+ * Cache type. "shared" caches may be shared between users, "private" caches are user-specific.
576
+ */
577
+ type?: "shared" | "private";
566
578
  [k: string]: unknown;
567
579
  };
568
580
  watch?: boolean | string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@platformatic/gateway",
3
- "version": "3.31.0",
3
+ "version": "3.32.0-alpha.1",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
@@ -33,7 +33,7 @@
33
33
  "typescript": "^5.5.4",
34
34
  "why-is-node-running": "2",
35
35
  "ws": "^8.16.0",
36
- "@platformatic/db": "3.31.0"
36
+ "@platformatic/db": "3.32.0-alpha.1"
37
37
  },
38
38
  "dependencies": {
39
39
  "@fastify/error": "^4.0.0",
@@ -64,11 +64,11 @@
64
64
  "rfdc": "^1.3.1",
65
65
  "semgrator": "^0.3.0",
66
66
  "undici": "^7.0.0",
67
- "@platformatic/basic": "3.31.0",
68
- "@platformatic/scalar-theme": "3.31.0",
69
- "@platformatic/service": "3.31.0",
70
- "@platformatic/telemetry": "3.31.0",
71
- "@platformatic/foundation": "^3.31.0"
67
+ "@platformatic/basic": "3.32.0-alpha.1",
68
+ "@platformatic/foundation": "^3.32.0-alpha.1",
69
+ "@platformatic/scalar-theme": "3.32.0-alpha.1",
70
+ "@platformatic/service": "3.32.0-alpha.1",
71
+ "@platformatic/telemetry": "3.32.0-alpha.1"
72
72
  },
73
73
  "engines": {
74
74
  "node": ">=22.19.0"
package/schema.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "$id": "https://schemas.platformatic.dev/@platformatic/gateway/3.31.0.json",
2
+ "$id": "https://schemas.platformatic.dev/@platformatic/gateway/3.32.0-alpha.1.json",
3
3
  "$schema": "http://json-schema.org/draft-07/schema#",
4
4
  "title": "Platformatic Gateway Config",
5
5
  "type": "object",
@@ -2261,6 +2261,26 @@
2261
2261
  },
2262
2262
  "maxCount": {
2263
2263
  "type": "integer"
2264
+ },
2265
+ "origins": {
2266
+ "type": "array",
2267
+ "items": {
2268
+ "type": "string"
2269
+ },
2270
+ "description": "Whitelist of origins to cache. Supports exact strings and regex patterns (e.g., \"/https:\\\\/\\\\/.*\\\\.example\\\\.com/\")."
2271
+ },
2272
+ "cacheByDefault": {
2273
+ "type": "integer",
2274
+ "description": "Default cache duration in seconds for responses without explicit expiration headers."
2275
+ },
2276
+ "type": {
2277
+ "type": "string",
2278
+ "enum": [
2279
+ "shared",
2280
+ "private"
2281
+ ],
2282
+ "default": "shared",
2283
+ "description": "Cache type. \"shared\" caches may be shared between users, \"private\" caches are user-specific."
2264
2284
  }
2265
2285
  }
2266
2286
  }