diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index ad5bcee..cfe6a73 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -9,13 +9,13 @@ # the `language` matrix defined below to confirm you have the correct set of # supported CodeQL languages. # -name: "CodeQL Advanced" +name: 'CodeQL Advanced' on: push: - branches: [ "main" ] + branches: ['main'] pull_request: - branches: [ "main" ] + branches: ['main'] schedule: # Once a week - cron: '41 12 * * 4' @@ -60,4 +60,4 @@ jobs: - name: Perform CodeQL Analysis uses: github/codeql-action/analyze@d6bbdef45e766d081b84a2def353b0055f728d3e # v3.29.3 with: - category: "/language:javascript-typescript" + category: '/language:javascript-typescript' diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 8c4cdd6..7412030 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -17,6 +17,7 @@ jobs: with: egress-policy: block allowed-endpoints: > + sparrow.cloudflare.com:443 api.cloudflare.com:443 api.github.com:443 github.com:443 @@ -25,7 +26,7 @@ jobs: - name: Git Checkout uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 - + - name: Setup Node uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 with: diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 5303b34..6c8c4dd 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -38,7 +38,7 @@ jobs: with: node-version: lts/* cache: 'npm' - + - name: Install dependencies run: npm install diff --git a/.github/workflows/update-links.yml b/.github/workflows/update-links.yml index 8217e8d..e109066 100644 --- a/.github/workflows/update-links.yml +++ b/.github/workflows/update-links.yml @@ -7,7 +7,7 @@ on: # Triggered by https://github.com/nodejs/node/blob/main/.github/workflows/update-release-links.yml workflow_dispatch: schedule: - - cron: "0 0 * * *" + - cron: '0 0 * * *' concurrency: group: update-redirect-links @@ -46,7 +46,7 @@ jobs: with: node-version: lts/* cache: 'npm' - + - name: Install dependencies run: npm install && npm update nodejs-latest-linker --save @@ -55,7 +55,7 @@ jobs: env: CF_ACCESS_KEY_ID: ${{ secrets.CF_ACCESS_KEY_ID }} CF_SECRET_ACCESS_KEY: ${{ secrets.CF_SECRET_ACCESS_KEY }} - + - name: Commit Changes id: git_auto_commit uses: stefanzweifel/git-auto-commit-action@b863ae1933cb653a53c021fe36dbb774e1fb9403 # v5.2.0 @@ -64,7 +64,7 @@ jobs: commit_message: 'chore: update redirect links' branch: update-redirect-links create_branch: true - + - name: Open and Merge Pull Request if: steps.git_auto_commit.outputs.changes_detected == 'true' run: | @@ -90,4 +90,3 @@ jobs: SLACK_MESSAGE: The `update-links.yml` action has failed. SLACK_USERNAME: nodejs-bot SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} - diff --git a/package.json b/package.json index 0ab9a85..2fe34dd 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,7 @@ "type": "module", "scripts": { "start": "wrangler dev --remote", - "format": "prettier --check --write \"**/*.{ts,js,mjs,json,md}\"", + "format": "prettier --check --write \"**/*.{ts,js,mjs,json,jsonc,md,yml}\"", "prettier": "prettier --check \"**/*.{ts,js,mjs,json,md}\"", "lint": "eslint ./src", "test": "vitest --run", diff --git a/wrangler.jsonc b/wrangler.jsonc index 74418a2..ac12dda 100644 --- a/wrangler.jsonc +++ b/wrangler.jsonc @@ -4,6 +4,7 @@ "main": "src/worker.ts", "compatibility_date": "2024-09-05", "logpush": true, + "preview_urls": false, "vars": { "workers_dev": true, "ENVIRONMENT": "dev", @@ -11,14 +12,14 @@ "LOG_ERRORS": true, "S3_ENDPOINT": "https://07be8d2fbc940503ca1be344714cb0d1.r2.cloudflarestorage.com", "BUCKET_NAME": "dist-prod", - "ORIGIN_HOST": "https://origin.nodejs.org" + "ORIGIN_HOST": "https://origin.nodejs.org", }, "r2_buckets": [ { "binding": "R2_BUCKET", "preview_bucket_name": "dist-prod", - "bucket_name": "dist-prod" - } + "bucket_name": "dist-prod", + }, ], "env": { "staging": { @@ -27,40 +28,42 @@ "workers_dev": true, "ENVIRONMENT": "staging", "CACHING": true, + "LOG_ERRORS": false, "S3_ENDPOINT": "https://07be8d2fbc940503ca1be344714cb0d1.r2.cloudflarestorage.com", "BUCKET_NAME": "dist-prod", - "ORIGIN_HOST": "https://origin.nodejs.org" + "ORIGIN_HOST": "https://origin.nodejs.org", }, "r2_buckets": [ { "binding": "R2_BUCKET", "preview_bucket_name": "dist-prod", - "bucket_name": "dist-prod" - } - ] + "bucket_name": "dist-prod", + }, + ], }, "prod": { "account_id": "07be8d2fbc940503ca1be344714cb0d1", "tail_consumers": [ { - "service": "dist-worker-prod-tail" - } + "service": "dist-worker-prod-tail", + }, ], "vars": { "workers_dev": false, "ENVIRONMENT": "prod", "CACHING": true, + "LOG_ERRORS": false, "S3_ENDPOINT": "https://07be8d2fbc940503ca1be344714cb0d1.r2.cloudflarestorage.com", "BUCKET_NAME": "dist-prod", - "ORIGIN_HOST": "https://origin.nodejs.org" + "ORIGIN_HOST": "https://origin.nodejs.org", }, "r2_buckets": [ { "binding": "R2_BUCKET", "preview_bucket_name": "dist-prod", - "bucket_name": "dist-prod" - } - ] - } - } -} \ No newline at end of file + "bucket_name": "dist-prod", + }, + ], + }, + }, +}