{"_id":"@airlib/router","_rev":"10-45e0e4aae08f181a0bcd3e2dfd96ce8f","name":"@airlib/router","dist-tags":{"latest":"2.1.0"},"versions":{"2.0.0":{"name":"@airlib/router","version":"2.0.0","license":"MIT","_id":"@airlib/router@2.0.0","maintainers":[{"name":"mahdaen","email":"mahdaen@gmail.com"}],"dist":{"shasum":"cfd065d5a6011e88a34812cf524ca92b7d964dfb","tarball":"https://registry.npmjs.org/@airlib/router/-/router-2.0.0.tgz","fileCount":34,"integrity":"sha512-MJC0KrHrmwIZfqNbtTlAIh+sER9AOBBMSWGRK9c+Sm/XLVwuoNZHTUYg0y6OiCAGP2U+h2QPz+AOdVbqfGaztw==","signatures":[{"sig":"MEUCIBZfsKybG9a98ckzJBDfYRDuvTHvmPzS5okJnGq3kZRPAiEAj0NLeMb5SMmZUg9UZxyQiUS8/fx7R6Lu6XUxBsa1MKU=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":140457},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","shasum":"cfd065d5a6011e88a34812cf524ca92b7d964dfb","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"scripts":{"dev":"rimraf dist && tsdown --watch ./src","test":"rimraf coverage && vitest --run","build":"bun run clean && tsdown && publint","clean":"rimraf dist","format":"biome format --write","prepublish":"bun run format && bun run build","test:preview":"rimraf coverage && vitest --run && vite preview --outDir coverage"},"_npmUser":{"name":"mahdaen","email":"mahdaen@gmail.com"},"_integrity":"sha512-MJC0KrHrmwIZfqNbtTlAIh+sER9AOBBMSWGRK9c+Sm/XLVwuoNZHTUYg0y6OiCAGP2U+h2QPz+AOdVbqfGaztw==","_npmVersion":"10.8.3","directories":{"dist":"dist"},"_nodeVersion":"24.3.0","dependencies":{"@airlib/core":"2.0.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vite":"^8.0.10","jsdom":"^27.0.1","rimraf":"^6.0.1","tsdown":"^0.15.9","vitest":"^4.1.11","publint":"^0.3.15","@types/bun":"^1.3.1","@vitest/ui":"^4.1.11","typescript":"^5.9.3","@biomejs/biome":"^2.5.6","@vitest/coverage-istanbul":"^4.1.11"},"_npmOperationalInternal":{"tmp":"tmp/router_2.0.0_1787950533266_0.13181834277218307","host":"s3://npm-registry-packages-npm-production"}},"2.0.1":{"name":"@airlib/router","version":"2.0.1","license":"MIT","_id":"@airlib/router@2.0.1","maintainers":[{"name":"mahdaen","email":"mahdaen@gmail.com"}],"dist":{"shasum":"a35bcabafd20de98cc3d80d669eb11a323ba4124","tarball":"https://registry.npmjs.org/@airlib/router/-/router-2.0.1.tgz","fileCount":34,"integrity":"sha512-VtC/m/SMkAHh5owsBG9nVVlb75zqCVlJSMMmWEt9Nlm7bkWTFpTO04uoTaQgeiNxCV0fuIgHtql2hb1YYpPhrA==","signatures":[{"sig":"MEYCIQDytLXKLtkeHRBlksUEHs9B+3SW+h2VFHudd1mM9TzkkgIhAMda6wPQbxmtZnKGnQwnRto57DeZUHngghn/MTZGc8J6","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":140457},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","shasum":"a35bcabafd20de98cc3d80d669eb11a323ba4124","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"scripts":{"dev":"rimraf dist && tsdown --watch ./src","test":"rimraf coverage && vitest --run","build":"bun run clean && tsdown && publint","clean":"rimraf dist","format":"biome format --write","prepublish":"bun run format && bun run build","test:preview":"rimraf coverage && vitest --run && vite preview --outDir coverage"},"_npmUser":{"name":"mahdaen","email":"mahdaen@gmail.com"},"_integrity":"sha512-VtC/m/SMkAHh5owsBG9nVVlb75zqCVlJSMMmWEt9Nlm7bkWTFpTO04uoTaQgeiNxCV0fuIgHtql2hb1YYpPhrA==","_npmVersion":"10.8.3","directories":{"dist":"dist"},"_nodeVersion":"24.3.0","dependencies":{"@airlib/core":"2.0.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vite":"^8.0.10","jsdom":"^27.0.1","rimraf":"^6.0.1","tsdown":"^0.15.9","vitest":"^4.1.11","publint":"^0.3.15","@types/bun":"^1.3.1","@vitest/ui":"^4.1.11","typescript":"^5.9.3","@biomejs/biome":"^2.5.6","@vitest/coverage-istanbul":"^4.1.11"},"_npmOperationalInternal":{"tmp":"tmp/router_2.0.1_1787952248233_0.08810734507354367","host":"s3://npm-registry-packages-npm-production"}},"2.0.2":{"name":"@airlib/router","version":"2.0.2","license":"MIT","_id":"@airlib/router@2.0.2","maintainers":[{"name":"mahdaen","email":"mahdaen@gmail.com"}],"dist":{"shasum":"06de0f9701dd5cdd118bf4d758a48d17942be7bc","tarball":"https://registry.npmjs.org/@airlib/router/-/router-2.0.2.tgz","fileCount":34,"integrity":"sha512-+EcoUQCEbaOsXQXZHs6oCipVMXFkmOznRBwalhUn6AMQnkQWoiM6rU2eMXYCvw3Yr0dLFSC5WQOwGQ5WJuE1Ug==","signatures":[{"sig":"MEUCIQC3Fl8dqRNfANRbxuibKLpiG08UlZIt2Z3vjfTSlSd96QIgdi7QPZQuv0E7SG+3eUt4wTAyzNvNApeymlvl0EEjEyU=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":140457},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","shasum":"06de0f9701dd5cdd118bf4d758a48d17942be7bc","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"scripts":{"dev":"rimraf dist && tsdown --watch ./src","test":"rimraf coverage && vitest --run","build":"bun run clean && tsdown && publint","clean":"rimraf dist","format":"biome format --write","prepublish":"bun run format && bun run build","test:preview":"rimraf coverage && vitest --run && vite preview --outDir coverage"},"_npmUser":{"name":"mahdaen","email":"mahdaen@gmail.com"},"_integrity":"sha512-+EcoUQCEbaOsXQXZHs6oCipVMXFkmOznRBwalhUn6AMQnkQWoiM6rU2eMXYCvw3Yr0dLFSC5WQOwGQ5WJuE1Ug==","_npmVersion":"10.8.3","directories":{"dist":"dist"},"_nodeVersion":"24.3.0","dependencies":{"@airlib/core":"2.0.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vite":"^8.0.10","jsdom":"^27.0.1","rimraf":"^6.0.1","tsdown":"^0.15.9","vitest":"^4.1.11","publint":"^0.3.15","@types/bun":"^1.3.1","@vitest/ui":"^4.1.11","typescript":"^5.9.3","@biomejs/biome":"^2.5.6","@vitest/coverage-istanbul":"^4.1.11"},"_npmOperationalInternal":{"tmp":"tmp/router_2.0.2_1787952653223_0.011149051356793116","host":"s3://npm-registry-packages-npm-production"}},"2.0.3":{"name":"@airlib/router","version":"2.0.3","license":"MIT","_id":"@airlib/router@2.0.3","maintainers":[{"name":"mahdaen","email":"mahdaen@gmail.com"}],"dist":{"shasum":"a6ca5022eefdba5fe732bc49592b771d2b48d49a","tarball":"https://registry.npmjs.org/@airlib/router/-/router-2.0.3.tgz","fileCount":34,"integrity":"sha512-K923t7a6SJZgzH7stRiOe6AbG9msv5qRVwo9rdi68e8JdEeyn7GVTULSuvdFsNDXE/vfUPzbo0YZ7QSvOb4IMw==","signatures":[{"sig":"MEQCIFSZnffElInEuZRZ1Kdwa+66tnD15+zb0K1eTuO2CbXPAiBrnv4pJOMIpN/aLwZIoZRvp9M1KY4G88w7uGEzuo7n/w==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":140457},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","shasum":"a6ca5022eefdba5fe732bc49592b771d2b48d49a","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"scripts":{"dev":"rimraf dist && tsdown --watch ./src","test":"rimraf coverage && vitest --run","build":"bun run clean && tsdown && publint","clean":"rimraf dist","format":"biome format --write","prepublish":"bun run format && bun run build","test:preview":"rimraf coverage && vitest --run && vite preview --outDir coverage"},"_npmUser":{"name":"mahdaen","email":"mahdaen@gmail.com"},"_integrity":"sha512-K923t7a6SJZgzH7stRiOe6AbG9msv5qRVwo9rdi68e8JdEeyn7GVTULSuvdFsNDXE/vfUPzbo0YZ7QSvOb4IMw==","_npmVersion":"10.8.3","directories":{"dist":"dist"},"_nodeVersion":"24.3.0","dependencies":{"@airlib/core":"2.0.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vite":"^8.0.10","jsdom":"^27.0.1","rimraf":"^6.0.1","tsdown":"^0.15.9","vitest":"^4.1.11","publint":"^0.3.15","@types/bun":"^1.3.1","@vitest/ui":"^4.1.11","typescript":"^5.9.3","@biomejs/biome":"^2.5.6","@vitest/coverage-istanbul":"^4.1.11"},"_npmOperationalInternal":{"tmp":"tmp/router_2.0.3_1787954604796_0.4494788723854659","host":"s3://npm-registry-packages-npm-production"}},"2.0.4":{"name":"@airlib/router","version":"2.0.4","license":"MIT","_id":"@airlib/router@2.0.4","maintainers":[{"name":"mahdaen","email":"mahdaen@gmail.com"}],"dist":{"shasum":"5db3a13e7f58b38073caec7e79dda975ea4ac683","tarball":"https://registry.npmjs.org/@airlib/router/-/router-2.0.4.tgz","fileCount":34,"integrity":"sha512-B9vTDU/AhTIOFBAwjuN/60s22kw9Diu3pinwRKe/w5+Z6vczUyrdvV0OFkIO/NMX2ZGzyDfv6x8nJQYEnNRO+g==","signatures":[{"sig":"MEUCIQCAXy2yFh6q9OyGKFczXuiBRFHR90SdZELEGYDL5BwMuwIgFuKzVbxbizVMIs3jjdK0dAEt1b+zVb06aNPsLY98DZo=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":140457},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","shasum":"5db3a13e7f58b38073caec7e79dda975ea4ac683","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"scripts":{"dev":"rimraf dist && tsdown --watch ./src","test":"rimraf coverage && vitest --run","build":"bun run clean && tsdown && publint","clean":"rimraf dist","format":"biome format --write","prepublish":"bun run format && bun run build","test:preview":"rimraf coverage && vitest --run && vite preview --outDir coverage"},"_npmUser":{"name":"mahdaen","email":"mahdaen@gmail.com"},"_integrity":"sha512-B9vTDU/AhTIOFBAwjuN/60s22kw9Diu3pinwRKe/w5+Z6vczUyrdvV0OFkIO/NMX2ZGzyDfv6x8nJQYEnNRO+g==","_npmVersion":"10.8.3","directories":{"dist":"dist"},"_nodeVersion":"24.3.0","dependencies":{"@airlib/core":"2.0.4"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vite":"^8.0.10","jsdom":"^27.0.1","rimraf":"^6.0.1","tsdown":"^0.15.9","vitest":"^4.1.11","publint":"^0.3.15","@types/bun":"^1.3.1","@vitest/ui":"^4.1.11","typescript":"^5.9.3","@biomejs/biome":"^2.5.6","@vitest/coverage-istanbul":"^4.1.11"},"_npmOperationalInternal":{"tmp":"tmp/router_2.0.4_1787955282830_0.19739993123918054","host":"s3://npm-registry-packages-npm-production"}},"2.0.5":{"name":"@airlib/router","version":"2.0.5","license":"MIT","_id":"@airlib/router@2.0.5","maintainers":[{"name":"mahdaen","email":"mahdaen@gmail.com"}],"dist":{"shasum":"af138f620d4b1715fbfd896ceee707ef7ae0b436","tarball":"https://registry.npmjs.org/@airlib/router/-/router-2.0.5.tgz","fileCount":34,"integrity":"sha512-p/JN5U2VNglhX+Qz47mCKXAIcYkaUAsi/kqZLL8Vvtqghg2sZRAc1QPydjSiwvycwYt6hfmZuqFrNpUjjG0vQQ==","signatures":[{"sig":"MEQCIH4brHeXGx6cv1W4QBMTT7LLiugEpZYQ1g3UXUUiZowuAiAGioJ3vgqdEgAmJ7G4c+mpreAEDER9NIyg50PoDjA+jw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":140458},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","shasum":"af138f620d4b1715fbfd896ceee707ef7ae0b436","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"scripts":{"dev":"rimraf dist && tsdown --watch ./src","test":"rimraf coverage && vitest --run","build":"bun run clean && tsdown && publint","clean":"rimraf dist","format":"biome format --write","prepublish":"bun run format && bun run build","test:preview":"rimraf coverage && vitest --run && vite preview --outDir coverage"},"_npmUser":{"name":"mahdaen","email":"mahdaen@gmail.com"},"_integrity":"sha512-p/JN5U2VNglhX+Qz47mCKXAIcYkaUAsi/kqZLL8Vvtqghg2sZRAc1QPydjSiwvycwYt6hfmZuqFrNpUjjG0vQQ==","_npmVersion":"10.8.3","directories":{"dist":"dist"},"_nodeVersion":"24.3.0","dependencies":{"@airlib/core":"2.0.5"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vite":"^8.0.10","jsdom":"^27.0.1","rimraf":"^6.0.1","tsdown":"^0.15.9","vitest":"^4.1.11","publint":"^0.3.15","@types/bun":"^1.3.1","@vitest/ui":"^4.1.11","typescript":"^5.9.3","@biomejs/biome":"^2.5.6","@vitest/coverage-istanbul":"^4.1.11"},"_npmOperationalInternal":{"tmp":"tmp/router_2.0.5_1787956193032_0.11493874590129449","host":"s3://npm-registry-packages-npm-production"}},"2.0.6":{"name":"@airlib/router","version":"2.0.6","license":"MIT","_id":"@airlib/router@2.0.6","maintainers":[{"name":"mahdaen","email":"mahdaen@gmail.com"}],"dist":{"shasum":"1199313cd4931a37a72d1b2cd21a163b4abd21eb","tarball":"https://registry.npmjs.org/@airlib/router/-/router-2.0.6.tgz","fileCount":34,"integrity":"sha512-dxHUNf02Pq9QHAtYz2mQXWyZzL1JfAfyCL5nSghxLJa1n8VN4v6S9jP6fx/kqn1vdbk7Qf/BrfxAAr3DJ8MCVQ==","signatures":[{"sig":"MEUCICz2OLQSYnKgZVxNnUUpbMMz4hnumoA4ReOru7urTi4lAiEA+9ID6ZHPXVVyV1ttyhkLT2I2XDsOdQdO2Z/vtEwhi5o=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":140458},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","shasum":"1199313cd4931a37a72d1b2cd21a163b4abd21eb","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"scripts":{"dev":"rimraf dist && tsdown --watch ./src","test":"rimraf coverage && vitest --run","build":"bun run clean && tsdown && publint","clean":"rimraf dist","format":"biome format --write","prepublish":"bun run format && bun run build","test:preview":"rimraf coverage && vitest --run && vite preview --outDir coverage"},"_npmUser":{"name":"mahdaen","email":"mahdaen@gmail.com"},"_integrity":"sha512-dxHUNf02Pq9QHAtYz2mQXWyZzL1JfAfyCL5nSghxLJa1n8VN4v6S9jP6fx/kqn1vdbk7Qf/BrfxAAr3DJ8MCVQ==","_npmVersion":"10.8.3","directories":{"dist":"dist"},"_nodeVersion":"24.3.0","dependencies":{"@airlib/core":"2.0.6"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vite":"^8.0.10","jsdom":"^27.0.1","rimraf":"^6.0.1","tsdown":"^0.15.9","vitest":"^4.1.11","publint":"^0.3.15","@types/bun":"^1.3.1","@vitest/ui":"^4.1.11","typescript":"^5.9.3","@biomejs/biome":"^2.5.6","@vitest/coverage-istanbul":"^4.1.11"},"_npmOperationalInternal":{"tmp":"tmp/router_2.0.6_1787956970041_0.5606598301686325","host":"s3://npm-registry-packages-npm-production"}},"2.0.7":{"name":"@airlib/router","version":"2.0.7","license":"MIT","_id":"@airlib/router@2.0.7","maintainers":[{"name":"mahdaen","email":"mahdaen@gmail.com"}],"dist":{"shasum":"c1936d0edf25821ba7db911c5460b98d1926f82e","tarball":"https://registry.npmjs.org/@airlib/router/-/router-2.0.7.tgz","fileCount":34,"integrity":"sha512-6L/RQvzexAOTu0I/NaHWiBVNwgrip25yrym2cP8RfSOAs+y9mDGALMYSuY471wOx+UAzCVxGCp1GRexvyuIkLQ==","signatures":[{"sig":"MEYCIQDF0k+mHz6N9lVId2YBAHHSwZCLGLmQz7Xuslp1Hh3FIAIhALGTvxZJ8CG1J9dzZcju9z2rh/WqlJ5qsJ8AjiXcEfWs","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":140458},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","shasum":"c1936d0edf25821ba7db911c5460b98d1926f82e","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"scripts":{"dev":"rimraf dist && tsdown --watch ./src","test":"rimraf coverage && vitest --run","build":"bun run clean && tsdown && publint","clean":"rimraf dist","format":"biome format --write","prepublish":"bun run format && bun run build","test:preview":"rimraf coverage && vitest --run && vite preview --outDir coverage"},"_npmUser":{"name":"mahdaen","email":"mahdaen@gmail.com"},"_integrity":"sha512-6L/RQvzexAOTu0I/NaHWiBVNwgrip25yrym2cP8RfSOAs+y9mDGALMYSuY471wOx+UAzCVxGCp1GRexvyuIkLQ==","_npmVersion":"10.8.3","directories":{"dist":"dist"},"_nodeVersion":"24.3.0","dependencies":{"@airlib/core":"2.0.7"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vite":"^8.0.10","jsdom":"^27.0.1","rimraf":"^6.0.1","tsdown":"^0.15.9","vitest":"^4.1.11","publint":"^0.3.15","@types/bun":"^1.3.1","@vitest/ui":"^4.1.11","typescript":"^5.9.3","@biomejs/biome":"^2.5.6","@vitest/coverage-istanbul":"^4.1.11"},"_npmOperationalInternal":{"tmp":"tmp/router_2.0.7_1787960368476_0.03719374811329712","host":"s3://npm-registry-packages-npm-production"}},"2.0.8":{"name":"@airlib/router","version":"2.0.8","license":"MIT","_id":"@airlib/router@2.0.8","maintainers":[{"name":"mahdaen","email":"mahdaen@gmail.com"}],"dist":{"shasum":"66ad477fd84c6d939761fe2a648d1130f898c670","tarball":"https://registry.npmjs.org/@airlib/router/-/router-2.0.8.tgz","fileCount":34,"integrity":"sha512-iJjxEUuaf464uLAiiK7H8o+NpNyhSISEBKFd8aHzWy/RiHNLX41XNzbmzg8Rw7IGsoA7DJ3uJ0maHkPyQCeFtQ==","signatures":[{"sig":"MEQCIDMF216M8Zn76krpoB8ReYTM6giuJqIURHHgARhUzPeAAiAt0TX0yaQJNw8kQqWJ0oKZihWDA06kqTKBMrLpsetLFg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":140458},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","shasum":"66ad477fd84c6d939761fe2a648d1130f898c670","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"scripts":{"dev":"rimraf dist && tsdown --watch ./src","test":"rimraf coverage && vitest --run","build":"bun run clean && tsdown && publint","clean":"rimraf dist","format":"biome format --write","prepublish":"bun run format && bun run build","test:preview":"rimraf coverage && vitest --run && vite preview --outDir coverage"},"_npmUser":{"name":"mahdaen","email":"mahdaen@gmail.com"},"_integrity":"sha512-iJjxEUuaf464uLAiiK7H8o+NpNyhSISEBKFd8aHzWy/RiHNLX41XNzbmzg8Rw7IGsoA7DJ3uJ0maHkPyQCeFtQ==","_npmVersion":"10.8.3","directories":{"dist":"dist"},"_nodeVersion":"24.3.0","dependencies":{"@airlib/core":"2.0.8"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vite":"^8.0.10","jsdom":"^27.0.1","rimraf":"^6.0.1","tsdown":"^0.15.9","vitest":"^4.1.11","publint":"^0.3.15","@types/bun":"^1.3.1","@vitest/ui":"^4.1.11","typescript":"^5.9.3","@biomejs/biome":"^2.5.6","@vitest/coverage-istanbul":"^4.1.11"},"_npmOperationalInternal":{"tmp":"tmp/router_2.0.8_1788013998293_0.6253819613598486","host":"s3://npm-registry-packages-npm-production"}},"2.1.0":{"type":"module","name":"@airlib/router","version":"2.1.0","main":"./dist/index.js","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"directories":{"dist":"dist"},"publishConfig":{"access":"public"},"devDependencies":{"@biomejs/biome":"^2.5.6","@types/bun":"^1.3.1","@vitest/coverage-istanbul":"^4.1.11","@vitest/ui":"^4.1.11","jsdom":"^27.0.1","publint":"^0.3.15","rimraf":"^6.0.1","tsdown":"^0.15.9","typescript":"^5.9.3","vite":"^8.0.10","vitest":"^4.1.11"},"dependencies":{"@airlib/core":"2.1.0"},"scripts":{"dev":"rimraf dist && tsdown --watch ./src","clean":"rimraf dist","build":"bun run clean && tsdown && publint","format":"biome format --write","test":"rimraf coverage && vitest --run","test:preview":"rimraf coverage && vitest --run && vite preview --outDir coverage","prepublish":"bun run format && bun run build"},"license":"MIT","_id":"@airlib/router@2.1.0","_integrity":"sha512-Zr/ToMdKxAT2lWsGB1xE4RfmZWZJSZLpix9uzYjTjBZucD5gzNPLCh3D3qVePE/QwYiqKyk16N/V/pPZbkS3Xw==","_nodeVersion":"24.3.0","_npmVersion":"10.8.3","shasum":"753c4e40352697e5cb60e888d453c44fca5dc77f","dist":{"integrity":"sha512-Zr/ToMdKxAT2lWsGB1xE4RfmZWZJSZLpix9uzYjTjBZucD5gzNPLCh3D3qVePE/QwYiqKyk16N/V/pPZbkS3Xw==","shasum":"753c4e40352697e5cb60e888d453c44fca5dc77f","tarball":"https://registry.npmjs.org/@airlib/router/-/router-2.1.0.tgz","fileCount":34,"unpackedSize":140509,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQD4Vs06PqZZvGysB5ICfR4yEj8Y+vJB3ljjDgZDuUqXGQIgQ34CmjYqWYQGeFiOzJEzdSrW149awcZmoC2peqGWUBk="}]},"_npmUser":{"name":"mahdaen","email":"mahdaen@gmail.com"},"maintainers":[{"name":"mahdaen","email":"mahdaen@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/router_2.1.0_1788182550971_0.3721053813283308"},"_hasShrinkwrap":false}},"time":{"created":"2026-08-28T20:55:33.133Z","modified":"2026-08-31T13:22:31.352Z","2.0.0":"2026-08-28T20:55:33.404Z","2.0.1":"2026-08-28T21:24:08.379Z","2.0.2":"2026-08-28T21:30:53.423Z","2.0.3":"2026-08-28T22:03:24.948Z","2.0.4":"2026-08-28T22:14:42.989Z","2.0.5":"2026-08-28T22:29:53.162Z","2.0.6":"2026-08-28T22:42:50.175Z","2.0.7":"2026-08-28T23:39:28.609Z","2.0.8":"2026-08-29T14:33:18.525Z","2.1.0":"2026-08-31T13:22:31.112Z"},"license":"MIT","maintainers":[{"name":"mahdaen","email":"mahdaen@gmail.com"}],"readme":"# @airlib/router\n\nA type-safe, reactive router for JavaScript and TypeScript applications. Part of the Anchor library ecosystem.\n\n## Features\n\n- **Type-Safe Routing** - Full TypeScript support with automatic type inference for route parameters and query strings\n- **Nested Routes** - Build hierarchical route structures with parent-child relationships\n- **Route Guards** - Protect routes with authentication and authorization checks\n- **Data Providers** - Load data asynchronously when routes activate\n- **Smart Caching** - LRU cache for URL matching with time-based expiration for provider data\n- **Reactive** - Integrates with `@airlib/core` for reactive state management\n- **Preloading** - Prefetch route data before navigation for instant transitions\n- **Redirects** - Declarative redirect handling with guard integration\n\n## Installation\n\n```bash\nnpm install @airlib/router\n# or\nbun add @airlib/router\n```\n\n## Quick Start\n\n```ts\nimport { createRouter, redirect } from '@airlib/router';\n\n// Create a router instance\nconst router = createRouter({ baseUrl: 'https://example.com' });\n\n// Define routes\nconst homeRoute = router.route('/');\nconst usersRoute = router.route('/users');\nconst userRoute = usersRoute.route('/:id');\n\n// Add guards for authentication\nuserRoute.guard(async ({ params }) => {\n  if (!await isAuthenticated()) {\n    throw redirect(loginRoute);\n  }\n});\n\n// Add data providers\nuserRoute.provide('user', async ({ params }) => {\n  return await fetchUser(params.id);\n});\n\n// Activate a route\nawait router.activate('/users/123');\n\n// Access active route data\nconsole.log(router.data.user);\nconsole.log(router.params.id);     // '123'\nconsole.log(router.path);          // 'users/:id'\n```\n\n## API Reference\n\n### Router\n\nThe main router class for managing routes and navigation.\n\n```ts\nimport { Router, createRouter } from '@airlib/router';\n\n// Create via constructor\nconst router = new Router({\n  baseUrl: 'https://example.com',\n  cacheSize: 100,\n  maxAge: 60000\n});\n\n// Or use the factory function\nconst router = createRouter({ baseUrl: 'https://example.com' });\n```\n\n#### Router Methods\n\n| Method | Description |\n|--------|-------------|\n| `route(path, options?)` | Creates a new route at the given path |\n| `find(url)` | Finds a matching route for the given URL |\n| `activate(url)` | Activates the route matching the URL |\n| `deactivate()` | Deactivates all currently active routes |\n| `preload(url)` | Preloads route data without activating |\n\n#### Router Properties\n\n| Property | Description |\n|----------|-------------|\n| `activeRoute` | The currently active route |\n| `activeContext` | Shared context with params, query, and data |\n| `activeSegments` | Array of active route segments |\n| `path` | The active route's path |\n| `data` | The active route's loaded data |\n| `query` | The active route's query parameters |\n| `params` | The active route's path parameters |\n\n### Route\n\nRepresents a single route with guards, providers, and nested routes.\n\n```ts\n// Create nested routes\nconst usersRoute = router.route('/users');\nconst userRoute = usersRoute.route('/:id');\nconst postsRoute = userRoute.route('/posts');\n\n// Index routes\nconst indexRoute = usersRoute.route('/'); // Matches '/users' exactly\n```\n\n#### Route Methods\n\n| Method | Description |\n|--------|-------------|\n| `route(path, options?)` | Creates a child route |\n| `guard(handler)` | Adds a navigation guard |\n| `provide(name, provider, options?)` | Adds a data provider |\n| `url(params?, query?)` | Generates a URL for this route |\n| `preload(context)` | Preloads route data |\n| `authenticate(context)` | Runs all guards |\n\n#### Route Properties\n\n| Property | Description |\n|----------|-------------|\n| `active` | Whether the route is currently active |\n| `data` | Loaded data for this route |\n| `params` | Route parameters (when active) |\n| `query` | Query parameters (when active) |\n| `path` | Full path including parent paths |\n| `name` | Route segment name |\n| `type` | Route type (static, dynamic, wildcard) |\n\n### Route Types\n\nRoutes are automatically classified by their path pattern:\n\n```ts\nimport { ROUTE_TYPE } from '@airlib/router';\n\n// Static route - fixed path\nrouter.route('/users'); // type: ROUTE_TYPE.STATIC\n\n// Dynamic route - parameterized\nrouter.route('/:id'); // type: ROUTE_TYPE.DYNAMIC\n\n// Wildcard route - catches all remaining segments\nrouter.route('/*'); // type: ROUTE_TYPE.WILDCARD\n```\n\n### Guards\n\nGuards protect routes from unauthorized access. Throw a `Redirect` or `Error` to block navigation.\n\n```ts\nimport { redirect } from '@airlib/router';\n\nroute.guard(async ({ params, query }) => {\n  // Check authentication\n  if (!await isAuthenticated()) {\n    throw redirect(loginRoute, { returnTo: router.activeRoute?.path });\n  }\n  \n  // Check authorization\n  if (!hasPermission(params.id)) {\n    throw new Error('Access denied');\n  }\n});\n```\n\n### Data Providers\n\nProviders load data when routes activate. Data is available in the active context.\n\n```ts\n// Simple provider\nroute.provide('user', async ({ params }) => {\n  return await fetchUser(params.id);\n});\n\n// With caching and retry options\nroute.provide('posts', async ({ params }) => {\n  return await fetchPosts(params.id);\n}, {\n  maxAge: 30000,    // Cache for 30 seconds\n  retries: 3,       // Retry 3 times on failure\n  retryDelay: 1000  // Wait 1s between retries\n});\n```\n\n### Redirects\n\nCreate redirects to navigate programmatically or from guards.\n\n```ts\nimport { redirect, redirectUrl, setRedirectHandler } from '@airlib/router';\n\n// Create a redirect\nconst r = redirect(loginRoute, { returnTo: '/dashboard' });\n\n// Get the redirect URL\nconst url = redirectUrl(r); // '/login?returnTo=/dashboard'\n\n// Set up redirect handling\nsetRedirectHandler((redirect) => {\n  window.location.href = redirectUrl(redirect);\n});\n\n// Use in guards\nroute.guard(async () => {\n  if (!isAuthenticated()) {\n    throw redirect(loginRoute);\n  }\n});\n```\n\n### Caching\n\nThe router includes two caching mechanisms:\n\n1. **URL Cache** - LRU cache for matched routes (configurable size)\n2. **Provider Cache** - Time-based expiration for provider data\n\n```ts\nconst router = createRouter({\n  cacheSize: 100,  // Max 100 URLs cached\n  maxAge: 60000    // Provider data cached for 60s\n});\n```\n\n## Type Inference\n\nThe router provides full type inference for parameters:\n\n```ts\n// Path params are automatically typed\nconst userRoute = usersRoute.route('/:id');\n// params: { id: string }\n\nconst postRoute = userRoute.route('/posts/:postId');\n// params: { id: string, postId: string }\n\n// Query params can be typed in the path\nconst searchRoute = router.route('/search?q(string)&page(number)');\n// query: { q?: string, page?: number }\n\n// Provider data is accumulated\nuserRoute.provide('user', async ({ params }) => {\n  return { name: 'John', email: 'john@example.com' };\n});\n// data: { user: { name: string, email: string } }\n```\n\n## Scripts\n\n| Script | Description |\n|--------|-------------|\n| `dev` | Start development mode with watch |\n| `build` | Build for production |\n| `test` | Run tests with Vitest |\n| `test:preview` | Run tests and preview coverage |\n| `format` | Format code with Biome |\n\n## License\n\nMIT\n","readmeFilename":"readme.md"}