@spfn/core 0.2.0-beta.6 → 0.2.0-beta.64

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 (73) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +181 -1281
  3. package/dist/authz/index.d.ts +34 -0
  4. package/dist/authz/index.js +415 -0
  5. package/dist/authz/index.js.map +1 -0
  6. package/dist/{boss-DI1r4kTS.d.ts → boss-gXhgctn6.d.ts} +40 -0
  7. package/dist/cache/index.js +42 -30
  8. package/dist/cache/index.js.map +1 -1
  9. package/dist/codegen/index.d.ts +55 -8
  10. package/dist/codegen/index.js +183 -7
  11. package/dist/codegen/index.js.map +1 -1
  12. package/dist/config/index.d.ts +585 -6
  13. package/dist/config/index.js +116 -5
  14. package/dist/config/index.js.map +1 -1
  15. package/dist/db/index.d.ts +270 -4
  16. package/dist/db/index.js +404 -60
  17. package/dist/db/index.js.map +1 -1
  18. package/dist/define-middleware-DuXD8Hvu.d.ts +167 -0
  19. package/dist/env/index.d.ts +26 -2
  20. package/dist/env/index.js +15 -5
  21. package/dist/env/index.js.map +1 -1
  22. package/dist/env/loader.d.ts +26 -19
  23. package/dist/env/loader.js +32 -25
  24. package/dist/env/loader.js.map +1 -1
  25. package/dist/errors/index.d.ts +10 -0
  26. package/dist/errors/index.js +20 -2
  27. package/dist/errors/index.js.map +1 -1
  28. package/dist/event/index.d.ts +33 -3
  29. package/dist/event/index.js +24 -3
  30. package/dist/event/index.js.map +1 -1
  31. package/dist/event/sse/client.d.ts +42 -3
  32. package/dist/event/sse/client.js +128 -45
  33. package/dist/event/sse/client.js.map +1 -1
  34. package/dist/event/sse/index.d.ts +12 -5
  35. package/dist/event/sse/index.js +271 -32
  36. package/dist/event/sse/index.js.map +1 -1
  37. package/dist/event/ws/client.d.ts +59 -0
  38. package/dist/event/ws/client.js +273 -0
  39. package/dist/event/ws/client.js.map +1 -0
  40. package/dist/event/ws/index.d.ts +94 -0
  41. package/dist/event/ws/index.js +272 -0
  42. package/dist/event/ws/index.js.map +1 -0
  43. package/dist/job/index.d.ts +2 -2
  44. package/dist/job/index.js +155 -42
  45. package/dist/job/index.js.map +1 -1
  46. package/dist/logger/index.d.ts +5 -0
  47. package/dist/logger/index.js +14 -0
  48. package/dist/logger/index.js.map +1 -1
  49. package/dist/middleware/index.d.ts +243 -2
  50. package/dist/middleware/index.js +1323 -13
  51. package/dist/middleware/index.js.map +1 -1
  52. package/dist/nextjs/index.d.ts +2 -2
  53. package/dist/nextjs/index.js +77 -31
  54. package/dist/nextjs/index.js.map +1 -1
  55. package/dist/nextjs/server.d.ts +53 -23
  56. package/dist/nextjs/server.js +197 -66
  57. package/dist/nextjs/server.js.map +1 -1
  58. package/dist/route/index.d.ts +138 -146
  59. package/dist/route/index.js +238 -22
  60. package/dist/route/index.js.map +1 -1
  61. package/dist/security/index.d.ts +83 -0
  62. package/dist/security/index.js +173 -0
  63. package/dist/security/index.js.map +1 -0
  64. package/dist/server/index.d.ts +450 -17
  65. package/dist/server/index.js +1756 -277
  66. package/dist/server/index.js.map +1 -1
  67. package/dist/{router-Di7ENoah.d.ts → token-manager-jKD_EsSE.d.ts} +121 -1
  68. package/dist/{types-D_N_U-Py.d.ts → types-7Mhoxnnt.d.ts} +21 -1
  69. package/dist/types-BFB72jbM.d.ts +282 -0
  70. package/dist/types-DVjf37yO.d.ts +205 -0
  71. package/docs/file-upload.md +717 -0
  72. package/package.json +235 -208
  73. package/dist/types-B-e_f2dQ.d.ts +0 -121
