Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,21 @@ jobs:
uses: cloudflare/wrangler-action@da0e0dfe58b7a431659754fdf3f186c529afbe65 # v3.14.1
with:
apiToken: ${{ secrets.CF_API_TOKEN }}
command: deploy --env staging
command: deploy --env staging --outdir=./dist

- name: Upload sourcemaps for dist-worker-staging
if: github.event_name == 'push'
env:
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
runs: |
npx sentry-cli sourcemaps inject --org nodejs --project dist-worker-staging ./dist && sentry-cli sourcemaps upload --org nodejs --project dist-worker-staging ./dist

- name: Deploy to Production
if: github.event_name == 'workflow_dispatch'
uses: cloudflare/wrangler-action@da0e0dfe58b7a431659754fdf3f186c529afbe65 # v3.14.1
with:
apiToken: ${{ secrets.CF_API_TOKEN }}
command: deploy --env prod
command: deploy --env prod --outdir=./dist

- name: Alert on Failure
if: failure() && github.repository == 'nodejs/release-cloudflare-worker'
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@ node_modules/
.wrangler/
dist/
.dev.vars

.sentryclirc
265 changes: 265 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"@eslint/eslintrc": "^3.2.0",
"@eslint/js": "^9.32.0",
"@reporters/github": "^1.7.2",
"@sentry/cli": "^2.54.0",
"@types/mustache": "^4.2.6",
"@types/node": "^24.3.0",
"@typescript-eslint/eslint-plugin": "^8.41.0",
Expand Down
7 changes: 7 additions & 0 deletions src/worker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,13 @@ export default {
execution: ctx,
};

if (
env.ENVIRONMENT === 'staging' &&
request.url === '/_657ee98d-f9d3-46cd-837b-f58a88add70a'
) {
throw new Error('sentry source map testing');
}

return await router.handle(request, context);
} catch (e) {
// Send to sentry, if it's disabled this will just noop
Expand Down
Loading