@edgestore/server 1.0.0-next.4 → 1.0.0-next.5
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.
- package/README.md +2 -8
- package/agent-docs/README.md +1 -1
- package/agent-docs/astro.md +2 -8
- package/agent-docs/backend-client.md +16 -26
- package/agent-docs/configuration.md +41 -10
- package/agent-docs/express.md +2 -8
- package/agent-docs/fastify.md +2 -8
- package/agent-docs/hono.md +2 -8
- package/agent-docs/next.md +4 -16
- package/agent-docs/provider-azure-blob.md +7 -9
- package/agent-docs/provider-custom.md +25 -10
- package/agent-docs/provider-edgestore.md +9 -9
- package/agent-docs/provider-s3.md +223 -119
- package/agent-docs/remix.md +2 -8
- package/agent-docs/tanstack-start.md +2 -8
- package/dist/adapters/astro/index.d.ts +2 -2
- package/dist/adapters/astro/index.d.ts.map +1 -1
- package/dist/adapters/astro/index.js +1 -2
- package/dist/adapters/dispatcher.d.ts +2 -3
- package/dist/adapters/dispatcher.d.ts.map +1 -1
- package/dist/adapters/dispatcher.js +17 -22
- package/dist/adapters/express/index.d.ts +2 -2
- package/dist/adapters/express/index.d.ts.map +1 -1
- package/dist/adapters/express/index.js +1 -5
- package/dist/adapters/fastify/index.d.ts +2 -2
- package/dist/adapters/fastify/index.d.ts.map +1 -1
- package/dist/adapters/fastify/index.js +1 -5
- package/dist/adapters/hono/index.d.ts +2 -2
- package/dist/adapters/hono/index.d.ts.map +1 -1
- package/dist/adapters/hono/index.js +1 -2
- package/dist/adapters/next/app/index.d.ts +2 -2
- package/dist/adapters/next/app/index.d.ts.map +1 -1
- package/dist/adapters/next/app/index.js +1 -2
- package/dist/adapters/next/pages/index.d.ts +2 -2
- package/dist/adapters/next/pages/index.d.ts.map +1 -1
- package/dist/adapters/next/pages/index.js +1 -5
- package/dist/adapters/remix/index.d.ts +2 -2
- package/dist/adapters/remix/index.d.ts.map +1 -1
- package/dist/adapters/remix/index.js +1 -2
- package/dist/adapters/shared.d.ts +45 -67
- package/dist/adapters/shared.d.ts.map +1 -1
- package/dist/adapters/shared.js +59 -96
- package/dist/adapters/start/index.d.ts +2 -2
- package/dist/adapters/start/index.d.ts.map +1 -1
- package/dist/adapters/start/index.js +1 -2
- package/dist/core/client/bucketClient.d.ts +0 -1
- package/dist/core/client/bucketClient.d.ts.map +1 -1
- package/dist/core/client/bucketClient.js +6 -28
- package/dist/core/client/index.d.ts +29 -26
- package/dist/core/client/index.d.ts.map +1 -1
- package/dist/core/client/index.js +2 -3
- package/dist/core/index.d.ts +2 -20
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/index.js +2 -13
- package/dist/core/provider.d.ts +11 -1
- package/dist/core/provider.d.ts.map +1 -1
- package/dist/core/provider.js +21 -1
- package/dist/core/router.d.ts +25 -0
- package/dist/core/router.d.ts.map +1 -0
- package/dist/core/router.js +49 -0
- package/dist/core/routerRules.d.ts +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -2
- package/dist/providers/azure-blob/index.d.ts +7 -0
- package/dist/providers/azure-blob/index.d.ts.map +1 -1
- package/dist/providers/azure-blob/index.js +7 -0
- package/dist/providers/edgestore/index.d.ts +6 -10
- package/dist/providers/edgestore/index.d.ts.map +1 -1
- package/dist/providers/edgestore/index.js +15 -13
- package/dist/providers/s3/backendUpload.d.ts +13 -0
- package/dist/providers/s3/backendUpload.d.ts.map +1 -0
- package/dist/providers/s3/backendUpload.js +97 -0
- package/dist/providers/s3/index.d.ts +57 -93
- package/dist/providers/s3/index.d.ts.map +1 -1
- package/dist/providers/s3/index.js +241 -90
- package/dist/providers/s3/keys.d.ts +10 -0
- package/dist/providers/s3/keys.d.ts.map +1 -0
- package/dist/providers/s3/keys.js +40 -0
- package/dist/providers/s3/multipart.d.ts +25 -0
- package/dist/providers/s3/multipart.d.ts.map +1 -0
- package/dist/providers/s3/multipart.js +132 -0
- package/dist/providers/s3/objectHeaders.d.ts +4 -0
- package/dist/providers/s3/objectHeaders.d.ts.map +1 -0
- package/dist/providers/s3/objectHeaders.js +22 -0
- package/dist/providers/s3/options.d.ts +107 -0
- package/dist/providers/s3/options.d.ts.map +1 -0
- package/dist/version.d.ts +1 -1
- package/package.json +4 -4
- package/src/adapters/astro/index.ts +3 -4
- package/src/adapters/dispatcher.ts +21 -30
- package/src/adapters/express/index.ts +3 -9
- package/src/adapters/fastify/index.ts +3 -9
- package/src/adapters/hono/index.ts +3 -4
- package/src/adapters/next/app/index.ts +3 -4
- package/src/adapters/next/pages/index.ts +3 -9
- package/src/adapters/remix/index.ts +3 -4
- package/src/adapters/shared.ts +89 -162
- package/src/adapters/start/index.ts +3 -4
- package/src/core/client/bucketClient.ts +10 -41
- package/src/core/client/index.ts +32 -48
- package/src/core/index.ts +2 -36
- package/src/core/provider.ts +28 -5
- package/src/core/router.ts +97 -0
- package/src/index.ts +1 -3
- package/src/providers/azure-blob/index.ts +2 -0
- package/src/providers/edgestore/index.ts +19 -13
- package/src/providers/s3/backendUpload.ts +117 -0
- package/src/providers/s3/index.ts +302 -223
- package/src/providers/s3/keys.ts +59 -0
- package/src/providers/s3/multipart.ts +196 -0
- package/src/providers/s3/objectHeaders.ts +23 -0
- package/src/providers/s3/options.ts +125 -0
- package/src/version.ts +1 -1
|
@@ -2,15 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
Source: https://next.edgestore.dev/docs/providers/s3
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
The S3 provider supports direct browser uploads, automatic multipart uploads,
|
|
6
|
+
backend uploads, signed downloads, object lookup, and deletion. Your application
|
|
7
|
+
owns the bucket's IAM, CORS, read permissions, and lifecycle configuration.
|
|
6
8
|
|
|
7
|
-
|
|
9
|
+
## Setup
|
|
8
10
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
## Installation
|
|
12
|
-
|
|
13
|
-
You need to install some peer dependencies to use this provider.
|
|
11
|
+
Install the optional AWS dependencies:
|
|
14
12
|
|
|
15
13
|
Packages to install (use the application’s package manager):
|
|
16
14
|
|
|
@@ -18,149 +16,255 @@ Packages to install (use the application’s package manager):
|
|
|
18
16
|
@aws-sdk/client-s3 @aws-sdk/s3-request-presigner
|
|
19
17
|
```
|
|
20
18
|
|
|
21
|
-
|
|
22
|
-
|
|
19
|
+
Configure the provider on your router:
|
|
20
|
+
|
|
21
|
+
Example: title="src/server/edgestore.ts"
|
|
23
22
|
|
|
24
23
|
```ts
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
createEdgeStoreNextHandler,
|
|
28
|
-
type CreateContextOptions,
|
|
29
|
-
} from '@edgestore/server/adapters/next/pages';
|
|
30
|
-
// [!code ++]
|
|
24
|
+
import { initEdgeStore } from '@edgestore/server';
|
|
31
25
|
import { s3 } from '@edgestore/server/providers/s3';
|
|
32
|
-
import { z } from 'zod';
|
|
33
26
|
|
|
34
|
-
|
|
27
|
+
const es = initEdgeStore.create();
|
|
28
|
+
export const router = es.router({
|
|
29
|
+
documents: es.fileBucket().accessControl('private'),
|
|
30
|
+
}).provider(s3({
|
|
31
|
+
region: 'us-east-1',
|
|
32
|
+
bucketName: 'my-storage-bucket',
|
|
33
|
+
}));
|
|
35
34
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
35
|
+
export type EdgeStoreRouter = typeof router;
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
Pass `router` to your framework adapter as its `router` option.
|
|
39
|
+
Set `EDGE_STORE_JWT_SECRET` to a stable random secret, for example one generated
|
|
40
|
+
with `openssl rand -base64 32`. All application instances must share it.
|
|
41
41
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
42
|
+
Credentials use the AWS SDK's default provider chain, including environment
|
|
43
|
+
variables, shared config, and instance/task roles. You can also pass
|
|
44
|
+
`credentials` with an AWS credentials object or provider function.
|
|
45
|
+
|
|
46
|
+
| Option | Default / environment variable |
|
|
47
|
+
| ---------------------------- | ---------------------------------------------------------------------------------------- |
|
|
48
|
+
| `bucketName` | `ES_AWS_BUCKET_NAME` |
|
|
49
|
+
| `region` | `ES_AWS_REGION`, then AWS SDK region resolution |
|
|
50
|
+
| `endpoint` | `ES_AWS_ENDPOINT` |
|
|
51
|
+
| `forcePathStyle` | `ES_AWS_FORCE_PATH_STYLE === 'true'` |
|
|
52
|
+
| `baseUrl` | `EDGE_STORE_BASE_URL`, otherwise the storage URL |
|
|
53
|
+
| `uploadUrlExpiresIn` | 3600 seconds |
|
|
54
|
+
| `signedUrlExpiresIn` | 3600 seconds |
|
|
55
|
+
| `multipart.thresholdBytes` | 100 MiB |
|
|
56
|
+
| `multipart.partSizeBytes` | 16 MiB; minimum 5 MiB |
|
|
57
|
+
| `multipart.sessionExpiresIn` | 86400 seconds |
|
|
58
|
+
| `jwtSecret` | Multipart signing override; otherwise `EDGE_STORE_JWT_SECRET` or `EDGE_STORE_SECRET_KEY` |
|
|
59
|
+
|
|
60
|
+
Setting `jwtSecret` does not replace the required environment secret.
|
|
61
|
+
Signed URL lifetimes must be between 1 and 604800 seconds; temporary AWS
|
|
62
|
+
credentials can expire sooner.
|
|
63
|
+
|
|
64
|
+
## Paths and filenames
|
|
65
|
+
|
|
66
|
+
The default key is the logical router bucket, an optional `_public` segment,
|
|
67
|
+
router path values, and a generated UUID plus extension:
|
|
68
|
+
|
|
69
|
+
```text
|
|
70
|
+
documents/acme/generated-id.pdf
|
|
71
|
+
avatars/_public/user-123/generated-id.webp
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
Use the router's `.path(...)` for context/input-derived folders. Use
|
|
75
|
+
`options: { manualFileName: file.name }` on a browser upload to preserve the
|
|
76
|
+
original filename. A repeated key overwrites the existing object (or creates a
|
|
77
|
+
new version if bucket versioning is enabled). Generated names avoid accidental
|
|
78
|
+
collisions; use manual names only when overwrite behavior is intentional.
|
|
79
|
+
|
|
80
|
+
For custom layouts, the async `path` callback can rewrite everything beneath the
|
|
81
|
+
logical bucket prefix:
|
|
82
|
+
|
|
83
|
+
```ts
|
|
84
|
+
s3({
|
|
85
|
+
path: ({ defaultPath }) => defaultPath.replace(/^_public\//, ''),
|
|
45
86
|
});
|
|
46
87
|
```
|
|
47
88
|
|
|
48
|
-
|
|
89
|
+
The callback receives `edgestoreBucketName`, `fileInfo` (including router path
|
|
90
|
+
values and metadata), and `defaultPath`. It cannot remove the logical bucket
|
|
91
|
+
prefix or use `.` / `..` path segments. For example, it can produce
|
|
92
|
+
`documents/acme/invoices/report.pdf`, but cannot place that file outside
|
|
93
|
+
`documents/`.
|
|
94
|
+
|
|
95
|
+
S3 uploads return a `key`. Save it in your database for backend lookup,
|
|
96
|
+
deletion, and signed URL creation, which accept `{ key }` or `{ url }`. Key
|
|
97
|
+
references continue to work when you change CDN domains. URL references must
|
|
98
|
+
match the currently configured `baseUrl`.
|
|
99
|
+
|
|
100
|
+
## Large files and cancellation
|
|
101
|
+
|
|
102
|
+
Keep using the normal React `upload({ file, onProgressChange, signal })` call.
|
|
103
|
+
Files above the threshold automatically use multipart uploads with retries.
|
|
104
|
+
Use `AbortController` to cancel an upload.
|
|
49
105
|
|
|
50
106
|
```ts
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
*/
|
|
58
|
-
credentials?: S3ClientConfig['credentials'];
|
|
59
|
-
/**
|
|
60
|
-
* AWS region to use.
|
|
61
|
-
* Can also be set via the `ES_AWS_REGION` environment variable.
|
|
62
|
-
*/
|
|
63
|
-
region?: string;
|
|
64
|
-
/**
|
|
65
|
-
* Name of the S3 bucket to use.
|
|
66
|
-
* Can also be set via the `ES_AWS_BUCKET_NAME` environment variable.
|
|
67
|
-
*/
|
|
68
|
-
bucketName?: string;
|
|
69
|
-
/**
|
|
70
|
-
* Custom endpoint for S3-compatible storage providers (e.g., MinIO).
|
|
71
|
-
* Can also be set via the `ES_AWS_ENDPOINT` environment variable.
|
|
72
|
-
*/
|
|
73
|
-
endpoint?: string;
|
|
74
|
-
/**
|
|
75
|
-
* Force path style for S3-compatible storage providers.
|
|
76
|
-
* Can also be set via the `ES_AWS_FORCE_PATH_STYLE` environment variable.
|
|
77
|
-
* Defaults to false for AWS S3, but should be true for most S3-compatible providers.
|
|
78
|
-
*/
|
|
79
|
-
forcePathStyle?: boolean;
|
|
80
|
-
/**
|
|
81
|
-
* Base URL to use for accessing files.
|
|
82
|
-
* Only needed if you are using a custom domain or cloudfront.
|
|
83
|
-
*
|
|
84
|
-
* Can also be set via the `EDGE_STORE_BASE_URL` environment variable.
|
|
85
|
-
*/
|
|
86
|
-
baseUrl?: string;
|
|
87
|
-
/**
|
|
88
|
-
* Secret to use for encrypting JWT tokens.
|
|
89
|
-
* Can be generated with `openssl rand -base64 32`.
|
|
90
|
-
*
|
|
91
|
-
* Can also be set via the `EDGE_STORE_JWT_SECRET` environment variable.
|
|
92
|
-
*/
|
|
93
|
-
jwtSecret?: string;
|
|
94
|
-
/**
|
|
95
|
-
* Customizes the object path beneath the logical EdgeStore bucket prefix.
|
|
96
|
-
*
|
|
97
|
-
* The logical bucket prefix is always preserved so router authorization for
|
|
98
|
-
* one bucket cannot access objects from another.
|
|
99
|
-
*/
|
|
100
|
-
path?: (args: {
|
|
101
|
-
edgestoreBucketName: string;
|
|
102
|
-
fileInfo: FileInfo;
|
|
103
|
-
defaultPath: string;
|
|
104
|
-
}) => Promise<string> | string;
|
|
105
|
-
};
|
|
107
|
+
s3({
|
|
108
|
+
multipart: {
|
|
109
|
+
thresholdBytes: 100 * 1024 * 1024,
|
|
110
|
+
partSizeBytes: 16 * 1024 * 1024,
|
|
111
|
+
},
|
|
112
|
+
});
|
|
106
113
|
```
|
|
107
114
|
|
|
108
|
-
|
|
115
|
+
The browser requests part URLs as it reaches each part and refreshes a rejected
|
|
116
|
+
URL once, so `uploadUrlExpiresIn` only needs to cover one part transfer. A
|
|
117
|
+
multipart session can request URLs, complete, or abort until
|
|
118
|
+
`multipart.sessionExpiresIn` passes. Uploads do not resume across page reloads.
|
|
109
119
|
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
bucket. This lets multiple logical buckets safely share one physical S3 bucket:
|
|
120
|
+
Backend uploads send up to four parts at a time through your S3 client, so the
|
|
121
|
+
client's retry and transport settings apply.
|
|
113
122
|
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
123
|
+
Configure an S3 lifecycle rule to clean up incomplete uploads left by browser
|
|
124
|
+
shutdowns, network loss, or failed cancellation:
|
|
125
|
+
|
|
126
|
+
```json
|
|
127
|
+
{
|
|
128
|
+
"Rules": [{
|
|
129
|
+
"ID": "abort-incomplete-uploads",
|
|
130
|
+
"Status": "Enabled",
|
|
131
|
+
"Filter": { "Prefix": "" },
|
|
132
|
+
"AbortIncompleteMultipartUpload": { "DaysAfterInitiation": 1 }
|
|
133
|
+
}]
|
|
134
|
+
}
|
|
117
135
|
```
|
|
118
136
|
|
|
119
|
-
|
|
120
|
-
this removes `_public` while keeping the remaining generated path:
|
|
137
|
+
Merge this rule into your existing lifecycle configuration.
|
|
121
138
|
|
|
122
|
-
|
|
139
|
+
## Private downloads
|
|
140
|
+
|
|
141
|
+
Keep the physical bucket private and use `.accessControl('private')`. Your
|
|
142
|
+
backend must authorize the caller before issuing a signed URL:
|
|
123
143
|
|
|
124
144
|
```ts
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
// `documents/_public/acme/invoice.pdf`
|
|
130
|
-
// becomes `documents/acme/invoice.pdf`
|
|
131
|
-
return defaultPath.replace(/^_public\//, '');
|
|
132
|
-
},
|
|
133
|
-
}),
|
|
145
|
+
// After checking that the current user can read this database file record:
|
|
146
|
+
const download = await router.client.documents.createSignedUrl({
|
|
147
|
+
url: { key: storedFileKey },
|
|
148
|
+
expiresIn: 300,
|
|
134
149
|
});
|
|
150
|
+
// Send download.signedUrl to the browser.
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
The backend client is privileged; it does not authenticate application users for
|
|
154
|
+
you. Cookie-based access-control schemas are unsupported and rejected at adapter
|
|
155
|
+
initialization. A logical bucket's public/private setting does not configure S3
|
|
156
|
+
permissions. `_public` is a naming convention that you can use in infrastructure
|
|
157
|
+
rules. For example, an S3 policy can grant public reads to
|
|
158
|
+
`avatars/_public/*`, or a CloudFront behavior can allow public viewing of that
|
|
159
|
+
path while other behaviors require signed access. The prefix alone grants no
|
|
160
|
+
access. With CloudFront origin access control, the S3 bucket can remain private.
|
|
161
|
+
If you customize the path, update your access rules to match.
|
|
162
|
+
|
|
163
|
+
Add `.autoSignedUrls({ expiresIn: 300 })` to a private router bucket to receive a
|
|
164
|
+
signed read URL with upload results. Save the key or canonical URL, not the
|
|
165
|
+
expiring signed URL. Request a fresh signed URL when needed; the client does not
|
|
166
|
+
refresh private download URLs automatically. Browser upload read URLs begin
|
|
167
|
+
expiring when the upload is requested, so allow enough time for the transfer.
|
|
168
|
+
|
|
169
|
+
For public files, configure public reads or a CDN separately. `baseUrl` changes
|
|
170
|
+
canonical file URLs, but signed downloads still use the S3 endpoint; it does not
|
|
171
|
+
create CloudFront signed URLs.
|
|
135
172
|
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
173
|
+
## Backend uploads and object settings
|
|
174
|
+
|
|
175
|
+
Use the same configured router for generated files and background jobs:
|
|
176
|
+
|
|
177
|
+
```ts
|
|
178
|
+
const uploaded = await router.client.documents.upload({
|
|
179
|
+
content: {
|
|
180
|
+
blob: new Blob([pdfBytes], { type: 'application/pdf' }),
|
|
181
|
+
extension: 'pdf',
|
|
182
|
+
},
|
|
183
|
+
options: { manualFileName: 'report.pdf' },
|
|
139
184
|
});
|
|
140
185
|
```
|
|
141
186
|
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
need provider-specific naming logic.
|
|
187
|
+
Backend uploads use the same path, object settings, and multipart configuration.
|
|
188
|
+
They accept Blob, text, or URL content. Streaming sources are not supported.
|
|
145
189
|
|
|
146
|
-
|
|
147
|
-
|
|
190
|
+
Use `objectOptions` for cache policy, download filenames, metadata, tags, storage
|
|
191
|
+
class, and S3/KMS encryption settings. It accepts a static object or an async
|
|
192
|
+
callback with the same arguments as `path`:
|
|
148
193
|
|
|
149
194
|
```ts
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
195
|
+
s3({
|
|
196
|
+
objectOptions: ({ fileInfo }) => ({
|
|
197
|
+
CacheControl: 'private, max-age=60',
|
|
198
|
+
ContentDisposition: 'attachment',
|
|
199
|
+
Metadata: { category: fileInfo.metadata.category ?? 'general' },
|
|
200
|
+
}),
|
|
201
|
+
});
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
`ContentType` comes from the file's MIME type. File contents are not inspected.
|
|
205
|
+
|
|
206
|
+
For custom AWS retry/transport behavior, pass `client: new S3Client(...)`.
|
|
207
|
+
For browser uploads, configure that client with
|
|
208
|
+
`requestChecksumCalculation: 'WHEN_REQUIRED'`.
|
|
209
|
+
When injecting a client with a custom endpoint, also set `baseUrl` explicitly.
|
|
210
|
+
|
|
211
|
+
## IAM and CORS
|
|
212
|
+
|
|
213
|
+
A baseline application role policy is below. Replace the bucket name and narrow
|
|
214
|
+
object prefixes to your logical buckets where appropriate. KMS encryption needs
|
|
215
|
+
additional key permissions.
|
|
216
|
+
|
|
217
|
+
```json
|
|
218
|
+
{
|
|
219
|
+
"Version": "2012-10-17",
|
|
220
|
+
"Statement": [{
|
|
221
|
+
"Effect": "Allow",
|
|
222
|
+
"Action": ["s3:PutObject", "s3:GetObject", "s3:DeleteObject", "s3:AbortMultipartUpload"],
|
|
223
|
+
"Resource": "arn:aws:s3:::my-storage-bucket/*"
|
|
224
|
+
}]
|
|
225
|
+
}
|
|
226
|
+
```
|
|
227
|
+
|
|
228
|
+
Configure bucket CORS for your actual application origins. Exposing `ETag` is
|
|
229
|
+
required for browser multipart completion:
|
|
230
|
+
|
|
231
|
+
```json
|
|
232
|
+
[{
|
|
233
|
+
"AllowedOrigins": ["http://localhost:3000", "https://app.example.com"],
|
|
234
|
+
"AllowedMethods": ["PUT", "GET", "HEAD"],
|
|
235
|
+
"AllowedHeaders": ["*"],
|
|
236
|
+
"ExposeHeaders": ["ETag"],
|
|
237
|
+
"MaxAgeSeconds": 3600
|
|
238
|
+
}]
|
|
154
239
|
```
|
|
155
240
|
|
|
156
|
-
##
|
|
241
|
+
## S3-compatible services
|
|
157
242
|
|
|
158
|
-
|
|
159
|
-
by setting the `endpoint` and `forcePathStyle` options.
|
|
243
|
+
For local MinIO:
|
|
160
244
|
|
|
161
245
|
```ts
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
246
|
+
s3({
|
|
247
|
+
bucketName: 'edgestore',
|
|
248
|
+
region: 'us-east-1',
|
|
249
|
+
endpoint: 'http://localhost:9000',
|
|
250
|
+
forcePathStyle: true,
|
|
251
|
+
});
|
|
166
252
|
```
|
|
253
|
+
|
|
254
|
+
The endpoint must be reachable from both the application server and browser.
|
|
255
|
+
Set `baseUrl` explicitly for custom domains or virtual-hosted endpoint layouts.
|
|
256
|
+
S3-compatible services may differ in support for KMS, storage classes, tags,
|
|
257
|
+
checksums, and lifecycle policies; only enable settings your service supports.
|
|
258
|
+
|
|
259
|
+
## Limitations
|
|
260
|
+
|
|
261
|
+
* `temporary` and `replaceTargetUrl` are rejected. Track application-owned files
|
|
262
|
+
in your database and delete old files after successful replacement.
|
|
263
|
+
* Confirmation, listing/filtering, restore, and provider-generated thumbnails are
|
|
264
|
+
unsupported. Thumbnail options do not generate thumbnails.
|
|
265
|
+
* Router path/metadata values are returned at upload time but are not persisted
|
|
266
|
+
as an EdgeStore index. `get()` returns key, URL, size, and S3 timestamps. Persist
|
|
267
|
+
application metadata in your database or explicitly set S3 `Metadata`.
|
|
268
|
+
* No collision-prevention mode, automatic CDN invalidation, or version-specific
|
|
269
|
+
object references. Standard S3 overwrite/delete and versioning rules apply.
|
|
270
|
+
* Browser multipart cleanup is best effort, not a substitute for lifecycle rules.
|
package/agent-docs/remix.md
CHANGED
|
@@ -37,9 +37,8 @@ Create the EdgeStore API route:
|
|
|
37
37
|
Example: title="app/routes/api/edgestore.ts"
|
|
38
38
|
|
|
39
39
|
```ts
|
|
40
|
-
import {
|
|
40
|
+
import { initEdgeStore } from '@edgestore/server';
|
|
41
41
|
import { createEdgeStoreRemixHandler } from '@edgestore/server/adapters/remix';
|
|
42
|
-
import { edgestore } from '@edgestore/server/providers/edgestore';
|
|
43
42
|
|
|
44
43
|
const es = initEdgeStore.create();
|
|
45
44
|
|
|
@@ -49,13 +48,8 @@ const router = es.router({
|
|
|
49
48
|
|
|
50
49
|
export type EdgeStoreRouter = typeof router;
|
|
51
50
|
|
|
52
|
-
const configuredEdgeStore = createEdgeStore({
|
|
53
|
-
router,
|
|
54
|
-
provider: edgestore(),
|
|
55
|
-
});
|
|
56
|
-
|
|
57
51
|
const handler = createEdgeStoreRemixHandler({
|
|
58
|
-
|
|
52
|
+
router,
|
|
59
53
|
});
|
|
60
54
|
|
|
61
55
|
export { handler as loader, handler as action };
|
|
@@ -34,9 +34,8 @@ Create the EdgeStore API route:
|
|
|
34
34
|
Example: title="src/routes/api/edgestore.$.ts"
|
|
35
35
|
|
|
36
36
|
```ts
|
|
37
|
-
import {
|
|
37
|
+
import { initEdgeStore } from '@edgestore/server';
|
|
38
38
|
import { createEdgeStoreStartHandler } from '@edgestore/server/adapters/start';
|
|
39
|
-
import { edgestore } from '@edgestore/server/providers/edgestore';
|
|
40
39
|
import { createFileRoute } from '@tanstack/react-router';
|
|
41
40
|
|
|
42
41
|
const es = initEdgeStore.create();
|
|
@@ -46,13 +45,8 @@ const router = es.router({
|
|
|
46
45
|
|
|
47
46
|
export type EdgeStoreRouter = typeof router;
|
|
48
47
|
|
|
49
|
-
const configuredEdgeStore = createEdgeStore({
|
|
50
|
-
router,
|
|
51
|
-
provider: edgestore(),
|
|
52
|
-
});
|
|
53
|
-
|
|
54
48
|
const handler = createEdgeStoreStartHandler({
|
|
55
|
-
|
|
49
|
+
router,
|
|
56
50
|
});
|
|
57
51
|
|
|
58
52
|
export const Route = createFileRoute('/api/edgestore/$')({
|
|
@@ -2,9 +2,9 @@ import { type AnyContext } from '@edgestore/shared';
|
|
|
2
2
|
import type { APIContext } from 'astro';
|
|
3
3
|
import { type LogLevel } from '../../libs/logger.js';
|
|
4
4
|
import { type CreateContextConfig } from '../dispatcher.js';
|
|
5
|
-
import type { CookieConfig,
|
|
5
|
+
import type { CookieConfig, HandlerRouter } from '../shared.js';
|
|
6
6
|
export type Config<TCtx extends AnyContext> = {
|
|
7
|
-
|
|
7
|
+
router: HandlerRouter<TCtx>;
|
|
8
8
|
logLevel?: LogLevel;
|
|
9
9
|
cookieConfig?: CookieConfig;
|
|
10
10
|
} & CreateContextConfig<TCtx, APIContext>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/adapters/astro/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AACxC,OAAe,EAAE,KAAK,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC1D,OAAO,EAGL,KAAK,mBAAmB,EACzB,MAAM,eAAe,CAAC;AACvB,OAAO,KAAK,EAAE,YAAY,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/adapters/astro/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AACxC,OAAe,EAAE,KAAK,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC1D,OAAO,EAGL,KAAK,mBAAmB,EACzB,MAAM,eAAe,CAAC;AACvB,OAAO,KAAK,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAE7D,MAAM,MAAM,MAAM,CAAC,IAAI,SAAS,UAAU,IAAI;IAC5C,MAAM,EAAE,aAAa,CAAC,IAAI,CAAC,CAAC;IAC5B,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,YAAY,CAAC,EAAE,YAAY,CAAC;CAC7B,GAAG,mBAAmB,CAAC,IAAI,EAAE,UAAU,CAAC,CAAC;AAE1C,wBAAgB,2BAA2B,CAAC,IAAI,SAAS,UAAU,EACjE,MAAM,EAAE,MAAM,CAAC,IAAI,CAAC,IAKN,SAAS,UAAU,uBAelC"}
|
|
@@ -8,13 +8,12 @@ function createEdgeStoreAstroHandler(config) {
|
|
|
8
8
|
const { request } = context;
|
|
9
9
|
const url = new URL(request.url);
|
|
10
10
|
return await dispatchEdgeStoreRequest({
|
|
11
|
-
|
|
11
|
+
router: config.router,
|
|
12
12
|
logger: log,
|
|
13
13
|
cookieConfig: config.cookieConfig,
|
|
14
14
|
request: {
|
|
15
15
|
pathname: url.pathname,
|
|
16
16
|
readJson: ()=>request.json(),
|
|
17
|
-
getQuery: (name)=>url.searchParams.get(name) ?? undefined,
|
|
18
17
|
cookieHeader: request.headers.get('cookie') ?? undefined,
|
|
19
18
|
createContext: ()=>resolveContext(config, context)
|
|
20
19
|
}
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { type AnyContext, type MaybePromise } from '@edgestore/shared';
|
|
2
2
|
import type { LoggerLike } from '../libs/logger.js';
|
|
3
|
-
import { type CookieConfig, type
|
|
3
|
+
import { type CookieConfig, type HandlerRouter } from './shared.js';
|
|
4
4
|
export type EdgeStoreDispatchRequest<TCtx extends AnyContext> = {
|
|
5
5
|
pathname: string;
|
|
6
6
|
readJson: () => Promise<unknown>;
|
|
7
|
-
getQuery: (name: string) => string | undefined;
|
|
8
7
|
cookieHeader?: string;
|
|
9
8
|
cookies?: Readonly<Record<string, string | undefined>>;
|
|
10
9
|
createContext: () => MaybePromise<TCtx>;
|
|
@@ -16,7 +15,7 @@ export type CreateContextConfig<TCtx extends AnyContext, TOptions> = TCtx extend
|
|
|
16
15
|
};
|
|
17
16
|
export declare function resolveContext<TCtx extends AnyContext, TOptions>(config: object, options: TOptions): MaybePromise<TCtx>;
|
|
18
17
|
export declare function dispatchEdgeStoreRequest<TCtx extends AnyContext>(params: {
|
|
19
|
-
|
|
18
|
+
router: HandlerRouter<TCtx>;
|
|
20
19
|
request: EdgeStoreDispatchRequest<TCtx>;
|
|
21
20
|
logger: LoggerLike;
|
|
22
21
|
cookieConfig?: CookieConfig;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dispatcher.d.ts","sourceRoot":"","sources":["../../src/adapters/dispatcher.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,UAAU,EAEf,KAAK,YAAY,EAClB,MAAM,mBAAmB,CAAC;AAG3B,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAEjD,OAAO,
|
|
1
|
+
{"version":3,"file":"dispatcher.d.ts","sourceRoot":"","sources":["../../src/adapters/dispatcher.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,UAAU,EAEf,KAAK,YAAY,EAClB,MAAM,mBAAmB,CAAC;AAG3B,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAEjD,OAAO,EAeL,KAAK,YAAY,EACjB,KAAK,aAAa,EACnB,MAAM,UAAU,CAAC;AAElB,MAAM,MAAM,wBAAwB,CAAC,IAAI,SAAS,UAAU,IAAI;IAC9D,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,OAAO,CAAC,OAAO,CAAC,CAAC;IACjC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,OAAO,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAAC,CAAC;IACvD,aAAa,EAAE,MAAM,YAAY,CAAC,IAAI,CAAC,CAAC;CACzC,CAAC;AAEF,MAAM,MAAM,mBAAmB,CAAC,IAAI,SAAS,UAAU,EAAE,QAAQ,IAC/D,IAAI,SAAS,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,GAC9B;IACE,aAAa,CAAC,EAAE,CAAC,OAAO,EAAE,QAAQ,KAAK,YAAY,CAAC,IAAI,CAAC,CAAC;CAC3D,GACD;IACE,aAAa,EAAE,CAAC,OAAO,EAAE,QAAQ,KAAK,YAAY,CAAC,IAAI,CAAC,CAAC;CAC1D,CAAC;AAER,wBAAgB,cAAc,CAAC,IAAI,SAAS,UAAU,EAAE,QAAQ,EAC9D,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,QAAQ,GAChB,YAAY,CAAC,IAAI,CAAC,CAIpB;AAYD,wBAAsB,wBAAwB,CAC5C,IAAI,SAAS,UAAU,EACvB,MAAM,EAAE;IACR,MAAM,EAAE,aAAa,CAAC,IAAI,CAAC,CAAC;IAC5B,OAAO,EAAE,wBAAwB,CAAC,IAAI,CAAC,CAAC;IACxC,MAAM,EAAE,UAAU,CAAC;IACnB,YAAY,CAAC,EAAE,YAAY,CAAC;CAC7B,GAAG,OAAO,CAAC,QAAQ,CAAC,CAoIpB;AAED,wBAAsB,sBAAsB,CAAC,QAAQ,EAAE,QAAQ;;;;;GAsB9D"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { EdgeStoreError, EDGE_STORE_ERROR_CODES } from '@edgestore/shared';
|
|
2
2
|
import { parseCookie } from 'cookie';
|
|
3
3
|
import { matchPath } from '../libs/utils.js';
|
|
4
|
-
import { getCookieConfig, init, requestUpload, requestUploadBodySchema, requestUploadParts, requestUploadPartsBodySchema, completeMultipartUpload, completeMultipartUploadBodySchema, confirmUploads, confirmUploadsBodySchema, deleteFiles, deleteFilesBodySchema
|
|
4
|
+
import { getCookieConfig, init, requestUpload, requestUploadBodySchema, requestUploadParts, requestUploadPartsBodySchema, completeMultipartUpload, completeMultipartUploadBodySchema, abortMultipartUpload, abortMultipartUploadBodySchema, confirmUploads, confirmUploadsBodySchema, deleteFiles, deleteFilesBodySchema } from './shared.js';
|
|
5
5
|
|
|
6
6
|
function resolveContext(config, options) {
|
|
7
7
|
return hasCreateContext(config) ? config.createContext(options) : {};
|
|
@@ -10,15 +10,14 @@ function hasCreateContext(config) {
|
|
|
10
10
|
return 'createContext' in config && typeof config.createContext === 'function';
|
|
11
11
|
}
|
|
12
12
|
async function dispatchEdgeStoreRequest(params) {
|
|
13
|
-
const {
|
|
14
|
-
const { provider, router } = edgestore;
|
|
13
|
+
const { router, request, logger, cookieConfig } = params;
|
|
15
14
|
const resolvedCookieConfig = getCookieConfig(cookieConfig);
|
|
16
|
-
const
|
|
17
|
-
const ctxToken = request.cookies?.[resolvedCookieConfig.ctx.name] ?? (cookieHeader ? parseCookie(cookieHeader)[resolvedCookieConfig.ctx.name] : undefined);
|
|
15
|
+
const ctxToken = request.cookies?.[resolvedCookieConfig.ctx.name] ?? (request.cookieHeader ? parseCookie(request.cookieHeader)[resolvedCookieConfig.ctx.name] : undefined);
|
|
18
16
|
try {
|
|
19
17
|
if (matchPath(request.pathname, '/health')) {
|
|
20
18
|
return new Response('OK');
|
|
21
19
|
}
|
|
20
|
+
const { provider } = router._def;
|
|
22
21
|
if (matchPath(request.pathname, '/init')) {
|
|
23
22
|
let ctx;
|
|
24
23
|
try {
|
|
@@ -76,6 +75,18 @@ async function dispatchEdgeStoreRequest(params) {
|
|
|
76
75
|
status: 200
|
|
77
76
|
});
|
|
78
77
|
}
|
|
78
|
+
if (matchPath(request.pathname, '/abort-multipart-upload')) {
|
|
79
|
+
await abortMultipartUpload({
|
|
80
|
+
provider,
|
|
81
|
+
router,
|
|
82
|
+
body: await parseRequestBody(request, abortMultipartUploadBodySchema),
|
|
83
|
+
ctxToken,
|
|
84
|
+
logger
|
|
85
|
+
});
|
|
86
|
+
return new Response(null, {
|
|
87
|
+
status: 200
|
|
88
|
+
});
|
|
89
|
+
}
|
|
79
90
|
if (matchPath(request.pathname, '/confirm-uploads')) {
|
|
80
91
|
return jsonResponse(await confirmUploads({
|
|
81
92
|
provider,
|
|
@@ -94,22 +105,6 @@ async function dispatchEdgeStoreRequest(params) {
|
|
|
94
105
|
logger
|
|
95
106
|
}));
|
|
96
107
|
}
|
|
97
|
-
if (matchPath(request.pathname, '/proxy-file')) {
|
|
98
|
-
const url = request.getQuery('url');
|
|
99
|
-
if (url === undefined) return new Response(null, {
|
|
100
|
-
status: 400
|
|
101
|
-
});
|
|
102
|
-
const result = await fetchProxyFile({
|
|
103
|
-
cookieHeader,
|
|
104
|
-
url
|
|
105
|
-
});
|
|
106
|
-
return new Response(result.body, {
|
|
107
|
-
status: result.status,
|
|
108
|
-
headers: {
|
|
109
|
-
'Content-Type': result.contentType
|
|
110
|
-
}
|
|
111
|
-
});
|
|
112
|
-
}
|
|
113
108
|
return new Response(null, {
|
|
114
109
|
status: 404
|
|
115
110
|
});
|
|
@@ -146,7 +141,7 @@ async function toNodeDispatchResponse(response) {
|
|
|
146
141
|
status: response.status,
|
|
147
142
|
headers,
|
|
148
143
|
isJson: contentType.includes('application/json'),
|
|
149
|
-
body: response.body === null ? undefined : contentType.includes('application/json') ? await response.json() :
|
|
144
|
+
body: response.body === null ? undefined : contentType.includes('application/json') ? await response.json() : await response.text()
|
|
150
145
|
};
|
|
151
146
|
}
|
|
152
147
|
function jsonResponse(body, status = 200) {
|
|
@@ -2,13 +2,13 @@ import { type AnyContext } from '@edgestore/shared';
|
|
|
2
2
|
import { type Request, type Response } from 'express';
|
|
3
3
|
import { type LogLevel } from '../../libs/logger.js';
|
|
4
4
|
import { type CreateContextConfig } from '../dispatcher.js';
|
|
5
|
-
import type { CookieConfig,
|
|
5
|
+
import type { CookieConfig, HandlerRouter } from '../shared.js';
|
|
6
6
|
export type CreateContextOptions = {
|
|
7
7
|
req: Request;
|
|
8
8
|
res: Response;
|
|
9
9
|
};
|
|
10
10
|
export type Config<TCtx extends AnyContext> = {
|
|
11
|
-
|
|
11
|
+
router: HandlerRouter<TCtx>;
|
|
12
12
|
logLevel?: LogLevel;
|
|
13
13
|
cookieConfig?: CookieConfig;
|
|
14
14
|
} & CreateContextConfig<TCtx, CreateContextOptions>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/adapters/express/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,KAAK,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,SAAS,CAAC;AACtD,OAAe,EAAE,KAAK,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC1D,OAAO,EAIL,KAAK,mBAAmB,EACzB,MAAM,eAAe,CAAC;AACvB,OAAO,KAAK,EAAE,YAAY,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/adapters/express/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,KAAK,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,SAAS,CAAC;AACtD,OAAe,EAAE,KAAK,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC1D,OAAO,EAIL,KAAK,mBAAmB,EACzB,MAAM,eAAe,CAAC;AACvB,OAAO,KAAK,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAE7D,MAAM,MAAM,oBAAoB,GAAG;IACjC,GAAG,EAAE,OAAO,CAAC;IACb,GAAG,EAAE,QAAQ,CAAC;CACf,CAAC;AAEF,MAAM,MAAM,MAAM,CAAC,IAAI,SAAS,UAAU,IAAI;IAC5C,MAAM,EAAE,aAAa,CAAC,IAAI,CAAC,CAAC;IAC5B,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,YAAY,CAAC,EAAE,YAAY,CAAC;CAC7B,GAAG,mBAAmB,CAAC,IAAI,EAAE,oBAAoB,CAAC,CAAC;AAEpD,wBAAgB,6BAA6B,CAAC,IAAI,SAAS,UAAU,EACnE,MAAM,EAAE,MAAM,CAAC,IAAI,CAAC,IAKN,KAAK,OAAO,EAAE,KAAK,QAAQ,iDA4B1C"}
|
|
@@ -7,16 +7,12 @@ function createEdgeStoreExpressHandler(config) {
|
|
|
7
7
|
return async (req, res)=>{
|
|
8
8
|
const url = new URL(req.url ?? '', 'http://edgestore.local');
|
|
9
9
|
const response = await dispatchEdgeStoreRequest({
|
|
10
|
-
|
|
10
|
+
router: config.router,
|
|
11
11
|
logger: log,
|
|
12
12
|
cookieConfig: config.cookieConfig,
|
|
13
13
|
request: {
|
|
14
14
|
pathname: url.pathname,
|
|
15
15
|
readJson: async ()=>req.body,
|
|
16
|
-
getQuery: (name)=>{
|
|
17
|
-
const value = req.query[name];
|
|
18
|
-
return typeof value === 'string' ? value : url.searchParams.get(name) ?? undefined;
|
|
19
|
-
},
|
|
20
16
|
cookieHeader: req.headers.cookie,
|
|
21
17
|
cookies: req.cookies,
|
|
22
18
|
createContext: ()=>resolveContext(config, {
|
|
@@ -2,13 +2,13 @@ import { type AnyContext } from '@edgestore/shared';
|
|
|
2
2
|
import { type FastifyReply, type FastifyRequest } from 'fastify';
|
|
3
3
|
import { type LogLevel } from '../../libs/logger.js';
|
|
4
4
|
import { type CreateContextConfig } from '../dispatcher.js';
|
|
5
|
-
import type { CookieConfig,
|
|
5
|
+
import type { CookieConfig, HandlerRouter } from '../shared.js';
|
|
6
6
|
export type CreateContextOptions = {
|
|
7
7
|
req: FastifyRequest;
|
|
8
8
|
reply: FastifyReply;
|
|
9
9
|
};
|
|
10
10
|
export type Config<TCtx extends AnyContext> = {
|
|
11
|
-
|
|
11
|
+
router: HandlerRouter<TCtx>;
|
|
12
12
|
logLevel?: LogLevel;
|
|
13
13
|
cookieConfig?: CookieConfig;
|
|
14
14
|
} & CreateContextConfig<TCtx, CreateContextOptions>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/adapters/fastify/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,KAAK,YAAY,EAAE,KAAK,cAAc,EAAE,MAAM,SAAS,CAAC;AACjE,OAAe,EAAE,KAAK,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC1D,OAAO,EAIL,KAAK,mBAAmB,EACzB,MAAM,eAAe,CAAC;AACvB,OAAO,KAAK,EAAE,YAAY,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/adapters/fastify/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,KAAK,YAAY,EAAE,KAAK,cAAc,EAAE,MAAM,SAAS,CAAC;AACjE,OAAe,EAAE,KAAK,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC1D,OAAO,EAIL,KAAK,mBAAmB,EACzB,MAAM,eAAe,CAAC;AACvB,OAAO,KAAK,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAE7D,MAAM,MAAM,oBAAoB,GAAG;IACjC,GAAG,EAAE,cAAc,CAAC;IACpB,KAAK,EAAE,YAAY,CAAC;CACrB,CAAC;AAEF,MAAM,MAAM,MAAM,CAAC,IAAI,SAAS,UAAU,IAAI;IAC5C,MAAM,EAAE,aAAa,CAAC,IAAI,CAAC,CAAC;IAC5B,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,YAAY,CAAC,EAAE,YAAY,CAAC;CAC7B,GAAG,mBAAmB,CAAC,IAAI,EAAE,oBAAoB,CAAC,CAAC;AAEpD,wBAAgB,6BAA6B,CAAC,IAAI,SAAS,UAAU,EACnE,MAAM,EAAE,MAAM,CAAC,IAAI,CAAC,IAKN,KAAK,cAAc,EAAE,OAAO,YAAY,KAAG,OAAO,CAAC,IAAI,CAAC,CA4BvE"}
|