feat: add EdgeOne adapter support

Integrates EdgeOne as a deployment adapter alongside existing providers like Cloudflare, Netlify, Node, and Vercel.

Enables deployment to EdgeOne platform by adding the adapter package and configuration, expanding the available deployment options for the project.
This commit is contained in:
ccbikai
2025-12-13 16:33:34 +08:00
parent d5249adc12
commit 4dbe36fa77
3 changed files with 75 additions and 9 deletions

View File

@@ -3,6 +3,7 @@ import cloudflare from '@astrojs/cloudflare'
import netlify from '@astrojs/netlify'
import node from '@astrojs/node'
import vercel from '@astrojs/vercel'
import edgeone from '@edgeone/astro'
import sentry from '@sentry/astro'
import { defineConfig } from 'astro/config'
import { provider } from 'std-env'
@@ -20,6 +21,7 @@ const providers = {
node: node({
mode: 'standalone',
}),
edgeone: edgeone(),
}
const adapterProvider = process.env.SERVER_ADAPTER || provider

View File

@@ -32,6 +32,7 @@
"@astrojs/netlify": "^6.6.0",
"@astrojs/node": "^9.5.0",
"@astrojs/vercel": "^9.0.0",
"@edgeone/astro": "^1.0.5",
"@types/prismjs": "^1.26.5",
"astro": "^5.15.7",
"astro-eslint-parser": "^1.2.2",

81
pnpm-lock.yaml generated
View File

