Skip to content

Commit ecf10fa

Browse files
committed
feat: 新增 EdgeOne 部署支持及 WebAuthn 核心架构安全重构
1 parent 7987668 commit ecf10fa

83 files changed

Lines changed: 183360 additions & 1430 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.dockerignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,12 @@ deno.lock
1313

1414
# 2. Dependencies
1515
api/index.mjs*
16+
cloud-functions/
1617
**/node_modules/
1718
backend/dist/netlify/
1819
backend/dist/worker/
1920
backend/dist/vercel/
21+
backend/dist/edgeone/
2022
backend/tests/
2123
backend/tsup.config.ts
2224
backend/vitest.config.ts

.edgeoneignore

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
# 1. Environment & Secrets (STRICT - DO NOT COMMIT)
2+
.env
3+
.env.*
4+
.secrets
5+
.dev.vars
6+
.demo.vars
7+
.actrc
8+
.event
9+
deno.lock
10+
*.pem
11+
*.key
12+
*.cert
13+
14+
# 2. Dependencies
15+
**/node_modules/
16+
backend/dist/docker/
17+
backend/dist/netlify/
18+
backend/dist/worker/
19+
backend/dist/vercel/
20+
backend/tests/
21+
backend/tsup.config.ts
22+
backend/vitest.config.ts
23+
frontend/playwright-report/
24+
frontend/tests/
25+
frontend/playwright.config.js
26+
27+
# 3. Build & Temp
28+
.dist/
29+
.github/
30+
.netlify/
31+
.security/
32+
.vercel/
33+
.wrangler/
34+
.functions-serve/
35+
npm-debug.log*
36+
37+
# 4. Database & Local Data
38+
data/
39+
*.db
40+
*.db-journal
41+
*.db-wal
42+
**/*.db*
43+
44+
# 5. Developer Tools & IDEs
45+
.DS_Store
46+
.vscode/
47+
.idea/
48+
49+
# 6. Agentic AI & Local Scripts
50+
.antigravity
51+
.gemini/
52+
.agent/
53+
.agents/
54+
.act/
55+
.example/
56+
.actrc
57+
.event
58+
.dockerignore
59+
.gitignore
60+
.docker-compose*.yml
61+
Dockerfile
62+
example.dev.vars
63+
netlify.toml
64+
vercel.json
65+
README*.md
66+
wrangler*.toml

.github/workflows/edgeone.yml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: Deploy to EdgeOne
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
workflow_dispatch:
8+
9+
jobs:
10+
edgeone:
11+
runs-on: ubuntu-latest
12+
name: "Deploy to EdgeOne"
13+
permissions:
14+
contents: read
15+
16+
steps:
17+
- name: Checkout
18+
uses: actions/checkout@v4
19+
20+
- name: Setup Node.js
21+
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
22+
with:
23+
node-version: 24
24+
cache: 'npm'
25+
26+
- name: Check Required Secrets
27+
run: |
28+
REQUIRED=(EDGEONE_PAGES_TOKEN EDGEONE_PAGES_PROJECT_NAME)
29+
for var in "${REQUIRED[@]}"; do
30+
if [ -z "${!var}" ]; then
31+
echo "❌ Error: $var is missing."
32+
exit 1
33+
fi
34+
done
35+
env:
36+
EDGEONE_PAGES_TOKEN: ${{ secrets.EDGEONE_PAGES_TOKEN }}
37+
EDGEONE_PAGES_PROJECT_NAME: ${{ secrets.EDGEONE_PAGES_PROJECT_NAME }}
38+
39+
- name: Inject Commit Hash & Platform
40+
run: node scripts/inject_vars.js --platform=edgeone
41+
42+
- name: Install Dependencies
43+
run: npm install
44+
45+
- name: Build and Deploy to EdgeOne
46+
run: |
47+
npx edgeone makers deploy . -n $EDGEONE_PAGES_PROJECT_NAME -t $EDGEONE_PAGES_TOKEN > /dev/null 2>&1
48+
env:
49+
EDGEONE_PAGES_TOKEN: ${{ secrets.EDGEONE_PAGES_TOKEN }}
50+
EDGEONE_PAGES_PROJECT_NAME: ${{ secrets.EDGEONE_PAGES_PROJECT_NAME }}
51+
52+
- name: Success Notification
53+
run: echo "🚀 NodeAuth deployed successfully to EdgeOne!"

.netlifyignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,12 @@ deno.lock
1313

1414
# 2. Dependencies
1515
api/index.mjs*
16+
cloud-functions/
1617
**/node_modules/
1718
backend/dist/docker/
1819
backend/dist/vercel/
1920
backend/dist/worker/
21+
backend/dist/edgeone/
2022
backend/tests/
2123
backend/tsup.config.ts
2224
backend/vitest.config.ts

.vercelignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,12 @@ deno.lock
1212
*.cert
1313

1414
# 2. Dependencies
15+
cloud-functions/
1516
**/node_modules/
1617
backend/dist/docker/
1718
backend/dist/netlify/
1819
backend/dist/worker/
20+
backend/dist/edgeone/
1921
backend/tests/
2022
backend/tsup.config.ts
2123
backend/vitest.config.ts

.wranglerignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
api/
2+
cloud-functions/
23
backend/dist/docker/
34
backend/dist/netlify/
4-
backend/dist/vercel/
5+
backend/dist/vercel/
6+
backend/dist/edgeone/

0 commit comments

Comments
 (0)