localflare-core 0.2.0-beta.0 → 0.2.0-beta.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.
Files changed (2) hide show
  1. package/dist/index.d.ts +43 -1
  2. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -15,6 +15,7 @@ interface D1DatabaseConfig {
15
15
  database_name: string;
16
16
  database_id: string;
17
17
  migrations_dir?: string;
18
+ preview_database_id?: string;
18
19
  }
19
20
  interface KVNamespaceConfig {
20
21
  binding: string;
@@ -25,6 +26,8 @@ interface R2BucketConfig {
25
26
  binding: string;
26
27
  bucket_name: string;
27
28
  preview_bucket_name?: string;
29
+ remote?: boolean;
30
+ jurisdiction?: string;
28
31
  }
29
32
  interface DurableObjectsConfig {
30
33
  bindings?: DurableObjectBinding[];
@@ -41,6 +44,7 @@ interface QueuesConfig {
41
44
  interface QueueProducerConfig {
42
45
  binding: string;
43
46
  queue: string;
47
+ delivery_delay?: number;
44
48
  }
45
49
  interface QueueConsumerConfig {
46
50
  queue: string;
@@ -48,6 +52,8 @@ interface QueueConsumerConfig {
48
52
  max_batch_timeout?: number;
49
53
  max_retries?: number;
50
54
  dead_letter_queue?: string;
55
+ max_concurrency?: number;
56
+ retry_delay?: number;
51
57
  }
52
58
  interface DiscoveredBindings {
53
59
  d1: D1DatabaseConfig[];
@@ -65,6 +71,42 @@ interface BindingInfo {
65
71
  name: string;
66
72
  details: Record<string, unknown>;
67
73
  }
74
+ /**
75
+ * Manifest passed to the Localflare API worker via environment variable.
76
+ * Contains binding information discovered from user's wrangler.toml.
77
+ * Used by both CLI (to generate) and API (to consume).
78
+ */
79
+ interface LocalflareManifest {
80
+ name: string;
81
+ d1: {
82
+ binding: string;
83
+ database_name: string;
84
+ }[];
85
+ kv: {
86
+ binding: string;
87
+ }[];
88
+ r2: {
89
+ binding: string;
90
+ bucket_name: string;
91
+ }[];
92
+ queues: {
93
+ producers: {
94
+ binding: string;
95
+ queue: string;
96
+ }[];
97
+ consumers: {
98
+ queue: string;
99
+ max_batch_size?: number;
100
+ max_batch_timeout?: number;
101
+ max_retries?: number;
102
+ dead_letter_queue?: string;
103
+ }[];
104
+ };
105
+ do: {
106
+ binding: string;
107
+ className: string;
108
+ }[];
109
+ }
68
110
 
69
111
  declare const WRANGLER_CONFIG_FILES: string[];
70
112
  /**
@@ -94,4 +136,4 @@ declare function discoverBindings(config: WranglerConfig): DiscoveredBindings;
94
136
  */
95
137
  declare function getBindingSummary(bindings: DiscoveredBindings): string[];
96
138
 
97
- export { type BindingInfo, type D1DatabaseConfig, type DiscoveredBindings, type DurableObjectBinding, type KVNamespaceConfig, type QueueConsumerConfig, type QueueProducerConfig, type R2BucketConfig, WRANGLER_CONFIG_FILES, type WranglerConfig, discoverBindings, findWranglerConfig, getBindingSummary, parseWranglerConfig };
139
+ export { type BindingInfo, type D1DatabaseConfig, type DiscoveredBindings, type DurableObjectBinding, type KVNamespaceConfig, type LocalflareManifest, type QueueConsumerConfig, type QueueProducerConfig, type R2BucketConfig, WRANGLER_CONFIG_FILES, type WranglerConfig, discoverBindings, findWranglerConfig, getBindingSummary, parseWranglerConfig };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "localflare-core",
3
- "version": "0.2.0-beta.0",
3
+ "version": "0.2.0-beta.2",
4
4
  "description": "Core utilities for Localflare - config parsing and binding discovery",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",