An experimental TypeSpec syntax for Lexicon

bla

+2563 -388
+9
.gitignore
··· 4 # Build outputs 5 dist/ 6 tsp-output/ 7 *.tsbuildinfo 8 9 # OS files 10 .DS_Store ··· 21 npm-debug.log* 22 yarn-debug.log* 23 yarn-error.log* 24 25 # Environment 26 .env ··· 31 *.tmp 32 *.temp 33
··· 4 # Build outputs 5 dist/ 6 tsp-output/ 7 + generated/ 8 + lexicons/ 9 *.tsbuildinfo 10 + 11 + # Test outputs 12 + test/outputs/ 13 14 # OS files 15 .DS_Store ··· 26 npm-debug.log* 27 yarn-debug.log* 28 yarn-error.log* 29 + lerna-debug.log* 30 31 # Environment 32 .env ··· 37 *.tmp 38 *.temp 39 40 + # npm 41 + .npm 42 +
+60
CONTRIBUTING.md
···
··· 1 + # Contributing to TypeLex 2 + 3 + Thank you for your interest in contributing to TypeLex! 4 + 5 + ## Development Setup 6 + 7 + 1. Fork and clone the repository 8 + 2. Install dependencies: 9 + ```bash 10 + npm install 11 + ``` 12 + 13 + 3. Build the emitter: 14 + ```bash 15 + cd typelex-emitter 16 + npm run build 17 + npm link 18 + ``` 19 + 20 + 4. Test your changes: 21 + ```bash 22 + cd ../typelex-example 23 + npm link @typelex/emitter 24 + npm run build 25 + ``` 26 + 27 + ## Project Structure 28 + 29 + - `typelex-emitter/` - The TypeSpec emitter implementation 30 + - `src/` - Source code 31 + - `test/` - Tests (needs work!) 32 + - `typelex-example/` - Example usage of TypeLex 33 + 34 + ## Making Changes 35 + 36 + 1. Create a feature branch 37 + 2. Make your changes 38 + 3. Test with the example project 39 + 4. Submit a pull request 40 + 41 + ## Areas for Contribution 42 + 43 + - [ ] Add support for XRPC queries and procedures 44 + - [ ] Add support for subscriptions 45 + - [ ] Implement union types 46 + - [ ] Add ATProto-specific decorators (@maxGraphemes, etc.) 47 + - [ ] Improve test coverage 48 + - [ ] Add more examples 49 + - [ ] Documentation improvements 50 + 51 + ## Code Style 52 + 53 + - Use TypeScript 54 + - Follow existing patterns in the codebase 55 + - Add comments for complex logic 56 + - Update tests when adding features 57 + 58 + ## Questions? 59 + 60 + Feel free to open an issue for discussion!
+2451
package-lock.json
···
··· 1 + { 2 + "name": "typelex-monorepo", 3 + "version": "0.1.0", 4 + "lockfileVersion": 3, 5 + "requires": true, 6 + "packages": { 7 + "": { 8 + "name": "typelex-monorepo", 9 + "version": "0.1.0", 10 + "license": "MIT", 11 + "workspaces": [ 12 + "typelex-emitter", 13 + "typelex-example" 14 + ] 15 + }, 16 + "node_modules/@typelex/emitter": { 17 + "resolved": "typelex-emitter", 18 + "link": true 19 + }, 20 + "node_modules/typelex-example": { 21 + "resolved": "typelex-example", 22 + "link": true 23 + }, 24 + "typelex-emitter": { 25 + "name": "@typelex/emitter", 26 + "version": "0.1.0", 27 + "license": "MIT", 28 + "dependencies": { 29 + "@typespec/compiler": "^0.64.0" 30 + }, 31 + "devDependencies": { 32 + "@types/node": "^20.0.0", 33 + "@typespec/http": "^0.64.0", 34 + "@typespec/openapi": "^0.64.0", 35 + "typescript": "^5.0.0", 36 + "vitest": "^1.0.0" 37 + }, 38 + "peerDependencies": { 39 + "@typespec/compiler": "^0.64.0" 40 + } 41 + }, 42 + "typelex-emitter/node_modules/@babel/code-frame": { 43 + "version": "7.25.9", 44 + "license": "MIT", 45 + "dependencies": { 46 + "@babel/highlight": "^7.25.9", 47 + "picocolors": "^1.0.0" 48 + }, 49 + "engines": { 50 + "node": ">=6.9.0" 51 + } 52 + }, 53 + "typelex-emitter/node_modules/@babel/helper-validator-identifier": { 54 + "version": "7.27.1", 55 + "license": "MIT", 56 + "engines": { 57 + "node": ">=6.9.0" 58 + } 59 + }, 60 + "typelex-emitter/node_modules/@babel/highlight": { 61 + "version": "7.25.9", 62 + "license": "MIT", 63 + "dependencies": { 64 + "@babel/helper-validator-identifier": "^7.25.9", 65 + "chalk": "^2.4.2", 66 + "js-tokens": "^4.0.0", 67 + "picocolors": "^1.0.0" 68 + }, 69 + "engines": { 70 + "node": ">=6.9.0" 71 + } 72 + }, 73 + "typelex-emitter/node_modules/@esbuild/darwin-arm64": { 74 + "version": "0.21.5", 75 + "cpu": [ 76 + "arm64" 77 + ], 78 + "dev": true, 79 + "license": "MIT", 80 + "optional": true, 81 + "os": [ 82 + "darwin" 83 + ], 84 + "engines": { 85 + "node": ">=12" 86 + } 87 + }, 88 + "typelex-emitter/node_modules/@jest/schemas": { 89 + "version": "29.6.3", 90 + "dev": true, 91 + "license": "MIT", 92 + "dependencies": { 93 + "@sinclair/typebox": "^0.27.8" 94 + }, 95 + "engines": { 96 + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" 97 + } 98 + }, 99 + "typelex-emitter/node_modules/@jridgewell/sourcemap-codec": { 100 + "version": "1.5.5", 101 + "dev": true, 102 + "license": "MIT" 103 + }, 104 + "typelex-emitter/node_modules/@nodelib/fs.scandir": { 105 + "version": "2.1.5", 106 + "license": "MIT", 107 + "dependencies": { 108 + "@nodelib/fs.stat": "2.0.5", 109 + "run-parallel": "^1.1.9" 110 + }, 111 + "engines": { 112 + "node": ">= 8" 113 + } 114 + }, 115 + "typelex-emitter/node_modules/@nodelib/fs.stat": { 116 + "version": "2.0.5", 117 + "license": "MIT", 118 + "engines": { 119 + "node": ">= 8" 120 + } 121 + }, 122 + "typelex-emitter/node_modules/@nodelib/fs.walk": { 123 + "version": "1.2.8", 124 + "license": "MIT", 125 + "dependencies": { 126 + "@nodelib/fs.scandir": "2.1.5", 127 + "fastq": "^1.6.0" 128 + }, 129 + "engines": { 130 + "node": ">= 8" 131 + } 132 + }, 133 + "typelex-emitter/node_modules/@rollup/rollup-darwin-arm64": { 134 + "version": "4.52.4", 135 + "cpu": [ 136 + "arm64" 137 + ], 138 + "dev": true, 139 + "license": "MIT", 140 + "optional": true, 141 + "os": [ 142 + "darwin" 143 + ] 144 + }, 145 + "typelex-emitter/node_modules/@sinclair/typebox": { 146 + "version": "0.27.8", 147 + "dev": true, 148 + "license": "MIT" 149 + }, 150 + "typelex-emitter/node_modules/@sindresorhus/merge-streams": { 151 + "version": "2.3.0", 152 + "license": "MIT", 153 + "engines": { 154 + "node": ">=18" 155 + }, 156 + "funding": { 157 + "url": "https://github.com/sponsors/sindresorhus" 158 + } 159 + }, 160 + "typelex-emitter/node_modules/@types/estree": { 161 + "version": "1.0.8", 162 + "dev": true, 163 + "license": "MIT" 164 + }, 165 + "typelex-emitter/node_modules/@types/node": { 166 + "version": "20.19.19", 167 + "dev": true, 168 + "license": "MIT", 169 + "dependencies": { 170 + "undici-types": "~6.21.0" 171 + } 172 + }, 173 + "typelex-emitter/node_modules/@typespec/compiler": { 174 + "version": "0.64.0", 175 + "license": "MIT", 176 + "dependencies": { 177 + "@babel/code-frame": "~7.25.7", 178 + "ajv": "~8.17.1", 179 + "change-case": "~5.4.4", 180 + "globby": "~14.0.2", 181 + "mustache": "~4.2.0", 182 + "picocolors": "~1.1.1", 183 + "prettier": "~3.3.3", 184 + "prompts": "~2.4.2", 185 + "semver": "^7.6.3", 186 + "temporal-polyfill": "^0.2.5", 187 + "vscode-languageserver": "~9.0.1", 188 + "vscode-languageserver-textdocument": "~1.0.12", 189 + "yaml": "~2.5.1", 190 + "yargs": "~17.7.2" 191 + }, 192 + "bin": { 193 + "tsp": "cmd/tsp.js", 194 + "tsp-server": "cmd/tsp-server.js" 195 + }, 196 + "engines": { 197 + "node": ">=18.0.0" 198 + } 199 + }, 200 + "typelex-emitter/node_modules/@typespec/http": { 201 + "version": "0.64.0", 202 + "dev": true, 203 + "license": "MIT", 204 + "engines": { 205 + "node": ">=18.0.0" 206 + }, 207 + "peerDependencies": { 208 + "@typespec/compiler": "~0.64.0", 209 + "@typespec/streams": "~0.64.0" 210 + }, 211 + "peerDependenciesMeta": { 212 + "@typespec/streams": { 213 + "optional": true 214 + } 215 + } 216 + }, 217 + "typelex-emitter/node_modules/@typespec/openapi": { 218 + "version": "0.64.0", 219 + "dev": true, 220 + "license": "MIT", 221 + "engines": { 222 + "node": ">=18.0.0" 223 + }, 224 + "peerDependencies": { 225 + "@typespec/compiler": "~0.64.0", 226 + "@typespec/http": "~0.64.0" 227 + } 228 + }, 229 + "typelex-emitter/node_modules/@vitest/expect": { 230 + "version": "1.6.1", 231 + "dev": true, 232 + "license": "MIT", 233 + "dependencies": { 234 + "@vitest/spy": "1.6.1", 235 + "@vitest/utils": "1.6.1", 236 + "chai": "^4.3.10" 237 + }, 238 + "funding": { 239 + "url": "https://opencollective.com/vitest" 240 + } 241 + }, 242 + "typelex-emitter/node_modules/@vitest/runner": { 243 + "version": "1.6.1", 244 + "dev": true, 245 + "license": "MIT", 246 + "dependencies": { 247 + "@vitest/utils": "1.6.1", 248 + "p-limit": "^5.0.0", 249 + "pathe": "^1.1.1" 250 + }, 251 + "funding": { 252 + "url": "https://opencollective.com/vitest" 253 + } 254 + }, 255 + "typelex-emitter/node_modules/@vitest/snapshot": { 256 + "version": "1.6.1", 257 + "dev": true, 258 + "license": "MIT", 259 + "dependencies": { 260 + "magic-string": "^0.30.5", 261 + "pathe": "^1.1.1", 262 + "pretty-format": "^29.7.0" 263 + }, 264 + "funding": { 265 + "url": "https://opencollective.com/vitest" 266 + } 267 + }, 268 + "typelex-emitter/node_modules/@vitest/spy": { 269 + "version": "1.6.1", 270 + "dev": true, 271 + "license": "MIT", 272 + "dependencies": { 273 + "tinyspy": "^2.2.0" 274 + }, 275 + "funding": { 276 + "url": "https://opencollective.com/vitest" 277 + } 278 + }, 279 + "typelex-emitter/node_modules/@vitest/utils": { 280 + "version": "1.6.1", 281 + "dev": true, 282 + "license": "MIT", 283 + "dependencies": { 284 + "diff-sequences": "^29.6.3", 285 + "estree-walker": "^3.0.3", 286 + "loupe": "^2.3.7", 287 + "pretty-format": "^29.7.0" 288 + }, 289 + "funding": { 290 + "url": "https://opencollective.com/vitest" 291 + } 292 + }, 293 + "typelex-emitter/node_modules/acorn": { 294 + "version": "8.15.0", 295 + "dev": true, 296 + "license": "MIT", 297 + "bin": { 298 + "acorn": "bin/acorn" 299 + }, 300 + "engines": { 301 + "node": ">=0.4.0" 302 + } 303 + }, 304 + "typelex-emitter/node_modules/acorn-walk": { 305 + "version": "8.3.4", 306 + "dev": true, 307 + "license": "MIT", 308 + "dependencies": { 309 + "acorn": "^8.11.0" 310 + }, 311 + "engines": { 312 + "node": ">=0.4.0" 313 + } 314 + }, 315 + "typelex-emitter/node_modules/ajv": { 316 + "version": "8.17.1", 317 + "license": "MIT", 318 + "dependencies": { 319 + "fast-deep-equal": "^3.1.3", 320 + "fast-uri": "^3.0.1", 321 + "json-schema-traverse": "^1.0.0", 322 + "require-from-string": "^2.0.2" 323 + }, 324 + "funding": { 325 + "type": "github", 326 + "url": "https://github.com/sponsors/epoberezkin" 327 + } 328 + }, 329 + "typelex-emitter/node_modules/ansi-regex": { 330 + "version": "5.0.1", 331 + "license": "MIT", 332 + "engines": { 333 + "node": ">=8" 334 + } 335 + }, 336 + "typelex-emitter/node_modules/ansi-styles": { 337 + "version": "3.2.1", 338 + "license": "MIT", 339 + "dependencies": { 340 + "color-convert": "^1.9.0" 341 + }, 342 + "engines": { 343 + "node": ">=4" 344 + } 345 + }, 346 + "typelex-emitter/node_modules/assertion-error": { 347 + "version": "1.1.0", 348 + "dev": true, 349 + "license": "MIT", 350 + "engines": { 351 + "node": "*" 352 + } 353 + }, 354 + "typelex-emitter/node_modules/braces": { 355 + "version": "3.0.3", 356 + "license": "MIT", 357 + "dependencies": { 358 + "fill-range": "^7.1.1" 359 + }, 360 + "engines": { 361 + "node": ">=8" 362 + } 363 + }, 364 + "typelex-emitter/node_modules/cac": { 365 + "version": "6.7.14", 366 + "dev": true, 367 + "license": "MIT", 368 + "engines": { 369 + "node": ">=8" 370 + } 371 + }, 372 + "typelex-emitter/node_modules/chai": { 373 + "version": "4.5.0", 374 + "dev": true, 375 + "license": "MIT", 376 + "dependencies": { 377 + "assertion-error": "^1.1.0", 378 + "check-error": "^1.0.3", 379 + "deep-eql": "^4.1.3", 380 + "get-func-name": "^2.0.2", 381 + "loupe": "^2.3.6", 382 + "pathval": "^1.1.1", 383 + "type-detect": "^4.1.0" 384 + }, 385 + "engines": { 386 + "node": ">=4" 387 + } 388 + }, 389 + "typelex-emitter/node_modules/chalk": { 390 + "version": "2.4.2", 391 + "license": "MIT", 392 + "dependencies": { 393 + "ansi-styles": "^3.2.1", 394 + "escape-string-regexp": "^1.0.5", 395 + "supports-color": "^5.3.0" 396 + }, 397 + "engines": { 398 + "node": ">=4" 399 + } 400 + }, 401 + "typelex-emitter/node_modules/change-case": { 402 + "version": "5.4.4", 403 + "license": "MIT" 404 + }, 405 + "typelex-emitter/node_modules/check-error": { 406 + "version": "1.0.3", 407 + "dev": true, 408 + "license": "MIT", 409 + "dependencies": { 410 + "get-func-name": "^2.0.2" 411 + }, 412 + "engines": { 413 + "node": "*" 414 + } 415 + }, 416 + "typelex-emitter/node_modules/cliui": { 417 + "version": "8.0.1", 418 + "license": "ISC", 419 + "dependencies": { 420 + "string-width": "^4.2.0", 421 + "strip-ansi": "^6.0.1", 422 + "wrap-ansi": "^7.0.0" 423 + }, 424 + "engines": { 425 + "node": ">=12" 426 + } 427 + }, 428 + "typelex-emitter/node_modules/color-convert": { 429 + "version": "1.9.3", 430 + "license": "MIT", 431 + "dependencies": { 432 + "color-name": "1.1.3" 433 + } 434 + }, 435 + "typelex-emitter/node_modules/color-name": { 436 + "version": "1.1.3", 437 + "license": "MIT" 438 + }, 439 + "typelex-emitter/node_modules/confbox": { 440 + "version": "0.1.8", 441 + "dev": true, 442 + "license": "MIT" 443 + }, 444 + "typelex-emitter/node_modules/cross-spawn": { 445 + "version": "7.0.6", 446 + "dev": true, 447 + "license": "MIT", 448 + "dependencies": { 449 + "path-key": "^3.1.0", 450 + "shebang-command": "^2.0.0", 451 + "which": "^2.0.1" 452 + }, 453 + "engines": { 454 + "node": ">= 8" 455 + } 456 + }, 457 + "typelex-emitter/node_modules/debug": { 458 + "version": "4.4.3", 459 + "dev": true, 460 + "license": "MIT", 461 + "dependencies": { 462 + "ms": "^2.1.3" 463 + }, 464 + "engines": { 465 + "node": ">=6.0" 466 + }, 467 + "peerDependenciesMeta": { 468 + "supports-color": { 469 + "optional": true 470 + } 471 + } 472 + }, 473 + "typelex-emitter/node_modules/deep-eql": { 474 + "version": "4.1.4", 475 + "dev": true, 476 + "license": "MIT", 477 + "dependencies": { 478 + "type-detect": "^4.0.0" 479 + }, 480 + "engines": { 481 + "node": ">=6" 482 + } 483 + }, 484 + "typelex-emitter/node_modules/diff-sequences": { 485 + "version": "29.6.3", 486 + "dev": true, 487 + "license": "MIT", 488 + "engines": { 489 + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" 490 + } 491 + }, 492 + "typelex-emitter/node_modules/emoji-regex": { 493 + "version": "8.0.0", 494 + "license": "MIT" 495 + }, 496 + "typelex-emitter/node_modules/esbuild": { 497 + "version": "0.21.5", 498 + "dev": true, 499 + "hasInstallScript": true, 500 + "license": "MIT", 501 + "bin": { 502 + "esbuild": "bin/esbuild" 503 + }, 504 + "engines": { 505 + "node": ">=12" 506 + }, 507 + "optionalDependencies": { 508 + "@esbuild/aix-ppc64": "0.21.5", 509 + "@esbuild/android-arm": "0.21.5", 510 + "@esbuild/android-arm64": "0.21.5", 511 + "@esbuild/android-x64": "0.21.5", 512 + "@esbuild/darwin-arm64": "0.21.5", 513 + "@esbuild/darwin-x64": "0.21.5", 514 + "@esbuild/freebsd-arm64": "0.21.5", 515 + "@esbuild/freebsd-x64": "0.21.5", 516 + "@esbuild/linux-arm": "0.21.5", 517 + "@esbuild/linux-arm64": "0.21.5", 518 + "@esbuild/linux-ia32": "0.21.5", 519 + "@esbuild/linux-loong64": "0.21.5", 520 + "@esbuild/linux-mips64el": "0.21.5", 521 + "@esbuild/linux-ppc64": "0.21.5", 522 + "@esbuild/linux-riscv64": "0.21.5", 523 + "@esbuild/linux-s390x": "0.21.5", 524 + "@esbuild/linux-x64": "0.21.5", 525 + "@esbuild/netbsd-x64": "0.21.5", 526 + "@esbuild/openbsd-x64": "0.21.5", 527 + "@esbuild/sunos-x64": "0.21.5", 528 + "@esbuild/win32-arm64": "0.21.5", 529 + "@esbuild/win32-ia32": "0.21.5", 530 + "@esbuild/win32-x64": "0.21.5" 531 + } 532 + }, 533 + "typelex-emitter/node_modules/escalade": { 534 + "version": "3.2.0", 535 + "license": "MIT", 536 + "engines": { 537 + "node": ">=6" 538 + } 539 + }, 540 + "typelex-emitter/node_modules/escape-string-regexp": { 541 + "version": "1.0.5", 542 + "license": "MIT", 543 + "engines": { 544 + "node": ">=0.8.0" 545 + } 546 + }, 547 + "typelex-emitter/node_modules/estree-walker": { 548 + "version": "3.0.3", 549 + "dev": true, 550 + "license": "MIT", 551 + "dependencies": { 552 + "@types/estree": "^1.0.0" 553 + } 554 + }, 555 + "typelex-emitter/node_modules/execa": { 556 + "version": "8.0.1", 557 + "dev": true, 558 + "license": "MIT", 559 + "dependencies": { 560 + "cross-spawn": "^7.0.3", 561 + "get-stream": "^8.0.1", 562 + "human-signals": "^5.0.0", 563 + "is-stream": "^3.0.0", 564 + "merge-stream": "^2.0.0", 565 + "npm-run-path": "^5.1.0", 566 + "onetime": "^6.0.0", 567 + "signal-exit": "^4.1.0", 568 + "strip-final-newline": "^3.0.0" 569 + }, 570 + "engines": { 571 + "node": ">=16.17" 572 + }, 573 + "funding": { 574 + "url": "https://github.com/sindresorhus/execa?sponsor=1" 575 + } 576 + }, 577 + "typelex-emitter/node_modules/fast-deep-equal": { 578 + "version": "3.1.3", 579 + "license": "MIT" 580 + }, 581 + "typelex-emitter/node_modules/fast-glob": { 582 + "version": "3.3.3", 583 + "license": "MIT", 584 + "dependencies": { 585 + "@nodelib/fs.stat": "^2.0.2", 586 + "@nodelib/fs.walk": "^1.2.3", 587 + "glob-parent": "^5.1.2", 588 + "merge2": "^1.3.0", 589 + "micromatch": "^4.0.8" 590 + }, 591 + "engines": { 592 + "node": ">=8.6.0" 593 + } 594 + }, 595 + "typelex-emitter/node_modules/fast-uri": { 596 + "version": "3.1.0", 597 + "funding": [ 598 + { 599 + "type": "github", 600 + "url": "https://github.com/sponsors/fastify" 601 + }, 602 + { 603 + "type": "opencollective", 604 + "url": "https://opencollective.com/fastify" 605 + } 606 + ], 607 + "license": "BSD-3-Clause" 608 + }, 609 + "typelex-emitter/node_modules/fastq": { 610 + "version": "1.19.1", 611 + "license": "ISC", 612 + "dependencies": { 613 + "reusify": "^1.0.4" 614 + } 615 + }, 616 + "typelex-emitter/node_modules/fill-range": { 617 + "version": "7.1.1", 618 + "license": "MIT", 619 + "dependencies": { 620 + "to-regex-range": "^5.0.1" 621 + }, 622 + "engines": { 623 + "node": ">=8" 624 + } 625 + }, 626 + "typelex-emitter/node_modules/fsevents": { 627 + "version": "2.3.3", 628 + "dev": true, 629 + "license": "MIT", 630 + "optional": true, 631 + "os": [ 632 + "darwin" 633 + ], 634 + "engines": { 635 + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" 636 + } 637 + }, 638 + "typelex-emitter/node_modules/get-caller-file": { 639 + "version": "2.0.5", 640 + "license": "ISC", 641 + "engines": { 642 + "node": "6.* || 8.* || >= 10.*" 643 + } 644 + }, 645 + "typelex-emitter/node_modules/get-func-name": { 646 + "version": "2.0.2", 647 + "dev": true, 648 + "license": "MIT", 649 + "engines": { 650 + "node": "*" 651 + } 652 + }, 653 + "typelex-emitter/node_modules/get-stream": { 654 + "version": "8.0.1", 655 + "dev": true, 656 + "license": "MIT", 657 + "engines": { 658 + "node": ">=16" 659 + }, 660 + "funding": { 661 + "url": "https://github.com/sponsors/sindresorhus" 662 + } 663 + }, 664 + "typelex-emitter/node_modules/glob-parent": { 665 + "version": "5.1.2", 666 + "license": "ISC", 667 + "dependencies": { 668 + "is-glob": "^4.0.1" 669 + }, 670 + "engines": { 671 + "node": ">= 6" 672 + } 673 + }, 674 + "typelex-emitter/node_modules/globby": { 675 + "version": "14.0.2", 676 + "license": "MIT", 677 + "dependencies": { 678 + "@sindresorhus/merge-streams": "^2.1.0", 679 + "fast-glob": "^3.3.2", 680 + "ignore": "^5.2.4", 681 + "path-type": "^5.0.0", 682 + "slash": "^5.1.0", 683 + "unicorn-magic": "^0.1.0" 684 + }, 685 + "engines": { 686 + "node": ">=18" 687 + }, 688 + "funding": { 689 + "url": "https://github.com/sponsors/sindresorhus" 690 + } 691 + }, 692 + "typelex-emitter/node_modules/has-flag": { 693 + "version": "3.0.0", 694 + "license": "MIT", 695 + "engines": { 696 + "node": ">=4" 697 + } 698 + }, 699 + "typelex-emitter/node_modules/human-signals": { 700 + "version": "5.0.0", 701 + "dev": true, 702 + "license": "Apache-2.0", 703 + "engines": { 704 + "node": ">=16.17.0" 705 + } 706 + }, 707 + "typelex-emitter/node_modules/ignore": { 708 + "version": "5.3.2", 709 + "license": "MIT", 710 + "engines": { 711 + "node": ">= 4" 712 + } 713 + }, 714 + "typelex-emitter/node_modules/is-extglob": { 715 + "version": "2.1.1", 716 + "license": "MIT", 717 + "engines": { 718 + "node": ">=0.10.0" 719 + } 720 + }, 721 + "typelex-emitter/node_modules/is-fullwidth-code-point": { 722 + "version": "3.0.0", 723 + "license": "MIT", 724 + "engines": { 725 + "node": ">=8" 726 + } 727 + }, 728 + "typelex-emitter/node_modules/is-glob": { 729 + "version": "4.0.3", 730 + "license": "MIT", 731 + "dependencies": { 732 + "is-extglob": "^2.1.1" 733 + }, 734 + "engines": { 735 + "node": ">=0.10.0" 736 + } 737 + }, 738 + "typelex-emitter/node_modules/is-number": { 739 + "version": "7.0.0", 740 + "license": "MIT", 741 + "engines": { 742 + "node": ">=0.12.0" 743 + } 744 + }, 745 + "typelex-emitter/node_modules/is-stream": { 746 + "version": "3.0.0", 747 + "dev": true, 748 + "license": "MIT", 749 + "engines": { 750 + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" 751 + }, 752 + "funding": { 753 + "url": "https://github.com/sponsors/sindresorhus" 754 + } 755 + }, 756 + "typelex-emitter/node_modules/isexe": { 757 + "version": "2.0.0", 758 + "dev": true, 759 + "license": "ISC" 760 + }, 761 + "typelex-emitter/node_modules/js-tokens": { 762 + "version": "4.0.0", 763 + "license": "MIT" 764 + }, 765 + "typelex-emitter/node_modules/json-schema-traverse": { 766 + "version": "1.0.0", 767 + "license": "MIT" 768 + }, 769 + "typelex-emitter/node_modules/kleur": { 770 + "version": "3.0.3", 771 + "license": "MIT", 772 + "engines": { 773 + "node": ">=6" 774 + } 775 + }, 776 + "typelex-emitter/node_modules/local-pkg": { 777 + "version": "0.5.1", 778 + "dev": true, 779 + "license": "MIT", 780 + "dependencies": { 781 + "mlly": "^1.7.3", 782 + "pkg-types": "^1.2.1" 783 + }, 784 + "engines": { 785 + "node": ">=14" 786 + }, 787 + "funding": { 788 + "url": "https://github.com/sponsors/antfu" 789 + } 790 + }, 791 + "typelex-emitter/node_modules/loupe": { 792 + "version": "2.3.7", 793 + "dev": true, 794 + "license": "MIT", 795 + "dependencies": { 796 + "get-func-name": "^2.0.1" 797 + } 798 + }, 799 + "typelex-emitter/node_modules/magic-string": { 800 + "version": "0.30.19", 801 + "dev": true, 802 + "license": "MIT", 803 + "dependencies": { 804 + "@jridgewell/sourcemap-codec": "^1.5.5" 805 + } 806 + }, 807 + "typelex-emitter/node_modules/merge-stream": { 808 + "version": "2.0.0", 809 + "dev": true, 810 + "license": "MIT" 811 + }, 812 + "typelex-emitter/node_modules/merge2": { 813 + "version": "1.4.1", 814 + "license": "MIT", 815 + "engines": { 816 + "node": ">= 8" 817 + } 818 + }, 819 + "typelex-emitter/node_modules/micromatch": { 820 + "version": "4.0.8", 821 + "license": "MIT", 822 + "dependencies": { 823 + "braces": "^3.0.3", 824 + "picomatch": "^2.3.1" 825 + }, 826 + "engines": { 827 + "node": ">=8.6" 828 + } 829 + }, 830 + "typelex-emitter/node_modules/mimic-fn": { 831 + "version": "4.0.0", 832 + "dev": true, 833 + "license": "MIT", 834 + "engines": { 835 + "node": ">=12" 836 + }, 837 + "funding": { 838 + "url": "https://github.com/sponsors/sindresorhus" 839 + } 840 + }, 841 + "typelex-emitter/node_modules/mlly": { 842 + "version": "1.8.0", 843 + "dev": true, 844 + "license": "MIT", 845 + "dependencies": { 846 + "acorn": "^8.15.0", 847 + "pathe": "^2.0.3", 848 + "pkg-types": "^1.3.1", 849 + "ufo": "^1.6.1" 850 + } 851 + }, 852 + "typelex-emitter/node_modules/mlly/node_modules/pathe": { 853 + "version": "2.0.3", 854 + "dev": true, 855 + "license": "MIT" 856 + }, 857 + "typelex-emitter/node_modules/ms": { 858 + "version": "2.1.3", 859 + "dev": true, 860 + "license": "MIT" 861 + }, 862 + "typelex-emitter/node_modules/mustache": { 863 + "version": "4.2.0", 864 + "license": "MIT", 865 + "bin": { 866 + "mustache": "bin/mustache" 867 + } 868 + }, 869 + "typelex-emitter/node_modules/nanoid": { 870 + "version": "3.3.11", 871 + "dev": true, 872 + "funding": [ 873 + { 874 + "type": "github", 875 + "url": "https://github.com/sponsors/ai" 876 + } 877 + ], 878 + "license": "MIT", 879 + "bin": { 880 + "nanoid": "bin/nanoid.cjs" 881 + }, 882 + "engines": { 883 + "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" 884 + } 885 + }, 886 + "typelex-emitter/node_modules/npm-run-path": { 887 + "version": "5.3.0", 888 + "dev": true, 889 + "license": "MIT", 890 + "dependencies": { 891 + "path-key": "^4.0.0" 892 + }, 893 + "engines": { 894 + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" 895 + }, 896 + "funding": { 897 + "url": "https://github.com/sponsors/sindresorhus" 898 + } 899 + }, 900 + "typelex-emitter/node_modules/npm-run-path/node_modules/path-key": { 901 + "version": "4.0.0", 902 + "dev": true, 903 + "license": "MIT", 904 + "engines": { 905 + "node": ">=12" 906 + }, 907 + "funding": { 908 + "url": "https://github.com/sponsors/sindresorhus" 909 + } 910 + }, 911 + "typelex-emitter/node_modules/onetime": { 912 + "version": "6.0.0", 913 + "dev": true, 914 + "license": "MIT", 915 + "dependencies": { 916 + "mimic-fn": "^4.0.0" 917 + }, 918 + "engines": { 919 + "node": ">=12" 920 + }, 921 + "funding": { 922 + "url": "https://github.com/sponsors/sindresorhus" 923 + } 924 + }, 925 + "typelex-emitter/node_modules/p-limit": { 926 + "version": "5.0.0", 927 + "dev": true, 928 + "license": "MIT", 929 + "dependencies": { 930 + "yocto-queue": "^1.0.0" 931 + }, 932 + "engines": { 933 + "node": ">=18" 934 + }, 935 + "funding": { 936 + "url": "https://github.com/sponsors/sindresorhus" 937 + } 938 + }, 939 + "typelex-emitter/node_modules/path-key": { 940 + "version": "3.1.1", 941 + "dev": true, 942 + "license": "MIT", 943 + "engines": { 944 + "node": ">=8" 945 + } 946 + }, 947 + "typelex-emitter/node_modules/path-type": { 948 + "version": "5.0.0", 949 + "license": "MIT", 950 + "engines": { 951 + "node": ">=12" 952 + }, 953 + "funding": { 954 + "url": "https://github.com/sponsors/sindresorhus" 955 + } 956 + }, 957 + "typelex-emitter/node_modules/pathe": { 958 + "version": "1.1.2", 959 + "dev": true, 960 + "license": "MIT" 961 + }, 962 + "typelex-emitter/node_modules/pathval": { 963 + "version": "1.1.1", 964 + "dev": true, 965 + "license": "MIT", 966 + "engines": { 967 + "node": "*" 968 + } 969 + }, 970 + "typelex-emitter/node_modules/picocolors": { 971 + "version": "1.1.1", 972 + "license": "ISC" 973 + }, 974 + "typelex-emitter/node_modules/picomatch": { 975 + "version": "2.3.1", 976 + "license": "MIT", 977 + "engines": { 978 + "node": ">=8.6" 979 + }, 980 + "funding": { 981 + "url": "https://github.com/sponsors/jonschlinkert" 982 + } 983 + }, 984 + "typelex-emitter/node_modules/pkg-types": { 985 + "version": "1.3.1", 986 + "dev": true, 987 + "license": "MIT", 988 + "dependencies": { 989 + "confbox": "^0.1.8", 990 + "mlly": "^1.7.4", 991 + "pathe": "^2.0.1" 992 + } 993 + }, 994 + "typelex-emitter/node_modules/pkg-types/node_modules/pathe": { 995 + "version": "2.0.3", 996 + "dev": true, 997 + "license": "MIT" 998 + }, 999 + "typelex-emitter/node_modules/postcss": { 1000 + "version": "8.5.6", 1001 + "dev": true, 1002 + "funding": [ 1003 + { 1004 + "type": "opencollective", 1005 + "url": "https://opencollective.com/postcss/" 1006 + }, 1007 + { 1008 + "type": "tidelift", 1009 + "url": "https://tidelift.com/funding/github/npm/postcss" 1010 + }, 1011 + { 1012 + "type": "github", 1013 + "url": "https://github.com/sponsors/ai" 1014 + } 1015 + ], 1016 + "license": "MIT", 1017 + "dependencies": { 1018 + "nanoid": "^3.3.11", 1019 + "picocolors": "^1.1.1", 1020 + "source-map-js": "^1.2.1" 1021 + }, 1022 + "engines": { 1023 + "node": "^10 || ^12 || >=14" 1024 + } 1025 + }, 1026 + "typelex-emitter/node_modules/prettier": { 1027 + "version": "3.3.3", 1028 + "license": "MIT", 1029 + "bin": { 1030 + "prettier": "bin/prettier.cjs" 1031 + }, 1032 + "engines": { 1033 + "node": ">=14" 1034 + }, 1035 + "funding": { 1036 + "url": "https://github.com/prettier/prettier?sponsor=1" 1037 + } 1038 + }, 1039 + "typelex-emitter/node_modules/pretty-format": { 1040 + "version": "29.7.0", 1041 + "dev": true, 1042 + "license": "MIT", 1043 + "dependencies": { 1044 + "@jest/schemas": "^29.6.3", 1045 + "ansi-styles": "^5.0.0", 1046 + "react-is": "^18.0.0" 1047 + }, 1048 + "engines": { 1049 + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" 1050 + } 1051 + }, 1052 + "typelex-emitter/node_modules/pretty-format/node_modules/ansi-styles": { 1053 + "version": "5.2.0", 1054 + "dev": true, 1055 + "license": "MIT", 1056 + "engines": { 1057 + "node": ">=10" 1058 + }, 1059 + "funding": { 1060 + "url": "https://github.com/chalk/ansi-styles?sponsor=1" 1061 + } 1062 + }, 1063 + "typelex-emitter/node_modules/prompts": { 1064 + "version": "2.4.2", 1065 + "license": "MIT", 1066 + "dependencies": { 1067 + "kleur": "^3.0.3", 1068 + "sisteransi": "^1.0.5" 1069 + }, 1070 + "engines": { 1071 + "node": ">= 6" 1072 + } 1073 + }, 1074 + "typelex-emitter/node_modules/queue-microtask": { 1075 + "version": "1.2.3", 1076 + "funding": [ 1077 + { 1078 + "type": "github", 1079 + "url": "https://github.com/sponsors/feross" 1080 + }, 1081 + { 1082 + "type": "patreon", 1083 + "url": "https://www.patreon.com/feross" 1084 + }, 1085 + { 1086 + "type": "consulting", 1087 + "url": "https://feross.org/support" 1088 + } 1089 + ], 1090 + "license": "MIT" 1091 + }, 1092 + "typelex-emitter/node_modules/react-is": { 1093 + "version": "18.3.1", 1094 + "dev": true, 1095 + "license": "MIT" 1096 + }, 1097 + "typelex-emitter/node_modules/require-directory": { 1098 + "version": "2.1.1", 1099 + "license": "MIT", 1100 + "engines": { 1101 + "node": ">=0.10.0" 1102 + } 1103 + }, 1104 + "typelex-emitter/node_modules/require-from-string": { 1105 + "version": "2.0.2", 1106 + "license": "MIT", 1107 + "engines": { 1108 + "node": ">=0.10.0" 1109 + } 1110 + }, 1111 + "typelex-emitter/node_modules/reusify": { 1112 + "version": "1.1.0", 1113 + "license": "MIT", 1114 + "engines": { 1115 + "iojs": ">=1.0.0", 1116 + "node": ">=0.10.0" 1117 + } 1118 + }, 1119 + "typelex-emitter/node_modules/rollup": { 1120 + "version": "4.52.4", 1121 + "dev": true, 1122 + "license": "MIT", 1123 + "dependencies": { 1124 + "@types/estree": "1.0.8" 1125 + }, 1126 + "bin": { 1127 + "rollup": "dist/bin/rollup" 1128 + }, 1129 + "engines": { 1130 + "node": ">=18.0.0", 1131 + "npm": ">=8.0.0" 1132 + }, 1133 + "optionalDependencies": { 1134 + "@rollup/rollup-android-arm-eabi": "4.52.4", 1135 + "@rollup/rollup-android-arm64": "4.52.4", 1136 + "@rollup/rollup-darwin-arm64": "4.52.4", 1137 + "@rollup/rollup-darwin-x64": "4.52.4", 1138 + "@rollup/rollup-freebsd-arm64": "4.52.4", 1139 + "@rollup/rollup-freebsd-x64": "4.52.4", 1140 + "@rollup/rollup-linux-arm-gnueabihf": "4.52.4", 1141 + "@rollup/rollup-linux-arm-musleabihf": "4.52.4", 1142 + "@rollup/rollup-linux-arm64-gnu": "4.52.4", 1143 + "@rollup/rollup-linux-arm64-musl": "4.52.4", 1144 + "@rollup/rollup-linux-loong64-gnu": "4.52.4", 1145 + "@rollup/rollup-linux-ppc64-gnu": "4.52.4", 1146 + "@rollup/rollup-linux-riscv64-gnu": "4.52.4", 1147 + "@rollup/rollup-linux-riscv64-musl": "4.52.4", 1148 + "@rollup/rollup-linux-s390x-gnu": "4.52.4", 1149 + "@rollup/rollup-linux-x64-gnu": "4.52.4", 1150 + "@rollup/rollup-linux-x64-musl": "4.52.4", 1151 + "@rollup/rollup-openharmony-arm64": "4.52.4", 1152 + "@rollup/rollup-win32-arm64-msvc": "4.52.4", 1153 + "@rollup/rollup-win32-ia32-msvc": "4.52.4", 1154 + "@rollup/rollup-win32-x64-gnu": "4.52.4", 1155 + "@rollup/rollup-win32-x64-msvc": "4.52.4", 1156 + "fsevents": "~2.3.2" 1157 + } 1158 + }, 1159 + "typelex-emitter/node_modules/run-parallel": { 1160 + "version": "1.2.0", 1161 + "funding": [ 1162 + { 1163 + "type": "github", 1164 + "url": "https://github.com/sponsors/feross" 1165 + }, 1166 + { 1167 + "type": "patreon", 1168 + "url": "https://www.patreon.com/feross" 1169 + }, 1170 + { 1171 + "type": "consulting", 1172 + "url": "https://feross.org/support" 1173 + } 1174 + ], 1175 + "license": "MIT", 1176 + "dependencies": { 1177 + "queue-microtask": "^1.2.2" 1178 + } 1179 + }, 1180 + "typelex-emitter/node_modules/semver": { 1181 + "version": "7.7.2", 1182 + "license": "ISC", 1183 + "bin": { 1184 + "semver": "bin/semver.js" 1185 + }, 1186 + "engines": { 1187 + "node": ">=10" 1188 + } 1189 + }, 1190 + "typelex-emitter/node_modules/shebang-command": { 1191 + "version": "2.0.0", 1192 + "dev": true, 1193 + "license": "MIT", 1194 + "dependencies": { 1195 + "shebang-regex": "^3.0.0" 1196 + }, 1197 + "engines": { 1198 + "node": ">=8" 1199 + } 1200 + }, 1201 + "typelex-emitter/node_modules/shebang-regex": { 1202 + "version": "3.0.0", 1203 + "dev": true, 1204 + "license": "MIT", 1205 + "engines": { 1206 + "node": ">=8" 1207 + } 1208 + }, 1209 + "typelex-emitter/node_modules/siginfo": { 1210 + "version": "2.0.0", 1211 + "dev": true, 1212 + "license": "ISC" 1213 + }, 1214 + "typelex-emitter/node_modules/signal-exit": { 1215 + "version": "4.1.0", 1216 + "dev": true, 1217 + "license": "ISC", 1218 + "engines": { 1219 + "node": ">=14" 1220 + }, 1221 + "funding": { 1222 + "url": "https://github.com/sponsors/isaacs" 1223 + } 1224 + }, 1225 + "typelex-emitter/node_modules/sisteransi": { 1226 + "version": "1.0.5", 1227 + "license": "MIT" 1228 + }, 1229 + "typelex-emitter/node_modules/slash": { 1230 + "version": "5.1.0", 1231 + "license": "MIT", 1232 + "engines": { 1233 + "node": ">=14.16" 1234 + }, 1235 + "funding": { 1236 + "url": "https://github.com/sponsors/sindresorhus" 1237 + } 1238 + }, 1239 + "typelex-emitter/node_modules/source-map-js": { 1240 + "version": "1.2.1", 1241 + "dev": true, 1242 + "license": "BSD-3-Clause", 1243 + "engines": { 1244 + "node": ">=0.10.0" 1245 + } 1246 + }, 1247 + "typelex-emitter/node_modules/stackback": { 1248 + "version": "0.0.2", 1249 + "dev": true, 1250 + "license": "MIT" 1251 + }, 1252 + "typelex-emitter/node_modules/std-env": { 1253 + "version": "3.9.0", 1254 + "dev": true, 1255 + "license": "MIT" 1256 + }, 1257 + "typelex-emitter/node_modules/string-width": { 1258 + "version": "4.2.3", 1259 + "license": "MIT", 1260 + "dependencies": { 1261 + "emoji-regex": "^8.0.0", 1262 + "is-fullwidth-code-point": "^3.0.0", 1263 + "strip-ansi": "^6.0.1" 1264 + }, 1265 + "engines": { 1266 + "node": ">=8" 1267 + } 1268 + }, 1269 + "typelex-emitter/node_modules/strip-ansi": { 1270 + "version": "6.0.1", 1271 + "license": "MIT", 1272 + "dependencies": { 1273 + "ansi-regex": "^5.0.1" 1274 + }, 1275 + "engines": { 1276 + "node": ">=8" 1277 + } 1278 + }, 1279 + "typelex-emitter/node_modules/strip-final-newline": { 1280 + "version": "3.0.0", 1281 + "dev": true, 1282 + "license": "MIT", 1283 + "engines": { 1284 + "node": ">=12" 1285 + }, 1286 + "funding": { 1287 + "url": "https://github.com/sponsors/sindresorhus" 1288 + } 1289 + }, 1290 + "typelex-emitter/node_modules/strip-literal": { 1291 + "version": "2.1.1", 1292 + "dev": true, 1293 + "license": "MIT", 1294 + "dependencies": { 1295 + "js-tokens": "^9.0.1" 1296 + }, 1297 + "funding": { 1298 + "url": "https://github.com/sponsors/antfu" 1299 + } 1300 + }, 1301 + "typelex-emitter/node_modules/strip-literal/node_modules/js-tokens": { 1302 + "version": "9.0.1", 1303 + "dev": true, 1304 + "license": "MIT" 1305 + }, 1306 + "typelex-emitter/node_modules/supports-color": { 1307 + "version": "5.5.0", 1308 + "license": "MIT", 1309 + "dependencies": { 1310 + "has-flag": "^3.0.0" 1311 + }, 1312 + "engines": { 1313 + "node": ">=4" 1314 + } 1315 + }, 1316 + "typelex-emitter/node_modules/temporal-polyfill": { 1317 + "version": "0.2.5", 1318 + "license": "MIT", 1319 + "dependencies": { 1320 + "temporal-spec": "^0.2.4" 1321 + } 1322 + }, 1323 + "typelex-emitter/node_modules/temporal-spec": { 1324 + "version": "0.2.4", 1325 + "license": "ISC" 1326 + }, 1327 + "typelex-emitter/node_modules/tinybench": { 1328 + "version": "2.9.0", 1329 + "dev": true, 1330 + "license": "MIT" 1331 + }, 1332 + "typelex-emitter/node_modules/tinypool": { 1333 + "version": "0.8.4", 1334 + "dev": true, 1335 + "license": "MIT", 1336 + "engines": { 1337 + "node": ">=14.0.0" 1338 + } 1339 + }, 1340 + "typelex-emitter/node_modules/tinyspy": { 1341 + "version": "2.2.1", 1342 + "dev": true, 1343 + "license": "MIT", 1344 + "engines": { 1345 + "node": ">=14.0.0" 1346 + } 1347 + }, 1348 + "typelex-emitter/node_modules/to-regex-range": { 1349 + "version": "5.0.1", 1350 + "license": "MIT", 1351 + "dependencies": { 1352 + "is-number": "^7.0.0" 1353 + }, 1354 + "engines": { 1355 + "node": ">=8.0" 1356 + } 1357 + }, 1358 + "typelex-emitter/node_modules/type-detect": { 1359 + "version": "4.1.0", 1360 + "dev": true, 1361 + "license": "MIT", 1362 + "engines": { 1363 + "node": ">=4" 1364 + } 1365 + }, 1366 + "typelex-emitter/node_modules/typescript": { 1367 + "version": "5.9.3", 1368 + "dev": true, 1369 + "license": "Apache-2.0", 1370 + "bin": { 1371 + "tsc": "bin/tsc", 1372 + "tsserver": "bin/tsserver" 1373 + }, 1374 + "engines": { 1375 + "node": ">=14.17" 1376 + } 1377 + }, 1378 + "typelex-emitter/node_modules/ufo": { 1379 + "version": "1.6.1", 1380 + "dev": true, 1381 + "license": "MIT" 1382 + }, 1383 + "typelex-emitter/node_modules/undici-types": { 1384 + "version": "6.21.0", 1385 + "dev": true, 1386 + "license": "MIT" 1387 + }, 1388 + "typelex-emitter/node_modules/unicorn-magic": { 1389 + "version": "0.1.0", 1390 + "license": "MIT", 1391 + "engines": { 1392 + "node": ">=18" 1393 + }, 1394 + "funding": { 1395 + "url": "https://github.com/sponsors/sindresorhus" 1396 + } 1397 + }, 1398 + "typelex-emitter/node_modules/vite": { 1399 + "version": "5.4.20", 1400 + "dev": true, 1401 + "license": "MIT", 1402 + "dependencies": { 1403 + "esbuild": "^0.21.3", 1404 + "postcss": "^8.4.43", 1405 + "rollup": "^4.20.0" 1406 + }, 1407 + "bin": { 1408 + "vite": "bin/vite.js" 1409 + }, 1410 + "engines": { 1411 + "node": "^18.0.0 || >=20.0.0" 1412 + }, 1413 + "funding": { 1414 + "url": "https://github.com/vitejs/vite?sponsor=1" 1415 + }, 1416 + "optionalDependencies": { 1417 + "fsevents": "~2.3.3" 1418 + }, 1419 + "peerDependencies": { 1420 + "@types/node": "^18.0.0 || >=20.0.0", 1421 + "less": "*", 1422 + "lightningcss": "^1.21.0", 1423 + "sass": "*", 1424 + "sass-embedded": "*", 1425 + "stylus": "*", 1426 + "sugarss": "*", 1427 + "terser": "^5.4.0" 1428 + }, 1429 + "peerDependenciesMeta": { 1430 + "@types/node": { 1431 + "optional": true 1432 + }, 1433 + "less": { 1434 + "optional": true 1435 + }, 1436 + "lightningcss": { 1437 + "optional": true 1438 + }, 1439 + "sass": { 1440 + "optional": true 1441 + }, 1442 + "sass-embedded": { 1443 + "optional": true 1444 + }, 1445 + "stylus": { 1446 + "optional": true 1447 + }, 1448 + "sugarss": { 1449 + "optional": true 1450 + }, 1451 + "terser": { 1452 + "optional": true 1453 + } 1454 + } 1455 + }, 1456 + "typelex-emitter/node_modules/vite-node": { 1457 + "version": "1.6.1", 1458 + "dev": true, 1459 + "license": "MIT", 1460 + "dependencies": { 1461 + "cac": "^6.7.14", 1462 + "debug": "^4.3.4", 1463 + "pathe": "^1.1.1", 1464 + "picocolors": "^1.0.0", 1465 + "vite": "^5.0.0" 1466 + }, 1467 + "bin": { 1468 + "vite-node": "vite-node.mjs" 1469 + }, 1470 + "engines": { 1471 + "node": "^18.0.0 || >=20.0.0" 1472 + }, 1473 + "funding": { 1474 + "url": "https://opencollective.com/vitest" 1475 + } 1476 + }, 1477 + "typelex-emitter/node_modules/vitest": { 1478 + "version": "1.6.1", 1479 + "dev": true, 1480 + "license": "MIT", 1481 + "dependencies": { 1482 + "@vitest/expect": "1.6.1", 1483 + "@vitest/runner": "1.6.1", 1484 + "@vitest/snapshot": "1.6.1", 1485 + "@vitest/spy": "1.6.1", 1486 + "@vitest/utils": "1.6.1", 1487 + "acorn-walk": "^8.3.2", 1488 + "chai": "^4.3.10", 1489 + "debug": "^4.3.4", 1490 + "execa": "^8.0.1", 1491 + "local-pkg": "^0.5.0", 1492 + "magic-string": "^0.30.5", 1493 + "pathe": "^1.1.1", 1494 + "picocolors": "^1.0.0", 1495 + "std-env": "^3.5.0", 1496 + "strip-literal": "^2.0.0", 1497 + "tinybench": "^2.5.1", 1498 + "tinypool": "^0.8.3", 1499 + "vite": "^5.0.0", 1500 + "vite-node": "1.6.1", 1501 + "why-is-node-running": "^2.2.2" 1502 + }, 1503 + "bin": { 1504 + "vitest": "vitest.mjs" 1505 + }, 1506 + "engines": { 1507 + "node": "^18.0.0 || >=20.0.0" 1508 + }, 1509 + "funding": { 1510 + "url": "https://opencollective.com/vitest" 1511 + }, 1512 + "peerDependencies": { 1513 + "@edge-runtime/vm": "*", 1514 + "@types/node": "^18.0.0 || >=20.0.0", 1515 + "@vitest/browser": "1.6.1", 1516 + "@vitest/ui": "1.6.1", 1517 + "happy-dom": "*", 1518 + "jsdom": "*" 1519 + }, 1520 + "peerDependenciesMeta": { 1521 + "@edge-runtime/vm": { 1522 + "optional": true 1523 + }, 1524 + "@types/node": { 1525 + "optional": true 1526 + }, 1527 + "@vitest/browser": { 1528 + "optional": true 1529 + }, 1530 + "@vitest/ui": { 1531 + "optional": true 1532 + }, 1533 + "happy-dom": { 1534 + "optional": true 1535 + }, 1536 + "jsdom": { 1537 + "optional": true 1538 + } 1539 + } 1540 + }, 1541 + "typelex-emitter/node_modules/vscode-jsonrpc": { 1542 + "version": "8.2.0", 1543 + "license": "MIT", 1544 + "engines": { 1545 + "node": ">=14.0.0" 1546 + } 1547 + }, 1548 + "typelex-emitter/node_modules/vscode-languageserver": { 1549 + "version": "9.0.1", 1550 + "license": "MIT", 1551 + "dependencies": { 1552 + "vscode-languageserver-protocol": "3.17.5" 1553 + }, 1554 + "bin": { 1555 + "installServerIntoExtension": "bin/installServerIntoExtension" 1556 + } 1557 + }, 1558 + "typelex-emitter/node_modules/vscode-languageserver-protocol": { 1559 + "version": "3.17.5", 1560 + "license": "MIT", 1561 + "dependencies": { 1562 + "vscode-jsonrpc": "8.2.0", 1563 + "vscode-languageserver-types": "3.17.5" 1564 + } 1565 + }, 1566 + "typelex-emitter/node_modules/vscode-languageserver-textdocument": { 1567 + "version": "1.0.12", 1568 + "license": "MIT" 1569 + }, 1570 + "typelex-emitter/node_modules/vscode-languageserver-types": { 1571 + "version": "3.17.5", 1572 + "license": "MIT" 1573 + }, 1574 + "typelex-emitter/node_modules/which": { 1575 + "version": "2.0.2", 1576 + "dev": true, 1577 + "license": "ISC", 1578 + "dependencies": { 1579 + "isexe": "^2.0.0" 1580 + }, 1581 + "bin": { 1582 + "node-which": "bin/node-which" 1583 + }, 1584 + "engines": { 1585 + "node": ">= 8" 1586 + } 1587 + }, 1588 + "typelex-emitter/node_modules/why-is-node-running": { 1589 + "version": "2.3.0", 1590 + "dev": true, 1591 + "license": "MIT", 1592 + "dependencies": { 1593 + "siginfo": "^2.0.0", 1594 + "stackback": "0.0.2" 1595 + }, 1596 + "bin": { 1597 + "why-is-node-running": "cli.js" 1598 + }, 1599 + "engines": { 1600 + "node": ">=8" 1601 + } 1602 + }, 1603 + "typelex-emitter/node_modules/wrap-ansi": { 1604 + "version": "7.0.0", 1605 + "license": "MIT", 1606 + "dependencies": { 1607 + "ansi-styles": "^4.0.0", 1608 + "string-width": "^4.1.0", 1609 + "strip-ansi": "^6.0.0" 1610 + }, 1611 + "engines": { 1612 + "node": ">=10" 1613 + }, 1614 + "funding": { 1615 + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" 1616 + } 1617 + }, 1618 + "typelex-emitter/node_modules/wrap-ansi/node_modules/ansi-styles": { 1619 + "version": "4.3.0", 1620 + "license": "MIT", 1621 + "dependencies": { 1622 + "color-convert": "^2.0.1" 1623 + }, 1624 + "engines": { 1625 + "node": ">=8" 1626 + }, 1627 + "funding": { 1628 + "url": "https://github.com/chalk/ansi-styles?sponsor=1" 1629 + } 1630 + }, 1631 + "typelex-emitter/node_modules/wrap-ansi/node_modules/color-convert": { 1632 + "version": "2.0.1", 1633 + "license": "MIT", 1634 + "dependencies": { 1635 + "color-name": "~1.1.4" 1636 + }, 1637 + "engines": { 1638 + "node": ">=7.0.0" 1639 + } 1640 + }, 1641 + "typelex-emitter/node_modules/wrap-ansi/node_modules/color-name": { 1642 + "version": "1.1.4", 1643 + "license": "MIT" 1644 + }, 1645 + "typelex-emitter/node_modules/y18n": { 1646 + "version": "5.0.8", 1647 + "license": "ISC", 1648 + "engines": { 1649 + "node": ">=10" 1650 + } 1651 + }, 1652 + "typelex-emitter/node_modules/yaml": { 1653 + "version": "2.5.1", 1654 + "license": "ISC", 1655 + "bin": { 1656 + "yaml": "bin.mjs" 1657 + }, 1658 + "engines": { 1659 + "node": ">= 14" 1660 + } 1661 + }, 1662 + "typelex-emitter/node_modules/yargs": { 1663 + "version": "17.7.2", 1664 + "license": "MIT", 1665 + "dependencies": { 1666 + "cliui": "^8.0.1", 1667 + "escalade": "^3.1.1", 1668 + "get-caller-file": "^2.0.5", 1669 + "require-directory": "^2.1.1", 1670 + "string-width": "^4.2.3", 1671 + "y18n": "^5.0.5", 1672 + "yargs-parser": "^21.1.1" 1673 + }, 1674 + "engines": { 1675 + "node": ">=12" 1676 + } 1677 + }, 1678 + "typelex-emitter/node_modules/yargs-parser": { 1679 + "version": "21.1.1", 1680 + "license": "ISC", 1681 + "engines": { 1682 + "node": ">=12" 1683 + } 1684 + }, 1685 + "typelex-emitter/node_modules/yocto-queue": { 1686 + "version": "1.2.1", 1687 + "dev": true, 1688 + "license": "MIT", 1689 + "engines": { 1690 + "node": ">=12.20" 1691 + }, 1692 + "funding": { 1693 + "url": "https://github.com/sponsors/sindresorhus" 1694 + } 1695 + }, 1696 + "typelex-example": { 1697 + "version": "1.0.0", 1698 + "devDependencies": { 1699 + "@typespec/compiler": "^0.64.0" 1700 + } 1701 + }, 1702 + "typelex-example/node_modules/@babel/code-frame": { 1703 + "version": "7.25.9", 1704 + "dev": true, 1705 + "license": "MIT", 1706 + "dependencies": { 1707 + "@babel/highlight": "^7.25.9", 1708 + "picocolors": "^1.0.0" 1709 + }, 1710 + "engines": { 1711 + "node": ">=6.9.0" 1712 + } 1713 + }, 1714 + "typelex-example/node_modules/@babel/helper-validator-identifier": { 1715 + "version": "7.27.1", 1716 + "dev": true, 1717 + "license": "MIT", 1718 + "engines": { 1719 + "node": ">=6.9.0" 1720 + } 1721 + }, 1722 + "typelex-example/node_modules/@babel/highlight": { 1723 + "version": "7.25.9", 1724 + "dev": true, 1725 + "license": "MIT", 1726 + "dependencies": { 1727 + "@babel/helper-validator-identifier": "^7.25.9", 1728 + "chalk": "^2.4.2", 1729 + "js-tokens": "^4.0.0", 1730 + "picocolors": "^1.0.0" 1731 + }, 1732 + "engines": { 1733 + "node": ">=6.9.0" 1734 + } 1735 + }, 1736 + "typelex-example/node_modules/@nodelib/fs.scandir": { 1737 + "version": "2.1.5", 1738 + "dev": true, 1739 + "license": "MIT", 1740 + "dependencies": { 1741 + "@nodelib/fs.stat": "2.0.5", 1742 + "run-parallel": "^1.1.9" 1743 + }, 1744 + "engines": { 1745 + "node": ">= 8" 1746 + } 1747 + }, 1748 + "typelex-example/node_modules/@nodelib/fs.stat": { 1749 + "version": "2.0.5", 1750 + "dev": true, 1751 + "license": "MIT", 1752 + "engines": { 1753 + "node": ">= 8" 1754 + } 1755 + }, 1756 + "typelex-example/node_modules/@nodelib/fs.walk": { 1757 + "version": "1.2.8", 1758 + "dev": true, 1759 + "license": "MIT", 1760 + "dependencies": { 1761 + "@nodelib/fs.scandir": "2.1.5", 1762 + "fastq": "^1.6.0" 1763 + }, 1764 + "engines": { 1765 + "node": ">= 8" 1766 + } 1767 + }, 1768 + "typelex-example/node_modules/@sindresorhus/merge-streams": { 1769 + "version": "2.3.0", 1770 + "dev": true, 1771 + "license": "MIT", 1772 + "engines": { 1773 + "node": ">=18" 1774 + }, 1775 + "funding": { 1776 + "url": "https://github.com/sponsors/sindresorhus" 1777 + } 1778 + }, 1779 + "typelex-example/node_modules/@typespec/compiler": { 1780 + "version": "0.64.0", 1781 + "dev": true, 1782 + "license": "MIT", 1783 + "dependencies": { 1784 + "@babel/code-frame": "~7.25.7", 1785 + "ajv": "~8.17.1", 1786 + "change-case": "~5.4.4", 1787 + "globby": "~14.0.2", 1788 + "mustache": "~4.2.0", 1789 + "picocolors": "~1.1.1", 1790 + "prettier": "~3.3.3", 1791 + "prompts": "~2.4.2", 1792 + "semver": "^7.6.3", 1793 + "temporal-polyfill": "^0.2.5", 1794 + "vscode-languageserver": "~9.0.1", 1795 + "vscode-languageserver-textdocument": "~1.0.12", 1796 + "yaml": "~2.5.1", 1797 + "yargs": "~17.7.2" 1798 + }, 1799 + "bin": { 1800 + "tsp": "cmd/tsp.js", 1801 + "tsp-server": "cmd/tsp-server.js" 1802 + }, 1803 + "engines": { 1804 + "node": ">=18.0.0" 1805 + } 1806 + }, 1807 + "typelex-example/node_modules/ajv": { 1808 + "version": "8.17.1", 1809 + "dev": true, 1810 + "license": "MIT", 1811 + "dependencies": { 1812 + "fast-deep-equal": "^3.1.3", 1813 + "fast-uri": "^3.0.1", 1814 + "json-schema-traverse": "^1.0.0", 1815 + "require-from-string": "^2.0.2" 1816 + }, 1817 + "funding": { 1818 + "type": "github", 1819 + "url": "https://github.com/sponsors/epoberezkin" 1820 + } 1821 + }, 1822 + "typelex-example/node_modules/ansi-regex": { 1823 + "version": "5.0.1", 1824 + "dev": true, 1825 + "license": "MIT", 1826 + "engines": { 1827 + "node": ">=8" 1828 + } 1829 + }, 1830 + "typelex-example/node_modules/ansi-styles": { 1831 + "version": "3.2.1", 1832 + "dev": true, 1833 + "license": "MIT", 1834 + "dependencies": { 1835 + "color-convert": "^1.9.0" 1836 + }, 1837 + "engines": { 1838 + "node": ">=4" 1839 + } 1840 + }, 1841 + "typelex-example/node_modules/braces": { 1842 + "version": "3.0.3", 1843 + "dev": true, 1844 + "license": "MIT", 1845 + "dependencies": { 1846 + "fill-range": "^7.1.1" 1847 + }, 1848 + "engines": { 1849 + "node": ">=8" 1850 + } 1851 + }, 1852 + "typelex-example/node_modules/chalk": { 1853 + "version": "2.4.2", 1854 + "dev": true, 1855 + "license": "MIT", 1856 + "dependencies": { 1857 + "ansi-styles": "^3.2.1", 1858 + "escape-string-regexp": "^1.0.5", 1859 + "supports-color": "^5.3.0" 1860 + }, 1861 + "engines": { 1862 + "node": ">=4" 1863 + } 1864 + }, 1865 + "typelex-example/node_modules/change-case": { 1866 + "version": "5.4.4", 1867 + "dev": true, 1868 + "license": "MIT" 1869 + }, 1870 + "typelex-example/node_modules/cliui": { 1871 + "version": "8.0.1", 1872 + "dev": true, 1873 + "license": "ISC", 1874 + "dependencies": { 1875 + "string-width": "^4.2.0", 1876 + "strip-ansi": "^6.0.1", 1877 + "wrap-ansi": "^7.0.0" 1878 + }, 1879 + "engines": { 1880 + "node": ">=12" 1881 + } 1882 + }, 1883 + "typelex-example/node_modules/color-convert": { 1884 + "version": "1.9.3", 1885 + "dev": true, 1886 + "license": "MIT", 1887 + "dependencies": { 1888 + "color-name": "1.1.3" 1889 + } 1890 + }, 1891 + "typelex-example/node_modules/color-name": { 1892 + "version": "1.1.3", 1893 + "dev": true, 1894 + "license": "MIT" 1895 + }, 1896 + "typelex-example/node_modules/emoji-regex": { 1897 + "version": "8.0.0", 1898 + "dev": true, 1899 + "license": "MIT" 1900 + }, 1901 + "typelex-example/node_modules/escalade": { 1902 + "version": "3.2.0", 1903 + "dev": true, 1904 + "license": "MIT", 1905 + "engines": { 1906 + "node": ">=6" 1907 + } 1908 + }, 1909 + "typelex-example/node_modules/escape-string-regexp": { 1910 + "version": "1.0.5", 1911 + "dev": true, 1912 + "license": "MIT", 1913 + "engines": { 1914 + "node": ">=0.8.0" 1915 + } 1916 + }, 1917 + "typelex-example/node_modules/fast-deep-equal": { 1918 + "version": "3.1.3", 1919 + "dev": true, 1920 + "license": "MIT" 1921 + }, 1922 + "typelex-example/node_modules/fast-glob": { 1923 + "version": "3.3.3", 1924 + "dev": true, 1925 + "license": "MIT", 1926 + "dependencies": { 1927 + "@nodelib/fs.stat": "^2.0.2", 1928 + "@nodelib/fs.walk": "^1.2.3", 1929 + "glob-parent": "^5.1.2", 1930 + "merge2": "^1.3.0", 1931 + "micromatch": "^4.0.8" 1932 + }, 1933 + "engines": { 1934 + "node": ">=8.6.0" 1935 + } 1936 + }, 1937 + "typelex-example/node_modules/fast-uri": { 1938 + "version": "3.1.0", 1939 + "dev": true, 1940 + "funding": [ 1941 + { 1942 + "type": "github", 1943 + "url": "https://github.com/sponsors/fastify" 1944 + }, 1945 + { 1946 + "type": "opencollective", 1947 + "url": "https://opencollective.com/fastify" 1948 + } 1949 + ], 1950 + "license": "BSD-3-Clause" 1951 + }, 1952 + "typelex-example/node_modules/fastq": { 1953 + "version": "1.19.1", 1954 + "dev": true, 1955 + "license": "ISC", 1956 + "dependencies": { 1957 + "reusify": "^1.0.4" 1958 + } 1959 + }, 1960 + "typelex-example/node_modules/fill-range": { 1961 + "version": "7.1.1", 1962 + "dev": true, 1963 + "license": "MIT", 1964 + "dependencies": { 1965 + "to-regex-range": "^5.0.1" 1966 + }, 1967 + "engines": { 1968 + "node": ">=8" 1969 + } 1970 + }, 1971 + "typelex-example/node_modules/get-caller-file": { 1972 + "version": "2.0.5", 1973 + "dev": true, 1974 + "license": "ISC", 1975 + "engines": { 1976 + "node": "6.* || 8.* || >= 10.*" 1977 + } 1978 + }, 1979 + "typelex-example/node_modules/glob-parent": { 1980 + "version": "5.1.2", 1981 + "dev": true, 1982 + "license": "ISC", 1983 + "dependencies": { 1984 + "is-glob": "^4.0.1" 1985 + }, 1986 + "engines": { 1987 + "node": ">= 6" 1988 + } 1989 + }, 1990 + "typelex-example/node_modules/globby": { 1991 + "version": "14.0.2", 1992 + "dev": true, 1993 + "license": "MIT", 1994 + "dependencies": { 1995 + "@sindresorhus/merge-streams": "^2.1.0", 1996 + "fast-glob": "^3.3.2", 1997 + "ignore": "^5.2.4", 1998 + "path-type": "^5.0.0", 1999 + "slash": "^5.1.0", 2000 + "unicorn-magic": "^0.1.0" 2001 + }, 2002 + "engines": { 2003 + "node": ">=18" 2004 + }, 2005 + "funding": { 2006 + "url": "https://github.com/sponsors/sindresorhus" 2007 + } 2008 + }, 2009 + "typelex-example/node_modules/has-flag": { 2010 + "version": "3.0.0", 2011 + "dev": true, 2012 + "license": "MIT", 2013 + "engines": { 2014 + "node": ">=4" 2015 + } 2016 + }, 2017 + "typelex-example/node_modules/ignore": { 2018 + "version": "5.3.2", 2019 + "dev": true, 2020 + "license": "MIT", 2021 + "engines": { 2022 + "node": ">= 4" 2023 + } 2024 + }, 2025 + "typelex-example/node_modules/is-extglob": { 2026 + "version": "2.1.1", 2027 + "dev": true, 2028 + "license": "MIT", 2029 + "engines": { 2030 + "node": ">=0.10.0" 2031 + } 2032 + }, 2033 + "typelex-example/node_modules/is-fullwidth-code-point": { 2034 + "version": "3.0.0", 2035 + "dev": true, 2036 + "license": "MIT", 2037 + "engines": { 2038 + "node": ">=8" 2039 + } 2040 + }, 2041 + "typelex-example/node_modules/is-glob": { 2042 + "version": "4.0.3", 2043 + "dev": true, 2044 + "license": "MIT", 2045 + "dependencies": { 2046 + "is-extglob": "^2.1.1" 2047 + }, 2048 + "engines": { 2049 + "node": ">=0.10.0" 2050 + } 2051 + }, 2052 + "typelex-example/node_modules/is-number": { 2053 + "version": "7.0.0", 2054 + "dev": true, 2055 + "license": "MIT", 2056 + "engines": { 2057 + "node": ">=0.12.0" 2058 + } 2059 + }, 2060 + "typelex-example/node_modules/js-tokens": { 2061 + "version": "4.0.0", 2062 + "dev": true, 2063 + "license": "MIT" 2064 + }, 2065 + "typelex-example/node_modules/json-schema-traverse": { 2066 + "version": "1.0.0", 2067 + "dev": true, 2068 + "license": "MIT" 2069 + }, 2070 + "typelex-example/node_modules/kleur": { 2071 + "version": "3.0.3", 2072 + "dev": true, 2073 + "license": "MIT", 2074 + "engines": { 2075 + "node": ">=6" 2076 + } 2077 + }, 2078 + "typelex-example/node_modules/merge2": { 2079 + "version": "1.4.1", 2080 + "dev": true, 2081 + "license": "MIT", 2082 + "engines": { 2083 + "node": ">= 8" 2084 + } 2085 + }, 2086 + "typelex-example/node_modules/micromatch": { 2087 + "version": "4.0.8", 2088 + "dev": true, 2089 + "license": "MIT", 2090 + "dependencies": { 2091 + "braces": "^3.0.3", 2092 + "picomatch": "^2.3.1" 2093 + }, 2094 + "engines": { 2095 + "node": ">=8.6" 2096 + } 2097 + }, 2098 + "typelex-example/node_modules/mustache": { 2099 + "version": "4.2.0", 2100 + "dev": true, 2101 + "license": "MIT", 2102 + "bin": { 2103 + "mustache": "bin/mustache" 2104 + } 2105 + }, 2106 + "typelex-example/node_modules/path-type": { 2107 + "version": "5.0.0", 2108 + "dev": true, 2109 + "license": "MIT", 2110 + "engines": { 2111 + "node": ">=12" 2112 + }, 2113 + "funding": { 2114 + "url": "https://github.com/sponsors/sindresorhus" 2115 + } 2116 + }, 2117 + "typelex-example/node_modules/picocolors": { 2118 + "version": "1.1.1", 2119 + "dev": true, 2120 + "license": "ISC" 2121 + }, 2122 + "typelex-example/node_modules/picomatch": { 2123 + "version": "2.3.1", 2124 + "dev": true, 2125 + "license": "MIT", 2126 + "engines": { 2127 + "node": ">=8.6" 2128 + }, 2129 + "funding": { 2130 + "url": "https://github.com/sponsors/jonschlinkert" 2131 + } 2132 + }, 2133 + "typelex-example/node_modules/prettier": { 2134 + "version": "3.3.3", 2135 + "dev": true, 2136 + "license": "MIT", 2137 + "bin": { 2138 + "prettier": "bin/prettier.cjs" 2139 + }, 2140 + "engines": { 2141 + "node": ">=14" 2142 + }, 2143 + "funding": { 2144 + "url": "https://github.com/prettier/prettier?sponsor=1" 2145 + } 2146 + }, 2147 + "typelex-example/node_modules/prompts": { 2148 + "version": "2.4.2", 2149 + "dev": true, 2150 + "license": "MIT", 2151 + "dependencies": { 2152 + "kleur": "^3.0.3", 2153 + "sisteransi": "^1.0.5" 2154 + }, 2155 + "engines": { 2156 + "node": ">= 6" 2157 + } 2158 + }, 2159 + "typelex-example/node_modules/queue-microtask": { 2160 + "version": "1.2.3", 2161 + "dev": true, 2162 + "funding": [ 2163 + { 2164 + "type": "github", 2165 + "url": "https://github.com/sponsors/feross" 2166 + }, 2167 + { 2168 + "type": "patreon", 2169 + "url": "https://www.patreon.com/feross" 2170 + }, 2171 + { 2172 + "type": "consulting", 2173 + "url": "https://feross.org/support" 2174 + } 2175 + ], 2176 + "license": "MIT" 2177 + }, 2178 + "typelex-example/node_modules/require-directory": { 2179 + "version": "2.1.1", 2180 + "dev": true, 2181 + "license": "MIT", 2182 + "engines": { 2183 + "node": ">=0.10.0" 2184 + } 2185 + }, 2186 + "typelex-example/node_modules/require-from-string": { 2187 + "version": "2.0.2", 2188 + "dev": true, 2189 + "license": "MIT", 2190 + "engines": { 2191 + "node": ">=0.10.0" 2192 + } 2193 + }, 2194 + "typelex-example/node_modules/reusify": { 2195 + "version": "1.1.0", 2196 + "dev": true, 2197 + "license": "MIT", 2198 + "engines": { 2199 + "iojs": ">=1.0.0", 2200 + "node": ">=0.10.0" 2201 + } 2202 + }, 2203 + "typelex-example/node_modules/run-parallel": { 2204 + "version": "1.2.0", 2205 + "dev": true, 2206 + "funding": [ 2207 + { 2208 + "type": "github", 2209 + "url": "https://github.com/sponsors/feross" 2210 + }, 2211 + { 2212 + "type": "patreon", 2213 + "url": "https://www.patreon.com/feross" 2214 + }, 2215 + { 2216 + "type": "consulting", 2217 + "url": "https://feross.org/support" 2218 + } 2219 + ], 2220 + "license": "MIT", 2221 + "dependencies": { 2222 + "queue-microtask": "^1.2.2" 2223 + } 2224 + }, 2225 + "typelex-example/node_modules/semver": { 2226 + "version": "7.7.2", 2227 + "dev": true, 2228 + "license": "ISC", 2229 + "bin": { 2230 + "semver": "bin/semver.js" 2231 + }, 2232 + "engines": { 2233 + "node": ">=10" 2234 + } 2235 + }, 2236 + "typelex-example/node_modules/sisteransi": { 2237 + "version": "1.0.5", 2238 + "dev": true, 2239 + "license": "MIT" 2240 + }, 2241 + "typelex-example/node_modules/slash": { 2242 + "version": "5.1.0", 2243 + "dev": true, 2244 + "license": "MIT", 2245 + "engines": { 2246 + "node": ">=14.16" 2247 + }, 2248 + "funding": { 2249 + "url": "https://github.com/sponsors/sindresorhus" 2250 + } 2251 + }, 2252 + "typelex-example/node_modules/string-width": { 2253 + "version": "4.2.3", 2254 + "dev": true, 2255 + "license": "MIT", 2256 + "dependencies": { 2257 + "emoji-regex": "^8.0.0", 2258 + "is-fullwidth-code-point": "^3.0.0", 2259 + "strip-ansi": "^6.0.1" 2260 + }, 2261 + "engines": { 2262 + "node": ">=8" 2263 + } 2264 + }, 2265 + "typelex-example/node_modules/strip-ansi": { 2266 + "version": "6.0.1", 2267 + "dev": true, 2268 + "license": "MIT", 2269 + "dependencies": { 2270 + "ansi-regex": "^5.0.1" 2271 + }, 2272 + "engines": { 2273 + "node": ">=8" 2274 + } 2275 + }, 2276 + "typelex-example/node_modules/supports-color": { 2277 + "version": "5.5.0", 2278 + "dev": true, 2279 + "license": "MIT", 2280 + "dependencies": { 2281 + "has-flag": "^3.0.0" 2282 + }, 2283 + "engines": { 2284 + "node": ">=4" 2285 + } 2286 + }, 2287 + "typelex-example/node_modules/temporal-polyfill": { 2288 + "version": "0.2.5", 2289 + "dev": true, 2290 + "license": "MIT", 2291 + "dependencies": { 2292 + "temporal-spec": "^0.2.4" 2293 + } 2294 + }, 2295 + "typelex-example/node_modules/temporal-spec": { 2296 + "version": "0.2.4", 2297 + "dev": true, 2298 + "license": "ISC" 2299 + }, 2300 + "typelex-example/node_modules/to-regex-range": { 2301 + "version": "5.0.1", 2302 + "dev": true, 2303 + "license": "MIT", 2304 + "dependencies": { 2305 + "is-number": "^7.0.0" 2306 + }, 2307 + "engines": { 2308 + "node": ">=8.0" 2309 + } 2310 + }, 2311 + "typelex-example/node_modules/unicorn-magic": { 2312 + "version": "0.1.0", 2313 + "dev": true, 2314 + "license": "MIT", 2315 + "engines": { 2316 + "node": ">=18" 2317 + }, 2318 + "funding": { 2319 + "url": "https://github.com/sponsors/sindresorhus" 2320 + } 2321 + }, 2322 + "typelex-example/node_modules/vscode-jsonrpc": { 2323 + "version": "8.2.0", 2324 + "dev": true, 2325 + "license": "MIT", 2326 + "engines": { 2327 + "node": ">=14.0.0" 2328 + } 2329 + }, 2330 + "typelex-example/node_modules/vscode-languageserver": { 2331 + "version": "9.0.1", 2332 + "dev": true, 2333 + "license": "MIT", 2334 + "dependencies": { 2335 + "vscode-languageserver-protocol": "3.17.5" 2336 + }, 2337 + "bin": { 2338 + "installServerIntoExtension": "bin/installServerIntoExtension" 2339 + } 2340 + }, 2341 + "typelex-example/node_modules/vscode-languageserver-protocol": { 2342 + "version": "3.17.5", 2343 + "dev": true, 2344 + "license": "MIT", 2345 + "dependencies": { 2346 + "vscode-jsonrpc": "8.2.0", 2347 + "vscode-languageserver-types": "3.17.5" 2348 + } 2349 + }, 2350 + "typelex-example/node_modules/vscode-languageserver-textdocument": { 2351 + "version": "1.0.12", 2352 + "dev": true, 2353 + "license": "MIT" 2354 + }, 2355 + "typelex-example/node_modules/vscode-languageserver-types": { 2356 + "version": "3.17.5", 2357 + "dev": true, 2358 + "license": "MIT" 2359 + }, 2360 + "typelex-example/node_modules/wrap-ansi": { 2361 + "version": "7.0.0", 2362 + "dev": true, 2363 + "license": "MIT", 2364 + "dependencies": { 2365 + "ansi-styles": "^4.0.0", 2366 + "string-width": "^4.1.0", 2367 + "strip-ansi": "^6.0.0" 2368 + }, 2369 + "engines": { 2370 + "node": ">=10" 2371 + }, 2372 + "funding": { 2373 + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" 2374 + } 2375 + }, 2376 + "typelex-example/node_modules/wrap-ansi/node_modules/ansi-styles": { 2377 + "version": "4.3.0", 2378 + "dev": true, 2379 + "license": "MIT", 2380 + "dependencies": { 2381 + "color-convert": "^2.0.1" 2382 + }, 2383 + "engines": { 2384 + "node": ">=8" 2385 + }, 2386 + "funding": { 2387 + "url": "https://github.com/chalk/ansi-styles?sponsor=1" 2388 + } 2389 + }, 2390 + "typelex-example/node_modules/wrap-ansi/node_modules/color-convert": { 2391 + "version": "2.0.1", 2392 + "dev": true, 2393 + "license": "MIT", 2394 + "dependencies": { 2395 + "color-name": "~1.1.4" 2396 + }, 2397 + "engines": { 2398 + "node": ">=7.0.0" 2399 + } 2400 + }, 2401 + "typelex-example/node_modules/wrap-ansi/node_modules/color-name": { 2402 + "version": "1.1.4", 2403 + "dev": true, 2404 + "license": "MIT" 2405 + }, 2406 + "typelex-example/node_modules/y18n": { 2407 + "version": "5.0.8", 2408 + "dev": true, 2409 + "license": "ISC", 2410 + "engines": { 2411 + "node": ">=10" 2412 + } 2413 + }, 2414 + "typelex-example/node_modules/yaml": { 2415 + "version": "2.5.1", 2416 + "dev": true, 2417 + "license": "ISC", 2418 + "bin": { 2419 + "yaml": "bin.mjs" 2420 + }, 2421 + "engines": { 2422 + "node": ">= 14" 2423 + } 2424 + }, 2425 + "typelex-example/node_modules/yargs": { 2426 + "version": "17.7.2", 2427 + "dev": true, 2428 + "license": "MIT", 2429 + "dependencies": { 2430 + "cliui": "^8.0.1", 2431 + "escalade": "^3.1.1", 2432 + "get-caller-file": "^2.0.5", 2433 + "require-directory": "^2.1.1", 2434 + "string-width": "^4.2.3", 2435 + "y18n": "^5.0.5", 2436 + "yargs-parser": "^21.1.1" 2437 + }, 2438 + "engines": { 2439 + "node": ">=12" 2440 + } 2441 + }, 2442 + "typelex-example/node_modules/yargs-parser": { 2443 + "version": "21.1.1", 2444 + "dev": true, 2445 + "license": "ISC", 2446 + "engines": { 2447 + "node": ">=12" 2448 + } 2449 + } 2450 + } 2451 + }
+21
typelex-emitter/.gitignore
···
··· 1 + # Dependencies 2 + node_modules/ 3 + 4 + # Build output 5 + dist/ 6 + 7 + # TypeScript 8 + *.tsbuildinfo 9 + 10 + # Test outputs 11 + test/outputs/ 12 + 13 + # IDE 14 + .vscode/ 15 + .idea/ 16 + 17 + # OS 18 + .DS_Store 19 + 20 + # Logs 21 + *.log
-21
typelex-emitter/dist/emitter.d.ts
··· 1 - import { Program } from "@typespec/compiler"; 2 - export interface EmitterOptions { 3 - outputDir: string; 4 - } 5 - export declare class TypeLexEmitter { 6 - private program; 7 - private options; 8 - private lexicons; 9 - constructor(program: Program, options: EmitterOptions); 10 - emit(): Promise<void>; 11 - private processNamespace; 12 - private visitModel; 13 - private modelToLexiconObject; 14 - private typeToLexiconDefinition; 15 - private scalarToLexiconPrimitive; 16 - private isArrayType; 17 - private modelToLexiconArray; 18 - private getModelLexiconId; 19 - private getLexiconPath; 20 - private writeFile; 21 - }
···
-218
typelex-emitter/dist/emitter.js
··· 1 - import { getDoc, getNamespaceFullName, isTemplateInstance, isType, } from "@typespec/compiler"; 2 - import { mkdir, writeFile } from "fs/promises"; 3 - import { join, dirname } from "path"; 4 - export class TypeLexEmitter { 5 - program; 6 - options; 7 - lexicons = new Map(); 8 - constructor(program, options) { 9 - this.program = program; 10 - this.options = options; 11 - } 12 - async emit() { 13 - // Walk through all models in the program 14 - for (const [_, type] of this.program.getGlobalNamespaceType().models) { 15 - this.visitModel(type); 16 - } 17 - // Recursively process all namespaces 18 - this.processNamespace(this.program.getGlobalNamespaceType()); 19 - // Write all lexicon files 20 - for (const [id, lexicon] of this.lexicons) { 21 - const filePath = this.getLexiconPath(id); 22 - await this.writeFile(filePath, JSON.stringify(lexicon, null, 2)); 23 - } 24 - } 25 - processNamespace(ns) { 26 - for (const [_, model] of ns.models) { 27 - this.visitModel(model); 28 - } 29 - for (const [_, childNs] of ns.namespaces) { 30 - // Skip built-in TypeSpec namespaces 31 - const fullName = getNamespaceFullName(childNs); 32 - if (fullName?.startsWith("TypeSpec")) { 33 - continue; 34 - } 35 - this.processNamespace(childNs); 36 - } 37 - } 38 - visitModel(model) { 39 - // Skip template models 40 - if (model.templateMapper || isTemplateInstance(model)) { 41 - return; 42 - } 43 - // Get the lexicon ID from the namespace and model name 44 - const namespace = model.namespace; 45 - if (!namespace || namespace.name === "") { 46 - return; 47 - } 48 - const lexiconId = this.getModelLexiconId(model); 49 - if (!lexiconId) { 50 - return; 51 - } 52 - // Create or get the lexicon document 53 - let lexicon = this.lexicons.get(lexiconId); 54 - if (!lexicon) { 55 - lexicon = { 56 - lexicon: 1, 57 - id: lexiconId, 58 - defs: {}, 59 - }; 60 - this.lexicons.set(lexiconId, lexicon); 61 - } 62 - // Add the model as a definition 63 - const defName = model.name.charAt(0).toLowerCase() + model.name.slice(1); 64 - const modelDef = this.modelToLexiconObject(model); 65 - // For now, assume the first model in a lexicon is the main one 66 - if (Object.keys(lexicon.defs).length === 0) { 67 - lexicon.defs.main = { 68 - type: "record", 69 - key: "tid", 70 - record: modelDef, 71 - }; 72 - } 73 - else { 74 - lexicon.defs[defName] = modelDef; 75 - } 76 - // Set description if available 77 - const description = getDoc(this.program, model); 78 - if (description && !lexicon.description) { 79 - lexicon.description = description; 80 - } 81 - } 82 - modelToLexiconObject(model) { 83 - const obj = { 84 - type: "object", 85 - properties: {}, 86 - }; 87 - const required = []; 88 - const description = getDoc(this.program, model); 89 - if (description) { 90 - obj.description = description; 91 - } 92 - for (const [name, prop] of model.properties) { 93 - if (prop.optional !== true) { 94 - required.push(name); 95 - } 96 - const propDef = this.typeToLexiconDefinition(prop.type, prop); 97 - if (propDef && obj.properties) { 98 - obj.properties[name] = propDef; 99 - } 100 - } 101 - if (required.length > 0) { 102 - obj.required = required; 103 - } 104 - return obj; 105 - } 106 - typeToLexiconDefinition(type, prop) { 107 - switch (type.kind) { 108 - case "Scalar": 109 - const primitive = this.scalarToLexiconPrimitive(type); 110 - if (prop && primitive) { 111 - const propDesc = getDoc(this.program, prop); 112 - if (propDesc) { 113 - primitive.description = propDesc; 114 - } 115 - } 116 - return primitive; 117 - case "Model": 118 - if (this.isArrayType(type)) { 119 - const array = this.modelToLexiconArray(type); 120 - if (array && prop) { 121 - const propDesc = getDoc(this.program, prop); 122 - if (propDesc) { 123 - array.description = propDesc; 124 - } 125 - } 126 - return array; 127 - } 128 - const obj = this.modelToLexiconObject(type); 129 - if (prop) { 130 - const propDesc = getDoc(this.program, prop); 131 - if (propDesc) { 132 - obj.description = propDesc; 133 - } 134 - } 135 - return obj; 136 - default: 137 - return null; 138 - } 139 - } 140 - scalarToLexiconPrimitive(scalar) { 141 - const primitive = { 142 - type: "string", // default 143 - }; 144 - switch (scalar.name) { 145 - case "string": 146 - primitive.type = "string"; 147 - break; 148 - case "boolean": 149 - primitive.type = "boolean"; 150 - break; 151 - case "int32": 152 - case "int64": 153 - case "int16": 154 - case "int8": 155 - primitive.type = "integer"; 156 - break; 157 - case "float32": 158 - case "float64": 159 - primitive.type = "number"; 160 - break; 161 - case "utcDateTime": 162 - case "offsetDateTime": 163 - case "plainDate": 164 - case "plainTime": 165 - primitive.type = "string"; 166 - primitive.format = "datetime"; 167 - break; 168 - case "bytes": 169 - return { 170 - type: "string", 171 - }; 172 - } 173 - return primitive; 174 - } 175 - isArrayType(model) { 176 - return model.name === "Array" && model.namespace?.name === "TypeSpec"; 177 - } 178 - modelToLexiconArray(model) { 179 - // Handle TypeSpec array types 180 - if (model.templateMapper?.args && model.templateMapper.args.length > 0) { 181 - const itemType = model.templateMapper.args[0]; 182 - if (isType(itemType)) { 183 - const itemDef = this.typeToLexiconDefinition(itemType); 184 - if (itemDef) { 185 - return { 186 - type: "array", 187 - items: itemDef, 188 - }; 189 - } 190 - } 191 - } 192 - return null; 193 - } 194 - getModelLexiconId(model) { 195 - if (!model.namespace || model.namespace.name === "") { 196 - return null; 197 - } 198 - const namespaceName = getNamespaceFullName(model.namespace); 199 - if (!namespaceName) { 200 - return null; 201 - } 202 - // Convert namespace to lexicon ID format (e.g., "xyz.statusphere" -> "xyz.statusphere.modelName") 203 - return `${namespaceName}.${model.name.charAt(0).toLowerCase() + model.name.slice(1)}`; 204 - } 205 - getLexiconPath(lexiconId) { 206 - // Convert lexicon ID to file path (e.g., "xyz.statusphere.status" -> "xyz/statusphere/status.json") 207 - const parts = lexiconId.split("."); 208 - const fileName = parts[parts.length - 1] + ".json"; 209 - const dirs = parts.slice(0, -1); 210 - return join(this.options.outputDir, ...dirs, fileName); 211 - } 212 - async writeFile(filePath, content) { 213 - const dir = dirname(filePath); 214 - await mkdir(dir, { recursive: true }); 215 - await writeFile(filePath, content); 216 - } 217 - } 218 - //# sourceMappingURL=emitter.js.map
···
-1
typelex-emitter/dist/emitter.js.map
··· 1 - {"version":3,"file":"emitter.js","sourceRoot":"","sources":["../src/emitter.ts"],"names":[],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AC,CAAC;QAEhC,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,GAAG,IAAI,EAAE,QAAQ,CAAC,CAAC;IACzD,CAAC;IAEO,KAAK,CAAC,SAAS,CAAC,QAAgB,EAAE,OAAe;QACvD,MAAM,GAAG,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC;QAC9B,MAAM,KAAK,CAAC,GAAG,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;QACtC,MAAM,SAAS,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;IACrC,CAAC;CACF"}
···
-5
typelex-emitter/dist/index.d.ts
··· 1 - import type { EmitContext } from "@typespec/compiler"; 2 - export interface TypeLexEmitterOptions { 3 - "output-dir"?: string; 4 - } 5 - export declare function $onEmit(context: EmitContext<TypeLexEmitterOptions>): Promise<void>;
···
-13
typelex-emitter/dist/index.js
··· 1 - import { resolvePath } from "@typespec/compiler"; 2 - import { TypeLexEmitter } from "./emitter.js"; 3 - export async function $onEmit(context) { 4 - const outputDir = context.options["output-dir"] ?? "./lexicons"; 5 - const resolvedOutputDir = context.emitterOutputDir 6 - ? resolvePath(context.emitterOutputDir, outputDir) 7 - : resolvePath(outputDir); 8 - const emitter = new TypeLexEmitter(context.program, { 9 - outputDir: resolvedOutputDir, 10 - }); 11 - await emitter.emit(); 12 - } 13 - //# sourceMappingURL=index.js.map
···
-1
typelex-emitter/dist/index.js.map
··· 1 - {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAEjD,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAM9C,MAAM,CAAC,KAAK,UAAU,OAAO,CAAC,OAA2C;IACvE,MAAM,SAAS,GAAG,OAAO,CAAC,OAAO,CAAC,YAAY,CAAC,IAAI,YAAY,CAAC;IAChE,MAAM,iBAAiB,GAAG,OAAO,CAAC,gBAAgB;QAChD,CAAC,CAAC,WAAW,CAAC,OAAO,CAAC,gBAAgB,EAAE,SAAS,CAAC;QAClD,CAAC,CAAC,WAAW,CAAC,SAAS,CAAC,CAAC;IAE3B,MAAM,OAAO,GAAG,IAAI,cAAc,CAAC,OAAO,CAAC,OAAO,EAAE;QAClD,SAAS,EAAE,iBAAiB;KAC7B,CAAC,CAAC;IAEH,MAAM,OAAO,CAAC,IAAI,EAAE,CAAC;AACvB,CAAC"}
···
-118
typelex-emitter/dist/types.d.ts
··· 1 - export interface LexiconDocument { 2 - lexicon: 1; 3 - id: string; 4 - revision?: number; 5 - description?: string; 6 - defs: Record<string, LexiconDefinition>; 7 - } 8 - export type LexiconDefinition = LexiconRecord | LexiconQuery | LexiconProcedure | LexiconSubscription | LexiconObject | LexiconToken | LexiconArray | LexiconBlob | LexiconPrimitive | LexiconRef | LexiconUnion | LexiconUnknown | LexiconCidLink | LexiconBytes | LexiconParams; 9 - export interface LexiconRecord { 10 - type: "record"; 11 - description?: string; 12 - key?: string; 13 - record: LexiconObject; 14 - } 15 - export interface LexiconQuery { 16 - type: "query"; 17 - description?: string; 18 - parameters?: LexiconParams; 19 - output?: LexiconXrpcBody; 20 - errors?: LexiconXrpcError[]; 21 - } 22 - export interface LexiconProcedure { 23 - type: "procedure"; 24 - description?: string; 25 - parameters?: LexiconParams; 26 - input?: LexiconXrpcBody; 27 - output?: LexiconXrpcBody; 28 - errors?: LexiconXrpcError[]; 29 - } 30 - export interface LexiconSubscription { 31 - type: "subscription"; 32 - description?: string; 33 - parameters?: LexiconParams; 34 - message?: LexiconXrpcMessage; 35 - errors?: LexiconXrpcError[]; 36 - } 37 - export interface LexiconParams { 38 - type: "params"; 39 - description?: string; 40 - required?: string[]; 41 - properties: Record<string, LexiconPrimitive | LexiconArray>; 42 - } 43 - export interface LexiconObject { 44 - type: "object"; 45 - description?: string; 46 - required?: string[]; 47 - nullable?: string[]; 48 - properties?: Record<string, LexiconDefinition>; 49 - } 50 - export interface LexiconArray { 51 - type: "array"; 52 - description?: string; 53 - items: LexiconDefinition; 54 - minLength?: number; 55 - maxLength?: number; 56 - } 57 - export interface LexiconToken { 58 - type: "token"; 59 - description?: string; 60 - } 61 - export interface LexiconBlob { 62 - type: "blob"; 63 - description?: string; 64 - accept?: string[]; 65 - maxSize?: number; 66 - } 67 - export interface LexiconPrimitive { 68 - type: "string" | "boolean" | "integer" | "number"; 69 - description?: string; 70 - default?: any; 71 - const?: any; 72 - minimum?: number; 73 - maximum?: number; 74 - minLength?: number; 75 - maxLength?: number; 76 - minGraphemes?: number; 77 - maxGraphemes?: number; 78 - format?: string; 79 - knownValues?: string[]; 80 - } 81 - export interface LexiconRef { 82 - type: "ref"; 83 - description?: string; 84 - ref: string; 85 - } 86 - export interface LexiconUnion { 87 - type: "union"; 88 - description?: string; 89 - refs: string[]; 90 - closed?: boolean; 91 - } 92 - export interface LexiconUnknown { 93 - type: "unknown"; 94 - description?: string; 95 - } 96 - export interface LexiconCidLink { 97 - type: "cid-link"; 98 - description?: string; 99 - } 100 - export interface LexiconBytes { 101 - type: "bytes"; 102 - description?: string; 103 - minLength?: number; 104 - maxLength?: number; 105 - } 106 - export interface LexiconXrpcBody { 107 - description?: string; 108 - encoding: string; 109 - schema?: LexiconDefinition; 110 - } 111 - export interface LexiconXrpcMessage { 112 - description?: string; 113 - schema?: LexiconDefinition; 114 - } 115 - export interface LexiconXrpcError { 116 - name: string; 117 - description?: string; 118 - }
···
-2
typelex-emitter/dist/types.js
··· 1 - export {}; 2 - //# sourceMappingURL=types.js.map
···
-1
typelex-emitter/dist/types.js.map
··· 1 - {"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":""}
···
+6 -5
typelex-emitter/src/index.ts
··· 7 } 8 9 export async function $onEmit(context: EmitContext<TypeLexEmitterOptions>) { 10 - const outputDir = context.options["output-dir"] ?? "./lexicons"; 11 - const resolvedOutputDir = context.emitterOutputDir 12 - ? resolvePath(context.emitterOutputDir, outputDir) 13 - : resolvePath(outputDir); 14 15 const emitter = new TypeLexEmitter(context.program, { 16 - outputDir: resolvedOutputDir, 17 }); 18 19 await emitter.emit();
··· 7 } 8 9 export async function $onEmit(context: EmitContext<TypeLexEmitterOptions>) { 10 + // If user specified output-dir in options, use that directly 11 + // Otherwise use TypeSpec's default emitterOutputDir 12 + const outputDir = context.options["output-dir"] 13 + ? resolvePath(context.options["output-dir"]) 14 + : context.emitterOutputDir; 15 16 const emitter = new TypeLexEmitter(context.program, { 17 + outputDir: outputDir, 18 }); 19 20 await emitter.emit();
+14 -1
typelex-example/.gitignore
··· 1 node_modules/ 2 tsp-output/ 3 - .DS_Store
··· 1 + # Dependencies 2 node_modules/ 3 + 4 + # Generated lexicons 5 + lexicons/ 6 + 7 + # TypeSpec output (if using default config) 8 tsp-output/ 9 + generated/ 10 + 11 + # OS 12 + .DS_Store 13 + 14 + # IDE 15 + .vscode/ 16 + .idea/
+1 -1
typelex-example/README.md
··· 22 npm run build 23 ``` 24 25 - The generated lexicons will be in `tsp-output/@typelex/emitter/lexicons/`. 26 27 ## Project Structure 28
··· 22 npm run build 23 ``` 24 25 + The generated lexicons will be in `lexicons/`. 26 27 ## Project Structure 28
+1 -1
typelex-example/package.json
··· 4 "private": true, 5 "scripts": { 6 "build": "tsp compile .", 7 - "clean": "rm -rf tsp-output" 8 }, 9 "devDependencies": { 10 "@typespec/compiler": "^0.64.0"
··· 4 "private": true, 5 "scripts": { 6 "build": "tsp compile .", 7 + "clean": "rm -rf tsp-output lexicons" 8 }, 9 "devDependencies": { 10 "@typespec/compiler": "^0.64.0"