@edgestore/server 0.5.3 → 0.5.6
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/dist/adapters/astro/index.d.ts.map +1 -1
- package/dist/adapters/astro/index.js +6 -5
- package/dist/adapters/astro/index.mjs +6 -5
- package/dist/adapters/express/index.d.ts.map +1 -1
- package/dist/adapters/express/index.js +6 -5
- package/dist/adapters/express/index.mjs +6 -5
- package/dist/adapters/fastify/index.d.ts.map +1 -1
- package/dist/adapters/fastify/index.js +6 -5
- package/dist/adapters/fastify/index.mjs +6 -5
- package/dist/adapters/hono/index.d.ts +1 -0
- package/dist/adapters/hono/index.d.ts.map +1 -1
- package/dist/adapters/hono/index.js +6 -5
- package/dist/adapters/hono/index.mjs +6 -5
- package/dist/adapters/next/app/index.d.ts.map +1 -1
- package/dist/adapters/next/app/index.js +6 -5
- package/dist/adapters/next/app/index.mjs +6 -5
- package/dist/adapters/next/pages/index.d.ts.map +1 -1
- package/dist/adapters/next/pages/index.js +6 -5
- package/dist/adapters/next/pages/index.mjs +6 -5
- package/dist/adapters/remix/index.js +6 -5
- package/dist/adapters/remix/index.mjs +6 -5
- package/dist/adapters/shared.d.ts.map +1 -1
- package/dist/adapters/start/index.js +6 -5
- package/dist/adapters/start/index.mjs +6 -5
- package/dist/core/index.js +2 -2
- package/dist/core/index.mjs +3 -3
- package/dist/{index-0c5489b9.js → index-1e7b1b93.js} +1 -1
- package/dist/{index-e0432eed.mjs → index-a36b09a6.mjs} +1 -1
- package/dist/{index-c5c3cdaa.js → index-b0fff508.js} +1 -1
- package/dist/providers/aws/index.d.ts.map +1 -1
- package/dist/providers/aws/index.js +2 -1
- package/dist/providers/aws/index.mjs +2 -1
- package/dist/providers/azure/index.d.ts.map +1 -1
- package/dist/providers/azure/index.js +2 -1
- package/dist/providers/azure/index.mjs +2 -1
- package/dist/providers/edgestore/index.d.ts.map +1 -1
- package/dist/providers/edgestore/index.js +3 -2
- package/dist/providers/edgestore/index.mjs +3 -2
- package/dist/{shared-8a6bcddb.js → shared-4ec2dc90.js} +4 -2
- package/dist/{shared-8397d4db.js → shared-64e9c30c.js} +8 -1
- package/dist/{shared-d2a0d681.mjs → shared-c6527780.mjs} +4 -2
- package/dist/{utils-681a13a7.js → utils-26113e02.js} +1 -1
- package/dist/{utils-b30649cc.js → utils-ab564a9e.js} +1 -1
- package/dist/{utils-2dd5613c.mjs → utils-cba23eef.mjs} +1 -1
- package/package.json +7 -6
- package/src/adapters/astro/index.ts +2 -1
- package/src/adapters/express/index.ts +2 -1
- package/src/adapters/fastify/index.ts +2 -1
- package/src/adapters/hono/index.ts +2 -1
- package/src/adapters/next/app/index.ts +2 -1
- package/src/adapters/next/pages/index.ts +2 -1
- package/src/adapters/remix/index.ts +2 -2
- package/src/adapters/shared.ts +8 -1
- package/src/adapters/start/index.ts +2 -2
- package/src/providers/aws/index.ts +1 -0
- package/src/providers/azure/index.ts +1 -0
- package/src/providers/edgestore/index.ts +1 -0
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.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/adapters/astro/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,KAAK,eAAe,EACpB,KAAK,YAAY,EACjB,KAAK,QAAQ,EACd,MAAM,mBAAmB,CAAC;AAC3B,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AACxC,OAAe,EAAE,KAAK,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAG1D,OAAO,EAUL,KAAK,YAAY,EAIlB,MAAM,WAAW,CAAC;AAEnB,MAAM,MAAM,MAAM,CAAC,IAAI,IAAI;IACzB,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,MAAM,EAAE,eAAe,CAAC,IAAI,CAAC,CAAC;IAC9B,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,YAAY,CAAC,EAAE,YAAY,CAAC;CAC7B,GAAG,CAAC,IAAI,SAAS,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,GACnC,MAAM,GACN;IACE,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,MAAM,EAAE,eAAe,CAAC,IAAI,CAAC,CAAC;IAC9B,aAAa,EAAE,CAAC,IAAI,EAAE,UAAU,KAAK,YAAY,CAAC,IAAI,CAAC,CAAC;IACxD,YAAY,CAAC,EAAE,YAAY,CAAC;CAC7B,CAAC,CAAC;AAsBP,wBAAgB,2BAA2B,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,CAAC,IAAI,CAAC,aAQ7C,UAAU,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/adapters/astro/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,KAAK,eAAe,EACpB,KAAK,YAAY,EACjB,KAAK,QAAQ,EACd,MAAM,mBAAmB,CAAC;AAC3B,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AACxC,OAAe,EAAE,KAAK,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAG1D,OAAO,EAUL,KAAK,YAAY,EAIlB,MAAM,WAAW,CAAC;AAEnB,MAAM,MAAM,MAAM,CAAC,IAAI,IAAI;IACzB,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,MAAM,EAAE,eAAe,CAAC,IAAI,CAAC,CAAC;IAC9B,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,YAAY,CAAC,EAAE,YAAY,CAAC;CAC7B,GAAG,CAAC,IAAI,SAAS,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,GACnC,MAAM,GACN;IACE,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,MAAM,EAAE,eAAe,CAAC,IAAI,CAAC,CAAC;IAC9B,aAAa,EAAE,CAAC,IAAI,EAAE,UAAU,KAAK,YAAY,CAAC,IAAI,CAAC,CAAC;IACxD,YAAY,CAAC,EAAE,YAAY,CAAC;CAC7B,CAAC,CAAC;AAsBP,wBAAgB,2BAA2B,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,CAAC,IAAI,CAAC,aAQ7C,UAAU,uBAkKlC"}
|
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var shared$1 = require('@edgestore/shared');
|
|
6
|
-
var utils = require('../../utils-
|
|
6
|
+
var utils = require('../../utils-26113e02.js');
|
|
7
7
|
var providers_edgestore_index = require('../../providers/edgestore/index.js');
|
|
8
|
-
var shared = require('../../shared-
|
|
9
|
-
require('../../index-
|
|
8
|
+
var shared = require('../../shared-4ec2dc90.js');
|
|
9
|
+
require('../../index-1e7b1b93.js');
|
|
10
10
|
require('@panva/hkdf');
|
|
11
11
|
require('cookie');
|
|
12
12
|
require('jose');
|
|
@@ -46,7 +46,7 @@ function createEdgeStoreAstroHandler(config) {
|
|
|
46
46
|
cause: err instanceof Error ? err : undefined
|
|
47
47
|
});
|
|
48
48
|
}
|
|
49
|
-
const { newCookies, token, baseUrl } = await shared.init({
|
|
49
|
+
const { newCookies, token, baseUrl, providerName } = await shared.init({
|
|
50
50
|
ctx,
|
|
51
51
|
provider,
|
|
52
52
|
router: config.router,
|
|
@@ -64,7 +64,8 @@ function createEdgeStoreAstroHandler(config) {
|
|
|
64
64
|
}
|
|
65
65
|
return new Response(JSON.stringify({
|
|
66
66
|
token,
|
|
67
|
-
baseUrl
|
|
67
|
+
baseUrl,
|
|
68
|
+
providerName
|
|
68
69
|
}), {
|
|
69
70
|
headers
|
|
70
71
|
});
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { EdgeStoreError, EDGE_STORE_ERROR_CODES } from '@edgestore/shared';
|
|
2
|
-
import { L as Logger, m as matchPath } from '../../utils-
|
|
2
|
+
import { L as Logger, m as matchPath } from '../../utils-cba23eef.mjs';
|
|
3
3
|
import { EdgeStoreProvider } from '../../providers/edgestore/index.mjs';
|
|
4
|
-
import { a as getCookieConfig, c as init, r as requestUpload, d as requestUploadParts, e as completeMultipartUpload, f as confirmUpload, h as deleteFile } from '../../shared-
|
|
5
|
-
import '../../index-
|
|
4
|
+
import { a as getCookieConfig, c as init, r as requestUpload, d as requestUploadParts, e as completeMultipartUpload, f as confirmUpload, h as deleteFile } from '../../shared-c6527780.mjs';
|
|
5
|
+
import '../../index-a36b09a6.mjs';
|
|
6
6
|
import '@panva/hkdf';
|
|
7
7
|
import 'cookie';
|
|
8
8
|
import 'jose';
|
|
@@ -42,7 +42,7 @@ function createEdgeStoreAstroHandler(config) {
|
|
|
42
42
|
cause: err instanceof Error ? err : undefined
|
|
43
43
|
});
|
|
44
44
|
}
|
|
45
|
-
const { newCookies, token, baseUrl } = await init({
|
|
45
|
+
const { newCookies, token, baseUrl, providerName } = await init({
|
|
46
46
|
ctx,
|
|
47
47
|
provider,
|
|
48
48
|
router: config.router,
|
|
@@ -60,7 +60,8 @@ function createEdgeStoreAstroHandler(config) {
|
|
|
60
60
|
}
|
|
61
61
|
return new Response(JSON.stringify({
|
|
62
62
|
token,
|
|
63
|
-
baseUrl
|
|
63
|
+
baseUrl,
|
|
64
|
+
providerName
|
|
64
65
|
}), {
|
|
65
66
|
headers
|
|
66
67
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/adapters/express/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,KAAK,eAAe,EACpB,KAAK,YAAY,EACjB,KAAK,QAAQ,EACd,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,KAAK,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,SAAS,CAAC;AACtD,OAAe,EAAE,KAAK,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAG1D,OAAO,EAUL,KAAK,YAAY,EAIlB,MAAM,WAAW,CAAC;AAEnB,MAAM,MAAM,oBAAoB,GAAG;IACjC,GAAG,EAAE,OAAO,CAAC;IACb,GAAG,EAAE,QAAQ,CAAC;CACf,CAAC;AAEF,MAAM,MAAM,MAAM,CAAC,IAAI,IAAI;IACzB,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,MAAM,EAAE,eAAe,CAAC,IAAI,CAAC,CAAC;IAC9B,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,YAAY,CAAC,EAAE,YAAY,CAAC;CAC7B,GAAG,CAAC,IAAI,SAAS,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,GACnC,MAAM,GACN;IACE,QAAQ,CAAC,EA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AClE,YAAY,CAAC,EAAE,YAAY,CAAC;CAC7B,CAAC,CAAC;AAMP,wBAAgB,6BAA6B,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,CAAC,IAAI,CAAC,SAQnD,OAAO,OAAO,QAAQ,mBAmH1C"}
|
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var shared$1 = require('@edgestore/shared');
|
|
6
|
-
var utils = require('../../utils-
|
|
6
|
+
var utils = require('../../utils-26113e02.js');
|
|
7
7
|
var providers_edgestore_index = require('../../providers/edgestore/index.js');
|
|
8
|
-
var shared = require('../../shared-
|
|
9
|
-
require('../../index-
|
|
8
|
+
var shared = require('../../shared-4ec2dc90.js');
|
|
9
|
+
require('../../index-1e7b1b93.js');
|
|
10
10
|
require('@panva/hkdf');
|
|
11
11
|
require('cookie');
|
|
12
12
|
require('jose');
|
|
@@ -37,7 +37,7 @@ function createEdgeStoreExpressHandler(config) {
|
|
|
37
37
|
cause: err instanceof Error ? err : undefined
|
|
38
38
|
});
|
|
39
39
|
}
|
|
40
|
-
const { newCookies, token, baseUrl } = await shared.init({
|
|
40
|
+
const { newCookies, token, baseUrl, providerName } = await shared.init({
|
|
41
41
|
ctx,
|
|
42
42
|
provider,
|
|
43
43
|
router: config.router,
|
|
@@ -46,7 +46,8 @@ function createEdgeStoreExpressHandler(config) {
|
|
|
46
46
|
res.setHeader('Set-Cookie', newCookies);
|
|
47
47
|
res.json({
|
|
48
48
|
token,
|
|
49
|
-
baseUrl
|
|
49
|
+
baseUrl,
|
|
50
|
+
providerName
|
|
50
51
|
});
|
|
51
52
|
} else if (utils.matchPath(pathname, '/request-upload')) {
|
|
52
53
|
res.json(await shared.requestUpload({
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { EdgeStoreError, EDGE_STORE_ERROR_CODES } from '@edgestore/shared';
|
|
2
|
-
import { L as Logger, m as matchPath } from '../../utils-
|
|
2
|
+
import { L as Logger, m as matchPath } from '../../utils-cba23eef.mjs';
|
|
3
3
|
import { EdgeStoreProvider } from '../../providers/edgestore/index.mjs';
|
|
4
|
-
import { a as getCookieConfig, c as init, r as requestUpload, d as requestUploadParts, e as completeMultipartUpload, f as confirmUpload, h as deleteFile } from '../../shared-
|
|
5
|
-
import '../../index-
|
|
4
|
+
import { a as getCookieConfig, c as init, r as requestUpload, d as requestUploadParts, e as completeMultipartUpload, f as confirmUpload, h as deleteFile } from '../../shared-c6527780.mjs';
|
|
5
|
+
import '../../index-a36b09a6.mjs';
|
|
6
6
|
import '@panva/hkdf';
|
|
7
7
|
import 'cookie';
|
|
8
8
|
import 'jose';
|
|
@@ -33,7 +33,7 @@ function createEdgeStoreExpressHandler(config) {
|
|
|
33
33
|
cause: err instanceof Error ? err : undefined
|
|
34
34
|
});
|
|
35
35
|
}
|
|
36
|
-
const { newCookies, token, baseUrl } = await init({
|
|
36
|
+
const { newCookies, token, baseUrl, providerName } = await init({
|
|
37
37
|
ctx,
|
|
38
38
|
provider,
|
|
39
39
|
router: config.router,
|
|
@@ -42,7 +42,8 @@ function createEdgeStoreExpressHandler(config) {
|
|
|
42
42
|
res.setHeader('Set-Cookie', newCookies);
|
|
43
43
|
res.json({
|
|
44
44
|
token,
|
|
45
|
-
baseUrl
|
|
45
|
+
baseUrl,
|
|
46
|
+
providerName
|
|
46
47
|
});
|
|
47
48
|
} else if (matchPath(pathname, '/request-upload')) {
|
|
48
49
|
res.json(await requestUpload({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/adapters/fastify/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,KAAK,eAAe,EACpB,KAAK,YAAY,EACjB,KAAK,QAAQ,EACd,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,KAAK,YAAY,EAAE,KAAK,cAAc,EAAE,MAAM,SAAS,CAAC;AACjE,OAAe,EAAE,KAAK,QAAQ,EAAE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B,KAAK,EAAE,YAAY,CAAC;CACrB,CAAC;AAEF,MAAM,MAAM,MAAM,CAAC,IAAI,IAAI;IACzB,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,MAAM,EAAE,eAAe,CAAC,IAAI,CAAC,CAAC;IAC9B,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,YAAY,CAAC,EAAE,YAAY,CAAC;CAC7B,GAAG,CAAC,IAAI,SAAS,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,GACnC,MAAM,GACN;IACE,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,MAAM,EAAE,eAAe,CAAC,IAAI,CAAC,CAAC;IAC9B,aAAa,EAAE,CAAC,IAAI,EAAE,oBAAoB,KAAK,YAAY,CAAC,IAAI,CAAC,CAAC;IAClE,YAAY,CAAC,EAAE,YAAY,CAAC;CAC7B,CAAC,CAAC;AA6BP,wBAAgB,6BAA6B,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,CAAC,IAAI,CAAC,SAQnD,cAAc,SAAS,YAAY,oBAsIvD"}
|
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var shared$1 = require('@edgestore/shared');
|
|
6
|
-
var utils = require('../../utils-
|
|
6
|
+
var utils = require('../../utils-26113e02.js');
|
|
7
7
|
var providers_edgestore_index = require('../../providers/edgestore/index.js');
|
|
8
|
-
var shared = require('../../shared-
|
|
9
|
-
require('../../index-
|
|
8
|
+
var shared = require('../../shared-4ec2dc90.js');
|
|
9
|
+
require('../../index-1e7b1b93.js');
|
|
10
10
|
require('@panva/hkdf');
|
|
11
11
|
require('cookie');
|
|
12
12
|
require('jose');
|
|
@@ -55,7 +55,7 @@ function createEdgeStoreFastifyHandler(config) {
|
|
|
55
55
|
cause: err instanceof Error ? err : undefined
|
|
56
56
|
});
|
|
57
57
|
}
|
|
58
|
-
const { newCookies, token, baseUrl } = await shared.init({
|
|
58
|
+
const { newCookies, token, baseUrl, providerName } = await shared.init({
|
|
59
59
|
ctx,
|
|
60
60
|
provider,
|
|
61
61
|
router: config.router,
|
|
@@ -74,7 +74,8 @@ function createEdgeStoreFastifyHandler(config) {
|
|
|
74
74
|
}
|
|
75
75
|
return reply.send({
|
|
76
76
|
token,
|
|
77
|
-
baseUrl
|
|
77
|
+
baseUrl,
|
|
78
|
+
providerName
|
|
78
79
|
});
|
|
79
80
|
} else if (utils.matchPath(pathname, '/request-upload')) {
|
|
80
81
|
return reply.send(await shared.requestUpload({
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { EdgeStoreError, EDGE_STORE_ERROR_CODES } from '@edgestore/shared';
|
|
2
|
-
import { L as Logger, m as matchPath } from '../../utils-
|
|
2
|
+
import { L as Logger, m as matchPath } from '../../utils-cba23eef.mjs';
|
|
3
3
|
import { EdgeStoreProvider } from '../../providers/edgestore/index.mjs';
|
|
4
|
-
import { a as getCookieConfig, c as init, r as requestUpload, d as requestUploadParts, e as completeMultipartUpload, f as confirmUpload, h as deleteFile } from '../../shared-
|
|
5
|
-
import '../../index-
|
|
4
|
+
import { a as getCookieConfig, c as init, r as requestUpload, d as requestUploadParts, e as completeMultipartUpload, f as confirmUpload, h as deleteFile } from '../../shared-c6527780.mjs';
|
|
5
|
+
import '../../index-a36b09a6.mjs';
|
|
6
6
|
import '@panva/hkdf';
|
|
7
7
|
import 'cookie';
|
|
8
8
|
import 'jose';
|
|
@@ -51,7 +51,7 @@ function createEdgeStoreFastifyHandler(config) {
|
|
|
51
51
|
cause: err instanceof Error ? err : undefined
|
|
52
52
|
});
|
|
53
53
|
}
|
|
54
|
-
const { newCookies, token, baseUrl } = await init({
|
|
54
|
+
const { newCookies, token, baseUrl, providerName } = await init({
|
|
55
55
|
ctx,
|
|
56
56
|
provider,
|
|
57
57
|
router: config.router,
|
|
@@ -70,7 +70,8 @@ function createEdgeStoreFastifyHandler(config) {
|
|
|
70
70
|
}
|
|
71
71
|
return reply.send({
|
|
72
72
|
token,
|
|
73
|
-
baseUrl
|
|
73
|
+
baseUrl,
|
|
74
|
+
providerName
|
|
74
75
|
});
|
|
75
76
|
} else if (matchPath(pathname, '/request-upload')) {
|
|
76
77
|
return reply.send(await requestUpload({
|
|
@@ -19,6 +19,7 @@ export type Config<TCtx> = {
|
|
|
19
19
|
export declare function createEdgeStoreHonoHandler<TCtx>(config: Config<TCtx>): (c: Context) => Promise<(Response & import("hono").TypedResponse<"OK", import("hono/utils/http-status").ContentfulStatusCode, "text">) | (Response & import("hono").TypedResponse<{
|
|
20
20
|
token: string | undefined;
|
|
21
21
|
baseUrl: string;
|
|
22
|
+
providerName: string;
|
|
22
23
|
}, import("hono/utils/http-status").ContentfulStatusCode, "json">) | (Response & import("hono").TypedResponse<{
|
|
23
24
|
uploadUrl: string;
|
|
24
25
|
accessUrl: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/adapters/hono/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,qBAAqB,EAC1B,KAAK,eAAe,EACpB,KAAK,YAAY,EACjB,KAAK,QAAQ,EACd,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,MAAM,CAAC;AACpC,OAAe,EAAE,KAAK,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAG1D,OAAO,EAUL,KAAK,YAAY,EAIlB,MAAM,WAAW,CAAC;AAEnB,MAAM,MAAM,oBAAoB,GAAG;IACjC,CAAC,EAAE,OAAO,CAAC;CACZ,CAAC;AAEF,MAAM,MAAM,MAAM,CAAC,IAAI,IAAI;IACzB,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,MAAM,EAAE,eAAe,CAAC,IAAI,CAAC,CAAC;IAC9B,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,YAAY,CAAC,EAAE,YAAY,CAAC;CAC7B,GAAG,CAAC,IAAI,SAAS,MA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YAAY,CAAC,IAAI,CAAC,CAAC;IAClE,YAAY,CAAC,EAAE,YAAY,CAAC;CAC7B,CAAC,CAAC;AAeP,wBAAgB,0BAA0B,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,CAAC,IAAI,CAAC,OAQlD,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oCAuIzB"}
|
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var shared$1 = require('@edgestore/shared');
|
|
6
|
-
var utils = require('../../utils-
|
|
6
|
+
var utils = require('../../utils-26113e02.js');
|
|
7
7
|
var providers_edgestore_index = require('../../providers/edgestore/index.js');
|
|
8
|
-
var shared = require('../../shared-
|
|
9
|
-
require('../../index-
|
|
8
|
+
var shared = require('../../shared-4ec2dc90.js');
|
|
9
|
+
require('../../index-1e7b1b93.js');
|
|
10
10
|
require('@panva/hkdf');
|
|
11
11
|
require('cookie');
|
|
12
12
|
require('jose');
|
|
@@ -43,7 +43,7 @@ function createEdgeStoreHonoHandler(config) {
|
|
|
43
43
|
cause: err instanceof Error ? err : undefined
|
|
44
44
|
});
|
|
45
45
|
}
|
|
46
|
-
const { newCookies, token, baseUrl } = await shared.init({
|
|
46
|
+
const { newCookies, token, baseUrl, providerName } = await shared.init({
|
|
47
47
|
ctx,
|
|
48
48
|
provider,
|
|
49
49
|
router: config.router,
|
|
@@ -59,7 +59,8 @@ function createEdgeStoreHonoHandler(config) {
|
|
|
59
59
|
}
|
|
60
60
|
return c.json({
|
|
61
61
|
token,
|
|
62
|
-
baseUrl
|
|
62
|
+
baseUrl,
|
|
63
|
+
providerName
|
|
63
64
|
});
|
|
64
65
|
} else if (utils.matchPath(pathname, '/request-upload')) {
|
|
65
66
|
const body = await c.req.json();
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { EdgeStoreError, EDGE_STORE_ERROR_CODES } from '@edgestore/shared';
|
|
2
|
-
import { L as Logger, m as matchPath } from '../../utils-
|
|
2
|
+
import { L as Logger, m as matchPath } from '../../utils-cba23eef.mjs';
|
|
3
3
|
import { EdgeStoreProvider } from '../../providers/edgestore/index.mjs';
|
|
4
|
-
import { a as getCookieConfig, c as init, r as requestUpload, d as requestUploadParts, e as completeMultipartUpload, f as confirmUpload, h as deleteFile } from '../../shared-
|
|
5
|
-
import '../../index-
|
|
4
|
+
import { a as getCookieConfig, c as init, r as requestUpload, d as requestUploadParts, e as completeMultipartUpload, f as confirmUpload, h as deleteFile } from '../../shared-c6527780.mjs';
|
|
5
|
+
import '../../index-a36b09a6.mjs';
|
|
6
6
|
import '@panva/hkdf';
|
|
7
7
|
import 'cookie';
|
|
8
8
|
import 'jose';
|
|
@@ -39,7 +39,7 @@ function createEdgeStoreHonoHandler(config) {
|
|
|
39
39
|
cause: err instanceof Error ? err : undefined
|
|
40
40
|
});
|
|
41
41
|
}
|
|
42
|
-
const { newCookies, token, baseUrl } = await init({
|
|
42
|
+
const { newCookies, token, baseUrl, providerName } = await init({
|
|
43
43
|
ctx,
|
|
44
44
|
provider,
|
|
45
45
|
router: config.router,
|
|
@@ -55,7 +55,8 @@ function createEdgeStoreHonoHandler(config) {
|
|
|
55
55
|
}
|
|
56
56
|
return c.json({
|
|
57
57
|
token,
|
|
58
|
-
baseUrl
|
|
58
|
+
baseUrl,
|
|
59
|
+
providerName
|
|
59
60
|
});
|
|
60
61
|
} else if (matchPath(pathname, '/request-upload')) {
|
|
61
62
|
const body = await c.req.json();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/adapters/next/app/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,KAAK,eAAe,EACpB,KAAK,YAAY,EACjB,KAAK,QAAQ,EACd,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,aAAa,CAAC;AAC/C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AAM,CAAC,IAAI,IAAI;IACzB,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,MAAM,EAAE,eAAe,CAAC,IAAI,CAAC,CAAC;IAC9B,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,YAAY,CAAC,EAAE,YAAY,CAAC;CAC7B,GAAG,CAAC,IAAI,SAAS,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,GACnC,MAAM,GACN;IACE,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,MAAM,EAAE,eAAe,CAAC,IAAI,CAAC,CAAC;IAC9B,aAAa,EAAE,CAAC,IAAI,EAAE,oBAAoB,KAAK,YAAY,CAAC,IAAI,CAAC,CAAC;IAClE,YAAY,CAAC,EAAE,YAAY,CAAC;CAC7B,CAAC,CAAC;AAMP,wBAAgB,0BAA0B,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,CAAC,IAAI,CAAC,SAQhD,WAAW,uBA0K/B"}
|
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var shared$1 = require('@edgestore/shared');
|
|
6
|
-
var utils = require('../../../utils-
|
|
6
|
+
var utils = require('../../../utils-26113e02.js');
|
|
7
7
|
var providers_edgestore_index = require('../../../providers/edgestore/index.js');
|
|
8
|
-
var shared = require('../../../shared-
|
|
9
|
-
require('../../../index-
|
|
8
|
+
var shared = require('../../../shared-4ec2dc90.js');
|
|
9
|
+
require('../../../index-1e7b1b93.js');
|
|
10
10
|
require('@panva/hkdf');
|
|
11
11
|
require('cookie');
|
|
12
12
|
require('jose');
|
|
@@ -42,7 +42,7 @@ function createEdgeStoreNextHandler(config) {
|
|
|
42
42
|
cause: err instanceof Error ? err : undefined
|
|
43
43
|
});
|
|
44
44
|
}
|
|
45
|
-
const { newCookies, token, baseUrl } = await shared.init({
|
|
45
|
+
const { newCookies, token, baseUrl, providerName } = await shared.init({
|
|
46
46
|
ctx,
|
|
47
47
|
provider,
|
|
48
48
|
router: config.router,
|
|
@@ -50,7 +50,8 @@ function createEdgeStoreNextHandler(config) {
|
|
|
50
50
|
});
|
|
51
51
|
const res = new Response(JSON.stringify({
|
|
52
52
|
token,
|
|
53
|
-
baseUrl
|
|
53
|
+
baseUrl,
|
|
54
|
+
providerName
|
|
54
55
|
}), {
|
|
55
56
|
status: 200,
|
|
56
57
|
headers: {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { EdgeStoreError, EDGE_STORE_ERROR_CODES } from '@edgestore/shared';
|
|
2
|
-
import { L as Logger, m as matchPath } from '../../../utils-
|
|
2
|
+
import { L as Logger, m as matchPath } from '../../../utils-cba23eef.mjs';
|
|
3
3
|
import { EdgeStoreProvider } from '../../../providers/edgestore/index.mjs';
|
|
4
|
-
import { a as getCookieConfig, c as init, r as requestUpload, d as requestUploadParts, e as completeMultipartUpload, f as confirmUpload, h as deleteFile } from '../../../shared-
|
|
5
|
-
import '../../../index-
|
|
4
|
+
import { a as getCookieConfig, c as init, r as requestUpload, d as requestUploadParts, e as completeMultipartUpload, f as confirmUpload, h as deleteFile } from '../../../shared-c6527780.mjs';
|
|
5
|
+
import '../../../index-a36b09a6.mjs';
|
|
6
6
|
import '@panva/hkdf';
|
|
7
7
|
import 'cookie';
|
|
8
8
|
import 'jose';
|
|
@@ -38,7 +38,7 @@ function createEdgeStoreNextHandler(config) {
|
|
|
38
38
|
cause: err instanceof Error ? err : undefined
|
|
39
39
|
});
|
|
40
40
|
}
|
|
41
|
-
const { newCookies, token, baseUrl } = await init({
|
|
41
|
+
const { newCookies, token, baseUrl, providerName } = await init({
|
|
42
42
|
ctx,
|
|
43
43
|
provider,
|
|
44
44
|
router: config.router,
|
|
@@ -46,7 +46,8 @@ function createEdgeStoreNextHandler(config) {
|
|
|
46
46
|
});
|
|
47
47
|
const res = new Response(JSON.stringify({
|
|
48
48
|
token,
|
|
49
|
-
baseUrl
|
|
49
|
+
baseUrl,
|
|
50
|
+
providerName
|
|
50
51
|
}), {
|
|
51
52
|
status: 200,
|
|
52
53
|
headers: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/adapters/next/pages/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,KAAK,eAAe,EACpB,KAAK,YAAY,EACjB,KAAK,QAAQ,EACd,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,KAAK,cAAc,EAAE,KAAK,eAAe,EAAE,MAAM,YAAY,CAAC;AACvE,OAAe,EAAE,KAAK,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAG7D,OAAO,EAUL,KAAK,YAAY,EAIlB,MAAM,cAAc,CAAC;AAEtB,MAAM,MAAM,oBAAoB,GAAG;IACjC,GAAG,EAAE,cAAc,CAAC;IACpB,GAAG,EAAE,eAAe,CAAC;CACtB,CAAC;AAEF,MAAM,MAAM,MAAM,CAAC,IAAI,IAAI;IACzB,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,MAAM,EAAE,eAAe,CAAC,IAAI,CAAC,CAAC;IAC9B,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,YAAY,CAAC,EAAE,YAAY,CAAC;CAC7B,GAAG,CAAC,IAAI,SAAS,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,GACnC,MAAM,GACN;IACE,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,MAAM,EAAE,eAAe,CAAC,IAAI,CAAC,CAAC;IAC9B,aAAa,EAAE,CAAC,IAAI,EAAE,oBAAoB,KAAK,YAAY,CAAC,IAAI,CAAC,CAAC;IAClE,YAAY,CAAC,EAAE,YAAY,CAAC;CAC7B,CAAC,CAAC;AAMP,wBAAgB,0BAA0B,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,CAAC,IAAI,CAAC,SAQhD,cAAc,OAAO,eAAe,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/adapters/next/pages/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,KAAK,eAAe,EACpB,KAAK,YAAY,EACjB,KAAK,QAAQ,EACd,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,KAAK,cAAc,EAAE,KAAK,eAAe,EAAE,MAAM,YAAY,CAAC;AACvE,OAAe,EAAE,KAAK,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAG7D,OAAO,EAUL,KAAK,YAAY,EAIlB,MAAM,cAAc,CAAC;AAEtB,MAAM,MAAM,oBAAoB,GAAG;IACjC,GAAG,EAAE,cAAc,CAAC;IACpB,GAAG,EAAE,eAAe,CAAC;CACtB,CAAC;AAEF,MAAM,MAAM,MAAM,CAAC,IAAI,IAAI;IACzB,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,MAAM,EAAE,eAAe,CAAC,IAAI,CAAC,CAAC;IAC9B,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,YAAY,CAAC,EAAE,YAAY,CAAC;CAC7B,GAAG,CAAC,IAAI,SAAS,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,GACnC,MAAM,GACN;IACE,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,MAAM,EAAE,eAAe,CAAC,IAAI,CAAC,CAAC;IAC9B,aAAa,EAAE,CAAC,IAAI,EAAE,oBAAoB,KAAK,YAAY,CAAC,IAAI,CAAC,CAAC;IAClE,YAAY,CAAC,EAAE,YAAY,CAAC;CAC7B,CAAC,CAAC;AAMP,wBAAgB,0BAA0B,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,CAAC,IAAI,CAAC,SAQhD,cAAc,OAAO,eAAe,mBAyHxD"}
|
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var shared$1 = require('@edgestore/shared');
|
|
6
|
-
var utils = require('../../../utils-
|
|
6
|
+
var utils = require('../../../utils-26113e02.js');
|
|
7
7
|
var providers_edgestore_index = require('../../../providers/edgestore/index.js');
|
|
8
|
-
var shared = require('../../../shared-
|
|
9
|
-
require('../../../index-
|
|
8
|
+
var shared = require('../../../shared-4ec2dc90.js');
|
|
9
|
+
require('../../../index-1e7b1b93.js');
|
|
10
10
|
require('@panva/hkdf');
|
|
11
11
|
require('cookie');
|
|
12
12
|
require('jose');
|
|
@@ -41,7 +41,7 @@ function createEdgeStoreNextHandler(config) {
|
|
|
41
41
|
cause: err instanceof Error ? err : undefined
|
|
42
42
|
});
|
|
43
43
|
}
|
|
44
|
-
const { newCookies, token, baseUrl } = await shared.init({
|
|
44
|
+
const { newCookies, token, baseUrl, providerName } = await shared.init({
|
|
45
45
|
ctx,
|
|
46
46
|
provider,
|
|
47
47
|
router: config.router,
|
|
@@ -50,7 +50,8 @@ function createEdgeStoreNextHandler(config) {
|
|
|
50
50
|
res.setHeader('Set-Cookie', newCookies);
|
|
51
51
|
res.json({
|
|
52
52
|
token,
|
|
53
|
-
baseUrl
|
|
53
|
+
baseUrl,
|
|
54
|
+
providerName
|
|
54
55
|
});
|
|
55
56
|
} else if (utils.matchPath(pathname, '/request-upload')) {
|
|
56
57
|
res.json(await shared.requestUpload({
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { EdgeStoreError, EDGE_STORE_ERROR_CODES } from '@edgestore/shared';
|
|
2
|
-
import { L as Logger, m as matchPath } from '../../../utils-
|
|
2
|
+
import { L as Logger, m as matchPath } from '../../../utils-cba23eef.mjs';
|
|
3
3
|
import { EdgeStoreProvider } from '../../../providers/edgestore/index.mjs';
|
|
4
|
-
import { a as getCookieConfig, c as init, r as requestUpload, d as requestUploadParts, e as completeMultipartUpload, f as confirmUpload, h as deleteFile } from '../../../shared-
|
|
5
|
-
import '../../../index-
|
|
4
|
+
import { a as getCookieConfig, c as init, r as requestUpload, d as requestUploadParts, e as completeMultipartUpload, f as confirmUpload, h as deleteFile } from '../../../shared-c6527780.mjs';
|
|
5
|
+
import '../../../index-a36b09a6.mjs';
|
|
6
6
|
import '@panva/hkdf';
|
|
7
7
|
import 'cookie';
|
|
8
8
|
import 'jose';
|
|
@@ -37,7 +37,7 @@ function createEdgeStoreNextHandler(config) {
|
|
|
37
37
|
cause: err instanceof Error ? err : undefined
|
|
38
38
|
});
|
|
39
39
|
}
|
|
40
|
-
const { newCookies, token, baseUrl } = await init({
|
|
40
|
+
const { newCookies, token, baseUrl, providerName } = await init({
|
|
41
41
|
ctx,
|
|
42
42
|
provider,
|
|
43
43
|
router: config.router,
|
|
@@ -46,7 +46,8 @@ function createEdgeStoreNextHandler(config) {
|
|
|
46
46
|
res.setHeader('Set-Cookie', newCookies);
|
|
47
47
|
res.json({
|
|
48
48
|
token,
|
|
49
|
-
baseUrl
|
|
49
|
+
baseUrl,
|
|
50
|
+
providerName
|
|
50
51
|
});
|
|
51
52
|
} else if (matchPath(pathname, '/request-upload')) {
|
|
52
53
|
res.json(await requestUpload({
|
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var shared$1 = require('@edgestore/shared');
|
|
6
|
-
var utils = require('../../utils-
|
|
6
|
+
var utils = require('../../utils-26113e02.js');
|
|
7
7
|
var providers_edgestore_index = require('../../providers/edgestore/index.js');
|
|
8
|
-
var shared = require('../../shared-
|
|
9
|
-
require('../../index-
|
|
8
|
+
var shared = require('../../shared-4ec2dc90.js');
|
|
9
|
+
require('../../index-1e7b1b93.js');
|
|
10
10
|
require('@panva/hkdf');
|
|
11
11
|
require('cookie');
|
|
12
12
|
require('jose');
|
|
@@ -48,7 +48,7 @@ function createEdgeStoreRemixHandler(config) {
|
|
|
48
48
|
cause: err instanceof Error ? err : undefined
|
|
49
49
|
});
|
|
50
50
|
}
|
|
51
|
-
const { newCookies, token, baseUrl } = await shared.init({
|
|
51
|
+
const { newCookies, token, baseUrl, providerName } = await shared.init({
|
|
52
52
|
ctx,
|
|
53
53
|
provider,
|
|
54
54
|
router: config.router,
|
|
@@ -65,7 +65,8 @@ function createEdgeStoreRemixHandler(config) {
|
|
|
65
65
|
}
|
|
66
66
|
return new Response(JSON.stringify({
|
|
67
67
|
token,
|
|
68
|
-
baseUrl
|
|
68
|
+
baseUrl,
|
|
69
|
+
providerName
|
|
69
70
|
}), {
|
|
70
71
|
headers: responseHeaders,
|
|
71
72
|
status: 200
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { EdgeStoreError, EDGE_STORE_ERROR_CODES } from '@edgestore/shared';
|
|
2
|
-
import { L as Logger, m as matchPath } from '../../utils-
|
|
2
|
+
import { L as Logger, m as matchPath } from '../../utils-cba23eef.mjs';
|
|
3
3
|
import { EdgeStoreProvider } from '../../providers/edgestore/index.mjs';
|
|
4
|
-
import { a as getCookieConfig, c as init, r as requestUpload, d as requestUploadParts, e as completeMultipartUpload, f as confirmUpload, h as deleteFile } from '../../shared-
|
|
5
|
-
import '../../index-
|
|
4
|
+
import { a as getCookieConfig, c as init, r as requestUpload, d as requestUploadParts, e as completeMultipartUpload, f as confirmUpload, h as deleteFile } from '../../shared-c6527780.mjs';
|
|
5
|
+
import '../../index-a36b09a6.mjs';
|
|
6
6
|
import '@panva/hkdf';
|
|
7
7
|
import 'cookie';
|
|
8
8
|
import 'jose';
|
|
@@ -44,7 +44,7 @@ function createEdgeStoreRemixHandler(config) {
|
|
|
44
44
|
cause: err instanceof Error ? err : undefined
|
|
45
45
|
});
|
|
46
46
|
}
|
|
47
|
-
const { newCookies, token, baseUrl } = await init({
|
|
47
|
+
const { newCookies, token, baseUrl, providerName } = await init({
|
|
48
48
|
ctx,
|
|
49
49
|
provider,
|
|
50
50
|
router: config.router,
|
|
@@ -61,7 +61,8 @@ function createEdgeStoreRemixHandler(config) {
|
|
|
61
61
|
}
|
|
62
62
|
return new Response(JSON.stringify({
|
|
63
63
|
token,
|
|
64
|
-
baseUrl
|
|
64
|
+
baseUrl,
|
|
65
|
+
providerName
|
|
65
66
|
}), {
|
|
66
67
|
headers: responseHeaders,
|
|
67
68
|
status: 200
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../../src/adapters/shared.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,UAAU,EACf,KAAK,eAAe,EACpB,KAAK,QAAQ,EACb,KAAK,mBAAmB,EACxB,KAAK,aAAa,EAClB,KAAK,2BAA2B,EAChC,KAAK,sBAAsB,EAC5B,MAAM,mBAAmB,CAAC;AAe3B,MAAM,MAAM,aAAa,GAAG;IAC1B;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,QAAQ,CAAC,EAAE,QAAQ,GAAG,KAAK,GAAG,MAAM,CAAC;IACrC;;OAEG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG;IACzB;;OAEG;IACH,GAAG,CAAC,EAAE;QACJ;;;WAGG;QACH,IAAI,CAAC,EAAE,MAAM,CAAC;QACd;;WAEG;QACH,OAAO,CAAC,EAAE,aAAa,CAAC;KACzB,CAAC;IACF;;OAEG;IACH,KAAK,CAAC,EAAE;QACN;;;WAGG;QACH,IAAI,CAAC,EAAE,MAAM,CAAC;QACd;;WAEG;QACH,OAAO,CAAC,EAAE,aAAa,CAAC;KACzB,CAAC;CACH,CAAC;AAEF,KAAK,oBAAoB,GAAG;IAC1B,GAAG,EAAE;QACH,IAAI,EAAE,MAAM,CAAC;QACb,OAAO,EAAE,aAAa,CAAC;KACxB,CAAC;IACF,KAAK,EAAE;QACL,IAAI,EAAE,MAAM,CAAC;QACb,OAAO,EAAE,aAAa,CAAC;KACxB,CAAC;CACH,CAAC;AAEF;;GAEG;AACH,wBAAgB,eAAe,CAC7B,YAAY,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M,EAAE;IAC7C,QAAQ,EAAE,QAAQ,CAAC;IACnB,MAAM,EAAE,eAAe,CAAC,IAAI,CAAC,CAAC;IAC9B,QAAQ,EAAE,MAAM,GAAG,SAAS,CAAC;IAC7B,IAAI,EAAE,cAAc,CAAC;CACtB,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAwD/B;AA8CD,wBAAgB,SAAS,CAAC,MAAM,EAAE;IAChC,QAAQ,EAAE,iBAAiB,CAAC,UAAU,CAAC,CAAC;IACxC,MAAM,EAAE,UAAU,CAAC;IACnB,SAAS,EAAE;QACT,GAAG,EAAE,GAAG,CAAC;QACT,KAAK,EAAE,GAAG,CAAC;KACZ,CAAC;CACH;;;IA8BA;AAED,wBAAgB,SAAS,CAAC,IAAI,EAAE;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,EAAE;;;EAU/D;AAwBD,wBAAgB,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAOtD;AAED,wBAAgB,KAAK,IAAI,OAAO,CAM/B"}
|
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var shared$1 = require('@edgestore/shared');
|
|
6
|
-
var utils = require('../../utils-
|
|
6
|
+
var utils = require('../../utils-26113e02.js');
|
|
7
7
|
var providers_edgestore_index = require('../../providers/edgestore/index.js');
|
|
8
|
-
var shared = require('../../shared-
|
|
9
|
-
require('../../index-
|
|
8
|
+
var shared = require('../../shared-4ec2dc90.js');
|
|
9
|
+
require('../../index-1e7b1b93.js');
|
|
10
10
|
require('@panva/hkdf');
|
|
11
11
|
require('cookie');
|
|
12
12
|
require('jose');
|
|
@@ -50,7 +50,7 @@ function createEdgeStoreStartHandler(config) {
|
|
|
50
50
|
cause: err instanceof Error ? err : undefined
|
|
51
51
|
});
|
|
52
52
|
}
|
|
53
|
-
const { newCookies, token, baseUrl } = await shared.init({
|
|
53
|
+
const { newCookies, token, baseUrl, providerName } = await shared.init({
|
|
54
54
|
ctx,
|
|
55
55
|
provider,
|
|
56
56
|
router: config.router,
|
|
@@ -63,7 +63,8 @@ function createEdgeStoreStartHandler(config) {
|
|
|
63
63
|
headers.set('Content-Type', 'application/json');
|
|
64
64
|
return new Response(JSON.stringify({
|
|
65
65
|
token,
|
|
66
|
-
baseUrl
|
|
66
|
+
baseUrl,
|
|
67
|
+
providerName
|
|
67
68
|
}), {
|
|
68
69
|
status: 200,
|
|
69
70
|
headers
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { EdgeStoreError, EDGE_STORE_ERROR_CODES } from '@edgestore/shared';
|
|
2
|
-
import { L as Logger, m as matchPath } from '../../utils-
|
|
2
|
+
import { L as Logger, m as matchPath } from '../../utils-cba23eef.mjs';
|
|
3
3
|
import { EdgeStoreProvider } from '../../providers/edgestore/index.mjs';
|
|
4
|
-
import { a as getCookieConfig, c as init, r as requestUpload, d as requestUploadParts, e as completeMultipartUpload, f as confirmUpload, h as deleteFile } from '../../shared-
|
|
5
|
-
import '../../index-
|
|
4
|
+
import { a as getCookieConfig, c as init, r as requestUpload, d as requestUploadParts, e as completeMultipartUpload, f as confirmUpload, h as deleteFile } from '../../shared-c6527780.mjs';
|
|
5
|
+
import '../../index-a36b09a6.mjs';
|
|
6
6
|
import '@panva/hkdf';
|
|
7
7
|
import 'cookie';
|
|
8
8
|
import 'jose';
|
|
@@ -46,7 +46,7 @@ function createEdgeStoreStartHandler(config) {
|
|
|
46
46
|
cause: err instanceof Error ? err : undefined
|
|
47
47
|
});
|
|
48
48
|
}
|
|
49
|
-
const { newCookies, token, baseUrl } = await init({
|
|
49
|
+
const { newCookies, token, baseUrl, providerName } = await init({
|
|
50
50
|
ctx,
|
|
51
51
|
provider,
|
|
52
52
|
router: config.router,
|
|
@@ -59,7 +59,8 @@ function createEdgeStoreStartHandler(config) {
|
|
|
59
59
|
headers.set('Content-Type', 'application/json');
|
|
60
60
|
return new Response(JSON.stringify({
|
|
61
61
|
token,
|
|
62
|
-
baseUrl
|
|
62
|
+
baseUrl,
|
|
63
|
+
providerName
|
|
63
64
|
}), {
|
|
64
65
|
status: 200,
|
|
65
66
|
headers
|
package/dist/core/index.js
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var shared = require('../shared-
|
|
6
|
-
var index = require('../index-
|
|
5
|
+
var shared = require('../shared-4ec2dc90.js');
|
|
6
|
+
var index = require('../index-1e7b1b93.js');
|
|
7
7
|
require('@edgestore/shared');
|
|
8
8
|
require('@panva/hkdf');
|
|
9
9
|
require('cookie');
|
package/dist/core/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { b as buildPath, p as parsePath, i as isDev } from '../shared-
|
|
2
|
-
import { i as initEdgeStoreSdk } from '../index-
|
|
3
|
-
export { e as edgeStoreRawSdk, i as initEdgeStoreSdk } from '../index-
|
|
1
|
+
import { b as buildPath, p as parsePath, i as isDev } from '../shared-c6527780.mjs';
|
|
2
|
+
import { i as initEdgeStoreSdk } from '../index-a36b09a6.mjs';
|
|
3
|
+
export { e as edgeStoreRawSdk, i as initEdgeStoreSdk } from '../index-a36b09a6.mjs';
|
|
4
4
|
import '@edgestore/shared';
|
|
5
5
|
import '@panva/hkdf';
|
|
6
6
|
import 'cookie';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var shared$1 = require('@edgestore/shared');
|
|
4
|
-
var shared = require('./shared-
|
|
4
|
+
var shared = require('./shared-4ec2dc90.js');
|
|
5
5
|
|
|
6
6
|
const DEFAULT_MESSAGE = `Missing EDGE_STORE_ACCESS_KEY or EDGE_STORE_SECRET_KEY.
|
|
7
7
|
This can happen if you are trying to import something related to the backend of EdgeStore in a client component.`;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { EdgeStoreError } from '@edgestore/shared';
|
|
2
|
-
import { g as getEnv } from './shared-
|
|
2
|
+
import { g as getEnv } from './shared-c6527780.mjs';
|
|
3
3
|
|
|
4
4
|
const DEFAULT_MESSAGE = `Missing EDGE_STORE_ACCESS_KEY or EDGE_STORE_SECRET_KEY.
|
|
5
5
|
This can happen if you are trying to import something related to the backend of EdgeStore in a client component.`;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { EdgeStoreError } from '@edgestore/shared';
|
|
2
|
-
import { g as getEnv } from './shared-
|
|
2
|
+
import { g as getEnv } from './shared-64e9c30c.js';
|
|
3
3
|
|
|
4
4
|
const DEFAULT_MESSAGE = `Missing EDGE_STORE_ACCESS_KEY or EDGE_STORE_SECRET_KEY.
|
|
5
5
|
This can happen if you are trying to import something related to the backend of EdgeStore in a client component.`;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/providers/aws/index.ts"],"names":[],"mappings":"AAOA,OAAO,EACL,KAAK,YAAY,EACjB,KAAK,QAAQ,EACb,KAAK,mBAAmB,EACzB,MAAM,mBAAmB,CAAC;AAK3B,KAAK,wBAAwB,GAAG,mBAAmB,CAAC,UAAU,CAAC,CAAC;AAEhE,MAAM,MAAM,sBAAsB,GAAG;IAEnC,YAAY,EAAE,MAAM,CAAC;IAErB,QAAQ,EAAE,wBAAwB,CAAC;IAEnC,iBAAiB,EAAE,MAAM,CAAC;CAC3B,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG,CAC/B,IAAI,EAAE,sBAAsB,KACzB,YAAY,CAAC,MAAM,CAAC,CAAC;AAE1B,MAAM,MAAM,kBAAkB,GAAG;IAC/B;;;;;OAKG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;;;OAKG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;OAGG;IACH,UAAU,CAA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;;;OAKG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;OAIG;IACH,aAAa,CAAC,EAAE,kBAAkB,CAAC;CACpC,CAAC;AAEF,wBAAgB,WAAW,CAAC,OAAO,CAAC,EAAE,kBAAkB,GAAG,QAAQ,CAwIlE"}
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
var clientS3 = require('@aws-sdk/client-s3');
|
|
6
6
|
var s3RequestPresigner = require('@aws-sdk/s3-request-presigner');
|
|
7
7
|
var uuid = require('uuid');
|
|
8
|
-
var shared = require('../../shared-
|
|
8
|
+
var shared = require('../../shared-4ec2dc90.js');
|
|
9
9
|
require('@edgestore/shared');
|
|
10
10
|
require('@panva/hkdf');
|
|
11
11
|
require('cookie');
|
|
@@ -25,6 +25,7 @@ function AWSProvider(options) {
|
|
|
25
25
|
forcePathStyle
|
|
26
26
|
});
|
|
27
27
|
return {
|
|
28
|
+
name: 'aws',
|
|
28
29
|
async init () {
|
|
29
30
|
return {};
|
|
30
31
|
},
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { S3Client, HeadObjectCommand, PutObjectCommand, DeleteObjectCommand } from '@aws-sdk/client-s3';
|
|
2
2
|
import { getSignedUrl } from '@aws-sdk/s3-request-presigner';
|
|
3
3
|
import { v4 } from 'uuid';
|
|
4
|
-
import { g as getEnv } from '../../shared-
|
|
4
|
+
import { g as getEnv } from '../../shared-c6527780.mjs';
|
|
5
5
|
import '@edgestore/shared';
|
|
6
6
|
import '@panva/hkdf';
|
|
7
7
|
import 'cookie';
|
|
@@ -21,6 +21,7 @@ function AWSProvider(options) {
|
|
|
21
21
|
forcePathStyle
|
|
22
22
|
});
|
|
23
23
|
return {
|
|
24
|
+
name: 'aws',
|
|
24
25
|
async init () {
|
|
25
26
|
return {};
|
|
26
27
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/providers/azure/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAIlD;;;;;;;;;;;;GAYG;AACH,MAAM,MAAM,oBAAoB,GAAG;IACjC;;;OAGG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;OAGG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;;;OAIG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB,CAAC;AAEF,wBAAgB,aAAa,CAAC,OAAO,CAAC,EAAE,oBAAoB,GAAG,QAAQ,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/providers/azure/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAIlD;;;;;;;;;;;;GAYG;AACH,MAAM,MAAM,oBAAoB,GAAG;IACjC;;;OAGG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;OAGG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;;;OAIG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB,CAAC;AAEF,wBAAgB,aAAa,CAAC,OAAO,CAAC,EAAE,oBAAoB,GAAG,QAAQ,CAqEtE"}
|
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var storageBlob = require('@azure/storage-blob');
|
|
6
6
|
var uuid = require('uuid');
|
|
7
|
-
var shared = require('../../shared-
|
|
7
|
+
var shared = require('../../shared-4ec2dc90.js');
|
|
8
8
|
require('@edgestore/shared');
|
|
9
9
|
require('@panva/hkdf');
|
|
10
10
|
require('cookie');
|
|
@@ -16,6 +16,7 @@ function AzureProvider(options) {
|
|
|
16
16
|
const blobServiceClient = new storageBlob.BlobServiceClient(`${baseUrl}?${sasToken}`);
|
|
17
17
|
const containerClient = blobServiceClient.getContainerClient(containerName ?? '');
|
|
18
18
|
return {
|
|
19
|
+
name: 'azure',
|
|
19
20
|
async init () {
|
|
20
21
|
return {};
|
|
21
22
|
},
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { BlobServiceClient } from '@azure/storage-blob';
|
|
2
2
|
import { v4 } from 'uuid';
|
|
3
|
-
import { g as getEnv } from '../../shared-
|
|
3
|
+
import { g as getEnv } from '../../shared-c6527780.mjs';
|
|
4
4
|
import '@edgestore/shared';
|
|
5
5
|
import '@panva/hkdf';
|
|
6
6
|
import 'cookie';
|
|
@@ -12,6 +12,7 @@ function AzureProvider(options) {
|
|
|
12
12
|
const blobServiceClient = new BlobServiceClient(`${baseUrl}?${sasToken}`);
|
|
13
13
|
const containerClient = blobServiceClient.getContainerClient(containerName ?? '');
|
|
14
14
|
return {
|
|
15
|
+
name: 'azure',
|
|
15
16
|
async init () {
|
|
16
17
|
return {};
|
|
17
18
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/providers/edgestore/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,QAAQ,EAEd,MAAM,mBAAmB,CAAC;AAO3B,MAAM,MAAM,wBAAwB,GAAG;IACrC;;;;;OAKG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;;OAKG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,wBAAgB,iBAAiB,CAC/B,OAAO,CAAC,EAAE,wBAAwB,GACjC,QAAQ,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/providers/edgestore/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,QAAQ,EAEd,MAAM,mBAAmB,CAAC;AAO3B,MAAM,MAAM,wBAAwB,GAAG;IACrC;;;;;OAKG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;;OAKG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,wBAAgB,iBAAiB,CAC/B,OAAO,CAAC,EAAE,wBAAwB,GACjC,QAAQ,CAqJV"}
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var shared$1 = require('@edgestore/shared');
|
|
6
|
-
var shared = require('../../shared-
|
|
7
|
-
var index = require('../../index-
|
|
6
|
+
var shared = require('../../shared-4ec2dc90.js');
|
|
7
|
+
var index = require('../../index-1e7b1b93.js');
|
|
8
8
|
require('@panva/hkdf');
|
|
9
9
|
require('cookie');
|
|
10
10
|
require('jose');
|
|
@@ -24,6 +24,7 @@ function EdgeStoreProvider(options) {
|
|
|
24
24
|
secretKey
|
|
25
25
|
});
|
|
26
26
|
return {
|
|
27
|
+
name: 'edgestore',
|
|
27
28
|
init: async ({ ctx, router })=>{
|
|
28
29
|
const token = await edgeStoreSdk.getToken({
|
|
29
30
|
ctx,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { EdgeStoreError } from '@edgestore/shared';
|
|
2
|
-
import { g as getEnv } from '../../shared-
|
|
3
|
-
import { E as EdgeStoreCredentialsError, i as initEdgeStoreSdk } from '../../index-
|
|
2
|
+
import { g as getEnv } from '../../shared-c6527780.mjs';
|
|
3
|
+
import { E as EdgeStoreCredentialsError, i as initEdgeStoreSdk } from '../../index-a36b09a6.mjs';
|
|
4
4
|
import '@panva/hkdf';
|
|
5
5
|
import 'cookie';
|
|
6
6
|
import 'jose';
|
|
@@ -20,6 +20,7 @@ function EdgeStoreProvider(options) {
|
|
|
20
20
|
secretKey
|
|
21
21
|
});
|
|
22
22
|
return {
|
|
23
|
+
name: 'edgestore',
|
|
23
24
|
init: async ({ ctx, router })=>{
|
|
24
25
|
const token = await edgeStoreSdk.getToken({
|
|
25
26
|
ctx,
|
|
@@ -75,12 +75,14 @@ async function init(params) {
|
|
|
75
75
|
ctx,
|
|
76
76
|
newCookies,
|
|
77
77
|
token,
|
|
78
|
-
baseUrl
|
|
78
|
+
baseUrl,
|
|
79
|
+
providerName: provider.name
|
|
79
80
|
});
|
|
80
81
|
return {
|
|
81
82
|
newCookies,
|
|
82
83
|
token,
|
|
83
|
-
baseUrl
|
|
84
|
+
baseUrl,
|
|
85
|
+
providerName: provider.name
|
|
84
86
|
};
|
|
85
87
|
}
|
|
86
88
|
async function requestUpload(params) {
|
|
@@ -66,11 +66,18 @@ async function init(params) {
|
|
|
66
66
|
newCookies.push(serialize(resolvedCookieConfig.token.name, token, resolvedCookieConfig.token.options));
|
|
67
67
|
}
|
|
68
68
|
const baseUrl = await provider.getBaseUrl();
|
|
69
|
-
log.debug('Finished [init]', {
|
|
69
|
+
log.debug('Finished [init]', {
|
|
70
|
+
ctx,
|
|
71
|
+
newCookies,
|
|
72
|
+
token,
|
|
73
|
+
baseUrl,
|
|
74
|
+
providerName: provider.name,
|
|
75
|
+
});
|
|
70
76
|
return {
|
|
71
77
|
newCookies,
|
|
72
78
|
token,
|
|
73
79
|
baseUrl,
|
|
80
|
+
providerName: provider.name,
|
|
74
81
|
};
|
|
75
82
|
}
|
|
76
83
|
async function requestUpload(params) {
|
|
@@ -73,12 +73,14 @@ async function init(params) {
|
|
|
73
73
|
ctx,
|
|
74
74
|
newCookies,
|
|
75
75
|
token,
|
|
76
|
-
baseUrl
|
|
76
|
+
baseUrl,
|
|
77
|
+
providerName: provider.name
|
|
77
78
|
});
|
|
78
79
|
return {
|
|
79
80
|
newCookies,
|
|
80
81
|
token,
|
|
81
|
-
baseUrl
|
|
82
|
+
baseUrl,
|
|
83
|
+
providerName: provider.name
|
|
82
84
|
};
|
|
83
85
|
}
|
|
84
86
|
async function requestUpload(params) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@edgestore/server",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.6",
|
|
4
4
|
"description": "Upload files with ease from React/Next.js",
|
|
5
5
|
"homepage": "https://edgestore.dev",
|
|
6
6
|
"repository": "https://github.com/edgestorejs/edgestore.git",
|
|
@@ -97,6 +97,7 @@
|
|
|
97
97
|
"dist",
|
|
98
98
|
"src",
|
|
99
99
|
"README.md",
|
|
100
|
+
"LICENSE",
|
|
100
101
|
"package.json",
|
|
101
102
|
"core",
|
|
102
103
|
"adapters",
|
|
@@ -109,7 +110,7 @@
|
|
|
109
110
|
},
|
|
110
111
|
"license": "MIT",
|
|
111
112
|
"dependencies": {
|
|
112
|
-
"@edgestore/shared": "0.5.
|
|
113
|
+
"@edgestore/shared": "0.5.6",
|
|
113
114
|
"@panva/hkdf": "^1.0.4",
|
|
114
115
|
"cookie": "^0.5.0",
|
|
115
116
|
"jose": "^4.13.1",
|
|
@@ -145,11 +146,11 @@
|
|
|
145
146
|
"astro": "^5.7.12",
|
|
146
147
|
"fastify": "^5.3.2",
|
|
147
148
|
"hono": "^4.7.9",
|
|
148
|
-
"next": "15.3.
|
|
149
|
-
"react": "19.1.
|
|
150
|
-
"react-dom": "19.1.
|
|
149
|
+
"next": "15.3.8",
|
|
150
|
+
"react": "19.1.4",
|
|
151
|
+
"react-dom": "19.1.4",
|
|
151
152
|
"typescript": "^5",
|
|
152
153
|
"zod": "3.25.42"
|
|
153
154
|
},
|
|
154
|
-
"gitHead": "
|
|
155
|
+
"gitHead": "ec9fcccedc17b8706fded1217db2b5cafee37e7e"
|
|
155
156
|
}
|
|
@@ -89,7 +89,7 @@ export function createEdgeStoreAstroHandler<TCtx>(config: Config<TCtx>) {
|
|
|
89
89
|
cause: err instanceof Error ? err : undefined,
|
|
90
90
|
});
|
|
91
91
|
}
|
|
92
|
-
const { newCookies, token, baseUrl } = await init({
|
|
92
|
+
const { newCookies, token, baseUrl, providerName } = await init({
|
|
93
93
|
ctx,
|
|
94
94
|
provider,
|
|
95
95
|
router: config.router,
|
|
@@ -112,6 +112,7 @@ export function createEdgeStoreAstroHandler<TCtx>(config: Config<TCtx>) {
|
|
|
112
112
|
JSON.stringify({
|
|
113
113
|
token,
|
|
114
114
|
baseUrl,
|
|
115
|
+
providerName,
|
|
115
116
|
}),
|
|
116
117
|
{ headers },
|
|
117
118
|
);
|
|
@@ -76,7 +76,7 @@ export function createEdgeStoreExpressHandler<TCtx>(config: Config<TCtx>) {
|
|
|
76
76
|
cause: err instanceof Error ? err : undefined,
|
|
77
77
|
});
|
|
78
78
|
}
|
|
79
|
-
const { newCookies, token, baseUrl } = await init({
|
|
79
|
+
const { newCookies, token, baseUrl, providerName } = await init({
|
|
80
80
|
ctx,
|
|
81
81
|
provider,
|
|
82
82
|
router: config.router,
|
|
@@ -86,6 +86,7 @@ export function createEdgeStoreExpressHandler<TCtx>(config: Config<TCtx>) {
|
|
|
86
86
|
res.json({
|
|
87
87
|
token,
|
|
88
88
|
baseUrl,
|
|
89
|
+
providerName,
|
|
89
90
|
});
|
|
90
91
|
} else if (matchPath(pathname, '/request-upload')) {
|
|
91
92
|
res.json(
|
|
@@ -101,7 +101,7 @@ export function createEdgeStoreFastifyHandler<TCtx>(config: Config<TCtx>) {
|
|
|
101
101
|
cause: err instanceof Error ? err : undefined,
|
|
102
102
|
});
|
|
103
103
|
}
|
|
104
|
-
const { newCookies, token, baseUrl } = await init({
|
|
104
|
+
const { newCookies, token, baseUrl, providerName } = await init({
|
|
105
105
|
ctx,
|
|
106
106
|
provider,
|
|
107
107
|
router: config.router,
|
|
@@ -123,6 +123,7 @@ export function createEdgeStoreFastifyHandler<TCtx>(config: Config<TCtx>) {
|
|
|
123
123
|
return reply.send({
|
|
124
124
|
token,
|
|
125
125
|
baseUrl,
|
|
126
|
+
providerName,
|
|
126
127
|
});
|
|
127
128
|
} else if (matchPath(pathname, '/request-upload')) {
|
|
128
129
|
return reply.send(
|
|
@@ -85,7 +85,7 @@ export function createEdgeStoreHonoHandler<TCtx>(config: Config<TCtx>) {
|
|
|
85
85
|
cause: err instanceof Error ? err : undefined,
|
|
86
86
|
});
|
|
87
87
|
}
|
|
88
|
-
const { newCookies, token, baseUrl } = await init({
|
|
88
|
+
const { newCookies, token, baseUrl, providerName } = await init({
|
|
89
89
|
ctx,
|
|
90
90
|
provider,
|
|
91
91
|
router: config.router,
|
|
@@ -104,6 +104,7 @@ export function createEdgeStoreHonoHandler<TCtx>(config: Config<TCtx>) {
|
|
|
104
104
|
return c.json({
|
|
105
105
|
token,
|
|
106
106
|
baseUrl,
|
|
107
|
+
providerName,
|
|
107
108
|
});
|
|
108
109
|
} else if (matchPath(pathname, '/request-upload')) {
|
|
109
110
|
const body = await c.req.json<RequestUploadBody>();
|
|
@@ -85,7 +85,7 @@ export function createEdgeStoreNextHandler<TCtx>(config: Config<TCtx>) {
|
|
|
85
85
|
cause: err instanceof Error ? err : undefined,
|
|
86
86
|
});
|
|
87
87
|
}
|
|
88
|
-
const { newCookies, token, baseUrl } = await init({
|
|
88
|
+
const { newCookies, token, baseUrl, providerName } = await init({
|
|
89
89
|
ctx,
|
|
90
90
|
provider,
|
|
91
91
|
router: config.router,
|
|
@@ -95,6 +95,7 @@ export function createEdgeStoreNextHandler<TCtx>(config: Config<TCtx>) {
|
|
|
95
95
|
JSON.stringify({
|
|
96
96
|
token,
|
|
97
97
|
baseUrl,
|
|
98
|
+
providerName,
|
|
98
99
|
}),
|
|
99
100
|
{
|
|
100
101
|
status: 200,
|
|
@@ -82,7 +82,7 @@ export function createEdgeStoreNextHandler<TCtx>(config: Config<TCtx>) {
|
|
|
82
82
|
cause: err instanceof Error ? err : undefined,
|
|
83
83
|
});
|
|
84
84
|
}
|
|
85
|
-
const { newCookies, token, baseUrl } = await init({
|
|
85
|
+
const { newCookies, token, baseUrl, providerName } = await init({
|
|
86
86
|
ctx,
|
|
87
87
|
provider,
|
|
88
88
|
router: config.router,
|
|
@@ -92,6 +92,7 @@ export function createEdgeStoreNextHandler<TCtx>(config: Config<TCtx>) {
|
|
|
92
92
|
res.json({
|
|
93
93
|
token,
|
|
94
94
|
baseUrl,
|
|
95
|
+
providerName,
|
|
95
96
|
});
|
|
96
97
|
} else if (matchPath(pathname, '/request-upload')) {
|
|
97
98
|
res.json(
|
|
@@ -92,7 +92,7 @@ export function createEdgeStoreRemixHandler<TCtx>(config: Config<TCtx>) {
|
|
|
92
92
|
cause: err instanceof Error ? err : undefined,
|
|
93
93
|
});
|
|
94
94
|
}
|
|
95
|
-
const { newCookies, token, baseUrl } = await init({
|
|
95
|
+
const { newCookies, token, baseUrl, providerName } = await init({
|
|
96
96
|
ctx,
|
|
97
97
|
provider,
|
|
98
98
|
router: config.router,
|
|
@@ -110,7 +110,7 @@ export function createEdgeStoreRemixHandler<TCtx>(config: Config<TCtx>) {
|
|
|
110
110
|
responseHeaders.append('Set-Cookie', newCookies);
|
|
111
111
|
}
|
|
112
112
|
|
|
113
|
-
return new Response(JSON.stringify({ token, baseUrl }), {
|
|
113
|
+
return new Response(JSON.stringify({ token, baseUrl, providerName }), {
|
|
114
114
|
headers: responseHeaders,
|
|
115
115
|
status: 200,
|
|
116
116
|
});
|
package/src/adapters/shared.ts
CHANGED
|
@@ -167,12 +167,19 @@ export async function init<TCtx>(params: {
|
|
|
167
167
|
}
|
|
168
168
|
const baseUrl = await provider.getBaseUrl();
|
|
169
169
|
|
|
170
|
-
log.debug('Finished [init]', {
|
|
170
|
+
log.debug('Finished [init]', {
|
|
171
|
+
ctx,
|
|
172
|
+
newCookies,
|
|
173
|
+
token,
|
|
174
|
+
baseUrl,
|
|
175
|
+
providerName: provider.name,
|
|
176
|
+
});
|
|
171
177
|
|
|
172
178
|
return {
|
|
173
179
|
newCookies,
|
|
174
180
|
token,
|
|
175
181
|
baseUrl,
|
|
182
|
+
providerName: provider.name,
|
|
176
183
|
};
|
|
177
184
|
}
|
|
178
185
|
|
|
@@ -90,7 +90,7 @@ export function createEdgeStoreStartHandler<TCtx>(config: Config<TCtx>) {
|
|
|
90
90
|
cause: err instanceof Error ? err : undefined,
|
|
91
91
|
});
|
|
92
92
|
}
|
|
93
|
-
const { newCookies, token, baseUrl } = await init({
|
|
93
|
+
const { newCookies, token, baseUrl, providerName } = await init({
|
|
94
94
|
ctx,
|
|
95
95
|
provider,
|
|
96
96
|
router: config.router,
|
|
@@ -101,7 +101,7 @@ export function createEdgeStoreStartHandler<TCtx>(config: Config<TCtx>) {
|
|
|
101
101
|
headers.append('Set-Cookie', cookie);
|
|
102
102
|
});
|
|
103
103
|
headers.set('Content-Type', 'application/json');
|
|
104
|
-
return new Response(JSON.stringify({ token, baseUrl }), {
|
|
104
|
+
return new Response(JSON.stringify({ token, baseUrl, providerName }), {
|
|
105
105
|
status: 200,
|
|
106
106
|
headers,
|
|
107
107
|
});
|