├── .gitignore ├── .prettierrc ├── README.md ├── migrations └── 0001_create-table.sql ├── package-lock.json ├── package.json ├── requests ├── check_query_clothing ├── check_query_construction ├── check_query_technology ├── create_classification ├── delete_classifications └── list_classifications ├── src └── worker.ts ├── tsconfig.json └── wrangler.toml /.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | lerna-debug.log* 8 | .pnpm-debug.log* 9 | 10 | # Diagnostic reports (https://nodejs.org/api/report.html) 11 | report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json 12 | 13 | # Runtime data 14 | pids 15 | *.pid 16 | *.seed 17 | *.pid.lock 18 | 19 | # Directory for instrumented libs generated by jscoverage/JSCover 20 | lib-cov 21 | 22 | # Coverage directory used by tools like istanbul 23 | coverage 24 | *.lcov 25 | 26 | # nyc test coverage 27 | .nyc_output 28 | 29 | # Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) 30 | .grunt 31 | 32 | # Bower dependency directory (https://bower.io/) 33 | bower_components 34 | 35 | # node-waf configuration 36 | .lock-wscript 37 | 38 | # Compiled binary addons (https://nodejs.org/api/addons.html) 39 | build/Release 40 | 41 | # Dependency directories 42 | node_modules/ 43 | jspm_packages/ 44 | 45 | # Snowpack dependency directory (https://snowpack.dev/) 46 | web_modules/ 47 | 48 | # TypeScript cache 49 | *.tsbuildinfo 50 | 51 | # Optional npm cache directory 52 | .npm 53 | 54 | # Optional eslint cache 55 | .eslintcache 56 | 57 | # Optional stylelint cache 58 | .stylelintcache 59 | 60 | # Microbundle cache 61 | .rpt2_cache/ 62 | .rts2_cache_cjs/ 63 | .rts2_cache_es/ 64 | .rts2_cache_umd/ 65 | 66 | # Optional REPL history 67 | .node_repl_history 68 | 69 | # Output of 'npm pack' 70 | *.tgz 71 | 72 | # Yarn Integrity file 73 | .yarn-integrity 74 | 75 | # dotenv environment variable files 76 | .env 77 | .env.development.local 78 | .env.test.local 79 | .env.production.local 80 | .env.local 81 | 82 | # parcel-bundler cache (https://parceljs.org/) 83 | .cache 84 | .parcel-cache 85 | 86 | # Next.js build output 87 | .next 88 | out 89 | 90 | # Nuxt.js build / generate output 91 | .nuxt 92 | dist 93 | 94 | # Gatsby files 95 | .cache/ 96 | # Comment in the public line in if your project uses Gatsby and not Next.js 97 | # https://nextjs.org/blog/next-9-1#public-directory-support 98 | # public 99 | 100 | # vuepress build output 101 | .vuepress/dist 102 | 103 | # vuepress v2.x temp and cache directory 104 | .temp 105 | .cache 106 | 107 | # Docusaurus cache and generated files 108 | .docusaurus 109 | 110 | # Serverless directories 111 | .serverless/ 112 | 113 | # FuseBox cache 114 | .fusebox/ 115 | 116 | # DynamoDB Local files 117 | .dynamodb/ 118 | 119 | # TernJS port file 120 | .tern-port 121 | 122 | # Stores VSCode versions used for testing VSCode extensions 123 | .vscode-test 124 | 125 | # yarn v2 126 | .yarn/cache 127 | .yarn/unplugged 128 | .yarn/build-state.yml 129 | .yarn/install-state.gz 130 | .pnp.* 131 | 132 | # cloudflare 133 | .wrangler 134 | -------------------------------------------------------------------------------- /.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "printWidth": 140, 3 | "singleQuote": true, 4 | "semi": true 5 | } 6 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # classification-api 2 | 3 | ![WIP](https://pub-b4e6ed9616414ace9314e84c0a5cd3e8.r2.dev/workinprogress.jpg) 4 | 5 | Simple classification API built using Cloudflare Workers, D1, and Vectorize. 6 | 7 | This API uses the `bge-base-en` model from Hugging Face to classify text. You can store a series of "buckets" and then classify any given text against those buckets. All data is stored in a D1 database and a corresponding Vectorize index that is automatically synced. 8 | 9 | ## Usage 10 | 11 | ### Create classifications 12 | 13 | ```bash 14 | curl -X POST -H "Content-Type: application/json" -d '{"text": "This is a test"}' https://api.example.com/classifications 15 | ``` 16 | 17 | ### Classify 18 | 19 | ```bash 20 | curl -X POST -H "Content-Type: application/json" -d '{"query": "This is a test"}' https://api.example.com/classify 21 | ``` 22 | 23 | ### Delete classifications 24 | 25 | ```bash 26 | curl -X DELETE -H "Content-Type: application/json" -d '{"id": 1}' https://api.example.com/classifications/1 27 | ``` 28 | 29 | ## Deploy 30 | 31 | ```bash 32 | wrangler publish 33 | ``` 34 | -------------------------------------------------------------------------------- /migrations/0001_create-table.sql: -------------------------------------------------------------------------------- 1 | -- Migration number: 0001 2024-06-28T15:18:52.499Z 2 | DROP TABLE IF EXISTS classifications; 3 | CREATE TABLE classifications (id INTEGER PRIMARY KEY, text TEXT UNIQUE); -------------------------------------------------------------------------------- /package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "classification-api", 3 | "version": "0.0.0", 4 | "lockfileVersion": 3, 5 | "requires": true, 6 | "packages": { 7 | "": { 8 | "name": "classification-api", 9 | "version": "0.0.0", 10 | "dependencies": { 11 | "hono": "^4.4.9" 12 | }, 13 | "devDependencies": { 14 | "@cloudflare/workers-types": "^4.20230419.0", 15 | "typescript": "^5.0.4", 16 | "wrangler": "^3.0.0" 17 | } 18 | }, 19 | "node_modules/@cloudflare/kv-asset-handler": { 20 | "version": "0.3.4", 21 | "resolved": "https://registry.npmjs.org/@cloudflare/kv-asset-handler/-/kv-asset-handler-0.3.4.tgz", 22 | "integrity": "sha512-YLPHc8yASwjNkmcDMQMY35yiWjoKAKnhUbPRszBRS0YgH+IXtsMp61j+yTcnCE3oO2DgP0U3iejLC8FTtKDC8Q==", 23 | "dev": true, 24 | "license": "MIT OR Apache-2.0", 25 | "dependencies": { 26 | "mime": "^3.0.0" 27 | }, 28 | "engines": { 29 | "node": ">=16.13" 30 | } 31 | }, 32 | "node_modules/@cloudflare/workerd-darwin-64": { 33 | "version": "1.20240620.1", 34 | "resolved": "https://registry.npmjs.org/@cloudflare/workerd-darwin-64/-/workerd-darwin-64-1.20240620.1.tgz", 35 | "integrity": "sha512-YWeS2aE8jAzDefuus/3GmZcFGu3Ef94uCAoxsQuaEXNsiGM9NeAhPpKC1BJAlcv168U/Q1J+6hckcGtipf6ZcQ==", 36 | "cpu": [ 37 | "x64" 38 | ], 39 | "dev": true, 40 | "license": "Apache-2.0", 41 | "optional": true, 42 | "os": [ 43 | "darwin" 44 | ], 45 | "engines": { 46 | "node": ">=16" 47 | } 48 | }, 49 | "node_modules/@cloudflare/workerd-darwin-arm64": { 50 | "version": "1.20240620.1", 51 | "resolved": "https://registry.npmjs.org/@cloudflare/workerd-darwin-arm64/-/workerd-darwin-arm64-1.20240620.1.tgz", 52 | "integrity": "sha512-3rdND+EHpmCrwYX6hvxIBSBJ0f40tRNxond1Vfw7GiR1MJVi3gragiBx75UDFHCxfRw3J0GZ1qVlkRce2/Xbsg==", 53 | "cpu": [ 54 | "arm64" 55 | ], 56 | "dev": true, 57 | "license": "Apache-2.0", 58 | "optional": true, 59 | "os": [ 60 | "darwin" 61 | ], 62 | "engines": { 63 | "node": ">=16" 64 | } 65 | }, 66 | "node_modules/@cloudflare/workerd-linux-64": { 67 | "version": "1.20240620.1", 68 | "resolved": "https://registry.npmjs.org/@cloudflare/workerd-linux-64/-/workerd-linux-64-1.20240620.1.tgz", 69 | "integrity": "sha512-tURcTrXGeSbYqeM5ISVcofY20StKbVIcdxjJvNYNZ+qmSV9Fvn+zr7rRE+q64pEloVZfhsEPAlUCnFso5VV4XQ==", 70 | "cpu": [ 71 | "x64" 72 | ], 73 | "dev": true, 74 | "license": "Apache-2.0", 75 | "optional": true, 76 | "os": [ 77 | "linux" 78 | ], 79 | "engines": { 80 | "node": ">=16" 81 | } 82 | }, 83 | "node_modules/@cloudflare/workerd-linux-arm64": { 84 | "version": "1.20240620.1", 85 | "resolved": "https://registry.npmjs.org/@cloudflare/workerd-linux-arm64/-/workerd-linux-arm64-1.20240620.1.tgz", 86 | "integrity": "sha512-TThvkwNxaZFKhHZnNjOGqIYCOk05DDWgO+wYMuXg15ymN/KZPnCicRAkuyqiM+R1Fgc4kwe/pehjP8pbmcf6sg==", 87 | "cpu": [ 88 | "arm64" 89 | ], 90 | "dev": true, 91 | "license": "Apache-2.0", 92 | "optional": true, 93 | "os": [ 94 | "linux" 95 | ], 96 | "engines": { 97 | "node": ">=16" 98 | } 99 | }, 100 | "node_modules/@cloudflare/workerd-windows-64": { 101 | "version": "1.20240620.1", 102 | "resolved": "https://registry.npmjs.org/@cloudflare/workerd-windows-64/-/workerd-windows-64-1.20240620.1.tgz", 103 | "integrity": "sha512-Y/BA9Yj0r7Al1HK3nDHcfISgFllw6NR3XMMPChev57vrVT9C9D4erBL3sUBfofHU+2U9L+ShLsl6obBpe3vvUw==", 104 | "cpu": [ 105 | "x64" 106 | ], 107 | "dev": true, 108 | "license": "Apache-2.0", 109 | "optional": true, 110 | "os": [ 111 | "win32" 112 | ], 113 | "engines": { 114 | "node": ">=16" 115 | } 116 | }, 117 | "node_modules/@cloudflare/workers-types": { 118 | "version": "4.20240620.0", 119 | "resolved": "https://registry.npmjs.org/@cloudflare/workers-types/-/workers-types-4.20240620.0.tgz", 120 | "integrity": "sha512-CQD8YS6evRob7LChvIX3gE3zYo0KVgaLDOu1SwNP1BVIS2Sa0b+FC8S1e1hhrNN8/E4chYlVN+FDAgA4KRDUEQ==", 121 | "dev": true, 122 | "license": "MIT OR Apache-2.0" 123 | }, 124 | "node_modules/@cspotcode/source-map-support": { 125 | "version": "0.8.1", 126 | "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz", 127 | "integrity": "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==", 128 | "dev": true, 129 | "license": "MIT", 130 | "dependencies": { 131 | "@jridgewell/trace-mapping": "0.3.9" 132 | }, 133 | "engines": { 134 | "node": ">=12" 135 | } 136 | }, 137 | "node_modules/@esbuild-plugins/node-globals-polyfill": { 138 | "version": "0.2.3", 139 | "resolved": "https://registry.npmjs.org/@esbuild-plugins/node-globals-polyfill/-/node-globals-polyfill-0.2.3.tgz", 140 | "integrity": "sha512-r3MIryXDeXDOZh7ih1l/yE9ZLORCd5e8vWg02azWRGj5SPTuoh69A2AIyn0Z31V/kHBfZ4HgWJ+OK3GTTwLmnw==", 141 | "dev": true, 142 | "license": "ISC", 143 | "peerDependencies": { 144 | "esbuild": "*" 145 | } 146 | }, 147 | "node_modules/@esbuild-plugins/node-modules-polyfill": { 148 | "version": "0.2.2", 149 | "resolved": "https://registry.npmjs.org/@esbuild-plugins/node-modules-polyfill/-/node-modules-polyfill-0.2.2.tgz", 150 | "integrity": "sha512-LXV7QsWJxRuMYvKbiznh+U1ilIop3g2TeKRzUxOG5X3YITc8JyyTa90BmLwqqv0YnX4v32CSlG+vsziZp9dMvA==", 151 | "dev": true, 152 | "license": "ISC", 153 | "dependencies": { 154 | "escape-string-regexp": "^4.0.0", 155 | "rollup-plugin-node-polyfills": "^0.2.1" 156 | }, 157 | "peerDependencies": { 158 | "esbuild": "*" 159 | } 160 | }, 161 | "node_modules/@esbuild/android-arm": { 162 | "version": "0.17.19", 163 | "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.17.19.tgz", 164 | "integrity": "sha512-rIKddzqhmav7MSmoFCmDIb6e2W57geRsM94gV2l38fzhXMwq7hZoClug9USI2pFRGL06f4IOPHHpFNOkWieR8A==", 165 | "cpu": [ 166 | "arm" 167 | ], 168 | "dev": true, 169 | "license": "MIT", 170 | "optional": true, 171 | "os": [ 172 | "android" 173 | ], 174 | "engines": { 175 | "node": ">=12" 176 | } 177 | }, 178 | "node_modules/@esbuild/android-arm64": { 179 | "version": "0.17.19", 180 | "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.17.19.tgz", 181 | "integrity": "sha512-KBMWvEZooR7+kzY0BtbTQn0OAYY7CsiydT63pVEaPtVYF0hXbUaOyZog37DKxK7NF3XacBJOpYT4adIJh+avxA==", 182 | "cpu": [ 183 | "arm64" 184 | ], 185 | "dev": true, 186 | "license": "MIT", 187 | "optional": true, 188 | "os": [ 189 | "android" 190 | ], 191 | "engines": { 192 | "node": ">=12" 193 | } 194 | }, 195 | "node_modules/@esbuild/android-x64": { 196 | "version": "0.17.19", 197 | "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.17.19.tgz", 198 | "integrity": "sha512-uUTTc4xGNDT7YSArp/zbtmbhO0uEEK9/ETW29Wk1thYUJBz3IVnvgEiEwEa9IeLyvnpKrWK64Utw2bgUmDveww==", 199 | "cpu": [ 200 | "x64" 201 | ], 202 | "dev": true, 203 | "license": "MIT", 204 | "optional": true, 205 | "os": [ 206 | "android" 207 | ], 208 | "engines": { 209 | "node": ">=12" 210 | } 211 | }, 212 | "node_modules/@esbuild/darwin-arm64": { 213 | "version": "0.17.19", 214 | "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.17.19.tgz", 215 | "integrity": "sha512-80wEoCfF/hFKM6WE1FyBHc9SfUblloAWx6FJkFWTWiCoht9Mc0ARGEM47e67W9rI09YoUxJL68WHfDRYEAvOhg==", 216 | "cpu": [ 217 | "arm64" 218 | ], 219 | "dev": true, 220 | "license": "MIT", 221 | "optional": true, 222 | "os": [ 223 | "darwin" 224 | ], 225 | "engines": { 226 | "node": ">=12" 227 | } 228 | }, 229 | "node_modules/@esbuild/darwin-x64": { 230 | "version": "0.17.19", 231 | "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.17.19.tgz", 232 | "integrity": "sha512-IJM4JJsLhRYr9xdtLytPLSH9k/oxR3boaUIYiHkAawtwNOXKE8KoU8tMvryogdcT8AU+Bflmh81Xn6Q0vTZbQw==", 233 | "cpu": [ 234 | "x64" 235 | ], 236 | "dev": true, 237 | "license": "MIT", 238 | "optional": true, 239 | "os": [ 240 | "darwin" 241 | ], 242 | "engines": { 243 | "node": ">=12" 244 | } 245 | }, 246 | "node_modules/@esbuild/freebsd-arm64": { 247 | "version": "0.17.19", 248 | "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.17.19.tgz", 249 | "integrity": "sha512-pBwbc7DufluUeGdjSU5Si+P3SoMF5DQ/F/UmTSb8HXO80ZEAJmrykPyzo1IfNbAoaqw48YRpv8shwd1NoI0jcQ==", 250 | "cpu": [ 251 | "arm64" 252 | ], 253 | "dev": true, 254 | "license": "MIT", 255 | "optional": true, 256 | "os": [ 257 | "freebsd" 258 | ], 259 | "engines": { 260 | "node": ">=12" 261 | } 262 | }, 263 | "node_modules/@esbuild/freebsd-x64": { 264 | "version": "0.17.19", 265 | "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.17.19.tgz", 266 | "integrity": "sha512-4lu+n8Wk0XlajEhbEffdy2xy53dpR06SlzvhGByyg36qJw6Kpfk7cp45DR/62aPH9mtJRmIyrXAS5UWBrJT6TQ==", 267 | "cpu": [ 268 | "x64" 269 | ], 270 | "dev": true, 271 | "license": "MIT", 272 | "optional": true, 273 | "os": [ 274 | "freebsd" 275 | ], 276 | "engines": { 277 | "node": ">=12" 278 | } 279 | }, 280 | "node_modules/@esbuild/linux-arm": { 281 | "version": "0.17.19", 282 | "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.17.19.tgz", 283 | "integrity": "sha512-cdmT3KxjlOQ/gZ2cjfrQOtmhG4HJs6hhvm3mWSRDPtZ/lP5oe8FWceS10JaSJC13GBd4eH/haHnqf7hhGNLerA==", 284 | "cpu": [ 285 | "arm" 286 | ], 287 | "dev": true, 288 | "license": "MIT", 289 | "optional": true, 290 | "os": [ 291 | "linux" 292 | ], 293 | "engines": { 294 | "node": ">=12" 295 | } 296 | }, 297 | "node_modules/@esbuild/linux-arm64": { 298 | "version": "0.17.19", 299 | "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.17.19.tgz", 300 | "integrity": "sha512-ct1Tg3WGwd3P+oZYqic+YZF4snNl2bsnMKRkb3ozHmnM0dGWuxcPTTntAF6bOP0Sp4x0PjSF+4uHQ1xvxfRKqg==", 301 | "cpu": [ 302 | "arm64" 303 | ], 304 | "dev": true, 305 | "license": "MIT", 306 | "optional": true, 307 | "os": [ 308 | "linux" 309 | ], 310 | "engines": { 311 | "node": ">=12" 312 | } 313 | }, 314 | "node_modules/@esbuild/linux-ia32": { 315 | "version": "0.17.19", 316 | "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.17.19.tgz", 317 | "integrity": "sha512-w4IRhSy1VbsNxHRQpeGCHEmibqdTUx61Vc38APcsRbuVgK0OPEnQ0YD39Brymn96mOx48Y2laBQGqgZ0j9w6SQ==", 318 | "cpu": [ 319 | "ia32" 320 | ], 321 | "dev": true, 322 | "license": "MIT", 323 | "optional": true, 324 | "os": [ 325 | "linux" 326 | ], 327 | "engines": { 328 | "node": ">=12" 329 | } 330 | }, 331 | "node_modules/@esbuild/linux-loong64": { 332 | "version": "0.17.19", 333 | "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.17.19.tgz", 334 | "integrity": "sha512-2iAngUbBPMq439a+z//gE+9WBldoMp1s5GWsUSgqHLzLJ9WoZLZhpwWuym0u0u/4XmZ3gpHmzV84PonE+9IIdQ==", 335 | "cpu": [ 336 | "loong64" 337 | ], 338 | "dev": true, 339 | "license": "MIT", 340 | "optional": true, 341 | "os": [ 342 | "linux" 343 | ], 344 | "engines": { 345 | "node": ">=12" 346 | } 347 | }, 348 | "node_modules/@esbuild/linux-mips64el": { 349 | "version": "0.17.19", 350 | "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.17.19.tgz", 351 | "integrity": "sha512-LKJltc4LVdMKHsrFe4MGNPp0hqDFA1Wpt3jE1gEyM3nKUvOiO//9PheZZHfYRfYl6AwdTH4aTcXSqBerX0ml4A==", 352 | "cpu": [ 353 | "mips64el" 354 | ], 355 | "dev": true, 356 | "license": "MIT", 357 | "optional": true, 358 | "os": [ 359 | "linux" 360 | ], 361 | "engines": { 362 | "node": ">=12" 363 | } 364 | }, 365 | "node_modules/@esbuild/linux-ppc64": { 366 | "version": "0.17.19", 367 | "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.17.19.tgz", 368 | "integrity": "sha512-/c/DGybs95WXNS8y3Ti/ytqETiW7EU44MEKuCAcpPto3YjQbyK3IQVKfF6nbghD7EcLUGl0NbiL5Rt5DMhn5tg==", 369 | "cpu": [ 370 | "ppc64" 371 | ], 372 | "dev": true, 373 | "license": "MIT", 374 | "optional": true, 375 | "os": [ 376 | "linux" 377 | ], 378 | "engines": { 379 | "node": ">=12" 380 | } 381 | }, 382 | "node_modules/@esbuild/linux-riscv64": { 383 | "version": "0.17.19", 384 | "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.17.19.tgz", 385 | "integrity": "sha512-FC3nUAWhvFoutlhAkgHf8f5HwFWUL6bYdvLc/TTuxKlvLi3+pPzdZiFKSWz/PF30TB1K19SuCxDTI5KcqASJqA==", 386 | "cpu": [ 387 | "riscv64" 388 | ], 389 | "dev": true, 390 | "license": "MIT", 391 | "optional": true, 392 | "os": [ 393 | "linux" 394 | ], 395 | "engines": { 396 | "node": ">=12" 397 | } 398 | }, 399 | "node_modules/@esbuild/linux-s390x": { 400 | "version": "0.17.19", 401 | "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.17.19.tgz", 402 | "integrity": "sha512-IbFsFbxMWLuKEbH+7sTkKzL6NJmG2vRyy6K7JJo55w+8xDk7RElYn6xvXtDW8HCfoKBFK69f3pgBJSUSQPr+4Q==", 403 | "cpu": [ 404 | "s390x" 405 | ], 406 | "dev": true, 407 | "license": "MIT", 408 | "optional": true, 409 | "os": [ 410 | "linux" 411 | ], 412 | "engines": { 413 | "node": ">=12" 414 | } 415 | }, 416 | "node_modules/@esbuild/linux-x64": { 417 | "version": "0.17.19", 418 | "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.17.19.tgz", 419 | "integrity": "sha512-68ngA9lg2H6zkZcyp22tsVt38mlhWde8l3eJLWkyLrp4HwMUr3c1s/M2t7+kHIhvMjglIBrFpncX1SzMckomGw==", 420 | "cpu": [ 421 | "x64" 422 | ], 423 | "dev": true, 424 | "license": "MIT", 425 | "optional": true, 426 | "os": [ 427 | "linux" 428 | ], 429 | "engines": { 430 | "node": ">=12" 431 | } 432 | }, 433 | "node_modules/@esbuild/netbsd-x64": { 434 | "version": "0.17.19", 435 | "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.17.19.tgz", 436 | "integrity": "sha512-CwFq42rXCR8TYIjIfpXCbRX0rp1jo6cPIUPSaWwzbVI4aOfX96OXY8M6KNmtPcg7QjYeDmN+DD0Wp3LaBOLf4Q==", 437 | "cpu": [ 438 | "x64" 439 | ], 440 | "dev": true, 441 | "license": "MIT", 442 | "optional": true, 443 | "os": [ 444 | "netbsd" 445 | ], 446 | "engines": { 447 | "node": ">=12" 448 | } 449 | }, 450 | "node_modules/@esbuild/openbsd-x64": { 451 | "version": "0.17.19", 452 | "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.17.19.tgz", 453 | "integrity": "sha512-cnq5brJYrSZ2CF6c35eCmviIN3k3RczmHz8eYaVlNasVqsNY+JKohZU5MKmaOI+KkllCdzOKKdPs762VCPC20g==", 454 | "cpu": [ 455 | "x64" 456 | ], 457 | "dev": true, 458 | "license": "MIT", 459 | "optional": true, 460 | "os": [ 461 | "openbsd" 462 | ], 463 | "engines": { 464 | "node": ">=12" 465 | } 466 | }, 467 | "node_modules/@esbuild/sunos-x64": { 468 | "version": "0.17.19", 469 | "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.17.19.tgz", 470 | "integrity": "sha512-vCRT7yP3zX+bKWFeP/zdS6SqdWB8OIpaRq/mbXQxTGHnIxspRtigpkUcDMlSCOejlHowLqII7K2JKevwyRP2rg==", 471 | "cpu": [ 472 | "x64" 473 | ], 474 | "dev": true, 475 | "license": "MIT", 476 | "optional": true, 477 | "os": [ 478 | "sunos" 479 | ], 480 | "engines": { 481 | "node": ">=12" 482 | } 483 | }, 484 | "node_modules/@esbuild/win32-arm64": { 485 | "version": "0.17.19", 486 | "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.17.19.tgz", 487 | "integrity": "sha512-yYx+8jwowUstVdorcMdNlzklLYhPxjniHWFKgRqH7IFlUEa0Umu3KuYplf1HUZZ422e3NU9F4LGb+4O0Kdcaag==", 488 | "cpu": [ 489 | "arm64" 490 | ], 491 | "dev": true, 492 | "license": "MIT", 493 | "optional": true, 494 | "os": [ 495 | "win32" 496 | ], 497 | "engines": { 498 | "node": ">=12" 499 | } 500 | }, 501 | "node_modules/@esbuild/win32-ia32": { 502 | "version": "0.17.19", 503 | "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.17.19.tgz", 504 | "integrity": "sha512-eggDKanJszUtCdlVs0RB+h35wNlb5v4TWEkq4vZcmVt5u/HiDZrTXe2bWFQUez3RgNHwx/x4sk5++4NSSicKkw==", 505 | "cpu": [ 506 | "ia32" 507 | ], 508 | "dev": true, 509 | "license": "MIT", 510 | "optional": true, 511 | "os": [ 512 | "win32" 513 | ], 514 | "engines": { 515 | "node": ">=12" 516 | } 517 | }, 518 | "node_modules/@esbuild/win32-x64": { 519 | "version": "0.17.19", 520 | "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.17.19.tgz", 521 | "integrity": "sha512-lAhycmKnVOuRYNtRtatQR1LPQf2oYCkRGkSFnseDAKPl8lu5SOsK/e1sXe5a0Pc5kHIHe6P2I/ilntNv2xf3cA==", 522 | "cpu": [ 523 | "x64" 524 | ], 525 | "dev": true, 526 | "license": "MIT", 527 | "optional": true, 528 | "os": [ 529 | "win32" 530 | ], 531 | "engines": { 532 | "node": ">=12" 533 | } 534 | }, 535 | "node_modules/@fastify/busboy": { 536 | "version": "2.1.1", 537 | "resolved": "https://registry.npmjs.org/@fastify/busboy/-/busboy-2.1.1.tgz", 538 | "integrity": "sha512-vBZP4NlzfOlerQTnba4aqZoMhE/a9HY7HRqoOPaETQcSQuWEIyZMHGfVu6w9wGtGK5fED5qRs2DteVCjOH60sA==", 539 | "dev": true, 540 | "license": "MIT", 541 | "engines": { 542 | "node": ">=14" 543 | } 544 | }, 545 | "node_modules/@jridgewell/resolve-uri": { 546 | "version": "3.1.2", 547 | "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", 548 | "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", 549 | "dev": true, 550 | "license": "MIT", 551 | "engines": { 552 | "node": ">=6.0.0" 553 | } 554 | }, 555 | "node_modules/@jridgewell/sourcemap-codec": { 556 | "version": "1.4.15", 557 | "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", 558 | "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==", 559 | "dev": true, 560 | "license": "MIT" 561 | }, 562 | "node_modules/@jridgewell/trace-mapping": { 563 | "version": "0.3.9", 564 | "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz", 565 | "integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==", 566 | "dev": true, 567 | "license": "MIT", 568 | "dependencies": { 569 | "@jridgewell/resolve-uri": "^3.0.3", 570 | "@jridgewell/sourcemap-codec": "^1.4.10" 571 | } 572 | }, 573 | "node_modules/@types/node": { 574 | "version": "20.14.9", 575 | "resolved": "https://registry.npmjs.org/@types/node/-/node-20.14.9.tgz", 576 | "integrity": "sha512-06OCtnTXtWOZBJlRApleWndH4JsRVs1pDCc8dLSQp+7PpUpX3ePdHyeNSFTeSe7FtKyQkrlPvHwJOW3SLd8Oyg==", 577 | "dev": true, 578 | "license": "MIT", 579 | "dependencies": { 580 | "undici-types": "~5.26.4" 581 | } 582 | }, 583 | "node_modules/@types/node-forge": { 584 | "version": "1.3.11", 585 | "resolved": "https://registry.npmjs.org/@types/node-forge/-/node-forge-1.3.11.tgz", 586 | "integrity": "sha512-FQx220y22OKNTqaByeBGqHWYz4cl94tpcxeFdvBo3wjG6XPBuZ0BNgNZRV5J5TFmmcsJ4IzsLkmGRiQbnYsBEQ==", 587 | "dev": true, 588 | "license": "MIT", 589 | "dependencies": { 590 | "@types/node": "*" 591 | } 592 | }, 593 | "node_modules/acorn": { 594 | "version": "8.12.0", 595 | "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.12.0.tgz", 596 | "integrity": "sha512-RTvkC4w+KNXrM39/lWCUaG0IbRkWdCv7W/IOW9oU6SawyxulvkQy5HQPVTKxEjczcUvapcrw3cFx/60VN/NRNw==", 597 | "dev": true, 598 | "license": "MIT", 599 | "bin": { 600 | "acorn": "bin/acorn" 601 | }, 602 | "engines": { 603 | "node": ">=0.4.0" 604 | } 605 | }, 606 | "node_modules/acorn-walk": { 607 | "version": "8.3.3", 608 | "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.3.tgz", 609 | "integrity": "sha512-MxXdReSRhGO7VlFe1bRG/oI7/mdLV9B9JJT0N8vZOhF7gFRR5l3M8W9G8JxmKV+JC5mGqJ0QvqfSOLsCPa4nUw==", 610 | "dev": true, 611 | "license": "MIT", 612 | "dependencies": { 613 | "acorn": "^8.11.0" 614 | }, 615 | "engines": { 616 | "node": ">=0.4.0" 617 | } 618 | }, 619 | "node_modules/anymatch": { 620 | "version": "3.1.3", 621 | "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", 622 | "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", 623 | "dev": true, 624 | "license": "ISC", 625 | "dependencies": { 626 | "normalize-path": "^3.0.0", 627 | "picomatch": "^2.0.4" 628 | }, 629 | "engines": { 630 | "node": ">= 8" 631 | } 632 | }, 633 | "node_modules/as-table": { 634 | "version": "1.0.55", 635 | "resolved": "https://registry.npmjs.org/as-table/-/as-table-1.0.55.tgz", 636 | "integrity": "sha512-xvsWESUJn0JN421Xb9MQw6AsMHRCUknCe0Wjlxvjud80mU4E6hQf1A6NzQKcYNmYw62MfzEtXc+badstZP3JpQ==", 637 | "dev": true, 638 | "license": "MIT", 639 | "dependencies": { 640 | "printable-characters": "^1.0.42" 641 | } 642 | }, 643 | "node_modules/binary-extensions": { 644 | "version": "2.3.0", 645 | "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz", 646 | "integrity": "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==", 647 | "dev": true, 648 | "license": "MIT", 649 | "engines": { 650 | "node": ">=8" 651 | }, 652 | "funding": { 653 | "url": "https://github.com/sponsors/sindresorhus" 654 | } 655 | }, 656 | "node_modules/blake3-wasm": { 657 | "version": "2.1.5", 658 | "resolved": "https://registry.npmjs.org/blake3-wasm/-/blake3-wasm-2.1.5.tgz", 659 | "integrity": "sha512-F1+K8EbfOZE49dtoPtmxUQrpXaBIl3ICvasLh+nJta0xkz+9kF/7uet9fLnwKqhDrmj6g+6K3Tw9yQPUg2ka5g==", 660 | "dev": true, 661 | "license": "MIT" 662 | }, 663 | "node_modules/braces": { 664 | "version": "3.0.3", 665 | "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", 666 | "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", 667 | "dev": true, 668 | "license": "MIT", 669 | "dependencies": { 670 | "fill-range": "^7.1.1" 671 | }, 672 | "engines": { 673 | "node": ">=8" 674 | } 675 | }, 676 | "node_modules/capnp-ts": { 677 | "version": "0.7.0", 678 | "resolved": "https://registry.npmjs.org/capnp-ts/-/capnp-ts-0.7.0.tgz", 679 | "integrity": "sha512-XKxXAC3HVPv7r674zP0VC3RTXz+/JKhfyw94ljvF80yynK6VkTnqE3jMuN8b3dUVmmc43TjyxjW4KTsmB3c86g==", 680 | "dev": true, 681 | "license": "MIT", 682 | "dependencies": { 683 | "debug": "^4.3.1", 684 | "tslib": "^2.2.0" 685 | } 686 | }, 687 | "node_modules/chokidar": { 688 | "version": "3.6.0", 689 | "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz", 690 | "integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==", 691 | "dev": true, 692 | "license": "MIT", 693 | "dependencies": { 694 | "anymatch": "~3.1.2", 695 | "braces": "~3.0.2", 696 | "glob-parent": "~5.1.2", 697 | "is-binary-path": "~2.1.0", 698 | "is-glob": "~4.0.1", 699 | "normalize-path": "~3.0.0", 700 | "readdirp": "~3.6.0" 701 | }, 702 | "engines": { 703 | "node": ">= 8.10.0" 704 | }, 705 | "funding": { 706 | "url": "https://paulmillr.com/funding/" 707 | }, 708 | "optionalDependencies": { 709 | "fsevents": "~2.3.2" 710 | } 711 | }, 712 | "node_modules/consola": { 713 | "version": "3.2.3", 714 | "resolved": "https://registry.npmjs.org/consola/-/consola-3.2.3.tgz", 715 | "integrity": "sha512-I5qxpzLv+sJhTVEoLYNcTW+bThDCPsit0vLNKShZx6rLtpilNpmmeTPaeqJb9ZE9dV3DGaeby6Vuhrw38WjeyQ==", 716 | "dev": true, 717 | "license": "MIT", 718 | "engines": { 719 | "node": "^14.18.0 || >=16.10.0" 720 | } 721 | }, 722 | "node_modules/cookie": { 723 | "version": "0.5.0", 724 | "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.5.0.tgz", 725 | "integrity": "sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==", 726 | "dev": true, 727 | "license": "MIT", 728 | "engines": { 729 | "node": ">= 0.6" 730 | } 731 | }, 732 | "node_modules/data-uri-to-buffer": { 733 | "version": "2.0.2", 734 | "resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-2.0.2.tgz", 735 | "integrity": "sha512-ND9qDTLc6diwj+Xe5cdAgVTbLVdXbtxTJRXRhli8Mowuaan+0EJOtdqJ0QCHNSSPyoXGx9HX2/VMnKeC34AChA==", 736 | "dev": true, 737 | "license": "MIT" 738 | }, 739 | "node_modules/date-fns": { 740 | "version": "3.6.0", 741 | "resolved": "https://registry.npmjs.org/date-fns/-/date-fns-3.6.0.tgz", 742 | "integrity": "sha512-fRHTG8g/Gif+kSh50gaGEdToemgfj74aRX3swtiouboip5JDLAyDE9F11nHMIcvOaXeOC6D7SpNhi7uFyB7Uww==", 743 | "dev": true, 744 | "license": "MIT", 745 | "funding": { 746 | "type": "github", 747 | "url": "https://github.com/sponsors/kossnocorp" 748 | } 749 | }, 750 | "node_modules/debug": { 751 | "version": "4.3.5", 752 | "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.5.tgz", 753 | "integrity": "sha512-pt0bNEmneDIvdL1Xsd9oDQ/wrQRkXDT4AUWlNZNPKvW5x/jyO9VFXkJUP07vQ2upmw5PlaITaPKc31jK13V+jg==", 754 | "dev": true, 755 | "license": "MIT", 756 | "dependencies": { 757 | "ms": "2.1.2" 758 | }, 759 | "engines": { 760 | "node": ">=6.0" 761 | }, 762 | "peerDependenciesMeta": { 763 | "supports-color": { 764 | "optional": true 765 | } 766 | } 767 | }, 768 | "node_modules/defu": { 769 | "version": "6.1.4", 770 | "resolved": "https://registry.npmjs.org/defu/-/defu-6.1.4.tgz", 771 | "integrity": "sha512-mEQCMmwJu317oSz8CwdIOdwf3xMif1ttiM8LTufzc3g6kR+9Pe236twL8j3IYT1F7GfRgGcW6MWxzZjLIkuHIg==", 772 | "dev": true, 773 | "license": "MIT" 774 | }, 775 | "node_modules/esbuild": { 776 | "version": "0.17.19", 777 | "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.17.19.tgz", 778 | "integrity": "sha512-XQ0jAPFkK/u3LcVRcvVHQcTIqD6E2H1fvZMA5dQPSOWb3suUbWbfbRf94pjc0bNzRYLfIrDRQXr7X+LHIm5oHw==", 779 | "dev": true, 780 | "hasInstallScript": true, 781 | "license": "MIT", 782 | "bin": { 783 | "esbuild": "bin/esbuild" 784 | }, 785 | "engines": { 786 | "node": ">=12" 787 | }, 788 | "optionalDependencies": { 789 | "@esbuild/android-arm": "0.17.19", 790 | "@esbuild/android-arm64": "0.17.19", 791 | "@esbuild/android-x64": "0.17.19", 792 | "@esbuild/darwin-arm64": "0.17.19", 793 | "@esbuild/darwin-x64": "0.17.19", 794 | "@esbuild/freebsd-arm64": "0.17.19", 795 | "@esbuild/freebsd-x64": "0.17.19", 796 | "@esbuild/linux-arm": "0.17.19", 797 | "@esbuild/linux-arm64": "0.17.19", 798 | "@esbuild/linux-ia32": "0.17.19", 799 | "@esbuild/linux-loong64": "0.17.19", 800 | "@esbuild/linux-mips64el": "0.17.19", 801 | "@esbuild/linux-ppc64": "0.17.19", 802 | "@esbuild/linux-riscv64": "0.17.19", 803 | "@esbuild/linux-s390x": "0.17.19", 804 | "@esbuild/linux-x64": "0.17.19", 805 | "@esbuild/netbsd-x64": "0.17.19", 806 | "@esbuild/openbsd-x64": "0.17.19", 807 | "@esbuild/sunos-x64": "0.17.19", 808 | "@esbuild/win32-arm64": "0.17.19", 809 | "@esbuild/win32-ia32": "0.17.19", 810 | "@esbuild/win32-x64": "0.17.19" 811 | } 812 | }, 813 | "node_modules/escape-string-regexp": { 814 | "version": "4.0.0", 815 | "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", 816 | "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", 817 | "dev": true, 818 | "license": "MIT", 819 | "engines": { 820 | "node": ">=10" 821 | }, 822 | "funding": { 823 | "url": "https://github.com/sponsors/sindresorhus" 824 | } 825 | }, 826 | "node_modules/estree-walker": { 827 | "version": "0.6.1", 828 | "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-0.6.1.tgz", 829 | "integrity": "sha512-SqmZANLWS0mnatqbSfRP5g8OXZC12Fgg1IwNtLsyHDzJizORW4khDfjPqJZsemPWBB2uqykUah5YpQ6epsqC/w==", 830 | "dev": true, 831 | "license": "MIT" 832 | }, 833 | "node_modules/exit-hook": { 834 | "version": "2.2.1", 835 | "resolved": "https://registry.npmjs.org/exit-hook/-/exit-hook-2.2.1.tgz", 836 | "integrity": "sha512-eNTPlAD67BmP31LDINZ3U7HSF8l57TxOY2PmBJ1shpCvpnxBF93mWCE8YHBnXs8qiUZJc9WDcWIeC3a2HIAMfw==", 837 | "dev": true, 838 | "license": "MIT", 839 | "engines": { 840 | "node": ">=6" 841 | }, 842 | "funding": { 843 | "url": "https://github.com/sponsors/sindresorhus" 844 | } 845 | }, 846 | "node_modules/fill-range": { 847 | "version": "7.1.1", 848 | "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", 849 | "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", 850 | "dev": true, 851 | "license": "MIT", 852 | "dependencies": { 853 | "to-regex-range": "^5.0.1" 854 | }, 855 | "engines": { 856 | "node": ">=8" 857 | } 858 | }, 859 | "node_modules/fsevents": { 860 | "version": "2.3.3", 861 | "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", 862 | "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", 863 | "dev": true, 864 | "hasInstallScript": true, 865 | "license": "MIT", 866 | "optional": true, 867 | "os": [ 868 | "darwin" 869 | ], 870 | "engines": { 871 | "node": "^8.16.0 || ^10.6.0 || >=11.0.0" 872 | } 873 | }, 874 | "node_modules/function-bind": { 875 | "version": "1.1.2", 876 | "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", 877 | "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", 878 | "dev": true, 879 | "license": "MIT", 880 | "funding": { 881 | "url": "https://github.com/sponsors/ljharb" 882 | } 883 | }, 884 | "node_modules/get-source": { 885 | "version": "2.0.12", 886 | "resolved": "https://registry.npmjs.org/get-source/-/get-source-2.0.12.tgz", 887 | "integrity": "sha512-X5+4+iD+HoSeEED+uwrQ07BOQr0kEDFMVqqpBuI+RaZBpBpHCuXxo70bjar6f0b0u/DQJsJ7ssurpP0V60Az+w==", 888 | "dev": true, 889 | "license": "Unlicense", 890 | "dependencies": { 891 | "data-uri-to-buffer": "^2.0.0", 892 | "source-map": "^0.6.1" 893 | } 894 | }, 895 | "node_modules/glob-parent": { 896 | "version": "5.1.2", 897 | "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", 898 | "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", 899 | "dev": true, 900 | "license": "ISC", 901 | "dependencies": { 902 | "is-glob": "^4.0.1" 903 | }, 904 | "engines": { 905 | "node": ">= 6" 906 | } 907 | }, 908 | "node_modules/glob-to-regexp": { 909 | "version": "0.4.1", 910 | "resolved": "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz", 911 | "integrity": "sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==", 912 | "dev": true, 913 | "license": "BSD-2-Clause" 914 | }, 915 | "node_modules/hasown": { 916 | "version": "2.0.2", 917 | "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", 918 | "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", 919 | "dev": true, 920 | "license": "MIT", 921 | "dependencies": { 922 | "function-bind": "^1.1.2" 923 | }, 924 | "engines": { 925 | "node": ">= 0.4" 926 | } 927 | }, 928 | "node_modules/hono": { 929 | "version": "4.4.9", 930 | "resolved": "https://registry.npmjs.org/hono/-/hono-4.4.9.tgz", 931 | "integrity": "sha512-VW1hnYipHL/XsnSYiCTLJ+Z7iisZYWwSOiKXm9RBV2NKPxNqjfaHqeMFiDl11fK893ofmErvRpX20+FTNjZIjA==", 932 | "license": "MIT", 933 | "engines": { 934 | "node": ">=16.0.0" 935 | } 936 | }, 937 | "node_modules/is-binary-path": { 938 | "version": "2.1.0", 939 | "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", 940 | "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", 941 | "dev": true, 942 | "license": "MIT", 943 | "dependencies": { 944 | "binary-extensions": "^2.0.0" 945 | }, 946 | "engines": { 947 | "node": ">=8" 948 | } 949 | }, 950 | "node_modules/is-core-module": { 951 | "version": "2.14.0", 952 | "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.14.0.tgz", 953 | "integrity": "sha512-a5dFJih5ZLYlRtDc0dZWP7RiKr6xIKzmn/oAYCDvdLThadVgyJwlaoQPmRtMSpz+rk0OGAgIu+TcM9HUF0fk1A==", 954 | "dev": true, 955 | "license": "MIT", 956 | "dependencies": { 957 | "hasown": "^2.0.2" 958 | }, 959 | "engines": { 960 | "node": ">= 0.4" 961 | }, 962 | "funding": { 963 | "url": "https://github.com/sponsors/ljharb" 964 | } 965 | }, 966 | "node_modules/is-extglob": { 967 | "version": "2.1.1", 968 | "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", 969 | "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", 970 | "dev": true, 971 | "license": "MIT", 972 | "engines": { 973 | "node": ">=0.10.0" 974 | } 975 | }, 976 | "node_modules/is-glob": { 977 | "version": "4.0.3", 978 | "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", 979 | "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", 980 | "dev": true, 981 | "license": "MIT", 982 | "dependencies": { 983 | "is-extglob": "^2.1.1" 984 | }, 985 | "engines": { 986 | "node": ">=0.10.0" 987 | } 988 | }, 989 | "node_modules/is-number": { 990 | "version": "7.0.0", 991 | "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", 992 | "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", 993 | "dev": true, 994 | "license": "MIT", 995 | "engines": { 996 | "node": ">=0.12.0" 997 | } 998 | }, 999 | "node_modules/magic-string": { 1000 | "version": "0.25.9", 1001 | "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.25.9.tgz", 1002 | "integrity": "sha512-RmF0AsMzgt25qzqqLc1+MbHmhdx0ojF2Fvs4XnOqz2ZOBXzzkEwc/dJQZCYHAn7v1jbVOjAZfK8msRn4BxO4VQ==", 1003 | "dev": true, 1004 | "license": "MIT", 1005 | "dependencies": { 1006 | "sourcemap-codec": "^1.4.8" 1007 | } 1008 | }, 1009 | "node_modules/mime": { 1010 | "version": "3.0.0", 1011 | "resolved": "https://registry.npmjs.org/mime/-/mime-3.0.0.tgz", 1012 | "integrity": "sha512-jSCU7/VB1loIWBZe14aEYHU/+1UMEHoaO7qxCOVJOw9GgH72VAWppxNcjU+x9a2k3GSIBXNKxXQFqRvvZ7vr3A==", 1013 | "dev": true, 1014 | "license": "MIT", 1015 | "bin": { 1016 | "mime": "cli.js" 1017 | }, 1018 | "engines": { 1019 | "node": ">=10.0.0" 1020 | } 1021 | }, 1022 | "node_modules/miniflare": { 1023 | "version": "3.20240620.0", 1024 | "resolved": "https://registry.npmjs.org/miniflare/-/miniflare-3.20240620.0.tgz", 1025 | "integrity": "sha512-NBMzqUE2mMlh/hIdt6U5MP+aFhEjKDq3l8CAajXAQa1WkndJdciWvzB2mfLETwoVFhMl/lphaVzyEN2AgwJpbQ==", 1026 | "dev": true, 1027 | "license": "MIT", 1028 | "dependencies": { 1029 | "@cspotcode/source-map-support": "0.8.1", 1030 | "acorn": "^8.8.0", 1031 | "acorn-walk": "^8.2.0", 1032 | "capnp-ts": "^0.7.0", 1033 | "exit-hook": "^2.2.1", 1034 | "glob-to-regexp": "^0.4.1", 1035 | "stoppable": "^1.1.0", 1036 | "undici": "^5.28.4", 1037 | "workerd": "1.20240620.1", 1038 | "ws": "^8.14.2", 1039 | "youch": "^3.2.2", 1040 | "zod": "^3.22.3" 1041 | }, 1042 | "bin": { 1043 | "miniflare": "bootstrap.js" 1044 | }, 1045 | "engines": { 1046 | "node": ">=16.13" 1047 | } 1048 | }, 1049 | "node_modules/ms": { 1050 | "version": "2.1.2", 1051 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", 1052 | "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", 1053 | "dev": true, 1054 | "license": "MIT" 1055 | }, 1056 | "node_modules/mustache": { 1057 | "version": "4.2.0", 1058 | "resolved": "https://registry.npmjs.org/mustache/-/mustache-4.2.0.tgz", 1059 | "integrity": "sha512-71ippSywq5Yb7/tVYyGbkBggbU8H3u5Rz56fH60jGFgr8uHwxs+aSKeqmluIVzM0m0kB7xQjKS6qPfd0b2ZoqQ==", 1060 | "dev": true, 1061 | "license": "MIT", 1062 | "bin": { 1063 | "mustache": "bin/mustache" 1064 | } 1065 | }, 1066 | "node_modules/nanoid": { 1067 | "version": "3.3.7", 1068 | "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.7.tgz", 1069 | "integrity": "sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==", 1070 | "dev": true, 1071 | "funding": [ 1072 | { 1073 | "type": "github", 1074 | "url": "https://github.com/sponsors/ai" 1075 | } 1076 | ], 1077 | "license": "MIT", 1078 | "bin": { 1079 | "nanoid": "bin/nanoid.cjs" 1080 | }, 1081 | "engines": { 1082 | "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" 1083 | } 1084 | }, 1085 | "node_modules/node-fetch-native": { 1086 | "version": "1.6.4", 1087 | "resolved": "https://registry.npmjs.org/node-fetch-native/-/node-fetch-native-1.6.4.tgz", 1088 | "integrity": "sha512-IhOigYzAKHd244OC0JIMIUrjzctirCmPkaIfhDeGcEETWof5zKYUW7e7MYvChGWh/4CJeXEgsRyGzuF334rOOQ==", 1089 | "dev": true, 1090 | "license": "MIT" 1091 | }, 1092 | "node_modules/node-forge": { 1093 | "version": "1.3.1", 1094 | "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-1.3.1.tgz", 1095 | "integrity": "sha512-dPEtOeMvF9VMcYV/1Wb8CPoVAXtp6MKMlcbAt4ddqmGqUJ6fQZFXkNZNkNlfevtNkGtaSoXf/vNNNSvgrdXwtA==", 1096 | "dev": true, 1097 | "license": "(BSD-3-Clause OR GPL-2.0)", 1098 | "engines": { 1099 | "node": ">= 6.13.0" 1100 | } 1101 | }, 1102 | "node_modules/normalize-path": { 1103 | "version": "3.0.0", 1104 | "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", 1105 | "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", 1106 | "dev": true, 1107 | "license": "MIT", 1108 | "engines": { 1109 | "node": ">=0.10.0" 1110 | } 1111 | }, 1112 | "node_modules/path-parse": { 1113 | "version": "1.0.7", 1114 | "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", 1115 | "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", 1116 | "dev": true, 1117 | "license": "MIT" 1118 | }, 1119 | "node_modules/path-to-regexp": { 1120 | "version": "6.2.2", 1121 | "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-6.2.2.tgz", 1122 | "integrity": "sha512-GQX3SSMokngb36+whdpRXE+3f9V8UzyAorlYvOGx87ufGHehNTn5lCxrKtLyZ4Yl/wEKnNnr98ZzOwwDZV5ogw==", 1123 | "dev": true, 1124 | "license": "MIT" 1125 | }, 1126 | "node_modules/pathe": { 1127 | "version": "1.1.2", 1128 | "resolved": "https://registry.npmjs.org/pathe/-/pathe-1.1.2.tgz", 1129 | "integrity": "sha512-whLdWMYL2TwI08hn8/ZqAbrVemu0LNaNNJZX73O6qaIdCTfXutsLhMkjdENX0qhsQ9uIimo4/aQOmXkoon2nDQ==", 1130 | "dev": true, 1131 | "license": "MIT" 1132 | }, 1133 | "node_modules/picomatch": { 1134 | "version": "2.3.1", 1135 | "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", 1136 | "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", 1137 | "dev": true, 1138 | "license": "MIT", 1139 | "engines": { 1140 | "node": ">=8.6" 1141 | }, 1142 | "funding": { 1143 | "url": "https://github.com/sponsors/jonschlinkert" 1144 | } 1145 | }, 1146 | "node_modules/printable-characters": { 1147 | "version": "1.0.42", 1148 | "resolved": "https://registry.npmjs.org/printable-characters/-/printable-characters-1.0.42.tgz", 1149 | "integrity": "sha512-dKp+C4iXWK4vVYZmYSd0KBH5F/h1HoZRsbJ82AVKRO3PEo8L4lBS/vLwhVtpwwuYcoIsVY+1JYKR268yn480uQ==", 1150 | "dev": true, 1151 | "license": "Unlicense" 1152 | }, 1153 | "node_modules/readdirp": { 1154 | "version": "3.6.0", 1155 | "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", 1156 | "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", 1157 | "dev": true, 1158 | "license": "MIT", 1159 | "dependencies": { 1160 | "picomatch": "^2.2.1" 1161 | }, 1162 | "engines": { 1163 | "node": ">=8.10.0" 1164 | } 1165 | }, 1166 | "node_modules/resolve": { 1167 | "version": "1.22.8", 1168 | "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.8.tgz", 1169 | "integrity": "sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==", 1170 | "dev": true, 1171 | "license": "MIT", 1172 | "dependencies": { 1173 | "is-core-module": "^2.13.0", 1174 | "path-parse": "^1.0.7", 1175 | "supports-preserve-symlinks-flag": "^1.0.0" 1176 | }, 1177 | "bin": { 1178 | "resolve": "bin/resolve" 1179 | }, 1180 | "funding": { 1181 | "url": "https://github.com/sponsors/ljharb" 1182 | } 1183 | }, 1184 | "node_modules/resolve.exports": { 1185 | "version": "2.0.2", 1186 | "resolved": "https://registry.npmjs.org/resolve.exports/-/resolve.exports-2.0.2.tgz", 1187 | "integrity": "sha512-X2UW6Nw3n/aMgDVy+0rSqgHlv39WZAlZrXCdnbyEiKm17DSqHX4MmQMaST3FbeWR5FTuRcUwYAziZajji0Y7mg==", 1188 | "dev": true, 1189 | "license": "MIT", 1190 | "engines": { 1191 | "node": ">=10" 1192 | } 1193 | }, 1194 | "node_modules/rollup-plugin-inject": { 1195 | "version": "3.0.2", 1196 | "resolved": "https://registry.npmjs.org/rollup-plugin-inject/-/rollup-plugin-inject-3.0.2.tgz", 1197 | "integrity": "sha512-ptg9PQwzs3orn4jkgXJ74bfs5vYz1NCZlSQMBUA0wKcGp5i5pA1AO3fOUEte8enhGUC+iapTCzEWw2jEFFUO/w==", 1198 | "deprecated": "This package has been deprecated and is no longer maintained. Please use @rollup/plugin-inject.", 1199 | "dev": true, 1200 | "license": "MIT", 1201 | "dependencies": { 1202 | "estree-walker": "^0.6.1", 1203 | "magic-string": "^0.25.3", 1204 | "rollup-pluginutils": "^2.8.1" 1205 | } 1206 | }, 1207 | "node_modules/rollup-plugin-node-polyfills": { 1208 | "version": "0.2.1", 1209 | "resolved": "https://registry.npmjs.org/rollup-plugin-node-polyfills/-/rollup-plugin-node-polyfills-0.2.1.tgz", 1210 | "integrity": "sha512-4kCrKPTJ6sK4/gLL/U5QzVT8cxJcofO0OU74tnB19F40cmuAKSzH5/siithxlofFEjwvw1YAhPmbvGNA6jEroA==", 1211 | "dev": true, 1212 | "license": "MIT", 1213 | "dependencies": { 1214 | "rollup-plugin-inject": "^3.0.0" 1215 | } 1216 | }, 1217 | "node_modules/rollup-pluginutils": { 1218 | "version": "2.8.2", 1219 | "resolved": "https://registry.npmjs.org/rollup-pluginutils/-/rollup-pluginutils-2.8.2.tgz", 1220 | "integrity": "sha512-EEp9NhnUkwY8aif6bxgovPHMoMoNr2FulJziTndpt5H9RdwC47GSGuII9XxpSdzVGM0GWrNPHV6ie1LTNJPaLQ==", 1221 | "dev": true, 1222 | "license": "MIT", 1223 | "dependencies": { 1224 | "estree-walker": "^0.6.1" 1225 | } 1226 | }, 1227 | "node_modules/selfsigned": { 1228 | "version": "2.4.1", 1229 | "resolved": "https://registry.npmjs.org/selfsigned/-/selfsigned-2.4.1.tgz", 1230 | "integrity": "sha512-th5B4L2U+eGLq1TVh7zNRGBapioSORUeymIydxgFpwww9d2qyKvtuPU2jJuHvYAwwqi2Y596QBL3eEqcPEYL8Q==", 1231 | "dev": true, 1232 | "license": "MIT", 1233 | "dependencies": { 1234 | "@types/node-forge": "^1.3.0", 1235 | "node-forge": "^1" 1236 | }, 1237 | "engines": { 1238 | "node": ">=10" 1239 | } 1240 | }, 1241 | "node_modules/source-map": { 1242 | "version": "0.6.1", 1243 | "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", 1244 | "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", 1245 | "dev": true, 1246 | "license": "BSD-3-Clause", 1247 | "engines": { 1248 | "node": ">=0.10.0" 1249 | } 1250 | }, 1251 | "node_modules/sourcemap-codec": { 1252 | "version": "1.4.8", 1253 | "resolved": "https://registry.npmjs.org/sourcemap-codec/-/sourcemap-codec-1.4.8.tgz", 1254 | "integrity": "sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA==", 1255 | "deprecated": "Please use @jridgewell/sourcemap-codec instead", 1256 | "dev": true, 1257 | "license": "MIT" 1258 | }, 1259 | "node_modules/stacktracey": { 1260 | "version": "2.1.8", 1261 | "resolved": "https://registry.npmjs.org/stacktracey/-/stacktracey-2.1.8.tgz", 1262 | "integrity": "sha512-Kpij9riA+UNg7TnphqjH7/CzctQ/owJGNbFkfEeve4Z4uxT5+JapVLFXcsurIfN34gnTWZNJ/f7NMG0E8JDzTw==", 1263 | "dev": true, 1264 | "license": "Unlicense", 1265 | "dependencies": { 1266 | "as-table": "^1.0.36", 1267 | "get-source": "^2.0.12" 1268 | } 1269 | }, 1270 | "node_modules/stoppable": { 1271 | "version": "1.1.0", 1272 | "resolved": "https://registry.npmjs.org/stoppable/-/stoppable-1.1.0.tgz", 1273 | "integrity": "sha512-KXDYZ9dszj6bzvnEMRYvxgeTHU74QBFL54XKtP3nyMuJ81CFYtABZ3bAzL2EdFUaEwJOBOgENyFj3R7oTzDyyw==", 1274 | "dev": true, 1275 | "license": "MIT", 1276 | "engines": { 1277 | "node": ">=4", 1278 | "npm": ">=6" 1279 | } 1280 | }, 1281 | "node_modules/supports-preserve-symlinks-flag": { 1282 | "version": "1.0.0", 1283 | "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", 1284 | "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", 1285 | "dev": true, 1286 | "license": "MIT", 1287 | "engines": { 1288 | "node": ">= 0.4" 1289 | }, 1290 | "funding": { 1291 | "url": "https://github.com/sponsors/ljharb" 1292 | } 1293 | }, 1294 | "node_modules/to-regex-range": { 1295 | "version": "5.0.1", 1296 | "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", 1297 | "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", 1298 | "dev": true, 1299 | "license": "MIT", 1300 | "dependencies": { 1301 | "is-number": "^7.0.0" 1302 | }, 1303 | "engines": { 1304 | "node": ">=8.0" 1305 | } 1306 | }, 1307 | "node_modules/tslib": { 1308 | "version": "2.6.3", 1309 | "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.3.tgz", 1310 | "integrity": "sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==", 1311 | "dev": true, 1312 | "license": "0BSD" 1313 | }, 1314 | "node_modules/typescript": { 1315 | "version": "5.5.2", 1316 | "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.5.2.tgz", 1317 | "integrity": "sha512-NcRtPEOsPFFWjobJEtfihkLCZCXZt/os3zf8nTxjVH3RvTSxjrCamJpbExGvYOF+tFHc3pA65qpdwPbzjohhew==", 1318 | "dev": true, 1319 | "license": "Apache-2.0", 1320 | "bin": { 1321 | "tsc": "bin/tsc", 1322 | "tsserver": "bin/tsserver" 1323 | }, 1324 | "engines": { 1325 | "node": ">=14.17" 1326 | } 1327 | }, 1328 | "node_modules/ufo": { 1329 | "version": "1.5.3", 1330 | "resolved": "https://registry.npmjs.org/ufo/-/ufo-1.5.3.tgz", 1331 | "integrity": "sha512-Y7HYmWaFwPUmkoQCUIAYpKqkOf+SbVj/2fJJZ4RJMCfZp0rTGwRbzQD+HghfnhKOjL9E01okqz+ncJskGYfBNw==", 1332 | "dev": true, 1333 | "license": "MIT" 1334 | }, 1335 | "node_modules/undici": { 1336 | "version": "5.28.4", 1337 | "resolved": "https://registry.npmjs.org/undici/-/undici-5.28.4.tgz", 1338 | "integrity": "sha512-72RFADWFqKmUb2hmmvNODKL3p9hcB6Gt2DOQMis1SEBaV6a4MH8soBvzg+95CYhCKPFedut2JY9bMfrDl9D23g==", 1339 | "dev": true, 1340 | "license": "MIT", 1341 | "dependencies": { 1342 | "@fastify/busboy": "^2.0.0" 1343 | }, 1344 | "engines": { 1345 | "node": ">=14.0" 1346 | } 1347 | }, 1348 | "node_modules/undici-types": { 1349 | "version": "5.26.5", 1350 | "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", 1351 | "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==", 1352 | "dev": true, 1353 | "license": "MIT" 1354 | }, 1355 | "node_modules/unenv": { 1356 | "name": "unenv-nightly", 1357 | "version": "1.10.0-1717606461.a117952", 1358 | "resolved": "https://registry.npmjs.org/unenv-nightly/-/unenv-nightly-1.10.0-1717606461.a117952.tgz", 1359 | "integrity": "sha512-u3TfBX02WzbHTpaEfWEKwDijDSFAHcgXkayUZ+MVDrjhLFvgAJzFGTSTmwlEhwWi2exyRQey23ah9wELMM6etg==", 1360 | "dev": true, 1361 | "license": "MIT", 1362 | "dependencies": { 1363 | "consola": "^3.2.3", 1364 | "defu": "^6.1.4", 1365 | "mime": "^3.0.0", 1366 | "node-fetch-native": "^1.6.4", 1367 | "pathe": "^1.1.2", 1368 | "ufo": "^1.5.3" 1369 | } 1370 | }, 1371 | "node_modules/workerd": { 1372 | "version": "1.20240620.1", 1373 | "resolved": "https://registry.npmjs.org/workerd/-/workerd-1.20240620.1.tgz", 1374 | "integrity": "sha512-Qoq+RrFNk4pvEO+kpJVn8uJ5TRE9YJx5jX5pC5LjdKlw1XeD8EdXt5k0TbByvWunZ4qgYIcF9lnVxhcDFo203g==", 1375 | "dev": true, 1376 | "hasInstallScript": true, 1377 | "license": "Apache-2.0", 1378 | "bin": { 1379 | "workerd": "bin/workerd" 1380 | }, 1381 | "engines": { 1382 | "node": ">=16" 1383 | }, 1384 | "optionalDependencies": { 1385 | "@cloudflare/workerd-darwin-64": "1.20240620.1", 1386 | "@cloudflare/workerd-darwin-arm64": "1.20240620.1", 1387 | "@cloudflare/workerd-linux-64": "1.20240620.1", 1388 | "@cloudflare/workerd-linux-arm64": "1.20240620.1", 1389 | "@cloudflare/workerd-windows-64": "1.20240620.1" 1390 | } 1391 | }, 1392 | "node_modules/wrangler": { 1393 | "version": "3.62.0", 1394 | "resolved": "https://registry.npmjs.org/wrangler/-/wrangler-3.62.0.tgz", 1395 | "integrity": "sha512-TM1Bd8+GzxFw/JzwsC3i/Oss4LTWvIEWXXo1vZhx+7PHcsxdbnQGBBwPurHNJDSu2Pw22+2pCZiUGKexmgJksw==", 1396 | "dev": true, 1397 | "license": "MIT OR Apache-2.0", 1398 | "dependencies": { 1399 | "@cloudflare/kv-asset-handler": "0.3.4", 1400 | "@esbuild-plugins/node-globals-polyfill": "^0.2.3", 1401 | "@esbuild-plugins/node-modules-polyfill": "^0.2.2", 1402 | "blake3-wasm": "^2.1.5", 1403 | "chokidar": "^3.5.3", 1404 | "date-fns": "^3.6.0", 1405 | "esbuild": "0.17.19", 1406 | "miniflare": "3.20240620.0", 1407 | "nanoid": "^3.3.3", 1408 | "path-to-regexp": "^6.2.0", 1409 | "resolve": "^1.22.8", 1410 | "resolve.exports": "^2.0.2", 1411 | "selfsigned": "^2.0.1", 1412 | "source-map": "^0.6.1", 1413 | "unenv": "npm:unenv-nightly@1.10.0-1717606461.a117952", 1414 | "xxhash-wasm": "^1.0.1" 1415 | }, 1416 | "bin": { 1417 | "wrangler": "bin/wrangler.js", 1418 | "wrangler2": "bin/wrangler.js" 1419 | }, 1420 | "engines": { 1421 | "node": ">=16.17.0" 1422 | }, 1423 | "optionalDependencies": { 1424 | "fsevents": "~2.3.2" 1425 | }, 1426 | "peerDependencies": { 1427 | "@cloudflare/workers-types": "^4.20240620.0" 1428 | }, 1429 | "peerDependenciesMeta": { 1430 | "@cloudflare/workers-types": { 1431 | "optional": true 1432 | } 1433 | } 1434 | }, 1435 | "node_modules/ws": { 1436 | "version": "8.17.1", 1437 | "resolved": "https://registry.npmjs.org/ws/-/ws-8.17.1.tgz", 1438 | "integrity": "sha512-6XQFvXTkbfUOZOKKILFG1PDK2NDQs4azKQl26T0YS5CxqWLgXajbPZ+h4gZekJyRqFU8pvnbAbbs/3TgRPy+GQ==", 1439 | "dev": true, 1440 | "license": "MIT", 1441 | "engines": { 1442 | "node": ">=10.0.0" 1443 | }, 1444 | "peerDependencies": { 1445 | "bufferutil": "^4.0.1", 1446 | "utf-8-validate": ">=5.0.2" 1447 | }, 1448 | "peerDependenciesMeta": { 1449 | "bufferutil": { 1450 | "optional": true 1451 | }, 1452 | "utf-8-validate": { 1453 | "optional": true 1454 | } 1455 | } 1456 | }, 1457 | "node_modules/xxhash-wasm": { 1458 | "version": "1.0.2", 1459 | "resolved": "https://registry.npmjs.org/xxhash-wasm/-/xxhash-wasm-1.0.2.tgz", 1460 | "integrity": "sha512-ibF0Or+FivM9lNrg+HGJfVX8WJqgo+kCLDc4vx6xMeTce7Aj+DLttKbxxRR/gNLSAelRc1omAPlJ77N/Jem07A==", 1461 | "dev": true, 1462 | "license": "MIT" 1463 | }, 1464 | "node_modules/youch": { 1465 | "version": "3.3.3", 1466 | "resolved": "https://registry.npmjs.org/youch/-/youch-3.3.3.tgz", 1467 | "integrity": "sha512-qSFXUk3UZBLfggAW3dJKg0BMblG5biqSF8M34E06o5CSsZtH92u9Hqmj2RzGiHDi64fhe83+4tENFP2DB6t6ZA==", 1468 | "dev": true, 1469 | "license": "MIT", 1470 | "dependencies": { 1471 | "cookie": "^0.5.0", 1472 | "mustache": "^4.2.0", 1473 | "stacktracey": "^2.1.8" 1474 | } 1475 | }, 1476 | "node_modules/zod": { 1477 | "version": "3.23.8", 1478 | "resolved": "https://registry.npmjs.org/zod/-/zod-3.23.8.tgz", 1479 | "integrity": "sha512-XBx9AXhXktjUqnepgTiE5flcKIYWi/rme0Eaj+5Y0lftuGBq+jyRu/md4WnuxqgP1ubdpNCsYEYPxrzVHD8d6g==", 1480 | "dev": true, 1481 | "license": "MIT", 1482 | "funding": { 1483 | "url": "https://github.com/sponsors/colinhacks" 1484 | } 1485 | } 1486 | } 1487 | } 1488 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "classification-api", 3 | "version": "0.0.0", 4 | "private": true, 5 | "scripts": { 6 | "deploy": "wrangler publish", 7 | "start": "wrangler dev" 8 | }, 9 | "devDependencies": { 10 | "@cloudflare/workers-types": "^4.20230419.0", 11 | "typescript": "^5.0.4", 12 | "wrangler": "^3.0.0" 13 | }, 14 | "dependencies": { 15 | "hono": "^4.4.9" 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /requests/check_query_clothing: -------------------------------------------------------------------------------- 1 | API="classification-api.signalnerve.workers.dev" 2 | QUERY="san antonio spurs hat" 3 | echo "Querying '$QUERY'..." 4 | xh -b "$API/classify" query="$QUERY" 5 | -------------------------------------------------------------------------------- /requests/check_query_construction: -------------------------------------------------------------------------------- 1 | API="classification-api.signalnerve.workers.dev" 2 | QUERY="power drill" 3 | echo "Querying '$QUERY'..." 4 | xh -b "$API/classify" query="$QUERY" 5 | -------------------------------------------------------------------------------- /requests/check_query_technology: -------------------------------------------------------------------------------- 1 | API="classification-api.signalnerve.workers.dev" 2 | QUERY="mp3 player" 3 | echo "Querying '$QUERY'..." 4 | xh -b "$API/classify" query="$QUERY" 5 | -------------------------------------------------------------------------------- /requests/create_classification: -------------------------------------------------------------------------------- 1 | API="classification-api.signalnerve.workers.dev" 2 | 3 | # Create clothing classification 4 | xh -b "$API/classifications" text='clothing' 5 | 6 | # Create construction classification 7 | xh -b "$API/classifications" text='construction' 8 | 9 | # Create technology classification 10 | xh -b "$API/classifications" text='technology' 11 | 12 | # Then return them all back as a list 13 | xh -b "$API/classifications" 14 | -------------------------------------------------------------------------------- /requests/delete_classifications: -------------------------------------------------------------------------------- 1 | API="classification-api.signalnerve.workers.dev" 2 | 3 | echo "Getting classification IDs..." 4 | 5 | IDS=$(xh -b $API/classifications | jq -r '.classifications[].id') 6 | 7 | echo $IDS 8 | 9 | for ID in $IDS; do 10 | echo "\tDeleting $ID" 11 | xh -b DELETE $API/classifications/$ID 12 | done 13 | 14 | echo "Done. Getting classifications" 15 | xh -b $API/classifications 16 | -------------------------------------------------------------------------------- /requests/list_classifications: -------------------------------------------------------------------------------- 1 | API="https://classification-api.signalnerve.workers.dev" 2 | 3 | xh -b "$API/classifications" 4 | -------------------------------------------------------------------------------- /src/worker.ts: -------------------------------------------------------------------------------- 1 | import { Hono } from "hono" 2 | 3 | export type Bindings = { 4 | AI: Ai 5 | DB: D1Database 6 | VECTORIZE_INDEX: VectorizeIndex 7 | } 8 | 9 | type Classification = { 10 | id: number 11 | text: string 12 | } 13 | 14 | const textUniqError = `D1_ERROR: UNIQUE constraint failed: classifications.text` 15 | 16 | const modelName = "@cf/baai/bge-base-en-v1.5" 17 | 18 | const app = new Hono<{ Bindings: Bindings }>() 19 | 20 | app.get("/classifications", async c => { 21 | const query = "select * from classifications" 22 | const resp = await c.env.DB.prepare(query).all() 23 | const classifications = resp.results 24 | return c.json({ classifications }) 25 | }) 26 | 27 | app.post("/classifications", async c => { 28 | try { 29 | const { text } = await c.req.json() 30 | const query = "insert into classifications (text) values (?1) returning *" 31 | 32 | const { results } = await c.env.DB 33 | .prepare(query) 34 | .bind(text) 35 | .all() 36 | 37 | const record = results[0] as Classification 38 | const { id, text: recordText } = record 39 | 40 | const { data } = await c.env.AI.run( 41 | modelName, 42 | { text: [recordText] } 43 | ) 44 | const values = data[0] 45 | 46 | await c.env.VECTORIZE_INDEX.upsert([ 47 | { id: String(id), values } 48 | ]) 49 | 50 | return c.json({ classification: record }) 51 | } catch (error: any) { 52 | if (error.message.includes(textUniqError)) { 53 | return c.json({ error: "A classification with this text already exists" }, 500) 54 | } else { 55 | return c.json({ error }, 500) 56 | } 57 | } 58 | }) 59 | 60 | app.post("/classify", async c => { 61 | const { query } = await c.req.json() 62 | if (!query) return c.json({ error: "No query provided" }, 400) 63 | 64 | const { data } = await c.env.AI.run( 65 | modelName, 66 | { text: [query] } 67 | ) 68 | const values = data[0] 69 | 70 | const { matches } = await c.env.VECTORIZE_INDEX 71 | .query(values, { 72 | topK: 1 73 | }) 74 | 75 | const match = matches[0] 76 | 77 | const sqlQuery = "select * from classifications where id = ?1" 78 | const classification = await c.env.DB.prepare(sqlQuery) 79 | .bind(match.id) 80 | .first() 81 | 82 | return c.json({ 83 | classification, 84 | match, 85 | query 86 | }) 87 | }) 88 | 89 | app.delete("/classifications/:id", async c => { 90 | try { 91 | const id = c.req.param("id") 92 | await c.env.DB.prepare("delete from classifications where id = ?1").bind(id).run() 93 | await c.env.VECTORIZE_INDEX.deleteByIds([id]) 94 | return c.json({ id, destroyed: true }, 204) 95 | } catch (error: any) { 96 | return c.json({ error }, 500) 97 | } 98 | }) 99 | 100 | 101 | export default app 102 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | /* Visit https://aka.ms/tsconfig.json to read more about this file */ 4 | 5 | /* Projects */ 6 | // "incremental": true, /* Enable incremental compilation */ 7 | // "composite": true, /* Enable constraints that allow a TypeScript project to be used with project references. */ 8 | // "tsBuildInfoFile": "./", /* Specify the folder for .tsbuildinfo incremental compilation files. */ 9 | // "disableSourceOfProjectReferenceRedirect": true, /* Disable preferring source files instead of declaration files when referencing composite projects */ 10 | // "disableSolutionSearching": true, /* Opt a project out of multi-project reference checking when editing. */ 11 | // "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */ 12 | 13 | /* Language and Environment */ 14 | "target": "es2021" /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */, 15 | "lib": ["es2021"] /* Specify a set of bundled library declaration files that describe the target runtime environment. */, 16 | "jsx": "react" /* Specify what JSX code is generated. */, 17 | // "experimentalDecorators": true, /* Enable experimental support for TC39 stage 2 draft decorators. */ 18 | // "emitDecoratorMetadata": true, /* Emit design-type metadata for decorated declarations in source files. */ 19 | // "jsxFactory": "", /* Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h' */ 20 | // "jsxFragmentFactory": "", /* Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'. */ 21 | // "jsxImportSource": "", /* Specify module specifier used to import the JSX factory functions when using `jsx: react-jsx*`.` */ 22 | // "reactNamespace": "", /* Specify the object invoked for `createElement`. This only applies when targeting `react` JSX emit. */ 23 | // "noLib": true, /* Disable including any library files, including the default lib.d.ts. */ 24 | // "useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */ 25 | 26 | /* Modules */ 27 | "module": "es2022" /* Specify what module code is generated. */, 28 | // "rootDir": "./", /* Specify the root folder within your source files. */ 29 | "moduleResolution": "node" /* Specify how TypeScript looks up a file from a given module specifier. */, 30 | // "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */ 31 | // "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */ 32 | // "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */ 33 | // "typeRoots": [], /* Specify multiple folders that act like `./node_modules/@types`. */ 34 | "types": ["@cloudflare/workers-types"] /* Specify type package names to be included without being referenced in a source file. */, 35 | // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */ 36 | "resolveJsonModule": true /* Enable importing .json files */, 37 | // "noResolve": true, /* Disallow `import`s, `require`s or ``s from expanding the number of files TypeScript should add to a project. */ 38 | 39 | /* JavaScript Support */ 40 | "allowJs": true /* Allow JavaScript files to be a part of your program. Use the `checkJS` option to get errors from these files. */, 41 | "checkJs": false /* Enable error reporting in type-checked JavaScript files. */, 42 | // "maxNodeModuleJsDepth": 1, /* Specify the maximum folder depth used for checking JavaScript files from `node_modules`. Only applicable with `allowJs`. */ 43 | 44 | /* Emit */ 45 | // "declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */ 46 | // "declarationMap": true, /* Create sourcemaps for d.ts files. */ 47 | // "emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript files. */ 48 | // "sourceMap": true, /* Create source map files for emitted JavaScript files. */ 49 | // "outFile": "./", /* Specify a file that bundles all outputs into one JavaScript file. If `declaration` is true, also designates a file that bundles all .d.ts output. */ 50 | // "outDir": "./", /* Specify an output folder for all emitted files. */ 51 | // "removeComments": true, /* Disable emitting comments. */ 52 | "noEmit": true /* Disable emitting files from a compilation. */, 53 | // "importHelpers": true, /* Allow importing helper functions from tslib once per project, instead of including them per-file. */ 54 | // "importsNotUsedAsValues": "remove", /* Specify emit/checking behavior for imports that are only used for types */ 55 | // "downlevelIteration": true, /* Emit more compliant, but verbose and less performant JavaScript for iteration. */ 56 | // "sourceRoot": "", /* Specify the root path for debuggers to find the reference source code. */ 57 | // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */ 58 | // "inlineSourceMap": true, /* Include sourcemap files inside the emitted JavaScript. */ 59 | // "inlineSources": true, /* Include source code in the sourcemaps inside the emitted JavaScript. */ 60 | // "emitBOM": true, /* Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files. */ 61 | // "newLine": "crlf", /* Set the newline character for emitting files. */ 62 | // "stripInternal": true, /* Disable emitting declarations that have `@internal` in their JSDoc comments. */ 63 | // "noEmitHelpers": true, /* Disable generating custom helper functions like `__extends` in compiled output. */ 64 | // "noEmitOnError": true, /* Disable emitting files if any type checking errors are reported. */ 65 | // "preserveConstEnums": true, /* Disable erasing `const enum` declarations in generated code. */ 66 | // "declarationDir": "./", /* Specify the output directory for generated declaration files. */ 67 | // "preserveValueImports": true, /* Preserve unused imported values in the JavaScript output that would otherwise be removed. */ 68 | 69 | /* Interop Constraints */ 70 | "isolatedModules": true /* Ensure that each file can be safely transpiled without relying on other imports. */, 71 | "allowSyntheticDefaultImports": true /* Allow 'import x from y' when a module doesn't have a default export. */, 72 | // "esModuleInterop": true /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables `allowSyntheticDefaultImports` for type compatibility. */, 73 | // "preserveSymlinks": true, /* Disable resolving symlinks to their realpath. This correlates to the same flag in node. */ 74 | "forceConsistentCasingInFileNames": true /* Ensure that casing is correct in imports. */, 75 | 76 | /* Type Checking */ 77 | "strict": true /* Enable all strict type-checking options. */, 78 | // "noImplicitAny": true, /* Enable error reporting for expressions and declarations with an implied `any` type.. */ 79 | // "strictNullChecks": true, /* When type checking, take into account `null` and `undefined`. */ 80 | // "strictFunctionTypes": true, /* When assigning functions, check to ensure parameters and the return values are subtype-compatible. */ 81 | // "strictBindCallApply": true, /* Check that the arguments for `bind`, `call`, and `apply` methods match the original function. */ 82 | // "strictPropertyInitialization": true, /* Check for class properties that are declared but not set in the constructor. */ 83 | // "noImplicitThis": true, /* Enable error reporting when `this` is given the type `any`. */ 84 | // "useUnknownInCatchVariables": true, /* Type catch clause variables as 'unknown' instead of 'any'. */ 85 | // "alwaysStrict": true, /* Ensure 'use strict' is always emitted. */ 86 | // "noUnusedLocals": true, /* Enable error reporting when a local variables aren't read. */ 87 | // "noUnusedParameters": true, /* Raise an error when a function parameter isn't read */ 88 | // "exactOptionalPropertyTypes": true, /* Interpret optional property types as written, rather than adding 'undefined'. */ 89 | // "noImplicitReturns": true, /* Enable error reporting for codepaths that do not explicitly return in a function. */ 90 | // "noFallthroughCasesInSwitch": true, /* Enable error reporting for fallthrough cases in switch statements. */ 91 | // "noUncheckedIndexedAccess": true, /* Include 'undefined' in index signature results */ 92 | // "noImplicitOverride": true, /* Ensure overriding members in derived classes are marked with an override modifier. */ 93 | // "noPropertyAccessFromIndexSignature": true, /* Enforces using indexed accessors for keys declared using an indexed type */ 94 | // "allowUnusedLabels": true, /* Disable error reporting for unused labels. */ 95 | // "allowUnreachableCode": true, /* Disable error reporting for unreachable code. */ 96 | 97 | /* Completeness */ 98 | // "skipDefaultLibCheck": true, /* Skip type checking .d.ts files that are included with TypeScript. */ 99 | "skipLibCheck": true /* Skip type checking all .d.ts files. */ 100 | } 101 | } 102 | -------------------------------------------------------------------------------- /wrangler.toml: -------------------------------------------------------------------------------- 1 | name = "classification-api" 2 | main = "src/worker.ts" 3 | compatibility_date = "2024-06-28" 4 | 5 | [[d1_databases]] 6 | binding = "DB" # i.e. available in your Worker on env.DB 7 | database_name = "classification-api" 8 | database_id = "d81eb41d-63b4-4404-a5c0-867cdd38b904" 9 | 10 | [[vectorize]] 11 | binding = "VECTORIZE_INDEX" 12 | index_name = "classification-api" 13 | 14 | [ai] 15 | binding = "AI" 16 | --------------------------------------------------------------------------------