miniflare 0.0.0-dfacbd46a → 0.0.0-dfea523ea

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.
@@ -23,6 +23,7 @@ import { Json as Json_2 } from '..';
23
23
  import { kCurrentWorker as kCurrentWorker_2 } from '..';
24
24
  import { kUnsafeEphemeralUniqueKey as kUnsafeEphemeralUniqueKey_2 } from './shared';
25
25
  import type { KVNamespace } from '@cloudflare/workers-types/experimental';
26
+ import type { KVNamespaceListKey } from '@cloudflare/workers-types/experimental';
26
27
  import { Log as Log_2 } from '..';
27
28
  import { Miniflare as Miniflare_2 } from '../..';
28
29
  import { Miniflare as Miniflare_3 } from '..';
@@ -488,6 +489,8 @@ export declare const CoreBindings: {
488
489
  readonly DURABLE_OBJECT_NAMESPACE_PROXY: "MINIFLARE_PROXY";
489
490
  readonly DATA_PROXY_SECRET: "MINIFLARE_PROXY_SECRET";
490
491
  readonly DATA_PROXY_SHARED_SECRET: "MINIFLARE_PROXY_SHARED_SECRET";
492
+ readonly TRIGGER_HANDLERS: "TRIGGER_HANDLERS";
493
+ readonly LOG_REQUESTS: "LOG_REQUESTS";
491
494
  };
492
495
 
