@platformatic/db 3.32.0-alpha.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 +38 -4
  2. package/package.json +12 -12
  3. package/schema.json +87 -40
package/config.d.ts CHANGED
@@ -49,7 +49,7 @@ export interface PlatformaticDatabaseConfig {
49
49
  logger?:
50
50
  | boolean
51
51
  | {
52
- level: (
52
+ level?: (
53
53
  | ("fatal" | "error" | "warn" | "info" | "debug" | "trace" | "silent")
54
54
  | {
55
55
  [k: string]: unknown;
@@ -501,7 +501,7 @@ export interface PlatformaticDatabaseConfig {
501
501
  };
502
502
  workersRestartDelay?: number | string;
503
503
  logger?: {
504
- level: (
504
+ level?: (
505
505
  | ("fatal" | "error" | "warn" | "info" | "debug" | "trace" | "silent")
506
506
  | {
507
507
  [k: string]: unknown;
@@ -604,7 +604,6 @@ export interface PlatformaticDatabaseConfig {
604
604
  maxHeapTotal?: number | string;
605
605
  maxYoungGeneration?: number | string;
606
606
  codeRangeSize?: number | string;
607
- noHeapCheck?: boolean | string;
608
607
  };
609
608
  undici?: {
610
609
  agentOptions?: {
@@ -656,6 +655,18 @@ export interface PlatformaticDatabaseConfig {
656
655
  maxSize?: number;
657
656
  maxEntrySize?: number;
658
657
  maxCount?: number;
658
+ /**
659
+ * Whitelist of origins to cache. Supports exact strings and regex patterns (e.g., "/https:\\/\\/.*\\.example\\.com/").
660
+ */
661
+ origins?: string[];
662
+ /**
663
+ * Default cache duration in seconds for responses without explicit expiration headers.
664
+ */
665
+ cacheByDefault?: number;
666
+ /**
667
+ * Cache type. "shared" caches may be shared between users, "private" caches are user-specific.
668
+ */
669
+ type?: "shared" | "private";
659
670
  [k: string]: unknown;
660
671
  };
661
672
  watch?: boolean | string;
@@ -885,6 +896,18 @@ export interface PlatformaticDatabaseConfig {
885
896
  [k: string]: string | [string, ...string[]];
886
897
  };
887
898
  };
899
+ compileCache?:
900
+ | boolean
901
+ | {
902
+ /**
903
+ * Enable Node.js module compile cache for faster startup
904
+ */
905
+ enabled?: boolean;
906
+ /**
907
+ * Directory to store compile cache. Defaults to .plt/compile-cache in app root
908
+ */
909
+ directory?: string;
910
+ };
888
911
  application?: {
889
912
  reuseTcpPorts?: boolean;
890
913
  workers?:
@@ -908,7 +931,6 @@ export interface PlatformaticDatabaseConfig {
908
931
  maxHeapTotal?: number | string;
909
932
  maxYoungGeneration?: number | string;
910
933
  codeRangeSize?: number | string;
911
- noHeapCheck?: boolean | string;
912
934
  };
913
935
  arguments?: string[];
914
936
  env?: {
@@ -944,6 +966,18 @@ export interface PlatformaticDatabaseConfig {
944
966
  )[];
945
967
  [k: string]: unknown;
946
968
  };
969
+ compileCache?:
970
+ | boolean
971
+ | {
972
+ /**
973
+ * Enable Node.js module compile cache for faster startup
974
+ */
975
+ enabled?: boolean;
976
+ /**
977
+ * Directory to store compile cache. Defaults to .plt/compile-cache in app root
978
+ */
979
+ directory?: string;
980
+ };
947
981
  };
948
982
  };
949
983
  watch?:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@platformatic/db",
3
- "version": "3.32.0-alpha.0",
3
+ "version": "3.32.0-alpha.1",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
@@ -66,17 +66,17 @@
66
66
  "rfdc": "^1.3.1",
67
67
  "rimraf": "^4.4.1",
68
68
  "semgrator": "^0.3.0",
69
- "@platformatic/db-authorization": "3.32.0-alpha.0",
70
- "@platformatic/db-core": "3.32.0-alpha.0",
71
- "@platformatic/basic": "3.32.0-alpha.0",
72
- "@platformatic/foundation": "3.32.0-alpha.0",
73
- "@platformatic/service": "3.32.0-alpha.0",
74
- "@platformatic/sql-events": "3.32.0-alpha.0",
75
- "@platformatic/sql-json-schema-mapper": "3.32.0-alpha.0",
76
- "@platformatic/sql-graphql": "3.32.0-alpha.0",
77
- "@platformatic/sql-mapper": "3.32.0-alpha.0",
78
- "@platformatic/telemetry": "3.32.0-alpha.0",
79
- "@platformatic/sql-openapi": "3.32.0-alpha.0"
69
+ "@platformatic/basic": "3.32.0-alpha.1",
70
+ "@platformatic/db-authorization": "3.32.0-alpha.1",
71
+ "@platformatic/db-core": "3.32.0-alpha.1",
72
+ "@platformatic/foundation": "3.32.0-alpha.1",
73
+ "@platformatic/service": "3.32.0-alpha.1",
74
+ "@platformatic/sql-events": "3.32.0-alpha.1",
75
+ "@platformatic/sql-graphql": "3.32.0-alpha.1",
76
+ "@platformatic/sql-mapper": "3.32.0-alpha.1",
77
+ "@platformatic/sql-json-schema-mapper": "3.32.0-alpha.1",
78
+ "@platformatic/sql-openapi": "3.32.0-alpha.1",
79
+ "@platformatic/telemetry": "3.32.0-alpha.1"
80
80
  },
81
81
  "engines": {
82
82
  "node": ">=22.19.0"
package/schema.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "$id": "https://schemas.platformatic.dev/@platformatic/db/3.32.0-alpha.0.json",
2
+ "$id": "https://schemas.platformatic.dev/@platformatic/db/3.32.0-alpha.1.json",
3
3
  "$schema": "http://json-schema.org/draft-07/schema#",
4
4
  "title": "Platformatic Database Config",
5
5
  "type": "object",
@@ -98,7 +98,6 @@
98
98
  "properties": {
99
99
  "level": {
100
100
  "type": "string",
101
- "default": "info",
102
101
  "oneOf": [
103
102
  {
104
103
  "enum": [
@@ -241,9 +240,6 @@
241
240
  "additionalProperties": true
242
241
  }
243
242
  },
244
- "required": [
245
- "level"
246
- ],
247
243
  "default": {},
248
244
  "additionalProperties": true
249
245
  }
@@ -1509,16 +1505,6 @@
1509
1505
  "type": "string"
1510
1506
  }
1511
1507
  ]
1512
- },
1513
- "noHeapCheck": {
1514
- "anyOf": [
1515
- {
1516
- "type": "boolean"
1517
- },
1518
- {
1519
- "type": "string"
1520
- }
1521
- ]
1522
1508
  }
1523
1509
  },
1524
1510
  "additionalProperties": false
@@ -1643,6 +1629,28 @@
1643
1629
  }
1644
1630
  }
1645
1631
  }
1632
+ },
1633
+ "compileCache": {
1634
+ "anyOf": [
1635
+ {
1636
+ "type": "boolean"
1637
+ },
1638
+ {
1639
+ "type": "object",
1640
+ "properties": {
1641
+ "enabled": {
1642
+ "type": "boolean",
1643
+ "default": true,
1644
+ "description": "Enable Node.js module compile cache for faster startup"
1645
+ },
1646
+ "directory": {
1647
+ "type": "string",
1648
+ "description": "Directory to store compile cache. Defaults to .plt/compile-cache in app root"
1649
+ }
1650
+ },
1651
+ "additionalProperties": false
1652
+ }
1653
+ ]
1646
1654
  }
1647
1655
  }
1648
1656
  }
@@ -1722,7 +1730,6 @@
1722
1730
  "properties": {
1723
1731
  "level": {
1724
1732
  "type": "string",
1725
- "default": "info",
1726
1733
  "oneOf": [
1727
1734
  {
1728
1735
  "enum": [
@@ -1865,9 +1872,6 @@
1865
1872
  "additionalProperties": true
1866
1873
  }
1867
1874
  },
1868
- "required": [
1869
- "level"
1870
- ],
1871
1875
  "default": {},
1872
1876
  "additionalProperties": true
1873
1877
  },
@@ -2163,17 +2167,6 @@
2163
2167
  }
2164
2168
  ],
2165
2169
  "default": 268435456
2166
- },
2167
- "noHeapCheck": {
2168
- "anyOf": [
2169
- {
2170
- "type": "boolean"
2171
- },
2172
- {
2173
- "type": "string"
2174
- }
2175
- ],
2176
- "default": false
2177
2170
  }
