diff --git a/.gitattributes b/.gitattributes index 2b11ffdd..e4836ba8 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,4 +1,2 @@ * text=auto eol=lf -# cspell:ignore lockb -*.lockb binary diff=lockb .gitignore linguist-generated=true diff --git a/.github/workflows/autofix.yml b/.github/workflows/autofix.yml index bc675553..2f8f7ec9 100644 --- a/.github/workflows/autofix.yml +++ b/.github/workflows/autofix.yml @@ -24,17 +24,19 @@ jobs: steps: - name: Checkout uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + with: + persist-credentials: false - name: Install mise - uses: jdx/mise-action@5bb8f8c1911837cf42064e6490e7634fc842ee7e # v2.1.8 + uses: jdx/mise-action@5083fe46898c414b2475087cc79da59e7da859e8 # v2.1.11 with: - version: 2024.12.14 + version: 2024.12.24 cache_save: ${{ github.ref_name == 'main' }} env: GITHUB_TOKEN: ${{ github.token }} - name: Run autofix - run: mise run check + run: mise run check --continue-on-error continue-on-error: true - name: autofix.ci diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 7c712cbf..d6736e2a 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -30,11 +30,13 @@ jobs: steps: - name: Checkout uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + with: + persist-credentials: false - name: Install mise - uses: jdx/mise-action@5bb8f8c1911837cf42064e6490e7634fc842ee7e # v2.1.8 + uses: jdx/mise-action@5083fe46898c414b2475087cc79da59e7da859e8 # v2.1.11 with: - version: 2024.12.14 + version: 2024.12.24 cache_save: ${{ github.ref_name == 'main' }} env: GITHUB_TOKEN: ${{ github.token }} @@ -42,9 +44,9 @@ jobs: - name: List mise tasks id: list run: | - tasks=$(mise tasks ls --json --hidden \ + tasks=$(mise tasks ls --json \ | jq --raw-output --compact-output \ - 'map(select(.name | test("^(ci:|lint:)")) | {name: (.name | sub("^(ci:|lint:)" ; "")), task: .name})') + 'map(select(.name | test("^(check:)")) | {name: (.name | sub("^.+:" ; "")), task: .name})') echo "tasks=${tasks}" >> "${GITHUB_OUTPUT}" lint: @@ -66,17 +68,21 @@ jobs: steps: - name: Checkout uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + with: + persist-credentials: false - name: Install mise - uses: jdx/mise-action@5bb8f8c1911837cf42064e6490e7634fc842ee7e # v2.1.8 + uses: jdx/mise-action@5083fe46898c414b2475087cc79da59e7da859e8 # v2.1.11 with: - version: 2024.12.14 + version: 2024.12.24 cache_save: ${{ github.ref_name == 'main' }} env: GITHUB_TOKEN: ${{ github.token }} - name: Run ${{ matrix.name }} run: mise run ${{ matrix.task }} + env: + LINT: true commitlint: runs-on: ubuntu-24.04 @@ -89,11 +95,12 @@ jobs: uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: fetch-depth: 0 # fetch all history for commitlint + persist-credentials: false - name: Install mise - uses: jdx/mise-action@5bb8f8c1911837cf42064e6490e7634fc842ee7e # v2.1.8 + uses: jdx/mise-action@5083fe46898c414b2475087cc79da59e7da859e8 # v2.1.11 with: - version: 2024.12.14 + version: 2024.12.24 cache_save: ${{ github.ref_name == 'main' }} env: GITHUB_TOKEN: ${{ github.token }} diff --git a/.github/workflows/pr-updater.yml b/.github/workflows/pr-updater.yml index fb0e79f6..bb47bacc 100644 --- a/.github/workflows/pr-updater.yml +++ b/.github/workflows/pr-updater.yml @@ -21,7 +21,7 @@ jobs: steps: - name: Create GitHub App token id: app-token - uses: actions/create-github-app-token@5d869da34e18e7287c1daad50e0b8ea0f506ce69 # v1.11.0 + uses: actions/create-github-app-token@c1a285145b9d317df6ced56c09f525b5c2b6f755 # v1.11.1 with: app-id: ${{ vars.PR_UPDATER_APP_ID }} private-key: ${{ secrets.PR_UPDATER_SECRET_KEY }} @@ -29,11 +29,13 @@ jobs: - name: List PRs id: list-prs run: | - numbers=$(gh pr list --repo ${{ github.repository }} --json number --jq 'map(.number)' ${{ - github.event_name == 'workflow_dispatch' && github.ref_name != github.event.repository.default_branch - && format('--head {0}', github.ref_name) - || '' - }}) + numbers=$(gh pr list --repo ${{ github.repository }} \ + --json number,headRefName \ + --jq '[.[] | select(.headRefName | startswith("renovate/") | not) | .number]' ${{ + github.event_name == 'workflow_dispatch' && github.ref_name != github.event.repository.default_branch + && format('--head {0}', github.ref_name) + || '' + }}) echo "numbers=${numbers}" > "${GITHUB_OUTPUT}" env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/worker.yml b/.github/workflows/worker.yml index 8463f6e2..cb27efb4 100644 --- a/.github/workflows/worker.yml +++ b/.github/workflows/worker.yml @@ -34,17 +34,18 @@ jobs: tasks/* worker/* sparse-checkout-cone-mode: false + persist-credentials: false - name: Install mise - uses: jdx/mise-action@5bb8f8c1911837cf42064e6490e7634fc842ee7e # v2.1.8 + uses: jdx/mise-action@5083fe46898c414b2475087cc79da59e7da859e8 # v2.1.11 with: - version: 2024.12.14 + version: 2024.12.24 cache_save: ${{ github.ref_name == 'main' }} env: GITHUB_TOKEN: ${{ github.token }} - name: Run tests - run: mise run worker:test:ci + run: mise run worker:test deploy-worker: needs: @@ -68,11 +69,12 @@ jobs: tasks/* worker/* sparse-checkout-cone-mode: false + persist-credentials: false - name: Install mise - uses: jdx/mise-action@5bb8f8c1911837cf42064e6490e7634fc842ee7e # v2.1.8 + uses: jdx/mise-action@5083fe46898c414b2475087cc79da59e7da859e8 # v2.1.11 with: - version: 2024.12.14 + version: 2024.12.24 cache_save: ${{ github.ref_name == 'main' }} env: GITHUB_TOKEN: ${{ github.token }} diff --git a/.github/workflows/wsl-docker.yml b/.github/workflows/wsl-docker.yml index b8daf4fa..82653f01 100644 --- a/.github/workflows/wsl-docker.yml +++ b/.github/workflows/wsl-docker.yml @@ -35,9 +35,9 @@ jobs: steps: - name: Install mise - uses: jdx/mise-action@5bb8f8c1911837cf42064e6490e7634fc842ee7e # v2.1.8 + uses: jdx/mise-action@5083fe46898c414b2475087cc79da59e7da859e8 # v2.1.11 with: - version: 2024.12.14 + version: 2024.12.24 # cspell:ignore kellyjonbrazil mise_toml: | [tools] diff --git a/.vscode/settings.json b/.vscode/settings.json index 7d944090..da886070 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -42,7 +42,7 @@ "winget.json": "jsonc", "gpg-agent.conf": "plaintext", // match on the absolute path if / is contained - "**/mise-tasks/**": "shellscript", + "**/tasks/**": "shellscript", "**/wsl/etc/**": "plaintext" }, diff --git a/commitlint.config.ts b/commitlint.config.ts index d63ea8ac..a2589f3d 100644 --- a/commitlint.config.ts +++ b/commitlint.config.ts @@ -3,13 +3,15 @@ import conventionalConfig from "@commitlint/config-conventional"; import type { UserConfig } from "@commitlint/types"; -// exclude isBreaking, breaking, and breakingBody because this package does not have versioning -// exclude isIssueAffected, issuesBody, and issues because I link branches to issues using GitHub -const questions: string[] = [ - "type", - "scope", - "subject", - "body", +const excludeQuestions: string[] = [ + // exclude isBreaking, breaking, and breakingBody because this package does not have versioning + "isBreaking", + "breaking", + "breakingBody", + // exclude isIssueAffected, issuesBody, and issues because I link branches to issues using GitHub + "isIssueAffected", + "issuesBody", + "issues", ] satisfies (keyof typeof conventionalConfig.prompt.questions)[]; const commitlintConfig: UserConfig = { @@ -18,8 +20,8 @@ const commitlintConfig: UserConfig = { prompt: { ...conventionalConfig.prompt, questions: Object.fromEntries( - Object.entries(conventionalConfig.prompt.questions).filter(([key]) => - questions.includes(key), + Object.entries(conventionalConfig.prompt.questions).filter( + ([key]) => !excludeQuestions.includes(key), ), ), }, diff --git a/github/rulesets.json b/github/rulesets.json new file mode 100644 index 00000000..fbc76542 --- /dev/null +++ b/github/rulesets.json @@ -0,0 +1,65 @@ +{ + "name": "main", + "target": "branch", + "enforcement": "active", + "conditions": { + "ref_name": { + "exclude": [], + "include": ["~DEFAULT_BRANCH"] + } + }, + "rules": [ + { + "type": "deletion" + }, + { + "type": "non_fast_forward" + }, + { + "type": "creation" + }, + { + "type": "required_linear_history" + }, + { + "type": "pull_request", + "parameters": { + "required_approving_review_count": 0, + "dismiss_stale_reviews_on_push": true, + "require_code_owner_review": false, + "require_last_push_approval": false, + "required_review_thread_resolution": false, + "automatic_copilot_code_review_enabled": false, + "allowed_merge_methods": ["squash"] + } + }, + { + "type": "required_status_checks", + "parameters": { + "strict_required_status_checks_policy": false, + "do_not_enforce_on_create": false, + "required_status_checks": [ + { + "context": "merge-gatekeeper" + } + ] + } + }, + { + "type": "required_signatures" + }, + { + "type": "code_scanning", + "parameters": { + "code_scanning_tools": [ + { + "tool": "CodeQL", + "security_alerts_threshold": "all", + "alerts_threshold": "all" + } + ] + } + } + ], + "bypass_actors": [] +} diff --git a/lychee.toml b/lychee.toml index 281ae48a..9b163341 100644 --- a/lychee.toml +++ b/lychee.toml @@ -28,7 +28,7 @@ exclude = [ # wsl/install.sh # can't be accessed "https://mise.jdx.dev/deb", - # mise-tasks/worker/wrangler-args + # tasks/worker/wrangler-args # an example of a url with authentication "https://.+@github.com/owner/repo", ] diff --git a/mise.toml b/mise.toml index b06c1400..c10de78a 100644 --- a/mise.toml +++ b/mise.toml @@ -1,32 +1,33 @@ # ref: https://mise.jdx.dev/configuration.html #:schema https://mise.jdx.dev/schema/mise.json -min_version = "2024.12.14" +min_version = "2024.12.24" [tools] -bun = "1.1.40" -node = "23.4.0" -uv = "0.5.10" +bun = "1.1.42" +node = "23.5.0" +uv = "0.5.13" "aqua:biomejs/biome" = "1.9.4" -actionlint = "1.7.4" +actionlint = "1.7.5" # renovate: extractVersion=^v(?.+) -"aqua:suzuki-shunsuke/ghalint" = "1.1.0" # cspell:ignore shunsuke +"aqua:suzuki-shunsuke/ghalint" = "1.2.1" # cspell:ignore shunsuke # renovate: extractVersion=^v(?.+) -"aqua:suzuki-shunsuke/pinact" = "1.0.0" +"aqua:suzuki-shunsuke/pinact" = "1.1.2" # cspell:ignore tamasfe # renovate: packageName=tamasfe/taplo taplo = "0.9.3" "npm:prettier" = "3.4.2" -markdownlint-cli2 = "0.16.0" +markdownlint-cli2 = "0.17.1" shfmt = "3.10.0" shellcheck = "0.10.0" yamlfmt = "0.14.0" yamllint = "1.35.1" -"npm:renovate" = "39.75.0" +"npm:renovate" = "39.86.4" "npm:cspell" = "8.17.1" # cspell:ignore lycheeverse "aqua:lycheeverse/lychee" = "0.18.0" -"npm:ignore-sync" = "7.0.1" +typos = "1.29.0" +"npm:ignore-sync" = "8.0.0" [settings] experimental = true diff --git a/tasks.toml b/tasks.toml index bd95a42e..37d24ad9 100644 --- a/tasks.toml +++ b/tasks.toml @@ -12,134 +12,92 @@ run = "bun run git-cz" [check] depends = ["check:*"] -[ci] -depends = [ - "ci:*", # lint and/or check formatting - "lint:*", # lint only -] -hide = true - ["check:biome"] -run = "biome check --write --error-on-warnings" -["ci:biome"] -run = "biome ci --error-on-warnings" -hide = true +run = "biome {% if env.LINT is undefined %}check --write{% else %}ci{% endif %} --error-on-warnings" ["check:tsc"] depends = ["buni"] run = [ - "bun run tsc", - "bun run --cwd worker tsc --project tsconfig.base.json", - "bun run --cwd worker tsc --project tsconfig.src.json", - "bun run --cwd worker tsc --project tsconfig.test.json", -] -["ci:tsc"] -depends = ["buni"] -run = [ - "bun run tsc --incremental false", - "bun run --cwd worker tsc --project tsconfig.base.json --incremental false", - "bun run --cwd worker tsc --project tsconfig.src.json --incremental false", - "bun run --cwd worker tsc --project tsconfig.test.json --incremental false", + "bun run tsc {% if env.CI is defined %}--incremental false{% endif %}", + "bun run --cwd worker tsc --project tsconfig.base.json {% if env.CI is defined %}--incremental false{% endif %}", + "bun run --cwd worker tsc --project tsconfig.src.json {% if env.CI is defined %}--incremental false{% endif %}", + "bun run --cwd worker tsc --project tsconfig.test.json {% if env.CI is defined %}--incremental false{% endif %}", ] -hide = true -["lint:jsonschema"] +["check:jsonschema"] # schema of wrangler.jsonc is in node_modules depends = ["buni:root", "buni:worker"] run = "bun run scripts/validate-json-schema.ts" -alias = "check:jsonschema" -["lint:actionlint"] +["check:actionlint"] run = "actionlint -color" -alias = "check:actionlint" # SC2312: check-extra-masked-returns # pipefail is set by shell: bash in GitHub Actions but cannot be detected by shellcheck # ref: https://docs.github.com/en/actions/writing-workflows/workflow-syntax-for-github-actions#defaultsrunshell env = { "SHELLCHECK_OPTS" = "--enable=all --exclude=SC2312" } -["lint:ghalint"] +["check:ghalint"] wait_for = ["check:pinact"] run = "ghalint run" -alias = "check:ghalint" ["check:pinact"] run = "pinact run --verify" -["ci:pinact"] -depends = ["check:pinact"] -depends_post = ["util:nodiff"] -hide = true +depends_post = [ + "{% if env.CI is defined %}util:nodiff{% else %}util:donothing{% endif %}", +] ["check:taplo"] -run = ["taplo lint", "taplo fmt"] -["ci:taplo"] -run = ["taplo lint", "taplo fmt --check --diff"] -hide = true +run = [ + "taplo lint", + "taplo fmt {% if env.LINT is undefined %}--check --diff{% endif %}", +] ["check:prettier"] -run = "prettier --write --cache ." -["ci:prettier"] -run = "prettier --check ." -hide = true +run = """ +prettier {% if env.LINT is undefined %}--write{% else %}--check{% endif %} \ + {% if env.CI is undefined %}--cache{% endif %} .""" ["check:markdownlint"] -run = "markdownlint-cli2 --fix" -["ci:markdownlint"] -run = "markdownlint-cli2" -hide = true +run = "markdownlint-cli2 {% if env.LINT is undefined %}--fix{% endif %}" ["check:shfmt"] # cannot exclude gitignored files # ref: https://github.com/mvdan/sh/issues/288 -run = "shfmt --list --write --simplify {{ exec(command='mise run util:list-scripts') }}" -["ci:shfmt"] -run = "shfmt --diff --simplify {{ exec(command='mise run util:list-scripts') }}" -hide = true +run = """ +shfmt {% if env.LINT is undefined %}--list --write{% else %}--diff{% endif %} \ + --simplify {{ exec(command='mise run util:list-scripts') }}""" -["lint:shellcheck"] +["check:shellcheck"] # recursive globbing is not supported # ref: https://www.shellcheck.net/wiki/Recursiveness # ref: https://github.com/koalaman/shellcheck/issues/143 run = "shellcheck --external-sources {{ exec(command='mise run util:list-scripts') }}" -alias = "check:shellcheck" ["check:yamlfmt"] -run = "yamlfmt ." -["ci:yamlfmt"] -run = "yamlfmt -lint ." -hide = true +run = "yamlfmt {% if env.LINT is defined %}-lint{% endif %} ." -["lint:yamllint"] +["check:yamllint"] run = "yamllint --strict ." -alias = "check:yamllint" -["lint:renovate"] +["check:renovate"] run = "renovate-config-validator --strict" -alias = "check:renovate" ["check:cspell"] -run = "cspell --cache \"**/*\"" -["ci:cspell"] -run = "cspell \"**/*\"" -hide = true +run = "cspell {% if env.CI is undefined %}--cache{% endif %} \"**/*\"" ["check:lychee"] -run = "lychee --cache \"**/*\"" -["ci:lychee"] -run = "lychee --verbose \"**/*\"" -hide = true +run = """ +lychee {% if env.LINT is defined %}--verbose{% endif %} \ + {% if env.CI is undefined %}--cache{% endif %} \"**/*\"""" ["check:typos"] -run = "typos --write-changes" -["ci:typos"] -run = "typos" -hide = true +run = "typos {% if env.LINT is undefined %}--write-changes{% endif %}" ["check:ignore-sync"] run = "ignore-sync ." -["ci:ignore-sync"] -depends = ["check:ignore-sync"] -depends_post = ["util:nodiff"] -hide = true +depends_post = [ + "{% if env.CI is defined %}util:nodiff{% else %}util:donothing{% endif %}", +] ["worker:dev"] depends = ["buni:worker"] @@ -148,13 +106,8 @@ run = "bun run wrangler dev ${{ exec(command='mise run worker:wrangler-args') }} ["worker:test"] depends = ["buni:worker"] -run = "bun run vitest watch --ui" -dir = "worker" -["worker:test:ci"] -depends = ["buni:worker"] -run = "bun run vitest run" +run = "bun run vitest {% if env.CI is undefined %}watch --ui{% else %}run{% endif %}" dir = "worker" -hide = true ["buni"] depends = ["buni:root", "buni:worker"] @@ -172,6 +125,11 @@ hide = true run = ["git add .", "git diff --staged --exit-code"] hide = true +# cspell:ignore donothing +["util:donothing"] +run = "" +hide = true + ["util:list-scripts"] # .bashrc is not detected by shfmt --find run = "git_files=$(git ls-files) && scripts=$(shfmt --find $git_files) && echo wsl/home/.bashrc $scripts" diff --git a/tasks/worker/wrangler-args b/tasks/worker/wrangler-args index 62653aab..dd6a67a2 100755 --- a/tasks/worker/wrangler-args +++ b/tasks/worker/wrangler-args @@ -5,7 +5,12 @@ set -euo pipefail -compat_date=$(mise run worker:wrangler-compat-date) +# call script directly for direct call in workers build environment +if command -v mise >/dev/null 2>&1; then + compat_date=$(mise run worker:wrangler-compat-date) +else + compat_date=$(./wrangler-compat-date) +fi remote_info=$(git remote show origin) # in cloudflare workers builds, the url is in the format `https://*****@github.com/owner/repo` diff --git a/worker/bun.lock b/worker/bun.lock index c15f318b..7c4e8446 100755 --- a/worker/bun.lock +++ b/worker/bun.lock @@ -3,12 +3,12 @@ "workspaces": { "": { "dependencies": { - "hono": "4.6.14", + "hono": "4.6.15", "zod": "3.24.1", }, "devDependencies": { - "@cloudflare/vitest-pool-workers": "0.5.38", - "@cloudflare/workers-types": "4.20241216.0", + "@cloudflare/vitest-pool-workers": "0.5.40", + "@cloudflare/workers-types": "4.20241230.0", "@total-typescript/tsconfig": "1.0.4", "@tsconfig/bun": "1.0.7", "@tsconfig/strictest": "2.0.5", @@ -18,26 +18,26 @@ "diff": "7.0.0", "typescript": "5.7.2", "vitest": "2.1.8", - "wrangler": "3.97.0", + "wrangler": "3.99.0", }, }, }, "packages": { "@cloudflare/kv-asset-handler": ["@cloudflare/kv-asset-handler@0.3.4", "", { "dependencies": { "mime": "^3.0.0" } }, "sha512-YLPHc8yASwjNkmcDMQMY35yiWjoKAKnhUbPRszBRS0YgH+IXtsMp61j+yTcnCE3oO2DgP0U3iejLC8FTtKDC8Q=="], - "@cloudflare/vitest-pool-workers": ["@cloudflare/vitest-pool-workers@0.5.38", "", { "dependencies": { "birpc": "0.2.14", "cjs-module-lexer": "^1.2.3", "devalue": "^4.3.0", "esbuild": "0.17.19", "miniflare": "3.20241205.0", "semver": "^7.5.1", "wrangler": "3.97.0", "zod": "^3.22.3" }, "peerDependencies": { "@vitest/runner": "2.0.x - 2.1.x", "@vitest/snapshot": "2.0.x - 2.1.x", "vitest": "2.0.x - 2.1.x" } }, "sha512-dkcC3KeNVXP+KFU236BeZh1EgmHudjisJ7qr1oRlg+rMPsNlclEGeJ8PuAl3T2IgBQdZo/D1qLY205XZlcm7bg=="], + "@cloudflare/vitest-pool-workers": ["@cloudflare/vitest-pool-workers@0.5.40", "", { "dependencies": { "birpc": "0.2.14", "cjs-module-lexer": "^1.2.3", "devalue": "^4.3.0", "esbuild": "0.17.19", "miniflare": "3.20241218.0", "semver": "^7.5.1", "wrangler": "3.99.0", "zod": "^3.22.3" }, "peerDependencies": { "@vitest/runner": "2.0.x - 2.1.x", "@vitest/snapshot": "2.0.x - 2.1.x", "vitest": "2.0.x - 2.1.x" } }, "sha512-aBHNj55l6G07+ZJuhJsuElDYOEKcGJ4nEdE+X7XmyCRxiw7eRjc1iPQOfEFqprzKQ/2tPEOO8hL0mgRIgt8K3g=="], - "@cloudflare/workerd-darwin-64": ["@cloudflare/workerd-darwin-64@1.20241205.0", "", { "os": "darwin", "cpu": "x64" }, "sha512-TArEZkSZkHJyEwnlWWkSpCI99cF6lJ14OVeEoI9Um/+cD9CKZLM9vCmsLeKglKheJ0KcdCnkA+DbeD15t3VaWg=="], + "@cloudflare/workerd-darwin-64": ["@cloudflare/workerd-darwin-64@1.20241218.0", "", { "os": "darwin", "cpu": "x64" }, "sha512-8rveQoxtUvlmORKqTWgjv2ycM8uqWox0u9evn3zd2iWKdou5sncFwH517ZRLI3rq9P31ZLmCQBZ0gloFsTeY6w=="], - "@cloudflare/workerd-darwin-arm64": ["@cloudflare/workerd-darwin-arm64@1.20241205.0", "", { "os": "darwin", "cpu": "arm64" }, "sha512-u5eqKa9QRdA8MugfgCoD+ADDjY6EpKbv3hSYJETmmUh17l7WXjWBzv4pUvOKIX67C0UzMUy4jZYwC53MymhX3w=="], + "@cloudflare/workerd-darwin-arm64": ["@cloudflare/workerd-darwin-arm64@1.20241218.0", "", { "os": "darwin", "cpu": "arm64" }, "sha512-be59Ad9nmM9lCkhHqmTs/uZ3JVZt8NJ9Z0PY+B0xnc5z6WwmV2lj0RVLtq7xJhQsQJA189zt5rXqDP6J+2mu7Q=="], - "@cloudflare/workerd-linux-64": ["@cloudflare/workerd-linux-64@1.20241205.0", "", { "os": "linux", "cpu": "x64" }, "sha512-OYA7S5zpumMamWEW+IhhBU6YojIEocyE5X/YFPiTOCrDE3dsfr9t6oqNE7hxGm1VAAu+Irtl+a/5LwmBOU681w=="], + "@cloudflare/workerd-linux-64": ["@cloudflare/workerd-linux-64@1.20241218.0", "", { "os": "linux", "cpu": "x64" }, "sha512-MzpSBcfZXRxrYWxQ4pVDYDrUbkQuM62ssl4ZtHH8J35OAeGsWFAYji6MkS2SpVwVcvacPwJXIF4JSzp4xKImKw=="], - "@cloudflare/workerd-linux-arm64": ["@cloudflare/workerd-linux-arm64@1.20241205.0", "", { "os": "linux", "cpu": "arm64" }, "sha512-qAzecONjFJGIAVJZKExQ5dlbic0f3d4A+GdKa+H6SoUJtPaWiE3K6WuePo4JOT7W3/Zfh25McmX+MmpMUUcM5Q=="], + "@cloudflare/workerd-linux-arm64": ["@cloudflare/workerd-linux-arm64@1.20241218.0", "", { "os": "linux", "cpu": "arm64" }, "sha512-RIuJjPxpNqvwIs52vQsXeRMttvhIjgg9NLjjFa3jK8Ijnj8c3ZDru9Wqi48lJP07yDFIRr4uDMMqh/y29YQi2A=="], - "@cloudflare/workerd-windows-64": ["@cloudflare/workerd-windows-64@1.20241205.0", "", { "os": "win32", "cpu": "x64" }, "sha512-BEab+HiUgCdl6GXAT7EI2yaRtDPiRJlB94XLvRvXi1ZcmQqsrq6awGo6apctFo4WUL29V7c09LxmN4HQ3X2Tvg=="], + "@cloudflare/workerd-windows-64": ["@cloudflare/workerd-windows-64@1.20241218.0", "", { "os": "win32", "cpu": "x64" }, "sha512-tO1VjlvK3F6Yb2d1jgEy/QBYl//9Pyv3K0j+lq8Eu7qdfm0IgKwSRgDWLept84/qmNsQfausZ4JdNGxTf9xsxQ=="], - "@cloudflare/workers-types": ["@cloudflare/workers-types@4.20241216.0", "", {}, "sha512-PGIINXS+aE9vD2GYyWXfRG+VyxxceRkGDCoPxqwUweh1Bfv75HVotyL/adJ7mRVwh3XZDifGBdTaLReTT+Fcog=="], + "@cloudflare/workers-types": ["@cloudflare/workers-types@4.20241230.0", "", {}, "sha512-dtLD4jY35Lb750cCVyO1i/eIfdZJg2Z0i+B1RYX6BVeRPlgaHx/H18ImKAkYmy0g09Ow8R2jZy3hIxMgXun0WQ=="], "@cspotcode/source-map-support": ["@cspotcode/source-map-support@0.8.1", "", { "dependencies": { "@jridgewell/trace-mapping": "0.3.9" } }, "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw=="], @@ -199,8 +199,6 @@ "cjs-module-lexer": ["cjs-module-lexer@1.4.1", "", {}, "sha512-cuSVIHi9/9E/+821Qjdvngor+xpnlwnuwIyZOaLmHBVdXL+gP+I6QQB9VkO7RI77YIcTV+S1W9AreJ5eN63JBA=="], - "confbox": ["confbox@0.1.8", "", {}, "sha512-RMtmw0iFkeR4YV+fUOSucriAQNb9g8zFR52MWCtl+cCZOFRNL6zeB395vPzFhEjjn4fMxXudmELnl/KF/WrK6w=="], - "cookie": ["cookie@0.7.2", "", {}, "sha512-yki5XnKuf750l50uGTllt6kKILY4nQ1eNIQatoXEByZ5dWgnKqbnqmTrBE5B4N7lrMJKQ2ytWMiTO2o0v6Ew/w=="], "data-uri-to-buffer": ["data-uri-to-buffer@2.0.2", "", {}, "sha512-ND9qDTLc6diwj+Xe5cdAgVTbLVdXbtxTJRXRhli8Mowuaan+0EJOtdqJ0QCHNSSPyoXGx9HX2/VMnKeC34AChA=="], @@ -245,7 +243,7 @@ "hasown": ["hasown@2.0.2", "", { "dependencies": { "function-bind": "^1.1.2" } }, "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ=="], - "hono": ["hono@4.6.14", "", {}, "sha512-j4VkyUp2xazGJ8eCCLN1Vm/bxdvm/j5ZuU9AIjLu9vapn2M44p9L3Ktr9Vnb2RN2QtcR/wVjZVMlT5k7GJQgPw=="], + "hono": ["hono@4.6.15", "", {}, "sha512-OiQwvAOAaI2JrABBH69z5rsctHDzFzIKJge0nYXgtzGJ0KftwLWcBXm1upJC23/omNRtnqM0gjRMbtXshPdqhQ=="], "is-core-module": ["is-core-module@2.16.0", "", { "dependencies": { "hasown": "^2.0.2" } }, "sha512-urTSINYfAYgcbLb0yDQ6egFm6h3Mo1DcF9EkyXSRjjzdHbsulg01qhwWuXdOoUBuTkbQ80KDboXa0vFJ+BDH+g=="], @@ -257,9 +255,7 @@ "mime": ["mime@3.0.0", "", { "bin": { "mime": "cli.js" } }, "sha512-jSCU7/VB1loIWBZe14aEYHU/+1UMEHoaO7qxCOVJOw9GgH72VAWppxNcjU+x9a2k3GSIBXNKxXQFqRvvZ7vr3A=="], - "miniflare": ["miniflare@3.20241205.0", "", { "dependencies": { "@cspotcode/source-map-support": "0.8.1", "acorn": "^8.8.0", "acorn-walk": "^8.2.0", "capnp-ts": "^0.7.0", "exit-hook": "^2.2.1", "glob-to-regexp": "^0.4.1", "stoppable": "^1.1.0", "undici": "^5.28.4", "workerd": "1.20241205.0", "ws": "^8.18.0", "youch": "^3.2.2", "zod": "^3.22.3" }, "bin": { "miniflare": "bootstrap.js" } }, "sha512-Z0cTtIf6ZrcAJ3SrOI9EUM3s4dkGhNeU6Ubl8sroYhsPVD+rtz3m5+p6McHFWCkcMff1o60X5XEKVTmkz0gbpA=="], - - "mlly": ["mlly@1.7.3", "", { "dependencies": { "acorn": "^8.14.0", "pathe": "^1.1.2", "pkg-types": "^1.2.1", "ufo": "^1.5.4" } }, "sha512-xUsx5n/mN0uQf4V548PKQ+YShA4/IW0KI1dZhrNrPCLG+xizETbHTkOa1f8/xut9JRPp8kQuMnz0oqwkTiLo/A=="], + "miniflare": ["miniflare@3.20241218.0", "", { "dependencies": { "@cspotcode/source-map-support": "0.8.1", "acorn": "^8.8.0", "acorn-walk": "^8.2.0", "capnp-ts": "^0.7.0", "exit-hook": "^2.2.1", "glob-to-regexp": "^0.4.1", "stoppable": "^1.1.0", "undici": "^5.28.4", "workerd": "1.20241218.0", "ws": "^8.18.0", "youch": "^3.2.2", "zod": "^3.22.3" }, "bin": { "miniflare": "bootstrap.js" } }, "sha512-spYFDArH0wd+wJSTrzBrWrXJrbyJhRMJa35mat947y1jYhVV8I5V8vnD3LwjfpLr0SaEilojz1OIW7ekmnRe+w=="], "mrmime": ["mrmime@2.0.0", "", {}, "sha512-eu38+hdgojoyq63s+yTpN4XMBdt5l8HhMhc4VKLO9KM5caLIBvUm4thi7fFaxyTmCKeNnXZ5pAlBwCUnhA09uw=="], @@ -285,8 +281,6 @@ "picomatch": ["picomatch@4.0.2", "", {}, "sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg=="], - "pkg-types": ["pkg-types@1.2.1", "", { "dependencies": { "confbox": "^0.1.8", "mlly": "^1.7.2", "pathe": "^1.1.2" } }, "sha512-sQoqa8alT3nHjGuTjuKgOnvjo4cljkufdtLMnO2LBP/wRwuDlo1tkaEdMxCRhyGRPacv/ztlZgDPm2b7FAmEvw=="], - "postcss": ["postcss@8.4.49", "", { "dependencies": { "nanoid": "^3.3.7", "picocolors": "^1.1.1", "source-map-js": "^1.2.1" } }, "sha512-OCVPnIObs4N29kxTjzLfUryOkvZEq+pf8jTF0lg8E7uETuWHA+v7j3c/xJmiqpX450191LlmZfUKkXxkTry7nA=="], "printable-characters": ["printable-characters@1.0.42", "", {}, "sha512-dKp+C4iXWK4vVYZmYSd0KBH5F/h1HoZRsbJ82AVKRO3PEo8L4lBS/vLwhVtpwwuYcoIsVY+1JYKR268yn480uQ=="], @@ -351,7 +345,7 @@ "undici-types": ["undici-types@5.26.5", "", {}, "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA=="], - "unenv": ["unenv-nightly@2.0.0-20241212-153011-af71c96", "", { "dependencies": { "defu": "^6.1.4", "mlly": "^1.7.3", "ohash": "^1.1.4", "pathe": "^1.1.2", "ufo": "^1.5.4" } }, "sha512-Yugb9yPs/EZsPOY+IHloqVVEcZeJ0uwwViTedsZjOtVeYO8I29B1rzU/p84FMT0R1Ht3bHsKkNV/rzrjSd07QA=="], + "unenv": ["unenv-nightly@2.0.0-20241204-140205-a5d5190", "", { "dependencies": { "defu": "^6.1.4", "ohash": "^1.1.4", "pathe": "^1.1.2", "ufo": "^1.5.4" } }, "sha512-jpmAytLeiiW01pl5bhVn9wYJ4vtiLdhGe10oXlJBuQEX8mxjxO8BlEXGHU4vr4yEikjFP1wsomTHt/CLU8kUwg=="], "vite": ["vite@5.4.11", "", { "dependencies": { "esbuild": "^0.21.3", "postcss": "^8.4.43", "rollup": "^4.20.0" }, "optionalDependencies": { "fsevents": "~2.3.3" }, "peerDependencies": { "@types/node": "^18.0.0 || >=20.0.0", "less": "*", "lightningcss": "^1.21.0", "sass": "*", "sass-embedded": "*", "stylus": "*", "sugarss": "*", "terser": "^5.4.0" }, "optionalPeers": ["@types/node", "less", "lightningcss", "sass", "sass-embedded", "stylus", "sugarss", "terser"], "bin": { "vite": "bin/vite.js" } }, "sha512-c7jFQRklXua0mTzneGW9QVyxFjUgwcihC4bXEtujIo2ouWCe1Ajt/amn2PCxYnhYfd5k09JX3SB7OYWFKYqj8Q=="], @@ -361,9 +355,9 @@ "why-is-node-running": ["why-is-node-running@2.3.0", "", { "dependencies": { "siginfo": "^2.0.0", "stackback": "0.0.2" }, "bin": { "why-is-node-running": "cli.js" } }, "sha512-hUrmaWBdVDcxvYqnyh09zunKzROWjbZTiNy8dBEjkS7ehEDQibXJ7XvlmtbwuTclUiIyN+CyXQD4Vmko8fNm8w=="], - "workerd": ["workerd@1.20241205.0", "", { "optionalDependencies": { "@cloudflare/workerd-darwin-64": "1.20241205.0", "@cloudflare/workerd-darwin-arm64": "1.20241205.0", "@cloudflare/workerd-linux-64": "1.20241205.0", "@cloudflare/workerd-linux-arm64": "1.20241205.0", "@cloudflare/workerd-windows-64": "1.20241205.0" }, "bin": { "workerd": "bin/workerd" } }, "sha512-vso/2n0c5SdBDWiD+Sx5gM7unA6SiZXRVUHDqH1euoP/9mFVHZF8icoYsNLB87b/TX8zNgpae+I5N/xFpd9v0g=="], + "workerd": ["workerd@1.20241218.0", "", { "optionalDependencies": { "@cloudflare/workerd-darwin-64": "1.20241218.0", "@cloudflare/workerd-darwin-arm64": "1.20241218.0", "@cloudflare/workerd-linux-64": "1.20241218.0", "@cloudflare/workerd-linux-arm64": "1.20241218.0", "@cloudflare/workerd-windows-64": "1.20241218.0" }, "bin": { "workerd": "bin/workerd" } }, "sha512-7Z3D4vOVChMz9mWDffE299oQxUWm/pbkeAWx1btVamPcAK/2IuoNBhwflWo3jyuKuxvYuFAdIucgYxc8ICqXiA=="], - "wrangler": ["wrangler@3.97.0", "", { "dependencies": { "@cloudflare/kv-asset-handler": "0.3.4", "@esbuild-plugins/node-globals-polyfill": "^0.2.3", "@esbuild-plugins/node-modules-polyfill": "^0.2.2", "blake3-wasm": "^2.1.5", "chokidar": "^4.0.1", "date-fns": "^4.1.0", "esbuild": "0.17.19", "itty-time": "^1.0.6", "miniflare": "3.20241205.0", "nanoid": "^3.3.3", "path-to-regexp": "^6.3.0", "resolve": "^1.22.8", "selfsigned": "^2.0.1", "source-map": "^0.6.1", "unenv": "npm:unenv-nightly@2.0.0-20241212-153011-af71c96", "workerd": "1.20241205.0", "xxhash-wasm": "^1.0.1" }, "optionalDependencies": { "fsevents": "~2.3.2" }, "peerDependencies": { "@cloudflare/workers-types": "^4.20241205.0" }, "optionalPeers": ["@cloudflare/workers-types"], "bin": { "wrangler": "bin/wrangler.js", "wrangler2": "bin/wrangler.js" } }, "sha512-NkFAigqZWe4NOK0gYROcpvdugaYJE/JRFrIZ+c5Q5/uie+25WH8OVbRvvmiXhWVhso56cZs2W2TPmAxT/sgHkw=="], + "wrangler": ["wrangler@3.99.0", "", { "dependencies": { "@cloudflare/kv-asset-handler": "0.3.4", "@esbuild-plugins/node-globals-polyfill": "^0.2.3", "@esbuild-plugins/node-modules-polyfill": "^0.2.2", "blake3-wasm": "^2.1.5", "chokidar": "^4.0.1", "date-fns": "^4.1.0", "esbuild": "0.17.19", "itty-time": "^1.0.6", "miniflare": "3.20241218.0", "nanoid": "^3.3.3", "path-to-regexp": "^6.3.0", "resolve": "^1.22.8", "selfsigned": "^2.0.1", "source-map": "^0.6.1", "unenv": "npm:unenv-nightly@2.0.0-20241204-140205-a5d5190", "workerd": "1.20241218.0", "xxhash-wasm": "^1.0.1" }, "optionalDependencies": { "fsevents": "~2.3.2" }, "peerDependencies": { "@cloudflare/workers-types": "^4.20241218.0" }, "optionalPeers": ["@cloudflare/workers-types"], "bin": { "wrangler": "bin/wrangler.js", "wrangler2": "bin/wrangler.js" } }, "sha512-k0x4rT3G/QCbxcoZY7CHRVlAIS8WMmKdga6lf4d2c3gXFqssh44vwlTDuARA9QANBxKJTcA7JPTJRfUDhd9QBA=="], "ws": ["ws@8.18.0", "", { "peerDependencies": { "bufferutil": "^4.0.1", "utf-8-validate": ">=5.0.2" }, "optionalPeers": ["bufferutil", "utf-8-validate"] }, "sha512-8VbfWfHLbbwu3+N6OKsOMpBdT4kXPDDB9cJk2bJ6mh9ucxdlnNvH1e+roYkKmN9Nxw2yjz7VzeO9oOz2zJ04Pw=="], diff --git a/worker/package.json b/worker/package.json index f3eaa082..89109596 100644 --- a/worker/package.json +++ b/worker/package.json @@ -3,15 +3,15 @@ "name": "@risu729/dotfiles-worker", "type": "module", "dependencies": { - "hono": "4.6.14", + "hono": "4.6.15", "zod": "3.24.1" }, "scripts": { - "deploy": "wrangler deploy $(../mise-tasks/worker/wrangler-args)" + "deploy": "wrangler deploy $(../tasks/worker/wrangler-args)" }, "devDependencies": { - "@cloudflare/vitest-pool-workers": "0.5.38", - "@cloudflare/workers-types": "4.20241216.0", + "@cloudflare/vitest-pool-workers": "0.5.40", + "@cloudflare/workers-types": "4.20241230.0", "@total-typescript/tsconfig": "1.0.4", "@tsconfig/bun": "1.0.7", "@tsconfig/strictest": "2.0.5", @@ -21,6 +21,6 @@ "diff": "7.0.0", "typescript": "5.7.2", "vitest": "2.1.8", - "wrangler": "3.97.0" + "wrangler": "3.99.0" } } diff --git a/wsl/home/.bashrc b/wsl/home/.bashrc index acc6e35f..30ffdd81 100644 --- a/wsl/home/.bashrc +++ b/wsl/home/.bashrc @@ -110,14 +110,6 @@ eval "${gh_completion}" fzf_integration="$(fzf --bash)" eval "${fzf_integration}" -# gpg -GPG_TTY=$(tty) -export GPG_TTY - -# set GITHUB_TOKEN to avoid rate limit while using mise -GITHUB_TOKEN=$(gh auth token) -export GITHUB_TOKEN - # aliases alias beep="printf '\a'" alias l="eza --all --long --git" @@ -127,7 +119,7 @@ alias code="code-insiders" gcd() { local ghq_dir dir root ghq_dir=$(ghq list) - dir=$(echo -n "${ghq_dir}" | fzf --exit-0 --query="$*" --no-sort --exact) + dir=$(echo -n "${ghq_dir}" | fzf --exit-0 --select-1 --query="$*" --no-sort --exact) root=$(ghq root) [[ -n ${dir} ]] && cd "${root}/${dir}" || return 1 } diff --git a/wsl/home/.config/mise/config.toml b/wsl/home/.config/mise/config.toml index 28302dfd..1fa00684 100644 --- a/wsl/home/.config/mise/config.toml +++ b/wsl/home/.config/mise/config.toml @@ -1,11 +1,27 @@ # ref: https://mise.jdx.dev/configuration.html#global-config-config-mise-config-toml #:schema https://mise.jdx.dev/schema/mise.json -min_version = "2024.12.14" +min_version = "2024.12.24" [env] # disable bat paging BAT_PAGING = "never" +# gpg requires tty +# GitHub Actions doesn't have tty +# ref: https://github.com/actions/runner/issues/241 +# don't cache tty because it depends on shell session +GPG_TTY = "{% if env.CI is undefined %}{{ exec(command='tty') }}{% endif %}" + +# set GITHUB_TOKEN to avoid rate limit while using mise +[env.GITHUB_TOKEN] +value = """ +{% if env.CI is undefined %}\ + {{ exec(command='gh auth token', cache_key='github_token', cache_duration='1 day') }}\ +{% else %}\ + {{ env.GITHUB_TOKEN }}\ +{% endif %}\ +""" +tools = true [tools] # language tools diff --git a/wsl/home/.gitconfig b/wsl/home/.gitconfig index 9ab8cfda..afa3467c 100644 --- a/wsl/home/.gitconfig +++ b/wsl/home/.gitconfig @@ -9,6 +9,9 @@ [tag] gpgSign = true +[submodule] + recurse = true + [credential "https://github.com"] # set helper to empty to avoid using the default helper # ref: https://github.com/cli/cli/issues/3796#issuecomment-1065150465