From 992f27acfad150280cede005101d601b2749f264 Mon Sep 17 00:00:00 2001 From: Gabriel Massadas <5445926+G4brym@users.noreply.github.com> Date: Sun, 15 Dec 2024 19:24:51 +0000 Subject: [PATCH] Prepare changes for next release :D (#74) --- packages/github-action/package.json | 2 +- packages/github-action/prepareDeploy.js | 5 +- pnpm-lock.yaml | 142 +++++++++++++++++++++++- template/package.json | 4 +- template/wrangler.toml | 3 +- 5 files changed, 148 insertions(+), 8 deletions(-) diff --git a/packages/github-action/package.json b/packages/github-action/package.json index 7eb64e8..97da01b 100644 --- a/packages/github-action/package.json +++ b/packages/github-action/package.json @@ -3,7 +3,7 @@ "version": "0.0.1", "private": true, "devDependencies": { - "wrangler": "^3.6.0" + "wrangler": "^3.95.0" }, "scripts": { "publish": "wrangler publish" diff --git a/packages/github-action/prepareDeploy.js b/packages/github-action/prepareDeploy.js index ca7c663..cfbaf0f 100644 --- a/packages/github-action/prepareDeploy.js +++ b/packages/github-action/prepareDeploy.js @@ -36,8 +36,9 @@ if (!R2EXPLORER_CONFIG) { let wranglerConfig = ` name = "${R2EXPLORER_WORKER_NAME}" -compatibility_date = "2023-05-12" +compatibility_date = "2024-11-06" main = "src/index.ts" +assets = { directory = "node_modules/r2-explorer/dashboard", binding = "ASSETS", html_handling = "auto-trailing-slash", not_found_handling = "single-page-application" } `; if (R2EXPLORER_DOMAIN) { @@ -57,7 +58,7 @@ for (const bucket of R2EXPLORER_BUCKETS.split("\n")) { const split = bucket.trim().split(":"); if (split.length !== 2) { console.error("R2EXPLORER_BUCKETS is not set correctly!"); - console.error(`"${split}" is not in the correct format`); + console.error(`"${split}" is not in the correct format => ALIAS:BUCKET_NAME`); process.exit(1); } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 3b8a018..b2e2e74 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -67,8 +67,8 @@ importers: packages/github-action: devDependencies: wrangler: - specifier: ^3.6.0 - version: 3.91.0(@cloudflare/workers-types@4.20241202.0) + specifier: ^3.95.0 + version: 3.95.0 packages/worker: dependencies: @@ -197,30 +197,64 @@ packages: cpu: [x64] os: [darwin] + '@cloudflare/workerd-darwin-64@1.20241205.0': + resolution: {integrity: sha512-TArEZkSZkHJyEwnlWWkSpCI99cF6lJ14OVeEoI9Um/+cD9CKZLM9vCmsLeKglKheJ0KcdCnkA+DbeD15t3VaWg==} + engines: {node: '>=16'} + cpu: [x64] + os: [darwin] + '@cloudflare/workerd-darwin-arm64@1.20241106.1': resolution: {integrity: sha512-j3dg/42D/bPgfNP3cRUBxF+4waCKO/5YKwXNj+lnVOwHxDu+ne5pFw9TIkKYcWTcwn0ZUkbNZNM5rhJqRn4xbg==} engines: {node: '>=16'} cpu: [arm64] os: [darwin] + '@cloudflare/workerd-darwin-arm64@1.20241205.0': + resolution: {integrity: sha512-u5eqKa9QRdA8MugfgCoD+ADDjY6EpKbv3hSYJETmmUh17l7WXjWBzv4pUvOKIX67C0UzMUy4jZYwC53MymhX3w==} + engines: {node: '>=16'} + cpu: [arm64] + os: [darwin] + '@cloudflare/workerd-linux-64@1.20241106.1': resolution: {integrity: sha512-Ih+Ye8E1DMBXcKrJktGfGztFqHKaX1CeByqshmTbODnWKHt6O65ax3oTecUwyC0+abuyraOpAtdhHNpFMhUkmw==} engines: {node: '>=16'} cpu: [x64] os: [linux] + '@cloudflare/workerd-linux-64@1.20241205.0': + resolution: {integrity: sha512-OYA7S5zpumMamWEW+IhhBU6YojIEocyE5X/YFPiTOCrDE3dsfr9t6oqNE7hxGm1VAAu+Irtl+a/5LwmBOU681w==} + engines: {node: '>=16'} + cpu: [x64] + os: [linux] + '@cloudflare/workerd-linux-arm64@1.20241106.1': resolution: {integrity: sha512-mdQFPk4+14Yywn7n1xIzI+6olWM8Ybz10R7H3h+rk0XulMumCWUCy1CzIDauOx6GyIcSgKIibYMssVHZR30ObA==} engines: {node: '>=16'} cpu: [arm64] os: [linux] + '@cloudflare/workerd-linux-arm64@1.20241205.0': + resolution: {integrity: sha512-qAzecONjFJGIAVJZKExQ5dlbic0f3d4A+GdKa+H6SoUJtPaWiE3K6WuePo4JOT7W3/Zfh25McmX+MmpMUUcM5Q==} + engines: {node: '>=16'} + cpu: [arm64] + os: [linux] + '@cloudflare/workerd-windows-64@1.20241106.1': resolution: {integrity: sha512-4rtcss31E/Rb/PeFocZfr+B9i1MdrkhsTBWizh8siNR4KMmkslU2xs2wPaH1z8+ErxkOsHrKRa5EPLh5rIiFeg==} engines: {node: '>=16'} cpu: [x64] os: [win32] + '@cloudflare/workerd-windows-64@1.20241205.0': + resolution: {integrity: sha512-BEab+HiUgCdl6GXAT7EI2yaRtDPiRJlB94XLvRvXi1ZcmQqsrq6awGo6apctFo4WUL29V7c09LxmN4HQ3X2Tvg==} + engines: {node: '>=16'} + cpu: [x64] + os: [win32] + + '@cloudflare/workers-shared@0.11.0': + resolution: {integrity: sha512-A+lQ8xp7992qSeMmuQ0ssL6CPmm+ZmAv6Ddikan0n1jjpMAic+97l7xtVIsswSn9iLMFPYQ9uNN/8Fl0AgARIQ==} + engines: {node: '>=16.7.0'} + '@cloudflare/workers-shared@0.9.0': resolution: {integrity: sha512-eP6Ir45uPbKnpADVzUCtkRUYxYxjB1Ew6n/whTJvHu8H4m93USHAceCMm736VBZdlxuhXXUjEP3fCUxKPn+cfw==} engines: {node: '>=16.7.0'} @@ -1859,6 +1893,11 @@ packages: engines: {node: '>=16.13'} hasBin: true + miniflare@3.20241205.0: + resolution: {integrity: sha512-Z0cTtIf6ZrcAJ3SrOI9EUM3s4dkGhNeU6Ubl8sroYhsPVD+rtz3m5+p6McHFWCkcMff1o60X5XEKVTmkz0gbpA==} + engines: {node: '>=16.13'} + hasBin: true + minimatch@3.1.2: resolution: {integrity: sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==} @@ -2458,6 +2497,9 @@ packages: unenv-nightly@2.0.0-20241121-161142-806b5c0: resolution: {integrity: sha512-RnFOasE/O0Q55gBkNB1b84OgKttgLEijGO0JCWpbn+O4XxpyCQg89NmcqQ5RGUiy4y+rMIrKzePTquQcLQF5pQ==} + unenv-nightly@2.0.0-20241204-140205-a5d5190: + resolution: {integrity: sha512-jpmAytLeiiW01pl5bhVn9wYJ4vtiLdhGe10oXlJBuQEX8mxjxO8BlEXGHU4vr4yEikjFP1wsomTHt/CLU8kUwg==} + universalify@2.0.1: resolution: {integrity: sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==} engines: {node: '>= 10.0.0'} @@ -2552,6 +2594,11 @@ packages: engines: {node: '>=16'} hasBin: true + workerd@1.20241205.0: + resolution: {integrity: sha512-vso/2n0c5SdBDWiD+Sx5gM7unA6SiZXRVUHDqH1euoP/9mFVHZF8icoYsNLB87b/TX8zNgpae+I5N/xFpd9v0g==} + engines: {node: '>=16'} + hasBin: true + wrangler@3.91.0: resolution: {integrity: sha512-Hdzn6wbY9cz5kL85ZUvWLwLIH7nPaEVRblfms40jhRf4qQO/Zf74aFlku8rQFbe8/2aVZFaxJVfBd6JQMeMSBQ==} engines: {node: '>=16.17.0'} @@ -2562,6 +2609,16 @@ packages: '@cloudflare/workers-types': optional: true + wrangler@3.95.0: + resolution: {integrity: sha512-3w5852i3FNyDz421K2Qk4v5L8jjwegO5O8E1+VAQmjnm82HFNxpIRUBq0bmM7CTLvOPI/Jjcmj/eAWjQBL7QYg==} + engines: {node: '>=16.17.0'} + hasBin: true + peerDependencies: + '@cloudflare/workers-types': ^4.20241205.0 + peerDependenciesMeta: + '@cloudflare/workers-types': + optional: true + wrap-ansi@6.2.0: resolution: {integrity: sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==} engines: {node: '>=8'} @@ -2681,18 +2738,38 @@ snapshots: '@cloudflare/workerd-darwin-64@1.20241106.1': optional: true + '@cloudflare/workerd-darwin-64@1.20241205.0': + optional: true + '@cloudflare/workerd-darwin-arm64@1.20241106.1': optional: true + '@cloudflare/workerd-darwin-arm64@1.20241205.0': + optional: true + '@cloudflare/workerd-linux-64@1.20241106.1': optional: true + '@cloudflare/workerd-linux-64@1.20241205.0': + optional: true + '@cloudflare/workerd-linux-arm64@1.20241106.1': optional: true + '@cloudflare/workerd-linux-arm64@1.20241205.0': + optional: true + '@cloudflare/workerd-windows-64@1.20241106.1': optional: true + '@cloudflare/workerd-windows-64@1.20241205.0': + optional: true + + '@cloudflare/workers-shared@0.11.0': + dependencies: + mime: 3.0.0 + zod: 3.24.1 + '@cloudflare/workers-shared@0.9.0': dependencies: mime: 3.0.0 @@ -4215,6 +4292,25 @@ snapshots: - supports-color - utf-8-validate + miniflare@3.20241205.0: + dependencies: + '@cspotcode/source-map-support': 0.8.1 + acorn: 8.14.0 + acorn-walk: 8.3.4 + 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.3.4 + zod: 3.24.1 + transitivePeerDependencies: + - bufferutil + - supports-color + - utf-8-validate + minimatch@3.1.2: dependencies: brace-expansion: 1.1.11 @@ -4818,6 +4914,13 @@ snapshots: pathe: 1.1.2 ufo: 1.5.4 + 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 + universalify@2.0.1: {} unpipe@1.0.0: {} @@ -4897,6 +5000,14 @@ snapshots: '@cloudflare/workerd-linux-arm64': 1.20241106.1 '@cloudflare/workerd-windows-64': 1.20241106.1 + 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 + wrangler@3.91.0(@cloudflare/workers-types@4.20241202.0): dependencies: '@cloudflare/kv-asset-handler': 0.3.4 @@ -4926,6 +5037,33 @@ snapshots: - supports-color - utf-8-validate + wrangler@3.95.0: + dependencies: + '@cloudflare/kv-asset-handler': 0.3.4 + '@cloudflare/workers-shared': 0.11.0 + '@esbuild-plugins/node-globals-polyfill': 0.2.3(esbuild@0.17.19) + '@esbuild-plugins/node-modules-polyfill': 0.2.2(esbuild@0.17.19) + 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.8 + path-to-regexp: 6.3.0 + resolve: 1.22.8 + selfsigned: 2.4.1 + source-map: 0.6.1 + unenv: unenv-nightly@2.0.0-20241204-140205-a5d5190 + workerd: 1.20241205.0 + xxhash-wasm: 1.1.0 + optionalDependencies: + fsevents: 2.3.3 + transitivePeerDependencies: + - bufferutil + - supports-color + - utf-8-validate + wrap-ansi@6.2.0: dependencies: ansi-styles: 4.3.0 diff --git a/template/package.json b/template/package.json index ec1fdfe..cc01849 100644 --- a/template/package.json +++ b/template/package.json @@ -8,9 +8,9 @@ "start": "wrangler dev" }, "dependencies": { - "r2-explorer": "^1.0.7" + "r2-explorer": "^1.1.0" }, "devDependencies": { - "wrangler": "^3.91.0" + "wrangler": "^3.95.0" } } diff --git a/template/wrangler.toml b/template/wrangler.toml index cefa3ca..e4aa077 100644 --- a/template/wrangler.toml +++ b/template/wrangler.toml @@ -1,6 +1,7 @@ name = "r2-explorer" +compatibility_date = "2024-11-06" main = "src/index.ts" -compatibility_date = "2024-12-01" +assets = { directory = "node_modules/r2-explorer/dashboard", binding = "ASSETS", html_handling = "auto-trailing-slash", not_found_handling = "single-page-application" } # Bind R2 Buckets to your application. # Docs: https://r2explorer.dev/getting-started/add-r2-buckets/