2178
2171
  },
2179
2172
  "additionalProperties": false
@@ -2305,6 +2298,26 @@
2305
2298
  },
2306
2299
  "maxCount": {
2307
2300
  "type": "integer"
2301
+ },
2302
+ "origins": {
2303
+ "type": "array",
2304
+ "items": {
2305
+ "type": "string"
2306
+ },
2307
+ "description": "Whitelist of origins to cache. Supports exact strings and regex patterns (e.g., \"/https:\\\\/\\\\/.*\\\\.example\\\\.com/\")."
2308
+ },
2309
+ "cacheByDefault": {
2310
+ "type": "integer",
2311
+ "description": "Default cache duration in seconds for responses without explicit expiration headers."
2312
+ },
2313
+ "type": {
2314
+ "type": "string",
2315
+ "enum": [
2316
+ "shared",
2317
+ "private"
2318
+ ],
2319
+ "default": "shared",
2320
+ "description": "Cache type. \"shared\" caches may be shared between users, \"private\" caches are user-specific."
2308
2321
  }
2309
2322
  }
2310
2323
  }
@@ -2920,6 +2933,28 @@
2920
2933
  ],
2921
2934
  "additionalProperties": false
2922
2935
  },
2936
+ "compileCache": {
2937
+ "anyOf": [
2938
+ {
2939
+ "type": "boolean"
2940
+ },
2941
+ {
2942
+ "type": "object",
2943
+ "properties": {
2944
+ "enabled": {
2945
+ "type": "boolean",
2946
+ "default": true,
2947
+ "description": "Enable Node.js module compile cache for faster startup"
2948
+ },
2949
+ "directory": {
2950
+ "type": "string",
2951
+ "description": "Directory to store compile cache. Defaults to .plt/compile-cache in app root"
2952
+ }
2953
+ },
2954
+ "additionalProperties": false
2955
+ }
2956
+ ]
2957
+ },
2923
2958
  "application": {
2924
2959
  "type": "object",
2925
2960
  "properties": {
@@ -3067,16 +3102,6 @@
3067
3102
  "type": "string"
3068
3103
  }
3069
3104
  ]
3070
- },
3071
- "noHeapCheck": {
3072
- "anyOf": [
3073
- {
3074
- "type": "boolean"
3075
- },
3076
- {
3077
- "type": "string"
3078
- }
3079
- ]
3080
3105
  }
3081
3106
  },
3082
3107
  "additionalProperties": false
@@ -3194,6 +3219,28 @@
3194
3219
  }
3195
3220
  }
3196
3221
  }
3222
+ },
3223
+ "compileCache": {
3224
+ "anyOf": [
3225
+ {
3226
+ "type": "boolean"
3227
+ },
3228
+ {
3229
+ "type": "object",
3230
+ "properties": {
3231
+ "enabled": {
3232
+ "type": "boolean",
3233
+ "default": true,
3234
+ "description": "Enable Node.js module compile cache for faster startup"
3235
+ },
3236
+ "directory": {
3237
+ "type": "string",
3238
+ "description": "Directory to store compile cache. Defaults to .plt/compile-cache in app root"
3239
+ }
3240
+ },
3241
+ "additionalProperties": false
3242
+ }
3243
+ ]
3197
3244
  }
3198
3245
  },
3199
3246
  "additionalProperties": false