{"_id":"@polywrap/uri-resolvers-js","_rev":"30-576b7888b2923c7a6db45d925f12d736","name":"@polywrap/uri-resolvers-js","dist-tags":{"latest":"0.12.2","pre":"0.12.0-pre.1"},"versions":{"0.8.0":{"name":"@polywrap/uri-resolvers-js","description":"Polywrap URI resolvers","version":"0.8.0","license":"MIT","repository":{"type":"git","url":"https://github.com/polywrap/monorepo.git"},"main":"build/index.js","scripts":{"build":"rimraf ./build && tsc --project tsconfig.build.json","lint":"eslint --color -c ../../../.eslintrc.js src/","test":"jest --passWithNoTests --runInBand --verbose","test:ci":"jest --passWithNoTests --runInBand --verbose","test:watch":"jest --watch --passWithNoTests --verbose"},"dependencies":{"@polywrap/core-js":"0.8.0","@polywrap/result":"0.8.0","@polywrap/wrap-manifest-types-js":"0.8.0"},"devDependencies":{"@polywrap/os-js":"0.8.0","@types/jest":"26.0.8","jest":"26.6.3","rimraf":"3.0.2","ts-jest":"26.5.4","ts-node":"8.10.2","typescript":"4.0.7"},"publishConfig":{"access":"public"},"_id":"@polywrap/uri-resolvers-js@0.8.0","dist":{"shasum":"d01c343ff02dad2e1dba8e64a741d4b21f6fa921","integrity":"sha512-oe3An27wUiiB9+RXtqFK6W1PG16mM2YWP0iMYxkhAe8RZ7fDSZ2/kpG0z7ezkO+KGfho55bEZuHfCyzPHxR4GA==","tarball":"https://registry.npmjs.org/@polywrap/uri-resolvers-js/-/uri-resolvers-js-0.8.0.tgz","fileCount":106,"unpackedSize":103613,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC26YCKpp6LiXMUwggyYYIZ5bZH+r6uyS2kfVL0g2V/oQIgODuNV8JdLSkNcAeXZbz49tYNn7zL/OjkMcq1S83kmy8="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjL0zrACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpmNw//TbcEsi+n7lYDa0xfpdGvI291K2/vAA+beUqNB2d73TStOUNw\r\n81/rL4Y6URsO4CJvJV9OA51pcmFbLZjvNP/bJ43PIjufmzAZKWrEZMSOdfpf\r\nnt7Wnt4bQkbrbR4IeJix0VyGioEm4q/MHqW9ahmVrOdIte1z6qkZ84UalvLH\r\nOJmEioDeIBMaj76nUBcoICOtCpCRo4obIRGR6xhIpkrjJ0yUvRLxdg6nWUZJ\r\n3bSVTTay+dZclG64UDSifhgIpk1SMN+r++kFuDcIr4JQw2Ef6ssLOvaZNH+B\r\nnPZpnSDxLY22cEX3zbJ+16/rIo2JycMOyAPu1HXsPIiiKjjb9NOoo/17g3KH\r\nW7IdLS0kOgeTJ+E3Zm+cBoeBK/89u0RJJLezf7xGWAfl33+PL2X9RWW+vEM9\r\nLpHPDtQDfDjrk5z+0pP67CBzZfOmQoeWiHx1yZDtnRXO/rcssEq1+g5dbpfX\r\nyRkqXBefocLdrQJBmTsuN4/Pg2dmuBeI+qk6g9YspyGvwsju6FNFH0RgiOog\r\ncJdlIZ/9XlmuIxB3fjmb5GKeJHea4XOUCYn4NZtb+A4n7gqJmMzF4V5yRa5g\r\ndD0Xr5M4J4a4JBcBva/uu4ekCpm+wlEGcihEEhFsyWScp5SW4NRFpjO+fztn\r\nUa5b6HYQ379oWtMrb/GasUqR+nDhngo5ql4=\r\n=wxTi\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"polywrap-build-bot","email":"build-bot@polywrap.io"},"directories":{},"maintainers":[{"name":"polywrap-build-bot","email":"build-bot@polywrap.io"},{"name":"dorgjelli","email":"jelli@dorg.tech"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/uri-resolvers-js_0.8.0_1664044267046_0.6078360925960018"},"_hasShrinkwrap":false},"0.9.0":{"name":"@polywrap/uri-resolvers-js","description":"Polywrap URI resolvers","version":"0.9.0","license":"MIT","repository":{"type":"git","url":"https://github.com/polywrap/monorepo.git"},"main":"build/index.js","scripts":{"build":"rimraf ./build && tsc --project tsconfig.build.json","lint":"eslint --color -c ../../../.eslintrc.js src/","test":"jest --passWithNoTests --runInBand --verbose","test:ci":"jest --passWithNoTests --runInBand --verbose","test:watch":"jest --watch --passWithNoTests --verbose"},"dependencies":{"@polywrap/core-js":"0.9.0","@polywrap/result":"0.9.0","@polywrap/wrap-manifest-types-js":"0.9.0"},"devDependencies":{"@polywrap/os-js":"0.9.0","@types/jest":"26.0.8","jest":"26.6.3","rimraf":"3.0.2","ts-jest":"26.5.4","ts-node":"8.10.2","typescript":"4.0.7"},"publishConfig":{"access":"public"},"_id":"@polywrap/uri-resolvers-js@0.9.0","dist":{"shasum":"315aa8cb2ec2011418277c4e313caec1055c8a89","integrity":"sha512-TZM+3FqH6Ebu+ejRdITCc0F2JmbbmZKThrWpr/ttpmBhHaU31iAC3vm8YYFhjN+mDdpfy/RUkEpqqx4VQbTuAA==","tarball":"https://registry.npmjs.org/@polywrap/uri-resolvers-js/-/uri-resolvers-js-0.9.0.tgz","fileCount":106,"unpackedSize":103580,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCQESyERwhDhdt7wKiVu/VolYTpmT2CRLWv/n3//FpZIwIgUW5+PwW4cmufZlJd06Ix5a3W07rRyjQCfB2eOG4VS78="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjQ+l9ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqUzA/+MTNpWaT/FhDkddyqmXXRx34ZtwK1E/YfuvR+AsZKy8SjXIaa\r\nNhRNOesFSQkOBHHjFm3JfZ/dXBr+WnhiYqn2LVlcXH5Oe7L5vIXGEvP9pohp\r\nN47eSKKdNpXxXtDuyEF+HctuGAYl7IVSJY+HnVEXctb6lM5w0EUEX9dEJioB\r\nrfwEO788R60fak4qqX+EvCF33uC/TI4TXn2JP1u7ajgNh/Gxocwpbd2HJTSy\r\nw+ro7K3ZSlUTYqdjJPLIv6jAEREHq/5fsrACZv5f6Fp9TruFv4jpyto443Cu\r\nv/OD+v4XV8p+CxR5/niHjndA5qumtUKGpOC/tdayYSkFYkZgf8BjI6d8B8k0\r\niW2GGCS7rOSvgJZxP7jdpo1r67h625SN/UXJ2mN8ksKVcHRwrUDe8QI8NulG\r\nHsn4lGL9ikZ5R6LsaynPzHPXWR2195Wi6ml7BR9cvMp/DbcM3zKrVcrB0nxs\r\n2TV4CzDul6gw2kJw7PtPxeBiwW+ycwW3yp4AdYlsT2ThEQC+cjeQ4V+I2hKs\r\nZ2KWoTzWD/k65EV7wLmSlyNUqdnhm93OnTASb80FYXSEHNQGw7tubAgwA+R3\r\nIhnEVsiXvX1IuGBgWYwxWNeoJL5laCxylopDnJG7989MMvbNOUY7MajnAp9s\r\n2S5zcLpTu1uG1aGqpEkjd4ijELXU0B4U6ro=\r\n=DP7o\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"polywrap-build-bot","email":"build-bot@polywrap.io"},"directories":{},"maintainers":[{"name":"polywrap-build-bot","email":"build-bot@polywrap.io"},{"name":"dorgjelli","email":"jelli@dorg.tech"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/uri-resolvers-js_0.9.0_1665395069058_0.453895146099925"},"_hasShrinkwrap":false},"0.9.1":{"name":"@polywrap/uri-resolvers-js","description":"Polywrap URI resolvers","version":"0.9.1","license":"MIT","repository":{"type":"git","url":"https://github.com/polywrap/monorepo.git"},"main":"build/index.js","scripts":{"build":"rimraf ./build && tsc --project tsconfig.build.json","lint":"eslint --color -c ../../../.eslintrc.js src/","test":"jest --passWithNoTests --runInBand --verbose","test:ci":"jest --passWithNoTests --runInBand --verbose","test:watch":"jest --watch --passWithNoTests --verbose"},"dependencies":{"@polywrap/core-js":"0.9.1","@polywrap/result":"0.9.1","@polywrap/wrap-manifest-types-js":"0.9.1"},"devDependencies":{"@polywrap/os-js":"0.9.1","@types/jest":"26.0.8","jest":"26.6.3","rimraf":"3.0.2","ts-jest":"26.5.4","ts-node":"8.10.2","typescript":"4.1.6"},"publishConfig":{"access":"public"},"_id":"@polywrap/uri-resolvers-js@0.9.1","dist":{"shasum":"b6db62d42d3e73929e09949e055195128c0f40ea","integrity":"sha512-7o6ixGN4X4LNkQdY2TMXysRmh8W09IweRkeu5Q9UowjkGV5/NEG3npGFclBtK+fTZlROYjGGW5C0wgx70B8q9w==","tarball":"https://registry.npmjs.org/@polywrap/uri-resolvers-js/-/uri-resolvers-js-0.9.1.tgz","fileCount":106,"unpackedSize":103797,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCX5rUYunTGKRwWJPcDIHjuJyaGdD9zUV0LCqEvkyqEbQIhAPZ6pJV3O5GkWCxJwBrTWfv/ZaHJtESMu5P/W+hIl5ha"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjR0EEACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmon5xAAlmU0BP6OWfs88PLeC9SsQ6snUGr6Pj8W0wqRQE2iVBybnyGd\r\nHLJ2Hln0o1m6sD8/rQgxgebHlZWCURXrh1yfOFaTdqoXKvTjlxh25XUIDP7Y\r\nTYLDAfeDinvo55TA8dAD7bgXJHGMrZptVtWdl1mr5iLVvMthH5ReNhtZX4tp\r\niH+In0Qbz5U1NXVT3yzobmuaJ37jYg629DX3sEmXorgZfRDouATQqbkEmUlq\r\nta+lys1Wvqs/c7LgpClO7/64KN+adIJtUqDBelXZPRdvnVgQaYWICVk1y8aq\r\nWT56trlJrsiskenDfpUj7sk27eknDvytUovXnn5dQEM4mjdFS7Qzqool+0Vt\r\nz5m0UbCKRWIEoQPhM3GfXeM1eIiBcfW0bfoAOhjpAH8o3CP2QAGoUF0RvfPy\r\npjeo2x8ev8GGTIWQsmuEaKSlspNBrYk16ERnOm74KMFgqH8JcaPGt55IZJxN\r\n0umCuqhdfRg6APd/UHkNDcsilmMFMxzNLePosL6GXxQIXLRSHzp7/UumVncO\r\nwZKAvjgLFgMUzF/CGKlYza5TuFVZqJSIMqwUlHCzqFZa7iJwcoPdh30ltXxr\r\n3XNSzG50P+J3kf9H/xoeykjIwfwmsD1GEP7bg587GcHA+YzNUpAOv3hJaBye\r\n6Jw+u1qjebuJqLvf5E1lX0x07A8lV6vhARA=\r\n=ze7P\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"polywrap-build-bot","email":"build-bot@polywrap.io"},"directories":{},"maintainers":[{"name":"polywrap-build-bot","email":"build-bot@polywrap.io"},{"name":"dorgjelli","email":"jelli@dorg.tech"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/uri-resolvers-js_0.9.1_1665614084208_0.5516847271380989"},"_hasShrinkwrap":false},"0.9.2":{"name":"@polywrap/uri-resolvers-js","description":"Polywrap URI resolvers","version":"0.9.2","license":"MIT","repository":{"type":"git","url":"https://github.com/polywrap/monorepo.git"},"main":"build/index.js","scripts":{"build":"rimraf ./build && tsc --project tsconfig.build.json","lint":"eslint --color -c ../../../.eslintrc.js src/","test":"jest --passWithNoTests --runInBand --verbose","test:ci":"jest --passWithNoTests --runInBand --verbose","test:watch":"jest --watch --passWithNoTests --verbose"},"dependencies":{"@polywrap/core-js":"0.9.2","@polywrap/result":"0.9.2","@polywrap/wrap-manifest-types-js":"0.9.2"},"devDependencies":{"@polywrap/os-js":"0.9.2","@types/jest":"26.0.8","jest":"26.6.3","rimraf":"3.0.2","ts-jest":"26.5.4","ts-node":"8.10.2","typescript":"4.1.6"},"publishConfig":{"access":"public"},"_id":"@polywrap/uri-resolvers-js@0.9.2","dist":{"shasum":"ecaddf6b44ac6b902fe0a1bb38c50a2ed96a5fc5","integrity":"sha512-NY9gYBcTC0c7fnaN2OftmD6HAdQcSXUt33XqzhFw1+L8jW6ZUEDsraw5gYjDhMwBk8VvcsexZKv9T1pd8gnrjQ==","tarball":"https://registry.npmjs.org/@polywrap/uri-resolvers-js/-/uri-resolvers-js-0.9.2.tgz","fileCount":106,"unpackedSize":103797,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDDd2whpdEC1GQTMX+3KkGcun91IhSHsJx9raQMthzwgwIhAN1zXEKqUMpZG8QAKiP8VxEXLigkZ3FBwL6l4y9cs5xF"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjSJOiACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmq+5w//V77n0Pc7fD+ftfze2OF1weOrTIotahnIFwD7Vd49HkIXJPCX\r\nAigUfEB57ABfsLaz5mmSTsC+yAGmTj4RTPpLqBv9xXi8RbvP7uiOi6f3+qp/\r\nVhmCOYpulpXMQRACtOxX/3CqLs/HDZF4osC6B2TET5geWhe3hTR09kHgmObV\r\nQGAhvragyWi19axYDKqdxSECRVAfzgfReaEAEWEO0tdNthC64y2J5Ild9HA9\r\nQJzd1K5KH5DDjLvCb6kFNzfE8JEmO6LQ8BbStnZkpLlSsFjT52yP6hloEVs4\r\n2Cs5LK5RisogIblZG76rrAvzByZxa7PMQAE010Y2qA7pltI4MwcHe/lBt5lo\r\nC0AxW6x49Gblv3j2IuzlXa/B2kDWDjTRFRh2miAXrxq+seVcgOWLX2ZVVvyR\r\n8B4OadDxUt9jYsJ483NPHphsKsA2nAtlJzSqQfV+fqNJAGBxhvsMSXX7GWp8\r\nZuBMg+3hzqZiIwR6wTzA5v8EULePpZYEKJemFCDD3vqIyfTW5qoyujAz8acF\r\nmw1Iu26KA3Jrd61kggj5rrFO3EG2f0KbZLDZAih9V4r9psyagOoPLUNI0hxG\r\nePKcDQ7JjCy9kr+HPYul4ME53yckWDvx8TJ+LnTazhhSChejr5CIaIZoFsZR\r\nDF5tV0V0Pog/1I7yepDsm9jbe8fapywbu5Y=\r\n=9346\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"polywrap-build-bot","email":"build-bot@polywrap.io"},"directories":{},"maintainers":[{"name":"polywrap-build-bot","email":"build-bot@polywrap.io"},{"name":"dorgjelli","email":"jelli@dorg.tech"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/uri-resolvers-js_0.9.2_1665700770358_0.4648380822381226"},"_hasShrinkwrap":false},"0.9.3":{"name":"@polywrap/uri-resolvers-js","description":"Polywrap URI resolvers","version":"0.9.3","license":"MIT","repository":{"type":"git","url":"https://github.com/polywrap/monorepo.git"},"main":"build/index.js","scripts":{"build":"rimraf ./build && tsc --project tsconfig.build.json","lint":"eslint --color -c ../../../.eslintrc.js src/","test":"jest --passWithNoTests --runInBand --verbose","test:ci":"jest --passWithNoTests --runInBand --verbose","test:watch":"jest --watch --passWithNoTests --verbose"},"dependencies":{"@polywrap/core-js":"0.9.3","@polywrap/result":"0.9.3","@polywrap/wrap-manifest-types-js":"0.9.3"},"devDependencies":{"@polywrap/os-js":"0.9.3","@types/jest":"26.0.8","jest":"26.6.3","rimraf":"3.0.2","ts-jest":"26.5.4","ts-node":"8.10.2","typescript":"4.1.6"},"publishConfig":{"access":"public"},"_id":"@polywrap/uri-resolvers-js@0.9.3","dist":{"shasum":"f3670395bc987c82d4662fe2fbaadb3e7a41f436","integrity":"sha512-ziCHgRT6VlrJqX0bepyLFxtTIs6AItiBBNBKDamOF3Xt8qkjJ1tdyLN1j5N8EPtwjXVLyMgQ+pnxbDDMFBeXMg==","tarball":"https://registry.npmjs.org/@polywrap/uri-resolvers-js/-/uri-resolvers-js-0.9.3.tgz","fileCount":106,"unpackedSize":103797,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCFXoEmm9VmFTapea7UaE2PttVD7xpSp16s66w2d46gJQIhAIVzL4h8X2JBaQOM3PHivXZ9whPs+/Rj8FGRc8K/dJ4g"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjUSPkACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmp71g/9HJbrP6gs5auUMfOgzn83S/rucuSvLMtnf7e+aUFpmylXuwkQ\r\nafhAUZnEZFC2B7Ft2kfRGtmmCTqZsNci2s64UY09U8kThkSEtUrc8WZ5vpL7\r\nmja8MOmeWfuTv4Tx0htxMypVN5lF24CvL++yGK2A3kDiWuq2Nkn/yAXj+Oun\r\na4NEa9HNvXO7c6NJEEzX9TLPdnCxFV6PR92KE8oyPDenkekBg4oSY3xZwTG/\r\n5SZoKCp1lgiIeuaEXu8QD1VmLRkbjBUm6LdnD33F+slBVbhmWO6eaG2zp22Y\r\nEaktgo8s3pIl6DDt8eHvaGide/Dw+A4wFDL0onYKENQZQFznVyqpK0JaNwId\r\noiS9v3LUDAwRxIT2qGc1IdWoRmbl7pXxLsIZKq2d58x7JAhc3nfaPrAXXMtN\r\nQE21bstK44KDDZ2d6LYcR8qviSiYSqo0OO0n24HWJ+9BSkYLU0lln+4SvRTG\r\ndRuF1GKwS1F/FTcshnkomTY1iyn3cV/CqzmGKhGkPCzZl6jNWryiBSKmICNl\r\nfIohb6BmbsnviqUmev9WNoFwcOY1shsrPQx6b6+VQ5z+5l+owje8dFAE0H7y\r\nFN0H1OT+Bs3DVixWaIe9ROPVsHDkhRoVAc+CLpBGO3KDYHO1ApvBdM0OQ4oh\r\ndy5m+U+245nh86zdo4poi4RAnY1S3orUCvQ=\r\n=d0B/\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"polywrap-build-bot","email":"build-bot@polywrap.io"},"directories":{},"maintainers":[{"name":"polywrap-build-bot","email":"build-bot@polywrap.io"},{"name":"dorgjelli","email":"jelli@dorg.tech"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/uri-resolvers-js_0.9.3_1666261988392_0.10519843398932838"},"_hasShrinkwrap":false},"0.9.4":{"name":"@polywrap/uri-resolvers-js","description":"Polywrap URI resolvers","version":"0.9.4","license":"MIT","repository":{"type":"git","url":"https://github.com/polywrap/monorepo.git"},"main":"build/index.js","scripts":{"build":"rimraf ./build && tsc --project tsconfig.build.json","lint":"eslint --color -c ../../../.eslintrc.js src/","test":"jest --passWithNoTests --runInBand --verbose","test:ci":"jest --passWithNoTests --runInBand --verbose","test:watch":"jest --watch --passWithNoTests --verbose"},"dependencies":{"@polywrap/core-js":"0.9.4","@polywrap/result":"0.9.4","@polywrap/wrap-manifest-types-js":"0.9.4"},"devDependencies":{"@polywrap/os-js":"0.9.4","@types/jest":"26.0.8","jest":"26.6.3","rimraf":"3.0.2","ts-jest":"26.5.4","ts-node":"8.10.2","typescript":"4.1.6"},"publishConfig":{"access":"public"},"_id":"@polywrap/uri-resolvers-js@0.9.4","dist":{"shasum":"4ad44fbcdced3ad3b952b105f86af1f4d27c10a2","integrity":"sha512-TCnFo8rud+rW1xtUara4U6LKQoiQN5wBGIKG+/aSjBysT9Wpci0UrYltim4eBIJIIPYqBJIivdUzJV1VX4i5mQ==","tarball":"https://registry.npmjs.org/@polywrap/uri-resolvers-js/-/uri-resolvers-js-0.9.4.tgz","fileCount":106,"unpackedSize":103797,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFakOoNcTThaXlWOJshs7yyX0kTjoxP+jN8CERdVN4sPAiEAqqq/q/BfKffosuufYvKNRadInvSRwL5eugFaLOMoynw="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjZG9KACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoSrA//XoryuJnxPmGgz8jJrYqjuGTRhvbeUWsIXFrgS1nuaeMQ1dM/\r\nuGeMI1btfPAlYxojQj07IcnImLViSc2qcpc/3N0J7g5jAjIteuO9cwDb5Gey\r\nps5CnMukvJIJw34zKQyLGQ+KDfvscY9GYBC7OgyLLu4E29VgWyagqenQFOwD\r\nS5aHhY9uumgRZ9in8J18nu5eGh2NJzxop4HvlUlVGf9tDRFyf0FByyrm7T6B\r\nPZb59QDnYEFJoB8dY418HjLb3K9fWlnpweB/u485aiO1r8WAbMpTDQc+FtoX\r\n/hJ/debwcGS1B8nZ18Z0kr5HG//z5DCvRIXNyZRiAime0Gbe9Hl2v8eNI79u\r\nlqCNV8GA+7wHonJUCVailaDz2YoXURHiuSJcjyIdKBkqOA68Q/ya2MeUHK8v\r\nzDOiorHjdXIOZwWqQm8tdEbrhvEcNC7JXLHWh7kZzmqY0LmNMmnmMRaPHuUM\r\njIKGXqUmYo5fMR+gTDLifJIA4p1LXTUbKoA5qOGzUIY4z4XzA11ZF/xBX/So\r\nqr4+gYUbzboPdx3DppZCPteM6/eHHJ4uE2xXRrK8zIw8tkoIeKudpZWOHaNm\r\nzk7ymKZK/RdWf13UXLTMcp6I+wT3pdUP3r7rx9rDmeztyxnYNR9nF77WCmn6\r\nmbe2RptKVT62LOyzcrKOmuHnPTH54vNi1es=\r\n=AxvT\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"polywrap-build-bot","email":"build-bot@polywrap.io"},"directories":{},"maintainers":[{"name":"polywrap-build-bot","email":"build-bot@polywrap.io"},{"name":"dorgjelli","email":"jelli@dorg.tech"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/uri-resolvers-js_0.9.4_1667526473896_0.7063800355007828"},"_hasShrinkwrap":false},"0.10.0-pre.0":{"name":"@polywrap/uri-resolvers-js","description":"Polywrap URI resolvers","version":"0.10.0-pre.0","license":"MIT","repository":{"type":"git","url":"https://github.com/polywrap/monorepo.git"},"main":"build/index.js","scripts":{"build":"rimraf ./build && tsc --project tsconfig.build.json","lint":"eslint --color -c ../../../.eslintrc.js src/","test":"jest --passWithNoTests --runInBand --verbose","test:ci":"jest --passWithNoTests --runInBand --verbose","test:watch":"jest --watch --passWithNoTests --verbose"},"dependencies":{"@polywrap/core-js":"0.10.0-pre.0","@polywrap/result":"0.10.0-pre.0","@polywrap/wrap-manifest-types-js":"0.10.0-pre.0"},"devDependencies":{"@types/jest":"26.0.8","jest":"26.6.3","rimraf":"3.0.2","ts-jest":"26.5.4","ts-node":"8.10.2","typescript":"4.1.6"},"publishConfig":{"access":"public"},"_id":"@polywrap/uri-resolvers-js@0.10.0-pre.0","dist":{"shasum":"c03056a9d18ba717954abe108d252adae329e659","integrity":"sha512-+bYdzl8XBwYlVUZzzFFrcNRFC/YZHq+QFA61NgP1o0LwYwgStcyosaMWFO3LJlx2pC0qNFrTtv2BJ+DzEocY0g==","tarball":"https://registry.npmjs.org/@polywrap/uri-resolvers-js/-/uri-resolvers-js-0.10.0-pre.0.tgz","fileCount":106,"unpackedSize":113905,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDLIoFYRMpNMyTLasjbje47OT4T8y2/Pr0LNWfDOHhhSAIhANGCwq4Z7vUkdKgPHgIWjlCAmRxXkibBuHiSFWiEz3kY"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjZg+UACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpF9g/+MkG4WC2GBoO1d8PKBPNRltp47UMp0y9iyYvb2bK/VzL8579U\r\nldhQ8p9e8NvQm32mu5NkOyd/SsEpI3lfriBLNVkeZZKSuKt0FM0QB22oYVFU\r\nOEkYP/yLYqPzGcoBBPAoyDjdcu+4U//Pas0lmpY1yj/4YeqQl0dek/DUftCy\r\n/ugp5xOWlYQ3vVtifvA0yPJqoR9+Dn91SlXuVPeg01QJ4eRk+NWgrbZ9RYFD\r\n0l7cMdwcJoqm+soBQcURmZRCl3nG0WaN5g4+bhelJu669nwuU39i2Zo0h/8e\r\neJt2NWjPw69Gfzp4pCJ4EA8TZkrcmhGw/ZJdqLzGI4SGpwsSy+ei9biu2ev5\r\nkikXjOYEKRciWiiKLH/xWcky8yc6IUBgLLhE0FCPBOFj+LuKPEU0We+/c26u\r\n8nqWawhfaGnr2oueQswyS65Qe5UFt9DT7iqhEohltn7jeOeANbURce5c6zDK\r\nTEGUOI0rOdcNMvwvrSAMOv2V96lryN7yIEgGpnSxKYFPeQonQ/cKBH4/ArzL\r\nI7mIsc/5nfyO5IRfew4m8mM1VRnECQz2i2QcJEOH22oDg3eCtXo3OOXJv762\r\n2KsTkDzaOgTCI9Jkg/qL2xX2jerXN9py1IfspM5w7kapbhaqa0zAKgVupaX3\r\nbBHrB9h4ZXiVPXtrgrRjvIT3RSgEx9xymq8=\r\n=R/Bp\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"polywrap-build-bot","email":"build-bot@polywrap.io"},"directories":{},"maintainers":[{"name":"polywrap-build-bot","email":"build-bot@polywrap.io"},{"name":"dorgjelli","email":"jelli@dorg.tech"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/uri-resolvers-js_0.10.0-pre.0_1667633043924_0.3230774078581049"},"_hasShrinkwrap":false},"0.10.0-pre.1":{"name":"@polywrap/uri-resolvers-js","description":"Polywrap URI resolvers","version":"0.10.0-pre.1","license":"MIT","repository":{"type":"git","url":"https://github.com/polywrap/monorepo.git"},"main":"build/index.js","scripts":{"build":"rimraf ./build && tsc --project tsconfig.build.json","lint":"eslint --color -c ../../../.eslintrc.js src/","test":"jest --passWithNoTests --runInBand --verbose","test:ci":"jest --passWithNoTests --runInBand --verbose","test:watch":"jest --watch --passWithNoTests --verbose"},"dependencies":{"@polywrap/core-js":"0.10.0-pre.1","@polywrap/result":"0.10.0-pre.1","@polywrap/wrap-manifest-types-js":"0.10.0-pre.1"},"devDependencies":{"@types/jest":"26.0.8","jest":"26.6.3","rimraf":"3.0.2","ts-jest":"26.5.4","ts-node":"8.10.2","typescript":"4.1.6"},"publishConfig":{"access":"public"},"_id":"@polywrap/uri-resolvers-js@0.10.0-pre.1","dist":{"shasum":"eb30e8448a88d17686dfea7410e29b990930ab74","integrity":"sha512-yFD4x/2No+7JyWOZJ2B2KAyQTdrgoGLxT+XvzB5dC2cHqbvDP8IJIT5EhVkXRKicWZQ8qj/mw9J9ICrcRxps2g==","tarball":"https://registry.npmjs.org/@polywrap/uri-resolvers-js/-/uri-resolvers-js-0.10.0-pre.1.tgz","fileCount":106,"unpackedSize":114578,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGriQtxQOqTxDYsjyqa7x4dl/AC0DFTMaSNj8r0FhuWRAiB62TRfIUIZ6XGqUKjE5rSPhGv8aKDwf03cg5t2sMWAiw=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjb99wACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqiOA/9H6zNB1VuhqqmBmuw6jBWQ2mwUvc/Rpiw4sxT0mz3zDesItwM\r\nOES9f9mUEYdMqn/L/Lzas0FEj3UILwfRY1adW+KxNs+acFR7Ed354oFSOPiw\r\nFOtpRPEBIpEReBvfKeVds3NabB0PmlQ+4qT/szaxSpwjF/t553hzsQ2hoMnp\r\n7kxIVj47gAxYgd9cV58C91B2HrtJzRmH+N7lXy9cnWiYtZrf5DCB84ouNVh0\r\nbktRMftpPbFX9psGQ7ofRUH+7JPwzy+fUtpSYeebrqrZZO5srOkyAuzZvqUO\r\n4ffQ54ELyfup0hKjN4GB/vgRaJWDIM0LMZdH+j6a/rUUzfoYbx4o3QkWyYUa\r\nQSYoZA/B2jFDcyY7Nj1cYGfdqp2hrsgQAGHEO5auYpH5I9E/sTkv7+HyNDVQ\r\nEA/eiPxdAxs9J2ogTI/m4JBMrkwBsczJpdUkabE8SsDlSGiRVHe1jf3Rv2Xt\r\n3HrziLy8Ivp1a4JEwKoMeyUGwFPMHPaGYBGMRuWiMjxC1ygwMrhMijyA4D4V\r\n/TA2Di3aD9tW9TK8hGWnp0hXzRiiRNtRlUZu+ZXR5Iz7IaFqbllkUD0sKyO/\r\n/9rWiJTnikGPiC9olCzXLwZHTt5qtU1qxXJh2H4zUBhHoInl8SbcIBUv+yRZ\r\nxgMhwiNPEpd90fYgnI4HoZZPwSnwdb0CcPI=\r\n=nb7v\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"polywrap-build-bot","email":"build-bot@polywrap.io"},"directories":{},"maintainers":[{"name":"polywrap-build-bot","email":"build-bot@polywrap.io"},{"name":"dorgjelli","email":"jelli@dorg.tech"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/uri-resolvers-js_0.10.0-pre.1_1668276080451_0.4378490232016836"},"_hasShrinkwrap":false},"0.10.0-pre.3":{"name":"@polywrap/uri-resolvers-js","description":"Polywrap URI resolvers","version":"0.10.0-pre.3","license":"MIT","repository":{"type":"git","url":"https://github.com/polywrap/monorepo.git"},"main":"build/index.js","scripts":{"build":"rimraf ./build && tsc --project tsconfig.build.json","lint":"eslint --color -c ../../../.eslintrc.js src/","test":"jest --passWithNoTests --runInBand --verbose","test:ci":"jest --passWithNoTests --runInBand --verbose","test:watch":"jest --watch --passWithNoTests --verbose"},"dependencies":{"@polywrap/core-js":"0.10.0-pre.3","@polywrap/result":"0.10.0-pre.3","@polywrap/wrap-manifest-types-js":"0.10.0-pre.3"},"devDependencies":{"@types/jest":"26.0.8","jest":"26.6.3","rimraf":"3.0.2","ts-jest":"26.5.4","ts-node":"8.10.2","typescript":"4.1.6"},"publishConfig":{"access":"public"},"readmeFilename":"README.md","readme":"# @polywrap/uri-resolvers\n\n## Description \n\nURI resolvers to customize URI resolution inside of the Polywrap Client.\n","_id":"@polywrap/uri-resolvers-js@0.10.0-pre.3","dist":{"shasum":"767d4785a455cb780279bab2bbbde8498e3a08de","integrity":"sha512-3IxcmJCDyHcR7xDvw5YCWTFyLc5xwPLxm4ayMEeQQP3W9t54BROHlVpK/XyFXkfejeov4eT0Azf1GXRyoUOHvg==","tarball":"https://registry.npmjs.org/@polywrap/uri-resolvers-js/-/uri-resolvers-js-0.10.0-pre.3.tgz","fileCount":106,"unpackedSize":114578,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFEINX6G9OwXBHb38ZMXJatXowo7c4fwxu9fCevy6DB0AiEAgWxkIe0lro+ory4mIpn0Pn4EFZRnoNadHvdJwLUuF54="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjcDyCACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoQWg//ceZnuOxiEro+43soOvLFsvXi/1vyjW9LiK8N6p/O1RIjNH4f\r\n8lq0zje14NMeKmGBd3z0QkV60AHSctq8IGH9MHiQHXIGlXvCY4mba87TSMmy\r\nxpHzLImhCwl3BuIh81NlK5u9iXniM9zapsCWPoZjhMcd+Y+8pOWPduCSfH6t\r\nE2YhTut72sQG9kNIYpHa64vr9/xuWmPqeoDdgjQ7LG7jOSTa+vto9+hjC87v\r\n12ouIwRUuqeqaZHUOjapDMxiA/cEx9/bqJiJV5AJASOGVfMgN6ziQrDUVFxG\r\n8FENccFmyCxeQVEOpFyHG/noItHKk7GA2EWSlo4JIBFuo9jc0uIq0ocCPWOj\r\n6dSvJV5s8JU48km8LU/atOEp6muMnoMVjzEqky/Kq5U2MIuKuHIo7xEosH6i\r\ncAJKdSKgLgxoKe1Ats80fO8BuLWB45IfH9lgas9/Ry4/Jt9LHZTXybGPK+vo\r\n1G57aBGK34jGmo+MMA9ebQ8T1mlmkNYSToe9o8t7a7BzSSUBIbzUrhJB0qPB\r\nIukoMKSYD2pht08euR2ptV7aOcZZUbuimmo9dte5NgefifhvnlDDOEq52w13\r\nrCV/DIBjqJqHlAflM3+h25AIofO3npzlvwu9fZND1fsko7/+YA+7t/NMyyiH\r\n8RGiNqmnQDGGMjIfuTioxW3JCh7KGgE0bUY=\r\n=JOWu\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"polywrap-build-bot","email":"build-bot@polywrap.io"},"directories":{},"maintainers":[{"name":"polywrap-build-bot","email":"build-bot@polywrap.io"},{"name":"dorgjelli","email":"jelli@dorg.tech"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/uri-resolvers-js_0.10.0-pre.3_1668299906115_0.5963677997167967"},"_hasShrinkwrap":false},"0.10.0-pre.4":{"name":"@polywrap/uri-resolvers-js","description":"Polywrap URI resolvers","version":"0.10.0-pre.4","license":"MIT","repository":{"type":"git","url":"https://github.com/polywrap/monorepo.git"},"main":"build/index.js","scripts":{"build":"rimraf ./build && tsc --project tsconfig.build.json","lint":"eslint --color -c ../../../.eslintrc.js src/","test":"jest --passWithNoTests --runInBand --verbose","test:ci":"jest --passWithNoTests --runInBand --verbose","test:watch":"jest --watch --passWithNoTests --verbose"},"dependencies":{"@polywrap/core-js":"0.10.0-pre.4","@polywrap/result":"0.10.0-pre.4","@polywrap/wrap-manifest-types-js":"0.10.0-pre.4"},"devDependencies":{"@types/jest":"26.0.8","jest":"26.6.3","rimraf":"3.0.2","ts-jest":"26.5.4","ts-node":"8.10.2","typescript":"4.1.6"},"publishConfig":{"access":"public"},"readmeFilename":"README.md","readme":"# @polywrap/uri-resolvers\n\n## Description \n\nURI resolvers to customize URI resolution inside of the Polywrap Client.\n","_id":"@polywrap/uri-resolvers-js@0.10.0-pre.4","dist":{"shasum":"0884681ce15d3b1425ec1fd3a73afa49ebff2160","integrity":"sha512-eZQx6038hd0syEGCxWwd0EuGmPNbPzcPUJwVSYogq7szseyqRXZO7N44WTJ421828i97pYbgBmHnji5OZLbtYQ==","tarball":"https://registry.npmjs.org/@polywrap/uri-resolvers-js/-/uri-resolvers-js-0.10.0-pre.4.tgz","fileCount":99,"unpackedSize":108871,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFIl7I2zg1ObEcBs6mMACT4LGIkflfNSLbLnE26Xkb3zAiBNy5MWLwQs/09/MiyPoZrjds1PfKshrQXyeweeqR1l+A=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjdSq5ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmp17A//a34NelEvfZFhDPCINXevyE00zDTbcX4wLcpViPZMngEBjaxy\r\n8VMgr2HBptbrsLpt+bFS9r1e38ni72954rekZICRX72VadZ9QMA2dx5Ubn23\r\n0/bp+8lZsSVBJEWftDOBdmGfC7uaNYoNvEviPVt/I/Kxqc3DzNVmXPrzEr5h\r\nSQFPvl/IGqCOdbHq3zLkoPlsjfMD5EW2OhNvt+urDaBbcVetDONeuy54ERlT\r\nLEo8GsBAyg/VnG64ttCS+fOp5sm/cSHTBTDj91xRPB1ndiclmV6IvzVUVB7l\r\nN0Xo1DL11zrEVlM8KArO4WzxmgGcZg+4t0ddeZBxL3zpVYA4H8MVcmltdqZT\r\n3W32lr9Ppb0hA9cMGQ+WSY/q6945vdm4S1YjV3Y8/9ynUCOmC1ng4R4BSsvW\r\nAKQde7II6WMhSnrmX2155dznTco/XXQmyAxmr8hWpb/Kom29TFtEBm9D28EJ\r\nFDv5wNvdzFTydm3G2b35mbn7ng1yaUKizpF8/Yy4tLLIXqRbCNG4bM2FtdPL\r\nIn3LOITMaTk845z4R5xW86d3k67Cz2XnojWmvPx5ogmGl2lQC1xQ0WAR+bzP\r\nscjqLYfrdPgBhJCnRVtlhQ9n+DdWf7Lt2ZSuhNLpinFhssruMgc/rKpDs5QX\r\ne2YAJo0YVs2W6ljsjbZP7XmP8kI9BsJspeE=\r\n=KwDA\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"polywrap-build-bot","email":"build-bot@polywrap.io"},"directories":{},"maintainers":[{"name":"polywrap-build-bot","email":"build-bot@polywrap.io"},{"name":"dorgjelli","email":"jelli@dorg.tech"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/uri-resolvers-js_0.10.0-pre.4_1668623032919_0.334430435662338"},"_hasShrinkwrap":false},"0.10.0-pre.5":{"name":"@polywrap/uri-resolvers-js","description":"Polywrap URI resolvers","version":"0.10.0-pre.5","license":"MIT","repository":{"type":"git","url":"https://github.com/polywrap/monorepo.git"},"main":"build/index.js","scripts":{"build":"rimraf ./build && tsc --project tsconfig.build.json","lint":"eslint --color -c ../../../.eslintrc.js src/","test":"jest --passWithNoTests --runInBand --verbose","test:ci":"jest --passWithNoTests --runInBand --verbose","test:watch":"jest --watch --passWithNoTests --verbose"},"dependencies":{"@polywrap/core-js":"0.10.0-pre.5","@polywrap/result":"0.10.0-pre.5","@polywrap/wrap-manifest-types-js":"0.10.0-pre.5"},"devDependencies":{"@types/jest":"26.0.8","jest":"26.6.3","rimraf":"3.0.2","ts-jest":"26.5.4","ts-node":"8.10.2","typescript":"4.1.6"},"publishConfig":{"access":"public"},"readmeFilename":"README.md","readme":"# @polywrap/uri-resolvers\n\n## Description \n\nURI resolvers to customize URI resolution inside of the Polywrap Client.\n","_id":"@polywrap/uri-resolvers-js@0.10.0-pre.5","dist":{"shasum":"acd21f8c308eb32b164aae478334cd5b50103f14","integrity":"sha512-wcBGHQ+s2yihBCrabawPhzdWnWVS6gwVJ9pIrzaQbzJxJpl9Qh0BurlneeAp0KZy4ttF8+vRuf3i7Nsbn4xKxQ==","tarball":"https://registry.npmjs.org/@polywrap/uri-resolvers-js/-/uri-resolvers-js-0.10.0-pre.5.tgz","fileCount":99,"unpackedSize":108871,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCUO9jo3vvVDTwXXoHgnpFYE9YSnn8GZXpmhXKmNQbY5gIhAOcBSIFme+Nu51VL36CeeW3eeHzt/Q9nIZEiLJ5llDgY"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjfFSTACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrDRQ//Tw8OKKiWe82qlqqq6F6/EUAG8VX5zTtEpqZd2wi+zdklsfZJ\r\nqnFuDAzVgCDMGVSZM6D5Om1csD/JNLNkhJuocqxBrf/KoLfPSzFfWxT6ovPD\r\nPnMDk1N+a4JgbEt54SF/NL2fGAzedmwDaHaRe99I35DnAqCV2axlNN1pVCmG\r\nLfx/0QGO5i0cXkIf94FN+VG2ATuR/tg+eqlYVN5zhsRjzTfTiFdjILxAnJNS\r\n31MwzzKC+QbZt3xvWxPcs6S/r40ObIoCJxYBm2AB2RjS0kt8IQE2JUrto5GS\r\nIJh39ZNh7T76bztpHIj2RvJUpoqXdE3kFUo5/ACJplVOYYJF8cNav+sGzju6\r\n9YcQuGnfvobv62YLdfF5oiSUMR7Qnf4RgoSN06ndhfS6o//pgvaKTvukTpDi\r\nw9OH6JKKjmO8H+fXIMSWLyX151eOShvHMzVxdMsnQHlSTFKyKMIcwqEE0GV0\r\nwcjE/pYKLPVZ+m0QsIfoeBswuockEVfjTELSzeh5EmGj/sXlkS34aX6kmvk1\r\nWQwHW1VFLzD0/i3Bstl5S0r2OyS5WA3/SMpft07n0tH+sZxHSRk+UBPOEGec\r\ntpvkoNjuET4QMfE8LmfB0XWL6+1jxvsKSllZee+Sw4tE5KzKAFrbkz3l37x6\r\nCgicwgSZ2DfJzgz+uGo9fvbt9g1RgoyNmUY=\r\n=sNyZ\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"polywrap-build-bot","email":"build-bot@polywrap.io"},"directories":{},"maintainers":[{"name":"polywrap-build-bot","email":"build-bot@polywrap.io"},{"name":"dorgjelli","email":"jelli@dorg.tech"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/uri-resolvers-js_0.10.0-pre.5_1669092499353_0.6909639516694472"},"_hasShrinkwrap":false},"0.10.0-pre.6":{"name":"@polywrap/uri-resolvers-js","description":"Polywrap URI resolvers","version":"0.10.0-pre.6","license":"MIT","repository":{"type":"git","url":"https://github.com/polywrap/monorepo.git"},"main":"build/index.js","scripts":{"build":"rimraf ./build && tsc --project tsconfig.build.json","lint":"eslint --color -c ../../../.eslintrc.js src/","test":"jest --passWithNoTests --runInBand --verbose","test:ci":"jest --passWithNoTests --runInBand --verbose","test:watch":"jest --watch --passWithNoTests --verbose"},"dependencies":{"@polywrap/core-js":"0.10.0-pre.6","@polywrap/result":"0.10.0-pre.6","@polywrap/wrap-manifest-types-js":"0.10.0-pre.6"},"devDependencies":{"@types/jest":"26.0.8","jest":"26.6.3","rimraf":"3.0.2","ts-jest":"26.5.4","ts-node":"8.10.2","typescript":"4.1.6"},"publishConfig":{"access":"public"},"readmeFilename":"README.md","readme":"# @polywrap/uri-resolvers\n\n## Description \n\nURI resolvers to customize URI resolution inside of the Polywrap Client.\n","_id":"@polywrap/uri-resolvers-js@0.10.0-pre.6","dist":{"shasum":"9c4a09fe426139ac3bf9609e4607d5ec2d9c2731","integrity":"sha512-AT6H1z9Ck4cScRxxTeYT6DkydE1d1utK978Uyp/EF4OZ4OGbSWDdCJ3/6Kc+wSGAGPe5XoYMV805BpQqqjKueA==","tarball":"https://registry.npmjs.org/@polywrap/uri-resolvers-js/-/uri-resolvers-js-0.10.0-pre.6.tgz","fileCount":89,"unpackedSize":100098,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDsTKsrmMTuSTvglvIGN/FOZlEaNb6qPnCso9PYMJ33lgIhAOBuclHjFdPzrPvR9zpBatESkTRijlOm9QPGdsfMZln4"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjoT0xACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmod1A/+IcUGecBjOSzxG1L44m6xui+sdACgruSc3rTxIR7yfWev9KJP\r\n2q4zGD3Tbv8/OXHrcSXWGCjXZCEJlfyM0G4lc8DTMReQtGLdtXRZqjeelUzc\r\n/JaA5mBcp0P8qTiHuMoGZgQJ8gCD0fIejmB9WQiuzmICOn/rKZdxOcqNZG0O\r\nOcK7pLANRjx3YBjBci0RPEWdSLefSIB6H65BxjrRW3/fXKoKk3CPMp/i+Ieo\r\nv0jG0h4Hua9GbtUkzKC8CRYnBZgSR/fwnXoQYDe6fY4GiKVLzSbjvF8o3Spu\r\n4ZdTdrMcq/lPOsf+rCHSwnW9kC7elBFvm6aGctipuYkENCar4t2J7pshqD6r\r\nfIbCQtrck1/2HLOHCMyJnO+92dxksyKsppSmOrL1ZfjWHGqQs4tsFj2lLNM3\r\nh/vfVWGLfOjP/HPue48tjW9HUSL6+bXbAlBeR/kopMWlalhf8lTJA6jnSSwI\r\nzFcGPzIRFTGLyyztRkkmPfPTqjbJb/AgYRm28L2907YMDKSZscrdf4QuIRSu\r\nkzCUgm+6NpQ+ZC5x4q6AvsWPzXcymG7IKktVDQ+bk7SmGnMCitNT1faZ5+kD\r\n7NCiNvc8m6/HxxGsUtNY13ty0jXAZzsRi4zUuObOd4AaCAhKqbtKP3Io9pJd\r\nW3RzSQEgqHOfaPsgc0PFyTYJ6KZh7YjaHyE=\r\n=SvQN\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"polywrap-build-bot","email":"build-bot@polywrap.io"},"directories":{},"maintainers":[{"name":"polywrap-build-bot","email":"build-bot@polywrap.io"},{"name":"dorgjelli","email":"jelli@dorg.tech"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/uri-resolvers-js_0.10.0-pre.6_1671511345282_0.9172488898646864"},"_hasShrinkwrap":false},"0.10.0-pre.7":{"name":"@polywrap/uri-resolvers-js","description":"Polywrap URI resolvers","version":"0.10.0-pre.7","license":"MIT","repository":{"type":"git","url":"https://github.com/polywrap/monorepo.git"},"main":"build/index.js","scripts":{"build":"rimraf ./build && tsc --project tsconfig.build.json","lint":"eslint --color -c ../../../.eslintrc.js src/","test":"jest --passWithNoTests --runInBand --verbose","test:ci":"jest --passWithNoTests --runInBand --verbose","test:watch":"jest --watch --passWithNoTests --verbose"},"dependencies":{"@polywrap/core-js":"0.10.0-pre.7","@polywrap/result":"0.10.0-pre.7","@polywrap/wrap-manifest-types-js":"0.10.0-pre.7"},"devDependencies":{"@types/jest":"26.0.8","jest":"26.6.3","rimraf":"3.0.2","ts-jest":"26.5.4","ts-node":"8.10.2","typescript":"4.1.6"},"publishConfig":{"access":"public"},"readmeFilename":"README.md","readme":"# @polywrap/uri-resolvers\n\n## Description \n\nURI resolvers to customize URI resolution inside of the Polywrap Client.\n","_id":"@polywrap/uri-resolvers-js@0.10.0-pre.7","dist":{"shasum":"e7bace9fd8a17c8c5b80a0bd0870e7219f0376af","integrity":"sha512-l/BJ5vuDOaXWs0vAL0V52SNY68YAgIROPoGcw6LXstajBNg1srOeZHOQFDHr4hhWD+YnEga7q+6N/iZMSEFiCA==","tarball":"https://registry.npmjs.org/@polywrap/uri-resolvers-js/-/uri-resolvers-js-0.10.0-pre.7.tgz","fileCount":89,"unpackedSize":100098,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIH1Ob2xtnfuOC/ipTnflVaWIa72gnn+OCdM6fYsfM6CAAiBiDgIGlX/QtR6ixmi+q3FJHaG9Xr9AabSL4PPE0zJQKg=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjvhvhACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmoakg//UiXswXDs2Fb1NXhemZHnWa5qskUHYwMyz5OGJ2UuPyynUS/6\r\nXAneIR5EToIRgzfbrgXm/VIztkvbuuk0JvNpD/5rHHSXny4zqLaV/IP1fdiQ\r\n5KWAG+cHVM7njpEvxGQH2eXQ/fh0zZ63hh2dhjRoa/eCby1DP3VGOoKZuMn8\r\n2pW2UdTpXdjuNQcXFEc/ZL/hdF/Y/0OzxKY3zgo7RgXqZa+Sd7nffsIVZAJs\r\n1XB0frcAwN554DMjJUjCf9oFP9BZ2WZAmCOCkUqtorefikAfBghYUimUnBbn\r\n6gx6SFPEoiU8zUmCfzLem0grVxTymmSjfjE23QTT6TqpYNwjVydBCWu5LWtv\r\nM36kt7L68UukpwoZ56EkIFV7l7zdJVBLQeP9LWeUFmOo/rv9Q8mdK6cTUeFw\r\nY3D55daZI2xZW91VusRfuTV1Mg8qpjoFJR2YsLsUs1sH9kvI55aUsSkNUoqi\r\nrT41xU8qznHjNpamQHRZ/ZzHctCLqgmT8oV/LDBq/2jzWqX8Cd/FAvlX6bxJ\r\nwdJoNvLSbhvBYARQtpBMurZ0OstVDXJ6nhO92PNnkt3CyRjVFUFQxQiPdd9b\r\n7rTZnCRDkFA5sG+hxcdJY1TqKU9PUZJqA/KAo/0TrGmWRbYu/hfpnwKKpyaz\r\n3q78N6klwZzAsjuaGXp+shlw2NH781+fgyU=\r\n=IY4s\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"polywrap-build-bot","email":"build-bot@polywrap.io"},"directories":{},"maintainers":[{"name":"polywrap-build-bot","email":"build-bot@polywrap.io"},{"name":"dorgjelli","email":"jelli@dorg.tech"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/uri-resolvers-js_0.10.0-pre.7_1673403361027_0.41578280638351384"},"_hasShrinkwrap":false},"0.9.5":{"name":"@polywrap/uri-resolvers-js","description":"Polywrap URI resolvers","version":"0.9.5","license":"MIT","repository":{"type":"git","url":"https://github.com/polywrap/monorepo.git"},"main":"build/index.js","scripts":{"build":"rimraf ./build && tsc --project tsconfig.build.json","lint":"eslint --color -c ../../../.eslintrc.js src/","test":"jest --passWithNoTests --runInBand --verbose","test:ci":"jest --passWithNoTests --runInBand --verbose","test:watch":"jest --watch --passWithNoTests --verbose"},"dependencies":{"@polywrap/core-js":"0.9.5","@polywrap/result":"0.9.5","@polywrap/wrap-manifest-types-js":"0.9.5"},"devDependencies":{"@polywrap/os-js":"0.9.5","@types/jest":"26.0.8","jest":"26.6.3","rimraf":"3.0.2","ts-jest":"26.5.4","ts-node":"8.10.2","typescript":"4.1.6"},"publishConfig":{"access":"public"},"_id":"@polywrap/uri-resolvers-js@0.9.5","dist":{"shasum":"a11f02d82c245eefb71f674341a1ea2fcd4c56b2","integrity":"sha512-HwC3n+k8oN7ydUm1Ia3r0Il8MlAv7D7lQ2ZjFKmyVnnIn6fnQFkrWjeNCvOdWK4vLPeWpT45/WBUaS4SiWdYEQ==","tarball":"https://registry.npmjs.org/@polywrap/uri-resolvers-js/-/uri-resolvers-js-0.9.5.tgz","fileCount":96,"unpackedSize":95703,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHo9YUSq//cPXua5PdpfCrvsoKALwM/wcAvCuaOHseXHAiEA7ImlstEqMiCCWxyzK0/z0PG+cK9x21HznzMmYzyYYWg="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj5tIoACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpOtQ//TxEpgDYOr0ZgDvmR9xRCgKdNCBq/Lz7+A/QlSbRh637hzzFi\r\nxRAlo/uVLhknZKAvDrOiLEVwv2QUBOi3ZAYXCE4GtXCZ3q/cHK5e68fGgTWV\r\nLSU1TWsFpqkavMGLqqOEZaamQeW13EwpAhfTW7gioAz6vrwDaOPpHgkkgQrD\r\nfasivaitq3ZmLmq4qaVRtwtP1vFWuFu0VnrllouYmrM2ulZId3tMaaWVdJ05\r\nlei2rLSVkBLXv2w8V/L53SNdyZa0igTVPVQ3MsVrirKcqBLLAbHdQyhJxoM+\r\n/c24LkRiZlYZpiH7AQaIG6WWdva2sg6WIpg+VwY5OvGN8lobj/R0kDLs64hb\r\nVwtfMDh43/RnPHSZTSb8aSqCAbyfqTbcSNUKJpO7MEJdT7cgaD7T+0JOuKpU\r\nWyey1/QQ8uVmNsc+8OICcGTtl5xczPLUxheDgokQKZ3OMVWHXRJYXj5QhhIQ\r\nQTzuI6+h1/8zalWXs1tPxbu0F2aWu54RdJ78h0dJ9WpiayJTfTGVdMdtrwfs\r\n+Ev3xqbZFqlLwCJCPACn4lw3R3SGyEaCnHm1NWJdk/ZwTTxWXzAgsAUTMKXv\r\njeiPa7BYUUA+HMozCInQLi88l1tcU1Wx9FHoTWas6shLGWTH3dKU9skSaCH/\r\nwHXJUBJYB/PlyaI6/OIRHnddCkDxjSetD7A=\r\n=D7i7\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"polywrap-build-bot","email":"build-bot@polywrap.io"},"directories":{},"maintainers":[{"name":"polywrap-build-bot","email":"build-bot@polywrap.io"},{"name":"dorgjelli","email":"jelli@dorg.tech"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/uri-resolvers-js_0.9.5_1676071464580_0.19391521563661107"},"_hasShrinkwrap":false},"0.10.0-pre.8":{"name":"@polywrap/uri-resolvers-js","description":"Polywrap URI resolvers","version":"0.10.0-pre.8","license":"MIT","repository":{"type":"git","url":"https://github.com/polywrap/monorepo.git"},"main":"build/index.js","scripts":{"build":"yarn build:fast && yarn build:snippets && yarn build:readme","build:fast":"rimraf ./build && tsc --project tsconfig.build.json","lint":"eslint --color -c ../../../.eslintrc.js src/","test":"jest --passWithNoTests --runInBand --verbose","test:ci":"jest --passWithNoTests --runInBand --verbose","test:watch":"jest --watch --passWithNoTests --verbose","build:snippets":"tsc --project ./examples/tsconfig.examples.json","build:readme:subsections":"yarn doc-snippets combine -c ./readme/config/sub-sections.json","build:readme:final":"yarn doc-snippets combine -c ./readme/config/final.json","build:readme":"yarn build:readme:subsections && yarn build:readme:final"},"dependencies":{"@polywrap/core-js":"0.10.0-pre.8","@polywrap/result":"0.10.0-pre.8","@polywrap/wrap-manifest-types-js":"0.10.0-pre.8"},"devDependencies":{"@types/jest":"26.0.8","doc-snippets":"~1.0.0","jest":"26.6.3","rimraf":"3.0.2","ts-jest":"26.5.4","ts-node":"8.10.2","typescript":"4.1.6"},"publishConfig":{"access":"public"},"readmeFilename":"README.md","readme":"# @polywrap/uri-resolvers\n<a href=\"https://www.npmjs.com/package/@polywrap/uri-resolvers-js\" target=\"_blank\" rel=\"noopener noreferrer\">\n<img src=\"https://img.shields.io/npm/v/@polywrap/uri-resolvers-js.svg\" alt=\"npm\"/>\n</a>\n\n<br/>\n<br/>\nURI resolvers to customize URI resolution in the Polywrap Client.\n\n## Installation\n\n```bash\nnpm install --save @polywrap/uri-resolvers-js\n```\n\n## Usage\n\nThis example is similar to the default resolver used by the ClientConfigBuilder in the @polywrap/client-config-builder-js package.\n\n```ts\n  const resolver = RecursiveResolver.from(\n      PackageToWrapperCacheResolver.from(\n        [\n          StaticResolver.from([\n              ...redirects,\n              ...wrappers,\n              ...packages,\n            ]),\n          ],\n          new WrapperCache()\n        )\n      );\n```\n\n# Reference\n\n## UriResolverAggregatorBase\n```ts\n/**\n * Abstract class for IUriResolver implementations that aggregate multiple resolvers.\n * The UriResolverAggregatorBase class attempts to resolve a URI by sequentially\n * attempting resolution with each of its composite resolvers.\n * */\nexport abstract class UriResolverAggregatorBase<\n  TResolutionError = undefined,\n  TGetResolversError = undefined\n> implements IUriResolver<TResolutionError | TGetResolversError> \n```\n\n### Methods\n\n#### getUriResolvers\n```ts\n  /**\n   * Get a list of URI Resolvers\n   *\n   * @param uri - the URI to query for resolvers\n   * @param client - a CoreClient instance that can be used to make an invocation\n   * @param resolutionContext - a resolution context to update when resolving URIs\n   *\n   * @returns a list of IUriResolver or an error\n   * */\n  abstract getUriResolvers(\n    uri: Uri,\n    client: CoreClient,\n    resolutionContext: IUriResolutionContext\n  ): Promise<Result<IUriResolver<unknown>[], TGetResolversError>>;\n```\n\n#### tryResolveUri\n```ts\n  /**\n   * Resolve a URI to a wrap package, a wrapper, or a URI.\n   * Attempts to resolve the URI using each of the aggregated resolvers sequentially.\n   *\n   * @param uri - the URI to resolve\n   * @param client - a CoreClient instance that may be used to invoke a wrapper that implements the UriResolver interface\n   * @param resolutionContext - the current URI resolution context\n   * @returns A Promise with a Result containing either a wrap package, a wrapper, or a URI if successful\n   */\n  async tryResolveUri(\n    uri: Uri,\n    client: CoreClient,\n    resolutionContext: IUriResolutionContext\n  ): Promise<\n    Result<UriPackageOrWrapper, TResolutionError | TGetResolversError>\n  > \n```\n\n#### getStepDescription (protected)\n```ts\n  /**\n   * A utility function for generating step descriptions to facilitate resolution context updates\n   *\n   * @param uri - the URI being resolved\n   * @param result - the result of a resolution attempt\n   *\n   * @returns text describing the URI resolution step\n   * */\n  protected abstract getStepDescription(\n    uri: Uri,\n    result: Result<UriPackageOrWrapper, TResolutionError>\n  ): string;\n```\n\n#### tryResolveUriWithResolvers (protected)\n```ts\n  /**\n   * Using each of the aggregated resolvers, attempt to resolve a URI\n   *\n   * @param uri - the URI to resolve\n   * @param client - a CoreClient instance that can be used to make an invocation\n   * @param resolvers - a list of IUriResolver implementations\n   * @param resolutionContext - a resolution context to update when resolving URIs\n   *\n   * @returns a URI, a Wrap Package, or a Wrapper (or an error)\n   * */\n  protected async tryResolveUriWithResolvers(\n    uri: Uri,\n    client: CoreClient,\n    resolvers: IUriResolver<unknown>[],\n    resolutionContext: IUriResolutionContext\n  ): Promise<Result<UriPackageOrWrapper, TResolutionError>> \n```\n\n## UriResolverAggregator\n```ts\n/**\n * An implementation of UriResolverAggregatorBase\n */\nexport class UriResolverAggregator<\n  TResolutionError = undefined,\n  TGetResolversError = undefined\n> extends UriResolverAggregatorBase<\n  TResolutionError,\n  TGetResolversError\n> \n```\n\n### Types\n\n#### GetResolversFunc\n```ts\n/**\n * A function that returns a list of resolvers\n *\n * @param uri - the URI to query\n * @param client - a CoreClient instance\n * */\nexport type GetResolversFunc = (\n  uri: Uri,\n  client: CoreClient\n) => Promise<IUriResolver<unknown>[]>;\n```\n\n#### GetResolversWithErrorFunc\n```ts\n/**\n * A function that returns a list of resolvers or an error\n *\n * @param uri - the URI to query\n * @param client - a CoreClient instance\n * */\nexport type GetResolversWithErrorFunc<TError> = (\n  uri: Uri,\n  client: CoreClient\n) => Promise<Result<IUriResolver<unknown>[], TError>>;\n```\n\n### Methods\n\n#### constructor\n```ts\n  /**\n   * Creates a UriResolverAggregator from a list of resolvers, or from a function\n   * that returns a list of resolvers\n   * */\n  constructor(resolvers: UriResolverLike[], resolverName?: string);\n  constructor(\n    resolvers: (\n      uri: Uri,\n      client: CoreClient\n    ) => Promise<Result<IUriResolver<unknown>[], TGetResolversError>>,\n    resolverName?: string\n  );\n  constructor(resolvers: GetResolversFunc, resolverName?: string);\n  constructor(\n    resolvers:\n      | UriResolverLike[]\n      | GetResolversFunc\n      | GetResolversWithErrorFunc<TGetResolversError>,\n    private _resolverName?: string\n  ) \n```\n\n#### getUriResolvers\n```ts\n  /**\n   * Get a list of URI Resolvers\n   *\n   * @param uri - the URI to query for resolvers\n   * @param client - a CoreClient instance that can be used to make an invocation\n   *\n   * @returns a list of IUriResolver or an error\n   * */\n  async getUriResolvers(\n    uri: Uri,\n    client: CoreClient\n  ): Promise<Result<IUriResolver<unknown>[], TGetResolversError>> \n```\n\n#### getStepDescription (protected)\n```ts\n  /**\n   * A utility function for generating step descriptions to facilitate resolution context updates\n   *\n   * @returns text describing the URI resolution step\n   * */\n  protected getStepDescription = (): string \n```\n\n## IWrapperCache\n```ts\n/** A Wrapper cache */\nexport interface IWrapperCache {\n  /** get a Wrapper from the cache, given its URI index */\n  get(uri: Uri): MaybeAsync<Wrapper | undefined>;\n\n  /** add a Wrapper to the cache, indexed by a URI */\n  set(uri: Uri, wrapper: Wrapper): MaybeAsync<void>;\n}\n```\n\n## WrapperCache\n```ts\n/**\n * A minimal implementation of IWrapperCache\n * */\nexport class WrapperCache implements IWrapperCache \n```\n\n### Methods\n\n#### get\n```ts\n  /** get a Wrapper from the cache, given its URI index */\n  get(uri: Uri): Wrapper | undefined \n```\n\n#### set\n```ts\n  /** add a Wrapper to the cache, indexed by a URI */\n  set(uris: Uri, wrapper: Wrapper): void \n```\n\n## PackageToWrapperCacheResolver\n```ts\n/**\n * An IUriResolver implementation that caches wrappers once they are resolved.\n * The PackageToWrapeprCacheResolver wraps one or more IUriResolver\n * implementations and delegates resolution to them.\n * */\nexport class PackageToWrapperCacheResolver<TError>\n  implements IUriResolver<TError | Error> \n```\n\n### constructor\n```ts\n  /**\n   * Create a PackageToWrapperCacheResolver\n   *\n   * @param _resolverToCache - a resolver to delegate resolution to\n   * @param _cache - a wrapper cache\n   * @param _options - control wrapper manifest deserialization\n   * */\n  constructor(\n    private _resolverToCache: IUriResolver<TError>,\n    private _cache: IWrapperCache,\n    private _options?: {\n      deserializeManifestOptions?: DeserializeManifestOptions;\n      endOnRedirect?: boolean;\n    }\n  ) \n```\n\n### Methods\n\n#### from\n```ts\n  /**\n   * Create a PackageToWrapperCacheResolver from a resolver-like object\n   *\n   * @param resolver - a resolver-like item to delegate resolution to\n   * @param cache - a wrapper cache\n   * @param options - control wrapper manifest deserialization\n   *\n   * @returns a PackageToWrapperCacheResolver\n   * */\n  static from<TResolverError = unknown>(\n    resolver: UriResolverLike,\n    cache: IWrapperCache,\n    options?: {\n      deserializeManifestOptions?: DeserializeManifestOptions;\n      endOnRedirect?: boolean;\n    }\n  ): PackageToWrapperCacheResolver<TResolverError> \n```\n\n#### tryResolveUri\n```ts\n  /**\n   * Resolve a URI to a wrap package, a wrapper, or a URI.\n   * If successful, cache the result.\n   *\n   * @param uri - the URI to resolve\n   * @param client - a CoreClient instance that may be used to invoke a wrapper that implements the UriResolver interface\n   * @param resolutionContext - the current URI resolution context\n   * @returns A Promise with a Result containing either a wrap package, a wrapper, or a URI if successful\n   */\n  async tryResolveUri(\n    uri: Uri,\n    client: CoreClient,\n    resolutionContext: IUriResolutionContext\n  ): Promise<Result<UriPackageOrWrapper, TError | Error>> \n```\n\n## getUriResolutionPath\n```ts\n/**\n * Get a resolution path from the history of a URI resolution attempt\n *\n * @param history - the resolution context\n * @returns the URI's resolution path\n * */\nexport const getUriResolutionPath = (\n  history: IUriResolutionStep<unknown>[]\n): IUriResolutionStep<unknown>[] \n```\n\n## InfiniteLoopError\n```ts\n/**\n * Error used if the URI resolution path contains an infinite loop\n * */\nexport class InfiniteLoopError extends Error \n```\n\n### constructor\n```ts\n  /**\n   * Create an InfiniteLoopError\n   *\n   * @param _uri - URI being resolved\n   * @param _history - URI resolution history\n   * */\n  constructor(\n    private readonly _uri: Uri,\n    private readonly _history: IUriResolutionStep<unknown>[]\n  ) \n```\n\n## ResolverWithHistory\n```ts\n/** An abstract IUriResolver implementation that updates the resolution context */\nexport abstract class ResolverWithHistory<TError = undefined>\n  implements IUriResolver<TError> \n```\n\n### Methods\n\n#### tryResolveUri\n```ts\n  /**\n   * Resolve a URI to a wrap package, a wrapper, or a URI.\n   * Updates the resolution context with the result.\n   *\n   * @remarks\n   * This method calls the internal abstract method _tryResolveUri before\n   * updating the resolution context. Implementations are expect to place\n   * resolution logic in _tryResolveUri.\n   *\n   * @param uri - the URI to resolve\n   * @param client - a CoreClient instance that may be used to invoke a wrapper that implements the UriResolver interface\n   * @param resolutionContext - the current URI resolution context\n   * @returns A Promise with a Result containing either a wrap package, a wrapper, or a URI if successful\n   */\n  async tryResolveUri(\n    uri: Uri,\n    client: CoreClient,\n    resolutionContext: IUriResolutionContext\n  ): Promise<Result<UriPackageOrWrapper, TError>> \n```\n\n#### getStepDescription (protected)\n```ts\n  /**\n   * A utility function for generating step descriptions to facilitate resolution context updates\n   *\n   * @param uri - the URI being resolved\n   * @param result - the result of a resolution attempt\n   *\n   * @returns text describing the URI resolution step\n   * */\n  protected abstract getStepDescription(\n    uri: Uri,\n    result: Result<UriPackageOrWrapper, TError>\n  ): string;\n```\n\n#### _tryResolveUri (protected)\n```ts\n  /**\n   * Resolve a URI to a wrap package, a wrapper, or a URI.\n   * Updates the resolution context with the result.\n   *\n   * @param uri - the URI to resolve\n   * @param client - a CoreClient instance that may be used to invoke a wrapper that implements the UriResolver interface\n   * @param resolutionContext - the current URI resolution context\n   * @returns A Promise with a Result containing either a wrap package, a wrapper, or a URI if successful\n   */\n  protected abstract _tryResolveUri(\n    uri: Uri,\n    client: CoreClient,\n    resolutionContext: IUriResolutionContext\n  ): Promise<Result<UriPackageOrWrapper, TError>>;\n```\n\n## ResolverWithLoopGuard\n```ts\n/** An IUriResolver implementation that prevents infinite loops in the resolution path. */\nexport class ResolverWithLoopGuard<TError = undefined>\n  implements IUriResolver<TError | InfiniteLoopError> \n```\n\n### constructor\n```ts\n  /**\n   * Construct a ResolverWithLoopGuard\n   *\n   * @param _resolver - a resolution to delegate resolution to\n   * */\n  constructor(private _resolver: IUriResolver<TError>) \n```\n\n### Methods\n\n#### from\n```ts\n  /**\n   * Create a ResolverWithLoopGuard from a resolver-like object\n   *\n   * @param resolver - a resolver-like item to delegate resolution to\n   *\n   * @returns a ResolverWithLoopGuard\n   * */\n  static from<TResolverError = unknown>(\n    resolver: UriResolverLike\n  ): ResolverWithLoopGuard<TResolverError> \n```\n\n#### tryResolveUri\n```ts\n  /**\n   * Resolve a URI to a wrap package, a wrapper, or a URI.\n   * Ensures the URI is not caught in an infinite loop by checking if it is already resolving.\n   *\n   * @param uri - the URI to resolve\n   * @param client - a CoreClient instance that may be used to invoke a wrapper that implements the UriResolver interface\n   * @param resolutionContext - the current URI resolution context\n   * @returns A Promise with a Result containing either a wrap package, a wrapper, or a URI if successful\n   */\n  async tryResolveUri(\n    uri: Uri,\n    client: CoreClient,\n    resolutionContext: IUriResolutionContext\n  ): Promise<Result<UriPackageOrWrapper, TError | InfiniteLoopError>> \n```\n\n## UriResolutionResult\n```ts\n/** Factory for creating Result from URI resolution output */\nexport class UriResolutionResult<TError = undefined> \n```\n\n### Methods\n\n#### ok\n```ts\n  /** Returns a Result with `ok` set to true */\n  static ok<TError = undefined>(uri: Uri): Result<UriPackageOrWrapper, TError>;\n  static ok<TError = undefined>(\n    uri: Uri,\n    wrapPackage: IWrapPackage\n  ): Result<UriPackageOrWrapper, TError>;\n  static ok<TError = undefined>(\n    uri: Uri,\n    wrapper: Wrapper\n  ): Result<UriPackageOrWrapper, TError>;\n  static ok<TError = undefined>(\n    uriPackageOrWrapper: UriPackageOrWrapper\n  ): Result<UriPackageOrWrapper, TError>;\n  static ok<TError = undefined>(\n    uriPackageOrWrapper: Uri | UriPackageOrWrapper,\n    packageOrWrapper?: IWrapPackage | Wrapper\n  ): Result<UriPackageOrWrapper, TError> \n```\n\n#### err\n```ts\n  /** Returns a Result with `ok` set to false */\n  static err<TError = unknown>(\n    error: TError\n  ): Result<UriPackageOrWrapper, TError> \n```\n\n## UriResolver\n```ts\n/** An IUriResolver factory */\nexport class UriResolver \n```\n\n### Methods\n\n#### from\n```ts\n  /**\n   * Create an IUriResolver instance\n   *\n   * @param resolverLike - an object that can be transformed into a resolver\n   * @param resolverName - a name to assign to the resolver in resolution history output\n   * */\n  static from<TError = undefined>(\n    resolverLike: UriResolverLike,\n    resolverName?: string\n  ): IUriResolver<TError> \n```\n\n## UriResolverLike\n```ts\n/** An UriResolverLike can be one of three things:\n * - An IUriResolver\n * - An object that can be transformed into a static IUriResolver\n * - An array of UriResolverLike\n * */\nexport type UriResolverLike =\n  | IUriResolver<unknown>\n  | IUriRedirect\n  | IUriPackage\n  | IUriWrapper\n  | UriResolverLike[];\n```\n\n## PackageResolver\n```ts\n/**\n * A Uri Resolver that resolves to an embedded wrap package and correctly updates\n * the resolution history.\n * */\nexport class PackageResolver extends ResolverWithHistory \n```\n\n### constructor\n```ts\n  /**\n   * Construct a PackageResolver\n   *\n   * @param _uri - the URI to redirect to the wrap package\n   * @param wrapPackage - a wrap package\n   * */\n  constructor(private _uri: Uri, private wrapPackage: IWrapPackage) \n```\n\n### Methods\n\n#### getStepDescription (protected)\n```ts\n  /**\n   * A utility function for generating step descriptions to facilitate resolution context updates\n   *\n   * @returns text describing the URI resolution step\n   * */\n  protected getStepDescription = (): string \n```\n\n#### _tryResolveUri (protected)\n```ts\n  /**\n   * Resolve a URI to a wrap package\n   *\n   * @param uri - the URI to resolve\n   * @returns A Promise with a Result containing a wrap package if successful\n   */\n  protected async _tryResolveUri(\n    uri: Uri\n  ): Promise<Result<UriPackageOrWrapper>> \n```\n\n## RedirectResolver\n```ts\n/**\n * A Uri Resolver that resolves to a new URI and correctly updates the\n * resolution history.\n * */\nexport class RedirectResolver<\n  TUri extends string | Uri = string\n> extends ResolverWithHistory \n```\n\n### constructor\n```ts\n  /**\n   * Construct a RedirectResolver\n   *\n   * @param from - the URI to redirect from\n   * @param to - the URI to redirect to\n   * */\n  constructor(from: TUri, to: TUri) \n```\n\n### Methods\n\n#### getStepDescription (protected)\n```ts\n  /**\n   * A utility function for generating step descriptions to facilitate resolution context updates\n   *\n   * @returns text describing the URI resolution step\n   * */\n  protected getStepDescription = (): string \n```\n\n#### _tryResolveUri (protected)\n```ts\n  /**\n   * Resolve a URI to a new URI\n   *\n   * @param uri - the URI to resolve\n   * @returns A Promise with a Result containing a URI if successful\n   */\n  protected async _tryResolveUri(\n    uri: Uri\n  ): Promise<Result<UriPackageOrWrapper>> \n```\n\n## WrapperResolver\n```ts\n/**\n * A Uri Resolver that resolves to an embedded wrapper and correctly updates\n * the resolution history.\n * */\nexport class WrapperResolver extends ResolverWithHistory \n```\n\n### constructor\n```ts\n  /**\n   * Construct a WrapperResolver\n   *\n   * @param _uri - the URI to redirect to the wrapper instance\n   * @param _wrapper - a wrapper\n   * */\n  constructor(private _uri: Uri, private _wrapper: Wrapper) \n```\n\n### Methods\n\n#### getStepDescription (protected)\n```ts\n  /**\n   * A utility function for generating step descriptions to facilitate resolution context updates\n   *\n   * @returns text describing the URI resolution step\n   * */\n  protected getStepDescription = (): string \n```\n\n#### _tryResolveUri\n```ts\n  /**\n   * Resolve a URI to a wrapper\n   *\n   * @param uri - the URI to resolve\n   * @returns A Promise with a Result containing a wrapper if successful\n   */\n  protected async _tryResolveUri(\n    uri: Uri\n  ): Promise<Result<UriPackageOrWrapper>> \n```\n\n## StaticResolver\n```ts\n/**\n * An IUriResolver implementation that efficiently delegates URI resolution to\n * static resolvers--i.e. those that resolve to embedded URIs, Wrappers, and Packages\n * */\nexport class StaticResolver<TError = undefined>\n  implements IUriResolver<TError> \n```\n\n### constructor\n```ts\n  /**\n   * Construct a Static Resolver\n   *\n   * @param uriMap - a mapping of URI to embedded URI, package, or wrapper\n   * */\n  constructor(public uriMap: Map<string, UriPackageOrWrapper>) \n```\n\n### Methods\n\n#### from\n```ts\n  /**\n   * Create a StaticResolver from a static-resolver-like object\n   *\n   * @param staticResolverLikes - an array of resolver-like objects to delegate resolution to\n   *\n   * @returns a StaticResolver\n   * */\n  static from<TError = undefined>(\n    staticResolverLikes: UriResolverLike[]\n  ): StaticResolver<TError> \n```\n\n#### tryResolveUri\n```ts\n  /**\n   * Resolve a URI to a wrap package, a wrapper, or a URI.\n   *\n   * @param uri - the URI to resolve\n   * @param _ - not used\n   * @param resolutionContext - the current URI resolution context\n   * @returns A Promise with a Result containing either a wrap package, a wrapper, or a URI if successful\n   */\n  async tryResolveUri(\n    uri: Uri,\n    _: CoreClient,\n    resolutionContext: IUriResolutionContext\n  ): Promise<Result<UriPackageOrWrapper, TError>> \n```\n\n## StaticResolverLike\n```ts\n/** A StaticResolverLike can be one of two things:\n * - An object that can be transformed into a static IUriResolver\n * - An array of StaticResolverLike\n * */\nexport type StaticResolverLike =\n  | IUriRedirect\n  | IUriPackage\n  | IUriWrapper\n  | StaticResolverLike[];\n```\n\n## Development\n\nThis package is open-source. It lives within the [Polywrap toolchain monorepo](https://github.com/polywrap/toolchain/tree/origin/packages/js/uri-resolvers). Contributions from the community are welcomed!\n\n### Build\n```bash\nnvm use && yarn install && yarn build\n```\n\n### Test\n```bash\nyarn test\n``","_id":"@polywrap/uri-resolvers-js@0.10.0-pre.8","dist":{"shasum":"ebc947e8276d4131cd85aa007c953c12d1f6c5ed","integrity":"sha512-Fu5Mr4WsylgBp2T6GTxnCF2ynZkk3SlDA3xBrItbYPOH3ZOXG/JsZG43UNlRXQLaJd52JFP5ZKSKfeS4XbfUAg==","tarball":"https://registry.npmjs.org/@polywrap/uri-resolvers-js/-/uri-resolvers-js-0.10.0-pre.8.tgz","fileCount":103,"unpackedSize":153642,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCKwSgQnU3rfStOQQISTKTpxVSK9mj12anNCEJBTC9/vwIhANyAoTmEQtwbVudsv43epT2Ch7hZJIB58uz3D0FiEIrQ"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj7bUSACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqPjRAAnUtHa+Ct02dr0zujH9UFSYbiHriGgM1OWOj9/K+9dEHq6fHJ\r\nh9ctohmRJoPwqwiAS/7FVRalNouyu7pg9QJQuibXF+HRID3ha/6X84/4e2C3\r\n2aNq03J3uofR8Pfq7zVfp0daXEhR91VHtFqkHWNCaMIQB5c3qUDs5eIGLDBQ\r\nmNSE/egEYSwRptoQj5c1PKUbFMvSZVmRJrW3AGO50+Q6ognwgLGpd3h+AgMu\r\nB684r40vCENFih1osk8eQE1g7iA+t83mkHFa3fAW1RmEGRLWakZadejD8iYa\r\no9feBtIPaBZhPCXqkykA14gr/XmbuEbyiCg7fv4UvpD1By8QLIHV5KU98gch\r\nqEWo0r+rXE1Z9GXQ/tQa59A4wlmSBBuJCPPqbhWOyT43y+MWLzb6o9dg0f8N\r\nkxSKwnBbSAmls80S78QQdAnud6YcMZB3Wuggcgwt9gdKYHk+gP9OZpBSLFcI\r\npspGcen0fgzxZ5zv2v0HrW0tIfcySifWj3FzrTV8tx4wrOUvWDixLIF0wpiI\r\nJAJxlnaXdnpqlHZ4VqEcHFQXwy8BHj7M0tFliKSa6AMWUwrlPvBT+tJ4hGeq\r\nRuq3Se0NiUeP0UCocmBoxqqEb1RbHMsDnwvRjn6mvMZFeQMfK+JeIdScC48O\r\nyf1ge9agTn1DtplpWf9ccfV9is9SnWZ9ZSo=\r\n=ZPwG\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"polywrap-build-bot","email":"build-bot@polywrap.io"},"directories":{},"maintainers":[{"name":"polywrap-build-bot","email":"build-bot@polywrap.io"},{"name":"dorgjelli","email":"jelli@dorg.tech"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/uri-resolvers-js_0.10.0-pre.8_1676522770661_0.43135003439485686"},"_hasShrinkwrap":false},"0.9.6":{"name":"@polywrap/uri-resolvers-js","description":"Polywrap URI resolvers","version":"0.9.6","license":"MIT","repository":{"type":"git","url":"https://github.com/polywrap/monorepo.git"},"main":"build/index.js","scripts":{"build":"rimraf ./build && tsc --project tsconfig.build.json","lint":"eslint --color -c ../../../.eslintrc.js src/","test":"jest --passWithNoTests --runInBand --verbose","test:ci":"jest --passWithNoTests --runInBand --verbose","test:watch":"jest --watch --passWithNoTests --verbose"},"dependencies":{"@polywrap/core-js":"0.9.6","@polywrap/result":"0.9.6","@polywrap/wrap-manifest-types-js":"0.9.6"},"devDependencies":{"@polywrap/os-js":"0.9.6","@types/jest":"26.0.8","jest":"26.6.3","rimraf":"3.0.2","ts-jest":"26.5.4","ts-node":"8.10.2","typescript":"4.1.6"},"publishConfig":{"access":"public"},"_id":"@polywrap/uri-resolvers-js@0.9.6","dist":{"shasum":"51b24e79c521aec2c17261f94de0f880695334e8","integrity":"sha512-Ls3M1SGyfdap2bPif7m2pimif5apHXM8l8oAvUziu+h3VGHodhgu65rRGS7xKr70lSr3f/jtA9ZEAo4GXYXcEw==","tarball":"https://registry.npmjs.org/@polywrap/uri-resolvers-js/-/uri-resolvers-js-0.9.6.tgz","fileCount":96,"unpackedSize":95703,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCPfYQ83tjhG5YsHt3HJfLSxeQg7cSU5Se+VzGmWkf54AIhAMhbPNelylm7FVuuABUhXW2zZBdmzEnwp4jAWXMdZOaj"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj8dNjACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrHuxAAnhztXvYj/zv4tqZkFXDyb5xl1nHlngjQ86KQDMUKb8lXhrRS\r\n1Y+DBYRj0Q1ByJaLa3oPixQeNKJvZPcwt0ptrKX3kkaoO11pANGlNXXr5Zz4\r\n4xGFMu8WmZPi/pQ2a8EntBhewpuSxfWIbuBsyVUOl/crlhIb40VVMCR9tuqc\r\nkhsXpUr/P2B2ZShzS9k7CDe9+c5U9LpU8HqtXZCCsBSSuMaJtScEqpZC0axj\r\n8TJKb3Ha5dHxOiCkgybaQHlyoJwb14w4dle4Wt8uWG2JYjMmST/lK9d4wrIB\r\nwdhwHa7dxTz7NiMwwol4jwmG6A5uMXW59p6PhA44J8HFjZs3JJv/6H0MBdUZ\r\nnyRljOfJaTHPGtkzkgPiq9wmow5w7pJKaQnoQpi69pT1FEDDsu5s+hrTkUia\r\nGzpUy9DRFFhmAovzXGkFblWV0friPaaMJXIqSjnYVaWf0dvuL2jF+cY88fNI\r\n2WEFq8CdKH2MvOv/zoFS8oy8wQSJY5+rKPiiwzPXhcLVP9AUMa6qKJnNLE66\r\nNdW+665holdoVo/C37J6188zZltlGIudHN87U+T4vSWnadzQ8H5Wa5+LvPOX\r\nuGVaS6fOWDZyysTNRUieyFWW2aiKzyxSaFM0/XzCcP+uOuCsp5QUqoO1KBJf\r\nlAx2A9HG+vHcb0T908AVNmqfIlAx3HvHOW4=\r\n=wNVm\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"polywrap-build-bot","email":"build-bot@polywrap.io"},"directories":{},"maintainers":[{"name":"polywrap-build-bot","email":"build-bot@polywrap.io"},{"name":"dorgjelli","email":"jelli@dorg.tech"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/uri-resolvers-js_0.9.6_1676792675607_0.4302424027797118"},"_hasShrinkwrap":false},"0.10.0-pre.10":{"name":"@polywrap/uri-resolvers-js","description":"Polywrap URI resolvers","version":"0.10.0-pre.10","license":"MIT","repository":{"type":"git","url":"https://github.com/polywrap/monorepo.git"},"main":"build/index.js","scripts":{"build":"yarn build:fast && yarn build:snippets && yarn build:readme","build:fast":"rimraf ./build && tsc --project tsconfig.build.json","lint":"eslint --color -c ../../../.eslintrc.js src/","test":"jest --passWithNoTests --runInBand --verbose","test:ci":"jest --passWithNoTests --runInBand --verbose","test:watch":"jest --watch --passWithNoTests --verbose","build:snippets":"tsc --project ./examples/tsconfig.examples.json","build:readme:subsections":"yarn doc-snippets combine -c ./readme/config/sub-sections.json","build:readme:final":"yarn doc-snippets combine -c ./readme/config/final.json","build:readme":"yarn build:readme:subsections && yarn build:readme:final"},"dependencies":{"@polywrap/core-js":"0.10.0-pre.10","@polywrap/result":"0.10.0-pre.10","@polywrap/wrap-manifest-types-js":"0.10.0-pre.10"},"devDependencies":{"@types/jest":"26.0.8","doc-snippets":"~1.0.0","jest":"26.6.3","rimraf":"3.0.2","ts-jest":"26.5.4","ts-node":"10.9.1","typescript":"4.9.5"},"publishConfig":{"access":"public"},"readmeFilename":"README.md","readme":"# @polywrap/uri-resolvers\n<a href=\"https://www.npmjs.com/package/@polywrap/uri-resolvers-js\" target=\"_blank\" rel=\"noopener noreferrer\">\n<img src=\"https://img.shields.io/npm/v/@polywrap/uri-resolvers-js.svg\" alt=\"npm\"/>\n</a>\n\n<br/>\n<br/>\nURI resolvers to customize URI resolution in the Polywrap Client.\n\n## Installation\n\n```bash\nnpm install --save @polywrap/uri-resolvers-js\n```\n\n## Usage\n\nThis example is similar to the default resolver used by the ClientConfigBuilder in the @polywrap/client-config-builder-js package.\n\n```ts\n  const resolver = RecursiveResolver.from(\n      PackageToWrapperCacheResolver.from(\n        [\n          StaticResolver.from([\n              ...redirects,\n              ...wrappers,\n              ...packages,\n            ]),\n          ],\n          new WrapperCache()\n        )\n      );\n```\n\n# Reference\n\n## UriResolverAggregatorBase\n```ts\n/**\n * Abstract class for IUriResolver implementations that aggregate multiple resolvers.\n * The UriResolverAggregatorBase class attempts to resolve a URI by sequentially\n * attempting resolution with each of its composite resolvers.\n * */\nexport abstract class UriResolverAggregatorBase<\n  TResolutionError = undefined,\n  TGetResolversError = undefined\n> implements IUriResolver<TResolutionError | TGetResolversError> \n```\n\n### Methods\n\n#### getUriResolvers\n```ts\n  /**\n   * Get a list of URI Resolvers\n   *\n   * @param uri - the URI to query for resolvers\n   * @param client - a CoreClient instance that can be used to make an invocation\n   * @param resolutionContext - a resolution context to update when resolving URIs\n   *\n   * @returns a list of IUriResolver or an error\n   * */\n  abstract getUriResolvers(\n    uri: Uri,\n    client: CoreClient,\n    resolutionContext: IUriResolutionContext\n  ): Promise<Result<IUriResolver<unknown>[], TGetResolversError>>;\n```\n\n#### tryResolveUri\n```ts\n  /**\n   * Resolve a URI to a wrap package, a wrapper, or a URI.\n   * Attempts to resolve the URI using each of the aggregated resolvers sequentially.\n   *\n   * @param uri - the URI to resolve\n   * @param client - a CoreClient instance that may be used to invoke a wrapper that implements the UriResolver interface\n   * @param resolutionContext - the current URI resolution context\n   * @returns A Promise with a Result containing either a wrap package, a wrapper, or a URI if successful\n   */\n  async tryResolveUri(\n    uri: Uri,\n    client: CoreClient,\n    resolutionContext: IUriResolutionContext\n  ): Promise<\n    Result<UriPackageOrWrapper, TResolutionError | TGetResolversError>\n  > \n```\n\n#### getStepDescription (protected)\n```ts\n  /**\n   * A utility function for generating step descriptions to facilitate resolution context updates\n   *\n   * @param uri - the URI being resolved\n   * @param result - the result of a resolution attempt\n   *\n   * @returns text describing the URI resolution step\n   * */\n  protected abstract getStepDescription(\n    uri: Uri,\n    result: Result<UriPackageOrWrapper, TResolutionError>\n  ): string;\n```\n\n#### tryResolveUriWithResolvers (protected)\n```ts\n  /**\n   * Using each of the aggregated resolvers, attempt to resolve a URI\n   *\n   * @param uri - the URI to resolve\n   * @param client - a CoreClient instance that can be used to make an invocation\n   * @param resolvers - a list of IUriResolver implementations\n   * @param resolutionContext - a resolution context to update when resolving URIs\n   *\n   * @returns a URI, a Wrap Package, or a Wrapper (or an error)\n   * */\n  protected async tryResolveUriWithResolvers(\n    uri: Uri,\n    client: CoreClient,\n    resolvers: IUriResolver<unknown>[],\n    resolutionContext: IUriResolutionContext\n  ): Promise<Result<UriPackageOrWrapper, TResolutionError>> \n```\n\n## UriResolverAggregator\n```ts\n/**\n * An implementation of UriResolverAggregatorBase\n */\nexport class UriResolverAggregator<\n  TResolutionError = undefined,\n  TGetResolversError = undefined\n> extends UriResolverAggregatorBase<\n  TResolutionError,\n  TGetResolversError\n> \n```\n\n### Types\n\n#### GetResolversFunc\n```ts\n/**\n * A function that returns a list of resolvers\n *\n * @param uri - the URI to query\n * @param client - a CoreClient instance\n * */\nexport type GetResolversFunc = (\n  uri: Uri,\n  client: CoreClient\n) => Promise<IUriResolver<unknown>[]>;\n```\n\n#### GetResolversWithErrorFunc\n```ts\n/**\n * A function that returns a list of resolvers or an error\n *\n * @param uri - the URI to query\n * @param client - a CoreClient instance\n * */\nexport type GetResolversWithErrorFunc<TError> = (\n  uri: Uri,\n  client: CoreClient\n) => Promise<Result<IUriResolver<unknown>[], TError>>;\n```\n\n### Methods\n\n#### constructor\n```ts\n  /**\n   * Creates a UriResolverAggregator from a list of resolvers, or from a function\n   * that returns a list of resolvers\n   * */\n  constructor(resolvers: UriResolverLike[], resolverName?: string);\n  constructor(\n    resolvers: (\n      uri: Uri,\n      client: CoreClient\n    ) => Promise<Result<IUriResolver<unknown>[], TGetResolversError>>,\n    resolverName?: string\n  );\n  constructor(resolvers: GetResolversFunc, resolverName?: string);\n  constructor(\n    resolvers:\n      | UriResolverLike[]\n      | GetResolversFunc\n      | GetResolversWithErrorFunc<TGetResolversError>,\n    private _resolverName?: string\n  ) \n```\n\n#### getUriResolvers\n```ts\n  /**\n   * Get a list of URI Resolvers\n   *\n   * @param uri - the URI to query for resolvers\n   * @param client - a CoreClient instance that can be used to make an invocation\n   *\n   * @returns a list of IUriResolver or an error\n   * */\n  async getUriResolvers(\n    uri: Uri,\n    client: CoreClient\n  ): Promise<Result<IUriResolver<unknown>[], TGetResolversError>> \n```\n\n#### getStepDescription (protected)\n```ts\n  /**\n   * A utility function for generating step descriptions to facilitate resolution context updates\n   *\n   * @returns text describing the URI resolution step\n   * */\n  protected getStepDescription = (): string \n```\n\n## IWrapperCache\n```ts\n/** A Wrapper cache */\nexport interface IWrapperCache {\n  /** get a Wrapper from the cache, given its URI index */\n  get(uri: Uri): MaybeAsync<Wrapper | undefined>;\n\n  /** add a Wrapper to the cache, indexed by a URI */\n  set(uri: Uri, wrapper: Wrapper): MaybeAsync<void>;\n}\n```\n\n## WrapperCache\n```ts\n/**\n * A minimal implementation of IWrapperCache\n * */\nexport class WrapperCache implements IWrapperCache \n```\n\n### Methods\n\n#### get\n```ts\n  /** get a Wrapper from the cache, given its URI index */\n  get(uri: Uri): Wrapper | undefined \n```\n\n#### set\n```ts\n  /** add a Wrapper to the cache, indexed by a URI */\n  set(uris: Uri, wrapper: Wrapper): void \n```\n\n## PackageToWrapperCacheResolver\n```ts\n/**\n * An IUriResolver implementation that caches wrappers once they are resolved.\n * The PackageToWrapeprCacheResolver wraps one or more IUriResolver\n * implementations and delegates resolution to them.\n * */\nexport class PackageToWrapperCacheResolver<TError>\n  implements IUriResolver<TError | Error> \n```\n\n### constructor\n```ts\n  /**\n   * Create a PackageToWrapperCacheResolver\n   *\n   * @param _resolverToCache - a resolver to delegate resolution to\n   * @param _cache - a wrapper cache\n   * @param _options - control wrapper manifest deserialization\n   * */\n  constructor(\n    private _resolverToCache: IUriResolver<TError>,\n    private _cache: IWrapperCache,\n    private _options?: {\n      deserializeManifestOptions?: DeserializeManifestOptions;\n    }\n  ) \n```\n\n### Methods\n\n#### from\n```ts\n  /**\n   * Create a PackageToWrapperCacheResolver from a resolver-like object\n   *\n   * @param resolver - a resolver-like item to delegate resolution to\n   * @param cache - a wrapper cache\n   * @param options - control wrapper manifest deserialization\n   *\n   * @returns a PackageToWrapperCacheResolver\n   * */\n  static from<TResolverError = unknown>(\n    resolver: UriResolverLike,\n    cache: IWrapperCache,\n    options?: { deserializeManifestOptions?: DeserializeManifestOptions }\n  ): PackageToWrapperCacheResolver<TResolverError> \n```\n\n#### tryResolveUri\n```ts\n  /**\n   * Resolve a URI to a wrap package, a wrapper, or a URI.\n   * If successful, cache the result.\n   *\n   * @param uri - the URI to resolve\n   * @param client - a CoreClient instance that may be used to invoke a wrapper that implements the UriResolver interface\n   * @param resolutionContext - the current URI resolution context\n   * @returns A Promise with a Result containing either a wrap package, a wrapper, or a URI if successful\n   */\n  async tryResolveUri(\n    uri: Uri,\n    client: CoreClient,\n    resolutionContext: IUriResolutionContext\n  ): Promise<Result<UriPackageOrWrapper, TError | Error>> \n```\n\n## getUriResolutionPath\n```ts\n/**\n * Get a resolution path from the history of a URI resolution attempt\n *\n * @param history - the resolution context\n * @returns the URI's resolution path\n * */\nexport const getUriResolutionPath = (\n  history: IUriResolutionStep<unknown>[]\n): IUriResolutionStep<unknown>[] \n```\n\n## InfiniteLoopError\n```ts\n/**\n * Error used if the URI resolution path contains an infinite loop\n * */\nexport class InfiniteLoopError extends Error \n```\n\n### constructor\n```ts\n  /**\n   * Create an InfiniteLoopError\n   *\n   * @param _uri - URI being resolved\n   * @param _history - URI resolution history\n   * */\n  constructor(\n    private readonly _uri: Uri,\n    private readonly _history: IUriResolutionStep<unknown>[]\n  ) \n```\n\n## ResolverWithHistory\n```ts\n/** An abstract IUriResolver implementation that updates the resolution context */\nexport abstract class ResolverWithHistory<TError = undefined>\n  implements IUriResolver<TError> \n```\n\n### Methods\n\n#### tryResolveUri\n```ts\n  /**\n   * Resolve a URI to a wrap package, a wrapper, or a URI.\n   * Updates the resolution context with the result.\n   *\n   * @remarks\n   * This method calls the internal abstract method _tryResolveUri before\n   * updating the resolution context. Implementations are expect to place\n   * resolution logic in _tryResolveUri.\n   *\n   * @param uri - the URI to resolve\n   * @param client - a CoreClient instance that may be used to invoke a wrapper that implements the UriResolver interface\n   * @param resolutionContext - the current URI resolution context\n   * @returns A Promise with a Result containing either a wrap package, a wrapper, or a URI if successful\n   */\n  async tryResolveUri(\n    uri: Uri,\n    client: CoreClient,\n    resolutionContext: IUriResolutionContext\n  ): Promise<Result<UriPackageOrWrapper, TError>> \n```\n\n#### getStepDescription (protected)\n```ts\n  /**\n   * A utility function for generating step descriptions to facilitate resolution context updates\n   *\n   * @param uri - the URI being resolved\n   * @param result - the result of a resolution attempt\n   *\n   * @returns text describing the URI resolution step\n   * */\n  protected abstract getStepDescription(\n    uri: Uri,\n    result: Result<UriPackageOrWrapper, TError>\n  ): string;\n```\n\n#### _tryResolveUri (protected)\n```ts\n  /**\n   * Resolve a URI to a wrap package, a wrapper, or a URI.\n   * Updates the resolution context with the result.\n   *\n   * @param uri - the URI to resolve\n   * @param client - a CoreClient instance that may be used to invoke a wrapper that implements the UriResolver interface\n   * @param resolutionContext - the current URI resolution context\n   * @returns A Promise with a Result containing either a wrap package, a wrapper, or a URI if successful\n   */\n  protected abstract _tryResolveUri(\n    uri: Uri,\n    client: CoreClient,\n    resolutionContext: IUriResolutionContext\n  ): Promise<Result<UriPackageOrWrapper, TError>>;\n```\n\n## ResolverWithLoopGuard\n```ts\n/** An IUriResolver implementation that prevents infinite loops in the resolution path. */\nexport class ResolverWithLoopGuard<TError = undefined>\n  implements IUriResolver<TError | InfiniteLoopError> \n```\n\n### constructor\n```ts\n  /**\n   * Construct a ResolverWithLoopGuard\n   *\n   * @param _resolver - a resolution to delegate resolution to\n   * */\n  constructor(private _resolver: IUriResolver<TError>) \n```\n\n### Methods\n\n#### from\n```ts\n  /**\n   * Create a ResolverWithLoopGuard from a resolver-like object\n   *\n   * @param resolver - a resolver-like item to delegate resolution to\n   *\n   * @returns a ResolverWithLoopGuard\n   * */\n  static from<TResolverError = unknown>(\n    resolver: UriResolverLike\n  ): ResolverWithLoopGuard<TResolverError> \n```\n\n#### tryResolveUri\n```ts\n  /**\n   * Resolve a URI to a wrap package, a wrapper, or a URI.\n   * Ensures the URI is not caught in an infinite loop by checking if it is already resolving.\n   *\n   * @param uri - the URI to resolve\n   * @param client - a CoreClient instance that may be used to invoke a wrapper that implements the UriResolver interface\n   * @param resolutionContext - the current URI resolution context\n   * @returns A Promise with a Result containing either a wrap package, a wrapper, or a URI if successful\n   */\n  async tryResolveUri(\n    uri: Uri,\n    client: CoreClient,\n    resolutionContext: IUriResolutionContext\n  ): Promise<Result<UriPackageOrWrapper, TError | InfiniteLoopError>> \n```\n\n## UriResolutionResult\n```ts\n/** Factory for creating Result from URI resolution output */\nexport class UriResolutionResult<TError = undefined> \n```\n\n### Methods\n\n#### ok\n```ts\n  /** Returns a Result with `ok` set to true */\n  static ok<TError = undefined>(uri: Uri): Result<UriPackageOrWrapper, TError>;\n  static ok<TError = undefined>(\n    uri: Uri,\n    wrapPackage: IWrapPackage\n  ): Result<UriPackageOrWrapper, TError>;\n  static ok<TError = undefined>(\n    uri: Uri,\n    wrapper: Wrapper\n  ): Result<UriPackageOrWrapper, TError>;\n  static ok<TError = undefined>(\n    uriPackageOrWrapper: UriPackageOrWrapper\n  ): Result<UriPackageOrWrapper, TError>;\n  static ok<TError = undefined>(\n    uriPackageOrWrapper: Uri | UriPackageOrWrapper,\n    packageOrWrapper?: IWrapPackage | Wrapper\n  ): Result<UriPackageOrWrapper, TError> \n```\n\n#### err\n```ts\n  /** Returns a Result with `ok` set to false */\n  static err<TError = unknown>(\n    error: TError\n  ): Result<UriPackageOrWrapper, TError> \n```\n\n## UriResolver\n```ts\n/** An IUriResolver factory */\nexport class UriResolver \n```\n\n### Methods\n\n#### from\n```ts\n  /**\n   * Create an IUriResolver instance\n   *\n   * @param resolverLike - an object that can be transformed into a resolver\n   * @param resolverName - a name to assign to the resolver in resolution history output\n   * */\n  static from<TError = undefined>(\n    resolverLike: UriResolverLike,\n    resolverName?: string\n  ): IUriResolver<TError> \n```\n\n## UriResolverLike\n```ts\n/** An UriResolverLike can be one of three things:\n * - An IUriResolver\n * - An object that can be transformed into a static IUriResolver\n * - An array of UriResolverLike\n * */\nexport type UriResolverLike =\n  | IUriResolver<unknown>\n  | IUriRedirect\n  | IUriPackage\n  | IUriWrapper\n  | UriResolverLike[];\n```\n\n## PackageResolver\n```ts\n/**\n * A Uri Resolver that resolves to an embedded wrap package and correctly updates\n * the resolution history.\n * */\nexport class PackageResolver extends ResolverWithHistory \n```\n\n### constructor\n```ts\n  /**\n   * Construct a PackageResolver\n   *\n   * @param _uri - the URI to redirect to the wrap package\n   * @param wrapPackage - a wrap package\n   * */\n  constructor(private _uri: Uri, private wrapPackage: IWrapPackage) \n```\n\n### Methods\n\n#### getStepDescription (protected)\n```ts\n  /**\n   * A utility function for generating step descriptions to facilitate resolution context updates\n   *\n   * @returns text describing the URI resolution step\n   * */\n  protected getStepDescription = (): string \n```\n\n#### _tryResolveUri (protected)\n```ts\n  /**\n   * Resolve a URI to a wrap package\n   *\n   * @param uri - the URI to resolve\n   * @returns A Promise with a Result containing a wrap package if successful\n   */\n  protected async _tryResolveUri(\n    uri: Uri\n  ): Promise<Result<UriPackageOrWrapper>> \n```\n\n## RedirectResolver\n```ts\n/**\n * A Uri Resolver that resolves to a new URI and correctly updates the\n * resolution history.\n * */\nexport class RedirectResolver<\n  TUri extends string | Uri = string\n> extends ResolverWithHistory \n```\n\n### constructor\n```ts\n  /**\n   * Construct a RedirectResolver\n   *\n   * @param from - the URI to redirect from\n   * @param to - the URI to redirect to\n   * */\n  constructor(from: TUri, to: TUri) \n```\n\n### Methods\n\n#### getStepDescription (protected)\n```ts\n  /**\n   * A utility function for generating step descriptions to facilitate resolution context updates\n   *\n   * @returns text describing the URI resolution step\n   * */\n  protected getStepDescription = (): string \n```\n\n#### _tryResolveUri (protected)\n```ts\n  /**\n   * Resolve a URI to a new URI\n   *\n   * @param uri - the URI to resolve\n   * @returns A Promise with a Result containing a URI if successful\n   */\n  protected async _tryResolveUri(\n    uri: Uri\n  ): Promise<Result<UriPackageOrWrapper>> \n```\n\n## WrapperResolver\n```ts\n/**\n * A Uri Resolver that resolves to an embedded wrapper and correctly updates\n * the resolution history.\n * */\nexport class WrapperResolver extends ResolverWithHistory \n```\n\n### constructor\n```ts\n  /**\n   * Construct a WrapperResolver\n   *\n   * @param _uri - the URI to redirect to the wrapper instance\n   * @param _wrapper - a wrapper\n   * */\n  constructor(private _uri: Uri, private _wrapper: Wrapper) \n```\n\n### Methods\n\n#### getStepDescription (protected)\n```ts\n  /**\n   * A utility function for generating step descriptions to facilitate resolution context updates\n   *\n   * @returns text describing the URI resolution step\n   * */\n  protected getStepDescription = (): string \n```\n\n#### _tryResolveUri\n```ts\n  /**\n   * Resolve a URI to a wrapper\n   *\n   * @param uri - the URI to resolve\n   * @returns A Promise with a Result containing a wrapper if successful\n   */\n  protected async _tryResolveUri(\n    uri: Uri\n  ): Promise<Result<UriPackageOrWrapper>> \n```\n\n## StaticResolver\n```ts\n/**\n * An IUriResolver implementation that efficiently delegates URI resolution to\n * static resolvers--i.e. those that resolve to embedded URIs, Wrappers, and Packages\n * */\nexport class StaticResolver<TError = undefined>\n  implements IUriResolver<TError> \n```\n\n### constructor\n```ts\n  /**\n   * Construct a Static Resolver\n   *\n   * @param uriMap - a mapping of URI to embedded URI, package, or wrapper\n   * */\n  constructor(public uriMap: Map<string, UriPackageOrWrapper>) \n```\n\n### Methods\n\n#### from\n```ts\n  /**\n   * Create a StaticResolver from a static-resolver-like object\n   *\n   * @param staticResolverLikes - an array of resolver-like objects to delegate resolution to\n   *\n   * @returns a StaticResolver\n   * */\n  static from<TError = undefined>(\n    staticResolverLikes: UriResolverLike[]\n  ): StaticResolver<TError> \n```\n\n#### tryResolveUri\n```ts\n  /**\n   * Resolve a URI to a wrap package, a wrapper, or a URI.\n   *\n   * @param uri - the URI to resolve\n   * @param _ - not used\n   * @param resolutionContext - the current URI resolution context\n   * @returns A Promise with a Result containing either a wrap package, a wrapper, or a URI if successful\n   */\n  async tryResolveUri(\n    uri: Uri,\n    _: CoreClient,\n    resolutionContext: IUriResolutionContext\n  ): Promise<Result<UriPackageOrWrapper, TError>> \n```\n\n## StaticResolverLike\n```ts\n/** A StaticResolverLike can be one of two things:\n * - An object that can be transformed into a static IUriResolver\n * - An array of StaticResolverLike\n * */\nexport type StaticResolverLike =\n  | IUriRedirect\n  | IUriPackage\n  | IUriWrapper\n  | StaticResolverLike[];\n```\n\n## RequestSynchronizerResolver\n```ts\n/* Uri resolver that synchronizes requests to the same URI\n * Multiple requests to the same URI will be resolved only once\n * and the result will be cached for subsequent requests (only for the duration of that first request)\n * Can use the `shouldIgnoreCache` option to determine whether to ignore the cached request in case of an error\n * (default is to use the cache)\n */\nexport class RequestSynchronizerResolver<TError>\n  implements IUriResolver<TError> \n```\n\n### constructor\n```ts\n  /**\n   * Construct a RequestSynchronizerResolver\n   *\n   * @param resolverToSynchronize - the inner resolve whose resolution will be synchronized\n   * @param options - the optional options containing the `shouldIgnoreCache` error handler\n   * */\n  constructor(\n    private resolverToSynchronize: IUriResolver<TError>,\n    private options?: {\n      shouldIgnoreCache?: (error: TError | undefined) => boolean;\n    }\n  ) \n```\n\n### Methods\n\n#### from\n```ts\n  /**\n   * Create a RequestSynchronizerResolver from a static-resolver-like object\n   *\n   * @param resolver - a resolver-like object whose resolution will be synchronized\n   * @param options - the optional options containing the `shouldIgnoreCache` error handler\n   *\n   * @returns a RequestSynchronizerResolver\n   * */\n  static from<TResolverError = unknown>(\n    resolver: UriResolverLike,\n    options?: {\n      shouldIgnoreCache?: (error: TResolverError | undefined) => boolean;\n    }\n  ): RequestSynchronizerResolver<TResolverError> \n```\n\n#### tryResolveUri\n```ts\n  /**\n   * Resolve a URI to a wrap package, a wrapper, or a URI.\n   * Attempts to resolve the URI using each of the aggregated resolvers sequentially.\n   *\n   * @param uri - the URI to resolve\n   * @param client - a CoreClient instance that may be used to invoke a wrapper that implements the UriResolver interface\n   * @param resolutionContext - the current URI resolution context\n   * @returns A Promise with a Result containing either a wrap package, a wrapper, or a URI if successful\n   */\n  async tryResolveUri(\n    uri: Uri,\n    client: CoreClient,\n    resolutionContext: IUriResolutionContext\n  ): Promise<Result<UriPackageOrWrapper, TError>> \n```\n\n\n## Development\n\nThis package is open-source. It lives within the [Polywrap toolchain monorepo](https://github.com/polywrap/toolchain/tree/origin/packages/js/uri-resolvers). Contributions from the community are welcomed!\n\n### Build\n```bash\nnvm use && yarn install && yarn build\n```\n\n### Test\n```bash\nyarn test\n``","_id":"@polywrap/uri-resolvers-js@0.10.0-pre.10","dist":{"shasum":"bb4112ffb18aa6828ab730e60710d507b2f5f4ad","integrity":"sha512-kgoM2zlBSsH/NDY+0Rn/WLyV17Pe2LNMjhxmHPcFVQJ5rkbhDWv9tIb1CE7D220bj/EUaaFseYkUVep1j7bIoQ==","tarball":"https://registry.npmjs.org/@polywrap/uri-resolvers-js/-/uri-resolvers-js-0.10.0-pre.10.tgz","fileCount":106,"unpackedSize":172693,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCXf5Ix92Bm03JbVqofx9mxU4oEoOs7QjgLyeKE7YQzLAIhAOmqfA/+2ytPKe+e0/IRryc2QNSc1r7Ri8ICQKCLZHjH"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj/sdAACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpNew//Xsz2kB4GI75VnkMi/0+t/PZN/8aJar0U6IDL9MbT3dXSD6+M\r\nJuG3hfScp4K1YaMPeSmyxKspRaaMebib1gmzifXXTclZlLCLWUwWDBdMgL32\r\nT7uZ300mVo3SXU7huiZTqWt9bTCioO1c99jqpsMZpSYzVVwN3fqnyM/IKYH0\r\nxQIYZWQ0JzdpJr5aGHp9VygLINB+0WLYmbsdhdX/PuvRYcOykt392rQ+mGbt\r\nAgWd1cpLv5I95+uNT4EKNumjDf6MGWrSVo3bTBXY8KdWjTCMNwMbqCf1gyP0\r\nlRxKnopvopAa+kQVn6lwVXF5TcICfR49TXkt4BlEUg2wope71ZI404ftueE/\r\nz+MNB7VrLewy0IncoT8lIwiJIH93XPXiiBwSK9DtP+1T6Tm5WHQJJcFVlCh7\r\nGoVUyfniTHxT3pei+Z+vTVvk45494w0X3/EnPtWfWs9tSal2wNw5VjVv6e7k\r\nuZ+azgXrbsO8D7nPNpOSJY9THHJOKKmL20Ls0V6ZIoAnENW8KoK+xYTYG/vo\r\nRLrBq6b8NPVUsEg05gf69dfhptDwn7ttatnoy6e01lzOi6awN7hehnNqhKZm\r\nmFOwtJ+trKFyw1joEsJcwneAWeF7PjniSX0oMh5ETumS/wz1A8CoSvJWJ8aC\r\n8Bis2whh6Aal6op1WNSzCT+965SuKwxxdTQ=\r\n=7zel\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"polywrap-build-bot","email":"build-bot@polywrap.io"},"directories":{},"maintainers":[{"name":"polywrap-build-bot","email":"build-bot@polywrap.io"},{"name":"dorgjelli","email":"jelli@dorg.tech"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/uri-resolvers-js_0.10.0-pre.10_1677641536314_0.10433018789701642"},"_hasShrinkwrap":false},"0.10.0-pre.11":{"name":"@polywrap/uri-resolvers-js","description":"Polywrap URI resolvers","version":"0.10.0-pre.11","license":"MIT","repository":{"type":"git","url":"https://github.com/polywrap/monorepo.git"},"main":"build/index.js","scripts":{"build":"yarn build:fast && yarn build:snippets && yarn build:readme","build:fast":"rimraf ./build && tsc --project tsconfig.build.json","lint":"eslint --color -c ../../../.eslintrc.js src/","test":"jest --passWithNoTests --runInBand --verbose","test:ci":"jest --passWithNoTests --runInBand --verbose","test:watch":"jest --watch --passWithNoTests --verbose","build:snippets":"tsc --project ./examples/tsconfig.examples.json","build:readme:subsections":"yarn doc-snippets combine -c ./readme/config/sub-sections.json","build:readme:final":"yarn doc-snippets combine -c ./readme/config/final.json","build:readme":"yarn build:readme:subsections && yarn build:readme:final"},"dependencies":{"@polywrap/core-js":"0.10.0-pre.11","@polywrap/result":"0.10.0-pre.11","@polywrap/wrap-manifest-types-js":"0.10.0-pre.11"},"devDependencies":{"@types/jest":"26.0.8","doc-snippets":"~1.0.0","jest":"26.6.3","rimraf":"3.0.2","ts-jest":"26.5.4","ts-node":"10.9.1","typescript":"4.9.5"},"publishConfig":{"access":"public"},"readmeFilename":"README.md","readme":"# @polywrap/uri-resolvers\n<a href=\"https://www.npmjs.com/package/@polywrap/uri-resolvers-js\" target=\"_blank\" rel=\"noopener noreferrer\">\n<img src=\"https://img.shields.io/npm/v/@polywrap/uri-resolvers-js.svg\" alt=\"npm\"/>\n</a>\n\n<br/>\n<br/>\nURI resolvers to customize URI resolution in the Polywrap Client.\n\n## Installation\n\n```bash\nnpm install --save @polywrap/uri-resolvers-js\n```\n\n## Usage\n\nThis example is similar to the default resolver used by the ClientConfigBuilder in the @polywrap/client-config-builder-js package.\n\n```ts\n  const resolver = RecursiveResolver.from(\n      PackageToWrapperCacheResolver.from(\n        [\n          StaticResolver.from([\n              ...redirects,\n              ...wrappers,\n              ...packages,\n            ]),\n          ],\n          new WrapperCache()\n        )\n      );\n```\n\n# Reference\n\n## UriResolverAggregatorBase\n```ts\n/**\n * Abstract class for IUriResolver implementations that aggregate multiple resolvers.\n * The UriResolverAggregatorBase class attempts to resolve a URI by sequentially\n * attempting resolution with each of its composite resolvers.\n * */\nexport abstract class UriResolverAggregatorBase<\n  TResolutionError = undefined,\n  TGetResolversError = undefined\n> implements IUriResolver<TResolutionError | TGetResolversError> \n```\n\n### Methods\n\n#### getUriResolvers\n```ts\n  /**\n   * Get a list of URI Resolvers\n   *\n   * @param uri - the URI to query for resolvers\n   * @param client - a CoreClient instance that can be used to make an invocation\n   * @param resolutionContext - a resolution context to update when resolving URIs\n   *\n   * @returns a list of IUriResolver or an error\n   * */\n  abstract getUriResolvers(\n    uri: Uri,\n    client: CoreClient,\n    resolutionContext: IUriResolutionContext\n  ): Promise<Result<IUriResolver<unknown>[], TGetResolversError>>;\n```\n\n#### tryResolveUri\n```ts\n  /**\n   * Resolve a URI to a wrap package, a wrapper, or a URI.\n   * Attempts to resolve the URI using each of the aggregated resolvers sequentially.\n   *\n   * @param uri - the URI to resolve\n   * @param client - a CoreClient instance that may be used to invoke a wrapper that implements the UriResolver interface\n   * @param resolutionContext - the current URI resolution context\n   * @returns A Promise with a Result containing either a wrap package, a wrapper, or a URI if successful\n   */\n  async tryResolveUri(\n    uri: Uri,\n    client: CoreClient,\n    resolutionContext: IUriResolutionContext\n  ): Promise<\n    Result<UriPackageOrWrapper, TResolutionError | TGetResolversError>\n  > \n```\n\n#### getStepDescription (protected)\n```ts\n  /**\n   * A utility function for generating step descriptions to facilitate resolution context updates\n   *\n   * @param uri - the URI being resolved\n   * @param result - the result of a resolution attempt\n   *\n   * @returns text describing the URI resolution step\n   * */\n  protected abstract getStepDescription(\n    uri: Uri,\n    result: Result<UriPackageOrWrapper, TResolutionError>\n  ): string;\n```\n\n#### tryResolveUriWithResolvers (protected)\n```ts\n  /**\n   * Using each of the aggregated resolvers, attempt to resolve a URI\n   *\n   * @param uri - the URI to resolve\n   * @param client - a CoreClient instance that can be used to make an invocation\n   * @param resolvers - a list of IUriResolver implementations\n   * @param resolutionContext - a resolution context to update when resolving URIs\n   *\n   * @returns a URI, a Wrap Package, or a Wrapper (or an error)\n   * */\n  protected async tryResolveUriWithResolvers(\n    uri: Uri,\n    client: CoreClient,\n    resolvers: IUriResolver<unknown>[],\n    resolutionContext: IUriResolutionContext\n  ): Promise<Result<UriPackageOrWrapper, TResolutionError>> \n```\n\n## UriResolverAggregator\n```ts\n/**\n * An implementation of UriResolverAggregatorBase\n */\nexport class UriResolverAggregator<\n  TResolutionError = undefined,\n  TGetResolversError = undefined\n> extends UriResolverAggregatorBase<\n  TResolutionError,\n  TGetResolversError\n> \n```\n\n### Types\n\n#### GetResolversFunc\n```ts\n/**\n * A function that returns a list of resolvers\n *\n * @param uri - the URI to query\n * @param client - a CoreClient instance\n * */\nexport type GetResolversFunc = (\n  uri: Uri,\n  client: CoreClient\n) => Promise<IUriResolver<unknown>[]>;\n```\n\n#### GetResolversWithErrorFunc\n```ts\n/**\n * A function that returns a list of resolvers or an error\n *\n * @param uri - the URI to query\n * @param client - a CoreClient instance\n * */\nexport type GetResolversWithErrorFunc<TError> = (\n  uri: Uri,\n  client: CoreClient\n) => Promise<Result<IUriResolver<unknown>[], TError>>;\n```\n\n### Methods\n\n#### constructor\n```ts\n  /**\n   * Creates a UriResolverAggregator from a list of resolvers, or from a function\n   * that returns a list of resolvers\n   * */\n  constructor(resolvers: UriResolverLike[], resolverName?: string);\n  constructor(\n    resolvers: (\n      uri: Uri,\n      client: CoreClient\n    ) => Promise<Result<IUriResolver<unknown>[], TGetResolversError>>,\n    resolverName?: string\n  );\n  constructor(resolvers: GetResolversFunc, resolverName?: string);\n  constructor(\n    resolvers:\n      | UriResolverLike[]\n      | GetResolversFunc\n      | GetResolversWithErrorFunc<TGetResolversError>,\n    private _resolverName?: string\n  ) \n```\n\n#### getUriResolvers\n```ts\n  /**\n   * Get a list of URI Resolvers\n   *\n   * @param uri - the URI to query for resolvers\n   * @param client - a CoreClient instance that can be used to make an invocation\n   *\n   * @returns a list of IUriResolver or an error\n   * */\n  async getUriResolvers(\n    uri: Uri,\n    client: CoreClient\n  ): Promise<Result<IUriResolver<unknown>[], TGetResolversError>> \n```\n\n#### getStepDescription (protected)\n```ts\n  /**\n   * A utility function for generating step descriptions to facilitate resolution context updates\n   *\n   * @returns text describing the URI resolution step\n   * */\n  protected getStepDescription = (): string \n```\n\n## IWrapperCache\n```ts\n/** A Wrapper cache */\nexport interface IWrapperCache {\n  /** get a Wrapper from the cache, given its URI index */\n  get(uri: Uri): MaybeAsync<Wrapper | undefined>;\n\n  /** add a Wrapper to the cache, indexed by a URI */\n  set(uri: Uri, wrapper: Wrapper): MaybeAsync<void>;\n}\n```\n\n## WrapperCache\n```ts\n/**\n * A minimal implementation of IWrapperCache\n * */\nexport class WrapperCache implements IWrapperCache \n```\n\n### Methods\n\n#### get\n```ts\n  /** get a Wrapper from the cache, given its URI index */\n  get(uri: Uri): Wrapper | undefined \n```\n\n#### set\n```ts\n  /** add a Wrapper to the cache, indexed by a URI */\n  set(uris: Uri, wrapper: Wrapper): void \n```\n\n## PackageToWrapperCacheResolver\n```ts\n/**\n * An IUriResolver implementation that caches wrappers once they are resolved.\n * The PackageToWrapeprCacheResolver wraps one or more IUriResolver\n * implementations and delegates resolution to them.\n * */\nexport class PackageToWrapperCacheResolver<TError>\n  implements IUriResolver<TError | Error> \n```\n\n### constructor\n```ts\n  /**\n   * Create a PackageToWrapperCacheResolver\n   *\n   * @param _resolverToCache - a resolver to delegate resolution to\n   * @param _cache - a wrapper cache\n   * @param _options - control wrapper manifest deserialization\n   * */\n  constructor(\n    private _resolverToCache: IUriResolver<TError>,\n    private _cache: IWrapperCache,\n    private _options?: {\n      deserializeManifestOptions?: DeserializeManifestOptions;\n    }\n  ) \n```\n\n### Methods\n\n#### from\n```ts\n  /**\n   * Create a PackageToWrapperCacheResolver from a resolver-like object\n   *\n   * @param resolver - a resolver-like item to delegate resolution to\n   * @param cache - a wrapper cache\n   * @param options - control wrapper manifest deserialization\n   *\n   * @returns a PackageToWrapperCacheResolver\n   * */\n  static from<TResolverError = unknown>(\n    resolver: UriResolverLike,\n    cache: IWrapperCache,\n    options?: { deserializeManifestOptions?: DeserializeManifestOptions }\n  ): PackageToWrapperCacheResolver<TResolverError> \n```\n\n#### tryResolveUri\n```ts\n  /**\n   * Resolve a URI to a wrap package, a wrapper, or a URI.\n   * If successful, cache the result.\n   *\n   * @param uri - the URI to resolve\n   * @param client - a CoreClient instance that may be used to invoke a wrapper that implements the UriResolver interface\n   * @param resolutionContext - the current URI resolution context\n   * @returns A Promise with a Result containing either a wrap package, a wrapper, or a URI if successful\n   */\n  async tryResolveUri(\n    uri: Uri,\n    client: CoreClient,\n    resolutionContext: IUriResolutionContext\n  ): Promise<Result<UriPackageOrWrapper, TError | Error>> \n```\n\n## getUriResolutionPath\n```ts\n/**\n * Get a resolution path from the history of a URI resolution attempt\n *\n * @param history - the resolution context\n * @returns the URI's resolution path\n * */\nexport const getUriResolutionPath = (\n  history: IUriResolutionStep<unknown>[]\n): IUriResolutionStep<unknown>[] \n```\n\n## InfiniteLoopError\n```ts\n/**\n * Error used if the URI resolution path contains an infinite loop\n * */\nexport class InfiniteLoopError extends Error \n```\n\n### constructor\n```ts\n  /**\n   * Create an InfiniteLoopError\n   *\n   * @param _uri - URI being resolved\n   * @param _history - URI resolution history\n   * */\n  constructor(\n    private readonly _uri: Uri,\n    private readonly _history: IUriResolutionStep<unknown>[]\n  ) \n```\n\n## ResolverWithHistory\n```ts\n/** An abstract IUriResolver implementation that updates the resolution context */\nexport abstract class ResolverWithHistory<TError = undefined>\n  implements IUriResolver<TError> \n```\n\n### Methods\n\n#### tryResolveUri\n```ts\n  /**\n   * Resolve a URI to a wrap package, a wrapper, or a URI.\n   * Updates the resolution context with the result.\n   *\n   * @remarks\n   * This method calls the internal abstract method _tryResolveUri before\n   * updating the resolution context. Implementations are expect to place\n   * resolution logic in _tryResolveUri.\n   *\n   * @param uri - the URI to resolve\n   * @param client - a CoreClient instance that may be used to invoke a wrapper that implements the UriResolver interface\n   * @param resolutionContext - the current URI resolution context\n   * @returns A Promise with a Result containing either a wrap package, a wrapper, or a URI if successful\n   */\n  async tryResolveUri(\n    uri: Uri,\n    client: CoreClient,\n    resolutionContext: IUriResolutionContext\n  ): Promise<Result<UriPackageOrWrapper, TError>> \n```\n\n#### getStepDescription (protected)\n```ts\n  /**\n   * A utility function for generating step descriptions to facilitate resolution context updates\n   *\n   * @param uri - the URI being resolved\n   * @param result - the result of a resolution attempt\n   *\n   * @returns text describing the URI resolution step\n   * */\n  protected abstract getStepDescription(\n    uri: Uri,\n    result: Result<UriPackageOrWrapper, TError>\n  ): string;\n```\n\n#### _tryResolveUri (protected)\n```ts\n  /**\n   * Resolve a URI to a wrap package, a wrapper, or a URI.\n   * Updates the resolution context with the result.\n   *\n   * @param uri - the URI to resolve\n   * @param client - a CoreClient instance that may be used to invoke a wrapper that implements the UriResolver interface\n   * @param resolutionContext - the current URI resolution context\n   * @returns A Promise with a Result containing either a wrap package, a wrapper, or a URI if successful\n   */\n  protected abstract _tryResolveUri(\n    uri: Uri,\n    client: CoreClient,\n    resolutionContext: IUriResolutionContext\n  ): Promise<Result<UriPackageOrWrapper, TError>>;\n```\n\n## ResolverWithLoopGuard\n```ts\n/** An IUriResolver implementation that prevents infinite loops in the resolution path. */\nexport class ResolverWithLoopGuard<TError = undefined>\n  implements IUriResolver<TError | InfiniteLoopError> \n```\n\n### constructor\n```ts\n  /**\n   * Construct a ResolverWithLoopGuard\n   *\n   * @param _resolver - a resolution to delegate resolution to\n   * */\n  constructor(private _resolver: IUriResolver<TError>) \n```\n\n### Methods\n\n#### from\n```ts\n  /**\n   * Create a ResolverWithLoopGuard from a resolver-like object\n   *\n   * @param resolver - a resolver-like item to delegate resolution to\n   *\n   * @returns a ResolverWithLoopGuard\n   * */\n  static from<TResolverError = unknown>(\n    resolver: UriResolverLike\n  ): ResolverWithLoopGuard<TResolverError> \n```\n\n#### tryResolveUri\n```ts\n  /**\n   * Resolve a URI to a wrap package, a wrapper, or a URI.\n   * Ensures the URI is not caught in an infinite loop by checking if it is already resolving.\n   *\n   * @param uri - the URI to resolve\n   * @param client - a CoreClient instance that may be used to invoke a wrapper that implements the UriResolver interface\n   * @param resolutionContext - the current URI resolution context\n   * @returns A Promise with a Result containing either a wrap package, a wrapper, or a URI if successful\n   */\n  async tryResolveUri(\n    uri: Uri,\n    client: CoreClient,\n    resolutionContext: IUriResolutionContext\n  ): Promise<Result<UriPackageOrWrapper, TError | InfiniteLoopError>> \n```\n\n## UriResolutionResult\n```ts\n/** Factory for creating Result from URI resolution output */\nexport class UriResolutionResult<TError = undefined> \n```\n\n### Methods\n\n#### ok\n```ts\n  /** Returns a Result with `ok` set to true */\n  static ok<TError = undefined>(uri: Uri): Result<UriPackageOrWrapper, TError>;\n  static ok<TError = undefined>(\n    uri: Uri,\n    wrapPackage: IWrapPackage\n  ): Result<UriPackageOrWrapper, TError>;\n  static ok<TError = undefined>(\n    uri: Uri,\n    wrapper: Wrapper\n  ): Result<UriPackageOrWrapper, TError>;\n  static ok<TError = undefined>(\n    uriPackageOrWrapper: UriPackageOrWrapper\n  ): Result<UriPackageOrWrapper, TError>;\n  static ok<TError = undefined>(\n    uriPackageOrWrapper: Uri | UriPackageOrWrapper,\n    packageOrWrapper?: IWrapPackage | Wrapper\n  ): Result<UriPackageOrWrapper, TError> \n```\n\n#### err\n```ts\n  /** Returns a Result with `ok` set to false */\n  static err<TError = unknown>(\n    error: TError\n  ): Result<UriPackageOrWrapper, TError> \n```\n\n## UriResolver\n```ts\n/** An IUriResolver factory */\nexport class UriResolver \n```\n\n### Methods\n\n#### from\n```ts\n  /**\n   * Create an IUriResolver instance\n   *\n   * @param resolverLike - an object that can be transformed into a resolver\n   * @param resolverName - a name to assign to the resolver in resolution history output\n   * */\n  static from<TError = undefined>(\n    resolverLike: UriResolverLike,\n    resolverName?: string\n  ): IUriResolver<TError> \n```\n\n## UriResolverLike\n```ts\n/** An UriResolverLike can be one of three things:\n * - An IUriResolver\n * - An object that can be transformed into a static IUriResolver\n * - An array of UriResolverLike\n * */\nexport type UriResolverLike =\n  | IUriResolver<unknown>\n  | IUriRedirect\n  | IUriPackage\n  | IUriWrapper\n  | UriResolverLike[];\n```\n\n## PackageResolver\n```ts\n/**\n * A Uri Resolver that resolves to an embedded wrap package and correctly updates\n * the resolution history.\n * */\nexport class PackageResolver extends ResolverWithHistory \n```\n\n### constructor\n```ts\n  /**\n   * Construct a PackageResolver\n   *\n   * @param _uri - the URI to redirect to the wrap package\n   * @param wrapPackage - a wrap package\n   * */\n  constructor(private _uri: Uri, private wrapPackage: IWrapPackage) \n```\n\n### Methods\n\n#### getStepDescription (protected)\n```ts\n  /**\n   * A utility function for generating step descriptions to facilitate resolution context updates\n   *\n   * @returns text describing the URI resolution step\n   * */\n  protected getStepDescription = (): string \n```\n\n#### _tryResolveUri (protected)\n```ts\n  /**\n   * Resolve a URI to a wrap package\n   *\n   * @param uri - the URI to resolve\n   * @returns A Promise with a Result containing a wrap package if successful\n   */\n  protected async _tryResolveUri(\n    uri: Uri\n  ): Promise<Result<UriPackageOrWrapper>> \n```\n\n## RedirectResolver\n```ts\n/**\n * A Uri Resolver that resolves to a new URI and correctly updates the\n * resolution history.\n * */\nexport class RedirectResolver<\n  TUri extends string | Uri = string\n> extends ResolverWithHistory \n```\n\n### constructor\n```ts\n  /**\n   * Construct a RedirectResolver\n   *\n   * @param from - the URI to redirect from\n   * @param to - the URI to redirect to\n   * */\n  constructor(from: TUri, to: TUri) \n```\n\n### Methods\n\n#### getStepDescription (protected)\n```ts\n  /**\n   * A utility function for generating step descriptions to facilitate resolution context updates\n   *\n   * @returns text describing the URI resolution step\n   * */\n  protected getStepDescription = (): string \n```\n\n#### _tryResolveUri (protected)\n```ts\n  /**\n   * Resolve a URI to a new URI\n   *\n   * @param uri - the URI to resolve\n   * @returns A Promise with a Result containing a URI if successful\n   */\n  protected async _tryResolveUri(\n    uri: Uri\n  ): Promise<Result<UriPackageOrWrapper>> \n```\n\n## WrapperResolver\n```ts\n/**\n * A Uri Resolver that resolves to an embedded wrapper and correctly updates\n * the resolution history.\n * */\nexport class WrapperResolver extends ResolverWithHistory \n```\n\n### constructor\n```ts\n  /**\n   * Construct a WrapperResolver\n   *\n   * @param _uri - the URI to redirect to the wrapper instance\n   * @param _wrapper - a wrapper\n   * */\n  constructor(private _uri: Uri, private _wrapper: Wrapper) \n```\n\n### Methods\n\n#### getStepDescription (protected)\n```ts\n  /**\n   * A utility function for generating step descriptions to facilitate resolution context updates\n   *\n   * @returns text describing the URI resolution step\n   * */\n  protected getStepDescription = (): string \n```\n\n#### _tryResolveUri\n```ts\n  /**\n   * Resolve a URI to a wrapper\n   *\n   * @param uri - the URI to resolve\n   * @returns A Promise with a Result containing a wrapper if successful\n   */\n  protected async _tryResolveUri(\n    uri: Uri\n  ): Promise<Result<UriPackageOrWrapper>> \n```\n\n## StaticResolver\n```ts\n/**\n * An IUriResolver implementation that efficiently delegates URI resolution to\n * static resolvers--i.e. those that resolve to embedded URIs, Wrappers, and Packages\n * */\nexport class StaticResolver<TError = undefined>\n  implements IUriResolver<TError> \n```\n\n### constructor\n```ts\n  /**\n   * Construct a Static Resolver\n   *\n   * @param uriMap - a mapping of URI to embedded URI, package, or wrapper\n   * */\n  constructor(public uriMap: Map<string, UriPackageOrWrapper>) \n```\n\n### Methods\n\n#### from\n```ts\n  /**\n   * Create a StaticResolver from a static-resolver-like object\n   *\n   * @param staticResolverLikes - an array of resolver-like objects to delegate resolution to\n   *\n   * @returns a StaticResolver\n   * */\n  static from<TError = undefined>(\n    staticResolverLikes: UriResolverLike[]\n  ): StaticResolver<TError> \n```\n\n#### tryResolveUri\n```ts\n  /**\n   * Resolve a URI to a wrap package, a wrapper, or a URI.\n   *\n   * @param uri - the URI to resolve\n   * @param _ - not used\n   * @param resolutionContext - the current URI resolution context\n   * @returns A Promise with a Result containing either a wrap package, a wrapper, or a URI if successful\n   */\n  async tryResolveUri(\n    uri: Uri,\n    _: CoreClient,\n    resolutionContext: IUriResolutionContext\n  ): Promise<Result<UriPackageOrWrapper, TError>> \n```\n\n## StaticResolverLike\n```ts\n/** A StaticResolverLike can be one of two things:\n * - An object that can be transformed into a static IUriResolver\n * - An array of StaticResolverLike\n * */\nexport type StaticResolverLike =\n  | IUriRedirect\n  | IUriPackage\n  | IUriWrapper\n  | StaticResolverLike[];\n```\n\n## RequestSynchronizerResolver\n```ts\n/* Uri resolver that synchronizes requests to the same URI\n * Multiple requests to the same URI will be resolved only once\n * and the result will be cached for subsequent requests (only for the duration of that first request)\n * Can use the `shouldIgnoreCache` option to determine whether to ignore the cached request in case of an error\n * (default is to use the cache)\n */\nexport class RequestSynchronizerResolver<TError>\n  implements IUriResolver<TError> \n```\n\n### constructor\n```ts\n  /**\n   * Construct a RequestSynchronizerResolver\n   *\n   * @param resolverToSynchronize - the inner resolve whose resolution will be synchronized\n   * @param options - the optional options containing the `shouldIgnoreCache` error handler\n   * */\n  constructor(\n    private resolverToSynchronize: IUriResolver<TError>,\n    private options?: {\n      shouldIgnoreCache?: (error: TError | undefined) => boolean;\n    }\n  ) \n```\n\n### Methods\n\n#### from\n```ts\n  /**\n   * Create a RequestSynchronizerResolver from a static-resolver-like object\n   *\n   * @param resolver - a resolver-like object whose resolution will be synchronized\n   * @param options - the optional options containing the `shouldIgnoreCache` error handler\n   *\n   * @returns a RequestSynchronizerResolver\n   * */\n  static from<TResolverError = unknown>(\n    resolver: UriResolverLike,\n    options?: {\n      shouldIgnoreCache?: (error: TResolverError | undefined) => boolean;\n    }\n  ): RequestSynchronizerResolver<TResolverError> \n```\n\n#### tryResolveUri\n```ts\n  /**\n   * Resolve a URI to a wrap package, a wrapper, or a URI.\n   * Attempts to resolve the URI using each of the aggregated resolvers sequentially.\n   *\n   * @param uri - the URI to resolve\n   * @param client - a CoreClient instance that may be used to invoke a wrapper that implements the UriResolver interface\n   * @param resolutionContext - the current URI resolution context\n   * @returns A Promise with a Result containing either a wrap package, a wrapper, or a URI if successful\n   */\n  async tryResolveUri(\n    uri: Uri,\n    client: CoreClient,\n    resolutionContext: IUriResolutionContext\n  ): Promise<Result<UriPackageOrWrapper, TError>> \n```\n\n\n## Development\n\nThis package is open-source. It lives within the [Polywrap toolchain monorepo](https://github.com/polywrap/toolchain/tree/origin/packages/js/uri-resolvers). Contributions from the community are welcomed!\n\n### Build\n```bash\nnvm use && yarn install && yarn build\n```\n\n### Test\n```bash\nyarn test\n``","_id":"@polywrap/uri-resolvers-js@0.10.0-pre.11","dist":{"shasum":"33b5513cff1353621bcaf23fc46049d62a4962d1","integrity":"sha512-0a3hH+bLYPtGdVhcpVOknXDE+cL7Fc1EqpTQKMlL2sWF00BC/FR8bMM5eAulqqp47QPb020WLuBfqXt29Ea6Dg==","tarball":"https://registry.npmjs.org/@polywrap/uri-resolvers-js/-/uri-resolvers-js-0.10.0-pre.11.tgz","fileCount":106,"unpackedSize":172693,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIB+fYAKgYHXy/PKRsvUmK4X+8ChuEh0e1Q7jQzGkmHdDAiEA3QEzOzkZRrR8c85eAg7kMeCUlK/YDNms+U+8yytJv5k="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkBmgsACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmp/GA//dLVzED+UqzYm3bGjx/aPzwQmvSyg2w8B22QkgPXeUi1Q2Apf\r\n3+L8fGlFmW8AZCdscqXr5jTGXMqmvLuGOAQ8Q+g158Y83AlW6hWzrNtAP4rG\r\nTbhcWuphFL7XARjMp+ohSTSgh9v3yNcUaq2cfonX3BzdC3C+O8SF5DHYGWvc\r\nXN/QJ08qz8UyL71kgQfoKcJSh6SaMxHMHwH1c8jdF/2bz17+A/GEcI32YWcc\r\nl7f48/FVioDT/Kj9J6zxVNwXeP+Lo13+xnIIFll2u+6JZeufa0JeWZfn3nux\r\n9whvjDzyhlyHsedkFwfM18ltvY+qjxoiIGBPWqTV6tPBD/PIqN1sIC8YZKf3\r\nLeFytPTNEKTj2LDifiaWsmYN1VvFTRVB5birjMk+pmiMcJD5MvfuxPZe4q/L\r\nlKBAnFizhdfNKUWQ+mlF0THlnCxm2XDOTG3sRNQ5RmfBveKB6P1wGTBdx1II\r\nE+CrEqZBbpmmLiojAoR4wlaxmHZFxPkUyc6hBeBmkimHtZGZhf6v+Bo+rhdw\r\nPgO9AcQGCy/fPodrif8//+ijTpv0a1nrfixEogEyq90ZhueBndFz/gcU0hd+\r\nfoiOXqB22GBmoWXe+omJMvDFIWSrxlObqSVZ9GlFry9MhbJvtq/sQu7JuUga\r\n1R4tTlVXUBPlc42XuEBnriImghDOctlE098=\r\n=uwRL\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"polywrap-build-bot","email":"build-bot@polywrap.io"},"directories":{},"maintainers":[{"name":"polywrap-build-bot","email":"build-bot@polywrap.io"},{"name":"dorgjelli","email":"jelli@dorg.tech"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/uri-resolvers-js_0.10.0-pre.11_1678141484293_0.45520029988441024"},"_hasShrinkwrap":false},"0.10.0-pre.12":{"name":"@polywrap/uri-resolvers-js","description":"Polywrap URI resolvers","version":"0.10.0-pre.12","license":"MIT","repository":{"type":"git","url":"https://github.com/polywrap/monorepo.git"},"main":"build/index.js","scripts":{"build":"yarn build:fast && yarn build:snippets && yarn build:readme","build:fast":"rimraf ./build && tsc --project tsconfig.build.json","lint":"eslint --color -c ../../../.eslintrc.js src/","test":"jest --passWithNoTests --runInBand --verbose","test:ci":"jest --passWithNoTests --runInBand --verbose","test:watch":"jest --watch --passWithNoTests --verbose","build:snippets":"tsc --project ./examples/tsconfig.examples.json","build:readme:subsections":"yarn doc-snippets combine -c ./readme/config/sub-sections.json","build:readme:final":"yarn doc-snippets combine -c ./readme/config/final.json","build:readme":"yarn build:readme:subsections && yarn build:readme:final"},"dependencies":{"@polywrap/core-js":"0.10.0-pre.12","@polywrap/result":"0.10.0-pre.12","@polywrap/wrap-manifest-types-js":"0.10.0-pre.12"},"devDependencies":{"@types/jest":"26.0.8","doc-snippets":"~1.0.0","jest":"26.6.3","rimraf":"3.0.2","ts-jest":"26.5.4","ts-node":"10.9.1","typescript":"4.9.5"},"publishConfig":{"access":"public"},"readmeFilename":"README.md","readme":"# @polywrap/uri-resolvers\n<a href=\"https://www.npmjs.com/package/@polywrap/uri-resolvers-js\" target=\"_blank\" rel=\"noopener noreferrer\">\n<img src=\"https://img.shields.io/npm/v/@polywrap/uri-resolvers-js.svg\" alt=\"npm\"/>\n</a>\n\n<br/>\n<br/>\nURI resolvers to customize URI resolution in the Polywrap Client.\n\n## Installation\n\n```bash\nnpm install --save @polywrap/uri-resolvers-js\n```\n\n## Usage\n\nThis example is similar to the default resolver used by the ClientConfigBuilder in the @polywrap/client-config-builder-js package.\n\n```ts\n  const resolver = RecursiveResolver.from(\n      PackageToWrapperCacheResolver.from(\n        [\n          StaticResolver.from([\n              ...redirects,\n              ...wrappers,\n              ...packages,\n            ]),\n          ],\n          new WrapperCache()\n        )\n      );\n```\n\n# Reference\n\n## UriResolverAggregatorBase\n```ts\n/**\n * Abstract class for IUriResolver implementations that aggregate multiple resolvers.\n * The UriResolverAggregatorBase class attempts to resolve a URI by sequentially\n * attempting resolution with each of its composite resolvers.\n * */\nexport abstract class UriResolverAggregatorBase<\n  TResolutionError = undefined,\n  TGetResolversError = undefined\n> implements IUriResolver<TResolutionError | TGetResolversError> \n```\n\n### Methods\n\n#### getUriResolvers\n```ts\n  /**\n   * Get a list of URI Resolvers\n   *\n   * @param uri - the URI to query for resolvers\n   * @param client - a CoreClient instance that can be used to make an invocation\n   * @param resolutionContext - a resolution context to update when resolving URIs\n   *\n   * @returns a list of IUriResolver or an error\n   * */\n  abstract getUriResolvers(\n    uri: Uri,\n    client: CoreClient,\n    resolutionContext: IUriResolutionContext\n  ): Promise<Result<IUriResolver<unknown>[], TGetResolversError>>;\n```\n\n#### tryResolveUri\n```ts\n  /**\n   * Resolve a URI to a wrap package, a wrapper, or a URI.\n   * Attempts to resolve the URI using each of the aggregated resolvers sequentially.\n   *\n   * @param uri - the URI to resolve\n   * @param client - a CoreClient instance that may be used to invoke a wrapper that implements the UriResolver interface\n   * @param resolutionContext - the current URI resolution context\n   * @returns A Promise with a Result containing either a wrap package, a wrapper, or a URI if successful\n   */\n  async tryResolveUri(\n    uri: Uri,\n    client: CoreClient,\n    resolutionContext: IUriResolutionContext\n  ): Promise<\n    Result<UriPackageOrWrapper, TResolutionError | TGetResolversError>\n  > \n```\n\n#### getStepDescription (protected)\n```ts\n  /**\n   * A utility function for generating step descriptions to facilitate resolution context updates\n   *\n   * @param uri - the URI being resolved\n   * @param result - the result of a resolution attempt\n   *\n   * @returns text describing the URI resolution step\n   * */\n  protected abstract getStepDescription(\n    uri: Uri,\n    result: Result<UriPackageOrWrapper, TResolutionError>\n  ): string;\n```\n\n#### tryResolveUriWithResolvers (protected)\n```ts\n  /**\n   * Using each of the aggregated resolvers, attempt to resolve a URI\n   *\n   * @param uri - the URI to resolve\n   * @param client - a CoreClient instance that can be used to make an invocation\n   * @param resolvers - a list of IUriResolver implementations\n   * @param resolutionContext - a resolution context to update when resolving URIs\n   *\n   * @returns a URI, a Wrap Package, or a Wrapper (or an error)\n   * */\n  protected async tryResolveUriWithResolvers(\n    uri: Uri,\n    client: CoreClient,\n    resolvers: IUriResolver<unknown>[],\n    resolutionContext: IUriResolutionContext\n  ): Promise<Result<UriPackageOrWrapper, TResolutionError>> \n```\n\n## UriResolverAggregator\n```ts\n/**\n * An implementation of UriResolverAggregatorBase\n */\nexport class UriResolverAggregator<\n  TResolutionError = undefined,\n  TGetResolversError = undefined\n> extends UriResolverAggregatorBase<\n  TResolutionError,\n  TGetResolversError\n> \n```\n\n### Types\n\n#### GetResolversFunc\n```ts\n/**\n * A function that returns a list of resolvers\n *\n * @param uri - the URI to query\n * @param client - a CoreClient instance\n * */\nexport type GetResolversFunc = (\n  uri: Uri,\n  client: CoreClient\n) => Promise<IUriResolver<unknown>[]>;\n```\n\n#### GetResolversWithErrorFunc\n```ts\n/**\n * A function that returns a list of resolvers or an error\n *\n * @param uri - the URI to query\n * @param client - a CoreClient instance\n * */\nexport type GetResolversWithErrorFunc<TError> = (\n  uri: Uri,\n  client: CoreClient\n) => Promise<Result<IUriResolver<unknown>[], TError>>;\n```\n\n### Methods\n\n#### constructor\n```ts\n  /**\n   * Creates a UriResolverAggregator from a list of resolvers, or from a function\n   * that returns a list of resolvers\n   * */\n  constructor(resolvers: UriResolverLike[], resolverName?: string);\n  constructor(\n    resolvers: (\n      uri: Uri,\n      client: CoreClient\n    ) => Promise<Result<IUriResolver<unknown>[], TGetResolversError>>,\n    resolverName?: string\n  );\n  constructor(resolvers: GetResolversFunc, resolverName?: string);\n  constructor(\n    resolvers:\n      | UriResolverLike[]\n      | GetResolversFunc\n      | GetResolversWithErrorFunc<TGetResolversError>,\n    private _resolverName?: string\n  ) \n```\n\n#### getUriResolvers\n```ts\n  /**\n   * Get a list of URI Resolvers\n   *\n   * @param uri - the URI to query for resolvers\n   * @param client - a CoreClient instance that can be used to make an invocation\n   *\n   * @returns a list of IUriResolver or an error\n   * */\n  async getUriResolvers(\n    uri: Uri,\n    client: CoreClient\n  ): Promise<Result<IUriResolver<unknown>[], TGetResolversError>> \n```\n\n#### getStepDescription (protected)\n```ts\n  /**\n   * A utility function for generating step descriptions to facilitate resolution context updates\n   *\n   * @returns text describing the URI resolution step\n   * */\n  protected getStepDescription = (): string \n```\n\n## IWrapperCache\n```ts\n/** A Wrapper cache */\nexport interface IWrapperCache {\n  /** get a Wrapper from the cache, given its URI index */\n  get(uri: Uri): MaybeAsync<Wrapper | undefined>;\n\n  /** add a Wrapper to the cache, indexed by a URI */\n  set(uri: Uri, wrapper: Wrapper): MaybeAsync<void>;\n}\n```\n\n## WrapperCache\n```ts\n/**\n * A minimal implementation of IWrapperCache\n * */\nexport class WrapperCache implements IWrapperCache \n```\n\n### Methods\n\n#### get\n```ts\n  /** get a Wrapper from the cache, given its URI index */\n  get(uri: Uri): Wrapper | undefined \n```\n\n#### set\n```ts\n  /** add a Wrapper to the cache, indexed by a URI */\n  set(uris: Uri, wrapper: Wrapper): void \n```\n\n## PackageToWrapperCacheResolver\n```ts\n/**\n * An IUriResolver implementation that caches wrappers once they are resolved.\n * The PackageToWrapeprCacheResolver wraps one or more IUriResolver\n * implementations and delegates resolution to them.\n * */\nexport class PackageToWrapperCacheResolver<TError>\n  implements IUriResolver<TError | Error> \n```\n\n### constructor\n```ts\n  /**\n   * Create a PackageToWrapperCacheResolver\n   *\n   * @param _resolverToCache - a resolver to delegate resolution to\n   * @param _cache - a wrapper cache\n   * @param _options - control wrapper manifest deserialization\n   * */\n  constructor(\n    private _resolverToCache: IUriResolver<TError>,\n    private _cache: IWrapperCache,\n    private _options?: {\n      deserializeManifestOptions?: DeserializeManifestOptions;\n    }\n  ) \n```\n\n### Methods\n\n#### from\n```ts\n  /**\n   * Create a PackageToWrapperCacheResolver from a resolver-like object\n   *\n   * @param resolver - a resolver-like item to delegate resolution to\n   * @param cache - a wrapper cache\n   * @param options - control wrapper manifest deserialization\n   *\n   * @returns a PackageToWrapperCacheResolver\n   * */\n  static from<TResolverError = unknown>(\n    resolver: UriResolverLike,\n    cache: IWrapperCache,\n    options?: { deserializeManifestOptions?: DeserializeManifestOptions }\n  ): PackageToWrapperCacheResolver<TResolverError> \n```\n\n#### tryResolveUri\n```ts\n  /**\n   * Resolve a URI to a wrap package, a wrapper, or a URI.\n   * If successful, cache the result.\n   *\n   * @param uri - the URI to resolve\n   * @param client - a CoreClient instance that may be used to invoke a wrapper that implements the UriResolver interface\n   * @param resolutionContext - the current URI resolution context\n   * @returns A Promise with a Result containing either a wrap package, a wrapper, or a URI if successful\n   */\n  async tryResolveUri(\n    uri: Uri,\n    client: CoreClient,\n    resolutionContext: IUriResolutionContext\n  ): Promise<Result<UriPackageOrWrapper, TError | Error>> \n```\n\n## getUriResolutionPath\n```ts\n/**\n * Get a resolution path from the history of a URI resolution attempt\n *\n * @param history - the resolution context\n * @returns the URI's resolution path\n * */\nexport const getUriResolutionPath = (\n  history: IUriResolutionStep<unknown>[]\n): IUriResolutionStep<unknown>[] \n```\n\n## InfiniteLoopError\n```ts\n/**\n * Error used if the URI resolution path contains an infinite loop\n * */\nexport class InfiniteLoopError extends Error \n```\n\n### constructor\n```ts\n  /**\n   * Create an InfiniteLoopError\n   *\n   * @param _uri - URI being resolved\n   * @param _history - URI resolution history\n   * */\n  constructor(\n    private readonly _uri: Uri,\n    private readonly _history: IUriResolutionStep<unknown>[]\n  ) \n```\n\n## ResolverWithHistory\n```ts\n/** An abstract IUriResolver implementation that updates the resolution context */\nexport abstract class ResolverWithHistory<TError = undefined>\n  implements IUriResolver<TError> \n```\n\n### Methods\n\n#### tryResolveUri\n```ts\n  /**\n   * Resolve a URI to a wrap package, a wrapper, or a URI.\n   * Updates the resolution context with the result.\n   *\n   * @remarks\n   * This method calls the internal abstract method _tryResolveUri before\n   * updating the resolution context. Implementations are expect to place\n   * resolution logic in _tryResolveUri.\n   *\n   * @param uri - the URI to resolve\n   * @param client - a CoreClient instance that may be used to invoke a wrapper that implements the UriResolver interface\n   * @param resolutionContext - the current URI resolution context\n   * @returns A Promise with a Result containing either a wrap package, a wrapper, or a URI if successful\n   */\n  async tryResolveUri(\n    uri: Uri,\n    client: CoreClient,\n    resolutionContext: IUriResolutionContext\n  ): Promise<Result<UriPackageOrWrapper, TError>> \n```\n\n#### getStepDescription (protected)\n```ts\n  /**\n   * A utility function for generating step descriptions to facilitate resolution context updates\n   *\n   * @param uri - the URI being resolved\n   * @param result - the result of a resolution attempt\n   *\n   * @returns text describing the URI resolution step\n   * */\n  protected abstract getStepDescription(\n    uri: Uri,\n    result: Result<UriPackageOrWrapper, TError>\n  ): string;\n```\n\n#### _tryResolveUri (protected)\n```ts\n  /**\n   * Resolve a URI to a wrap package, a wrapper, or a URI.\n   * Updates the resolution context with the result.\n   *\n   * @param uri - the URI to resolve\n   * @param client - a CoreClient instance that may be used to invoke a wrapper that implements the UriResolver interface\n   * @param resolutionContext - the current URI resolution context\n   * @returns A Promise with a Result containing either a wrap package, a wrapper, or a URI if successful\n   */\n  protected abstract _tryResolveUri(\n    uri: Uri,\n    client: CoreClient,\n    resolutionContext: IUriResolutionContext\n  ): Promise<Result<UriPackageOrWrapper, TError>>;\n```\n\n## ResolverWithLoopGuard\n```ts\n/** An IUriResolver implementation that prevents infinite loops in the resolution path. */\nexport class ResolverWithLoopGuard<TError = undefined>\n  implements IUriResolver<TError | InfiniteLoopError> \n```\n\n### constructor\n```ts\n  /**\n   * Construct a ResolverWithLoopGuard\n   *\n   * @param _resolver - a resolution to delegate resolution to\n   * */\n  constructor(private _resolver: IUriResolver<TError>) \n```\n\n### Methods\n\n#### from\n```ts\n  /**\n   * Create a ResolverWithLoopGuard from a resolver-like object\n   *\n   * @param resolver - a resolver-like item to delegate resolution to\n   *\n   * @returns a ResolverWithLoopGuard\n   * */\n  static from<TResolverError = unknown>(\n    resolver: UriResolverLike\n  ): ResolverWithLoopGuard<TResolverError> \n```\n\n#### tryResolveUri\n```ts\n  /**\n   * Resolve a URI to a wrap package, a wrapper, or a URI.\n   * Ensures the URI is not caught in an infinite loop by checking if it is already resolving.\n   *\n   * @param uri - the URI to resolve\n   * @param client - a CoreClient instance that may be used to invoke a wrapper that implements the UriResolver interface\n   * @param resolutionContext - the current URI resolution context\n   * @returns A Promise with a Result containing either a wrap package, a wrapper, or a URI if successful\n   */\n  async tryResolveUri(\n    uri: Uri,\n    client: CoreClient,\n    resolutionContext: IUriResolutionContext\n  ): Promise<Result<UriPackageOrWrapper, TError | InfiniteLoopError>> \n```\n\n## UriResolutionResult\n```ts\n/** Factory for creating Result from URI resolution output */\nexport class UriResolutionResult<TError = undefined> \n```\n\n### Methods\n\n#### ok\n```ts\n  /** Returns a Result with `ok` set to true */\n  static ok<TError = undefined>(uri: Uri): Result<UriPackageOrWrapper, TError>;\n  static ok<TError = undefined>(\n    uri: Uri,\n    wrapPackage: IWrapPackage\n  ): Result<UriPackageOrWrapper, TError>;\n  static ok<TError = undefined>(\n    uri: Uri,\n    wrapper: Wrapper\n  ): Result<UriPackageOrWrapper, TError>;\n  static ok<TError = undefined>(\n    uriPackageOrWrapper: UriPackageOrWrapper\n  ): Result<UriPackageOrWrapper, TError>;\n  static ok<TError = undefined>(\n    uriPackageOrWrapper: Uri | UriPackageOrWrapper,\n    packageOrWrapper?: IWrapPackage | Wrapper\n  ): Result<UriPackageOrWrapper, TError> \n```\n\n#### err\n```ts\n  /** Returns a Result with `ok` set to false */\n  static err<TError = unknown>(\n    error: TError\n  ): Result<UriPackageOrWrapper, TError> \n```\n\n## UriResolver\n```ts\n/** An IUriResolver factory */\nexport class UriResolver \n```\n\n### Methods\n\n#### from\n```ts\n  /**\n   * Create an IUriResolver instance\n   *\n   * @param resolverLike - an object that can be transformed into a resolver\n   * @param resolverName - a name to assign to the resolver in resolution history output\n   * */\n  static from<TError = undefined>(\n    resolverLike: UriResolverLike,\n    resolverName?: string\n  ): IUriResolver<TError> \n```\n\n## UriResolverLike\n```ts\n/** An UriResolverLike can be one of three things:\n * - An IUriResolver\n * - An object that can be transformed into a static IUriResolver\n * - An array of UriResolverLike\n * */\nexport type UriResolverLike =\n  | IUriResolver<unknown>\n  | IUriRedirect\n  | IUriPackage\n  | IUriWrapper\n  | UriResolverLike[];\n```\n\n## PackageResolver\n```ts\n/**\n * A Uri Resolver that resolves to an embedded wrap package and correctly updates\n * the resolution history.\n * */\nexport class PackageResolver extends ResolverWithHistory \n```\n\n### constructor\n```ts\n  /**\n   * Construct a PackageResolver\n   *\n   * @param _uri - the URI to redirect to the wrap package\n   * @param wrapPackage - a wrap package\n   * */\n  constructor(private _uri: Uri, private wrapPackage: IWrapPackage) \n```\n\n### Methods\n\n#### getStepDescription (protected)\n```ts\n  /**\n   * A utility function for generating step descriptions to facilitate resolution context updates\n   *\n   * @returns text describing the URI resolution step\n   * */\n  protected getStepDescription = (): string \n```\n\n#### _tryResolveUri (protected)\n```ts\n  /**\n   * Resolve a URI to a wrap package\n   *\n   * @param uri - the URI to resolve\n   * @returns A Promise with a Result containing a wrap package if successful\n   */\n  protected async _tryResolveUri(\n    uri: Uri\n  ): Promise<Result<UriPackageOrWrapper>> \n```\n\n## RedirectResolver\n```ts\n/**\n * A Uri Resolver that resolves to a new URI and correctly updates the\n * resolution history.\n * */\nexport class RedirectResolver<\n  TUri extends string | Uri = string\n> extends ResolverWithHistory \n```\n\n### constructor\n```ts\n  /**\n   * Construct a RedirectResolver\n   *\n   * @param from - the URI to redirect from\n   * @param to - the URI to redirect to\n   * */\n  constructor(from: TUri, to: TUri) \n```\n\n### Methods\n\n#### getStepDescription (protected)\n```ts\n  /**\n   * A utility function for generating step descriptions to facilitate resolution context updates\n   *\n   * @returns text describing the URI resolution step\n   * */\n  protected getStepDescription = (): string \n```\n\n#### _tryResolveUri (protected)\n```ts\n  /**\n   * Resolve a URI to a new URI\n   *\n   * @param uri - the URI to resolve\n   * @returns A Promise with a Result containing a URI if successful\n   */\n  protected async _tryResolveUri(\n    uri: Uri\n  ): Promise<Result<UriPackageOrWrapper>> \n```\n\n## WrapperResolver\n```ts\n/**\n * A Uri Resolver that resolves to an embedded wrapper and correctly updates\n * the resolution history.\n * */\nexport class WrapperResolver extends ResolverWithHistory \n```\n\n### constructor\n```ts\n  /**\n   * Construct a WrapperResolver\n   *\n   * @param _uri - the URI to redirect to the wrapper instance\n   * @param _wrapper - a wrapper\n   * */\n  constructor(private _uri: Uri, private _wrapper: Wrapper) \n```\n\n### Methods\n\n#### getStepDescription (protected)\n```ts\n  /**\n   * A utility function for generating step descriptions to facilitate resolution context updates\n   *\n   * @returns text describing the URI resolution step\n   * */\n  protected getStepDescription = (): string \n```\n\n#### _tryResolveUri\n```ts\n  /**\n   * Resolve a URI to a wrapper\n   *\n   * @param uri - the URI to resolve\n   * @returns A Promise with a Result containing a wrapper if successful\n   */\n  protected async _tryResolveUri(\n    uri: Uri\n  ): Promise<Result<UriPackageOrWrapper>> \n```\n\n## StaticResolver\n```ts\n/**\n * An IUriResolver implementation that efficiently delegates URI resolution to\n * static resolvers--i.e. those that resolve to embedded URIs, Wrappers, and Packages\n * */\nexport class StaticResolver<TError = undefined>\n  implements IUriResolver<TError> \n```\n\n### constructor\n```ts\n  /**\n   * Construct a Static Resolver\n   *\n   * @param uriMap - a mapping of URI to embedded URI, package, or wrapper\n   * */\n  constructor(public uriMap: Map<string, UriPackageOrWrapper>) \n```\n\n### Methods\n\n#### from\n```ts\n  /**\n   * Create a StaticResolver from a static-resolver-like object\n   *\n   * @param staticResolverLikes - an array of resolver-like objects to delegate resolution to\n   *\n   * @returns a StaticResolver\n   * */\n  static from<TError = undefined>(\n    staticResolverLikes: UriResolverLike[]\n  ): StaticResolver<TError> \n```\n\n#### tryResolveUri\n```ts\n  /**\n   * Resolve a URI to a wrap package, a wrapper, or a URI.\n   *\n   * @param uri - the URI to resolve\n   * @param _ - not used\n   * @param resolutionContext - the current URI resolution context\n   * @returns A Promise with a Result containing either a wrap package, a wrapper, or a URI if successful\n   */\n  async tryResolveUri(\n    uri: Uri,\n    _: CoreClient,\n    resolutionContext: IUriResolutionContext\n  ): Promise<Result<UriPackageOrWrapper, TError>> \n```\n\n## StaticResolverLike\n```ts\n/** A StaticResolverLike can be one of two things:\n * - An object that can be transformed into a static IUriResolver\n * - An array of StaticResolverLike\n * */\nexport type StaticResolverLike =\n  | IUriRedirect\n  | IUriPackage\n  | IUriWrapper\n  | StaticResolverLike[];\n```\n\n## RequestSynchronizerResolver\n```ts\n/* Uri resolver that synchronizes requests to the same URI\n * Multiple requests to the same URI will be resolved only once\n * and the result will be cached for subsequent requests (only for the duration of that first request)\n * Can use the `shouldIgnoreCache` option to determine whether to ignore the cached request in case of an error\n * (default is to use the cache)\n */\nexport class RequestSynchronizerResolver<TError>\n  implements IUriResolver<TError> \n```\n\n### constructor\n```ts\n  /**\n   * Construct a RequestSynchronizerResolver\n   *\n   * @param resolverToSynchronize - the inner resolve whose resolution will be synchronized\n   * @param options - the optional options containing the `shouldIgnoreCache` error handler\n   * */\n  constructor(\n    private resolverToSynchronize: IUriResolver<TError>,\n    private options?: {\n      shouldIgnoreCache?: (error: TError | undefined) => boolean;\n    }\n  ) \n```\n\n### Methods\n\n#### from\n```ts\n  /**\n   * Create a RequestSynchronizerResolver from a static-resolver-like object\n   *\n   * @param resolver - a resolver-like object whose resolution will be synchronized\n   * @param options - the optional options containing the `shouldIgnoreCache` error handler\n   *\n   * @returns a RequestSynchronizerResolver\n   * */\n  static from<TResolverError = unknown>(\n    resolver: UriResolverLike,\n    options?: {\n      shouldIgnoreCache?: (error: TResolverError | undefined) => boolean;\n    }\n  ): RequestSynchronizerResolver<TResolverError> \n```\n\n#### tryResolveUri\n```ts\n  /**\n   * Resolve a URI to a wrap package, a wrapper, or a URI.\n   * Attempts to resolve the URI using each of the aggregated resolvers sequentially.\n   *\n   * @param uri - the URI to resolve\n   * @param client - a CoreClient instance that may be used to invoke a wrapper that implements the UriResolver interface\n   * @param resolutionContext - the current URI resolution context\n   * @returns A Promise with a Result containing either a wrap package, a wrapper, or a URI if successful\n   */\n  async tryResolveUri(\n    uri: Uri,\n    client: CoreClient,\n    resolutionContext: IUriResolutionContext\n  ): Promise<Result<UriPackageOrWrapper, TError>> \n```\n\n\n## Development\n\nThis package is open-source. It lives within the [Polywrap toolchain monorepo](https://github.com/polywrap/toolchain/tree/origin/packages/js/uri-resolvers). Contributions from the community are welcomed!\n\n### Build\n```bash\nnvm use && yarn install && yarn build\n```\n\n### Test\n```bash\nyarn test\n``","_id":"@polywrap/uri-resolvers-js@0.10.0-pre.12","dist":{"shasum":"86543e4d672f5406fd93e9e23a43d6006f4d3973","integrity":"sha512-9Fj4gFNUSP/3GgQhb+W5zLuBJrQYkvxKdEsLdQqZwvANuz3p420QtwYLxZ3Vr3pGRbm18bzd1dP0dDAQpUXrYQ==","tarball":"https://registry.npmjs.org/@polywrap/uri-resolvers-js/-/uri-resolvers-js-0.10.0-pre.12.tgz","fileCount":106,"unpackedSize":172693,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD4vR0AEheWYVQfg+gHszBSYS/zZVK7513ggkhNdKCurwIhAPvmS+Yr/b3hrX2d250sLPI/vG7Pl7VCf3Lh+m5R2Igu"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkEAEUACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmryIg//UtK1ySAZamIrIYxJYIq1zLQPreQlBQGadnG6/62WwB5la90/\r\n7Adim1Lhhx5vW6z5wDSN2A0NmgIhi78NYbXd7akLCUs5DGYKYK1CuwxmIiGG\r\n+0G3avK1cEpVGWNWLA+Twkc/QVRFwbzKiXD4qP5SCrsz7WZYDRoZ87+BDqdq\r\ntD5M4e+/UMSU5/eZOPFRR3GghRQXhBx2h5pISespoDzNSkupDcYSoF9BADFZ\r\n6gi4vGIQTeAx6GyAyLl+0RpaLRtpZgaUolnA4cLIGRqdjxXOfenjgJFC80oG\r\nvDMPduWUi8RPTieJTE6/grF+dK4GKAX/yWNDI5+pN1n19TvFYSLEfhZbTi7O\r\n8qQy+rZ49kJhjBtzEPW/K2oXXLgUpXo1YAjy4eatoFQ3hsSNevufk3u3Ax9C\r\nBiDIdU/RKITWVB0DZP73cTBgqk7mMiVO8uQp82zH45xGmA7CJCQFRjCP9h1a\r\nzxT+qahdLgrTTXhLrtECjlf4y6kEok3qTyBkWizoEuiuQDHU3h6RNhE7fL9M\r\n4RsytHLF9xc9F9o7bRmZaJFP8ttTps8DaE9R4D3IhzypnJ9o05ziJdahdZTQ\r\nuDfXqXKRL5yQmr85WxhVK6PX0m5PNIUQSIAErtvzEiBuLXUuCLkbHyipHQMI\r\nsnaloQbGsBzGYxGcU5jhGmoFgtEeG8jLsUI=\r\n=UTKh\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"polywrap-build-bot","email":"build-bot@polywrap.io"},"directories":{},"maintainers":[{"name":"polywrap-build-bot","email":"build-bot@polywrap.io"},{"name":"dorgjelli","email":"jelli@dorg.tech"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/uri-resolvers-js_0.10.0-pre.12_1678770451885_0.10203483410392078"},"_hasShrinkwrap":false},"0.10.0-pre.13":{"name":"@polywrap/uri-resolvers-js","description":"Polywrap URI resolvers","version":"0.10.0-pre.13","license":"MIT","repository":{"type":"git","url":"https://github.com/polywrap/monorepo.git"},"main":"build/index.js","scripts":{"build":"yarn build:fast && yarn build:snippets && yarn build:readme","build:fast":"rimraf ./build && tsc --project tsconfig.build.json","lint":"eslint --color -c ../../../.eslintrc.js src/","test":"jest --passWithNoTests --runInBand --verbose","test:ci":"jest --passWithNoTests --runInBand --verbose","test:watch":"jest --watch --passWithNoTests --verbose","build:snippets":"tsc --project ./examples/tsconfig.examples.json","build:readme:subsections":"yarn doc-snippets combine -c ./readme/config/sub-sections.json","build:readme:final":"yarn doc-snippets combine -c ./readme/config/final.json","build:readme":"yarn build:readme:subsections && yarn build:readme:final"},"dependencies":{"@polywrap/core-js":"0.10.0-pre.13","@polywrap/result":"0.10.0-pre.13","@polywrap/wrap-manifest-types-js":"0.10.0-pre.13"},"devDependencies":{"@polywrap/client-config-builder-js":"0.10.0-pre.13","@polywrap/core-client-js":"0.10.0-pre.13","@polywrap/plugin-js":"0.10.0-pre.13","@types/jest":"26.0.8","doc-snippets":"~1.0.0","jest":"26.6.3","rimraf":"3.0.2","ts-jest":"26.5.4","ts-node":"10.9.1","typescript":"4.9.5"},"publishConfig":{"access":"public"},"readmeFilename":"README.md","readme":"# @polywrap/uri-resolvers\n<a href=\"https://www.npmjs.com/package/@polywrap/uri-resolvers-js\" target=\"_blank\" rel=\"noopener noreferrer\">\n<img src=\"https://img.shields.io/npm/v/@polywrap/uri-resolvers-js.svg\" alt=\"npm\"/>\n</a>\n\n<br/>\n<br/>\nURI resolvers to customize URI resolution in the Polywrap Client.\n\n## Installation\n\n```bash\nnpm install --save @polywrap/uri-resolvers-js\n```\n\n## Usage\n\nThis example is similar to the default resolver used by the ClientConfigBuilder in the @polywrap/client-config-builder-js package.\n\n```ts\n  const resolver = RecursiveResolver.from(\n    WrapperCacheResolver.from(\n      [\n        StaticResolver.from([\n            ...redirects,\n            ...wrappers,\n            ...packages,\n          ]),\n      ],\n      new WrapperCache()\n    )\n  );\n```\n\n# Reference\n\n## UriResolverAggregatorBase\n```ts\n/**\n * Abstract class for IUriResolver implementations that aggregate multiple resolvers.\n * The UriResolverAggregatorBase class attempts to resolve a URI by sequentially\n * attempting resolution with each of its composite resolvers.\n * */\nexport abstract class UriResolverAggregatorBase<\n  TResolutionError = undefined,\n  TGetResolversError = undefined\n> implements IUriResolver<TResolutionError | TGetResolversError> \n```\n\n### Methods\n\n#### getUriResolvers\n```ts\n  /**\n   * Get a list of URI Resolvers\n   *\n   * @param uri - the URI to query for resolvers\n   * @param client - a CoreClient instance that can be used to make an invocation\n   * @param resolutionContext - a resolution context to update when resolving URIs\n   *\n   * @returns a list of IUriResolver or an error\n   * */\n  abstract getUriResolvers(\n    uri: Uri,\n    client: CoreClient,\n    resolutionContext: IUriResolutionContext\n  ): Promise<Result<IUriResolver<unknown>[], TGetResolversError>>;\n```\n\n#### tryResolveUri\n```ts\n  /**\n   * Resolve a URI to a wrap package, a wrapper, or a URI.\n   * Attempts to resolve the URI using each of the aggregated resolvers sequentially.\n   *\n   * @param uri - the URI to resolve\n   * @param client - a CoreClient instance that may be used to invoke a wrapper that implements the UriResolver interface\n   * @param resolutionContext - the current URI resolution context\n   * @returns A Promise with a Result containing either a wrap package, a wrapper, or a URI if successful\n   */\n  async tryResolveUri(\n    uri: Uri,\n    client: CoreClient,\n    resolutionContext: IUriResolutionContext\n  ): Promise<\n    Result<UriPackageOrWrapper, TResolutionError | TGetResolversError>\n  > \n```\n\n#### getStepDescription (protected)\n```ts\n  /**\n   * A utility function for generating step descriptions to facilitate resolution context updates\n   *\n   * @param uri - the URI being resolved\n   * @param result - the result of a resolution attempt\n   *\n   * @returns text describing the URI resolution step\n   * */\n  protected abstract getStepDescription(\n    uri: Uri,\n    result: Result<UriPackageOrWrapper, TResolutionError>\n  ): string;\n```\n\n#### tryResolveUriWithResolvers (protected)\n```ts\n  /**\n   * Using each of the aggregated resolvers, attempt to resolve a URI\n   *\n   * @param uri - the URI to resolve\n   * @param client - a CoreClient instance that can be used to make an invocation\n   * @param resolvers - a list of IUriResolver implementations\n   * @param resolutionContext - a resolution context to update when resolving URIs\n   *\n   * @returns a URI, a Wrap Package, or a Wrapper (or an error)\n   * */\n  protected async tryResolveUriWithResolvers(\n    uri: Uri,\n    client: CoreClient,\n    resolvers: IUriResolver<unknown>[],\n    resolutionContext: IUriResolutionContext\n  ): Promise<Result<UriPackageOrWrapper, TResolutionError>> \n```\n\n## UriResolverAggregator\n```ts\n/**\n * An implementation of UriResolverAggregatorBase\n */\nexport class UriResolverAggregator<\n  TResolutionError = undefined,\n  TGetResolversError = undefined\n> extends UriResolverAggregatorBase<\n  TResolutionError,\n  TGetResolversError\n> \n```\n\n### Types\n\n#### GetResolversFunc\n```ts\n/**\n * A function that returns a list of resolvers\n *\n * @param uri - the URI to query\n * @param client - a CoreClient instance\n * */\nexport type GetResolversFunc = (\n  uri: Uri,\n  client: CoreClient\n) => Promise<IUriResolver<unknown>[]>;\n```\n\n#### GetResolversWithErrorFunc\n```ts\n/**\n * A function that returns a list of resolvers or an error\n *\n * @param uri - the URI to query\n * @param client - a CoreClient instance\n * */\nexport type GetResolversWithErrorFunc<TError> = (\n  uri: Uri,\n  client: CoreClient\n) => Promise<Result<IUriResolver<unknown>[], TError>>;\n```\n\n### Methods\n\n#### constructor\n```ts\n  /**\n   * Creates a UriResolverAggregator from a list of resolvers, or from a function\n   * that returns a list of resolvers\n   * */\n  constructor(resolvers: UriResolverLike[], resolverName?: string);\n  constructor(\n    resolvers: (\n      uri: Uri,\n      client: CoreClient\n    ) => Promise<Result<IUriResolver<unknown>[], TGetResolversError>>,\n    resolverName?: string\n  );\n  constructor(resolvers: GetResolversFunc, resolverName?: string);\n  constructor(\n    resolvers:\n      | UriResolverLike[]\n      | GetResolversFunc\n      | GetResolversWithErrorFunc<TGetResolversError>,\n    private _resolverName?: string\n  ) \n```\n\n#### getUriResolvers\n```ts\n  /**\n   * Get a list of URI Resolvers\n   *\n   * @param uri - the URI to query for resolvers\n   * @param client - a CoreClient instance that can be used to make an invocation\n   *\n   * @returns a list of IUriResolver or an error\n   * */\n  async getUriResolvers(\n    uri: Uri,\n    client: CoreClient\n  ): Promise<Result<IUriResolver<unknown>[], TGetResolversError>> \n```\n\n#### getStepDescription (protected)\n```ts\n  /**\n   * A utility function for generating step descriptions to facilitate resolution context updates\n   *\n   * @returns text describing the URI resolution step\n   * */\n  protected getStepDescription = (): string \n```\n\n## IWrapperCache\n```ts\n/** A Wrapper cache */\nexport interface IWrapperCache {\n  /** get a Wrapper from the cache, given its URI index */\n  get(uri: Uri): MaybeAsync<Wrapper | undefined>;\n\n  /** add a Wrapper to the cache, indexed by a URI */\n  set(uri: Uri, wrapper: Wrapper): MaybeAsync<void>;\n}\n```\n\n## WrapperCache\n```ts\n/**\n * A minimal implementation of IWrapperCache\n * */\nexport class WrapperCache implements IWrapperCache \n```\n\n### Methods\n\n#### get\n```ts\n  /** get a Wrapper from the cache, given its URI index */\n  get(uri: Uri): Wrapper | undefined \n```\n\n#### set\n```ts\n  /** add a Wrapper to the cache, indexed by a URI */\n  set(uris: Uri, wrapper: Wrapper): void \n```\n\n## WrapperCacheResolver\n```ts\n/**\n * An IUriResolver implementation that caches wrappers once they are resolved.\n * As it is a wrapper cache resolver, URI and package caching is outside of the scope for this resolver\n * and can be achieved through other resolvers if necessary.\n * The WrapperCacheResolver wraps an IUriResolver implementation and delegates resolution to it.\n * */\nexport class WrapperCacheResolver<TError>\n  implements IUriResolver<TError | Error> \n```\n\n### constructor\n```ts\n  /**\n   * Creates a WrapperCacheResolver\n   *\n   * @param _innerResolver - a resolver to delegate resolution to\n   * @param _cache - a wrapper cache\n   * */\n  constructor(\n    private _innerResolver: IUriResolver<TError>,\n    private _cache: IWrapperCache\n  ) \n```\n\n### Methods\n\n#### from\n```ts\n  /**\n   * Creates a WrapperCacheResolver from a resolver-like object\n   *\n   * @param innerResolver - a resolver-like item to delegate resolution to\n   * @param cache - a wrapper cache\n   * @param options - control wrapper manifest deserialization\n   *\n   * @returns a WrapperCacheResolver\n   * */\n  static from<TResolverError = unknown>(\n    innerResolver: UriResolverLike,\n    cache: IWrapperCache\n  ): WrapperCacheResolver<TResolverError> \n```\n\n#### tryResolveUri\n```ts\n  /**\n   * Resolve a URI to a wrap package, a wrapper, or a URI.\n   * If successful, cache the result.\n   *\n   * @param uri - the URI to resolve\n   * @param client - a CoreClient instance that may be used to invoke a wrapper that implements the UriResolver interface\n   * @param resolutionContext - the current URI resolution context\n   * @returns A Promise with a Result containing either a wrap package, a wrapper, or a URI if successful\n   */\n  async tryResolveUri(\n    uri: Uri,\n    client: CoreClient,\n    resolutionContext: IUriResolutionContext\n  ): Promise<Result<UriPackageOrWrapper, TError | Error>> \n```\n\n## getUriResolutionPath\n```ts\n/**\n * Get a resolution path from the history of a URI resolution attempt\n *\n * @param history - the resolution context\n * @returns the URI's resolution path\n * */\nexport const getUriResolutionPath = (\n  history: IUriResolutionStep<unknown>[]\n): IUriResolutionStep<unknown>[] \n```\n\n## InfiniteLoopError\n```ts\n/**\n * Error used if the URI resolution path contains an infinite loop\n * */\nexport class InfiniteLoopError extends Error \n```\n\n### constructor\n```ts\n  /**\n   * Create an InfiniteLoopError\n   *\n   * @param _uri - URI being resolved\n   * @param _history - URI resolution history\n   * */\n  constructor(\n    private readonly _uri: Uri,\n    private readonly _history: IUriResolutionStep<unknown>[]\n  ) \n```\n\n## ResolverWithHistory\n```ts\n/** An abstract IUriResolver implementation that updates the resolution context */\nexport abstract class ResolverWithHistory<TError = undefined>\n  implements IUriResolver<TError> \n```\n\n### Methods\n\n#### tryResolveUri\n```ts\n  /**\n   * Resolve a URI to a wrap package, a wrapper, or a URI.\n   * Updates the resolution context with the result.\n   *\n   * @remarks\n   * This method calls the internal abstract method _tryResolveUri before\n   * updating the resolution context. Implementations are expect to place\n   * resolution logic in _tryResolveUri.\n   *\n   * @param uri - the URI to resolve\n   * @param client - a CoreClient instance that may be used to invoke a wrapper that implements the UriResolver interface\n   * @param resolutionContext - the current URI resolution context\n   * @returns A Promise with a Result containing either a wrap package, a wrapper, or a URI if successful\n   */\n  async tryResolveUri(\n    uri: Uri,\n    client: CoreClient,\n    resolutionContext: IUriResolutionContext\n  ): Promise<Result<UriPackageOrWrapper, TError>> \n```\n\n#### getStepDescription (protected)\n```ts\n  /**\n   * A utility function for generating step descriptions to facilitate resolution context updates\n   *\n   * @param uri - the URI being resolved\n   * @param result - the result of a resolution attempt\n   *\n   * @returns text describing the URI resolution step\n   * */\n  protected abstract getStepDescription(\n    uri: Uri,\n    result: Result<UriPackageOrWrapper, TError>\n  ): string;\n```\n\n#### _tryResolveUri (protected)\n```ts\n  /**\n   * Resolve a URI to a wrap package, a wrapper, or a URI.\n   * Updates the resolution context with the result.\n   *\n   * @param uri - the URI to resolve\n   * @param client - a CoreClient instance that may be used to invoke a wrapper that implements the UriResolver interface\n   * @param resolutionContext - the current URI resolution context\n   * @returns A Promise with a Result containing either a wrap package, a wrapper, or a URI if successful\n   */\n  protected abstract _tryResolveUri(\n    uri: Uri,\n    client: CoreClient,\n    resolutionContext: IUriResolutionContext\n  ): Promise<Result<UriPackageOrWrapper, TError>>;\n```\n\n## ResolverWithLoopGuard\n```ts\n/** An IUriResolver implementation that prevents infinite loops in the resolution path. */\nexport class ResolverWithLoopGuard<TError = undefined>\n  implements IUriResolver<TError | InfiniteLoopError> \n```\n\n### constructor\n```ts\n  /**\n   * Construct a ResolverWithLoopGuard\n   *\n   * @param _resolver - a resolution to delegate resolution to\n   * */\n  constructor(private _resolver: IUriResolver<TError>) \n```\n\n### Methods\n\n#### from\n```ts\n  /**\n   * Create a ResolverWithLoopGuard from a resolver-like object\n   *\n   * @param resolver - a resolver-like item to delegate resolution to\n   *\n   * @returns a ResolverWithLoopGuard\n   * */\n  static from<TResolverError = unknown>(\n    resolver: UriResolverLike\n  ): ResolverWithLoopGuard<TResolverError> \n```\n\n#### tryResolveUri\n```ts\n  /**\n   * Resolve a URI to a wrap package, a wrapper, or a URI.\n   * Ensures the URI is not caught in an infinite loop by checking if it is already resolving.\n   *\n   * @param uri - the URI to resolve\n   * @param client - a CoreClient instance that may be used to invoke a wrapper that implements the UriResolver interface\n   * @param resolutionContext - the current URI resolution context\n   * @returns A Promise with a Result containing either a wrap package, a wrapper, or a URI if successful\n   */\n  async tryResolveUri(\n    uri: Uri,\n    client: CoreClient,\n    resolutionContext: IUriResolutionContext\n  ): Promise<Result<UriPackageOrWrapper, TError | InfiniteLoopError>> \n```\n\n## PackageToWrapperResolver\n```ts\n/**\n * An IUriResolver implementation that initalizes wrappers from resolved packages.\n * The PackageToWrapperResolver wraps an IUriResolver implementation and delegates resolution to it.\n * */\nexport class PackageToWrapperResolver<TError>\n  implements IUriResolver<TError | Error> \n```\n\n### constructor\n```ts\n  /**\n   * Creates a PackageToWrapperResolver\n   *\n   * @param _innerResolver - a resolver to delegate resolution to\n   * @param _options - control wrapper manifest deserialization\n   * */\n  constructor(\n    private _innerResolver: IUriResolver<TError>,\n    private _options?: {\n      deserializeManifestOptions?: DeserializeManifestOptions;\n    }\n  ) \n```\n\n### Methods\n\n#### from\n```ts\n  /**\n   * Creates a PackageToWrapperResolver from a resolver-like object\n   *\n   * @param innerResolver - a resolver-like item to delegate resolution to\n   * @param options - control wrapper manifest deserialization\n   *\n   * @returns a PackageToWrapperResolver\n   * */\n  static from<TResolverError = unknown>(\n    innerResolver: UriResolverLike,\n    options?: { deserializeManifestOptions?: DeserializeManifestOptions }\n  ): PackageToWrapperResolver<TResolverError> \n```\n\n#### tryResolveUri\n```ts\n  /**\n   * Resolve a URI to a wrap package, a wrapper, or a URI.\n   * If successful, cache the result.\n   *\n   * @param uri - the URI to resolve\n   * @param client - a CoreClient instance that may be used to invoke a wrapper that implements the UriResolver interface\n   * @param resolutionContext - the current URI resolution context\n   * @returns A Promise with a Result containing either a wrap package, a wrapper, or a URI if successful\n   */\n  async tryResolveUri(\n    uri: Uri,\n    client: CoreClient,\n    resolutionContext: IUriResolutionContext\n  ): Promise<Result<UriPackageOrWrapper, TError | Error>> \n```\n\n## UriResolutionResult\n```ts\n/** Factory for creating Result from URI resolution output */\nexport class UriResolutionResult<TError = undefined> \n```\n\n### Methods\n\n#### ok\n```ts\n  /** Returns a Result with `ok` set to true */\n  static ok<TError = undefined>(uri: Uri): Result<UriPackageOrWrapper, TError>;\n  static ok<TError = undefined>(\n    uri: Uri,\n    wrapPackage: IWrapPackage\n  ): Result<UriPackageOrWrapper, TError>;\n  static ok<TError = undefined>(\n    uri: Uri,\n    wrapper: Wrapper\n  ): Result<UriPackageOrWrapper, TError>;\n  static ok<TError = undefined>(\n    uriPackageOrWrapper: UriPackageOrWrapper\n  ): Result<UriPackageOrWrapper, TError>;\n  static ok<TError = undefined>(\n    uriPackageOrWrapper: Uri | UriPackageOrWrapper,\n    packageOrWrapper?: IWrapPackage | Wrapper\n  ): Result<UriPackageOrWrapper, TError> \n```\n\n#### err\n```ts\n  /** Returns a Result with `ok` set to false */\n  static err<TError = unknown>(\n    error: TError\n  ): Result<UriPackageOrWrapper, TError> \n```\n\n## UriResolver\n```ts\n/** An IUriResolver factory */\nexport class UriResolver \n```\n\n### Methods\n\n#### from\n```ts\n  /**\n   * Create an IUriResolver instance\n   *\n   * @param resolverLike - an object that can be transformed into a resolver\n   * @param resolverName - a name to assign to the resolver in resolution history output\n   * */\n  static from<TError = undefined>(\n    resolverLike: UriResolverLike,\n    resolverName?: string\n  ): IUriResolver<TError> \n```\n\n## UriResolverLike\n```ts\n/** An UriResolverLike can be one of three things:\n * - An IUriResolver\n * - An object that can be transformed into a static IUriResolver\n * - An array of UriResolverLike\n * */\nexport type UriResolverLike =\n  | IUriResolver<unknown>\n  | IUriRedirect\n  | IUriPackage\n  | IUriWrapper\n  | UriResolverLike[];\n```\n\n## PackageResolver\n```ts\n/**\n * A Uri Resolver that resolves to an embedded wrap package and correctly updates\n * the resolution history.\n * */\nexport class PackageResolver extends ResolverWithHistory \n```\n\n### constructor\n```ts\n  /**\n   * Construct a PackageResolver\n   *\n   * @param _uri - the URI to redirect to the wrap package\n   * @param wrapPackage - a wrap package\n   * */\n  constructor(private _uri: Uri, private wrapPackage: IWrapPackage) \n```\n\n### Methods\n\n#### getStepDescription (protected)\n```ts\n  /**\n   * A utility function for generating step descriptions to facilitate resolution context updates\n   *\n   * @returns text describing the URI resolution step\n   * */\n  protected getStepDescription = (): string \n```\n\n#### _tryResolveUri (protected)\n```ts\n  /**\n   * Resolve a URI to a wrap package\n   *\n   * @param uri - the URI to resolve\n   * @returns A Promise with a Result containing a wrap package if successful\n   */\n  protected async _tryResolveUri(\n    uri: Uri\n  ): Promise<Result<UriPackageOrWrapper>> \n```\n\n## RedirectResolver\n```ts\n/**\n * A Uri Resolver that resolves to a new URI and correctly updates the\n * resolution history.\n * */\nexport class RedirectResolver<\n  TUri extends string | Uri = string\n> extends ResolverWithHistory \n```\n\n### constructor\n```ts\n  /**\n   * Construct a RedirectResolver\n   *\n   * @param from - the URI to redirect from\n   * @param to - the URI to redirect to\n   * */\n  constructor(from: TUri, to: TUri) \n```\n\n### Methods\n\n#### getStepDescription (protected)\n```ts\n  /**\n   * A utility function for generating step descriptions to facilitate resolution context updates\n   *\n   * @returns text describing the URI resolution step\n   * */\n  protected getStepDescription = (): string \n```\n\n#### _tryResolveUri (protected)\n```ts\n  /**\n   * Resolve a URI to a new URI\n   *\n   * @param uri - the URI to resolve\n   * @returns A Promise with a Result containing a URI if successful\n   */\n  protected async _tryResolveUri(\n    uri: Uri\n  ): Promise<Result<UriPackageOrWrapper>> \n```\n\n## WrapperResolver\n```ts\n/**\n * A Uri Resolver that resolves to an embedded wrapper and correctly updates\n * the resolution history.\n * */\nexport class WrapperResolver extends ResolverWithHistory \n```\n\n### constructor\n```ts\n  /**\n   * Construct a WrapperResolver\n   *\n   * @param _uri - the URI to redirect to the wrapper instance\n   * @param _wrapper - a wrapper\n   * */\n  constructor(private _uri: Uri, private _wrapper: Wrapper) \n```\n\n### Methods\n\n#### getStepDescription (protected)\n```ts\n  /**\n   * A utility function for generating step descriptions to facilitate resolution context updates\n   *\n   * @returns text describing the URI resolution step\n   * */\n  protected getStepDescription = (): string \n```\n\n#### _tryResolveUri\n```ts\n  /**\n   * Resolve a URI to a wrapper\n   *\n   * @param uri - the URI to resolve\n   * @returns A Promise with a Result containing a wrapper if successful\n   */\n  protected async _tryResolveUri(\n    uri: Uri\n  ): Promise<Result<UriPackageOrWrapper>> \n```\n\n## StaticResolver\n```ts\n/**\n * An IUriResolver implementation that efficiently delegates URI resolution to\n * static resolvers--i.e. those that resolve to embedded URIs, Wrappers, and Packages\n * */\nexport class StaticResolver<TError = undefined>\n  implements IUriResolver<TError> \n```\n\n### constructor\n```ts\n  /**\n   * Construct a Static Resolver\n   *\n   * @param uriMap - a mapping of URI to embedded URI, package, or wrapper\n   * */\n  constructor(public uriMap: Map<string, UriPackageOrWrapper>) \n```\n\n### Methods\n\n#### from\n```ts\n  /**\n   * Create a StaticResolver from a static-resolver-like object\n   *\n   * @param staticResolverLikes - an array of resolver-like objects to delegate resolution to\n   *\n   * @returns a StaticResolver\n   * */\n  static from<TError = undefined>(\n    staticResolverLikes: UriResolverLike[]\n  ): StaticResolver<TError> \n```\n\n#### tryResolveUri\n```ts\n  /**\n   * Resolve a URI to a wrap package, a wrapper, or a URI.\n   *\n   * @param uri - the URI to resolve\n   * @param _ - not used\n   * @param resolutionContext - the current URI resolution context\n   * @returns A Promise with a Result containing either a wrap package, a wrapper, or a URI if successful\n   */\n  async tryResolveUri(\n    uri: Uri,\n    _: CoreClient,\n    resolutionContext: IUriResolutionContext\n  ): Promise<Result<UriPackageOrWrapper, TError>> \n```\n\n## StaticResolverLike\n```ts\n/** A StaticResolverLike can be one of two things:\n * - An object that can be transformed into a static IUriResolver\n * - An array of StaticResolverLike\n * */\nexport type StaticResolverLike =\n  | IUriRedirect\n  | IUriPackage\n  | IUriWrapper\n  | StaticResolverLike[];\n```\n\n## RequestSynchronizerResolver\n```ts\n/* Uri resolver that synchronizes requests to the same URI\n * Multiple requests to the same URI will be resolved only once\n * and the result will be cached for subsequent requests (only for the duration of that first request)\n * Can use the `shouldIgnoreCache` option to determine whether to ignore the cached request in case of an error\n * (default is to use the cache)\n */\nexport class RequestSynchronizerResolver<TError>\n  implements IUriResolver<TError> \n```\n\n### constructor\n```ts\n  /**\n   * Construct a RequestSynchronizerResolver\n   *\n   * @param resolverToSynchronize - the inner resolve whose resolution will be synchronized\n   * @param options - the optional options containing the `shouldIgnoreCache` error handler\n   * */\n  constructor(\n    private resolverToSynchronize: IUriResolver<TError>,\n    private options?: {\n      shouldIgnoreCache?: (error: TError | undefined) => boolean;\n    }\n  ) \n```\n\n### Methods\n\n#### from\n```ts\n  /**\n   * Create a RequestSynchronizerResolver from a static-resolver-like object\n   *\n   * @param resolver - a resolver-like object whose resolution will be synchronized\n   * @param options - the optional options containing the `shouldIgnoreCache` error handler\n   *\n   * @returns a RequestSynchronizerResolver\n   * */\n  static from<TResolverError = unknown>(\n    resolver: UriResolverLike,\n    options?: {\n      shouldIgnoreCache?: (error: TResolverError | undefined) => boolean;\n    }\n  ): RequestSynchronizerResolver<TResolverError> \n```\n\n#### tryResolveUri\n```ts\n  /**\n   * Resolve a URI to a wrap package, a wrapper, or a URI.\n   * Attempts to resolve the URI using each of the aggregated resolvers sequentially.\n   *\n   * @param uri - the URI to resolve\n   * @param client - a CoreClient instance that may be used to invoke a wrapper that implements the UriResolver interface\n   * @param resolutionContext - the current URI resolution context\n   * @returns A Promise with a Result containing either a wrap package, a wrapper, or a URI if successful\n   */\n  async tryResolveUri(\n    uri: Uri,\n    client: CoreClient,\n    resolutionContext: IUriResolutionContext\n  ): Promise<Result<UriPackageOrWrapper, TError>> \n```\n\n\n## Development\n\nThis package is open-source. It lives within the [Polywrap toolchain monorepo](https://github.com/polywrap/toolchain/tree/origin/packages/js/uri-resolvers). Contributions from the community are welcomed!\n\n### Build\n```bash\nnvm use && yarn install && yarn build\n```\n\n### Test\n```bash\nyarn test\n``","_id":"@polywrap/uri-resolvers-js@0.10.0-pre.13","dist":{"shasum":"191bc49e28db1b326e10013846d6c52f3864e37b","integrity":"sha512-Y/866yWsEskQB4bEfVe1TZ/kTwHGQbFpWFW2zrfTSeUuJKybHPzGHHMg2OVHIDVDJaW/NvhiOON1Ff6ggiUgcg==","tarball":"https://registry.npmjs.org/@polywrap/uri-resolvers-js/-/uri-resolvers-js-0.10.0-pre.13.tgz","fileCount":109,"unpackedSize":181430,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCDBtFniOFCt3+ephf88dpw6lGmnJLhhTXAYWze9UAd4gIgapNkyTwaRv6VjBhkEgcJwDfj2FcvFKZkEovgMVF5gdg="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkFRIoACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpBshAAn+I1tXHVT9IxYQwc8IK1d9g7Htri5quM5ZjRBi1l+DNZ1r/9\r\nMhVroQzfDi73hqJ+kUgqiipBvnCU1b8vFz8NautP0xzUPR03mhR2ua1qz4fT\r\nYUn4mNG0ojrZnxDJ/XN/CLhSyYc8NWErEzpIdAX8VA4x5T0RQdVr/oD4PHAl\r\nTlAkxdNtS1Oei9fGkD/ortwv8Dh50BI7irYUSkH7JONm5mwFPVtyG3nsy2CT\r\nQ61XrCzomtQizLY9BJu+I7vIbAmn6VGq2edEhVbgGnLhCa776uYC2qcy18wu\r\nuyOjFywCEQOtW1gZ9pH5pp6YMoL3uifAotpMtvin7MT/OG7kZo9lXwqVFrur\r\nlo4cnuZu2dYS9wgIoPka24OHsNAqem0/pxSqrCYcC/mk53WtEr8tFbsAXcij\r\nmOMjxfZoxkKy1akYcuY0cMv3n9YfYyVMKgwhPOcN/eYz2AJRo/O73KT6lxz+\r\nfq869tciE6YlcWrstJCp7+mYxQU4bKp9PYhQnvAiF82SgdvTeZpEpqkExL1g\r\n5HAyYepZmNcvx58rtG+V7s+DepRyNkmvBXDTiL63Fmw5qmwAt1zTlvlN9ePe\r\nLWEeXdbzhl07qhJ+/+OIw71HU2pl/VtwrDZiFMPgfWjtRNuo5zLXKr0z+/Bf\r\nRasrJI7uXdOxOpkWbzURxurtcGoViKr4B4M=\r\n=raVN\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"polywrap-build-bot","email":"build-bot@polywrap.io"},"directories":{},"maintainers":[{"name":"polywrap-build-bot","email":"build-bot@polywrap.io"},{"name":"dorgjelli","email":"jelli@dorg.tech"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/uri-resolvers-js_0.10.0-pre.13_1679102504371_0.8555079283467346"},"_hasShrinkwrap":false},"0.9.7":{"name":"@polywrap/uri-resolvers-js","description":"Polywrap URI resolvers","version":"0.9.7","license":"MIT","repository":{"type":"git","url":"https://github.com/polywrap/monorepo.git"},"main":"build/index.js","scripts":{"build":"rimraf ./build && tsc --project tsconfig.build.json","lint":"eslint --color -c ../../../.eslintrc.js src/","test":"jest --passWithNoTests --runInBand --verbose","test:ci":"jest --passWithNoTests --runInBand --verbose","test:watch":"jest --watch --passWithNoTests --verbose"},"dependencies":{"@polywrap/core-js":"0.9.7","@polywrap/result":"0.9.7","@polywrap/wrap-manifest-types-js":"0.9.7"},"devDependencies":{"@polywrap/os-js":"0.9.7","@types/jest":"26.0.8","jest":"26.6.3","rimraf":"3.0.2","ts-jest":"26.5.4","ts-node":"8.10.2","typescript":"4.1.6"},"publishConfig":{"access":"public"},"_id":"@polywrap/uri-resolvers-js@0.9.7","dist":{"shasum":"259599a69c1310837b9e451266073227ef138d91","integrity":"sha512-QoQsZFehAEOWAKKmUHjpbgjUt9s/rlsd6Livtwxxv0KONCAp7DQVn0qBtdEvqZxXiOW54l4NP7LKY37+L1d1OA==","tarball":"https://registry.npmjs.org/@polywrap/uri-resolvers-js/-/uri-resolvers-js-0.9.7.tgz","fileCount":96,"unpackedSize":95703,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDQ2rAbGP4GVwVMFNmJOjlEq9esCsgOqXFnsArDGSLMJAiEAio5LFu+5nBstyDTIHl0YsYa0SFDxtII3ymh8unGWJ3o="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkI2O4ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrQtA/9GHl6ttJPECG8/21OikC74YIgB1LMil8cQ/3/zQwGImLPLkdn\r\n1yBPZqICDoBOEGEWNqqqfcWYM3kdNDmcS6PKz921H5jD/ERU1kkjCBnmjSOr\r\nbksLP3z0G1O1MUK7gLq8c/T/vwjAGN7j/s+LJUs5PX9zyKi3oLs/JtnHuWjD\r\nUFfmxT7f8RpgYM4ErWcTl1Rh4fZfIu9xxq7/TZ1Vaz2+iGyC9e6D/nQld8FC\r\nzQsq6/H8A7LvKNb1pILxDbmF4B0l/Gx2NES4Ldpu8Pf3AwuqLpg+kQTGWzj3\r\nPWPVEBqilRFANDkadS0XIkLYBJHT9Fe/FEDSNkAfPCdUnsopGskiGwvmFBoN\r\nipb3SvEZbr5/Np0bEyc4JJalxTOXbdxwT/v/q0duz7qya2v6oBvT/9Uotu+C\r\nvUWzZ4utxgRgKWMQ9TKH5MOp10yAlBqaqrRZ5ff3m39+f0BhhF2ohmbsulgX\r\nlV34HCUmMEogbSR+2RCrIi0LKpDZ17cwjEg8rTl0RUjALH0HlmbflPp5a3oQ\r\nnaYCvegfkjhGxIjPpwVCjyOkb26uVyGJ1Z9OytBEdOgTWtXcX3N+tD1Rnfzx\r\nW5du5kBZbRgG2C4ZKv6W0U01ZC8H70dxUvmsLHrCKqFja5aZDwCtSb0kMv3X\r\nS13WEYcilxNdt3VWktrdorPBVDo+gKKSSlA=\r\n=sGyb\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"polywrap-build-bot","email":"build-bot@polywrap.io"},"directories":{},"maintainers":[{"name":"polywrap-build-bot","email":"build-bot@polywrap.io"},{"name":"dorgjelli","email":"jelli@dorg.tech"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/uri-resolvers-js_0.9.7_1680040888263_0.7152610986702956"},"_hasShrinkwrap":false},"0.10.0-pre.14":{"name":"@polywrap/uri-resolvers-js","description":"Polywrap URI resolvers","version":"0.10.0-pre.14","license":"MIT","repository":{"type":"git","url":"https://github.com/polywrap/monorepo.git"},"main":"build/index.js","scripts":{"build":"yarn build:fast","build:docs":"yarn build:snippets && yarn build:readme","build:fast":"rimraf ./build && tsc --project tsconfig.build.json","lint":"eslint --color -c ../../../.eslintrc.js src/","test":"jest --passWithNoTests --runInBand --verbose","test:watch":"yarn test -- --watch","build:snippets":"tsc --project ./examples/tsconfig.examples.json","build:readme:subsections":"yarn doc-snippets combine -c ./readme/config/sub-sections.json","build:readme:final":"yarn doc-snippets combine -c ./readme/config/final.json","build:readme":"yarn build:readme:subsections && yarn build:readme:final"},"dependencies":{"@polywrap/core-js":"0.10.0-pre.14","@polywrap/result":"0.10.0-pre.14","@polywrap/wrap-manifest-types-js":"0.10.0-pre.14"},"devDependencies":{"@polywrap/client-config-builder-js":"0.10.0-pre.14","@polywrap/core-client-js":"0.10.0-pre.14","@polywrap/plugin-js":"0.10.0-pre.14","@types/jest":"26.0.8","doc-snippets":"~1.0.0","jest":"26.6.3","rimraf":"3.0.2","ts-jest":"26.5.4","ts-node":"10.9.1","typescript":"4.9.5"},"publishConfig":{"access":"public"},"readmeFilename":"README.md","readme":"# @polywrap/uri-resolvers\n<a href=\"https://www.npmjs.com/package/@polywrap/uri-resolvers-js\" target=\"_blank\" rel=\"noopener noreferrer\">\n<img src=\"https://img.shields.io/npm/v/@polywrap/uri-resolvers-js.svg\" alt=\"npm\"/>\n</a>\n\n<br/>\n<br/>\nURI resolvers to customize URI resolution in the Polywrap Client.\n\n## Installation\n\n```bash\nnpm install --save @polywrap/uri-resolvers-js\n```\n\n## Usage\n\nThis example is similar to the default resolver used by the ClientConfigBuilder in the @polywrap/client-config-builder-js package.\n\n```ts\n  const resolver = RecursiveResolver.from(\n    WrapperCacheResolver.from(\n      [\n        StaticResolver.from([\n            ...redirects,\n            ...wrappers,\n            ...packages,\n          ]),\n      ],\n      new WrapperCache()\n    )\n  );\n```\n\n# Reference\n\n## UriResolverAggregatorBase\n```ts\n/**\n * Abstract class for IUriResolver implementations that aggregate multiple resolvers.\n * The UriResolverAggregatorBase class attempts to resolve a URI by sequentially\n * attempting resolution with each of its composite resolvers.\n * */\nexport abstract class UriResolverAggregatorBase<\n  TResolutionError = undefined,\n  TGetResolversError = undefined\n> implements IUriResolver<TResolutionError | TGetResolversError> \n```\n\n### Methods\n\n#### getUriResolvers\n```ts\n  /**\n   * Get a list of URI Resolvers\n   *\n   * @param uri - the URI to query for resolvers\n   * @param client - a CoreClient instance that can be used to make an invocation\n   * @param resolutionContext - a resolution context to update when resolving URIs\n   *\n   * @returns a list of IUriResolver or an error\n   * */\n  abstract getUriResolvers(\n    uri: Uri,\n    client: CoreClient,\n    resolutionContext: IUriResolutionContext\n  ): Promise<Result<IUriResolver<unknown>[], TGetResolversError>>;\n```\n\n#### tryResolveUri\n```ts\n  /**\n   * Resolve a URI to a wrap package, a wrapper, or a URI.\n   * Attempts to resolve the URI using each of the aggregated resolvers sequentially.\n   *\n   * @param uri - the URI to resolve\n   * @param client - a CoreClient instance that may be used to invoke a wrapper that implements the UriResolver interface\n   * @param resolutionContext - the current URI resolution context\n   * @returns A Promise with a Result containing either a wrap package, a wrapper, or a URI if successful\n   */\n  async tryResolveUri(\n    uri: Uri,\n    client: CoreClient,\n    resolutionContext: IUriResolutionContext\n  ): Promise<\n    Result<UriPackageOrWrapper, TResolutionError | TGetResolversError>\n  > \n```\n\n#### getStepDescription (protected)\n```ts\n  /**\n   * A utility function for generating step descriptions to facilitate resolution context updates\n   *\n   * @param uri - the URI being resolved\n   * @param result - the result of a resolution attempt\n   *\n   * @returns text describing the URI resolution step\n   * */\n  protected abstract getStepDescription(\n    uri: Uri,\n    result: Result<UriPackageOrWrapper, TResolutionError>\n  ): string;\n```\n\n#### tryResolveUriWithResolvers (protected)\n```ts\n  /**\n   * Using each of the aggregated resolvers, attempt to resolve a URI\n   *\n   * @param uri - the URI to resolve\n   * @param client - a CoreClient instance that can be used to make an invocation\n   * @param resolvers - a list of IUriResolver implementations\n   * @param resolutionContext - a resolution context to update when resolving URIs\n   *\n   * @returns a URI, a Wrap Package, or a Wrapper (or an error)\n   * */\n  protected async tryResolveUriWithResolvers(\n    uri: Uri,\n    client: CoreClient,\n    resolvers: IUriResolver<unknown>[],\n    resolutionContext: IUriResolutionContext\n  ): Promise<Result<UriPackageOrWrapper, TResolutionError>> \n```\n\n## UriResolverAggregator\n```ts\n/**\n * An implementation of UriResolverAggregatorBase\n */\nexport class UriResolverAggregator<\n  TResolutionError = undefined,\n  TGetResolversError = undefined\n> extends UriResolverAggregatorBase<\n  TResolutionError,\n  TGetResolversError\n> \n```\n\n### Types\n\n#### GetResolversFunc\n```ts\n/**\n * A function that returns a list of resolvers\n *\n * @param uri - the URI to query\n * @param client - a CoreClient instance\n * */\nexport type GetResolversFunc = (\n  uri: Uri,\n  client: CoreClient\n) => Promise<IUriResolver<unknown>[]>;\n```\n\n#### GetResolversWithErrorFunc\n```ts\n/**\n * A function that returns a list of resolvers or an error\n *\n * @param uri - the URI to query\n * @param client - a CoreClient instance\n * */\nexport type GetResolversWithErrorFunc<TError> = (\n  uri: Uri,\n  client: CoreClient\n) => Promise<Result<IUriResolver<unknown>[], TError>>;\n```\n\n### Methods\n\n#### constructor\n```ts\n  /**\n   * Creates a UriResolverAggregator from a list of resolvers, or from a function\n   * that returns a list of resolvers\n   * */\n  constructor(resolvers: UriResolverLike[], resolverName?: string);\n  constructor(\n    resolvers: (\n      uri: Uri,\n      client: CoreClient\n    ) => Promise<Result<IUriResolver<unknown>[], TGetResolversError>>,\n    resolverName?: string\n  );\n  constructor(resolvers: GetResolversFunc, resolverName?: string);\n  constructor(\n    resolvers:\n      | UriResolverLike[]\n      | GetResolversFunc\n      | GetResolversWithErrorFunc<TGetResolversError>,\n    private _resolverName?: string\n  ) \n```\n\n#### getUriResolvers\n```ts\n  /**\n   * Get a list of URI Resolvers\n   *\n   * @param uri - the URI to query for resolvers\n   * @param client - a CoreClient instance that can be used to make an invocation\n   *\n   * @returns a list of IUriResolver or an error\n   * */\n  async getUriResolvers(\n    uri: Uri,\n    client: CoreClient\n  ): Promise<Result<IUriResolver<unknown>[], TGetResolversError>> \n```\n\n#### getStepDescription (protected)\n```ts\n  /**\n   * A utility function for generating step descriptions to facilitate resolution context updates\n   *\n   * @returns text describing the URI resolution step\n   * */\n  protected getStepDescription = (): string \n```\n\n## IWrapperCache\n```ts\n/** A Wrapper cache */\nexport interface IWrapperCache {\n  /** get a Wrapper from the cache, given its URI index */\n  get(uri: Uri): MaybeAsync<Wrapper | undefined>;\n\n  /** add a Wrapper to the cache, indexed by a URI */\n  set(uri: Uri, wrapper: Wrapper): MaybeAsync<void>;\n}\n```\n\n## WrapperCache\n```ts\n/**\n * A minimal implementation of IWrapperCache\n * */\nexport class WrapperCache implements IWrapperCache \n```\n\n### Methods\n\n#### get\n```ts\n  /** get a Wrapper from the cache, given its URI index */\n  get(uri: Uri): Wrapper | undefined \n```\n\n#### set\n```ts\n  /** add a Wrapper to the cache, indexed by a URI */\n  set(uris: Uri, wrapper: Wrapper): void \n```\n\n## WrapperCacheResolver\n```ts\n/**\n * An IUriResolver implementation that caches wrappers once they are resolved.\n * As it is a wrapper cache resolver, URI and package caching is outside of the scope for this resolver\n * and can be achieved through other resolvers if necessary.\n * The WrapperCacheResolver wraps an IUriResolver implementation and delegates resolution to it.\n * */\nexport class WrapperCacheResolver<TError>\n  implements IUriResolver<TError | Error> \n```\n\n### constructor\n```ts\n  /**\n   * Creates a WrapperCacheResolver\n   *\n   * @param _innerResolver - a resolver to delegate resolution to\n   * @param _cache - a wrapper cache\n   * */\n  constructor(\n    private _innerResolver: IUriResolver<TError>,\n    private _cache: IWrapperCache\n  ) \n```\n\n### Methods\n\n#### from\n```ts\n  /**\n   * Creates a WrapperCacheResolver from a resolver-like object\n   *\n   * @param innerResolver - a resolver-like item to delegate resolution to\n   * @param cache - a wrapper cache\n   * @param options - control wrapper manifest deserialization\n   *\n   * @returns a WrapperCacheResolver\n   * */\n  static from<TResolverError = unknown>(\n    innerResolver: UriResolverLike,\n    cache: IWrapperCache\n  ): WrapperCacheResolver<TResolverError> \n```\n\n#### tryResolveUri\n```ts\n  /**\n   * Resolve a URI to a wrap package, a wrapper, or a URI.\n   * If successful, cache the result.\n   *\n   * @param uri - the URI to resolve\n   * @param client - a CoreClient instance that may be used to invoke a wrapper that implements the UriResolver interface\n   * @param resolutionContext - the current URI resolution context\n   * @returns A Promise with a Result containing either a wrap package, a wrapper, or a URI if successful\n   */\n  async tryResolveUri(\n    uri: Uri,\n    client: CoreClient,\n    resolutionContext: IUriResolutionContext\n  ): Promise<Result<UriPackageOrWrapper, TError | Error>> \n```\n\n## getUriResolutionPath\n```ts\n/**\n * Get a resolution path from the history of a URI resolution attempt\n *\n * @param history - the resolution context\n * @returns the URI's resolution path\n * */\nexport const getUriResolutionPath = (\n  history: IUriResolutionStep<unknown>[]\n): IUriResolutionStep<unknown>[] \n```\n\n## InfiniteLoopError\n```ts\n/**\n * Error used if the URI resolution path contains an infinite loop\n * */\nexport class InfiniteLoopError extends Error \n```\n\n### constructor\n```ts\n  /**\n   * Create an InfiniteLoopError\n   *\n   * @param _uri - URI being resolved\n   * @param _history - URI resolution history\n   * */\n  constructor(\n    private readonly _uri: Uri,\n    private readonly _history: IUriResolutionStep<unknown>[]\n  ) \n```\n\n## ResolverWithHistory\n```ts\n/** An abstract IUriResolver implementation that updates the resolution context */\nexport abstract class ResolverWithHistory<TError = undefined>\n  implements IUriResolver<TError> \n```\n\n### Methods\n\n#### tryResolveUri\n```ts\n  /**\n   * Resolve a URI to a wrap package, a wrapper, or a URI.\n   * Updates the resolution context with the result.\n   *\n   * @remarks\n   * This method calls the internal abstract method _tryResolveUri before\n   * updating the resolution context. Implementations are expect to place\n   * resolution logic in _tryResolveUri.\n   *\n   * @param uri - the URI to resolve\n   * @param client - a CoreClient instance that may be used to invoke a wrapper that implements the UriResolver interface\n   * @param resolutionContext - the current URI resolution context\n   * @returns A Promise with a Result containing either a wrap package, a wrapper, or a URI if successful\n   */\n  async tryResolveUri(\n    uri: Uri,\n    client: CoreClient,\n    resolutionContext: IUriResolutionContext\n  ): Promise<Result<UriPackageOrWrapper, TError>> \n```\n\n#### getStepDescription (protected)\n```ts\n  /**\n   * A utility function for generating step descriptions to facilitate resolution context updates\n   *\n   * @param uri - the URI being resolved\n   * @param result - the result of a resolution attempt\n   *\n   * @returns text describing the URI resolution step\n   * */\n  protected abstract getStepDescription(\n    uri: Uri,\n    result: Result<UriPackageOrWrapper, TError>\n  ): string;\n```\n\n#### _tryResolveUri (protected)\n```ts\n  /**\n   * Resolve a URI to a wrap package, a wrapper, or a URI.\n   * Updates the resolution context with the result.\n   *\n   * @param uri - the URI to resolve\n   * @param client - a CoreClient instance that may be used to invoke a wrapper that implements the UriResolver interface\n   * @param resolutionContext - the current URI resolution context\n   * @returns A Promise with a Result containing either a wrap package, a wrapper, or a URI if successful\n   */\n  protected abstract _tryResolveUri(\n    uri: Uri,\n    client: CoreClient,\n    resolutionContext: IUriResolutionContext\n  ): Promise<Result<UriPackageOrWrapper, TError>>;\n```\n\n## ResolverWithLoopGuard\n```ts\n/** An IUriResolver implementation that prevents infinite loops in the resolution path. */\nexport class ResolverWithLoopGuard<TError = undefined>\n  implements IUriResolver<TError | InfiniteLoopError> \n```\n\n### constructor\n```ts\n  /**\n   * Construct a ResolverWithLoopGuard\n   *\n   * @param _resolver - a resolution to delegate resolution to\n   * */\n  constructor(private _resolver: IUriResolver<TError>) \n```\n\n### Methods\n\n#### from\n```ts\n  /**\n   * Create a ResolverWithLoopGuard from a resolver-like object\n   *\n   * @param resolver - a resolver-like item to delegate resolution to\n   *\n   * @returns a ResolverWithLoopGuard\n   * */\n  static from<TResolverError = unknown>(\n    resolver: UriResolverLike\n  ): ResolverWithLoopGuard<TResolverError> \n```\n\n#### tryResolveUri\n```ts\n  /**\n   * Resolve a URI to a wrap package, a wrapper, or a URI.\n   * Ensures the URI is not caught in an infinite loop by checking if it is already resolving.\n   *\n   * @param uri - the URI to resolve\n   * @param client - a CoreClient instance that may be used to invoke a wrapper that implements the UriResolver interface\n   * @param resolutionContext - the current URI resolution context\n   * @returns A Promise with a Result containing either a wrap package, a wrapper, or a URI if successful\n   */\n  async tryResolveUri(\n    uri: Uri,\n    client: CoreClient,\n    resolutionContext: IUriResolutionContext\n  ): Promise<Result<UriPackageOrWrapper, TError | InfiniteLoopError>> \n```\n\n## PackageToWrapperResolver\n```ts\n/**\n * An IUriResolver implementation that initalizes wrappers from resolved packages.\n * The PackageToWrapperResolver wraps an IUriResolver implementation and delegates resolution to it.\n * */\nexport class PackageToWrapperResolver<TError>\n  implements IUriResolver<TError | Error> \n```\n\n### constructor\n```ts\n  /**\n   * Creates a PackageToWrapperResolver\n   *\n   * @param _innerResolver - a resolver to delegate resolution to\n   * @param _options - control wrapper manifest deserialization\n   * */\n  constructor(\n    private _innerResolver: IUriResolver<TError>,\n    private _options?: {\n      deserializeManifestOptions?: DeserializeManifestOptions;\n    }\n  ) \n```\n\n### Methods\n\n#### from\n```ts\n  /**\n   * Creates a PackageToWrapperResolver from a resolver-like object\n   *\n   * @param innerResolver - a resolver-like item to delegate resolution to\n   * @param options - control wrapper manifest deserialization\n   *\n   * @returns a PackageToWrapperResolver\n   * */\n  static from<TResolverError = unknown>(\n    innerResolver: UriResolverLike,\n    options?: { deserializeManifestOptions?: DeserializeManifestOptions }\n  ): PackageToWrapperResolver<TResolverError> \n```\n\n#### tryResolveUri\n```ts\n  /**\n   * Resolve a URI to a wrap package, a wrapper, or a URI.\n   * If successful, cache the result.\n   *\n   * @param uri - the URI to resolve\n   * @param client - a CoreClient instance that may be used to invoke a wrapper that implements the UriResolver interface\n   * @param resolutionContext - the current URI resolution context\n   * @returns A Promise with a Result containing either a wrap package, a wrapper, or a URI if successful\n   */\n  async tryResolveUri(\n    uri: Uri,\n    client: CoreClient,\n    resolutionContext: IUriResolutionContext\n  ): Promise<Result<UriPackageOrWrapper, TError | Error>> \n```\n\n## UriResolutionResult\n```ts\n/** Factory for creating Result from URI resolution output */\nexport class UriResolutionResult<TError = undefined> \n```\n\n### Methods\n\n#### ok\n```ts\n  /** Returns a Result with `ok` set to true */\n  static ok<TError = undefined>(uri: Uri): Result<UriPackageOrWrapper, TError>;\n  static ok<TError = undefined>(\n    uri: Uri,\n    wrapPackage: IWrapPackage\n  ): Result<UriPackageOrWrapper, TError>;\n  static ok<TError = undefined>(\n    uri: Uri,\n    wrapper: Wrapper\n  ): Result<UriPackageOrWrapper, TError>;\n  static ok<TError = undefined>(\n    uriPackageOrWrapper: UriPackageOrWrapper\n  ): Result<UriPackageOrWrapper, TError>;\n  static ok<TError = undefined>(\n    uriPackageOrWrapper: Uri | UriPackageOrWrapper,\n    packageOrWrapper?: IWrapPackage | Wrapper\n  ): Result<UriPackageOrWrapper, TError> \n```\n\n#### err\n```ts\n  /** Returns a Result with `ok` set to false */\n  static err<TError = unknown>(\n    error: TError\n  ): Result<UriPackageOrWrapper, TError> \n```\n\n## UriResolver\n```ts\n/** An IUriResolver factory */\nexport class UriResolver \n```\n\n### Methods\n\n#### from\n```ts\n  /**\n   * Create an IUriResolver instance\n   *\n   * @param resolverLike - an object that can be transformed into a resolver\n   * @param resolverName - a name to assign to the resolver in resolution history output\n   * */\n  static from<TError = undefined>(\n    resolverLike: UriResolverLike,\n    resolverName?: string\n  ): IUriResolver<TError> \n```\n\n## UriResolverLike\n```ts\n/** An UriResolverLike can be one of three things:\n * - An IUriResolver\n * - An object that can be transformed into a static IUriResolver\n * - An array of UriResolverLike\n * */\nexport type UriResolverLike =\n  | IUriResolver<unknown>\n  | IUriRedirect\n  | IUriPackage\n  | IUriWrapper\n  | UriResolverLike[];\n```\n\n## PackageResolver\n```ts\n/**\n * A Uri Resolver that resolves to an embedded wrap package and correctly updates\n * the resolution history.\n * */\nexport class PackageResolver extends ResolverWithHistory \n```\n\n### constructor\n```ts\n  /**\n   * Construct a PackageResolver\n   *\n   * @param _uri - the URI to redirect to the wrap package\n   * @param wrapPackage - a wrap package\n   * */\n  constructor(private _uri: Uri, private wrapPackage: IWrapPackage) \n```\n\n### Methods\n\n#### getStepDescription (protected)\n```ts\n  /**\n   * A utility function for generating step descriptions to facilitate resolution context updates\n   *\n   * @returns text describing the URI resolution step\n   * */\n  protected getStepDescription = (): string \n```\n\n#### _tryResolveUri (protected)\n```ts\n  /**\n   * Resolve a URI to a wrap package\n   *\n   * @param uri - the URI to resolve\n   * @returns A Promise with a Result containing a wrap package if successful\n   */\n  protected async _tryResolveUri(\n    uri: Uri\n  ): Promise<Result<UriPackageOrWrapper>> \n```\n\n## RedirectResolver\n```ts\n/**\n * A Uri Resolver that resolves to a new URI and correctly updates the\n * resolution history.\n * */\nexport class RedirectResolver<\n  TUri extends string | Uri = string\n> extends ResolverWithHistory \n```\n\n### constructor\n```ts\n  /**\n   * Construct a RedirectResolver\n   *\n   * @param from - the URI to redirect from\n   * @param to - the URI to redirect to\n   * */\n  constructor(from: TUri, to: TUri) \n```\n\n### Methods\n\n#### getStepDescription (protected)\n```ts\n  /**\n   * A utility function for generating step descriptions to facilitate resolution context updates\n   *\n   * @returns text describing the URI resolution step\n   * */\n  protected getStepDescription = (): string \n```\n\n#### _tryResolveUri (protected)\n```ts\n  /**\n   * Resolve a URI to a new URI\n   *\n   * @param uri - the URI to resolve\n   * @returns A Promise with a Result containing a URI if successful\n   */\n  protected async _tryResolveUri(\n    uri: Uri\n  ): Promise<Result<UriPackageOrWrapper>> \n```\n\n## WrapperResolver\n```ts\n/**\n * A Uri Resolver that resolves to an embedded wrapper and correctly updates\n * the resolution history.\n * */\nexport class WrapperResolver extends ResolverWithHistory \n```\n\n### constructor\n```ts\n  /**\n   * Construct a WrapperResolver\n   *\n   * @param _uri - the URI to redirect to the wrapper instance\n   * @param _wrapper - a wrapper\n   * */\n  constructor(private _uri: Uri, private _wrapper: Wrapper) \n```\n\n### Methods\n\n#### getStepDescription (protected)\n```ts\n  /**\n   * A utility function for generating step descriptions to facilitate resolution context updates\n   *\n   * @returns text describing the URI resolution step\n   * */\n  protected getStepDescription = (): string \n```\n\n#### _tryResolveUri\n```ts\n  /**\n   * Resolve a URI to a wrapper\n   *\n   * @param uri - the URI to resolve\n   * @returns A Promise with a Result containing a wrapper if successful\n   */\n  protected async _tryResolveUri(\n    uri: Uri\n  ): Promise<Result<UriPackageOrWrapper>> \n```\n\n## StaticResolver\n```ts\n/**\n * An IUriResolver implementation that efficiently delegates URI resolution to\n * static resolvers--i.e. those that resolve to embedded URIs, Wrappers, and Packages\n * */\nexport class StaticResolver<TError = undefined>\n  implements IUriResolver<TError> \n```\n\n### constructor\n```ts\n  /**\n   * Construct a Static Resolver\n   *\n   * @param uriMap - a mapping of URI to embedded URI, package, or wrapper\n   * */\n  constructor(public uriMap: Map<string, UriPackageOrWrapper>) \n```\n\n### Methods\n\n#### from\n```ts\n  /**\n   * Create a StaticResolver from a static-resolver-like object\n   *\n   * @param staticResolverLikes - an array of resolver-like objects to delegate resolution to\n   *\n   * @returns a StaticResolver\n   * */\n  static from<TError = undefined>(\n    staticResolverLikes: UriResolverLike[]\n  ): StaticResolver<TError> \n```\n\n#### tryResolveUri\n```ts\n  /**\n   * Resolve a URI to a wrap package, a wrapper, or a URI.\n   *\n   * @param uri - the URI to resolve\n   * @param _ - not used\n   * @param resolutionContext - the current URI resolution context\n   * @returns A Promise with a Result containing either a wrap package, a wrapper, or a URI if successful\n   */\n  async tryResolveUri(\n    uri: Uri,\n    _: CoreClient,\n    resolutionContext: IUriResolutionContext\n  ): Promise<Result<UriPackageOrWrapper, TError>> \n```\n\n## StaticResolverLike\n```ts\n/** A StaticResolverLike can be one of two things:\n * - An object that can be transformed into a static IUriResolver\n * - An array of StaticResolverLike\n * */\nexport type StaticResolverLike =\n  | IUriRedirect\n  | IUriPackage\n  | IUriWrapper\n  | StaticResolverLike[];\n```\n\n## RequestSynchronizerResolver\n```ts\n/* Uri resolver that synchronizes requests to the same URI\n * Multiple requests to the same URI will be resolved only once\n * and the result will be cached for subsequent requests (only for the duration of that first request)\n * Can use the `shouldIgnoreCache` option to determine whether to ignore the cached request in case of an error\n * (default is to use the cache)\n */\nexport class RequestSynchronizerResolver<TError>\n  implements IUriResolver<TError> \n```\n\n### constructor\n```ts\n  /**\n   * Construct a RequestSynchronizerResolver\n   *\n   * @param resolverToSynchronize - the inner resolve whose resolution will be synchronized\n   * @param options - the optional options containing the `shouldIgnoreCache` error handler\n   * */\n  constructor(\n    private resolverToSynchronize: IUriResolver<TError>,\n    private options?: {\n      shouldIgnoreCache?: (error: TError | undefined) => boolean;\n    }\n  ) \n```\n\n### Methods\n\n#### from\n```ts\n  /**\n   * Create a RequestSynchronizerResolver from a static-resolver-like object\n   *\n   * @param resolver - a resolver-like object whose resolution will be synchronized\n   * @param options - the optional options containing the `shouldIgnoreCache` error handler\n   *\n   * @returns a RequestSynchronizerResolver\n   * */\n  static from<TResolverError = unknown>(\n    resolver: UriResolverLike,\n    options?: {\n      shouldIgnoreCache?: (error: TResolverError | undefined) => boolean;\n    }\n  ): RequestSynchronizerResolver<TResolverError> \n```\n\n#### tryResolveUri\n```ts\n  /**\n   * Resolve a URI to a wrap package, a wrapper, or a URI.\n   * Attempts to resolve the URI using each of the aggregated resolvers sequentially.\n   *\n   * @param uri - the URI to resolve\n   * @param client - a CoreClient instance that may be used to invoke a wrapper that implements the UriResolver interface\n   * @param resolutionContext - the current URI resolution context\n   * @returns A Promise with a Result containing either a wrap package, a wrapper, or a URI if successful\n   */\n  async tryResolveUri(\n    uri: Uri,\n    client: CoreClient,\n    resolutionContext: IUriResolutionContext\n  ): Promise<Result<UriPackageOrWrapper, TError>> \n```\n\n\n## Development\n\nThis package is open-source. It lives within the [Polywrap toolchain monorepo](https://github.com/polywrap/toolchain/tree/origin/packages/js/uri-resolvers). Contributions from the community are welcomed!\n\n### Build\n```bash\nnvm use && yarn install && yarn build\n```\n\n### Test\n```bash\nyarn test\n``","_id":"@polywrap/uri-resolvers-js@0.10.0-pre.14","dist":{"shasum":"229df53c740afac820ff0c4b019eaf90a11af954","integrity":"sha512-kkeJyLhlp7UKSV88+zGZet9Xqiiku0NgX1FU7bovMWdySFp/t6qcnlSKg+NX0vszlWUcr06PF5OrswMLWGDAOQ==","tarball":"https://registry.npmjs.org/@polywrap/uri-resolvers-js/-/uri-resolvers-js-0.10.0-pre.14.tgz","fileCount":115,"unpackedSize":193223,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIA4Ms14Dg5FAdI18K1onqRw8rrIXGaaZSw8mVy6SVsehAiAFHrGwjrmNFqLX4CqF6/WcOXqq/SrL2sRl9mhBaZ8CRg=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkN37yACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqhCg//XV9p03kEm7WgSn6+iYNeToL+Y3EZlNY+u+0fU0GWUywAZb2C\r\np4hOfu7Hy1CEE2KvBalfwL5L9z9iylGXYfeQ534xgk6f4DtQu0Gco1Y0vw+r\r\ncCuVEX/zPt5/SM9pmaG0GcdWFmosAnhbOM365stVI0XZtM9ll0UDU93pGRfD\r\n/347KtB4Qe3xK04KrFPdJdHUpJhRA0/WyUlJZ700FWLpAZ0TMNqBeUa1I0fW\r\nzEl5KIaeXFRx8jQbv/GlxiNzEYzPPkNzXKAmD3EMkwlP94jp6UgTZxLfjiJj\r\nOZgC3tRBBk7vD7fTGyTONBVj0JBTZhSloguuOP8NMekCnJODGPiE8defNmpG\r\nzHXpgCfGUwMNJNmkO59DRbstAFqkgUYvna1hu18m6bIlYSaX7VUSVvYBowgW\r\nf7e641kIXDg2CinUmohUr1/FeGbV5ItGU6ZfFJvFNfCfKArv6RjjA2nuEnS5\r\ngkFDMI8t0UQySxub6rjljpkHUsSZPpmYIYenEBZOFgOibbRvowmCBenf7t5N\r\nCNS4XIwhxLTz9ErNZJSf3su35gzHTRwqrlUm9UKYjwdIJ1OYtB8nwlZx0XAm\r\nTY9wuxN+VWhG6/UxdMGMbqUnpipnaE2lu1+3W6ts3pEPXh3TLKaBzwe9GfNz\r\nqKBEzf2pcWLAf71gr2YGcbMBKoppBwiwLv4=\r\n=i8BZ\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"polywrap-build-bot","email":"build-bot@polywrap.io"},"directories":{},"maintainers":[{"name":"polywrap-build-bot","email":"build-bot@polywrap.io"},{"name":"dorgjelli","email":"jelli@dorg.tech"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/uri-resolvers-js_0.10.0-pre.14_1681358578732_0.9409385899245932"},"_hasShrinkwrap":false},"0.10.0":{"name":"@polywrap/uri-resolvers-js","description":"Polywrap URI resolvers","version":"0.10.0","license":"MIT","repository":{"type":"git","url":"https://github.com/polywrap/monorepo.git"},"main":"build/index.js","scripts":{"build":"yarn build:fast","build:docs":"yarn build:snippets && yarn build:readme","build:fast":"rimraf ./build && tsc --project tsconfig.build.json","lint":"eslint --color -c ../../../.eslintrc.js src/","test":"jest --passWithNoTests --runInBand --verbose","test:watch":"yarn test -- --watch","build:snippets":"tsc --project ./examples/tsconfig.examples.json","build:readme:subsections":"yarn doc-snippets combine -c ./readme/config/sub-sections.json","build:readme:final":"yarn doc-snippets combine -c ./readme/config/final.json","build:readme":"yarn build:readme:subsections && yarn build:readme:final"},"dependencies":{"@polywrap/core-js":"0.10.0","@polywrap/result":"0.10.0","@polywrap/wrap-manifest-types-js":"0.10.0"},"devDependencies":{"@polywrap/client-config-builder-js":"0.10.0","@polywrap/core-client-js":"0.10.0","@polywrap/plugin-js":"0.10.0","@types/jest":"26.0.8","doc-snippets":"~1.0.0","jest":"26.6.3","rimraf":"3.0.2","ts-jest":"26.5.4","ts-node":"10.9.1","typescript":"4.9.5"},"publishConfig":{"access":"public"},"_id":"@polywrap/uri-resolvers-js@0.10.0","dist":{"shasum":"d80163666a5110a4a7bd36be7e0961364af761ce","integrity":"sha512-lZP+sN4lnp8xRklYWkrAJFECFNXDsBawGqVk7jUrbcw1CX8YODHyDEB0dSV8vN30DMP4h70W7V4QeNwPiE1EzQ==","tarball":"https://registry.npmjs.org/@polywrap/uri-resolvers-js/-/uri-resolvers-js-0.10.0.tgz","fileCount":115,"unpackedSize":193174,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFwclBqwgoe61mVjXG/nmpQl3kgDxybQrlEvF8pmL/1FAiEArsXu+Cy6F3nG8HK9F8BpX76p/mseBE5yqijLVvcBzSU="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkOOGWACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmriWQ//eN9c/vwg526ivi6tQjx7p/25y071rH5Kq88kKg9Xr9E42oTE\r\na4VpV49BSuw41zkdQpySKRfu3IvvWg0xm+eEAbFmnHgzAea8COvg1Ol+XPrq\r\nUQNbjQkCXUuCQWxaP2i/IbbHyD1hitxsA6dVlxCXH+RoVr/9fxBLB2w/j48d\r\nQ2VZ4aHStWx3eiXVcg+JNKYQmDTpiTTARMV8de0jN4h5LcK9NBgvgUs47QWZ\r\n3rQxD//GS3wHIF1V7Xu1evku03+G2SeL2y58FaJGTcmhRz0JDdF8kG0ExFdj\r\nW+A/JC5oLJaca3OCP7YTMgzB/HF72sXTLAH0F4xjzLEEcrBXFG3Z+Oo9NOGG\r\nReJNizFLHa5j2abiJWFr8EyFcAjgKC7s11Jo0XR0lbzmehSTLwMPxxbqjXF6\r\nn74ts3i/2+pTnCOH0FoV0g0+coFi3vWRcAHF8mEXSkpIuhIptUVs8Fq2k6Rh\r\n3z0qEeAdEcZZJ9yayY8ggVyzvKiTiPG/6nDv2qWy7OCAAgYPGSVFKlqxJ6Tn\r\nlsZRBmvFUOA29Sm14LETtYmyWnlpQsPA1kGNQxsJJZPnE3Uf/Z55QeRfgvFV\r\nihRVJ2ve7U/WsRYVbnephUsk0pQ5JnV/vg3XzR7+M4EH70mwXsz1N1ly4Vmk\r\ngqT3r6S1GuF033ET43o1I6yCzyJ7PItAFao=\r\n=H63E\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"polywrap-build-bot","email":"build-bot@polywrap.io"},"directories":{},"maintainers":[{"name":"polywrap-build-bot","email":"build-bot@polywrap.io"},{"name":"dorgjelli","email":"jelli@dorg.tech"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/uri-resolvers-js_0.10.0_1681449366117_0.9563514384535241"},"_hasShrinkwrap":false},"0.10.1":{"name":"@polywrap/uri-resolvers-js","description":"Polywrap URI resolvers","version":"0.10.1","license":"MIT","repository":{"type":"git","url":"https://github.com/polywrap/javascript-client.git"},"main":"build/index.js","scripts":{"build":"yarn build:fast","build:docs":"yarn build:snippets && yarn build:readme","build:fast":"rimraf ./build && tsc --project tsconfig.build.json","lint":"eslint --color -c ../../.eslintrc.js src/","test":"jest --passWithNoTests --runInBand --verbose --config ../../jest.config.js --rootDir .","test:watch":"yarn test -- --watch","build:snippets":"tsc --project ./examples/tsconfig.examples.json","build:readme:subsections":"yarn doc-snippets combine -c ./readme/config/sub-sections.json","build:readme:final":"yarn doc-snippets combine -c ./readme/config/final.json","build:readme":"yarn build:readme:subsections && yarn build:readme:final"},"dependencies":{"@polywrap/core-js":"0.10.1","@polywrap/result":"0.10.1","@polywrap/wrap-manifest-types-js":"0.10.1"},"devDependencies":{"@polywrap/client-config-builder-js":"0.10.1","@polywrap/core-client-js":"0.10.1","@polywrap/plugin-js":"0.10.1","@types/jest":"29.5.0","doc-snippets":"~1.0.0","jest":"29.5.0","rimraf":"3.0.2","ts-jest":"29.1.0","ts-node":"10.9.1","typescript":"4.9.5"},"publishConfig":{"access":"public"},"_id":"@polywrap/uri-resolvers-js@0.10.1","dist":{"shasum":"8ea24ba9348f31da0ccc691f92024c864db27d00","integrity":"sha512-/PtGzoR/PwQPIr630iV15/ah7yu/zKYMzm0TfUIFpF+pRWfIR/6VD086d20PLE6h6UE4Jd5VHzEIXeb6FqdbgA==","tarball":"https://registry.npmjs.org/@polywrap/uri-resolvers-js/-/uri-resolvers-js-0.10.1.tgz","fileCount":112,"unpackedSize":190344,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD2hmnPdxba/NYtGqimLN04oXlYBngPH6xuL9CNK700igIgXWNNM+eTiIzlO9TCFnfyayUW67JF+QewmEM9d7C7eio="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkTKTWACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpDMg//UwgWrJ43sdbcyUn7EeRZFwICSYmj/oMqsUi8nvKrSvhT6sYk\r\ncCSp2ZMjUaIus+2sX8lPxNezgPO4TUjUf6B4wOhTgLKNeBMVUb+PmLwPYMq6\r\neiWu67lupQ6+zE8tnboay3btbItiWhsfKG7ZnEuAUuuRPfnqdf6ESxWsRMUj\r\njG+gbg5enR7BvsJRzv3BfqpqZygpyENbyhW8AkO7v+5HrKaU0cxOFAnXP0Ec\r\nL91t45kvhNGsTlK7ovmmQdsVDcZ3X0mtg1Srb5r9iYFn4jtAuvdnNaCPV2xM\r\nhfKlYnIlo6ltsqwncQZ793ufXiZaSWYaodT73TBPbVs6nKjAWX59HyU7kGNg\r\nIyPNAorU5HcYojnVoTgihS6lNErcKSUNfqbSqKLnLWRxxPznfgYc0OtIdx6X\r\nTmGBn5rq7oknBlcLtXmDd93KiVi6C3MvvmD2w3Z5rmJyjHVLEv1455KxY+P3\r\nkv7PMKrZ+EL65oZtJFON+TxbirROzI21q5MmzGDMaS0coQX/qY99vbF4/G4c\r\npjUjC+aSdcHZBtsm/tJjS989PJ0/YRL5hlXGx8fFkVDpQjSUqgvzZSsQxalL\r\nfllDtbVMvfnt0pIUx3vGOJp5Pz4Bk0EG7eiUQGLPGfAB63hXvBa+63NaOcSu\r\nZ4cAfnvB8spqi7TvSvVoBCuyvChIJAsCJhQ=\r\n=wFlB\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"polywrap-build-bot","email":"build-bot@polywrap.io"},"directories":{},"maintainers":[{"name":"polywrap-build-bot","email":"build-bot@polywrap.io"},{"name":"dorgjelli","email":"jelli@dorg.tech"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/uri-resolvers-js_0.10.1_1682744534234_0.8949027007442665"},"_hasShrinkwrap":false},"0.11.0":{"name":"@polywrap/uri-resolvers-js","description":"Polywrap URI resolvers","version":"0.11.0","license":"MIT","repository":{"type":"git","url":"https://github.com/polywrap/javascript-client.git"},"main":"build/index.js","scripts":{"build":"yarn build:fast","build:docs":"yarn build:snippets && yarn build:readme","build:fast":"rimraf ./build && tsc --project tsconfig.build.json","lint":"eslint --color -c ../../.eslintrc.js src/","test":"jest --passWithNoTests --runInBand --verbose --config ../../jest.config.js --rootDir .","test:watch":"yarn test -- --watch","build:snippets":"tsc --project ./examples/tsconfig.examples.json","build:readme:subsections":"yarn doc-snippets combine -c ./readme/config/sub-sections.json","build:readme:final":"yarn doc-snippets combine -c ./readme/config/final.json","build:readme":"yarn build:readme:subsections && yarn build:readme:final"},"dependencies":{"@polywrap/core-js":"0.11.0","@polywrap/result":"0.11.0","@polywrap/wrap-manifest-types-js":"0.11.0"},"devDependencies":{"@polywrap/client-config-builder-js":"0.11.0","@polywrap/core-client-js":"0.11.0","@polywrap/plugin-js":"0.11.0","@types/jest":"29.5.0","doc-snippets":"~1.0.0","jest":"29.5.0","rimraf":"3.0.2","ts-jest":"29.1.0","ts-node":"10.9.1","typescript":"4.9.5"},"publishConfig":{"access":"public"},"_id":"@polywrap/uri-resolvers-js@0.11.0","dist":{"shasum":"5ad22e8baddef48814756ff56bc7051bffe7e9d2","integrity":"sha512-vNNur0TuzpcNGaTJRbqNnzOaexga4sCfAgUUkcvrl8dyozFbhcDqqt1Ok6v0vGHD8MXPpSHNk1JNzPP5xnE9FQ==","tarball":"https://registry.npmjs.org/@polywrap/uri-resolvers-js/-/uri-resolvers-js-0.11.0.tgz","fileCount":112,"unpackedSize":190360,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCWVLxfvZxUN2tzQINw4vRTBoNMrT6awYpDf3Zs4j8u9AIhAK31W0t1eca5vcDWLc3C2/5/VZNngoTKW+Bklkv8S0ij"}]},"_npmUser":{"name":"polywrap-build-bot","email":"build-bot@polywrap.io"},"directories":{},"maintainers":[{"name":"polywrap-build-bot","email":"build-bot@polywrap.io"},{"name":"dorgjelli","email":"jelli@dorg.tech"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/uri-resolvers-js_0.11.0_1687831253573_0.0829822256526902"},"_hasShrinkwrap":false},"0.12.0-pre.1":{"name":"@polywrap/uri-resolvers-js","description":"Polywrap URI resolvers","version":"0.12.0-pre.1","license":"MIT","repository":{"type":"git","url":"https://github.com/polywrap/javascript-client.git"},"main":"build/index.js","scripts":{"build":"yarn build:fast","build:docs":"yarn build:snippets && yarn build:readme","build:fast":"rimraf ./build && tsc --project tsconfig.build.json","lint":"eslint --color -c ../../.eslintrc.js src/","test":"jest --passWithNoTests --runInBand --verbose --config ../../jest.config.js --rootDir .","test:watch":"yarn test -- --watch","build:snippets":"tsc --project ./examples/tsconfig.examples.json","build:readme:subsections":"yarn doc-snippets combine -c ./readme/config/sub-sections.json","build:readme:final":"yarn doc-snippets combine -c ./readme/config/final.json","build:readme":"yarn build:readme:subsections && yarn build:readme:final"},"dependencies":{"@polywrap/core-js":"0.12.0-pre.1","@polywrap/result":"0.12.0-pre.1","@polywrap/wrap-manifest-types-js":"0.12.0-pre.1"},"devDependencies":{"@polywrap/client-config-builder-js":"0.12.0-pre.1","@polywrap/core-client-js":"0.12.0-pre.1","@polywrap/plugin-js":"0.12.0-pre.1","@types/jest":"29.5.0","doc-snippets":"~1.0.0","jest":"29.5.0","rimraf":"3.0.2","ts-jest":"29.1.0","ts-node":"10.9.1","typescript":"4.9.5"},"publishConfig":{"access":"public"},"readmeFilename":"README.md","readme":"# @polywrap/uri-resolvers\n<a href=\"https://www.npmjs.com/package/@polywrap/uri-resolvers-js\" target=\"_blank\" rel=\"noopener noreferrer\">\n<img src=\"https://img.shields.io/npm/v/@polywrap/uri-resolvers-js.svg\" alt=\"npm\"/>\n</a>\n\n<br/>\n<br/>\nURI resolvers to customize URI resolution in the Polywrap Client.\n\n## Installation\n\n```bash\nnpm install --save @polywrap/uri-resolvers-js\n```\n\n## Usage\n\nThis example is similar to the default resolver used by the PolywrapClientConfigBuilder in the @polywrap/client-config-builder-js package.\n\n```ts\n  const resolver = RecursiveResolver.from(\n    WrapperCacheResolver.from(\n      [\n        StaticResolver.from([\n            ...redirects,\n            ...wrappers,\n            ...packages,\n          ]),\n      ],\n      new WrapperCache()\n    )\n  );\n```\n\n# Reference\n\n## UriResolverAggregatorBase\n```ts\n/**\n * Abstract class for IUriResolver implementations that aggregate multiple resolvers.\n * The UriResolverAggregatorBase class attempts to resolve a URI by sequentially\n * attempting resolution with each of its composite resolvers.\n * */\nexport abstract class UriResolverAggregatorBase<\n  TResolutionError = undefined,\n  TGetResolversError = undefined\n> implements IUriResolver<TResolutionError | TGetResolversError> \n```\n\n### Methods\n\n#### getUriResolvers\n```ts\n  /**\n   * Get a list of URI Resolvers\n   *\n   * @param uri - the URI to query for resolvers\n   * @param client - a CoreClient instance that can be used to make an invocation\n   * @param resolutionContext - a resolution context to update when resolving URIs\n   *\n   * @returns a list of IUriResolver or an error\n   * */\n  abstract getUriResolvers(\n    uri: Uri,\n    client: CoreClient,\n    resolutionContext: IUriResolutionContext\n  ): Promise<Result<IUriResolver<unknown>[], TGetResolversError>>;\n```\n\n#### tryResolveUri\n```ts\n  /**\n   * Resolve a URI to a wrap package, a wrapper, or a URI.\n   * Attempts to resolve the URI using each of the aggregated resolvers sequentially.\n   *\n   * @param uri - the URI to resolve\n   * @param client - a CoreClient instance that may be used to invoke a wrapper that implements the UriResolver interface\n   * @param resolutionContext - the current URI resolution context\n   * @returns A Promise with a Result containing either a wrap package, a wrapper, or a URI if successful\n   */\n  async tryResolveUri(\n    uri: Uri,\n    client: CoreClient,\n    resolutionContext: IUriResolutionContext\n  ): Promise<\n    Result<UriPackageOrWrapper, TResolutionError | TGetResolversError>\n  > \n```\n\n#### getStepDescription (protected)\n```ts\n  /**\n   * A utility function for generating step descriptions to facilitate resolution context updates\n   *\n   * @param uri - the URI being resolved\n   * @param result - the result of a resolution attempt\n   *\n   * @returns text describing the URI resolution step\n   * */\n  protected abstract getStepDescription(\n    uri: Uri,\n    result: Result<UriPackageOrWrapper, TResolutionError>\n  ): string;\n```\n\n#### tryResolveUriWithResolvers (protected)\n```ts\n  /**\n   * Using each of the aggregated resolvers, attempt to resolve a URI\n   *\n   * @param uri - the URI to resolve\n   * @param client - a CoreClient instance that can be used to make an invocation\n   * @param resolvers - a list of IUriResolver implementations\n   * @param resolutionContext - a resolution context to update when resolving URIs\n   *\n   * @returns a URI, a Wrap Package, or a Wrapper (or an error)\n   * */\n  protected async tryResolveUriWithResolvers(\n    uri: Uri,\n    client: CoreClient,\n    resolvers: IUriResolver<unknown>[],\n    resolutionContext: IUriResolutionContext\n  ): Promise<Result<UriPackageOrWrapper, TResolutionError>> \n```\n\n## UriResolverAggregator\n```ts\n/**\n * An implementation of UriResolverAggregatorBase\n */\nexport class UriResolverAggregator<\n  TResolutionError = undefined,\n  TGetResolversError = undefined\n> extends UriResolverAggregatorBase<\n  TResolutionError,\n  TGetResolversError\n> \n```\n\n### Types\n\n#### GetResolversFunc\n```ts\n/**\n * A function that returns a list of resolvers\n *\n * @param uri - the URI to query\n * @param client - a CoreClient instance\n * */\nexport type GetResolversFunc = (\n  uri: Uri,\n  client: CoreClient\n) => Promise<IUriResolver<unknown>[]>;\n```\n\n#### GetResolversWithErrorFunc\n```ts\n/**\n * A function that returns a list of resolvers or an error\n *\n * @param uri - the URI to query\n * @param client - a CoreClient instance\n * */\nexport type GetResolversWithErrorFunc<TError> = (\n  uri: Uri,\n  client: CoreClient\n) => Promise<Result<IUriResolver<unknown>[], TError>>;\n```\n\n### Methods\n\n#### constructor\n```ts\n  /**\n   * Creates a UriResolverAggregator from a list of resolvers, or from a function\n   * that returns a list of resolvers\n   * */\n  constructor(resolvers: UriResolverLike[], resolverName?: string);\n  constructor(\n    resolvers: (\n      uri: Uri,\n      client: CoreClient\n    ) => Promise<Result<IUriResolver<unknown>[], TGetResolversError>>,\n    resolverName?: string\n  );\n  constructor(resolvers: GetResolversFunc, resolverName?: string);\n  constructor(\n    resolvers:\n      | UriResolverLike[]\n      | GetResolversFunc\n      | GetResolversWithErrorFunc<TGetResolversError>,\n    private _resolverName?: string\n  ) \n```\n\n#### getUriResolvers\n```ts\n  /**\n   * Get a list of URI Resolvers\n   *\n   * @param uri - the URI to query for resolvers\n   * @param client - a CoreClient instance that can be used to make an invocation\n   *\n   * @returns a list of IUriResolver or an error\n   * */\n  async getUriResolvers(\n    uri: Uri,\n    client: CoreClient\n  ): Promise<Result<IUriResolver<unknown>[], TGetResolversError>> \n```\n\n#### getStepDescription (protected)\n```ts\n  /**\n   * A utility function for generating step descriptions to facilitate resolution context updates\n   *\n   * @returns text describing the URI resolution step\n   * */\n  protected getStepDescription = (): string \n```\n\n## IWrapperCache\n```ts\n/** A Wrapper cache */\nexport interface IWrapperCache {\n  /** get a Wrapper from the cache, given its URI index */\n  get(uri: Uri): MaybeAsync<Wrapper | undefined>;\n\n  /** add a Wrapper to the cache, indexed by a URI */\n  set(uri: Uri, wrapper: Wrapper): MaybeAsync<void>;\n}\n```\n\n## WrapperCache\n```ts\n/**\n * A minimal implementation of IWrapperCache\n * */\nexport class WrapperCache implements IWrapperCache \n```\n\n### Methods\n\n#### get\n```ts\n  /** get a Wrapper from the cache, given its URI index */\n  get(uri: Uri): Wrapper | undefined \n```\n\n#### set\n```ts\n  /** add a Wrapper to the cache, indexed by a URI */\n  set(uris: Uri, wrapper: Wrapper): void \n```\n\n## WrapperCacheResolver\n```ts\n/**\n * An IUriResolver implementation that caches wrappers once they are resolved.\n * As it is a wrapper cache resolver, URI and package caching is outside of the scope for this resolver\n * and can be achieved through other resolvers if necessary.\n * The WrapperCacheResolver wraps an IUriResolver implementation and delegates resolution to it.\n * */\nexport class WrapperCacheResolver<TError>\n  implements IUriResolver<TError | Error> \n```\n\n### constructor\n```ts\n  /**\n   * Creates a WrapperCacheResolver\n   *\n   * @param _innerResolver - a resolver to delegate resolution to\n   * @param _cache - a wrapper cache\n   * */\n  constructor(\n    private _innerResolver: IUriResolver<TError>,\n    private _cache: IWrapperCache\n  ) \n```\n\n### Methods\n\n#### from\n```ts\n  /**\n   * Creates a WrapperCacheResolver from a resolver-like object\n   *\n   * @param innerResolver - a resolver-like item to delegate resolution to\n   * @param cache - a wrapper cache\n   * @param options - control wrapper manifest deserialization\n   *\n   * @returns a WrapperCacheResolver\n   * */\n  static from<TResolverError = unknown>(\n    innerResolver: UriResolverLike,\n    cache: IWrapperCache\n  ): WrapperCacheResolver<TResolverError> \n```\n\n#### tryResolveUri\n```ts\n  /**\n   * Resolve a URI to a wrap package, a wrapper, or a URI.\n   * If successful, cache the result.\n   *\n   * @param uri - the URI to resolve\n   * @param client - a CoreClient instance that may be used to invoke a wrapper that implements the UriResolver interface\n   * @param resolutionContext - the current URI resolution context\n   * @returns A Promise with a Result containing either a wrap package, a wrapper, or a URI if successful\n   */\n  async tryResolveUri(\n    uri: Uri,\n    client: CoreClient,\n    resolutionContext: IUriResolutionContext\n  ): Promise<Result<UriPackageOrWrapper, TError | Error>> \n```\n\n\n## getUriResolutionPath\n\n```ts\n/**\n * Get a resolution path from the history of a URI resolution attempt\n *\n * @param history - the resolution context\n * @returns the URI's resolution path\n * */\nexport const getUriResolutionPath = (\n  history: IUriResolutionStep<unknown>[]\n): IUriResolutionStep<unknown>[] \n```\n\n## InfiniteLoopError\n\n```ts\n/**\n * Error used if the URI resolution path contains an infinite loop\n * */\nexport class InfiniteLoopError extends Error \n```\n\n### constructor\n\n```ts\n  /**\n   * Create an InfiniteLoopError\n   *\n   * @param _uri - URI being resolved\n   * @param _history - URI resolution history\n   * */\n  constructor(\n    private readonly _uri: Uri,\n    private readonly _history: IUriResolutionStep<unknown>[]\n  ) \n```\n\n## ResolverWithHistory\n\n```ts\n/** An abstract IUriResolver implementation that updates the resolution context */\nexport abstract class ResolverWithHistory<TError = undefined>\n  implements IUriResolver<TError> \n```\n\n### Methods\n\n#### tryResolveUri\n\n```ts\n  /**\n   * Resolve a URI to a wrap package, a wrapper, or a URI.\n   * Updates the resolution context with the result.\n   *\n   * @remarks\n   * This method calls the internal abstract method _tryResolveUri before\n   * updating the resolution context. Implementations are expect to place\n   * resolution logic in _tryResolveUri.\n   *\n   * @param uri - the URI to resolve\n   * @param client - a CoreClient instance that may be used to invoke a wrapper that implements the UriResolver interface\n   * @param resolutionContext - the current URI resolution context\n   * @returns A Promise with a Result containing either a wrap package, a wrapper, or a URI if successful\n   */\n  async tryResolveUri(\n    uri: Uri,\n    client: CoreClient,\n    resolutionContext: IUriResolutionContext\n  ): Promise<Result<UriPackageOrWrapper, TError>> \n```\n\n#### getStepDescription (protected)\n\n```ts\n  /**\n   * A utility function for generating step descriptions to facilitate resolution context updates\n   *\n   * @param uri - the URI being resolved\n   * @param result - the result of a resolution attempt\n   *\n   * @returns text describing the URI resolution step\n   * */\n  protected abstract getStepDescription(\n    uri: Uri,\n    result: Result<UriPackageOrWrapper, TError>\n  ): string;\n```\n\n#### \\_tryResolveUri (protected)\n\n```ts\n  /**\n   * Resolve a URI to a wrap package, a wrapper, or a URI.\n   * Updates the resolution context with the result.\n   *\n   * @param uri - the URI to resolve\n   * @param client - a CoreClient instance that may be used to invoke a wrapper that implements the UriResolver interface\n   * @param resolutionContext - the current URI resolution context\n   * @returns A Promise with a Result containing either a wrap package, a wrapper, or a URI if successful\n   */\n  protected abstract _tryResolveUri(\n    uri: Uri,\n    client: CoreClient,\n    resolutionContext: IUriResolutionContext\n  ): Promise<Result<UriPackageOrWrapper, TError>>;\n```\n\n## ResolverWithLoopGuard\n\n```ts\n/** An IUriResolver implementation that prevents infinite loops in the resolution path. */\nexport class ResolverWithLoopGuard<TError = undefined>\n  implements IUriResolver<TError | InfiniteLoopError> \n```\n\n### constructor\n\n```ts\n  /**\n   * Construct a ResolverWithLoopGuard\n   *\n   * @param _resolver - a resolution to delegate resolution to\n   * */\n  constructor(private _resolver: IUriResolver<TError>) \n```\n\n### Methods\n\n#### from\n\n```ts\n  /**\n   * Create a ResolverWithLoopGuard from a resolver-like object\n   *\n   * @param resolver - a resolver-like item to delegate resolution to\n   *\n   * @returns a ResolverWithLoopGuard\n   * */\n  static from<TResolverError = unknown>(\n    resolver: UriResolverLike\n  ): ResolverWithLoopGuard<TResolverError> \n```\n\n#### tryResolveUri\n\n```ts\n  /**\n   * Resolve a URI to a wrap package, a wrapper, or a URI.\n   * Ensures the URI is not caught in an infinite loop by checking if it is already resolving.\n   *\n   * @param uri - the URI to resolve\n   * @param client - a CoreClient instance that may be used to invoke a wrapper that implements the UriResolver interface\n   * @param resolutionContext - the current URI resolution context\n   * @returns A Promise with a Result containing either a wrap package, a wrapper, or a URI if successful\n   */\n  async tryResolveUri(\n    uri: Uri,\n    client: CoreClient,\n    resolutionContext: IUriResolutionContext\n  ): Promise<Result<UriPackageOrWrapper, TError | InfiniteLoopError>> \n```\n\n## PackageToWrapperResolver\n\n```ts\n/**\n * An IUriResolver implementation that initalizes wrappers from resolved packages.\n * The PackageToWrapperResolver wraps an IUriResolver implementation and delegates resolution to it.\n * */\nexport class PackageToWrapperResolver<TError>\n  implements IUriResolver<TError | Error> \n```\n\n### constructor\n\n```ts\n  /**\n   * Creates a PackageToWrapperResolver\n   *\n   * @param _innerResolver - a resolver to delegate resolution to\n   * @param _options - control wrapper manifest deserialization\n   * */\n  constructor(\n    private _innerResolver: IUriResolver<TError>,\n    private _options?: {\n      deserializeManifestOptions?: DeserializeManifestOptions;\n    }\n  ) \n```\n\n### Methods\n\n#### from\n\n```ts\n  /**\n   * Creates a PackageToWrapperResolver from a resolver-like object\n   *\n   * @param innerResolver - a resolver-like item to delegate resolution to\n   * @param options - control wrapper manifest deserialization\n   *\n   * @returns a PackageToWrapperResolver\n   * */\n  static from<TResolverError = unknown>(\n    innerResolver: UriResolverLike,\n    options?: { deserializeManifestOptions?: DeserializeManifestOptions }\n  ): PackageToWrapperResolver<TResolverError> \n```\n\n#### tryResolveUri\n\n```ts\n  /**\n   * Resolve a URI to a wrap package, a wrapper, or a URI.\n   * If successful, cache the result.\n   *\n   * @param uri - the URI to resolve\n   * @param client - a CoreClient instance that may be used to invoke a wrapper that implements the UriResolver interface\n   * @param resolutionContext - the current URI resolution context\n   * @returns A Promise with a Result containing either a wrap package, a wrapper, or a URI if successful\n   */\n  async tryResolveUri(\n    uri: Uri,\n    client: CoreClient,\n    resolutionContext: IUriResolutionContext\n  ): Promise<Result<UriPackageOrWrapper, TError | Error>> \n```\n\n## UriResolver\n\n```ts\n/** An IUriResolver factory */\nexport class UriResolver \n```\n\n### Methods\n\n#### from\n\n```ts\n  /**\n   * Create an IUriResolver instance\n   *\n   * @param resolverLike - an object that can be transformed into a resolver\n   * @param resolverName - a name to assign to the resolver in resolution history output\n   * */\n  static from<TError = undefined>(\n    resolverLike: UriResolverLike,\n    resolverName?: string\n  ): IUriResolver<TError> \n```\n\n## UriResolverLike\n\n```ts\n/** An UriResolverLike can be one of three things:\n * - An IUriResolver\n * - An object that can be transformed into a static IUriResolver\n * - An array of UriResolverLike\n * */\nexport type UriResolverLike =\n  | IUriResolver<unknown>\n  | IUriRedirect\n  | IUriPackage\n  | IUriWrapper\n  | UriResolverLike[];\n```\n\n## UriResolutionResult\n```ts\n/** Factory for creating Result from URI resolution output */\nexport class UriResolutionResult<TError = undefined> \n```\n\n### Methods\n\n#### ok\n```ts\n  /** Returns a Result with `ok` set to true */\n  static ok<TError = undefined>(uri: Uri): Result<UriPackageOrWrapper, TError>;\n  static ok<TError = undefined>(\n    uri: Uri,\n    wrapPackage: IWrapPackage\n  ): Result<UriPackageOrWrapper, TError>;\n  static ok<TError = undefined>(\n    uri: Uri,\n    wrapper: Wrapper\n  ): Result<UriPackageOrWrapper, TError>;\n  static ok<TError = undefined>(\n    uriPackageOrWrapper: UriPackageOrWrapper\n  ): Result<UriPackageOrWrapper, TError>;\n  static ok<TError = undefined>(\n    uriPackageOrWrapper: Uri | UriPackageOrWrapper,\n    packageOrWrapper?: IWrapPackage | Wrapper\n  ): Result<UriPackageOrWrapper, TError> \n```\n\n#### err\n```ts\n  /** Returns a Result with `ok` set to false */\n  static err<TError = unknown>(\n    error: TError\n  ): Result<UriPackageOrWrapper, TError> \n```\n\n\n## PackageResolver\n```ts\n/**\n * A Uri Resolver that resolves to an embedded wrap package and correctly updates\n * the resolution history.\n * */\nexport class PackageResolver extends ResolverWithHistory \n```\n\n### constructor\n```ts\n  /**\n   * Construct a PackageResolver\n   *\n   * @param _uri - the URI to redirect to the wrap package\n   * @param wrapPackage - a wrap package\n   * */\n  constructor(private _uri: Uri, private wrapPackage: IWrapPackage) \n```\n\n### Methods\n\n#### getStepDescription (protected)\n```ts\n  /**\n   * A utility function for generating step descriptions to facilitate resolution context updates\n   *\n   * @returns text describing the URI resolution step\n   * */\n  protected getStepDescription = (): string \n```\n\n#### _tryResolveUri (protected)\n```ts\n  /**\n   * Resolve a URI to a wrap package\n   *\n   * @param uri - the URI to resolve\n   * @returns A Promise with a Result containing a wrap package if successful\n   */\n  protected async _tryResolveUri(\n    uri: Uri\n  ): Promise<Result<UriPackageOrWrapper>> \n```\n\n## RedirectResolver\n```ts\n/**\n * A Uri Resolver that resolves to a new URI and correctly updates the\n * resolution history.\n * */\nexport class RedirectResolver<\n  TUri extends string | Uri = string\n> extends ResolverWithHistory \n```\n\n### constructor\n```ts\n  /**\n   * Construct a RedirectResolver\n   *\n   * @param from - the URI to redirect from\n   * @param to - the URI to redirect to\n   * */\n  constructor(from: TUri, to: TUri) \n```\n\n### Methods\n\n#### getStepDescription (protected)\n```ts\n  /**\n   * A utility function for generating step descriptions to facilitate resolution context updates\n   *\n   * @returns text describing the URI resolution step\n   * */\n  protected getStepDescription = (): string \n```\n\n#### _tryResolveUri (protected)\n```ts\n  /**\n   * Resolve a URI to a new URI\n   *\n   * @param uri - the URI to resolve\n   * @returns A Promise with a Result containing a URI if successful\n   */\n  protected async _tryResolveUri(\n    uri: Uri\n  ): Promise<Result<UriPackageOrWrapper>> \n```\n\n## WrapperResolver\n```ts\n/**\n * A Uri Resolver that resolves to an embedded wrapper and correctly updates\n * the resolution history.\n * */\nexport class WrapperResolver extends ResolverWithHistory \n```\n\n### constructor\n```ts\n  /**\n   * Construct a WrapperResolver\n   *\n   * @param _uri - the URI to redirect to the wrapper instance\n   * @param _wrapper - a wrapper\n   * */\n  constructor(private _uri: Uri, private _wrapper: Wrapper) \n```\n\n### Methods\n\n#### getStepDescription (protected)\n```ts\n  /**\n   * A utility function for generating step descriptions to facilitate resolution context updates\n   *\n   * @returns text describing the URI resolution step\n   * */\n  protected getStepDescription = (): string \n```\n\n#### _tryResolveUri\n```ts\n  /**\n   * Resolve a URI to a wrapper\n   *\n   * @param uri - the URI to resolve\n   * @returns A Promise with a Result containing a wrapper if successful\n   */\n  protected async _tryResolveUri(\n    uri: Uri\n  ): Promise<Result<UriPackageOrWrapper>> \n```\n\n## StaticResolver\n```ts\n/**\n * An IUriResolver implementation that efficiently delegates URI resolution to\n * static resolvers--i.e. those that resolve to embedded URIs, Wrappers, and Packages\n * */\nexport class StaticResolver<TError = undefined>\n  implements IUriResolver<TError> \n```\n\n### constructor\n```ts\n  /**\n   * Construct a Static Resolver\n   *\n   * @param uriMap - a mapping of URI to embedded URI, package, or wrapper\n   * */\n  constructor(public uriMap: Map<string, UriPackageOrWrapper>) \n```\n\n### Methods\n\n#### from\n```ts\n  /**\n   * Create a StaticResolver from a static-resolver-like object\n   *\n   * @param staticResolverLikes - an array of resolver-like objects to delegate resolution to\n   *\n   * @returns a StaticResolver\n   * */\n  static from<TError = undefined>(\n    staticResolverLikes: UriResolverLike[]\n  ): StaticResolver<TError> \n```\n\n#### tryResolveUri\n```ts\n  /**\n   * Resolve a URI to a wrap package, a wrapper, or a URI.\n   *\n   * @param uri - the URI to resolve\n   * @param _ - not used\n   * @param resolutionContext - the current URI resolution context\n   * @returns A Promise with a Result containing either a wrap package, a wrapper, or a URI if successful\n   */\n  async tryResolveUri(\n    uri: Uri,\n    _: CoreClient,\n    resolutionContext: IUriResolutionContext\n  ): Promise<Result<UriPackageOrWrapper, TError>> \n```\n\n## StaticResolverLike\n```ts\n/** A StaticResolverLike can be one of two things:\n * - An object that can be transformed into a static IUriResolver\n * - An array of StaticResolverLike\n * */\nexport type StaticResolverLike =\n  | IUriRedirect\n  | IUriPackage\n  | IUriWrapper\n  | StaticResolverLike[];\n```\n\n## RequestSynchronizerResolver\n```ts\n/* Uri resolver that synchronizes requests to the same URI\n * Multiple requests to the same URI will be resolved only once\n * and the result will be cached for subsequent requests (only for the duration of that first request)\n * Can use the `shouldIgnoreCache` option to determine whether to ignore the cached request in case of an error\n * (default is to use the cache)\n */\nexport class RequestSynchronizerResolver<TError>\n  implements IUriResolver<TError> \n```\n\n### constructor\n```ts\n  /**\n   * Construct a RequestSynchronizerResolver\n   *\n   * @param resolverToSynchronize - the inner resolve whose resolution will be synchronized\n   * @param options - the optional options containing the `shouldIgnoreCache` error handler\n   * */\n  constructor(\n    private resolverToSynchronize: IUriResolver<TError>,\n    private options?: {\n      shouldIgnoreCache?: (error: TError | undefined) => boolean;\n    }\n  ) \n```\n\n### Methods\n\n#### from\n```ts\n  /**\n   * Create a RequestSynchronizerResolver from a static-resolver-like object\n   *\n   * @param resolver - a resolver-like object whose resolution will be synchronized\n   * @param options - the optional options containing the `shouldIgnoreCache` error handler\n   *\n   * @returns a RequestSynchronizerResolver\n   * */\n  static from<TResolverError = unknown>(\n    resolver: UriResolverLike,\n    options?: {\n      shouldIgnoreCache?: (error: TResolverError | undefined) => boolean;\n    }\n  ): RequestSynchronizerResolver<TResolverError> \n```\n\n#### tryResolveUri\n```ts\n  /**\n   * Resolve a URI to a wrap package, a wrapper, or a URI.\n   * Attempts to resolve the URI using each of the aggregated resolvers sequentially.\n   *\n   * @param uri - the URI to resolve\n   * @param client - a CoreClient instance that may be used to invoke a wrapper that implements the UriResolver interface\n   * @param resolutionContext - the current URI resolution context\n   * @returns A Promise with a Result containing either a wrap package, a wrapper, or a URI if successful\n   */\n  async tryResolveUri(\n    uri: Uri,\n    client: CoreClient,\n    resolutionContext: IUriResolutionContext\n  ): Promise<Result<UriPackageOrWrapper, TError>> \n```\n\n\n## Development\n\nThis package is open-source. It lives within the [Polywrap JavaScript Client repository](https://github.com/polywrap/javascript-client). Contributions from the community are welcomed!\n\n### Build\n```bash\nnvm use && yarn install && yarn build\n```\n\n### Test\n```bash\nyarn test\n``","_id":"@polywrap/uri-resolvers-js@0.12.0-pre.1","dist":{"shasum":"58b6238cde9380dbb302e3a0c00f7a493a679765","integrity":"sha512-tVqTWRS4rtlq3JKQHyOPqE2lql/qCWT+cy7IYT/VN/jaD6nHLMI+tWwp9spDlibotOn/6Bwtk+v6HOPS6SkiOg==","tarball":"https://registry.npmjs.org/@polywrap/uri-resolvers-js/-/uri-resolvers-js-0.12.0-pre.1.tgz","fileCount":112,"unpackedSize":190402,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDUB59JkdVoa4apeP2/cVHKAVQLodoW90XHdNTD53/0MgIgaDDphR0ersFtcWmoUR3cME0fRswFDjzEoMS5M/R/Z4c="}]},"_npmUser":{"name":"polywrap-build-bot","email":"build-bot@polywrap.io"},"directories":{},"maintainers":[{"name":"polywrap-build-bot","email":"build-bot@polywrap.io"},{"name":"dorgjelli","email":"jelli@dorg.tech"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/uri-resolvers-js_0.12.0-pre.1_1689178279691_0.0457748867867005"},"_hasShrinkwrap":false},"0.12.0":{"name":"@polywrap/uri-resolvers-js","description":"Polywrap URI resolvers","version":"0.12.0","license":"MIT","repository":{"type":"git","url":"https://github.com/polywrap/javascript-client.git"},"main":"build/index.js","scripts":{"build":"yarn build:fast","build:docs":"yarn build:snippets && yarn build:readme","build:fast":"rimraf ./build && tsc --project tsconfig.build.json","lint":"eslint --color -c ../../.eslintrc.js src/","test":"jest --passWithNoTests --runInBand --verbose --config ../../jest.config.js --rootDir .","test:watch":"yarn test -- --watch","build:snippets":"tsc --project ./examples/tsconfig.examples.json","build:readme:subsections":"yarn doc-snippets combine -c ./readme/config/sub-sections.json","build:readme:final":"yarn doc-snippets combine -c ./readme/config/final.json","build:readme":"yarn build:readme:subsections && yarn build:readme:final"},"dependencies":{"@polywrap/core-js":"0.12.0","@polywrap/result":"0.12.0","@polywrap/wrap-manifest-types-js":"0.12.0"},"devDependencies":{"@polywrap/client-config-builder-js":"0.12.0","@polywrap/core-client-js":"0.12.0","@polywrap/plugin-js":"0.12.0","@types/jest":"29.5.0","doc-snippets":"~1.0.0","jest":"29.5.0","rimraf":"3.0.2","ts-jest":"29.1.0","ts-node":"10.9.1","typescript":"4.9.5"},"publishConfig":{"access":"public"},"_id":"@polywrap/uri-resolvers-js@0.12.0","dist":{"shasum":"2a62a3af134cc091d69c4344f5e151830377b275","integrity":"sha512-s1FoSjpmPpycmHYEYFQeZPE/JPh2cvq4ALHmMw/CBgd/6ornmzYc2XQE28zeF1sNBglmZIhB10MEkT7A0J8PDw==","tarball":"https://registry.npmjs.org/@polywrap/uri-resolvers-js/-/uri-resolvers-js-0.12.0.tgz","fileCount":112,"unpackedSize":190360,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFQaFVLKAUJKPKgVMFaGr6pU9jt39b89Icg/Q/VGjIDTAiA5c6fiyXAqFC2deZmjcF+9vQYXLtFeuyoR083Gt567AA=="}]},"_npmUser":{"name":"polywrap-build-bot","email":"build-bot@polywrap.io"},"directories":{},"maintainers":[{"name":"polywrap-build-bot","email":"build-bot@polywrap.io"},{"name":"dorgjelli","email":"jelli@dorg.tech"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/uri-resolvers-js_0.12.0_1690401218122_0.8180492562075516"},"_hasShrinkwrap":false},"0.12.1":{"name":"@polywrap/uri-resolvers-js","description":"Polywrap URI resolvers","version":"0.12.1","license":"MIT","repository":{"type":"git","url":"https://github.com/polywrap/javascript-client.git"},"main":"build/index.js","scripts":{"build":"yarn build:fast","build:docs":"yarn build:snippets && yarn build:readme","build:fast":"rimraf ./build && tsc --project tsconfig.build.json","lint":"eslint --color -c ../../.eslintrc.js src/","test":"jest --passWithNoTests --runInBand --verbose --config ../../jest.config.js --rootDir .","test:watch":"yarn test -- --watch","build:snippets":"tsc --project ./examples/tsconfig.examples.json","build:readme:subsections":"yarn doc-snippets combine -c ./readme/config/sub-sections.json","build:readme:final":"yarn doc-snippets combine -c ./readme/config/final.json","build:readme":"yarn build:readme:subsections && yarn build:readme:final"},"dependencies":{"@polywrap/core-js":"0.12.1","@polywrap/result":"0.12.1","@polywrap/wrap-manifest-types-js":"0.12.1"},"devDependencies":{"@polywrap/client-config-builder-js":"0.12.1","@polywrap/core-client-js":"0.12.1","@polywrap/plugin-js":"0.12.1","@types/jest":"29.5.0","doc-snippets":"~1.0.0","jest":"29.5.0","rimraf":"3.0.2","ts-jest":"29.1.0","ts-node":"10.9.1","typescript":"4.9.5"},"publishConfig":{"access":"public"},"_id":"@polywrap/uri-resolvers-js@0.12.1","dist":{"shasum":"1c58316e76473923b730f88d06fa3568dc5453bd","integrity":"sha512-WH1pZkzwAe2xJY7MCIkyboYlquoGDXCLgfBGpn7QHkmrV9l+Qu+qncX4TMEdjPfih/eM2ge/puz14DQ2t/hd/w==","tarball":"https://registry.npmjs.org/@polywrap/uri-resolvers-js/-/uri-resolvers-js-0.12.1.tgz","fileCount":112,"unpackedSize":190360,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGE5H+FKDSN4KktfOCCgtqnP2VHqhyu1bVv3g6mCAVLGAiB1KRsARwWAMRWMaTLMUkswHn79rYyGVtrXDsF/RWoYYg=="}]},"_npmUser":{"name":"polywrap-build-bot","email":"build-bot@polywrap.io"},"directories":{},"maintainers":[{"name":"polywrap-build-bot","email":"build-bot@polywrap.io"},{"name":"dorgjelli","email":"jelli@dorg.tech"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/uri-resolvers-js_0.12.1_1692569170478_0.6282858005298777"},"_hasShrinkwrap":false},"0.12.2":{"name":"@polywrap/uri-resolvers-js","description":"Polywrap URI resolvers","version":"0.12.2","license":"MIT","repository":{"type":"git","url":"https://github.com/polywrap/javascript-client.git"},"main":"build/index.js","scripts":{"build":"yarn build:fast","build:docs":"yarn build:snippets && yarn build:readme","build:fast":"rimraf ./build && tsc --project tsconfig.build.json","lint":"eslint --color -c ../../.eslintrc.js src/","test":"jest --passWithNoTests --runInBand --verbose --config ../../jest.config.js --rootDir .","test:watch":"yarn test -- --watch","build:snippets":"tsc --project ./examples/tsconfig.examples.json","build:readme:subsections":"yarn doc-snippets combine -c ./readme/config/sub-sections.json","build:readme:final":"yarn doc-snippets combine -c ./readme/config/final.json","build:readme":"yarn build:readme:subsections && yarn build:readme:final"},"dependencies":{"@polywrap/core-js":"0.12.2","@polywrap/result":"0.12.2","@polywrap/wrap-manifest-types-js":"0.12.2"},"devDependencies":{"@polywrap/client-config-builder-js":"0.12.2","@polywrap/core-client-js":"0.12.2","@polywrap/plugin-js":"0.12.2","@types/jest":"29.5.0","doc-snippets":"~1.0.0","jest":"29.5.0","rimraf":"3.0.2","ts-jest":"29.1.0","ts-node":"10.9.1","typescript":"4.9.5"},"publishConfig":{"access":"public"},"_id":"@polywrap/uri-resolvers-js@0.12.2","dist":{"shasum":"8c2393a56ae12445be171b8d8feeb803b114c32b","integrity":"sha512-5J3unEYxEMMSI+2lHVs5SmvpSyAbDie7ZJgt2djL64+nOjisY8hBI/TBd2mCgrHy3fziE7DCZhA+d70ChtLCBg==","tarball":"https://registry.npmjs.org/@polywrap/uri-resolvers-js/-/uri-resolvers-js-0.12.2.tgz","fileCount":225,"unpackedSize":296660,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDm6/VJSsdm7nVvdNC0+mQWLE2Xy34BeUqVMwQiQdqbgAIhAIlOGSqJvkqNC8KkS9WtWoB14eCZX2fpx5zG6CTopcVj"}]},"_npmUser":{"name":"polywrap-build-bot","email":"build-bot@polywrap.io"},"directories":{},"maintainers":[{"name":"polywrap-build-bot","email":"build-bot@polywrap.io"},{"name":"dorgjelli","email":"jelli@dorg.tech"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/uri-resolvers-js_0.12.2_1692576942407_0.9185343362183274"},"_hasShrinkwrap":false}},"time":{"created":"2022-09-24T18:31:06.994Z","0.8.0":"2022-09-24T18:31:07.353Z","modified":"2023-08-21T00:15:42.896Z","0.9.0":"2022-10-10T09:44:29.229Z","0.9.1":"2022-10-12T22:34:44.441Z","0.9.2":"2022-10-13T22:39:30.522Z","0.9.3":"2022-10-20T10:33:08.543Z","0.9.4":"2022-11-04T01:47:54.124Z","0.10.0-pre.0":"2022-11-05T07:24:04.184Z","0.10.0-pre.1":"2022-11-12T18:01:20.655Z","0.10.0-pre.3":"2022-11-13T00:38:26.303Z","0.10.0-pre.4":"2022-11-16T18:23:53.135Z","0.10.0-pre.5":"2022-11-22T04:48:19.477Z","0.10.0-pre.6":"2022-12-20T04:42:25.437Z","0.10.0-pre.7":"2023-01-11T02:16:01.288Z","0.9.5":"2023-02-10T23:24:24.786Z","0.10.0-pre.8":"2023-02-16T04:46:10.822Z","0.9.6":"2023-02-19T07:44:35.848Z","0.10.0-pre.10":"2023-03-01T03:32:16.509Z","0.10.0-pre.11":"2023-03-06T22:24:44.504Z","0.10.0-pre.12":"2023-03-14T05:07:32.056Z","0.10.0-pre.13":"2023-03-18T01:21:44.542Z","0.9.7":"2023-03-28T22:01:28.458Z","0.10.0-pre.14":"2023-04-13T04:02:58.924Z","0.10.0":"2023-04-14T05:16:06.362Z","0.10.1":"2023-04-29T05:02:14.475Z","0.11.0":"2023-06-27T02:00:53.768Z","0.12.0-pre.1":"2023-07-12T16:11:19.857Z","0.12.0":"2023-07-26T19:53:38.266Z","0.12.1":"2023-08-20T22:06:10.654Z","0.12.2":"2023-08-21T00:15:42.662Z"},"maintainers":[{"name":"polywrap-build-bot","email":"build-bot@polywrap.io"},{"name":"dorgjelli","email":"jelli@dorg.tech"}],"description":"Polywrap URI resolvers","repository":{"type":"git","url":"https://github.com/polywrap/javascript-client.git"},"license":"MIT","readme":"# @polywrap/uri-resolvers\n<a href=\"https://www.npmjs.com/package/@polywrap/uri-resolvers-js\" target=\"_blank\" rel=\"noopener noreferrer\">\n<img src=\"https://img.shields.io/npm/v/@polywrap/uri-resolvers-js.svg\" alt=\"npm\"/>\n</a>\n\n<br/>\n<br/>\nURI resolvers to customize URI resolution in the Polywrap Client.\n\n## Installation\n\n```bash\nnpm install --save @polywrap/uri-resolvers-js\n```\n\n## Usage\n\nThis example is similar to the default resolver used by the PolywrapClientConfigBuilder in the @polywrap/client-config-builder-js package.\n\n```ts\n  const resolver = RecursiveResolver.from(\n    WrapperCacheResolver.from(\n      [\n        StaticResolver.from([\n            ...redirects,\n            ...wrappers,\n            ...packages,\n          ]),\n      ],\n      new WrapperCache()\n    )\n  );\n```\n\n# Reference\n\n## UriResolverAggregatorBase\n```ts\n/**\n * Abstract class for IUriResolver implementations that aggregate multiple resolvers.\n * The UriResolverAggregatorBase class attempts to resolve a URI by sequentially\n * attempting resolution with each of its composite resolvers.\n * */\nexport abstract class UriResolverAggregatorBase<\n  TResolutionError = undefined,\n  TGetResolversError = undefined\n> implements IUriResolver<TResolutionError | TGetResolversError> \n```\n\n### Methods\n\n#### getUriResolvers\n```ts\n  /**\n   * Get a list of URI Resolvers\n   *\n   * @param uri - the URI to query for resolvers\n   * @param client - a CoreClient instance that can be used to make an invocation\n   * @param resolutionContext - a resolution context to update when resolving URIs\n   *\n   * @returns a list of IUriResolver or an error\n   * */\n  abstract getUriResolvers(\n    uri: Uri,\n    client: CoreClient,\n    resolutionContext: IUriResolutionContext\n  ): Promise<Result<IUriResolver<unknown>[], TGetResolversError>>;\n```\n\n#### tryResolveUri\n```ts\n  /**\n   * Resolve a URI to a wrap package, a wrapper, or a URI.\n   * Attempts to resolve the URI using each of the aggregated resolvers sequentially.\n   *\n   * @param uri - the URI to resolve\n   * @param client - a CoreClient instance that may be used to invoke a wrapper that implements the UriResolver interface\n   * @param resolutionContext - the current URI resolution context\n   * @returns A Promise with a Result containing either a wrap package, a wrapper, or a URI if successful\n   */\n  async tryResolveUri(\n    uri: Uri,\n    client: CoreClient,\n    resolutionContext: IUriResolutionContext\n  ): Promise<\n    Result<UriPackageOrWrapper, TResolutionError | TGetResolversError>\n  > \n```\n\n#### getStepDescription (protected)\n```ts\n  /**\n   * A utility function for generating step descriptions to facilitate resolution context updates\n   *\n   * @param uri - the URI being resolved\n   * @param result - the result of a resolution attempt\n   *\n   * @returns text describing the URI resolution step\n   * */\n  protected abstract getStepDescription(\n    uri: Uri,\n    result: Result<UriPackageOrWrapper, TResolutionError>\n  ): string;\n```\n\n#### tryResolveUriWithResolvers (protected)\n```ts\n  /**\n   * Using each of the aggregated resolvers, attempt to resolve a URI\n   *\n   * @param uri - the URI to resolve\n   * @param client - a CoreClient instance that can be used to make an invocation\n   * @param resolvers - a list of IUriResolver implementations\n   * @param resolutionContext - a resolution context to update when resolving URIs\n   *\n   * @returns a URI, a Wrap Package, or a Wrapper (or an error)\n   * */\n  protected async tryResolveUriWithResolvers(\n    uri: Uri,\n    client: CoreClient,\n    resolvers: IUriResolver<unknown>[],\n    resolutionContext: IUriResolutionContext\n  ): Promise<Result<UriPackageOrWrapper, TResolutionError>> \n```\n\n## UriResolverAggregator\n```ts\n/**\n * An implementation of UriResolverAggregatorBase\n */\nexport class UriResolverAggregator<\n  TResolutionError = undefined,\n  TGetResolversError = undefined\n> extends UriResolverAggregatorBase<\n  TResolutionError,\n  TGetResolversError\n> \n```\n\n### Types\n\n#### GetResolversFunc\n```ts\n/**\n * A function that returns a list of resolvers\n *\n * @param uri - the URI to query\n * @param client - a CoreClient instance\n * */\nexport type GetResolversFunc = (\n  uri: Uri,\n  client: CoreClient\n) => Promise<IUriResolver<unknown>[]>;\n```\n\n#### GetResolversWithErrorFunc\n```ts\n/**\n * A function that returns a list of resolvers or an error\n *\n * @param uri - the URI to query\n * @param client - a CoreClient instance\n * */\nexport type GetResolversWithErrorFunc<TError> = (\n  uri: Uri,\n  client: CoreClient\n) => Promise<Result<IUriResolver<unknown>[], TError>>;\n```\n\n### Methods\n\n#### constructor\n```ts\n  /**\n   * Creates a UriResolverAggregator from a list of resolvers, or from a function\n   * that returns a list of resolvers\n   * */\n  constructor(resolvers: UriResolverLike[], resolverName?: string);\n  constructor(\n    resolvers: (\n      uri: Uri,\n      client: CoreClient\n    ) => Promise<Result<IUriResolver<unknown>[], TGetResolversError>>,\n    resolverName?: string\n  );\n  constructor(resolvers: GetResolversFunc, resolverName?: string);\n  constructor(\n    resolvers:\n      | UriResolverLike[]\n      | GetResolversFunc\n      | GetResolversWithErrorFunc<TGetResolversError>,\n    private _resolverName?: string\n  ) \n```\n\n#### getUriResolvers\n```ts\n  /**\n   * Get a list of URI Resolvers\n   *\n   * @param uri - the URI to query for resolvers\n   * @param client - a CoreClient instance that can be used to make an invocation\n   *\n   * @returns a list of IUriResolver or an error\n   * */\n  async getUriResolvers(\n    uri: Uri,\n    client: CoreClient\n  ): Promise<Result<IUriResolver<unknown>[], TGetResolversError>> \n```\n\n#### getStepDescription (protected)\n```ts\n  /**\n   * A utility function for generating step descriptions to facilitate resolution context updates\n   *\n   * @returns text describing the URI resolution step\n   * */\n  protected getStepDescription = (): string \n```\n\n## IWrapperCache\n```ts\n/** A Wrapper cache */\nexport interface IWrapperCache {\n  /** get a Wrapper from the cache, given its URI index */\n  get(uri: Uri): MaybeAsync<Wrapper | undefined>;\n\n  /** add a Wrapper to the cache, indexed by a URI */\n  set(uri: Uri, wrapper: Wrapper): MaybeAsync<void>;\n}\n```\n\n## WrapperCache\n```ts\n/**\n * A minimal implementation of IWrapperCache\n * */\nexport class WrapperCache implements IWrapperCache \n```\n\n### Methods\n\n#### get\n```ts\n  /** get a Wrapper from the cache, given its URI index */\n  get(uri: Uri): Wrapper | undefined \n```\n\n#### set\n```ts\n  /** add a Wrapper to the cache, indexed by a URI */\n  set(uris: Uri, wrapper: Wrapper): void \n```\n\n## WrapperCacheResolver\n```ts\n/**\n * An IUriResolver implementation that caches wrappers once they are resolved.\n * As it is a wrapper cache resolver, URI and package caching is outside of the scope for this resolver\n * and can be achieved through other resolvers if necessary.\n * The WrapperCacheResolver wraps an IUriResolver implementation and delegates resolution to it.\n * */\nexport class WrapperCacheResolver<TError>\n  implements IUriResolver<TError | Error> \n```\n\n### constructor\n```ts\n  /**\n   * Creates a WrapperCacheResolver\n   *\n   * @param _innerResolver - a resolver to delegate resolution to\n   * @param _cache - a wrapper cache\n   * */\n  constructor(\n    private _innerResolver: IUriResolver<TError>,\n    private _cache: IWrapperCache\n  ) \n```\n\n### Methods\n\n#### from\n```ts\n  /**\n   * Creates a WrapperCacheResolver from a resolver-like object\n   *\n   * @param innerResolver - a resolver-like item to delegate resolution to\n   * @param cache - a wrapper cache\n   * @param options - control wrapper manifest deserialization\n   *\n   * @returns a WrapperCacheResolver\n   * */\n  static from<TResolverError = unknown>(\n    innerResolver: UriResolverLike,\n    cache: IWrapperCache\n  ): WrapperCacheResolver<TResolverError> \n```\n\n#### tryResolveUri\n```ts\n  /**\n   * Resolve a URI to a wrap package, a wrapper, or a URI.\n   * If successful, cache the result.\n   *\n   * @param uri - the URI to resolve\n   * @param client - a CoreClient instance that may be used to invoke a wrapper that implements the UriResolver interface\n   * @param resolutionContext - the current URI resolution context\n   * @returns A Promise with a Result containing either a wrap package, a wrapper, or a URI if successful\n   */\n  async tryResolveUri(\n    uri: Uri,\n    client: CoreClient,\n    resolutionContext: IUriResolutionContext\n  ): Promise<Result<UriPackageOrWrapper, TError | Error>> \n```\n\n\n## getUriResolutionPath\n\n```ts\n/**\n * Get a resolution path from the history of a URI resolution attempt\n *\n * @param history - the resolution context\n * @returns the URI's resolution path\n * */\nexport const getUriResolutionPath = (\n  history: IUriResolutionStep<unknown>[]\n): IUriResolutionStep<unknown>[] \n```\n\n## InfiniteLoopError\n\n```ts\n/**\n * Error used if the URI resolution path contains an infinite loop\n * */\nexport class InfiniteLoopError extends Error \n```\n\n### constructor\n\n```ts\n  /**\n   * Create an InfiniteLoopError\n   *\n   * @param _uri - URI being resolved\n   * @param _history - URI resolution history\n   * */\n  constructor(\n    private readonly _uri: Uri,\n    private readonly _history: IUriResolutionStep<unknown>[]\n  ) \n```\n\n## ResolverWithHistory\n\n```ts\n/** An abstract IUriResolver implementation that updates the resolution context */\nexport abstract class ResolverWithHistory<TError = undefined>\n  implements IUriResolver<TError> \n```\n\n### Methods\n\n#### tryResolveUri\n\n```ts\n  /**\n   * Resolve a URI to a wrap package, a wrapper, or a URI.\n   * Updates the resolution context with the result.\n   *\n   * @remarks\n   * This method calls the internal abstract method _tryResolveUri before\n   * updating the resolution context. Implementations are expect to place\n   * resolution logic in _tryResolveUri.\n   *\n   * @param uri - the URI to resolve\n   * @param client - a CoreClient instance that may be used to invoke a wrapper that implements the UriResolver interface\n   * @param resolutionContext - the current URI resolution context\n   * @returns A Promise with a Result containing either a wrap package, a wrapper, or a URI if successful\n   */\n  async tryResolveUri(\n    uri: Uri,\n    client: CoreClient,\n    resolutionContext: IUriResolutionContext\n  ): Promise<Result<UriPackageOrWrapper, TError>> \n```\n\n#### getStepDescription (protected)\n\n```ts\n  /**\n   * A utility function for generating step descriptions to facilitate resolution context updates\n   *\n   * @param uri - the URI being resolved\n   * @param result - the result of a resolution attempt\n   *\n   * @returns text describing the URI resolution step\n   * */\n  protected abstract getStepDescription(\n    uri: Uri,\n    result: Result<UriPackageOrWrapper, TError>\n  ): string;\n```\n\n#### \\_tryResolveUri (protected)\n\n```ts\n  /**\n   * Resolve a URI to a wrap package, a wrapper, or a URI.\n   * Updates the resolution context with the result.\n   *\n   * @param uri - the URI to resolve\n   * @param client - a CoreClient instance that may be used to invoke a wrapper that implements the UriResolver interface\n   * @param resolutionContext - the current URI resolution context\n   * @returns A Promise with a Result containing either a wrap package, a wrapper, or a URI if successful\n   */\n  protected abstract _tryResolveUri(\n    uri: Uri,\n    client: CoreClient,\n    resolutionContext: IUriResolutionContext\n  ): Promise<Result<UriPackageOrWrapper, TError>>;\n```\n\n## ResolverWithLoopGuard\n\n```ts\n/** An IUriResolver implementation that prevents infinite loops in the resolution path. */\nexport class ResolverWithLoopGuard<TError = undefined>\n  implements IUriResolver<TError | InfiniteLoopError> \n```\n\n### constructor\n\n```ts\n  /**\n   * Construct a ResolverWithLoopGuard\n   *\n   * @param _resolver - a resolution to delegate resolution to\n   * */\n  constructor(private _resolver: IUriResolver<TError>) \n```\n\n### Methods\n\n#### from\n\n```ts\n  /**\n   * Create a ResolverWithLoopGuard from a resolver-like object\n   *\n   * @param resolver - a resolver-like item to delegate resolution to\n   *\n   * @returns a ResolverWithLoopGuard\n   * */\n  static from<TResolverError = unknown>(\n    resolver: UriResolverLike\n  ): ResolverWithLoopGuard<TResolverError> \n```\n\n#### tryResolveUri\n\n```ts\n  /**\n   * Resolve a URI to a wrap package, a wrapper, or a URI.\n   * Ensures the URI is not caught in an infinite loop by checking if it is already resolving.\n   *\n   * @param uri - the URI to resolve\n   * @param client - a CoreClient instance that may be used to invoke a wrapper that implements the UriResolver interface\n   * @param resolutionContext - the current URI resolution context\n   * @returns A Promise with a Result containing either a wrap package, a wrapper, or a URI if successful\n   */\n  async tryResolveUri(\n    uri: Uri,\n    client: CoreClient,\n    resolutionContext: IUriResolutionContext\n  ): Promise<Result<UriPackageOrWrapper, TError | InfiniteLoopError>> \n```\n\n## PackageToWrapperResolver\n\n```ts\n/**\n * An IUriResolver implementation that initalizes wrappers from resolved packages.\n * The PackageToWrapperResolver wraps an IUriResolver implementation and delegates resolution to it.\n * */\nexport class PackageToWrapperResolver<TError>\n  implements IUriResolver<TError | Error> \n```\n\n### constructor\n\n```ts\n  /**\n   * Creates a PackageToWrapperResolver\n   *\n   * @param _innerResolver - a resolver to delegate resolution to\n   * @param _options - control wrapper manifest deserialization\n   * */\n  constructor(\n    private _innerResolver: IUriResolver<TError>,\n    private _options?: {\n      deserializeManifestOptions?: DeserializeManifestOptions;\n    }\n  ) \n```\n\n### Methods\n\n#### from\n\n```ts\n  /**\n   * Creates a PackageToWrapperResolver from a resolver-like object\n   *\n   * @param innerResolver - a resolver-like item to delegate resolution to\n   * @param options - control wrapper manifest deserialization\n   *\n   * @returns a PackageToWrapperResolver\n   * */\n  static from<TResolverError = unknown>(\n    innerResolver: UriResolverLike,\n    options?: { deserializeManifestOptions?: DeserializeManifestOptions }\n  ): PackageToWrapperResolver<TResolverError> \n```\n\n#### tryResolveUri\n\n```ts\n  /**\n   * Resolve a URI to a wrap package, a wrapper, or a URI.\n   * If successful, cache the result.\n   *\n   * @param uri - the URI to resolve\n   * @param client - a CoreClient instance that may be used to invoke a wrapper that implements the UriResolver interface\n   * @param resolutionContext - the current URI resolution context\n   * @returns A Promise with a Result containing either a wrap package, a wrapper, or a URI if successful\n   */\n  async tryResolveUri(\n    uri: Uri,\n    client: CoreClient,\n    resolutionContext: IUriResolutionContext\n  ): Promise<Result<UriPackageOrWrapper, TError | Error>> \n```\n\n## UriResolver\n\n```ts\n/** An IUriResolver factory */\nexport class UriResolver \n```\n\n### Methods\n\n#### from\n\n```ts\n  /**\n   * Create an IUriResolver instance\n   *\n   * @param resolverLike - an object that can be transformed into a resolver\n   * @param resolverName - a name to assign to the resolver in resolution history output\n   * */\n  static from<TError = undefined>(\n    resolverLike: UriResolverLike,\n    resolverName?: string\n  ): IUriResolver<TError> \n```\n\n## UriResolverLike\n\n```ts\n/** An UriResolverLike can be one of three things:\n * - An IUriResolver\n * - An object that can be transformed into a static IUriResolver\n * - An array of UriResolverLike\n * */\nexport type UriResolverLike =\n  | IUriResolver<unknown>\n  | IUriRedirect\n  | IUriPackage\n  | IUriWrapper\n  | UriResolverLike[];\n```\n\n## UriResolutionResult\n```ts\n/** Factory for creating Result from URI resolution output */\nexport class UriResolutionResult<TError = undefined> \n```\n\n### Methods\n\n#### ok\n```ts\n  /** Returns a Result with `ok` set to true */\n  static ok<TError = undefined>(uri: Uri): Result<UriPackageOrWrapper, TError>;\n  static ok<TError = undefined>(\n    uri: Uri,\n    wrapPackage: IWrapPackage\n  ): Result<UriPackageOrWrapper, TError>;\n  static ok<TError = undefined>(\n    uri: Uri,\n    wrapper: Wrapper\n  ): Result<UriPackageOrWrapper, TError>;\n  static ok<TError = undefined>(\n    uriPackageOrWrapper: UriPackageOrWrapper\n  ): Result<UriPackageOrWrapper, TError>;\n  static ok<TError = undefined>(\n    uriPackageOrWrapper: Uri | UriPackageOrWrapper,\n    packageOrWrapper?: IWrapPackage | Wrapper\n  ): Result<UriPackageOrWrapper, TError> \n```\n\n#### err\n```ts\n  /** Returns a Result with `ok` set to false */\n  static err<TError = unknown>(\n    error: TError\n  ): Result<UriPackageOrWrapper, TError> \n```\n\n\n## PackageResolver\n```ts\n/**\n * A Uri Resolver that resolves to an embedded wrap package and correctly updates\n * the resolution history.\n * */\nexport class PackageResolver extends ResolverWithHistory \n```\n\n### constructor\n```ts\n  /**\n   * Construct a PackageResolver\n   *\n   * @param _uri - the URI to redirect to the wrap package\n   * @param wrapPackage - a wrap package\n   * */\n  constructor(private _uri: Uri, private wrapPackage: IWrapPackage) \n```\n\n### Methods\n\n#### getStepDescription (protected)\n```ts\n  /**\n   * A utility function for generating step descriptions to facilitate resolution context updates\n   *\n   * @returns text describing the URI resolution step\n   * */\n  protected getStepDescription = (): string \n```\n\n#### _tryResolveUri (protected)\n```ts\n  /**\n   * Resolve a URI to a wrap package\n   *\n   * @param uri - the URI to resolve\n   * @returns A Promise with a Result containing a wrap package if successful\n   */\n  protected async _tryResolveUri(\n    uri: Uri\n  ): Promise<Result<UriPackageOrWrapper>> \n```\n\n## RedirectResolver\n```ts\n/**\n * A Uri Resolver that resolves to a new URI and correctly updates the\n * resolution history.\n * */\nexport class RedirectResolver<\n  TUri extends string | Uri = string\n> extends ResolverWithHistory \n```\n\n### constructor\n```ts\n  /**\n   * Construct a RedirectResolver\n   *\n   * @param from - the URI to redirect from\n   * @param to - the URI to redirect to\n   * */\n  constructor(from: TUri, to: TUri) \n```\n\n### Methods\n\n#### getStepDescription (protected)\n```ts\n  /**\n   * A utility function for generating step descriptions to facilitate resolution context updates\n   *\n   * @returns text describing the URI resolution step\n   * */\n  protected getStepDescription = (): string \n```\n\n#### _tryResolveUri (protected)\n```ts\n  /**\n   * Resolve a URI to a new URI\n   *\n   * @param uri - the URI to resolve\n   * @returns A Promise with a Result containing a URI if successful\n   */\n  protected async _tryResolveUri(\n    uri: Uri\n  ): Promise<Result<UriPackageOrWrapper>> \n```\n\n## WrapperResolver\n```ts\n/**\n * A Uri Resolver that resolves to an embedded wrapper and correctly updates\n * the resolution history.\n * */\nexport class WrapperResolver extends ResolverWithHistory \n```\n\n### constructor\n```ts\n  /**\n   * Construct a WrapperResolver\n   *\n   * @param _uri - the URI to redirect to the wrapper instance\n   * @param _wrapper - a wrapper\n   * */\n  constructor(private _uri: Uri, private _wrapper: Wrapper) \n```\n\n### Methods\n\n#### getStepDescription (protected)\n```ts\n  /**\n   * A utility function for generating step descriptions to facilitate resolution context updates\n   *\n   * @returns text describing the URI resolution step\n   * */\n  protected getStepDescription = (): string \n```\n\n#### _tryResolveUri\n```ts\n  /**\n   * Resolve a URI to a wrapper\n   *\n   * @param uri - the URI to resolve\n   * @returns A Promise with a Result containing a wrapper if successful\n   */\n  protected async _tryResolveUri(\n    uri: Uri\n  ): Promise<Result<UriPackageOrWrapper>> \n```\n\n## StaticResolver\n```ts\n/**\n * An IUriResolver implementation that efficiently delegates URI resolution to\n * static resolvers--i.e. those that resolve to embedded URIs, Wrappers, and Packages\n * */\nexport class StaticResolver<TError = undefined>\n  implements IUriResolver<TError> \n```\n\n### constructor\n```ts\n  /**\n   * Construct a Static Resolver\n   *\n   * @param uriMap - a mapping of URI to embedded URI, package, or wrapper\n   * */\n  constructor(public uriMap: Map<string, UriPackageOrWrapper>) \n```\n\n### Methods\n\n#### from\n```ts\n  /**\n   * Create a StaticResolver from a static-resolver-like object\n   *\n   * @param staticResolverLikes - an array of resolver-like objects to delegate resolution to\n   *\n   * @returns a StaticResolver\n   * */\n  static from<TError = undefined>(\n    staticResolverLikes: UriResolverLike[]\n  ): StaticResolver<TError> \n```\n\n#### tryResolveUri\n```ts\n  /**\n   * Resolve a URI to a wrap package, a wrapper, or a URI.\n   *\n   * @param uri - the URI to resolve\n   * @param _ - not used\n   * @param resolutionContext - the current URI resolution context\n   * @returns A Promise with a Result containing either a wrap package, a wrapper, or a URI if successful\n   */\n  async tryResolveUri(\n    uri: Uri,\n    _: CoreClient,\n    resolutionContext: IUriResolutionContext\n  ): Promise<Result<UriPackageOrWrapper, TError>> \n```\n\n## StaticResolverLike\n```ts\n/** A StaticResolverLike can be one of two things:\n * - An object that can be transformed into a static IUriResolver\n * - An array of StaticResolverLike\n * */\nexport type StaticResolverLike =\n  | IUriRedirect\n  | IUriPackage\n  | IUriWrapper\n  | StaticResolverLike[];\n```\n\n## RequestSynchronizerResolver\n```ts\n/* Uri resolver that synchronizes requests to the same URI\n * Multiple requests to the same URI will be resolved only once\n * and the result will be cached for subsequent requests (only for the duration of that first request)\n * Can use the `shouldIgnoreCache` option to determine whether to ignore the cached request in case of an error\n * (default is to use the cache)\n */\nexport class RequestSynchronizerResolver<TError>\n  implements IUriResolver<TError> \n```\n\n### constructor\n```ts\n  /**\n   * Construct a RequestSynchronizerResolver\n   *\n   * @param resolverToSynchronize - the inner resolve whose resolution will be synchronized\n   * @param options - the optional options containing the `shouldIgnoreCache` error handler\n   * */\n  constructor(\n    private resolverToSynchronize: IUriResolver<TError>,\n    private options?: {\n      shouldIgnoreCache?: (error: TError | undefined) => boolean;\n    }\n  ) \n```\n\n### Methods\n\n#### from\n```ts\n  /**\n   * Create a RequestSynchronizerResolver from a static-resolver-like object\n   *\n   * @param resolver - a resolver-like object whose resolution will be synchronized\n   * @param options - the optional options containing the `shouldIgnoreCache` error handler\n   *\n   * @returns a RequestSynchronizerResolver\n   * */\n  static from<TResolverError = unknown>(\n    resolver: UriResolverLike,\n    options?: {\n      shouldIgnoreCache?: (error: TResolverError | undefined) => boolean;\n    }\n  ): RequestSynchronizerResolver<TResolverError> \n```\n\n#### tryResolveUri\n```ts\n  /**\n   * Resolve a URI to a wrap package, a wrapper, or a URI.\n   * Attempts to resolve the URI using each of the aggregated resolvers sequentially.\n   *\n   * @param uri - the URI to resolve\n   * @param client - a CoreClient instance that may be used to invoke a wrapper that implements the UriResolver interface\n   * @param resolutionContext - the current URI resolution context\n   * @returns A Promise with a Result containing either a wrap package, a wrapper, or a URI if successful\n   */\n  async tryResolveUri(\n    uri: Uri,\n    client: CoreClient,\n    resolutionContext: IUriResolutionContext\n  ): Promise<Result<UriPackageOrWrapper, TError>> \n```\n\n\n## Development\n\nThis package is open-source. It lives within the [Polywrap JavaScript Client repository](https://github.com/polywrap/javascript-client). Contributions from the community are welcomed!\n\n### Build\n```bash\nnvm use && yarn install && yarn build\n```\n\n### Test\n```bash\nyarn test\n``","readmeFilename":"README.md"}