@@ -20,9 +20,9 @@ import { parsePostgresUrl, parseRedisUrl } from '@spfn/core/env';
20
20
  * ```
21
21
  */
22
22
  declare const coreEnvSchema: {
23
- NODE_ENV: Omit<_spfn_core_env.EnvVarSchema<"production" | "local" | "development" | "test">, "key" | "type" | "validator"> & {
23
+ NODE_ENV: Omit<_spfn_core_env.EnvVarSchema<"production" | "local" | "development" | "staging" | "test">, "key" | "type" | "validator"> & {
24
24
  type: "enum";
25
- validator: (val: string) => "production" | "local" | "development" | "test";
25
+ validator: (val: string) => "production" | "local" | "development" | "staging" | "test";
26
26
  } & {
27
27
  key: "NODE_ENV";
28
28
  };
@@ -34,6 +34,7 @@ declare const coreEnvSchema: {
34
34
  examples: string[];
35
35
  } & {
36
36
  type: "string";
37
+ validator: (value: string) => string;
37
38
  } & {
38
39
  key: "DATABASE_URL";
39
40
  };
@@ -45,6 +46,7 @@ declare const coreEnvSchema: {
45
46
  examples: string[];
46
47
  } & {
47
48
  type: "string";
49
+ validator: (value: string) => string;
48
50
  } & {
49
51
  key: "DATABASE_WRITE_URL";
50
52
  };
@@ -56,6 +58,7 @@ declare const coreEnvSchema: {
56
58
  examples: string[];
57
59
  } & {
58
60
  type: "string";
61
+ validator: (value: string) => string;
59
62
  } & {
60
63
  key: "DATABASE_READ_URL";
61
64
  };
@@ -69,6 +72,16 @@ declare const coreEnvSchema: {
69
72
  } & {
70
73
  key: "DB_POOL_MAX";
71
74
  };
75
+ DB_POOL_READ_MAX: {
76
+ description: string;
77
+ required: boolean;
78
+ examples: number[];
79
+ } & {
80
+ type: "number";
81
+ validator: (value: string) => number;
82
+ } & {
83
+ key: "DB_POOL_READ_MAX";
84
+ };
72
85
  DB_POOL_IDLE_TIMEOUT: {
73
86
  description: string;
74
87
  default: number;
@@ -209,6 +222,26 @@ declare const coreEnvSchema: {
209
222
  } & {
210
223
  key: "TRANSACTION_TIMEOUT";
211
224
  };
225
+ TRANSACTION_IDLE_TIMEOUT: {
226
+ description: string;
227
+ default: number;
228
+ examples: number[];
229
+ } & {
230
+ type: "number";
231
+ validator: (value: string) => number;
232
+ } & {
233
+ key: "TRANSACTION_IDLE_TIMEOUT";
234
+ };
235
+ JOB_POLLING_INTERVAL_SECONDS: {
236
+ description: string;
237
+ default: number;
238
+ examples: number[];
239
+ } & {
240
+ type: "number";
241
+ validator: (value: string) => number;
242
+ } & {
243
+ key: "JOB_POLLING_INTERVAL_SECONDS";
244
+ };
212
245
  DB_DEBUG_TRACE: {
213
246
  description: string;
214
247
  default: boolean;
@@ -226,6 +259,7 @@ declare const coreEnvSchema: {
226
259
  examples: string[];
227
260
  } & {
228
261
  type: "string";
262
+ validator: (value: string) => string;
229
263
  } & {
230
264
  key: "DRIZZLE_SCHEMA_PATH";
231
265
  };
@@ -236,6 +270,7 @@ declare const coreEnvSchema: {
236
270
  examples: string[];
237
271
  } & {
238
272
  type: "string";
273
+ validator: (value: string) => string;
239
274
  } & {
240
275
  key: "DRIZZLE_OUT_DIR";
241
276
  };
@@ -253,6 +288,7 @@ declare const coreEnvSchema: {
253
288
  examples: string[];
254
289
  } & {
255
290
  type: "string";
291
+ validator: (value: string) => string;
256
292
  } & {
257
293
  key: "CACHE_URL";
258
294
  };
@@ -264,6 +300,7 @@ declare const coreEnvSchema: {
264
300
  examples: string[];
265
301
  } & {
266
302
  type: "string";
303
+ validator: (value: string) => string;
267
304
  } & {
268
305
  key: "CACHE_WRITE_URL";
269
306
  };
@@ -275,6 +312,7 @@ declare const coreEnvSchema: {
275
312
  examples: string[];
276
313
  } & {
277
314
  type: "string";
315
+ validator: (value: string) => string;
278
316
  } & {
279
317
  key: "CACHE_READ_URL";
280
318
  };
@@ -284,6 +322,7 @@ declare const coreEnvSchema: {
284
322
  examples: string[];
285
323
  } & {
286
324
  type: "string";
325
+ validator: (value: string) => string;
287
326
  } & {
288
327
  key: "CACHE_SENTINEL_HOSTS";
289
328
  };
@@ -293,6 +332,7 @@ declare const coreEnvSchema: {
293
332
  examples: string[];
294
333
  } & {
295
334
  type: "string";
335
+ validator: (value: string) => string;
296
336
  } & {
297
337
  key: "CACHE_CLUSTER_NODES";
298
338
  };
@@ -302,6 +342,7 @@ declare const coreEnvSchema: {
302
342
  examples: string[];
303
343
  } & {
304
344
  type: "string";
345
+ validator: (value: string) => string;
305
346
  } & {
306
347
  key: "CACHE_MASTER_NAME";
307
348
  };
@@ -312,6 +353,7 @@ declare const coreEnvSchema: {
312
353
  examples: string[];
313
354
  } & {
314
355
  type: "string";
356
+ validator: (value: string) => string;
315
357
  } & {
316
358
  key: "CACHE_PASSWORD";
317
359
  };
@@ -325,6 +367,36 @@ declare const coreEnvSchema: {
325
367
  } & {
326
368
  key: "CACHE_TLS_REJECT_UNAUTHORIZED";
327
369
  };
370
+ CACHE_MAX_RETRIES_PER_REQUEST: {
371
+ description: string;
372
+ default: number;
373
+ examples: number[];
374
+ } & {
375
+ type: "number";
376
+ validator: (value: string) => number;
377
+ } & {
378
+ key: "CACHE_MAX_RETRIES_PER_REQUEST";
379
+ };
380
+ CACHE_ENABLE_OFFLINE_QUEUE: {
381
+ description: string;
382
+ default: boolean;
383
+ examples: boolean[];
384
+ } & {
385
+ type: "boolean";
386
+ validator: (value: string) => boolean;
387
+ } & {
388
+ key: "CACHE_ENABLE_OFFLINE_QUEUE";
389
+ };
390
+ DB_MAX_ROWS: {
391
+ description: string;
392
+ default: number;
393
+ examples: number[];
394
+ } & {
395
+ type: "number";
396
+ validator: (value: string) => number;
397
+ } & {
398
+ key: "DB_MAX_ROWS";
399
+ };
328
400
  PORT: {
329
401
  description: string;
330
402
  default: number;
@@ -342,6 +414,7 @@ declare const coreEnvSchema: {
342
414
  examples: string[];
343
415
  } & {
344
416
  type: "string";
417
+ validator: (value: string) => string;
345
418
  } & {
346
419
  key: "HOST";
347
420
  };
@@ -385,6 +458,36 @@ declare const coreEnvSchema: {
385
458
  } & {
386
459
  key: "SHUTDOWN_TIMEOUT";
387
460
  };
461
+ FETCH_CONNECT_TIMEOUT: {
462
+ description: string;
463
+ default: number;
464
+ examples: number[];
465
+ } & {
466
+ type: "number";
467
+ validator: (value: string) => number;
468
+ } & {
469
+ key: "FETCH_CONNECT_TIMEOUT";
470
+ };
471
+ FETCH_HEADERS_TIMEOUT: {
472
+ description: string;
473
+ default: number;
474
+ examples: number[];
475
+ } & {
476
+ type: "number";
477
+ validator: (value: string) => number;
478
+ } & {
479
+ key: "FETCH_HEADERS_TIMEOUT";
480
+ };
481
+ FETCH_BODY_TIMEOUT: {
482
+ description: string;
483
+ default: number;
484
+ examples: number[];
485
+ } & {
486
+ type: "number";
487
+ validator: (value: string) => number;
488
+ } & {
489
+ key: "FETCH_BODY_TIMEOUT";
490
+ };
388
491
  SPFN_API_URL: {
389
492
  description: string;
390
493
  required: boolean;
@@ -415,6 +518,96 @@ declare const coreEnvSchema: {
415
518
  } & {
416
519
  key: "SPFN_APP_URL";
417
520
  };
521
+ RPC_PROXY_TIMEOUT: {
522
+ description: string;
523
+ default: number;
524
+ nextjs: boolean;
525
+ examples: number[];
526
+ } & {
527
+ type: "number";
528
+ validator: (value: string) => number;
529
+ } & {
530
+ key: "RPC_PROXY_TIMEOUT";
531
+ };
532
+ SPFN_PROXY_SECRET: {
533
+ description: string;
534
+ required: boolean;
535
+ sensitive: boolean;
536
+ nextjs: boolean;
537
+ examples: string[];
538
+ } & {
539
+ type: "string";
540
+ validator: (value: string) => string;
541
+ } & {
542
+ key: "SPFN_PROXY_SECRET";
543
+ };
544
+ SPFN_PROXY_SECRET_PREVIOUS: {
545
+ description: string;
546
+ required: boolean;
547
+ sensitive: boolean;
548
+ nextjs: boolean;
549
+ examples: string[];
550
+ } & {
551
+ type: "string";
552
+ validator: (value: string) => string;
553
+ } & {
554
+ key: "SPFN_PROXY_SECRET_PREVIOUS";
555
+ };
556
+ TRUSTED_PROXY_HOPS: {
557
+ description: string;
558
+ default: number;
559
+ nextjs: boolean;
560
+ examples: number[];
561
+ } & {
562
+ type: "number";
563
+ validator: (value: string) => number;
564
+ } & {
565
+ key: "TRUSTED_PROXY_HOPS";
566
+ };
567
+ RATE_LIMIT_MODE: Omit<_spfn_core_env.EnvVarSchema<"off" | "on">, "key" | "type" | "validator"> & {
568
+ type: "enum";
569
+ validator: (val: string) => "off" | "on";
570
+ } & {
571
+ key: "RATE_LIMIT_MODE";
572
+ };
573
+ RATE_LIMIT_DEFAULT_LIMIT: {
574
+ description: string;
575
+ default: number;
576
+ examples: number[];
577
+ } & {
578
+ type: "number";
579
+ validator: (value: string) => number;
580
+ } & {
581
+ key: "RATE_LIMIT_DEFAULT_LIMIT";
582
+ };
583
+ RATE_LIMIT_DEFAULT_WINDOW_MS: {
584
+ description: string;
585
+ default: number;
586
+ examples: number[];
587
+ } & {
588
+ type: "number";
589
+ validator: (value: string) => number;
590
+ } & {
591
+ key: "RATE_LIMIT_DEFAULT_WINDOW_MS";
592
+ };
593
+ RATE_LIMIT_FAIL_CLOSED: {
594
+ description: string;
595
+ default: boolean;
596
+ } & {
597
+ type: "boolean";
598
+ validator: (value: string) => boolean;
599
+ } & {
600
+ key: "RATE_LIMIT_FAIL_CLOSED";
601
+ };
602
+ SAFE_FETCH_BLOCK_PRIVATE_IPS: {
603
+ description: string;
604
+ default: boolean;
605
+ } & {
606
+ type: "boolean";
607
+ validator: (value: string) => boolean;
608
+ } & {
609
+ key: "SAFE_FETCH_BLOCK_PRIVATE_IPS";
610
+ };
418
611
  };
419
612
 
420
613
  /**
@@ -427,9 +620,9 @@ declare const coreEnvSchema: {
427
620
  * ```