493
496
  export declare const CoreHeaders: {
@@ -1509,7 +1512,10 @@ export declare const CoreSharedOptionsSchema: z.ZodObject<{
1509
1512
  unsafeProxySharedSecret: z.ZodOptional<z.ZodString>;
1510
1513
  unsafeModuleFallbackService: z.ZodOptional<z.ZodType<(request: Request_3, mf: Miniflare_2) => Awaitable<Response_3>, z.ZodTypeDef, (request: Request_3, mf: Miniflare_2) => Awaitable<Response_3>>>;
1511
1514
  unsafeStickyBlobs: z.ZodOptional<z.ZodBoolean>;
1515
+ unsafeTriggerHandlers: z.ZodOptional<z.ZodBoolean>;
1516
+ logRequests: z.ZodDefault<z.ZodBoolean>;
1512
1517
  }, "strip", z.ZodTypeAny, {
1518
+ logRequests: boolean;
1513
1519
  rootPath?: undefined;
1514
1520
  host?: string | undefined;
1515
1521
  port?: number | undefined;
@@ -1528,6 +1534,7 @@ export declare const CoreSharedOptionsSchema: z.ZodObject<{
1528
1534
  unsafeProxySharedSecret?: string | undefined;
1529
1535
  unsafeModuleFallbackService?: ((request: Request_3, mf: Miniflare_2) => Awaitable<Response_3>) | undefined;
1530
1536
  unsafeStickyBlobs?: boolean | undefined;
1537
+ unsafeTriggerHandlers?: boolean | undefined;
1531
1538
  }, {
1532
1539
  rootPath?: string | undefined;
1533
1540
  host?: string | undefined;
@@ -1547,6 +1554,8 @@ export declare const CoreSharedOptionsSchema: z.ZodObject<{
1547
1554
  unsafeProxySharedSecret?: string | undefined;
1548
1555
  unsafeModuleFallbackService?: ((request: Request_3, mf: Miniflare_2) => Awaitable<Response_3>) | undefined;
1549
1556
  unsafeStickyBlobs?: boolean | undefined;
1557
+ unsafeTriggerHandlers?: boolean | undefined;
1558
+ logRequests?: boolean | undefined;
1550
1559
  }>;
1551
1560
 
1552
1561
  export declare function coupleWebSocket(ws: NodeWebSocket, pair: WebSocket): Promise<void>;
@@ -1695,6 +1704,84 @@ export declare const DurableObjectsSharedOptionsSchema: z.ZodObject<{
1695
1704
  durableObjectsPersist?: string | boolean | undefined;
1696
1705
  }>;
1697
1706
 
1707
+ export declare const EMAIL_PLUGIN: Plugin<typeof EmailOptionsSchema>;
1708
+
1709
+ export declare const EMAIL_PLUGIN_NAME = "email";
1710
+
1711
+ export declare const EmailOptionsSchema: z.ZodObject<{
1712
+ email: z.ZodOptional<z.ZodObject<{
1713
+ send_email: z.ZodOptional<z.ZodArray<z.ZodIntersection<z.ZodObject<{
1714
+ name: z.ZodString;
1715
+ }, "strip", z.ZodTypeAny, {
1716
+ name: string;
1717
+ }, {
1718
+ name: string;
1719
+ }>, z.ZodUnion<[z.ZodObject<{
1720
+ destination_address: z.ZodOptional<z.ZodString>;
1721
+ allowed_destination_addresses: z.ZodOptional<z.ZodNever>;
1722
+ }, "strip", z.ZodTypeAny, {
1723
+ destination_address?: string | undefined;
1724
+ allowed_destination_addresses?: undefined;
1725
+ }, {
1726
+ destination_address?: string | undefined;
1727
+ allowed_destination_addresses?: undefined;
1728
+ }>, z.ZodObject<{
1729
+ allowed_destination_addresses: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1730
+ destination_address: z.ZodOptional<z.ZodNever>;
1731
+ }, "strip", z.ZodTypeAny, {
1732
+ allowed_destination_addresses?: string[] | undefined;
1733
+ destination_address?: undefined;
1734
+ }, {
1735
+ allowed_destination_addresses?: string[] | undefined;
1736
+ destination_address?: undefined;
1737
+ }>]>>, "many">>;
1738
+ }, "strip", z.ZodTypeAny, {
1739
+ send_email?: ({
1740
+ name: string;
1741
+ } & ({
1742
+ destination_address?: string | undefined;
1743
+ allowed_destination_addresses?: undefined;
1744
+ } | {
1745
+ allowed_destination_addresses?: string[] | undefined;
1746
+ destination_address?: undefined;
1747
+ }))[] | undefined;
1748
+ }, {
1749
+ send_email?: ({
1750
+ name: string;
1751
+ } & ({
1752
+ destination_address?: string | undefined;
1753
+ allowed_destination_addresses?: undefined;
1754
+ } | {
1755
+ allowed_destination_addresses?: string[] | undefined;
1756
+ destination_address?: undefined;
1757
+ }))[] | undefined;
1758
+ }>>;
1759
+ }, "strip", z.ZodTypeAny, {
1760
+ email?: {
1761
+ send_email?: ({
1762
+ name: string;
1763
+ } & ({
1764
+ destination_address?: string | undefined;
1765
+ allowed_destination_addresses?: undefined;
1766
+ } | {
1767
+ allowed_destination_addresses?: string[] | undefined;
1768
+ destination_address?: undefined;
1769
+ }))[] | undefined;
1770
+ } | undefined;
1771
+ }, {
1772
+ email?: {
1773
+ send_email?: ({
1774
+ name: string;
1775
+ } & ({
1776
+ destination_address?: string | undefined;
1777
+ allowed_destination_addresses?: undefined;
1778
+ } | {
1779
+ allowed_destination_addresses?: string[] | undefined;
1780
+ destination_address?: undefined;
1781
+ }))[] | undefined;
1782
+ } | undefined;
1783
+ }>;
1784
+
1698
1785
  /* Excluded from this release type: _enableControlEndpoints */
1699
1786
 
1700
1787
  export declare function encodeSitesKey(key: string): string;
@@ -1918,6 +2005,7 @@ export declare const KVLimits: {
1918
2005
  readonly MAX_VALUE_SIZE: number;
1919
2006
  readonly MAX_VALUE_SIZE_TEST: 1024;
1920
2007
  readonly MAX_METADATA_SIZE: 1024;
2008
+ readonly MAX_BULK_SIZE: number;
1921
2009
  };
1922
2010
 
1923
2011
  export declare const kVoid: unique symbol;
@@ -2043,6 +2131,17 @@ export declare class Miniflare {
2043
2131
  getD1Database(bindingName: string, workerName?: string): Promise<D1Database>;
2044
2132
  getDurableObjectNamespace(bindingName: string, workerName?: string): Promise<ReplaceWorkersTypes<DurableObjectNamespace>>;
2045
2133
  getKVNamespace(bindingName: string, workerName?: string): Promise<ReplaceWorkersTypes<KVNamespace>>;
2134
+ getSecretsStoreSecretAPI(bindingName: string, workerName?: string): Promise<() => {
2135
+ create: (value: string) => Promise<string>;
2136
+ update: (value: string, id: string) => Promise<string>;
2137
+ duplicate: (id: string, newName: string) => Promise<string>;
2138
+ delete: (id: string) => Promise<void>;
2139
+ list: () => Promise<KVNamespaceListKey<{
2140
+ uuid: string;
2141
+ }, string>[]>;
2142
+ get: (id: string) => Promise<string>;
2143
+ }>;
2144
+ getSecretsStoreSecret(bindingName: string, workerName?: string): Promise<ReplaceWorkersTypes<KVNamespace>>;
2046
2145
  getQueueProducer<Body = unknown>(bindingName: string, workerName?: string): Promise<Queue<Body>>;
2047
2146
  getR2Bucket(bindingName: string, workerName?: string): Promise<ReplaceWorkersTypes<R2Bucket>>;
2048
2147
  /* Excluded from this release type: _getInternalDurableObjectNamespace */
@@ -3361,7 +3460,10 @@ export declare const PLUGINS: {
3361
3460
  unsafeProxySharedSecret: z.ZodOptional<z.ZodString>;
3362
3461
  unsafeModuleFallbackService: z.ZodOptional<z.ZodType<(request: Request_6, mf: Miniflare_3) => Awaitable_2<Response_6>, z.ZodTypeDef, (request: Request_6, mf: Miniflare_3) => Awaitable_2<Response_6>>>;
3363
3462
  unsafeStickyBlobs: z.ZodOptional<z.ZodBoolean>;
3463
+ unsafeTriggerHandlers: z.ZodOptional<z.ZodBoolean>;
3464
+ logRequests: z.ZodDefault<z.ZodBoolean>;
3364
3465
  }, "strip", z.ZodTypeAny, {
3466
+ logRequests: boolean;
3365
3467
  rootPath?: undefined;
3366
3468
  host?: string | undefined;
3367
3469
  port?: number | undefined;
@@ -3380,6 +3482,7 @@ export declare const PLUGINS: {
3380
3482
  unsafeProxySharedSecret?: string | undefined;
3381
3483
  unsafeModuleFallbackService?: ((request: Request_6, mf: Miniflare_3) => Awaitable_2<Response_6>) | undefined;
3382
3484
  unsafeStickyBlobs?: boolean | undefined;
3485
+ unsafeTriggerHandlers?: boolean | undefined;
3383
3486
  }, {
3384
3487
  rootPath?: string | undefined;
3385
3488
  host?: string | undefined;
@@ -3399,6 +3502,8 @@ export declare const PLUGINS: {
3399
3502
  unsafeProxySharedSecret?: string | undefined;
3400
3503
  unsafeModuleFallbackService?: ((request: Request_6, mf: Miniflare_3) => Awaitable_2<Response_6>) | undefined;
3401
3504
  unsafeStickyBlobs?: boolean | undefined;
3505
+ unsafeTriggerHandlers?: boolean | undefined;
3506
+ logRequests?: boolean | undefined;
3402
3507
  }>>;
3403
3508
  cache: Plugin_2<z.ZodObject<{
3404
3509
  cache: z.ZodOptional<z.ZodBoolean>;
@@ -3968,6 +4073,107 @@ export declare const PLUGINS: {
3968
4073
  }, {
3969
4074
  pipelines?: string[] | Record<string, string> | undefined;
3970
4075
  }>>;
4076
+ "secrets-store": Plugin_2<z.ZodObject<{
4077
+ secretsStoreSecrets: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
4078
+ store_id: z.ZodString;
4079
+ secret_name: z.ZodString;
4080
+ }, "strip", z.ZodTypeAny, {
4081
+ store_id: string;
4082
+ secret_name: string;
4083
+ }, {
4084
+ store_id: string;
4085
+ secret_name: string;
4086
+ }>>>;
4087
+ }, "strip", z.ZodTypeAny, {
4088
+ secretsStoreSecrets?: Record<string, {
4089
+ store_id: string;
4090
+ secret_name: string;
4091
+ }> | undefined;
4092
+ }, {
4093
+ secretsStoreSecrets?: Record<string, {
4094
+ store_id: string;
4095
+ secret_name: string;
4096
+ }> | undefined;
4097
+ }>, z.ZodObject<{
4098
+ secretsStorePersist: z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodString, z.ZodEffects<z.ZodString, string, string>]>>;
4099
+ }, "strip", z.ZodTypeAny, {
4100
+ secretsStorePersist?: string | boolean | undefined;
4101
+ }, {
4102
+ secretsStorePersist?: string | boolean | undefined;
4103
+ }>>;
4104
+ email: Plugin_2<z.ZodObject<{
4105
+ email: z.ZodOptional<z.ZodObject<{
4106
+ send_email: z.ZodOptional<z.ZodArray<z.ZodIntersection<z.ZodObject<{
4107
+ name: z.ZodString;
4108
+ }, "strip", z.ZodTypeAny, {
4109
+ name: string;
4110
+ }, {
4111
+ name: string;
4112
+ }>, z.ZodUnion<[z.ZodObject<{
4113
+ destination_address: z.ZodOptional<z.ZodString>;
4114
+ allowed_destination_addresses: z.ZodOptional<z.ZodNever>;
4115
+ }, "strip", z.ZodTypeAny, {
4116
+ destination_address?: string | undefined;
4117
+ allowed_destination_addresses?: undefined;
4118
+ }, {
4119
+ destination_address?: string | undefined;
4120
+ allowed_destination_addresses?: undefined;
4121
+ }>, z.ZodObject<{
4122
+ allowed_destination_addresses: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
4123
+ destination_address: z.ZodOptional<z.ZodNever>;
4124
+ }, "strip", z.ZodTypeAny, {
4125
+ allowed_destination_addresses?: string[] | undefined;
4126
+ destination_address?: undefined;
4127
+ }, {
4128
+ allowed_destination_addresses?: string[] | undefined;
4129
+ destination_address?: undefined;
4130
+ }>]>>, "many">>;
4131
+ }, "strip", z.ZodTypeAny, {
4132
+ send_email?: ({
4133
+ name: string;
4134
+ } & ({
4135
+ destination_address?: string | undefined;
4136
+ allowed_destination_addresses?: undefined;
4137
+ } | {
4138
+ allowed_destination_addresses?: string[] | undefined;
4139
+ destination_address?: undefined;
4140
+ }))[] | undefined;
4141
+ }, {
4142
+ send_email?: ({
4143
+ name: string;
4144
+ } & ({
4145
+ destination_address?: string | undefined;
4146
+ allowed_destination_addresses?: undefined;
4147
+ } | {
4148
+ allowed_destination_addresses?: string[] | undefined;
4149
+ destination_address?: undefined;
4150
+ }))[] | undefined;
4151
+ }>>;
4152
+ }, "strip", z.ZodTypeAny, {
4153
+ email?: {
4154
+ send_email?: ({
4155
+ name: string;
4156
+ } & ({
4157
+ destination_address?: string | undefined;
4158
+ allowed_destination_addresses?: undefined;
4159
+ } | {
4160
+ allowed_destination_addresses?: string[] | undefined;
4161
+ destination_address?: undefined;
4162
+ }))[] | undefined;
4163
+ } | undefined;
4164
+ }, {
4165
+ email?: {
4166
+ send_email?: ({
4167
+ name: string;
4168
+ } & ({
4169
+ destination_address?: string | undefined;
4170
+ allowed_destination_addresses?: undefined;
4171
+ } | {
4172
+ allowed_destination_addresses?: string[] | undefined;
4173
+ destination_address?: undefined;
4174
+ }))[] | undefined;
4175
+ } | undefined;
4176
+ }>>;
3971
4177
  };
3972
4178
 
3973
4179
  export declare type Plugins = typeof PLUGINS;
@@ -4536,6 +4742,41 @@ export declare interface RuntimeOptions {
4536
4742
 
4537
4743
  export declare function sanitisePath(unsafe: string): string;
4538
4744
 
4745
+ export declare const SECRET_STORE_PLUGIN: Plugin<typeof SecretsStoreSecretsOptionsSchema, typeof SecretsStoreSecretsSharedOptionsSchema>;
4746
+
4747
+ export declare const SECRET_STORE_PLUGIN_NAME = "secrets-store";
4748
+
4749
+ export declare const SecretsStoreSecretsOptionsSchema: z.ZodObject<{
4750
+ secretsStoreSecrets: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
4751
+ store_id: z.ZodString;
4752
+ secret_name: z.ZodString;
4753
+ }, "strip", z.ZodTypeAny, {
4754
+ store_id: string;
4755
+ secret_name: string;
4756
+ }, {
4757
+ store_id: string;
4758
+ secret_name: string;
4759
+ }>>>;
4760
+ }, "strip", z.ZodTypeAny, {
4761
+ secretsStoreSecrets?: Record<string, {
4762
+ store_id: string;
4763
+ secret_name: string;
4764
+ }> | undefined;
4765
+ }, {
4766
+ secretsStoreSecrets?: Record<string, {
4767
+ store_id: string;
4768
+ secret_name: string;
4769
+ }> | undefined;
4770
+ }>;
4771
+
4772
+ export declare const SecretsStoreSecretsSharedOptionsSchema: z.ZodObject<{
4773
+ secretsStorePersist: z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodString, z.ZodEffects<z.ZodString, string, string>]>>;
4774
+ }, "strip", z.ZodTypeAny, {
4775
+ secretsStorePersist?: string | boolean | undefined;
4776
+ }, {
4777
+ secretsStorePersist?: string | boolean | undefined;
4778
+ }>;
4779
+
4539
4780
  export declare interface SerialisableMatcherRegExps {
4540
4781
  include: string[];
4541
4782
  exclude: string[];
@@ -4591,7 +4832,7 @@ export declare const SharedHeaders: {
4591
4832
  readonly LOG_LEVEL: "MF-Log-Level";
4592
4833
  };
4593
4834
 
4594
- export declare type SharedOptions = z.input<typeof CORE_PLUGIN.sharedOptions> & z.input<typeof CACHE_PLUGIN.sharedOptions> & z.input<typeof D1_PLUGIN.sharedOptions> & z.input<typeof DURABLE_OBJECTS_PLUGIN.sharedOptions> & z.input<typeof KV_PLUGIN.sharedOptions> & z.input<typeof R2_PLUGIN.sharedOptions> & z.input<typeof WORKFLOWS_PLUGIN.sharedOptions>;
4835
+ export declare type SharedOptions = z.input<typeof CORE_PLUGIN.sharedOptions> & z.input<typeof CACHE_PLUGIN.sharedOptions> & z.input<typeof D1_PLUGIN.sharedOptions> & z.input<typeof DURABLE_OBJECTS_PLUGIN.sharedOptions> & z.input<typeof KV_PLUGIN.sharedOptions> & z.input<typeof R2_PLUGIN.sharedOptions> & z.input<typeof WORKFLOWS_PLUGIN.sharedOptions> & z.input<typeof SECRET_STORE_PLUGIN.sharedOptions>;
4595
4836
 
4596
4837
  export declare const SiteBindings: {
4597
4838
  readonly KV_NAMESPACE_SITE: "__STATIC_CONTENT";
@@ -5040,7 +5281,7 @@ export declare type Worker_Module = {
5040
5281
  pythonRequirement?: string;
5041
5282
  });
5042
5283
 
5043
- export declare type WorkerOptions = z.input<typeof CORE_PLUGIN.options> & z.input<typeof CACHE_PLUGIN.options> & z.input<typeof D1_PLUGIN.options> & z.input<typeof DURABLE_OBJECTS_PLUGIN.options> & z.input<typeof KV_PLUGIN.options> & z.input<typeof QUEUES_PLUGIN.options> & z.input<typeof R2_PLUGIN.options> & z.input<typeof HYPERDRIVE_PLUGIN.options> & z.input<typeof RATELIMIT_PLUGIN.options> & z.input<typeof ASSETS_PLUGIN.options> & z.input<typeof WORKFLOWS_PLUGIN.options> & z.input<typeof PIPELINE_PLUGIN.options>;
5284
+ export declare type WorkerOptions = z.input<typeof CORE_PLUGIN.options> & z.input<typeof CACHE_PLUGIN.options> & z.input<typeof D1_PLUGIN.options> & z.input<typeof DURABLE_OBJECTS_PLUGIN.options> & z.input<typeof KV_PLUGIN.options> & z.input<typeof QUEUES_PLUGIN.options> & z.input<typeof R2_PLUGIN.options> & z.input<typeof HYPERDRIVE_PLUGIN.options> & z.input<typeof RATELIMIT_PLUGIN.options> & z.input<typeof EMAIL_PLUGIN.options> & z.input<typeof ASSETS_PLUGIN.options> & z.input<typeof WORKFLOWS_PLUGIN.options> & z.input<typeof PIPELINE_PLUGIN.options> & z.input<typeof SECRET_STORE_PLUGIN.options>;
5044
5285
 
5045
5286
  export declare interface WorkerRoute {
5046
5287
  target: string;