{"_id":"@australiangreens/ag-error","_rev":"14-773eeb71d15ebe0eaa7af48b20019b68","name":"@australiangreens/ag-error","dist-tags":{"latest":"0.4.1"},"versions":{"0.1.5":{"name":"@australiangreens/ag-error","version":"0.1.5","author":{"name":"The Australian Greens","email":"webops@greens.org.au"},"license":"MIT","_id":"@australiangreens/ag-error@0.1.5","maintainers":[{"name":"johntwyman","email":"john.twyman@greens.org.au"},{"name":"ineffyble","email":"dev@effy.is"},{"name":"anthonyblond","email":"anthony@unfinishedteleporter.com"}],"contributors":[{"name":"Anthony Blond","email":"anthony@unfinishedteleporter.com"}],"homepage":"https://github.com/australiangreens/ag-error#readme","dist":{"shasum":"2fab17761a74440021bfae6d9d799dfd4d61f335","tarball":"https://registry.npmjs.org/@australiangreens/ag-error/-/ag-error-0.1.5.tgz","fileCount":29,"integrity":"sha512-CmCsfVCH4vV+Zz784ncIrvwXUISrZjHW4j9kCAoAF2vzXwfn4BtThfAlLmoF14DK6o6sIRCpxbIct6i0t1SHLA==","signatures":[{"sig":"MEQCIC74iKbzKeNrzn3uQHb9UecjnWjV/vytS9GlKUO7Wko7AiAqGlG6SvJkRzjADU3U6d9lsM0YPTcRDlLtKO2SxkRZ1Q==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":54429},"main":"./dist/cjs/index.js","type":"module","types":"./dist/esm/index.d.ts","module":"./dist/esm/index.js","exports":{".":{"import":"./dist/esm/index.js","require":"./dist/cjs/index.js"}},"scripts":{"test":"node --es-module-specifier-resolution=node node_modules/jest/bin/jest.js","build":"yarn build:esm && yarn build:cjs && ./fixup.sh","eslint":"eslint --max-warnings 0 src","prepack":"yarn eslint && yarn test && yarn build:force","build:cjs":"tsc --project ./tsconfig-cjs.json","build:esm":"tsc --project ./tsconfig.json","test:watch":"yarn test --watch","build:force":"rm -r ./dist; yarn build:esm && yarn build:cjs && ./fixup.sh","test:coverage":"yarn test --coverage"},"_npmUser":{"name":"anthonyblond","email":"anthony@unfinishedteleporter.com"},"repository":{"url":"https://github.com/australiangreens/ag-error.git","type":"git"},"description":"Provides an AgError class to be used as part of a consistent error pattern across AG's backend and frontend js/ts apps.","directories":{},"sideEffects":false,"_hasShrinkwrap":false,"devDependencies":{"jest":"^27.2.4","eslint":"^7.32.0","ts-jest":"^27.0.5","typescript":"^4.3.5","@types/jest":"^27.0.2","jest-extended":"^0.11.5","eslint-plugin-tsdoc":"^0.2.14","eslint-plugin-import":"^2.24.0","@typescript-eslint/parser":"^4.29.2","@australiangreens/ag-error-jest":"^0.1.8","eslint-config-airbnb-typescript":"^12.3.1","@typescript-eslint/eslint-plugin":"^4.29.2"},"_npmOperationalInternal":{"tmp":"tmp/ag-error_0.1.5_1633917698419_0.2419032581729783","host":"s3://npm-registry-packages"}},"0.1.6":{"name":"@australiangreens/ag-error","version":"0.1.6","author":{"name":"The Australian Greens","email":"webops@greens.org.au"},"license":"MIT","_id":"@australiangreens/ag-error@0.1.6","maintainers":[{"name":"johntwyman","email":"john.twyman@greens.org.au"},{"name":"ineffyble","email":"dev@effy.is"},{"name":"anthonyblond","email":"anthony@unfinishedteleporter.com"}],"contributors":[{"name":"Anthony Blond","email":"anthony@unfinishedteleporter.com"}],"homepage":"https://github.com/australiangreens/ag-error#readme","dist":{"shasum":"19c37468d472a6062778729a0ac00a6498343d8a","tarball":"https://registry.npmjs.org/@australiangreens/ag-error/-/ag-error-0.1.6.tgz","fileCount":29,"integrity":"sha512-wtTCiZm6v1a1V4TaGJnwQU7FZmtCAeQLHEgs96VxU3SDn42R/QDYoQg3Pcf0z92DvfFyMpPkMSC9H05kPOCNkQ==","signatures":[{"sig":"MEYCIQDU4sQnCQ2TwLeEew36Tv6shBzZwYfvIQTIJpkZMBfQXQIhAL1QMjz20f2ZBLujtKrAlSPeultLJuGCM9pPijrnwgSF","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":54429},"main":"./dist/cjs/index.js","type":"module","types":"./dist/esm/index.d.ts","module":"./dist/esm/index.js","exports":{".":{"import":"./dist/esm/index.js","require":"./dist/cjs/index.js"}},"scripts":{"test":"node --es-module-specifier-resolution=node node_modules/jest/bin/jest.js","build":"yarn build:esm && yarn build:cjs && ./fixup.sh","eslint":"eslint --max-warnings 0 src","prepack":"yarn eslint && yarn test && yarn build:force","build:cjs":"tsc --project ./tsconfig-cjs.json","build:esm":"tsc --project ./tsconfig.json","test:watch":"yarn test --watch","build:force":"rm -r ./dist; yarn build:esm && yarn build:cjs && ./fixup.sh","test:coverage":"yarn test --coverage"},"_npmUser":{"name":"anthonyblond","email":"anthony@unfinishedteleporter.com"},"repository":{"url":"https://github.com/australiangreens/ag-error.git","type":"git"},"description":"Provides an AgError class to be used as part of a consistent error pattern across AG's backend and frontend js/ts apps.","directories":{},"sideEffects":false,"_hasShrinkwrap":false,"devDependencies":{"jest":"^27.2.4","eslint":"^7.32.0","ts-jest":"^27.0.5","typescript":"^4.3.5","@types/jest":"^27.0.2","jest-extended":"^0.11.5","eslint-plugin-tsdoc":"^0.2.14","eslint-plugin-import":"^2.24.0","@typescript-eslint/parser":"^4.29.2","@australiangreens/ag-error-jest":"^0.1.8","eslint-config-airbnb-typescript":"^12.3.1","@typescript-eslint/eslint-plugin":"^4.29.2"},"_npmOperationalInternal":{"tmp":"tmp/ag-error_0.1.6_1633917982219_0.5996786501559437","host":"s3://npm-registry-packages"}},"0.1.7":{"name":"@australiangreens/ag-error","version":"0.1.7","author":{"name":"The Australian Greens","email":"webops@greens.org.au"},"license":"MIT","_id":"@australiangreens/ag-error@0.1.7","maintainers":[{"name":"johntwyman","email":"john.twyman@greens.org.au"},{"name":"ineffyble","email":"dev@effy.is"},{"name":"anthonyblond","email":"anthony@unfinishedteleporter.com"}],"contributors":[{"name":"Anthony Blond","email":"anthony@unfinishedteleporter.com"}],"homepage":"https://github.com/australiangreens/ag-error#readme","dist":{"shasum":"213fb898122876335cd51836aaea16d9c2103923","tarball":"https://registry.npmjs.org/@australiangreens/ag-error/-/ag-error-0.1.7.tgz","fileCount":29,"integrity":"sha512-ltcA6ZZ4vpx2mx9ogWnUcXMCLw3KiM4gr63HzzSp9hf6Wk+30WulXPZYo4O8270dyqsm4JOtO973ueR2/x8jZg==","signatures":[{"sig":"MEUCIDmyqGWGg02dSdgPEUNUGeL6EeUyhKMJl/7k/dI8TXITAiEAhT9unJYoqAqs5OJD6fzEWiHSW6BDQksOz5JfYszQlWA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":54481,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhzGnMCRA9TVsSAnZWagAATnoP/1aKblOcT3ehAljGBXac\nEMt5QqaHIJOuR3mv98pedqInz+MzUfLlRryMGn/NjSJvJ9s9bXsUynP10yzS\nElTsh+jXECJQ2EkiR2ezDN5DXDW5JWeBM0oZ2ovMlXk/5Izz3vtLH2YUQbGU\nF+zMGNtVgNUZXCIaI3Ll2Dbj7AxFeYg/ohWYHa+c9wS+p91co+ULyFKDBDFN\nDAhjgNEJnSbE7KexxVTVhM/Nkwns9SOkchqXxOJ7BvjS/K2JC1ui+KIWM66E\n76IPLQzKP7HlrjeXJdXD7LerYY5RmBvNau9vwjcsAaeuOS0rZwzc73uHwnHb\nGBIJyHo94j9/x3PVNS66VSbUm5eSkxosCZs3tC7HHYYtyf/9Ekchj27Y90U5\n3IzKY+p4Dxh48vaZh+Cb3YUWGhMQgQhj7tbaFLt6ALo/A8m2wFBbLAeOS51S\nIkwIDJpoCE7nT+58zsqlEbSV8ihQEy3cuawERBp/imP3QuRW2XPXV65XU777\nZV1HNxE1CWhVmPvL442YA7Cde7EiPwpzLohbvFaUS/56tHzAK7bb+b+3DHj1\nvpziGWAcLbWQssBt3Lt/qP8KG9q14EDMteozWvjHxdmZpdyYHMBPNlByhiGA\nmFFTAWYVgdM4MZPcl0LFjfnlLqtk3YjMcssNmPJYW5MYib7pPMiddozbyLZ4\nBrPr\r\n=oJqt\r\n-----END PGP SIGNATURE-----\r\n"},"main":"./dist/cjs/index.js","type":"module","types":"./dist/esm/index.d.ts","module":"./dist/esm/index.js","exports":{".":{"import":"./dist/esm/index.js","require":"./dist/cjs/index.js"}},"scripts":{"test":"node --es-module-specifier-resolution=node node_modules/jest/bin/jest.js","build":"yarn build:esm && yarn build:cjs && ./fixup.sh","eslint":"eslint --max-warnings 0 src","prepack":"yarn eslint && yarn test && yarn build:force","build:cjs":"tsc --project ./tsconfig-cjs.json","build:esm":"tsc --project ./tsconfig.json","test:watch":"yarn test --watch","build:force":"rm -r ./dist; yarn build:esm && yarn build:cjs && ./fixup.sh","test:coverage":"yarn test --coverage"},"_npmUser":{"name":"anthonyblond","email":"anthony@unfinishedteleporter.com"},"repository":{"url":"https://github.com/australiangreens/ag-error.git","type":"git"},"description":"Provides an AgError class to be used as part of a consistent error pattern across AG's backend and frontend js/ts apps.","directories":{},"sideEffects":false,"_hasShrinkwrap":false,"devDependencies":{"jest":"^27.2.4","eslint":"^7.32.0","ts-jest":"^27.0.5","typescript":"^4.3.5","@types/jest":"^27.0.2","jest-extended":"^0.11.5","eslint-plugin-tsdoc":"^0.2.14","eslint-plugin-import":"^2.24.0","@typescript-eslint/parser":"^4.29.2","@australiangreens/ag-error-jest":"^0.1.8","eslint-config-airbnb-typescript":"^12.3.1","@typescript-eslint/eslint-plugin":"^4.29.2"},"_npmOperationalInternal":{"tmp":"tmp/ag-error_0.1.7_1633936965124_0.22491452959315272","host":"s3://npm-registry-packages"}},"0.2.0":{"name":"@australiangreens/ag-error","version":"0.2.0","author":{"name":"The Australian Greens","email":"webops@greens.org.au"},"license":"MIT","_id":"@australiangreens/ag-error@0.2.0","maintainers":[{"name":"ineffyble","email":"dev@effy.is"},{"name":"anthonyblond","email":"anthony@unfinishedteleporter.com"},{"name":"johntwyman","email":"john.twyman@greens.org.au"},{"name":"australiangreens-cicd","email":"webops@greens.org.au"},{"name":"peterkmurphy-ag","email":"peter.murphy@greens.org.au"}],"contributors":[{"name":"Anthony Blond","email":"anthony@unfinishedteleporter.com"}],"homepage":"https://github.com/australiangreens/ag-error#readme","bugs":{"url":"https://github.com/australiangreens/ag-error/issues"},"dist":{"shasum":"f37f83c5fdc54718227f83e63a6e96fd609953cf","tarball":"https://registry.npmjs.org/@australiangreens/ag-error/-/ag-error-0.2.0.tgz","fileCount":24,"integrity":"sha512-4PmPloQNvJ5S6R3iKrTRravbA7owLUTF885hNiNdxz2GuRfMzvgzgymJsegFa+/bHcBgibWoU+9vUwIhm03VoQ==","signatures":[{"sig":"MEUCIQCQHm0RrOK+izsuixwyRex1g4djPq13JzslnHbrEedL8QIgBCN32lDjtGYTrZ9aJx5T1plRsX71UwzEkoqhDS6is7E=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":54242},"main":"./dist/cjs/index.js","type":"module","_from":"file:australiangreens-ag-error-0.2.0.tgz","types":"./dist/esm/index.d.ts","module":"./dist/esm/index.js","engines":{"node":">=24"},"exports":{".":{"import":"./dist/esm/index.js","require":"./dist/cjs/index.js"}},"scripts":{"lint":"eslint --max-warnings 0 src","ship":"pnpm publish --no-git-checks","test":"jest","build":"pnpm build:esm && pnpm build:cjs && ./fixup.sh","release":"node scripts/release.js","build:cjs":"tsc --project ./tsconfig-cjs.json","build:esm":"tsc --project ./tsconfig.json","test:watch":"pnpm test --watch","build:force":"rm -rf ./dist && pnpm build:esm && pnpm build:cjs && ./fixup.sh","test:coverage":"pnpm test --coverage"},"_npmUser":{"name":"peterkmurphy-ag","email":"peter.murphy@greens.org.au"},"_resolved":"/tmp/1ab83a87ba6f07cd7f099c7a4f2a6c95/australiangreens-ag-error-0.2.0.tgz","_integrity":"sha512-4PmPloQNvJ5S6R3iKrTRravbA7owLUTF885hNiNdxz2GuRfMzvgzgymJsegFa+/bHcBgibWoU+9vUwIhm03VoQ==","repository":{"url":"git+https://github.com/australiangreens/ag-error.git","type":"git"},"_npmVersion":"11.17.0","description":"Provides an AgError class to be used as part of a consistent error pattern across AG's backend and frontend js/ts apps.","directories":{},"sideEffects":false,"_nodeVersion":"24.19.0","_hasShrinkwrap":false,"devDependencies":{"jest":"^30.0.0","eslint":"^9.36.0","ts-jest":"^29.4.0","jest-mock":"^30.0.0","typescript":"^6.0.0","@types/jest":"^30.0.0","@types/node":"^24.0.0","jest-extended":"^6.0.0","typescript-eslint":"^8.0.0","@australiangreens/ag-error-jest":"^0.1.8"},"_npmOperationalInternal":{"tmp":"tmp/ag-error_0.2.0_1786430594300_0.8920004391090346","host":"s3://npm-registry-packages-npm-production"}},"0.2.1":{"name":"@australiangreens/ag-error","version":"0.2.1","author":{"name":"The Australian Greens","email":"webops@greens.org.au"},"license":"MIT","_id":"@australiangreens/ag-error@0.2.1","maintainers":[{"name":"ineffyble","email":"dev@effy.is"},{"name":"anthonyblond","email":"anthony@unfinishedteleporter.com"},{"name":"johntwyman","email":"john.twyman@greens.org.au"},{"name":"australiangreens-cicd","email":"webops@greens.org.au"},{"name":"peterkmurphy-ag","email":"peter.murphy@greens.org.au"}],"contributors":[{"name":"Anthony Blond","email":"anthony@unfinishedteleporter.com"}],"homepage":"https://github.com/australiangreens/ag-error#readme","bugs":{"url":"https://github.com/australiangreens/ag-error/issues"},"dist":{"shasum":"7af88c78443cae2fe187fcaa19a57727fc76eeb7","tarball":"https://registry.npmjs.org/@australiangreens/ag-error/-/ag-error-0.2.1.tgz","fileCount":24,"integrity":"sha512-2mQ8zBgmIhUqp2ukEeMn6v+FqLPQpqkmpDx+F5lgL+H3MDNEqFWMO3gN4X3cei2qxhs7rcr/gd93zF7uZkSIBA==","signatures":[{"sig":"MEUCID/TYHSJU3eMNMvoKPyYBkeJSoS5Mfp2RjicUfpX/yIWAiEA7jKOTOw1Sx1IVJbcFlkRnm5M9jJMbprl2jEWtRr2SRw=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":54242},"main":"./dist/cjs/index.js","type":"module","_from":"file:australiangreens-ag-error-0.2.1.tgz","types":"./dist/esm/index.d.ts","module":"./dist/esm/index.js","engines":{"node":">=24"},"exports":{".":{"import":"./dist/esm/index.js","require":"./dist/cjs/index.js"}},"scripts":{"lint":"eslint --max-warnings 0 src","ship":"pnpm publish --no-git-checks","test":"jest","build":"pnpm build:esm && pnpm build:cjs && ./fixup.sh","release":"node scripts/release.js","build:cjs":"tsc --project ./tsconfig-cjs.json","build:esm":"tsc --project ./tsconfig.json","test:watch":"pnpm test --watch","build:force":"rm -rf ./dist && pnpm build:esm && pnpm build:cjs && ./fixup.sh","test:coverage":"pnpm test --coverage"},"_npmUser":{"name":"peterkmurphy-ag","email":"peter.murphy@greens.org.au"},"_resolved":"/tmp/3c094692b0b5caf1ed1e116091a2c643/australiangreens-ag-error-0.2.1.tgz","_integrity":"sha512-2mQ8zBgmIhUqp2ukEeMn6v+FqLPQpqkmpDx+F5lgL+H3MDNEqFWMO3gN4X3cei2qxhs7rcr/gd93zF7uZkSIBA==","repository":{"url":"git+https://github.com/australiangreens/ag-error.git","type":"git"},"_npmVersion":"11.17.0","description":"Provides an AgError class to be used as part of a consistent error pattern across AG's backend and frontend js/ts apps.","directories":{},"sideEffects":false,"_nodeVersion":"24.19.0","_hasShrinkwrap":false,"devDependencies":{"jest":"^30.0.0","eslint":"^9.36.0","ts-jest":"^29.4.0","jest-mock":"^30.0.0","typescript":"^6.0.0","@types/jest":"^30.0.0","@types/node":"^24.0.0","jest-extended":"^7.0.0","typescript-eslint":"^8.0.0","@australiangreens/ag-error-jest":"^0.3.0"},"_npmOperationalInternal":{"tmp":"tmp/ag-error_0.2.1_1786579863939_0.270183309887311","host":"s3://npm-registry-packages-npm-production"}},"0.3.0":{"name":"@australiangreens/ag-error","version":"0.3.0","author":{"name":"The Australian Greens","email":"webops@greens.org.au"},"license":"MIT","_id":"@australiangreens/ag-error@0.3.0","maintainers":[{"name":"ineffyble","email":"dev@effy.is"},{"name":"anthonyblond","email":"anthony@unfinishedteleporter.com"},{"name":"johntwyman","email":"john.twyman@greens.org.au"},{"name":"australiangreens-cicd","email":"webops@greens.org.au"},{"name":"peterkmurphy-ag","email":"peter.murphy@greens.org.au"}],"contributors":[{"name":"Anthony Blond","email":"anthony@unfinishedteleporter.com"}],"homepage":"https://github.com/australiangreens/ag-error#readme","bugs":{"url":"https://github.com/australiangreens/ag-error/issues"},"dist":{"shasum":"f997ff5a7fdaf85112ffe66e5a622cea84b2ae90","tarball":"https://registry.npmjs.org/@australiangreens/ag-error/-/ag-error-0.3.0.tgz","fileCount":24,"integrity":"sha512-avPPPXVyxbhpSPLqoWUxo6NXJFUiWFmrQMdI9RcWu3uFG8Btd80QMlshCqJmXq3RkESGVgsN4n6J4ungLiIwvA==","signatures":[{"sig":"MEQCIGuEs6LDT1eycVTYh6aKRyg0Cp+WN3dH8yIdn+iKFhrrAiBgykgqzXOS7htEHkvs56boJOTSyJgv698xv86SE/5HHw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":54242},"main":"./dist/cjs/index.js","type":"module","_from":"file:australiangreens-ag-error-0.3.0.tgz","types":"./dist/esm/index.d.ts","module":"./dist/esm/index.js","engines":{"node":">=24"},"exports":{".":{"import":"./dist/esm/index.js","require":"./dist/cjs/index.js"}},"scripts":{"lint":"eslint --max-warnings 0 src","ship":"pnpm publish --no-git-checks","test":"jest","build":"pnpm build:esm && pnpm build:cjs && ./fixup.sh","release":"node scripts/release.js","build:cjs":"tsc --project ./tsconfig-cjs.json","build:esm":"tsc --project ./tsconfig.json","test:watch":"pnpm test --watch","build:force":"rm -rf ./dist && pnpm build:esm && pnpm build:cjs && ./fixup.sh","test:coverage":"pnpm test --coverage"},"_npmUser":{"name":"peterkmurphy-ag","email":"peter.murphy@greens.org.au"},"_resolved":"/tmp/5d4b0472a4f9c031f144dda770896fcd/australiangreens-ag-error-0.3.0.tgz","_integrity":"sha512-avPPPXVyxbhpSPLqoWUxo6NXJFUiWFmrQMdI9RcWu3uFG8Btd80QMlshCqJmXq3RkESGVgsN4n6J4ungLiIwvA==","repository":{"url":"git+https://github.com/australiangreens/ag-error.git","type":"git"},"_npmVersion":"11.17.0","description":"Provides an AgError class to be used as part of a consistent error pattern across AG's backend and frontend js/ts apps.","directories":{},"sideEffects":false,"_nodeVersion":"24.19.0","_hasShrinkwrap":false,"devDependencies":{"jest":"^30.0.0","eslint":"^10.8.1","ts-jest":"^29.4.0","jest-mock":"^30.0.0","typescript":"^6.0.0","@types/jest":"^30.0.0","@types/node":"^24.0.0","jest-extended":"^7.0.0","typescript-eslint":"^8.0.0","@australiangreens/ag-error-jest":"^0.4.0"},"_npmOperationalInternal":{"tmp":"tmp/ag-error_0.3.0_1786924859353_0.5217145006698216","host":"s3://npm-registry-packages-npm-production"}},"0.4.0":{"name":"@australiangreens/ag-error","version":"0.4.0","author":{"name":"The Australian Greens","email":"webops@greens.org.au"},"license":"MIT","_id":"@australiangreens/ag-error@0.4.0","maintainers":[{"name":"ineffyble","email":"dev@effy.is"},{"name":"anthonyblond","email":"anthony@unfinishedteleporter.com"},{"name":"johntwyman","email":"john.twyman@greens.org.au"},{"name":"australiangreens-cicd","email":"webops@greens.org.au"},{"name":"peterkmurphy-ag","email":"peter.murphy@greens.org.au"}],"contributors":[{"name":"Anthony Blond","email":"anthony@unfinishedteleporter.com"}],"homepage":"https://github.com/australiangreens/ag-error#readme","bugs":{"url":"https://github.com/australiangreens/ag-error/issues"},"dist":{"shasum":"5380c4254fca9182c0d42a9fe3e16763d83a1354","tarball":"https://registry.npmjs.org/@australiangreens/ag-error/-/ag-error-0.4.0.tgz","fileCount":24,"integrity":"sha512-t0WFT7iAWa793GrrsVAFgu2R8s4F7uoRFfGpazUGq3kYn4CywuBqM6HtGENnylC3qvs4M5m+SU2hQ69P3QMBrw==","signatures":[{"sig":"MEUCIFgmDgaOr3QGiHqsypYCZTnRjPPCREnjT7264dJMksskAiEAq3FVUVLsFL+hGZIY6AYxDuzJLNp9i3NSSFuLolCkF0Y=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":54194},"main":"./dist/cjs/index.js","type":"module","_from":"file:australiangreens-ag-error-0.4.0.tgz","types":"./dist/esm/index.d.ts","module":"./dist/esm/index.js","engines":{"node":">=24"},"exports":{".":{"import":"./dist/esm/index.js","require":"./dist/cjs/index.js"}},"scripts":{"lint":"eslint --max-warnings 0 src","ship":"pnpm publish --no-git-checks","test":"vitest run","build":"pnpm build:esm && pnpm build:cjs && ./fixup.sh","release":"node scripts/release.js","build:cjs":"tsc --project ./tsconfig-cjs.json","build:esm":"tsc --project ./tsconfig.json","test:watch":"vitest","build:force":"rm -rf ./dist && pnpm build:esm && pnpm build:cjs && ./fixup.sh","test:coverage":"vitest run --coverage"},"_npmUser":{"name":"peterkmurphy-ag","email":"peter.murphy@greens.org.au"},"_resolved":"/tmp/86471fbfe444b70af6d181163db0fcbe/australiangreens-ag-error-0.4.0.tgz","_integrity":"sha512-t0WFT7iAWa793GrrsVAFgu2R8s4F7uoRFfGpazUGq3kYn4CywuBqM6HtGENnylC3qvs4M5m+SU2hQ69P3QMBrw==","repository":{"url":"git+https://github.com/australiangreens/ag-error.git","type":"git"},"_npmVersion":"11.17.0","description":"Provides an AgError class to be used as part of a consistent error pattern across AG's backend and frontend js/ts apps.","directories":{},"sideEffects":false,"_nodeVersion":"24.19.0","_hasShrinkwrap":false,"devDependencies":{"eslint":"^10.8.1","vitest":"^4.1.10","typescript":"^6.0.0","@types/node":"^24.0.0","jest-extended":"^7.0.0","typescript-eslint":"^8.0.0","@vitest/coverage-v8":"^4.1.10","@australiangreens/ag-error-jest":"^0.4.0"},"_npmOperationalInternal":{"tmp":"tmp/ag-error_0.4.0_1786926625774_0.9752110635496429","host":"s3://npm-registry-packages-npm-production"}},"0.4.1":{"name":"@australiangreens/ag-error","version":"0.4.1","description":"Provides an AgError class to be used as part of a consistent error pattern across AG's backend and frontend js/ts apps.","author":{"name":"The Australian Greens","email":"webops@greens.org.au"},"contributors":[{"name":"Anthony Blond","email":"anthony@unfinishedteleporter.com"}],"license":"MIT","homepage":"https://github.com/australiangreens/ag-error#readme","repository":{"type":"git","url":"git+https://github.com/australiangreens/ag-error.git"},"type":"module","main":"./dist/cjs/index.js","module":"./dist/esm/index.js","exports":{".":{"import":"./dist/esm/index.js","require":"./dist/cjs/index.js"}},"types":"./dist/esm/index.d.ts","sideEffects":false,"engines":{"node":">=24"},"devDependencies":{"@australiangreens/ag-error-jest":"^0.5.0","@types/node":"^24.0.0","@vitest/coverage-v8":"^4.1.11","eslint":"^10.9.0","jest-extended":"^7.0.0","typescript":"^6.0.0","typescript-eslint":"^8.0.0","vitest":"^4.1.11"},"scripts":{"build:esm":"tsc --project ./tsconfig.json","build:cjs":"tsc --project ./tsconfig-cjs.json","build":"pnpm build:esm && pnpm build:cjs && ./fixup.sh","build:force":"rm -rf ./dist && pnpm build:esm && pnpm build:cjs && ./fixup.sh","lint":"eslint --max-warnings 0 src","test":"vitest run","test:watch":"vitest","test:coverage":"vitest run --coverage","release":"node scripts/release.js","ship":"pnpm publish --no-git-checks"},"_id":"@australiangreens/ag-error@0.4.1","bugs":{"url":"https://github.com/australiangreens/ag-error/issues"},"_integrity":"sha512-+5lbQfBuZzVXK1lqi2yKPIKh2XziyjYAnzYHPTrOJ1v7gsii/NdVp0qBkTQpjfeiR3cqWpL3hXangiHxtIrsIw==","_resolved":"/tmp/822483e4fafdc46640a02e2e8d8b07d9/australiangreens-ag-error-0.4.1.tgz","_from":"file:australiangreens-ag-error-0.4.1.tgz","_nodeVersion":"24.16.0","_npmVersion":"11.13.0","dist":{"integrity":"sha512-+5lbQfBuZzVXK1lqi2yKPIKh2XziyjYAnzYHPTrOJ1v7gsii/NdVp0qBkTQpjfeiR3cqWpL3hXangiHxtIrsIw==","shasum":"691c7c0da9d3c852059f759995cc9c835aa1d01b","tarball":"https://registry.npmjs.org/@australiangreens/ag-error/-/ag-error-0.4.1.tgz","fileCount":24,"unpackedSize":54194,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQCasubh21kesVUkW7z2BMKOr6S1M3AXLCw2ypncfSHAUQIgU20wKpD5Q9MWZ1nTQkhM+ymHMkY+ZMV4kkf9dTCPnQ4="}]},"_npmUser":{"name":"johntwyman","email":"john.twyman@greens.org.au"},"directories":{},"maintainers":[{"name":"ineffyble","email":"dev@effy.is"},{"name":"anthonyblond","email":"anthony@unfinishedteleporter.com"},{"name":"johntwyman","email":"john.twyman@greens.org.au"},{"name":"australiangreens-cicd","email":"webops@greens.org.au"},{"name":"peterkmurphy-ag","email":"peter.murphy@greens.org.au"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/ag-error_0.4.1_1787816397624_0.052861038690902085"},"_hasShrinkwrap":false}},"time":{"created":"2021-10-11T02:01:38.363Z","modified":"2026-08-27T07:39:57.903Z","0.1.5":"2021-10-11T02:01:38.683Z","0.1.6":"2021-10-11T02:06:22.363Z","0.1.7":"2021-10-11T07:22:45.239Z","0.2.0":"2026-08-11T06:43:14.459Z","0.2.1":"2026-08-13T00:11:04.112Z","0.3.0":"2026-08-17T00:00:59.499Z","0.4.0":"2026-08-17T00:30:25.918Z","0.4.1":"2026-08-27T07:39:57.735Z"},"bugs":{"url":"https://github.com/australiangreens/ag-error/issues"},"author":{"name":"The Australian Greens","email":"webops@greens.org.au"},"license":"MIT","homepage":"https://github.com/australiangreens/ag-error#readme","repository":{"type":"git","url":"git+https://github.com/australiangreens/ag-error.git"},"description":"Provides an AgError class to be used as part of a consistent error pattern across AG's backend and frontend js/ts apps.","contributors":[{"name":"Anthony Blond","email":"anthony@unfinishedteleporter.com"}],"maintainers":[{"name":"ineffyble","email":"dev@effy.is"},{"name":"anthonyblond","email":"anthony@unfinishedteleporter.com"},{"name":"johntwyman","email":"john.twyman@greens.org.au"},{"name":"australiangreens-cicd","email":"webops@greens.org.au"},{"name":"peterkmurphy-ag","email":"peter.murphy@greens.org.au"}],"readme":"# ag-error\n\nProvides an AgError class to be used as part of a consistent error pattern\nacross AG's backend and frontend js/ts apps.\n\nSpecifically, exposes `name` getter which will be informative regardless of code\nminification or other renaming and `hierachical` getter which will be the full\nclass path starting at AgError. For example\n\"AgError:SomeBaseAppError:FooApiError\".\n\nIf using jest, it is recommended\n[@australiangreens/ag-error-jest](https://www.npmjs.com/package/@australiangreens/ag-error-jest)\nalso be installed as a dev dependency to write tests for the subclasses.\n\n## Installation\n\nWith pnpm:\n\n```sh\npnpm add @australiangreens/ag-error\n```\n\nWith npm:\n\n```sh\nnpm install @australiangreens/ag-error\n```\n\n## Usage\n\nDefine your errors as extending the AgError superclass, with the requirement\nthat they all have a static `errorName` property that matches the class name\nand filename.\n\nFor example\n\n```ts\n// In SomeAppError.ts\nimport { AgError } from '@australiangreens/ag-error';\n\nexport class SomeBaseAppError extends AgError {\n  static errorName = 'SomeBaseAppError';\n}\n\n// In FooApiError.ts\nimport { SomeBaseAppError } from './SomeBaseAppError';\n\nexport class FooApiError extends SomeBaseAppError {\n  static errorName = 'FooApiError';\n}\n```\n\nThen\n\n```ts\nimport { SomeBaseAppError } from '../SomeBaseAppError';\nimport { FooApiError } from '../FooApiError';\n\nconst err1 = new SomeBaseAppError('Something bad');\nconst err2 = new FooApiError('Also bad');\n\nconsole.log(err1.name); // => 'SomeBaseAppError'\nconsole.log(err2.name); // => 'FooApiError'\n\nconsole.log(err1.hierachicalName); // => 'AgError:SomeBaseAppError'\nconsole.log(err1.hierachicalName); // => 'AgError:SomeBaseAppError:FooApiError'\n```\n\nThis is useful when catching errors and using their name and hierachical name\nin error logs and in error messages/objects communicated between the API of\ndifferent apps.\n\n### Extra data\n\nCan have a subclass with extra data attached. This should be added as 2nd, 3rd\netc arguments after the message. The first argument should always be maintained\nas an optional message (doesn't matter what the default is).\n\nNote that if you add extra arguments, you will not be able use the custom\n`toBeValidAgErrorClass()` jest matcher (below).\n\n## Testing\n\n*If using jest and just want to get it working, skip to [the next section](#ag-error-jest)*\n\nIdeally you should have unit tests for each subclass of AgError, confirming\nthat:\n\n1. Objects of the class have the expected value for their name;\n2. Object of the class have the expected value for their hierarchicalName;\n3. The value of name is not dependent on the source class (i.e constructor.name)\n   The motivation for the final requirement is to ensure the error information\n   will work even if the code is minified or obsfucated.\n\nThe tests are primarily to just to mitigate the chance of typos. You may find\nthem redundant depending on your workflow.\n\n### ag-error-jest\n\nTo make testing simpler, if using [jest](https://jestjs.io/), a custom matcher\ncalled `toBeValidAgErrorClass()` is by the related `ag-error-jest`. This will do\nall the tests nececesary in one go, and is what `ag-error` uses internally.\n\n#### Installing ag-error-jest\n\nWith pnpm:\n\n```sh\npnpm add -D @australiangreens/ag-error-jest\n```\n\nWith npm:\n\n```sh\nnpm install --save-dev @australiangreens/ag-error-jest\n```\n\n#### Setup of ag-error-jest\n\nMaking use of the package once installs works in the same way as\n[jest-extended](https://github.com/jest-community/jest-extended), relying on\nside-effects. Add `@australiangreens/ag-error-jest` to your jest\n`setupFilesAfterEnv` configuration property. See [the jest\ndocs](https://jestjs.io/docs/configuration) for details\n\nFor example in `jest.config.js`:\n\n```js\nexport default {\n  //...\n  \"setupFilesAfterEnv\": [\"@australiangreens/ag-error-jest\"],\n  //...\n}\n```\n\nAlternatively if you already have a `./src/setupTests.ts` in your\n`setupFilesAfterEnv`, then you and add an import into that intead:\n\n```ts\nimport '@australiangreens/ag-error-jest';\n```\n\n#### Using ag-error-jest\n\nSo your test files for each error only needs to be something like:\n\n```ts\nimport { BoilerplateError } from './BoilerplateError';\n\ntest('BoilerplateError meets requirements to be a valid AgError', () => {\n  expect(BoilerplateError).toBeValidAgErrorClass(\n    'BoilerplateError',\n    'AgError:BoilerplateError',\n  );\n});\n```\n\n### Caveat: Different constructor signature\n\nIf you add extra arguments to the constructor, the `toBeValidAgErrorClass()`\nmatcher may not work. In this case you should should be able to use\n`toBeValidAgErrorObject()` which checks the first two requirements, but will\nneed to manually test the first.\n\nThe following example shows a test for a special CiviApiAxiosError error that is\na wrapper for axios related errors.\n\n```ts\nimport { CiviApiAxiosError } from './CiviApiAxiosError';\nimport { createAxiosError } from '../../../utils/testing';\n\ntest('CiviApiAxiosError meets requirements to be a valid AgError', () => {\n  const err = new CiviApiAxiosError('some message', createAxiosError('Network Error', {}, null, {}, null));\n  expect(err).toBeValidAgErrorObject('CiviApiAxiosError', 'AgError:BoilerplateError:CiviApiError:CiviApiAxiosError');\n\n  // This is the bit we have to do manually.\n  // Not a normal sort of test, but basically want to ensure the way we've done\n  // this doesn't actually end up using the class name even if minified. We can\n  // (sort of) emulate this by deliberately breaking our own rules using a name\n  // that does not match the class to make sure the correct one is being used.\n  class DummySubClass extends CiviApiAxiosError {\n    static errorName = 'NotTheSame';\n  }\n  const dummy = new DummySubClass('some message', createAxiosError('Network Error', {}, null, {}, null));\n\n  expect(dummy.name).not.toEqual(dummy.constructor.name);\n});\n```\n\n## FAQ\n\n### Why not just use `constructor.name`?\n\nIf AgError simply had `this.name = this.constructor.name;` in its constructor,\nthere would be no need to separately define errorName for every class. However\nthat can't be relied on if any sort of build process is used that might change\nclass names (e.g. minifying the code).\n\nYou can still use (and are encouraged to use) `instanceof` to check the actual\nclass, rather than the name or hierachicalName. The motivation for the names\nis purely logging and debugging.\n\n### Why not use `static name = '...'` property?\n\nThis results in typescript error TS2699. We could use `@ts-ignore` however the\nconversation in [this issue](https://github.com/microsoft/TypeScript/issues/442)\nindicates this is a Bad Idea and there ended up being a\n[PR](https://github.com/microsoft/TypeScript/pull/12065) raised specifically to\ncause this error - it is very much intended\n\n### Why not just use (non-static) `name = '...'` property?\n\nThis is not feasible because it will prevent the `hierarchicalName()` getter\nmethod from working as intended - it would have to call a non-static method on\neach class, necessitating a dummy object in every ‘layer’. This by itself would\nbe fine, but would mean all constructors of subclasses would have to guarantee\nall arguments be optional, which isn’t possible to enforce.\n\nIt was simpler just to have a static property (i.e property on the constructor)\ncalled `errorName`. Then we have a simple name getter that just returns\n`this.constructor.errorName` and make use of this in the hierarchalName getter\ntoo.\n\nAdmittedly this does still result in a typescript error about errorName not\nexisting on the constructor, despite it clearly being there, due to an\n[issue](https://github.com/Microsoft/TypeScript/issues/3841) that has been open\nsince 2015, whose workarounds don't help us. It doesn't look like a simple issue\nto fix. So in this case we do actually use `@ts-ignore` knowing the for certain\nexact the constructor does in fact have the property in question.\n\n## About the build process\n\nOriginally the plan was to only compile with ESM as the target, since that is\nwhat we are using across all our apps. However due to Jest not yet properly\nhandling ESM, we need to provide the commonjs files too.\n\nTo achive this, we use the hybrid module pattern described here:\n<https://www.sensedeep.com/blog/posts/2021/how-to-create-single-source-npm-module.html>\n\nWe make a few changes however:\n\n- For the directory in dist we use \"esm\" instead of \"mjs\"\n- Rather than using a separate `tsconfig-base.json`, just `tsconfig.json` contain the ESM definition and have `tsconfig-cjs.json` extend and override it.\n- In `tsconfig-cjs.json`, add `declaration\": false`.\n- The CJS build still uses `moduleResolution: node10` with TypeScript 6's `ignoreDeprecations: \"6.0\"` so we can emit CommonJS without rewriting relative imports to include `.js` extensions.\n\nThe reasoning for last point is that we don't need the declaration files in both places; they are basically just for editor hinting. [the handbook](https://www.typescriptlang.org/docs/handbook/declaration-files/templates/module-d-ts.html) states  \"The .d.ts syntax intentionally looks like ES Modules syntax\", so it makes more sense to put the declarations in the esm directory.\n\n## Releasing\n\n```sh\npnpm release patch   # or minor | major — versions, commits, and pushes tags\npnpm ship            # publishes to the registry (after checks pass)\n```\n\n`prepublishOnly` runs lint, tests, and a clean build before publish.\n","readmeFilename":"README.md"}