{"_id":"@americanexpress/one-service-worker","_rev":"10-7da93b1bffffc74c9e5665e085b528e0","name":"@americanexpress/one-service-worker","dist-tags":{"latest":"1.0.4"},"versions":{"1.0.0":{"name":"@americanexpress/one-service-worker","version":"1.0.0","keywords":["sw","pwa","service worker","cache","offline","web-push","background-sync"],"license":"Apache-2.0","_id":"@americanexpress/one-service-worker@1.0.0","maintainers":[{"name":"francois.esquire","email":"michaeltobia@gmail.com"},{"name":"mtomcal","email":"michael@twoeyetech.com"},{"name":"jadshead","email":"jonny.adshead@gmail.com"},{"name":"william-mcmillian","email":"will.h.bishop@gmail.com"},{"name":"amexopensource","email":"open-source-ops@aexp.com"},{"name":"pixnbits","email":"i@pixnbits.org"},{"name":"jsmartfo","email":"j_smart_foster@hotmail.com"},{"name":"tklever","email":"tim.v.klever@aexp.com"},{"name":"bharatsurya","email":"bharatsurya.p@gmail.com"}],"contributors":[{"url":"https://github.com/anescobar1991","name":"Andres Escobar","email":"Andres.Escobar@aexp.com"},{"url":"https://github.com/JamesSingleton","name":"James Singleton","email":"James.Singleton1@aexp.com"},{"url":"https://github.com/10xLaCroixDrinker","name":"Jimmy King","email":"Jimmy.King@aexp.com"},{"url":"https://github.com/JAdshead","name":"Jonathan Adshead","email":"Jonathan.Adshead@aexp.com"},{"url":"https://github.com/Francois-Esquire","name":"Michael Tobia","email":"Michael.M.Tobia@aexp.com"},{"url":"https://github.com/mtomcal","name":"Michael Tomcal","email":"Michael.A.Tomcal@aexp.com"},{"url":"https://github.com/stephaniecoates","name":"Stephanie Coates","email":"Stephanie.Coates1@aexp.com"},{"url":"https://github.com/nellyk","name":"Nelly Kiboi","email":"Nelly.J.Kiboi@aexp.com"},{"url":"https://github.com/PixnBits","name":"Nickolas Oliver","email":"nickolas.oliver@aexp.com"}],"homepage":"https://github.com/americanexpress/one-service-worker","bugs":{"url":"https://github.com/americanexpress/one-service-worker/issues"},"dist":{"shasum":"6111bba146afe42b034900f70adabc23160fab87","tarball":"https://registry.npmjs.org/@americanexpress/one-service-worker/-/one-service-worker-1.0.0.tgz","fileCount":24,"integrity":"sha512-Y5p4E9v7TA0EB/tcM4prGil6NVOZbJ4fC/x4OmO53K03eSpC/6w+uiDx+idSNK9xgO+WMaCMqT+1/PNKVTZMYw==","signatures":[{"sig":"MEQCIHV4mQ43vW2KSsJ+sB3zKd78n9gTepuT3Po+rqwkqIvUAiBwbiCmP3aR+PL9qqjQlpQAJRTS789RR5+H5h3MspDcdg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":187652,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJefjjJCRA9TVsSAnZWagAAjFQP/Rd8TQXa3rN6P5hGCGmA\nsyjIUoKfgpJE0UlzjbOjLY8uE6s08KzvhMPmtBdthUCQvma3x92rBbnuIcJV\nrgQC+r9PiIWoWQHxX4WRFapw4y3yTnRtx9A6645NB/LOhnzKo2k7+1+pcBEG\njrD8dwSjwZ3VG0p5zk4eNF3BP8o6Xjcd83+u0vQlpxI2tfQukHuEwdfFvMBN\nsFqbbg0QQM+MKtoRp+IUYwV9pExN97JowQdSP5l70X0hK7J57LuLb8+ST3C/\npk4z2cFDUUeoRtlXa3N9/NM7LFxQ+tJAu6b1YItqowhnIg4LwP3nUi71oBv/\nOH/Bw7s0Jt9kKwrRQh5fRUjrokzYYUtMXeGGuFWyTPfMXzUBXK6GrLkAF3GJ\nYktzBQ45u3HnOVW531vQ0zIJWNvrVAyXN+QnOW1ygYP3wIfSAtUDmuGKb0Gj\nFtMrimMj/2Nde7Qh6beDGLMn4SGx1qm3X3rYgXrRJCbRHPBjvdo4FyThbOKY\n58uwfI4R5ZNZhlyTEdzstenCb4ak63APTt9N9o9v3SzrlxqOpRNVIYLa3ksq\nc7Ls89wj3zIwg1EprSZEWZOE2utS4vF3Rlst3osaCit0nEKXXfMvt+51mTB3\ng2jW5yeYyPo2yKgXjX1m8ml9b137RT8EfBHEEIxWmV81Mako5JGUHk4xfNtU\npsIE\r\n=kHL7\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.cjs.js","husky":{"hooks":{"commit-msg":"commitlint -E HUSKY_GIT_PARAMS","pre-commit":"npm test"}},"module":"index.esm.js","browser":"index.min.js","gitHead":"08b596f4efa7cbd8e447ab8512e394ebb721b403","release":{"branch":"master","plugins":["@semantic-release/commit-analyzer","@semantic-release/release-notes-generator","@semantic-release/changelog","@semantic-release/git","@semantic-release/npm"]},"scripts":{"dev":"npm run dev --prefix packages/one-service-worker-demo","demo":"npm start --prefix packages/one-service-worker-demo","lint":"npm run lint:eslint && npm run lint:lockfile && npm run lint:commits","test":"jest --config jest.config.js","build":"node scripts/build.js","clean":"node scripts/clean.js","print":"node scripts/print.js","prepack":"cross-env NODE_ENV=production npm run build","posttest":"exit 0 || npm run test:integration && npm run lint","prebuild":"npm run clean","demo:build":"npm run build --prefix packages/one-service-worker-demo","demo:watch":"npm run start:watch --prefix packages/one-service-worker-demo","lint:eslint":"eslint . --ext js,jsx,md,snap","postinstall":"npm run build && npm run demo:install","demo:install":"npm install --prefix packages/one-service-worker-demo","demo:test-up":"node scripts/demo.js demo-test-up","lint:commits":"commitlint --from origin/master --to HEAD","lint:lockfile":"lockfile-lint --path yarn.lock --allowed-hosts registry.yarnpkg.com --validate-https","demo:test-down":"node scripts/demo.js demo-test-down","test:integration":"jest --config jest.integration.config.js || npm run demo:test-down","pretest:integration":"npm run demo:test-up","posttest:integration":"npm run demo:test-down"},"_npmUser":{"name":"francois.esquire","email":"michaeltobia@gmail.com"},"repository":{"url":"git+https://github.com/americanexpress/one-service-worker.git","type":"git"},"workspaces":["packages/*"],"_npmVersion":"6.13.6","description":"A service worker built for the modern web","directories":{},"sideEffects":false,"_nodeVersion":"13.8.0","_hasShrinkwrap":false,"devDependencies":{"jest":"^24.9.0","chalk":"^3.0.0","husky":"^4.2.1","eslint":"^6.7.2","rollup":"^2.0.3","prettier":"^1.19.1","web-push":"^3.4.3","cross-env":"^7.0.0","babel-jest":"^25.1.0","playwright":"^0.11.1","@babel/core":"^7.8.4","npm-run-all":"^4.1.3","lockfile-lint":"^4.0.0","@babel/polyfill":"^7.7.0","@commitlint/cli":"^8.3.5","amex-jest-preset":"^6.0.1","rollup-plugin-re":"^1.0.7","semantic-release":"^17.0.2","@babel/preset-env":"^7.8.4","babel-preset-amex":"^3.3.0","eslint-config-amex":"^11.1.0","rollup-plugin-gzip":"^2.2.0","rollup-plugin-babel":"^4.3.3","service-worker-mock":"^2.0.5","@rollup/plugin-buble":"^0.21.0","rollup-plugin-uglify":"^6.0.2","@semantic-release/git":"^9.0.0","@semantic-release/npm":"^7.0.2","rollup-plugin-cleanup":"^3.1.1","eslint-config-prettier":"^6.10.0","eslint-plugin-prettier":"^3.0.1","@rollup/plugin-node-resolve":"^7.0.0","@semantic-release/changelog":"^5.0.0","@commitlint/config-conventional":"^8.2.0","@semantic-release/commit-analyzer":"^8.0.1","@semantic-release/release-notes-generator":"^9.0.0"},"_npmOperationalInternal":{"tmp":"tmp/one-service-worker_1.0.0_1585330376764_0.2472492838838074","host":"s3://npm-registry-packages"}},"1.0.1":{"name":"@americanexpress/one-service-worker","version":"1.0.1","keywords":["sw","pwa","service worker","cache","offline","web-push","background-sync"],"license":"Apache-2.0","_id":"@americanexpress/one-service-worker@1.0.1","maintainers":[{"name":"amexopensource","email":"open-source-ops@aexp.com"},{"name":"bharatsurya","email":"bharatsurya.p@gmail.com"},{"name":"francois.esquire","email":"michaeltobia@gmail.com"},{"name":"jadshead","email":"jonny.adshead@gmail.com"},{"name":"jsmartfo","email":"j_smart_foster@hotmail.com"},{"name":"mtomcal","email":"michael@twoeyetech.com"},{"name":"pixnbits","email":"i@pixnbits.org"},{"name":"tklever","email":"tim.v.klever@aexp.com"},{"name":"william-mcmillian","email":"will.h.bishop@gmail.com"}],"contributors":[{"url":"https://github.com/anescobar1991","name":"Andres Escobar","email":"Andres.Escobar@aexp.com"},{"url":"https://github.com/JamesSingleton","name":"James Singleton","email":"James.Singleton1@aexp.com"},{"url":"https://github.com/10xLaCroixDrinker","name":"Jimmy King","email":"Jimmy.King@aexp.com"},{"url":"https://github.com/JAdshead","name":"Jonathan Adshead","email":"Jonathan.Adshead@aexp.com"},{"url":"https://github.com/Francois-Esquire","name":"Michael Tobia","email":"Michael.M.Tobia@aexp.com"},{"url":"https://github.com/mtomcal","name":"Michael Tomcal","email":"Michael.A.Tomcal@aexp.com"},{"url":"https://github.com/stephaniecoates","name":"Stephanie Coates","email":"Stephanie.Coates1@aexp.com"},{"url":"https://github.com/nellyk","name":"Nelly Kiboi","email":"Nelly.J.Kiboi@aexp.com"},{"url":"https://github.com/PixnBits","name":"Nickolas Oliver","email":"nickolas.oliver@aexp.com"}],"homepage":"https://github.com/americanexpress/one-service-worker","bugs":{"url":"https://github.com/americanexpress/one-service-worker/issues"},"dist":{"shasum":"a0c8d7c6f4e1a0bc6d6cab68546586dd7795bd60","tarball":"https://registry.npmjs.org/@americanexpress/one-service-worker/-/one-service-worker-1.0.1.tgz","fileCount":24,"integrity":"sha512-KG+p/uk3x+xebjcTBtEK3SHW1N/kSilom3Unrh5Rgo6f5DGGGl4N+8N7TdjPSFCXRtDHUZRMEsdH+B0LRskK3g==","signatures":[{"sig":"MEYCIQD2az4a4j1Ikjg16sy/009/d2i5gZ/LetrjU9wZuVPCzAIhAMtYE6H2JLFCPmA4EZ51NvOBK0RJs6w9jemcAB/j69qy","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":192060,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJej5uGCRA9TVsSAnZWagAAalgP+QD05K2JEkFnq4xvUsSV\nlwyb3jJYZCDP68R6O1vVV/9aXVHCeDBznIUS5hPirJEJPogi7d+4kGBZRVGp\njnwmBQlJn0jzKmkKGq4fp5ycut2nqWCyigNC+2ane2roHSHV4wiTJP/Fogg3\n/smsPD2FPAvRq/3pvwgc4EljMD4VXvru68A9Ux/ipTE+QTNFryuhW85Qtjd+\nbA1Q8TU49ct/tkERDVWlJtTMr8tuir+swH+OnzeYFIFFm5SOEucavc/4A6dl\nEO38GX//TWq2n6wlbgt1XHMlAsLTw6ns770aalNFDJ64qEnYcGjolSVKrYSb\nWPuTzcymzpixMpvl2b0LnPJy3sl/KPMxGqbOSxuDCWDvXJwBZ3Hv6e+WSLgF\nEKIDRUq0DxJRQnnmHl/b2iUOVtbWSqNYgNfQhk/fztMDCYqbN2l/vbAWWn8L\nNcuj7D+YZ683e+3LEUFqE5uFaUv4vAbRPmVk863Akw5xDec+ug4FpNz04/0D\nrAB2Cx6RlBBlggXWZDKjZ70ktG/aC8HraA0BEfGpEL5ZEqVp3RiNij12HuCg\nuKpUOu8b2x5xtP1ulR4JlFWbnkeLzrdlRtx3NT/SEljtLLZAO4UrILPa7k5+\n/nR4tu9jhk09O7ybnCJLF+Ug8dcPl210aIjJfEomPlNfzOhwczUjOqgnNmIV\nOcQW\r\n=Xdjf\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.cjs.js","husky":{"hooks":{"commit-msg":"commitlint -E HUSKY_GIT_PARAMS","pre-commit":"npm test"}},"module":"index.esm.js","browser":"index.min.js","gitHead":"11819f5d5cf5e19891949ebe3edca32ea9b89b5b","release":{"branch":"master","plugins":["@semantic-release/commit-analyzer","@semantic-release/release-notes-generator","@semantic-release/changelog","@semantic-release/git","@semantic-release/npm"]},"scripts":{"dev":"npm run dev --prefix packages/one-service-worker-demo","demo":"npm start --prefix packages/one-service-worker-demo","lint":"npm run lint:eslint && npm run lint:lockfile && npm run lint:commits","test":"jest --config jest.config.js","build":"node scripts/build.js","clean":"node scripts/clean.js","print":"node scripts/print.js","prepack":"cross-env NODE_ENV=production npm run build","posttest":"npm run test:integration && npm run lint","prebuild":"npm run clean","demo:build":"npm run build --prefix packages/one-service-worker-demo","demo:watch":"npm run start:watch --prefix packages/one-service-worker-demo","lint:eslint":"eslint . --ext js,jsx,md,snap","demo:install":"npm install --prefix packages/one-service-worker-demo","demo:test-up":"node scripts/demo.js demo-test-up","lint:commits":"commitlint --from origin/master --to HEAD","lint:lockfile":"lockfile-lint --path yarn.lock --allowed-hosts registry.yarnpkg.com --validate-https","demo:test-down":"node scripts/demo.js demo-test-down","test:integration":"jest --config jest.integration.config.js || (npm run demo:test-down && exit 1)","pretest:integration":"npm run demo:test-up","posttest:integration":"npm run demo:test-down"},"_npmUser":{"name":"francois.esquire","email":"michaeltobia@gmail.com"},"repository":{"url":"git+https://github.com/americanexpress/one-service-worker.git","type":"git"},"workspaces":["packages/*"],"_npmVersion":"6.13.6","description":"A service worker built for the modern web","directories":{},"sideEffects":false,"_nodeVersion":"13.8.0","_hasShrinkwrap":false,"devDependencies":{"jest":"^25.2.4","chalk":"^3.0.0","husky":"^4.2.1","eslint":"^6.7.2","rollup":"^2.0.3","prettier":"^2.0.2","web-push":"^3.4.3","cross-env":"^7.0.0","babel-jest":"^25.1.0","playwright":"0.11.1","@babel/core":"^7.8.4","npm-run-all":"^4.1.3","lockfile-lint":"^4.0.0","@babel/polyfill":"^7.7.0","@commitlint/cli":"^8.3.5","amex-jest-preset":"^6.0.1","rollup-plugin-re":"^1.0.7","semantic-release":"^17.0.2","@babel/preset-env":"^7.8.4","babel-preset-amex":"^3.3.0","eslint-config-amex":"^12.0.0","rollup-plugin-gzip":"^2.2.0","rollup-plugin-babel":"^4.3.3","service-worker-mock":"^2.0.5","@rollup/plugin-buble":"^0.21.0","rollup-plugin-uglify":"^6.0.2","@semantic-release/git":"^9.0.0","@semantic-release/npm":"^7.0.2","rollup-plugin-cleanup":"^3.1.1","eslint-config-prettier":"^6.10.0","eslint-plugin-prettier":"^3.0.1","@rollup/plugin-node-resolve":"^7.0.0","@semantic-release/changelog":"^5.0.0","@commitlint/config-conventional":"^8.2.0","@semantic-release/commit-analyzer":"^8.0.1","@semantic-release/release-notes-generator":"^9.0.0"},"_npmOperationalInternal":{"tmp":"tmp/one-service-worker_1.0.1_1586469766220_0.483476440880118","host":"s3://npm-registry-packages"}},"1.0.2":{"name":"@americanexpress/one-service-worker","version":"1.0.2","keywords":["sw","pwa","service worker","cache","offline","web-push","background-sync"],"license":"Apache-2.0","_id":"@americanexpress/one-service-worker@1.0.2","maintainers":[{"name":"amexopensource","email":"open-source-ops@aexp.com"},{"name":"bharatsurya","email":"bharatsurya.p@gmail.com"},{"name":"francois.esquire","email":"michaeltobia@gmail.com"},{"name":"jadshead","email":"jonny.adshead@gmail.com"},{"name":"jsmartfo","email":"j_smart_foster@hotmail.com"},{"name":"mtomcal","email":"michael@twoeyetech.com"},{"name":"pixnbits","email":"i@pixnbits.org"},{"name":"tklever","email":"tim.v.klever@aexp.com"},{"name":"william-mcmillian","email":"will.h.bishop@gmail.com"}],"contributors":[{"url":"https://github.com/anescobar1991","name":"Andres Escobar","email":"Andres.Escobar@aexp.com"},{"url":"https://github.com/JamesSingleton","name":"James Singleton","email":"James.Singleton1@aexp.com"},{"url":"https://github.com/10xLaCroixDrinker","name":"Jimmy King","email":"Jimmy.King@aexp.com"},{"url":"https://github.com/JAdshead","name":"Jonathan Adshead","email":"Jonathan.Adshead@aexp.com"},{"url":"https://github.com/Francois-Esquire","name":"Michael Tobia","email":"Michael.M.Tobia@aexp.com"},{"url":"https://github.com/mtomcal","name":"Michael Tomcal","email":"Michael.A.Tomcal@aexp.com"},{"url":"https://github.com/stephaniecoates","name":"Stephanie Coates","email":"Stephanie.Coates1@aexp.com"},{"url":"https://github.com/nellyk","name":"Nelly Kiboi","email":"Nelly.J.Kiboi@aexp.com"},{"url":"https://github.com/PixnBits","name":"Nickolas Oliver","email":"nickolas.oliver@aexp.com"}],"homepage":"https://github.com/americanexpress/one-service-worker","bugs":{"url":"https://github.com/americanexpress/one-service-worker/issues"},"dist":{"shasum":"ce683916d59a47254dbec596df420c257a4d4639","tarball":"https://registry.npmjs.org/@americanexpress/one-service-worker/-/one-service-worker-1.0.2.tgz","fileCount":25,"integrity":"sha512-y89Q2PNKNj/cPh/c9hJcavK8xIa1IFDHA10/2nVbiPdOV9vRkZoNgslHajsN6hPdT6joALgnJV8dVCJJt8w8Jw==","signatures":[{"sig":"MEUCIQC3shTQ8/dCa/E84gfXnbcr3LxuKEh0f1NjFCvLdCseEQIgT+moF8bVd82DR0J02ya8EgoEtUyeEz2pSO39PsjX23U=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":190961,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe4/rHCRA9TVsSAnZWagAA9q4P/iuz2iM27Xf2aJA+sLSm\nELYTPIl6oTSCJmgfD9yTYD/ssqps+QQWF3xafN3qL8+L7Q6nwAqpWgIAR+d2\nmm/ffZK3hEoSceptNtW+JJL61ZWARIV4bmVf89Gx6Sf9E+J37PEhlX+sXzL3\nJDhLLIHOaWOFYWfPNUKbKOBHLxhS0vW1k/PdbDbmoOao7vcaLSF4Cbgh77go\ne84XaxdxY6Q5O/2ibZQP3O+iQxcGkYklByEIvxkieXtqCqpqSvHxsgCU/mSe\n4KPeUoGUhpvsAyfYFaUL+2y6ovYcfsrBRvgiiBuAY/jCbyCh5dG2CngA34R0\nnnNy21B2PQ/12n3jXybE2CBjvSA9I+yw7gohaSizma9j+uotChD6Y9HXQA5G\n2qWu3jzZyj3f5+xV4yGaZQbSU7NQToUUPvQn6T24+ez4K465EoEzqAmDmHyC\neFxFR6Pb0+nSbKEjyRq5vcweV0MSatzkD+8mdiKEI203URV151/FwiEIZy6B\ns9/ba0T2xSqL871IqkugzzaqTIV+48/2X/haToud2VYq4NYoO07Qp7CYPeZ/\nq0HaW6CV95gsehKjRlYNQClTKLgqWSC10E3M/ZsNBNGuJRi6/gJ1toVDA38Z\nEWBBcqoDj0BvOT1YHxV5VJ/XG4ECErC3ZfjGqNlGuXpkbnuM0reJ7ipolPym\nYIYZ\r\n=Lbes\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.cjs.js","husky":{"hooks":{"commit-msg":"commitlint -E HUSKY_GIT_PARAMS","pre-commit":"npm test"}},"module":"index.esm.js","browser":"index.min.js","gitHead":"67a44ee8e894e22e9261d1b5c90911daa677f1dc","private":false,"release":{"branch":"master","plugins":["@semantic-release/commit-analyzer","@semantic-release/release-notes-generator","@semantic-release/changelog","@semantic-release/npm","@semantic-release/git","@semantic-release/github"]},"scripts":{"dev":"npm run dev --prefix packages/one-service-worker-demo","demo":"npm start --prefix packages/one-service-worker-demo","lint":"npm run lint:eslint && npm run lint:lockfile && npm run lint:commits","test":"jest --config jest.config.js","build":"node scripts/build.js","clean":"node scripts/clean.js","print":"node scripts/print.js","prepack":"cross-env NODE_ENV=production npm run build","posttest":"npm run test:integration && npm run lint","prebuild":"npm run clean","demo:build":"npm run build --prefix packages/one-service-worker-demo","demo:watch":"npm run start:watch --prefix packages/one-service-worker-demo","lint:eslint":"eslint . --ext js,jsx,md,snap","demo:install":"npm install --prefix packages/one-service-worker-demo","demo:test-up":"node scripts/demo.js demo-test-up","lint:commits":"commitlint --from origin/master --to HEAD","lint:lockfile":"lockfile-lint --path yarn.lock --allowed-hosts registry.yarnpkg.com --validate-https","demo:test-down":"node scripts/demo.js demo-test-down","test:integration":"jest --config jest.integration.config.js || (npm run demo:test-down && exit 1)","pretest:integration":"npm run demo:test-up","posttest:integration":"npm run demo:test-down"},"_npmUser":{"name":"amexopensource","email":"open-source-ops@aexp.com"},"repository":{"url":"git+https://github.com/americanexpress/one-service-worker.git","type":"git"},"workspaces":["packages/*"],"_npmVersion":"6.14.4","description":"A service worker built for the modern web","directories":{},"sideEffects":false,"_nodeVersion":"12.18.0","_hasShrinkwrap":false,"devDependencies":{"jest":"^25.2.4","chalk":"^3.0.0","husky":"^4.2.1","eslint":"^6.7.2","rollup":"^2.0.3","prettier":"^2.0.2","web-push":"^3.4.3","cross-env":"^7.0.0","babel-jest":"^25.1.0","playwright":"0.11.1","@babel/core":"^7.8.4","npm-run-all":"^4.1.3","lockfile-lint":"^4.0.0","@babel/polyfill":"^7.7.0","@commitlint/cli":"^8.3.5","amex-jest-preset":"^6.0.1","rollup-plugin-re":"^1.0.7","semantic-release":"^17.0.2","@babel/preset-env":"^7.8.4","babel-preset-amex":"^3.3.0","eslint-config-amex":"^12.0.0","rollup-plugin-gzip":"^2.2.0","rollup-plugin-babel":"^4.3.3","service-worker-mock":"^2.0.5","@rollup/plugin-buble":"^0.21.0","rollup-plugin-uglify":"^6.0.2","@semantic-release/git":"^9.0.0","@semantic-release/npm":"^7.0.2","rollup-plugin-cleanup":"^3.1.1","eslint-config-prettier":"^6.10.0","eslint-plugin-prettier":"^3.0.1","@rollup/plugin-node-resolve":"^7.0.0","@semantic-release/changelog":"^5.0.0","@commitlint/config-conventional":"^8.2.0","@semantic-release/commit-analyzer":"^8.0.1","@semantic-release/release-notes-generator":"^9.0.0"},"_npmOperationalInternal":{"tmp":"tmp/one-service-worker_1.0.2_1591999175132_0.7123648845013184","host":"s3://npm-registry-packages"}},"1.0.3":{"name":"@americanexpress/one-service-worker","version":"1.0.3","keywords":["sw","pwa","service worker","cache","offline","web-push","background-sync"],"license":"Apache-2.0","_id":"@americanexpress/one-service-worker@1.0.3","maintainers":[{"name":"amexopensource","email":"open-source-ops@aexp.com"},{"name":"bharatsurya","email":"bharatsurya.p@gmail.com"},{"name":"francois.esquire","email":"michaeltobia@gmail.com"},{"name":"jadshead","email":"jonny.adshead@gmail.com"},{"name":"jsmartfo","email":"j_smart_foster@hotmail.com"},{"name":"mtomcal","email":"michael@twoeyetech.com"},{"name":"pixnbits","email":"i@pixnbits.org"},{"name":"tklever","email":"tim.v.klever@aexp.com"},{"name":"william-mcmillian","email":"will.h.bishop@gmail.com"}],"contributors":[{"url":"https://github.com/anescobar1991","name":"Andres Escobar","email":"Andres.Escobar@aexp.com"},{"url":"https://github.com/JamesSingleton","name":"James Singleton","email":"James.Singleton1@aexp.com"},{"url":"https://github.com/10xLaCroixDrinker","name":"Jimmy King","email":"Jimmy.King@aexp.com"},{"url":"https://github.com/JAdshead","name":"Jonathan Adshead","email":"Jonathan.Adshead@aexp.com"},{"url":"https://github.com/Francois-Esquire","name":"Michael Tobia","email":"Michael.M.Tobia@aexp.com"},{"url":"https://github.com/mtomcal","name":"Michael Tomcal","email":"Michael.A.Tomcal@aexp.com"},{"url":"https://github.com/stephaniecoates","name":"Stephanie Coates","email":"Stephanie.Coates1@aexp.com"},{"url":"https://github.com/nellyk","name":"Nelly Kiboi","email":"Nelly.J.Kiboi@aexp.com"},{"url":"https://github.com/PixnBits","name":"Nickolas Oliver","email":"nickolas.oliver@aexp.com"}],"homepage":"https://github.com/americanexpress/one-service-worker","bugs":{"url":"https://github.com/americanexpress/one-service-worker/issues"},"dist":{"shasum":"604ce66933763a561554b8cd76818e7a8f245741","tarball":"https://registry.npmjs.org/@americanexpress/one-service-worker/-/one-service-worker-1.0.3.tgz","fileCount":25,"integrity":"sha512-LnsXqBVm2Lc1yfjwSMo6gZFgdo4qHItcCKTUiDV26StGtFt9rcjUnXzet3cFb2ggSc75fcDbrtGpgrbaqm09Mg==","signatures":[{"sig":"MEUCIQDHklfqwMpHVnr6NhaSx09VNNDyk1Cn6EcrBGnM81gfqAIgV5kjyiCFyNtr7KiALctWcIlhziuHXz1wRw6FWqmsXlU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":191536,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe5+eOCRA9TVsSAnZWagAAZCYQAJsIeyPpsLTXAj32tcwc\nazC/JjfRVepP2akIu6T8Opfygy/OVcacumf400OdWh05i6UmA9abBnVTfpjn\nNfRsCAuThtHQWwK2LO1I3Yw2FOH+VqlWkopOIRgZ1+qhbggNwq294mNUCzmk\nkvCX0K69WfwQr6ePWfdy5ax+FDkLybvGdwSdmdTyWRi7MhuPDw+16hW4MaKG\n3PiaRQaAn8dndyYxty5n42txisxmrSEV25x1l8WSSz51UVRD2UFGLnoxAnwa\nQ/ug8KoyzGnWLcFG2+pitOcoScnDRgPWrcMKTuqLLaMAjKpmxp/lWQiB9EfU\nTawoMei/utBY1ftDqUojZCrnFEt8n0+brS9F+68S7BT0DQcJpkwEANdVsTEG\n/BX7210/Zmgx9Wimlxi7ymEHEdljMmuFU1y2BBB9/PAquVMo9YsBFitDp5XQ\ngnlu4GJ65mDqtVFo31vu4yS4KiXNiY+jotMkaHuueBSfwFELnSLJZZNcjQ+G\noOUdia04nymp3+zP6O/MBdOiF0CGlTNnwrHElh/HMwZWJBXPYRKckbME+3+b\njNs0os4KiWB652nupjTEo+lj8/oXPxRwKEOMq/VLaiuM69Gks5jsozhTwVkR\nzjx8+y3qBtWinaQKEpUjNDMH2cTwdyBh27IhpqI+Mgv8FkKO14tYUTYoTD0w\n2Rnq\r\n=1ToX\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.cjs.js","husky":{"hooks":{"commit-msg":"commitlint -E HUSKY_GIT_PARAMS","pre-commit":"npm test"}},"module":"index.esm.js","browser":"index.min.js","gitHead":"aac830e4f32cd2ee2367c51413517f1d68226736","release":{"branch":"master","plugins":["@semantic-release/commit-analyzer","@semantic-release/release-notes-generator","@semantic-release/changelog","@semantic-release/npm","@semantic-release/git","@semantic-release/github"]},"scripts":{"dev":"npm run dev --prefix packages/one-service-worker-demo","demo":"npm start --prefix packages/one-service-worker-demo","lint":"npm run lint:eslint && npm run lint:lockfile && npm run lint:commits","test":"cross-env NODE_ENV=production jest --config jest.config.js","build":"node scripts/build.js","clean":"node scripts/clean.js","print":"node scripts/print.js","prepack":"cross-env NODE_ENV=production npm run build","pretest":"npm run build && (cd packages/one-service-worker-demo && yarn)","posttest":"npm run test:integration && npm run lint","prebuild":"npm run clean","demo:build":"npm run build --prefix packages/one-service-worker-demo","demo:watch":"npm run start:watch --prefix packages/one-service-worker-demo","lint:eslint":"eslint . --ext js,jsx,md,snap","demo:install":"npm install --prefix packages/one-service-worker-demo","demo:test-up":"node scripts/demo.js demo-test-up","lint:commits":"commitlint --from origin/master --to HEAD","lint:lockfile":"lockfile-lint --path yarn.lock --allowed-hosts registry.yarnpkg.com --validate-https","demo:test-down":"node scripts/demo.js demo-test-down","test:integration":"cross-env NODE_ENV=production jest --config jest.integration.config.js || (npm run demo:test-down && exit 1)","pretest:integration":"npm run demo:test-up","posttest:integration":"npm run demo:test-down"},"_npmUser":{"name":"amexopensource","email":"open-source-ops@aexp.com"},"repository":{"url":"git+https://github.com/americanexpress/one-service-worker.git","type":"git"},"_npmVersion":"6.14.4","description":"A service worker built for the modern web","directories":{},"sideEffects":false,"_nodeVersion":"12.18.0","_hasShrinkwrap":false,"devDependencies":{"jest":"^25.2.4","chalk":"^3.0.0","husky":"^4.2.1","eslint":"^6.7.2","rollup":"^2.0.3","prettier":"^2.0.2","web-push":"^3.4.3","cross-env":"^7.0.0","babel-jest":"^25.1.0","playwright":"0.11.1","@babel/core":"^7.8.4","npm-run-all":"^4.1.3","lockfile-lint":"^4.0.0","@babel/polyfill":"^7.7.0","@commitlint/cli":"^8.3.5","amex-jest-preset":"^6.0.1","rollup-plugin-re":"^1.0.7","semantic-release":"^17.0.2","@babel/preset-env":"^7.8.4","babel-preset-amex":"^3.3.0","eslint-config-amex":"^12.0.0","rollup-plugin-gzip":"^2.2.0","rollup-plugin-babel":"^4.3.3","service-worker-mock":"^2.0.5","@rollup/plugin-buble":"^0.21.0","rollup-plugin-uglify":"^6.0.2","@semantic-release/git":"^9.0.0","@semantic-release/npm":"^7.0.2","rollup-plugin-cleanup":"^3.1.1","eslint-config-prettier":"^6.10.0","eslint-plugin-prettier":"^3.0.1","@rollup/plugin-node-resolve":"^7.0.0","@semantic-release/changelog":"^5.0.0","@commitlint/config-conventional":"^8.2.0","@semantic-release/commit-analyzer":"^8.0.1","@semantic-release/release-notes-generator":"^9.0.0"},"_npmOperationalInternal":{"tmp":"tmp/one-service-worker_1.0.3_1592256397174_0.5762122677763206","host":"s3://npm-registry-packages"}},"1.0.4":{"name":"@americanexpress/one-service-worker","version":"1.0.4","keywords":["sw","pwa","service worker","cache","offline","web-push","background-sync"],"license":"Apache-2.0","_id":"@americanexpress/one-service-worker@1.0.4","maintainers":[{"name":"amexopensource","email":"open-source-ops@aexp.com"},{"name":"bharatsurya","email":"bharatsurya.p@gmail.com"},{"name":"francois.esquire","email":"michaeltobia@gmail.com"},{"name":"jadshead","email":"jonny.adshead@gmail.com"},{"name":"jsmartfo","email":"j_smart_foster@hotmail.com"},{"name":"mtomcal","email":"michael@twoeyetech.com"},{"name":"pixnbits","email":"i@pixnbits.org"},{"name":"tklever","email":"tim.v.klever@aexp.com"},{"name":"william-mcmillian","email":"will.h.bishop@gmail.com"}],"contributors":[{"url":"https://github.com/anescobar1991","name":"Andres Escobar","email":"Andres.Escobar@aexp.com"},{"url":"https://github.com/JamesSingleton","name":"James Singleton","email":"James.Singleton1@aexp.com"},{"url":"https://github.com/10xLaCroixDrinker","name":"Jimmy King","email":"Jimmy.King@aexp.com"},{"url":"https://github.com/JAdshead","name":"Jonathan Adshead","email":"Jonathan.Adshead@aexp.com"},{"url":"https://github.com/Francois-Esquire","name":"Michael Tobia","email":"Michael.M.Tobia@aexp.com"},{"url":"https://github.com/mtomcal","name":"Michael Tomcal","email":"Michael.A.Tomcal@aexp.com"},{"url":"https://github.com/stephaniecoates","name":"Stephanie Coates","email":"Stephanie.Coates1@aexp.com"},{"url":"https://github.com/nellyk","name":"Nelly Kiboi","email":"Nelly.J.Kiboi@aexp.com"},{"url":"https://github.com/PixnBits","name":"Nickolas Oliver","email":"nickolas.oliver@aexp.com"}],"homepage":"https://github.com/americanexpress/one-service-worker","bugs":{"url":"https://github.com/americanexpress/one-service-worker/issues"},"dist":{"shasum":"c73bf25b6563d2d0170349bf5190e22463fb0777","tarball":"https://registry.npmjs.org/@americanexpress/one-service-worker/-/one-service-worker-1.0.4.tgz","fileCount":25,"integrity":"sha512-8LxucOY39JOb9vMfZtuff6JOjt21K4SJ69AGdbdMs8K+1IpPFeg19P2659XHWgNODwDcX/j8vQPlh8DtOAK8yg==","signatures":[{"sig":"MEQCIDoUqiB1X0XkTP6oHgyZ/UuWyVfMbIBnMDfr3C0OCn0xAiB1xmHKg5aFHKfb5Ya2hCtE320Xv44AKmr2p5bK6X6D6w==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":192007,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfT3BoCRA9TVsSAnZWagAAMGgQAIHPA6jiwrMpb61dNalk\n9ECS8GyxampW1i1hoff7F9ShNOiU/oC2UN6IVO0hABtPWrvSh8PtwJOG/EV1\nbVEwRuyqcyRDhX9bJH9+jOlzTXH/TcVmTUSjd9OJ4PHApQ1PkZlsLyrxU+Pl\nb74UODMNKkAG4Attepxm+0cKcZYN4vr3E44b114dTpZikksHHVGKlYCoHcNL\nHZTmAeMea+oHYrbL4YnTXXceyhczA/fP1wLzEVjim7HmMvkq+sRbBr4TIHB2\n3ApizHhxd6GeFB3sGEopEYeD8wY7RX14FMyij3I3EWfKfkzO7RjDwGr1ZpJL\np+PU5Ud1hi4Pce8RUiwn1iZkd1iHGXA69fml3tiBezSwnmZYoaEyuC4N+WwV\n1/KUZHBh1ASBFxP379USAQP+F9Ar8Ao93EHdjlT7YocpG2wodmC6Pjp1Q0VX\n8Z/2F6z08qByhRMIps8LaoiawpM6/JTW/ORwm4mysrH0BCzehRz4E/6sRrUT\nI6NN6gtqNG82/56d1E8+WgyZE8qb0Q8oHRigeU7d+Ah1NYWYzb9lTw6ytiqo\nQEYbvAnUv4AzmsTWJKyPC/Xi8iJzsg1Pf/vV+HKWRQmM4nbKJuOY9i+EMUkI\nvOoUG3gv0QleC7gRMCBi7jSIOOhSViPzDny61E3ot4b55/8rWHSnMfc9lp4x\njB/p\r\n=dSoi\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.cjs.js","husky":{"hooks":{"commit-msg":"commitlint -E HUSKY_GIT_PARAMS","pre-commit":"npm test"}},"module":"index.esm.js","browser":"index.min.js","gitHead":"57a3b022b6168b5826457c09f46156e2536a2daa","release":{"plugins":["@semantic-release/commit-analyzer","@semantic-release/release-notes-generator","@semantic-release/changelog","@semantic-release/npm","@semantic-release/git","@semantic-release/github"],"branches":["+([0-9])?(.{+([0-9]),x}).x","main","next","next-major",{"name":"beta","prerelease":true},{"name":"alpha","prerelease":true}]},"scripts":{"dev":"npm run dev --prefix packages/one-service-worker-demo","demo":"npm start --prefix packages/one-service-worker-demo","lint":"npm run lint:eslint && npm run lint:lockfile && npm run lint:commits","test":"cross-env NODE_ENV=production jest --config jest.config.js","build":"node scripts/build.js","clean":"node scripts/clean.js","print":"node scripts/print.js","prepack":"cross-env NODE_ENV=production npm run build","pretest":"npm run build && (cd packages/one-service-worker-demo && yarn)","posttest":"npm run test:integration && npm run lint","prebuild":"npm run clean","demo:build":"npm run build --prefix packages/one-service-worker-demo","demo:watch":"npm run start:watch --prefix packages/one-service-worker-demo","lint:eslint":"eslint . --ext js,jsx,md,snap","demo:install":"npm install --prefix packages/one-service-worker-demo","demo:test-up":"node scripts/demo.js demo-test-up","lint:commits":"commitlint --from origin/main --to HEAD","lint:lockfile":"lockfile-lint --path yarn.lock --allowed-hosts registry.yarnpkg.com --validate-https","demo:test-down":"node scripts/demo.js demo-test-down","test:integration":"cross-env NODE_ENV=production jest --config jest.integration.config.js || (npm run demo:test-down && exit 1)","pretest:integration":"npm run demo:test-up","posttest:integration":"npm run demo:test-down"},"_npmUser":{"name":"amexopensource","email":"open-source-ops@aexp.com"},"repository":{"url":"git+https://github.com/americanexpress/one-service-worker.git","type":"git"},"_npmVersion":"6.14.5","description":"A service worker built for the modern web","directories":{},"sideEffects":false,"_nodeVersion":"12.18.3","_hasShrinkwrap":false,"devDependencies":{"jest":"^26.0.1","chalk":"^4.1.0","husky":"^4.2.1","eslint":"^7.2.0","rollup":"^2.0.3","prettier":"^2.0.2","web-push":"^3.4.3","cross-env":"^7.0.0","babel-jest":"^26.0.1","playwright":"0.11.1","@babel/core":"^7.8.4","npm-run-all":"^4.1.3","lockfile-lint":"^4.0.0","@babel/polyfill":"^7.7.0","@commitlint/cli":"^8.3.5","amex-jest-preset":"^6.0.1","rollup-plugin-re":"^1.0.7","semantic-release":"^17.0.2","@babel/preset-env":"^7.8.4","babel-preset-amex":"^3.3.0","eslint-config-amex":"^12.0.0","rollup-plugin-gzip":"^2.2.0","service-worker-mock":"^2.0.5","@rollup/plugin-babel":"^5.0.4","@rollup/plugin-buble":"^0.21.0","rollup-plugin-uglify":"^6.0.2","@semantic-release/git":"^9.0.0","@semantic-release/npm":"^7.0.2","rollup-plugin-cleanup":"^3.1.1","eslint-config-prettier":"^6.10.0","eslint-plugin-prettier":"^3.0.1","@rollup/plugin-node-resolve":"^8.0.1","@semantic-release/changelog":"^5.0.0","@commitlint/config-conventional":"^8.2.0","@semantic-release/commit-analyzer":"^8.0.1","@semantic-release/release-notes-generator":"^9.0.0"},"_npmOperationalInternal":{"tmp":"tmp/one-service-worker_1.0.4_1599041640209_0.8782301186118397","host":"s3://npm-registry-packages"}}},"time":{"created":"2020-03-27T17:32:56.520Z","modified":"2026-02-23T17:44:03.152Z","1.0.0":"2020-03-27T17:32:56.889Z","1.0.1":"2020-04-09T22:02:46.399Z","1.0.2":"2020-06-12T21:59:35.272Z","1.0.3":"2020-06-15T21:26:37.282Z","1.0.4":"2020-09-02T10:14:00.342Z"},"bugs":{"url":"https://github.com/americanexpress/one-service-worker/issues"},"license":"Apache-2.0","homepage":"https://github.com/americanexpress/one-service-worker","keywords":["sw","pwa","service worker","cache","offline","web-push","background-sync"],"repository":{"url":"git+https://github.com/americanexpress/one-service-worker.git","type":"git"},"description":"A service worker built for the modern web","contributors":[{"url":"https://github.com/anescobar1991","name":"Andres Escobar","email":"Andres.Escobar@aexp.com"},{"url":"https://github.com/JamesSingleton","name":"James Singleton","email":"James.Singleton1@aexp.com"},{"url":"https://github.com/10xLaCroixDrinker","name":"Jimmy King","email":"Jimmy.King@aexp.com"},{"url":"https://github.com/JAdshead","name":"Jonathan Adshead","email":"Jonathan.Adshead@aexp.com"},{"url":"https://github.com/Francois-Esquire","name":"Michael Tobia","email":"Michael.M.Tobia@aexp.com"},{"url":"https://github.com/mtomcal","name":"Michael Tomcal","email":"Michael.A.Tomcal@aexp.com"},{"url":"https://github.com/stephaniecoates","name":"Stephanie Coates","email":"Stephanie.Coates1@aexp.com"},{"url":"https://github.com/nellyk","name":"Nelly Kiboi","email":"Nelly.J.Kiboi@aexp.com"},{"url":"https://github.com/PixnBits","name":"Nickolas Oliver","email":"nickolas.oliver@aexp.com"}],"maintainers":[{"email":"i@pixnbits.org","name":"pixnbits"},{"email":"j_smart_foster@hotmail.com","name":"jsmartfo"},{"email":"tim@timisawesome.com","name":"tklever"},{"email":"bharatsurya.p@gmail.com","name":"bharatsurya"},{"email":"open-source-ops@aexp.com","name":"amexopensource"},{"email":"will.h.bishop@gmail.com","name":"hermesai"},{"email":"jonny.adshead@gmail.com","name":"jadshead"},{"email":"abacaphiliac@gmail.com","name":"abacaphiliac"}],"readme":"[contributing-agreement]: https://cla-assistant.io/americanexpress/one-service-worker\n[spec]: https://www.w3.org/TR/service-workers\n\n[license-doc]: ./LICENSE.txt\n[contrib-doc]: ./CONTRIBUTING.md\n[code-of-conduct-doc]: ./CODE_OF_CONDUCT.md\n\n[api-doc]: ./docs/api/README.md\n[recipes-doc]: ./docs/recipes/README.md\n[best-practices-doc]: ./docs/recipes/BestPractices.md\n\n<h1 align=\"center\">\n  <img src=\"./one-service-worker.png\" alt=\"one-service-worker - One Amex\" width=\"50%\" />\n</h1>\n\n[![npm](https://img.shields.io/npm/v/@americanexpress/one-service-worker)](https://www.npmjs.com/package/@americanexpress/one-service-worker)\n![npm bundle size](https://img.shields.io/bundlephobia/min/@americanexpress/one-service-worker?label=minified&style=flat-square)\n![CI](https://github.com/americanexpress/one-service-worker/workflows/CI/badge.svg)\n\nOne Service Worker is a minimal, light-weight, `Promise` based library that\nunifies the service worker and browser threads under one API; designed with\nthe [Service Worker living specification][spec] and with developers in mind.\n\n## 👩‍💻 Hiring 👨‍💻\n\nWant to get paid for your contributions to `@americanexpress/one-service-worker`?\n> Send your resume to oneamex.careers@aexp.com\n\n## 📖 Table of Contents\n\n* [Features](#-features)\n* [Documentation](#-documentation)\n  * [Guides](#-guides)\n  * [API](#-api)\n* [Usage](#-usage)\n  * [Installation](#-&#x1F680;-installation)\n  * [Importing](#-&#x1F69B;-importing)\n  * [Unpacking](#-&#x1F4E6;-unpacking)\n* [Quick Start](#-&#x1F3C3;-&#x2640;-quick-start-&#x1F3C3;-&#x2642;)\n* [Contributing](#-contributing)\n\n## ✨ Features\n\n* API as a functional toolbox to use in your JavaScript and Service Worker\n* core library was made with the [Service Worker spec][spec]\n* runtime extension to check environments and guard against errors\n* catalog of pre-fabricated middleware for writing flat, composable service worker scripts\n* caching extensions and cache management middleware for designing your cache\n* event extension to listen and respond to events\n* no dependencies\n\n## 📚 Documentation\n\n### **Recipes**\n\nWe have an assortment of recipes and guides to help out with use cases\nand usage patterns we recommend with the library:\n\n[**👉 Check out the various recipes and guides 👈**][recipes-doc]\n\n### **API**\n\nIf you're interested in learning more about the API or want to contribute,\nhere is an overview of what the library API is comprised of:\n\n[**👉 Check out the complete API catalogue 👈**][api-doc]\n\n## Usage\n\n### 🚀 **Installation**\n\n```bash\n$ npm install @americanexpress/one-service-worker --save\n\n# or\n\n$ yarn add @americanexpress/one-service-worker\n```\n\n### 🚛 **Importing**\n\n`one-service-worker` can be imported from multiple formats\nto match your building setup, all from the same entry-point.\n\n`esm`\n```js\nimport {\n  register,\n  isServiceWorkerSupported,\n} from '@americanexpress/one-service-worker';\n```\n\n`cjs`\n```js\nconst {\n  register,\n  isServiceWorkerSupported,\n} = require('@americanexpress/one-service-worker');\n```\n\n### 📦 **Unpacking**\n\n#### **Universal module definitions**\n\n`one-service-worker` comes with pre-built library bundles that are ready\nfor the browser to use.\nWith `umd` format scripts, the library will be added to the global scope\nas `oneServiceWorker` when included in a given execution context.\n\n`umd`\n```js\nconst { register, isServiceWorkerSupported } = (\n  self || window\n).oneServiceWorker;\n```\n\n#### `index.html`\n\n```html\n<html>\n  <body>\n    <script src=\"@americanexpress/one-service-worker/index.min.js\"></script>\n    <script>\n      const { register, postMessage } = window.oneServiceWorker;\n      await register('/sw.js', { scope: '/' });\n      await postMessage({ id: 'ping' });\n    </script>\n  </body>\n</html>\n```\n\n> There is a gzipped file `@americanexpress.../index.min.js.gz` for convenience;\n> both the minified and gzipped builds are sourced from the `index.umd.js` build output.\n\n#### `sw.js`\n\n```js\nimportScripts('@americanexpress/one-service-worker/index.min.js');\n\nconst { on, messageContext, messenger } = self.oneServiceWorker;\n\non('message', [\n  messageContext(),\n  messenger({\n    ping: event => {\n      /* perform asynchronous actions on message with id 'ping' */\n      event.waitUntil(Promise.resolve());\n    },\n  }),\n]);\n```\n\n> `importScripts` is a browser ( WebWorker ) construct and not understood by bundlers or `node.js`.\n> Without extra tooling, treat this path as if it is a relative path (or absolute url) to\n> your web/static server.\n\n#### **ES modules**\n\nWith `esm`, we can source `one-service-worker` library modules individually\nto get the most out of tree-shaking (when bundling).\nIt can help out with scoping a service worker into feature sets.\n\n#### `sw.js`\n\n```js\nimportScripts('/sw.caching.js');\n```\n\n#### `sw.caching.js`\n\n(via `@americanexpress/one-service-worker/es/`)\n\n```js\nimport { configure } from '@americanexpress/one-service-worker/es/runtime.js';\nimport { addAll } from '@americanexpress/one-service-worker/es/cache.js';\nimport { on } from '@americanexpress/one-service-worker/es/events.js';\n\nconfigure({\n  events: true,\n});\n\non('activate', event => {\n  event.waitUntil(addAll(['app.js', 'vendor.js', 'styles.css']));\n});\n```\n\n> the ES import/export syntax will not work in the service worker as it is,\n> as it requires bundling by a tool like `rollup` or `webpack`.\n\n#### `index.html`\n\n(or via `@americanexpress/one-service-worker/index.es.js`)\n\n```html\n<html>\n  <body>\n    <script type=\"module\">\n      import {\n        register,\n      } from '@americanexpress/one-service-worker/index.es.js';\n       await register('/sw.js', { scope: '/' });\n    </script>\n  </body>\n</html>\n```\n\n## 🏃‍♀️ Quick Start 🏃‍♂\n\n> Prerequisite: the service worker requires a secure origin using `https`.\n> For local development, we can use `localhost` with most browser vendors.\n\nBefore starting, please take the time to review our guide on\n[**`Best Practices`**][best-practices-doc].\n\n#### `sw.js` - Service Worker Thread\n\n```js\nimport {\n  configure,\n  skipWaiting,\n  clientsClaim,\n  appShell,\n  manifest,\n  precache,\n  cacheRouter,\n  escapeHatchRoute,\n  navigationPreloadActivation,\n  navigationPreloadResponse,\n} from '@americanexpress/one-service-worker';\n\n// to configure the library runtime, you can enable and disable features\nconfigure({\n  navigationPreload: true,\n});\n\n// ready-made middleware can help you\n// apply common patterns quickly\non('install', skipWaiting());\n\n// with `on`, we can bind to events as we normally would\n// with self.addEventListener(...), with the addition of\n// accepting an array of event handlers, creating a\n// middleware stack that share a context (more on that later)\non('activate', [\n  // whenever a service worker is activated,\n  // claiming the active clients is done to control\n  // the open windows/tabs without needing to reload\n  clientsClaim(),\n  // middleware can react to configuration\n  // and act based on settings, during the\n  // appropriate lifecycle\n  navigationPreloadActivation(),\n  // during activation (runs on installs and updates),\n  // we can ensure our precache store is ready for quick\n  // cache matching and offline fallback\n  precache(['client.js']),\n]);\n\n// we stack the middleware in the order\n// we want them performed\non('fetch', [\n  // if we ever need to bail out of using the service worker\n  // a fetch request or browser navigation to the given route\n  // and the service worker will be unregistered\n  escapeHatchRoute({ route: '/__sw/__escapeHatch' }),\n  // in the event of `event.preloadResponse`,\n  // we use it to respond and fallback to fetch\n  navigationPreloadResponse(),\n  // to support offline navigation, having an app shell gives\n  // us a fallback on navigation requests, while refreshing\n  // when online and when the shell route is matched\n  appShell({ route: '/index.html' }),\n  // middleware can be used to create a response\n  // without needing to go to the server and directly\n  // from the service worker\n  manifest(\n    {\n      name: 'my-app',\n      short_name: 'app',\n      start_url: '/index.html',\n      icons: [],\n    },\n    '/manifest.webmanifest',\n  ),\n  // router matching middleware for selecting\n  // which fetch traffic to cache and which to\n  // respond to from the cache\n  cacheRouter({\n    cacheName: 'js-cache',\n    match: ({ request }) => request.url.endsWith('.js'),\n  }),\n  // more advanced middleware will use event context\n  // to communicate between middleware. The cacheRouter\n  // adds { request, cacheName } to context on match for the\n  // expiration middleware to tag and manage for 7 days\n  expiration({ maxAge: 7 * 24 * 60 * 60 * 1000 }),\n]);\n```\n\n#### `client.js` - Main Thread\n\n```js\nimport {\n  once,\n  register,\n  isServiceWorkerSupported,\n} from '@americanexpress/one-service-worker';\n\n// guard against unsupported features\nif (isServiceWorkerSupported()) {\n  // first thing we need to do is\n  // install the service worker\n  register('/sw.js', {\n    scope: '/',\n    updateViaCache: 'none',\n  })\n    .catch(console.error)\n    .then(console.log);\n\n  once('registration', function onRegistration(registration) {\n    fetch('/manifest.webmanifest')\n      .then(response => response.json())\n      .then(console.log);\n  });\n} else {\n  // do nothing and inform dependents on lack of support\n}\n```\n\n## 🏆 Contributing\n\nWe welcome Your interest in the American Express Open Source Community on Github.\nAny Contributor to any Open Source Project managed by the American Express Open\nSource Community must accept and sign an Agreement indicating agreement to the\nterms below. Except for the rights granted in this Agreement to American Express\nand to recipients of software distributed by American Express, You reserve all\nright, title, and interest, if any, in and to Your Contributions. Please\n[fill out the Agreement][contributing-agreement].\n\nPlease feel free to open pull requests and see\n[CONTRIBUTING.md][contrib-doc] to learn how to get started contributing.\n\n## 🗝️ License\n\nAny contributions made under this project will be governed by the\n[Apache License 2.0][license-doc].\n\n## 🗣️ Code of Conduct\n\nThis project adheres to the\n[American Express Community Guidelines][code-of-conduct-doc].\nBy participating, you are expected to honor these guidelines.\n","readmeFilename":"README.md"}