From 0a9349efefa0dc924c2468690a2a958126e5f31f Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 19 Jan 2026 09:53:50 +0100 Subject: [PATCH 01/15] Update jdx/mise-action action to v3.6.0 (#270) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/cd.yml | 2 +- .github/workflows/ci.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index 47e5babc..15d48938 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -46,7 +46,7 @@ jobs: egress-policy: "audit" - name: Setup mise-en-place - uses: jdx/mise-action@146a28175021df8ca24f8ee1828cc2a60f980bd5 # v3.5.1 + uses: jdx/mise-action@c53b9236f0b3370f31520f8b142f141256d839c6 # v3.6.0 - name: Save context id: ctx diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7b91f662..a5355537 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -46,7 +46,7 @@ jobs: persist-credentials: "false" - name: Setup mise-en-place - uses: jdx/mise-action@146a28175021df8ca24f8ee1828cc2a60f980bd5 # v3.5.1 + uses: jdx/mise-action@c53b9236f0b3370f31520f8b142f141256d839c6 # v3.6.0 - name: Run lint run: mise run lint From c42e6598123f690f9aa8f68bb66b10cd12223402 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 20 Jan 2026 18:34:06 +0000 Subject: [PATCH 02/15] Update jdx/mise-action action to v3.6.1 (#271) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/cd.yml | 2 +- .github/workflows/ci.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index 15d48938..6c9f4286 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -46,7 +46,7 @@ jobs: egress-policy: "audit" - name: Setup mise-en-place - uses: jdx/mise-action@c53b9236f0b3370f31520f8b142f141256d839c6 # v3.6.0 + uses: jdx/mise-action@6d1e696aa24c1aa1bcc1adea0212707c71ab78a8 # v3.6.1 - name: Save context id: ctx diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a5355537..df622e0c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -46,7 +46,7 @@ jobs: persist-credentials: "false" - name: Setup mise-en-place - uses: jdx/mise-action@c53b9236f0b3370f31520f8b142f141256d839c6 # v3.6.0 + uses: jdx/mise-action@6d1e696aa24c1aa1bcc1adea0212707c71ab78a8 # v3.6.1 - name: Run lint run: mise run lint From 6860a1bcd41d125efbd35ff8c543c992ed083ab6 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 22 Jan 2026 17:08:58 +0000 Subject: [PATCH 03/15] Update actions/checkout action to v6.0.2 (#272) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/cd.yml | 4 ++-- .github/workflows/ci.yml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index 6c9f4286..778f49dc 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -76,7 +76,7 @@ jobs: echo "extended=${TIMESTAMP}-${SHA_SHORT}" >>"$GITHUB_OUTPUT" - name: Checkout - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 with: persist-credentials: "false" @@ -174,7 +174,7 @@ jobs: echo "list=${TAGS[*]}" >>"$GITHUB_OUTPUT" - name: Checkout - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 with: persist-credentials: "false" diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index df622e0c..af1b0660 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -41,7 +41,7 @@ jobs: echo "sha_short=${CTX_SHA::7}" >>"$GITHUB_OUTPUT" - name: Checkout - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 with: persist-credentials: "false" From b7c77096d71a0fa97a9c88088dc1ce9951f4921b Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 23 Jan 2026 18:56:05 +0000 Subject: [PATCH 04/15] Update dependency @biomejs/biome to v2.3.12 (#273) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- biome.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/biome.json b/biome.json index f7f2d7ff..5a8b6cb2 100644 --- a/biome.json +++ b/biome.json @@ -1,5 +1,5 @@ { - "$schema": "https://biomejs.dev/schemas/2.3.11/schema.json", + "$schema": "https://biomejs.dev/schemas/2.3.12/schema.json", "files": { "ignoreUnknown": true, "includes": ["**", "!!dist/*", "!node_modules/*", "!!storage/*"] From 3f4cf7a7a1237bdcb51140611c50e24aeca6ce2d Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 26 Jan 2026 09:38:47 +0000 Subject: [PATCH 05/15] Update step-security/harden-runner action to v2.14.1 (#274) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/cd.yml | 4 ++-- .github/workflows/ci.yml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index 778f49dc..8946a1b8 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -41,7 +41,7 @@ jobs: steps: - name: Harden Runner - uses: step-security/harden-runner@20cf305ff2072d973412fa9b1e3a4f227bda3c76 # v2.14.0 + uses: step-security/harden-runner@e3f713f2d8f53843e71c69a996d56f51aa9adfb9 # v2.14.1 with: egress-policy: "audit" @@ -135,7 +135,7 @@ jobs: steps: - name: Harden Runner - uses: step-security/harden-runner@20cf305ff2072d973412fa9b1e3a4f227bda3c76 # v2.14.0 + uses: step-security/harden-runner@e3f713f2d8f53843e71c69a996d56f51aa9adfb9 # v2.14.1 with: egress-policy: "audit" diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index af1b0660..0272d5f3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -26,7 +26,7 @@ jobs: steps: - name: Harden Runner - uses: step-security/harden-runner@20cf305ff2072d973412fa9b1e3a4f227bda3c76 # v2.14.0 + uses: step-security/harden-runner@e3f713f2d8f53843e71c69a996d56f51aa9adfb9 # v2.14.1 with: egress-policy: "audit" From 02b16eeb686813372cb60c149c92441858b8d21b Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 26 Jan 2026 15:07:37 +0000 Subject: [PATCH 06/15] Update dependency @biomejs/biome to v2.3.13 (#275) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- biome.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/biome.json b/biome.json index 5a8b6cb2..960c6b20 100644 --- a/biome.json +++ b/biome.json @@ -1,5 +1,5 @@ { - "$schema": "https://biomejs.dev/schemas/2.3.12/schema.json", + "$schema": "https://biomejs.dev/schemas/2.3.13/schema.json", "files": { "ignoreUnknown": true, "includes": ["**", "!!dist/*", "!node_modules/*", "!!storage/*"] From 22202f9fbdfa0e142a994fd99b1ac362c03cc3b5 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 27 Jan 2026 09:45:51 +0100 Subject: [PATCH 07/15] Update actions/attest-build-provenance action to v3.2.0 (#276) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/cd.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index 8946a1b8..d2887830 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -115,7 +115,7 @@ jobs: - if: inputs.artifact-action == 'build-release' name: Attest artifact - uses: actions/attest-build-provenance@00014ed6ed5efc5b1ab7f7f34a39eb55d41aa4f8 # v3.1.0 + uses: actions/attest-build-provenance@96278af6caaf10aea03fd8d33a09a777ca52d62f # v3.2.0 with: subject-path: | dist/*.tar.xz @@ -214,7 +214,7 @@ jobs: - if: inputs.image-action == 'build-release' name: Attest image - uses: actions/attest-build-provenance@00014ed6ed5efc5b1ab7f7f34a39eb55d41aa4f8 # v3.1.0 + uses: actions/attest-build-provenance@96278af6caaf10aea03fd8d33a09a777ca52d62f # v3.2.0 with: subject-name: "${{ env.REGISTRY }}/${{ steps.build-image.outputs.image }}" subject-digest: "${{ steps.push-image.outputs.digest }}" From fc372a55d054e29529a09cb11e19e1c5b5ab0481 Mon Sep 17 00:00:00 2001 From: Ivan Gabaldon Date: Tue, 3 Feb 2026 11:43:09 +0100 Subject: [PATCH 08/15] Binary responses by default (#277) --- biome.json | 1 + deno.json | 2 +- deno.lock | 40 ++++++++++++++++---------------- src/endpoints/document/v1/get.ts | 18 +++++++------- src/utils/validator/document.ts | 6 ++--- 5 files changed, 33 insertions(+), 34 deletions(-) diff --git a/biome.json b/biome.json index 960c6b20..4823930c 100644 --- a/biome.json +++ b/biome.json @@ -55,6 +55,7 @@ "noUselessCatchBinding": "warn", "noUselessUndefined": "warn", "useAwaitThenable": "off", + "useConsistentEnumValueType": "warn", "useDestructuring": "warn", "useExhaustiveSwitchCases": "warn", "useExplicitType": "off", diff --git a/deno.json b/deno.json index 0687cade..dd74a650 100644 --- a/deno.json +++ b/deno.json @@ -31,7 +31,7 @@ "@types/node": "npm:@types/node@^25.0.8", "arkenv": "npm:arkenv@~0.8.3", "arktype": "npm:arktype@^2.1.29", - "biome": "npm:@biomejs/biome@2.3.11", + "biome": "npm:@biomejs/biome@2.3.13", "hash-wasm": "npm:hash-wasm@^4.12.0", "nanoid": "jsr:@sitnik/nanoid@^5.1.5", "rolldown": "npm:rolldown@1.0.0-beta.60", diff --git a/deno.lock b/deno.lock index dc73d2ab..af1425e3 100644 --- a/deno.lock +++ b/deno.lock @@ -20,7 +20,7 @@ "jsr:@std/path@^1.1.4": "1.1.4", "jsr:@std/streams@^1.0.16": "1.0.16", "jsr:@std/ulid@1": "1.0.0", - "npm:@biomejs/biome@2.3.11": "2.3.11", + "npm:@biomejs/biome@2.3.13": "2.3.13", "npm:@types/node@^25.0.8": "25.0.8", "npm:arkenv@~0.8.3": "0.8.3_arktype@2.1.29", "npm:arktype@^2.1.29": "2.1.29", @@ -112,8 +112,8 @@ "@ark/util@0.56.0": { "integrity": "sha512-BghfRC8b9pNs3vBoDJhcta0/c1J1rsoS1+HgVUreMFPdhz/CRAKReAu57YEllNaSy98rWAdY1gE+gFup7OXpgA==" }, - "@biomejs/biome@2.3.11": { - "integrity": "sha512-/zt+6qazBWguPG6+eWmiELqO+9jRsMZ/DBU3lfuU2ngtIQYzymocHhKiZRyrbra4aCOoyTg/BmY+6WH5mv9xmQ==", + "@biomejs/biome@2.3.13": { + "integrity": "sha512-Fw7UsV0UAtWIBIm0M7g5CRerpu1eKyKAXIazzxhbXYUyMkwNrkX/KLkGI7b+uVDQ5cLUMfOC9vR60q9IDYDstA==", "optionalDependencies": [ "@biomejs/cli-darwin-arm64", "@biomejs/cli-darwin-x64", @@ -126,43 +126,43 @@ ], "bin": true }, - "@biomejs/cli-darwin-arm64@2.3.11": { - "integrity": "sha512-/uXXkBcPKVQY7rc9Ys2CrlirBJYbpESEDme7RKiBD6MmqR2w3j0+ZZXRIL2xiaNPsIMMNhP1YnA+jRRxoOAFrA==", + "@biomejs/cli-darwin-arm64@2.3.13": { + "integrity": "sha512-0OCwP0/BoKzyJHnFdaTk/i7hIP9JHH9oJJq6hrSCPmJPo8JWcJhprK4gQlhFzrwdTBAW4Bjt/RmCf3ZZe59gwQ==", "os": ["darwin"], "cpu": ["arm64"] }, - "@biomejs/cli-darwin-x64@2.3.11": { - "integrity": "sha512-fh7nnvbweDPm2xEmFjfmq7zSUiox88plgdHF9OIW4i99WnXrAC3o2P3ag9judoUMv8FCSUnlwJCM1B64nO5Fbg==", + "@biomejs/cli-darwin-x64@2.3.13": { + "integrity": "sha512-AGr8OoemT/ejynbIu56qeil2+F2WLkIjn2d8jGK1JkchxnMUhYOfnqc9sVzcRxpG9Ycvw4weQ5sprRvtb7Yhcw==", "os": ["darwin"], "cpu": ["x64"] }, - "@biomejs/cli-linux-arm64-musl@2.3.11": { - "integrity": "sha512-XPSQ+XIPZMLaZ6zveQdwNjbX+QdROEd1zPgMwD47zvHV+tCGB88VH+aynyGxAHdzL+Tm/+DtKST5SECs4iwCLg==", + "@biomejs/cli-linux-arm64-musl@2.3.13": { + "integrity": "sha512-TUdDCSY+Eo/EHjhJz7P2GnWwfqet+lFxBZzGHldrvULr59AgahamLs/N85SC4+bdF86EhqDuuw9rYLvLFWWlXA==", "os": ["linux"], "cpu": ["arm64"] }, - "@biomejs/cli-linux-arm64@2.3.11": { - "integrity": "sha512-l4xkGa9E7Uc0/05qU2lMYfN1H+fzzkHgaJoy98wO+b/7Gl78srbCRRgwYSW+BTLixTBrM6Ede5NSBwt7rd/i6g==", + "@biomejs/cli-linux-arm64@2.3.13": { + "integrity": "sha512-xvOiFkrDNu607MPMBUQ6huHmBG1PZLOrqhtK6pXJW3GjfVqJg0Z/qpTdhXfcqWdSZHcT+Nct2fOgewZvytESkw==", "os": ["linux"], "cpu": ["arm64"] }, - "@biomejs/cli-linux-x64-musl@2.3.11": { - "integrity": "sha512-vU7a8wLs5C9yJ4CB8a44r12aXYb8yYgBn+WeyzbMjaCMklzCv1oXr8x+VEyWodgJt9bDmhiaW/I0RHbn7rsNmw==", + "@biomejs/cli-linux-x64-musl@2.3.13": { + "integrity": "sha512-0bdwFVSbbM//Sds6OjtnmQGp4eUjOTt6kHvR/1P0ieR9GcTUAlPNvPC3DiavTqq302W34Ae2T6u5VVNGuQtGlQ==", "os": ["linux"], "cpu": ["x64"] }, - "@biomejs/cli-linux-x64@2.3.11": { - "integrity": "sha512-/1s9V/H3cSe0r0Mv/Z8JryF5x9ywRxywomqZVLHAoa/uN0eY7F8gEngWKNS5vbbN/BsfpCG5yeBT5ENh50Frxg==", + "@biomejs/cli-linux-x64@2.3.13": { + "integrity": "sha512-s+YsZlgiXNq8XkgHs6xdvKDFOj/bwTEevqEY6rC2I3cBHbxXYU1LOZstH3Ffw9hE5tE1sqT7U23C00MzkXztMw==", "os": ["linux"], "cpu": ["x64"] }, - "@biomejs/cli-win32-arm64@2.3.11": { - "integrity": "sha512-PZQ6ElCOnkYapSsysiTy0+fYX+agXPlWugh6+eQ6uPKI3vKAqNp6TnMhoM3oY2NltSB89hz59o8xIfOdyhi9Iw==", + "@biomejs/cli-win32-arm64@2.3.13": { + "integrity": "sha512-QweDxY89fq0VvrxME+wS/BXKmqMrOTZlN9SqQ79kQSIc3FrEwvW/PvUegQF6XIVaekncDykB5dzPqjbwSKs9DA==", "os": ["win32"], "cpu": ["arm64"] }, - "@biomejs/cli-win32-x64@2.3.11": { - "integrity": "sha512-43VrG813EW+b5+YbDbz31uUsheX+qFKCpXeY9kfdAx+ww3naKxeVkTD9zLIWxUPfJquANMHrmW3wbe/037G0Qg==", + "@biomejs/cli-win32-x64@2.3.13": { + "integrity": "sha512-trDw2ogdM2lyav9WFQsdsfdVy1dvZALymRpgmWsvSez0BJzBjulhOT/t+wyKeh3pZWvwP3VMs1SoOKwO3wecMQ==", "os": ["win32"], "cpu": ["x64"] }, @@ -397,7 +397,7 @@ "jsr:@std/path@^1.1.4", "jsr:@std/streams@^1.0.16", "jsr:@std/ulid@1", - "npm:@biomejs/biome@2.3.11", + "npm:@biomejs/biome@2.3.13", "npm:@types/node@^25.0.8", "npm:arkenv@~0.8.3", "npm:arktype@^2.1.29", diff --git a/src/endpoints/document/v1/get.ts b/src/endpoints/document/v1/get.ts index 127da649..667dff53 100644 --- a/src/endpoints/document/v1/get.ts +++ b/src/endpoints/document/v1/get.ts @@ -15,9 +15,9 @@ import { } from "#util/error.ts"; import { fsRead } from "#util/fs.ts"; import { - validatorDocumentDownload, validatorDocumentName, - validatorDocumentPassword + validatorDocumentPassword, + validatorDocumentPreview } from "#util/validator/document.ts"; import { validatorHandler } from "#util/validator/handler.ts"; import { validatorCreationTimestamp } from "#util/validator/shared.ts"; @@ -27,7 +27,7 @@ const schemaParam = type({ }); const schemaQuery = type({ - "dl?": validatorDocumentDownload + "preview?": validatorDocumentPreview }); const schemaHeader = type({ @@ -53,9 +53,6 @@ Note: If you only need to query the document metadata, you should use HEAD metho responses: { 200: { content: { - "text/plain": { - schema: schemaBodyResponse.schema - }, "application/octet-stream": { schema: schemaBodyResponse.schema } @@ -80,7 +77,7 @@ Note: If you only need to query the document metadata, you should use HEAD metho // @ts-expect-error upstream } = ctx.req.valid("header") as typeof schemaHeader.infer; const { - dl + preview // @ts-expect-error upstream } = ctx.req.valid("query") as typeof schemaQuery.infer; @@ -108,11 +105,12 @@ Note: If you only need to query the document metadata, you should use HEAD metho return ctx.body(null); } - if (typeof dl !== "undefined") { - ctx.res.headers.set("content-disposition", `attachment; filename="jspaste_${name}"`); + if (typeof preview !== "undefined") { + ctx.res.headers.set("content-type", "text/plain"); + } else { + ctx.res.headers.set("content-type", "application/octet-stream"); } - ctx.res.headers.set("content-type", "text/plain"); ctx.res.headers.set("transfer-encoding", "chunked"); return stream(ctx, async (stream) => await stream.pipe(await fsRead(ctx, document))); diff --git a/src/utils/validator/document.ts b/src/utils/validator/document.ts index 6ad8e090..f5a2c060 100644 --- a/src/utils/validator/document.ts +++ b/src/utils/validator/document.ts @@ -71,9 +71,9 @@ export const validatorDocumentPasswordEmpty = type.string.exactlyLength(0).confi examples: [""] }); -export const validatorDocumentDownload = type.unknown.configure({ - ref: "DocumentDownload", - description: "Indicate the client that downloads the document as a file attachment (only useful in web browsers)" +export const validatorDocumentPreview = type.unknown.configure({ + ref: "DocumentPreview", + description: "View document as plain text" }); export const validatorDocumentListObject = type({ From eee51ae3f4917c7fce7fe0ebcec393db94fbbd93 Mon Sep 17 00:00:00 2001 From: Ivan Gabaldon Date: Tue, 3 Feb 2026 12:04:00 +0100 Subject: [PATCH 09/15] Tidy dependencies (#278) --- deno.json | 26 +++---- deno.lock | 169 +++++++++++++++++++++++---------------------- rolldown.config.ts | 5 +- 3 files changed, 102 insertions(+), 98 deletions(-) diff --git a/deno.json b/deno.json index dd74a650..08cefd2e 100644 --- a/deno.json +++ b/deno.json @@ -14,28 +14,28 @@ "#task/": "./src/tasks/", "#util/": "./src/utils/", "@deno/loader": "jsr:@deno/loader@~0.3.11", - "@hono/hono": "jsr:@hono/hono@^4.11.4", - "@hono/openapi": "npm:hono-openapi@^1.1.2", + "@hono/hono": "jsr:@hono/hono@^4.11.7", + "@hono/openapi": "npm:hono-openapi@1.1.1", "@hono/standard-validator": "jsr:@hono/standard-validator@~0.2.2", - "@std/assert": "jsr:@std/assert@^1.0.16", - "@std/async": "jsr:@std/async@^1.0.16", - "@std/cache": "jsr:@std/cache@~0.2.1", - "@std/collections": "jsr:@std/collections@^1.1.3", + "@std/assert": "jsr:@std/assert@^1.0.18", + "@std/async": "jsr:@std/async@^1.1.1", + "@std/cache": "jsr:@std/cache@~0.2.2", + "@std/collections": "jsr:@std/collections@^1.1.5", "@std/dotenv": "jsr:@std/dotenv@~0.225.6", "@std/encoding": "jsr:@std/encoding@^1.0.10", - "@std/fmt": "jsr:@std/fmt@^1.0.8", - "@std/fs": "jsr:@std/fs@^1.0.21", + "@std/fmt": "jsr:@std/fmt@^1.0.9", + "@std/fs": "jsr:@std/fs@^1.0.22", "@std/path": "jsr:@std/path@^1.1.4", - "@std/streams": "jsr:@std/streams@^1.0.16", + "@std/streams": "jsr:@std/streams@^1.0.17", "@std/ulid": "jsr:@std/ulid@^1.0.0", - "@types/node": "npm:@types/node@^25.0.8", - "arkenv": "npm:arkenv@~0.8.3", + "@types/node": "npm:@types/node@^25.2.0", + "arkenv": "npm:arkenv@~0.9.2", "arktype": "npm:arktype@^2.1.29", "biome": "npm:@biomejs/biome@2.3.13", "hash-wasm": "npm:hash-wasm@^4.12.0", "nanoid": "jsr:@sitnik/nanoid@^5.1.5", - "rolldown": "npm:rolldown@1.0.0-beta.60", - "vite-bundle-analyzer": "npm:vite-bundle-analyzer@^1.3.2" + "rolldown": "npm:rolldown@1.0.0-rc.2", + "vite-bundle-analyzer": "npm:vite-bundle-analyzer@^1.3.5" }, "fmt": { "exclude": ["**"] diff --git a/deno.lock b/deno.lock index af1425e3..5274da92 100644 --- a/deno.lock +++ b/deno.lock @@ -2,39 +2,39 @@ "version": "5", "specifiers": { "jsr:@deno/loader@~0.3.11": "0.3.11", - "jsr:@hono/hono@^4.11.4": "4.11.4", - "jsr:@hono/hono@^4.8.3": "4.11.4", + "jsr:@hono/hono@^4.11.7": "4.11.7", + "jsr:@hono/hono@^4.8.3": "4.11.7", "jsr:@hono/standard-validator@~0.2.2": "0.2.2", "jsr:@sitnik/nanoid@^5.1.5": "5.1.5", "jsr:@standard-schema/spec@1": "1.1.0", - "jsr:@std/assert@^1.0.16": "1.0.16", - "jsr:@std/async@^1.0.16": "1.0.16", + "jsr:@std/assert@^1.0.18": "1.0.18", + "jsr:@std/async@^1.1.1": "1.1.1", "jsr:@std/bytes@^1.0.6": "1.0.6", - "jsr:@std/cache@~0.2.1": "0.2.1", - "jsr:@std/collections@^1.1.3": "1.1.3", + "jsr:@std/cache@~0.2.2": "0.2.2", + "jsr:@std/collections@^1.1.5": "1.1.5", "jsr:@std/dotenv@~0.225.6": "0.225.6", "jsr:@std/encoding@^1.0.10": "1.0.10", - "jsr:@std/fmt@^1.0.8": "1.0.8", - "jsr:@std/fs@^1.0.21": "1.0.21", + "jsr:@std/fmt@^1.0.9": "1.0.9", + "jsr:@std/fs@^1.0.22": "1.0.22", "jsr:@std/internal@^1.0.12": "1.0.12", "jsr:@std/path@^1.1.4": "1.1.4", - "jsr:@std/streams@^1.0.16": "1.0.16", + "jsr:@std/streams@^1.0.17": "1.0.17", "jsr:@std/ulid@1": "1.0.0", "npm:@biomejs/biome@2.3.13": "2.3.13", - "npm:@types/node@^25.0.8": "25.0.8", - "npm:arkenv@~0.8.3": "0.8.3_arktype@2.1.29", + "npm:@types/node@^25.2.0": "25.2.0", + "npm:arkenv@~0.9.2": "0.9.2_arktype@2.1.29", "npm:arktype@^2.1.29": "2.1.29", "npm:hash-wasm@^4.12.0": "4.12.0", - "npm:hono-openapi@^1.1.2": "1.1.2_@standard-community+standard-json@0.3.5__@standard-schema+spec@1.1.0__@types+json-schema@7.0.15__arktype@2.1.29__quansync@0.2.11_@standard-community+standard-openapi@0.2.9__@standard-community+standard-json@0.3.5___@standard-schema+spec@1.1.0___@types+json-schema@7.0.15___arktype@2.1.29___quansync@0.2.11__@standard-schema+spec@1.1.0__arktype@2.1.29__openapi-types@12.1.3__@types+json-schema@7.0.15_@types+json-schema@7.0.15_openapi-types@12.1.3_arktype@2.1.29", - "npm:rolldown@1.0.0-beta.60": "1.0.0-beta.60", - "npm:vite-bundle-analyzer@^1.3.2": "1.3.2" + "npm:hono-openapi@1.1.1": "1.1.1_@standard-community+standard-json@0.3.5__@standard-schema+spec@1.1.0__@types+json-schema@7.0.15__arktype@2.1.29__quansync@0.2.11_@standard-community+standard-openapi@0.2.9__@standard-community+standard-json@0.3.5___@standard-schema+spec@1.1.0___@types+json-schema@7.0.15___arktype@2.1.29___quansync@0.2.11__@standard-schema+spec@1.1.0__arktype@2.1.29__openapi-types@12.1.3__@types+json-schema@7.0.15_@types+json-schema@7.0.15_openapi-types@12.1.3_arktype@2.1.29", + "npm:rolldown@1.0.0-rc.2": "1.0.0-rc.2", + "npm:vite-bundle-analyzer@^1.3.5": "1.3.5" }, "jsr": { "@deno/loader@0.3.11": { "integrity": "7c62f4f09cdfc34e66ba25b5a775a1830cbb5266b3e39f67b0f620c75484df8d" }, - "@hono/hono@4.11.4": { - "integrity": "aaf7b9d5a6b2422b0778c091b712ee1f018bc7e82138067d21eb27d7c2e1f5be" + "@hono/hono@4.11.7": { + "integrity": "2a0dc00088fbef98b76f575e3c4ab3d2c770d5e6095be215ae05c2aef25b363a" }, "@hono/standard-validator@0.2.2": { "integrity": "bc94e1ab41d677a571cb6dd5012823f1162b9856ca24dfd60233734824bb0b0c", @@ -49,23 +49,23 @@ "@standard-schema/spec@1.1.0": { "integrity": "2ccd54513cd9c960bd155ab569b1a901bc99c6f9ad29559d3f38a28c91c1822d" }, - "@std/assert@1.0.16": { - "integrity": "6a7272ed1eaa77defe76e5ff63ca705d9c495077e2d5fd0126d2b53fc5bd6532", + "@std/assert@1.0.18": { + "integrity": "270245e9c2c13b446286de475131dc688ca9abcd94fc5db41d43a219b34d1c78", "dependencies": [ "jsr:@std/internal" ] }, - "@std/async@1.0.16": { - "integrity": "6c9e43035313b67b5de43e2b3ee3eadb39a488a0a0a3143097f112e025d3ee9a" + "@std/async@1.1.1": { + "integrity": "8a79beb3378cc229ce65ba2c746cfd03e4855ddd891d1eb6b9e32128e0d5339c" }, "@std/bytes@1.0.6": { "integrity": "f6ac6adbd8ccd99314045f5703e23af0a68d7f7e58364b47d2c7f408aeb5820a" }, - "@std/cache@0.2.1": { - "integrity": "b6f1abfd118d35b1c4ca90f2b3f4c709a2014ae368f244bdc7533bf1c169d759" + "@std/cache@0.2.2": { + "integrity": "4c8fb31c7553837b537f55e26c9c91b2784f9a8c64f43772a7884a059b04d46e" }, - "@std/collections@1.1.3": { - "integrity": "bf8b0818886df6a32b64c7d3b037a425111f28278d69fd0995aeb62777c986b0" + "@std/collections@1.1.5": { + "integrity": "c37cc6bbbbf90fec3e782535a46c9c8a3210f19118c61add71fcea86b0ffd491" }, "@std/dotenv@0.225.6": { "integrity": "1d6f9db72f565bd26790fa034c26e45ecb260b5245417be76c2279e5734c421b" @@ -73,11 +73,11 @@ "@std/encoding@1.0.10": { "integrity": "8783c6384a2d13abd5e9e87a7ae0520a30e9f56aeeaa3bdf910a3eaaf5c811a1" }, - "@std/fmt@1.0.8": { - "integrity": "71e1fc498787e4434d213647a6e43e794af4fd393ef8f52062246e06f7e372b7" + "@std/fmt@1.0.9": { + "integrity": "2487343e8899fb2be5d0e3d35013e54477ada198854e52dd05ed0422eddcabe0" }, - "@std/fs@1.0.21": { - "integrity": "d720fe1056d78d43065a4d6e0eeb2b19f34adb8a0bc7caf3a4dbf1d4178252cd", + "@std/fs@1.0.22": { + "integrity": "de0f277a58a867147a8a01bc1b181d0dfa80bfddba8c9cf2bacd6747bcec9308", "dependencies": [ "jsr:@std/internal", "jsr:@std/path" @@ -92,8 +92,8 @@ "jsr:@std/internal" ] }, - "@std/streams@1.0.16": { - "integrity": "85030627befb1767c60d4f65cb30fa2f94af1d6ee6e5b2515b76157a542e89c4", + "@std/streams@1.0.17": { + "integrity": "7859f3d9deed83cf4b41f19223d4a67661b3d3819e9fc117698f493bf5992140", "dependencies": [ "jsr:@std/bytes" ] @@ -193,78 +193,78 @@ "@tybys/wasm-util" ] }, - "@oxc-project/types@0.108.0": { - "integrity": "sha512-7lf13b2IA/kZO6xgnIZA88sq3vwrxWk+2vxf6cc+omwYCRTiA5e63Beqf3fz/v8jEviChWWmFYBwzfSeyrsj7Q==" + "@oxc-project/types@0.111.0": { + "integrity": "sha512-bh54LJMafgRGl2cPQ/QM+tI5rWaShm/wK9KywEj/w36MhiPKXYM67H2y3q+9pr4YO7ufwg2AKdBAZkhHBD8ClA==" }, - "@rolldown/binding-android-arm64@1.0.0-beta.60": { - "integrity": "sha512-hOW6iQXtpG4uCW1zGK56+KhEXGttSkTp2ykncW/nkOIF/jOKTqbM944Q73HVeMXP1mPRvE2cZwNp3xeLIeyIGQ==", + "@rolldown/binding-android-arm64@1.0.0-rc.2": { + "integrity": "sha512-AGV80viZ4Hil4C16GFH+PSwq10jclV9oyRFhD+5HdowPOCJ+G+99N5AClQvMkUMIahTY8cX0SQpKEEWcCg6fSA==", "os": ["android"], "cpu": ["arm64"] }, - "@rolldown/binding-darwin-arm64@1.0.0-beta.60": { - "integrity": "sha512-vyDA4HXY2mP8PPtl5UE17uGPxUNG4m1wkfa3kAkR8JWrFbarV97UmLq22IWrNhtBPa89xqerzLK8KoVmz5JqCQ==", + "@rolldown/binding-darwin-arm64@1.0.0-rc.2": { + "integrity": "sha512-PYR+PQu1mMmQiiKHN2JiOctvH32Xc/Mf+Su2RSmWtC9BbIqlqsVWjbulnShk0imjRim0IsbkMMCN5vYQwiuqaA==", "os": ["darwin"], "cpu": ["arm64"] }, - "@rolldown/binding-darwin-x64@1.0.0-beta.60": { - "integrity": "sha512-WnxyqxAKP2BsxouwGY/RCF5UFw/LA4QOHhJ7VEl+UCelHokiwqNHRbryLAyRy3TE1FZ5eae+vAFcaetAu/kWLw==", + "@rolldown/binding-darwin-x64@1.0.0-rc.2": { + "integrity": "sha512-X2G36Z6oh5ynoYpE2JAyG+uQ4kO/3N7XydM/I98FNk8VVgDKjajFF+v7TXJ2FMq6xa7Xm0UIUKHW2MRQroqoUA==", "os": ["darwin"], "cpu": ["x64"] }, - "@rolldown/binding-freebsd-x64@1.0.0-beta.60": { - "integrity": "sha512-JtyWJ+zXOHof5gOUYwdTWI2kL6b8q9eNwqB/oD4mfUFaC/COEB2+47JMhcq78dey9Ahmec3DZKRDZPRh9hNAMQ==", + "@rolldown/binding-freebsd-x64@1.0.0-rc.2": { + "integrity": "sha512-XpiFTsl9qjiDfrmJF6CE3dgj1nmSbxUIT+p2HIbXV6WOj/32btO8FKkWSsOphUwVinEt3R8HVkVrcLtFNruMMQ==", "os": ["freebsd"], "cpu": ["x64"] }, - "@rolldown/binding-linux-arm-gnueabihf@1.0.0-beta.60": { - "integrity": "sha512-LrMoKqpHx+kCaNSk84iSBd4yVOymLIbxJQtvFjDN2CjQraownR+IXcwYDblFcj9ivmS54T3vCboXBbm3s1zbPQ==", + "@rolldown/binding-linux-arm-gnueabihf@1.0.0-rc.2": { + "integrity": "sha512-zjYZ99e47Wlygs4hW+sQ+kshlO8ake9OoY2ecnJ9cwpDGiiIB9rQ3LgP3kt8j6IeVyMSksu//VEhc8Mrd1lRIw==", "os": ["linux"], "cpu": ["arm"] }, - "@rolldown/binding-linux-arm64-gnu@1.0.0-beta.60": { - "integrity": "sha512-sqI+Vdx1gmXJMsXN3Fsewm3wlt7RHvRs1uysSp//NLsCoh9ZFEUr4ZzGhWKOg6Rvf+njNu/vCsz96x7wssLejQ==", + "@rolldown/binding-linux-arm64-gnu@1.0.0-rc.2": { + "integrity": "sha512-Piso04EZ9IHV1aZSsLQVMOPTiCq4Ps2UPL3pchjNXHGJGFiB9U42s22LubPaEBFS+i6tCawS5EarIwex1zC4BA==", "os": ["linux"], "cpu": ["arm64"] }, - "@rolldown/binding-linux-arm64-musl@1.0.0-beta.60": { - "integrity": "sha512-8xlqGLDtTP8sBfYwneTDu8+PRm5reNEHAuI/+6WPy9y350ls0KTFd3EJCOWEXWGW0F35ko9Fn9azmurBTjqOrQ==", + "@rolldown/binding-linux-arm64-musl@1.0.0-rc.2": { + "integrity": "sha512-OwJCeMZlmjKsN9pfJfTmqYpe3JC+L6RO87+hu9ajRLr1Lh6cM2FRQ8e48DLRyRDww8Ti695XQvqEANEMmsuzLw==", "os": ["linux"], "cpu": ["arm64"] }, - "@rolldown/binding-linux-x64-gnu@1.0.0-beta.60": { - "integrity": "sha512-iR4nhVouVZK1CiGGGyz+prF5Lw9Lmz30Rl36Hajex+dFVFiegka604zBwzTp5Tl0BZnr50ztnVJ30tGrBhDr8Q==", + "@rolldown/binding-linux-x64-gnu@1.0.0-rc.2": { + "integrity": "sha512-uQqBmA8dTWbKvfqbeSsXNUssRGfdgQCc0hkGfhQN7Pf85wG2h0Fd/z2d+ykyT4YbcsjQdgEGxBNsg3v4ekOuEA==", "os": ["linux"], "cpu": ["x64"] }, - "@rolldown/binding-linux-x64-musl@1.0.0-beta.60": { - "integrity": "sha512-HbfNcqNeqxFjSMf1Kpe8itr2e2lr0Bm6HltD2qXtfU91bSSikVs9EWsa1ThshQ1v2ZvxXckGjlVLtah6IoslPg==", + "@rolldown/binding-linux-x64-musl@1.0.0-rc.2": { + "integrity": "sha512-ItZabVsICCYWHbP+jcAgNzjPAYg5GIVQp/NpqT6iOgWctaMYtobClc5m0kNtxwqfNrLXoyt998xUey4AvcxnGQ==", "os": ["linux"], "cpu": ["x64"] }, - "@rolldown/binding-openharmony-arm64@1.0.0-beta.60": { - "integrity": "sha512-BiiamFcgTJ+ZFOUIMO9AHXUo9WXvHVwGfSrJ+Sv0AsTd2w3VN7dJGiH3WRcxKFetljJHWvGbM4fdpY5lf6RIvw==", + "@rolldown/binding-openharmony-arm64@1.0.0-rc.2": { + "integrity": "sha512-U4UYANwafcMXSUC0VqdrqTAgCo2v8T7SiuTYwVFXgia0KOl8jiv3okwCFqeZNuw/G6EWDiqhT8kK1DLgyLsxow==", "os": ["openharmony"], "cpu": ["arm64"] }, - "@rolldown/binding-wasm32-wasi@1.0.0-beta.60": { - "integrity": "sha512-6roXGbHMdR2ucnxXuwbmQvk8tuYl3VGu0yv13KxspyKBxxBd4RS6iykzLD6mX2gMUHhfX8SVWz7n/62gfyKHow==", + "@rolldown/binding-wasm32-wasi@1.0.0-rc.2": { + "integrity": "sha512-ZIWCjQsMon4tqRoao0Vzowjwx0cmFT3kublh2nNlgeasIJMWlIGHtr0d4fPypm57Rqx4o1h4L8SweoK2q6sMGA==", "dependencies": [ "@napi-rs/wasm-runtime" ], "cpu": ["wasm32"] }, - "@rolldown/binding-win32-arm64-msvc@1.0.0-beta.60": { - "integrity": "sha512-JBOm8/DC/CKnHyMHoJFdvzVHxUixid4dGkiTqGflxOxO43uSJMpl77pSPXvzwZ/VXwqblU2V0/PanyCBcRLowQ==", + "@rolldown/binding-win32-arm64-msvc@1.0.0-rc.2": { + "integrity": "sha512-NIo7vwRUPEzZ4MuZGr5YbDdjJ84xdiG+YYf8ZBfTgvIsk9wM0sZamJPEXvaLkzVIHpOw5uqEHXS85Gqqb7aaqQ==", "os": ["win32"], "cpu": ["arm64"] }, - "@rolldown/binding-win32-x64-msvc@1.0.0-beta.60": { - "integrity": "sha512-MKF0B823Efp+Ot8KsbwIuGhKH58pf+2rSM6VcqyNMlNBHheOM0Gf7JmEu+toc1jgN6fqjH7Et+8hAzsLVkIGfA==", + "@rolldown/binding-win32-x64-msvc@1.0.0-rc.2": { + "integrity": "sha512-bLKzyLFbvngeNPZocuLo3LILrKwCrkyMxmRXs6fZYDrvh7cyZRw9v56maDL9ipPas0OOmQK1kAKYwvTs30G21Q==", "os": ["win32"], "cpu": ["x64"] }, - "@rolldown/pluginutils@1.0.0-beta.60": { - "integrity": "sha512-Jz4aqXRPVtqkH1E3jRDzLO5cgN5JwW+WG0wXGE4NiJd25nougv/AHzxmKCzmVQUYnxLmTM0M4wrZp+LlC2FKLg==" + "@rolldown/pluginutils@1.0.0-rc.2": { + "integrity": "sha512-izyXV/v+cHiRfozX62W9htOAvwMo4/bXKDrQ+vom1L1qRuexPock/7VZDAhnpHCLNejd3NJ6hiab+tO0D44Rgw==" }, "@standard-community/standard-json@0.3.5_@standard-schema+spec@1.1.0_@types+json-schema@7.0.15_arktype@2.1.29_quansync@0.2.11": { "integrity": "sha512-4+ZPorwDRt47i+O7RjyuaxHRK/37QY/LmgxlGrRrSTLYoFatEOzvqIc85GTlM18SFZ5E91C+v0o/M37wZPpUHA==", @@ -302,16 +302,19 @@ "@types/json-schema@7.0.15": { "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==" }, - "@types/node@25.0.8": { - "integrity": "sha512-powIePYMmC3ibL0UJ2i2s0WIbq6cg6UyVFQxSCpaPxxzAaziRfimGivjdF943sSGV6RADVbk0Nvlm5P/FB44Zg==", + "@types/node@25.2.0": { + "integrity": "sha512-DZ8VwRFUNzuqJ5khrvwMXHmvPe+zGayJhr2CDNiKB1WBE1ST8Djl00D0IC4vvNmHMdj6DlbYRIaFE7WHjlDl5w==", "dependencies": [ "undici-types" ] }, - "arkenv@0.8.3_arktype@2.1.29": { - "integrity": "sha512-fndPYpIZ/EvARTXabWG5H+gKxlJEbPgTRvXH8htimmCbdBfEXZsSOgObwdiCCCcBz33tJAYk88goDtj0Ao99NA==", + "arkenv@0.9.2_arktype@2.1.29": { + "integrity": "sha512-7tcnzjlfw3F0NoB0SYZDQkjf5Bu5hWvcsfOUqX7Jg0qb6DQlDyb7USsfX04XPr1MTUsQgGQ4zl80enDc7IhREQ==", "dependencies": [ "arktype" + ], + "optionalPeers": [ + "arktype" ] }, "arkregex@0.0.5": { @@ -331,8 +334,8 @@ "hash-wasm@4.12.0": { "integrity": "sha512-+/2B2rYLb48I/evdOIhP+K/DD2ca2fgBjp6O+GBEnCDk2e4rpeXIK8GvIyRPjTezgmWn9gmKwkQjjx6BtqDHVQ==" }, - "hono-openapi@1.1.2_@standard-community+standard-json@0.3.5__@standard-schema+spec@1.1.0__@types+json-schema@7.0.15__arktype@2.1.29__quansync@0.2.11_@standard-community+standard-openapi@0.2.9__@standard-community+standard-json@0.3.5___@standard-schema+spec@1.1.0___@types+json-schema@7.0.15___arktype@2.1.29___quansync@0.2.11__@standard-schema+spec@1.1.0__arktype@2.1.29__openapi-types@12.1.3__@types+json-schema@7.0.15_@types+json-schema@7.0.15_openapi-types@12.1.3_arktype@2.1.29": { - "integrity": "sha512-toUcO60MftRBxqcVyxsHNYs2m4vf4xkQaiARAucQx3TiBPDtMNNkoh+C4I1vAretQZiGyaLOZNWn1YxfSyUA5g==", + "hono-openapi@1.1.1_@standard-community+standard-json@0.3.5__@standard-schema+spec@1.1.0__@types+json-schema@7.0.15__arktype@2.1.29__quansync@0.2.11_@standard-community+standard-openapi@0.2.9__@standard-community+standard-json@0.3.5___@standard-schema+spec@1.1.0___@types+json-schema@7.0.15___arktype@2.1.29___quansync@0.2.11__@standard-schema+spec@1.1.0__arktype@2.1.29__openapi-types@12.1.3__@types+json-schema@7.0.15_@types+json-schema@7.0.15_openapi-types@12.1.3_arktype@2.1.29": { + "integrity": "sha512-AC3HNhZYPHhnZdSy2Je7GDoTTNxPos6rKRQKVDBbSilY3cWJPqsxRnN6zA4pU7tfxmQEMTqkiLXbw6sAaemB8Q==", "dependencies": [ "@standard-community/standard-json", "@standard-community/standard-openapi", @@ -346,8 +349,8 @@ "quansync@0.2.11": { "integrity": "sha512-AifT7QEbW9Nri4tAwR5M/uzpBuqfZf+zwaEM/QkzEjj7NBuFD2rBuy0K3dE+8wltbezDV7JMA0WfnCPYRSYbXA==" }, - "rolldown@1.0.0-beta.60": { - "integrity": "sha512-YYgpv7MiTp9LdLj1fzGzCtij8Yi2OKEc3HQtfbIxW4yuSgpQz9518I69U72T5ErPA/ATOXqlcisiLrWy+5V9YA==", + "rolldown@1.0.0-rc.2": { + "integrity": "sha512-1g/8Us9J8sgJGn3hZfBecX1z4U3y5KO7V/aV2U1M/9UUzLNqHA8RfFQ/NPT7HLxOIldyIgrcjaYTRvA81KhJIg==", "dependencies": [ "@oxc-project/types", "@rolldown/pluginutils" @@ -375,36 +378,36 @@ "undici-types@7.16.0": { "integrity": "sha512-Zz+aZWSj8LE6zoxD+xrjh4VfkIG8Ya6LvYkZqtUQGJPZjYl53ypCaUwWqo7eI0x66KBGeRo+mlBEkMSeSZ38Nw==" }, - "vite-bundle-analyzer@1.3.2": { - "integrity": "sha512-Od4ILUKRvBV3LuO/E+S+c1XULlxdkRZPSf6Vzzu+UAXG0D3hZYUu9imZIkSj/PU4e1FB14yB+av8g3KiljH8zQ==", + "vite-bundle-analyzer@1.3.5": { + "integrity": "sha512-j1VL91DPLT6HDFbrNQt6NDTPB8EiNc+3/y02orltEz8UlptO67PKRn+gcdQvhMbivGOu4jCesxGpKsb80y9kGQ==", "bin": true } }, "workspace": { "dependencies": [ "jsr:@deno/loader@~0.3.11", - "jsr:@hono/hono@^4.11.4", + "jsr:@hono/hono@^4.11.7", "jsr:@hono/standard-validator@~0.2.2", "jsr:@sitnik/nanoid@^5.1.5", - "jsr:@std/assert@^1.0.16", - "jsr:@std/async@^1.0.16", - "jsr:@std/cache@~0.2.1", - "jsr:@std/collections@^1.1.3", + "jsr:@std/assert@^1.0.18", + "jsr:@std/async@^1.1.1", + "jsr:@std/cache@~0.2.2", + "jsr:@std/collections@^1.1.5", "jsr:@std/dotenv@~0.225.6", "jsr:@std/encoding@^1.0.10", - "jsr:@std/fmt@^1.0.8", - "jsr:@std/fs@^1.0.21", + "jsr:@std/fmt@^1.0.9", + "jsr:@std/fs@^1.0.22", "jsr:@std/path@^1.1.4", - "jsr:@std/streams@^1.0.16", + "jsr:@std/streams@^1.0.17", "jsr:@std/ulid@1", "npm:@biomejs/biome@2.3.13", - "npm:@types/node@^25.0.8", - "npm:arkenv@~0.8.3", + "npm:@types/node@^25.2.0", + "npm:arkenv@~0.9.2", "npm:arktype@^2.1.29", "npm:hash-wasm@^4.12.0", - "npm:hono-openapi@^1.1.2", - "npm:rolldown@1.0.0-beta.60", - "npm:vite-bundle-analyzer@^1.3.2" + "npm:hono-openapi@1.1.1", + "npm:rolldown@1.0.0-rc.2", + "npm:vite-bundle-analyzer@^1.3.5" ] } } diff --git a/rolldown.config.ts b/rolldown.config.ts index 3578f3b3..9669399a 100644 --- a/rolldown.config.ts +++ b/rolldown.config.ts @@ -9,10 +9,11 @@ export default { output: { file: "./dist/backend.js", format: "es", - inlineDynamicImports: true, legalComments: "none", + sourcemap: true, minify: true, - sourcemap: true + codeSplitting: false, + topLevelVar: true }, resolve: { conditionNames: ["import", "default"], From 0e195ea628ccef96026d6d4ba1db6ed924016824 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 3 Feb 2026 18:52:45 +0000 Subject: [PATCH 10/15] Update dependency @biomejs/biome to v2.3.14 (#279) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- biome.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/biome.json b/biome.json index 4823930c..b48af509 100644 --- a/biome.json +++ b/biome.json @@ -1,5 +1,5 @@ { - "$schema": "https://biomejs.dev/schemas/2.3.13/schema.json", + "$schema": "https://biomejs.dev/schemas/2.3.14/schema.json", "files": { "ignoreUnknown": true, "includes": ["**", "!!dist/*", "!node_modules/*", "!!storage/*"] From a81386e65096f763adf1102ef643094f9edec3c9 Mon Sep 17 00:00:00 2001 From: Ivan Gabaldon Date: Tue, 3 Feb 2026 23:29:10 +0100 Subject: [PATCH 11/15] Patch module resolution 2 (#280) --- biome.json | 5 +- deno.json | 6 +- deno.lock | 49 ++++++------- lib/deno-rolldown/mod.ts | 71 +++++++++++++------ rolldown.config.ts | 6 -- src/endpoints/document/v1/delete.ts | 2 +- src/endpoints/document/v1/get.ts | 4 +- src/endpoints/document/v1/index.ts | 2 +- src/endpoints/document/v1/list.ts | 2 +- src/endpoints/document/v1/patch.ts | 2 +- src/endpoints/document/v1/post.ts | 2 +- .../legacy/v2/documents/access.route.ts | 2 +- .../legacy/v2/documents/accessRaw.route.ts | 4 +- .../legacy/v2/documents/edit.route.ts | 2 +- .../legacy/v2/documents/exists.route.ts | 2 +- src/endpoints/legacy/v2/documents/index.ts | 2 +- .../legacy/v2/documents/publish.route.ts | 2 +- .../legacy/v2/documents/remove.route.ts | 2 +- src/endpoints/user/v1/create.ts | 2 +- src/endpoints/user/v1/index.ts | 2 +- src/global.ts | 2 +- src/http/handler.ts | 6 +- src/http/middleware/authorization.ts | 2 +- src/http/middleware/bodyStream.ts | 2 +- src/utils/error.ts | 4 +- src/utils/fs.ts | 2 +- 26 files changed, 106 insertions(+), 83 deletions(-) diff --git a/biome.json b/biome.json index b48af509..5bc883c4 100644 --- a/biome.json +++ b/biome.json @@ -51,6 +51,7 @@ "noMultiAssign": "warn", "noMultiStr": "warn", "noParametersOnlyUsedInRecursion": "warn", + "noRedundantDefaultExport": "warn", "noReturnAssign": "warn", "noUselessCatchBinding": "warn", "noUselessUndefined": "warn", @@ -84,8 +85,8 @@ "level": "error", "options": { "paths": { - "@hono/hono": { - "message": "Use `@hono/hono/tiny` instead", + "hono": { + "message": "Use `hono/tiny` instead", "allowImportNames": ["Context"] } } diff --git a/deno.json b/deno.json index 08cefd2e..65634ea0 100644 --- a/deno.json +++ b/deno.json @@ -14,8 +14,7 @@ "#task/": "./src/tasks/", "#util/": "./src/utils/", "@deno/loader": "jsr:@deno/loader@~0.3.11", - "@hono/hono": "jsr:@hono/hono@^4.11.7", - "@hono/openapi": "npm:hono-openapi@1.1.1", + "@hono/openapi": "npm:hono-openapi@^1.2.0", "@hono/standard-validator": "jsr:@hono/standard-validator@~0.2.2", "@std/assert": "jsr:@std/assert@^1.0.18", "@std/async": "jsr:@std/async@^1.1.1", @@ -31,8 +30,9 @@ "@types/node": "npm:@types/node@^25.2.0", "arkenv": "npm:arkenv@~0.9.2", "arktype": "npm:arktype@^2.1.29", - "biome": "npm:@biomejs/biome@2.3.13", + "biome": "npm:@biomejs/biome@2.3.14", "hash-wasm": "npm:hash-wasm@^4.12.0", + "hono": "jsr:@hono/hono@^4.11.7", "nanoid": "jsr:@sitnik/nanoid@^5.1.5", "rolldown": "npm:rolldown@1.0.0-rc.2", "vite-bundle-analyzer": "npm:vite-bundle-analyzer@^1.3.5" diff --git a/deno.lock b/deno.lock index 5274da92..72b3713c 100644 --- a/deno.lock +++ b/deno.lock @@ -20,12 +20,12 @@ "jsr:@std/path@^1.1.4": "1.1.4", "jsr:@std/streams@^1.0.17": "1.0.17", "jsr:@std/ulid@1": "1.0.0", - "npm:@biomejs/biome@2.3.13": "2.3.13", + "npm:@biomejs/biome@2.3.14": "2.3.14", "npm:@types/node@^25.2.0": "25.2.0", "npm:arkenv@~0.9.2": "0.9.2_arktype@2.1.29", "npm:arktype@^2.1.29": "2.1.29", "npm:hash-wasm@^4.12.0": "4.12.0", - "npm:hono-openapi@1.1.1": "1.1.1_@standard-community+standard-json@0.3.5__@standard-schema+spec@1.1.0__@types+json-schema@7.0.15__arktype@2.1.29__quansync@0.2.11_@standard-community+standard-openapi@0.2.9__@standard-community+standard-json@0.3.5___@standard-schema+spec@1.1.0___@types+json-schema@7.0.15___arktype@2.1.29___quansync@0.2.11__@standard-schema+spec@1.1.0__arktype@2.1.29__openapi-types@12.1.3__@types+json-schema@7.0.15_@types+json-schema@7.0.15_openapi-types@12.1.3_arktype@2.1.29", + "npm:hono-openapi@^1.2.0": "1.2.0_@standard-community+standard-json@0.3.5__@standard-schema+spec@1.1.0__@types+json-schema@7.0.15__arktype@2.1.29__quansync@0.2.11_@standard-community+standard-openapi@0.2.9__@standard-community+standard-json@0.3.5___@standard-schema+spec@1.1.0___@types+json-schema@7.0.15___arktype@2.1.29___quansync@0.2.11__@standard-schema+spec@1.1.0__arktype@2.1.29__openapi-types@12.1.3__@types+json-schema@7.0.15_@types+json-schema@7.0.15_openapi-types@12.1.3_arktype@2.1.29", "npm:rolldown@1.0.0-rc.2": "1.0.0-rc.2", "npm:vite-bundle-analyzer@^1.3.5": "1.3.5" }, @@ -112,8 +112,8 @@ "@ark/util@0.56.0": { "integrity": "sha512-BghfRC8b9pNs3vBoDJhcta0/c1J1rsoS1+HgVUreMFPdhz/CRAKReAu57YEllNaSy98rWAdY1gE+gFup7OXpgA==" }, - "@biomejs/biome@2.3.13": { - "integrity": "sha512-Fw7UsV0UAtWIBIm0M7g5CRerpu1eKyKAXIazzxhbXYUyMkwNrkX/KLkGI7b+uVDQ5cLUMfOC9vR60q9IDYDstA==", + "@biomejs/biome@2.3.14": { + "integrity": "sha512-QMT6QviX0WqXJCaiqVMiBUCr5WRQ1iFSjvOLoTk6auKukJMvnMzWucXpwZB0e8F00/1/BsS9DzcKgWH+CLqVuA==", "optionalDependencies": [ "@biomejs/cli-darwin-arm64", "@biomejs/cli-darwin-x64", @@ -126,43 +126,43 @@ ], "bin": true }, - "@biomejs/cli-darwin-arm64@2.3.13": { - "integrity": "sha512-0OCwP0/BoKzyJHnFdaTk/i7hIP9JHH9oJJq6hrSCPmJPo8JWcJhprK4gQlhFzrwdTBAW4Bjt/RmCf3ZZe59gwQ==", + "@biomejs/cli-darwin-arm64@2.3.14": { + "integrity": "sha512-UJGPpvWJMkLxSRtpCAKfKh41Q4JJXisvxZL8ChN1eNW3m/WlPFJ6EFDCE7YfUb4XS8ZFi3C1dFpxUJ0Ety5n+A==", "os": ["darwin"], "cpu": ["arm64"] }, - "@biomejs/cli-darwin-x64@2.3.13": { - "integrity": "sha512-AGr8OoemT/ejynbIu56qeil2+F2WLkIjn2d8jGK1JkchxnMUhYOfnqc9sVzcRxpG9Ycvw4weQ5sprRvtb7Yhcw==", + "@biomejs/cli-darwin-x64@2.3.14": { + "integrity": "sha512-PNkLNQG6RLo8lG7QoWe/hhnMxJIt1tEimoXpGQjwS/dkdNiKBLPv4RpeQl8o3s1OKI3ZOR5XPiYtmbGGHAOnLA==", "os": ["darwin"], "cpu": ["x64"] }, - "@biomejs/cli-linux-arm64-musl@2.3.13": { - "integrity": "sha512-TUdDCSY+Eo/EHjhJz7P2GnWwfqet+lFxBZzGHldrvULr59AgahamLs/N85SC4+bdF86EhqDuuw9rYLvLFWWlXA==", + "@biomejs/cli-linux-arm64-musl@2.3.14": { + "integrity": "sha512-LInRbXhYujtL3sH2TMCH/UBwJZsoGwfQjBrMfl84CD4hL/41C/EU5mldqf1yoFpsI0iPWuU83U+nB2TUUypWeg==", "os": ["linux"], "cpu": ["arm64"] }, - "@biomejs/cli-linux-arm64@2.3.13": { - "integrity": "sha512-xvOiFkrDNu607MPMBUQ6huHmBG1PZLOrqhtK6pXJW3GjfVqJg0Z/qpTdhXfcqWdSZHcT+Nct2fOgewZvytESkw==", + "@biomejs/cli-linux-arm64@2.3.14": { + "integrity": "sha512-KT67FKfzIw6DNnUNdYlBg+eU24Go3n75GWK6NwU4+yJmDYFe9i/MjiI+U/iEzKvo0g7G7MZqoyrhIYuND2w8QQ==", "os": ["linux"], "cpu": ["arm64"] }, - "@biomejs/cli-linux-x64-musl@2.3.13": { - "integrity": "sha512-0bdwFVSbbM//Sds6OjtnmQGp4eUjOTt6kHvR/1P0ieR9GcTUAlPNvPC3DiavTqq302W34Ae2T6u5VVNGuQtGlQ==", + "@biomejs/cli-linux-x64-musl@2.3.14": { + "integrity": "sha512-KQU7EkbBBuHPW3/rAcoiVmhlPtDSGOGRPv9js7qJVpYTzjQmVR+C9Rfcz+ti8YCH+zT1J52tuBybtP4IodjxZQ==", "os": ["linux"], "cpu": ["x64"] }, - "@biomejs/cli-linux-x64@2.3.13": { - "integrity": "sha512-s+YsZlgiXNq8XkgHs6xdvKDFOj/bwTEevqEY6rC2I3cBHbxXYU1LOZstH3Ffw9hE5tE1sqT7U23C00MzkXztMw==", + "@biomejs/cli-linux-x64@2.3.14": { + "integrity": "sha512-ZsZzQsl9U+wxFrGGS4f6UxREUlgHwmEfu1IrXlgNFrNnd5Th6lIJr8KmSzu/+meSa9f4rzFrbEW9LBBA6ScoMA==", "os": ["linux"], "cpu": ["x64"] }, - "@biomejs/cli-win32-arm64@2.3.13": { - "integrity": "sha512-QweDxY89fq0VvrxME+wS/BXKmqMrOTZlN9SqQ79kQSIc3FrEwvW/PvUegQF6XIVaekncDykB5dzPqjbwSKs9DA==", + "@biomejs/cli-win32-arm64@2.3.14": { + "integrity": "sha512-+IKYkj/pUBbnRf1G1+RlyA3LWiDgra1xpS7H2g4BuOzzRbRB+hmlw0yFsLprHhbbt7jUzbzAbAjK/Pn0FDnh1A==", "os": ["win32"], "cpu": ["arm64"] }, - "@biomejs/cli-win32-x64@2.3.13": { - "integrity": "sha512-trDw2ogdM2lyav9WFQsdsfdVy1dvZALymRpgmWsvSez0BJzBjulhOT/t+wyKeh3pZWvwP3VMs1SoOKwO3wecMQ==", + "@biomejs/cli-win32-x64@2.3.14": { + "integrity": "sha512-oizCjdyQ3WJEswpb3Chdngeat56rIdSYK12JI3iI11Mt5T5EXcZ7WLuowzEaFPNJ3zmOQFliMN8QY1Pi+qsfdQ==", "os": ["win32"], "cpu": ["x64"] }, @@ -334,8 +334,8 @@ "hash-wasm@4.12.0": { "integrity": "sha512-+/2B2rYLb48I/evdOIhP+K/DD2ca2fgBjp6O+GBEnCDk2e4rpeXIK8GvIyRPjTezgmWn9gmKwkQjjx6BtqDHVQ==" }, - "hono-openapi@1.1.1_@standard-community+standard-json@0.3.5__@standard-schema+spec@1.1.0__@types+json-schema@7.0.15__arktype@2.1.29__quansync@0.2.11_@standard-community+standard-openapi@0.2.9__@standard-community+standard-json@0.3.5___@standard-schema+spec@1.1.0___@types+json-schema@7.0.15___arktype@2.1.29___quansync@0.2.11__@standard-schema+spec@1.1.0__arktype@2.1.29__openapi-types@12.1.3__@types+json-schema@7.0.15_@types+json-schema@7.0.15_openapi-types@12.1.3_arktype@2.1.29": { - "integrity": "sha512-AC3HNhZYPHhnZdSy2Je7GDoTTNxPos6rKRQKVDBbSilY3cWJPqsxRnN6zA4pU7tfxmQEMTqkiLXbw6sAaemB8Q==", + "hono-openapi@1.2.0_@standard-community+standard-json@0.3.5__@standard-schema+spec@1.1.0__@types+json-schema@7.0.15__arktype@2.1.29__quansync@0.2.11_@standard-community+standard-openapi@0.2.9__@standard-community+standard-json@0.3.5___@standard-schema+spec@1.1.0___@types+json-schema@7.0.15___arktype@2.1.29___quansync@0.2.11__@standard-schema+spec@1.1.0__arktype@2.1.29__openapi-types@12.1.3__@types+json-schema@7.0.15_@types+json-schema@7.0.15_openapi-types@12.1.3_arktype@2.1.29": { + "integrity": "sha512-t3u4v8YCltExDl4d9cLqg/mcrYFSs9Gjb5puF1CePPrvv1JQOo1Kc50HAmGt47CWHIoc/W8Q9LY3t3yqU0dxFw==", "dependencies": [ "@standard-community/standard-json", "@standard-community/standard-openapi", @@ -380,6 +380,7 @@ }, "vite-bundle-analyzer@1.3.5": { "integrity": "sha512-j1VL91DPLT6HDFbrNQt6NDTPB8EiNc+3/y02orltEz8UlptO67PKRn+gcdQvhMbivGOu4jCesxGpKsb80y9kGQ==", + "deprecated": true, "bin": true } }, @@ -400,12 +401,12 @@ "jsr:@std/path@^1.1.4", "jsr:@std/streams@^1.0.17", "jsr:@std/ulid@1", - "npm:@biomejs/biome@2.3.13", + "npm:@biomejs/biome@2.3.14", "npm:@types/node@^25.2.0", "npm:arkenv@~0.9.2", "npm:arktype@^2.1.29", "npm:hash-wasm@^4.12.0", - "npm:hono-openapi@1.1.1", + "npm:hono-openapi@^1.2.0", "npm:rolldown@1.0.0-rc.2", "npm:vite-bundle-analyzer@^1.3.5" ] diff --git a/lib/deno-rolldown/mod.ts b/lib/deno-rolldown/mod.ts index abd0256f..a6085c34 100644 --- a/lib/deno-rolldown/mod.ts +++ b/lib/deno-rolldown/mod.ts @@ -55,12 +55,26 @@ export interface DenoPlugin extends Disposable { }; } +function isBareSpecifier(source: string): boolean { + return !( + source.startsWith(".") || + source.startsWith("/") || + source.startsWith("file:") || + source.startsWith("http:") || + source.startsWith("https:") || + source.startsWith("npm:") || + source.startsWith("jsr:") || + source.startsWith("node:") + ); +} + /** * Creates a deno plugin for use with rolldown. * @returns The plugin. */ export default function denoPlugin(pluginOptions: DenoPluginOptions = {}): DenoPlugin { let loader: Loader | undefined; + let primaryEntrypoint: string | undefined; const loads = new Map>(); const modules = new Map(); @@ -91,6 +105,8 @@ export default function denoPlugin(pluginOptions: DenoPluginOptions = {}): DenoP if (inputs.length === 0) return; + [primaryEntrypoint] = inputs; + const workspace = new Workspace({ ...pluginOptions }); loader = await workspace.createLoader(); await loader.addEntrypoints(inputs); @@ -107,37 +123,48 @@ export default function denoPlugin(pluginOptions: DenoPluginOptions = {}): DenoP const resolutionMode = resolveKindToResolutionMode(options.kind); const normalizedImporter = importer != null ? (modules.get(importer)?.specifier ?? importer) : undefined; - let resolvedSpecifier: string; + let resolvedSpecifier: string | undefined; + try { resolvedSpecifier = await loader.resolve(source, normalizedImporter, resolutionMode); } catch (error: unknown) { - if ((error as { code?: string })?.code === "ERR_MODULE_NOT_FOUND") { - if (pluginOptions.externalPatterns) { - for (const pattern of pluginOptions.externalPatterns) { - if (typeof pattern === "string") { - if (source === pattern || source.startsWith(`${pattern}/`)) { - return { id: source, external: true }; - } - } else if (pattern.test(source)) { + if ((error as { code?: string })?.code !== "ERR_MODULE_NOT_FOUND") { + throw error; + } + } + + if (resolvedSpecifier === undefined && isBareSpecifier(source)) { + if (primaryEntrypoint) { + try { + resolvedSpecifier = await loader.resolve(source, primaryEntrypoint, resolutionMode); + } catch {} + } + + if (resolvedSpecifier === undefined) { + try { + resolvedSpecifier = await loader.resolve(source, undefined, resolutionMode); + } catch {} + } + } + + if (resolvedSpecifier === undefined) { + if (pluginOptions.externalPatterns) { + for (const pattern of pluginOptions.externalPatterns) { + if (typeof pattern === "string") { + if (source === pattern || source.startsWith(`${pattern}/`)) { return { id: source, external: true }; } + } else if (pattern.test(source)) { + return { id: source, external: true }; } } + } - if ( - !( - source.startsWith(".") || - source.startsWith("/") || - source.startsWith("file:") || - source.startsWith("http") - ) - ) { - return { id: source, external: true }; - } - - return; + if (isBareSpecifier(source)) { + return { id: source, external: true }; } - throw error; + + return; } let loadPromise = loads.get(resolvedSpecifier); diff --git a/rolldown.config.ts b/rolldown.config.ts index 9669399a..e7f52e5c 100644 --- a/rolldown.config.ts +++ b/rolldown.config.ts @@ -8,19 +8,13 @@ export default { input: "./src/index.ts", output: { file: "./dist/backend.js", - format: "es", legalComments: "none", sourcemap: true, minify: true, codeSplitting: false, topLevelVar: true }, - resolve: { - conditionNames: ["import", "default"], - mainFields: ["module", "main"] - }, platform: "neutral", - external: [/^(node:)/], moduleTypes: { ".sql": "text" }, diff --git a/src/endpoints/document/v1/delete.ts b/src/endpoints/document/v1/delete.ts index fb437636..1d326427 100644 --- a/src/endpoints/document/v1/delete.ts +++ b/src/endpoints/document/v1/delete.ts @@ -1,6 +1,6 @@ -import { Hono } from "@hono/hono/tiny"; import { describeRoute, validator } from "@hono/openapi"; import { type } from "arktype"; +import { Hono } from "hono/tiny"; import { constantHttpStatusCodes, mutable } from "#/global.ts"; import type { Env } from "#http/handler.ts"; import { authMiddleware } from "#http/middleware/authorization.ts"; diff --git a/src/endpoints/document/v1/get.ts b/src/endpoints/document/v1/get.ts index 667dff53..70afbdd7 100644 --- a/src/endpoints/document/v1/get.ts +++ b/src/endpoints/document/v1/get.ts @@ -1,8 +1,8 @@ -import { stream } from "@hono/hono/streaming"; -import { Hono } from "@hono/hono/tiny"; import { describeRoute, resolver, validator } from "@hono/openapi"; import { decodeTime } from "@std/ulid"; import { type } from "arktype"; +import { stream } from "hono/streaming"; +import { Hono } from "hono/tiny"; import { constantHttpStatusCodes, mutable } from "#/global.ts"; import type { Env } from "#http/handler.ts"; import { verifyHash } from "#util/crypto.ts"; diff --git a/src/endpoints/document/v1/index.ts b/src/endpoints/document/v1/index.ts index 0bb8d9a3..e4762286 100644 --- a/src/endpoints/document/v1/index.ts +++ b/src/endpoints/document/v1/index.ts @@ -1,4 +1,4 @@ -import { Hono } from "@hono/hono/tiny"; +import { Hono } from "hono/tiny"; import type { Env } from "#http/handler.ts"; import delete_ from "./delete.ts"; import get from "./get.ts"; diff --git a/src/endpoints/document/v1/list.ts b/src/endpoints/document/v1/list.ts index b5576001..647f7c7a 100644 --- a/src/endpoints/document/v1/list.ts +++ b/src/endpoints/document/v1/list.ts @@ -1,6 +1,6 @@ -import { Hono } from "@hono/hono/tiny"; import { describeRoute, resolver } from "@hono/openapi"; import { decodeTime } from "@std/ulid"; +import { Hono } from "hono/tiny"; import { constantHttpStatusCodes, mutable } from "#/global.ts"; import type { Env } from "#http/handler.ts"; import { authMiddleware } from "#http/middleware/authorization.ts"; diff --git a/src/endpoints/document/v1/patch.ts b/src/endpoints/document/v1/patch.ts index 240fd7af..fdf8dcf8 100644 --- a/src/endpoints/document/v1/patch.ts +++ b/src/endpoints/document/v1/patch.ts @@ -1,6 +1,6 @@ -import { Hono } from "@hono/hono/tiny"; import { describeRoute, resolver, validator } from "@hono/openapi"; import { type } from "arktype"; +import { Hono } from "hono/tiny"; import { constantHttpStatusCodes, mutable } from "#/global.ts"; import type { Env } from "#http/handler.ts"; import { authMiddleware } from "#http/middleware/authorization.ts"; diff --git a/src/endpoints/document/v1/post.ts b/src/endpoints/document/v1/post.ts index e4c2f044..62b6fe4c 100644 --- a/src/endpoints/document/v1/post.ts +++ b/src/endpoints/document/v1/post.ts @@ -1,7 +1,7 @@ -import { Hono } from "@hono/hono/tiny"; import { describeRoute, resolver, validator } from "@hono/openapi"; import { monotonicUlid } from "@std/ulid"; import { type } from "arktype"; +import { Hono } from "hono/tiny"; import { constantHttpStatusCodes, mutable } from "#/global.ts"; import type { Env } from "#http/handler.ts"; import { authMiddleware } from "#http/middleware/authorization.ts"; diff --git a/src/endpoints/legacy/v2/documents/access.route.ts b/src/endpoints/legacy/v2/documents/access.route.ts index 17aba3c9..57e510da 100644 --- a/src/endpoints/legacy/v2/documents/access.route.ts +++ b/src/endpoints/legacy/v2/documents/access.route.ts @@ -1,7 +1,7 @@ -import { Hono } from "@hono/hono/tiny"; import { describeRoute, resolver, validator } from "@hono/openapi"; import { toText } from "@std/streams"; import { type } from "arktype"; +import { Hono } from "hono/tiny"; import { constantHttpStatusCodes, mutable } from "#/global.ts"; import type { Env } from "#http/handler.ts"; import { verifyHash } from "#util/crypto.ts"; diff --git a/src/endpoints/legacy/v2/documents/accessRaw.route.ts b/src/endpoints/legacy/v2/documents/accessRaw.route.ts index a01fdd21..d2ec7076 100644 --- a/src/endpoints/legacy/v2/documents/accessRaw.route.ts +++ b/src/endpoints/legacy/v2/documents/accessRaw.route.ts @@ -1,7 +1,7 @@ -import { stream } from "@hono/hono/streaming"; -import { Hono } from "@hono/hono/tiny"; import { describeRoute, resolver, validator } from "@hono/openapi"; import { type } from "arktype"; +import { stream } from "hono/streaming"; +import { Hono } from "hono/tiny"; import { constantHttpStatusCodes, mutable } from "#/global.ts"; import type { Env } from "#http/handler.ts"; import { verifyHash } from "#util/crypto.ts"; diff --git a/src/endpoints/legacy/v2/documents/edit.route.ts b/src/endpoints/legacy/v2/documents/edit.route.ts index 256567fa..cf094cf4 100644 --- a/src/endpoints/legacy/v2/documents/edit.route.ts +++ b/src/endpoints/legacy/v2/documents/edit.route.ts @@ -1,6 +1,6 @@ -import { Hono } from "@hono/hono/tiny"; import { describeRoute, resolver, validator } from "@hono/openapi"; import { type } from "arktype"; +import { Hono } from "hono/tiny"; import { constantHttpStatusCodes, mutable } from "#/global.ts"; import type { Env } from "#http/handler.ts"; import { bodyStream } from "#http/middleware/bodyStream.ts"; diff --git a/src/endpoints/legacy/v2/documents/exists.route.ts b/src/endpoints/legacy/v2/documents/exists.route.ts index 72c10a1d..0eb100d5 100644 --- a/src/endpoints/legacy/v2/documents/exists.route.ts +++ b/src/endpoints/legacy/v2/documents/exists.route.ts @@ -1,6 +1,6 @@ -import { Hono } from "@hono/hono/tiny"; import { describeRoute, resolver, validator } from "@hono/openapi"; import { type } from "arktype"; +import { Hono } from "hono/tiny"; import { constantHttpStatusCodes, mutable } from "#/global.ts"; import type { Env } from "#http/handler.ts"; import { genericErrorResponse } from "#util/error.ts"; diff --git a/src/endpoints/legacy/v2/documents/index.ts b/src/endpoints/legacy/v2/documents/index.ts index 5ba784b7..67ee636a 100644 --- a/src/endpoints/legacy/v2/documents/index.ts +++ b/src/endpoints/legacy/v2/documents/index.ts @@ -1,4 +1,4 @@ -import { Hono } from "@hono/hono/tiny"; +import { Hono } from "hono/tiny"; import type { Env } from "#http/handler.ts"; import access from "./access.route.ts"; import accessRaw from "./accessRaw.route.ts"; diff --git a/src/endpoints/legacy/v2/documents/publish.route.ts b/src/endpoints/legacy/v2/documents/publish.route.ts index 8c83cfa3..fca4fa5f 100644 --- a/src/endpoints/legacy/v2/documents/publish.route.ts +++ b/src/endpoints/legacy/v2/documents/publish.route.ts @@ -1,7 +1,7 @@ -import { Hono } from "@hono/hono/tiny"; import { describeRoute, resolver, validator } from "@hono/openapi"; import { monotonicUlid } from "@std/ulid"; import { type } from "arktype"; +import { Hono } from "hono/tiny"; import { constantDocumentNameLengthMax, constantDocumentNameLengthMin, diff --git a/src/endpoints/legacy/v2/documents/remove.route.ts b/src/endpoints/legacy/v2/documents/remove.route.ts index 6beb7196..d3bb0235 100644 --- a/src/endpoints/legacy/v2/documents/remove.route.ts +++ b/src/endpoints/legacy/v2/documents/remove.route.ts @@ -1,6 +1,6 @@ -import { Hono } from "@hono/hono/tiny"; import { describeRoute, resolver, validator } from "@hono/openapi"; import { type } from "arktype"; +import { Hono } from "hono/tiny"; import { constantHttpStatusCodes, mutable } from "#/global.ts"; import type { Env } from "#http/handler.ts"; import { errorCodeDocumentNotFound, errorThrow, genericErrorResponse } from "#util/error.ts"; diff --git a/src/endpoints/user/v1/create.ts b/src/endpoints/user/v1/create.ts index 9b558f12..6784a803 100644 --- a/src/endpoints/user/v1/create.ts +++ b/src/endpoints/user/v1/create.ts @@ -1,6 +1,6 @@ -import { Hono } from "@hono/hono/tiny"; import { describeRoute, resolver } from "@hono/openapi"; import { type } from "arktype"; +import { Hono } from "hono/tiny"; import { constantHttpStatusCodes, mutable } from "#/global.ts"; import type { Env } from "#http/handler.ts"; import { authMiddleware } from "#http/middleware/authorization.ts"; diff --git a/src/endpoints/user/v1/index.ts b/src/endpoints/user/v1/index.ts index a977e204..91e0de65 100644 --- a/src/endpoints/user/v1/index.ts +++ b/src/endpoints/user/v1/index.ts @@ -1,4 +1,4 @@ -import { Hono } from "@hono/hono/tiny"; +import { Hono } from "hono/tiny"; import type { Env } from "#http/handler.ts"; import create from "./create.ts"; diff --git a/src/global.ts b/src/global.ts index 9f0e1e49..e4d618e7 100644 --- a/src/global.ts +++ b/src/global.ts @@ -1,7 +1,7 @@ import { STATUS_CODES } from "node:http"; import type { StatementSync } from "node:sqlite"; -import type { StatusCode } from "@hono/hono/utils/http-status"; import { LruCache } from "@std/cache"; +import type { StatusCode } from "hono/utils/http-status"; import { customAlphabet } from "nanoid"; import type { Database } from "#db/index.ts"; diff --git a/src/http/handler.ts b/src/http/handler.ts index 4fea4eeb..1a7951eb 100644 --- a/src/http/handler.ts +++ b/src/http/handler.ts @@ -1,7 +1,7 @@ -import { cors } from "@hono/hono/cors"; -import { HTTPException } from "@hono/hono/http-exception"; -import { Hono } from "@hono/hono/tiny"; import { openAPIRouteHandler } from "@hono/openapi"; +import { cors } from "hono/cors"; +import { HTTPException } from "hono/http-exception"; +import { Hono } from "hono/tiny"; import { v1DocumentHandler } from "#endpoint/document/v1/index.ts"; import { v2LegacyDocumentHandler } from "#endpoint/legacy/v2/documents/index.ts"; import { v1UserHandler } from "#endpoint/user/v1/index.ts"; diff --git a/src/http/middleware/authorization.ts b/src/http/middleware/authorization.ts index 74d3a1c0..c038e768 100644 --- a/src/http/middleware/authorization.ts +++ b/src/http/middleware/authorization.ts @@ -1,5 +1,5 @@ -import { createMiddleware } from "@hono/hono/factory"; import { type } from "arktype"; +import { createMiddleware } from "hono/factory"; import { mutable } from "#/global.ts"; import { verifyHash } from "#util/crypto.ts"; import { errorCodeUserInvalidToken, errorCodeValidation, errorThrow } from "#util/error.ts"; diff --git a/src/http/middleware/bodyStream.ts b/src/http/middleware/bodyStream.ts index 6768b36a..1dfcf816 100644 --- a/src/http/middleware/bodyStream.ts +++ b/src/http/middleware/bodyStream.ts @@ -1,4 +1,4 @@ -import { createMiddleware } from "@hono/hono/factory"; +import { createMiddleware } from "hono/factory"; import { env } from "#util/env.ts"; import { errorCodeDocumentInvalidSize, errorThrow } from "#util/error.ts"; import type { Env } from "../handler.ts"; diff --git a/src/utils/error.ts b/src/utils/error.ts index b32ad277..620087c7 100644 --- a/src/utils/error.ts +++ b/src/utils/error.ts @@ -1,7 +1,7 @@ -import { HTTPException } from "@hono/hono/http-exception"; -import type { ContentfulStatusCode } from "@hono/hono/utils/http-status"; import { resolver } from "@hono/openapi"; import { type } from "arktype"; +import { HTTPException } from "hono/http-exception"; +import type { ContentfulStatusCode } from "hono/utils/http-status"; // allow const enum in the future // https://github.com/rolldown/rolldown/issues/7676 diff --git a/src/utils/fs.ts b/src/utils/fs.ts index 800fdd90..e9a66d59 100644 --- a/src/utils/fs.ts +++ b/src/utils/fs.ts @@ -1,4 +1,4 @@ -import type { Context } from "@hono/hono"; +import type { Context } from "hono"; import type { Document } from "#db/query.ts"; import { constantPathStructStorageData, constantTemporalToUTC, constantTemporalUTC } from "../global.ts"; import type { Env } from "../http/handler.ts"; From d64ef49c0332716c54950837ba85bfc920215b0a Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sat, 7 Feb 2026 02:08:15 +0000 Subject: [PATCH 12/15] Update step-security/harden-runner action to v2.14.2 (#281) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/cd.yml | 4 ++-- .github/workflows/ci.yml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index d2887830..1a8a1c77 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -41,7 +41,7 @@ jobs: steps: - name: Harden Runner - uses: step-security/harden-runner@e3f713f2d8f53843e71c69a996d56f51aa9adfb9 # v2.14.1 + uses: step-security/harden-runner@5ef0c079ce82195b2a36a210272d6b661572d83e # v2.14.2 with: egress-policy: "audit" @@ -135,7 +135,7 @@ jobs: steps: - name: Harden Runner - uses: step-security/harden-runner@e3f713f2d8f53843e71c69a996d56f51aa9adfb9 # v2.14.1 + uses: step-security/harden-runner@5ef0c079ce82195b2a36a210272d6b661572d83e # v2.14.2 with: egress-policy: "audit" diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0272d5f3..2b0b999d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -26,7 +26,7 @@ jobs: steps: - name: Harden Runner - uses: step-security/harden-runner@e3f713f2d8f53843e71c69a996d56f51aa9adfb9 # v2.14.1 + uses: step-security/harden-runner@5ef0c079ce82195b2a36a210272d6b661572d83e # v2.14.2 with: egress-policy: "audit" From 2dfe828ce9804e3086306a95b2cb8f7b3be9bb57 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 12 Feb 2026 15:41:52 +0000 Subject: [PATCH 13/15] Update dependency @biomejs/biome to v2.3.15 (#282) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- biome.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/biome.json b/biome.json index 5bc883c4..9a90fbcc 100644 --- a/biome.json +++ b/biome.json @@ -1,5 +1,5 @@ { - "$schema": "https://biomejs.dev/schemas/2.3.14/schema.json", + "$schema": "https://biomejs.dev/schemas/2.3.15/schema.json", "files": { "ignoreUnknown": true, "includes": ["**", "!!dist/*", "!node_modules/*", "!!storage/*"] From b04b8e71f4e7849579d2175ce83648401b7c92c8 Mon Sep 17 00:00:00 2001 From: Ivan Gabaldon Date: Thu, 19 Feb 2026 15:23:15 +0100 Subject: [PATCH 14/15] Fix shared statement store cleanup (#284) --- src/database/index.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/src/database/index.ts b/src/database/index.ts index 3d1503ae..0636b244 100644 --- a/src/database/index.ts +++ b/src/database/index.ts @@ -135,7 +135,6 @@ export class Database { } public [Symbol.dispose](): void { - constantStoreStatements.clear(); this.database.close(); } } From bf3fe8ecf0cea34cc787004e2f2168aa00e78c48 Mon Sep 17 00:00:00 2001 From: Ivan Gabaldon Date: Thu, 19 Feb 2026 15:51:45 +0100 Subject: [PATCH 15/15] Tidy deps (#285) --- .dockerignore | 4 +- .gitattributes | 4 +- .gitignore | 4 +- biome.json | 12 +- deno.json | 13 +- deno.lock | 153 +++++++++--------- lib/deno-rolldown/{mod.ts => mod.mts} | 3 +- mise.toml | 6 +- package.json | 4 - rolldown.config.ts => rolldown.config.mts | 15 +- src/database/{index.ts => index.mts} | 14 +- src/database/{migration.ts => migration.mts} | 8 +- src/database/{query.ts => query.mts} | 10 +- .../document/v1/{delete.ts => delete.mts} | 21 ++- src/endpoints/document/v1/{get.ts => get.mts} | 16 +- .../document/v1/{index.ts => index.mts} | 12 +- .../document/v1/{list.ts => list.mts} | 10 +- .../document/v1/{patch.ts => patch.mts} | 22 +-- .../document/v1/{post.ts => post.mts} | 22 +-- .../{access.route.ts => access.route.mts} | 14 +- ...accessRaw.route.ts => accessRaw.route.mts} | 14 +- .../{edit.route.ts => edit.route.mts} | 16 +- .../{exists.route.ts => exists.route.mts} | 10 +- .../v2/documents/{index.ts => index.mts} | 14 +- .../{publish.route.ts => publish.route.mts} | 20 +-- .../{remove.route.ts => remove.route.mts} | 12 +- .../user/v1/{create.ts => create.mts} | 12 +- src/endpoints/user/v1/{index.ts => index.mts} | 4 +- src/{global.ts => global.mts} | 2 +- src/http/{handler.ts => handler.mts} | 12 +- src/http/{index.ts => index.mts} | 6 +- .../{authorization.ts => authorization.mts} | 10 +- .../{bodyStream.ts => bodyStream.mts} | 6 +- src/{index.ts => index.mts} | 2 +- src/{init.ts => init.mts} | 16 +- src/{task.ts => task.mts} | 4 +- src/tasks/{sweeper.ts => sweeper.mts} | 10 +- src/utils/{console.ts => console.mts} | 2 +- .../{console.test.ts => console.test.mts} | 2 +- src/utils/{crypto.ts => crypto.mts} | 2 +- src/utils/{document.ts => document.mts} | 2 +- src/utils/{env.ts => env.mts} | 4 +- src/utils/{error.ts => error.mts} | 0 src/utils/{fs.ts => fs.mts} | 12 +- src/utils/{humanize.ts => humanize.mts} | 0 .../{humanize.test.ts => humanize.test.mts} | 2 +- src/utils/{regex.ts => regex.mts} | 0 src/utils/{user.ts => user.mts} | 2 +- .../validator/{document.ts => document.mts} | 6 +- .../validator/{handler.ts => handler.mts} | 2 +- src/utils/validator/{shared.ts => shared.mts} | 0 src/utils/validator/{user.ts => user.mts} | 4 +- 52 files changed, 285 insertions(+), 292 deletions(-) rename lib/deno-rolldown/{mod.ts => mod.mts} (99%) delete mode 100644 package.json rename rolldown.config.ts => rolldown.config.mts (60%) rename src/database/{index.ts => index.mts} (92%) rename src/database/{migration.ts => migration.mts} (93%) rename src/database/{query.ts => query.mts} (94%) rename src/endpoints/document/v1/{delete.ts => delete.mts} (76%) rename src/endpoints/document/v1/{get.ts => get.mts} (90%) rename src/endpoints/document/v1/{index.ts => index.mts} (56%) rename src/endpoints/document/v1/{list.ts => list.mts} (87%) rename src/endpoints/document/v1/{patch.ts => patch.mts} (87%) rename src/endpoints/document/v1/{post.ts => post.mts} (84%) rename src/endpoints/legacy/v2/documents/{access.route.ts => access.route.mts} (89%) rename src/endpoints/legacy/v2/documents/{accessRaw.route.ts => accessRaw.route.mts} (89%) rename src/endpoints/legacy/v2/documents/{edit.route.ts => edit.route.mts} (84%) rename src/endpoints/legacy/v2/documents/{exists.route.ts => exists.route.mts} (84%) rename src/endpoints/legacy/v2/documents/{index.ts => index.mts} (54%) rename src/endpoints/legacy/v2/documents/{publish.route.ts => publish.route.mts} (86%) rename src/endpoints/legacy/v2/documents/{remove.route.ts => remove.route.mts} (85%) rename src/endpoints/user/v1/{create.ts => create.mts} (79%) rename src/endpoints/user/v1/{index.ts => index.mts} (58%) rename src/{global.ts => global.mts} (97%) rename src/http/{handler.ts => handler.mts} (94%) rename src/http/{index.ts => index.mts} (87%) rename src/http/middleware/{authorization.ts => authorization.mts} (84%) rename src/http/middleware/{bodyStream.ts => bodyStream.mts} (94%) rename src/{index.ts => index.mts} (85%) rename src/{init.ts => init.mts} (87%) rename src/{task.ts => task.mts} (91%) rename src/tasks/{sweeper.ts => sweeper.mts} (91%) rename src/utils/{console.ts => console.mts} (98%) rename src/utils/{console.test.ts => console.test.mts} (92%) rename src/utils/{crypto.ts => crypto.mts} (95%) rename src/utils/{document.ts => document.mts} (97%) rename src/utils/{env.ts => env.mts} (95%) rename src/utils/{error.ts => error.mts} (100%) rename src/utils/{fs.ts => fs.mts} (93%) rename src/utils/{humanize.ts => humanize.mts} (100%) rename src/utils/{humanize.test.ts => humanize.test.mts} (96%) rename src/utils/{regex.ts => regex.mts} (100%) rename src/utils/{user.ts => user.mts} (71%) rename src/utils/validator/{document.ts => document.mts} (95%) rename src/utils/validator/{handler.ts => handler.mts} (78%) rename src/utils/validator/{shared.ts => shared.mts} (100%) rename src/utils/validator/{user.ts => user.mts} (91%) diff --git a/.dockerignore b/.dockerignore index 6c9d86bd..3e86da7c 100644 --- a/.dockerignore +++ b/.dockerignore @@ -8,5 +8,5 @@ !/LICENSE !/mise.toml !/package.json -!/rolldown.config.ts -!/tsconfig.json \ No newline at end of file +!/rolldown.config.mts +!/tsconfig.json diff --git a/.gitattributes b/.gitattributes index 1124d9d0..72e6cc1e 100644 --- a/.gitattributes +++ b/.gitattributes @@ -36,6 +36,8 @@ *.styl text *.tag text *.ts text +*.mts text +*.cts text *.tsx text *.xml text *.xhtml text diff=html @@ -193,4 +195,4 @@ Procfile text *.*ignore text # Prevents massive diffs from built files -dist/* binary \ No newline at end of file +dist/* binary diff --git a/.gitignore b/.gitignore index e1a4075e..8840d0f0 100644 --- a/.gitignore +++ b/.gitignore @@ -24,5 +24,5 @@ !/mise.toml !/package.json !/README.md -!/rolldown.config.ts -!/tsconfig.json \ No newline at end of file +!/rolldown.config.mts +!/tsconfig.json diff --git a/biome.json b/biome.json index 9a90fbcc..4cbd1920 100644 --- a/biome.json +++ b/biome.json @@ -1,5 +1,5 @@ { - "$schema": "https://biomejs.dev/schemas/2.3.15/schema.json", + "$schema": "https://biomejs.dev/schemas/2.4.2/schema.json", "files": { "ignoreUnknown": true, "includes": ["**", "!!dist/*", "!node_modules/*", "!!storage/*"] @@ -31,6 +31,8 @@ "complexity": { "noForEach": "error", "noImplicitCoercions": "error", + "noUselessCatchBinding": "warn", + "noUselessUndefined": "warn", "useSimplifiedLogicExpression": "error" }, "correctness": { @@ -41,11 +43,9 @@ }, "nursery": { "noContinue": "warn", - "noDeprecatedImports": "warn", "noEqualsToNull": "warn", "noFloatingPromises": "warn", "noForIn": "warn", - "noImportCycles": "warn", "noIncrementDecrement": "warn", "noMisusedPromises": "warn", "noMultiAssign": "warn", @@ -53,8 +53,6 @@ "noParametersOnlyUsedInRecursion": "warn", "noRedundantDefaultExport": "warn", "noReturnAssign": "warn", - "noUselessCatchBinding": "warn", - "noUselessUndefined": "warn", "useAwaitThenable": "off", "useConsistentEnumValueType": "warn", "useDestructuring": "warn", @@ -142,11 +140,13 @@ "useUnifiedTypeSignatures": "error" }, "suspicious": { - "noConsole": "error", "noAlert": "error", + "noConsole": "error", "noConstantBinaryExpressions": "error", + "noDeprecatedImports": "warn", "noEmptyBlockStatements": "error", "noEvolvingTypes": "error", + "noImportCycles": "warn", "noUnassignedVariables": "error", "noVar": "error", "useNumberToFixedDigitsArgument": "error", diff --git a/deno.json b/deno.json index 65634ea0..f0d673c4 100644 --- a/deno.json +++ b/deno.json @@ -13,7 +13,7 @@ "#http/": "./src/http/", "#task/": "./src/tasks/", "#util/": "./src/utils/", - "@deno/loader": "jsr:@deno/loader@~0.3.11", + "@deno/loader": "jsr:@deno/loader@~0.3.12", "@hono/openapi": "npm:hono-openapi@^1.2.0", "@hono/standard-validator": "jsr:@hono/standard-validator@~0.2.2", "@std/assert": "jsr:@std/assert@^1.0.18", @@ -27,15 +27,14 @@ "@std/path": "jsr:@std/path@^1.1.4", "@std/streams": "jsr:@std/streams@^1.0.17", "@std/ulid": "jsr:@std/ulid@^1.0.0", - "@types/node": "npm:@types/node@^25.2.0", - "arkenv": "npm:arkenv@~0.9.2", + "@types/node": "npm:@types/node@^25.3.0", + "arkenv": "npm:arkenv@~0.9.3", "arktype": "npm:arktype@^2.1.29", - "biome": "npm:@biomejs/biome@2.3.14", + "biome": "npm:@biomejs/biome@2.4.2", "hash-wasm": "npm:hash-wasm@^4.12.0", - "hono": "jsr:@hono/hono@^4.11.7", + "hono": "jsr:@hono/hono@^4.12.0", "nanoid": "jsr:@sitnik/nanoid@^5.1.5", - "rolldown": "npm:rolldown@1.0.0-rc.2", - "vite-bundle-analyzer": "npm:vite-bundle-analyzer@^1.3.5" + "rolldown": "npm:rolldown@1.0.0-rc.5" }, "fmt": { "exclude": ["**"] diff --git a/deno.lock b/deno.lock index 72b3713c..b9bf8be9 100644 --- a/deno.lock +++ b/deno.lock @@ -1,9 +1,9 @@ { "version": "5", "specifiers": { - "jsr:@deno/loader@~0.3.11": "0.3.11", - "jsr:@hono/hono@^4.11.7": "4.11.7", - "jsr:@hono/hono@^4.8.3": "4.11.7", + "jsr:@deno/loader@~0.3.12": "0.3.12", + "jsr:@hono/hono@^4.12.0": "4.12.0", + "jsr:@hono/hono@^4.8.3": "4.12.0", "jsr:@hono/standard-validator@~0.2.2": "0.2.2", "jsr:@sitnik/nanoid@^5.1.5": "5.1.5", "jsr:@standard-schema/spec@1": "1.1.0", @@ -20,21 +20,20 @@ "jsr:@std/path@^1.1.4": "1.1.4", "jsr:@std/streams@^1.0.17": "1.0.17", "jsr:@std/ulid@1": "1.0.0", - "npm:@biomejs/biome@2.3.14": "2.3.14", - "npm:@types/node@^25.2.0": "25.2.0", - "npm:arkenv@~0.9.2": "0.9.2_arktype@2.1.29", + "npm:@biomejs/biome@2.4.2": "2.4.2", + "npm:@types/node@^25.3.0": "25.3.0", + "npm:arkenv@~0.9.3": "0.9.3_arktype@2.1.29", "npm:arktype@^2.1.29": "2.1.29", "npm:hash-wasm@^4.12.0": "4.12.0", "npm:hono-openapi@^1.2.0": "1.2.0_@standard-community+standard-json@0.3.5__@standard-schema+spec@1.1.0__@types+json-schema@7.0.15__arktype@2.1.29__quansync@0.2.11_@standard-community+standard-openapi@0.2.9__@standard-community+standard-json@0.3.5___@standard-schema+spec@1.1.0___@types+json-schema@7.0.15___arktype@2.1.29___quansync@0.2.11__@standard-schema+spec@1.1.0__arktype@2.1.29__openapi-types@12.1.3__@types+json-schema@7.0.15_@types+json-schema@7.0.15_openapi-types@12.1.3_arktype@2.1.29", - "npm:rolldown@1.0.0-rc.2": "1.0.0-rc.2", - "npm:vite-bundle-analyzer@^1.3.5": "1.3.5" + "npm:rolldown@1.0.0-rc.5": "1.0.0-rc.5" }, "jsr": { - "@deno/loader@0.3.11": { - "integrity": "7c62f4f09cdfc34e66ba25b5a775a1830cbb5266b3e39f67b0f620c75484df8d" + "@deno/loader@0.3.12": { + "integrity": "52d3b3be0a32192efe07b0a4f1b3047077d2f2bba0f693e32f47421507f9fdb6" }, - "@hono/hono@4.11.7": { - "integrity": "2a0dc00088fbef98b76f575e3c4ab3d2c770d5e6095be215ae05c2aef25b363a" + "@hono/hono@4.12.0": { + "integrity": "a09c74c4a15539f159ea386b5804fd88d984805aa74e4d847a136ba42487412b" }, "@hono/standard-validator@0.2.2": { "integrity": "bc94e1ab41d677a571cb6dd5012823f1162b9856ca24dfd60233734824bb0b0c", @@ -112,8 +111,8 @@ "@ark/util@0.56.0": { "integrity": "sha512-BghfRC8b9pNs3vBoDJhcta0/c1J1rsoS1+HgVUreMFPdhz/CRAKReAu57YEllNaSy98rWAdY1gE+gFup7OXpgA==" }, - "@biomejs/biome@2.3.14": { - "integrity": "sha512-QMT6QviX0WqXJCaiqVMiBUCr5WRQ1iFSjvOLoTk6auKukJMvnMzWucXpwZB0e8F00/1/BsS9DzcKgWH+CLqVuA==", + "@biomejs/biome@2.4.2": { + "integrity": "sha512-vVE/FqLxNLbvYnFDYg3Xfrh1UdFhmPT5i+yPT9GE2nTUgI4rkqo5krw5wK19YHBd7aE7J6r91RRmb8RWwkjy6w==", "optionalDependencies": [ "@biomejs/cli-darwin-arm64", "@biomejs/cli-darwin-x64", @@ -126,43 +125,43 @@ ], "bin": true }, - "@biomejs/cli-darwin-arm64@2.3.14": { - "integrity": "sha512-UJGPpvWJMkLxSRtpCAKfKh41Q4JJXisvxZL8ChN1eNW3m/WlPFJ6EFDCE7YfUb4XS8ZFi3C1dFpxUJ0Ety5n+A==", + "@biomejs/cli-darwin-arm64@2.4.2": { + "integrity": "sha512-3pEcKCP/1POKyaZZhXcxFl3+d9njmeAihZ17k8lL/1vk+6e0Cbf0yPzKItFiT+5Yh6TQA4uKvnlqe0oVZwRxCA==", "os": ["darwin"], "cpu": ["arm64"] }, - "@biomejs/cli-darwin-x64@2.3.14": { - "integrity": "sha512-PNkLNQG6RLo8lG7QoWe/hhnMxJIt1tEimoXpGQjwS/dkdNiKBLPv4RpeQl8o3s1OKI3ZOR5XPiYtmbGGHAOnLA==", + "@biomejs/cli-darwin-x64@2.4.2": { + "integrity": "sha512-P7hK1jLVny+0R9UwyGcECxO6sjETxfPyBm/1dmFjnDOHgdDPjPqozByunrwh4xPKld8sxOr5eAsSqal5uKgeBg==", "os": ["darwin"], "cpu": ["x64"] }, - "@biomejs/cli-linux-arm64-musl@2.3.14": { - "integrity": "sha512-LInRbXhYujtL3sH2TMCH/UBwJZsoGwfQjBrMfl84CD4hL/41C/EU5mldqf1yoFpsI0iPWuU83U+nB2TUUypWeg==", + "@biomejs/cli-linux-arm64-musl@2.4.2": { + "integrity": "sha512-/x04YK9+7erw6tYEcJv9WXoBHcULI/wMOvNdAyE9S3JStZZ9yJyV67sWAI+90UHuDo/BDhq0d96LDqGlSVv7WA==", "os": ["linux"], "cpu": ["arm64"] }, - "@biomejs/cli-linux-arm64@2.3.14": { - "integrity": "sha512-KT67FKfzIw6DNnUNdYlBg+eU24Go3n75GWK6NwU4+yJmDYFe9i/MjiI+U/iEzKvo0g7G7MZqoyrhIYuND2w8QQ==", + "@biomejs/cli-linux-arm64@2.4.2": { + "integrity": "sha512-DI3Mi7GT2zYNgUTDEbSjl3e1KhoP76OjQdm8JpvZYZWtVDRyLd3w8llSr2TWk1z+U3P44kUBWY3X7H9MD1/DGQ==", "os": ["linux"], "cpu": ["arm64"] }, - "@biomejs/cli-linux-x64-musl@2.3.14": { - "integrity": "sha512-KQU7EkbBBuHPW3/rAcoiVmhlPtDSGOGRPv9js7qJVpYTzjQmVR+C9Rfcz+ti8YCH+zT1J52tuBybtP4IodjxZQ==", + "@biomejs/cli-linux-x64-musl@2.4.2": { + "integrity": "sha512-wbBmTkeAoAYbOQ33f6sfKG7pcRSydQiF+dTYOBjJsnXO2mWEOQHllKlC2YVnedqZFERp2WZhFUoO7TNRwnwEHQ==", "os": ["linux"], "cpu": ["x64"] }, - "@biomejs/cli-linux-x64@2.3.14": { - "integrity": "sha512-ZsZzQsl9U+wxFrGGS4f6UxREUlgHwmEfu1IrXlgNFrNnd5Th6lIJr8KmSzu/+meSa9f4rzFrbEW9LBBA6ScoMA==", + "@biomejs/cli-linux-x64@2.4.2": { + "integrity": "sha512-GK2ErnrKpWFigYP68cXiCHK4RTL4IUWhK92AFS3U28X/nuAL5+hTuy6hyobc8JZRSt+upXt1nXChK+tuHHx4mA==", "os": ["linux"], "cpu": ["x64"] }, - "@biomejs/cli-win32-arm64@2.3.14": { - "integrity": "sha512-+IKYkj/pUBbnRf1G1+RlyA3LWiDgra1xpS7H2g4BuOzzRbRB+hmlw0yFsLprHhbbt7jUzbzAbAjK/Pn0FDnh1A==", + "@biomejs/cli-win32-arm64@2.4.2": { + "integrity": "sha512-k2uqwLYrNNxnaoiW3RJxoMGnbKda8FuCmtYG3cOtVljs3CzWxaTR+AoXwKGHscC9thax9R4kOrtWqWN0+KdPTw==", "os": ["win32"], "cpu": ["arm64"] }, - "@biomejs/cli-win32-x64@2.3.14": { - "integrity": "sha512-oizCjdyQ3WJEswpb3Chdngeat56rIdSYK12JI3iI11Mt5T5EXcZ7WLuowzEaFPNJ3zmOQFliMN8QY1Pi+qsfdQ==", + "@biomejs/cli-win32-x64@2.4.2": { + "integrity": "sha512-9ma7C4g8Sq3cBlRJD2yrsHXB1mnnEBdpy7PhvFrylQWQb4PoyCmPucdX7frvsSBQuFtIiKCrolPl/8tCZrKvgQ==", "os": ["win32"], "cpu": ["x64"] }, @@ -193,78 +192,78 @@ "@tybys/wasm-util" ] }, - "@oxc-project/types@0.111.0": { - "integrity": "sha512-bh54LJMafgRGl2cPQ/QM+tI5rWaShm/wK9KywEj/w36MhiPKXYM67H2y3q+9pr4YO7ufwg2AKdBAZkhHBD8ClA==" + "@oxc-project/types@0.114.0": { + "integrity": "sha512-//nBfbzHQHvJs8oFIjv6coZ6uxQ4alLfiPe6D5vit6c4pmxATHHlVwgB1k+Hv4yoAMyncdxgRBF5K4BYWUCzvA==" }, - "@rolldown/binding-android-arm64@1.0.0-rc.2": { - "integrity": "sha512-AGV80viZ4Hil4C16GFH+PSwq10jclV9oyRFhD+5HdowPOCJ+G+99N5AClQvMkUMIahTY8cX0SQpKEEWcCg6fSA==", + "@rolldown/binding-android-arm64@1.0.0-rc.5": { + "integrity": "sha512-zCEmUrt1bggwgBgeKLxNj217J1OrChrp3jJt24VK9jAharSTeVaHODNL+LpcQVhRz+FktYWfT9cjo5oZ99ZLpg==", "os": ["android"], "cpu": ["arm64"] }, - "@rolldown/binding-darwin-arm64@1.0.0-rc.2": { - "integrity": "sha512-PYR+PQu1mMmQiiKHN2JiOctvH32Xc/Mf+Su2RSmWtC9BbIqlqsVWjbulnShk0imjRim0IsbkMMCN5vYQwiuqaA==", + "@rolldown/binding-darwin-arm64@1.0.0-rc.5": { + "integrity": "sha512-ZP9xb9lPAex36pvkNWCjSEJW/Gfdm9I3ssiqOFLmpZ/vosPXgpoGxCmh+dX1Qs+/bWQE6toNFXWWL8vYoKoK9Q==", "os": ["darwin"], "cpu": ["arm64"] }, - "@rolldown/binding-darwin-x64@1.0.0-rc.2": { - "integrity": "sha512-X2G36Z6oh5ynoYpE2JAyG+uQ4kO/3N7XydM/I98FNk8VVgDKjajFF+v7TXJ2FMq6xa7Xm0UIUKHW2MRQroqoUA==", + "@rolldown/binding-darwin-x64@1.0.0-rc.5": { + "integrity": "sha512-7IdrPunf6dp9mywMgTOKMMGDnMHQ6+h5gRl6LW8rhD8WK2kXX0IwzcM5Zc0B5J7xQs8QWOlKjv8BJsU/1CD3pg==", "os": ["darwin"], "cpu": ["x64"] }, - "@rolldown/binding-freebsd-x64@1.0.0-rc.2": { - "integrity": "sha512-XpiFTsl9qjiDfrmJF6CE3dgj1nmSbxUIT+p2HIbXV6WOj/32btO8FKkWSsOphUwVinEt3R8HVkVrcLtFNruMMQ==", + "@rolldown/binding-freebsd-x64@1.0.0-rc.5": { + "integrity": "sha512-o/JCk+dL0IN68EBhZ4DqfsfvxPfMeoM6cJtxORC1YYoxGHZyth2Kb2maXDb4oddw2wu8iIbnYXYPEzBtAF5CAg==", "os": ["freebsd"], "cpu": ["x64"] }, - "@rolldown/binding-linux-arm-gnueabihf@1.0.0-rc.2": { - "integrity": "sha512-zjYZ99e47Wlygs4hW+sQ+kshlO8ake9OoY2ecnJ9cwpDGiiIB9rQ3LgP3kt8j6IeVyMSksu//VEhc8Mrd1lRIw==", + "@rolldown/binding-linux-arm-gnueabihf@1.0.0-rc.5": { + "integrity": "sha512-IIBwTtA6VwxQLcEgq2mfrUgam7VvPZjhd/jxmeS1npM+edWsrrpRLHUdze+sk4rhb8/xpP3flemgcZXXUW6ukw==", "os": ["linux"], "cpu": ["arm"] }, - "@rolldown/binding-linux-arm64-gnu@1.0.0-rc.2": { - "integrity": "sha512-Piso04EZ9IHV1aZSsLQVMOPTiCq4Ps2UPL3pchjNXHGJGFiB9U42s22LubPaEBFS+i6tCawS5EarIwex1zC4BA==", + "@rolldown/binding-linux-arm64-gnu@1.0.0-rc.5": { + "integrity": "sha512-KSol1De1spMZL+Xg7K5IBWXIvRWv7+pveaxFWXpezezAG7CS6ojzRjtCGCiLxQricutTAi/LkNWKMsd2wNhMKQ==", "os": ["linux"], "cpu": ["arm64"] }, - "@rolldown/binding-linux-arm64-musl@1.0.0-rc.2": { - "integrity": "sha512-OwJCeMZlmjKsN9pfJfTmqYpe3JC+L6RO87+hu9ajRLr1Lh6cM2FRQ8e48DLRyRDww8Ti695XQvqEANEMmsuzLw==", + "@rolldown/binding-linux-arm64-musl@1.0.0-rc.5": { + "integrity": "sha512-WFljyDkxtXRlWxMjxeegf7xMYXxUr8u7JdXlOEWKYgDqEgxUnSEsVDxBiNWQ1D5kQKwf8Wo4sVKEYPRhCdsjwA==", "os": ["linux"], "cpu": ["arm64"] }, - "@rolldown/binding-linux-x64-gnu@1.0.0-rc.2": { - "integrity": "sha512-uQqBmA8dTWbKvfqbeSsXNUssRGfdgQCc0hkGfhQN7Pf85wG2h0Fd/z2d+ykyT4YbcsjQdgEGxBNsg3v4ekOuEA==", + "@rolldown/binding-linux-x64-gnu@1.0.0-rc.5": { + "integrity": "sha512-CUlplTujmbDWp2gamvrqVKi2Or8lmngXT1WxsizJfts7JrvfGhZObciaY/+CbdbS9qNnskvwMZNEhTPrn7b+WA==", "os": ["linux"], "cpu": ["x64"] }, - "@rolldown/binding-linux-x64-musl@1.0.0-rc.2": { - "integrity": "sha512-ItZabVsICCYWHbP+jcAgNzjPAYg5GIVQp/NpqT6iOgWctaMYtobClc5m0kNtxwqfNrLXoyt998xUey4AvcxnGQ==", + "@rolldown/binding-linux-x64-musl@1.0.0-rc.5": { + "integrity": "sha512-wdf7g9NbVZCeAo2iGhsjJb7I8ZFfs6X8bumfrWg82VK+8P6AlLXwk48a1ASiJQDTS7Svq2xVzZg3sGO2aXpHRA==", "os": ["linux"], "cpu": ["x64"] }, - "@rolldown/binding-openharmony-arm64@1.0.0-rc.2": { - "integrity": "sha512-U4UYANwafcMXSUC0VqdrqTAgCo2v8T7SiuTYwVFXgia0KOl8jiv3okwCFqeZNuw/G6EWDiqhT8kK1DLgyLsxow==", + "@rolldown/binding-openharmony-arm64@1.0.0-rc.5": { + "integrity": "sha512-0CWY7ubu12nhzz+tkpHjoG3IRSTlWYe0wrfJRf4qqjqQSGtAYgoL9kwzdvlhaFdZ5ffVeyYw9qLsChcjUMEloQ==", "os": ["openharmony"], "cpu": ["arm64"] }, - "@rolldown/binding-wasm32-wasi@1.0.0-rc.2": { - "integrity": "sha512-ZIWCjQsMon4tqRoao0Vzowjwx0cmFT3kublh2nNlgeasIJMWlIGHtr0d4fPypm57Rqx4o1h4L8SweoK2q6sMGA==", + "@rolldown/binding-wasm32-wasi@1.0.0-rc.5": { + "integrity": "sha512-LztXnGzv6t2u830mnZrFLRVqT/DPJ9DL4ZTz/y93rqUVkeHjMMYIYaFj+BUthiYxbVH9dH0SZYufETspKY/NhA==", "dependencies": [ "@napi-rs/wasm-runtime" ], "cpu": ["wasm32"] }, - "@rolldown/binding-win32-arm64-msvc@1.0.0-rc.2": { - "integrity": "sha512-NIo7vwRUPEzZ4MuZGr5YbDdjJ84xdiG+YYf8ZBfTgvIsk9wM0sZamJPEXvaLkzVIHpOw5uqEHXS85Gqqb7aaqQ==", + "@rolldown/binding-win32-arm64-msvc@1.0.0-rc.5": { + "integrity": "sha512-jUct1XVeGtyjqJXEAfvdFa8xoigYZ2rge7nYEm70ppQxpfH9ze2fbIrpHmP2tNM2vL/F6Dd0CpXhpjPbC6bSxQ==", "os": ["win32"], "cpu": ["arm64"] }, - "@rolldown/binding-win32-x64-msvc@1.0.0-rc.2": { - "integrity": "sha512-bLKzyLFbvngeNPZocuLo3LILrKwCrkyMxmRXs6fZYDrvh7cyZRw9v56maDL9ipPas0OOmQK1kAKYwvTs30G21Q==", + "@rolldown/binding-win32-x64-msvc@1.0.0-rc.5": { + "integrity": "sha512-VQ8F9ld5gw29epjnVGdrx8ugiLTe8BMqmhDYy7nGbdeDo4HAt4bgdZvLbViEhg7DZyHLpiEUlO5/jPSUrIuxRQ==", "os": ["win32"], "cpu": ["x64"] }, - "@rolldown/pluginutils@1.0.0-rc.2": { - "integrity": "sha512-izyXV/v+cHiRfozX62W9htOAvwMo4/bXKDrQ+vom1L1qRuexPock/7VZDAhnpHCLNejd3NJ6hiab+tO0D44Rgw==" + "@rolldown/pluginutils@1.0.0-rc.5": { + "integrity": "sha512-RxlLX/DPoarZ9PtxVrQgZhPoor987YtKQqCo5zkjX+0S0yLJ7Vv515Wk6+xtTL67VONKJKxETWZwuZjss2idYw==" }, "@standard-community/standard-json@0.3.5_@standard-schema+spec@1.1.0_@types+json-schema@7.0.15_arktype@2.1.29_quansync@0.2.11": { "integrity": "sha512-4+ZPorwDRt47i+O7RjyuaxHRK/37QY/LmgxlGrRrSTLYoFatEOzvqIc85GTlM18SFZ5E91C+v0o/M37wZPpUHA==", @@ -302,14 +301,14 @@ "@types/json-schema@7.0.15": { "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==" }, - "@types/node@25.2.0": { - "integrity": "sha512-DZ8VwRFUNzuqJ5khrvwMXHmvPe+zGayJhr2CDNiKB1WBE1ST8Djl00D0IC4vvNmHMdj6DlbYRIaFE7WHjlDl5w==", + "@types/node@25.3.0": { + "integrity": "sha512-4K3bqJpXpqfg2XKGK9bpDTc6xO/xoUP/RBWS7AtRMug6zZFaRekiLzjVtAoZMquxoAbzBvy5nxQ7veS5eYzf8A==", "dependencies": [ "undici-types" ] }, - "arkenv@0.9.2_arktype@2.1.29": { - "integrity": "sha512-7tcnzjlfw3F0NoB0SYZDQkjf5Bu5hWvcsfOUqX7Jg0qb6DQlDyb7USsfX04XPr1MTUsQgGQ4zl80enDc7IhREQ==", + "arkenv@0.9.3_arktype@2.1.29": { + "integrity": "sha512-DFZy3a1F0ZcaL+A0ugJB8m7IN/uCSDmvCY/kUJK53Oau3EJqf0DizUgSjEYZzv1CR3b3FWXml/sk3mDqWg5+2Q==", "dependencies": [ "arktype" ], @@ -349,8 +348,8 @@ "quansync@0.2.11": { "integrity": "sha512-AifT7QEbW9Nri4tAwR5M/uzpBuqfZf+zwaEM/QkzEjj7NBuFD2rBuy0K3dE+8wltbezDV7JMA0WfnCPYRSYbXA==" }, - "rolldown@1.0.0-rc.2": { - "integrity": "sha512-1g/8Us9J8sgJGn3hZfBecX1z4U3y5KO7V/aV2U1M/9UUzLNqHA8RfFQ/NPT7HLxOIldyIgrcjaYTRvA81KhJIg==", + "rolldown@1.0.0-rc.5": { + "integrity": "sha512-0AdalTs6hNTioaCYIkAa7+xsmHBfU5hCNclZnM/lp7lGGDuUOb6N4BVNtwiomybbencDjq/waKjTImqiGCs5sw==", "dependencies": [ "@oxc-project/types", "@rolldown/pluginutils" @@ -375,19 +374,14 @@ "tslib@2.8.1": { "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==" }, - "undici-types@7.16.0": { - "integrity": "sha512-Zz+aZWSj8LE6zoxD+xrjh4VfkIG8Ya6LvYkZqtUQGJPZjYl53ypCaUwWqo7eI0x66KBGeRo+mlBEkMSeSZ38Nw==" - }, - "vite-bundle-analyzer@1.3.5": { - "integrity": "sha512-j1VL91DPLT6HDFbrNQt6NDTPB8EiNc+3/y02orltEz8UlptO67PKRn+gcdQvhMbivGOu4jCesxGpKsb80y9kGQ==", - "deprecated": true, - "bin": true + "undici-types@7.18.2": { + "integrity": "sha512-AsuCzffGHJybSaRrmr5eHr81mwJU3kjw6M+uprWvCXiNeN9SOGwQ3Jn8jb8m3Z6izVgknn1R0FTCEAP2QrLY/w==" } }, "workspace": { "dependencies": [ - "jsr:@deno/loader@~0.3.11", - "jsr:@hono/hono@^4.11.7", + "jsr:@deno/loader@~0.3.12", + "jsr:@hono/hono@^4.12.0", "jsr:@hono/standard-validator@~0.2.2", "jsr:@sitnik/nanoid@^5.1.5", "jsr:@std/assert@^1.0.18", @@ -401,14 +395,13 @@ "jsr:@std/path@^1.1.4", "jsr:@std/streams@^1.0.17", "jsr:@std/ulid@1", - "npm:@biomejs/biome@2.3.14", - "npm:@types/node@^25.2.0", - "npm:arkenv@~0.9.2", + "npm:@biomejs/biome@2.4.2", + "npm:@types/node@^25.3.0", + "npm:arkenv@~0.9.3", "npm:arktype@^2.1.29", "npm:hash-wasm@^4.12.0", "npm:hono-openapi@^1.2.0", - "npm:rolldown@1.0.0-rc.2", - "npm:vite-bundle-analyzer@^1.3.5" + "npm:rolldown@1.0.0-rc.5" ] } } diff --git a/lib/deno-rolldown/mod.ts b/lib/deno-rolldown/mod.mts similarity index 99% rename from lib/deno-rolldown/mod.ts rename to lib/deno-rolldown/mod.mts index a6085c34..210adf9f 100644 --- a/lib/deno-rolldown/mod.ts +++ b/lib/deno-rolldown/mod.mts @@ -225,8 +225,9 @@ function mediaTypeToExtension(mediaType: MediaType): string { case MediaType.Jsx: return ".jsx"; case MediaType.TypeScript: - case MediaType.Mts: return ".ts"; + case MediaType.Mts: + return ".mts"; case MediaType.Cts: return ".cts"; case MediaType.Dts: diff --git a/mise.toml b/mise.toml index 1456c634..a4ba2f89 100644 --- a/mise.toml +++ b/mise.toml @@ -68,11 +68,11 @@ run = [ [tasks."build:server"] description = "Build server" -sources = ['src/**/*.ts', "deno.lock", 'rolldown.config.ts'] +sources = ['src/**/*.mts', "deno.lock", 'rolldown.config.mts'] outputs = ['dist/backend.js', 'dist/backend.js.map'] run = [ { task = "install" }, - "mise exec -- deno x -A rolldown -c rolldown.config.ts" + "mise exec -- deno x -A rolldown -c rolldown.config.mts" ] [tasks."build:standalone_"] @@ -180,7 +180,7 @@ alias = "dev" description = "Start devel server" run = [ { task = "install" }, - "JSPB_DEBUG_DATABASE_EPHEMERAL=true JSPB_LOG_VERBOSITY=4 mise exec -- deno run -A ./src/index.ts" + "JSPB_DEBUG_DATABASE_EPHEMERAL=true JSPB_LOG_VERBOSITY=4 mise exec -- deno run -A ./src/index.mts" ] [tasks."start:build"] diff --git a/package.json b/package.json deleted file mode 100644 index e018ade4..00000000 --- a/package.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "license": "EUPL-1.2", - "type": "module" -} diff --git a/rolldown.config.ts b/rolldown.config.mts similarity index 60% rename from rolldown.config.ts rename to rolldown.config.mts index e7f52e5c..fd516d2d 100644 --- a/rolldown.config.ts +++ b/rolldown.config.mts @@ -1,11 +1,11 @@ import type { RolldownOptions } from "rolldown"; -import { analyzer, unstableRolldownAdapter } from "vite-bundle-analyzer"; -import deno from "./lib/deno-rolldown/mod.ts"; +import { bundleAnalyzerPlugin } from "rolldown/experimental"; +import deno from "./lib/deno-rolldown/mod.mts"; const analyze = false; export default { - input: "./src/index.ts", + input: "./src/index.mts", output: { file: "./dist/backend.js", legalComments: "none", @@ -23,12 +23,9 @@ export default { }, plugins: [ deno(), - unstableRolldownAdapter( - analyzer({ - enabled: analyze, - analyzerPort: "auto", - summary: true + analyze && + bundleAnalyzerPlugin({ + fileName: "metadata.json" }) - ) ] } satisfies RolldownOptions; diff --git a/src/database/index.ts b/src/database/index.mts similarity index 92% rename from src/database/index.ts rename to src/database/index.mts index 0636b244..ed2e2874 100644 --- a/src/database/index.ts +++ b/src/database/index.mts @@ -1,12 +1,12 @@ import { DatabaseSync, type StatementSync } from "node:sqlite"; import { monotonicUlid, ulid } from "@std/ulid"; -import { Logger } from "#util/console.ts"; -import { generateHash } from "#util/crypto.ts"; -import { generateToken } from "#util/user.ts"; -import { constantPathDatabaseFile, constantStoreStatements } from "../global.ts"; -import { env } from "../utils/env.ts"; -import { migrations } from "./migration.ts"; -import { DocumentQuery, UserQuery } from "./query.ts"; +import { Logger } from "#util/console.mts"; +import { generateHash } from "#util/crypto.mts"; +import { generateToken } from "#util/user.mts"; +import { constantPathDatabaseFile, constantStoreStatements } from "../global.mts"; +import { env } from "../utils/env.mts"; +import { migrations } from "./migration.mts"; +import { DocumentQuery, UserQuery } from "./query.mts"; const log: Logger = new Logger("database"); diff --git a/src/database/migration.ts b/src/database/migration.mts similarity index 93% rename from src/database/migration.ts rename to src/database/migration.mts index ae7f5233..e6f50b3d 100644 --- a/src/database/migration.ts +++ b/src/database/migration.mts @@ -1,9 +1,9 @@ import { mapNotNullish } from "@std/collections"; import { ulid } from "@std/ulid"; -import type { Database } from "#db/index.ts"; -import { Logger } from "#util/console.ts"; -import { generateHash } from "#util/crypto.ts"; -import { mutable } from "../global.ts"; +import type { Database } from "#db/index.mts"; +import { Logger } from "#util/console.mts"; +import { generateHash } from "#util/crypto.mts"; +import { mutable } from "../global.mts"; const log: Logger = new Logger("database::migration"); diff --git a/src/database/query.ts b/src/database/query.mts similarity index 94% rename from src/database/query.ts rename to src/database/query.mts index ecb38589..4bbfb87e 100644 --- a/src/database/query.ts +++ b/src/database/query.mts @@ -1,11 +1,11 @@ import type { SQLInputValue } from "node:sqlite"; import { chunk } from "@std/collections"; import { monotonicUlid } from "@std/ulid"; -import type { Database } from "#db/index.ts"; -import { generateHash } from "#util/crypto.ts"; -import { generateToken } from "#util/user.ts"; -import { constantDatabaseMaxElements } from "../global.ts"; -import type { DocumentVersionType } from "../utils/document.ts"; +import type { Database } from "#db/index.mts"; +import { generateHash } from "#util/crypto.mts"; +import { generateToken } from "#util/user.mts"; +import { constantDatabaseMaxElements } from "../global.mts"; +import type { DocumentVersionType } from "../utils/document.mts"; export type Document = { id: string; diff --git a/src/endpoints/document/v1/delete.ts b/src/endpoints/document/v1/delete.mts similarity index 76% rename from src/endpoints/document/v1/delete.ts rename to src/endpoints/document/v1/delete.mts index 1d326427..ac73c179 100644 --- a/src/endpoints/document/v1/delete.ts +++ b/src/endpoints/document/v1/delete.mts @@ -1,14 +1,19 @@ import { describeRoute, validator } from "@hono/openapi"; import { type } from "arktype"; import { Hono } from "hono/tiny"; -import { constantHttpStatusCodes, mutable } from "#/global.ts"; -import type { Env } from "#http/handler.ts"; -import { authMiddleware } from "#http/middleware/authorization.ts"; -import { isOwner } from "#util/document.ts"; -import { errorCodeDocumentNotFound, errorCodeUserInvalidToken, errorThrow, genericErrorResponse } from "#util/error.ts"; -import { fsDelete } from "#util/fs.ts"; -import { validatorDocumentName } from "#util/validator/document.ts"; -import { validatorHandler } from "#util/validator/handler.ts"; +import { constantHttpStatusCodes, mutable } from "#/global.mts"; +import type { Env } from "#http/handler.mts"; +import { authMiddleware } from "#http/middleware/authorization.mts"; +import { isOwner } from "#util/document.mts"; +import { + errorCodeDocumentNotFound, + errorCodeUserInvalidToken, + errorThrow, + genericErrorResponse +} from "#util/error.mts"; +import { fsDelete } from "#util/fs.mts"; +import { validatorDocumentName } from "#util/validator/document.mts"; +import { validatorHandler } from "#util/validator/handler.mts"; const schemaParam = type({ name: validatorDocumentName diff --git a/src/endpoints/document/v1/get.ts b/src/endpoints/document/v1/get.mts similarity index 90% rename from src/endpoints/document/v1/get.ts rename to src/endpoints/document/v1/get.mts index 70afbdd7..5500a695 100644 --- a/src/endpoints/document/v1/get.ts +++ b/src/endpoints/document/v1/get.mts @@ -3,24 +3,24 @@ import { decodeTime } from "@std/ulid"; import { type } from "arktype"; import { stream } from "hono/streaming"; import { Hono } from "hono/tiny"; -import { constantHttpStatusCodes, mutable } from "#/global.ts"; -import type { Env } from "#http/handler.ts"; -import { verifyHash } from "#util/crypto.ts"; +import { constantHttpStatusCodes, mutable } from "#/global.mts"; +import type { Env } from "#http/handler.mts"; +import { verifyHash } from "#util/crypto.mts"; import { errorCodeDocumentInvalidPassword, errorCodeDocumentNotFound, errorCodeDocumentPasswordNeeded, errorThrow, genericErrorResponse -} from "#util/error.ts"; -import { fsRead } from "#util/fs.ts"; +} from "#util/error.mts"; +import { fsRead } from "#util/fs.mts"; import { validatorDocumentName, validatorDocumentPassword, validatorDocumentPreview -} from "#util/validator/document.ts"; -import { validatorHandler } from "#util/validator/handler.ts"; -import { validatorCreationTimestamp } from "#util/validator/shared.ts"; +} from "#util/validator/document.mts"; +import { validatorHandler } from "#util/validator/handler.mts"; +import { validatorCreationTimestamp } from "#util/validator/shared.mts"; const schemaParam = type({ name: validatorDocumentName diff --git a/src/endpoints/document/v1/index.ts b/src/endpoints/document/v1/index.mts similarity index 56% rename from src/endpoints/document/v1/index.ts rename to src/endpoints/document/v1/index.mts index e4762286..aa378b58 100644 --- a/src/endpoints/document/v1/index.ts +++ b/src/endpoints/document/v1/index.mts @@ -1,10 +1,10 @@ import { Hono } from "hono/tiny"; -import type { Env } from "#http/handler.ts"; -import delete_ from "./delete.ts"; -import get from "./get.ts"; -import list from "./list.ts"; -import patch from "./patch.ts"; -import post from "./post.ts"; +import type { Env } from "#http/handler.mts"; +import delete_ from "./delete.mts"; +import get from "./get.mts"; +import list from "./list.mts"; +import patch from "./patch.mts"; +import post from "./post.mts"; export const v1DocumentHandler = new Hono(); diff --git a/src/endpoints/document/v1/list.ts b/src/endpoints/document/v1/list.mts similarity index 87% rename from src/endpoints/document/v1/list.ts rename to src/endpoints/document/v1/list.mts index 647f7c7a..e44cfe04 100644 --- a/src/endpoints/document/v1/list.ts +++ b/src/endpoints/document/v1/list.mts @@ -1,11 +1,11 @@ import { describeRoute, resolver } from "@hono/openapi"; import { decodeTime } from "@std/ulid"; import { Hono } from "hono/tiny"; -import { constantHttpStatusCodes, mutable } from "#/global.ts"; -import type { Env } from "#http/handler.ts"; -import { authMiddleware } from "#http/middleware/authorization.ts"; -import { errorCodeUserInvalidToken, errorThrow, genericErrorResponse } from "#util/error.ts"; -import { validatorDocumentListObject } from "#util/validator/document.ts"; +import { constantHttpStatusCodes, mutable } from "#/global.mts"; +import type { Env } from "#http/handler.mts"; +import { authMiddleware } from "#http/middleware/authorization.mts"; +import { errorCodeUserInvalidToken, errorThrow, genericErrorResponse } from "#util/error.mts"; +import { validatorDocumentListObject } from "#util/validator/document.mts"; const schemaBodyResponse = await resolver(validatorDocumentListObject.array()).toOpenAPISchema(); diff --git a/src/endpoints/document/v1/patch.ts b/src/endpoints/document/v1/patch.mts similarity index 87% rename from src/endpoints/document/v1/patch.ts rename to src/endpoints/document/v1/patch.mts index fdf8dcf8..b523d200 100644 --- a/src/endpoints/document/v1/patch.ts +++ b/src/endpoints/document/v1/patch.mts @@ -1,27 +1,27 @@ import { describeRoute, resolver, validator } from "@hono/openapi"; import { type } from "arktype"; import { Hono } from "hono/tiny"; -import { constantHttpStatusCodes, mutable } from "#/global.ts"; -import type { Env } from "#http/handler.ts"; -import { authMiddleware } from "#http/middleware/authorization.ts"; -import { bodyStream } from "#http/middleware/bodyStream.ts"; -import { generateHash } from "#util/crypto.ts"; -import { isOwner } from "#util/document.ts"; -import { env } from "#util/env.ts"; +import { constantHttpStatusCodes, mutable } from "#/global.mts"; +import type { Env } from "#http/handler.mts"; +import { authMiddleware } from "#http/middleware/authorization.mts"; +import { bodyStream } from "#http/middleware/bodyStream.mts"; +import { generateHash } from "#util/crypto.mts"; +import { isOwner } from "#util/document.mts"; +import { env } from "#util/env.mts"; import { errorCodeDocumentNameAlreadyExists, errorCodeDocumentNotFound, errorCodeUserInvalidToken, errorThrow, genericErrorResponse -} from "#util/error.ts"; -import { fsWrite } from "#util/fs.ts"; +} from "#util/error.mts"; +import { fsWrite } from "#util/fs.mts"; import { validatorDocumentName, validatorDocumentPassword, validatorDocumentPasswordEmpty -} from "#util/validator/document.ts"; -import { validatorHandler } from "#util/validator/handler.ts"; +} from "#util/validator/document.mts"; +import { validatorHandler } from "#util/validator/handler.mts"; const schemaBody = await resolver( type.unknown.configure({ diff --git a/src/endpoints/document/v1/post.ts b/src/endpoints/document/v1/post.mts similarity index 84% rename from src/endpoints/document/v1/post.ts rename to src/endpoints/document/v1/post.mts index 62b6fe4c..3b73b947 100644 --- a/src/endpoints/document/v1/post.ts +++ b/src/endpoints/document/v1/post.mts @@ -2,21 +2,21 @@ import { describeRoute, resolver, validator } from "@hono/openapi"; import { monotonicUlid } from "@std/ulid"; import { type } from "arktype"; import { Hono } from "hono/tiny"; -import { constantHttpStatusCodes, mutable } from "#/global.ts"; -import type { Env } from "#http/handler.ts"; -import { authMiddleware } from "#http/middleware/authorization.ts"; -import { bodyStream } from "#http/middleware/bodyStream.ts"; -import { generateHash } from "#util/crypto.ts"; -import { generateName } from "#util/document.ts"; -import { env } from "#util/env.ts"; -import { errorCodeDocumentNameAlreadyExists, errorThrow, genericErrorResponse } from "#util/error.ts"; -import { fsWrite } from "#util/fs.ts"; +import { constantHttpStatusCodes, mutable } from "#/global.mts"; +import type { Env } from "#http/handler.mts"; +import { authMiddleware } from "#http/middleware/authorization.mts"; +import { bodyStream } from "#http/middleware/bodyStream.mts"; +import { generateHash } from "#util/crypto.mts"; +import { generateName } from "#util/document.mts"; +import { env } from "#util/env.mts"; +import { errorCodeDocumentNameAlreadyExists, errorThrow, genericErrorResponse } from "#util/error.mts"; +import { fsWrite } from "#util/fs.mts"; import { validatorDocumentName, validatorDocumentNameLength, validatorDocumentPassword -} from "#util/validator/document.ts"; -import { validatorHandler } from "#util/validator/handler.ts"; +} from "#util/validator/document.mts"; +import { validatorHandler } from "#util/validator/handler.mts"; const schemaBody = await resolver( type.unknown.configure({ diff --git a/src/endpoints/legacy/v2/documents/access.route.ts b/src/endpoints/legacy/v2/documents/access.route.mts similarity index 89% rename from src/endpoints/legacy/v2/documents/access.route.ts rename to src/endpoints/legacy/v2/documents/access.route.mts index 57e510da..8b779379 100644 --- a/src/endpoints/legacy/v2/documents/access.route.ts +++ b/src/endpoints/legacy/v2/documents/access.route.mts @@ -2,19 +2,19 @@ import { describeRoute, resolver, validator } from "@hono/openapi"; import { toText } from "@std/streams"; import { type } from "arktype"; import { Hono } from "hono/tiny"; -import { constantHttpStatusCodes, mutable } from "#/global.ts"; -import type { Env } from "#http/handler.ts"; -import { verifyHash } from "#util/crypto.ts"; +import { constantHttpStatusCodes, mutable } from "#/global.mts"; +import type { Env } from "#http/handler.mts"; +import { verifyHash } from "#util/crypto.mts"; import { errorCodeDocumentInvalidPassword, errorCodeDocumentNotFound, errorCodeDocumentPasswordNeeded, errorThrow, genericErrorResponse -} from "#util/error.ts"; -import { fsRead } from "#util/fs.ts"; -import { validatorDocumentName, validatorDocumentPassword } from "#util/validator/document.ts"; -import { validatorHandler } from "#util/validator/handler.ts"; +} from "#util/error.mts"; +import { fsRead } from "#util/fs.mts"; +import { validatorDocumentName, validatorDocumentPassword } from "#util/validator/document.mts"; +import { validatorHandler } from "#util/validator/handler.mts"; const schemaParam = type({ name: validatorDocumentName diff --git a/src/endpoints/legacy/v2/documents/accessRaw.route.ts b/src/endpoints/legacy/v2/documents/accessRaw.route.mts similarity index 89% rename from src/endpoints/legacy/v2/documents/accessRaw.route.ts rename to src/endpoints/legacy/v2/documents/accessRaw.route.mts index d2ec7076..7c244eaf 100644 --- a/src/endpoints/legacy/v2/documents/accessRaw.route.ts +++ b/src/endpoints/legacy/v2/documents/accessRaw.route.mts @@ -2,19 +2,19 @@ import { describeRoute, resolver, validator } from "@hono/openapi"; import { type } from "arktype"; import { stream } from "hono/streaming"; import { Hono } from "hono/tiny"; -import { constantHttpStatusCodes, mutable } from "#/global.ts"; -import type { Env } from "#http/handler.ts"; -import { verifyHash } from "#util/crypto.ts"; +import { constantHttpStatusCodes, mutable } from "#/global.mts"; +import type { Env } from "#http/handler.mts"; +import { verifyHash } from "#util/crypto.mts"; import { errorCodeDocumentInvalidPassword, errorCodeDocumentNotFound, errorCodeDocumentPasswordNeeded, errorThrow, genericErrorResponse -} from "#util/error.ts"; -import { fsRead } from "#util/fs.ts"; -import { validatorDocumentName, validatorDocumentPassword } from "#util/validator/document.ts"; -import { validatorHandler } from "#util/validator/handler.ts"; +} from "#util/error.mts"; +import { fsRead } from "#util/fs.mts"; +import { validatorDocumentName, validatorDocumentPassword } from "#util/validator/document.mts"; +import { validatorHandler } from "#util/validator/handler.mts"; const schemaParam = type({ name: validatorDocumentName diff --git a/src/endpoints/legacy/v2/documents/edit.route.ts b/src/endpoints/legacy/v2/documents/edit.route.mts similarity index 84% rename from src/endpoints/legacy/v2/documents/edit.route.ts rename to src/endpoints/legacy/v2/documents/edit.route.mts index cf094cf4..e51e0f52 100644 --- a/src/endpoints/legacy/v2/documents/edit.route.ts +++ b/src/endpoints/legacy/v2/documents/edit.route.mts @@ -1,14 +1,14 @@ import { describeRoute, resolver, validator } from "@hono/openapi"; import { type } from "arktype"; import { Hono } from "hono/tiny"; -import { constantHttpStatusCodes, mutable } from "#/global.ts"; -import type { Env } from "#http/handler.ts"; -import { bodyStream } from "#http/middleware/bodyStream.ts"; -import { env } from "#util/env.ts"; -import { errorCodeDocumentNotFound, errorThrow, genericErrorResponse } from "#util/error.ts"; -import { fsWrite } from "#util/fs.ts"; -import { validatorDocumentName } from "#util/validator/document.ts"; -import { validatorHandler } from "#util/validator/handler.ts"; +import { constantHttpStatusCodes, mutable } from "#/global.mts"; +import type { Env } from "#http/handler.mts"; +import { bodyStream } from "#http/middleware/bodyStream.mts"; +import { env } from "#util/env.mts"; +import { errorCodeDocumentNotFound, errorThrow, genericErrorResponse } from "#util/error.mts"; +import { fsWrite } from "#util/fs.mts"; +import { validatorDocumentName } from "#util/validator/document.mts"; +import { validatorHandler } from "#util/validator/handler.mts"; const schemaParam = type({ name: validatorDocumentName diff --git a/src/endpoints/legacy/v2/documents/exists.route.ts b/src/endpoints/legacy/v2/documents/exists.route.mts similarity index 84% rename from src/endpoints/legacy/v2/documents/exists.route.ts rename to src/endpoints/legacy/v2/documents/exists.route.mts index 0eb100d5..d4d28ecc 100644 --- a/src/endpoints/legacy/v2/documents/exists.route.ts +++ b/src/endpoints/legacy/v2/documents/exists.route.mts @@ -1,11 +1,11 @@ import { describeRoute, resolver, validator } from "@hono/openapi"; import { type } from "arktype"; import { Hono } from "hono/tiny"; -import { constantHttpStatusCodes, mutable } from "#/global.ts"; -import type { Env } from "#http/handler.ts"; -import { genericErrorResponse } from "#util/error.ts"; -import { validatorDocumentName } from "#util/validator/document.ts"; -import { validatorHandler } from "#util/validator/handler.ts"; +import { constantHttpStatusCodes, mutable } from "#/global.mts"; +import type { Env } from "#http/handler.mts"; +import { genericErrorResponse } from "#util/error.mts"; +import { validatorDocumentName } from "#util/validator/document.mts"; +import { validatorHandler } from "#util/validator/handler.mts"; const schemaParam = type({ name: validatorDocumentName diff --git a/src/endpoints/legacy/v2/documents/index.ts b/src/endpoints/legacy/v2/documents/index.mts similarity index 54% rename from src/endpoints/legacy/v2/documents/index.ts rename to src/endpoints/legacy/v2/documents/index.mts index 67ee636a..d26bb2d9 100644 --- a/src/endpoints/legacy/v2/documents/index.ts +++ b/src/endpoints/legacy/v2/documents/index.mts @@ -1,11 +1,11 @@ import { Hono } from "hono/tiny"; -import type { Env } from "#http/handler.ts"; -import access from "./access.route.ts"; -import accessRaw from "./accessRaw.route.ts"; -import edit from "./edit.route.ts"; -import exists from "./exists.route.ts"; -import publish from "./publish.route.ts"; -import remove from "./remove.route.ts"; +import type { Env } from "#http/handler.mts"; +import access from "./access.route.mts"; +import accessRaw from "./accessRaw.route.mts"; +import edit from "./edit.route.mts"; +import exists from "./exists.route.mts"; +import publish from "./publish.route.mts"; +import remove from "./remove.route.mts"; export const v2LegacyDocumentHandler = new Hono(); diff --git a/src/endpoints/legacy/v2/documents/publish.route.ts b/src/endpoints/legacy/v2/documents/publish.route.mts similarity index 86% rename from src/endpoints/legacy/v2/documents/publish.route.ts rename to src/endpoints/legacy/v2/documents/publish.route.mts index fca4fa5f..66671bd7 100644 --- a/src/endpoints/legacy/v2/documents/publish.route.ts +++ b/src/endpoints/legacy/v2/documents/publish.route.mts @@ -7,16 +7,16 @@ import { constantDocumentNameLengthMin, constantHttpStatusCodes, mutable -} from "#/global.ts"; -import type { Env } from "#http/handler.ts"; -import { bodyStream } from "#http/middleware/bodyStream.ts"; -import { generateHash } from "#util/crypto.ts"; -import { generateName } from "#util/document.ts"; -import { env } from "#util/env.ts"; -import { errorCodeDocumentNameAlreadyExists, errorThrow, genericErrorResponse } from "#util/error.ts"; -import { fsWrite } from "#util/fs.ts"; -import { validatorDocumentName, validatorDocumentPassword } from "#util/validator/document.ts"; -import { validatorHandler } from "#util/validator/handler.ts"; +} from "#/global.mts"; +import type { Env } from "#http/handler.mts"; +import { bodyStream } from "#http/middleware/bodyStream.mts"; +import { generateHash } from "#util/crypto.mts"; +import { generateName } from "#util/document.mts"; +import { env } from "#util/env.mts"; +import { errorCodeDocumentNameAlreadyExists, errorThrow, genericErrorResponse } from "#util/error.mts"; +import { fsWrite } from "#util/fs.mts"; +import { validatorDocumentName, validatorDocumentPassword } from "#util/validator/document.mts"; +import { validatorHandler } from "#util/validator/handler.mts"; const schemaBody = await resolver( type.string.configure({ diff --git a/src/endpoints/legacy/v2/documents/remove.route.ts b/src/endpoints/legacy/v2/documents/remove.route.mts similarity index 85% rename from src/endpoints/legacy/v2/documents/remove.route.ts rename to src/endpoints/legacy/v2/documents/remove.route.mts index d3bb0235..66b3b357 100644 --- a/src/endpoints/legacy/v2/documents/remove.route.ts +++ b/src/endpoints/legacy/v2/documents/remove.route.mts @@ -1,12 +1,12 @@ import { describeRoute, resolver, validator } from "@hono/openapi"; import { type } from "arktype"; import { Hono } from "hono/tiny"; -import { constantHttpStatusCodes, mutable } from "#/global.ts"; -import type { Env } from "#http/handler.ts"; -import { errorCodeDocumentNotFound, errorThrow, genericErrorResponse } from "#util/error.ts"; -import { fsDelete } from "#util/fs.ts"; -import { validatorDocumentName } from "#util/validator/document.ts"; -import { validatorHandler } from "#util/validator/handler.ts"; +import { constantHttpStatusCodes, mutable } from "#/global.mts"; +import type { Env } from "#http/handler.mts"; +import { errorCodeDocumentNotFound, errorThrow, genericErrorResponse } from "#util/error.mts"; +import { fsDelete } from "#util/fs.mts"; +import { validatorDocumentName } from "#util/validator/document.mts"; +import { validatorHandler } from "#util/validator/handler.mts"; const schemaParam = type({ name: validatorDocumentName diff --git a/src/endpoints/user/v1/create.ts b/src/endpoints/user/v1/create.mts similarity index 79% rename from src/endpoints/user/v1/create.ts rename to src/endpoints/user/v1/create.mts index 6784a803..9b78d501 100644 --- a/src/endpoints/user/v1/create.ts +++ b/src/endpoints/user/v1/create.mts @@ -1,12 +1,12 @@ import { describeRoute, resolver } from "@hono/openapi"; import { type } from "arktype"; import { Hono } from "hono/tiny"; -import { constantHttpStatusCodes, mutable } from "#/global.ts"; -import type { Env } from "#http/handler.ts"; -import { authMiddleware } from "#http/middleware/authorization.ts"; -import { env } from "#util/env.ts"; -import { errorCodeUserInvalidToken, errorThrow, genericErrorResponse } from "#util/error.ts"; -import { validatorUserToken } from "#util/validator/user.ts"; +import { constantHttpStatusCodes, mutable } from "#/global.mts"; +import type { Env } from "#http/handler.mts"; +import { authMiddleware } from "#http/middleware/authorization.mts"; +import { env } from "#util/env.mts"; +import { errorCodeUserInvalidToken, errorThrow, genericErrorResponse } from "#util/error.mts"; +import { validatorUserToken } from "#util/validator/user.mts"; const schemaBodyResponse = resolver( type({ diff --git a/src/endpoints/user/v1/index.ts b/src/endpoints/user/v1/index.mts similarity index 58% rename from src/endpoints/user/v1/index.ts rename to src/endpoints/user/v1/index.mts index 91e0de65..77ec5338 100644 --- a/src/endpoints/user/v1/index.ts +++ b/src/endpoints/user/v1/index.mts @@ -1,6 +1,6 @@ import { Hono } from "hono/tiny"; -import type { Env } from "#http/handler.ts"; -import create from "./create.ts"; +import type { Env } from "#http/handler.mts"; +import create from "./create.mts"; export const v1UserHandler = new Hono(); diff --git a/src/global.ts b/src/global.mts similarity index 97% rename from src/global.ts rename to src/global.mts index e4d618e7..01170a37 100644 --- a/src/global.ts +++ b/src/global.mts @@ -3,7 +3,7 @@ import type { StatementSync } from "node:sqlite"; import { LruCache } from "@std/cache"; import type { StatusCode } from "hono/utils/http-status"; import { customAlphabet } from "nanoid"; -import type { Database } from "#db/index.ts"; +import type { Database } from "#db/index.mts"; export const mutable = { database: undefined as unknown as Database, diff --git a/src/http/handler.ts b/src/http/handler.mts similarity index 94% rename from src/http/handler.ts rename to src/http/handler.mts index 1a7951eb..f4dcf9b1 100644 --- a/src/http/handler.ts +++ b/src/http/handler.mts @@ -2,12 +2,12 @@ import { openAPIRouteHandler } from "@hono/openapi"; import { cors } from "hono/cors"; import { HTTPException } from "hono/http-exception"; import { Hono } from "hono/tiny"; -import { v1DocumentHandler } from "#endpoint/document/v1/index.ts"; -import { v2LegacyDocumentHandler } from "#endpoint/legacy/v2/documents/index.ts"; -import { v1UserHandler } from "#endpoint/user/v1/index.ts"; -import { Logger } from "#util/console.ts"; -import { env } from "../utils/env.ts"; -import { errorCodeCrash, errorCodeDocumentCorrupted, errorGet } from "../utils/error.ts"; +import { v1DocumentHandler } from "#endpoint/document/v1/index.mts"; +import { v2LegacyDocumentHandler } from "#endpoint/legacy/v2/documents/index.mts"; +import { v1UserHandler } from "#endpoint/user/v1/index.mts"; +import { Logger } from "#util/console.mts"; +import { env } from "../utils/env.mts"; +import { errorCodeCrash, errorCodeDocumentCorrupted, errorGet } from "../utils/error.mts"; const log: Logger = new Logger("http"); diff --git a/src/http/index.ts b/src/http/index.mts similarity index 87% rename from src/http/index.ts rename to src/http/index.mts index b751e230..2801caff 100644 --- a/src/http/index.ts +++ b/src/http/index.mts @@ -1,6 +1,6 @@ -import { Logger } from "#util/console.ts"; -import { env } from "../utils/env.ts"; -import { errorCodeUnknown, errorGet } from "../utils/error.ts"; +import { Logger } from "#util/console.mts"; +import { env } from "../utils/env.mts"; +import { errorCodeUnknown, errorGet } from "../utils/error.mts"; const log: Logger = new Logger("http"); diff --git a/src/http/middleware/authorization.ts b/src/http/middleware/authorization.mts similarity index 84% rename from src/http/middleware/authorization.ts rename to src/http/middleware/authorization.mts index c038e768..2a346684 100644 --- a/src/http/middleware/authorization.ts +++ b/src/http/middleware/authorization.mts @@ -1,10 +1,10 @@ import { type } from "arktype"; import { createMiddleware } from "hono/factory"; -import { mutable } from "#/global.ts"; -import { verifyHash } from "#util/crypto.ts"; -import { errorCodeUserInvalidToken, errorCodeValidation, errorThrow } from "#util/error.ts"; -import { validatorUserHeader } from "#util/validator/user.ts"; -import type { Env } from "../handler.ts"; +import { mutable } from "#/global.mts"; +import { verifyHash } from "#util/crypto.mts"; +import { errorCodeUserInvalidToken, errorCodeValidation, errorThrow } from "#util/error.mts"; +import { validatorUserHeader } from "#util/validator/user.mts"; +import type { Env } from "../handler.mts"; export const authMiddleware = createMiddleware(async (ctx, next) => { const authorization = ctx.req.header("authorization"); diff --git a/src/http/middleware/bodyStream.ts b/src/http/middleware/bodyStream.mts similarity index 94% rename from src/http/middleware/bodyStream.ts rename to src/http/middleware/bodyStream.mts index 1dfcf816..cf62e51b 100644 --- a/src/http/middleware/bodyStream.ts +++ b/src/http/middleware/bodyStream.mts @@ -1,7 +1,7 @@ import { createMiddleware } from "hono/factory"; -import { env } from "#util/env.ts"; -import { errorCodeDocumentInvalidSize, errorThrow } from "#util/error.ts"; -import type { Env } from "../handler.ts"; +import { env } from "#util/env.mts"; +import { errorCodeDocumentInvalidSize, errorThrow } from "#util/error.mts"; +import type { Env } from "../handler.mts"; export const bodyStream = createMiddleware(async (ctx, next) => { if (!ctx.req.raw.body) { diff --git a/src/index.ts b/src/index.mts similarity index 85% rename from src/index.ts rename to src/index.mts index 1bbcd836..3d34e6ae 100644 --- a/src/index.ts +++ b/src/index.mts @@ -18,4 +18,4 @@ configure({ } }); -void import("./init.ts").then(({ init }) => init()); +void import("./init.mts").then(({ init }) => init()); diff --git a/src/init.ts b/src/init.mts similarity index 87% rename from src/init.ts rename to src/init.mts index b15f293b..6f7f21de 100644 --- a/src/init.ts +++ b/src/init.mts @@ -1,13 +1,13 @@ import { abortable } from "@std/async"; import { ensureDir } from "@std/fs"; -import { Database } from "#db/index.ts"; -import { sweeper } from "#task/sweeper.ts"; -import { Logger } from "#util/console.ts"; -import { constantPathStructStorage, constantPathStructStorageData, constantStoreDispose, mutable } from "./global.ts"; -import { handler } from "./http/handler.ts"; -import { http } from "./http/index.ts"; -import { taskRegister } from "./task.ts"; -import { env } from "./utils/env.ts"; +import { Database } from "#db/index.mts"; +import { sweeper } from "#task/sweeper.mts"; +import { Logger } from "#util/console.mts"; +import { constantPathStructStorage, constantPathStructStorageData, constantStoreDispose, mutable } from "./global.mts"; +import { handler } from "./http/handler.mts"; +import { http } from "./http/index.mts"; +import { taskRegister } from "./task.mts"; +import { env } from "./utils/env.mts"; const log: Logger = new Logger(); diff --git a/src/task.ts b/src/task.mts similarity index 91% rename from src/task.ts rename to src/task.mts index a627dd5c..ff14951a 100644 --- a/src/task.ts +++ b/src/task.mts @@ -1,5 +1,5 @@ -import { Logger } from "#util/console.ts"; -import { constantStoreDispose } from "./global.ts"; +import { Logger } from "#util/console.mts"; +import { constantStoreDispose } from "./global.mts"; const log: Logger = new Logger("task"); diff --git a/src/tasks/sweeper.ts b/src/tasks/sweeper.mts similarity index 91% rename from src/tasks/sweeper.ts rename to src/tasks/sweeper.mts index 51cd030d..9cc01aa6 100644 --- a/src/tasks/sweeper.ts +++ b/src/tasks/sweeper.mts @@ -1,10 +1,10 @@ import { mapNotNullish } from "@std/collections"; import { decodeTime } from "@std/ulid"; -import { constantTemporalUTC, mutable } from "#/global.ts"; -import { Database } from "#db/index.ts"; -import { Logger } from "#util/console.ts"; -import { env } from "../utils/env.ts"; -import { fsDelete, fsList } from "../utils/fs.ts"; +import { constantTemporalUTC, mutable } from "#/global.mts"; +import { Database } from "#db/index.mts"; +import { Logger } from "#util/console.mts"; +import { env } from "../utils/env.mts"; +import { fsDelete, fsList } from "../utils/fs.mts"; const log: Logger = new Logger("task::sweeper"); diff --git a/src/utils/console.ts b/src/utils/console.mts similarity index 98% rename from src/utils/console.ts rename to src/utils/console.mts index a3d727fb..55dfca94 100644 --- a/src/utils/console.ts +++ b/src/utils/console.mts @@ -1,6 +1,6 @@ import { mapNotNullish } from "@std/collections"; import { blue, gray, red, yellow } from "@std/fmt/colors"; -import { env } from "./env.ts"; +import { env } from "./env.mts"; export class Logger { public static readonly level = { diff --git a/src/utils/console.test.ts b/src/utils/console.test.mts similarity index 92% rename from src/utils/console.test.ts rename to src/utils/console.test.mts index fda8c8c4..288493d5 100644 --- a/src/utils/console.test.ts +++ b/src/utils/console.test.mts @@ -1,4 +1,4 @@ -import { Logger } from "./console.ts"; +import { Logger } from "./console.mts"; Deno.test("Logger#", () => { const log = new Logger("test"); diff --git a/src/utils/crypto.ts b/src/utils/crypto.mts similarity index 95% rename from src/utils/crypto.ts rename to src/utils/crypto.mts index 50888a19..70500def 100644 --- a/src/utils/crypto.ts +++ b/src/utils/crypto.mts @@ -1,6 +1,6 @@ import { decodeAscii85, encodeAscii85 } from "@std/encoding"; import { createBLAKE3 } from "hash-wasm"; -import { constantTextEncoder } from "../global.ts"; +import { constantTextEncoder } from "../global.mts"; const hasher = await createBLAKE3(); diff --git a/src/utils/document.ts b/src/utils/document.mts similarity index 97% rename from src/utils/document.ts rename to src/utils/document.mts index 0cad01e7..ecf3cc0d 100644 --- a/src/utils/document.ts +++ b/src/utils/document.mts @@ -1,4 +1,4 @@ -import { constantDocumentNameLengthDefault, constantNanoid, mutable } from "#/global.ts"; +import { constantDocumentNameLengthDefault, constantNanoid, mutable } from "#/global.mts"; // deflate export const documentVersionV1 = 1; diff --git a/src/utils/env.ts b/src/utils/env.mts similarity index 95% rename from src/utils/env.ts rename to src/utils/env.mts index 8dcf8850..2b5b7089 100644 --- a/src/utils/env.ts +++ b/src/utils/env.mts @@ -1,7 +1,7 @@ import arkenv from "arkenv"; import { type } from "arktype"; -import { humanizeSize, humanizeTime } from "#util/humanize.ts"; -import { type DocumentVersionType, documentVersionV1, documentVersionV2 } from "./document.ts"; +import { humanizeSize, humanizeTime } from "#util/humanize.mts"; +import { type DocumentVersionType, documentVersionV1, documentVersionV2 } from "./document.mts"; export const env = arkenv( { diff --git a/src/utils/error.ts b/src/utils/error.mts similarity index 100% rename from src/utils/error.ts rename to src/utils/error.mts diff --git a/src/utils/fs.ts b/src/utils/fs.mts similarity index 93% rename from src/utils/fs.ts rename to src/utils/fs.mts index e9a66d59..72588321 100644 --- a/src/utils/fs.ts +++ b/src/utils/fs.mts @@ -1,10 +1,10 @@ import type { Context } from "hono"; -import type { Document } from "#db/query.ts"; -import { constantPathStructStorageData, constantTemporalToUTC, constantTemporalUTC } from "../global.ts"; -import type { Env } from "../http/handler.ts"; -import { documentVersionV1, documentVersionV2 } from "./document.ts"; -import { env } from "./env.ts"; -import { errorCodeDocumentCorrupted, errorCodeDocumentInvalidSize, errorThrow } from "./error.ts"; +import type { Document } from "#db/query.mts"; +import { constantPathStructStorageData, constantTemporalToUTC, constantTemporalUTC } from "../global.mts"; +import type { Env } from "../http/handler.mts"; +import { documentVersionV1, documentVersionV2 } from "./document.mts"; +import { env } from "./env.mts"; +import { errorCodeDocumentCorrupted, errorCodeDocumentInvalidSize, errorThrow } from "./error.mts"; export const fsWrite = async (ctx: Context, { id }: Pick): Promise => { await using handle = await Deno.open(constantPathStructStorageData + id, { diff --git a/src/utils/humanize.ts b/src/utils/humanize.mts similarity index 100% rename from src/utils/humanize.ts rename to src/utils/humanize.mts diff --git a/src/utils/humanize.test.ts b/src/utils/humanize.test.mts similarity index 96% rename from src/utils/humanize.test.ts rename to src/utils/humanize.test.mts index 527ef63f..e43739f5 100644 --- a/src/utils/humanize.test.ts +++ b/src/utils/humanize.test.mts @@ -1,5 +1,5 @@ import { assertStrictEquals, assertThrows } from "@std/assert"; -import { humanizeSize, humanizeTime } from "#util/humanize.ts"; +import { humanizeSize, humanizeTime } from "#util/humanize.mts"; Deno.test("humanizeTime", () => { const basic = humanizeTime("1d"); diff --git a/src/utils/regex.ts b/src/utils/regex.mts similarity index 100% rename from src/utils/regex.ts rename to src/utils/regex.mts diff --git a/src/utils/user.ts b/src/utils/user.mts similarity index 71% rename from src/utils/user.ts rename to src/utils/user.mts index d0f63093..6611504b 100644 --- a/src/utils/user.ts +++ b/src/utils/user.mts @@ -1,4 +1,4 @@ -import { constantNanoid } from "../global.ts"; +import { constantNanoid } from "../global.mts"; export const generateToken = (id: string): string => { const noise = constantNanoid(32); diff --git a/src/utils/validator/document.ts b/src/utils/validator/document.mts similarity index 95% rename from src/utils/validator/document.ts rename to src/utils/validator/document.mts index f5a2c060..109a5a90 100644 --- a/src/utils/validator/document.ts +++ b/src/utils/validator/document.mts @@ -4,9 +4,9 @@ import { constantDocumentNameLengthMin, constantDocumentPasswordLengthMax, constantDocumentPasswordLengthMin -} from "#/global.ts"; -import { regexBase64URL } from "../regex.ts"; -import { validatorCreationTimestamp } from "./shared.ts"; +} from "#/global.mts"; +import { regexBase64URL } from "../regex.mts"; +import { validatorCreationTimestamp } from "./shared.mts"; export const validatorDocumentName = type(regexBase64URL) .atLeastLength(constantDocumentNameLengthMin) diff --git a/src/utils/validator/handler.ts b/src/utils/validator/handler.mts similarity index 78% rename from src/utils/validator/handler.ts rename to src/utils/validator/handler.mts index 434a7159..6682820b 100644 --- a/src/utils/validator/handler.ts +++ b/src/utils/validator/handler.mts @@ -1,5 +1,5 @@ import type { sValidator } from "@hono/standard-validator"; -import { errorCodeValidation, errorThrow } from "../error.ts"; +import { errorCodeValidation, errorThrow } from "../error.mts"; export const validatorHandler: Parameters[2] = (res) => { if (res.success) return; diff --git a/src/utils/validator/shared.ts b/src/utils/validator/shared.mts similarity index 100% rename from src/utils/validator/shared.ts rename to src/utils/validator/shared.mts diff --git a/src/utils/validator/user.ts b/src/utils/validator/user.mts similarity index 91% rename from src/utils/validator/user.ts rename to src/utils/validator/user.mts index 0f3b5806..c964cd65 100644 --- a/src/utils/validator/user.ts +++ b/src/utils/validator/user.mts @@ -1,6 +1,6 @@ import { type } from "arktype"; -import { constantUserTokenLength } from "#/global.ts"; -import { regexBase64URL, regexHeaderBearer } from "../regex.ts"; +import { constantUserTokenLength } from "#/global.mts"; +import { regexBase64URL, regexHeaderBearer } from "../regex.mts"; // FIXME: schema references not being generated when using toOpenAPISchema() export const validatorUserToken = type.string.exactlyLength(constantUserTokenLength).configure({