{"_id":"@200systems/mf-sveltekit-adapter","_rev":"12-2f0221f71e3a23ca231390e8f48ca328","name":"@200systems/mf-sveltekit-adapter","dist-tags":{"latest":"1.1.6"},"versions":{"1.0.1":{"name":"@200systems/mf-sveltekit-adapter","version":"1.0.1","keywords":["typescript","sveltekit","microframework","client","api","hooks","stores","authentication"],"author":{"name":"Cleiton Marques","email":"cleiton.marques@200.systems"},"license":"MIT","_id":"@200systems/mf-sveltekit-adapter@1.0.1","maintainers":[{"name":"200systems","email":"cleiton.marques@200.systems"}],"homepage":"https://github.com/200Systems/bitbrick-microframework#readme","bugs":{"url":"https://github.com/200Systems/bitbrick-microframework/issues"},"dist":{"shasum":"3e12a38932129520764eeb23ab79ecfedb62c91c","tarball":"https://registry.npmjs.org/@200systems/mf-sveltekit-adapter/-/mf-sveltekit-adapter-1.0.1.tgz","fileCount":26,"integrity":"sha512-GGZJCPlFydV4peIxLk5VBH+BOk222UJ501zYOTz+PQ6YpI+IbjET4rF0eKY4de4HgpTDcVbFx4vXuky1Wlh64Q==","signatures":[{"sig":"MEUCIQDKxUIrlMTHF5aFUqiglbjzZHkibm9azKgiYe6f7p7icAIgV/2HvhCZCfttuXmPN6I8m+DfwLxswUChwZu7PN8vT2c=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":55401},"main":"./dist/index.js","types":"./dist/index.d.ts","engines":{"node":">=18.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.js"},"./hooks":{"types":"./dist/hooks/index.d.ts","import":"./dist/hooks/index.js","require":"./dist/hooks/index.js"},"./client":{"types":"./dist/client/index.d.ts","import":"./dist/client/index.js","require":"./dist/client/index.js"}},"gitHead":"b23d0aca4444d3727bef596b99d52f845ee6bdd8","scripts":{"dev":"tsc --watch","lint":"eslint src/**/*.ts","build":"tsc","clean":"rm -rf dist *.tsbuildinfo","lint:fix":"eslint src/**/*.ts --fix"},"_npmUser":{"name":"200systems","actor":{"name":"200systems","type":"user","email":"cleiton.marques@200.systems"},"email":"cleiton.marques@200.systems"},"repository":{"url":"git+https://github.com/200Systems/bitbrick-microframework.git","type":"git","directory":"packages/sveltekit-adapter"},"_npmVersion":"10.8.1","description":"SvelteKit integration adapter with API client, stores, and hooks","directories":{},"_nodeVersion":"22.3.0","dependencies":{"@200systems/mf-logger":"^1.0.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"svelte":"^5.0.0","typescript":"^5.8.3","@types/node":"^20.10.0","@sveltejs/kit":"^2.0.0"},"peerDependencies":{"svelte":"^5.0.0","@sveltejs/kit":"^2.0.0"},"_npmOperationalInternal":{"tmp":"tmp/mf-sveltekit-adapter_1.0.1_1750937036376_0.8744657155816391","host":"s3://npm-registry-packages-npm-production"},"deprecated":"Descontinuado: use @groundbrick/sveltekit-adapter."},"1.0.2":{"name":"@200systems/mf-sveltekit-adapter","version":"1.0.2","keywords":["typescript","sveltekit","microframework","client","api","hooks","stores","authentication"],"author":{"name":"Cleiton Marques","email":"cleiton.marques@200.systems"},"license":"MIT","_id":"@200systems/mf-sveltekit-adapter@1.0.2","maintainers":[{"name":"200systems","email":"cleiton.marques@200.systems"}],"homepage":"https://github.com/200Systems/bitbrick-microframework#readme","bugs":{"url":"https://github.com/200Systems/bitbrick-microframework/issues"},"dist":{"shasum":"5b31656f72bc0f13f3082d312d53f6691f504561","tarball":"https://registry.npmjs.org/@200systems/mf-sveltekit-adapter/-/mf-sveltekit-adapter-1.0.2.tgz","fileCount":26,"integrity":"sha512-LYIAYzJFdY4unyRrSXVYD0bflLegT+dc1nQmTyhWKc0YnAqDHn6pOwiAxZPVpYdWgUwDxpDtKLxPvJa1/H6b7Q==","signatures":[{"sig":"MEUCIQCmaOz2wPAF4Q6sBI0WpSvmy+lyeG1Ig9/gLAnHUgIMxgIgIoLcoW+3MIgRRzsw2YUvrsYYyPTzp9vq7uAoxjIByJQ=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":64178},"main":"./dist/index.js","types":"./dist/index.d.ts","engines":{"node":">=18.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.js"},"./hooks":{"types":"./dist/hooks/index.d.ts","import":"./dist/hooks/index.js","require":"./dist/hooks/index.js"},"./client":{"types":"./dist/client/index.d.ts","import":"./dist/client/index.js","require":"./dist/client/index.js"}},"gitHead":"3b9df0fba14ad311035a103071c895f780597d75","scripts":{"dev":"tsc --watch","lint":"eslint src/**/*.ts","build":"tsc","clean":"rm -rf dist *.tsbuildinfo","lint:fix":"eslint src/**/*.ts --fix"},"_npmUser":{"name":"200systems","actor":{"name":"200systems","type":"user","email":"cleiton.marques@200.systems"},"email":"cleiton.marques@200.systems"},"repository":{"url":"git+https://github.com/200Systems/bitbrick-microframework.git","type":"git","directory":"packages/sveltekit-adapter"},"_npmVersion":"10.8.1","description":"SvelteKit integration adapter with API client, stores, and hooks","directories":{},"_nodeVersion":"22.3.0","dependencies":{"@200systems/mf-logger":"^1.0.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"svelte":"^5.0.0","typescript":"^5.8.3","@types/node":"^20.10.0","@sveltejs/kit":"^2.0.0"},"peerDependencies":{"svelte":"^5.0.0","@sveltejs/kit":"^2.0.0"},"_npmOperationalInternal":{"tmp":"tmp/mf-sveltekit-adapter_1.0.2_1751014428197_0.5775936013258467","host":"s3://npm-registry-packages-npm-production"},"deprecated":"Descontinuado: use @groundbrick/sveltekit-adapter."},"1.0.3":{"name":"@200systems/mf-sveltekit-adapter","version":"1.0.3","keywords":["typescript","sveltekit","microframework","client","api","hooks","stores","authentication"],"author":{"name":"Cleiton Marques","email":"cleiton.marques@200.systems"},"license":"MIT","_id":"@200systems/mf-sveltekit-adapter@1.0.3","maintainers":[{"name":"200systems","email":"cleiton.marques@200.systems"}],"homepage":"https://github.com/200Systems/bitbrick-microframework#readme","bugs":{"url":"https://github.com/200Systems/bitbrick-microframework/issues"},"dist":{"shasum":"faa24cc24f48affd729c06e9136b891b4954e838","tarball":"https://registry.npmjs.org/@200systems/mf-sveltekit-adapter/-/mf-sveltekit-adapter-1.0.3.tgz","fileCount":26,"integrity":"sha512-c+So7NwXyeVLf717asnOUZIhIknlMasvvv4krn0TKTyqSYdCVH0V08DoP5Moq2sNtKrLp230wVOCTcofU0i60A==","signatures":[{"sig":"MEUCIQDMnVq2LmCdP/oJBqh2B/mQsBCi4Nq/FSgrnIeV/sjmNwIgbfi3dNe/dql+25iOuTEynoYN6IedoyZu/3v1E/ATK9M=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":64107},"main":"./dist/index.js","types":"./dist/index.d.ts","engines":{"node":">=18.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.js"},"./hooks":{"types":"./dist/hooks/index.d.ts","import":"./dist/hooks/index.js","require":"./dist/hooks/index.js"},"./client":{"types":"./dist/client/index.d.ts","import":"./dist/client/index.js","require":"./dist/client/index.js"}},"gitHead":"17e3ce1150d8a91f15ba15d4208a96a40cf211b9","scripts":{"dev":"tsc --watch","lint":"eslint src/**/*.ts","build":"tsc","clean":"rm -rf dist *.tsbuildinfo","lint:fix":"eslint src/**/*.ts --fix"},"_npmUser":{"name":"200systems","actor":{"name":"200systems","type":"user","email":"cleiton.marques@200.systems"},"email":"cleiton.marques@200.systems"},"repository":{"url":"git+https://github.com/200Systems/bitbrick-microframework.git","type":"git","directory":"packages/sveltekit-adapter"},"_npmVersion":"10.8.1","description":"SvelteKit integration adapter with API client, stores, and hooks","directories":{},"_nodeVersion":"22.3.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"svelte":"^5.0.0","typescript":"^5.8.3","@types/node":"^20.10.0","@sveltejs/kit":"^2.0.0"},"peerDependencies":{"svelte":"^5.0.0","@sveltejs/kit":"^2.0.0"},"_npmOperationalInternal":{"tmp":"tmp/mf-sveltekit-adapter_1.0.3_1751056812438_0.4551114020824949","host":"s3://npm-registry-packages-npm-production"},"deprecated":"Descontinuado: use @groundbrick/sveltekit-adapter."},"1.0.4":{"name":"@200systems/mf-sveltekit-adapter","version":"1.0.4","keywords":["typescript","sveltekit","microframework","client","api","hooks","stores","authentication"],"author":{"name":"Cleiton Marques","email":"cleiton.marques@200.systems"},"license":"MIT","_id":"@200systems/mf-sveltekit-adapter@1.0.4","maintainers":[{"name":"200systems","email":"cleiton.marques@200.systems"}],"homepage":"https://github.com/200Systems/bitbrick-microframework#readme","bugs":{"url":"https://github.com/200Systems/bitbrick-microframework/issues"},"dist":{"shasum":"60604fafa025fba45dce17550499783b3967a8a3","tarball":"https://registry.npmjs.org/@200systems/mf-sveltekit-adapter/-/mf-sveltekit-adapter-1.0.4.tgz","fileCount":26,"integrity":"sha512-AK79iqsjRyhA+VN2DbM46ynmmP/d5YPd+LxUwzwJoiNGae8TSPedFSSjuLea1kOEiP4WBOEb7lk72gZkVSRfqA==","signatures":[{"sig":"MEUCIQCnFZ4vwI5bZIvv+tzYvqZ7ZTJGDGie6nayiyhGa/k0kgIgYgVu8Y+ARfZWYJ9wP/8IgsyvUqBX0JKrMYG1Jn5GLnc=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":64111},"main":"./dist/index.js","types":"./dist/index.d.ts","engines":{"node":">=18.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.js"},"./hooks":{"types":"./dist/hooks/index.d.ts","import":"./dist/hooks/index.js","require":"./dist/hooks/index.js"},"./client":{"types":"./dist/client/index.d.ts","import":"./dist/client/index.js","require":"./dist/client/index.js"}},"gitHead":"d7bb90f291b6b532083319fa040cfeb43eae8ad7","scripts":{"dev":"tsc --watch","lint":"eslint src/**/*.ts","build":"tsc","clean":"rm -rf dist *.tsbuildinfo","lint:fix":"eslint src/**/*.ts --fix"},"_npmUser":{"name":"200systems","actor":{"name":"200systems","type":"user","email":"cleiton.marques@200.systems"},"email":"cleiton.marques@200.systems"},"repository":{"url":"git+https://github.com/200Systems/bitbrick-microframework.git","type":"git","directory":"packages/sveltekit-adapter"},"_npmVersion":"10.8.1","description":"SvelteKit integration adapter with API client, stores, and hooks","directories":{},"_nodeVersion":"22.3.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"svelte":"^5.25.0","typescript":"^5.8.3","@types/node":"^20.10.0","@sveltejs/kit":"^2.16.0"},"peerDependencies":{"svelte":"^5.25.0","@sveltejs/kit":"^2.16.0"},"_npmOperationalInternal":{"tmp":"tmp/mf-sveltekit-adapter_1.0.4_1751058922932_0.1410481527927674","host":"s3://npm-registry-packages-npm-production"},"deprecated":"Descontinuado: use @groundbrick/sveltekit-adapter."},"1.0.5":{"name":"@200systems/mf-sveltekit-adapter","version":"1.0.5","keywords":["typescript","sveltekit","microframework","client","api","hooks","stores","authentication"],"author":{"name":"Cleiton Marques","email":"cleiton.marques@200.systems"},"license":"MIT","_id":"@200systems/mf-sveltekit-adapter@1.0.5","maintainers":[{"name":"200systems","email":"cleiton.marques@200.systems"}],"homepage":"https://github.com/200Systems/bitbrick-microframework#readme","bugs":{"url":"https://github.com/200Systems/bitbrick-microframework/issues"},"dist":{"shasum":"06cbd42c81318af8fa6b18ccf7db5e0a94f0d7a8","tarball":"https://registry.npmjs.org/@200systems/mf-sveltekit-adapter/-/mf-sveltekit-adapter-1.0.5.tgz","fileCount":26,"integrity":"sha512-aLAYfIJ6ujPNH2Mm8KZF1pOdhV8YjtqtpA5TSaNbz+2kkkG8AmAdnOo2EIjovYzrapGyRQmpeIQhzhdBsR9ZqA==","signatures":[{"sig":"MEYCIQCLSz4wWMs8gAl8YI5WxkyjOQWSEbPgcMy8IcpewuH/EAIhAPLV5kXVPgSUumPlfDkUdJ88FyR/llH+cD28ixiCs8Rt","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":64133},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=18.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.js"},"./hooks":{"types":"./dist/hooks/index.d.ts","import":"./dist/hooks/index.js","require":"./dist/hooks/index.js"},"./client":{"types":"./dist/client/index.d.ts","import":"./dist/client/index.js","require":"./dist/client/index.js"}},"gitHead":"d7bb90f291b6b532083319fa040cfeb43eae8ad7","scripts":{"dev":"tsc --watch","lint":"eslint src/**/*.ts","build":"tsc","clean":"rm -rf dist *.tsbuildinfo","lint:fix":"eslint src/**/*.ts --fix"},"_npmUser":{"name":"200systems","actor":{"name":"200systems","type":"user","email":"cleiton.marques@200.systems"},"email":"cleiton.marques@200.systems"},"repository":{"url":"git+https://github.com/200Systems/bitbrick-microframework.git","type":"git","directory":"packages/sveltekit-adapter"},"_npmVersion":"10.8.1","description":"SvelteKit integration adapter with API client, stores, and hooks","directories":{},"_nodeVersion":"22.3.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"svelte":"^5.25.0","typescript":"^5.8.3","@types/node":"^20.10.0","@sveltejs/kit":"^2.16.0"},"peerDependencies":{"svelte":"^5.25.0","@sveltejs/kit":"^2.16.0"},"_npmOperationalInternal":{"tmp":"tmp/mf-sveltekit-adapter_1.0.5_1751059760636_0.24993061951208095","host":"s3://npm-registry-packages-npm-production"},"deprecated":"Descontinuado: use @groundbrick/sveltekit-adapter."},"1.1.1":{"name":"@200systems/mf-sveltekit-adapter","version":"1.1.1","keywords":["typescript","sveltekit","microframework","client","api","hooks","stores","authentication"],"author":{"name":"Cleiton Marques","email":"cleiton.marques@200.systems"},"license":"MIT","_id":"@200systems/mf-sveltekit-adapter@1.1.1","maintainers":[{"name":"200systems","email":"cleiton.marques@200.systems"}],"homepage":"https://github.com/200Systems/bitbrick-microframework#readme","bugs":{"url":"https://github.com/200Systems/bitbrick-microframework/issues"},"dist":{"shasum":"b79c9b031df9a8cb5886a3b38bf9e42203c57cd7","tarball":"https://registry.npmjs.org/@200systems/mf-sveltekit-adapter/-/mf-sveltekit-adapter-1.1.1.tgz","fileCount":26,"integrity":"sha512-qNV6/R58UrKIkxpVzLfSjf3KpMTS+WcrU8lL26CKLZFpmkmG0FN5BZCS6G9y3DTopKUVXlDbJRVEy2QOiEFXnw==","signatures":[{"sig":"MEUCIQCCNc13NMgNfQJqUZCiZdyGDFAJ6aqcNGpfk+M1IVgIdAIgZov26tZy3OC/VG1sDFY1Xl9+Qp+RkDRjNxWiDkt5b54=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":64133},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=18.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.js"},"./hooks":{"types":"./dist/hooks/index.d.ts","import":"./dist/hooks/index.js","require":"./dist/hooks/index.js"},"./client":{"types":"./dist/client/index.d.ts","import":"./dist/client/index.js","require":"./dist/client/index.js"}},"gitHead":"b2e1d0a164c5cfd355a044b56b7ec48c88def397","scripts":{"dev":"tsc --watch","lint":"eslint src/**/*.ts","build":"tsc","clean":"rm -rf dist *.tsbuildinfo","lint:fix":"eslint src/**/*.ts --fix"},"_npmUser":{"name":"200systems","actor":{"name":"200systems","type":"user","email":"cleiton.marques@200.systems"},"email":"cleiton.marques@200.systems"},"repository":{"url":"git+https://github.com/200Systems/bitbrick-microframework.git","type":"git","directory":"packages/sveltekit-adapter"},"_npmVersion":"10.8.1","description":"SvelteKit integration adapter with API client, stores, and hooks","directories":{},"_nodeVersion":"22.3.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"svelte":"^5.25.0","typescript":"^5.8.3","@types/node":"^20.10.0","@sveltejs/kit":"^2.16.0"},"peerDependencies":{"svelte":"^5.25.0","@sveltejs/kit":"^2.16.0"},"_npmOperationalInternal":{"tmp":"tmp/mf-sveltekit-adapter_1.1.1_1751223538486_0.5590845935801434","host":"s3://npm-registry-packages-npm-production"},"deprecated":"Descontinuado: use @groundbrick/sveltekit-adapter."},"1.1.2":{"name":"@200systems/mf-sveltekit-adapter","version":"1.1.2","keywords":["typescript","sveltekit","microframework","client","api","hooks","stores","authentication"],"author":{"name":"Cleiton Marques","email":"cleiton.marques@200.systems"},"license":"MIT","_id":"@200systems/mf-sveltekit-adapter@1.1.2","maintainers":[{"name":"200systems","email":"cleiton.marques@200.systems"}],"homepage":"https://github.com/200Systems/bitbrick-microframework#readme","bugs":{"url":"https://github.com/200Systems/bitbrick-microframework/issues"},"dist":{"shasum":"5104b07d0e545d73ff7dcb43a3d861d9dff70958","tarball":"https://registry.npmjs.org/@200systems/mf-sveltekit-adapter/-/mf-sveltekit-adapter-1.1.2.tgz","fileCount":26,"integrity":"sha512-tZX0u8PoYRfV3dLNiNNZcS88vhfjIIca5idpODq4j+sDsLVY37sK5DKRYBvH/fZxbViiRWdCEx5NboJ17J3d6A==","signatures":[{"sig":"MEYCIQC/dKdKwNcVMEUEoTqvTBJHjWU0mdhVyHEOLoqSStI57wIhALlBoEOnamr/SZa2K7gztWhzfSTS62nC3cytWPviTULR","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":64133},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=18.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.js"},"./hooks":{"types":"./dist/hooks/index.d.ts","import":"./dist/hooks/index.js","require":"./dist/hooks/index.js"},"./client":{"types":"./dist/client/index.d.ts","import":"./dist/client/index.js","require":"./dist/client/index.js"}},"gitHead":"b2e1d0a164c5cfd355a044b56b7ec48c88def397","scripts":{"dev":"tsc --watch","lint":"eslint src/**/*.ts","build":"tsc","clean":"rm -rf dist *.tsbuildinfo","lint:fix":"eslint src/**/*.ts --fix"},"_npmUser":{"name":"200systems","actor":{"name":"200systems","type":"user","email":"cleiton.marques@200.systems"},"email":"cleiton.marques@200.systems"},"repository":{"url":"git+https://github.com/200Systems/bitbrick-microframework.git","type":"git","directory":"packages/sveltekit-adapter"},"_npmVersion":"10.8.1","description":"SvelteKit integration adapter with API client, stores, and hooks","directories":{},"_nodeVersion":"22.3.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"svelte":"^5.25.0","typescript":"^5.8.3","@types/node":"^20.10.0","@sveltejs/kit":"^2.16.0"},"peerDependencies":{"svelte":"^5.25.0","@sveltejs/kit":"^2.16.0"},"_npmOperationalInternal":{"tmp":"tmp/mf-sveltekit-adapter_1.1.2_1751224241810_0.4869280017682962","host":"s3://npm-registry-packages-npm-production"},"deprecated":"Descontinuado: use @groundbrick/sveltekit-adapter."},"1.1.3":{"name":"@200systems/mf-sveltekit-adapter","version":"1.1.3","keywords":["typescript","sveltekit","microframework","client","api","hooks","stores","authentication"],"author":{"name":"Cleiton Marques","email":"cleiton.marques@200.systems"},"license":"MIT","_id":"@200systems/mf-sveltekit-adapter@1.1.3","maintainers":[{"name":"200systems","email":"cleiton.marques@200.systems"}],"homepage":"https://github.com/200Systems/bitbrick-microframework#readme","bugs":{"url":"https://github.com/200Systems/bitbrick-microframework/issues"},"dist":{"shasum":"0fd16e6329b705742a0cc701889bac94bb37135f","tarball":"https://registry.npmjs.org/@200systems/mf-sveltekit-adapter/-/mf-sveltekit-adapter-1.1.3.tgz","fileCount":26,"integrity":"sha512-BqPbVoKIlif4As+uGnw+yYaNJNX7SW645A3vIzq5i762tNLEMORaAX00tToqaCZeWby3Nr2Qme0UPtCtzpGxpA==","signatures":[{"sig":"MEQCIB5k5ufSVp6yQ6WP0/TzEanL8jjCHf+DzAjpLldTPQpoAiBIIMNUJ3cAQCYMTuRazTLk8L1asRkaVHWS+sQq+wKmTA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":64133},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=18.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.js"},"./hooks":{"types":"./dist/hooks/index.d.ts","import":"./dist/hooks/index.js","require":"./dist/hooks/index.js"},"./client":{"types":"./dist/client/index.d.ts","import":"./dist/client/index.js","require":"./dist/client/index.js"}},"gitHead":"23dcee4f5721e057c3d9625f10e1823f834a466d","scripts":{"dev":"tsc --watch","lint":"eslint src/**/*.ts","build":"tsc","clean":"rm -rf dist *.tsbuildinfo","lint:fix":"eslint src/**/*.ts --fix"},"_npmUser":{"name":"200systems","actor":{"name":"200systems","type":"user","email":"cleiton.marques@200.systems"},"email":"cleiton.marques@200.systems"},"repository":{"url":"git+https://github.com/200Systems/bitbrick-microframework.git","type":"git","directory":"packages/sveltekit-adapter"},"_npmVersion":"10.8.1","description":"SvelteKit integration adapter with API client, stores, and hooks","directories":{},"_nodeVersion":"22.3.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"svelte":"^5.25.0","typescript":"^5.8.3","@types/node":"^20.10.0","@sveltejs/kit":"^2.16.0"},"peerDependencies":{"svelte":"^5.25.0","@sveltejs/kit":"^2.16.0"},"_npmOperationalInternal":{"tmp":"tmp/mf-sveltekit-adapter_1.1.3_1751472531582_0.6030141055569782","host":"s3://npm-registry-packages-npm-production"},"deprecated":"Descontinuado: use @groundbrick/sveltekit-adapter."},"1.1.4":{"name":"@200systems/mf-sveltekit-adapter","version":"1.1.4","keywords":["typescript","sveltekit","microframework","client","api","hooks","stores","authentication"],"author":{"name":"Cleiton Marques","email":"cleiton.marques@200.systems"},"license":"MIT","_id":"@200systems/mf-sveltekit-adapter@1.1.4","maintainers":[{"name":"200systems","email":"cleiton.marques@200.systems"}],"homepage":"https://github.com/200Systems/bitbrick-microframework#readme","bugs":{"url":"https://github.com/200Systems/bitbrick-microframework/issues"},"dist":{"shasum":"95ac080fdecfae1c4e50ed109cc2f44da3bf7078","tarball":"https://registry.npmjs.org/@200systems/mf-sveltekit-adapter/-/mf-sveltekit-adapter-1.1.4.tgz","fileCount":26,"integrity":"sha512-jbK1SiHJTRf4pu2JGutMOiyH+uTWXzV8DWGJn9qjzEs1eZfQFFpDJqeQXrGgNMOwG1PptifkrPz7mX7fAe1E1Q==","signatures":[{"sig":"MEQCIDWwBwH3jp78yIRFhT04n9M5vzpmbepLb41ldfe4pbmWAiAgg1toecGg0XuOFgWSEpLTa2YcdCoQdgd5kWaMcVR1TQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":64155},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=18.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.js"},"./hooks":{"types":"./dist/hooks/index.d.ts","import":"./dist/hooks/index.js","require":"./dist/hooks/index.js"},"./client":{"types":"./dist/client/index.d.ts","import":"./dist/client/index.js","require":"./dist/client/index.js"}},"gitHead":"23dcee4f5721e057c3d9625f10e1823f834a466d","scripts":{"dev":"tsc --watch","lint":"eslint src/**/*.ts","build":"tsc","clean":"rm -rf dist *.tsbuildinfo","lint:fix":"eslint src/**/*.ts --fix"},"_npmUser":{"name":"200systems","actor":{"name":"200systems","type":"user","email":"cleiton.marques@200.systems"},"email":"cleiton.marques@200.systems"},"repository":{"url":"git+https://github.com/200Systems/bitbrick-microframework.git","type":"git","directory":"packages/sveltekit-adapter"},"_npmVersion":"10.8.1","description":"SvelteKit integration adapter with API client, stores, and hooks","directories":{},"_nodeVersion":"22.3.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"svelte":"^5.25.0","typescript":"^5.8.3","@types/node":"^20.10.0","@sveltejs/kit":"^2.16.0"},"peerDependencies":{"svelte":"^5.25.0","@sveltejs/kit":"^2.16.0"},"_npmOperationalInternal":{"tmp":"tmp/mf-sveltekit-adapter_1.1.4_1751473984159_0.2339247339933357","host":"s3://npm-registry-packages-npm-production"},"deprecated":"Descontinuado: use @groundbrick/sveltekit-adapter."},"1.1.5":{"name":"@200systems/mf-sveltekit-adapter","version":"1.1.5","keywords":["typescript","sveltekit","microframework","client","api","hooks","stores","authentication"],"author":{"name":"Cleiton Marques","email":"cleiton.marques@200.systems"},"license":"MIT","_id":"@200systems/mf-sveltekit-adapter@1.1.5","maintainers":[{"name":"200systems","email":"cleiton.marques@200.systems"}],"homepage":"https://github.com/200Systems/bitbrick-microframework#readme","bugs":{"url":"https://github.com/200Systems/bitbrick-microframework/issues"},"dist":{"shasum":"c99bb33949ab4d7e436ad08a44abda4192d407f0","tarball":"https://registry.npmjs.org/@200systems/mf-sveltekit-adapter/-/mf-sveltekit-adapter-1.1.5.tgz","fileCount":26,"integrity":"sha512-wdPS6wGKNP4GR4Nr134wRgtK3aXvS0lEe32netf4FMeCtcK+nRfAfKDSaqsMSPVy8SC1Gn7LUHTX8wMe7quHAg==","signatures":[{"sig":"MEQCIC2y+jqsZgbuZ9BqsN0YiFjDBt8npc3DBDorK8tSmn/2AiBLivaXIqZU1zZVYD/MCljaN5sRuey8S/rCjAUKbh5f3g==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":64155},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=18.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.js"},"./hooks":{"types":"./dist/hooks/index.d.ts","import":"./dist/hooks/index.js","require":"./dist/hooks/index.js"},"./client":{"types":"./dist/client/index.d.ts","import":"./dist/client/index.js","require":"./dist/client/index.js"}},"gitHead":"23dcee4f5721e057c3d9625f10e1823f834a466d","scripts":{"dev":"tsc --watch","lint":"eslint src/**/*.ts","build":"tsc","clean":"rm -rf dist *.tsbuildinfo","lint:fix":"eslint src/**/*.ts --fix"},"_npmUser":{"name":"200systems","actor":{"name":"200systems","type":"user","email":"cleiton.marques@200.systems"},"email":"cleiton.marques@200.systems"},"repository":{"url":"git+https://github.com/200Systems/bitbrick-microframework.git","type":"git","directory":"packages/sveltekit-adapter"},"_npmVersion":"10.8.1","description":"SvelteKit integration adapter with API client, stores, and hooks","directories":{},"_nodeVersion":"22.3.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"svelte":"^5.25.0","typescript":"^5.8.3","@types/node":"^20.10.0","@sveltejs/kit":"^2.16.0"},"peerDependencies":{"svelte":"^5.25.0","@sveltejs/kit":"^2.16.0"},"_npmOperationalInternal":{"tmp":"tmp/mf-sveltekit-adapter_1.1.5_1751474257125_0.9168887432727941","host":"s3://npm-registry-packages-npm-production"},"deprecated":"Descontinuado: use @groundbrick/sveltekit-adapter."},"1.1.6":{"name":"@200systems/mf-sveltekit-adapter","version":"1.1.6","keywords":["typescript","sveltekit","microframework","client","api","hooks","stores","authentication"],"author":{"name":"Cleiton Marques","email":"cleiton.marques@200.systems"},"license":"MIT","_id":"@200systems/mf-sveltekit-adapter@1.1.6","maintainers":[{"name":"200systems","email":"cleiton.marques@200.systems"}],"homepage":"https://github.com/200Systems/bitbrick-microframework#readme","bugs":{"url":"https://github.com/200Systems/bitbrick-microframework/issues"},"dist":{"shasum":"9df1befabd36d6f499f4e2be2c1e14a4b041a397","tarball":"https://registry.npmjs.org/@200systems/mf-sveltekit-adapter/-/mf-sveltekit-adapter-1.1.6.tgz","fileCount":26,"integrity":"sha512-YRwn9uEryqksMmj0CPkWNfkXxrFYu5VKnbFqq7R6tIEvwZWRonrWRtNjP9k2e5BLJfVSMIn2m8h9QdHEpTkWNg==","signatures":[{"sig":"MEYCIQChOu8A/WHafxBlPpDon4bPXSuDzSw/sFslpVfzW4RpAQIhAPc0FpPF1mmpUlhH3RAbvyojId/SBJmCltTyt2+glXgz","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":64155},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=18.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.js"},"./hooks":{"types":"./dist/hooks/index.d.ts","import":"./dist/hooks/index.js","require":"./dist/hooks/index.js"},"./client":{"types":"./dist/client/index.d.ts","import":"./dist/client/index.js","require":"./dist/client/index.js"}},"gitHead":"23dcee4f5721e057c3d9625f10e1823f834a466d","scripts":{"dev":"tsc --watch","lint":"eslint src/**/*.ts","build":"tsc","clean":"rm -rf dist *.tsbuildinfo","lint:fix":"eslint src/**/*.ts --fix"},"_npmUser":{"name":"200systems","actor":{"name":"200systems","type":"user","email":"cleiton.marques@200.systems"},"email":"cleiton.marques@200.systems"},"repository":{"url":"git+https://github.com/200Systems/bitbrick-microframework.git","type":"git","directory":"packages/sveltekit-adapter"},"_npmVersion":"10.8.1","description":"SvelteKit integration adapter with API client, stores, and hooks","directories":{},"_nodeVersion":"22.3.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"svelte":"^5.25.0","typescript":"^5.8.3","@types/node":"^20.10.0","@sveltejs/kit":"^2.16.0"},"peerDependencies":{"svelte":"^5.25.0","@sveltejs/kit":"^2.16.0"},"_npmOperationalInternal":{"tmp":"tmp/mf-sveltekit-adapter_1.1.6_1751475266838_0.022908820316323908","host":"s3://npm-registry-packages-npm-production"},"deprecated":"Descontinuado: use @groundbrick/sveltekit-adapter."}},"time":{"created":"2025-06-26T11:23:56.308Z","modified":"2026-09-27T14:03:17.523Z","1.0.1":"2025-06-26T11:23:56.566Z","1.0.2":"2025-06-27T08:53:48.367Z","1.0.3":"2025-06-27T20:40:12.596Z","1.0.4":"2025-06-27T21:15:23.183Z","1.0.5":"2025-06-27T21:29:20.849Z","1.1.1":"2025-06-29T18:58:58.689Z","1.1.2":"2025-06-29T19:10:41.980Z","1.1.3":"2025-07-02T16:08:51.844Z","1.1.4":"2025-07-02T16:33:04.380Z","1.1.5":"2025-07-02T16:37:37.305Z","1.1.6":"2025-07-02T16:54:27.056Z"},"bugs":{"url":"https://github.com/200Systems/bitbrick-microframework/issues"},"author":{"name":"Cleiton Marques","email":"cleiton.marques@200.systems"},"license":"MIT","homepage":"https://github.com/200Systems/bitbrick-microframework#readme","keywords":["typescript","sveltekit","microframework","client","api","hooks","stores","authentication"],"repository":{"url":"git+https://github.com/200Systems/bitbrick-microframework.git","type":"git","directory":"packages/sveltekit-adapter"},"description":"SvelteKit integration adapter with API client, stores, and hooks","maintainers":[{"name":"200systems","email":"cleiton.marques@200.systems"}],"readme":"# @200systems/mf-sveltekit-adapter\n\nSvelteKit integration adapter para o microframework TypeScript - fornece integração client-side com APIs Express, gerenciamento de estado reativo, autenticação JWT e hooks.\n\n## Features Implementadas\n\n- **🔧 ApiClient** - Cliente HTTP com autenticação, retry, timeout e gerenciamento de token\n- **🔐 Gerenciamento de Token** - Persistência automática de JWT token no localStorage\n- **📊 Stores Reativas** - Stores Svelte para estado de auth e API com suporte a runes\n- **🛡️ Error Handling** - Hooks abrangentes de tratamento de erros\n- **📝 Request Logging** - Log automático de request/response com timing\n- **🎣 SvelteKit Hooks** - Hooks pré-construídos para autenticação e logging\n- **🔄 Retry Logic** - Lógica de retry automática com exponential backoff\n- **⏱️ Timeout Handling** - Controle de timeout configurável para requests\n\n## Instalação\n\n```bash\nnpm install @200systems/mf-sveltekit-adapter\n```\n\n### Peer Dependencies\n\n```bash\nnpm install @sveltejs/kit svelte\n```\n\n## Quick Start\n\n### 1. Configuração de Hooks\n\n```typescript\n// src/hooks.server.ts\nimport { sequence } from '@sveltejs/kit/hooks';\nimport { createSvelteKitHooks } from '@200systems/mf-sveltekit-adapter';\n\nconst { hooks, handleError } = createSvelteKitHooks({\n  logger: {\n    logRequests: true,\n    logResponses: true,\n    includeHeaders: false,\n    excludePaths: ['/favicon.ico', '/robots.txt', '/health'],\n    context: 'my-app'\n  },\n  auth: {\n    tokenKey: 'auth_token',\n    publicPaths: ['/login', '/register', '/', '/api/public/*'],\n    redirectPath: '/login',\n    onAuthRequired: () => {\n      console.log('Authentication required');\n    }\n  },\n  errorHandler: {\n    logErrors: true,\n    context: 'my-app',\n    onError: (error, context) => {\n      // Custom error handling\n      console.error('App error:', error, context);\n    }\n  }\n});\n\nexport const handle = sequence(...hooks);\nexport { handleError };\n```\n\n### 2. Configuração do API Client\n\n```typescript\n// src/lib/api.ts\nimport { createApiClient } from '@200systems/mf-sveltekit-adapter';\n\nexport const apiClient = createApiClient({\n  baseUrl: 'http://localhost:3000/api',\n  timeout: 10000,\n  retries: 3,\n  defaultHeaders: {\n    'X-App-Version': '1.0.0',\n    'X-Client': 'sveltekit'\n  }\n});\n```\n\n### 3. Inicialização de Stores\n\n```typescript\n// src/routes/+layout.svelte\n<script lang=\"ts\">\n  import { onMount } from 'svelte';\n  import { initializeStores, authStore, isAuthenticated } from '@200systems/mf-sveltekit-adapter/client';\n  import { apiClient } from '$lib/api.js';\n\n  onMount(() => {\n    // Inicializar stores (carrega token do localStorage)\n    initializeStores();\n    \n    // Configurar token no API client se disponível\n    const currentAuth = $authStore;\n    if (currentAuth.token) {\n      apiClient.setToken(currentAuth.token);\n    }\n  });\n\n  function handleLogout() {\n    authStore.logout();\n    apiClient.clearToken();\n  }\n</script>\n\n{#if $isAuthenticated}\n  <nav>\n    <a href=\"/dashboard\">Dashboard</a>\n    <a href=\"/users\">Users</a>\n    <button onclick={handleLogout}>Logout</button>\n  </nav>\n{/if}\n\n<main>\n  <slot />\n</main>\n```\n\n### 4. Uso em Componentes\n\n```svelte\n<!-- src/routes/login/+page.svelte -->\n<script lang=\"ts\">\n  import { authStore, isLoading, currentError, clearErrors } from '@200systems/mf-sveltekit-adapter/client';\n  import { apiClient } from '$lib/api.js';\n  import { goto } from '$app/navigation';\n\n  let email = $state('');\n  let password = $state('');\n\n  async function handleLogin() {\n    try {\n      clearErrors();\n      authStore.setLoading(true);\n      \n      const result = await apiClient.post('/auth/login', { email, password });\n      \n      authStore.login(result.user, result.token);\n      apiClient.setToken(result.token);\n      goto('/dashboard');\n    } catch (error) {\n      authStore.setError((error as Error).message);\n    }\n  }\n</script>\n\n<form onsubmit={handleLogin}>\n  <input bind:value={email} type=\"email\" placeholder=\"Email\" required />\n  <input bind:value={password} type=\"password\" placeholder=\"Password\" required />\n  \n  {#if $currentError}\n    <div class=\"error\">{$currentError}</div>\n  {/if}\n  \n  <button type=\"submit\" disabled={$isLoading}>\n    {$isLoading ? 'Fazendo login...' : 'Login'}\n  </button>\n</form>\n```\n\n## API Reference\n\n### ApiClient\n\n```typescript\ninterface ApiClientConfig {\n  baseUrl: string;\n  timeout?: number;\n  retries?: number;\n  defaultHeaders?: Record<string, string>;\n}\n\nclass ApiClient {\n  constructor(config: ApiClientConfig);\n  \n  // Token management\n  setToken(token: string): void;\n  clearToken(): void;\n  getToken(): string | null;\n  isAuthenticated(): boolean;\n  \n  // HTTP methods\n  get<T>(endpoint: string, options?: RequestOptions): Promise<T>;\n  post<T>(endpoint: string, data?: unknown, options?: RequestOptions): Promise<T>;\n  put<T>(endpoint: string, data?: unknown, options?: RequestOptions): Promise<T>;\n  patch<T>(endpoint: string, data?: unknown, options?: RequestOptions): Promise<T>;\n  delete<T>(endpoint: string, options?: RequestOptions): Promise<T>;\n  \n  // Retry mechanism\n  requestWithRetry<T>(endpoint: string, options?: RequestOptions, retries?: number): Promise<T>;\n}\n\n// Factory function\nconst client = createApiClient(config);\n```\n\n### Request Options\n\n```typescript\ninterface RequestOptions extends RequestInit {\n  skipAuth?: boolean;    // Skip automatic token inclusion\n  timeout?: number;      // Override default timeout\n}\n\n// Exemplos de uso\nawait client.get('/users');\nawait client.post('/users', userData);\nawait client.put('/users/123', updateData);\nawait client.delete('/users/123');\n\n// Com opções customizadas\nawait client.get('/public-data', { skipAuth: true });\nawait client.get('/slow-endpoint', { timeout: 30000 });\n\n// Com retry customizado\nawait client.requestWithRetry('/flaky-endpoint', {}, 5);\n```\n\n### Stores Reativas\n\n```typescript\n// Auth Store\ninterface AuthStore {\n  isAuthenticated: boolean;\n  user: Record<string, unknown> | null;\n  token: string | null;\n  loading: boolean;\n  error: string | null;\n}\n\n// API Store\ninterface ApiStore {\n  loading: boolean;\n  error: string | null;\n  lastRequest: string | null;\n}\n\n// Stores disponíveis\nimport { \n  authStore, \n  apiStore, \n  isAuthenticated, \n  currentUser, \n  isLoading, \n  currentError,\n  initializeStores,\n  clearErrors \n} from '@200systems/mf-sveltekit-adapter/client';\n\n// Valores reativos (para usar com $ em Svelte)\n$isAuthenticated  // boolean\n$currentUser      // Record<string, unknown> | null\n$isLoading        // boolean (auth.loading || api.loading)\n$currentError     // string | null (auth.error || api.error)\n\n// Ações do authStore\nauthStore.login(user, token);\nauthStore.logout();\nauthStore.setLoading(true);\nauthStore.setError('Error message');\nauthStore.initialize(); // Carrega do localStorage\n\n// Ações do apiStore\napiStore.setLoading(true);\napiStore.setError('API error');\napiStore.setLastRequest('/api/endpoint');\n\n// Funções utilitárias\ninitializeStores();  // Inicializa todos os stores\nclearErrors();       // Limpa todos os erros\n```\n\n### Hooks do SvelteKit\n\n```typescript\n// Hook individual de logging\nconst loggerHook = createLoggerHook({\n  logRequests: true,\n  logResponses: true,\n  includeHeaders: false,\n  excludePaths: ['/health', '/favicon.ico'],\n  context: 'request-logger'\n});\n\n// Hook individual de autenticação\nconst authHook = createAuthHook({\n  tokenKey: 'auth_token',\n  redirectPath: '/login',\n  publicPaths: ['/login', '/register', '/', '/api/public/*'],\n  onAuthRequired: () => {\n    console.log('Authentication required');\n  }\n});\n\n// Handler de erro\nconst errorHandler = createErrorHandler({\n  logErrors: true,\n  context: 'error-handler',\n  onError: (error, context) => {\n    // Custom error handling\n    sendToAnalytics(error, context);\n  }\n});\n\n// Hook combinado (recomendado)\nconst { hooks, handleError } = createSvelteKitHooks({\n  logger: { /* config */ },\n  auth: { /* config */ },\n  errorHandler: { /* config */ }\n});\n\nexport const handle = sequence(...hooks);\nexport { handleError };\n```\n\n## Exemplos Práticos\n\n### Gerenciamento de Usuários\n\n```svelte\n<!-- src/routes/users/+page.svelte -->\n<script lang=\"ts\">\n  import { onMount } from 'svelte';\n  import { apiClient } from '$lib/api.js';\n  import { apiStore, isLoading, currentError } from '@200systems/mf-sveltekit-adapter/client';\n\n  let users = $state([]);\n\n  onMount(async () => {\n    await loadUsers();\n  });\n\n  async function loadUsers() {\n    try {\n      apiStore.setLoading(true);\n      const response = await apiClient.get('/users');\n      users = response.data || response;\n    } catch (error) {\n      apiStore.setError((error as Error).message);\n    }\n  }\n\n  async function deleteUser(id: number) {\n    if (!confirm('Tem certeza?')) return;\n    \n    try {\n      await apiClient.delete(`/users/${id}`);\n      users = users.filter(u => u.id !== id);\n    } catch (error) {\n      apiStore.setError((error as Error).message);\n    }\n  }\n</script>\n\n{#if $isLoading}\n  <div class=\"loading\">Carregando...</div>\n{/if}\n\n{#if $currentError}\n  <div class=\"error\">{$currentError}</div>\n{/if}\n\n<div class=\"users\">\n  {#each users as user}\n    <div class=\"user-card\">\n      <h3>{user.name}</h3>\n      <p>{user.email}</p>\n      <button onclick={() => deleteUser(user.id)}>Deletar</button>\n    </div>\n  {/each}\n</div>\n```\n\n### Formulário com Validação\n\n```svelte\n<!-- src/routes/users/create/+page.svelte -->\n<script lang=\"ts\">\n  import { apiClient } from '$lib/api.js';\n  import { apiStore, isLoading, currentError, clearErrors } from '@200systems/mf-sveltekit-adapter/client';\n  import { goto } from '$app/navigation';\n\n  let form = $state({\n    name: '',\n    email: '',\n    password: ''\n  });\n\n  async function handleSubmit() {\n    try {\n      clearErrors();\n      apiStore.setLoading(true);\n      \n      const user = await apiClient.post('/users', form);\n      goto('/users');\n    } catch (error) {\n      apiStore.setError((error as Error).message);\n    }\n  }\n</script>\n\n<form onsubmit|preventDefault={handleSubmit}>\n  <input bind:value={form.name} placeholder=\"Nome\" required />\n  <input bind:value={form.email} type=\"email\" placeholder=\"Email\" required />\n  <input bind:value={form.password} type=\"password\" placeholder=\"Senha\" required />\n  \n  {#if $currentError}\n    <div class=\"error\">{$currentError}</div>\n  {/if}\n  \n  <button type=\"submit\" disabled={$isLoading}>\n    {$isLoading ? 'Criando...' : 'Criar Usuário'}\n  </button>\n</form>\n```\n\n### Proteção de Rotas\n\n```typescript\n// src/routes/dashboard/+layout.server.ts\nimport { redirect } from '@sveltejs/kit';\n\nexport async function load({ locals }) {\n  // O hook de auth já validou o token\n  // Se chegou aqui, o usuário está autenticado\n  \n  if (!locals.authToken) {\n    throw redirect(302, '/login');\n  }\n  \n  return {\n    authToken: locals.authToken\n  };\n}\n```\n\n## Integração com Express API\n\nEste adapter foi projetado para funcionar perfeitamente com `@200systems/mf-express-adapter`:\n\n```typescript\n// O ApiClient automaticamente lida com:\n// - Tokens JWT no formato Bearer\n// - Respostas padronizadas da API Express\n// - Error handling consistente\n// - Retry logic para falhas de rede\n// - Timeout handling\n\n// Exemplo de resposta esperada da API Express:\ninterface ApiResponse<T> {\n  success: boolean;\n  data?: T;\n  error?: string;\n  message?: string;\n}\n```\n\n## Suporte a TypeScript\n\nSuporte completo ao TypeScript com tipagem estrita:\n\n```typescript\ninterface User {\n  id: number;\n  name: string;\n  email: string;\n  role: 'admin' | 'user';\n}\n\n// Chamadas de API tipadas\nconst users = await apiClient.get<User[]>('/users');\nconst user = await apiClient.post<User>('/users', userData);\n\n// Stores tipados\nconst currentUser: Readable<User | null> = derived(\n  authStore,\n  $auth => $auth.user as User\n);\n```\n\n## Características Específicas\n\n### Gerenciamento de Token Automático\n\n- **Persistência**: Tokens são automaticamente salvos no `localStorage`\n```typescript\n// Automático quando você faz login\nauthStore.login(user, token); // Token é salvo no localStorage\napiClient.setToken(token);    // Cliente configurado automaticamente\n```\n\n- **Restauração**: Tokens são restaurados na inicialização da aplicação\n```typescript\n// No +layout.svelte\nonMount(() => {\n  initializeStores(); // Carrega token do localStorage automaticamente\n  \n  const auth = $authStore;\n  if (auth.token) {\n    apiClient.setToken(auth.token); // Cliente pronto para usar\n  }\n});\n```\n\n- **Limpeza**: Tokens são removidos no logout ou erro 401\n```typescript\n// Logout manual\nauthStore.logout(); // Remove do localStorage + limpa store\n\n// Logout automático em 401\nawait apiClient.get('/protected'); // Se retornar 401, token é limpo automaticamente\n```\n\n- **Sincronização**: ApiClient e stores sincronizam automaticamente\n```typescript\n// Sincronização bidirecional\nauthStore.login(user, token);  // ✅ Store + localStorage atualizados\napiClient.setToken(token);     // ✅ Cliente configurado\n\napiClient.clearToken();        // ✅ Cliente limpo\nauthStore.logout();            // ✅ Store + localStorage limpos\n```\n\n### Error Handling Inteligente\n\n- **Retry automático**: Para erros de rede (não para 4xx)\n```typescript\n// Retry automático para erros de rede\nawait apiClient.get('/flaky-endpoint'); // Retry 3x automaticamente\n\n// Retry customizado\nawait apiClient.requestWithRetry('/critical-data', {}, 5); // Retry 5x\n```\n\n- **Exponential backoff**: Delay crescente entre tentativas\n```typescript\n// Delays automáticos: 1s, 2s, 4s, 8s...\ntry {\n  await apiClient.get('/unstable-api');\n} catch (error) {\n  // Só falha após todas as tentativas com delays crescentes\n}\n```\n\n- **401 handling**: Logout automático em tokens expirados\n```typescript\ntry {\n  await apiClient.get('/protected');\n} catch (error) {\n  // Se 401: token é limpo automaticamente + store atualizado\n  if (error.message === 'Authentication required') {\n    // Usuário já foi deslogado automaticamente\n    goto('/login');\n  }\n}\n```\n\n- **Error stores**: Centralização de erros em stores reativos\n```typescript\n// Qualquer erro fica disponível reativamentenos stores\napiStore.setError('API failed');\nauthStore.setError('Login failed');\n\n// Em qualquer componente\n{#if $currentError}\n  <div class=\"error\">{$currentError}</div>\n{/if}\n```\n\n### Logging Estruturado\n\n- **Request/Response**: Log automático com timing\n```typescript\n// Configuração no hooks.server.ts\nconst loggerHook = createLoggerHook({\n  logRequests: true,   // GET /api/users [timing: 245ms]\n  logResponses: true   // GET /api/users 200 OK [duration: 245ms]\n});\n\n// Logs automáticos no console/arquivo\n// INFO: Incoming request { method: 'GET', url: '/api/users', duration: 245 }\n```\n\n- **Context preservation**: Mantém contexto através da aplicação\n```typescript\n// Contexto propagado automaticamente\nconst logger = createLogger().child('user-service');\n// user-service: Processing user creation\n// user-service: Database query completed\n// user-service: User created successfully\n```\n\n- **Structured data**: Logs estruturados com metadados\n```typescript\n// Metadados automáticos em cada log\nlogger.info('User login', {\n  userId: 123,\n  ip: '192.168.1.1',\n  userAgent: 'Chrome/120.0',\n  timestamp: '2024-01-15T10:30:00Z',\n  requestId: 'req_abc123'\n});\n```\n\n- **Performance tracking**: Tracking de performance automático\n```typescript\n// Timing automático de requests\nconst startTime = Date.now();\nawait apiClient.get('/heavy-endpoint');\n// Log: Request completed { duration: 1247ms, status: 200 }\n\n// Timing de hooks\n// Log: Request processed { url: '/dashboard', duration: 89ms }\n```\n\n## Melhores Práticas\n\n1. **Inicialize stores cedo** no ciclo de vida da aplicação\n2. **Use stores reativas** em vez de gerenciamento manual de estado\n3. **Configure hooks apropriadamente** para as necessidades da sua aplicação\n4. **Use TypeScript** para melhor experiência de desenvolvimento\n5. **Trate erros graciosamente** com os error stores\n6. **Configure paths públicos** no hook de autenticação\n7. **Use retry mechanism** para endpoints instáveis\n\n## Compatibilidade\n\n- **Svelte 5.x** com runes support\n- **SvelteKit 2.x** com app directory structure\n- **Node.js 18+** para funcionalidades de servidor\n- **TypeScript 5.x** para tipagem completa\n\n## Dependencies\n\n### Required\n- `@200systems/mf-logger` - Sistema de logging\n\n### Peer Dependencies  \n- `@sveltejs/kit` - SvelteKit framework (^2.0.0)\n- `svelte` - Svelte framework (^5.0.0)\n\n## License\n\nMIT","readmeFilename":"README.md"}