@@ -54,6 +54,9 @@ importers:
'@astrojs/vercel':
specifier: ^9.0.0
version: 9.0.0(astro@5.15.7(@netlify/blobs@10.3.3)(@types/node@24.10.1)(@vercel/functions@2.2.13)(jiti@2.6.1)(lightningcss@1.30.2)(rollup@4.53.2)(typescript@5.9.3)(yaml@2.8.1))(rollup@4.53.2)
'@edgeone/astro':
specifier: ^1.0.5
version: 1.0.5(astro@5.15.7(@netlify/blobs@10.3.3)(@types/node@24.10.1)(@vercel/functions@2.2.13)(jiti@2.6.1)(lightningcss@1.30.2)(rollup@4.53.2)(typescript@5.9.3)(yaml@2.8.1))(rollup@4.53.2)
'@types/prismjs':
specifier: ^1.26.5
version: 1.26.5
@@ -389,6 +392,12 @@ packages:
'@dprint/toml@0.6.4':
resolution: {integrity: sha512-bZXIUjxr0LIuHWshZr/5mtUkOrnh0NKVZEF6ACojW5z7zkJu7s9sV2mMXm8XQDqN4cJzdHYUYzUyEGdfciaLJA==}
'@edgeone/astro@1.0.5':
resolution: {integrity: sha512-jG8otiL+iICg+aGxDg9BxCS8JN4A3t1VaKkfwAtYOuuanXpkq5YqXQmAyXCmCBMoKwdMi5PU26eMboOxq4hcYA==}
engines: {node: 22.x}
peerDependencies:
astro: ^5.0.0
'@emmetio/abbreviation@2.3.3':
resolution: {integrity: sha512-mgv58UrU3rh4YgbE/TzgLQwJ3pFsHHhCLqY20aJq+9comytTXUDNGG/SMtSeMJdkpxgXSXunBGLD8Boka3JyVA==}
@@ -2323,6 +2332,11 @@ packages:
'@aws-sdk/credential-provider-web-identity':
optional: true
'@vercel/nft@0.27.10':
resolution: {integrity: sha512-zbaF9Wp/NsZtKLE4uVmL3FyfFwlpDyuymQM1kPbeT0mVOHKDQQNjnnfslB3REg3oZprmNFJuh3pkHBk2qAaizg==}
engines: {node: '>=16'}
hasBin: true
'@vercel/nft@0.29.4':
resolution: {integrity: sha512-6lLqMNX3TuycBPABycx7A9F1bHQR7kiQln6abjFbPrf5C/05qHM9M5E4PeTE59c7z8g6vHnx1Ioihb2AQl7BTA==}
engines: {node: '>=18'}
@@ -3689,6 +3703,10 @@ packages:
resolution: {integrity: sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg==}
hasBin: true
glob@7.2.3:
resolution: {integrity: sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==}
deprecated: Glob versions prior to v9 are no longer supported
glob@9.3.5:
resolution: {integrity: sha512-e1LleDykUz2Iu+MTYdkSsuWX8lvAjAcs0Xef0lNIu0S2wOAzuTxCJtcd9S3cijlwYF18EsU3rzb8jPVobxDh9Q==}
engines: {node: '>=16 || 14 >=14.17'}
@@ -3844,6 +3862,10 @@ packages:
resolution: {integrity: sha512-Yg7+ztRkqslMAS2iFaU+Oa4KTSidr63OsFGlOrJoW981kIYO3CGCS3wA95P1mUi/IVSJkn0D479KTJpVpvFNuw==}
engines: {node: '>=18'}
inflight@1.0.6:
resolution: {integrity: sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==}
deprecated: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.
inherits@2.0.4:
resolution: {integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==}
@@ -4730,6 +4752,10 @@ packages:
resolution: {integrity: sha512-RjhtfwJOxzcFmNOi6ltcbcu4Iu+FL3zEj83dk4kAS+fVpTxXLO1b38RvJgT/0QwvV/L3aY9TAnyv0EOqW4GoMQ==}
engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0}
path-is-absolute@1.0.1:
resolution: {integrity: sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==}
engines: {node: '>=0.10.0'}
path-key@3.1.1:
resolution: {integrity: sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==}
engines: {node: '>=8'}
@@ -5295,11 +5321,6 @@ packages:
resolution: {integrity: sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==}
hasBin: true
semver@7.6.3:
resolution: {integrity: sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==}
engines: {node: '>=10'}
hasBin: true
semver@7.7.3:
resolution: {integrity: sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q==}
engines: {node: '>=10'}
@@ -6562,6 +6583,15 @@ snapshots:
'@dprint/toml@0.6.4': {}
'@edgeone/astro@1.0.5(astro@5.15.7(@netlify/blobs@10.3.3)(@types/node@24.10.1)(@vercel/functions@2.2.13)(jiti@2.6.1)(lightningcss@1.30.2)(rollup@4.53.2)(typescript@5.9.3)(yaml@2.8.1))(rollup@4.53.2)':
dependencies:
'@vercel/nft': 0.27.10(rollup@4.53.2)
astro: 5.15.7(@netlify/blobs@10.3.3)(@types/node@24.10.1)(@vercel/functions@2.2.13)(jiti@2.6.1)(lightningcss@1.30.2)(rollup@4.53.2)(typescript@5.9.3)(yaml@2.8.1)
transitivePeerDependencies:
- encoding
- rollup
- supports-color
'@emmetio/abbreviation@2.3.3':
dependencies:
'@emmetio/scanner': 1.0.4
@@ -8489,6 +8519,25 @@ snapshots:
dependencies:
'@vercel/oidc': 2.0.2
'@vercel/nft@0.27.10(rollup@4.53.2)':
dependencies:
'@mapbox/node-pre-gyp': 2.0.0
'@rollup/pluginutils': 5.3.0(rollup@4.53.2)
acorn: 8.15.0
acorn-import-attributes: 1.9.5(acorn@8.15.0)
async-sema: 3.1.1
bindings: 1.5.0
estree-walker: 2.0.2
glob: 7.2.3
graceful-fs: 4.2.11
node-gyp-build: 4.8.4
picomatch: 4.0.3
resolve-from: 5.0.0
transitivePeerDependencies:
- encoding
- rollup
- supports-color
'@vercel/nft@0.29.4(rollup@4.53.2)':
dependencies:
'@mapbox/node-pre-gyp': 2.0.0
@@ -10173,6 +10222,15 @@ snapshots:
package-json-from-dist: 1.0.1
path-scurry: 1.11.1
glob@7.2.3:
dependencies:
fs.realpath: 1.0.0
inflight: 1.0.6
inherits: 2.0.4
minimatch: 3.1.2
once: 1.4.0
path-is-absolute: 1.0.1
glob@9.3.5:
dependencies:
fs.realpath: 1.0.0
@@ -10378,6 +10436,11 @@ snapshots:
index-to-position@1.2.0: {}
inflight@1.0.6:
dependencies:
once: 1.4.0
wrappy: 1.0.2
inherits@2.0.4: {}
ipx@3.1.1(@netlify/blobs@10.3.3)(@vercel/functions@2.2.13):
@@ -11424,6 +11487,8 @@ snapshots:
path-exists@5.0.0: {}
path-is-absolute@1.0.1: {}
path-key@3.1.1: {}
path-key@4.0.0: {}
@@ -12047,8 +12112,6 @@ snapshots:
semver@6.3.1: {}
semver@7.6.3: {}
semver@7.7.3: {}
send@1.2.0:
@@ -12404,7 +12467,7 @@ snapshots:
typescript-auto-import-cache@0.3.3:
dependencies:
semver: 7.6.3
semver: 7.7.3
typescript@5.9.3: {}
@@ -12636,7 +12699,7 @@ snapshots:
volar-service-typescript@0.0.59(@volar/language-service@2.4.0-alpha.18):
dependencies:
path-browserify: 1.0.1
semver: 7.6.3
semver: 7.7.3
typescript-auto-import-cache: 0.3.3
vscode-languageserver-textdocument: 1.0.12
vscode-nls: 5.2.0