428
621
  */
429
622
  declare const registry: _spfn_core_env.EnvRegistry<{
430
- NODE_ENV: Omit<_spfn_core_env.EnvVarSchema<"production" | "local" | "development" | "test">, "key" | "type" | "validator"> & {
623
+ NODE_ENV: Omit<_spfn_core_env.EnvVarSchema<"production" | "local" | "development" | "staging" | "test">, "key" | "type" | "validator"> & {
431
624
  type: "enum";
432
- validator: (val: string) => "production" | "local" | "development" | "test";
625
+ validator: (val: string) => "production" | "local" | "development" | "staging" | "test";
433
626
  } & {
434
627
  key: "NODE_ENV";
435
628
  };
@@ -441,6 +634,7 @@ declare const registry: _spfn_core_env.EnvRegistry<{
441
634
  examples: string[];
442
635
  } & {
443
636
  type: "string";
637
+ validator: (value: string) => string;
444
638
  } & {
445
639
  key: "DATABASE_URL";
446
640
  };
@@ -452,6 +646,7 @@ declare const registry: _spfn_core_env.EnvRegistry<{
452
646
  examples: string[];
453
647
  } & {
454
648
  type: "string";
649
+ validator: (value: string) => string;
455
650
  } & {
456
651
  key: "DATABASE_WRITE_URL";
457
652
  };
@@ -463,6 +658,7 @@ declare const registry: _spfn_core_env.EnvRegistry<{
463
658
  examples: string[];
464
659
  } & {
465
660
  type: "string";
661
+ validator: (value: string) => string;
466
662
  } & {
467
663
  key: "DATABASE_READ_URL";
468
664
  };
@@ -476,6 +672,16 @@ declare const registry: _spfn_core_env.EnvRegistry<{
476
672
  } & {
477
673
  key: "DB_POOL_MAX";
478
674
  };
675
+ DB_POOL_READ_MAX: {
676
+ description: string;
677
+ required: boolean;
678
+ examples: number[];
679
+ } & {
680
+ type: "number";
681
+ validator: (value: string) => number;
682
+ } & {
683
+ key: "DB_POOL_READ_MAX";
684
+ };
479
685
  DB_POOL_IDLE_TIMEOUT: {
480
686
  description: string;
481
687
  default: number;
@@ -616,6 +822,26 @@ declare const registry: _spfn_core_env.EnvRegistry<{
616
822
  } & {
617
823
  key: "TRANSACTION_TIMEOUT";
618
824
  };
825
+ TRANSACTION_IDLE_TIMEOUT: {
826
+ description: string;
827
+ default: number;
828
+ examples: number[];
829
+ } & {
830
+ type: "number";
831
+ validator: (value: string) => number;
832
+ } & {
833
+ key: "TRANSACTION_IDLE_TIMEOUT";
834
+ };
835
+ JOB_POLLING_INTERVAL_SECONDS: {
836
+ description: string;
837
+ default: number;
838
+ examples: number[];
839
+ } & {
840
+ type: "number";
841
+ validator: (value: string) => number;
842
+ } & {
843
+ key: "JOB_POLLING_INTERVAL_SECONDS";
844
+ };
619
845
  DB_DEBUG_TRACE: {
620
846
  description: string;
621
847
  default: boolean;
@@ -633,6 +859,7 @@ declare const registry: _spfn_core_env.EnvRegistry<{
633
859
  examples: string[];
634
860
  } & {
635
861
  type: "string";
862
+ validator: (value: string) => string;
636
863
  } & {
637
864
  key: "DRIZZLE_SCHEMA_PATH";
638
865
  };
@@ -643,6 +870,7 @@ declare const registry: _spfn_core_env.EnvRegistry<{
643
870
  examples: string[];
644
871
  } & {
645
872
  type: "string";
873
+ validator: (value: string) => string;
646
874
  } & {
647
875
  key: "DRIZZLE_OUT_DIR";
648
876
  };
@@ -660,6 +888,7 @@ declare const registry: _spfn_core_env.EnvRegistry<{
660
888
  examples: string[];
661
889
  } & {
662
890
  type: "string";
891
+ validator: (value: string) => string;
663
892
  } & {
664
893
  key: "CACHE_URL";
665
894
  };
@@ -671,6 +900,7 @@ declare const registry: _spfn_core_env.EnvRegistry<{
671
900
  examples: string[];
672
901
  } & {
673
902
  type: "string";
903
+ validator: (value: string) => string;
674
904
  } & {
675
905
  key: "CACHE_WRITE_URL";
676
906
  };
@@ -682,6 +912,7 @@ declare const registry: _spfn_core_env.EnvRegistry<{
682
912
  examples: string[];
683
913
  } & {
684
914
  type: "string";
915
+ validator: (value: string) => string;
685
916
  } & {
686
917
  key: "CACHE_READ_URL";
687
918
  };
@@ -691,6 +922,7 @@ declare const registry: _spfn_core_env.EnvRegistry<{
691
922
  examples: string[];
692
923
  } & {
693
924
  type: "string";
925
+ validator: (value: string) => string;
694
926
  } & {
695
927
  key: "CACHE_SENTINEL_HOSTS";
696
928
  };
@@ -700,6 +932,7 @@ declare const registry: _spfn_core_env.EnvRegistry<{
700
932
  examples: string[];
701
933
  } & {
702
934
  type: "string";
935
+ validator: (value: string) => string;
703
936
  } & {
704
937
  key: "CACHE_CLUSTER_NODES";
705
938
  };
@@ -709,6 +942,7 @@ declare const registry: _spfn_core_env.EnvRegistry<{
709
942
  examples: string[];
710
943
  } & {
711
944
  type: "string";
945
+ validator: (value: string) => string;
712
946
  } & {
713
947
  key: "CACHE_MASTER_NAME";
714
948
  };
@@ -719,6 +953,7 @@ declare const registry: _spfn_core_env.EnvRegistry<{
719
953
  examples: string[];
720
954
  } & {
721
955
  type: "string";
956
+ validator: (value: string) => string;
722
957
  } & {
723
958
  key: "CACHE_PASSWORD";
724
959
  };
@@ -732,6 +967,36 @@ declare const registry: _spfn_core_env.EnvRegistry<{
732
967
  } & {
733
968
  key: "CACHE_TLS_REJECT_UNAUTHORIZED";
734
969
  };
970
+ CACHE_MAX_RETRIES_PER_REQUEST: {
971
+ description: string;
972
+ default: number;
973
+ examples: number[];
974
+ } & {
975
+ type: "number";
976
+ validator: (value: string) => number;
977
+ } & {
978
+ key: "CACHE_MAX_RETRIES_PER_REQUEST";
979
+ };
980
+ CACHE_ENABLE_OFFLINE_QUEUE: {
981
+ description: string;
982
+ default: boolean;
983
+ examples: boolean[];
984
+ } & {
985
+ type: "boolean";
986
+ validator: (value: string) => boolean;
987
+ } & {
988
+ key: "CACHE_ENABLE_OFFLINE_QUEUE";
989
+ };
990
+ DB_MAX_ROWS: {
991
+ description: string;
992
+ default: number;
993
+ examples: number[];
994
+ } & {
995
+ type: "number";
996
+ validator: (value: string) => number;
997
+ } & {
998
+ key: "DB_MAX_ROWS";
999
+ };
735
1000
  PORT: {
736
1001
  description: string;
737
1002
  default: number;
@@ -749,6 +1014,7 @@ declare const registry: _spfn_core_env.EnvRegistry<{
749
1014
  examples: string[];
750
1015
  } & {
751
1016
  type: "string";
1017
+ validator: (value: string) => string;
752
1018
  } & {
753
1019
  key: "HOST";
754
1020
  };
@@ -792,6 +1058,36 @@ declare const registry: _spfn_core_env.EnvRegistry<{
792
1058
  } & {
793
1059
  key: "SHUTDOWN_TIMEOUT";
794
1060
  };
1061
+ FETCH_CONNECT_TIMEOUT: {
1062
+ description: string;
1063
+ default: number;
1064
+ examples: number[];
1065
+ } & {
1066
+ type: "number";
1067
+ validator: (value: string) => number;
1068
+ } & {
1069
+ key: "FETCH_CONNECT_TIMEOUT";
1070
+ };
1071
+ FETCH_HEADERS_TIMEOUT: {
1072
+ description: string;
1073
+ default: number;
1074
+ examples: number[];
1075
+ } & {
1076
+ type: "number";
1077
+ validator: (value: string) => number;
1078
+ } & {
1079
+ key: "FETCH_HEADERS_TIMEOUT";
1080
+ };
1081
+ FETCH_BODY_TIMEOUT: {
1082
+ description: string;
1083
+ default: number;
1084
+ examples: number[];
1085
+ } & {
1086
+ type: "number";
1087
+ validator: (value: string) => number;
1088
+ } & {
1089
+ key: "FETCH_BODY_TIMEOUT";
1090
+ };
795
1091
  SPFN_API_URL: {
796
1092
  description: string;
797
1093
  required: boolean;
@@ -822,14 +1118,104 @@ declare const registry: _spfn_core_env.EnvRegistry<{
822
1118
  } & {
823
1119
  key: "SPFN_APP_URL";
824
1120
  };
1121
+ RPC_PROXY_TIMEOUT: {
1122
+ description: string;
1123
+ default: number;
1124
+ nextjs: boolean;
1125
+ examples: number[];
1126
+ } & {
1127
+ type: "number";
1128
+ validator: (value: string) => number;
1129
+ } & {
1130
+ key: "RPC_PROXY_TIMEOUT";
1131
+ };
1132
+ SPFN_PROXY_SECRET: {
1133
+ description: string;
1134
+ required: boolean;
1135
+ sensitive: boolean;
1136
+ nextjs: boolean;
1137
+ examples: string[];
1138
+ } & {
1139
+ type: "string";
1140
+ validator: (value: string) => string;
1141
+ } & {
1142
+ key: "SPFN_PROXY_SECRET";
1143
+ };
1144
+ SPFN_PROXY_SECRET_PREVIOUS: {
1145
+ description: string;
1146
+ required: boolean;
1147
+ sensitive: boolean;
1148
+ nextjs: boolean;
1149
+ examples: string[];
1150
+ } & {
1151
+ type: "string";
1152
+ validator: (value: string) => string;
1153
+ } & {
1154
+ key: "SPFN_PROXY_SECRET_PREVIOUS";
1155
+ };
1156
+ TRUSTED_PROXY_HOPS: {
1157
+ description: string;
1158
+ default: number;
1159
+ nextjs: boolean;
1160
+ examples: number[];
1161
+ } & {
1162
+ type: "number";
1163
+ validator: (value: string) => number;
1164
+ } & {
1165
+ key: "TRUSTED_PROXY_HOPS";
1166
+ };
1167
+ RATE_LIMIT_MODE: Omit<_spfn_core_env.EnvVarSchema<"off" | "on">, "key" | "type" | "validator"> & {
1168
+ type: "enum";
1169
+ validator: (val: string) => "off" | "on";
1170
+ } & {
1171
+ key: "RATE_LIMIT_MODE";
1172
+ };
1173
+ RATE_LIMIT_DEFAULT_LIMIT: {
1174
+ description: string;
1175
+ default: number;
1176
+ examples: number[];
1177
+ } & {
1178
+ type: "number";
1179
+ validator: (value: string) => number;
1180
+ } & {
1181
+ key: "RATE_LIMIT_DEFAULT_LIMIT";
1182
+ };
1183
+ RATE_LIMIT_DEFAULT_WINDOW_MS: {
1184
+ description: string;
1185
+ default: number;
1186
+ examples: number[];
1187
+ } & {
1188
+ type: "number";
1189
+ validator: (value: string) => number;
1190
+ } & {
1191
+ key: "RATE_LIMIT_DEFAULT_WINDOW_MS";
1192
+ };
1193
+ RATE_LIMIT_FAIL_CLOSED: {
1194
+ description: string;
1195
+ default: boolean;
1196
+ } & {
1197
+ type: "boolean";
1198
+ validator: (value: string) => boolean;
1199
+ } & {
1200
+ key: "RATE_LIMIT_FAIL_CLOSED";
1201
+ };
1202
+ SAFE_FETCH_BLOCK_PRIVATE_IPS: {
1203
+ description: string;
1204
+ default: boolean;
1205
+ } & {
1206
+ type: "boolean";
1207
+ validator: (value: string) => boolean;
1208
+ } & {
1209
+ key: "SAFE_FETCH_BLOCK_PRIVATE_IPS";
1210
+ };
825
1211
  }>;
826
1212
  /**
827
1213
  * Validated environment configuration
828
1214
  */
829
1215
  declare const env: _spfn_core_env.InferEnvType<{
830
- NODE_ENV: Omit<_spfn_core_env.EnvVarSchema<"production" | "local" | "development" | "test">, "key" | "type" | "validator"> & {
1216
+ NODE_ENV: Omit<_spfn_core_env.EnvVarSchema<"production" | "local" | "development" | "staging" | "test">, "key" | "type" | "validator"> & {
831
1217
  type: "enum";
832
- validator: (val: string) => "production" | "local" | "development" | "test";
1218
+ validator: (val: string) => "production" | "local" | "development" | "staging" | "test";
833
1219
  } & {
834
1220
  key: "NODE_ENV";
835
1221
  };
@@ -841,6 +1227,7 @@ declare const env: _spfn_core_env.InferEnvType<{
841
1227
  examples: string[];
842
1228
  } & {
843
1229
  type: "string";
1230
+ validator: (value: string) => string;
844
1231
  } & {
845
1232
  key: "DATABASE_URL";
846
1233
  };
@@ -852,6 +1239,7 @@ declare const env: _spfn_core_env.InferEnvType<{
852
1239
  examples: string[];
853
1240
  } & {
854
1241
  type: "string";
1242
+ validator: (value: string) => string;
855
1243
  } & {
856
1244
  key: "DATABASE_WRITE_URL";
857
1245
  };
@@ -863,6 +1251,7 @@ declare const env: _spfn_core_env.InferEnvType<{
863
1251
  examples: string[];
864
1252
  } & {
865
1253
  type: "string";
1254
+ validator: (value: string) => string;
866
1255
  } & {
867
1256
  key: "DATABASE_READ_URL";
868
1257
  };
@@ -876,6 +1265,16 @@ declare const env: _spfn_core_env.InferEnvType<{
876
1265
  } & {
877
1266
  key: "DB_POOL_MAX";
878
1267
  };
1268
+ DB_POOL_READ_MAX: {
1269
+ description: string;
1270
+ required: boolean;
1271
+ examples: number[];
1272
+ } & {
1273
+ type: "number";
1274
+ validator: (value: string) => number;
1275
+ } & {
1276
+ key: "DB_POOL_READ_MAX";
1277
+ };
879
1278
  DB_POOL_IDLE_TIMEOUT: {
880
1279
  description: string;
881
1280
  default: number;
@@ -1016,6 +1415,26 @@ declare const env: _spfn_core_env.InferEnvType<{
1016
1415
  } & {
1017
1416
  key: "TRANSACTION_TIMEOUT";
1018
1417
  };
1418
+ TRANSACTION_IDLE_TIMEOUT: {
1419
+ description: string;
1420
+ default: number;
1421
+ examples: number[];
1422
+ } & {
1423
+ type: "number";
1424
+ validator: (value: string) => number;
1425
+ } & {
1426
+ key: "TRANSACTION_IDLE_TIMEOUT";
1427
+ };
1428
+ JOB_POLLING_INTERVAL_SECONDS: {
1429
+ description: string;
1430
+ default: number;
1431
+ examples: number[];
1432
+ } & {
1433
+ type: "number";
1434
+ validator: (value: string) => number;
1435
+ } & {
1436
+ key: "JOB_POLLING_INTERVAL_SECONDS";
1437
+ };
1019
1438
  DB_DEBUG_TRACE: {
1020
1439
  description: string;
1021
1440
  default: boolean;
@@ -1033,6 +1452,7 @@ declare const env: _spfn_core_env.InferEnvType<{
1033
1452
  examples: string[];
1034
1453
  } & {
1035
1454
  type: "string";
1455
+ validator: (value: string) => string;
1036
1456
  } & {
1037
1457
  key: "DRIZZLE_SCHEMA_PATH";
1038
1458
  };
@@ -1043,6 +1463,7 @@ declare const env: _spfn_core_env.InferEnvType<{
1043
1463
  examples: string[];
1044
1464
  } & {
1045
1465
  type: "string";
1466
+ validator: (value: string) => string;
1046
1467
  } & {
1047
1468
  key: "DRIZZLE_OUT_DIR";
1048
1469
  };
@@ -1060,6 +1481,7 @@ declare const env: _spfn_core_env.InferEnvType<{
1060
1481
  examples: string[];
1061
1482
  } & {
1062
1483
  type: "string";
1484
+ validator: (value: string) => string;
1063
1485
  } & {
1064
1486
  key: "CACHE_URL";
1065
1487
  };
@@ -1071,6 +1493,7 @@ declare const env: _spfn_core_env.InferEnvType<{
1071
1493
  examples: string[];
1072
1494
  } & {
1073
1495
  type: "string";
1496
+ validator: (value: string) => string;
1074
1497
  } & {
1075
1498
  key: "CACHE_WRITE_URL";
1076
1499
  };
@@ -1082,6 +1505,7 @@ declare const env: _spfn_core_env.InferEnvType<{
1082
1505
  examples: string[];
1083
1506
  } & {
1084
1507
  type: "string";
1508
+ validator: (value: string) => string;
1085
1509
  } & {
1086
1510
  key: "CACHE_READ_URL";
1087
1511
  };
@@ -1091,6 +1515,7 @@ declare const env: _spfn_core_env.InferEnvType<{
1091
1515
  examples: string[];
1092
1516
  } & {
1093
1517
  type: "string";
1518
+ validator: (value: string) => string;
1094
1519
  } & {
1095
1520
  key: "CACHE_SENTINEL_HOSTS";
1096
1521
  };
@@ -1100,6 +1525,7 @@ declare const env: _spfn_core_env.InferEnvType<{
1100
1525
  examples: string[];
1101
1526
  } & {
1102
1527
  type: "string";
1528
+ validator: (value: string) => string;
1103
1529
  } & {
1104
1530
  key: "CACHE_CLUSTER_NODES";
1105
1531
  };
@@ -1109,6 +1535,7 @@ declare const env: _spfn_core_env.InferEnvType<{
1109
1535
  examples: string[];
1110
1536
  } & {
1111
1537
  type: "string";
1538
+ validator: (value: string) => string;
1112
1539
  } & {
1113
1540
  key: "CACHE_MASTER_NAME";
1114
1541
  };
@@ -1119,6 +1546,7 @@ declare const env: _spfn_core_env.InferEnvType<{
1119
1546
  examples: string[];
1120
1547
  } & {
1121
1548
  type: "string";
1549
+ validator: (value: string) => string;
1122
1550
  } & {
1123
1551
  key: "CACHE_PASSWORD";
1124
1552
  };
@@ -1132,6 +1560,36 @@ declare const env: _spfn_core_env.InferEnvType<{
1132
1560
  } & {
1133
1561
  key: "CACHE_TLS_REJECT_UNAUTHORIZED";
1134
1562
  };
1563
+ CACHE_MAX_RETRIES_PER_REQUEST: {
1564
+ description: string;
1565
+ default: number;
1566
+ examples: number[];
1567
+ } & {
1568
+ type: "number";
1569
+ validator: (value: string) => number;
1570
+ } & {
1571
+ key: "CACHE_MAX_RETRIES_PER_REQUEST";
1572
+ };
1573
+ CACHE_ENABLE_OFFLINE_QUEUE: {
1574
+ description: string;
1575
+ default: boolean;
1576
+ examples: boolean[];
1577
+ } & {
1578
+ type: "boolean";
1579
+ validator: (value: string) => boolean;
1580
+ } & {
1581
+ key: "CACHE_ENABLE_OFFLINE_QUEUE";
1582
+ };
1583
+ DB_MAX_ROWS: {
1584
+ description: string;
1585
+ default: number;
1586
+ examples: number[];
1587
+ } & {
1588
+ type: "number";
1589
+ validator: (value: string) => number;
1590
+ } & {
1591
+ key: "DB_MAX_ROWS";
1592
+ };
1135
1593
  PORT: {
1136
1594
  description: string;
1137
1595
  default: number;
@@ -1149,6 +1607,7 @@ declare const env: _spfn_core_env.InferEnvType<{
1149
1607
  examples: string[];
1150
1608
  } & {
1151
1609
  type: "string";
1610
+ validator: (value: string) => string;
1152
1611
  } & {
1153
1612
  key: "HOST";
1154
1613
  };
@@ -1192,6 +1651,36 @@ declare const env: _spfn_core_env.InferEnvType<{
1192
1651
  } & {
1193
1652
  key: "SHUTDOWN_TIMEOUT";
1194
1653
  };
1654
+ FETCH_CONNECT_TIMEOUT: {
1655
+ description: string;
1656
+ default: number;
1657
+ examples: number[];
1658
+ } & {
1659
+ type: "number";
1660
+ validator: (value: string) => number;
1661
+ } & {
1662
+ key: "FETCH_CONNECT_TIMEOUT";
1663
+ };
1664
+ FETCH_HEADERS_TIMEOUT: {
1665
+ description: string;
1666
+ default: number;
1667
+ examples: number[];
1668
+ } & {
1669
+ type: "number";
1670
+ validator: (value: string) => number;
1671
+ } & {
1672
+ key: "FETCH_HEADERS_TIMEOUT";
1673
+ };
1674
+ FETCH_BODY_TIMEOUT: {
1675
+ description: string;
1676
+ default: number;
1677
+ examples: number[];
1678
+ } & {
1679
+ type: "number";
1680
+ validator: (value: string) => number;
1681
+ } & {
1682
+ key: "FETCH_BODY_TIMEOUT";
1683
+ };
1195
1684
  SPFN_API_URL: {
1196
1685
  description: string;
1197
1686
  required: boolean;
@@ -1222,6 +1711,96 @@ declare const env: _spfn_core_env.InferEnvType<{
1222
1711
  } & {
1223
1712
  key: "SPFN_APP_URL";
1224
1713
  };
1714
+ RPC_PROXY_TIMEOUT: {
1715
+ description: string;
1716
+ default: number;
1717
+ nextjs: boolean;
1718
+ examples: number[];
1719
+ } & {
1720
+ type: "number";
1721
+ validator: (value: string) => number;
1722
+ } & {
1723
+ key: "RPC_PROXY_TIMEOUT";
1724
+ };
1725
+ SPFN_PROXY_SECRET: {
1726
+ description: string;
1727
+ required: boolean;
1728
+ sensitive: boolean;
1729
+ nextjs: boolean;
1730
+ examples: string[];
1731
+ } & {
1732
+ type: "string";
1733
+ validator: (value: string) => string;
1734
+ } & {
1735
+ key: "SPFN_PROXY_SECRET";
1736
+ };
1737
+ SPFN_PROXY_SECRET_PREVIOUS: {
1738
+ description: string;
1739
+ required: boolean;
1740
+ sensitive: boolean;
1741
+ nextjs: boolean;
1742
+ examples: string[];
1743
+ } & {
1744
+ type: "string";
1745
+ validator: (value: string) => string;
1746
+ } & {
1747
+ key: "SPFN_PROXY_SECRET_PREVIOUS";
1748
+ };
1749
+ TRUSTED_PROXY_HOPS: {
1750
+ description: string;
1751
+ default: number;
1752
+ nextjs: boolean;
1753
+ examples: number[];
1754
+ } & {
1755
+ type: "number";
1756
+ validator: (value: string) => number;
1757
+ } & {
1758
+ key: "TRUSTED_PROXY_HOPS";
1759
+ };
1760
+ RATE_LIMIT_MODE: Omit<_spfn_core_env.EnvVarSchema<"off" | "on">, "key" | "type" | "validator"> & {
1761
+ type: "enum";
1762
+ validator: (val: string) => "off" | "on";
1763
+ } & {
1764
+ key: "RATE_LIMIT_MODE";
1765
+ };
1766
+ RATE_LIMIT_DEFAULT_LIMIT: {
1767
+ description: string;
1768
+ default: number;
1769
+ examples: number[];
1770
+ } & {
1771
+ type: "number";
1772
+ validator: (value: string) => number;
1773
+ } & {
1774
+ key: "RATE_LIMIT_DEFAULT_LIMIT";
1775
+ };
1776
+ RATE_LIMIT_DEFAULT_WINDOW_MS: {
1777
+ description: string;
1778
+ default: number;
1779
+ examples: number[];
1780
+ } & {
1781
+ type: "number";
1782
+ validator: (value: string) => number;
1783
+ } & {
1784
+ key: "RATE_LIMIT_DEFAULT_WINDOW_MS";
1785
+ };
1786
+ RATE_LIMIT_FAIL_CLOSED: {
1787
+ description: string;
1788
+ default: boolean;
1789
+ } & {
1790
+ type: "boolean";
1791
+ validator: (value: string) => boolean;
1792
+ } & {
1793
+ key: "RATE_LIMIT_FAIL_CLOSED";
1794
+ };
1795
+ SAFE_FETCH_BLOCK_PRIVATE_IPS: {
1796
+ description: string;
1797
+ default: boolean;
1798
+ } & {
1799
+ type: "boolean";
1800
+ validator: (value: string) => boolean;
1801
+ } & {
1802
+ key: "SAFE_FETCH_BLOCK_PRIVATE_IPS";
1803
+ };
1225
1804
  }>;
1226
1805
 
1227
1806
  export { env, coreEnvSchema as envSchema, registry };