{"_id":"@ampsy/express-middleware","_rev":"3-7810a5c360f11307d85898db5c2e9fc5","name":"@ampsy/express-middleware","dist-tags":{"latest":"0.0.9"},"versions":{"0.0.7":{"name":"@ampsy/express-middleware","version":"0.0.7","author":{"name":"Jon Kofal"},"license":"ISC","_id":"@ampsy/express-middleware@0.0.7","maintainers":[{"name":"americano-psycho","email":"jonkofal@gmail.com"}],"homepage":"https://github.com/jonkofal/express-middleware#readme","bugs":{"url":"https://github.com/jonkofal/express-middleware/issues"},"dist":{"shasum":"691e1bfe92e1cff9947e52792da43f0f7243626e","tarball":"https://registry.npmjs.org/@ampsy/express-middleware/-/express-middleware-0.0.7.tgz","fileCount":3,"integrity":"sha512-Yo46LqKERELZzPR5OAd5hZqI3SPCA7ylyNz4VSi2FW4JJQEAd2GD1WHEelsBC6zAjTQH1p9c6UNwrXXJ+XtAbA==","signatures":[{"sig":"MEYCIQCoq7QTit6Z4+1CaA5rTYycaq3DPYr+RJTSnfpfYcN9iQIhAJSwzw1wEEP6yNDvDaqyn3NgoD2HC/wxLGKL0rCPDYJB","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":3266},"main":"./lib/index.js","type":"module","engines":{"node":">=24"},"scripts":{"test":"export $(grep -v '^#' .env | xargs) && node test/test.js","build":"echo nothing to see here, move along..."},"_npmUser":{"name":"americano-psycho","email":"jonkofal@gmail.com"},"repository":{"url":"git+https://github.com/jonkofal/express-middleware.git"},"_npmVersion":"11.0.0","description":"Fast-fail environment variable accessor.","directories":{"lib":"lib","test":"test"},"_nodeVersion":"22.9.0","dependencies":{"cors":"^2.8.6","@ampsy/env":"^1.0.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/express-middleware_0.0.7_1779289039414_0.24389777641460797","host":"s3://npm-registry-packages-npm-production"}},"0.0.8":{"name":"@ampsy/express-middleware","version":"0.0.8","author":{"name":"Jon Kofal"},"license":"ISC","_id":"@ampsy/express-middleware@0.0.8","maintainers":[{"name":"americano-psycho","email":"jonkofal@gmail.com"}],"homepage":"https://github.com/jonkofal/express-middleware#readme","bugs":{"url":"https://github.com/jonkofal/express-middleware/issues"},"dist":{"shasum":"126fd4c2a72f05c6b683fe8be15d50be6cf9db6b","tarball":"https://registry.npmjs.org/@ampsy/express-middleware/-/express-middleware-0.0.8.tgz","fileCount":3,"integrity":"sha512-LjoRDkXB7brYbEi33zI2fuXA63TThqYHxWW/rXvIq7OjhukGD6ym2EH3XU0TyOVnp2yUrJorXZb7DjSx6Gc15w==","signatures":[{"sig":"MEUCIBqSAZ9+7M1b6AQSu9Wp4MEUha1phE/WyVVNu3BT3jyGAiEA3mNN6N3vsVKgNmAlInXBIUIfxYpukDrEJzFDtKBCSns=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@ampsy%2fexpress-middleware@0.0.8","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":3260},"main":"./lib/index.js","type":"module","engines":{"node":">=24"},"gitHead":"030cc13af23809dcb0c2d7a983117fef0ac5e458","scripts":{"test":"export $(grep -v '^#' .env | xargs) && node test/test.js","build":"echo nothing to see here, move along..."},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:ef0d731a-b86f-4f29-8664-6caed1013655"}},"repository":{"url":"git+https://github.com/jonkofal/express-middleware.git"},"_npmVersion":"11.12.1","description":"Middleware one-liners for express.","directories":{"lib":"lib","test":"test"},"_nodeVersion":"24.15.0","dependencies":{"cors":"^2.8.6","@ampsy/env":"^1.0.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/express-middleware_0.0.8_1779289519754_0.5427457587177864","host":"s3://npm-registry-packages-npm-production"}},"0.0.9":{"name":"@ampsy/express-middleware","version":"0.0.9","description":"Middleware one-liners for express.","homepage":"https://github.com/jonkofal/express-middleware#readme","bugs":{"url":"https://github.com/jonkofal/express-middleware/issues"},"repository":{"url":"git+https://github.com/jonkofal/express-middleware.git"},"license":"ISC","author":{"name":"Jon Kofal"},"type":"module","main":"./lib/index.js","directories":{"lib":"lib","test":"test"},"scripts":{"test":"export $(grep -v '^#' .env | xargs) && node test/test.js","build":"echo nothing to see here, move along..."},"dependencies":{"@ampsy/env":"^1.0.0","cors":"^2.8.6"},"engines":{"node":">=24"},"publishConfig":{"access":"public"},"gitHead":"31f40b34a6df41609f3ec1c7433b9ac03d0e8da1","_id":"@ampsy/express-middleware@0.0.9","_nodeVersion":"24.16.0","_npmVersion":"11.13.0","dist":{"integrity":"sha512-8GN6XINUsSTKI1VT7qwcwWfcOLWuUKBcVPaBbEOtS7OskhbvSTJrydfrOhbAYtnvJKo7N7S/hdaUY7PFMa/1Eg==","shasum":"65f4fde14d1d081ac24f015ea3e9932f822c378c","tarball":"https://registry.npmjs.org/@ampsy/express-middleware/-/express-middleware-0.0.9.tgz","fileCount":3,"unpackedSize":3258,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@ampsy%2fexpress-middleware@0.0.9","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIBBh97iWwGDRNhjye0Y90M0gIIKCeqphPc3eFMxZ5ylQAiEAifjawfewqPmSEEhmBSL0l15BjEQ+UF3wWYy1w3gxesk="}]},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:ef0d731a-b86f-4f29-8664-6caed1013655"}},"maintainers":[{"name":"americano-psycho","email":"jonkofal@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/express-middleware_0.0.9_1781096442111_0.036039707251179776"},"_hasShrinkwrap":false}},"time":{"created":"2026-05-20T14:57:19.247Z","modified":"2026-06-10T13:00:42.574Z","0.0.7":"2026-05-20T14:57:19.550Z","0.0.8":"2026-05-20T15:05:19.902Z","0.0.9":"2026-06-10T13:00:42.254Z"},"bugs":{"url":"https://github.com/jonkofal/express-middleware/issues"},"author":{"name":"Jon Kofal"},"license":"ISC","homepage":"https://github.com/jonkofal/express-middleware#readme","repository":{"url":"git+https://github.com/jonkofal/express-middleware.git"},"description":"Middleware one-liners for express.","maintainers":[{"name":"americano-psycho","email":"jonkofal@gmail.com"}],"readme":"\n# Package @ampsy/env\n- Solves problem of undefined environment variables causing odd errors in code, by\n  throwing an AssertionError with a clear message when an environment variable is undefined.\n- fast-fail wrapper for environment variables.\n- Best used in code at startup, so prior to 'ready' state all required variables are resolved.\n \n# Usage\n```\nimport ExpressMiddleware from '@ampsy/express-middleware';\nimport express from 'express'\n\nconst app = express();\n\n// calls from browsers to apis require CORS headers\n// if your web app is running at https://example.com, \n// set CORS_WHITELIST environment variable to https://example.com.\n// '*' allows all origins, so great for development.x\napp.use(ExpressMiddleware.cors(get('CORS_WHITELIST','*')));\n\n//all the other middlewares and routes, etc...\n\n//at end of file\n\n//anything not handled is a 404\napp.use(ExpressMiddleware.fourOfour);\n\n// standard error handler\napp.use(ExpressMiddleware.catchAllErrorHandler);\n\n// have the server listen for requests\napp.listen(3000, '0.0.0.0');\n```\n\n# See test/test.js for test cases","readmeFilename":"README.md"}