{"_id":"@dloizides/pwa-sw","_rev":"8-82d5eead5cf332a5a676475766522f0c","name":"@dloizides/pwa-sw","dist-tags":{"latest":"1.6.0"},"versions":{"1.0.1":{"name":"@dloizides/pwa-sw","version":"1.0.1","keywords":["pwa","service-worker","network-first","cache","manifest"],"author":{"name":"dloizides"},"license":"MIT","_id":"@dloizides/pwa-sw@1.0.1","maintainers":[{"name":"dloizides","email":"loizidesdemetris@gmail.com"}],"homepage":"https://github.com/openmindednewby/pwa-sw#readme","bugs":{"url":"https://github.com/openmindednewby/pwa-sw/issues"},"bin":{"pwa-sw-gen":"dist/cli.js"},"dist":{"shasum":"28a71138ad1ea84f656be346c29b35ea1c95b893","tarball":"https://registry.npmjs.org/@dloizides/pwa-sw/-/pwa-sw-1.0.1.tgz","fileCount":16,"integrity":"sha512-IzoCZEEUck7Sh1cfEgMW2lvAKwXL1upXXhwZ99gEtWWOa0Cdua1aThui6BbpvtvxEOOlJlSELRlp0MkZ68Q/Gg==","signatures":[{"sig":"MEQCIF5IPmapi5Nz/sJyvXxQ+I8C7fAHheTDAzP9OQHaKm9GAiB5Tf/IqL5o3jeCmim6IYWxjb1JWNuZ1HsXDoJHa74DzA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":138216},"main":"./dist/index.js","types":"./dist/index.d.ts","module":"./dist/index.mjs","engines":{"node":">=18.0.0"},"exports":{".":{"import":{"types":"./dist/index.d.mts","default":"./dist/index.mjs"},"require":{"types":"./dist/index.d.ts","default":"./dist/index.js"}}},"gitHead":"766028c05aa3f14d4410973ce23c99365b3f0704","scripts":{"lint":"eslint src --ext .ts","test":"jest","build":"rimraf dist && tsup","clean":"rimraf dist","version":"npm run build","lint:fix":"eslint src --ext .ts --fix","typecheck":"tsc --noEmit","test:watch":"jest --watch","build:watch":"tsup --watch","deps:health":"npm run deps:outdated && npm run deps:unused","deps:unused":"npx depcheck --ignores \"@types/jest,@types/node,rimraf,size-limit,@size-limit/preset-small-lib\"","postversion":"git push && git push --tags","deps:licenses":"npx license-checker --onlyAllow \"MIT;Apache-2.0;ISC;BSD-2-Clause;BSD-3-Clause;0BSD;Unlicense;CC0-1.0\"","deps:outdated":"npm outdated || exit 0","test:coverage":"jest --coverage","prepublishOnly":"npm run clean && npm run build && npm run test","security:audit":"npm audit --audit-level=high"},"_npmUser":{"name":"dloizides","email":"loizidesdemetris@gmail.com"},"repository":{"url":"git+https://github.com/openmindednewby/pwa-sw.git","type":"git"},"_npmVersion":"10.9.3","description":"Config-driven PWA service worker generator + manifest builder. Ships the fixed network-first (v2) caching strategy with a versioned cache and a purge-on-publish message handler.","directories":{},"sideEffects":false,"_nodeVersion":"22.18.0","_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0","tsup":"^8.0.0","eslint":"^8.57.0","rimraf":"^5.0.0","ts-jest":"^29.1.0","typescript":"^5.4.0","@types/jest":"^29.5.0","@types/node":"^20.19.32","eslint-plugin-sonarjs":"^3.0.6","@typescript-eslint/parser":"^7.0.0","@typescript-eslint/eslint-plugin":"^7.0.0"},"_npmOperationalInternal":{"tmp":"tmp/pwa-sw_1.0.1_1781444795468_0.7185389584163719","host":"s3://npm-registry-packages-npm-production"}},"1.0.2":{"name":"@dloizides/pwa-sw","version":"1.0.2","keywords":["pwa","service-worker","network-first","cache","manifest"],"author":{"name":"dloizides"},"license":"MIT","_id":"@dloizides/pwa-sw@1.0.2","maintainers":[{"name":"dloizides","email":"loizidesdemetris@gmail.com"}],"homepage":"https://github.com/openmindednewby/pwa-sw#readme","bugs":{"url":"https://github.com/openmindednewby/pwa-sw/issues"},"bin":{"pwa-sw-gen":"dist/cli.js"},"dist":{"shasum":"0689dd3502a0f7302357e028e2627a272609fe3a","tarball":"https://registry.npmjs.org/@dloizides/pwa-sw/-/pwa-sw-1.0.2.tgz","fileCount":16,"integrity":"sha512-Rn1JVtkFgtwwP/54LitgzPVFvR9ZgeKrdrXC33z2/zrV3GWcPB5P51jFnUapvvy9fROZH8b0bwu6AaX7IVPP5g==","signatures":[{"sig":"MEUCIQCn86pa4Xid2fMm/6GXjfBfGP5i3w9AmK7UOG+yuqmYYwIgfSULxeuB0OOPPRecBBI+RInNGqBP8ET6rAylXGYyjec=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":142596},"main":"./dist/index.js","types":"./dist/index.d.ts","module":"./dist/index.mjs","engines":{"node":">=18.0.0"},"exports":{".":{"import":{"types":"./dist/index.d.mts","default":"./dist/index.mjs"},"require":{"types":"./dist/index.d.ts","default":"./dist/index.js"}}},"gitHead":"25ba82ea1dadc385855633722d82efaeccd3f6f3","scripts":{"lint":"eslint src --ext .ts","test":"jest","build":"rimraf dist && tsup","clean":"rimraf dist","version":"npm run build","lint:fix":"eslint src --ext .ts --fix","typecheck":"tsc --noEmit","test:watch":"jest --watch","build:watch":"tsup --watch","deps:health":"npm run deps:outdated && npm run deps:unused","deps:unused":"npx depcheck --ignores \"@types/jest,@types/node,rimraf,size-limit,@size-limit/preset-small-lib\"","postversion":"git push && git push --tags","deps:licenses":"npx license-checker --onlyAllow \"MIT;Apache-2.0;ISC;BSD-2-Clause;BSD-3-Clause;0BSD;Unlicense;CC0-1.0\"","deps:outdated":"npm outdated || exit 0","test:coverage":"jest --coverage","prepublishOnly":"npm run clean && npm run build && npm run test","security:audit":"npm audit --audit-level=high"},"_npmUser":{"name":"dloizides","email":"loizidesdemetris@gmail.com"},"repository":{"url":"git+https://github.com/openmindednewby/pwa-sw.git","type":"git"},"_npmVersion":"10.9.3","description":"Config-driven PWA service worker generator + manifest builder. Ships the fixed network-first (v2) caching strategy with a versioned cache and a purge-on-publish message handler.","directories":{},"sideEffects":false,"_nodeVersion":"22.18.0","_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0","tsup":"^8.0.0","eslint":"^8.57.0","rimraf":"^5.0.0","ts-jest":"^29.1.0","typescript":"^5.4.0","@types/jest":"^29.5.0","@types/node":"^20.19.32","eslint-plugin-sonarjs":"^3.0.6","@typescript-eslint/parser":"^7.0.0","@typescript-eslint/eslint-plugin":"^7.0.0"},"_npmOperationalInternal":{"tmp":"tmp/pwa-sw_1.0.2_1786284346427_0.7792395698622272","host":"s3://npm-registry-packages-npm-production"}},"1.1.1":{"name":"@dloizides/pwa-sw","version":"1.1.1","keywords":["pwa","service-worker","network-first","cache","manifest"],"author":{"name":"dloizides"},"license":"MIT","_id":"@dloizides/pwa-sw@1.1.1","maintainers":[{"name":"dloizides","email":"loizidesdemetris@gmail.com"}],"homepage":"https://github.com/openmindednewby/pwa-sw#readme","bugs":{"url":"https://github.com/openmindednewby/pwa-sw/issues"},"bin":{"pwa-sw-gen":"dist/cli.js"},"dist":{"shasum":"4cdf89094a63b9c1a6e611bc3807233cc019b226","tarball":"https://registry.npmjs.org/@dloizides/pwa-sw/-/pwa-sw-1.1.1.tgz","fileCount":16,"integrity":"sha512-NO7riGuT4JJzdw0QNyNVvyWtzBeOS/g9dotIdI0m2n7pN5gNY7UxDfDLxRVIqC6Jnk6scUfhsXNeSudrVKXguw==","signatures":[{"sig":"MEUCIQDDjS1tbcvujYWqVQLrStDFBKisOo3Equu5LkaBpLsveAIgLvIx6a7/KGE3RSaiS7rgkq4PHtm3AWVDO33TnUMJlUU=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":206384},"main":"./dist/index.js","types":"./dist/index.d.ts","module":"./dist/index.mjs","engines":{"node":">=18.0.0"},"exports":{".":{"import":{"types":"./dist/index.d.mts","default":"./dist/index.mjs"},"require":{"types":"./dist/index.d.ts","default":"./dist/index.js"}}},"gitHead":"713d684c22941da0b0d5785750c5f1633badd1b6","scripts":{"lint":"eslint src --ext .ts","test":"jest","build":"rimraf dist && tsup","clean":"rimraf dist","version":"npm run build","lint:fix":"eslint src --ext .ts --fix","typecheck":"tsc --noEmit","test:watch":"jest --watch","build:watch":"tsup --watch","deps:health":"npm run deps:outdated && npm run deps:unused","deps:unused":"npx depcheck --ignores \"@types/jest,@types/node,rimraf,size-limit,@size-limit/preset-small-lib\"","postversion":"git push && git push --tags","deps:licenses":"npx license-checker --onlyAllow \"MIT;Apache-2.0;ISC;BSD-2-Clause;BSD-3-Clause;0BSD;Unlicense;CC0-1.0\"","deps:outdated":"npm outdated || exit 0","test:coverage":"jest --coverage","prepublishOnly":"npm run clean && npm run build && npm run test","security:audit":"npm audit --audit-level=high"},"_npmUser":{"name":"dloizides","email":"loizidesdemetris@gmail.com"},"repository":{"url":"git+https://github.com/openmindednewby/pwa-sw.git","type":"git"},"_npmVersion":"10.9.3","description":"Config-driven PWA service worker generator + manifest builder. Ships the fixed network-first (v2) caching strategy with a versioned cache and a purge-on-publish message handler.","directories":{},"sideEffects":false,"_nodeVersion":"22.18.0","_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0","tsup":"^8.0.0","eslint":"^8.57.0","rimraf":"^5.0.0","ts-jest":"^29.1.0","typescript":"^5.4.0","@types/jest":"^29.5.0","@types/node":"^20.19.32","eslint-plugin-sonarjs":"^3.0.6","@typescript-eslint/parser":"^7.0.0","@typescript-eslint/eslint-plugin":"^7.0.0"},"_npmOperationalInternal":{"tmp":"tmp/pwa-sw_1.1.1_1786382312149_0.5864455571469087","host":"s3://npm-registry-packages-npm-production"}},"1.2.0":{"name":"@dloizides/pwa-sw","version":"1.2.0","keywords":["pwa","service-worker","network-first","cache","manifest"],"author":{"name":"dloizides"},"license":"MIT","_id":"@dloizides/pwa-sw@1.2.0","maintainers":[{"name":"dloizides","email":"loizidesdemetris@gmail.com"}],"homepage":"https://github.com/openmindednewby/pwa-sw#readme","bugs":{"url":"https://github.com/openmindednewby/pwa-sw/issues"},"bin":{"pwa-sw-gen":"dist/cli.js"},"dist":{"shasum":"cb80da0e0e2d7d4d5fc8ce40e92644a3baf8ea82","tarball":"https://registry.npmjs.org/@dloizides/pwa-sw/-/pwa-sw-1.2.0.tgz","fileCount":16,"integrity":"sha512-2wU2Vd3hQz51gJI9GMtDC7SMcyza1CUq1jQX/jk8qUBnHEtQiRSJc6EfwuKxBbeHGRZYaOQacpw6qQo1KFp3IQ==","signatures":[{"sig":"MEYCIQCTGxC2nmema9KyTa/VUNsV7v2uAoaVhDHr1CYknq0KbgIhAMxkZT5P+FbIZG1hebUK6pZaoFiPVtTIH2edcWBszEqA","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":219432},"main":"./dist/index.js","types":"./dist/index.d.ts","module":"./dist/index.mjs","engines":{"node":">=18.0.0"},"exports":{".":{"import":{"types":"./dist/index.d.mts","default":"./dist/index.mjs"},"require":{"types":"./dist/index.d.ts","default":"./dist/index.js"}}},"gitHead":"f9f84d9ba78f724bb8fa6e22b8621b9ac54ff56c","scripts":{"lint":"eslint src --ext .ts","test":"jest","build":"rimraf dist && tsup","clean":"rimraf dist","version":"npm run build","lint:fix":"eslint src --ext .ts --fix","typecheck":"tsc --noEmit","test:watch":"jest --watch","build:watch":"tsup --watch","deps:health":"npm run deps:outdated && npm run deps:unused","deps:unused":"npx depcheck --ignores \"@types/jest,@types/node,rimraf,size-limit,@size-limit/preset-small-lib\"","postversion":"git push && git push --tags","deps:licenses":"npx license-checker --onlyAllow \"MIT;Apache-2.0;ISC;BSD-2-Clause;BSD-3-Clause;0BSD;Unlicense;CC0-1.0\"","deps:outdated":"npm outdated || exit 0","test:coverage":"jest --coverage","prepublishOnly":"npm run clean && npm run build && npm run test","security:audit":"npm audit --audit-level=high"},"_npmUser":{"name":"dloizides","email":"loizidesdemetris@gmail.com"},"repository":{"url":"git+https://github.com/openmindednewby/pwa-sw.git","type":"git"},"_npmVersion":"10.9.3","description":"Config-driven PWA service worker generator + manifest builder. Ships the fixed network-first (v2) caching strategy with a versioned cache and a purge-on-publish message handler.","directories":{},"sideEffects":false,"_nodeVersion":"22.18.0","_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0","tsup":"^8.0.0","eslint":"^8.57.0","rimraf":"^5.0.0","ts-jest":"^29.1.0","typescript":"^5.4.0","@types/jest":"^29.5.0","@types/node":"^20.19.32","eslint-plugin-sonarjs":"^3.0.6","@typescript-eslint/parser":"^7.0.0","@typescript-eslint/eslint-plugin":"^7.0.0"},"_npmOperationalInternal":{"tmp":"tmp/pwa-sw_1.2.0_1786431544074_0.7193739349628832","host":"s3://npm-registry-packages-npm-production"}},"1.3.0":{"name":"@dloizides/pwa-sw","version":"1.3.0","keywords":["pwa","service-worker","network-first","cache","manifest"],"author":{"name":"dloizides"},"license":"MIT","_id":"@dloizides/pwa-sw@1.3.0","maintainers":[{"name":"dloizides","email":"loizidesdemetris@gmail.com"}],"homepage":"https://github.com/openmindednewby/pwa-sw#readme","bugs":{"url":"https://github.com/openmindednewby/pwa-sw/issues"},"bin":{"pwa-sw-gen":"dist/cli.js"},"dist":{"shasum":"c3c2df26045057b331eb8e1ffce768a493f5109e","tarball":"https://registry.npmjs.org/@dloizides/pwa-sw/-/pwa-sw-1.3.0.tgz","fileCount":16,"integrity":"sha512-69gZ+kGtupBFRTAxnc5fVYcK3uUX2fCHW4/XSLRNVH5/3FIAcVd1sf0GTa542vUfUn58oFxUnWZeahT9h82QSA==","signatures":[{"sig":"MEUCIQCg/G18EJ96SpXLkAlBfcZqBMWOjFU8tUbunyA0vk1PywIgW3fnmxQxxHRz095NSYV7I8mF5ZbBObqAUjx0PuBM8Ng=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":221514},"main":"./dist/index.js","types":"./dist/index.d.ts","module":"./dist/index.mjs","engines":{"node":">=18.0.0"},"exports":{".":{"import":{"types":"./dist/index.d.mts","default":"./dist/index.mjs"},"require":{"types":"./dist/index.d.ts","default":"./dist/index.js"}}},"gitHead":"003a206b047b0d5f63add30d1129ff3490a5aba5","scripts":{"lint":"eslint src --ext .ts","test":"jest","build":"rimraf dist && tsup","clean":"rimraf dist","version":"npm run build","lint:fix":"eslint src --ext .ts --fix","typecheck":"tsc --noEmit","test:watch":"jest --watch","build:watch":"tsup --watch","deps:health":"npm run deps:outdated && npm run deps:unused","deps:unused":"npx depcheck --ignores \"@types/jest,@types/node,rimraf,size-limit,@size-limit/preset-small-lib\"","postversion":"git push && git push --tags","deps:licenses":"npx license-checker --onlyAllow \"MIT;Apache-2.0;ISC;BSD-2-Clause;BSD-3-Clause;0BSD;Unlicense;CC0-1.0\"","deps:outdated":"npm outdated || exit 0","test:coverage":"jest --coverage","prepublishOnly":"npm run clean && npm run build && npm run test","security:audit":"npm audit --audit-level=high"},"_npmUser":{"name":"dloizides","email":"loizidesdemetris@gmail.com"},"repository":{"url":"git+https://github.com/openmindednewby/pwa-sw.git","type":"git"},"_npmVersion":"10.9.3","description":"Config-driven PWA service worker generator + manifest builder. Ships the fixed network-first (v2) caching strategy with a versioned cache and a purge-on-publish message handler.","directories":{},"sideEffects":false,"_nodeVersion":"22.18.0","_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0","tsup":"^8.0.0","eslint":"^8.57.0","rimraf":"^5.0.0","ts-jest":"^29.1.0","typescript":"^5.4.0","@types/jest":"^29.5.0","@types/node":"^20.19.32","eslint-plugin-sonarjs":"^4.2.0","@typescript-eslint/parser":"^7.0.0","@typescript-eslint/eslint-plugin":"^7.0.0"},"_npmOperationalInternal":{"tmp":"tmp/pwa-sw_1.3.0_1787966813312_0.5414594869639493","host":"s3://npm-registry-packages-npm-production"}},"1.4.0":{"name":"@dloizides/pwa-sw","version":"1.4.0","keywords":["pwa","service-worker","network-first","cache","manifest"],"author":{"name":"dloizides"},"license":"MIT","_id":"@dloizides/pwa-sw@1.4.0","maintainers":[{"name":"dloizides","email":"loizidesdemetris@gmail.com"}],"homepage":"https://github.com/openmindednewby/pwa-sw#readme","bugs":{"url":"https://github.com/openmindednewby/pwa-sw/issues"},"bin":{"pwa-sw-gen":"dist/cli.js"},"dist":{"shasum":"28695e9a666b5562c3d7fe2843c7fc931c4cb731","tarball":"https://registry.npmjs.org/@dloizides/pwa-sw/-/pwa-sw-1.4.0.tgz","fileCount":16,"integrity":"sha512-i2XlaeBDcLbSoM9Y5sTDFalczrQHDFZ3mgLbrPeh/eKGaRJnKyQRUoaEgM39kG6aB8mh/vInFT9dyQV4pGreSA==","signatures":[{"sig":"MEQCIDhLlmRMq4CZ2p3uCBxXs7QS/d51cLUuf48c5DY9HQHuAiAfgbe7mSJPJNRk41XZNsd8JEMhISG2e3NcKJL6TWdyYA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEYCIQDGi4VWdlhiA2M8TW1HxSMn8QtGS7BdRzq1TkWE+NvyPQIhAKAwGnCKwGdXlwiJsmCs4T4n9ugVy0EvjztsmqTNOZur","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":328437},"main":"./dist/index.js","types":"./dist/index.d.ts","module":"./dist/index.mjs","engines":{"node":">=18.0.0"},"exports":{".":{"import":{"types":"./dist/index.d.mts","default":"./dist/index.mjs"},"require":{"types":"./dist/index.d.ts","default":"./dist/index.js"}}},"gitHead":"ffaed325206f27b6d7aff6e40deaa8f07d800892","scripts":{"lint":"eslint src --ext .ts","test":"jest","build":"rimraf dist && tsup","clean":"rimraf dist","version":"npm run build","lint:fix":"eslint src --ext .ts --fix","typecheck":"tsc --noEmit","test:watch":"jest --watch","build:watch":"tsup --watch","deps:health":"npm run deps:outdated && npm run deps:unused","deps:unused":"npx depcheck --ignores \"@types/jest,@types/node,rimraf,size-limit,@size-limit/preset-small-lib\"","postversion":"git push && git push --tags","deps:licenses":"npx license-checker --onlyAllow \"MIT;Apache-2.0;ISC;BSD-2-Clause;BSD-3-Clause;0BSD;Unlicense;CC0-1.0\"","deps:outdated":"npm outdated || exit 0","test:coverage":"jest --coverage","prepublishOnly":"npm run clean && npm run build && npm run test","security:audit":"npm audit --audit-level=high"},"_npmUser":{"name":"dloizides","email":"loizidesdemetris@gmail.com"},"repository":{"url":"git+https://github.com/openmindednewby/pwa-sw.git","type":"git"},"_npmVersion":"10.9.3","description":"Config-driven PWA service worker generator + manifest builder. Ships the fixed network-first (v2) caching strategy with a versioned cache and a purge-on-publish message handler.","directories":{},"sideEffects":false,"_nodeVersion":"22.18.0","_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0","tsup":"^8.0.0","eslint":"^8.57.0","rimraf":"^5.0.0","ts-jest":"^29.1.0","typescript":"^5.4.0","@types/jest":"^29.5.0","@types/node":"^20.19.32","eslint-plugin-sonarjs":"^4.2.0","@typescript-eslint/parser":"^7.0.0","@typescript-eslint/eslint-plugin":"^7.0.0"},"_npmOperationalInternal":{"tmp":"tmp/pwa-sw_1.4.0_1790762382344_0.020118959524294988","host":"s3://npm-registry-packages-npm-production"}},"1.5.0":{"name":"@dloizides/pwa-sw","version":"1.5.0","keywords":["pwa","service-worker","network-first","cache","manifest"],"author":{"name":"dloizides"},"license":"MIT","_id":"@dloizides/pwa-sw@1.5.0","maintainers":[{"name":"dloizides","email":"loizidesdemetris@gmail.com"}],"homepage":"https://github.com/openmindednewby/pwa-sw#readme","bugs":{"url":"https://github.com/openmindednewby/pwa-sw/issues"},"bin":{"pwa-sw-gen":"dist/cli.js"},"dist":{"shasum":"facf8f4628e37d55a66db096959f06ad4ed637f6","tarball":"https://registry.npmjs.org/@dloizides/pwa-sw/-/pwa-sw-1.5.0.tgz","fileCount":16,"integrity":"sha512-pjsUdwIqETJfJMxUxn7m9PovrDV46JTV5An7UjuEA0t9m2bi/UcL0KDrgHnoNY4SMrQ93xEAq6uPikPEc/k+VA==","signatures":[{"sig":"MEQCIBMAbOcrghrfa1IDf1VgkoBysUnczD1q2yLqCR7MbGswAiBtK7o7O20CDVWUQDEbpUzYYJ2GMMJ0QeEoV4B70lBGIg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEUCIQDTR6Fbdq5KcMnNMb/Ie/SixgxeGlqA/RSj149DoJyHIQIgTzqAMGliD0/YxreyNsSApAeqW1pnt0Q5nyY+lJyTDIQ=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":362478},"main":"./dist/index.js","types":"./dist/index.d.ts","module":"./dist/index.mjs","engines":{"node":">=18.0.0"},"exports":{".":{"import":{"types":"./dist/index.d.mts","default":"./dist/index.mjs"},"require":{"types":"./dist/index.d.ts","default":"./dist/index.js"}}},"gitHead":"c34b961c050be5c3bb10253282bc55206ed49760","scripts":{"lint":"eslint src --ext .ts","test":"jest","build":"rimraf dist && tsup","clean":"rimraf dist","version":"npm run build","lint:fix":"eslint src --ext .ts --fix","typecheck":"tsc --noEmit","test:watch":"jest --watch","build:watch":"tsup --watch","deps:health":"npm run deps:outdated && npm run deps:unused","deps:unused":"npx depcheck --ignores \"@types/jest,@types/node,rimraf,size-limit,@size-limit/preset-small-lib\"","postversion":"git push && git push --tags","deps:licenses":"npx license-checker --onlyAllow \"MIT;Apache-2.0;ISC;BSD-2-Clause;BSD-3-Clause;0BSD;Unlicense;CC0-1.0\"","deps:outdated":"npm outdated || exit 0","test:coverage":"jest --coverage","prepublishOnly":"npm run clean && npm run build && npm run test","security:audit":"npm audit --audit-level=high"},"_npmUser":{"name":"dloizides","email":"loizidesdemetris@gmail.com"},"repository":{"url":"git+https://github.com/openmindednewby/pwa-sw.git","type":"git"},"_npmVersion":"10.9.3","description":"Config-driven PWA service worker generator + manifest builder. Ships the fixed network-first (v2) caching strategy with a versioned cache and a purge-on-publish message handler.","directories":{},"sideEffects":false,"_nodeVersion":"22.18.0","_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0","tsup":"^8.0.0","eslint":"^8.57.0","rimraf":"^5.0.0","ts-jest":"^29.1.0","typescript":"^5.4.0","@types/jest":"^29.5.0","@types/node":"^20.19.32","eslint-plugin-sonarjs":"^4.2.0","@typescript-eslint/parser":"^7.0.0","@typescript-eslint/eslint-plugin":"^7.0.0"},"_npmOperationalInternal":{"tmp":"tmp/pwa-sw_1.5.0_1790763303084_0.6952197808031426","host":"s3://npm-registry-packages-npm-production"}},"1.6.0":{"_id":"@dloizides/pwa-sw@1.6.0","bin":{"pwa-sw-gen":"dist/cli.js"},"bugs":{"url":"https://github.com/openmindednewby/pwa-sw/issues"},"dist":{"shasum":"d9c8e161683a990993160a0ecda58bdd595900fb","tarball":"https://registry.npmjs.org/@dloizides/pwa-sw/-/pwa-sw-1.6.0.tgz","fileCount":16,"integrity":"sha512-TOGCRyWIEh4tN8j+/JQ7X4o7bJWrxQvN4G895+bloaj6TfOmrFnuwIAJkqelucfPxuj4kgvicYuc2SzNWdpKYw==","signatures":[{"sig":"MEYCIQC3XDwywb+fpPD8He3eooEWAQchSdobDkJukKVxd4/0mgIhAJ2aG51r2fFIilnfRXaTGAuGE5Bpxuhuc7w2qLNZTNjR","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIEA3haf35cVc/Io2bcMtQJ/PaSoO5sn/1q7tnC0FTj0HAiAxXcKEDrEitd45IDwUEMXwKeAe/pYnNs9iRrhGgj4Ybg=="}],"unpackedSize":370787},"main":"./dist/index.js","name":"@dloizides/pwa-sw","types":"./dist/index.d.ts","author":{"name":"dloizides"},"module":"./dist/index.mjs","engines":{"node":">=18.0.0"},"exports":{".":{"import":{"types":"./dist/index.d.mts","default":"./dist/index.mjs"},"require":{"types":"./dist/index.d.ts","default":"./dist/index.js"}}},"gitHead":"f3d850c5d9fd65761614879e4b7ef9829e40e9a6","license":"MIT","scripts":{"lint":"eslint src --ext .ts","test":"jest","build":"rimraf dist && tsup","clean":"rimraf dist","version":"npm run build","lint:fix":"eslint src --ext .ts --fix","typecheck":"tsc --noEmit","test:watch":"jest --watch","build:watch":"tsup --watch","deps:health":"npm run deps:outdated && npm run deps:unused","deps:unused":"npx depcheck --ignores \"@types/jest,@types/node,rimraf,size-limit,@size-limit/preset-small-lib\"","postversion":"git push && git push --tags","deps:licenses":"npx license-checker --onlyAllow \"MIT;Apache-2.0;ISC;BSD-2-Clause;BSD-3-Clause;0BSD;Unlicense;CC0-1.0\"","deps:outdated":"npm outdated || exit 0","test:coverage":"jest --coverage","prepublishOnly":"npm run clean && npm run build && npm run test","security:audit":"npm audit --audit-level=high"},"version":"1.6.0","_npmUser":{"name":"dloizides","email":"loizidesdemetris@gmail.com"},"homepage":"https://github.com/openmindednewby/pwa-sw#readme","keywords":["pwa","service-worker","network-first","cache","manifest"],"repository":{"url":"git+https://github.com/openmindednewby/pwa-sw.git","type":"git"},"_npmVersion":"10.9.3","description":"Config-driven PWA service worker generator + manifest builder. Ships the fixed network-first (v2) caching strategy with a versioned cache and a purge-on-publish message handler.","directories":{},"maintainers":[{"name":"dloizides","email":"loizidesdemetris@gmail.com"}],"sideEffects":false,"_nodeVersion":"22.18.0","_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0","tsup":"^8.0.0","eslint":"^8.57.0","rimraf":"^5.0.0","ts-jest":"^29.1.0","typescript":"^5.4.0","@types/jest":"^29.5.0","@types/node":"^20.19.32","eslint-plugin-sonarjs":"^4.2.0","@typescript-eslint/parser":"^7.0.0","@typescript-eslint/eslint-plugin":"^7.0.0"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/pwa-sw_1.6.0_1790779589588_0.29718273146648655"}}},"time":{"created":"2026-06-14T13:46:35.262Z","modified":"2026-09-30T14:46:30.039Z","1.0.1":"2026-06-14T13:46:35.655Z","1.0.2":"2026-08-09T14:05:46.554Z","1.1.1":"2026-08-10T17:18:32.291Z","1.2.0":"2026-08-11T06:59:04.227Z","1.3.0":"2026-08-29T01:26:53.448Z","1.4.0":"2026-09-30T09:59:42.453Z","1.5.0":"2026-09-30T10:15:03.180Z","1.6.0":"2026-09-30T14:46:29.745Z"},"bugs":{"url":"https://github.com/openmindednewby/pwa-sw/issues"},"author":{"name":"dloizides"},"license":"MIT","homepage":"https://github.com/openmindednewby/pwa-sw#readme","keywords":["pwa","service-worker","network-first","cache","manifest"],"repository":{"url":"git+https://github.com/openmindednewby/pwa-sw.git","type":"git"},"description":"Config-driven PWA service worker generator + manifest builder. Ships the fixed network-first (v2) caching strategy with a versioned cache and a purge-on-publish message handler.","maintainers":[{"name":"dloizides","email":"loizidesdemetris@gmail.com"}],"readme":"# @dloizides/pwa-sw\r\n\r\nConfig-driven PWA **service worker generator** + **manifest builder**. Ships the\r\n*fixed* network-first caching strategy (versioned cache + purge-on-publish), so\r\nan edit/activation is reflected on the next public load instead of serving a\r\nday-old payload.\r\n\r\n## Why\r\n\r\nTwo app service workers drifted: one was network-first (correct), one was still\r\nstale-while-revalidate with a 24h max-age (served stale content). This package is\r\nthe single source of truth — each app supplies *config*, the package owns the\r\n*strategy*.\r\n\r\n| Package owns | App owns (config) |\r\n|---|---|\r\n| network-first / cache-first / network-only strategies | cache names + version strings |\r\n| versioned-cache cleanup on `activate` | which API paths are public (cacheable) |\r\n| `skipWaiting` + `clients.claim` | purge message type |\r\n| purge-on-publish message handler | static-asset extensions |\r\n| manifest assembly | manifest name / colors / icons |\r\n\r\n## Install\r\n\r\n```jsonc\r\n// dev (before publish): local file reference\r\n\"@dloizides/pwa-sw\": \"file:../NpmPackages/packages/pwa-sw\"\r\n// after publish:\r\n\"@dloizides/pwa-sw\": \"^1.0.0\"\r\n```\r\n\r\n## Usage — generate at build time (recommended)\r\n\r\n`pwa-sw.config.js` (CommonJS, lives in the app root):\r\n\r\n```js\r\nmodule.exports = {\r\n  serviceWorker: {\r\n    apiCacheName: 'public-survey-api-v2',     // bump the version to evict stale entries on deploy\r\n    staticCacheName: 'static-assets-v1',\r\n    publicApiPathMatchers: ['/public/surveys/', '/public/questioner/'],\r\n    purgeMessageType: 'PURGE_PUBLIC_CACHE',   // optional\r\n  },\r\n  manifest: {\r\n    name: 'Erevna',\r\n    shortName: 'Erevna',\r\n    description: 'Surveys and forms',\r\n    themeColor: '#008d5c',\r\n    icons: [{ src: '/icons/logo-192.png', sizes: '192x192', type: 'image/png', purpose: 'any' }],\r\n  },\r\n};\r\n```\r\n\r\n```jsonc\r\n// package.json\r\n\"scripts\": {\r\n  \"generate:sw\": \"pwa-sw-gen ./pwa-sw.config.js ./public\"\r\n}\r\n```\r\n\r\nRun `npm run generate:sw` → writes `public/service-worker.js` (and `public/manifest.json`\r\nif `manifest` is present). Commit the output or regenerate in a prebuild step.\r\n\r\n## Usage — programmatic\r\n\r\n```ts\r\nimport { generateServiceWorker, buildManifest } from '@dloizides/pwa-sw';\r\n\r\nconst swSource = generateServiceWorker({\r\n  apiCacheName: 'public-menu-api-v2',\r\n  staticCacheName: 'static-assets-v1',\r\n  publicApiPathMatchers: ['/public/menus/'],\r\n});\r\n\r\nconst manifest = buildManifest({ name: 'Katalogos', shortName: 'Katalogos', description: '…', themeColor: '#008d5c', icons: [...] });\r\n```\r\n\r\n## Freshness: every deploy reaches every player (1.4.0)\r\n\r\nThe generated worker never serves a previous build:\r\n\r\n| Request | Strategy |\r\n|---|---|\r\n| HTML (navigation, or `Accept: text/html`) | network-first; offline: cached copy, else the cached shell at `scope` |\r\n| Static asset WITHOUT a content hash in its filename (`hero.png`, `Build/game.wasm`) | network-first with `cache: 'no-cache'` (a 304 when unchanged); cache = offline fallback |\r\n| Content-hashed asset (`entry-5f3c9a1b.js`) | cache-first; its URL changes when its bytes do |\r\n| `service-worker.js`, `sw-register.js` | never intercepted |\r\n\r\nCaches are keyed by the per-build `BUILD_VERSION`; `activate` deletes every other build's\r\ncaches, then `skipWaiting` + `clients.claim` + the snippet's `controllerchange` reload hand an\r\nopen tab to the new build. Options: `freshUnhashedAssets` (default `true`), `hashedAssetPattern`\r\n(RegExp source, default `DEFAULT_HASHED_ASSET_PATTERN`), `unhashedPathMatchers`, `staticOnly`.\r\n\r\n**Zombie self-heal** (`selfHeal`, default = `reloadOnControllerChange`): after registering, the\r\nsnippet asks the controlling worker for its build (`PWA_SW_GET_VERSION`). If it still differs from\r\nthe page's build after `selfHealGraceMs` (default 10 s, which covers the normal hand-off), or the\r\nworker does not answer (a legacy hand-written SW), the snippet unregisters the workers whose scope\r\ncovers the page, deletes all caches and reloads ONCE. A `sessionStorage` key per page build\r\nprevents a loop. The page build is the stamped version, or `<meta name=\"pwa-build-version\">`.\r\n\r\n**Deferred reloads** (1.6.0): both reloads (the `controllerchange` hand-off and the self-heal)\r\ncall `(window.__gsWhenIdle || run)(reload)`. If the page defines `window.__gsWhenIdle(fn)` —\r\n`@dloizides/game-shell`'s `initGameShell` does — that function decides when `fn` runs, so an\r\nupdate never reloads a game mid-play. The snippet has no idle logic of its own; with no global it\r\nreloads immediately, exactly as before.\r\n\r\n**Retiring an old worker URL** (`retireWorkerUrls`, 1.5.0): moving from a hand-written worker at\r\n`/sw.js` to `/service-worker.js` strands returning players. The old worker keeps answering\r\nnavigations from its cache with the OLD page, which never loads `sw-register.js`, and a 404 on the\r\nbrowser's update check of `/sw.js` does NOT unregister it. Set\r\n`retireWorkerUrls: ['/sw.js']` and `pwa-sw-gen` writes a kill-switch worker to that path: on the\r\nnext update check it installs, skips waiting, deletes every cache, unregisters itself and navigates\r\neach window it controlled once, so the page reloads from the network and registers the new worker.\r\n\r\n- **The old URL must keep being served (200, never 404)** — deploy the generated file there for as\r\n  long as any player might still run the old worker (months, not days).\r\n- **Serve it with `Cache-Control: no-cache`**, like `service-worker.js`.\r\n- Each URL must be an absolute `.js` path inside `scope`, and not the live worker or\r\n  `sw-register.js` (the generator throws otherwise).\r\n\r\n## Adopting it in a game\r\n\r\n1. `npm i -D @dloizides/pwa-sw`, then `pwa-sw.config.js`:\r\n   ```js\r\n   const { unityWebGLPreset } = require('@dloizides/pwa-sw');\r\n   module.exports = { serviceWorker: unityWebGLPreset({ name: 'ghosty' }), manifest: { /* … */ } };\r\n   ```\r\n   Unity preset: `Build/*.wasm`, `*.data`, `*.framework.js`, `*.loader.js` (and `.br`/`.gz`/\r\n   `.unityweb` variants) and `TemplateData/*` are always revalidated. A non-Unity game passes\r\n   `staticOnly: true, publicApiPathMatchers: []` plus its own cache names.\r\n2. Build step: `PWA_BUILD_VERSION=$(git rev-parse --short HEAD) pwa-sw-gen ./pwa-sw.config.js <out-dir>`\r\n   (without it a timestamp is used; either way every build ships a byte-different worker).\r\n3. In the game's HTML: `<script src=\"/sw-register.js\" defer></script>`. Delete the old hand-written\r\n   worker file and its registration code. If the old worker lived at a DIFFERENT URL (e.g.\r\n   `/sw.js`), list it in `retireWorkerUrls` (see below) — self-heal alone cannot reach a player\r\n   whose old worker serves a cached page that never loads `sw-register.js`.\r\n4. nginx: `Cache-Control: no-cache` on `index.html`, `service-worker.js` and `sw-register.js`.\r\n5. **Do NOT also run `@dloizides/game-shell`'s `versionPoll`.** pwa-sw already detects the new\r\n   build and reloads the tab; two update mechanisms race each other and reload twice (or loop).\r\n\r\n## Registering the worker (app side)\r\n\r\n`pwa-sw-gen` also writes `sw-register.js` (registration + auto-update + self-heal); load it\r\nwith a `<script src>`. To evict the public cache mid-session (e.g. after a save),\r\npost the purge message to the controller:\r\n\r\n```ts\r\nnavigator.serviceWorker.controller?.postMessage({ type: 'PURGE_PUBLIC_CACHE', externalId });\r\n```\r\n\r\n## API\r\n\r\n- `generateServiceWorker(config: ServiceWorkerConfig): string`\r\n- `buildManifest(config: ManifestConfig): BuiltManifest`\r\n- `generateRegistration(config: ServiceWorkerConfig): string`\r\n- `unityWebGLPreset({ name, ...overrides }): ServiceWorkerConfig`\r\n- `resolveConfig`, `cachePrefix`, `DEFAULT_STATIC_EXTENSIONS`, `DEFAULT_PURGE_MESSAGE_TYPE`, `DEFAULT_HASHED_ASSET_PATTERN`\r\n\r\n## License\r\n\r\nMIT\r\n","readmeFilename":"README.md"}