@edgestore/server 0.0.0-alpha.14 → 0.0.0-canary-20260731134951
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/LICENSE +21 -0
- package/README.md +131 -46
- package/adapters/astro/index.d.ts +1 -0
- package/adapters/astro/index.js +1 -0
- package/adapters/express/index.d.ts +1 -0
- package/adapters/express/index.js +1 -0
- package/adapters/fastify/index.d.ts +1 -0
- package/adapters/fastify/index.js +1 -0
- package/adapters/hono/index.d.ts +1 -0
- package/adapters/hono/index.js +1 -0
- package/adapters/next/app/index.d.ts +1 -1
- package/adapters/next/app/index.js +1 -1
- package/adapters/next/pages/index.d.ts +1 -1
- package/adapters/next/pages/index.js +1 -1
- package/adapters/remix/index.d.ts +1 -0
- package/adapters/remix/index.js +1 -0
- package/adapters/start/index.d.ts +1 -0
- package/adapters/start/index.js +1 -0
- package/core/index.d.ts +1 -1
- package/core/index.js +1 -1
- package/dist/adapters/astro/index.d.ts +12 -0
- package/dist/adapters/astro/index.d.ts.map +1 -0
- package/dist/adapters/astro/index.js +25 -0
- package/dist/adapters/dispatcher.d.ts +30 -0
- package/dist/adapters/dispatcher.d.ts.map +1 -0
- package/dist/adapters/dispatcher.js +172 -0
- package/dist/adapters/express/index.d.ts +16 -0
- package/dist/adapters/express/index.d.ts.map +1 -0
- package/dist/adapters/express/index.js +38 -0
- package/dist/adapters/fastify/index.d.ts +16 -0
- package/dist/adapters/fastify/index.d.ts.map +1 -0
- package/dist/adapters/fastify/index.js +37 -0
- package/dist/adapters/hono/index.d.ts +15 -0
- package/dist/adapters/hono/index.d.ts.map +1 -0
- package/dist/adapters/hono/index.js +24 -0
- package/dist/adapters/imageTypes.js +12 -0
- package/dist/adapters/next/app/index.d.ts +11 -13
- package/dist/adapters/next/app/index.d.ts.map +1 -1
- package/dist/adapters/next/app/index.js +27 -106
- package/dist/adapters/next/pages/index.d.ts +11 -13
- package/dist/adapters/next/pages/index.d.ts.map +1 -1
- package/dist/adapters/next/pages/index.js +43 -75
- package/dist/adapters/remix/index.d.ts +16 -0
- package/dist/adapters/remix/index.d.ts.map +1 -0
- package/dist/adapters/remix/index.js +26 -0
- package/dist/adapters/shared.d.ts +234 -54
- package/dist/adapters/shared.d.ts.map +1 -1
- package/dist/adapters/shared.js +473 -0
- package/dist/adapters/start/index.d.ts +16 -0
- package/dist/adapters/start/index.d.ts.map +1 -0
- package/dist/adapters/start/index.js +26 -0
- package/dist/core/client/bucketClient.d.ts +7 -0
- package/dist/core/client/bucketClient.d.ts.map +1 -0
- package/dist/core/client/bucketClient.js +325 -0
- package/dist/core/client/index.d.ts +219 -67
- package/dist/core/client/index.d.ts.map +1 -1
- package/dist/core/client/index.js +16 -0
- package/dist/core/index.d.ts +21 -5
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/index.js +12 -112
- package/dist/core/provider.d.ts +15 -0
- package/dist/core/provider.d.ts.map +1 -0
- package/dist/core/provider.js +25 -0
- package/dist/core/routerRules.d.ts +21 -0
- package/dist/core/routerRules.d.ts.map +1 -0
- package/dist/core/routerRules.js +54 -0
- package/dist/core/validateFile.d.ts +9 -0
- package/dist/core/validateFile.d.ts.map +1 -0
- package/dist/core/validateFile.js +43 -0
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -222
- package/dist/libs/env.d.ts +3 -0
- package/dist/libs/env.d.ts.map +1 -0
- package/dist/libs/env.js +14 -0
- package/dist/libs/errors/EdgeStoreCredentialsError.d.ts.map +1 -1
- package/dist/libs/errors/EdgeStoreCredentialsError.js +10 -0
- package/dist/libs/logger.d.ts +14 -0
- package/dist/libs/logger.d.ts.map +1 -0
- package/dist/libs/logger.js +51 -0
- package/dist/libs/utils.d.ts +5 -0
- package/dist/libs/utils.d.ts.map +1 -0
- package/dist/libs/utils.js +10 -0
- package/dist/providers/azure-blob/index.d.ts +121 -0
- package/dist/providers/azure-blob/index.d.ts.map +1 -0
- package/dist/providers/azure-blob/index.js +168 -0
- package/dist/providers/edgestore/index.d.ts +183 -3
- package/dist/providers/edgestore/index.d.ts.map +1 -1
- package/dist/providers/edgestore/index.js +317 -102
- package/dist/providers/s3/index.d.ts +139 -0
- package/dist/providers/s3/index.d.ts.map +1 -0
- package/dist/providers/s3/index.js +148 -0
- package/dist/test-utils/edgestoreSmoke.d.ts +30 -0
- package/dist/test-utils/edgestoreSmoke.d.ts.map +1 -0
- package/dist/version.d.ts +3 -0
- package/dist/version.d.ts.map +1 -0
- package/package.json +128 -52
- package/providers/azure-blob/index.d.ts +1 -0
- package/providers/azure-blob/index.js +1 -0
- package/providers/edgestore/index.d.ts +1 -1
- package/providers/edgestore/index.js +1 -1
- package/providers/s3/index.d.ts +1 -0
- package/providers/s3/index.js +1 -0
- package/src/adapters/astro/index.ts +39 -0
- package/src/adapters/dispatcher.ts +261 -0
- package/src/adapters/express/index.ts +63 -0
- package/src/adapters/fastify/index.ts +63 -0
- package/src/adapters/hono/index.ts +44 -0
- package/src/adapters/next/app/index.ts +43 -130
- package/src/adapters/next/pages/index.ts +62 -98
- package/src/adapters/remix/index.ts +44 -0
- package/src/adapters/shared.ts +531 -172
- package/src/adapters/start/index.ts +44 -0
- package/src/core/client/bucketClient.ts +493 -0
- package/src/core/client/index.ts +427 -201
- package/src/core/index.ts +40 -8
- package/src/core/provider.ts +80 -0
- package/src/core/routerRules.ts +75 -0
- package/src/core/validateFile.ts +50 -0
- package/src/index.ts +11 -1
- package/src/libs/env.ts +16 -0
- package/src/libs/errors/EdgeStoreCredentialsError.ts +1 -2
- package/src/libs/logger.ts +47 -0
- package/src/libs/utils.ts +9 -0
- package/src/providers/azure-blob/index.ts +267 -0
- package/src/providers/edgestore/index.ts +455 -108
- package/src/providers/s3/index.ts +291 -0
- package/src/test-utils/edgestoreSmoke.ts +130 -0
- package/src/version.ts +2 -0
- package/adapters/next/index.d.ts +0 -1
- package/adapters/next/index.js +0 -1
- package/dist/adapters/next/app/index.mjs +0 -111
- package/dist/adapters/next/pages/index.mjs +0 -79
- package/dist/core/index.mjs +0 -109
- package/dist/core/internals/bucketBuilder.d.ts +0 -268
- package/dist/core/internals/bucketBuilder.d.ts.map +0 -1
- package/dist/core/internals/createPathParamProxy.d.ts +0 -21
- package/dist/core/internals/createPathParamProxy.d.ts.map +0 -1
- package/dist/core/sdk/index.d.ts +0 -200
- package/dist/core/sdk/index.d.ts.map +0 -1
- package/dist/index-0a168903.js +0 -185
- package/dist/index-579b8015.mjs +0 -185
- package/dist/index-62d969e5.js +0 -189
- package/dist/index.mjs +0 -218
- package/dist/libs/errors/EdgeStoreError.d.ts +0 -16
- package/dist/libs/errors/EdgeStoreError.d.ts.map +0 -1
- package/dist/providers/aws/index.d.ts +0 -9
- package/dist/providers/aws/index.d.ts.map +0 -1
- package/dist/providers/aws/index.js +0 -81
- package/dist/providers/aws/index.mjs +0 -77
- package/dist/providers/edgestore/index.mjs +0 -118
- package/dist/providers/index.d.ts +0 -3
- package/dist/providers/index.d.ts.map +0 -1
- package/dist/providers/types.d.ts +0 -89
- package/dist/providers/types.d.ts.map +0 -1
- package/dist/shared-2a9c8307.mjs +0 -263
- package/dist/shared-ae739a04.js +0 -270
- package/dist/shared-fac1b0a0.js +0 -259
- package/dist/types.d.ts +0 -88
- package/dist/types.d.ts.map +0 -1
- package/providers/aws/index.d.ts +0 -1
- package/providers/aws/index.js +0 -1
- package/src/core/internals/bucketBuilder.ts +0 -550
- package/src/core/internals/createPathParamProxy.ts +0 -40
- package/src/core/sdk/index.ts +0 -383
- package/src/libs/errors/EdgeStoreError.ts +0 -25
- package/src/providers/aws/index.ts +0 -109
- package/src/providers/index.ts +0 -2
- package/src/providers/types.ts +0 -109
- package/src/types.ts +0 -139
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 EdgeStore contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,86 +1,171 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Docs
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Check the official [documentation](https://edgestore.dev) for more information.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
# Quick Start
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
## Next.js Setup
|
|
8
|
+
|
|
9
|
+
### Install
|
|
10
|
+
|
|
11
|
+
Let's start by installing the required packages.
|
|
12
|
+
|
|
13
|
+
```shell
|
|
14
|
+
npm install @edgestore/server @edgestore/react zod
|
|
9
15
|
```
|
|
10
16
|
|
|
11
|
-
|
|
17
|
+
### Environment Variables
|
|
18
|
+
|
|
19
|
+
Then go to your [Dashboard](https://dashboard.edgestore.dev), create a new project and copy the keys to your environment variables.
|
|
12
20
|
|
|
13
|
-
```
|
|
14
|
-
# .env
|
|
21
|
+
```shell title=".env"
|
|
15
22
|
EDGE_STORE_ACCESS_KEY=your-access-key
|
|
16
23
|
EDGE_STORE_SECRET_KEY=your-secret-key
|
|
17
24
|
```
|
|
18
25
|
|
|
19
|
-
|
|
26
|
+
### Backend
|
|
27
|
+
|
|
28
|
+
Now we can create the backend code for our Next.js app.<br/>
|
|
29
|
+
EdgeStore is compatible with both types of Next.js apps (`pages router` and `app router`).
|
|
30
|
+
|
|
31
|
+
The example below is the simplest bucket you can create with EdgeStore. Just a simple file bucket with no validation that will be accessible by anyone with the link.
|
|
32
|
+
|
|
33
|
+
You can have multiple buckets in your app, each with its own configuration.
|
|
34
|
+
|
|
35
|
+
```ts title="src/app/api/edgestore/[...edgestore]/route.ts"
|
|
36
|
+
import { createEdgeStore, initEdgeStore } from '@edgestore/server';
|
|
37
|
+
import { createEdgeStoreNextHandler } from '@edgestore/server/adapters/next/app';
|
|
38
|
+
import { edgestore } from '@edgestore/server/providers/edgestore';
|
|
20
39
|
|
|
21
|
-
|
|
22
|
-
// pages/api/edgestore/[...edgestore].js
|
|
23
|
-
import EdgeStore from '@edgestore/react/next';
|
|
40
|
+
const es = initEdgeStore.create();
|
|
24
41
|
|
|
25
|
-
|
|
42
|
+
/**
|
|
43
|
+
* This is the main router for the EdgeStore buckets.
|
|
44
|
+
*/
|
|
45
|
+
const edgeStoreRouter = es.router({
|
|
46
|
+
publicFiles: es.fileBucket(),
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
const edgeStore = createEdgeStore({
|
|
50
|
+
router: edgeStoreRouter,
|
|
51
|
+
provider: edgestore(),
|
|
52
|
+
});
|
|
53
|
+
|
|
54
|
+
const handler = createEdgeStoreNextHandler({
|
|
55
|
+
edgeStore,
|
|
56
|
+
});
|
|
57
|
+
|
|
58
|
+
export { handler as GET, handler as POST };
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* This type is used to create the type-safe client for the frontend.
|
|
62
|
+
*/
|
|
63
|
+
export type EdgeStoreRouter = typeof edgeStoreRouter;
|
|
26
64
|
```
|
|
27
65
|
|
|
28
|
-
|
|
66
|
+
### Frontend
|
|
29
67
|
|
|
30
|
-
|
|
31
|
-
// pages/_app.jsx
|
|
32
|
-
import { EdgeStoreProvider } from '@edgestore/react';
|
|
68
|
+
Now let's initiate our context provider.
|
|
33
69
|
|
|
34
|
-
|
|
70
|
+
```tsx title="src/lib/edgestore.ts"
|
|
71
|
+
'use client';
|
|
72
|
+
|
|
73
|
+
import { createEdgeStoreProvider } from '@edgestore/react';
|
|
74
|
+
import { type EdgeStoreRouter } from '../app/api/edgestore/[...edgestore]/route';
|
|
75
|
+
|
|
76
|
+
const { EdgeStoreProvider, useEdgeStore } =
|
|
77
|
+
createEdgeStoreProvider<EdgeStoreRouter>();
|
|
78
|
+
|
|
79
|
+
export { EdgeStoreProvider, useEdgeStore };
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
And then wrap our app with the provider.
|
|
83
|
+
|
|
84
|
+
```tsx title="src/app/layout.tsx"
|
|
85
|
+
import { EdgeStoreProvider } from '../lib/edgestore';
|
|
86
|
+
import './globals.css';
|
|
87
|
+
|
|
88
|
+
// ...
|
|
89
|
+
|
|
90
|
+
export default function RootLayout({
|
|
91
|
+
children,
|
|
92
|
+
}: {
|
|
93
|
+
children: React.ReactNode;
|
|
94
|
+
}) {
|
|
35
95
|
return (
|
|
36
|
-
<
|
|
37
|
-
<
|
|
38
|
-
|
|
96
|
+
<html lang="en">
|
|
97
|
+
<body>
|
|
98
|
+
<EdgeStoreProvider>{children}</EdgeStoreProvider>
|
|
99
|
+
</body>
|
|
100
|
+
</html>
|
|
39
101
|
);
|
|
40
102
|
}
|
|
41
103
|
```
|
|
42
104
|
|
|
43
|
-
### Upload
|
|
105
|
+
### Upload file
|
|
44
106
|
|
|
45
|
-
|
|
46
|
-
import { useEdgeStore } from '@edgestore/react';
|
|
107
|
+
You can use the `useEdgeStore` hook to access a typesafe frontend client and use it to upload files.
|
|
47
108
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
109
|
+
```tsx {1, 6, 19-28}
|
|
110
|
+
import * as React from 'react';
|
|
111
|
+
import { useEdgeStore } from '../lib/edgestore';
|
|
112
|
+
|
|
113
|
+
export default function Page() {
|
|
114
|
+
const [file, setFile] = React.useState<File>();
|
|
115
|
+
const { edgestore } = useEdgeStore();
|
|
51
116
|
|
|
52
117
|
return (
|
|
53
118
|
<div>
|
|
54
|
-
<input
|
|
119
|
+
<input
|
|
120
|
+
type="file"
|
|
121
|
+
onChange={(e) => {
|
|
122
|
+
setFile(e.target.files?.[0]);
|
|
123
|
+
}}
|
|
124
|
+
/>
|
|
55
125
|
<button
|
|
56
126
|
onClick={async () => {
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
127
|
+
if (file) {
|
|
128
|
+
const res = await edgestore.publicFiles.upload({
|
|
129
|
+
file,
|
|
130
|
+
onProgressChange: (progress) => {
|
|
131
|
+
// you can use this to show a progress bar
|
|
132
|
+
console.log(progress);
|
|
133
|
+
},
|
|
134
|
+
});
|
|
135
|
+
// you can run some server action or api here
|
|
136
|
+
// to add the necessary data to your database
|
|
137
|
+
console.log(res);
|
|
138
|
+
}
|
|
61
139
|
}}
|
|
62
140
|
>
|
|
63
141
|
Upload
|
|
64
142
|
</button>
|
|
65
143
|
</div>
|
|
66
144
|
);
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
export default Page;
|
|
145
|
+
}
|
|
70
146
|
```
|
|
71
147
|
|
|
72
|
-
###
|
|
148
|
+
### Replace file
|
|
73
149
|
|
|
74
|
-
|
|
75
|
-
|
|
150
|
+
By passing the `replaceTargetUrl` option, you can replace an existing file with a new one.
|
|
151
|
+
It will automatically delete the old file after the upload is complete.
|
|
76
152
|
|
|
77
|
-
|
|
78
|
-
const { getImgSrc } = useEdgeStore();
|
|
153
|
+
You can also upload the file using the same file name, but in that case, you might still see the old file for a while because of the CDN cache.
|
|
79
154
|
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
}
|
|
155
|
+
```tsx
|
|
156
|
+
const res = await edgestore.publicFiles.upload({
|
|
157
|
+
file,
|
|
158
|
+
options: {
|
|
159
|
+
replaceTargetUrl: oldFileUrl,
|
|
160
|
+
},
|
|
161
|
+
// ...
|
|
162
|
+
});
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
### Delete file
|
|
166
|
+
|
|
167
|
+
```tsx
|
|
168
|
+
await edgestore.publicFiles.delete({
|
|
169
|
+
url: urlToDelete,
|
|
170
|
+
});
|
|
86
171
|
```
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '../../dist/adapters/astro/index.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '../../dist/adapters/astro/index.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '../../dist/adapters/express/index.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '../../dist/adapters/express/index.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '../../dist/adapters/fastify/index.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '../../dist/adapters/fastify/index.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '../../dist/adapters/hono/index.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '../../dist/adapters/hono/index.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from '../../../dist/adapters/next/app';
|
|
1
|
+
export * from '../../../dist/adapters/next/app/index.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
export * from '../../../dist/adapters/next/app/index.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from '../../../dist/adapters/next/pages';
|
|
1
|
+
export * from '../../../dist/adapters/next/pages/index.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
export * from '../../../dist/adapters/next/pages/index.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '../../dist/adapters/remix/index.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '../../dist/adapters/remix/index.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '../../dist/adapters/start/index.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '../../dist/adapters/start/index.js';
|
package/core/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from '../dist/core';
|
|
1
|
+
export * from '../dist/core/index.js';
|
package/core/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
export * from '../dist/core/index.js';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type AnyContext } from '@edgestore/shared';
|
|
2
|
+
import type { APIContext } from 'astro';
|
|
3
|
+
import { type LogLevel } from '../../libs/logger.js';
|
|
4
|
+
import { type CreateContextConfig } from '../dispatcher.js';
|
|
5
|
+
import type { CookieConfig, HandlerEdgeStore } from '../shared.js';
|
|
6
|
+
export type Config<TCtx extends AnyContext> = {
|
|
7
|
+
edgeStore: HandlerEdgeStore<TCtx>;
|
|
8
|
+
logLevel?: LogLevel;
|
|
9
|
+
cookieConfig?: CookieConfig;
|
|
10
|
+
} & CreateContextConfig<TCtx, APIContext>;
|
|
11
|
+
export declare function createEdgeStoreAstroHandler<TCtx extends AnyContext>(config: Config<TCtx>): (context: APIContext) => Promise<Response>;
|
|
12
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +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,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAEhE,MAAM,MAAM,MAAM,CAAC,IAAI,SAAS,UAAU,IAAI;IAC5C,SAAS,EAAE,gBAAgB,CAAC,IAAI,CAAC,CAAC;IAClC,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,uBAgBlC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import Logger from '../../libs/logger.js';
|
|
2
|
+
import { dispatchEdgeStoreRequest, resolveContext } from '../dispatcher.js';
|
|
3
|
+
|
|
4
|
+
function createEdgeStoreAstroHandler(config) {
|
|
5
|
+
const log = new Logger(config.logLevel);
|
|
6
|
+
log.debug('Creating EdgeStore Astro handler');
|
|
7
|
+
return async (context)=>{
|
|
8
|
+
const { request } = context;
|
|
9
|
+
const url = new URL(request.url);
|
|
10
|
+
return await dispatchEdgeStoreRequest({
|
|
11
|
+
edgeStore: config.edgeStore,
|
|
12
|
+
logger: log,
|
|
13
|
+
cookieConfig: config.cookieConfig,
|
|
14
|
+
request: {
|
|
15
|
+
pathname: url.pathname,
|
|
16
|
+
readJson: ()=>request.json(),
|
|
17
|
+
getQuery: (name)=>url.searchParams.get(name) ?? undefined,
|
|
18
|
+
cookieHeader: request.headers.get('cookie') ?? undefined,
|
|
19
|
+
createContext: ()=>resolveContext(config, context)
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export { createEdgeStoreAstroHandler };
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { type AnyContext, type MaybePromise } from '@edgestore/shared';
|
|
2
|
+
import type { LoggerLike } from '../libs/logger.js';
|
|
3
|
+
import { type CookieConfig, type HandlerEdgeStore } from './shared.js';
|
|
4
|
+
export type EdgeStoreDispatchRequest<TCtx extends AnyContext> = {
|
|
5
|
+
pathname: string;
|
|
6
|
+
readJson: () => Promise<unknown>;
|
|
7
|
+
getQuery: (name: string) => string | undefined;
|
|
8
|
+
cookieHeader?: string;
|
|
9
|
+
cookies?: Readonly<Record<string, string | undefined>>;
|
|
10
|
+
createContext: () => MaybePromise<TCtx>;
|
|
11
|
+
};
|
|
12
|
+
export type CreateContextConfig<TCtx extends AnyContext, TOptions> = TCtx extends Record<string, never> ? {
|
|
13
|
+
createContext?: (options: TOptions) => MaybePromise<TCtx>;
|
|
14
|
+
} : {
|
|
15
|
+
createContext: (options: TOptions) => MaybePromise<TCtx>;
|
|
16
|
+
};
|
|
17
|
+
export declare function resolveContext<TCtx extends AnyContext, TOptions>(config: object, options: TOptions): MaybePromise<TCtx>;
|
|
18
|
+
export declare function dispatchEdgeStoreRequest<TCtx extends AnyContext>(params: {
|
|
19
|
+
edgeStore: HandlerEdgeStore<TCtx>;
|
|
20
|
+
request: EdgeStoreDispatchRequest<TCtx>;
|
|
21
|
+
logger: LoggerLike;
|
|
22
|
+
cookieConfig?: CookieConfig;
|
|
23
|
+
}): Promise<Response>;
|
|
24
|
+
export declare function toNodeDispatchResponse(response: Response): Promise<{
|
|
25
|
+
status: number;
|
|
26
|
+
headers: [string, string | string[]][];
|
|
27
|
+
isJson: boolean;
|
|
28
|
+
body: any;
|
|
29
|
+
}>;
|
|
30
|
+
//# sourceMappingURL=dispatcher.d.ts.map
|
|
@@ -0,0 +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,EAcL,KAAK,YAAY,EACjB,KAAK,gBAAgB,EACtB,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,QAAQ,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,GAAG,SAAS,CAAC;IAC/C,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,SAAS,EAAE,gBAAgB,CAAC,IAAI,CAAC,CAAC;IAClC,OAAO,EAAE,wBAAwB,CAAC,IAAI,CAAC,CAAC;IACxC,MAAM,EAAE,UAAU,CAAC;IACnB,YAAY,CAAC,EAAE,YAAY,CAAC;CAC7B,GAAG,OAAO,CAAC,QAAQ,CAAC,CA2IpB;AAED,wBAAsB,sBAAsB,CAAC,QAAQ,EAAE,QAAQ;;;;;GAwB9D"}
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
import { EdgeStoreError, EDGE_STORE_ERROR_CODES } from '@edgestore/shared';
|
|
2
|
+
import { parseCookie } from 'cookie';
|
|
3
|
+
import { matchPath } from '../libs/utils.js';
|
|
4
|
+
import { getCookieConfig, init, requestUpload, requestUploadBodySchema, requestUploadParts, requestUploadPartsBodySchema, completeMultipartUpload, completeMultipartUploadBodySchema, confirmUploads, confirmUploadsBodySchema, deleteFiles, deleteFilesBodySchema, fetchProxyFile } from './shared.js';
|
|
5
|
+
|
|
6
|
+
function resolveContext(config, options) {
|
|
7
|
+
return hasCreateContext(config) ? config.createContext(options) : {};
|
|
8
|
+
}
|
|
9
|
+
function hasCreateContext(config) {
|
|
10
|
+
return 'createContext' in config && typeof config.createContext === 'function';
|
|
11
|
+
}
|
|
12
|
+
async function dispatchEdgeStoreRequest(params) {
|
|
13
|
+
const { edgeStore, request, logger, cookieConfig } = params;
|
|
14
|
+
const { provider, router } = edgeStore;
|
|
15
|
+
const resolvedCookieConfig = getCookieConfig(cookieConfig);
|
|
16
|
+
const cookieHeader = request.cookieHeader ?? Object.entries(request.cookies ?? {}).filter((entry)=>entry[1] !== undefined).map(([name, value])=>`${name}=${value}`).join('; ');
|
|
17
|
+
const ctxToken = request.cookies?.[resolvedCookieConfig.ctx.name] ?? (cookieHeader ? parseCookie(cookieHeader)[resolvedCookieConfig.ctx.name] : undefined);
|
|
18
|
+
try {
|
|
19
|
+
if (matchPath(request.pathname, '/health')) {
|
|
20
|
+
return new Response('OK');
|
|
21
|
+
}
|
|
22
|
+
if (matchPath(request.pathname, '/init')) {
|
|
23
|
+
let ctx;
|
|
24
|
+
try {
|
|
25
|
+
ctx = await request.createContext();
|
|
26
|
+
} catch (error) {
|
|
27
|
+
throw new EdgeStoreError({
|
|
28
|
+
message: 'Error creating context',
|
|
29
|
+
code: 'CREATE_CONTEXT_ERROR',
|
|
30
|
+
cause: error instanceof Error ? error : undefined
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
const { newCookies, ...body } = await init({
|
|
34
|
+
ctx,
|
|
35
|
+
provider,
|
|
36
|
+
router,
|
|
37
|
+
logger,
|
|
38
|
+
cookieConfig
|
|
39
|
+
});
|
|
40
|
+
const headers = new Headers({
|
|
41
|
+
'Content-Type': 'application/json'
|
|
42
|
+
});
|
|
43
|
+
for (const cookie of newCookies)headers.append('Set-Cookie', cookie);
|
|
44
|
+
return new Response(JSON.stringify(body), {
|
|
45
|
+
status: 200,
|
|
46
|
+
headers
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
if (matchPath(request.pathname, '/request-upload')) {
|
|
50
|
+
return jsonResponse(await requestUpload({
|
|
51
|
+
provider,
|
|
52
|
+
router,
|
|
53
|
+
body: await parseRequestBody(request, requestUploadBodySchema),
|
|
54
|
+
ctxToken,
|
|
55
|
+
logger
|
|
56
|
+
}));
|
|
57
|
+
}
|
|
58
|
+
if (matchPath(request.pathname, '/request-upload-parts')) {
|
|
59
|
+
return jsonResponse(await requestUploadParts({
|
|
60
|
+
provider,
|
|
61
|
+
router,
|
|
62
|
+
body: await parseRequestBody(request, requestUploadPartsBodySchema),
|
|
63
|
+
ctxToken,
|
|
64
|
+
logger
|
|
65
|
+
}));
|
|
66
|
+
}
|
|
67
|
+
if (matchPath(request.pathname, '/complete-multipart-upload')) {
|
|
68
|
+
await completeMultipartUpload({
|
|
69
|
+
provider,
|
|
70
|
+
router,
|
|
71
|
+
body: await parseRequestBody(request, completeMultipartUploadBodySchema),
|
|
72
|
+
ctxToken,
|
|
73
|
+
logger
|
|
74
|
+
});
|
|
75
|
+
return new Response(null, {
|
|
76
|
+
status: 200
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
if (matchPath(request.pathname, '/confirm-uploads')) {
|
|
80
|
+
return jsonResponse(await confirmUploads({
|
|
81
|
+
provider,
|
|
82
|
+
router,
|
|
83
|
+
body: await parseRequestBody(request, confirmUploadsBodySchema),
|
|
84
|
+
ctxToken,
|
|
85
|
+
logger
|
|
86
|
+
}));
|
|
87
|
+
}
|
|
88
|
+
if (matchPath(request.pathname, '/delete-files')) {
|
|
89
|
+
return jsonResponse(await deleteFiles({
|
|
90
|
+
provider,
|
|
91
|
+
router,
|
|
92
|
+
body: await parseRequestBody(request, deleteFilesBodySchema),
|
|
93
|
+
ctxToken,
|
|
94
|
+
logger
|
|
95
|
+
}));
|
|
96
|
+
}
|
|
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
|
+
return new Response(null, {
|
|
114
|
+
status: 404
|
|
115
|
+
});
|
|
116
|
+
} catch (error) {
|
|
117
|
+
if (error instanceof EdgeStoreError) {
|
|
118
|
+
logger[error.level](error.formattedMessage());
|
|
119
|
+
if (error.cause) logger[error.level](error.cause);
|
|
120
|
+
return jsonResponse(error.formattedJson(), EDGE_STORE_ERROR_CODES[error.code]);
|
|
121
|
+
}
|
|
122
|
+
logger.error(error);
|
|
123
|
+
return jsonResponse(new EdgeStoreError({
|
|
124
|
+
message: 'Internal server error',
|
|
125
|
+
code: 'SERVER_ERROR'
|
|
126
|
+
}).formattedJson(), 500);
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
async function toNodeDispatchResponse(response) {
|
|
130
|
+
const contentType = response.headers.get('Content-Type') ?? '';
|
|
131
|
+
const headers = [];
|
|
132
|
+
response.headers.forEach((value, name)=>{
|
|
133
|
+
if (name !== 'set-cookie') {
|
|
134
|
+
headers.push([
|
|
135
|
+
name === 'content-type' ? 'Content-Type' : name,
|
|
136
|
+
value
|
|
137
|
+
]);
|
|
138
|
+
}
|
|
139
|
+
});
|
|
140
|
+
const setCookies = response.headers.getSetCookie();
|
|
141
|
+
if (setCookies.length > 0) headers.push([
|
|
142
|
+
'Set-Cookie',
|
|
143
|
+
setCookies
|
|
144
|
+
]);
|
|
145
|
+
return {
|
|
146
|
+
status: response.status,
|
|
147
|
+
headers,
|
|
148
|
+
isJson: contentType.includes('application/json'),
|
|
149
|
+
body: response.body === null ? undefined : contentType.includes('application/json') ? await response.json() : contentType.startsWith('text/') ? await response.text() : Buffer.from(await response.arrayBuffer())
|
|
150
|
+
};
|
|
151
|
+
}
|
|
152
|
+
function jsonResponse(body, status = 200) {
|
|
153
|
+
return new Response(JSON.stringify(body), {
|
|
154
|
+
status,
|
|
155
|
+
headers: {
|
|
156
|
+
'Content-Type': 'application/json'
|
|
157
|
+
}
|
|
158
|
+
});
|
|
159
|
+
}
|
|
160
|
+
async function parseRequestBody(request, schema) {
|
|
161
|
+
try {
|
|
162
|
+
return await schema.parseAsync(await request.readJson());
|
|
163
|
+
} catch (error) {
|
|
164
|
+
throw new EdgeStoreError({
|
|
165
|
+
message: 'Invalid request body',
|
|
166
|
+
code: 'BAD_REQUEST',
|
|
167
|
+
cause: error instanceof Error ? error : undefined
|
|
168
|
+
});
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
export { dispatchEdgeStoreRequest, resolveContext, toNodeDispatchResponse };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { type AnyContext } from '@edgestore/shared';
|
|
2
|
+
import { type Request, type Response } from 'express';
|
|
3
|
+
import { type LogLevel } from '../../libs/logger.js';
|
|
4
|
+
import { type CreateContextConfig } from '../dispatcher.js';
|
|
5
|
+
import type { CookieConfig, HandlerEdgeStore } from '../shared.js';
|
|
6
|
+
export type CreateContextOptions = {
|
|
7
|
+
req: Request;
|
|
8
|
+
res: Response;
|
|
9
|
+
};
|
|
10
|
+
export type Config<TCtx extends AnyContext> = {
|
|
11
|
+
edgeStore: HandlerEdgeStore<TCtx>;
|
|
12
|
+
logLevel?: LogLevel;
|
|
13
|
+
cookieConfig?: CookieConfig;
|
|
14
|
+
} & CreateContextConfig<TCtx, CreateContextOptions>;
|
|
15
|
+
export declare function createEdgeStoreExpressHandler<TCtx extends AnyContext>(config: Config<TCtx>): (req: Request, res: Response) => Promise<Response<any, Record<string, any>>>;
|
|
16
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +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,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAEhE,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,SAAS,EAAE,gBAAgB,CAAC,IAAI,CAAC,CAAC;IAClC,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,iDAkC1C"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import Logger from '../../libs/logger.js';
|
|
2
|
+
import { dispatchEdgeStoreRequest, toNodeDispatchResponse, resolveContext } from '../dispatcher.js';
|
|
3
|
+
|
|
4
|
+
function createEdgeStoreExpressHandler(config) {
|
|
5
|
+
const log = new Logger(config.logLevel);
|
|
6
|
+
log.debug('Creating EdgeStore Express handler');
|
|
7
|
+
return async (req, res)=>{
|
|
8
|
+
const url = new URL(req.url ?? '', 'http://edgestore.local');
|
|
9
|
+
const response = await dispatchEdgeStoreRequest({
|
|
10
|
+
edgeStore: config.edgeStore,
|
|
11
|
+
logger: log,
|
|
12
|
+
cookieConfig: config.cookieConfig,
|
|
13
|
+
request: {
|
|
14
|
+
pathname: url.pathname,
|
|
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
|
+
cookieHeader: req.headers.cookie,
|
|
21
|
+
cookies: req.cookies,
|
|
22
|
+
createContext: ()=>resolveContext(config, {
|
|
23
|
+
req,
|
|
24
|
+
res
|
|
25
|
+
})
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
const normalized = await toNodeDispatchResponse(response);
|
|
29
|
+
for (const [name, value] of normalized.headers){
|
|
30
|
+
res.setHeader(name, value);
|
|
31
|
+
}
|
|
32
|
+
res.status(normalized.status);
|
|
33
|
+
if (normalized.body === undefined) return res.end();
|
|
34
|
+
return normalized.isJson ? res.json(normalized.body) : res.end(normalized.body);
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export { createEdgeStoreExpressHandler };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { type AnyContext } from '@edgestore/shared';
|
|
2
|
+
import { type FastifyReply, type FastifyRequest } from 'fastify';
|
|
3
|
+
import { type LogLevel } from '../../libs/logger.js';
|
|
4
|
+
import { type CreateContextConfig } from '../dispatcher.js';
|
|
5
|
+
import type { CookieConfig, HandlerEdgeStore } from '../shared.js';
|
|
6
|
+
export type CreateContextOptions = {
|
|
7
|
+
req: FastifyRequest;
|
|
8
|
+
reply: FastifyReply;
|
|
9
|
+
};
|
|
10
|
+
export type Config<TCtx extends AnyContext> = {
|
|
11
|
+
edgeStore: HandlerEdgeStore<TCtx>;
|
|
12
|
+
logLevel?: LogLevel;
|
|
13
|
+
cookieConfig?: CookieConfig;
|
|
14
|
+
} & CreateContextConfig<TCtx, CreateContextOptions>;
|
|
15
|
+
export declare function createEdgeStoreFastifyHandler<TCtx extends AnyContext>(config: Config<TCtx>): (req: FastifyRequest, reply: FastifyReply) => Promise<void>;
|
|
16
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +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,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAEhE,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,SAAS,EAAE,gBAAgB,CAAC,IAAI,CAAC,CAAC;IAClC,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,CAkCvE"}
|