From efffaebb967cb944251ac7baf900df0a024aba62 Mon Sep 17 00:00:00 2001 From: Diego Resendez Date: Thu, 17 Sep 2026 23:00:49 -0500 Subject: [PATCH 01/24] build: npm and Deno workspace with core's gates Same lint, format and complexity gates as core, plus a lint rule that keeps core a types-only import in plugin sources. Runtime suites are chosen from each package's engines, so declaring a runtime is what puts a package under its test. Signed-off-by: Diego Resendez --- .githooks/pre-commit | 14 + .npmrc | 4 + .prettierrc | 8 + deno.json | 9 + eslint.config.mjs | 43 + package-lock.json | 2880 ++++++++++++++++++++++++++++++++++ package.json | 33 + scripts/check-complexity.mjs | 53 + scripts/run-runtime.mjs | 41 + tsconfig.json | 18 + 10 files changed, 3103 insertions(+) create mode 100755 .githooks/pre-commit create mode 100644 .npmrc create mode 100644 .prettierrc create mode 100644 deno.json create mode 100644 eslint.config.mjs create mode 100644 package-lock.json create mode 100644 package.json create mode 100644 scripts/check-complexity.mjs create mode 100644 scripts/run-runtime.mjs create mode 100644 tsconfig.json diff --git a/.githooks/pre-commit b/.githooks/pre-commit new file mode 100755 index 0000000..f241458 --- /dev/null +++ b/.githooks/pre-commit @@ -0,0 +1,14 @@ +#!/bin/sh +# Pre-commit gate. Auto-fixes formatting and lint on staged TypeScript, re-stages it, then enforces lint +# and the complexity gate. Enabled by the `prepare` script (`git config core.hooksPath .githooks`). +set -e + +staged=$(git diff --cached --name-only --diff-filter=ACM -- 'packages/*.ts' 'test/*.ts') +if [ -n "$staged" ]; then + echo "$staged" | xargs npx prettier --write + echo "$staged" | xargs npx eslint --fix + echo "$staged" | xargs git add +fi + +npm run lint +npm run complexity:check diff --git a/.npmrc b/.npmrc new file mode 100644 index 0000000..a61b211 --- /dev/null +++ b/.npmrc @@ -0,0 +1,4 @@ +# The @green-tea scope resolves from Verdaccio while core 26.9.0-beta.2 exists only there. The token is +# not here: it comes from ~/.npmrc locally and from the NPM_AUTH secret in CI. Plan B3 removes this line +# when the packages move to a core published on npm. +@green-tea:registry=https://npm.svc.zoit.services/ diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 0000000..f730360 --- /dev/null +++ b/.prettierrc @@ -0,0 +1,8 @@ +{ + "printWidth": 120, + "tabWidth": 2, + "singleQuote": true, + "semi": true, + "trailingComma": "all", + "arrowParens": "always" +} diff --git a/deno.json b/deno.json new file mode 100644 index 0000000..e0621d3 --- /dev/null +++ b/deno.json @@ -0,0 +1,9 @@ +{ + "workspace": [], + "nodeModulesDir": "manual", + "compilerOptions": { + "experimentalDecorators": true, + "emitDecoratorMetadata": true + }, + "lint": { "exclude": ["node_modules"] } +} diff --git a/eslint.config.mjs b/eslint.config.mjs new file mode 100644 index 0000000..b261ee4 --- /dev/null +++ b/eslint.config.mjs @@ -0,0 +1,43 @@ +import js from '@eslint/js'; +import tseslint from 'typescript-eslint'; +import stylistic from '@stylistic/eslint-plugin'; + +export default tseslint.config( + { ignores: ['dist', 'node_modules', 'coverage'] }, + js.configs.recommended, + ...tseslint.configs.recommended, + { + plugins: { '@stylistic': stylistic }, + rules: { + '@typescript-eslint/no-explicit-any': 'warn', + '@typescript-eslint/no-unused-vars': ['error', { argsIgnorePattern: '^_', varsIgnorePattern: '^_' }], + '@stylistic/padding-line-between-statements': [ + 'error', + { blankLine: 'always', prev: 'multiline-block-like', next: '*' }, + { blankLine: 'always', prev: '*', next: 'multiline-block-like' }, + ], + }, + }, + { + // Rule 8 of the convention. A value import of core makes the published plugin need core at + // runtime, and no semver range accepts next month's CalVer beta — not even `*` — so every + // install would warn. Tests are exempt: they drive the real createApp on purpose. + files: ['packages/*/src/**/*.ts'], + rules: { + 'no-restricted-imports': 'off', + '@typescript-eslint/no-restricted-imports': [ + 'error', + { + paths: [ + { + name: '@green-tea/core', + message: 'Plugins import core as types only: `import type { … } from "@green-tea/core"`.', + allowTypeImports: true, + }, + ], + }, + ], + 'no-console': 'error', + }, + }, +); diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000..a19c484 --- /dev/null +++ b/package-lock.json @@ -0,0 +1,2880 @@ +{ + "name": "green-tea-plugins", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "green-tea-plugins", + "license": "MIT", + "workspaces": [ + "packages/*" + ], + "devDependencies": { + "@eslint/js": "^9.39.5", + "@stylistic/eslint-plugin": "^5.10.0", + "@types/node": "^22.0.0", + "cognitive-complexity-ts": "^0.8.2", + "eslint": "^9.39.5", + "prettier": "^3.9.6", + "tsx": "^4.23.5", + "typescript": "^5.5.0", + "typescript-eslint": "^8.70.0" + }, + "engines": { + "node": ">=22" + } + }, + "node_modules/@esbuild/aix-ppc64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.28.2.tgz", + "integrity": "sha512-XExcO+dvLKvVtNTibSTBej1NCAbaGhWn9Ww1ZPx80qsahhPFe/8jgWP0IchNe0F3HwkU7n8ejhH8bjonqht8mQ==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "aix" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-arm": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.28.2.tgz", + "integrity": "sha512-kXXoiPVVGQcnIYGOeaovwOURpniDBpSq4A03qkQ+BMQqtGG6HYap3xne9C1O1yo4TR3qxlCX5IqqmX6fFo2Lqg==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-arm64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.28.2.tgz", + "integrity": "sha512-5YfKeeI8qWfBZIX+u2xZC3Zlb3Os/gLS2sbEKM+I4ZOcsWmHS2WLysCcQZDAFRslDUU5Oiq44gf6PYN1vGwG5A==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-x64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.28.2.tgz", + "integrity": "sha512-O387ite7SzUyCcy3JQX4P4bLtEA7bLLkx+esve5JHnyYfNTxcVpXZo9jhdB0lTKN44gztELTdU7nS8Nr16Fs1Q==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/darwin-arm64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.28.2.tgz", + "integrity": "sha512-n4KqkOQrraxHJcgjM1RvwbigfQKIKJVpM7xp+KsxiyUSrRdIXnt73VhrPAx0fV44hgfmIVKjxMN9J1t5jySVkw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/darwin-x64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.28.2.tgz", + "integrity": "sha512-uq6suIWYP37qzGddBKPw5QEQPi6HiLGsO7UmkpfyaYNQ3D+rN6w6WfwH+nuqcGXWvawGwxOEroO4YGnFh95azw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/freebsd-arm64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.28.2.tgz", + "integrity": "sha512-n+I0BTSRIoy+d6RPKnEVwql5UwBJolytvY4mAOIEJorKlqgPII8ix6slVVrfZ5Tnj7glIZvloylbB/EJPMWEXw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/freebsd-x64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.28.2.tgz", + "integrity": "sha512-78XJTJkvPs0kz2w61301PJjXl4g7q3JqiYMZ/M/yVI73EHBrCRTgkhu9oqG7vPqq+a/yadEW8aD+agKlk5xrmg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-arm": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.28.2.tgz", + "integrity": "sha512-XlDnu2q5yoqems+xay6wSAcg9DDD7K9RLKZEBOMZm3ckNpJBvOX20tSfby8KfrrhINDyv9V2YVZKY/SpoGJI8w==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-arm64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.28.2.tgz", + "integrity": "sha512-pW4AC0P3it8c7do9MVM4p51FzHzdM/TZrerurgRcHJ2WTa1VQ1CIq18xncfpBJw4ojkiZZrKW2yIBWBP92j6Ug==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-ia32": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.28.2.tgz", + "integrity": "sha512-CYbnj78HsIeA+DhgUKgFCfvNsTHFhMMrinUrMZpDXJXKN8T3XViTZ/+wtHeVxEWY8ewSzTFN+nRmSwO2tZaLUQ==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-loong64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.28.2.tgz", + "integrity": "sha512-buwkd8nsph4R+ajRvw0qM5Hja/TXQow3ptzWO2EbG/cqcIkHloRrdlBtQlshyYGTNFvfkfJ5tpPLVkY4DtsPfQ==", + "cpu": [ + "loong64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-mips64el": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.28.2.tgz", + "integrity": "sha512-ZVykbDyk7519VwiNb9Lcj9m8XM6v5V9uKPvrEMkkEedVewf+0itkhahp4HDpgERXhwLRpWFypsGbG/J8s0QjJA==", + "cpu": [ + "mips64el" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-ppc64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.28.2.tgz", + "integrity": "sha512-CAXl+Dtd9UUuJd8pKKdwh6MLm3MUMiqMPmhZ3tTSXPqfyQ3vDl6R5hZdZ/kYojK4ofXtdfSv1tFq8XzWx3heNQ==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-riscv64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.28.2.tgz", + "integrity": "sha512-GeXCej4IQtU1B+QlDV8W/RRvbzI3O/Stss+/bCXv4lZls5WGRtu2a+3JkA3i4qIUlMXpcHebWpF8AkJhATowuA==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-s390x": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.28.2.tgz", + "integrity": "sha512-3H1weTYZPxt/WOhByszQZybS9w5lKzUn1FDMsgEChbHWQwHYQQRfBxgCcZvPhjHfKyJjIievvMmEUawJrdY9Dg==", + "cpu": [ + "s390x" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-x64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.28.2.tgz", + "integrity": "sha512-4xTZr1FUmSoQW4XIWmit3tzQrUTZM+N3P0XV8xROKYF50XfI7xeO90+1bZvNwxIufQ9hDQVRJH5YhgPVF8A/HQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/netbsd-arm64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.28.2.tgz", + "integrity": "sha512-sSATRjPeDBg3pdgHoQfoYBob11Kk1FGa9lui5RIHZCoCkJa9QKlvl3/vKz2usCmYYjs7ymJR/2Nnsqe+Hjt5nw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/netbsd-x64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.28.2.tgz", + "integrity": "sha512-lqnzCV+mM0gIADaKihiCg6ifgfU2L3h5E33rNQBN1Y4MaVGnzryzmvvf7UHxprpQdE8hpqLolJ9Rl+SkIRDpyw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openbsd-arm64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.28.2.tgz", + "integrity": "sha512-AL2qJILH7lNjrDmCQDvdxMfAUIv8KMNZOvrwAQ8i8//ntL9FflhOyMJ8OZSMBb8/AWXe3/5v5S20y3zCoZWKoQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openbsd-x64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.28.2.tgz", + "integrity": "sha512-QtiuPytchRyC4rwUKhexJdQKvDuZ6hWloi3igqPQNUJCS1/v9EiO3UTOXR6A3FoMo4fnAKbWJdqaIwhOzh8qEw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openharmony-arm64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/openharmony-arm64/-/openharmony-arm64-0.28.2.tgz", + "integrity": "sha512-WkhYDmpTjLvGlScA1rwjRUmhl4k8oXR3cIbtqWmELgU/dFeHHlEllxDvdWcNJV9rbzCexB5vz8gtNewWLgCT7Q==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openharmony" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/sunos-x64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.28.2.tgz", + "integrity": "sha512-GPMSkTOtMnv2U2F8gxe4Io6qmVs+YKyp832Etqqxr0hFngmXQ3rzwytelm3GIn7T4VviRUlf3sOgBOiTdvaf7g==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-arm64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.28.2.tgz", + "integrity": "sha512-PIhhEkE9uPBleRBrQEJpUn7MBnibZzbGzYWPmY3x+YoVg/95zbjB4CxPPOQ8l5tYYM4mMaCthF8/1DIfBQQyWQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-ia32": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.28.2.tgz", + "integrity": "sha512-YmJbfTlvU7Sdn9BB+4PRES4oB6pxgS37MAONj+hBr/cpXS1aBPKXxNnDbu+QCWPj0o9dgyxeq79g6c5P8KeuYA==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-x64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.28.2.tgz", + "integrity": "sha512-5ebpxr3nWMzrL/rnUI755Jkuee0bHL/Gq0WTF9lvcpv73wAp5eu8MfBUgWK9bhWvZjj7yX8etf/8tI8Ney695g==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@eslint-community/eslint-utils": { + "version": "4.10.1", + "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.10.1.tgz", + "integrity": "sha512-cuadcxVFE8sDK6iWJbs8Sn0av2Nrh2QSGQhVlBW9AaAHqHwjWsZHT8LJ4hFGPh7ASBV2deFdM7H/DPjulmh8rg==", + "dev": true, + "license": "MIT", + "dependencies": { + "eslint-visitor-keys": "^3.4.3" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + }, + "peerDependencies": { + "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" + } + }, + "node_modules/@eslint-community/eslint-utils/node_modules/eslint-visitor-keys": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", + "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/@eslint-community/regexpp": { + "version": "4.12.2", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.12.2.tgz", + "integrity": "sha512-EriSTlt5OC9/7SXkRSCAhfSxxoSUgBm33OH+IkwbdpgoqsSsUg7y3uh+IICI/Qg4BBWr3U2i39RpmycbxMq4ew==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^12.0.0 || ^14.0.0 || >=16.0.0" + } + }, + "node_modules/@eslint/config-array": { + "version": "0.21.2", + "resolved": "https://registry.npmjs.org/@eslint/config-array/-/config-array-0.21.2.tgz", + "integrity": "sha512-nJl2KGTlrf9GjLimgIru+V/mzgSK0ABCDQRvxw5BjURL7WfH5uoWmizbH7QB6MmnMBd8cIC9uceWnezL1VZWWw==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@eslint/object-schema": "^2.1.7", + "debug": "^4.3.1", + "minimatch": "^3.1.5" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@eslint/config-helpers": { + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/@eslint/config-helpers/-/config-helpers-0.4.2.tgz", + "integrity": "sha512-gBrxN88gOIf3R7ja5K9slwNayVcZgK6SOUORm2uBzTeIEfeVaIhOpCtTox3P6R7o2jLFwLFTLnC7kU/RGcYEgw==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@eslint/core": "^0.17.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@eslint/core": { + "version": "0.17.0", + "resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.17.0.tgz", + "integrity": "sha512-yL/sLrpmtDaFEiUj1osRP4TI2MDz1AddJL+jZ7KSqvBuliN4xqYY54IfdN8qD8Toa6g1iloph1fxQNkjOxrrpQ==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@types/json-schema": "^7.0.15" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@eslint/eslintrc": { + "version": "3.3.7", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-3.3.7.tgz", + "integrity": "sha512-F42g89Qd5oAWtp0k0nnSrjziAKza7w8SVT4mStc18LZMaRb4J1HQAHLCalEtDCxrTuksx7NU9qsmeLwpOfPqWw==", + "dev": true, + "license": "MIT", + "dependencies": { + "ajv": "^6.14.0", + "debug": "^4.3.2", + "espree": "^10.0.1", + "globals": "^14.0.0", + "ignore": "^5.2.0", + "import-fresh": "^3.2.1", + "js-yaml": "^4.3.2", + "minimatch": "^3.1.5", + "strip-json-comments": "^3.1.1" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/@eslint/js": { + "version": "9.39.5", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.39.5.tgz", + "integrity": "sha512-QywQuszQh77pIXCsq998c8hbhSTI/azTty1Z6N53dmAudKHhy573j3yvRLsX2BSp8YpLtoCEG8E9DJe+8zUh4A==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://eslint.org/donate" + } + }, + "node_modules/@eslint/object-schema": { + "version": "2.1.7", + "resolved": "https://registry.npmjs.org/@eslint/object-schema/-/object-schema-2.1.7.tgz", + "integrity": "sha512-VtAOaymWVfZcmZbp6E2mympDIHvyjXs/12LqWYjVw6qjrfF+VK+fyG33kChz3nnK+SU5/NeHOqrTEHS8sXO3OA==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@eslint/plugin-kit": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.4.1.tgz", + "integrity": "sha512-43/qtrDUokr7LJqoF2c3+RInu/t4zfrpYdoSDfYyhg52rwLV6TnOvdG4fXm7IkSB3wErkcmJS9iEhjVtOSEjjA==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@eslint/core": "^0.17.0", + "levn": "^0.4.1" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@humanfs/core": { + "version": "0.19.2", + "resolved": "https://registry.npmjs.org/@humanfs/core/-/core-0.19.2.tgz", + "integrity": "sha512-UhXNm+CFMWcbChXywFwkmhqjs3PRCmcSa/hfBgLIb7oQ5HNb1wS0icWsGtSAUNgefHeI+eBrA8I1fxmbHsGdvA==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@humanfs/types": "^0.15.0" + }, + "engines": { + "node": ">=18.18.0" + } + }, + "node_modules/@humanfs/node": { + "version": "0.16.8", + "resolved": "https://registry.npmjs.org/@humanfs/node/-/node-0.16.8.tgz", + "integrity": "sha512-gE1eQNZ3R++kTzFUpdGlpmy8kDZD/MLyHqDwqjkVQI0JMdI1D51sy1H958PNXYkM2rAac7e5/CnIKZrHtPh3BQ==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@humanfs/core": "^0.19.2", + "@humanfs/types": "^0.15.0", + "@humanwhocodes/retry": "^0.4.0" + }, + "engines": { + "node": ">=18.18.0" + } + }, + "node_modules/@humanfs/types": { + "version": "0.15.0", + "resolved": "https://registry.npmjs.org/@humanfs/types/-/types-0.15.0.tgz", + "integrity": "sha512-ZZ1w0aoQkwuUuC7Yf+7sdeaNfqQiiLcSRbfI08oAxqLtpXQr9AIVX7Ay7HLDuiLYAaFPu8oBYNq/QIi9URHJ3Q==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=18.18.0" + } + }, + "node_modules/@humanwhocodes/module-importer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", + "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=12.22" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" + } + }, + "node_modules/@humanwhocodes/retry": { + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.4.3.tgz", + "integrity": "sha512-bV0Tgo9K4hfPCek+aMAn81RppFKv2ySDQeMoSZuvTASywNTnVJCArCZE2FWqpvIatKu7VMRLWlR1EazvVhDyhQ==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=18.18" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" + } + }, + "node_modules/@isaacs/cliui": { + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", + "integrity": "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==", + "dev": true, + "license": "ISC", + "dependencies": { + "string-width": "^5.1.2", + "string-width-cjs": "npm:string-width@^4.2.0", + "strip-ansi": "^7.0.1", + "strip-ansi-cjs": "npm:strip-ansi@^6.0.1", + "wrap-ansi": "^8.1.0", + "wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/@one-ini/wasm": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/@one-ini/wasm/-/wasm-0.1.1.tgz", + "integrity": "sha512-XuySG1E38YScSJoMlqovLru4KTUNSjgVTIjyh7qMX6aNN5HY5Ct5LhRJdxO79JtTzKfzV/bnWpz+zquYrISsvw==", + "dev": true, + "license": "MIT" + }, + "node_modules/@pkgjs/parseargs": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz", + "integrity": "sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==", + "dev": true, + "license": "MIT", + "optional": true, + "engines": { + "node": ">=14" + } + }, + "node_modules/@stylistic/eslint-plugin": { + "version": "5.10.0", + "resolved": "https://registry.npmjs.org/@stylistic/eslint-plugin/-/eslint-plugin-5.10.0.tgz", + "integrity": "sha512-nPK52ZHvot8Ju/0A4ucSX1dcPV2/1clx0kLcH5wDmrE4naKso7TUC/voUyU1O9OTKTrR6MYip6LP0ogEMQ9jPQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@eslint-community/eslint-utils": "^4.9.1", + "@typescript-eslint/types": "^8.56.0", + "eslint-visitor-keys": "^4.2.1", + "espree": "^10.4.0", + "estraverse": "^5.3.0", + "picomatch": "^4.0.3" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "peerDependencies": { + "eslint": "^9.0.0 || ^10.0.0" + } + }, + "node_modules/@types/estree": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.9.tgz", + "integrity": "sha512-GhdPgy1el4/ImP05X05Uw4cw2/M93BCUmnEvWZNStlCzEKME4Fkk+YpoA5OiHNQmoS7Cafb8Xa3Pya8m1Qrzeg==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/json-schema": { + "version": "7.0.15", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", + "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/node": { + "version": "22.20.3", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.20.3.tgz", + "integrity": "sha512-DZmzkmwHzXrLPAXPyKNDzlIwMMUZCVacoD25ywdy5YTKGbOx/2ld+Q38Im2zJ0vBuZP5Prd3VZutKZyXwkOS8A==", + "dev": true, + "license": "MIT", + "dependencies": { + "undici-types": "~6.21.0" + } + }, + "node_modules/@typescript-eslint/eslint-plugin": { + "version": "8.70.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.70.0.tgz", + "integrity": "sha512-/v8HZt6RlyIZxB3ntehELOcUcfxKPVGWXnQdJuHRmzrqgF8nQypcC/oxGW+Ot4VGKDq81XugPKxx0n5PBtf9PA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@eslint-community/regexpp": "^4.12.2", + "@typescript-eslint/scope-manager": "8.70.0", + "@typescript-eslint/type-utils": "8.70.0", + "@typescript-eslint/utils": "8.70.0", + "@typescript-eslint/visitor-keys": "8.70.0", + "ignore": "^7.0.5", + "natural-compare": "^1.4.0", + "ts-api-utils": "^2.5.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "@typescript-eslint/parser": "^8.70.0", + "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", + "typescript": ">=4.8.4 <6.1.0" + } + }, + "node_modules/@typescript-eslint/eslint-plugin/node_modules/ignore": { + "version": "7.0.9", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-7.0.9.tgz", + "integrity": "sha512-brTTsvFRt5C1gGHtPst/281UjPD5t9fBqbgoMPlVWy11ZLTPfu7HxK4ZYqO9H7o/yC9rSTCI85EaQ4OoY12qYw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 4" + } + }, + "node_modules/@typescript-eslint/parser": { + "version": "8.70.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.70.0.tgz", + "integrity": "sha512-zYvrmj9Yxd63UGaXw+kdt6A0F0s0qveJyuatIM77bYC2DE4pgmg7a50u8LR7PRtXd0x+h+Tl3eXabGm06SWd3Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/scope-manager": "8.70.0", + "@typescript-eslint/types": "8.70.0", + "@typescript-eslint/typescript-estree": "8.70.0", + "@typescript-eslint/visitor-keys": "8.70.0", + "debug": "^4.4.3" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", + "typescript": ">=4.8.4 <6.1.0" + } + }, + "node_modules/@typescript-eslint/project-service": { + "version": "8.70.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/project-service/-/project-service-8.70.0.tgz", + "integrity": "sha512-hFHbTNqhU9G+2eKFXCBVb1tjFT/LceiJ4+HfLO4pTpDI0KHi6iajpcFFkaSQ9gXmCh7n82A0PthaayEdN6mspQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/tsconfig-utils": "^8.70.0", + "@typescript-eslint/types": "^8.70.0", + "debug": "^4.4.3" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "typescript": ">=4.8.4 <6.1.0" + } + }, + "node_modules/@typescript-eslint/scope-manager": { + "version": "8.70.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.70.0.tgz", + "integrity": "sha512-8nP3Kwh5hlgZ4FicGvmznAmJe8UL4sdU8tLukrPaMuQmDuk4Y8xYfzu/aYZW4xT2JCgc7H/TpDI5cGlxcWJSqQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/types": "8.70.0", + "@typescript-eslint/visitor-keys": "8.70.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/tsconfig-utils": { + "version": "8.70.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.70.0.tgz", + "integrity": "sha512-adnkeeNq9Sq1sUf4+FRVc0KdgYghzsgFpZSQVZVvY0LCuUuN0FnQgyGzCJeC4fW1cdXseBAjU2EOqUIjbNcZUw==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "typescript": ">=4.8.4 <6.1.0" + } + }, + "node_modules/@typescript-eslint/type-utils": { + "version": "8.70.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.70.0.tgz", + "integrity": "sha512-NUMKIhYVaVIVLnRL9CRt+VVcuLgSHUCpXn4/+K8wql+vdInUzvx8BjUO1oJ7cG9shjFJKtF8F8Hh2kCh3/KBVw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/types": "8.70.0", + "@typescript-eslint/typescript-estree": "8.70.0", + "@typescript-eslint/utils": "8.70.0", + "debug": "^4.4.3", + "ts-api-utils": "^2.5.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", + "typescript": ">=4.8.4 <6.1.0" + } + }, + "node_modules/@typescript-eslint/types": { + "version": "8.70.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.70.0.tgz", + "integrity": "sha512-asTOIYhDg4zdzOScCyaytrsV3cR6B4ecPQlXw/dJIm7J/MZTtCtfVII9JD8Geh4jTCrK/Xe6cg5UevoleMcoJQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/typescript-estree": { + "version": "8.70.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.70.0.tgz", + "integrity": "sha512-d9NmHMPEKQ7QCLLm1jI3zmoQBwT5KwFYjXBJ9ymZfKCUU+5rmTRykKAFvH5Qn/ZCds3CEAFS9OC9M/jkl0X2bA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/project-service": "8.70.0", + "@typescript-eslint/tsconfig-utils": "8.70.0", + "@typescript-eslint/types": "8.70.0", + "@typescript-eslint/visitor-keys": "8.70.0", + "debug": "^4.4.3", + "minimatch": "^10.2.2", + "semver": "^7.7.3", + "tinyglobby": "^0.2.15", + "ts-api-utils": "^2.5.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "typescript": ">=4.8.4 <6.1.0" + } + }, + "node_modules/@typescript-eslint/typescript-estree/node_modules/balanced-match": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-4.0.4.tgz", + "integrity": "sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA==", + "dev": true, + "license": "MIT", + "engines": { + "node": "18 || 20 || >=22" + } + }, + "node_modules/@typescript-eslint/typescript-estree/node_modules/brace-expansion": { + "version": "5.0.12", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.12.tgz", + "integrity": "sha512-YovQ3rzhaLMIrDjNDMkNS01tea93qhEhG5xy8f6+R0l+dw3Ki+5sCoIoI942iuLZTHWogWktgwVDhU09iNEimQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^4.0.2" + }, + "engines": { + "node": "20 || >=22" + } + }, + "node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch": { + "version": "10.2.6", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.2.6.tgz", + "integrity": "sha512-vpLQEs+VLCr1nU0BXS07maYoFwlDAH0gngQuuttxIwutDFEMHq2blX+8vpgxDdK3J1PwjCJiep77OitTZ4Ll1A==", + "dev": true, + "license": "BlueOak-1.0.0", + "dependencies": { + "brace-expansion": "^5.0.8" + }, + "engines": { + "node": "18 || 20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/@typescript-eslint/utils": { + "version": "8.70.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.70.0.tgz", + "integrity": "sha512-oZmtKJz/4fufZ2p3+Cn3ijEojcdfR+1zYDH2xKYrEly0dR/Q/1xUPRCOlKGxod78nWlU2UnDe09GZ3TaknBFGA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@eslint-community/eslint-utils": "^4.9.1", + "@typescript-eslint/scope-manager": "8.70.0", + "@typescript-eslint/types": "8.70.0", + "@typescript-eslint/typescript-estree": "8.70.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", + "typescript": ">=4.8.4 <6.1.0" + } + }, + "node_modules/@typescript-eslint/visitor-keys": { + "version": "8.70.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.70.0.tgz", + "integrity": "sha512-BoC8PiO4Hkdo0TVJh9Ntxr5MxPDI7/oFsrygN5ADelFSeXG/qgNuucIGA+L5Z6JpPTE/uRfcTWtscjbUaufepQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/types": "8.70.0", + "eslint-visitor-keys": "^5.0.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/visitor-keys/node_modules/eslint-visitor-keys": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-5.0.1.tgz", + "integrity": "sha512-tD40eHxA35h0PEIZNeIjkHoDR4YjjJp34biM0mDvplBe//mB+IHCqHDGV7pxF+7MklTvighcCPPZC7ynWyjdTA==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^20.19.0 || ^22.13.0 || >=24" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/abbrev": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-2.0.0.tgz", + "integrity": "sha512-6/mh1E2u2YgEsCHdY0Yx5oW+61gZU+1vXaoiHHrpKeuRNNgFvS+/jrwHiQhB5apAf5oB7UB7E19ol2R2LKH8hQ==", + "dev": true, + "license": "ISC", + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/acorn": { + "version": "8.18.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.18.0.tgz", + "integrity": "sha512-lGq+9yr1/GuAWaVYIHRjvvySG5/4VfKIvC8EWxStPdcDh/Ka7FG3twP6v4d5BkravUilhIAsG4Qj83t02LWUPQ==", + "dev": true, + "license": "MIT", + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/acorn-jsx": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", + "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", + "dev": true, + "license": "MIT", + "peerDependencies": { + "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" + } + }, + "node_modules/ajv": { + "version": "6.15.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.15.0.tgz", + "integrity": "sha512-fgFx7Hfoq60ytK2c7DhnF8jIvzYgOMxfugjLOSMHjLIPgenqa7S7oaagATUq99mV6IYvN2tRmC0wnTYX6iPbMw==", + "dev": true, + "license": "MIT", + "dependencies": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/ansi-regex": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.3.0.tgz", + "integrity": "sha512-WpDfL7NO6j7tH88IDBNVdUJxDh9nmCteAVW9dsep846XdwF4naCBK+/tGLX3KJgcpgMRXCFlTM2hKGoK9FsdrQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, + "node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true, + "license": "Python-2.0" + }, + "node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true, + "license": "MIT" + }, + "node_modules/brace-expansion": { + "version": "1.1.21", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.21.tgz", + "integrity": "sha512-9zeA+KLZNNzglF2TPKRQEDyx6Yby7daAkuy8MiPzpXPsYDWi/DRM8jmwUDxokQjYqBpv5DgPiwD4h4ZZSy1Ujw==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/buffer-from": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", + "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/bundle-name": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/bundle-name/-/bundle-name-4.1.0.tgz", + "integrity": "sha512-tjwM5exMg6BGRI+kNmTntNsvdZS1X8BFYS6tnJ2hdH0kVxM6/eVZ2xy+FqStSWvYmtfFMDLIxurorHwDKfDz5Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "run-applescript": "^7.0.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/callsites": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/cognitive-complexity-ts": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/cognitive-complexity-ts/-/cognitive-complexity-ts-0.8.2.tgz", + "integrity": "sha512-2ituXHQsA4PjFI3ySEgrzc50Mz48If1QHrr4HxHqD3kNg2nM9klBtfcj5NFvc3x5ciObFcoIJ8OANB2Rt73Gkw==", + "dev": true, + "license": "GPL-3.0", + "dependencies": { + "js-beautify": "^1.15.4", + "minimist": "^1.2.8", + "open": "^11.0.0", + "source-map-support": "^0.5.21", + "typescript": "^5.9.3" + }, + "bin": { + "ccts": "bin/cognitive-complexity-ts", + "ccts-json": "bin/cognitive-complexity-ts-json", + "ccts-ui": "bin/cognitive-complexity-ts-ui", + "cognitive-complexity-ts": "bin/cognitive-complexity-ts", + "cognitive-complexity-ts-json": "bin/cognitive-complexity-ts-json", + "cognitive-complexity-ts-ui": "bin/cognitive-complexity-ts-ui" + } + }, + "node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true, + "license": "MIT" + }, + "node_modules/commander": { + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-10.0.1.tgz", + "integrity": "sha512-y4Mg2tXshplEbSGzx7amzPwKKOCGuoSRP/CjEdwwk0FOGlUbq6lKuoyDZTNZkmxHdJtp54hdfY/JUrdL7Xfdug==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=14" + } + }, + "node_modules/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", + "dev": true, + "license": "MIT" + }, + "node_modules/config-chain": { + "version": "1.1.13", + "resolved": "https://registry.npmjs.org/config-chain/-/config-chain-1.1.13.tgz", + "integrity": "sha512-qj+f8APARXHrM0hraqXYb2/bOVSV4PvJQlNZ/DVj0QrmNM2q2euizkeuVckQ57J+W0mRH6Hvi+k50M4Jul2VRQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ini": "^1.3.4", + "proto-list": "~1.2.1" + } + }, + "node_modules/cross-spawn": { + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", + "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", + "dev": true, + "license": "MIT", + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/debug": { + "version": "4.4.3", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz", + "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/deep-is": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", + "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/default-browser": { + "version": "5.5.1", + "resolved": "https://registry.npmjs.org/default-browser/-/default-browser-5.5.1.tgz", + "integrity": "sha512-m1pAzaJgZ/gssEqlOhJkPJp8Xly7QyW6xcrkUa2KKcDeDSEMP7X8xipU3snUcfisTQx0w1AGae+9UtJSfVnXGw==", + "dev": true, + "license": "MIT", + "dependencies": { + "bundle-name": "^4.1.0", + "default-browser-id": "^5.0.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/default-browser-id": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/default-browser-id/-/default-browser-id-5.0.1.tgz", + "integrity": "sha512-x1VCxdX4t+8wVfd1so/9w+vQ4vx7lKd2Qp5tDRutErwmR85OgmfX7RlLRMWafRMY7hbEiXIbudNrjOAPa/hL8Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/define-lazy-prop": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/define-lazy-prop/-/define-lazy-prop-3.0.0.tgz", + "integrity": "sha512-N+MeXYoqr3pOgn8xfyRPREN7gHakLYjhsHhWGT3fWAiL4IkAt0iDw14QiiEm2bE30c5XX5q0FtAA3CK5f9/BUg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eastasianwidth": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", + "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==", + "dev": true, + "license": "MIT" + }, + "node_modules/editorconfig": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/editorconfig/-/editorconfig-1.0.7.tgz", + "integrity": "sha512-e0GOtq/aTQhVdNyDU9e02+wz9oDDM+SIOQxWME2QRjzRX5yyLAuHDE+0aE8vHb9XRC8XD37eO2u57+F09JqFhw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@one-ini/wasm": "0.1.1", + "commander": "^10.0.0", + "minimatch": "^9.0.1", + "semver": "^7.5.3" + }, + "bin": { + "editorconfig": "bin/editorconfig" + }, + "engines": { + "node": ">=14" + } + }, + "node_modules/editorconfig/node_modules/brace-expansion": { + "version": "2.1.7", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.1.7.tgz", + "integrity": "sha512-uZbew1NqdmPDTMJ8ah1y+b+9QEJrfkXFk3RcTQw3X0jW/xRUvFKsg1CfQdSYGdTbXZWExtU3J3ccxtnfw1Fi0g==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/editorconfig/node_modules/minimatch": { + "version": "9.0.9", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.9.tgz", + "integrity": "sha512-OBwBN9AL4dqmETlpS2zasx+vTeWclWzkblfZk7KTA5j3jeOONz/tRCnZomUyvNg83wL5Zv9Ss6HMJXAgL8R2Yg==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^2.0.2" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/emoji-regex": { + "version": "9.2.2", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", + "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", + "dev": true, + "license": "MIT" + }, + "node_modules/esbuild": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.28.2.tgz", + "integrity": "sha512-HKVLS8dvII+xoKW9kmqxbRKrnWEXfJJr/FZhhJmiqIB0e053QNYFqOBouTMO/k5sID4MvCiUCvv8b9M4h32wIA==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=18" + }, + "optionalDependencies": { + "@esbuild/aix-ppc64": "0.28.2", + "@esbuild/android-arm": "0.28.2", + "@esbuild/android-arm64": "0.28.2", + "@esbuild/android-x64": "0.28.2", + "@esbuild/darwin-arm64": "0.28.2", + "@esbuild/darwin-x64": "0.28.2", + "@esbuild/freebsd-arm64": "0.28.2", + "@esbuild/freebsd-x64": "0.28.2", + "@esbuild/linux-arm": "0.28.2", + "@esbuild/linux-arm64": "0.28.2", + "@esbuild/linux-ia32": "0.28.2", + "@esbuild/linux-loong64": "0.28.2", + "@esbuild/linux-mips64el": "0.28.2", + "@esbuild/linux-ppc64": "0.28.2", + "@esbuild/linux-riscv64": "0.28.2", + "@esbuild/linux-s390x": "0.28.2", + "@esbuild/linux-x64": "0.28.2", + "@esbuild/netbsd-arm64": "0.28.2", + "@esbuild/netbsd-x64": "0.28.2", + "@esbuild/openbsd-arm64": "0.28.2", + "@esbuild/openbsd-x64": "0.28.2", + "@esbuild/openharmony-arm64": "0.28.2", + "@esbuild/sunos-x64": "0.28.2", + "@esbuild/win32-arm64": "0.28.2", + "@esbuild/win32-ia32": "0.28.2", + "@esbuild/win32-x64": "0.28.2" + } + }, + "node_modules/escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint": { + "version": "9.39.5", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.39.5.tgz", + "integrity": "sha512-DgZS62aPLXKlnxILS/AYCoRvHaZeXceIzlXPkkGGzJWSow1aEk0lbTlxUSlyjC8jcaKxAdOnTDz+o1JFSBsyjw==", + "deprecated": "This version is no longer supported. Please see https://eslint.org/version-support for other options.", + "dev": true, + "license": "MIT", + "dependencies": { + "@eslint-community/eslint-utils": "^4.8.0", + "@eslint-community/regexpp": "^4.12.1", + "@eslint/config-array": "^0.21.2", + "@eslint/config-helpers": "^0.4.2", + "@eslint/core": "^0.17.0", + "@eslint/eslintrc": "^3.3.6", + "@eslint/js": "9.39.5", + "@eslint/plugin-kit": "^0.4.1", + "@humanfs/node": "^0.16.6", + "@humanwhocodes/module-importer": "^1.0.1", + "@humanwhocodes/retry": "^0.4.2", + "@types/estree": "^1.0.6", + "ajv": "^6.14.0", + "chalk": "^4.0.0", + "cross-spawn": "^7.0.6", + "debug": "^4.3.2", + "escape-string-regexp": "^4.0.0", + "eslint-scope": "^8.4.0", + "eslint-visitor-keys": "^4.2.1", + "espree": "^10.4.0", + "esquery": "^1.5.0", + "esutils": "^2.0.2", + "fast-deep-equal": "^3.1.3", + "file-entry-cache": "^8.0.0", + "find-up": "^5.0.0", + "glob-parent": "^6.0.2", + "ignore": "^5.2.0", + "imurmurhash": "^0.1.4", + "is-glob": "^4.0.0", + "json-stable-stringify-without-jsonify": "^1.0.1", + "lodash.merge": "^4.6.2", + "minimatch": "^3.1.5", + "natural-compare": "^1.4.0", + "optionator": "^0.9.3" + }, + "bin": { + "eslint": "bin/eslint.js" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://eslint.org/donate" + }, + "peerDependencies": { + "jiti": "*" + }, + "peerDependenciesMeta": { + "jiti": { + "optional": true + } + } + }, + "node_modules/eslint-scope": { + "version": "8.4.0", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-8.4.0.tgz", + "integrity": "sha512-sNXOfKCn74rt8RICKMvJS7XKV/Xk9kA7DyJr8mJik3S7Cwgy3qlkkmyS2uQB3jiJg6VNdZd/pDBJu0nvG2NlTg==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "esrecurse": "^4.3.0", + "estraverse": "^5.2.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint-visitor-keys": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.1.tgz", + "integrity": "sha512-Uhdk5sfqcee/9H/rCOJikYz67o0a2Tw2hGRPOG2Y1R2dg7brRe1uG0yaNQDHu+TO/uQPF/5eCapvYSmHUjt7JQ==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/espree": { + "version": "10.4.0", + "resolved": "https://registry.npmjs.org/espree/-/espree-10.4.0.tgz", + "integrity": "sha512-j6PAQ2uUr79PZhBjP5C5fhl8e39FmRnOjsD5lGnWrFU8i2G776tBK7+nP8KuQUTTyAZUwfQqXAgrVH5MbH9CYQ==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "acorn": "^8.15.0", + "acorn-jsx": "^5.3.2", + "eslint-visitor-keys": "^4.2.1" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/esquery": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.7.0.tgz", + "integrity": "sha512-Ap6G0WQwcU/LHsvLwON1fAQX9Zp0A2Y6Y/cJBl9r/JbW90Zyg4/zbG6zzKa2OTALELarYHmKu0GhpM5EO+7T0g==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "estraverse": "^5.1.0" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/esrecurse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", + "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "estraverse": "^5.2.0" + }, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=4.0" + } + }, + "node_modules/esutils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "dev": true, + "license": "MIT" + }, + "node_modules/fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", + "dev": true, + "license": "MIT" + }, + "node_modules/fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", + "dev": true, + "license": "MIT" + }, + "node_modules/fdir": { + "version": "6.5.0", + "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz", + "integrity": "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12.0.0" + }, + "peerDependencies": { + "picomatch": "^3 || ^4" + }, + "peerDependenciesMeta": { + "picomatch": { + "optional": true + } + } + }, + "node_modules/file-entry-cache": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-8.0.0.tgz", + "integrity": "sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "flat-cache": "^4.0.0" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/find-up": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "dev": true, + "license": "MIT", + "dependencies": { + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/flat-cache": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-4.0.1.tgz", + "integrity": "sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw==", + "dev": true, + "license": "MIT", + "dependencies": { + "flatted": "^3.2.9", + "keyv": "^4.5.4" + }, + "engines": { + "node": ">=16" + } + }, + "node_modules/flatted": { + "version": "3.4.4", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.4.4.tgz", + "integrity": "sha512-5+ybhBZANEJxaH3X5evAFatUxLfEHSr7n6kYJ+1Qd0mUqr4eu9gIf6GDbWHf8RJijHrjjO8G+la14SlL2SeS1Q==", + "dev": true, + "license": "ISC" + }, + "node_modules/foreground-child": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.3.1.tgz", + "integrity": "sha512-gIXjKqtFuWEgzFRJA9WCQeSJLZDjgJUOMCMzxtvFq/37KojM1BFGufqsCy0r4qSQmYLsZYMeyRqzIWOMup03sw==", + "dev": true, + "license": "ISC", + "dependencies": { + "cross-spawn": "^7.0.6", + "signal-exit": "^4.0.1" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/glob": { + "version": "10.5.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.5.0.tgz", + "integrity": "sha512-DfXN8DfhJ7NH3Oe7cFmu3NCu1wKbkReJ8TorzSAFbSKrlNaQSKfIzqYqVY8zlbs2NLBbWpRiU52GX2PbaBVNkg==", + "deprecated": "Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me", + "dev": true, + "license": "ISC", + "dependencies": { + "foreground-child": "^3.1.0", + "jackspeak": "^3.1.2", + "minimatch": "^9.0.4", + "minipass": "^7.1.2", + "package-json-from-dist": "^1.0.0", + "path-scurry": "^1.11.1" + }, + "bin": { + "glob": "dist/esm/bin.mjs" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/glob-parent": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", + "dev": true, + "license": "ISC", + "dependencies": { + "is-glob": "^4.0.3" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/glob/node_modules/brace-expansion": { + "version": "2.1.7", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.1.7.tgz", + "integrity": "sha512-uZbew1NqdmPDTMJ8ah1y+b+9QEJrfkXFk3RcTQw3X0jW/xRUvFKsg1CfQdSYGdTbXZWExtU3J3ccxtnfw1Fi0g==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/glob/node_modules/minimatch": { + "version": "9.0.9", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.9.tgz", + "integrity": "sha512-OBwBN9AL4dqmETlpS2zasx+vTeWclWzkblfZk7KTA5j3jeOONz/tRCnZomUyvNg83wL5Zv9Ss6HMJXAgL8R2Yg==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^2.0.2" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/globals": { + "version": "14.0.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-14.0.0.tgz", + "integrity": "sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/ignore": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", + "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 4" + } + }, + "node_modules/import-fresh": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.1.tgz", + "integrity": "sha512-TR3KfrTZTYLPB6jUjfx6MF9WcWrHL9su5TObK4ZkYgBdWKPOFoSoQIdEuTuR82pmtxH2spWG9h6etwfr1pLBqQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.8.19" + } + }, + "node_modules/ini": { + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", + "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==", + "dev": true, + "license": "ISC" + }, + "node_modules/is-docker": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-3.0.0.tgz", + "integrity": "sha512-eljcgEDlEns/7AXFosB5K/2nCM4P7FQPkGc/DWLy5rmFEWvZayGrik1d9/QIY5nJ4f9YsVvBkA6kJpHn9rISdQ==", + "dev": true, + "license": "MIT", + "bin": { + "is-docker": "cli.js" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-in-ssh": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-in-ssh/-/is-in-ssh-1.0.0.tgz", + "integrity": "sha512-jYa6Q9rH90kR1vKB6NM7qqd1mge3Fx4Dhw5TVlK1MUBqhEOuCagrEHMevNuCcbECmXZ0ThXkRm+Ymr51HwEPAw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=20" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-inside-container": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-inside-container/-/is-inside-container-1.0.0.tgz", + "integrity": "sha512-KIYLCCJghfHZxqjYBE7rEy0OBuTd5xCHS7tHVgvCLkx7StIoaxwNW3hCALgEUjFfeRk+MG/Qxmp/vtETEF3tRA==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-docker": "^3.0.0" + }, + "bin": { + "is-inside-container": "cli.js" + }, + "engines": { + "node": ">=14.16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-wsl": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-3.1.1.tgz", + "integrity": "sha512-e6rvdUCiQCAuumZslxRJWR/Doq4VpPR82kqclvcS0efgt430SlGIk05vdCN58+VrzgtIcfNODjozVielycD4Sw==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-inside-container": "^1.0.0" + }, + "engines": { + "node": ">=16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", + "dev": true, + "license": "ISC" + }, + "node_modules/jackspeak": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-3.4.3.tgz", + "integrity": "sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==", + "dev": true, + "license": "BlueOak-1.0.0", + "dependencies": { + "@isaacs/cliui": "^8.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + }, + "optionalDependencies": { + "@pkgjs/parseargs": "^0.11.0" + } + }, + "node_modules/js-beautify": { + "version": "1.15.4", + "resolved": "https://registry.npmjs.org/js-beautify/-/js-beautify-1.15.4.tgz", + "integrity": "sha512-9/KXeZUKKJwqCXUdBxFJ3vPh467OCckSBmYDwSK/EtV090K+iMJ7zx2S3HLVDIWFQdqMIsZWbnaGiba18aWhaA==", + "dev": true, + "license": "MIT", + "dependencies": { + "config-chain": "^1.1.13", + "editorconfig": "^1.0.4", + "glob": "^10.4.2", + "js-cookie": "^3.0.5", + "nopt": "^7.2.1" + }, + "bin": { + "css-beautify": "js/bin/css-beautify.js", + "html-beautify": "js/bin/html-beautify.js", + "js-beautify": "js/bin/js-beautify.js" + }, + "engines": { + "node": ">=14" + } + }, + "node_modules/js-cookie": { + "version": "3.0.8", + "resolved": "https://registry.npmjs.org/js-cookie/-/js-cookie-3.0.8.tgz", + "integrity": "sha512-yeJd4aNAdYZQjaon2bpD/Gb0B/omw7HQOsynXXcOiWVCacbBcPlgn8S/d1X6blFSaHao7ozqtW7NZW19xpCtIw==", + "dev": true, + "license": "MIT" + }, + "node_modules/js-yaml": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.3.2.tgz", + "integrity": "sha512-SFNOvSJ+Dgf/9An904Yx+CgSlIPCkIpao4qo51lpee25TIRejdH3rhR4EZMGoNx3/TP3O+wzWuiTFl4sqbltzA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/puzrin" + }, + { + "type": "github", + "url": "https://github.com/sponsors/nodeca" + } + ], + "license": "MIT", + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/json-buffer": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", + "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true, + "license": "MIT" + }, + "node_modules/json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", + "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", + "dev": true, + "license": "MIT" + }, + "node_modules/keyv": { + "version": "4.5.4", + "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", + "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==", + "dev": true, + "license": "MIT", + "dependencies": { + "json-buffer": "3.0.1" + } + }, + "node_modules/levn": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", + "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "prelude-ls": "^1.2.1", + "type-check": "~0.4.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/locate-path": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-locate": "^5.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/lodash.merge": { + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", + "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/lru-cache": { + "version": "10.4.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz", + "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/minimatch": { + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.5.tgz", + "integrity": "sha512-VgjWUsnnT6n+NUk6eZq77zeFdpW2LWDzP6zFGrCbHXiYNul5Dzqk2HHQ5uFH2DNW5Xbp8+jVzaeNt94ssEEl4w==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/minimist": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", + "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/minipass": { + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.3.tgz", + "integrity": "sha512-tEBHqDnIoM/1rXME1zgka9g6Q2lcoCkxHLuc7ODJ5BxbP5d4c2Z5cGgtXAku59200Cx7diuHTOYfSBD8n6mm8A==", + "dev": true, + "license": "BlueOak-1.0.0", + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, + "node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true, + "license": "MIT" + }, + "node_modules/natural-compare": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", + "dev": true, + "license": "MIT" + }, + "node_modules/nopt": { + "version": "7.2.1", + "resolved": "https://registry.npmjs.org/nopt/-/nopt-7.2.1.tgz", + "integrity": "sha512-taM24ViiimT/XntxbPyJQzCG+p4EKOpgD3mxFwW38mGjVUrfERQOeY4EDHjdnptttfHuHQXFx+lTP08Q+mLa/w==", + "dev": true, + "license": "ISC", + "dependencies": { + "abbrev": "^2.0.0" + }, + "bin": { + "nopt": "bin/nopt.js" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/open": { + "version": "11.0.4", + "resolved": "https://registry.npmjs.org/open/-/open-11.0.4.tgz", + "integrity": "sha512-++Zlftm0kVLPmzC06t6epuWmcRMDbI4z5P3NNX979WA/k23+NtSOynEGzsVfZwguKw2mi5umVgnBlJQMwRz4Pg==", + "dev": true, + "license": "MIT", + "dependencies": { + "default-browser": "^5.5.1", + "define-lazy-prop": "^3.0.0", + "is-in-ssh": "^1.0.0", + "is-inside-container": "^1.0.0", + "powershell-utils": "^0.2.1", + "wsl-utils": "^1.0.0" + }, + "engines": { + "node": ">=20" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/optionator": { + "version": "0.9.4", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz", + "integrity": "sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==", + "dev": true, + "license": "MIT", + "dependencies": { + "deep-is": "^0.1.3", + "fast-levenshtein": "^2.0.6", + "levn": "^0.4.1", + "prelude-ls": "^1.2.1", + "type-check": "^0.4.0", + "word-wrap": "^1.2.5" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "yocto-queue": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-locate": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-limit": "^3.0.2" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/package-json-from-dist": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/package-json-from-dist/-/package-json-from-dist-1.0.1.tgz", + "integrity": "sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==", + "dev": true, + "license": "BlueOak-1.0.0" + }, + "node_modules/parent-module": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", + "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", + "dev": true, + "license": "MIT", + "dependencies": { + "callsites": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/path-scurry": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.11.1.tgz", + "integrity": "sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==", + "dev": true, + "license": "BlueOak-1.0.0", + "dependencies": { + "lru-cache": "^10.2.0", + "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" + }, + "engines": { + "node": ">=16 || 14 >=14.18" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/picomatch": { + "version": "4.0.7", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.7.tgz", + "integrity": "sha512-qcJu88Q2IWqJsDD529JKMdwGm/dvInW4HvQnRwiH9JtihJvzGOscDtHE3x1pBKeUOTysQ8kVmLnJ2kJu7yhcGA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/powershell-utils": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/powershell-utils/-/powershell-utils-0.2.1.tgz", + "integrity": "sha512-C+y9x90UElAddDZmV4qOx9W53B61PO7cIqWz2dQsWlwswuq4mr8NEwytdGKboYbQlGZ3awrkTeNvcZiZNHnQ8A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=20" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/prelude-ls": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", + "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/prettier": { + "version": "3.9.8", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.9.8.tgz", + "integrity": "sha512-WRFq3Wn3WId7LLROfMLdH7xaFr2jR62wU8nLO6rQUOLOxNZUviyJQs1M0iIhLexSFy+L+w0ch66wtoO2jRjG0A==", + "dev": true, + "license": "MIT", + "bin": { + "prettier": "bin/prettier.cjs" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/prettier/prettier?sponsor=1" + } + }, + "node_modules/proto-list": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/proto-list/-/proto-list-1.2.4.tgz", + "integrity": "sha512-vtK/94akxsTMhe0/cbfpR+syPuszcuwhqVjJq26CuNDgFGj682oRBXOP5MJpv2r7JtE8MsiepGIqvvOTBwn2vA==", + "dev": true, + "license": "ISC" + }, + "node_modules/punycode": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", + "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/resolve-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/run-applescript": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/run-applescript/-/run-applescript-7.1.0.tgz", + "integrity": "sha512-DPe5pVFaAsinSaV6QjQ6gdiedWDcRCbUuiQfQa2wmWV7+xC9bGulGI8+TdRmoFkAPaBXk8CrAbnlY2ISniJ47Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/semver": { + "version": "7.8.5", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.8.5.tgz", + "integrity": "sha512-Y7/KDsb8LjooZpwaqGyulO6DQlksgCncchHGk+sZIY4SBvUocMBEFH5Ur1fI4dV+Jvl0w6cjvucaIi40puRioA==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "license": "MIT", + "dependencies": { + "shebang-regex": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/signal-exit": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", + "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/source-map-support": { + "version": "0.5.21", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz", + "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==", + "dev": true, + "license": "MIT", + "dependencies": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + } + }, + "node_modules/string-width": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", + "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", + "dev": true, + "license": "MIT", + "dependencies": { + "eastasianwidth": "^0.2.0", + "emoji-regex": "^9.2.2", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/string-width-cjs": { + "name": "string-width", + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "license": "MIT", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/string-width-cjs/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/string-width-cjs/node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true, + "license": "MIT" + }, + "node_modules/string-width-cjs/node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-ansi": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.2.0.tgz", + "integrity": "sha512-yDPMNjp4WyfYBkHnjIRLfca1i6KMyGCtsVgoKe/z1+6vukgaENdgGBZt+ZmKPc4gavvEZ5OgHfHdrazhgNyG7w==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^6.2.2" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" + } + }, + "node_modules/strip-ansi-cjs": { + "name": "strip-ansi", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-ansi-cjs/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-json-comments": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/tinyglobby": { + "version": "0.2.17", + "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.17.tgz", + "integrity": "sha512-wXR/dYpcqKmfWpEdZjiKJOwCNFndD0DMnrW/cYjVGttEkBfVgcLFHoNrlj47mjOVic9yyNu65alsgF4NQyTa2g==", + "dev": true, + "license": "MIT", + "dependencies": { + "fdir": "^6.5.0", + "picomatch": "^4.0.4" + }, + "engines": { + "node": ">=12.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/SuperchupuDev" + } + }, + "node_modules/ts-api-utils": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-2.5.0.tgz", + "integrity": "sha512-OJ/ibxhPlqrMM0UiNHJ/0CKQkoKF243/AEmplt3qpRgkW8VG7IfOS41h7V8TjITqdByHzrjcS/2si+y4lIh8NA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18.12" + }, + "peerDependencies": { + "typescript": ">=4.8.4" + } + }, + "node_modules/tsx": { + "version": "4.23.13", + "resolved": "https://registry.npmjs.org/tsx/-/tsx-4.23.13.tgz", + "integrity": "sha512-BL5MGkRln6aDYhb0xbQlEAGw743BaZYWdbWtdJOBriYJboKgUUYCadFp2/FpBBZquBC/ezNBn7wMMPx7FDZUDw==", + "dev": true, + "license": "MIT", + "dependencies": { + "esbuild": "~0.28.0" + }, + "bin": { + "tsx": "dist/cli.mjs" + }, + "engines": { + "node": ">=18.0.0" + }, + "optionalDependencies": { + "fsevents": "~2.3.3" + } + }, + "node_modules/type-check": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", + "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", + "dev": true, + "license": "MIT", + "dependencies": { + "prelude-ls": "^1.2.1" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/typescript": { + "version": "5.9.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.3.tgz", + "integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==", + "dev": true, + "license": "Apache-2.0", + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, + "node_modules/typescript-eslint": { + "version": "8.70.0", + "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.70.0.tgz", + "integrity": "sha512-P/W5cz70/cQAuKfY3xwQMWWTV7BvJ0mAQmi+9mBcsVPaBUpd6Ohpa+fECv9rBFrQcig86jAiNBFNWUqnTjr4pw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/eslint-plugin": "8.70.0", + "@typescript-eslint/parser": "8.70.0", + "@typescript-eslint/typescript-estree": "8.70.0", + "@typescript-eslint/utils": "8.70.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", + "typescript": ">=4.8.4 <6.1.0" + } + }, + "node_modules/undici-types": { + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.21.0.tgz", + "integrity": "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/uri-js": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "punycode": "^2.1.0" + } + }, + "node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "license": "ISC", + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/word-wrap": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz", + "integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/wrap-ansi": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz", + "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^6.1.0", + "string-width": "^5.0.1", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/wrap-ansi-cjs": { + "name": "wrap-ansi", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/wrap-ansi-cjs/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/wrap-ansi-cjs/node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true, + "license": "MIT" + }, + "node_modules/wrap-ansi-cjs/node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "license": "MIT", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/wrap-ansi-cjs/node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/wrap-ansi/node_modules/ansi-styles": { + "version": "6.2.3", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.3.tgz", + "integrity": "sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/wsl-utils": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/wsl-utils/-/wsl-utils-1.0.0.tgz", + "integrity": "sha512-Hl0ZOAs672vg+06kfujwRhoS6/jehvULrlFkuF2dRu6pHgA8U06h3xqNIqNNU1LTXPcedxByAR4GS6pwQK0mgA==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-wsl": "^3.1.0", + "powershell-utils": "^0.1.0" + }, + "engines": { + "node": ">=20" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/wsl-utils/node_modules/powershell-utils": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/powershell-utils/-/powershell-utils-0.1.0.tgz", + "integrity": "sha512-dM0jVuXJPsDN6DvRpea484tCUaMiXWjuCn++HGTqUWzGDjv5tZkEZldAJ/UMlqRYGFrD/etByo4/xOuC/snX2A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=20" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/yocto-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + } + } +} diff --git a/package.json b/package.json new file mode 100644 index 0000000..12f685b --- /dev/null +++ b/package.json @@ -0,0 +1,33 @@ +{ + "name": "green-tea-plugins", + "private": true, + "license": "MIT", + "type": "module", + "workspaces": ["packages/*"], + "engines": { + "node": ">=22" + }, + "scripts": { + "lint": "eslint --no-error-on-unmatched-pattern packages test", + "format": "prettier --write \"packages/*/{src,test}/**/*.ts\" \"test/**/*.ts\"", + "format:check": "prettier --check \"packages/*/{src,test}/**/*.ts\" \"test/**/*.ts\"", + "complexity:check": "node scripts/check-complexity.mjs", + "typecheck": "tsc --noEmit -p tsconfig.json", + "test": "node --import tsx --test test/*.test.ts packages/*/test/*.test.ts", + "test:deno": "node scripts/run-runtime.mjs deno", + "test:bun": "node scripts/run-runtime.mjs bun", + "test:edge": "node scripts/run-runtime.mjs workerd", + "prepare": "git config core.hooksPath .githooks || true" + }, + "devDependencies": { + "@eslint/js": "^9.39.5", + "@stylistic/eslint-plugin": "^5.10.0", + "@types/node": "^22.0.0", + "cognitive-complexity-ts": "^0.8.2", + "eslint": "^9.39.5", + "prettier": "^3.9.6", + "tsx": "^4.23.5", + "typescript": "^5.5.0", + "typescript-eslint": "^8.70.0" + } +} diff --git a/scripts/check-complexity.mjs b/scripts/check-complexity.mjs new file mode 100644 index 0000000..aab8a6a --- /dev/null +++ b/scripts/check-complexity.mjs @@ -0,0 +1,53 @@ +#!/usr/bin/env node +// Cognitive-complexity gate over every package's src. Fails (exit 1) if any named function exceeds the +// threshold. Same gate as core's, walked per package because ccts-json takes one directory. +import { execSync } from 'node:child_process'; +import { existsSync, readdirSync } from 'node:fs'; + +const THRESHOLD = 25; + +function scores(dir) { + try { + return execSync(`npx ccts-json ${dir}`, { encoding: 'utf8', stdio: ['ignore', 'pipe', 'ignore'] }); + } catch (error) { + return error.stdout?.toString() ?? ''; + } +} + +const offenders = []; + +function walk(node, dir) { + if (!node || typeof node !== 'object') return; + if (node.kind === 'function' && node.name && node.score > THRESHOLD) { + offenders.push({ score: node.score, name: `${dir}: ${node.name}` }); + } + + for (const [key, value] of Object.entries(node)) { + if (key === 'inner' && Array.isArray(value)) value.forEach((child) => walk(child, dir)); + else if (value && typeof value === 'object') walk(value, dir); + } +} + +const dirs = readdirSync('packages') + .map((name) => `packages/${name}/src`) + .filter((dir) => existsSync(dir)); + +for (const dir of dirs) { + const raw = scores(dir); + if (!raw.trim()) { + console.error(`check-complexity: no output from ccts-json for ${dir}`); + process.exit(2); + } + + walk(JSON.parse(raw), dir); +} + +if (offenders.length) { + offenders.sort((a, b) => b.score - a.score); + console.error(`\n✖ cognitive complexity: ${offenders.length} function(s) over ${THRESHOLD}\n`); + for (const o of offenders) console.error(` ${String(o.score).padStart(4)} ${o.name}`); + console.error('\nExtract helpers to bring them under the threshold. The threshold is not raised.\n'); + process.exit(1); +} + +console.log(`✓ cognitive complexity: every function ≤ ${THRESHOLD} (${dirs.length} package(s))`); diff --git a/scripts/run-runtime.mjs b/scripts/run-runtime.mjs new file mode 100644 index 0000000..a6be2cf --- /dev/null +++ b/scripts/run-runtime.mjs @@ -0,0 +1,41 @@ +#!/usr/bin/env node +// Runs the contract tests of every package whose `engines` declares , on that runtime. +// `engines` is the one declaration (convention rule 9): a package that does not claim a runtime is not +// tested on it, and a package that claims one cannot skip it. +// +// Usage: node scripts/run-runtime.mjs +import { spawnSync } from 'node:child_process'; +import { readdirSync, readFileSync } from 'node:fs'; + +const COMMANDS = { + deno: (dirs) => ['deno', ['test', '--allow-all', '--no-check', ...dirs.map((dir) => `packages/${dir}/test/`)]], + bun: (dirs) => ['bun', ['test', ...dirs.map((dir) => `./packages/${dir}/test/`)]], +}; + +const runtime = process.argv[2]; +if (!(runtime in COMMANDS) && runtime !== 'workerd') { + console.error('usage: run-runtime.mjs '); + process.exit(2); +} + +const declares = (dir) => { + const { engines = {} } = JSON.parse(readFileSync(`packages/${dir}/package.json`, 'utf8')); + return runtime in engines; +}; +const dirs = readdirSync('packages').filter(declares); + +if (dirs.length === 0) { + console.log(`no package declares ${runtime}; nothing to run`); + process.exit(0); +} + +// There is no workerd harness for plugins yet (spec, section 4). A package that declares workerd must +// not pass CI by having nothing run against it — copy core's test/edge harness first. +if (runtime === 'workerd') { + console.error(`${dirs.join(', ')} declare workerd, and there is no workerd harness yet.`); + process.exit(1); +} + +const [command, args] = COMMANDS[runtime](dirs); +const { status } = spawnSync(command, args, { stdio: 'inherit' }); +process.exit(status ?? 1); diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 0000000..368bf5c --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,18 @@ +{ + "compilerOptions": { + "target": "es2022", + "module": "preserve", + "moduleResolution": "bundler", + "lib": ["es2022"], + "types": ["node"], + "strict": true, + "noEmit": true, + "allowImportingTsExtensions": true, + "verbatimModuleSyntax": true, + "skipLibCheck": true, + "experimentalDecorators": true, + "emitDecoratorMetadata": true, + "forceConsistentCasingInFileNames": true + }, + "include": ["packages/*/src", "packages/*/test", "test"] +} -- 2.54.1 From 42a2f490e863b3ea73e7b6e71743db61650f296e Mon Sep 17 00:00:00 2001 From: Diego Resendez Date: Thu, 17 Sep 2026 23:02:12 -0500 Subject: [PATCH 02/24] test: check each package against the plugin convention Rules 8 and 9 are the two a reviewer cannot see from a diff: where core sits in package.json, and whether engines, the README table and JSR still agree. A static test makes a drift fail the build instead of reaching a user. Signed-off-by: Diego Resendez --- deno.json | 2 +- package-lock.json | 61 +++++++++++++++++++++++ packages/jwt/CHANGELOG.md | 9 ++++ packages/jwt/README.md | 46 ++++++++++++++++++ packages/jwt/deno.json | 13 +++++ packages/jwt/package.json | 28 +++++++++++ test/workspace.test.ts | 100 ++++++++++++++++++++++++++++++++++++++ 7 files changed, 258 insertions(+), 1 deletion(-) create mode 100644 packages/jwt/CHANGELOG.md create mode 100644 packages/jwt/README.md create mode 100644 packages/jwt/deno.json create mode 100644 packages/jwt/package.json create mode 100644 test/workspace.test.ts diff --git a/deno.json b/deno.json index e0621d3..2a1b9db 100644 --- a/deno.json +++ b/deno.json @@ -1,5 +1,5 @@ { - "workspace": [], + "workspace": ["./packages/jwt"], "nodeModulesDir": "manual", "compilerOptions": { "experimentalDecorators": true, diff --git a/package-lock.json b/package-lock.json index a19c484..57a4435 100644 --- a/package-lock.json +++ b/package-lock.json @@ -610,6 +610,35 @@ "node": "^18.18.0 || ^20.9.0 || >=21.1.0" } }, + "node_modules/@green-tea/core": { + "version": "26.9.0-beta.2", + "resolved": "https://npm.svc.zoit.services/@green-tea/core/-/core-26.9.0-beta.2.tgz", + "integrity": "sha512-7np7bK5bG1M+bYPDA8YH4jlO3z2EHpuR0Ou8uFi4ywTFFCqHgtb6fmp4gBNHxPFTtFlxBvRHwj8DAHl7Y3b/Xg==", + "dev": true, + "license": "MIT", + "dependencies": { + "reflect-metadata": "0.2.2" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "busboy": "^1.6.0", + "ws": "^8.18.0" + }, + "peerDependenciesMeta": { + "busboy": { + "optional": true + }, + "ws": { + "optional": true + } + } + }, + "node_modules/@green-tea/jwt": { + "resolved": "packages/jwt", + "link": true + }, "node_modules/@humanfs/core": { "version": "0.19.2", "resolved": "https://registry.npmjs.org/@humanfs/core/-/core-0.19.2.tgz", @@ -1985,6 +2014,15 @@ "@pkgjs/parseargs": "^0.11.0" } }, + "node_modules/jose": { + "version": "6.2.12", + "resolved": "https://registry.npmjs.org/jose/-/jose-6.2.12.tgz", + "integrity": "sha512-9NiFmJEex0sy2Dk58j2UGBSHgUs2ypF9eZSu4L6vjOX3Dp96Sw1F3uL+H+D1sx02jZZdzUT0HgvCy59CuvXcWw==", + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/panva" + } + }, "node_modules/js-beautify": { "version": "1.15.4", "resolved": "https://registry.npmjs.org/js-beautify/-/js-beautify-1.15.4.tgz", @@ -2372,6 +2410,13 @@ "node": ">=6" } }, + "node_modules/reflect-metadata": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/reflect-metadata/-/reflect-metadata-0.2.2.tgz", + "integrity": "sha512-urBwgfrvVP/eAyXx4hluJivBKzuEbSQs9rKWCrCkbSxNv8mxPcUZKeuoF3Uy4mJl3Lwprp6yy5/39VWigZ4K6Q==", + "dev": true, + "license": "Apache-2.0" + }, "node_modules/resolve-from": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", @@ -2875,6 +2920,22 @@ "funding": { "url": "https://github.com/sponsors/sindresorhus" } + }, + "packages/jwt": { + "name": "@green-tea/jwt", + "version": "26.9.0-beta.0", + "license": "MIT", + "dependencies": { + "jose": "^6.2.12" + }, + "devDependencies": { + "@green-tea/core": "26.9.0-beta.2" + }, + "engines": { + "bun": ">=1.3", + "deno": ">=2", + "node": ">=22" + } } } } diff --git a/packages/jwt/CHANGELOG.md b/packages/jwt/CHANGELOG.md new file mode 100644 index 0000000..760dc67 --- /dev/null +++ b/packages/jwt/CHANGELOG.md @@ -0,0 +1,9 @@ +# Changelog + +## [Unreleased] + +### Added + +- `jwt({ keys, provides? })`: loads each JWK file while providers boot and publishes a `JwtRegistry` + under `provides` (default `jwt`). `Signer` signs with `iat` and a random `jti`, and verifies issuer + and audience. `JwtRegistry.publicJwk(name)` returns a key's public half for a JWKS endpoint. diff --git a/packages/jwt/README.md b/packages/jwt/README.md new file mode 100644 index 0000000..7993fe3 --- /dev/null +++ b/packages/jwt/README.md @@ -0,0 +1,46 @@ +# @green-tea/jwt + +Loads JWT signing keys at boot and publishes them into the graph as one registry. A handler asks for +it with `@needs('jwt')` and signs or verifies by key name. + +## Runtimes + +| Runtime | Supported | Why not | +|---|---|---| +| Node | ✅ | | +| Deno | ✅ | | +| Bun | ✅ | | +| workerd (edge) | ❌ | Reads the signing key from a file path, and workerd has no filesystem. | + +## Usage + +```ts +import { createApp } from '@green-tea/core'; +import { jwt } from '@green-tea/jwt'; + +const app = createApp({ + modules: [AuthModule], + plugins: [ + jwt({ + keys: { + access: { path: '/etc/keys/access.json', settings: { issuer: 'api', maxAge: '15m' } }, + refresh: { path: '/etc/keys/refresh.json', settings: { maxAge: '7d' } }, + }, + }), + ], +}); +``` + +```ts +@Post('/signin') +async signIn(@needs('jwt') jwt: JwtRegistry) { + return { token: await jwt.get('access').sign({ sub: user.id }) }; +} +``` + +Keys are read once, while providers boot. A missing or malformed key therefore fails `app.listen()` — +or `await app.boot()` on Deno and Bun — instead of the first sign-in of the day. Call `app.boot()` +before `Deno.serve` or `Bun.serve`; without it, the failure surfaces on every request instead. + +Two instances need two graph names: `jwt({ provides: 'serviceJwt', keys })` publishes under +`serviceJwt`, and the plugin takes that name too. diff --git a/packages/jwt/deno.json b/packages/jwt/deno.json new file mode 100644 index 0000000..10f5cb3 --- /dev/null +++ b/packages/jwt/deno.json @@ -0,0 +1,13 @@ +{ + "name": "@green-tea/jwt", + "version": "26.9.0-beta.0", + "license": "MIT", + "exports": "./src/index.ts", + "imports": { + "@green-tea/core": "npm:@green-tea/core@26.9.0-beta.2", + "jose": "npm:jose@^6.2.12" + }, + "publish": { + "include": ["src", "README.md", "CHANGELOG.md", "deno.json"] + } +} diff --git a/packages/jwt/package.json b/packages/jwt/package.json new file mode 100644 index 0000000..520b986 --- /dev/null +++ b/packages/jwt/package.json @@ -0,0 +1,28 @@ +{ + "name": "@green-tea/jwt", + "version": "26.9.0-beta.0", + "private": true, + "description": "Loads JWT signing keys at boot and publishes a sign/verify registry into the green-tea graph.", + "license": "MIT", + "author": "green-tea contributors ", + "type": "module", + "repository": { + "type": "git", + "url": "git+https://github.com/Expressive-Tea/green-tea-plugins.git", + "directory": "packages/jwt" + }, + "engines": { + "node": ">=22", + "deno": ">=2", + "bun": ">=1.3" + }, + "exports": { + ".": "./src/index.ts" + }, + "dependencies": { + "jose": "^6.2.12" + }, + "devDependencies": { + "@green-tea/core": "26.9.0-beta.2" + } +} diff --git a/test/workspace.test.ts b/test/workspace.test.ts new file mode 100644 index 0000000..5070eee --- /dev/null +++ b/test/workspace.test.ts @@ -0,0 +1,100 @@ +import { strict as assert } from 'node:assert'; +import { existsSync, readdirSync, readFileSync } from 'node:fs'; +import { join } from 'node:path'; +import { test } from 'node:test'; + +// Static checks for convention rules 8 and 9 and for npm provenance. They read files only, so they run +// under Node alone; the contract tests are what run on every runtime. + +const ROOT = join(import.meta.dirname, '..'); +const RUNTIMES = new Set(['node', 'deno', 'bun', 'workerd']); +// The README names runtimes for people; `engines` names them for tools. This is the whole mapping. +const README_RUNTIMES: Record = { Node: 'node', Deno: 'deno', Bun: 'bun', 'workerd (edge)': 'workerd' }; + +interface PackageJson { + name: string; + version: string; + engines?: Record; + dependencies?: Record; + devDependencies?: Record; + peerDependencies?: Record; + repository?: { type?: string; url?: string; directory?: string }; +} + +interface DenoJson { + name?: string; + version?: string; + imports?: Record; + workspace?: string[]; +} + +const readJson = (...path: string[]): T => JSON.parse(readFileSync(join(ROOT, ...path), 'utf8')) as T; + +const packages = existsSync(join(ROOT, 'packages')) + ? readdirSync(join(ROOT, 'packages'), { withFileTypes: true }) + .filter((entry) => entry.isDirectory()) + .map((entry) => entry.name) + : []; + +/** Rows of the README's `## Runtimes` table, as `[runtime, supported]`. */ +function runtimeRows(readme: string): Array<[string, boolean]> { + const section = readme.split(/^## /m).find((part) => part.startsWith('Runtimes')); + assert.ok(section, 'README has no "## Runtimes" section'); + + return section + .split('\n') + .map((line) => line.split('|').map((cell) => cell.trim())) + .filter((cells) => cells[1] in README_RUNTIMES) + .map((cells) => [README_RUNTIMES[cells[1]], cells[2] === '✅']); +} + +test('the workspace has at least one package', () => { + assert.ok(packages.length > 0, 'no directories under packages/'); +}); + +for (const dir of packages) { + const pkg = readJson('packages', dir, 'package.json'); + const deno = readJson('packages', dir, 'deno.json'); + + test(`${dir}: npm and JSR publish the same package at the same version`, () => { + assert.equal(pkg.name, `@green-tea/${dir}`); + assert.equal(deno.name, pkg.name); + assert.equal(deno.version, pkg.version); + }); + + test(`${dir}: core is a dev dependency only`, () => { + assert.ok(pkg.devDependencies?.['@green-tea/core'], 'core missing from devDependencies'); + assert.equal(pkg.dependencies?.['@green-tea/core'], undefined, 'core in dependencies'); + assert.equal(pkg.peerDependencies?.['@green-tea/core'], undefined, 'core in peerDependencies'); + }); + + test(`${dir}: JSR maps the core version npm installs`, () => { + assert.equal(deno.imports?.['@green-tea/core'], `npm:@green-tea/core@${pkg.devDependencies?.['@green-tea/core']}`); + }); + + test(`${dir}: engines declares runtimes, and only known ones`, () => { + const keys = Object.keys(pkg.engines ?? {}); + assert.ok(keys.length > 0, 'engines is empty'); + for (const key of keys) assert.ok(RUNTIMES.has(key), `unknown engines key "${key}"`); + }); + + test(`${dir}: the README lists all four runtimes, and ✅ exactly the engines keys`, () => { + const rows = runtimeRows(readFileSync(join(ROOT, 'packages', dir, 'README.md'), 'utf8')); + assert.deepEqual(rows.map(([runtime]) => runtime).sort(), [...RUNTIMES].sort()); + + const supported = rows.filter(([, ok]) => ok).map(([runtime]) => runtime); + assert.deepEqual(supported.sort(), Object.keys(pkg.engines ?? {}).sort()); + }); + + test(`${dir}: npm provenance points at the public repository and this directory`, () => { + assert.deepEqual(pkg.repository, { + type: 'git', + url: 'git+https://github.com/Expressive-Tea/green-tea-plugins.git', + directory: `packages/${dir}`, + }); + }); + + test(`${dir}: the Deno workspace includes it`, () => { + assert.ok(readJson('deno.json').workspace?.includes(`./packages/${dir}`)); + }); +} -- 2.54.1 From 1c0b6bde911c09d4ca1cbdaebb3c65ed84e1bb17 Mon Sep 17 00:00:00 2001 From: Diego Resendez Date: Thu, 17 Sep 2026 23:11:55 -0500 Subject: [PATCH 03/24] feat(jwt): load signing keys at boot as a named plugin MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Extracted from patitas-peludas onto the object plugin contract. Core is a type import only, so installing the plugin never drags in a second core or a version warning; a bad key still fails boot, which the contract tests now pin. The extraction moves from jose 5 to jose 6, and that is not a version bump: jose 6 refuses a private CryptoKey in jwtVerify, where jose 5 accepted one and derived the public half itself. The original keeps a single key per signer and verifies with the key it signed with, which works on 5 and throws "CryptoKey instances must be of type public" on 6 — for every asymmetric algorithm, so ES*, RS*, PS* and EdDSA alike. Symmetric keys are unaffected, which is exactly why one HS256 test would have shipped it. importJWKKey now imports the key twice for an asymmetric pair: as given, to sign with, and with the private fields stripped, to verify with. A symmetric key has no public half, so it keeps one secret for both. The round-trip is covered per algorithm family rather than once, because one algorithm is not coverage — it is the gap the defect lived in. The get() helper in the contract tests is generic in its body: Response.json() is typed Promise, so reaching into the payload did not typecheck. Signed-off-by: Diego Resendez --- packages/jwt/src/index.ts | 87 +++++++++++++++++++++++ packages/jwt/src/keys.ts | 59 ++++++++++++++++ packages/jwt/src/signer.ts | 66 ++++++++++++++++++ packages/jwt/src/types.ts | 41 +++++++++++ packages/jwt/test/jwt.test.ts | 128 ++++++++++++++++++++++++++++++++++ test/helpers.ts | 24 +++++++ 6 files changed, 405 insertions(+) create mode 100644 packages/jwt/src/index.ts create mode 100644 packages/jwt/src/keys.ts create mode 100644 packages/jwt/src/signer.ts create mode 100644 packages/jwt/src/types.ts create mode 100644 packages/jwt/test/jwt.test.ts create mode 100644 test/helpers.ts diff --git a/packages/jwt/src/index.ts b/packages/jwt/src/index.ts new file mode 100644 index 0000000..e51ea03 --- /dev/null +++ b/packages/jwt/src/index.ts @@ -0,0 +1,87 @@ +import type { Plugin } from '@green-tea/core'; +import type { JWK } from 'jose'; + +import { importJWKKey, readPublicJWK } from './keys.ts'; +import { Signer } from './signer.ts'; +import type { JwtKeyConfig, JwtOptions } from './types.ts'; + +export { Signer } from './signer.ts'; +export { importJWKKey, readPublicJWK } from './keys.ts'; +export type { ImportedJWK, JwtKeyConfig, JwtOptions, JwtSettings, KeyMaterial } from './types.ts'; + +/** The value published into the graph: every configured signer, by name. */ +export class JwtRegistry { + constructor( + private readonly signers: Map, + private readonly paths: Map, + ) {} + + get(name: Name): Signer { + const signer = this.signers.get(name); + // Reachable only through a typo in a key name — the configured set is fixed at boot. + if (!signer) throw new Error(`Unknown JWT signer "${name}". Configured: ${[...this.signers.keys()].join(', ')}`); + return signer; + } + + names(): Name[] { + return [...this.signers.keys()]; + } + + /** The public half of a key, for serving at a JWKS endpoint. */ + async publicJwk(name: Name): Promise { + const path = this.paths.get(name); + if (!path) throw new Error(`Unknown JWT signer "${name}"`); + return await readPublicJWK(path); + } +} + +async function loadRegistry(entries: Array<[Name, JwtKeyConfig]>): Promise> { + const signers = new Map(); + const paths = new Map(); + + for (const [name, config] of entries) { + signers.set(name, new Signer(await importJWKKey(config.path), config.settings)); + paths.set(name, config.path); + } + + return new JwtRegistry(signers, paths); +} + +/** + * Loads signing keys while providers boot and publishes them as one graph node. + * + * Keys are read once, in the provider's `run`, so a missing or malformed key fails `app.listen()` or + * `app.boot()` instead of turning the first sign-in of the day into a 500. Nothing loads lazily and + * nothing is cached in the module registry. A key read once holds nothing open, so there is no + * `onShutdown` (convention rule 7). + * + * @example + * const app = createApp({ + * modules: [AuthModule], + * plugins: [jwt({ keys: { access: { path: '/etc/keys/access.json', settings: { maxAge: '15m' } } } })], + * }); + * + * @example In a handler. + * ⁣@Post('/signin') + * async signIn(@needs('jwt') jwt: JwtRegistry) { + * return { token: await jwt.get('access').sign({ sub: user.id }) }; + * } + */ +export function jwt(options: JwtOptions): Plugin { + const provides = options.provides ?? 'jwt'; + const entries = Object.entries(options.keys) as Array<[Name, JwtKeyConfig]>; + + return { + // Rule 2: plugin name, node name and provided token are one string. + name: provides, + mount({ scope }) { + scope.add({ + kind: 'provider', + name: provides, + needs: [], + provides: [provides], + run: async () => ({ [provides]: await loadRegistry(entries) }), + }); + }, + }; +} diff --git a/packages/jwt/src/keys.ts b/packages/jwt/src/keys.ts new file mode 100644 index 0000000..6c21849 --- /dev/null +++ b/packages/jwt/src/keys.ts @@ -0,0 +1,59 @@ +import { readFile } from 'node:fs/promises'; + +import { importJWK, type JWK } from 'jose'; + +import type { ImportedJWK, KeyMaterial } from './types.ts'; + +/** + * Reads a JWK from disk. + * + * `readFile` + `JSON.parse` rather than `await import(path)`: a dynamic import of a JSON file is cached + * by the module registry for the life of the process, resolves differently under CommonJS and ESM, and + * puts private key material into a module cache anything in the process can read. + */ +async function readJWK(filePath: string): Promise { + return JSON.parse(await readFile(filePath, 'utf8')) as JWK; +} + +const PRIVATE_FIELDS = new Set(['d', 'p', 'q', 'dp', 'dq', 'qi', 'oth', 'key_ops']); + +/** Whether the key is symmetric, in which case one secret both signs and verifies. */ +function isSymmetric(jwk: JWK): boolean { + return jwk.kty === 'oct' || 'k' in jwk; +} + +/** The same JWK with every private field removed. */ +function publicHalf(jwk: JWK): JWK { + return Object.fromEntries(Object.entries(jwk).filter(([field]) => !PRIVATE_FIELDS.has(field))) as JWK; +} + +/** + * Reads and imports a JWK file, keeping the algorithm and key id it declares. + * + * Imports the key **twice** for an asymmetric pair: once as given, to sign with, and once with the + * private fields stripped, to verify with. That is not redundancy — jose 6 rejects a private + * `CryptoKey` in `jwtVerify` with `CryptoKey instances must be of type "public"`, where jose 5 + * accepted one and derived the public half itself. A signer that kept a single key therefore signed + * fine and threw on every verification, for every asymmetric algorithm, which is all of ES*, RS*, + * PS* and EdDSA. + * + * A symmetric key has no public half to derive, so it verifies with the same secret it signs with. + */ +export async function importJWKKey(filePath: string): Promise { + const jwk = await readJWK(filePath); + const key: KeyMaterial = await importJWK(jwk, jwk.alg); + const verifyKey: KeyMaterial = isSymmetric(jwk) ? key : await importJWK(publicHalf(jwk), jwk.alg); + + return { key, verifyKey, alg: jwk.alg, kid: jwk.kid }; +} + +/** Strips every private field, so the result is safe to serve at a JWKS endpoint. */ +export async function readPublicJWK(filePath: string): Promise { + const jwk = await readJWK(filePath); + + if (isSymmetric(jwk)) { + throw new Error('A JWKS endpoint requires an asymmetric key; a symmetric JWK has no public half to publish.'); + } + + return { ...publicHalf(jwk), use: 'sig', key_ops: ['verify'] }; +} diff --git a/packages/jwt/src/signer.ts b/packages/jwt/src/signer.ts new file mode 100644 index 0000000..8f56af8 --- /dev/null +++ b/packages/jwt/src/signer.ts @@ -0,0 +1,66 @@ +import { SignJWT, errors, jwtVerify, type JWTPayload } from 'jose'; + +import type { ImportedJWK, JwtSettings, KeyMaterial } from './types.ts'; + +/** Signs and verifies with one key. */ +export class Signer { + private readonly key: KeyMaterial; + /** Separate from `key`: jose 6 will not verify with a private one. See `importJWKKey`. */ + private readonly verifyKey: KeyMaterial; + private readonly algorithm: string; + private readonly kid?: string; + + constructor( + jwk: ImportedJWK, + private readonly settings: JwtSettings = {}, + ) { + this.key = jwk.key; + this.verifyKey = jwk.verifyKey; + this.algorithm = jwk.alg ?? ''; + this.kid = jwk.kid; + } + + /** + * Issues a token, stamping `iat` and a random `jti`. + * + * The `jti` is what makes a token revocable — without it the only way to retire a token early is to + * rotate the key and invalidate everyone's. `crypto.randomUUID` is the Web Crypto global, present on + * every runtime this package declares, so nothing is imported from `node:crypto`. + */ + async sign(payload: T & JWTPayload, overrides: JwtSettings = {}): Promise { + const { audience, issuer, maxAge } = { ...this.settings, ...overrides }; + const jwt = new SignJWT(payload).setProtectedHeader({ alg: this.algorithm, kid: this.kid }); + + if (audience) jwt.setAudience(audience); + if (issuer) jwt.setIssuer(issuer); + jwt.setIssuedAt(); + jwt.setJti(crypto.randomUUID()); + if (maxAge) jwt.setExpirationTime(maxAge); + + return await jwt.sign(this.key); + } + + /** + * Verifies signature, issuer and audience. + * + * @param ignoreExpiration returns the payload of an expired token instead of throwing. Only for refresh + * flows that need the claims of a token they already know has expired — never for authenticating a + * request. + */ + async verify(token: string, ignoreExpiration = false): Promise { + const { issuer, audience } = this.settings; + + try { + const { payload } = await jwtVerify(token, this.verifyKey, { issuer, audience }); + return payload as T; + } catch (error) { + if (ignoreExpiration && error instanceof errors.JWTExpired) return error.payload as T; + throw error; + } + } + + /** Signs with no managed claims — no audience, issuer, expiry or jti. */ + async signUnmanaged(payload: T & JWTPayload): Promise { + return await new SignJWT(payload).setProtectedHeader({ alg: this.algorithm, kid: this.kid }).sign(this.key); + } +} diff --git a/packages/jwt/src/types.ts b/packages/jwt/src/types.ts new file mode 100644 index 0000000..56a301d --- /dev/null +++ b/packages/jwt/src/types.ts @@ -0,0 +1,41 @@ +import type { CryptoKey, JWK } from 'jose'; + +/** What jose signs and verifies with: an imported asymmetric key, or the bytes of a symmetric one. */ +export type KeyMaterial = CryptoKey | Uint8Array; + +/** A JWK imported from disk, with the algorithm and key id it declares. */ +export interface ImportedJWK { + /** Signs. The private half of an asymmetric pair, or the secret of a symmetric key. */ + key: KeyMaterial; + /** + * Verifies. The public half for an asymmetric key, and the same secret again for a symmetric one. + * + * Kept separate because jose 6 refuses a private `CryptoKey` in `jwtVerify` — see `importJWKKey`. + */ + verifyKey: KeyMaterial; + alg?: string; + kid?: string; +} + +/** Claim defaults applied to every token a signer issues. */ +export interface JwtSettings { + audience?: string; + issuer?: string; + /** Anything jose's `setExpirationTime` accepts — `'15m'`, `'1h'`, a timestamp. */ + maxAge?: string; +} + +export interface JwtKeyConfig { + /** Path to a JWK file. Resolved as given, so pass an absolute path if unsure. */ + path: string; + settings?: JwtSettings; +} + +export interface JwtOptions { + /** One entry per signing key. The names become the keys of the published registry. */ + keys: Record; + /** Graph name the registry is published under, and the plugin's name. Defaults to `jwt`. */ + provides?: string; +} + +export type { JWK }; diff --git a/packages/jwt/test/jwt.test.ts b/packages/jwt/test/jwt.test.ts new file mode 100644 index 0000000..c51c3d0 --- /dev/null +++ b/packages/jwt/test/jwt.test.ts @@ -0,0 +1,128 @@ +import { strict as assert } from 'node:assert'; +import { mkdtemp, writeFile } from 'node:fs/promises'; +import { tmpdir } from 'node:os'; +import { join } from 'node:path'; +import { test } from 'node:test'; + +import { createApp } from '@green-tea/core'; +import { exportJWK, generateKeyPair, generateSecret } from 'jose'; + +import { probeModule } from '../../../test/helpers.ts'; +import { importJWKKey, jwt, Signer, type JwtRegistry } from '../src/index.ts'; + +// One key file for the whole file, written once. A promise rather than a `before` hook: only flat +// `test()` is relied on, because this file runs unchanged under Node, Deno and Bun. +const keyFile = (async () => { + const { privateKey } = await generateKeyPair('ES256', { extractable: true }); + const path = join(await mkdtemp(join(tmpdir(), 'green-tea-jwt-')), 'access.json'); + await writeFile(path, JSON.stringify({ ...(await exportJWK(privateKey)), alg: 'ES256', kid: 'test' })); + return path; +})(); + +// Generic in the body: `Response.json()` is typed `Promise`, so a caller that reaches into +// the payload has to say what it expects. The default keeps the deepEqual callers untouched. +const get = async ( + app: { fetch(request: Request): Promise }, + path: string, +): Promise<{ status: number; body: T }> => { + const response = await app.fetch(new Request(`http://plugin.test${path}`)); + return { status: response.status, body: (await response.json()) as T }; +}; + +test('a handler signs and verifies through the published registry', async () => { + const app = createApp({ + modules: [ + probeModule('jwt', async (registry: JwtRegistry) => { + const signer = registry.get('access'); + return (await signer.verify<{ sub: string }>(await signer.sign({ sub: '42' }))).sub; + }), + ], + plugins: [jwt({ keys: { access: { path: await keyFile } } })], + }); + + assert.deepEqual(await get(app, '/jwt/probe'), { status: 200, body: { value: '42' } }); +}); + +test('publicJwk serves the public half only', async () => { + const app = createApp({ + modules: [probeModule('jwt', (registry: JwtRegistry) => registry.publicJwk('access'))], + plugins: [jwt({ keys: { access: { path: await keyFile } } })], + }); + + const { body } = await get<{ value: Record }>(app, '/jwt/probe'); + + assert.equal('d' in body.value, false); + assert.equal(body.value.use, 'sig'); + assert.deepEqual(body.value.key_ops, ['verify']); +}); + +// Convention rule 4: the promise the plugin makes is that a bad key is a startup failure. +test('a key file that does not exist fails app.boot(), naming the provider', async () => { + const app = createApp({ + modules: [probeModule('jwt', () => null)], + plugins: [jwt({ keys: { access: { path: join(tmpdir(), 'green-tea-jwt-missing', 'nope.json') } } })], + }); + + await assert.rejects(app.boot(), /provider 'jwt' failed/); +}); + +test('a key file that is not a JWK fails app.boot() too', async () => { + const path = join(await mkdtemp(join(tmpdir(), 'green-tea-jwt-')), 'broken.json'); + await writeFile(path, 'not json'); + const app = createApp({ modules: [probeModule('jwt', () => null)], plugins: [jwt({ keys: { access: { path } } })] }); + + await assert.rejects(app.boot(), /provider 'jwt' failed/); +}); + +// Convention rule 2, checked where it bites: two instances in one app. +test('two instances with different provides both answer, without colliding', async () => { + const path = await keyFile; + const app = createApp({ + modules: [ + probeModule('userJwt', (registry: JwtRegistry) => registry.names()), + probeModule('serviceJwt', (registry: JwtRegistry) => registry.names()), + ], + plugins: [ + jwt({ provides: 'userJwt', keys: { user: { path } } }), + jwt({ provides: 'serviceJwt', keys: { service: { path } } }), + ], + }); + + assert.deepEqual(await get(app, '/userJwt/probe'), { status: 200, body: { value: ['user'] } }); + assert.deepEqual(await get(app, '/serviceJwt/probe'), { status: 200, body: { value: ['service'] } }); +}); + +test('the plugin is named after what it provides', () => { + assert.equal(jwt({ keys: {} }).name, 'jwt'); + assert.equal(jwt({ provides: 'serviceJwt', keys: {} }).name, 'serviceJwt'); +}); + +// One algorithm is not coverage. A signer that verified with the key it signed with passed every +// symmetric test and threw `CryptoKey instances must be of type "public"` on every asymmetric one — +// which is all of ES*, RS*, PS* and EdDSA, and in practice every key anyone signs a session with. +// jose 5 accepted a private key here and derived the public half itself; jose 6 does not, so the +// defect only appears on the upgrade. Each family is listed so the next one to break says which. +for (const [alg, kind] of [ + ['EdDSA', 'asymmetric'], + ['ES256', 'asymmetric'], + ['RS256', 'asymmetric'], + ['HS256', 'symmetric'], +] as const) { + test(`round-trips a token signed with ${alg} (${kind})`, async () => { + const path = join(await mkdtemp(join(tmpdir(), 'green-tea-jwt-alg-')), `${alg}.json`); + + if (kind === 'symmetric') { + await writeFile( + path, + JSON.stringify({ ...(await exportJWK(await generateSecret(alg, { extractable: true }))), alg }), + ); + } else { + const { privateKey } = await generateKeyPair(alg, { extractable: true }); + await writeFile(path, JSON.stringify({ ...(await exportJWK(privateKey)), alg, kid: alg })); + } + + const signer = new Signer(await importJWKKey(path)); + + assert.equal((await signer.verify<{ sub: string }>(await signer.sign({ sub: 'u1' }))).sub, 'u1'); + }); +} diff --git a/test/helpers.ts b/test/helpers.ts new file mode 100644 index 0000000..e48cfb2 --- /dev/null +++ b/test/helpers.ts @@ -0,0 +1,24 @@ +import { Get, Module, Route, needs } from '@green-tea/core'; + +/** + * A module with one route, `GET //probe`, whose handler receives `@needs(token)` and answers + * `{ value: await read(value) }`. + * + * It gives a plugin's node a consumer, which is how an application reaches it too — so a contract test + * exercises the plugin through `createApp` and `app.fetch` rather than by calling `mount` by hand. + * The token doubles as the mountpoint, so two probes for two instances of one plugin cannot collide. + */ +export function probeModule(token: string, read: (value: any) => unknown) { + @Route('/') + class Probe { + @Get('/probe') + async probe(@needs(token) value: unknown) { + return { value: await read(value) }; + } + } + + @Module({ mountpoint: `/${token}`, controllers: [Probe] }) + class ProbeModule {} + + return ProbeModule; +} -- 2.54.1 From 7be37f518421be8aa6736380749fa69e2870211f Mon Sep 17 00:00:00 2001 From: Diego Resendez Date: Thu, 17 Sep 2026 23:18:22 -0500 Subject: [PATCH 04/24] ci: gate every package on Gitea Lint, format, complexity, typecheck and the Node suite on the engines floor, then Deno and Bun for the packages that declare them. Gitea only until core comes from npm, because the version these packages build against lives on Verdaccio. The JSR dry-run is kept rather than deferred: it passes locally on Deno 2.9.6, because `nodeModulesDir: manual` resolves core from the tree `npm ci` installed, so JSR's checker never needs that version to exist on npm. Signed-off-by: Diego Resendez --- .github/workflows/ci.yml | 88 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 88 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..7338ef7 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,88 @@ +name: CI + +# Gitea only, for now. Every package builds against @green-tea/core@26.9.0-beta.2, which exists on +# Verdaccio alone, and a GitHub runner cannot reach Verdaccio. Plan B3 moves the packages to a core on +# npm, removes these guards and adds the GitHub mirror; until then GitHub has no copy to run against. +on: + push: + branches: [develop, main] + pull_request: + branches: [develop, main] + +jobs: + # Its own job so a missing sign-off reports on its own and costs nothing on push. Checks that the + # trailer is present, not that it matches the author. + dco: + if: github.event_name == 'pull_request' && github.server_url != 'https://github.com' + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: Every commit needs a Signed-off-by + env: + RANGE: ${{ github.event.pull_request.base.sha }}..${{ github.event.pull_request.head.sha }} + run: | + missing=0 + for sha in $(git rev-list --no-merges "$RANGE"); do + if ! git show -s --format='%(trailers:key=Signed-off-by,valueonly)' "$sha" | grep -q '[^[:space:]]'; then + echo "::error::no Signed-off-by: $(git show -s --format='%h %s' "$sha")" + missing=1 + fi + done + if [ "$missing" = 1 ]; then + echo "Fix the whole branch with: git rebase --signoff ${{ github.event.pull_request.base.sha }}" + exit 1 + fi + echo "All commits signed off." + + # Node 22 is the lowest `engines.node` any package declares (spec 2.5: build on the floor). + build: + if: github.server_url != 'https://github.com' + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: '22' + - name: Authenticate to Verdaccio + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH }} + run: npm config set //npm.svc.zoit.services/:_authToken "$NODE_AUTH_TOKEN" + - run: npm ci + - run: npm run lint + - run: npm run format:check + - run: npm run complexity:check + - run: npm run typecheck + - run: npm test + + # A fixed matrix, not `fromJSON`: Gitea Actions support for a dynamic matrix was not verified. Each + # entry runs only the packages whose engines name that runtime (scripts/run-runtime.mjs). + runtimes: + if: github.server_url != 'https://github.com' + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + runtime: [deno, bun, edge] + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: '22' + - name: Authenticate to Verdaccio + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH }} + run: npm config set //npm.svc.zoit.services/:_authToken "$NODE_AUTH_TOKEN" + - run: npm ci + - if: matrix.runtime == 'deno' + uses: denoland/setup-deno@v2 + with: + deno-version: v2.x + - if: matrix.runtime == 'bun' + uses: oven-sh/setup-bun@v2 + - run: npm run test:${{ matrix.runtime }} + # Kept because it passed locally on Deno 2.9.6: `nodeModulesDir: manual` resolves core from the + # tree `npm ci` installed, so JSR's checker never needs the version to exist on npm. + - if: matrix.runtime == 'deno' + run: deno publish --dry-run -- 2.54.1 From 74f297dafdc79306a665fd5f6d4afda90faf1054 Mon Sep 17 00:00:00 2001 From: Diego Resendez Date: Fri, 18 Sep 2026 13:17:12 -0500 Subject: [PATCH 05/24] test: pick the child-process command from the host runtime MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The exit test spawns a probe and asserts it dies on its own, and the contract files run unchanged on three runtimes — so the argv has to be decided at run time rather than written for Node and skipped elsewhere. Signed-off-by: Diego Resendez --- test/helpers.test.ts | 11 +++++++++++ test/helpers.ts | 25 +++++++++++++++++++++++++ 2 files changed, 36 insertions(+) create mode 100644 test/helpers.test.ts diff --git a/test/helpers.test.ts b/test/helpers.test.ts new file mode 100644 index 0000000..aa812e9 --- /dev/null +++ b/test/helpers.test.ts @@ -0,0 +1,11 @@ +import { strict as assert } from 'node:assert'; +import { test } from 'node:test'; + +import { runtimeCommand } from './helpers.ts'; + +test('runtimeCommand names an executable and passes the script last', () => { + const { command, args } = runtimeCommand('some/probe.ts'); + + assert.ok(command.length > 0, 'no command'); + assert.equal(args.at(-1), 'some/probe.ts'); +}); diff --git a/test/helpers.ts b/test/helpers.ts index e48cfb2..ab4fee4 100644 --- a/test/helpers.ts +++ b/test/helpers.ts @@ -22,3 +22,28 @@ export function probeModule(token: string, read: (value: any) => unknown) { return ProbeModule; } + +/** The globals each runtime defines, for picking the argv that re-runs a script under it. */ +interface RuntimeGlobals { + Deno?: { execPath(): string }; + Bun?: unknown; + process?: { execPath: string }; +} + +/** + * The command that runs `script` on whichever runtime is hosting this test. + * + * A contract file runs unchanged on three runtimes, so a test that spawns a child cannot hardcode + * one. Deno needs its permission flag, Bun runs TypeScript directly, and Node needs tsx to load it. + */ +export function runtimeCommand(script: string): { command: string; args: string[] } { + const globals = globalThis as RuntimeGlobals; + + // `--no-check` for the same reason `npm run test:deno` passes it: Deno type-checks the whole + // reachable graph, which here reaches core's Node-only modules and their ambient `Buffer`. The + // child is a runtime probe, and `npm run typecheck` already covers the types. + if (globals.Deno) return { command: globals.Deno.execPath(), args: ['run', '--allow-all', '--no-check', script] }; + if (globals.Bun) return { command: 'bun', args: ['run', script] }; + + return { command: globals.process!.execPath, args: ['--import', 'tsx', script] }; +} -- 2.54.1 From b15ce293151d93b99e6d607e9b6d8aec58e78b19 Mon Sep 17 00:00:00 2001 From: Diego Resendez Date: Fri, 18 Sep 2026 13:17:45 -0500 Subject: [PATCH 06/24] feat(rate-limit): declare the package and the runtimes it claims No workerd: the default store counts per isolate, and an edge deployment has many, so the limit it would enforce is not the one configured. The README says so rather than leaving someone to find out. Signed-off-by: Diego Resendez --- deno.json | 2 +- packages/rate-limit/CHANGELOG.md | 10 ++++++ packages/rate-limit/README.md | 53 ++++++++++++++++++++++++++++++++ packages/rate-limit/deno.json | 12 ++++++++ packages/rate-limit/package.json | 25 +++++++++++++++ 5 files changed, 101 insertions(+), 1 deletion(-) create mode 100644 packages/rate-limit/CHANGELOG.md create mode 100644 packages/rate-limit/README.md create mode 100644 packages/rate-limit/deno.json create mode 100644 packages/rate-limit/package.json diff --git a/deno.json b/deno.json index 2a1b9db..ae9d196 100644 --- a/deno.json +++ b/deno.json @@ -1,5 +1,5 @@ { - "workspace": ["./packages/jwt"], + "workspace": ["./packages/jwt", "./packages/rate-limit"], "nodeModulesDir": "manual", "compilerOptions": { "experimentalDecorators": true, diff --git a/packages/rate-limit/CHANGELOG.md b/packages/rate-limit/CHANGELOG.md new file mode 100644 index 0000000..dff35d8 --- /dev/null +++ b/packages/rate-limit/CHANGELOG.md @@ -0,0 +1,10 @@ +# Changelog + +## [Unreleased] + +### Added + +- `rateLimit({ rules, store?, keyOf?, provides? })`: publishes a `RateLimiter` under `provides` + (default `rateLimit`). Exceeding a rule throws `TooManyRequests`, a branded 429 carrying + `Retry-After`. The default `MemoryStore` sweeps expired windows on an interval and is released by + the plugin's `onShutdown`. diff --git a/packages/rate-limit/README.md b/packages/rate-limit/README.md new file mode 100644 index 0000000..e601aac --- /dev/null +++ b/packages/rate-limit/README.md @@ -0,0 +1,53 @@ +# @green-tea/rate-limit + +Publishes a per-request rate limiter into the graph. A handler opts in by asking for it and naming a +rule, so the limit is visible in the handler's signature rather than hidden in a middleware chain — +and green-tea runs the step only for the routes that depend on it. + +## Runtimes + +| Runtime | Supported | Why not | +|---|---|---| +| Node | ✅ | | +| Deno | ✅ | | +| Bun | ✅ | | +| workerd (edge) | ❌ | The default store counts per isolate, and an edge deployment has many, so a shared limit is not one. Supported once a store that shares state ships. | + +## Usage + +```ts +import { createApp } from '@green-tea/core'; +import { rateLimit } from '@green-tea/rate-limit'; + +const app = createApp({ + modules: [AuthModule], + plugins: [ + rateLimit({ + rules: { + signin: { windowMs: 15 * 60 * 1000, max: 5, message: 'Too many attempts, try again later.' }, + }, + }), + ], +}); +``` + +```ts +@Post('/signin') +async signIn(@needs('rateLimit') limit: RateLimiter) { + await limit('signin'); + // ... +} +``` + +Exceeding a rule throws a `429` carrying `Retry-After`. The error is recognised by green-tea through +a registered symbol rather than by extending its `HttpError`, so this package never imports core at +runtime. + +## The store + +The default `MemoryStore` keeps fixed windows in this process and sweeps expired ones on an interval. +**One process, one set of counters:** two replicas each enforce the limit separately, so the real +ceiling is `max × replicas`. Implement `RateLimitStore` against Redis when you scale past one. + +The sweep timer keeps the process alive on purpose, and the plugin's `onShutdown` clears it. A custom +store owns its own lifecycle; `close()` is called on it if it has one. diff --git a/packages/rate-limit/deno.json b/packages/rate-limit/deno.json new file mode 100644 index 0000000..692cafb --- /dev/null +++ b/packages/rate-limit/deno.json @@ -0,0 +1,12 @@ +{ + "name": "@green-tea/rate-limit", + "version": "26.9.0-beta.0", + "license": "MIT", + "exports": "./src/index.ts", + "imports": { + "@green-tea/core": "npm:@green-tea/core@26.9.0-beta.2" + }, + "publish": { + "include": ["src", "README.md", "CHANGELOG.md", "deno.json"] + } +} diff --git a/packages/rate-limit/package.json b/packages/rate-limit/package.json new file mode 100644 index 0000000..3fa3c1b --- /dev/null +++ b/packages/rate-limit/package.json @@ -0,0 +1,25 @@ +{ + "name": "@green-tea/rate-limit", + "version": "26.9.0-beta.0", + "private": true, + "description": "A per-request rate limiter published into the green-tea graph, with a branded 429 and a swept in-memory store.", + "license": "MIT", + "author": "green-tea contributors ", + "type": "module", + "repository": { + "type": "git", + "url": "git+https://github.com/Expressive-Tea/green-tea-plugins.git", + "directory": "packages/rate-limit" + }, + "engines": { + "node": ">=22", + "deno": ">=2", + "bun": ">=1.3" + }, + "exports": { + ".": "./src/index.ts" + }, + "devDependencies": { + "@green-tea/core": "26.9.0-beta.2" + } +} -- 2.54.1 From 66afb59103a1b625188583cf423c2abdcd7b7947 Mon Sep 17 00:00:00 2001 From: Diego Resendez Date: Fri, 18 Sep 2026 13:18:26 -0500 Subject: [PATCH 07/24] feat(rate-limit): sweep expired windows instead of walking the map MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit hit() called evictExpired on every new or expired key, which is a full walk of the map — O(N^2) over N callers, and a client rotating addresses drives it on purpose. A timer armed on the first hit does the same work off the hot path. It is not unref'ed, deliberately: the timer holds the process open so that failing to release it fails the exit test rather than leaking quietly. Signed-off-by: Diego Resendez --- packages/rate-limit/src/memory-store.ts | 80 +++++++++++++++++++++ packages/rate-limit/src/types.ts | 59 +++++++++++++++ packages/rate-limit/test/rate-limit.test.ts | 68 ++++++++++++++++++ 3 files changed, 207 insertions(+) create mode 100644 packages/rate-limit/src/memory-store.ts create mode 100644 packages/rate-limit/src/types.ts create mode 100644 packages/rate-limit/test/rate-limit.test.ts diff --git a/packages/rate-limit/src/memory-store.ts b/packages/rate-limit/src/memory-store.ts new file mode 100644 index 0000000..e6322b5 --- /dev/null +++ b/packages/rate-limit/src/memory-store.ts @@ -0,0 +1,80 @@ +import type { RateLimitHit, RateLimitStore } from './types.ts'; + +/** Fallback sweep period, for a store built without rules to derive one from. */ +const DEFAULT_SWEEP_MS = 60_000; + +/** + * Fixed-window counters held in this process. + * + * **One process, one set of counters.** Two replicas each enforce the limit separately, so the + * effective ceiling is `max × replicas`. Implement `RateLimitStore` against Redis to share them. + * + * Expired windows are dropped by a timer rather than on the hot path. The version this replaces + * walked the entire map from inside `hit()` whenever a key was new or expired — O(N²) over N + * distinct callers, and a client rotating addresses drove it deliberately. + */ +export class MemoryStore implements RateLimitStore { + private readonly windows = new Map(); + private readonly sweepMs: number; + private timer: ReturnType | undefined; + + constructor(options: { sweepMs?: number } = {}) { + this.sweepMs = options.sweepMs ?? DEFAULT_SWEEP_MS; + } + + /** How many windows are held. Lets a test assert the sweep without reaching inside. */ + get size(): number { + return this.windows.size; + } + + hit(key: string, windowMs: number): RateLimitHit { + this.start(); + const now = Date.now(); + const current = this.windows.get(key); + + if (!current || current.resetAt <= now) { + const fresh: RateLimitHit = { count: 1, resetAt: now + windowMs }; + this.windows.set(key, fresh); + + return fresh; + } + + current.count += 1; + + return current; + } + + reset(): void { + this.windows.clear(); + } + + /** Stops the sweep. Safe to call twice — `close()` is reached more than once in real apps. */ + close(): void { + if (!this.timer) return; + + clearInterval(this.timer); + this.timer = undefined; + } + + /** + * Arms the sweep on the first hit, not in the constructor. + * + * A store built and never used holds nothing, and starting a timer for it would keep a process + * alive over an empty map. Deliberately **not** `unref`ed: the timer is meant to hold the process + * open, so that failing to release it is a visible bug rather than a silent leak, and so that all + * three runtimes behave the same. + */ + private start(): void { + if (this.timer) return; + + this.timer = setInterval(() => this.sweep(), this.sweepMs); + } + + private sweep(): void { + const now = Date.now(); + + for (const [key, window] of this.windows) { + if (window.resetAt <= now) this.windows.delete(key); + } + } +} diff --git a/packages/rate-limit/src/types.ts b/packages/rate-limit/src/types.ts new file mode 100644 index 0000000..3caac9d --- /dev/null +++ b/packages/rate-limit/src/types.ts @@ -0,0 +1,59 @@ +/** A single named limit: how many hits are allowed inside a window. */ +export interface RateLimitRule { + /** Window length in milliseconds. */ + windowMs: number; + /** Maximum hits allowed per key inside the window. */ + max: number; + /** Message returned in the 429 body. */ + message: string; +} + +/** What a store reports back for one hit. */ +export interface RateLimitHit { + /** Hits recorded for this key inside the current window, including this one. */ + count: number; + /** Epoch milliseconds at which the current window expires. */ + resetAt: number; +} + +/** + * Pluggable counter backend. The default is in-process memory; swap in Redis or Postgres by + * implementing this and passing it to `rateLimit({ store })`. + */ +export interface RateLimitStore { + /** Record one hit against `key` and return the resulting window state. */ + hit(key: string, windowMs: number): Promise | RateLimitHit; + /** Drop every counter. Used by tests and by operators clearing a lockout. */ + reset(): Promise | void; + /** + * Release whatever the store holds open. Optional: a store that holds nothing needs none, and the + * plugin's `onShutdown` calls it only if it exists. + */ + close?(): Promise | void; +} + +/** The function a handler receives from `@needs('rateLimit')`. */ +export type RateLimiter = (rule: string, override?: Partial) => Promise; + +/** The slice of the green-tea request context this plugin reads. */ +export interface RateLimitContext { + ip?: string; + headers?: Record; +} + +export interface RateLimitOptions { + /** Named rules, addressed by handlers as `limit('signin')`. */ + rules: Record; + /** Counter backend. Defaults to an in-process `MemoryStore`. */ + store?: RateLimitStore; + /** + * Derives the per-caller bucket from the request context. Defaults to `ctx.ip`. + * + * Returning `null` skips the limit for that request — use it to exempt health checks. Note that + * `ctx.ip` is empty when the app is driven through `app.fetch()` rather than a socket, so the + * default folds those into a single `unknown` bucket. + */ + keyOf?: (ctx: RateLimitContext) => string | null; + /** Graph name the limiter is published under, and the plugin's name. Defaults to `rateLimit`. */ + provides?: string; +} diff --git a/packages/rate-limit/test/rate-limit.test.ts b/packages/rate-limit/test/rate-limit.test.ts new file mode 100644 index 0000000..81465b5 --- /dev/null +++ b/packages/rate-limit/test/rate-limit.test.ts @@ -0,0 +1,68 @@ +import { strict as assert } from 'node:assert'; +import { test } from 'node:test'; + +import { MemoryStore } from '../src/memory-store.ts'; + +const sleep = (ms: number): Promise => new Promise((resolve) => setTimeout(resolve, ms)); + +test('counts hits inside a window and starts a new one after it expires', async () => { + const store = new MemoryStore(); + + try { + assert.equal(store.hit('a', 40).count, 1); + assert.equal(store.hit('a', 40).count, 2); + await sleep(60); + assert.equal(store.hit('a', 40).count, 1); + } finally { + store.close(); + } +}); + +test('keeps separate counters per key', () => { + const store = new MemoryStore(); + + try { + store.hit('a', 1000); + assert.equal(store.hit('b', 1000).count, 1); + assert.equal(store.hit('a', 1000).count, 2); + } finally { + store.close(); + } +}); + +// The defect this store replaces: `hit()` walked the whole map whenever a key was new or expired, +// so N distinct callers cost N², and a client rotating addresses triggered it on purpose. The sweep +// is what keeps the map bounded now, so it has to actually drop things. +test('sweeps expired windows without being asked on the hot path', async () => { + const store = new MemoryStore({ sweepMs: 20 }); + + try { + for (let i = 0; i < 50; i++) store.hit(`caller-${i}`, 10); + assert.equal(store.size, 50); + await sleep(80); + assert.equal(store.size, 0, 'expired windows were never swept'); + } finally { + store.close(); + } +}); + +test('reset drops every counter', () => { + const store = new MemoryStore(); + + try { + store.hit('a', 1000); + store.reset(); + assert.equal(store.size, 0); + } finally { + store.close(); + } +}); + +test('close is idempotent, because close() is called more than once in real apps', () => { + const store = new MemoryStore(); + store.hit('a', 1000); + + store.close(); + + assert.doesNotThrow(() => store.close()); +}); -- 2.54.1 From 14ed9c38be6c30ffa61e000e9438f334dfc13e57 Mon Sep 17 00:00:00 2001 From: Diego Resendez Date: Fri, 18 Sep 2026 13:18:49 -0500 Subject: [PATCH 08/24] feat(rate-limit): carry the error brand instead of extending core The original extended core's HttpError, which is a value import and makes the published plugin need core at run time. The brand is a registry-wide symbol, so core renders the 429 without this package depending on it, and it survives two copies of core in one tree where instanceof would not. The fields asserted here are exactly the ones HttpErrorLike declares. That core really renders them is proven end to end in the limiter's own tests, which read a 429 and its Retry-After back out of app.fetch. Signed-off-by: Diego Resendez --- packages/rate-limit/src/errors.ts | 33 +++++++++++++++++++++ packages/rate-limit/test/rate-limit.test.ts | 16 ++++++++++ 2 files changed, 49 insertions(+) create mode 100644 packages/rate-limit/src/errors.ts diff --git a/packages/rate-limit/src/errors.ts b/packages/rate-limit/src/errors.ts new file mode 100644 index 0000000..366d8d2 --- /dev/null +++ b/packages/rate-limit/src/errors.ts @@ -0,0 +1,33 @@ +/** + * Core's error brand, as the public protocol rather than as an import. + * + * `Symbol.for` is registry-wide, so this resolves to the same symbol core registered, in this copy + * of the process and in any other. That is what lets a plugin throw something core renders without + * depending on core at runtime — and it survives two copies of core in one tree, which `instanceof` + * does not, since each copy has its own class identity. + * + * The string is the contract (design spec 1.2). `unique symbol` is what TypeScript needs for a + * computed class field, and a `const` annotated with it satisfies that. + */ +const HTTP_ERROR: unique symbol = Symbol.for('green-tea.http-error'); + +/** + * Thrown when a caller exceeds a rule. Carries `Retry-After` so a client can back off rather than + * retry immediately and spend the next window too. + * + * Extends `Error`, not core's `HttpError`: core reads `status`, `message`, `body` and `headers` off + * whatever carries the brand, and never uses `instanceof`. + */ +export class TooManyRequests extends Error { + readonly [HTTP_ERROR] = true; + readonly status = 429; + readonly body: { message: string; status: number }; + readonly headers: Record; + + constructor(message: string, retryAfterSeconds: number) { + super(message); + this.name = 'TooManyRequests'; + this.body = { message, status: 429 }; + this.headers = { 'retry-after': String(retryAfterSeconds) }; + } +} diff --git a/packages/rate-limit/test/rate-limit.test.ts b/packages/rate-limit/test/rate-limit.test.ts index 81465b5..ac43e5e 100644 --- a/packages/rate-limit/test/rate-limit.test.ts +++ b/packages/rate-limit/test/rate-limit.test.ts @@ -1,6 +1,7 @@ import { strict as assert } from 'node:assert'; import { test } from 'node:test'; +import { TooManyRequests } from '../src/errors.ts'; import { MemoryStore } from '../src/memory-store.ts'; const sleep = (ms: number): Promise => new Promise((resolve) => setTimeout(resolve, ms)); @@ -66,3 +67,18 @@ test('close is idempotent, because close() is called more than once in real apps assert.doesNotThrow(() => store.close()); }); + +// Convention rule 8, checked where it bites. The class never extends core's HttpError — it carries a +// registry-wide symbol, which is what lets a plugin throw a 429 that core renders without importing +// core, and what keeps working when two copies of core are in one tree (`instanceof` does not). +test('carries the brand core recognises, and the fields core reads off it', () => { + const error = new TooManyRequests('slow down', 30); + + assert.equal((error as unknown as Record)[Symbol.for('green-tea.http-error')], true); + assert.equal(error.status, 429); + assert.equal(error.message, 'slow down'); + assert.equal(error.headers['retry-after'], '30'); + assert.deepEqual(error.body, { message: 'slow down', status: 429 }); + // Still an Error: a throw that is not one loses the stack, and core rethrows before rendering. + assert.ok(error instanceof Error); +}); -- 2.54.1 From 8ac46fed61553d3db284bf8bbba4e697b70a11b8 Mon Sep 17 00:00:00 2001 From: Diego Resendez Date: Fri, 18 Sep 2026 13:22:45 -0500 Subject: [PATCH 09/24] feat(rate-limit): publish the limiter as a named plugin MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Extracted from patitas-peludas onto the object contract. The node now takes the name it provides — the original registered 'rate-limit' while providing 'rateLimit', so two instances shared a node name and rule 2 could not hold. onShutdown closes the store this plugin built. One passed in owns its own lifecycle, and is closed only if it offers a close(). Every test that builds an app closes it, through a helper that says why: the sweep timer is deliberately not unref'ed, so an app left open keeps the test runner alive after its assertions have passed. That is the same behaviour the exit test measures, so these exercise the shutdown path in passing. Signed-off-by: Diego Resendez --- packages/rate-limit/src/index.ts | 96 +++++++++++++++ packages/rate-limit/test/rate-limit.test.ts | 125 ++++++++++++++++++++ 2 files changed, 221 insertions(+) create mode 100644 packages/rate-limit/src/index.ts diff --git a/packages/rate-limit/src/index.ts b/packages/rate-limit/src/index.ts new file mode 100644 index 0000000..2a51a0e --- /dev/null +++ b/packages/rate-limit/src/index.ts @@ -0,0 +1,96 @@ +import type { Plugin } from '@green-tea/core'; + +import { TooManyRequests } from './errors.ts'; +import { MemoryStore } from './memory-store.ts'; +import type { RateLimitContext, RateLimiter, RateLimitOptions, RateLimitRule } from './types.ts'; + +export { MemoryStore } from './memory-store.ts'; +export { TooManyRequests } from './errors.ts'; +export type { + RateLimitContext, + RateLimiter, + RateLimitHit, + RateLimitOptions, + RateLimitRule, + RateLimitStore, +} from './types.ts'; + +function defaultKeyOf(ctx: RateLimitContext): string { + return ctx.ip !== undefined && ctx.ip !== '' ? ctx.ip : 'unknown'; +} + +/** + * The sweep period for a store this plugin builds: the shortest window any rule configures. + * + * Sweeping less often than the shortest window would let a generation of expired counters sit in the + * map for longer than they can possibly be useful, which is the growth the sweep exists to bound. + */ +function sweepPeriod(rules: Record): number | undefined { + const windows = Object.values(rules).map((rule) => rule.windowMs); + + return windows.length ? Math.min(...windows) : undefined; +} + +/** + * Publishes a per-request rate limiter into the graph. + * + * Rules live in one place; a handler opts in by asking for the limiter and naming a rule. Nothing is + * enforced on routes that do not ask — green-tea runs a step only for the routes that depend on it — + * so the limit is visible in the handler's signature rather than hidden in a middleware chain. + * + * The default store holds a sweep timer, which this releases in `onShutdown` (convention rule 7). A + * store passed in owns its own lifecycle, and is closed only if it offers a `close()`. + * + * @example + * const app = createApp({ + * modules: [AuthModule], + * plugins: [rateLimit({ rules: { signin: { windowMs: 900_000, max: 5, message: 'too many' } } })], + * }); + * + * @example In a handler. + * ⁣@Post('/signin') + * async signIn(@needs('rateLimit') limit: RateLimiter) { + * await limit('signin'); + * } + */ +export function rateLimit(options: RateLimitOptions): Plugin { + const provides = options.provides ?? 'rateLimit'; + const store = options.store ?? new MemoryStore({ sweepMs: sweepPeriod(options.rules) }); + const keyOf = options.keyOf ?? defaultKeyOf; + + const limiterFor = (ctx: RateLimitContext): RateLimiter => { + return async (name, override) => { + const configured = options.rules[name]; + if (!configured) throw new Error(`Unknown rate limit rule: "${name}"`); + + const rule: RateLimitRule = { ...configured, ...override }; + const bucket = keyOf(ctx); + if (bucket === null) return; + + const { count, resetAt } = await store.hit(`${bucket}:${name}`, rule.windowMs); + + if (count > rule.max) { + throw new TooManyRequests(rule.message, Math.max(1, Math.ceil((resetAt - Date.now()) / 1000))); + } + }; + }; + + return { + // Rule 2: plugin name, node name and provided token are one string. The original registered the + // node as 'rate-limit' while providing 'rateLimit', so two instances shared a node name. + name: provides, + mount({ scope, onShutdown }) { + scope.add({ + kind: 'step', + name: provides, + // `ip` and `headers` ride on the seed context rather than being graph nodes, so `req` is the + // only declarable dependency here. + needs: ['req'], + provides: [provides], + run: (ctx: RateLimitContext) => ({ [provides]: limiterFor(ctx) }), + }); + + onShutdown(() => store.close?.()); + }, + }; +} diff --git a/packages/rate-limit/test/rate-limit.test.ts b/packages/rate-limit/test/rate-limit.test.ts index ac43e5e..970dc30 100644 --- a/packages/rate-limit/test/rate-limit.test.ts +++ b/packages/rate-limit/test/rate-limit.test.ts @@ -1,7 +1,13 @@ import { strict as assert } from 'node:assert'; import { test } from 'node:test'; +import { createApp } from '@green-tea/core'; +import type { App } from '@green-tea/core'; + +import { probeModule } from '../../../test/helpers.ts'; import { TooManyRequests } from '../src/errors.ts'; +import { rateLimit } from '../src/index.ts'; +import type { RateLimiter } from '../src/index.ts'; import { MemoryStore } from '../src/memory-store.ts'; const sleep = (ms: number): Promise => new Promise((resolve) => setTimeout(resolve, ms)); @@ -82,3 +88,122 @@ test('carries the brand core recognises, and the fields core reads off it', () = // Still an Error: a throw that is not one loses the stack, and core rethrows before rendering. assert.ok(error instanceof Error); }); + +const RULES = { signin: { windowMs: 60_000, max: 2, message: 'too many' } }; + +/** + * Runs `body` against `app` and always closes it. + * + * Closing is not housekeeping here. The default store's sweep timer is deliberately not `unref`ed — + * that is what makes the exit test in this file mean something — so an app left open keeps the test + * runner alive long after its assertions passed. `close()` runs the plugin's `onShutdown`, which is + * the same path the exit test measures, so every test here exercises it in passing. + */ +async function withApp(app: App, body: () => Promise): Promise { + try { + await body(); + } finally { + await app.close(); + } +} + +test('allows up to the limit and then answers 429 with retry-after', async () => { + const app = createApp({ + modules: [ + probeModule('rateLimit', async (limit: RateLimiter) => { + await limit('signin'); + return 'ok'; + }), + ], + plugins: [rateLimit({ rules: RULES, keyOf: () => 'one-caller' })], + }); + + await withApp(app, async () => { + const hit = () => app.fetch(new Request('http://plugin.test/rateLimit/probe')); + + assert.equal((await hit()).status, 200); + assert.equal((await hit()).status, 200); + + const refused = await hit(); + + assert.equal(refused.status, 429); + assert.ok(Number(refused.headers.get('retry-after')) >= 1); + }); +}); + +test('keeps separate budgets per caller', async () => { + let caller = 'a'; + const app = createApp({ + modules: [ + probeModule('rateLimit', async (limit: RateLimiter) => { + await limit('signin'); + return 'ok'; + }), + ], + plugins: [rateLimit({ rules: RULES, keyOf: () => caller })], + }); + + await withApp(app, async () => { + const hit = () => app.fetch(new Request('http://plugin.test/rateLimit/probe')); + + await hit(); + await hit(); + assert.equal((await hit()).status, 429); + + caller = 'b'; + assert.equal((await hit()).status, 200); + }); +}); + +test('a keyOf returning null exempts the request entirely', async () => { + const app = createApp({ + modules: [ + probeModule('rateLimit', async (limit: RateLimiter) => { + await limit('signin'); + return 'ok'; + }), + ], + plugins: [rateLimit({ rules: RULES, keyOf: () => null })], + }); + + await withApp(app, async () => { + for (let i = 0; i < 5; i++) { + assert.equal((await app.fetch(new Request('http://plugin.test/rateLimit/probe'))).status, 200); + } + }); +}); + +test('names an unknown rule rather than silently allowing it', async () => { + const app = createApp({ + modules: [ + probeModule('rateLimit', async (limit: RateLimiter) => { + await limit('nope'); + return 'ok'; + }), + ], + plugins: [rateLimit({ rules: RULES })], + }); + + await withApp(app, async () => { + assert.equal((await app.fetch(new Request('http://plugin.test/rateLimit/probe'))).status, 500); + }); +}); + +// Convention rule 2: the plugin's name, the node's name and the provided token are one string, so +// two instances collide on none of the three. +test('two instances with different provides both answer, without colliding', async () => { + const app = createApp({ + modules: [probeModule('userLimit', () => 'user'), probeModule('adminLimit', () => 'admin')], + plugins: [rateLimit({ rules: RULES, provides: 'userLimit' }), rateLimit({ rules: RULES, provides: 'adminLimit' })], + }); + + await withApp(app, async () => { + assert.equal((await app.fetch(new Request('http://plugin.test/userLimit/probe'))).status, 200); + assert.equal((await app.fetch(new Request('http://plugin.test/adminLimit/probe'))).status, 200); + }); +}); + +test('the plugin is named after what it provides', () => { + assert.equal(rateLimit({ rules: RULES }).name, 'rateLimit'); + assert.equal(rateLimit({ rules: RULES, provides: 'adminLimit' }).name, 'adminLimit'); +}); -- 2.54.1 From f72c391646d6514f80775cc3c4e741deaab935e3 Mon Sep 17 00:00:00 2001 From: Diego Resendez Date: Fri, 18 Sep 2026 13:25:17 -0500 Subject: [PATCH 10/24] test(rate-limit): measure that close() lets the process exit MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Rule 7 says nothing a plugin opens outlives close(), and the only portable probe is a process: a leaked interval keeps all three runtimes alive, a cleared one lets each exit in well under a second. Verified the test fails with onShutdown removed — it reports the process still alive after 2s — because a leak test that passes while leaking is worth nothing. Signed-off-by: Diego Resendez --- packages/rate-limit/test/_exit-probe.ts | 35 +++++++++++++++++++++ packages/rate-limit/test/rate-limit.test.ts | 35 ++++++++++++++++++++- 2 files changed, 69 insertions(+), 1 deletion(-) create mode 100644 packages/rate-limit/test/_exit-probe.ts diff --git a/packages/rate-limit/test/_exit-probe.ts b/packages/rate-limit/test/_exit-probe.ts new file mode 100644 index 0000000..7a55761 --- /dev/null +++ b/packages/rate-limit/test/_exit-probe.ts @@ -0,0 +1,35 @@ +// Not a test — the child the exit test spawns. Named with a leading underscore so no runner picks it +// up: `node --test`, `deno test` and `bun test` all discover by filename, and this matches none. +// +// It boots an app that has taken a hit (so the sweep timer is armed), closes it, and prints one line. +// Nothing here calls process.exit: whether the process ends is the measurement. +import { createApp, Get, Module, Route, needs } from '@green-tea/core'; + +import { rateLimit } from '../src/index.ts'; +import type { RateLimiter } from '../src/index.ts'; + +@Route('/') +class Probe { + @Get('/probe') + async probe(@needs('rateLimit') limit: RateLimiter) { + await limit('signin'); + + return { ok: true }; + } +} + +@Module({ mountpoint: '/', controllers: [Probe] }) +class ProbeModule {} + +async function main(): Promise { + const app = createApp({ + modules: [ProbeModule], + plugins: [rateLimit({ rules: { signin: { windowMs: 60_000, max: 10, message: 'too many' } } })], + }); + + await app.fetch(new Request('http://probe.test/probe')); + await app.close(); + console.log('closed'); +} + +void main(); diff --git a/packages/rate-limit/test/rate-limit.test.ts b/packages/rate-limit/test/rate-limit.test.ts index 970dc30..344f9e4 100644 --- a/packages/rate-limit/test/rate-limit.test.ts +++ b/packages/rate-limit/test/rate-limit.test.ts @@ -1,10 +1,11 @@ import { strict as assert } from 'node:assert'; +import { spawn } from 'node:child_process'; import { test } from 'node:test'; import { createApp } from '@green-tea/core'; import type { App } from '@green-tea/core'; -import { probeModule } from '../../../test/helpers.ts'; +import { probeModule, runtimeCommand } from '../../../test/helpers.ts'; import { TooManyRequests } from '../src/errors.ts'; import { rateLimit } from '../src/index.ts'; import type { RateLimiter } from '../src/index.ts'; @@ -207,3 +208,35 @@ test('the plugin is named after what it provides', () => { assert.equal(rateLimit({ rules: RULES }).name, 'rateLimit'); assert.equal(rateLimit({ rules: RULES, provides: 'adminLimit' }).name, 'adminLimit'); }); + +/** Runs the probe and reports how it ended. `timeoutMs` elapsing means it never exited. */ +function runProbe(timeoutMs: number): Promise<{ exited: boolean; output: string }> { + const { command, args } = runtimeCommand('packages/rate-limit/test/_exit-probe.ts'); + + return new Promise((resolve) => { + const child = spawn(command, args, { stdio: ['ignore', 'pipe', 'inherit'] }); + let output = ''; + + child.stdout.on('data', (chunk: Buffer) => (output += chunk.toString())); + + const timer = setTimeout(() => { + child.kill('SIGKILL'); + resolve({ exited: false, output }); + }, timeoutMs); + + child.on('exit', () => { + clearTimeout(timer); + resolve({ exited: true, output }); + }); + }); +} + +// Convention rule 7, and the only test in the repository that measures it rather than asserting it. +// A leaked setInterval keeps Node, Deno and Bun alive indefinitely; a cleared one lets each exit in +// well under a second. The process is the probe, which is what makes this portable. +test('the app exits on its own after close(), because onShutdown cleared the sweep', async () => { + const { exited, output } = await runProbe(2_000); + + assert.ok(output.includes('closed'), `the probe never reached close(): ${output}`); + assert.ok(exited, 'the process was still alive 2s after close() — a timer outlived onShutdown'); +}); -- 2.54.1 From 22e77ee4520927399500a353555cef11839bc2e4 Mon Sep 17 00:00:00 2001 From: Diego Resendez Date: Fri, 18 Sep 2026 13:25:48 -0500 Subject: [PATCH 11/24] feat(metrics): declare the package and what it refuses to label The README carries the cardinality rule up front: label on route, which the route table bounds, never on name, which nothing bounds. That is the mistake issue #65 was filed for and the one a collector makes by default. Signed-off-by: Diego Resendez --- deno.json | 2 +- packages/metrics/CHANGELOG.md | 10 +++++++ packages/metrics/README.md | 50 +++++++++++++++++++++++++++++++++++ packages/metrics/deno.json | 12 +++++++++ packages/metrics/package.json | 25 ++++++++++++++++++ 5 files changed, 98 insertions(+), 1 deletion(-) create mode 100644 packages/metrics/CHANGELOG.md create mode 100644 packages/metrics/README.md create mode 100644 packages/metrics/deno.json create mode 100644 packages/metrics/package.json diff --git a/deno.json b/deno.json index ae9d196..e98dcdf 100644 --- a/deno.json +++ b/deno.json @@ -1,5 +1,5 @@ { - "workspace": ["./packages/jwt", "./packages/rate-limit"], + "workspace": ["./packages/jwt", "./packages/metrics", "./packages/rate-limit"], "nodeModulesDir": "manual", "compilerOptions": { "experimentalDecorators": true, diff --git a/packages/metrics/CHANGELOG.md b/packages/metrics/CHANGELOG.md new file mode 100644 index 0000000..bfc90ac --- /dev/null +++ b/packages/metrics/CHANGELOG.md @@ -0,0 +1,10 @@ +# Changelog + +## [Unreleased] + +### Added + +- `metrics({ provides? })`: subscribes to the lifecycle stream and publishes a `Metrics` with + `render()`. Counts `request:end` as requests and `request:failed` separately, labelled on the + bounded `route` rather than on the caller-controlled `name`. `prometheus` is a `TransformerFn` for + serving `render()` from a route the application owns. Closes green-tea#68. diff --git a/packages/metrics/README.md b/packages/metrics/README.md new file mode 100644 index 0000000..c494398 --- /dev/null +++ b/packages/metrics/README.md @@ -0,0 +1,50 @@ +# @green-tea/metrics + +Subscribes to green-tea's lifecycle stream and counts what happened. You expose it on a route you +own, with the transformer this package ships. + +## Runtimes + +| Runtime | Supported | Why not | +|---|---|---| +| Node | ✅ | | +| Deno | ✅ | | +| Bun | ✅ | | +| workerd (edge) | ❌ | Counters live in one isolate, and an edge deployment has many, so a scrape reports whichever isolate answered it. Supported once the counters can be shared. | + +## Usage + +```ts +import { createApp } from '@green-tea/core'; +import { metrics } from '@green-tea/metrics'; + +const app = createApp({ modules: [ApiModule], plugins: [metrics()] }); +``` + +```ts +import { prometheus, type Metrics } from '@green-tea/metrics'; + +@Get('/metrics') +@Transformer(prometheus) +scrape(@needs('metrics') metrics: Metrics) { + return metrics.render(); +} +``` + +The route is yours, so its path, its auth and whether it is exposed at all stay your decisions. + +## What it counts, and what it refuses to + +One failed request emits **three** lifecycle events, and a collector that counts them as three +outcomes reports one request as several. The division this package follows: + +| Series | From | Meaning | +|---|---|---| +| `green_tea_requests_total` | `request:end` | Every dispatched request. Terminal and universal — this is *the* request counter | +| `green_tea_request_errors_total` | `request:failed` | Handler code threw. **Additional** to the request above, never a second request | +| `green_tea_request_duration_seconds` | `request:end` | Sum and count, so an average is available without buckets | + +Labels are `route`, `method` and `status` — never the event's `name`. `route` is the matched +*pattern* and is bounded by your route table (`` when nothing matched); `name` carries the +path that arrived, which is bounded by nothing, so a scanner walking `/aaa`, `/aab`, `/aac` would +mint a label per URL. That is a memory leak with a metrics backend attached. diff --git a/packages/metrics/deno.json b/packages/metrics/deno.json new file mode 100644 index 0000000..58e8705 --- /dev/null +++ b/packages/metrics/deno.json @@ -0,0 +1,12 @@ +{ + "name": "@green-tea/metrics", + "version": "26.9.0-beta.0", + "license": "MIT", + "exports": "./src/index.ts", + "imports": { + "@green-tea/core": "npm:@green-tea/core@26.9.0-beta.2" + }, + "publish": { + "include": ["src", "README.md", "CHANGELOG.md", "deno.json"] + } +} diff --git a/packages/metrics/package.json b/packages/metrics/package.json new file mode 100644 index 0000000..f94d34d --- /dev/null +++ b/packages/metrics/package.json @@ -0,0 +1,25 @@ +{ + "name": "@green-tea/metrics", + "version": "26.9.0-beta.0", + "private": true, + "description": "Counts green-tea's lifecycle events and renders them in the Prometheus text format.", + "license": "MIT", + "author": "green-tea contributors ", + "type": "module", + "repository": { + "type": "git", + "url": "git+https://github.com/Expressive-Tea/green-tea-plugins.git", + "directory": "packages/metrics" + }, + "engines": { + "node": ">=22", + "deno": ">=2", + "bun": ">=1.3" + }, + "exports": { + ".": "./src/index.ts" + }, + "devDependencies": { + "@green-tea/core": "26.9.0-beta.2" + } +} -- 2.54.1 From 5a74cad793d2d2935ef8a8a909208dc53051b0b3 Mon Sep 17 00:00:00 2001 From: Diego Resendez Date: Fri, 18 Sep 2026 13:26:32 -0500 Subject: [PATCH 12/24] feat(metrics): count request:end, and only request:end MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit A failed request emits three lifecycle events. request:end is the terminal and universal one, so it is the request counter; request:failed is additional and gets its own series. Counting both as requests is the double count issue #64 was filed for. Labels come from route, which the route table bounds, never from name, which carries the arriving path and is bounded by nothing — issue #65. Signed-off-by: Diego Resendez --- packages/metrics/src/collector.ts | Bin 0 -> 4973 bytes packages/metrics/src/types.ts | 19 ++++++ packages/metrics/test/metrics.test.ts | 82 ++++++++++++++++++++++++++ 3 files changed, 101 insertions(+) create mode 100644 packages/metrics/src/collector.ts create mode 100644 packages/metrics/src/types.ts create mode 100644 packages/metrics/test/metrics.test.ts diff --git a/packages/metrics/src/collector.ts b/packages/metrics/src/collector.ts new file mode 100644 index 0000000000000000000000000000000000000000..25a9f41986b7e43d430fd38d02b7b863862079e4 GIT binary patch literal 4973 zcmbtY+ioMd5zVu|qT)56OFC^2kmSK$d9oWgNRYW)=e~KUlT$i#8PWK|7=UPCU|kJpFJLr4`@su7n)q# z1^lns1YOg5p)Dy(nysKpIniQUt4o~VL*KWZts$vwO||jC*eXOT#WGLr+S2sf&MsA` z7P>y47SL*{1ueC*o(^rBE=>Z5B@8h*XLS_eTMh$ki$>I@Cff$`YIB%XL0sYX`CL1; zbFN?m8?=TO3z}(TuSv}sO`)Zrn}*a%xxg+QA5^XNfj+(Y+ncw4e{=Qz?Wd0yG@$`3 zzOk_VT!L$ZcF?Nn`>wjtf$k0{T760$k+#=oc(K%B(boHKd{CkDFHgyK%b9j8bgP<9 z-@n*O^yxdO5d&}ZhUTpk?;ACPt%$9cN=Emx}pxFkYe*rUZTV$Do9J9kwne4lq)n*q*9NH+WzX%Giae$31uXPyW zJR~4u<}}O#Be{SmKbMjk`ppDph%iztA!6O|AE#NLkNOJKro`=`DMd~(oY~^ml;I0s zDO4PADrwybsp`fz$}bA4+m0dnW7nbr8NF7o8^nc_18{-=ut3$zCm;mX0`q{3TaCil=Ak=#_S zI=>iBqXesppKvooMh4{pI4-JCg2yh3?Cj#&B`Sv4yE8eXZ+D!LX9tz zslJTaLy?!!*3p)blUS%*&PgiFJ^k62rvr7Roon5raIF`u*R(*$@uk1J<{&GK@Ya*`F7$ES>$h!cDul)fsnn!kxse zE+Lb!MzjaC=_4RtJyI`e|LO%IwGZdqW^j@_K^eQuCED!v(#Bz&DBGX7COrrh%AFC~ zn7OVt6~+i!zE;b`90Xf zXty+67CfXnYi_mkc>3?Z|HBl`ZJ4lSSb)7`<$7sgs{R6U)@+#I6sh9SpD^0MwF+oU zEHE}G@I_LMxzVDWuQSmC*xcGiZn~$Y8@86+iOoVjR*hjs=yauFXI;|H|G6^YR#TcA zj8PgJ@Z41JW5zNr;u3{AcE>B=JvoAQ)W%5heKSOfl+R!C2j9*eOR|lY>}rF zbC4bln#wGhZ!q3>n!fqN?`RF_Iorkt#8j|TuoFDBYQYGr0Lzr!FhyQF6JY-Whm0^< zRwl#WLpWDy9G@7ImNOJ9cWU9(lq15Ne}{#f08}-)J+psA-NVnw^TBFTOyn2|Z9Su? zOawdAqz!=0h8pw+_M4Xnq~HmKp!1A039KT}7i+a+Kh~XsdzS|^N?sGSJ`y|DFg6<5^L-om=i@14Pec}g$mApGg)AqDsq;<(5P>@+>XG)4dv=}=Cnk~3F(J&~ zW+pt?`SXNAyW#@Usq|OP3gdYZ&Pi4g9_JSG~o{+03 zf8R&VpV5Fjr*rs!3OT#%#_B3|UPmxJ1ke5V`$*yGk~Yo0myCT05#|`T@>&H|NcUHG zZxLuAg=k@G#nUz}^XT+wZSfl`brSR!85-!I$8!hSf4j6AQbNjpDACXVhQr~5@Riqs!Fu+ZYZP<*!&$(TKr zyZaE5C6bMZ`he3!%o#)+-ght+zmDh*gOH=djo1sj<~U2h;N2~F27+v4VrZJKcBiHk i9DXfgS)H3t+^{&balK7GC-U@Q{}Oxe(~$tMJ@_9mqm{e> literal 0 HcmV?d00001 diff --git a/packages/metrics/src/types.ts b/packages/metrics/src/types.ts new file mode 100644 index 0000000..701be42 --- /dev/null +++ b/packages/metrics/src/types.ts @@ -0,0 +1,19 @@ +/** One labelled series and its accumulated value. */ +export interface Series { + route: string; + method: string; + status?: number; + value: number; +} + +/** What the collector holds, for a consumer that wants numbers rather than text. */ +export interface MetricsSnapshot { + requests: Series[]; + errors: Series[]; + duration: Array<{ route: string; method: string; sum: number; count: number }>; +} + +export interface MetricsOptions { + /** Graph name the collector is published under, and the plugin's name. Defaults to `metrics`. */ + provides?: string; +} diff --git a/packages/metrics/test/metrics.test.ts b/packages/metrics/test/metrics.test.ts new file mode 100644 index 0000000..d2adcdd --- /dev/null +++ b/packages/metrics/test/metrics.test.ts @@ -0,0 +1,82 @@ +import { strict as assert } from 'node:assert'; +import { test } from 'node:test'; + +import { Metrics } from '../src/collector.ts'; + +const end = (route: string, method: string, status: number, durationMs = 5) => + ({ name: route, route, method, status, durationMs }) as never; + +test('counts one request per request:end, keyed by route, method and status', () => { + const collector = new Metrics(); + + collector.observeEnd(end('/users/:id', 'GET', 200)); + collector.observeEnd(end('/users/:id', 'GET', 200)); + collector.observeEnd(end('/users/:id', 'GET', 404)); + + const { requests } = collector.snapshot(); + + assert.equal(requests.find((s) => s.status === 200)?.value, 2); + assert.equal(requests.find((s) => s.status === 404)?.value, 1); +}); + +// The defect issue #64 was filed for: a failed request emits request:start, request:failed and +// request:end. Counting the failure as a request reports one request as two. +test('a failure counts once as a request and once as an error, not twice as a request', () => { + const collector = new Metrics(); + + collector.observeFailure({ name: '/boom', route: '/boom', method: 'GET' } as never); + collector.observeEnd(end('/boom', 'GET', 500)); + + const { requests, errors } = collector.snapshot(); + + assert.equal( + requests.reduce((total, s) => total + s.value, 0), + 1, + ); + assert.equal( + errors.reduce((total, s) => total + s.value, 0), + 1, + ); +}); + +// Issue #65: `name` is the path that arrived and is bounded by nothing. `route` is the matched +// pattern, and is '' when nothing matched. +test('labels on the bounded route, so a scanner cannot mint a series per URL', () => { + const collector = new Metrics(); + + for (const probe of ['/aaa', '/aab', '/aac']) { + collector.observeEnd({ + name: `GET ${probe}`, + route: '', + method: 'GET', + status: 404, + durationMs: 1, + } as never); + } + + const { requests } = collector.snapshot(); + + assert.equal(requests.length, 1); + assert.equal(requests[0].route, ''); + assert.equal(requests[0].value, 3); +}); + +test('accumulates duration as a sum and a count, in seconds', () => { + const collector = new Metrics(); + + collector.observeEnd(end('/x', 'GET', 200, 1500)); + collector.observeEnd(end('/x', 'GET', 200, 500)); + + const [duration] = collector.snapshot().duration; + + assert.equal(duration.count, 2); + assert.equal(duration.sum, 2); +}); + +test('an event with no route is attributed rather than dropped or left blank', () => { + const collector = new Metrics(); + + collector.observeEnd({ name: 'GET /x', method: 'GET', status: 200, durationMs: 1 } as never); + + assert.equal(collector.snapshot().requests[0].route, ''); +}); -- 2.54.1 From de0081ddaec30157106c9092784f087aa87f0f39 Mon Sep 17 00:00:00 2001 From: Diego Resendez Date: Fri, 18 Sep 2026 13:27:08 -0500 Subject: [PATCH 13/24] feat(metrics): publish the collector and a transformer to serve it MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The transformer is exported instead of a route: the path, the auth and whether the endpoint exists are the application's decisions, and a plugin that mounted /metrics itself would be taking them. No onShutdown — a bus subscription is an entry in a set and keeps nothing alive, which is what rule 7 asks about. Closes green-tea#68. Signed-off-by: Diego Resendez --- packages/metrics/src/index.ts | 49 +++++++++++++++++++++++++++ packages/metrics/src/prometheus.ts | 22 ++++++++++++ packages/metrics/test/metrics.test.ts | 48 ++++++++++++++++++++++++++ 3 files changed, 119 insertions(+) create mode 100644 packages/metrics/src/index.ts create mode 100644 packages/metrics/src/prometheus.ts diff --git a/packages/metrics/src/index.ts b/packages/metrics/src/index.ts new file mode 100644 index 0000000..a8df10a --- /dev/null +++ b/packages/metrics/src/index.ts @@ -0,0 +1,49 @@ +import type { Plugin } from '@green-tea/core'; + +import { Metrics } from './collector.ts'; +import type { MetricsOptions } from './types.ts'; + +export { Metrics } from './collector.ts'; +export { prometheus } from './prometheus.ts'; +export type { MetricsOptions, MetricsSnapshot, Series } from './types.ts'; + +/** + * Subscribes to the lifecycle stream and publishes the counters into the graph. + * + * There is no `onShutdown` (convention rule 7): a bus subscription is an entry in a set, and holds + * no timer, socket or handle that could keep a process alive. Nothing to release. + * + * The collector is built at mount time rather than in the provider's `run`, because the subscription + * has to exist before the first request — a provider runs on boot, which is late enough to miss it. + * + * @example + * const app = createApp({ modules: [ApiModule], plugins: [metrics()] }); + * + * @example Exposed on a route the application owns. + * ⁣@Get('/metrics') + * ⁣@Transformer(prometheus) + * scrape(@needs('metrics') collector: Metrics) { + * return collector.render(); + * } + */ +export function metrics(options: MetricsOptions = {}): Plugin { + const provides = options.provides ?? 'metrics'; + const collector = new Metrics(); + + return { + // Rule 2: plugin name, node name and provided token are one string. + name: provides, + mount({ bus, scope }) { + bus.on('request:end', (payload) => collector.observeEnd(payload)); + bus.on('request:failed', (payload) => collector.observeFailure(payload)); + + scope.add({ + kind: 'provider', + name: provides, + needs: [], + provides: [provides], + run: () => ({ [provides]: collector }), + }); + }, + }; +} diff --git a/packages/metrics/src/prometheus.ts b/packages/metrics/src/prometheus.ts new file mode 100644 index 0000000..d63958d --- /dev/null +++ b/packages/metrics/src/prometheus.ts @@ -0,0 +1,22 @@ +import type { TransformerFn } from '@green-tea/core'; + +/** + * Serves a rendered scrape as the Prometheus text exposition format. + * + * A `TransformerFn` rather than a route: the path, the auth and whether the endpoint exists at all + * are the application's decisions, and a plugin that mounted `/metrics` itself would be taking them. + * The version is part of the content type — Prometheus reads it, and omitting it makes a scrape fall + * back to a guess. + * + * @example + * ⁣@Get('/metrics') + * ⁣@Transformer(prometheus) + * scrape(@needs('metrics') collector: Metrics) { + * return collector.render(); + * } + */ +export const prometheus: TransformerFn = (value) => ({ + status: 200, + headers: { 'content-type': 'text/plain; version=0.0.4; charset=utf-8' }, + body: String(value), +}); diff --git a/packages/metrics/test/metrics.test.ts b/packages/metrics/test/metrics.test.ts index d2adcdd..174f6ac 100644 --- a/packages/metrics/test/metrics.test.ts +++ b/packages/metrics/test/metrics.test.ts @@ -1,7 +1,10 @@ import { strict as assert } from 'node:assert'; import { test } from 'node:test'; +import { createApp, Get, Module, Route, Transformer, needs } from '@green-tea/core'; + import { Metrics } from '../src/collector.ts'; +import { metrics, prometheus } from '../src/index.ts'; const end = (route: string, method: string, status: number, durationMs = 5) => ({ name: route, route, method, status, durationMs }) as never; @@ -80,3 +83,48 @@ test('an event with no route is attributed rather than dropped or left blank', ( assert.equal(collector.snapshot().requests[0].route, ''); }); + +test('the transformer serves the text format with the content type Prometheus expects', () => { + const rendered = prometheus('green_tea_requests_total{route="/x",method="GET",status="200"} 1\n'); + + assert.equal(rendered.status, 200); + assert.match(rendered.headers!['content-type'], /text\/plain/); + assert.match(rendered.body, /green_tea_requests_total/); +}); + +test('an application serves its own /metrics route from the published collector', async () => { + @Route('/') + class Ops { + @Get('/metrics') + @Transformer(prometheus) + scrape(@needs('metrics') collector: Metrics) { + return collector.render(); + } + + @Get('/hello') + hello() { + return { ok: true }; + } + } + + @Module({ mountpoint: '/', controllers: [Ops] }) + class OpsModule {} + + const app = createApp({ modules: [OpsModule], plugins: [metrics()] }); + + try { + await app.fetch(new Request('http://plugin.test/hello')); + const scrape = await app.fetch(new Request('http://plugin.test/metrics')); + const body = await scrape.text(); + + assert.equal(scrape.status, 200); + assert.match(body, /green_tea_requests_total\{route="\/hello",method="GET",status="200"\} 1/); + } finally { + await app.close(); + } +}); + +test('the plugin is named after what it provides', () => { + assert.equal(metrics().name, 'metrics'); + assert.equal(metrics({ provides: 'opsMetrics' }).name, 'opsMetrics'); +}); -- 2.54.1 From e1773ae1e078fec947075e50e9bff58001411425 Mon Sep 17 00:00:00 2001 From: Diego Resendez Date: Fri, 18 Sep 2026 13:33:39 -0500 Subject: [PATCH 14/24] build: record the two new packages in the lockfile npm ci verifies the lockfile against every workspace package.json and refuses to install when they disagree, so adding rate-limit and metrics without refreshing the lock failed all four CI jobs at their first step. Nothing caught it locally: the contract tests import through relative paths (../src/index.ts) rather than by package name, so the new workspaces never needed to be linked into node_modules for the suite to pass. Verified now by running npm ci itself rather than npm install. Signed-off-by: Diego Resendez --- package-lock.json | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/package-lock.json b/package-lock.json index 57a4435..7ee4325 100644 --- a/package-lock.json +++ b/package-lock.json @@ -639,6 +639,14 @@ "resolved": "packages/jwt", "link": true }, + "node_modules/@green-tea/metrics": { + "resolved": "packages/metrics", + "link": true + }, + "node_modules/@green-tea/rate-limit": { + "resolved": "packages/rate-limit", + "link": true + }, "node_modules/@humanfs/core": { "version": "0.19.2", "resolved": "https://registry.npmjs.org/@humanfs/core/-/core-0.19.2.tgz", @@ -2936,6 +2944,32 @@ "deno": ">=2", "node": ">=22" } + }, + "packages/metrics": { + "name": "@green-tea/metrics", + "version": "26.9.0-beta.0", + "license": "MIT", + "devDependencies": { + "@green-tea/core": "26.9.0-beta.2" + }, + "engines": { + "bun": ">=1.3", + "deno": ">=2", + "node": ">=22" + } + }, + "packages/rate-limit": { + "name": "@green-tea/rate-limit", + "version": "26.9.0-beta.0", + "license": "MIT", + "devDependencies": { + "@green-tea/core": "26.9.0-beta.2" + }, + "engines": { + "bun": ">=1.3", + "deno": ">=2", + "node": ">=22" + } } } } -- 2.54.1 From 3b1eceecb9f4e93d7cc2ff8bbcf0013d0c94cfbc Mon Sep 17 00:00:00 2001 From: Diego Resendez Date: Sat, 19 Sep 2026 11:54:54 -0500 Subject: [PATCH 15/24] build: publish a real build to npm, and the source to JSR MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Every package exported `./src/index.ts` and had no build at all, which made the npm half of the dual publish unusable. Measured against a staging registry with `@green-tea/metrics` installed into a clean project: Node threw ERR_UNSUPPORTED_NODE_MODULES_TYPE_STRIPPING, `--experimental-strip-types` threw the same error because Node refuses to strip types under `node_modules` unconditionally, and Deno-via-npm threw it too. Only Bun could import it. The release pipeline would have published that to both registries at once. JSR needs no help — it transpiles on publish and hands Node an ESM package with generated declarations — so `deno.json` keeps exporting `src/`. The build exists for npm alone, as CJS and ESM: core is `"type": "commonjs"` and publishes both, so a CJS application has to be able to `require()` a plugin. Core stays external in the declarations. tsup bundles devDependencies by default, and convention rule 8 puts core there, so without that line every plugin would have shipped a frozen private copy of a contract core owns. Verified by packing all three and consuming them from outside the workspace: `require()` and `import` both resolve under Node, Bun and Deno, and `tsc` type-checks clean under `node16` and `bundler` resolution. Signed-off-by: Diego Resendez --- .github/workflows/ci.yml | 4 + AGENTS.md | 7 + eslint.config.mjs | 4 +- package-lock.json | 1353 ++++++++++++++++++++++++++++ package.json | 6 +- packages/jwt/package.json | 23 +- packages/jwt/tsup.config.ts | 17 + packages/metrics/package.json | 23 +- packages/metrics/tsup.config.ts | 17 + packages/rate-limit/package.json | 23 +- packages/rate-limit/tsup.config.ts | 17 + test/workspace.test.ts | 33 + 12 files changed, 1522 insertions(+), 5 deletions(-) create mode 100644 packages/jwt/tsup.config.ts create mode 100644 packages/metrics/tsup.config.ts create mode 100644 packages/rate-limit/tsup.config.ts diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7338ef7..bf61e4a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -55,6 +55,10 @@ jobs: - run: npm run complexity:check - run: npm run typecheck - run: npm test + # The npm tarball is a build artifact, so a broken build is a broken release. `typecheck` will + # not catch it: that runs with `noEmit`, and tsup emits through esbuild, which resolves and + # bundles on its own terms. + - run: npm run build # A fixed matrix, not `fromJSON`: Gitea Actions support for a dynamic matrix was not verified. Each # entry runs only the packages whose engines name that runtime (scripts/run-runtime.mjs). diff --git a/AGENTS.md b/AGENTS.md index e32b704..8435c6b 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -18,6 +18,7 @@ npm run typecheck npm test # Node: every package's contract tests + the workspace checks npm run test:deno # packages whose engines declare deno npm run test:bun # packages whose engines declare bun +npm run build # tsup, every package: dist/ as CJS + ESM + declarations, for npm only ``` Run all of them before proposing anything as finished. CI runs each one and each gates a merge. @@ -48,6 +49,12 @@ a pull request. Until core is consumed from npm (Plan B3), CI runs on Gitea only beside every one that is not supported. Nobody should have to open an issue to learn where a plugin runs. 10. A breaking change goes under `### Breaking`, first in the package's CHANGELOG. +11. **The two registries are served different things.** `deno.json` exports `./src/index.ts`, because + JSR transpiles TypeScript itself and hands Node a typed ESM package. `package.json` exports + `./dist/`, built by tsup as CJS *and* ESM, because npm transpiles nothing and Node refuses to + strip types under `node_modules` — `--experimental-strip-types` does not lift that, so a package + exporting `.ts` installs cleanly and then throws on the first import, everywhere but Bun. + `test/workspace.test.ts` pins both halves. ## Conventions diff --git a/eslint.config.mjs b/eslint.config.mjs index b261ee4..ffb8807 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -3,7 +3,9 @@ import tseslint from 'typescript-eslint'; import stylistic from '@stylistic/eslint-plugin'; export default tseslint.config( - { ignores: ['dist', 'node_modules', 'coverage'] }, + // Flat-config ignores are literal paths unless globbed, and the build output now lives one level + // down in every package — a bare 'dist' would only have covered a root directory that does not exist. + { ignores: ['**/dist', '**/node_modules', '**/coverage'] }, js.configs.recommended, ...tseslint.configs.recommended, { diff --git a/package-lock.json b/package-lock.json index 7ee4325..a576c77 100644 --- a/package-lock.json +++ b/package-lock.json @@ -16,6 +16,7 @@ "cognitive-complexity-ts": "^0.8.2", "eslint": "^9.39.5", "prettier": "^3.9.6", + "tsup": "^8.5.1", "tsx": "^4.23.5", "typescript": "^5.5.0", "typescript-eslint": "^8.70.0" @@ -731,6 +732,62 @@ "node": ">=12" } }, + "node_modules/@jridgewell/gen-mapping": { + "version": "0.3.13", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.13.tgz", + "integrity": "sha512-2kkt/7niJ6MgEPxF0bYdQ6etZaA+fQvDcLKckhy1yIQOzaoKjBBjSj63/aLVjYE3qhRt5dvM+uUyfCg6UKCBbA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.5.0", + "@jridgewell/trace-mapping": "^0.3.24" + } + }, + "node_modules/@jridgewell/resolve-uri": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", + "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.6.0.tgz", + "integrity": "sha512-T7jf+5zgsZHwNJ4lvQ7/aezbyk0nNX+zJVWpmHA7VYsEx7a7qr5Rg5IbtJFqkgze5Y2sruq1RUY8Q837Od7iFw==", + "dev": true, + "license": "MIT" + }, + "node_modules/@jridgewell/trace-mapping": { + "version": "0.3.31", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.31.tgz", + "integrity": "sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/resolve-uri": "^3.1.0", + "@jridgewell/sourcemap-codec": "^1.4.14" + } + }, + "node_modules/@napi-rs/lzma-linux-x64-gnu": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/@napi-rs/lzma-linux-x64-gnu/-/lzma-linux-x64-gnu-1.5.1.tgz", + "integrity": "sha512-oTXEIha4SsuXdTA4Iyskj0kpdx2yVXdhd75c2v3xGrHFfVMsbhTPZU/nMPL4sWKo4pBHm3aucLaqGlF696dTyQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^22.20 || ^24.12 || >=25" + } + }, "node_modules/@one-ini/wasm": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/@one-ini/wasm/-/wasm-0.1.1.tgz", @@ -749,6 +806,356 @@ "node": ">=14" } }, + "node_modules/@rollup/rollup-android-arm-eabi": { + "version": "4.63.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.63.4.tgz", + "integrity": "sha512-I+BSHzTAhKN2n7ZwGZsegGcZjDpLqFOMAtJz/u6uFGe0pUFbq56dEHjqJV/ZUdRJtNXNxA+hREUatZBvMR3Oiw==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@rollup/rollup-android-arm64": { + "version": "4.63.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.63.4.tgz", + "integrity": "sha512-pu3BdjS2LtEzRu2elmGzS3fIeWSZy4BMDIaLNwjorO76+k2d0LMluijhsDx3KQyQBQ/lLUZCQA9/s6csvUfuhw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@rollup/rollup-darwin-arm64": { + "version": "4.63.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.63.4.tgz", + "integrity": "sha512-xfSrj9MHnWK9GaSqT9U0ImHtH/N8WZlHLx4cZHiuLcqs640hvZ3hLPd5UR2AZS57FaE8HrRUSpltbZdWRxHiDA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@rollup/rollup-darwin-x64": { + "version": "4.63.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.63.4.tgz", + "integrity": "sha512-bqU99PLJb/dqb3S0GIMdeuyAEETSUgZBoqXYd3Sd+WCsV+MmPhnN6JrotWyir31+QgH7EvvE5/mwGJlEoci8Fw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@rollup/rollup-freebsd-arm64": { + "version": "4.63.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.63.4.tgz", + "integrity": "sha512-JinsFZ5G40oXQb+sUuiA5x689vhr6dDYK0H0NL+rwKdL6CqnmYN8PE4ZwfRSoIjrCxqTQG/SLfTtSvHeGxoVlw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ] + }, + "node_modules/@rollup/rollup-freebsd-x64": { + "version": "4.63.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.63.4.tgz", + "integrity": "sha512-GAdA4UxpiNm27cLHr2GqXBpAD0x9FqwYBY7/YSP0Ss0/PNi4k8gbviqpIpYbVSRBaS2ZcegXEzgTQMbRNCwxCw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ] + }, + "node_modules/@rollup/rollup-linux-arm-gnueabihf": { + "version": "4.63.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.63.4.tgz", + "integrity": "sha512-qDd6NoA1znaLjp4jR5U/KWCdLAKDJNB8W9ChbbDaKbo0xA+Atln5HK6LFCZ4oJQpemtRZA288DCirFRjrspptw==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm-musleabihf": { + "version": "4.63.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.63.4.tgz", + "integrity": "sha512-WtB5Tz5KTNINb8ZA+8sQ7bmjuS1JrRT7YverYIhUGdWWDlpzVWmIwuZE+jidkEXUn1l0zrEkaIMa8dHF3NGcsA==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm64-gnu": { + "version": "4.63.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.63.4.tgz", + "integrity": "sha512-VcQ3L1tjnkKzWjryAVaFhHEWcqOfICX9uxVVoDzm2t0DpgKRHd2zOpVrJc0xsWeBZcBFyYROCIBdyR/fS174pg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm64-musl": { + "version": "4.63.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.63.4.tgz", + "integrity": "sha512-6+ZQX6P5s0cMDN2Ypb8Lbm2+/sZYmZjdaYny992ujUU9UKi/4CWoJWsl1pNvjWJHNHGK51m+jKGLlh1ylb2ifQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-loong64-gnu": { + "version": "4.63.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-gnu/-/rollup-linux-loong64-gnu-4.63.4.tgz", + "integrity": "sha512-D72ZnvkFkBXOfzMMQLcwfPLyGkKb7HZ9/mf97B7v6/P5Lbv4oFOtSY/uHbS8lH6uKUOxoKiuokdb50XZSzzbJw==", + "cpu": [ + "loong64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-loong64-musl": { + "version": "4.63.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-musl/-/rollup-linux-loong64-musl-4.63.4.tgz", + "integrity": "sha512-piU6BxeqA3O9KSu3kRCIQQtNqFFaTu21SEV4FwaRZowpnj3bLaWPZHw+xFqCs0XlJ+aOH3PTRWGoglH+mKA/OA==", + "cpu": [ + "loong64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-ppc64-gnu": { + "version": "4.63.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-gnu/-/rollup-linux-ppc64-gnu-4.63.4.tgz", + "integrity": "sha512-/5PGpHwqt2EEEOUs1XwzubE/ucr0dWDQ+to3zqi4Ds7EWpwtQ79wXc4JBoxqj/OwpawTsKWzJxHfSuBOq3DrWA==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-ppc64-musl": { + "version": "4.63.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-musl/-/rollup-linux-ppc64-musl-4.63.4.tgz", + "integrity": "sha512-cX3beZDLWt7G2oJF+nhChiT+qtaihs+S2xi7ziGmVB+2pwPng6D0Ed0HmElQOgv2UsUmSJJLGwpBao/3TDx3VA==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-riscv64-gnu": { + "version": "4.63.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.63.4.tgz", + "integrity": "sha512-1uz2mGWHyptR7DgHHrlbdRAjXK7v7elGZ9lMja910/RP+ZYbX6xAmCiU9UZSX4hqmgtHMv6lr5l3kq1HIOpcag==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-riscv64-musl": { + "version": "4.63.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.63.4.tgz", + "integrity": "sha512-nLS8topojxyz7SRpKR2IODRpQ0XPZ+xaOXvT3+hqK/Uy8Lo5HFgkkIBiIrCu5tL5YqzTvgovGw55PwpahTAGig==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-s390x-gnu": { + "version": "4.63.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.63.4.tgz", + "integrity": "sha512-gs7DRKotr3l3q+jGPQBjH0ng1FjlEDm5ueQrkw5JtQvtLyEIcLASqAEaor56BhkKRzk+IcQzrcanBdb/bBQn8g==", + "cpu": [ + "s390x" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-x64-gnu": { + "version": "4.63.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.63.4.tgz", + "integrity": "sha512-791ET7W17NnScOZM7h4dX5hYspxE28htPFsb1awY/NRR8+PRNkS53e475rDdxXXDrP+kwnCcNWg9CX5ztn/Aqw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-x64-musl": { + "version": "4.63.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.63.4.tgz", + "integrity": "sha512-iwZQRcmj7g88g3tzefIrQY7qvmuA/cfYwhrDtTBhsmukO4U2huVO5W+86XacUMRvdSFVAc6kZUZy21JaRwiB9w==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-openbsd-x64": { + "version": "4.63.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-openbsd-x64/-/rollup-openbsd-x64-4.63.4.tgz", + "integrity": "sha512-dVHFp9gRWrdTpnqQuGfCwd7hOQDatK1VCP2iWhLY/cGrOQs/ucFzJ6A5SRqbXX12ZDI8EUuejSM5kwg+ja7Png==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ] + }, + "node_modules/@rollup/rollup-openharmony-arm64": { + "version": "4.63.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-openharmony-arm64/-/rollup-openharmony-arm64-4.63.4.tgz", + "integrity": "sha512-t3NlauOW6gxZVVFcBEnO62Cb4wbyDFL416gTg1uFI/2tgqYQlf69FbSE115Ajre9I+c26Lk4mcmdFUsS/DGifQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openharmony" + ] + }, + "node_modules/@rollup/rollup-win32-arm64-msvc": { + "version": "4.63.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.63.4.tgz", + "integrity": "sha512-xWuIaSye5FWZF8+UYtVEcHtRJDN5kN9Kfgxx3Kq8XIov9KSKbc1fiqQCm90SKrgQbUXZelbnUhnlUJmfSE7P9A==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-ia32-msvc": { + "version": "4.63.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.63.4.tgz", + "integrity": "sha512-9ALJJUOg/ZflMJepVo2PlgsGxSaxN7SQ4Z8GoZfVlarWr6r3rkHUNsd/zAio7p4YMtChSMXPionxej4Hkf6CXQ==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-x64-gnu": { + "version": "4.63.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-gnu/-/rollup-win32-x64-gnu-4.63.4.tgz", + "integrity": "sha512-blj9z5qx/Pv4WU0W1NMFDB97e0JH5ed+aZGywW8WCvp/NhWX/4PFAq5uu6Q0AebNn+Vo6KzUYDT++JzTT5ojlQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-x64-msvc": { + "version": "4.63.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.63.4.tgz", + "integrity": "sha512-Erx822VRBwLa124shbj+wNXe//BOgMEctDV0m1aqTQdNO1S69DgNUCFKC1RCeZfixs1J31l6igk1ziyXErbigQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, "node_modules/@stylistic/eslint-plugin": { "version": "5.10.0", "resolved": "https://registry.npmjs.org/@stylistic/eslint-plugin/-/eslint-plugin-5.10.0.tgz", @@ -1155,6 +1562,13 @@ "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, + "node_modules/any-promise": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/any-promise/-/any-promise-1.3.0.tgz", + "integrity": "sha512-7UvmKalWRt1wgjL1RrGxoSJW/0QZFIegpeGvZG9kjp8vrRu55XTHbwnqq2GpXm9uLbcuhxm3IqX9OB4MZR1b2A==", + "dev": true, + "license": "MIT" + }, "node_modules/argparse": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", @@ -1203,6 +1617,32 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/bundle-require": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/bundle-require/-/bundle-require-5.1.0.tgz", + "integrity": "sha512-3WrrOuZiyaaZPWiEt4G3+IffISVC9HYlWueJEBWED4ZH4aIAC2PnkdnuRrR94M+w6yGWn4AglWtJtBI8YqvgoA==", + "dev": true, + "license": "MIT", + "dependencies": { + "load-tsconfig": "^0.2.3" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "peerDependencies": { + "esbuild": ">=0.18" + } + }, + "node_modules/cac": { + "version": "6.7.14", + "resolved": "https://registry.npmjs.org/cac/-/cac-6.7.14.tgz", + "integrity": "sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, "node_modules/callsites": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", @@ -1230,6 +1670,22 @@ "url": "https://github.com/chalk/chalk?sponsor=1" } }, + "node_modules/chokidar": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-4.0.3.tgz", + "integrity": "sha512-Qgzu8kfBvo+cA4962jnP1KkS6Dop5NS6g7R5LFYJr4b8Ub94PPQXUksCw9PvXoeXPRRddRNC5C1JQUR2SMGtnA==", + "dev": true, + "license": "MIT", + "dependencies": { + "readdirp": "^4.0.1" + }, + "engines": { + "node": ">= 14.16.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, "node_modules/cognitive-complexity-ts": { "version": "0.8.2", "resolved": "https://registry.npmjs.org/cognitive-complexity-ts/-/cognitive-complexity-ts-0.8.2.tgz", @@ -1289,6 +1745,13 @@ "dev": true, "license": "MIT" }, + "node_modules/confbox": { + "version": "0.1.8", + "resolved": "https://registry.npmjs.org/confbox/-/confbox-0.1.8.tgz", + "integrity": "sha512-RMtmw0iFkeR4YV+fUOSucriAQNb9g8zFR52MWCtl+cCZOFRNL6zeB395vPzFhEjjn4fMxXudmELnl/KF/WrK6w==", + "dev": true, + "license": "MIT" + }, "node_modules/config-chain": { "version": "1.1.13", "resolved": "https://registry.npmjs.org/config-chain/-/config-chain-1.1.13.tgz", @@ -1300,6 +1763,16 @@ "proto-list": "~1.2.1" } }, + "node_modules/consola": { + "version": "3.4.2", + "resolved": "https://registry.npmjs.org/consola/-/consola-3.4.2.tgz", + "integrity": "sha512-5IKcdX0nnYavi6G7TtOhwkYzyjfJlatbjMjuLSfE2kYT5pMDOilZ4OvMhi637CcDICTmz3wARPoyhqyX1Y+XvA==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^14.18.0 || >=16.10.0" + } + }, "node_modules/cross-spawn": { "version": "7.0.6", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", @@ -1721,6 +2194,18 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/fix-dts-default-cjs-exports": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/fix-dts-default-cjs-exports/-/fix-dts-default-cjs-exports-1.0.1.tgz", + "integrity": "sha512-pVIECanWFC61Hzl2+oOCtoJ3F17kglZC/6N94eRWycFgBH35hHx0Li604ZIzhseh97mf2p0cv7vVrOZGoqhlEg==", + "dev": true, + "license": "MIT", + "dependencies": { + "magic-string": "^0.30.17", + "mlly": "^1.7.4", + "rollup": "^4.34.8" + } + }, "node_modules/flat-cache": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-4.0.1.tgz", @@ -2031,6 +2516,16 @@ "url": "https://github.com/sponsors/panva" } }, + "node_modules/joycon": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/joycon/-/joycon-3.1.1.tgz", + "integrity": "sha512-34wB/Y7MW7bzjKRjUKTa46I2Z7eV62Rkhva+KkopW7Qvv/OSWBqvkSY7vusOPrNuZcUG3tApvdVgNB8POj3SPw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + } + }, "node_modules/js-beautify": { "version": "1.15.4", "resolved": "https://registry.npmjs.org/js-beautify/-/js-beautify-1.15.4.tgz", @@ -2128,6 +2623,36 @@ "node": ">= 0.8.0" } }, + "node_modules/lilconfig": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-3.1.3.tgz", + "integrity": "sha512-/vlFKAoH5Cgt3Ie+JLhRbwOsCQePABiU3tJ1egGvyQ+33R/vcwM2Zl2QR/LzjsBeItPt3oSVXapn+m4nQDvpzw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/antonk52" + } + }, + "node_modules/lines-and-columns": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", + "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==", + "dev": true, + "license": "MIT" + }, + "node_modules/load-tsconfig": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/load-tsconfig/-/load-tsconfig-0.2.5.tgz", + "integrity": "sha512-IXO6OCs9yg8tMKzfPZ1YmheJbZCiEsnBdcB03l0OcfK9prKnJb96siuHCr5Fl37/yo9DnKU+TLpxzTUspw9shg==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + } + }, "node_modules/locate-path": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", @@ -2158,6 +2683,16 @@ "dev": true, "license": "ISC" }, + "node_modules/magic-string": { + "version": "0.30.21", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.21.tgz", + "integrity": "sha512-vd2F4YUyEXKGcLHoq+TEyCjxueSeHnFxyyjNp80yg0XV4vUhnDer/lvvlqM/arB5bXQN5K2/3oinyCRyx8T2CQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.5.5" + } + }, "node_modules/minimatch": { "version": "3.1.5", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.5.tgz", @@ -2191,6 +2726,19 @@ "node": ">=16 || 14 >=14.17" } }, + "node_modules/mlly": { + "version": "1.8.2", + "resolved": "https://registry.npmjs.org/mlly/-/mlly-1.8.2.tgz", + "integrity": "sha512-d+ObxMQFmbt10sretNDytwt85VrbkhhUA/JBGm1MPaWJ65Cl4wOgLaB1NYvJSZ0Ef03MMEU/0xpPMXUIQ29UfA==", + "dev": true, + "license": "MIT", + "dependencies": { + "acorn": "^8.16.0", + "pathe": "^2.0.3", + "pkg-types": "^1.3.1", + "ufo": "^1.6.3" + } + }, "node_modules/ms": { "version": "2.1.3", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", @@ -2198,6 +2746,18 @@ "dev": true, "license": "MIT" }, + "node_modules/mz": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/mz/-/mz-2.7.0.tgz", + "integrity": "sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "any-promise": "^1.0.0", + "object-assign": "^4.0.1", + "thenify-all": "^1.0.0" + } + }, "node_modules/natural-compare": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", @@ -2221,6 +2781,16 @@ "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, + "node_modules/object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/open": { "version": "11.0.4", "resolved": "https://registry.npmjs.org/open/-/open-11.0.4.tgz", @@ -2349,6 +2919,20 @@ "url": "https://github.com/sponsors/isaacs" } }, + "node_modules/pathe": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/pathe/-/pathe-2.0.3.tgz", + "integrity": "sha512-WUjGcAqP1gQacoQe+OBJsFA7Ld4DyXuUIjZ5cc75cLHvJ7dtNsTugphxIADwspS+AraAUePCKrSVtPLFj/F88w==", + "dev": true, + "license": "MIT" + }, + "node_modules/picocolors": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", + "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", + "dev": true, + "license": "ISC" + }, "node_modules/picomatch": { "version": "4.0.7", "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.7.tgz", @@ -2362,6 +2946,71 @@ "url": "https://github.com/sponsors/jonschlinkert" } }, + "node_modules/pirates": { + "version": "4.0.7", + "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.7.tgz", + "integrity": "sha512-TfySrs/5nm8fQJDcBDuUng3VOUKsd7S+zqvbOTiGXHfxX4wK31ard+hoNuvkicM/2YFzlpDgABOevKSsB4G/FA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 6" + } + }, + "node_modules/pkg-types": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/pkg-types/-/pkg-types-1.3.1.tgz", + "integrity": "sha512-/Jm5M4RvtBFVkKWRu2BLUTNP8/M2a+UwuAX+ae4770q1qVGtfjG+WTCupoZixokjmHiry8uI+dlY8KXYV5HVVQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "confbox": "^0.1.8", + "mlly": "^1.7.4", + "pathe": "^2.0.1" + } + }, + "node_modules/postcss-load-config": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/postcss-load-config/-/postcss-load-config-6.0.1.tgz", + "integrity": "sha512-oPtTM4oerL+UXmx+93ytZVN82RrlY/wPUV8IeDxFrzIjXOLF1pN+EmKPLbubvKHT2HC20xXsCAH2Z+CKV6Oz/g==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "dependencies": { + "lilconfig": "^3.1.1" + }, + "engines": { + "node": ">= 18" + }, + "peerDependencies": { + "jiti": ">=1.21.0", + "postcss": ">=8.0.9", + "tsx": "^4.8.1", + "yaml": "^2.4.2" + }, + "peerDependenciesMeta": { + "jiti": { + "optional": true + }, + "postcss": { + "optional": true + }, + "tsx": { + "optional": true + }, + "yaml": { + "optional": true + } + } + }, "node_modules/powershell-utils": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/powershell-utils/-/powershell-utils-0.2.1.tgz", @@ -2418,6 +3067,20 @@ "node": ">=6" } }, + "node_modules/readdirp": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-4.1.2.tgz", + "integrity": "sha512-GDhwkLfywWL2s6vEjyhri+eXmfH6j1L7JE27WhqLeYzoh/A3DBaYGEj2H/HFZCn/kMfim73FXxEJTw06WtxQwg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 14.18.0" + }, + "funding": { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } + }, "node_modules/reflect-metadata": { "version": "0.2.2", "resolved": "https://registry.npmjs.org/reflect-metadata/-/reflect-metadata-0.2.2.tgz", @@ -2435,6 +3098,52 @@ "node": ">=4" } }, + "node_modules/rollup": { + "version": "4.63.4", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.63.4.tgz", + "integrity": "sha512-4U0liVayNIoLp3GFl1FcI8561WepLnZ1rqfraGh7S9B3Ur5F9S283y8Futii7RUU2C/97tOBmBy7nYvhoiOpbQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/estree": "1.0.9" + }, + "bin": { + "rollup": "dist/bin/rollup" + }, + "engines": { + "node": ">=18.0.0", + "npm": ">=8.0.0" + }, + "optionalDependencies": { + "@napi-rs/lzma-linux-x64-gnu": "1.5.1", + "@rollup/rollup-android-arm-eabi": "4.63.4", + "@rollup/rollup-android-arm64": "4.63.4", + "@rollup/rollup-darwin-arm64": "4.63.4", + "@rollup/rollup-darwin-x64": "4.63.4", + "@rollup/rollup-freebsd-arm64": "4.63.4", + "@rollup/rollup-freebsd-x64": "4.63.4", + "@rollup/rollup-linux-arm-gnueabihf": "4.63.4", + "@rollup/rollup-linux-arm-musleabihf": "4.63.4", + "@rollup/rollup-linux-arm64-gnu": "4.63.4", + "@rollup/rollup-linux-arm64-musl": "4.63.4", + "@rollup/rollup-linux-loong64-gnu": "4.63.4", + "@rollup/rollup-linux-loong64-musl": "4.63.4", + "@rollup/rollup-linux-ppc64-gnu": "4.63.4", + "@rollup/rollup-linux-ppc64-musl": "4.63.4", + "@rollup/rollup-linux-riscv64-gnu": "4.63.4", + "@rollup/rollup-linux-riscv64-musl": "4.63.4", + "@rollup/rollup-linux-s390x-gnu": "4.63.4", + "@rollup/rollup-linux-x64-gnu": "4.63.4", + "@rollup/rollup-linux-x64-musl": "4.63.4", + "@rollup/rollup-openbsd-x64": "4.63.4", + "@rollup/rollup-openharmony-arm64": "4.63.4", + "@rollup/rollup-win32-arm64-msvc": "4.63.4", + "@rollup/rollup-win32-ia32-msvc": "4.63.4", + "@rollup/rollup-win32-x64-gnu": "4.63.4", + "@rollup/rollup-win32-x64-msvc": "4.63.4", + "fsevents": "~2.3.2" + } + }, "node_modules/run-applescript": { "version": "7.1.0", "resolved": "https://registry.npmjs.org/run-applescript/-/run-applescript-7.1.0.tgz", @@ -2635,6 +3344,39 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/sucrase": { + "version": "3.35.1", + "resolved": "https://registry.npmjs.org/sucrase/-/sucrase-3.35.1.tgz", + "integrity": "sha512-DhuTmvZWux4H1UOnWMB3sk0sbaCVOoQZjv8u1rDoTV0HTdGem9hkAZtl4JZy8P2z4Bg0nT+YMeOFyVr4zcG5Tw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/gen-mapping": "^0.3.2", + "commander": "^4.0.0", + "lines-and-columns": "^1.1.6", + "mz": "^2.7.0", + "pirates": "^4.0.1", + "tinyglobby": "^0.2.11", + "ts-interface-checker": "^0.1.9" + }, + "bin": { + "sucrase": "bin/sucrase", + "sucrase-node": "bin/sucrase-node" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, + "node_modules/sucrase/node_modules/commander": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-4.1.1.tgz", + "integrity": "sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 6" + } + }, "node_modules/supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", @@ -2648,6 +3390,36 @@ "node": ">=8" } }, + "node_modules/thenify": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/thenify/-/thenify-3.3.1.tgz", + "integrity": "sha512-RVZSIV5IG10Hk3enotrhvz0T9em6cyHBLkH/YAZuKqd8hRkKhSfCGIcP2KUY0EPxndzANBmNllzWPwak+bheSw==", + "dev": true, + "license": "MIT", + "dependencies": { + "any-promise": "^1.0.0" + } + }, + "node_modules/thenify-all": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/thenify-all/-/thenify-all-1.6.0.tgz", + "integrity": "sha512-RNxQH/qI8/t3thXJDwcstUO4zeqo64+Uy/+sNVRBx4Xn2OX+OZ9oP+iJnNFqplFra2ZUVeKCSa2oVWi3T4uVmA==", + "dev": true, + "license": "MIT", + "dependencies": { + "thenify": ">= 3.1.0 < 4" + }, + "engines": { + "node": ">=0.8" + } + }, + "node_modules/tinyexec": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/tinyexec/-/tinyexec-0.3.2.tgz", + "integrity": "sha512-KQQR9yN7R5+OSwaK0XQoj22pwHoTlgYqmUscPYoknOoWCWfj/5/ABTMRi69FrKU5ffPVh5QcFikpWJI/P1ocHA==", + "dev": true, + "license": "MIT" + }, "node_modules/tinyglobby": { "version": "0.2.17", "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.17.tgz", @@ -2665,6 +3437,16 @@ "url": "https://github.com/sponsors/SuperchupuDev" } }, + "node_modules/tree-kill": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/tree-kill/-/tree-kill-1.2.2.tgz", + "integrity": "sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A==", + "dev": true, + "license": "MIT", + "bin": { + "tree-kill": "cli.js" + } + }, "node_modules/ts-api-utils": { "version": "2.5.0", "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-2.5.0.tgz", @@ -2678,6 +3460,570 @@ "typescript": ">=4.8.4" } }, + "node_modules/ts-interface-checker": { + "version": "0.1.13", + "resolved": "https://registry.npmjs.org/ts-interface-checker/-/ts-interface-checker-0.1.13.tgz", + "integrity": "sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA==", + "dev": true, + "license": "Apache-2.0" + }, + "node_modules/tsup": { + "version": "8.5.1", + "resolved": "https://registry.npmjs.org/tsup/-/tsup-8.5.1.tgz", + "integrity": "sha512-xtgkqwdhpKWr3tKPmCkvYmS9xnQK3m3XgxZHwSUjvfTjp7YfXe5tT3GgWi0F2N+ZSMsOeWeZFh7ZZFg5iPhing==", + "dev": true, + "license": "MIT", + "dependencies": { + "bundle-require": "^5.1.0", + "cac": "^6.7.14", + "chokidar": "^4.0.3", + "consola": "^3.4.0", + "debug": "^4.4.0", + "esbuild": "^0.27.0", + "fix-dts-default-cjs-exports": "^1.0.0", + "joycon": "^3.1.1", + "picocolors": "^1.1.1", + "postcss-load-config": "^6.0.1", + "resolve-from": "^5.0.0", + "rollup": "^4.34.8", + "source-map": "^0.7.6", + "sucrase": "^3.35.0", + "tinyexec": "^0.3.2", + "tinyglobby": "^0.2.11", + "tree-kill": "^1.2.2" + }, + "bin": { + "tsup": "dist/cli-default.js", + "tsup-node": "dist/cli-node.js" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "@microsoft/api-extractor": "^7.36.0", + "@swc/core": "^1", + "postcss": "^8.4.12", + "typescript": ">=4.5.0" + }, + "peerDependenciesMeta": { + "@microsoft/api-extractor": { + "optional": true + }, + "@swc/core": { + "optional": true + }, + "postcss": { + "optional": true + }, + "typescript": { + "optional": true + } + } + }, + "node_modules/tsup/node_modules/@esbuild/aix-ppc64": { + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.27.7.tgz", + "integrity": "sha512-EKX3Qwmhz1eMdEJokhALr0YiD0lhQNwDqkPYyPhiSwKrh7/4KRjQc04sZ8db+5DVVnZ1LmbNDI1uAMPEUBnQPg==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "aix" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsup/node_modules/@esbuild/android-arm": { + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.27.7.tgz", + "integrity": "sha512-jbPXvB4Yj2yBV7HUfE2KHe4GJX51QplCN1pGbYjvsyCZbQmies29EoJbkEc+vYuU5o45AfQn37vZlyXy4YJ8RQ==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsup/node_modules/@esbuild/android-arm64": { + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.27.7.tgz", + "integrity": "sha512-62dPZHpIXzvChfvfLJow3q5dDtiNMkwiRzPylSCfriLvZeq0a1bWChrGx/BbUbPwOrsWKMn8idSllklzBy+dgQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsup/node_modules/@esbuild/android-x64": { + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.27.7.tgz", + "integrity": "sha512-x5VpMODneVDb70PYV2VQOmIUUiBtY3D3mPBG8NxVk5CogneYhkR7MmM3yR/uMdITLrC1ml/NV1rj4bMJuy9MCg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsup/node_modules/@esbuild/darwin-arm64": { + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.27.7.tgz", + "integrity": "sha512-5lckdqeuBPlKUwvoCXIgI2D9/ABmPq3Rdp7IfL70393YgaASt7tbju3Ac+ePVi3KDH6N2RqePfHnXkaDtY9fkw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsup/node_modules/@esbuild/darwin-x64": { + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.27.7.tgz", + "integrity": "sha512-rYnXrKcXuT7Z+WL5K980jVFdvVKhCHhUwid+dDYQpH+qu+TefcomiMAJpIiC2EM3Rjtq0sO3StMV/+3w3MyyqQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsup/node_modules/@esbuild/freebsd-arm64": { + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.27.7.tgz", + "integrity": "sha512-B48PqeCsEgOtzME2GbNM2roU29AMTuOIN91dsMO30t+Ydis3z/3Ngoj5hhnsOSSwNzS+6JppqWsuhTp6E82l2w==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsup/node_modules/@esbuild/freebsd-x64": { + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.27.7.tgz", + "integrity": "sha512-jOBDK5XEjA4m5IJK3bpAQF9/Lelu/Z9ZcdhTRLf4cajlB+8VEhFFRjWgfy3M1O4rO2GQ/b2dLwCUGpiF/eATNQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsup/node_modules/@esbuild/linux-arm": { + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.27.7.tgz", + "integrity": "sha512-RkT/YXYBTSULo3+af8Ib0ykH8u2MBh57o7q/DAs3lTJlyVQkgQvlrPTnjIzzRPQyavxtPtfg0EopvDyIt0j1rA==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsup/node_modules/@esbuild/linux-arm64": { + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.27.7.tgz", + "integrity": "sha512-RZPHBoxXuNnPQO9rvjh5jdkRmVizktkT7TCDkDmQ0W2SwHInKCAV95GRuvdSvA7w4VMwfCjUiPwDi0ZO6Nfe9A==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsup/node_modules/@esbuild/linux-ia32": { + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.27.7.tgz", + "integrity": "sha512-GA48aKNkyQDbd3KtkplYWT102C5sn/EZTY4XROkxONgruHPU72l+gW+FfF8tf2cFjeHaRbWpOYa/uRBz/Xq1Pg==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsup/node_modules/@esbuild/linux-loong64": { + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.27.7.tgz", + "integrity": "sha512-a4POruNM2oWsD4WKvBSEKGIiWQF8fZOAsycHOt6JBpZ+JN2n2JH9WAv56SOyu9X5IqAjqSIPTaJkqN8F7XOQ5Q==", + "cpu": [ + "loong64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsup/node_modules/@esbuild/linux-mips64el": { + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.27.7.tgz", + "integrity": "sha512-KabT5I6StirGfIz0FMgl1I+R1H73Gp0ofL9A3nG3i/cYFJzKHhouBV5VWK1CSgKvVaG4q1RNpCTR2LuTVB3fIw==", + "cpu": [ + "mips64el" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsup/node_modules/@esbuild/linux-ppc64": { + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.27.7.tgz", + "integrity": "sha512-gRsL4x6wsGHGRqhtI+ifpN/vpOFTQtnbsupUF5R5YTAg+y/lKelYR1hXbnBdzDjGbMYjVJLJTd2OFmMewAgwlQ==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsup/node_modules/@esbuild/linux-riscv64": { + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.27.7.tgz", + "integrity": "sha512-hL25LbxO1QOngGzu2U5xeXtxXcW+/GvMN3ejANqXkxZ/opySAZMrc+9LY/WyjAan41unrR3YrmtTsUpwT66InQ==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsup/node_modules/@esbuild/linux-s390x": { + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.27.7.tgz", + "integrity": "sha512-2k8go8Ycu1Kb46vEelhu1vqEP+UeRVj2zY1pSuPdgvbd5ykAw82Lrro28vXUrRmzEsUV0NzCf54yARIK8r0fdw==", + "cpu": [ + "s390x" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsup/node_modules/@esbuild/linux-x64": { + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.27.7.tgz", + "integrity": "sha512-hzznmADPt+OmsYzw1EE33ccA+HPdIqiCRq7cQeL1Jlq2gb1+OyWBkMCrYGBJ+sxVzve2ZJEVeePbLM2iEIZSxA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsup/node_modules/@esbuild/netbsd-arm64": { + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.27.7.tgz", + "integrity": "sha512-b6pqtrQdigZBwZxAn1UpazEisvwaIDvdbMbmrly7cDTMFnw/+3lVxxCTGOrkPVnsYIosJJXAsILG9XcQS+Yu6w==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsup/node_modules/@esbuild/netbsd-x64": { + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.27.7.tgz", + "integrity": "sha512-OfatkLojr6U+WN5EDYuoQhtM+1xco+/6FSzJJnuWiUw5eVcicbyK3dq5EeV/QHT1uy6GoDhGbFpprUiHUYggrw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsup/node_modules/@esbuild/openbsd-arm64": { + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.27.7.tgz", + "integrity": "sha512-AFuojMQTxAz75Fo8idVcqoQWEHIXFRbOc1TrVcFSgCZtQfSdc1RXgB3tjOn/krRHENUB4j00bfGjyl2mJrU37A==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsup/node_modules/@esbuild/openbsd-x64": { + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.27.7.tgz", + "integrity": "sha512-+A1NJmfM8WNDv5CLVQYJ5PshuRm/4cI6WMZRg1by1GwPIQPCTs1GLEUHwiiQGT5zDdyLiRM/l1G0Pv54gvtKIg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsup/node_modules/@esbuild/openharmony-arm64": { + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/openharmony-arm64/-/openharmony-arm64-0.27.7.tgz", + "integrity": "sha512-+KrvYb/C8zA9CU/g0sR6w2RBw7IGc5J2BPnc3dYc5VJxHCSF1yNMxTV5LQ7GuKteQXZtspjFbiuW5/dOj7H4Yw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openharmony" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsup/node_modules/@esbuild/sunos-x64": { + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.27.7.tgz", + "integrity": "sha512-ikktIhFBzQNt/QDyOL580ti9+5mL/YZeUPKU2ivGtGjdTYoqz6jObj6nOMfhASpS4GU4Q/Clh1QtxWAvcYKamA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsup/node_modules/@esbuild/win32-arm64": { + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.27.7.tgz", + "integrity": "sha512-7yRhbHvPqSpRUV7Q20VuDwbjW5kIMwTHpptuUzV+AA46kiPze5Z7qgt6CLCK3pWFrHeNfDd1VKgyP4O+ng17CA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsup/node_modules/@esbuild/win32-ia32": { + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.27.7.tgz", + "integrity": "sha512-SmwKXe6VHIyZYbBLJrhOoCJRB/Z1tckzmgTLfFYOfpMAx63BJEaL9ExI8x7v0oAO3Zh6D/Oi1gVxEYr5oUCFhw==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsup/node_modules/@esbuild/win32-x64": { + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.27.7.tgz", + "integrity": "sha512-56hiAJPhwQ1R4i+21FVF7V8kSD5zZTdHcVuRFMW0hn753vVfQN8xlx4uOPT4xoGH0Z/oVATuR82AiqSTDIpaHg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsup/node_modules/esbuild": { + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.27.7.tgz", + "integrity": "sha512-IxpibTjyVnmrIQo5aqNpCgoACA/dTKLTlhMHihVHhdkxKyPO1uBBthumT0rdHmcsk9uMonIWS0m4FljWzILh3w==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=18" + }, + "optionalDependencies": { + "@esbuild/aix-ppc64": "0.27.7", + "@esbuild/android-arm": "0.27.7", + "@esbuild/android-arm64": "0.27.7", + "@esbuild/android-x64": "0.27.7", + "@esbuild/darwin-arm64": "0.27.7", + "@esbuild/darwin-x64": "0.27.7", + "@esbuild/freebsd-arm64": "0.27.7", + "@esbuild/freebsd-x64": "0.27.7", + "@esbuild/linux-arm": "0.27.7", + "@esbuild/linux-arm64": "0.27.7", + "@esbuild/linux-ia32": "0.27.7", + "@esbuild/linux-loong64": "0.27.7", + "@esbuild/linux-mips64el": "0.27.7", + "@esbuild/linux-ppc64": "0.27.7", + "@esbuild/linux-riscv64": "0.27.7", + "@esbuild/linux-s390x": "0.27.7", + "@esbuild/linux-x64": "0.27.7", + "@esbuild/netbsd-arm64": "0.27.7", + "@esbuild/netbsd-x64": "0.27.7", + "@esbuild/openbsd-arm64": "0.27.7", + "@esbuild/openbsd-x64": "0.27.7", + "@esbuild/openharmony-arm64": "0.27.7", + "@esbuild/sunos-x64": "0.27.7", + "@esbuild/win32-arm64": "0.27.7", + "@esbuild/win32-ia32": "0.27.7", + "@esbuild/win32-x64": "0.27.7" + } + }, + "node_modules/tsup/node_modules/resolve-from": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", + "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/tsup/node_modules/source-map": { + "version": "0.7.6", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.6.tgz", + "integrity": "sha512-i5uvt8C3ikiWeNZSVZNWcfZPItFQOsYTUAOkcUPGd8DqDy1uOUikjt5dG+uRlwyvR108Fb9DOd4GvXfT0N2/uQ==", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">= 12" + } + }, "node_modules/tsx": { "version": "4.23.13", "resolved": "https://registry.npmjs.org/tsx/-/tsx-4.23.13.tgz", @@ -2748,6 +4094,13 @@ "typescript": ">=4.8.4 <6.1.0" } }, + "node_modules/ufo": { + "version": "1.6.4", + "resolved": "https://registry.npmjs.org/ufo/-/ufo-1.6.4.tgz", + "integrity": "sha512-JFNbkD1Svwe0KvGi8GOeLcP4kAWQ609twvCdcHxq1oSL8svv39ZuSvajcD8B+5D0eL4+s1Is2D/O6KN3qcTeRA==", + "dev": true, + "license": "MIT" + }, "node_modules/undici-types": { "version": "6.21.0", "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.21.0.tgz", diff --git a/package.json b/package.json index 12f685b..69bf21d 100644 --- a/package.json +++ b/package.json @@ -3,11 +3,14 @@ "private": true, "license": "MIT", "type": "module", - "workspaces": ["packages/*"], + "workspaces": [ + "packages/*" + ], "engines": { "node": ">=22" }, "scripts": { + "build": "npm run build --workspaces", "lint": "eslint --no-error-on-unmatched-pattern packages test", "format": "prettier --write \"packages/*/{src,test}/**/*.ts\" \"test/**/*.ts\"", "format:check": "prettier --check \"packages/*/{src,test}/**/*.ts\" \"test/**/*.ts\"", @@ -26,6 +29,7 @@ "cognitive-complexity-ts": "^0.8.2", "eslint": "^9.39.5", "prettier": "^3.9.6", + "tsup": "^8.5.1", "tsx": "^4.23.5", "typescript": "^5.5.0", "typescript-eslint": "^8.70.0" diff --git a/packages/jwt/package.json b/packages/jwt/package.json index 520b986..e92fca0 100644 --- a/packages/jwt/package.json +++ b/packages/jwt/package.json @@ -16,8 +16,29 @@ "deno": ">=2", "bun": ">=1.3" }, + "main": "./dist/index.cjs", + "module": "./dist/index.js", + "types": "./dist/index.d.ts", + "files": [ + "dist", + "README.md", + "CHANGELOG.md" + ], "exports": { - ".": "./src/index.ts" + ".": { + "import": { + "types": "./dist/index.d.ts", + "default": "./dist/index.js" + }, + "require": { + "types": "./dist/index.d.cts", + "default": "./dist/index.cjs" + } + } + }, + "scripts": { + "build": "tsup", + "prepublishOnly": "npm run build" }, "dependencies": { "jose": "^6.2.12" diff --git a/packages/jwt/tsup.config.ts b/packages/jwt/tsup.config.ts new file mode 100644 index 0000000..ca5ca0b --- /dev/null +++ b/packages/jwt/tsup.config.ts @@ -0,0 +1,17 @@ +import { defineConfig } from 'tsup'; + +// The npm half of the dual publish. JSR serves `src/` straight from `deno.json` and transpiles it +// itself, so nothing here is JSR's problem — this exists because a plain `npm i` gets none of that +// and Node refuses to strip types under `node_modules`. +export default defineConfig({ + entry: ['src/index.ts'], + format: ['cjs', 'esm'], + dts: true, + clean: true, + sourcemap: true, + target: 'node22', + // Convention rule 8 keeps core in `devDependencies`, and tsup bundles devDependencies by default. + // Without this line the emitted declarations would inline core's types rather than import them, + // and every plugin would ship a frozen private copy of a contract core owns. + external: ['@green-tea/core'], +}); diff --git a/packages/metrics/package.json b/packages/metrics/package.json index f94d34d..945edfb 100644 --- a/packages/metrics/package.json +++ b/packages/metrics/package.json @@ -16,8 +16,29 @@ "deno": ">=2", "bun": ">=1.3" }, + "main": "./dist/index.cjs", + "module": "./dist/index.js", + "types": "./dist/index.d.ts", + "files": [ + "dist", + "README.md", + "CHANGELOG.md" + ], "exports": { - ".": "./src/index.ts" + ".": { + "import": { + "types": "./dist/index.d.ts", + "default": "./dist/index.js" + }, + "require": { + "types": "./dist/index.d.cts", + "default": "./dist/index.cjs" + } + } + }, + "scripts": { + "build": "tsup", + "prepublishOnly": "npm run build" }, "devDependencies": { "@green-tea/core": "26.9.0-beta.2" diff --git a/packages/metrics/tsup.config.ts b/packages/metrics/tsup.config.ts new file mode 100644 index 0000000..ca5ca0b --- /dev/null +++ b/packages/metrics/tsup.config.ts @@ -0,0 +1,17 @@ +import { defineConfig } from 'tsup'; + +// The npm half of the dual publish. JSR serves `src/` straight from `deno.json` and transpiles it +// itself, so nothing here is JSR's problem — this exists because a plain `npm i` gets none of that +// and Node refuses to strip types under `node_modules`. +export default defineConfig({ + entry: ['src/index.ts'], + format: ['cjs', 'esm'], + dts: true, + clean: true, + sourcemap: true, + target: 'node22', + // Convention rule 8 keeps core in `devDependencies`, and tsup bundles devDependencies by default. + // Without this line the emitted declarations would inline core's types rather than import them, + // and every plugin would ship a frozen private copy of a contract core owns. + external: ['@green-tea/core'], +}); diff --git a/packages/rate-limit/package.json b/packages/rate-limit/package.json index 3fa3c1b..51670b4 100644 --- a/packages/rate-limit/package.json +++ b/packages/rate-limit/package.json @@ -16,8 +16,29 @@ "deno": ">=2", "bun": ">=1.3" }, + "main": "./dist/index.cjs", + "module": "./dist/index.js", + "types": "./dist/index.d.ts", + "files": [ + "dist", + "README.md", + "CHANGELOG.md" + ], "exports": { - ".": "./src/index.ts" + ".": { + "import": { + "types": "./dist/index.d.ts", + "default": "./dist/index.js" + }, + "require": { + "types": "./dist/index.d.cts", + "default": "./dist/index.cjs" + } + } + }, + "scripts": { + "build": "tsup", + "prepublishOnly": "npm run build" }, "devDependencies": { "@green-tea/core": "26.9.0-beta.2" diff --git a/packages/rate-limit/tsup.config.ts b/packages/rate-limit/tsup.config.ts new file mode 100644 index 0000000..ca5ca0b --- /dev/null +++ b/packages/rate-limit/tsup.config.ts @@ -0,0 +1,17 @@ +import { defineConfig } from 'tsup'; + +// The npm half of the dual publish. JSR serves `src/` straight from `deno.json` and transpiles it +// itself, so nothing here is JSR's problem — this exists because a plain `npm i` gets none of that +// and Node refuses to strip types under `node_modules`. +export default defineConfig({ + entry: ['src/index.ts'], + format: ['cjs', 'esm'], + dts: true, + clean: true, + sourcemap: true, + target: 'node22', + // Convention rule 8 keeps core in `devDependencies`, and tsup bundles devDependencies by default. + // Without this line the emitted declarations would inline core's types rather than import them, + // and every plugin would ship a frozen private copy of a contract core owns. + external: ['@green-tea/core'], +}); diff --git a/test/workspace.test.ts b/test/workspace.test.ts index 5070eee..0cdddb0 100644 --- a/test/workspace.test.ts +++ b/test/workspace.test.ts @@ -19,6 +19,12 @@ interface PackageJson { devDependencies?: Record; peerDependencies?: Record; repository?: { type?: string; url?: string; directory?: string }; + main?: string; + module?: string; + types?: string; + files?: string[]; + exports?: unknown; + scripts?: Record; } interface DenoJson { @@ -26,6 +32,7 @@ interface DenoJson { version?: string; imports?: Record; workspace?: string[]; + exports?: string; } const readJson = (...path: string[]): T => JSON.parse(readFileSync(join(ROOT, ...path), 'utf8')) as T; @@ -97,4 +104,30 @@ for (const dir of packages) { test(`${dir}: the Deno workspace includes it`, () => { assert.ok(readJson('deno.json').workspace?.includes(`./packages/${dir}`)); }); + + test(`${dir}: npm is served the build and JSR the source`, () => { + // The two registries are fed different things on purpose. JSR transpiles TypeScript itself, so + // it gets `src/`. npm does not, and Node refuses to strip types under `node_modules` — a package + // whose `exports` pointed at a `.ts` file installed fine and then threw on the first import. + assert.equal(deno.exports, './src/index.ts', 'JSR should publish the TypeScript source'); + + assert.deepEqual(pkg.exports, { + '.': { + import: { types: './dist/index.d.ts', default: './dist/index.js' }, + require: { types: './dist/index.d.cts', default: './dist/index.cjs' }, + }, + }); + assert.equal(pkg.main, './dist/index.cjs'); + assert.equal(pkg.module, './dist/index.js'); + assert.equal(pkg.types, './dist/index.d.ts'); + }); + + test(`${dir}: the tarball ships the build and nothing else`, () => { + // Without `files`, npm packs the whole directory — the first tarball carried `test/` along. + assert.deepEqual(pkg.files, ['dist', 'README.md', 'CHANGELOG.md']); + assert.equal(pkg.scripts?.build, 'tsup'); + // A stale `dist/` is the one packaging failure no static check can see, so the build runs again + // on the way out rather than trusting whatever CI left behind. + assert.equal(pkg.scripts?.prepublishOnly, 'npm run build'); + }); } -- 2.54.1 From 772f4d11a91c2d062ef86a7145281da1ec641a66 Mon Sep 17 00:00:00 2001 From: Diego Resendez Date: Sat, 19 Sep 2026 12:24:23 -0500 Subject: [PATCH 16/24] docs: list every package, and show the graph doing the work MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The root README still advertised one package, three releases in. jwt and rate-limit both demonstrated themselves from inside a handler, which reads as a middleware chain with extra steps. Signing does belong there — it is the response to that one request — but verifying is a precondition shared by every protected route, and its result is what those routes are actually asking for. Shown as a `@Step` that provides `user`, so the handler asks for `user` and never for `jwt`. rate-limit gains the same treatment plus the constraint that makes it work: the step must provide a token the handler names. `subgraphFor` builds each route's closure backwards from the handler's `needs`, so a step providing something nobody asks for is not in the closure and never runs — the limit would silently not apply, which is the worst way for a rate limiter to fail. The inline call is kept as the smaller option, with what it costs. metrics is left alone: rendering a scrape really is a route's job. Signed-off-by: Diego Resendez --- README.md | 2 ++ packages/jwt/README.md | 27 ++++++++++++++++++++++++++ packages/rate-limit/README.md | 36 +++++++++++++++++++++++++++++++++-- 3 files changed, 63 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index f5eac76..8e7b1b7 100644 --- a/README.md +++ b/README.md @@ -7,6 +7,8 @@ and why not the others. | Package | What it does | |---|---| | [`@green-tea/jwt`](packages/jwt) | Loads signing keys at boot and publishes a sign/verify registry | +| [`@green-tea/rate-limit`](packages/rate-limit) | A per-request limiter with a branded `429` and a swept in-memory store | +| [`@green-tea/metrics`](packages/metrics) | Counts the lifecycle stream and renders the Prometheus text format | Plugins import core as types only, so installing one never pulls a second copy of core — and never warns about a version range, which under CalVer no range can express. diff --git a/packages/jwt/README.md b/packages/jwt/README.md index 7993fe3..5ac29b5 100644 --- a/packages/jwt/README.md +++ b/packages/jwt/README.md @@ -31,6 +31,8 @@ const app = createApp({ }); ``` +Signing belongs in the handler — it is the response to that one request: + ```ts @Post('/signin') async signIn(@needs('jwt') jwt: JwtRegistry) { @@ -38,6 +40,31 @@ async signIn(@needs('jwt') jwt: JwtRegistry) { } ``` +Verifying does not. It is a precondition shared by every protected route, and its result is what +those routes are actually asking for, so it belongs in a `@Step`: + +```ts +@Step({ provides: 'user', needs: ['jwt', 'req'] }) +class Authenticate { + async run(ctx) { + const header = ctx.req.headers.authorization ?? ''; + if (!header.startsWith('Bearer ')) throw new Unauthorized('missing bearer token'); + + // verify() throws on a bad signature, a wrong issuer or an expired token, which cuts the + // request before the handler — the handler only ever sees a token that was good. + return { user: await ctx.jwt.get('access').verify(header.slice(7)) }; + } +} + +@Get('/me') +me(@needs('user') user: Claims) { + return user; +} +``` + +The handler asks for `user`, never for `jwt`, and green-tea runs `Authenticate` only for the routes +that do — the route table says which ones, rather than a matcher on a middleware chain. + Keys are read once, while providers boot. A missing or malformed key therefore fails `app.listen()` — or `await app.boot()` on Deno and Bun — instead of the first sign-in of the day. Call `app.boot()` before `Deno.serve` or `Bun.serve`; without it, the failure surfaces on every request instead. diff --git a/packages/rate-limit/README.md b/packages/rate-limit/README.md index e601aac..9de7108 100644 --- a/packages/rate-limit/README.md +++ b/packages/rate-limit/README.md @@ -31,14 +31,46 @@ const app = createApp({ }); ``` +Then spend the limit in a `@Step`, so the handler stays the thing it is about and the limit is a +dependency rather than a first line of code someone can forget to write: + ```ts +@Step({ provides: 'signinAllowed', needs: ['rateLimit', 'req'] }) +class ThrottleSignin { + async run(ctx) { + await ctx.rateLimit('signin'); // throws 429, so the handler never runs + return { signinAllowed: true }; + } +} + @Post('/signin') -async signIn(@needs('rateLimit') limit: RateLimiter) { - await limit('signin'); +async signIn(@needs('signinAllowed') _allowed: true, @body() credentials: Credentials) { // ... } ``` +**The step has to provide something the handler asks for.** green-tea slices the graph per route and +runs only what the handler transitively needs, so a step providing a token nobody names is not in the +closure and never runs — the limit would silently not apply. That is why there is a +`signinAllowed` at all. + +Better still, fold it into a step that already provides something real. A protected route usually +has one: + +```ts +@Step({ provides: 'user', needs: ['jwt', 'rateLimit', 'req'] }) +class Authenticate { + async run(ctx) { + await ctx.rateLimit('api'); // spend it before the expensive part + return { user: await verifyBearer(ctx) }; + } +} +``` + +Calling `@needs('rateLimit')` straight from the handler and awaiting it there works too, and for a +single route it is less machinery. It just puts the limit somewhere a reader of the signature cannot +see it. + Exceeding a rule throws a `429` carrying `Retry-After`. The error is recognised by green-tea through a registered symbol rather than by extending its `HttpError`, so this package never imports core at runtime. -- 2.54.1 From 4caf8809df8335bc2e381ffe7d5bb82d08e57f29 Mon Sep 17 00:00:00 2001 From: Diego Resendez Date: Wed, 23 Sep 2026 10:13:39 -0500 Subject: [PATCH 17/24] chore(plugins): publish to JSR alone, and drop the npm build MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The second registry was costing a tsup config per package, a dual `exports` map and a `dist/` that could go stale between a merge and a release — and it was not buying a reader anything. `npx jsr add @green-tea/` installs under npm, yarn, pnpm and bun through `npm.jsr.io`: one line in `.npmrc`, and the import specifier stays `@green-tea/`. The `@jsr/` name only ever appears in the lockfile. Nothing is published yet — all three packages are absent from both registries — so this costs no consumer anything, and it is the reversible direction: adding npm later breaks nobody, while removing it after a publish would. JSR is also the only one of the two that can record *where a plugin runs*, per package, which is not cosmetic for a framework whose claim is one app on four runtimes. `jwt` needs `node:fs/promises` and cannot serve workerd; `metrics` imports nothing and runs everywhere. npm has nowhere to put that. `private: true` stays and becomes the guard: an accidental `npm publish` now fails rather than shipping entry points that describe a build nobody runs. `test/workspace.test.ts` pins that invariant instead of the dual-registry one. The CI job keeps the name `build` deliberately — renaming it would change a required status check on the protected branches, which is a separate change. `deno publish --dry-run` in the `runtimes` job now stands in for the build, and it is the publish path these packages actually take. Signed-off-by: Diego Resendez --- .github/workflows/ci.yml | 7 +- AGENTS.md | 29 +- package-lock.json | 1353 ---------------------------- package.json | 2 - packages/jwt/package.json | 24 - packages/jwt/tsup.config.ts | 17 - packages/metrics/package.json | 24 - packages/metrics/tsup.config.ts | 17 - packages/rate-limit/package.json | 24 - packages/rate-limit/tsup.config.ts | 17 - test/workspace.test.ts | 44 +- 11 files changed, 48 insertions(+), 1510 deletions(-) delete mode 100644 packages/jwt/tsup.config.ts delete mode 100644 packages/metrics/tsup.config.ts delete mode 100644 packages/rate-limit/tsup.config.ts diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bf61e4a..a0efca3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -55,10 +55,9 @@ jobs: - run: npm run complexity:check - run: npm run typecheck - run: npm test - # The npm tarball is a build artifact, so a broken build is a broken release. `typecheck` will - # not catch it: that runs with `noEmit`, and tsup emits through esbuild, which resolves and - # bundles on its own terms. - - run: npm run build + # No build step: JSR publishes `src/` and transpiles it. `deno publish --dry-run`, in the + # `runtimes` job below, is what stands in for it — that is the publish path these packages + # actually take. # A fixed matrix, not `fromJSON`: Gitea Actions support for a dynamic matrix was not verified. Each # entry runs only the packages whose engines name that runtime (scripts/run-runtime.mjs). diff --git a/AGENTS.md b/AGENTS.md index 8435c6b..3ad3620 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -18,7 +18,6 @@ npm run typecheck npm test # Node: every package's contract tests + the workspace checks npm run test:deno # packages whose engines declare deno npm run test:bun # packages whose engines declare bun -npm run build # tsup, every package: dist/ as CJS + ESM + declarations, for npm only ``` Run all of them before proposing anything as finished. CI runs each one and each gates a merge. @@ -49,12 +48,28 @@ a pull request. Until core is consumed from npm (Plan B3), CI runs on Gitea only beside every one that is not supported. Nobody should have to open an issue to learn where a plugin runs. 10. A breaking change goes under `### Breaking`, first in the package's CHANGELOG. -11. **The two registries are served different things.** `deno.json` exports `./src/index.ts`, because - JSR transpiles TypeScript itself and hands Node a typed ESM package. `package.json` exports - `./dist/`, built by tsup as CJS *and* ESM, because npm transpiles nothing and Node refuses to - strip types under `node_modules` — `--experimental-strip-types` does not lift that, so a package - exporting `.ts` installs cleanly and then throws on the first import, everywhere but Bun. - `test/workspace.test.ts` pins both halves. +11. **Plugins publish to JSR alone.** `deno.json` exports `./src/index.ts` and there is no build: + JSR transpiles the TypeScript itself and hands consumers a typed ESM package with generated + declarations. Every `package.json` here stays `private`, so an accidental `npm publish` fails + rather than shipping entry points that describe a `dist/` nobody produces. `test/workspace.test.ts` + pins that. + + The second registry was dropped because it was not buying a reader anything. `npx jsr add + @green-tea/` installs under npm, yarn, pnpm and bun via `npm.jsr.io` — one line in + `.npmrc`, and the import specifier stays `@green-tea/`; the `@jsr/` name appears only in + the lockfile. What it cost was a tsup config per package, a dual `exports` map, and a `dist/` + that could go stale between a merge and a release. + + JSR is also the only one of the two that can say **where a plugin runs**. Its `runtimeCompat` is + per package, which matters for a framework whose claim is one app on four runtimes: `jwt` needs + `node:fs/promises` and cannot serve workerd, while `metrics` imports nothing and runs everywhere. + npm has nowhere to record that difference, so rule 9's `engines`/README pair was the only place + it lived. It is declared in the JSR package settings, not in `deno.json` — the config schema + accepts `name`, `version`, `license`, `exports` and `publish`, and nothing else. + + What this gives up: no discovery on npmjs.org, where the marketplace is the channel anyway, and + a site behind a registry proxy that mirrors npmjs.org and refuses a second one cannot reach the + plugins. Core still can — it publishes to both. ## Conventions diff --git a/package-lock.json b/package-lock.json index a576c77..7ee4325 100644 --- a/package-lock.json +++ b/package-lock.json @@ -16,7 +16,6 @@ "cognitive-complexity-ts": "^0.8.2", "eslint": "^9.39.5", "prettier": "^3.9.6", - "tsup": "^8.5.1", "tsx": "^4.23.5", "typescript": "^5.5.0", "typescript-eslint": "^8.70.0" @@ -732,62 +731,6 @@ "node": ">=12" } }, - "node_modules/@jridgewell/gen-mapping": { - "version": "0.3.13", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.13.tgz", - "integrity": "sha512-2kkt/7niJ6MgEPxF0bYdQ6etZaA+fQvDcLKckhy1yIQOzaoKjBBjSj63/aLVjYE3qhRt5dvM+uUyfCg6UKCBbA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jridgewell/sourcemap-codec": "^1.5.0", - "@jridgewell/trace-mapping": "^0.3.24" - } - }, - "node_modules/@jridgewell/resolve-uri": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", - "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@jridgewell/sourcemap-codec": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.6.0.tgz", - "integrity": "sha512-T7jf+5zgsZHwNJ4lvQ7/aezbyk0nNX+zJVWpmHA7VYsEx7a7qr5Rg5IbtJFqkgze5Y2sruq1RUY8Q837Od7iFw==", - "dev": true, - "license": "MIT" - }, - "node_modules/@jridgewell/trace-mapping": { - "version": "0.3.31", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.31.tgz", - "integrity": "sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jridgewell/resolve-uri": "^3.1.0", - "@jridgewell/sourcemap-codec": "^1.4.14" - } - }, - "node_modules/@napi-rs/lzma-linux-x64-gnu": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/@napi-rs/lzma-linux-x64-gnu/-/lzma-linux-x64-gnu-1.5.1.tgz", - "integrity": "sha512-oTXEIha4SsuXdTA4Iyskj0kpdx2yVXdhd75c2v3xGrHFfVMsbhTPZU/nMPL4sWKo4pBHm3aucLaqGlF696dTyQ==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": "^22.20 || ^24.12 || >=25" - } - }, "node_modules/@one-ini/wasm": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/@one-ini/wasm/-/wasm-0.1.1.tgz", @@ -806,356 +749,6 @@ "node": ">=14" } }, - "node_modules/@rollup/rollup-android-arm-eabi": { - "version": "4.63.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.63.4.tgz", - "integrity": "sha512-I+BSHzTAhKN2n7ZwGZsegGcZjDpLqFOMAtJz/u6uFGe0pUFbq56dEHjqJV/ZUdRJtNXNxA+hREUatZBvMR3Oiw==", - "cpu": [ - "arm" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "android" - ] - }, - "node_modules/@rollup/rollup-android-arm64": { - "version": "4.63.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.63.4.tgz", - "integrity": "sha512-pu3BdjS2LtEzRu2elmGzS3fIeWSZy4BMDIaLNwjorO76+k2d0LMluijhsDx3KQyQBQ/lLUZCQA9/s6csvUfuhw==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "android" - ] - }, - "node_modules/@rollup/rollup-darwin-arm64": { - "version": "4.63.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.63.4.tgz", - "integrity": "sha512-xfSrj9MHnWK9GaSqT9U0ImHtH/N8WZlHLx4cZHiuLcqs640hvZ3hLPd5UR2AZS57FaE8HrRUSpltbZdWRxHiDA==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ] - }, - "node_modules/@rollup/rollup-darwin-x64": { - "version": "4.63.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.63.4.tgz", - "integrity": "sha512-bqU99PLJb/dqb3S0GIMdeuyAEETSUgZBoqXYd3Sd+WCsV+MmPhnN6JrotWyir31+QgH7EvvE5/mwGJlEoci8Fw==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ] - }, - "node_modules/@rollup/rollup-freebsd-arm64": { - "version": "4.63.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.63.4.tgz", - "integrity": "sha512-JinsFZ5G40oXQb+sUuiA5x689vhr6dDYK0H0NL+rwKdL6CqnmYN8PE4ZwfRSoIjrCxqTQG/SLfTtSvHeGxoVlw==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "freebsd" - ] - }, - "node_modules/@rollup/rollup-freebsd-x64": { - "version": "4.63.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.63.4.tgz", - "integrity": "sha512-GAdA4UxpiNm27cLHr2GqXBpAD0x9FqwYBY7/YSP0Ss0/PNi4k8gbviqpIpYbVSRBaS2ZcegXEzgTQMbRNCwxCw==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "freebsd" - ] - }, - "node_modules/@rollup/rollup-linux-arm-gnueabihf": { - "version": "4.63.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.63.4.tgz", - "integrity": "sha512-qDd6NoA1znaLjp4jR5U/KWCdLAKDJNB8W9ChbbDaKbo0xA+Atln5HK6LFCZ4oJQpemtRZA288DCirFRjrspptw==", - "cpu": [ - "arm" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-arm-musleabihf": { - "version": "4.63.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.63.4.tgz", - "integrity": "sha512-WtB5Tz5KTNINb8ZA+8sQ7bmjuS1JrRT7YverYIhUGdWWDlpzVWmIwuZE+jidkEXUn1l0zrEkaIMa8dHF3NGcsA==", - "cpu": [ - "arm" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-arm64-gnu": { - "version": "4.63.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.63.4.tgz", - "integrity": "sha512-VcQ3L1tjnkKzWjryAVaFhHEWcqOfICX9uxVVoDzm2t0DpgKRHd2zOpVrJc0xsWeBZcBFyYROCIBdyR/fS174pg==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-arm64-musl": { - "version": "4.63.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.63.4.tgz", - "integrity": "sha512-6+ZQX6P5s0cMDN2Ypb8Lbm2+/sZYmZjdaYny992ujUU9UKi/4CWoJWsl1pNvjWJHNHGK51m+jKGLlh1ylb2ifQ==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-loong64-gnu": { - "version": "4.63.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-gnu/-/rollup-linux-loong64-gnu-4.63.4.tgz", - "integrity": "sha512-D72ZnvkFkBXOfzMMQLcwfPLyGkKb7HZ9/mf97B7v6/P5Lbv4oFOtSY/uHbS8lH6uKUOxoKiuokdb50XZSzzbJw==", - "cpu": [ - "loong64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-loong64-musl": { - "version": "4.63.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-musl/-/rollup-linux-loong64-musl-4.63.4.tgz", - "integrity": "sha512-piU6BxeqA3O9KSu3kRCIQQtNqFFaTu21SEV4FwaRZowpnj3bLaWPZHw+xFqCs0XlJ+aOH3PTRWGoglH+mKA/OA==", - "cpu": [ - "loong64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-ppc64-gnu": { - "version": "4.63.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-gnu/-/rollup-linux-ppc64-gnu-4.63.4.tgz", - "integrity": "sha512-/5PGpHwqt2EEEOUs1XwzubE/ucr0dWDQ+to3zqi4Ds7EWpwtQ79wXc4JBoxqj/OwpawTsKWzJxHfSuBOq3DrWA==", - "cpu": [ - "ppc64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-ppc64-musl": { - "version": "4.63.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-musl/-/rollup-linux-ppc64-musl-4.63.4.tgz", - "integrity": "sha512-cX3beZDLWt7G2oJF+nhChiT+qtaihs+S2xi7ziGmVB+2pwPng6D0Ed0HmElQOgv2UsUmSJJLGwpBao/3TDx3VA==", - "cpu": [ - "ppc64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-riscv64-gnu": { - "version": "4.63.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.63.4.tgz", - "integrity": "sha512-1uz2mGWHyptR7DgHHrlbdRAjXK7v7elGZ9lMja910/RP+ZYbX6xAmCiU9UZSX4hqmgtHMv6lr5l3kq1HIOpcag==", - "cpu": [ - "riscv64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-riscv64-musl": { - "version": "4.63.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.63.4.tgz", - "integrity": "sha512-nLS8topojxyz7SRpKR2IODRpQ0XPZ+xaOXvT3+hqK/Uy8Lo5HFgkkIBiIrCu5tL5YqzTvgovGw55PwpahTAGig==", - "cpu": [ - "riscv64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-s390x-gnu": { - "version": "4.63.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.63.4.tgz", - "integrity": "sha512-gs7DRKotr3l3q+jGPQBjH0ng1FjlEDm5ueQrkw5JtQvtLyEIcLASqAEaor56BhkKRzk+IcQzrcanBdb/bBQn8g==", - "cpu": [ - "s390x" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-x64-gnu": { - "version": "4.63.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.63.4.tgz", - "integrity": "sha512-791ET7W17NnScOZM7h4dX5hYspxE28htPFsb1awY/NRR8+PRNkS53e475rDdxXXDrP+kwnCcNWg9CX5ztn/Aqw==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-x64-musl": { - "version": "4.63.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.63.4.tgz", - "integrity": "sha512-iwZQRcmj7g88g3tzefIrQY7qvmuA/cfYwhrDtTBhsmukO4U2huVO5W+86XacUMRvdSFVAc6kZUZy21JaRwiB9w==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-openbsd-x64": { - "version": "4.63.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-openbsd-x64/-/rollup-openbsd-x64-4.63.4.tgz", - "integrity": "sha512-dVHFp9gRWrdTpnqQuGfCwd7hOQDatK1VCP2iWhLY/cGrOQs/ucFzJ6A5SRqbXX12ZDI8EUuejSM5kwg+ja7Png==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "openbsd" - ] - }, - "node_modules/@rollup/rollup-openharmony-arm64": { - "version": "4.63.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-openharmony-arm64/-/rollup-openharmony-arm64-4.63.4.tgz", - "integrity": "sha512-t3NlauOW6gxZVVFcBEnO62Cb4wbyDFL416gTg1uFI/2tgqYQlf69FbSE115Ajre9I+c26Lk4mcmdFUsS/DGifQ==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "openharmony" - ] - }, - "node_modules/@rollup/rollup-win32-arm64-msvc": { - "version": "4.63.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.63.4.tgz", - "integrity": "sha512-xWuIaSye5FWZF8+UYtVEcHtRJDN5kN9Kfgxx3Kq8XIov9KSKbc1fiqQCm90SKrgQbUXZelbnUhnlUJmfSE7P9A==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ] - }, - "node_modules/@rollup/rollup-win32-ia32-msvc": { - "version": "4.63.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.63.4.tgz", - "integrity": "sha512-9ALJJUOg/ZflMJepVo2PlgsGxSaxN7SQ4Z8GoZfVlarWr6r3rkHUNsd/zAio7p4YMtChSMXPionxej4Hkf6CXQ==", - "cpu": [ - "ia32" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ] - }, - "node_modules/@rollup/rollup-win32-x64-gnu": { - "version": "4.63.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-gnu/-/rollup-win32-x64-gnu-4.63.4.tgz", - "integrity": "sha512-blj9z5qx/Pv4WU0W1NMFDB97e0JH5ed+aZGywW8WCvp/NhWX/4PFAq5uu6Q0AebNn+Vo6KzUYDT++JzTT5ojlQ==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ] - }, - "node_modules/@rollup/rollup-win32-x64-msvc": { - "version": "4.63.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.63.4.tgz", - "integrity": "sha512-Erx822VRBwLa124shbj+wNXe//BOgMEctDV0m1aqTQdNO1S69DgNUCFKC1RCeZfixs1J31l6igk1ziyXErbigQ==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ] - }, "node_modules/@stylistic/eslint-plugin": { "version": "5.10.0", "resolved": "https://registry.npmjs.org/@stylistic/eslint-plugin/-/eslint-plugin-5.10.0.tgz", @@ -1562,13 +1155,6 @@ "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, - "node_modules/any-promise": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/any-promise/-/any-promise-1.3.0.tgz", - "integrity": "sha512-7UvmKalWRt1wgjL1RrGxoSJW/0QZFIegpeGvZG9kjp8vrRu55XTHbwnqq2GpXm9uLbcuhxm3IqX9OB4MZR1b2A==", - "dev": true, - "license": "MIT" - }, "node_modules/argparse": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", @@ -1617,32 +1203,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/bundle-require": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/bundle-require/-/bundle-require-5.1.0.tgz", - "integrity": "sha512-3WrrOuZiyaaZPWiEt4G3+IffISVC9HYlWueJEBWED4ZH4aIAC2PnkdnuRrR94M+w6yGWn4AglWtJtBI8YqvgoA==", - "dev": true, - "license": "MIT", - "dependencies": { - "load-tsconfig": "^0.2.3" - }, - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "peerDependencies": { - "esbuild": ">=0.18" - } - }, - "node_modules/cac": { - "version": "6.7.14", - "resolved": "https://registry.npmjs.org/cac/-/cac-6.7.14.tgz", - "integrity": "sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, "node_modules/callsites": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", @@ -1670,22 +1230,6 @@ "url": "https://github.com/chalk/chalk?sponsor=1" } }, - "node_modules/chokidar": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-4.0.3.tgz", - "integrity": "sha512-Qgzu8kfBvo+cA4962jnP1KkS6Dop5NS6g7R5LFYJr4b8Ub94PPQXUksCw9PvXoeXPRRddRNC5C1JQUR2SMGtnA==", - "dev": true, - "license": "MIT", - "dependencies": { - "readdirp": "^4.0.1" - }, - "engines": { - "node": ">= 14.16.0" - }, - "funding": { - "url": "https://paulmillr.com/funding/" - } - }, "node_modules/cognitive-complexity-ts": { "version": "0.8.2", "resolved": "https://registry.npmjs.org/cognitive-complexity-ts/-/cognitive-complexity-ts-0.8.2.tgz", @@ -1745,13 +1289,6 @@ "dev": true, "license": "MIT" }, - "node_modules/confbox": { - "version": "0.1.8", - "resolved": "https://registry.npmjs.org/confbox/-/confbox-0.1.8.tgz", - "integrity": "sha512-RMtmw0iFkeR4YV+fUOSucriAQNb9g8zFR52MWCtl+cCZOFRNL6zeB395vPzFhEjjn4fMxXudmELnl/KF/WrK6w==", - "dev": true, - "license": "MIT" - }, "node_modules/config-chain": { "version": "1.1.13", "resolved": "https://registry.npmjs.org/config-chain/-/config-chain-1.1.13.tgz", @@ -1763,16 +1300,6 @@ "proto-list": "~1.2.1" } }, - "node_modules/consola": { - "version": "3.4.2", - "resolved": "https://registry.npmjs.org/consola/-/consola-3.4.2.tgz", - "integrity": "sha512-5IKcdX0nnYavi6G7TtOhwkYzyjfJlatbjMjuLSfE2kYT5pMDOilZ4OvMhi637CcDICTmz3wARPoyhqyX1Y+XvA==", - "dev": true, - "license": "MIT", - "engines": { - "node": "^14.18.0 || >=16.10.0" - } - }, "node_modules/cross-spawn": { "version": "7.0.6", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", @@ -2194,18 +1721,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/fix-dts-default-cjs-exports": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/fix-dts-default-cjs-exports/-/fix-dts-default-cjs-exports-1.0.1.tgz", - "integrity": "sha512-pVIECanWFC61Hzl2+oOCtoJ3F17kglZC/6N94eRWycFgBH35hHx0Li604ZIzhseh97mf2p0cv7vVrOZGoqhlEg==", - "dev": true, - "license": "MIT", - "dependencies": { - "magic-string": "^0.30.17", - "mlly": "^1.7.4", - "rollup": "^4.34.8" - } - }, "node_modules/flat-cache": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-4.0.1.tgz", @@ -2516,16 +2031,6 @@ "url": "https://github.com/sponsors/panva" } }, - "node_modules/joycon": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/joycon/-/joycon-3.1.1.tgz", - "integrity": "sha512-34wB/Y7MW7bzjKRjUKTa46I2Z7eV62Rkhva+KkopW7Qvv/OSWBqvkSY7vusOPrNuZcUG3tApvdVgNB8POj3SPw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - } - }, "node_modules/js-beautify": { "version": "1.15.4", "resolved": "https://registry.npmjs.org/js-beautify/-/js-beautify-1.15.4.tgz", @@ -2623,36 +2128,6 @@ "node": ">= 0.8.0" } }, - "node_modules/lilconfig": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-3.1.3.tgz", - "integrity": "sha512-/vlFKAoH5Cgt3Ie+JLhRbwOsCQePABiU3tJ1egGvyQ+33R/vcwM2Zl2QR/LzjsBeItPt3oSVXapn+m4nQDvpzw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/sponsors/antonk52" - } - }, - "node_modules/lines-and-columns": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", - "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==", - "dev": true, - "license": "MIT" - }, - "node_modules/load-tsconfig": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/load-tsconfig/-/load-tsconfig-0.2.5.tgz", - "integrity": "sha512-IXO6OCs9yg8tMKzfPZ1YmheJbZCiEsnBdcB03l0OcfK9prKnJb96siuHCr5Fl37/yo9DnKU+TLpxzTUspw9shg==", - "dev": true, - "license": "MIT", - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - } - }, "node_modules/locate-path": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", @@ -2683,16 +2158,6 @@ "dev": true, "license": "ISC" }, - "node_modules/magic-string": { - "version": "0.30.21", - "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.21.tgz", - "integrity": "sha512-vd2F4YUyEXKGcLHoq+TEyCjxueSeHnFxyyjNp80yg0XV4vUhnDer/lvvlqM/arB5bXQN5K2/3oinyCRyx8T2CQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jridgewell/sourcemap-codec": "^1.5.5" - } - }, "node_modules/minimatch": { "version": "3.1.5", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.5.tgz", @@ -2726,19 +2191,6 @@ "node": ">=16 || 14 >=14.17" } }, - "node_modules/mlly": { - "version": "1.8.2", - "resolved": "https://registry.npmjs.org/mlly/-/mlly-1.8.2.tgz", - "integrity": "sha512-d+ObxMQFmbt10sretNDytwt85VrbkhhUA/JBGm1MPaWJ65Cl4wOgLaB1NYvJSZ0Ef03MMEU/0xpPMXUIQ29UfA==", - "dev": true, - "license": "MIT", - "dependencies": { - "acorn": "^8.16.0", - "pathe": "^2.0.3", - "pkg-types": "^1.3.1", - "ufo": "^1.6.3" - } - }, "node_modules/ms": { "version": "2.1.3", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", @@ -2746,18 +2198,6 @@ "dev": true, "license": "MIT" }, - "node_modules/mz": { - "version": "2.7.0", - "resolved": "https://registry.npmjs.org/mz/-/mz-2.7.0.tgz", - "integrity": "sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "any-promise": "^1.0.0", - "object-assign": "^4.0.1", - "thenify-all": "^1.0.0" - } - }, "node_modules/natural-compare": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", @@ -2781,16 +2221,6 @@ "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, - "node_modules/object-assign": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", - "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/open": { "version": "11.0.4", "resolved": "https://registry.npmjs.org/open/-/open-11.0.4.tgz", @@ -2919,20 +2349,6 @@ "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/pathe": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/pathe/-/pathe-2.0.3.tgz", - "integrity": "sha512-WUjGcAqP1gQacoQe+OBJsFA7Ld4DyXuUIjZ5cc75cLHvJ7dtNsTugphxIADwspS+AraAUePCKrSVtPLFj/F88w==", - "dev": true, - "license": "MIT" - }, - "node_modules/picocolors": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", - "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", - "dev": true, - "license": "ISC" - }, "node_modules/picomatch": { "version": "4.0.7", "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.7.tgz", @@ -2946,71 +2362,6 @@ "url": "https://github.com/sponsors/jonschlinkert" } }, - "node_modules/pirates": { - "version": "4.0.7", - "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.7.tgz", - "integrity": "sha512-TfySrs/5nm8fQJDcBDuUng3VOUKsd7S+zqvbOTiGXHfxX4wK31ard+hoNuvkicM/2YFzlpDgABOevKSsB4G/FA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 6" - } - }, - "node_modules/pkg-types": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/pkg-types/-/pkg-types-1.3.1.tgz", - "integrity": "sha512-/Jm5M4RvtBFVkKWRu2BLUTNP8/M2a+UwuAX+ae4770q1qVGtfjG+WTCupoZixokjmHiry8uI+dlY8KXYV5HVVQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "confbox": "^0.1.8", - "mlly": "^1.7.4", - "pathe": "^2.0.1" - } - }, - "node_modules/postcss-load-config": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/postcss-load-config/-/postcss-load-config-6.0.1.tgz", - "integrity": "sha512-oPtTM4oerL+UXmx+93ytZVN82RrlY/wPUV8IeDxFrzIjXOLF1pN+EmKPLbubvKHT2HC20xXsCAH2Z+CKV6Oz/g==", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/postcss/" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "license": "MIT", - "dependencies": { - "lilconfig": "^3.1.1" - }, - "engines": { - "node": ">= 18" - }, - "peerDependencies": { - "jiti": ">=1.21.0", - "postcss": ">=8.0.9", - "tsx": "^4.8.1", - "yaml": "^2.4.2" - }, - "peerDependenciesMeta": { - "jiti": { - "optional": true - }, - "postcss": { - "optional": true - }, - "tsx": { - "optional": true - }, - "yaml": { - "optional": true - } - } - }, "node_modules/powershell-utils": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/powershell-utils/-/powershell-utils-0.2.1.tgz", @@ -3067,20 +2418,6 @@ "node": ">=6" } }, - "node_modules/readdirp": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-4.1.2.tgz", - "integrity": "sha512-GDhwkLfywWL2s6vEjyhri+eXmfH6j1L7JE27WhqLeYzoh/A3DBaYGEj2H/HFZCn/kMfim73FXxEJTw06WtxQwg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 14.18.0" - }, - "funding": { - "type": "individual", - "url": "https://paulmillr.com/funding/" - } - }, "node_modules/reflect-metadata": { "version": "0.2.2", "resolved": "https://registry.npmjs.org/reflect-metadata/-/reflect-metadata-0.2.2.tgz", @@ -3098,52 +2435,6 @@ "node": ">=4" } }, - "node_modules/rollup": { - "version": "4.63.4", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.63.4.tgz", - "integrity": "sha512-4U0liVayNIoLp3GFl1FcI8561WepLnZ1rqfraGh7S9B3Ur5F9S283y8Futii7RUU2C/97tOBmBy7nYvhoiOpbQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/estree": "1.0.9" - }, - "bin": { - "rollup": "dist/bin/rollup" - }, - "engines": { - "node": ">=18.0.0", - "npm": ">=8.0.0" - }, - "optionalDependencies": { - "@napi-rs/lzma-linux-x64-gnu": "1.5.1", - "@rollup/rollup-android-arm-eabi": "4.63.4", - "@rollup/rollup-android-arm64": "4.63.4", - "@rollup/rollup-darwin-arm64": "4.63.4", - "@rollup/rollup-darwin-x64": "4.63.4", - "@rollup/rollup-freebsd-arm64": "4.63.4", - "@rollup/rollup-freebsd-x64": "4.63.4", - "@rollup/rollup-linux-arm-gnueabihf": "4.63.4", - "@rollup/rollup-linux-arm-musleabihf": "4.63.4", - "@rollup/rollup-linux-arm64-gnu": "4.63.4", - "@rollup/rollup-linux-arm64-musl": "4.63.4", - "@rollup/rollup-linux-loong64-gnu": "4.63.4", - "@rollup/rollup-linux-loong64-musl": "4.63.4", - "@rollup/rollup-linux-ppc64-gnu": "4.63.4", - "@rollup/rollup-linux-ppc64-musl": "4.63.4", - "@rollup/rollup-linux-riscv64-gnu": "4.63.4", - "@rollup/rollup-linux-riscv64-musl": "4.63.4", - "@rollup/rollup-linux-s390x-gnu": "4.63.4", - "@rollup/rollup-linux-x64-gnu": "4.63.4", - "@rollup/rollup-linux-x64-musl": "4.63.4", - "@rollup/rollup-openbsd-x64": "4.63.4", - "@rollup/rollup-openharmony-arm64": "4.63.4", - "@rollup/rollup-win32-arm64-msvc": "4.63.4", - "@rollup/rollup-win32-ia32-msvc": "4.63.4", - "@rollup/rollup-win32-x64-gnu": "4.63.4", - "@rollup/rollup-win32-x64-msvc": "4.63.4", - "fsevents": "~2.3.2" - } - }, "node_modules/run-applescript": { "version": "7.1.0", "resolved": "https://registry.npmjs.org/run-applescript/-/run-applescript-7.1.0.tgz", @@ -3344,39 +2635,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/sucrase": { - "version": "3.35.1", - "resolved": "https://registry.npmjs.org/sucrase/-/sucrase-3.35.1.tgz", - "integrity": "sha512-DhuTmvZWux4H1UOnWMB3sk0sbaCVOoQZjv8u1rDoTV0HTdGem9hkAZtl4JZy8P2z4Bg0nT+YMeOFyVr4zcG5Tw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jridgewell/gen-mapping": "^0.3.2", - "commander": "^4.0.0", - "lines-and-columns": "^1.1.6", - "mz": "^2.7.0", - "pirates": "^4.0.1", - "tinyglobby": "^0.2.11", - "ts-interface-checker": "^0.1.9" - }, - "bin": { - "sucrase": "bin/sucrase", - "sucrase-node": "bin/sucrase-node" - }, - "engines": { - "node": ">=16 || 14 >=14.17" - } - }, - "node_modules/sucrase/node_modules/commander": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/commander/-/commander-4.1.1.tgz", - "integrity": "sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 6" - } - }, "node_modules/supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", @@ -3390,36 +2648,6 @@ "node": ">=8" } }, - "node_modules/thenify": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/thenify/-/thenify-3.3.1.tgz", - "integrity": "sha512-RVZSIV5IG10Hk3enotrhvz0T9em6cyHBLkH/YAZuKqd8hRkKhSfCGIcP2KUY0EPxndzANBmNllzWPwak+bheSw==", - "dev": true, - "license": "MIT", - "dependencies": { - "any-promise": "^1.0.0" - } - }, - "node_modules/thenify-all": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/thenify-all/-/thenify-all-1.6.0.tgz", - "integrity": "sha512-RNxQH/qI8/t3thXJDwcstUO4zeqo64+Uy/+sNVRBx4Xn2OX+OZ9oP+iJnNFqplFra2ZUVeKCSa2oVWi3T4uVmA==", - "dev": true, - "license": "MIT", - "dependencies": { - "thenify": ">= 3.1.0 < 4" - }, - "engines": { - "node": ">=0.8" - } - }, - "node_modules/tinyexec": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/tinyexec/-/tinyexec-0.3.2.tgz", - "integrity": "sha512-KQQR9yN7R5+OSwaK0XQoj22pwHoTlgYqmUscPYoknOoWCWfj/5/ABTMRi69FrKU5ffPVh5QcFikpWJI/P1ocHA==", - "dev": true, - "license": "MIT" - }, "node_modules/tinyglobby": { "version": "0.2.17", "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.17.tgz", @@ -3437,16 +2665,6 @@ "url": "https://github.com/sponsors/SuperchupuDev" } }, - "node_modules/tree-kill": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/tree-kill/-/tree-kill-1.2.2.tgz", - "integrity": "sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A==", - "dev": true, - "license": "MIT", - "bin": { - "tree-kill": "cli.js" - } - }, "node_modules/ts-api-utils": { "version": "2.5.0", "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-2.5.0.tgz", @@ -3460,570 +2678,6 @@ "typescript": ">=4.8.4" } }, - "node_modules/ts-interface-checker": { - "version": "0.1.13", - "resolved": "https://registry.npmjs.org/ts-interface-checker/-/ts-interface-checker-0.1.13.tgz", - "integrity": "sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA==", - "dev": true, - "license": "Apache-2.0" - }, - "node_modules/tsup": { - "version": "8.5.1", - "resolved": "https://registry.npmjs.org/tsup/-/tsup-8.5.1.tgz", - "integrity": "sha512-xtgkqwdhpKWr3tKPmCkvYmS9xnQK3m3XgxZHwSUjvfTjp7YfXe5tT3GgWi0F2N+ZSMsOeWeZFh7ZZFg5iPhing==", - "dev": true, - "license": "MIT", - "dependencies": { - "bundle-require": "^5.1.0", - "cac": "^6.7.14", - "chokidar": "^4.0.3", - "consola": "^3.4.0", - "debug": "^4.4.0", - "esbuild": "^0.27.0", - "fix-dts-default-cjs-exports": "^1.0.0", - "joycon": "^3.1.1", - "picocolors": "^1.1.1", - "postcss-load-config": "^6.0.1", - "resolve-from": "^5.0.0", - "rollup": "^4.34.8", - "source-map": "^0.7.6", - "sucrase": "^3.35.0", - "tinyexec": "^0.3.2", - "tinyglobby": "^0.2.11", - "tree-kill": "^1.2.2" - }, - "bin": { - "tsup": "dist/cli-default.js", - "tsup-node": "dist/cli-node.js" - }, - "engines": { - "node": ">=18" - }, - "peerDependencies": { - "@microsoft/api-extractor": "^7.36.0", - "@swc/core": "^1", - "postcss": "^8.4.12", - "typescript": ">=4.5.0" - }, - "peerDependenciesMeta": { - "@microsoft/api-extractor": { - "optional": true - }, - "@swc/core": { - "optional": true - }, - "postcss": { - "optional": true - }, - "typescript": { - "optional": true - } - } - }, - "node_modules/tsup/node_modules/@esbuild/aix-ppc64": { - "version": "0.27.7", - "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.27.7.tgz", - "integrity": "sha512-EKX3Qwmhz1eMdEJokhALr0YiD0lhQNwDqkPYyPhiSwKrh7/4KRjQc04sZ8db+5DVVnZ1LmbNDI1uAMPEUBnQPg==", - "cpu": [ - "ppc64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "aix" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/tsup/node_modules/@esbuild/android-arm": { - "version": "0.27.7", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.27.7.tgz", - "integrity": "sha512-jbPXvB4Yj2yBV7HUfE2KHe4GJX51QplCN1pGbYjvsyCZbQmies29EoJbkEc+vYuU5o45AfQn37vZlyXy4YJ8RQ==", - "cpu": [ - "arm" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/tsup/node_modules/@esbuild/android-arm64": { - "version": "0.27.7", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.27.7.tgz", - "integrity": "sha512-62dPZHpIXzvChfvfLJow3q5dDtiNMkwiRzPylSCfriLvZeq0a1bWChrGx/BbUbPwOrsWKMn8idSllklzBy+dgQ==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/tsup/node_modules/@esbuild/android-x64": { - "version": "0.27.7", - "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.27.7.tgz", - "integrity": "sha512-x5VpMODneVDb70PYV2VQOmIUUiBtY3D3mPBG8NxVk5CogneYhkR7MmM3yR/uMdITLrC1ml/NV1rj4bMJuy9MCg==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/tsup/node_modules/@esbuild/darwin-arm64": { - "version": "0.27.7", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.27.7.tgz", - "integrity": "sha512-5lckdqeuBPlKUwvoCXIgI2D9/ABmPq3Rdp7IfL70393YgaASt7tbju3Ac+ePVi3KDH6N2RqePfHnXkaDtY9fkw==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/tsup/node_modules/@esbuild/darwin-x64": { - "version": "0.27.7", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.27.7.tgz", - "integrity": "sha512-rYnXrKcXuT7Z+WL5K980jVFdvVKhCHhUwid+dDYQpH+qu+TefcomiMAJpIiC2EM3Rjtq0sO3StMV/+3w3MyyqQ==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/tsup/node_modules/@esbuild/freebsd-arm64": { - "version": "0.27.7", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.27.7.tgz", - "integrity": "sha512-B48PqeCsEgOtzME2GbNM2roU29AMTuOIN91dsMO30t+Ydis3z/3Ngoj5hhnsOSSwNzS+6JppqWsuhTp6E82l2w==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "freebsd" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/tsup/node_modules/@esbuild/freebsd-x64": { - "version": "0.27.7", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.27.7.tgz", - "integrity": "sha512-jOBDK5XEjA4m5IJK3bpAQF9/Lelu/Z9ZcdhTRLf4cajlB+8VEhFFRjWgfy3M1O4rO2GQ/b2dLwCUGpiF/eATNQ==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "freebsd" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/tsup/node_modules/@esbuild/linux-arm": { - "version": "0.27.7", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.27.7.tgz", - "integrity": "sha512-RkT/YXYBTSULo3+af8Ib0ykH8u2MBh57o7q/DAs3lTJlyVQkgQvlrPTnjIzzRPQyavxtPtfg0EopvDyIt0j1rA==", - "cpu": [ - "arm" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/tsup/node_modules/@esbuild/linux-arm64": { - "version": "0.27.7", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.27.7.tgz", - "integrity": "sha512-RZPHBoxXuNnPQO9rvjh5jdkRmVizktkT7TCDkDmQ0W2SwHInKCAV95GRuvdSvA7w4VMwfCjUiPwDi0ZO6Nfe9A==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/tsup/node_modules/@esbuild/linux-ia32": { - "version": "0.27.7", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.27.7.tgz", - "integrity": "sha512-GA48aKNkyQDbd3KtkplYWT102C5sn/EZTY4XROkxONgruHPU72l+gW+FfF8tf2cFjeHaRbWpOYa/uRBz/Xq1Pg==", - "cpu": [ - "ia32" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/tsup/node_modules/@esbuild/linux-loong64": { - "version": "0.27.7", - "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.27.7.tgz", - "integrity": "sha512-a4POruNM2oWsD4WKvBSEKGIiWQF8fZOAsycHOt6JBpZ+JN2n2JH9WAv56SOyu9X5IqAjqSIPTaJkqN8F7XOQ5Q==", - "cpu": [ - "loong64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/tsup/node_modules/@esbuild/linux-mips64el": { - "version": "0.27.7", - "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.27.7.tgz", - "integrity": "sha512-KabT5I6StirGfIz0FMgl1I+R1H73Gp0ofL9A3nG3i/cYFJzKHhouBV5VWK1CSgKvVaG4q1RNpCTR2LuTVB3fIw==", - "cpu": [ - "mips64el" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/tsup/node_modules/@esbuild/linux-ppc64": { - "version": "0.27.7", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.27.7.tgz", - "integrity": "sha512-gRsL4x6wsGHGRqhtI+ifpN/vpOFTQtnbsupUF5R5YTAg+y/lKelYR1hXbnBdzDjGbMYjVJLJTd2OFmMewAgwlQ==", - "cpu": [ - "ppc64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/tsup/node_modules/@esbuild/linux-riscv64": { - "version": "0.27.7", - "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.27.7.tgz", - "integrity": "sha512-hL25LbxO1QOngGzu2U5xeXtxXcW+/GvMN3ejANqXkxZ/opySAZMrc+9LY/WyjAan41unrR3YrmtTsUpwT66InQ==", - "cpu": [ - "riscv64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/tsup/node_modules/@esbuild/linux-s390x": { - "version": "0.27.7", - "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.27.7.tgz", - "integrity": "sha512-2k8go8Ycu1Kb46vEelhu1vqEP+UeRVj2zY1pSuPdgvbd5ykAw82Lrro28vXUrRmzEsUV0NzCf54yARIK8r0fdw==", - "cpu": [ - "s390x" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/tsup/node_modules/@esbuild/linux-x64": { - "version": "0.27.7", - "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.27.7.tgz", - "integrity": "sha512-hzznmADPt+OmsYzw1EE33ccA+HPdIqiCRq7cQeL1Jlq2gb1+OyWBkMCrYGBJ+sxVzve2ZJEVeePbLM2iEIZSxA==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/tsup/node_modules/@esbuild/netbsd-arm64": { - "version": "0.27.7", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.27.7.tgz", - "integrity": "sha512-b6pqtrQdigZBwZxAn1UpazEisvwaIDvdbMbmrly7cDTMFnw/+3lVxxCTGOrkPVnsYIosJJXAsILG9XcQS+Yu6w==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "netbsd" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/tsup/node_modules/@esbuild/netbsd-x64": { - "version": "0.27.7", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.27.7.tgz", - "integrity": "sha512-OfatkLojr6U+WN5EDYuoQhtM+1xco+/6FSzJJnuWiUw5eVcicbyK3dq5EeV/QHT1uy6GoDhGbFpprUiHUYggrw==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "netbsd" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/tsup/node_modules/@esbuild/openbsd-arm64": { - "version": "0.27.7", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.27.7.tgz", - "integrity": "sha512-AFuojMQTxAz75Fo8idVcqoQWEHIXFRbOc1TrVcFSgCZtQfSdc1RXgB3tjOn/krRHENUB4j00bfGjyl2mJrU37A==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "openbsd" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/tsup/node_modules/@esbuild/openbsd-x64": { - "version": "0.27.7", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.27.7.tgz", - "integrity": "sha512-+A1NJmfM8WNDv5CLVQYJ5PshuRm/4cI6WMZRg1by1GwPIQPCTs1GLEUHwiiQGT5zDdyLiRM/l1G0Pv54gvtKIg==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "openbsd" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/tsup/node_modules/@esbuild/openharmony-arm64": { - "version": "0.27.7", - "resolved": "https://registry.npmjs.org/@esbuild/openharmony-arm64/-/openharmony-arm64-0.27.7.tgz", - "integrity": "sha512-+KrvYb/C8zA9CU/g0sR6w2RBw7IGc5J2BPnc3dYc5VJxHCSF1yNMxTV5LQ7GuKteQXZtspjFbiuW5/dOj7H4Yw==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "openharmony" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/tsup/node_modules/@esbuild/sunos-x64": { - "version": "0.27.7", - "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.27.7.tgz", - "integrity": "sha512-ikktIhFBzQNt/QDyOL580ti9+5mL/YZeUPKU2ivGtGjdTYoqz6jObj6nOMfhASpS4GU4Q/Clh1QtxWAvcYKamA==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "sunos" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/tsup/node_modules/@esbuild/win32-arm64": { - "version": "0.27.7", - "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.27.7.tgz", - "integrity": "sha512-7yRhbHvPqSpRUV7Q20VuDwbjW5kIMwTHpptuUzV+AA46kiPze5Z7qgt6CLCK3pWFrHeNfDd1VKgyP4O+ng17CA==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/tsup/node_modules/@esbuild/win32-ia32": { - "version": "0.27.7", - "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.27.7.tgz", - "integrity": "sha512-SmwKXe6VHIyZYbBLJrhOoCJRB/Z1tckzmgTLfFYOfpMAx63BJEaL9ExI8x7v0oAO3Zh6D/Oi1gVxEYr5oUCFhw==", - "cpu": [ - "ia32" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/tsup/node_modules/@esbuild/win32-x64": { - "version": "0.27.7", - "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.27.7.tgz", - "integrity": "sha512-56hiAJPhwQ1R4i+21FVF7V8kSD5zZTdHcVuRFMW0hn753vVfQN8xlx4uOPT4xoGH0Z/oVATuR82AiqSTDIpaHg==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/tsup/node_modules/esbuild": { - "version": "0.27.7", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.27.7.tgz", - "integrity": "sha512-IxpibTjyVnmrIQo5aqNpCgoACA/dTKLTlhMHihVHhdkxKyPO1uBBthumT0rdHmcsk9uMonIWS0m4FljWzILh3w==", - "dev": true, - "hasInstallScript": true, - "license": "MIT", - "bin": { - "esbuild": "bin/esbuild" - }, - "engines": { - "node": ">=18" - }, - "optionalDependencies": { - "@esbuild/aix-ppc64": "0.27.7", - "@esbuild/android-arm": "0.27.7", - "@esbuild/android-arm64": "0.27.7", - "@esbuild/android-x64": "0.27.7", - "@esbuild/darwin-arm64": "0.27.7", - "@esbuild/darwin-x64": "0.27.7", - "@esbuild/freebsd-arm64": "0.27.7", - "@esbuild/freebsd-x64": "0.27.7", - "@esbuild/linux-arm": "0.27.7", - "@esbuild/linux-arm64": "0.27.7", - "@esbuild/linux-ia32": "0.27.7", - "@esbuild/linux-loong64": "0.27.7", - "@esbuild/linux-mips64el": "0.27.7", - "@esbuild/linux-ppc64": "0.27.7", - "@esbuild/linux-riscv64": "0.27.7", - "@esbuild/linux-s390x": "0.27.7", - "@esbuild/linux-x64": "0.27.7", - "@esbuild/netbsd-arm64": "0.27.7", - "@esbuild/netbsd-x64": "0.27.7", - "@esbuild/openbsd-arm64": "0.27.7", - "@esbuild/openbsd-x64": "0.27.7", - "@esbuild/openharmony-arm64": "0.27.7", - "@esbuild/sunos-x64": "0.27.7", - "@esbuild/win32-arm64": "0.27.7", - "@esbuild/win32-ia32": "0.27.7", - "@esbuild/win32-x64": "0.27.7" - } - }, - "node_modules/tsup/node_modules/resolve-from": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", - "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/tsup/node_modules/source-map": { - "version": "0.7.6", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.6.tgz", - "integrity": "sha512-i5uvt8C3ikiWeNZSVZNWcfZPItFQOsYTUAOkcUPGd8DqDy1uOUikjt5dG+uRlwyvR108Fb9DOd4GvXfT0N2/uQ==", - "dev": true, - "license": "BSD-3-Clause", - "engines": { - "node": ">= 12" - } - }, "node_modules/tsx": { "version": "4.23.13", "resolved": "https://registry.npmjs.org/tsx/-/tsx-4.23.13.tgz", @@ -4094,13 +2748,6 @@ "typescript": ">=4.8.4 <6.1.0" } }, - "node_modules/ufo": { - "version": "1.6.4", - "resolved": "https://registry.npmjs.org/ufo/-/ufo-1.6.4.tgz", - "integrity": "sha512-JFNbkD1Svwe0KvGi8GOeLcP4kAWQ609twvCdcHxq1oSL8svv39ZuSvajcD8B+5D0eL4+s1Is2D/O6KN3qcTeRA==", - "dev": true, - "license": "MIT" - }, "node_modules/undici-types": { "version": "6.21.0", "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.21.0.tgz", diff --git a/package.json b/package.json index 69bf21d..214f92b 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,6 @@ "node": ">=22" }, "scripts": { - "build": "npm run build --workspaces", "lint": "eslint --no-error-on-unmatched-pattern packages test", "format": "prettier --write \"packages/*/{src,test}/**/*.ts\" \"test/**/*.ts\"", "format:check": "prettier --check \"packages/*/{src,test}/**/*.ts\" \"test/**/*.ts\"", @@ -29,7 +28,6 @@ "cognitive-complexity-ts": "^0.8.2", "eslint": "^9.39.5", "prettier": "^3.9.6", - "tsup": "^8.5.1", "tsx": "^4.23.5", "typescript": "^5.5.0", "typescript-eslint": "^8.70.0" diff --git a/packages/jwt/package.json b/packages/jwt/package.json index e92fca0..1c666b8 100644 --- a/packages/jwt/package.json +++ b/packages/jwt/package.json @@ -16,30 +16,6 @@ "deno": ">=2", "bun": ">=1.3" }, - "main": "./dist/index.cjs", - "module": "./dist/index.js", - "types": "./dist/index.d.ts", - "files": [ - "dist", - "README.md", - "CHANGELOG.md" - ], - "exports": { - ".": { - "import": { - "types": "./dist/index.d.ts", - "default": "./dist/index.js" - }, - "require": { - "types": "./dist/index.d.cts", - "default": "./dist/index.cjs" - } - } - }, - "scripts": { - "build": "tsup", - "prepublishOnly": "npm run build" - }, "dependencies": { "jose": "^6.2.12" }, diff --git a/packages/jwt/tsup.config.ts b/packages/jwt/tsup.config.ts deleted file mode 100644 index ca5ca0b..0000000 --- a/packages/jwt/tsup.config.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { defineConfig } from 'tsup'; - -// The npm half of the dual publish. JSR serves `src/` straight from `deno.json` and transpiles it -// itself, so nothing here is JSR's problem — this exists because a plain `npm i` gets none of that -// and Node refuses to strip types under `node_modules`. -export default defineConfig({ - entry: ['src/index.ts'], - format: ['cjs', 'esm'], - dts: true, - clean: true, - sourcemap: true, - target: 'node22', - // Convention rule 8 keeps core in `devDependencies`, and tsup bundles devDependencies by default. - // Without this line the emitted declarations would inline core's types rather than import them, - // and every plugin would ship a frozen private copy of a contract core owns. - external: ['@green-tea/core'], -}); diff --git a/packages/metrics/package.json b/packages/metrics/package.json index 945edfb..98d2e7c 100644 --- a/packages/metrics/package.json +++ b/packages/metrics/package.json @@ -16,30 +16,6 @@ "deno": ">=2", "bun": ">=1.3" }, - "main": "./dist/index.cjs", - "module": "./dist/index.js", - "types": "./dist/index.d.ts", - "files": [ - "dist", - "README.md", - "CHANGELOG.md" - ], - "exports": { - ".": { - "import": { - "types": "./dist/index.d.ts", - "default": "./dist/index.js" - }, - "require": { - "types": "./dist/index.d.cts", - "default": "./dist/index.cjs" - } - } - }, - "scripts": { - "build": "tsup", - "prepublishOnly": "npm run build" - }, "devDependencies": { "@green-tea/core": "26.9.0-beta.2" } diff --git a/packages/metrics/tsup.config.ts b/packages/metrics/tsup.config.ts deleted file mode 100644 index ca5ca0b..0000000 --- a/packages/metrics/tsup.config.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { defineConfig } from 'tsup'; - -// The npm half of the dual publish. JSR serves `src/` straight from `deno.json` and transpiles it -// itself, so nothing here is JSR's problem — this exists because a plain `npm i` gets none of that -// and Node refuses to strip types under `node_modules`. -export default defineConfig({ - entry: ['src/index.ts'], - format: ['cjs', 'esm'], - dts: true, - clean: true, - sourcemap: true, - target: 'node22', - // Convention rule 8 keeps core in `devDependencies`, and tsup bundles devDependencies by default. - // Without this line the emitted declarations would inline core's types rather than import them, - // and every plugin would ship a frozen private copy of a contract core owns. - external: ['@green-tea/core'], -}); diff --git a/packages/rate-limit/package.json b/packages/rate-limit/package.json index 51670b4..5e2b06c 100644 --- a/packages/rate-limit/package.json +++ b/packages/rate-limit/package.json @@ -16,30 +16,6 @@ "deno": ">=2", "bun": ">=1.3" }, - "main": "./dist/index.cjs", - "module": "./dist/index.js", - "types": "./dist/index.d.ts", - "files": [ - "dist", - "README.md", - "CHANGELOG.md" - ], - "exports": { - ".": { - "import": { - "types": "./dist/index.d.ts", - "default": "./dist/index.js" - }, - "require": { - "types": "./dist/index.d.cts", - "default": "./dist/index.cjs" - } - } - }, - "scripts": { - "build": "tsup", - "prepublishOnly": "npm run build" - }, "devDependencies": { "@green-tea/core": "26.9.0-beta.2" } diff --git a/packages/rate-limit/tsup.config.ts b/packages/rate-limit/tsup.config.ts deleted file mode 100644 index ca5ca0b..0000000 --- a/packages/rate-limit/tsup.config.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { defineConfig } from 'tsup'; - -// The npm half of the dual publish. JSR serves `src/` straight from `deno.json` and transpiles it -// itself, so nothing here is JSR's problem — this exists because a plain `npm i` gets none of that -// and Node refuses to strip types under `node_modules`. -export default defineConfig({ - entry: ['src/index.ts'], - format: ['cjs', 'esm'], - dts: true, - clean: true, - sourcemap: true, - target: 'node22', - // Convention rule 8 keeps core in `devDependencies`, and tsup bundles devDependencies by default. - // Without this line the emitted declarations would inline core's types rather than import them, - // and every plugin would ship a frozen private copy of a contract core owns. - external: ['@green-tea/core'], -}); diff --git a/test/workspace.test.ts b/test/workspace.test.ts index 0cdddb0..931b1b2 100644 --- a/test/workspace.test.ts +++ b/test/workspace.test.ts @@ -14,6 +14,7 @@ const README_RUNTIMES: Record = { Node: 'node', Deno: 'deno', Bu interface PackageJson { name: string; version: string; + private?: boolean; engines?: Record; dependencies?: Record; devDependencies?: Record; @@ -105,29 +106,30 @@ for (const dir of packages) { assert.ok(readJson('deno.json').workspace?.includes(`./packages/${dir}`)); }); - test(`${dir}: npm is served the build and JSR the source`, () => { - // The two registries are fed different things on purpose. JSR transpiles TypeScript itself, so - // it gets `src/`. npm does not, and Node refuses to strip types under `node_modules` — a package - // whose `exports` pointed at a `.ts` file installed fine and then threw on the first import. + test(`${dir}: JSR is served the source`, () => { + // JSR transpiles TypeScript itself and hands consumers a typed ESM package, so it gets `src/` + // and the packages carry no build of their own. assert.equal(deno.exports, './src/index.ts', 'JSR should publish the TypeScript source'); - - assert.deepEqual(pkg.exports, { - '.': { - import: { types: './dist/index.d.ts', default: './dist/index.js' }, - require: { types: './dist/index.d.cts', default: './dist/index.cjs' }, - }, - }); - assert.equal(pkg.main, './dist/index.cjs'); - assert.equal(pkg.module, './dist/index.js'); - assert.equal(pkg.types, './dist/index.d.ts'); }); - test(`${dir}: the tarball ships the build and nothing else`, () => { - // Without `files`, npm packs the whole directory — the first tarball carried `test/` along. - assert.deepEqual(pkg.files, ['dist', 'README.md', 'CHANGELOG.md']); - assert.equal(pkg.scripts?.build, 'tsup'); - // A stale `dist/` is the one packaging failure no static check can see, so the build runs again - // on the way out rather than trusting whatever CI left behind. - assert.equal(pkg.scripts?.prepublishOnly, 'npm run build'); + test(`${dir}: nothing here is publishable to npm`, () => { + // Plugins publish to JSR alone. `npx jsr add` installs them under npm, yarn, pnpm and bun + // through `npm.jsr.io`, which leaves the import specifier intact, so the second registry bought + // a per-package tsup build and a dual `exports` map without buying a reader anything. + // + // JSR is also the only one of the two that can say *where a plugin runs*, per package. That is + // not cosmetic for a framework whose claim is one app on four runtimes: `jwt` needs + // `node:fs/promises` and `metrics` imports nothing at all, and npm has nowhere to record the + // difference. + // + // `private` is the guard, not a leftover: it is what makes an accidental `npm publish` fail + // instead of shipping a package whose entry points describe a `dist/` nobody builds. + assert.equal(pkg.private, true, 'a plugin must not be publishable to npm'); + + for (const field of ['main', 'module', 'types', 'exports', 'files'] as const) { + assert.equal(pkg[field], undefined, `${field} describes an npm tarball that is never built`); + } + + assert.equal(pkg.scripts?.build, undefined, 'there is no build to run'); }); } -- 2.54.1 From 8499aaa760eaafec32ce9ecff589267aa8954576 Mon Sep 17 00:00:00 2001 From: Diego Resendez Date: Wed, 23 Sep 2026 10:21:53 -0500 Subject: [PATCH 18/24] fix(ci): resolve core from npm, not Verdaccio MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `npm ci` has been failing on `develop` with `EINTEGRITY` for `@green-tea/core`, independently of any branch — verified by running it on a clean clone of `develop` before touching anything. Every job that installs was red; only `dco`, which does not, was green. Verdaccio proxies npmjs.org. When core 26.9.0-beta.2 was published for real on 2026-09-22, the staged tarball under the same version was superseded by the upstream one, and the integrity recorded in the lockfile stopped matching what the registry serves. Nothing in this repository changed; the thing it pinned did. `.npmrc` existed only because that version lived on Verdaccio alone, which its own comment said would end at Plan B3. It ended early: core is on npmjs.org, so the scope line goes and the lockfile now resolves from `registry.npmjs.org` with the integrity npm published. The `if:` guards keeping CI on Gitea stay. Their stated reason is gone — a GitHub runner can reach npm — but turning CI on over there is its own change, and the repository has no GitHub mirror yet. Signed-off-by: Diego Resendez --- .npmrc | 4 -- AGENTS.md | 6 +- package-lock.json | 150 +++++++++++++++++++++++----------------------- 3 files changed, 79 insertions(+), 81 deletions(-) delete mode 100644 .npmrc diff --git a/.npmrc b/.npmrc deleted file mode 100644 index a61b211..0000000 --- a/.npmrc +++ /dev/null @@ -1,4 +0,0 @@ -# The @green-tea scope resolves from Verdaccio while core 26.9.0-beta.2 exists only there. The token is -# not here: it comes from ~/.npmrc locally and from the NPM_AUTH secret in CI. Plan B3 removes this line -# when the packages move to a core published on npm. -@green-tea:registry=https://npm.svc.zoit.services/ diff --git a/AGENTS.md b/AGENTS.md index 3ad3620..444f52e 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -25,8 +25,10 @@ Run all of them before proposing anything as finished. CI runs each one and each ## Two forges Gitea `Green-Tea/plugins` is the origin. `develop` and `main` are protected; everything lands through -a pull request. Until core is consumed from npm (Plan B3), CI runs on Gitea only, because -`@green-tea/core` comes from Verdaccio, which a GitHub runner cannot reach. +a pull request. CI still runs on Gitea only, through the `if:` guards in `ci.yml` — but the reason +is gone: `@green-tea/core@26.9.0-beta.2` shipped to npmjs.org on 2026-09-22, so the packages no +longer need Verdaccio and a GitHub runner can now resolve them. Removing those guards and adding the +mirror is Plan B3, and it is unblocked rather than done. ## The plugin convention diff --git a/package-lock.json b/package-lock.json index 7ee4325..7e37a62 100644 --- a/package-lock.json +++ b/package-lock.json @@ -612,8 +612,8 @@ }, "node_modules/@green-tea/core": { "version": "26.9.0-beta.2", - "resolved": "https://npm.svc.zoit.services/@green-tea/core/-/core-26.9.0-beta.2.tgz", - "integrity": "sha512-7np7bK5bG1M+bYPDA8YH4jlO3z2EHpuR0Ou8uFi4ywTFFCqHgtb6fmp4gBNHxPFTtFlxBvRHwj8DAHl7Y3b/Xg==", + "resolved": "https://registry.npmjs.org/@green-tea/core/-/core-26.9.0-beta.2.tgz", + "integrity": "sha512-HM8FdRgJz5CUiXqQUEa7vA3C+MLm/xe1Gq+5Unzg/3U6pPxqLedac+kUNcokeuwCNU5UE6bqtraTuHMua+xZ7Q==", "dev": true, "license": "MIT", "dependencies": { @@ -785,9 +785,9 @@ "license": "MIT" }, "node_modules/@types/node": { - "version": "22.20.3", - "resolved": "https://registry.npmjs.org/@types/node/-/node-22.20.3.tgz", - "integrity": "sha512-DZmzkmwHzXrLPAXPyKNDzlIwMMUZCVacoD25ywdy5YTKGbOx/2ld+Q38Im2zJ0vBuZP5Prd3VZutKZyXwkOS8A==", + "version": "22.20.4", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.20.4.tgz", + "integrity": "sha512-zJRE40jpHtKqE/C4fgHrAKQLJuSpzEnP9ff9Y7YtoR3Wd2pwqzlekDeEuUQXjRd+QCYnVnNwuJYmhdk9XV8gvA==", "dev": true, "license": "MIT", "dependencies": { @@ -795,17 +795,17 @@ } }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "8.70.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.70.0.tgz", - "integrity": "sha512-/v8HZt6RlyIZxB3ntehELOcUcfxKPVGWXnQdJuHRmzrqgF8nQypcC/oxGW+Ot4VGKDq81XugPKxx0n5PBtf9PA==", + "version": "8.70.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.70.1.tgz", + "integrity": "sha512-nDNrUQ/4ruSNYbu749TRY7cfrzPtoLHEXSNBI8aaNY32LlZCajixqRf3FqcKC4p5Cam4VOHYx/t+i5+nKXvrqA==", "dev": true, "license": "MIT", "dependencies": { "@eslint-community/regexpp": "^4.12.2", - "@typescript-eslint/scope-manager": "8.70.0", - "@typescript-eslint/type-utils": "8.70.0", - "@typescript-eslint/utils": "8.70.0", - "@typescript-eslint/visitor-keys": "8.70.0", + "@typescript-eslint/scope-manager": "8.70.1", + "@typescript-eslint/type-utils": "8.70.1", + "@typescript-eslint/utils": "8.70.1", + "@typescript-eslint/visitor-keys": "8.70.1", "ignore": "^7.0.5", "natural-compare": "^1.4.0", "ts-api-utils": "^2.5.0" @@ -818,15 +818,15 @@ "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "@typescript-eslint/parser": "^8.70.0", + "@typescript-eslint/parser": "^8.70.1", "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", "typescript": ">=4.8.4 <6.1.0" } }, "node_modules/@typescript-eslint/eslint-plugin/node_modules/ignore": { - "version": "7.0.9", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-7.0.9.tgz", - "integrity": "sha512-brTTsvFRt5C1gGHtPst/281UjPD5t9fBqbgoMPlVWy11ZLTPfu7HxK4ZYqO9H7o/yC9rSTCI85EaQ4OoY12qYw==", + "version": "7.0.10", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-7.0.10.tgz", + "integrity": "sha512-HpbUakT7xp5miBUywCHf36ZEuAJNklBJDDsGpUIjMzOSmM8ELSfA9Sa/QDPeNeqeoN31u+UTCkL4klCOVvRm4Q==", "dev": true, "license": "MIT", "engines": { @@ -834,16 +834,16 @@ } }, "node_modules/@typescript-eslint/parser": { - "version": "8.70.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.70.0.tgz", - "integrity": "sha512-zYvrmj9Yxd63UGaXw+kdt6A0F0s0qveJyuatIM77bYC2DE4pgmg7a50u8LR7PRtXd0x+h+Tl3eXabGm06SWd3Q==", + "version": "8.70.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.70.1.tgz", + "integrity": "sha512-nO974WLllwhSFWQXnMLj6nDGa8f0khKEz1JzpPJ1u7Vm/4X1X6ZHajpoknU4bb41vJyMB0HHVyS2GqdhWfIXZw==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/scope-manager": "8.70.0", - "@typescript-eslint/types": "8.70.0", - "@typescript-eslint/typescript-estree": "8.70.0", - "@typescript-eslint/visitor-keys": "8.70.0", + "@typescript-eslint/scope-manager": "8.70.1", + "@typescript-eslint/types": "8.70.1", + "@typescript-eslint/typescript-estree": "8.70.1", + "@typescript-eslint/visitor-keys": "8.70.1", "debug": "^4.4.3" }, "engines": { @@ -859,14 +859,14 @@ } }, "node_modules/@typescript-eslint/project-service": { - "version": "8.70.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/project-service/-/project-service-8.70.0.tgz", - "integrity": "sha512-hFHbTNqhU9G+2eKFXCBVb1tjFT/LceiJ4+HfLO4pTpDI0KHi6iajpcFFkaSQ9gXmCh7n82A0PthaayEdN6mspQ==", + "version": "8.70.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/project-service/-/project-service-8.70.1.tgz", + "integrity": "sha512-62xOgboPfwc3/IgPSX/W6oQR3ZbF04194FPGUGH8HL8iLFHbt/456/8Ph1wLNUgVF+s94FlHoipBsz+v7+LMnA==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/tsconfig-utils": "^8.70.0", - "@typescript-eslint/types": "^8.70.0", + "@typescript-eslint/tsconfig-utils": "^8.70.1", + "@typescript-eslint/types": "^8.70.1", "debug": "^4.4.3" }, "engines": { @@ -881,14 +881,14 @@ } }, "node_modules/@typescript-eslint/scope-manager": { - "version": "8.70.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.70.0.tgz", - "integrity": "sha512-8nP3Kwh5hlgZ4FicGvmznAmJe8UL4sdU8tLukrPaMuQmDuk4Y8xYfzu/aYZW4xT2JCgc7H/TpDI5cGlxcWJSqQ==", + "version": "8.70.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.70.1.tgz", + "integrity": "sha512-Pa0EeSeAusQc1WbjQMac+YfenewYTBu0KjgYvkUKwhXaHUKbFog23Dm/rp0DX/6tyYOQ3Xl1a+3EcFNZynGHCw==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.70.0", - "@typescript-eslint/visitor-keys": "8.70.0" + "@typescript-eslint/types": "8.70.1", + "@typescript-eslint/visitor-keys": "8.70.1" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -899,9 +899,9 @@ } }, "node_modules/@typescript-eslint/tsconfig-utils": { - "version": "8.70.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.70.0.tgz", - "integrity": "sha512-adnkeeNq9Sq1sUf4+FRVc0KdgYghzsgFpZSQVZVvY0LCuUuN0FnQgyGzCJeC4fW1cdXseBAjU2EOqUIjbNcZUw==", + "version": "8.70.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.70.1.tgz", + "integrity": "sha512-jumze1fPI+sDOaM2TWGQdn39PDxTr7TZGeuyLkAbNyx2vtMT3uRnVKChN0hfht5V2TugphJzF6bYXvBcE09qqg==", "dev": true, "license": "MIT", "engines": { @@ -916,15 +916,15 @@ } }, "node_modules/@typescript-eslint/type-utils": { - "version": "8.70.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.70.0.tgz", - "integrity": "sha512-NUMKIhYVaVIVLnRL9CRt+VVcuLgSHUCpXn4/+K8wql+vdInUzvx8BjUO1oJ7cG9shjFJKtF8F8Hh2kCh3/KBVw==", + "version": "8.70.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.70.1.tgz", + "integrity": "sha512-7zKTnyvaVWqzLZHPFQtX1hVHqgkMC+WebPWakNCSyrQVbIP1AM0L0TlBZtACldIRb6PptI8Odk+jyZ5kP3B1VA==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.70.0", - "@typescript-eslint/typescript-estree": "8.70.0", - "@typescript-eslint/utils": "8.70.0", + "@typescript-eslint/types": "8.70.1", + "@typescript-eslint/typescript-estree": "8.70.1", + "@typescript-eslint/utils": "8.70.1", "debug": "^4.4.3", "ts-api-utils": "^2.5.0" }, @@ -941,9 +941,9 @@ } }, "node_modules/@typescript-eslint/types": { - "version": "8.70.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.70.0.tgz", - "integrity": "sha512-asTOIYhDg4zdzOScCyaytrsV3cR6B4ecPQlXw/dJIm7J/MZTtCtfVII9JD8Geh4jTCrK/Xe6cg5UevoleMcoJQ==", + "version": "8.70.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.70.1.tgz", + "integrity": "sha512-Dm1ypdhhrGCTyyehxElhgJ6kgk8MVCv5qXdoOVqPr1uqk42jX8KjrZqhROvdShczA8qrDoYiOWn1ykWlx2k81Q==", "dev": true, "license": "MIT", "engines": { @@ -955,16 +955,16 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "8.70.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.70.0.tgz", - "integrity": "sha512-d9NmHMPEKQ7QCLLm1jI3zmoQBwT5KwFYjXBJ9ymZfKCUU+5rmTRykKAFvH5Qn/ZCds3CEAFS9OC9M/jkl0X2bA==", + "version": "8.70.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.70.1.tgz", + "integrity": "sha512-TU8PwyGN0PQJUcE96mw8eCQ44SmxGdQlJmlWakHaHQ15eIuuvye5yNtmh/i6oS88jzXVQB71xdNkbkB/fMwL0g==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/project-service": "8.70.0", - "@typescript-eslint/tsconfig-utils": "8.70.0", - "@typescript-eslint/types": "8.70.0", - "@typescript-eslint/visitor-keys": "8.70.0", + "@typescript-eslint/project-service": "8.70.1", + "@typescript-eslint/tsconfig-utils": "8.70.1", + "@typescript-eslint/types": "8.70.1", + "@typescript-eslint/visitor-keys": "8.70.1", "debug": "^4.4.3", "minimatch": "^10.2.2", "semver": "^7.7.3", @@ -1022,16 +1022,16 @@ } }, "node_modules/@typescript-eslint/utils": { - "version": "8.70.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.70.0.tgz", - "integrity": "sha512-oZmtKJz/4fufZ2p3+Cn3ijEojcdfR+1zYDH2xKYrEly0dR/Q/1xUPRCOlKGxod78nWlU2UnDe09GZ3TaknBFGA==", + "version": "8.70.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.70.1.tgz", + "integrity": "sha512-Esgul8MsnKnRLdYU2Eb2cRV9bS5HJYtKj1ByJnOzzG2M58DGdSUQ1jUuILxipqcpB2h9WLrbD5GijIWUjX/Tqw==", "dev": true, "license": "MIT", "dependencies": { "@eslint-community/eslint-utils": "^4.9.1", - "@typescript-eslint/scope-manager": "8.70.0", - "@typescript-eslint/types": "8.70.0", - "@typescript-eslint/typescript-estree": "8.70.0" + "@typescript-eslint/scope-manager": "8.70.1", + "@typescript-eslint/types": "8.70.1", + "@typescript-eslint/typescript-estree": "8.70.1" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -1046,13 +1046,13 @@ } }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "8.70.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.70.0.tgz", - "integrity": "sha512-BoC8PiO4Hkdo0TVJh9Ntxr5MxPDI7/oFsrygN5ADelFSeXG/qgNuucIGA+L5Z6JpPTE/uRfcTWtscjbUaufepQ==", + "version": "8.70.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.70.1.tgz", + "integrity": "sha512-Vwj9lUIW5Xq3wQ9w6gv3R86g1hMK8f2zNOdGTAgeXUMMXFK78G9ruCjjqutHMNJc0+CH7LYRnHeUB9IT8wFmcw==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.70.0", + "@typescript-eslint/types": "8.70.1", "eslint-visitor-keys": "^5.0.0" }, "engines": { @@ -2386,9 +2386,9 @@ } }, "node_modules/prettier": { - "version": "3.9.8", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.9.8.tgz", - "integrity": "sha512-WRFq3Wn3WId7LLROfMLdH7xaFr2jR62wU8nLO6rQUOLOxNZUviyJQs1M0iIhLexSFy+L+w0ch66wtoO2jRjG0A==", + "version": "3.9.9", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.9.9.tgz", + "integrity": "sha512-Z/CJHIkdujO/OtN7nXUii0Rf3VT5SRuhjBA82Xvu2XhBUgX3nhP67T0LHceBdQLex7OOFGTox+Q5Yg8Jk2Qivg==", "dev": true, "license": "MIT", "bin": { @@ -2679,9 +2679,9 @@ } }, "node_modules/tsx": { - "version": "4.23.13", - "resolved": "https://registry.npmjs.org/tsx/-/tsx-4.23.13.tgz", - "integrity": "sha512-BL5MGkRln6aDYhb0xbQlEAGw743BaZYWdbWtdJOBriYJboKgUUYCadFp2/FpBBZquBC/ezNBn7wMMPx7FDZUDw==", + "version": "4.23.15", + "resolved": "https://registry.npmjs.org/tsx/-/tsx-4.23.15.tgz", + "integrity": "sha512-Yiex1Ovn8z2xPpOWckIiysV1SSyRMY9BkLF++q0yKiDxCqRhosKfMg3janKkiLBwZ5c/YryloKwGZcrEmtwxKw==", "dev": true, "license": "MIT", "dependencies": { @@ -2725,16 +2725,16 @@ } }, "node_modules/typescript-eslint": { - "version": "8.70.0", - "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.70.0.tgz", - "integrity": "sha512-P/W5cz70/cQAuKfY3xwQMWWTV7BvJ0mAQmi+9mBcsVPaBUpd6Ohpa+fECv9rBFrQcig86jAiNBFNWUqnTjr4pw==", + "version": "8.70.1", + "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.70.1.tgz", + "integrity": "sha512-AcWG7KDjZ2THNXsgwttMaGmzVi0VFRlFYfqFHYQRbDpF3owuYbuiL8c7UUrd2k8s3PoSfIQrWfrGXfcElrWLYA==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/eslint-plugin": "8.70.0", - "@typescript-eslint/parser": "8.70.0", - "@typescript-eslint/typescript-estree": "8.70.0", - "@typescript-eslint/utils": "8.70.0" + "@typescript-eslint/eslint-plugin": "8.70.1", + "@typescript-eslint/parser": "8.70.1", + "@typescript-eslint/typescript-estree": "8.70.1", + "@typescript-eslint/utils": "8.70.1" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" -- 2.54.1 From 16f832979400d6fa5c101dd163dadaa64e8933dd Mon Sep 17 00:00:00 2001 From: Diego Resendez Date: Wed, 23 Sep 2026 10:26:10 -0500 Subject: [PATCH 19/24] docs(plugins): say how to install now that npm is not an option MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The READMEs still described a dual publish, and none of them carried an install command at all — so the instruction a reader would infer, `npm i @green-tea/jwt`, is the one command that no longer works. Each package README is also the page JSR renders, which makes it the first thing anyone sees. Adds `npx jsr add` to all three, with the deno and bun forms, and says plainly that there is no npmjs.org package rather than letting someone find out from a 404. Also corrects a claim in the root README that this branch made false: "installing one never pulls a second copy of core". Measured while deciding this change — a plugin names an exact core in `deno.json`, and across a minor boundary npm nests a second copy instead of deduplicating. The copy is inert, since a plugin's built code never imports core, and that is worth saying precisely: what is guaranteed is which core *runs*, not how many are on disk. Signed-off-by: Diego Resendez --- README.md | 25 +++++++++++++++++++++---- packages/jwt/README.md | 10 ++++++++++ packages/metrics/README.md | 10 ++++++++++ packages/rate-limit/README.md | 10 ++++++++++ 4 files changed, 51 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 8e7b1b7..5a4ecec 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,18 @@ # green-tea plugins Official plugins for [green-tea](https://github.com/Expressive-Tea/green-tea). Each one is its own -package under `packages/`, published to npm and JSR, and each README says which runtimes it supports -and why not the others. +package under `packages/`, published to JSR, and each README says which runtimes it supports and why +not the others. + +```bash +npx jsr add @green-tea/jwt # npm, and the same command for yarn and pnpm +deno add jsr:@green-tea/jwt +bunx jsr add @green-tea/jwt +``` + +That works under every package manager: `jsr add` writes one line to `.npmrc` and installs through +`npm.jsr.io`, so the import stays `@green-tea/jwt` and nothing in your code mentions JSR. A plain +`npm i @green-tea/jwt` will **not** work — these packages are not on npmjs.org. | Package | What it does | |---|---| @@ -10,5 +20,12 @@ and why not the others. | [`@green-tea/rate-limit`](packages/rate-limit) | A per-request limiter with a branded `429` and a swept in-memory store | | [`@green-tea/metrics`](packages/metrics) | Counts the lifecycle stream and renders the Prometheus text format | -Plugins import core as types only, so installing one never pulls a second copy of core — and never -warns about a version range, which under CalVer no range can express. +Plugins import core as types only. Their built code never imports it at all, so the core that runs +is always your application's, whatever version a plugin was written against — and nothing warns +about a version range, which under CalVer no range can express. + +That is about *loading*, not about disk. A plugin names an exact core in its `deno.json`, and when +your version differs by more than the patch, npm places a second copy under the plugin rather than +deduplicating. Measured, on purpose: it is inert, because nothing ever imports it. What it can do +is make `tsc` resolve a plugin's `Plugin` type against that copy instead of yours, which fails +loudly at compile time rather than quietly at runtime. diff --git a/packages/jwt/README.md b/packages/jwt/README.md index 5ac29b5..68f4e22 100644 --- a/packages/jwt/README.md +++ b/packages/jwt/README.md @@ -12,6 +12,16 @@ it with `@needs('jwt')` and signs or verifies by key name. | Bun | ✅ | | | workerd (edge) | ❌ | Reads the signing key from a file path, and workerd has no filesystem. | +## Install + +```bash +npx jsr add @green-tea/jwt +``` + +Or `deno add jsr:@green-tea/jwt`, or `bunx jsr add @green-tea/jwt`. Under npm, yarn and pnpm +`jsr add` installs through `npm.jsr.io`, so the import below stays `@green-tea/jwt`. +There is no npmjs.org package — `npm i @green-tea/jwt` will not find one. + ## Usage ```ts diff --git a/packages/metrics/README.md b/packages/metrics/README.md index c494398..a6d3902 100644 --- a/packages/metrics/README.md +++ b/packages/metrics/README.md @@ -12,6 +12,16 @@ own, with the transformer this package ships. | Bun | ✅ | | | workerd (edge) | ❌ | Counters live in one isolate, and an edge deployment has many, so a scrape reports whichever isolate answered it. Supported once the counters can be shared. | +## Install + +```bash +npx jsr add @green-tea/metrics +``` + +Or `deno add jsr:@green-tea/metrics`, or `bunx jsr add @green-tea/metrics`. Under npm, yarn and pnpm +`jsr add` installs through `npm.jsr.io`, so the import below stays `@green-tea/metrics`. +There is no npmjs.org package — `npm i @green-tea/metrics` will not find one. + ## Usage ```ts diff --git a/packages/rate-limit/README.md b/packages/rate-limit/README.md index 9de7108..fcea804 100644 --- a/packages/rate-limit/README.md +++ b/packages/rate-limit/README.md @@ -13,6 +13,16 @@ and green-tea runs the step only for the routes that depend on it. | Bun | ✅ | | | workerd (edge) | ❌ | The default store counts per isolate, and an edge deployment has many, so a shared limit is not one. Supported once a store that shares state ships. | +## Install + +```bash +npx jsr add @green-tea/rate-limit +``` + +Or `deno add jsr:@green-tea/rate-limit`, or `bunx jsr add @green-tea/rate-limit`. Under npm, yarn and pnpm +`jsr add` installs through `npm.jsr.io`, so the import below stays `@green-tea/rate-limit`. +There is no npmjs.org package — `npm i @green-tea/rate-limit` will not find one. + ## Usage ```ts -- 2.54.1 From 686a4527cfe7377843425910abcc84882e433f56 Mon Sep 17 00:00:00 2001 From: Diego Resendez Date: Wed, 23 Sep 2026 11:24:09 -0500 Subject: [PATCH 20/24] docs(plugins): give each package a header, and stop leaning on a marketplace MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Each README now opens the way core's does — logo, name, one line saying what the package is for. The package README is the page JSR renders, so it is the first thing anyone sees, and three of them opened with a bare `# @green-tea/x`. The logo is an absolute URL rather than a relative path, deliberately. Core's README points at `./assets/logo.png`, and core's `publish.include` does not ship `assets/` — so that image 404s on core's JSR page today. Repeating the pattern three more times would have repeated the bug three more times. Also drops the claim that npmjs.org discovery does not matter "where the marketplace is the channel anyway". There is no marketplace yet, and a plugin should stand on its own rather than on a site that has not shipped. The cost is now stated plainly instead of argued away. Corrects "their built code never imports it": with JSR publishing the source, the build is JSR's, not ours. What holds is that a type import leaves nothing behind, so the published JavaScript never mentions core. Signed-off-by: Diego Resendez --- AGENTS.md | 6 +++--- README.md | 22 ++++++++++++++++++---- packages/jwt/README.md | 15 ++++++++++++++- packages/metrics/README.md | 15 ++++++++++++++- packages/rate-limit/README.md | 15 ++++++++++++++- 5 files changed, 63 insertions(+), 10 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index 444f52e..c00b428 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -69,9 +69,9 @@ mirror is Plan B3, and it is unblocked rather than done. it lived. It is declared in the JSR package settings, not in `deno.json` — the config schema accepts `name`, `version`, `license`, `exports` and `publish`, and nothing else. - What this gives up: no discovery on npmjs.org, where the marketplace is the channel anyway, and - a site behind a registry proxy that mirrors npmjs.org and refuses a second one cannot reach the - plugins. Core still can — it publishes to both. + What this gives up, stated plainly rather than argued away: nobody searching npmjs.org will find + these, and a site behind a registry proxy that mirrors npmjs.org and refuses to add a second one + cannot install them at all. Core still can — it publishes to both. ## Conventions diff --git a/README.md b/README.md index 5a4ecec..dac48a8 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,17 @@ -# green-tea plugins +

+ Green Tea +

+ +

green tea plugins.

+ +

Each one is a node in the graph, not a link in a chain.

+ +

+ A plugin declares what it provides; your route declares what it needs.
+ Nothing runs for a route that never asked for it. +

+ +--- Official plugins for [green-tea](https://github.com/Expressive-Tea/green-tea). Each one is its own package under `packages/`, published to JSR, and each README says which runtimes it supports and why @@ -20,9 +33,10 @@ That works under every package manager: `jsr add` writes one line to `.npmrc` an | [`@green-tea/rate-limit`](packages/rate-limit) | A per-request limiter with a branded `429` and a swept in-memory store | | [`@green-tea/metrics`](packages/metrics) | Counts the lifecycle stream and renders the Prometheus text format | -Plugins import core as types only. Their built code never imports it at all, so the core that runs -is always your application's, whatever version a plugin was written against — and nothing warns -about a version range, which under CalVer no range can express. +Plugins import core as types only, and a type import leaves nothing behind when it compiles — the +JavaScript JSR publishes never mentions core. So the core that runs is always your application's, +whatever version a plugin was written against, and nothing warns about a version range, which under +CalVer no range can express. That is about *loading*, not about disk. A plugin names an exact core in its `deno.json`, and when your version differs by more than the patch, npm places a second copy under the plugin rather than diff --git a/packages/jwt/README.md b/packages/jwt/README.md index 68f4e22..66e7849 100644 --- a/packages/jwt/README.md +++ b/packages/jwt/README.md @@ -1,4 +1,17 @@ -# @green-tea/jwt +

+ Green Tea +

+ +

@green-tea/jwt

+ +

Sign and verify, as one node in the graph.

+ +

+ Keys load once, while providers boot — a bad key fails the deploy,
+ not the first sign-in of the day. +

+ +--- Loads JWT signing keys at boot and publishes them into the graph as one registry. A handler asks for it with `@needs('jwt')` and signs or verifies by key name. diff --git a/packages/metrics/README.md b/packages/metrics/README.md index a6d3902..2eceae1 100644 --- a/packages/metrics/README.md +++ b/packages/metrics/README.md @@ -1,4 +1,17 @@ -# @green-tea/metrics +

+ Green Tea +

+ +

@green-tea/metrics

+ +

Count the lifecycle. Render Prometheus.

+ +

+ Reads the event stream green-tea already emits, so nothing in your
+ handlers has to know it is being measured. +

+ +--- Subscribes to green-tea's lifecycle stream and counts what happened. You expose it on a route you own, with the transformer this package ships. diff --git a/packages/rate-limit/README.md b/packages/rate-limit/README.md index fcea804..76b9d5a 100644 --- a/packages/rate-limit/README.md +++ b/packages/rate-limit/README.md @@ -1,4 +1,17 @@ -# @green-tea/rate-limit +

+ Green Tea +

+ +

@green-tea/rate-limit

+ +

A limit your handler's signature admits to.

+ +

+ The route asks for the limiter by name, so it runs where it is wanted
+ and nowhere else — and you can see which routes those are. +

+ +--- Publishes a per-request rate limiter into the graph. A handler opts in by asking for it and naming a rule, so the limit is visible in the handler's signature rather than hidden in a middleware chain — -- 2.54.1 From 51c54c1cc49ef87f7cd7bb65baf15518527dc098 Mon Sep 17 00:00:00 2001 From: Diego Resendez Date: Wed, 23 Sep 2026 11:37:10 -0500 Subject: [PATCH 21/24] ci(plugins): mirror Gitea main to GitHub main MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The public repository exists but nothing populates it. This is the same promotion core uses, cut down to what this repository actually has: one branch. Only `main`, and no `contrib` counterpart. Core mirrors `develop` as `contrib` because outside contributions land there, and that flow is documented. Here it is not, so a second mirrored branch would be a branch nobody targets. Tags stay off the push, `--tags` included. Core's reason was that the same tag means one thing on each forge; here it is simpler and sharper — these packages publish to JSR, and a JSR version can never be replaced or removed, so a tag must never reach the public forge as a side effect of promoting a branch. The push is not forced, and the step fails early with a readable message when GH_PROMOTE_TOKEN is missing rather than building a remote URL with an empty credential and failing on the push with an authentication error instead. The secret is set on this repository; the guard is for whoever forks or rebuilds it. Signed-off-by: Diego Resendez --- .github/workflows/promote.yml | 44 +++++++++++++++++++++++++++++++++++ AGENTS.md | 27 +++++++++++++++++---- 2 files changed, 67 insertions(+), 4 deletions(-) create mode 100644 .github/workflows/promote.yml diff --git a/.github/workflows/promote.yml b/.github/workflows/promote.yml new file mode 100644 index 0000000..3f4a239 --- /dev/null +++ b/.github/workflows/promote.yml @@ -0,0 +1,44 @@ +name: Promote → GitHub + +# Promotion. Runs on GITEA ONLY. Mirrors one branch to the public GitHub repo and nothing else: +# +# main → GitHub main +# +# Development happens on `develop` and feature branches, and those stay Gitea-private — which is +# why this is a workflow rather than Gitea's push-mirror, since that would expose every branch. +# +# Only `main`, and no `contrib` counterpart yet: unlike core, this repository has no documented +# flow for outside contributions, so there is nothing for a second mirrored branch to serve. Add +# one here when that flow exists, rather than shipping a branch nobody targets. +# +# The push is NOT forced. A refusal means GitHub `main` holds commits that Gitea `main` does not, +# which is a question to answer rather than an obstacle to remove. +# +# Tags are deliberately NOT mirrored, and `--tags` is left off the push for the same reason. These +# packages publish to JSR, where a version can never be replaced or removed — so promoting a tag +# has to stay a decision someone takes deliberately, never a side effect of promoting a branch. +on: + push: + branches: [main] + +jobs: + push-github: + if: ${{ github.server_url != 'https://github.com' }} + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 # full history for a clean push + - name: Push to GitHub + env: + GH_TOKEN: ${{ secrets.GH_PROMOTE_TOKEN }} + run: | + if [ -z "$GH_TOKEN" ]; then + echo "::error::GH_PROMOTE_TOKEN is not set on this repository. Add it in Settings → Actions → Secrets; core carries the same secret." + exit 1 + fi + git remote add github "https://x-access-token:${GH_TOKEN}@github.com/Expressive-Tea/green-tea-plugins.git" + if ! git push github "HEAD:refs/heads/main"; then + echo "::error::GitHub main has commits that Gitea main does not. Find out what they are and carry them; never force this push." + exit 1 + fi diff --git a/AGENTS.md b/AGENTS.md index c00b428..e3220de 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -25,10 +25,29 @@ Run all of them before proposing anything as finished. CI runs each one and each ## Two forges Gitea `Green-Tea/plugins` is the origin. `develop` and `main` are protected; everything lands through -a pull request. CI still runs on Gitea only, through the `if:` guards in `ci.yml` — but the reason -is gone: `@green-tea/core@26.9.0-beta.2` shipped to npmjs.org on 2026-09-22, so the packages no -longer need Verdaccio and a GitHub runner can now resolve them. Removing those guards and adding the -mirror is Plan B3, and it is unblocked rather than done. +a pull request. + +``` +feature/* → develop → main → [promote.yml] → GitHub main +``` + +`promote.yml` runs on Gitea only and mirrors `main`, and nothing else. Feature branches and +`develop` stay private, which is why this is a workflow rather than Gitea's push-mirror — that +would expose every branch. The push is never forced: a refusal means GitHub `main` holds commits +Gitea `main` does not, and that is a question to answer, not an obstacle to remove. + +There is **no `contrib` branch** here, unlike core. This repository has no documented flow for +outside contributions yet, so there is nothing for a second mirrored branch to serve. Add one when +that flow exists rather than shipping a branch nobody targets. + +**Tags are not mirrored.** These packages publish to JSR, where a version can never be replaced or +removed, so promoting a tag has to stay a deliberate act rather than a side effect of promoting a +branch. + +CI itself still runs on Gitea only, through the `if:` guards in `ci.yml` — but the reason is gone: +`@green-tea/core@26.9.0-beta.2` shipped to npmjs.org on 2026-09-22, so the packages no longer need +Verdaccio and a GitHub runner can resolve them. Removing those guards is unblocked rather than done, +and until it happens the mirrored repository carries workflows that skip every job. ## The plugin convention -- 2.54.1 From a3f57e61d9bd3c240a11688608ff24bb321c6df9 Mon Sep 17 00:00:00 2001 From: Diego Resendez Date: Wed, 23 Sep 2026 11:50:52 -0500 Subject: [PATCH 22/24] chore(ci): stop naming internal infrastructure in files that go public MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `main` is about to be mirrored to a public repository for the first time, so everything in the tree becomes readable by anyone. Two things in here were written when only the development forge could see them. `ci.yml` carried the internal registry's hostname in a step that authenticated to it — twice. That step is also dead: `.npmrc` no longer points the @green-tea scope anywhere, and core resolves from npmjs.org. So this removes a published hostname and an instruction that does nothing, in the same edit. `AGENTS.md` named the origin by its repository path. Core's public copy says "Development lives on a private Gitea instance" and stops there, which is the right level: a reader learns the shape of the workflow without learning where it lives, and a path they cannot reach tells them nothing anyway. `promote.yml` keeps saying the forge by name, because core's public copy does and the two should read alike. Naming the product is not the problem; naming the host was. Checked the rest while here: no credentials, no keys, no personal paths or addresses, no issue templates routing anyone to a forge they cannot open. Signed-off-by: Diego Resendez --- .github/workflows/ci.yml | 15 ++++----------- AGENTS.md | 22 ++++++++++++---------- 2 files changed, 16 insertions(+), 21 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a0efca3..ecc4ca3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,8 +1,9 @@ name: CI -# Gitea only, for now. Every package builds against @green-tea/core@26.9.0-beta.2, which exists on -# Verdaccio alone, and a GitHub runner cannot reach Verdaccio. Plan B3 moves the packages to a core on -# npm, removes these guards and adds the GitHub mirror; until then GitHub has no copy to run against. +# Runs on the development forge only, through the `if:` guards below. The reason they were added is +# gone — the packages used to build against a core that existed on an internal registry, and now +# resolve it from npmjs.org like anyone else — so lifting them is unblocked. Until that happens, the +# public mirror carries this file with every job skipped. on: push: branches: [develop, main] @@ -45,10 +46,6 @@ jobs: - uses: actions/setup-node@v4 with: node-version: '22' - - name: Authenticate to Verdaccio - env: - NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH }} - run: npm config set //npm.svc.zoit.services/:_authToken "$NODE_AUTH_TOKEN" - run: npm ci - run: npm run lint - run: npm run format:check @@ -73,10 +70,6 @@ jobs: - uses: actions/setup-node@v4 with: node-version: '22' - - name: Authenticate to Verdaccio - env: - NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH }} - run: npm config set //npm.svc.zoit.services/:_authToken "$NODE_AUTH_TOKEN" - run: npm ci - if: matrix.runtime == 'deno' uses: denoland/setup-deno@v2 diff --git a/AGENTS.md b/AGENTS.md index e3220de..e6281f0 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -24,17 +24,18 @@ Run all of them before proposing anything as finished. CI runs each one and each ## Two forges -Gitea `Green-Tea/plugins` is the origin. `develop` and `main` are protected; everything lands through -a pull request. +Development lives on a private Gitea instance. GitHub is a downstream mirror that receives `main` +and nothing else. On the development forge `develop` and `main` are protected; everything lands +through a pull request. ``` feature/* → develop → main → [promote.yml] → GitHub main ``` -`promote.yml` runs on Gitea only and mirrors `main`, and nothing else. Feature branches and -`develop` stay private, which is why this is a workflow rather than Gitea's push-mirror — that -would expose every branch. The push is never forced: a refusal means GitHub `main` holds commits -Gitea `main` does not, and that is a question to answer, not an obstacle to remove. +`promote.yml` runs on the development forge only. Feature branches and `develop` stay private, +which is why this is a workflow rather than a push-mirror — that would expose every branch. The +push is never forced: a refusal means GitHub `main` holds commits the source `main` does not, and +that is a question to answer, not an obstacle to remove. There is **no `contrib` branch** here, unlike core. This repository has no documented flow for outside contributions yet, so there is nothing for a second mirrored branch to serve. Add one when @@ -44,10 +45,11 @@ that flow exists rather than shipping a branch nobody targets. removed, so promoting a tag has to stay a deliberate act rather than a side effect of promoting a branch. -CI itself still runs on Gitea only, through the `if:` guards in `ci.yml` — but the reason is gone: -`@green-tea/core@26.9.0-beta.2` shipped to npmjs.org on 2026-09-22, so the packages no longer need -Verdaccio and a GitHub runner can resolve them. Removing those guards is unblocked rather than done, -and until it happens the mirrored repository carries workflows that skip every job. +CI itself still runs on the development forge only, through the `if:` guards in `ci.yml` — but the +reason is gone: the packages used to build against a core that existed on an internal registry +alone, and since 2026-09-22 they resolve `@green-tea/core` from npmjs.org like anyone else. +Removing those guards is unblocked rather than done, and until it happens the mirrored repository +carries workflows that skip every job. ## The plugin convention -- 2.54.1 From e1ea1542c9c76979521c6b729025c1c991b61042 Mon Sep 17 00:00:00 2001 From: Diego Resendez Date: Wed, 23 Sep 2026 11:55:22 -0500 Subject: [PATCH 23/24] docs: add the community files GitHub expects before this goes public MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The repository had a LICENSE and nothing else. Adds CONTRIBUTING, a code of conduct, a security policy, the DCO, issue templates and a pull request template — the set GitHub checks for, written for these packages rather than copied from core. **This adds a `contrib` branch, reversing a decision made earlier today.** The promotion originally mirrored `main` alone, on the reasoning that a repository with no documented contribution flow does not need a branch nobody targets. That reasoning held right up until we decided to document one. CONTRIBUTING has to send people somewhere, `main` is the wrong answer — a pull request there puts the forges out of step and breaks the next promotion — so `develop → contrib` is back, the same arrangement core runs. What is adapted rather than inherited: - Node 22, not core's 18, which is what every package here already requires. - No build step anywhere. JSR transpiles the source, so `deno publish --dry-run` is what stands in for one. - The four traps an assistant falls into *here*: turning `import type` into a value import, adding a build, writing for Node alone, and changing `engines` without the README's Runtimes table. - SECURITY scopes each package separately, and sends vulnerabilities in the framework itself to core — same people, but the advisory has to live where the fix does. There is also a plugin proposal template, which exists to ask the question that is cheaper in a paragraph than in a written pull request: whether a thing belongs in the official set at all, or is better as the author's own package. The template says the second outcome is first-class, because it usually is. Signed-off-by: Diego Resendez --- .github/ISSUE_TEMPLATE/bug_report.md | 37 ++++++ .github/ISSUE_TEMPLATE/config.yml | 14 +++ .github/ISSUE_TEMPLATE/plugin_proposal.md | 35 ++++++ .github/PULL_REQUEST_TEMPLATE.md | 26 +++++ .github/workflows/promote.yml | 33 +++--- AGENTS.md | 29 +++-- CODE_OF_CONDUCT.md | 89 ++++++++++++++ CONTRIBUTING.md | 136 ++++++++++++++++++++++ DCO | 37 ++++++ SECURITY.md | 47 ++++++++ 10 files changed, 460 insertions(+), 23 deletions(-) create mode 100644 .github/ISSUE_TEMPLATE/bug_report.md create mode 100644 .github/ISSUE_TEMPLATE/config.yml create mode 100644 .github/ISSUE_TEMPLATE/plugin_proposal.md create mode 100644 .github/PULL_REQUEST_TEMPLATE.md create mode 100644 CODE_OF_CONDUCT.md create mode 100644 CONTRIBUTING.md create mode 100644 DCO create mode 100644 SECURITY.md diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 0000000..949c6da --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,37 @@ +--- +name: Bug report +about: A plugin behaves differently from what its README or its types promise +labels: bug +--- + +## Which plugin + + + +## What happened + +## What you expected + +## Minimal reproduction + +The smallest app that shows it — the `createApp` call, the plugin options, and the route: + +```ts + +``` + +## Environment + +- Plugin version: +- `@green-tea/core` version: +- Runtime and version: +- OS: + + diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 0000000..a9bf880 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1,14 @@ +# Design questions and "should this live here?" threads do not fit a form, and they are +# worth having. Keep the blank option available. +blank_issues_enabled: true + +contact_links: + - name: Security vulnerability + url: https://github.com/Expressive-Tea/green-tea-plugins/security/advisories/new + about: Report it privately instead. Never in a public issue — see SECURITY.md. + - name: A bug in green-tea itself + url: https://github.com/Expressive-Tea/green-tea/issues/new + about: The framework lives in its own repository. Plugins are types-only against it. + - name: Documentation + url: https://green-tea.expressive-tea.io/docs/ + about: How to wire a route, a module, a plugin or a runtime adapter. diff --git a/.github/ISSUE_TEMPLATE/plugin_proposal.md b/.github/ISSUE_TEMPLATE/plugin_proposal.md new file mode 100644 index 0000000..138e6e7 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/plugin_proposal.md @@ -0,0 +1,35 @@ +--- +name: Plugin proposal +about: Suggest something for the official set — before writing it +labels: enhancement +--- + +## What it does + + + +## Why it belongs in the official set + + + +## Runtimes it could support + + + +## Shape + +```ts +// The call as a user would write it. +``` diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..7eaae4b --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,26 @@ +> **Base branch:** on GitHub this must target `contrib`, not `main`. You can change it above before you submit — and [here is why](https://github.com/Expressive-Tea/green-tea-plugins/blob/main/CONTRIBUTING.md#where-to-send-your-changes). Delete this line once the base is right. + +## What this changes + + + +Closes # + +## Which runtimes you ran + + + +- [ ] `npm test` (Node) +- [ ] `npm run test:deno` +- [ ] `npm run test:bun` +- [ ] `npm run test:edge` + +## Checklist + +- [ ] The base branch above is `contrib` +- [ ] Commits are signed off (`git commit -s`) +- [ ] `lint`, `format:check`, `typecheck`, `complexity:check` and `deno publish --dry-run` pass locally +- [ ] New behaviour has a test +- [ ] Core is still imported as `import type` only — never a value import +- [ ] If `engines` changed, the package README's Runtimes table changed with it +- [ ] A breaking change is under `### Breaking`, first in that package's CHANGELOG diff --git a/.github/workflows/promote.yml b/.github/workflows/promote.yml index 3f4a239..6b7286f 100644 --- a/.github/workflows/promote.yml +++ b/.github/workflows/promote.yml @@ -1,25 +1,27 @@ name: Promote → GitHub -# Promotion. Runs on GITEA ONLY. Mirrors one branch to the public GitHub repo and nothing else: +# Promotion. Runs on GITEA ONLY. Mirrors two branches to the public GitHub repo and nothing else: # -# main → GitHub main +# main → GitHub main what has been promoted +# develop → GitHub contrib what outside contributors fork from and target # -# Development happens on `develop` and feature branches, and those stay Gitea-private — which is -# why this is a workflow rather than Gitea's push-mirror, since that would expose every branch. +# Feature branches stay private, which is why this is a workflow rather than a push-mirror — that +# would expose every branch. # -# Only `main`, and no `contrib` counterpart yet: unlike core, this repository has no documented -# flow for outside contributions, so there is nothing for a second mirrored branch to serve. Add -# one here when that flow exists, rather than shipping a branch nobody targets. +# `contrib` exists because CONTRIBUTING.md sends people there. A pull request against `main` would +# put the two forges out of step, so contributors need a branch that tracks current development, +# and this is it. Same arrangement as core. # -# The push is NOT forced. A refusal means GitHub `main` holds commits that Gitea `main` does not, -# which is a question to answer rather than an obstacle to remove. +# Neither push is forced. For `contrib` that is the guard rather than a limitation: the push is +# refused exactly when `contrib` holds external merges nobody has carried into `develop` yet. Carry +# them, and the next develop push fast-forwards. # # Tags are deliberately NOT mirrored, and `--tags` is left off the push for the same reason. These # packages publish to JSR, where a version can never be replaced or removed — so promoting a tag # has to stay a decision someone takes deliberately, never a side effect of promoting a branch. on: push: - branches: [main] + branches: [main, develop] jobs: push-github: @@ -33,12 +35,17 @@ jobs: env: GH_TOKEN: ${{ secrets.GH_PROMOTE_TOKEN }} run: | + case "$GITHUB_REF_NAME" in + main) target=main ;; + develop) target=contrib ;; + *) echo "::error::promote runs for main and develop only, got '$GITHUB_REF_NAME'"; exit 1 ;; + esac if [ -z "$GH_TOKEN" ]; then - echo "::error::GH_PROMOTE_TOKEN is not set on this repository. Add it in Settings → Actions → Secrets; core carries the same secret." + echo "::error::GH_PROMOTE_TOKEN is not set on this repository. Add it in Settings → Actions → Secrets." exit 1 fi git remote add github "https://x-access-token:${GH_TOKEN}@github.com/Expressive-Tea/green-tea-plugins.git" - if ! git push github "HEAD:refs/heads/main"; then - echo "::error::GitHub main has commits that Gitea main does not. Find out what they are and carry them; never force this push." + if ! git push github "HEAD:refs/heads/${target}"; then + echo "::error::GitHub ${target} has commits that ${GITHUB_REF_NAME} does not. For contrib that means external merges not yet carried into develop — carry them (CONTRIBUTING.md); never force this push." exit 1 fi diff --git a/AGENTS.md b/AGENTS.md index e6281f0..155e334 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -24,22 +24,31 @@ Run all of them before proposing anything as finished. CI runs each one and each ## Two forges -Development lives on a private Gitea instance. GitHub is a downstream mirror that receives `main` -and nothing else. On the development forge `develop` and `main` are protected; everything lands -through a pull request. +Development lives on a private Gitea instance. GitHub is a downstream mirror that receives `main`, +and `develop` under the name `contrib`. On the development forge `develop` and `main` are +protected; everything lands through a pull request. ``` feature/* → develop → main → [promote.yml] → GitHub main + │ │ + └─[promote.yml]┴──→ GitHub contrib ← external pull requests ``` -`promote.yml` runs on the development forge only. Feature branches and `develop` stay private, -which is why this is a workflow rather than a push-mirror — that would expose every branch. The -push is never forced: a refusal means GitHub `main` holds commits the source `main` does not, and -that is a question to answer, not an obstacle to remove. +`promote.yml` runs on the development forge only. Feature branches stay private, which is why this +is a workflow rather than a push-mirror — that would expose every branch. Neither push is forced. -There is **no `contrib` branch** here, unlike core. This repository has no documented flow for -outside contributions yet, so there is nothing for a second mirrored branch to serve. Add one when -that flow exists rather than shipping a branch nobody targets. +`contrib` exists because `CONTRIBUTING.md` sends people there: a pull request against `main` would +put the two forges out of step, so contributors need a branch that tracks current development. For +`contrib` the unforced push is the guard rather than a limitation — it is refused exactly when +`contrib` holds external merges nobody has carried into `develop` yet. Carry them and the next +develop push fast-forwards. Never force it. + +**External contributions** arrive on `contrib`. Merge the pull request there, fetch `contrib` into +a branch on the development forge, then open a pull request from it into `develop` and merge that. +The next develop push mirrors back and fast-forwards, because `develop` now contains everything +`contrib` had. Merge rather than rebase: rewriting a contributor's SHAs gains nothing and leaves +`contrib` holding commits `develop` does not have, which is exactly the state that makes the +mirror push refuse. **Tags are not mirrored.** These packages publish to JSR, where a version can never be replaced or removed, so promoting a tag has to stay a deliberate act rather than a side effect of promoting a diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md new file mode 100644 index 0000000..48dee4b --- /dev/null +++ b/CODE_OF_CONDUCT.md @@ -0,0 +1,89 @@ + +# Contributor Covenant Code of Conduct + +## Our Pledge + +We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, caste, color, religion, or sexual identity and orientation. + +We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community. + +## Our Standards + +Examples of behavior that contributes to a positive environment for our community include: + +* Demonstrating empathy and kindness toward other people +* Being respectful of differing opinions, viewpoints, and experiences +* Giving and gracefully accepting constructive feedback +* Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience +* Focusing on what is best not just for us as individuals, but for the overall community + +Examples of unacceptable behavior include: + +* The use of sexualized language or imagery, and sexual attention or advances of any kind +* Trolling, insulting or derogatory comments, and personal or political attacks +* Public or private harassment +* Publishing others' private information, such as a physical or email address, without their explicit permission +* Other conduct which could reasonably be considered inappropriate in a professional setting + +## Enforcement Responsibilities + +Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful. + +Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate. + +## Scope + +This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. + +## Enforcement + +Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at **compliance@expressive-tea.io**. All complaints will be reviewed and investigated promptly and fairly. + +All community leaders are obligated to respect the privacy and security of the reporter of any incident. + +If you would rather write to a named person than to an address, the project lead reads +diego.resendez@expressive-tea.io. Reports about a maintainer, including the project lead, +should go to compliance@expressive-tea.io, which is not maintained by the project team. + +## Enforcement Guidelines + +Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct: + +### 1. Correction + +**Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community. + +**Consequence**: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested. + +### 2. Warning + +**Community Impact**: A violation through a single incident or series of actions. + +**Consequence**: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban. + +### 3. Temporary Ban + +**Community Impact**: A serious violation of community standards, including sustained inappropriate behavior. + +**Consequence**: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban. + +### 4. Permanent Ban + +**Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals. + +**Consequence**: A permanent ban from any sort of public interaction within the community. + +## Attribution + +This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.1, available at [https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1]. + +Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement ladder][Mozilla CoC]. + +For answers to common questions about this code of conduct, see the FAQ at [https://www.contributor-covenant.org/faq][FAQ]. Translations are available at [https://www.contributor-covenant.org/translations][translations]. + +[homepage]: https://www.contributor-covenant.org +[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html +[Mozilla CoC]: https://github.com/mozilla/diversity +[FAQ]: https://www.contributor-covenant.org/faq +[translations]: https://www.contributor-covenant.org/translations + diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..8195005 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,136 @@ +# Contributing to green-tea plugins + +Thanks for your interest. These are the official plugins for [green-tea](https://github.com/Expressive-Tea/green-tea), and they are open source — but nobody pushes directly. Everything lands through a reviewed pull request with a **DCO sign-off**. + +## Where to send your changes + +Development happens on a private Gitea instance. The GitHub repository is a downstream mirror: it receives `main`, and `develop` under the name `contrib`. + +**Open your pull request against `contrib`. Not `main`.** `main` is a mirror of what has been promoted, and merging into it puts the two forges out of step and breaks the next promotion. A maintainer reviews on `contrib` and carries your commits upstream with your authorship and your sign-off intact. Because `contrib` follows `develop`, you are working against current code rather than the last promotion. + +### Worked example + +```bash +# fork Expressive-Tea/green-tea-plugins on GitHub, then +git clone git@github.com:/green-tea-plugins.git +cd green-tea-plugins +git remote add upstream https://github.com/Expressive-Tea/green-tea-plugins.git +git fetch upstream + +# branch from contrib, not from main +git checkout -b fix/sweep-interval upstream/contrib + +# ... make the change, add a test ... + +git commit -s -m "fix(rate-limit): clear the sweep timer on close" +git push origin fix/sweep-interval +``` + +`contrib` moves whenever development does. If your branch has been open a while, rebase onto the current `contrib` before pushing again. + +## Developer Certificate of Origin (DCO) + +We use the [Developer Certificate of Origin](./DCO) instead of a CLA. It is a per-commit affirmation that you have the right to submit your work under this project's license. No copyright assignment, no paperwork. + +**Every commit must be signed off:** + +```bash +git commit -s -m "feat(metrics): count upgrades separately" +``` + +That appends `Signed-off-by: Your Name `, and the name and email must match your real `git config`. Commits without it are rejected by CI. + +Forgot on a range you already wrote? + +```bash +git rebase --signoff +``` + +Or on the commit you just made: `git commit --amend -s`, then `git push --force-with-lease`. + +## Local setup + +Node 22 or newer, which is what every package's `engines` requires and what CI runs. + +```bash +npm install +``` + +That points `core.hooksPath` at `.githooks/`, which installs a pre-commit gate: it formats and lint-fixes your staged sources, then refuses the commit if `lint` or `complexity:check` fails. It exists so CI tells you nothing you could not have heard locally. Confirm it took: + +```bash +git config core.hooksPath # should print .githooks +``` + +If it prints nothing, run `git config core.hooksPath .githooks` yourself. + +**There is no build step.** These packages publish to JSR, which transpiles the TypeScript and generates the declarations, so what you edit in `src/` is what ships. `deno publish --dry-run` is the closest thing to a build, and CI runs it. + +## Before you open a pull request + +Run what CI runs: + +```bash +npm run lint +npm run format:check +npm run typecheck +npm run complexity:check +npm test # Node: every package's contract tests plus the workspace checks +npm run test:deno # packages whose engines declare deno +npm run test:bun # packages whose engines declare bun +npm run test:edge # packages whose engines declare workerd +deno publish --dry-run # the actual publish path, including the slow-types check +``` + +You are not expected to install every runtime to fix a typo. You are expected to run the one your change touches, and to say in the pull request which ones you ran. + +## What a plugin has to do + +The full list is in [`AGENTS.md`](./AGENTS.md), and `test/workspace.test.ts` enforces most of it so you will hear about a miss before a reviewer has to mention it. The parts that catch people out: + +- **A plugin imports core as types only.** `import type { Plugin } from '@green-tea/core'` — never a value import. A type import leaves nothing behind when it compiles, which is what keeps a plugin from dragging a second copy of the framework into someone's application. +- **Runtimes are declared twice and the two must agree:** as `engines` keys, and as the Runtimes table in the package README, which lists all four with a reason beside every one that is not supported. Nobody should have to open an issue to find out where a plugin runs. +- **Errors carry the `Symbol.for('green-tea.http-error')` brand** rather than extending `HttpError`. A lint rule and the workspace test enforce it. +- **A breaking change goes under `### Breaking`**, first in that package's CHANGELOG. +- **Relative imports carry the `.ts` extension.** Deno and JSR require it. + +## Commits + +Follow [Conventional Commits](https://www.conventionalcommits.org/), scoped to the package where that helps: `fix(jwt):`, `feat(metrics):`, `docs:`. Focus the message on the *why*. Do not add AI co-authoring attribution. + +## Working with AI assistance + +Use one if it helps. There is no permission to ask for and nothing to declare. + +What we do ask is that you read what it hands you before it becomes a pull request. Every line that lands here is reviewed by a person, by hand, and usually that person is one person. A diff its own author has not read moves that work onto them, and turns review into proofreading — which is the thing review is worst at. + +So go through the diff the way you would go through a stranger's, because that is what it is. If you cannot say why a line is there, it is not ready to send. + +**What assistants tend to get wrong in this repository in particular:** + +- They turn `import type` into a value import, which is the one thing a plugin must never do to core. +- They add a build. There isn't one, and `package.json` deliberately carries no `main`, `exports` or `files`. +- They write for Node and assume the rest follows. `npm test` does not cover Deno, Bun or workerd. +- They update `engines` without the README table, or the table without `engines`. + +**Where you are unsure, say so** — not as a disclosure, as a pointer. "I am not confident about the Deno path here" tells a reviewer where to spend their attention, and that is worth more than a pull request that merely looks clean. + +None of this changes the sign-off. `Signed-off-by` says you have the right to submit the work under this project's license, and that stays true however the text was produced. + +If your assistant reads repository instructions, [`AGENTS.md`](./AGENTS.md) has the conventions. + +## Proposing a new plugin + +Open an issue before writing it. The useful question is not whether the code is good — it is whether the thing belongs in the official set at all, and that is cheaper to answer in a paragraph than in a pull request you have already written. + +A plugin that depends on a service, a vendor or a protocol we cannot test is usually better as your own package. Nothing stops you publishing `@you/green-tea-whatever` to JSR or npm, and that is a first-class outcome rather than a consolation. + +## Reporting issues + +Open an issue with a minimal reproduction: which plugin and version, the runtime and version, and the smallest app that shows the problem. + +**Except for security.** If what you found is exploitable, do not open an issue — an issue is world-readable the moment you press the button. See [`SECURITY.md`](./SECURITY.md). + +## Code of conduct + +By taking part here you agree to the [Code of Conduct](./CODE_OF_CONDUCT.md), which is the Contributor Covenant 2.1. Reports go to compliance@expressive-tea.io. diff --git a/DCO b/DCO new file mode 100644 index 0000000..8201f99 --- /dev/null +++ b/DCO @@ -0,0 +1,37 @@ +Developer Certificate of Origin +Version 1.1 + +Copyright (C) 2004, 2006 The Linux Foundation and its contributors. +1 Letterman Drive +Suite D4700 +San Francisco, CA, 94129 + +Everyone is permitted to copy and distribute verbatim copies of this +license document, but changing it is not allowed. + + +Developer's Certificate of Origin 1.1 + +By making a contribution to this project, I certify that: + +(a) The contribution was created in whole or in part by me and I + have the right to submit it under the open source license + indicated in the file; or + +(b) The contribution is based upon previous work that, to the best + of my knowledge, is covered under an appropriate open source + license and I have the right under that license to submit that + work with modifications, whether created in whole or in part + by me, under the same open source license (unless I am + permitted to submit under a different license), as indicated + in the file; or + +(c) The contribution was provided directly to me by some other + person who certified (a), (b) or (c) and I have not modified + it. + +(d) I understand and agree that this project and the contribution + are public and that a record of the contribution (including all + personal information I submit with it, including my sign-off) is + maintained indefinitely and may be redistributed consistent with + this project or the open source license(s) involved. diff --git a/SECURITY.md b/SECURITY.md new file mode 100644 index 0000000..5fc3d33 --- /dev/null +++ b/SECURITY.md @@ -0,0 +1,47 @@ +# Security Policy + +## Reporting a vulnerability + +Email **security@expressive-tea.io**. Please do not open a public issue for something exploitable — an issue is world-readable from the moment you press the button, and that is the one thing a security report cannot be. + +Include whatever you have: which plugin, the version, the runtime, and the smallest app that shows it. A route and a request is usually enough. If you have a working exploit, send it; if you only have a suspicion, send that instead of sitting on it. + +You can also report privately through GitHub's [security advisory form](https://github.com/Expressive-Tea/green-tea-plugins/security/advisories/new), which reaches the same people. + +## What happens next + +Acknowledgement within **5 working days**. A verdict on whether we agree it is a vulnerability within **15**. If we agree, you get the fix timeline and a heads-up before the advisory goes public. If we don't, you get the reasoning rather than silence. + +Those numbers are deliberately slower than the 24 to 48 hours you will see quoted elsewhere. That figure describes vendors and coordinators — organizations with someone on rotation. This project is one person. A number that only holds in a good week is worse than an honest one. + +Which is why there is an escape hatch, and you should use it. **If you have no acknowledgement after 10 working days**, write directly to diego.resendez@expressive-tea.io. If that is also met with silence, consider yourself released from any embargo and disclose as you see fit. You will not have done anything wrong: a project that goes quiet on a security report has spent whatever claim it had on your patience. + +## Disclosure window + +We ask for **90 days** from your report before public disclosure, or until the fix ships, whichever comes first. If the fix is out in a week, so is the advisory. + +If a vulnerability is being actively exploited, the window is however long it takes us to ship, and we will say so rather than hold you to 90 days while users are being attacked. + +We publish a GitHub advisory for anything that affects a released version, and credit you by the name you ask for. Say so if you would rather not be named. + +There is no bug bounty and no money, which we would rather state here than leave you to find out after the work. + +## Supported versions + +Nothing has been released yet. When the first versions ship, only the most recent of each package receives fixes, and this section gets the real table. + +## Scope + +Each package is its own scope, and a report should name which one. + +**In scope** — anything in a package's `src/` that ships: + +- `@green-tea/jwt` — key loading, signature verification, claim validation, and anything that could make a bad token verify or a good one fail open. +- `@green-tea/rate-limit` — anything that lets a caller exceed a configured limit, or that lets one caller's traffic count against another's. +- `@green-tea/metrics` — anything that puts request data into the metrics output that should not be there, since that endpoint is often less protected than the app around it. + +**Out of scope:** the test suites, dev-only tooling, and anything that requires an attacker to already control your application code. A misconfiguration is not a vulnerability — a plugin that does what you told it to, where what you told it was unsafe, belongs in an issue or the documentation rather than here. If you are unsure which one you have, send it and let us decide. + +**Vulnerabilities in green-tea itself** go to the [core repository](https://github.com/Expressive-Tea/green-tea/security/advisories/new) instead. Same address, same people, but the advisory needs to live where the fix does. + +Advisories in a dependency — `jose`, for instance — are worth telling us about, and we handle them as ordinary dependency updates rather than as vulnerabilities in these packages. If the advisory is exploitable *through* the way a plugin uses that dependency, that is a real report and we want it. -- 2.54.1 From 57c4707bc536171644f4488182322bd6f8331ec9 Mon Sep 17 00:00:00 2001 From: Diego Resendez Date: Wed, 23 Sep 2026 11:58:48 -0500 Subject: [PATCH 24/24] ci: run on both forges, and watch contrib MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Adding `contrib` to the mirror without adding it here was a hole, not a gap. A pull request against a branch a workflow does not list triggers **nothing** — not a reduced set of checks, none — so an external contributor would have seen no signal at all, and neither would whoever merged their work. The branch and its CI had to land together; the previous commit shipped only half of that. So `contrib` joins `develop` and `main` in both trigger lists, and the three `github.server_url != 'https://github.com'` guards are gone. Their reason went with Verdaccio: the packages used to build against a core that existed only on an internal registry a public runner cannot reach, and they resolve `@green-tea/core` from npmjs.org now. Guarding CI to one forge while inviting contributions to the other cannot both be true. The dco job keeps `github.event_name == 'pull_request'`, matching core, so it reports on pull requests and costs nothing on push. Verified the way a public runner would: the workflow names no secrets and no internal hosts, and a fresh clone runs `npm ci`, lint, typecheck, the Node suite and `deno publish --dry-run` with nothing configured. Signed-off-by: Diego Resendez --- .github/workflows/ci.yml | 23 ++++++++++++++--------- AGENTS.md | 18 +++++++++++++----- 2 files changed, 27 insertions(+), 14 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ecc4ca3..67fce8f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,20 +1,27 @@ name: CI -# Runs on the development forge only, through the `if:` guards below. The reason they were added is -# gone — the packages used to build against a core that existed on an internal registry, and now -# resolve it from npmjs.org like anyone else — so lifting them is unblocked. Until that happens, the -# public mirror carries this file with every job skipped. +# Runs on BOTH forges. It used to be guarded to the development forge, because the packages built +# against a core that existed only on an internal registry a public runner cannot reach. They now +# resolve `@green-tea/core` from npmjs.org, so that reason is gone and the guards are too. +# +# `contrib` is in both lists because external pull requests target it (CONTRIBUTING.md). Leaving it +# out is not a smaller version of running CI — it is none: a pull request against a branch that is +# not listed triggers nothing at all, so a contributor gets no signal and neither does whoever +# merges it. +# +# GitHub does not run workflows on pull requests from forks until a maintainer approves them, so a +# contributor's first push may sit with no checks for a while. That is not a rejection. on: push: - branches: [develop, main] + branches: [develop, main, contrib] pull_request: - branches: [develop, main] + branches: [develop, main, contrib] jobs: # Its own job so a missing sign-off reports on its own and costs nothing on push. Checks that the # trailer is present, not that it matches the author. dco: - if: github.event_name == 'pull_request' && github.server_url != 'https://github.com' + if: github.event_name == 'pull_request' runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -39,7 +46,6 @@ jobs: # Node 22 is the lowest `engines.node` any package declares (spec 2.5: build on the floor). build: - if: github.server_url != 'https://github.com' runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -59,7 +65,6 @@ jobs: # A fixed matrix, not `fromJSON`: Gitea Actions support for a dynamic matrix was not verified. Each # entry runs only the packages whose engines name that runtime (scripts/run-runtime.mjs). runtimes: - if: github.server_url != 'https://github.com' runs-on: ubuntu-latest strategy: fail-fast: false diff --git a/AGENTS.md b/AGENTS.md index 155e334..2844fe5 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -54,11 +54,19 @@ mirror push refuse. removed, so promoting a tag has to stay a deliberate act rather than a side effect of promoting a branch. -CI itself still runs on the development forge only, through the `if:` guards in `ci.yml` — but the -reason is gone: the packages used to build against a core that existed on an internal registry -alone, and since 2026-09-22 they resolve `@green-tea/core` from npmjs.org like anyone else. -Removing those guards is unblocked rather than done, and until it happens the mirrored repository -carries workflows that skip every job. +**CI runs on both forges, and `contrib` is one of the branches it watches.** It used to be guarded +to the development forge, because the packages built against a core that existed only on an +internal registry a public runner cannot reach; they resolve `@green-tea/core` from npmjs.org now, +so the guards are gone. + +Adding `contrib` to the mirror without adding it to `ci.yml` would have been worse than not having +the branch. A pull request against a branch a workflow does not list triggers **nothing** — not a +reduced set of checks, none — so a contributor would see no signal and neither would whoever merged +it. The two changes belong together. + +GitHub does not run workflows on pull requests from forks until a maintainer approves them, so a +contributor's first push may sit with no checks for a while. That is not a rejection, and it is +worth saying so rather than letting silence read as one. ## The plugin convention -- 2.54.1