@alanszp/express-common-fn 9.2.7 → 10.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/commonErrorsHandler.d.ts +1 -1
- package/dist/index.js +5 -1
- package/dist/index.js.map +1 -1
- package/node_modules/@alanszp/audit/.gitignore +3 -0
- package/node_modules/@alanszp/audit/.npmignore +3 -0
- package/node_modules/@alanszp/audit/LICENSE +21 -0
- package/node_modules/@alanszp/audit/dist/audit.d.ts +9 -0
- package/node_modules/@alanszp/audit/dist/audit.js +25 -0
- package/node_modules/@alanszp/audit/dist/audit.js.map +1 -0
- package/node_modules/@alanszp/audit/dist/auditWithState.d.ts +10 -0
- package/node_modules/@alanszp/audit/dist/auditWithState.js +22 -0
- package/node_modules/@alanszp/audit/dist/auditWithState.js.map +1 -0
- package/node_modules/@alanszp/audit/dist/errors/AuditError.d.ts +3 -0
- package/node_modules/@alanszp/audit/dist/errors/AuditError.js +8 -0
- package/node_modules/@alanszp/audit/dist/errors/AuditError.js.map +1 -0
- package/node_modules/@alanszp/audit/dist/errors/MissingAuditFieldsError.d.ts +9 -0
- package/node_modules/@alanszp/audit/dist/errors/MissingAuditFieldsError.js +23 -0
- package/node_modules/@alanszp/audit/dist/errors/MissingAuditFieldsError.js.map +1 -0
- package/node_modules/@alanszp/audit/dist/errors/index.d.ts +2 -0
- package/node_modules/@alanszp/audit/dist/errors/index.js +19 -0
- package/node_modules/@alanszp/audit/dist/errors/index.js.map +1 -0
- package/node_modules/@alanszp/audit/dist/factory.d.ts +4 -0
- package/node_modules/@alanszp/audit/dist/factory.js +16 -0
- package/node_modules/@alanszp/audit/dist/factory.js.map +1 -0
- package/node_modules/@alanszp/audit/dist/index.d.ts +5 -0
- package/node_modules/@alanszp/audit/dist/index.js +22 -0
- package/node_modules/@alanszp/audit/dist/index.js.map +1 -0
- package/node_modules/@alanszp/audit/dist/interfaces.d.ts +19 -0
- package/node_modules/@alanszp/audit/dist/interfaces.js +18 -0
- package/node_modules/@alanszp/audit/dist/interfaces.js.map +1 -0
- package/node_modules/@alanszp/audit/node_modules/@types/node/LICENSE +21 -0
- package/node_modules/@alanszp/audit/node_modules/@types/node/README.md +15 -0
- package/node_modules/@alanszp/audit/node_modules/@types/node/assert/strict.d.ts +8 -0
- package/node_modules/@alanszp/audit/node_modules/@types/node/assert.d.ts +996 -0
- package/node_modules/@alanszp/audit/node_modules/@types/node/async_hooks.d.ts +539 -0
- package/node_modules/@alanszp/audit/node_modules/@types/node/buffer.d.ts +2362 -0
- package/node_modules/@alanszp/audit/node_modules/@types/node/child_process.d.ts +1540 -0
- package/node_modules/@alanszp/audit/node_modules/@types/node/cluster.d.ts +432 -0
- package/node_modules/@alanszp/audit/node_modules/@types/node/console.d.ts +415 -0
- package/node_modules/@alanszp/audit/node_modules/@types/node/constants.d.ts +19 -0
- package/node_modules/@alanszp/audit/node_modules/@types/node/crypto.d.ts +4487 -0
- package/node_modules/@alanszp/audit/node_modules/@types/node/dgram.d.ts +596 -0
- package/node_modules/@alanszp/audit/node_modules/@types/node/diagnostics_channel.d.ts +545 -0
- package/node_modules/@alanszp/audit/node_modules/@types/node/dns/promises.d.ts +425 -0
- package/node_modules/@alanszp/audit/node_modules/@types/node/dns.d.ts +809 -0
- package/node_modules/@alanszp/audit/node_modules/@types/node/dom-events.d.ts +122 -0
- package/node_modules/@alanszp/audit/node_modules/@types/node/domain.d.ts +170 -0
- package/node_modules/@alanszp/audit/node_modules/@types/node/events.d.ts +879 -0
- package/node_modules/@alanszp/audit/node_modules/@types/node/fs/promises.d.ts +1239 -0
- package/node_modules/@alanszp/audit/node_modules/@types/node/fs.d.ts +4311 -0
- package/node_modules/@alanszp/audit/node_modules/@types/node/globals.d.ts +411 -0
- package/node_modules/@alanszp/audit/node_modules/@types/node/globals.global.d.ts +1 -0
- package/node_modules/@alanszp/audit/node_modules/@types/node/http.d.ts +1887 -0
- package/node_modules/@alanszp/audit/node_modules/@types/node/http2.d.ts +2382 -0
- package/node_modules/@alanszp/audit/node_modules/@types/node/https.d.ts +550 -0
- package/node_modules/@alanszp/audit/node_modules/@types/node/index.d.ts +88 -0
- package/node_modules/@alanszp/audit/node_modules/@types/node/inspector.d.ts +2747 -0
- package/node_modules/@alanszp/audit/node_modules/@types/node/module.d.ts +315 -0
- package/node_modules/@alanszp/audit/node_modules/@types/node/net.d.ts +949 -0
- package/node_modules/@alanszp/audit/node_modules/@types/node/os.d.ts +478 -0
- package/node_modules/@alanszp/audit/node_modules/@types/node/package.json +229 -0
- package/node_modules/@alanszp/audit/node_modules/@types/node/path.d.ts +191 -0
- package/node_modules/@alanszp/audit/node_modules/@types/node/perf_hooks.d.ts +645 -0
- package/node_modules/@alanszp/audit/node_modules/@types/node/process.d.ts +1561 -0
- package/node_modules/@alanszp/audit/node_modules/@types/node/punycode.d.ts +117 -0
- package/node_modules/@alanszp/audit/node_modules/@types/node/querystring.d.ts +141 -0
- package/node_modules/@alanszp/audit/node_modules/@types/node/readline/promises.d.ts +150 -0
- package/node_modules/@alanszp/audit/node_modules/@types/node/readline.d.ts +539 -0
- package/node_modules/@alanszp/audit/node_modules/@types/node/repl.d.ts +430 -0
- package/node_modules/@alanszp/audit/node_modules/@types/node/stream/consumers.d.ts +12 -0
- package/node_modules/@alanszp/audit/node_modules/@types/node/stream/promises.d.ts +83 -0
- package/node_modules/@alanszp/audit/node_modules/@types/node/stream/web.d.ts +366 -0
- package/node_modules/@alanszp/audit/node_modules/@types/node/stream.d.ts +1701 -0
- package/node_modules/@alanszp/audit/node_modules/@types/node/string_decoder.d.ts +67 -0
- package/node_modules/@alanszp/audit/node_modules/@types/node/test.d.ts +1465 -0
- package/node_modules/@alanszp/audit/node_modules/@types/node/timers/promises.d.ts +93 -0
- package/node_modules/@alanszp/audit/node_modules/@types/node/timers.d.ts +240 -0
- package/node_modules/@alanszp/audit/node_modules/@types/node/tls.d.ts +1210 -0
- package/node_modules/@alanszp/audit/node_modules/@types/node/trace_events.d.ts +182 -0
- package/node_modules/@alanszp/audit/node_modules/@types/node/ts4.8/assert/strict.d.ts +8 -0
- package/node_modules/@alanszp/audit/node_modules/@types/node/ts4.8/assert.d.ts +996 -0
- package/node_modules/@alanszp/audit/node_modules/@types/node/ts4.8/async_hooks.d.ts +539 -0
- package/node_modules/@alanszp/audit/node_modules/@types/node/ts4.8/buffer.d.ts +2362 -0
- package/node_modules/@alanszp/audit/node_modules/@types/node/ts4.8/child_process.d.ts +1540 -0
- package/node_modules/@alanszp/audit/node_modules/@types/node/ts4.8/cluster.d.ts +432 -0
- package/node_modules/@alanszp/audit/node_modules/@types/node/ts4.8/console.d.ts +415 -0
- package/node_modules/@alanszp/audit/node_modules/@types/node/ts4.8/constants.d.ts +19 -0
- package/node_modules/@alanszp/audit/node_modules/@types/node/ts4.8/crypto.d.ts +4487 -0
- package/node_modules/@alanszp/audit/node_modules/@types/node/ts4.8/dgram.d.ts +596 -0
- package/node_modules/@alanszp/audit/node_modules/@types/node/ts4.8/diagnostics_channel.d.ts +545 -0
- package/node_modules/@alanszp/audit/node_modules/@types/node/ts4.8/dns/promises.d.ts +425 -0
- package/node_modules/@alanszp/audit/node_modules/@types/node/ts4.8/dns.d.ts +809 -0
- package/node_modules/@alanszp/audit/node_modules/@types/node/ts4.8/dom-events.d.ts +122 -0
- package/node_modules/@alanszp/audit/node_modules/@types/node/ts4.8/domain.d.ts +170 -0
- package/node_modules/@alanszp/audit/node_modules/@types/node/ts4.8/events.d.ts +879 -0
- package/node_modules/@alanszp/audit/node_modules/@types/node/ts4.8/fs/promises.d.ts +1239 -0
- package/node_modules/@alanszp/audit/node_modules/@types/node/ts4.8/fs.d.ts +4311 -0
- package/node_modules/@alanszp/audit/node_modules/@types/node/ts4.8/globals.d.ts +411 -0
- package/node_modules/@alanszp/audit/node_modules/@types/node/ts4.8/globals.global.d.ts +1 -0
- package/node_modules/@alanszp/audit/node_modules/@types/node/ts4.8/http.d.ts +1887 -0
- package/node_modules/@alanszp/audit/node_modules/@types/node/ts4.8/http2.d.ts +2382 -0
- package/node_modules/@alanszp/audit/node_modules/@types/node/ts4.8/https.d.ts +550 -0
- package/node_modules/@alanszp/audit/node_modules/@types/node/ts4.8/index.d.ts +88 -0
- package/node_modules/@alanszp/audit/node_modules/@types/node/ts4.8/inspector.d.ts +2747 -0
- package/node_modules/@alanszp/audit/node_modules/@types/node/ts4.8/module.d.ts +315 -0
- package/node_modules/@alanszp/audit/node_modules/@types/node/ts4.8/net.d.ts +949 -0
- package/node_modules/@alanszp/audit/node_modules/@types/node/ts4.8/os.d.ts +478 -0
- package/node_modules/@alanszp/audit/node_modules/@types/node/ts4.8/path.d.ts +191 -0
- package/node_modules/@alanszp/audit/node_modules/@types/node/ts4.8/perf_hooks.d.ts +645 -0
- package/node_modules/@alanszp/audit/node_modules/@types/node/ts4.8/process.d.ts +1561 -0
- package/node_modules/@alanszp/audit/node_modules/@types/node/ts4.8/punycode.d.ts +117 -0
- package/node_modules/@alanszp/audit/node_modules/@types/node/ts4.8/querystring.d.ts +141 -0
- package/node_modules/@alanszp/audit/node_modules/@types/node/ts4.8/readline/promises.d.ts +150 -0
- package/node_modules/@alanszp/audit/node_modules/@types/node/ts4.8/readline.d.ts +539 -0
- package/node_modules/@alanszp/audit/node_modules/@types/node/ts4.8/repl.d.ts +430 -0
- package/node_modules/@alanszp/audit/node_modules/@types/node/ts4.8/stream/consumers.d.ts +12 -0
- package/node_modules/@alanszp/audit/node_modules/@types/node/ts4.8/stream/promises.d.ts +83 -0
- package/node_modules/@alanszp/audit/node_modules/@types/node/ts4.8/stream/web.d.ts +366 -0
- package/node_modules/@alanszp/audit/node_modules/@types/node/ts4.8/stream.d.ts +1701 -0
- package/node_modules/@alanszp/audit/node_modules/@types/node/ts4.8/string_decoder.d.ts +67 -0
- package/node_modules/@alanszp/audit/node_modules/@types/node/ts4.8/test.d.ts +1465 -0
- package/node_modules/@alanszp/audit/node_modules/@types/node/ts4.8/timers/promises.d.ts +93 -0
- package/node_modules/@alanszp/audit/node_modules/@types/node/ts4.8/timers.d.ts +240 -0
- package/node_modules/@alanszp/audit/node_modules/@types/node/ts4.8/tls.d.ts +1210 -0
- package/node_modules/@alanszp/audit/node_modules/@types/node/ts4.8/trace_events.d.ts +182 -0
- package/node_modules/@alanszp/audit/node_modules/@types/node/ts4.8/tty.d.ts +208 -0
- package/node_modules/@alanszp/audit/node_modules/@types/node/ts4.8/url.d.ts +927 -0
- package/node_modules/@alanszp/audit/node_modules/@types/node/ts4.8/util.d.ts +2183 -0
- package/node_modules/@alanszp/audit/node_modules/@types/node/ts4.8/v8.d.ts +764 -0
- package/node_modules/@alanszp/audit/node_modules/@types/node/ts4.8/vm.d.ts +903 -0
- package/node_modules/@alanszp/audit/node_modules/@types/node/ts4.8/wasi.d.ts +179 -0
- package/node_modules/@alanszp/audit/node_modules/@types/node/ts4.8/worker_threads.d.ts +691 -0
- package/node_modules/@alanszp/audit/node_modules/@types/node/ts4.8/zlib.d.ts +517 -0
- package/node_modules/@alanszp/audit/node_modules/@types/node/tty.d.ts +208 -0
- package/node_modules/@alanszp/audit/node_modules/@types/node/url.d.ts +927 -0
- package/node_modules/@alanszp/audit/node_modules/@types/node/util.d.ts +2183 -0
- package/node_modules/@alanszp/audit/node_modules/@types/node/v8.d.ts +764 -0
- package/node_modules/@alanszp/audit/node_modules/@types/node/vm.d.ts +903 -0
- package/node_modules/@alanszp/audit/node_modules/@types/node/wasi.d.ts +179 -0
- package/node_modules/@alanszp/audit/node_modules/@types/node/worker_threads.d.ts +691 -0
- package/node_modules/@alanszp/audit/node_modules/@types/node/zlib.d.ts +517 -0
- package/node_modules/@alanszp/audit/package.json +30 -0
- package/node_modules/@alanszp/audit/src/audit.ts +31 -0
- package/node_modules/@alanszp/audit/src/auditWithState.ts +27 -0
- package/node_modules/@alanszp/audit/src/errors/AuditError.ts +3 -0
- package/node_modules/@alanszp/audit/src/errors/MissingAuditFieldsError.ts +28 -0
- package/node_modules/@alanszp/audit/src/errors/index.ts +2 -0
- package/node_modules/@alanszp/audit/src/factory.ts +16 -0
- package/node_modules/@alanszp/audit/src/index.ts +5 -0
- package/node_modules/@alanszp/audit/src/interfaces.ts +33 -0
- package/node_modules/@alanszp/audit/tsconfig.json +15 -0
- package/node_modules/@alanszp/errors/.gitignore +3 -0
- package/node_modules/@alanszp/errors/.npmignore +3 -0
- package/node_modules/@alanszp/errors/LICENSE +21 -0
- package/node_modules/@alanszp/errors/dist/errors/BaseError.d.ts +3 -0
- package/node_modules/@alanszp/errors/dist/errors/BaseError.js +18 -0
- package/node_modules/@alanszp/errors/dist/errors/BaseError.js.map +1 -0
- package/node_modules/@alanszp/errors/dist/errors/RenderableError.d.ts +6 -0
- package/node_modules/@alanszp/errors/dist/errors/RenderableError.js +3 -0
- package/node_modules/@alanszp/errors/dist/errors/RenderableError.js.map +1 -0
- package/node_modules/@alanszp/errors/dist/errors/http/BadRequestError.d.ts +8 -0
- package/node_modules/@alanszp/errors/dist/errors/http/BadRequestError.js +20 -0
- package/node_modules/@alanszp/errors/dist/errors/http/BadRequestError.js.map +1 -0
- package/node_modules/@alanszp/errors/dist/errors/http/HttpError.d.ts +8 -0
- package/node_modules/@alanszp/errors/dist/errors/http/HttpError.js +18 -0
- package/node_modules/@alanszp/errors/dist/errors/http/HttpError.js.map +1 -0
- package/node_modules/@alanszp/errors/dist/errors/http/InternalServerError.d.ts +8 -0
- package/node_modules/@alanszp/errors/dist/errors/http/InternalServerError.js +32 -0
- package/node_modules/@alanszp/errors/dist/errors/http/InternalServerError.js.map +1 -0
- package/node_modules/@alanszp/errors/dist/errors/http/NotFoundError.d.ts +4 -0
- package/node_modules/@alanszp/errors/dist/errors/http/NotFoundError.js +11 -0
- package/node_modules/@alanszp/errors/dist/errors/http/NotFoundError.js.map +1 -0
- package/node_modules/@alanszp/errors/dist/errors/http/UnauthorizedError.d.ts +8 -0
- package/node_modules/@alanszp/errors/dist/errors/http/UnauthorizedError.js +20 -0
- package/node_modules/@alanszp/errors/dist/errors/http/UnauthorizedError.js.map +1 -0
- package/node_modules/@alanszp/errors/dist/errors/http/index.d.ts +5 -0
- package/node_modules/@alanszp/errors/dist/errors/http/index.js +18 -0
- package/node_modules/@alanszp/errors/dist/errors/http/index.js.map +1 -0
- package/node_modules/@alanszp/errors/dist/index.d.ts +3 -0
- package/node_modules/@alanszp/errors/dist/index.js +16 -0
- package/node_modules/@alanszp/errors/dist/index.js.map +1 -0
- package/node_modules/@alanszp/errors/node_modules/@types/node/LICENSE +21 -0
- package/node_modules/@alanszp/errors/node_modules/@types/node/README.md +15 -0
- package/node_modules/@alanszp/errors/node_modules/@types/node/assert/strict.d.ts +8 -0
- package/node_modules/@alanszp/errors/node_modules/@types/node/assert.d.ts +996 -0
- package/node_modules/@alanszp/errors/node_modules/@types/node/async_hooks.d.ts +539 -0
- package/node_modules/@alanszp/errors/node_modules/@types/node/buffer.d.ts +2362 -0
- package/node_modules/@alanszp/errors/node_modules/@types/node/child_process.d.ts +1540 -0
- package/node_modules/@alanszp/errors/node_modules/@types/node/cluster.d.ts +432 -0
- package/node_modules/@alanszp/errors/node_modules/@types/node/console.d.ts +415 -0
- package/node_modules/@alanszp/errors/node_modules/@types/node/constants.d.ts +19 -0
- package/node_modules/@alanszp/errors/node_modules/@types/node/crypto.d.ts +4487 -0
- package/node_modules/@alanszp/errors/node_modules/@types/node/dgram.d.ts +596 -0
- package/node_modules/@alanszp/errors/node_modules/@types/node/diagnostics_channel.d.ts +545 -0
- package/node_modules/@alanszp/errors/node_modules/@types/node/dns/promises.d.ts +425 -0
- package/node_modules/@alanszp/errors/node_modules/@types/node/dns.d.ts +809 -0
- package/node_modules/@alanszp/errors/node_modules/@types/node/dom-events.d.ts +122 -0
- package/node_modules/@alanszp/errors/node_modules/@types/node/domain.d.ts +170 -0
- package/node_modules/@alanszp/errors/node_modules/@types/node/events.d.ts +879 -0
- package/node_modules/@alanszp/errors/node_modules/@types/node/fs/promises.d.ts +1239 -0
- package/node_modules/@alanszp/errors/node_modules/@types/node/fs.d.ts +4311 -0
- package/node_modules/@alanszp/errors/node_modules/@types/node/globals.d.ts +411 -0
- package/node_modules/@alanszp/errors/node_modules/@types/node/globals.global.d.ts +1 -0
- package/node_modules/@alanszp/errors/node_modules/@types/node/http.d.ts +1887 -0
- package/node_modules/@alanszp/errors/node_modules/@types/node/http2.d.ts +2382 -0
- package/node_modules/@alanszp/errors/node_modules/@types/node/https.d.ts +550 -0
- package/node_modules/@alanszp/errors/node_modules/@types/node/index.d.ts +88 -0
- package/node_modules/@alanszp/errors/node_modules/@types/node/inspector.d.ts +2747 -0
- package/node_modules/@alanszp/errors/node_modules/@types/node/module.d.ts +315 -0
- package/node_modules/@alanszp/errors/node_modules/@types/node/net.d.ts +949 -0
- package/node_modules/@alanszp/errors/node_modules/@types/node/os.d.ts +478 -0
- package/node_modules/@alanszp/errors/node_modules/@types/node/package.json +229 -0
- package/node_modules/@alanszp/errors/node_modules/@types/node/path.d.ts +191 -0
- package/node_modules/@alanszp/errors/node_modules/@types/node/perf_hooks.d.ts +645 -0
- package/node_modules/@alanszp/errors/node_modules/@types/node/process.d.ts +1561 -0
- package/node_modules/@alanszp/errors/node_modules/@types/node/punycode.d.ts +117 -0
- package/node_modules/@alanszp/errors/node_modules/@types/node/querystring.d.ts +141 -0
- package/node_modules/@alanszp/errors/node_modules/@types/node/readline/promises.d.ts +150 -0
- package/node_modules/@alanszp/errors/node_modules/@types/node/readline.d.ts +539 -0
- package/node_modules/@alanszp/errors/node_modules/@types/node/repl.d.ts +430 -0
- package/node_modules/@alanszp/errors/node_modules/@types/node/stream/consumers.d.ts +12 -0
- package/node_modules/@alanszp/errors/node_modules/@types/node/stream/promises.d.ts +83 -0
- package/node_modules/@alanszp/errors/node_modules/@types/node/stream/web.d.ts +366 -0
- package/node_modules/@alanszp/errors/node_modules/@types/node/stream.d.ts +1701 -0
- package/node_modules/@alanszp/errors/node_modules/@types/node/string_decoder.d.ts +67 -0
- package/node_modules/@alanszp/errors/node_modules/@types/node/test.d.ts +1465 -0
- package/node_modules/@alanszp/errors/node_modules/@types/node/timers/promises.d.ts +93 -0
- package/node_modules/@alanszp/errors/node_modules/@types/node/timers.d.ts +240 -0
- package/node_modules/@alanszp/errors/node_modules/@types/node/tls.d.ts +1210 -0
- package/node_modules/@alanszp/errors/node_modules/@types/node/trace_events.d.ts +182 -0
- package/node_modules/@alanszp/errors/node_modules/@types/node/ts4.8/assert/strict.d.ts +8 -0
- package/node_modules/@alanszp/errors/node_modules/@types/node/ts4.8/assert.d.ts +996 -0
- package/node_modules/@alanszp/errors/node_modules/@types/node/ts4.8/async_hooks.d.ts +539 -0
- package/node_modules/@alanszp/errors/node_modules/@types/node/ts4.8/buffer.d.ts +2362 -0
- package/node_modules/@alanszp/errors/node_modules/@types/node/ts4.8/child_process.d.ts +1540 -0
- package/node_modules/@alanszp/errors/node_modules/@types/node/ts4.8/cluster.d.ts +432 -0
- package/node_modules/@alanszp/errors/node_modules/@types/node/ts4.8/console.d.ts +415 -0
- package/node_modules/@alanszp/errors/node_modules/@types/node/ts4.8/constants.d.ts +19 -0
- package/node_modules/@alanszp/errors/node_modules/@types/node/ts4.8/crypto.d.ts +4487 -0
- package/node_modules/@alanszp/errors/node_modules/@types/node/ts4.8/dgram.d.ts +596 -0
- package/node_modules/@alanszp/errors/node_modules/@types/node/ts4.8/diagnostics_channel.d.ts +545 -0
- package/node_modules/@alanszp/errors/node_modules/@types/node/ts4.8/dns/promises.d.ts +425 -0
- package/node_modules/@alanszp/errors/node_modules/@types/node/ts4.8/dns.d.ts +809 -0
- package/node_modules/@alanszp/errors/node_modules/@types/node/ts4.8/dom-events.d.ts +122 -0
- package/node_modules/@alanszp/errors/node_modules/@types/node/ts4.8/domain.d.ts +170 -0
- package/node_modules/@alanszp/errors/node_modules/@types/node/ts4.8/events.d.ts +879 -0
- package/node_modules/@alanszp/errors/node_modules/@types/node/ts4.8/fs/promises.d.ts +1239 -0
- package/node_modules/@alanszp/errors/node_modules/@types/node/ts4.8/fs.d.ts +4311 -0
- package/node_modules/@alanszp/errors/node_modules/@types/node/ts4.8/globals.d.ts +411 -0
- package/node_modules/@alanszp/errors/node_modules/@types/node/ts4.8/globals.global.d.ts +1 -0
- package/node_modules/@alanszp/errors/node_modules/@types/node/ts4.8/http.d.ts +1887 -0
- package/node_modules/@alanszp/errors/node_modules/@types/node/ts4.8/http2.d.ts +2382 -0
- package/node_modules/@alanszp/errors/node_modules/@types/node/ts4.8/https.d.ts +550 -0
- package/node_modules/@alanszp/errors/node_modules/@types/node/ts4.8/index.d.ts +88 -0
- package/node_modules/@alanszp/errors/node_modules/@types/node/ts4.8/inspector.d.ts +2747 -0
- package/node_modules/@alanszp/errors/node_modules/@types/node/ts4.8/module.d.ts +315 -0
- package/node_modules/@alanszp/errors/node_modules/@types/node/ts4.8/net.d.ts +949 -0
- package/node_modules/@alanszp/errors/node_modules/@types/node/ts4.8/os.d.ts +478 -0
- package/node_modules/@alanszp/errors/node_modules/@types/node/ts4.8/path.d.ts +191 -0
- package/node_modules/@alanszp/errors/node_modules/@types/node/ts4.8/perf_hooks.d.ts +645 -0
- package/node_modules/@alanszp/errors/node_modules/@types/node/ts4.8/process.d.ts +1561 -0
- package/node_modules/@alanszp/errors/node_modules/@types/node/ts4.8/punycode.d.ts +117 -0
- package/node_modules/@alanszp/errors/node_modules/@types/node/ts4.8/querystring.d.ts +141 -0
- package/node_modules/@alanszp/errors/node_modules/@types/node/ts4.8/readline/promises.d.ts +150 -0
- package/node_modules/@alanszp/errors/node_modules/@types/node/ts4.8/readline.d.ts +539 -0
- package/node_modules/@alanszp/errors/node_modules/@types/node/ts4.8/repl.d.ts +430 -0
- package/node_modules/@alanszp/errors/node_modules/@types/node/ts4.8/stream/consumers.d.ts +12 -0
- package/node_modules/@alanszp/errors/node_modules/@types/node/ts4.8/stream/promises.d.ts +83 -0
- package/node_modules/@alanszp/errors/node_modules/@types/node/ts4.8/stream/web.d.ts +366 -0
- package/node_modules/@alanszp/errors/node_modules/@types/node/ts4.8/stream.d.ts +1701 -0
- package/node_modules/@alanszp/errors/node_modules/@types/node/ts4.8/string_decoder.d.ts +67 -0
- package/node_modules/@alanszp/errors/node_modules/@types/node/ts4.8/test.d.ts +1465 -0
- package/node_modules/@alanszp/errors/node_modules/@types/node/ts4.8/timers/promises.d.ts +93 -0
- package/node_modules/@alanszp/errors/node_modules/@types/node/ts4.8/timers.d.ts +240 -0
- package/node_modules/@alanszp/errors/node_modules/@types/node/ts4.8/tls.d.ts +1210 -0
- package/node_modules/@alanszp/errors/node_modules/@types/node/ts4.8/trace_events.d.ts +182 -0
- package/node_modules/@alanszp/errors/node_modules/@types/node/ts4.8/tty.d.ts +208 -0
- package/node_modules/@alanszp/errors/node_modules/@types/node/ts4.8/url.d.ts +927 -0
- package/node_modules/@alanszp/errors/node_modules/@types/node/ts4.8/util.d.ts +2183 -0
- package/node_modules/@alanszp/errors/node_modules/@types/node/ts4.8/v8.d.ts +764 -0
- package/node_modules/@alanszp/errors/node_modules/@types/node/ts4.8/vm.d.ts +903 -0
- package/node_modules/@alanszp/errors/node_modules/@types/node/ts4.8/wasi.d.ts +179 -0
- package/node_modules/@alanszp/errors/node_modules/@types/node/ts4.8/worker_threads.d.ts +691 -0
- package/node_modules/@alanszp/errors/node_modules/@types/node/ts4.8/zlib.d.ts +517 -0
- package/node_modules/@alanszp/errors/node_modules/@types/node/tty.d.ts +208 -0
- package/node_modules/@alanszp/errors/node_modules/@types/node/url.d.ts +927 -0
- package/node_modules/@alanszp/errors/node_modules/@types/node/util.d.ts +2183 -0
- package/node_modules/@alanszp/errors/node_modules/@types/node/v8.d.ts +764 -0
- package/node_modules/@alanszp/errors/node_modules/@types/node/vm.d.ts +903 -0
- package/node_modules/@alanszp/errors/node_modules/@types/node/wasi.d.ts +179 -0
- package/node_modules/@alanszp/errors/node_modules/@types/node/worker_threads.d.ts +691 -0
- package/node_modules/@alanszp/errors/node_modules/@types/node/zlib.d.ts +517 -0
- package/node_modules/@alanszp/errors/package.json +27 -0
- package/node_modules/@alanszp/errors/src/errors/BaseError.ts +14 -0
- package/node_modules/@alanszp/errors/src/errors/RenderableError.ts +7 -0
- package/node_modules/@alanszp/errors/src/errors/http/BadRequestError.ts +21 -0
- package/node_modules/@alanszp/errors/src/errors/http/HttpError.ts +19 -0
- package/node_modules/@alanszp/errors/src/errors/http/InternalServerError.ts +34 -0
- package/node_modules/@alanszp/errors/src/errors/http/NotFoundError.ts +7 -0
- package/node_modules/@alanszp/errors/src/errors/http/UnauthorizedError.ts +21 -0
- package/node_modules/@alanszp/errors/src/errors/http/index.ts +5 -0
- package/node_modules/@alanszp/errors/src/index.ts +3 -0
- package/node_modules/@alanszp/errors/tsconfig.json +15 -0
- package/node_modules/@alanszp/express/.gitignore +3 -0
- package/node_modules/@alanszp/express/.npmignore +3 -0
- package/node_modules/@alanszp/express/LICENSE +21 -0
- package/node_modules/@alanszp/express/babel.config.js +7 -0
- package/node_modules/@alanszp/express/dist/helpers/appIdentifier.d.ts +1 -0
- package/node_modules/@alanszp/express/dist/helpers/appIdentifier.js +10 -0
- package/node_modules/@alanszp/express/dist/helpers/appIdentifier.js.map +1 -0
- package/node_modules/@alanszp/express/dist/helpers/getIp.d.ts +2 -0
- package/node_modules/@alanszp/express/dist/helpers/getIp.js +9 -0
- package/node_modules/@alanszp/express/dist/helpers/getIp.js.map +1 -0
- package/node_modules/@alanszp/express/dist/helpers/getRequestLogger.d.ts +2 -0
- package/node_modules/@alanszp/express/dist/helpers/getRequestLogger.js +10 -0
- package/node_modules/@alanszp/express/dist/helpers/getRequestLogger.js.map +1 -0
- package/node_modules/@alanszp/express/dist/helpers/now.d.ts +1 -0
- package/node_modules/@alanszp/express/dist/helpers/now.js +8 -0
- package/node_modules/@alanszp/express/dist/helpers/now.js.map +1 -0
- package/node_modules/@alanszp/express/dist/index.d.ts +11 -0
- package/node_modules/@alanszp/express/dist/index.js +24 -0
- package/node_modules/@alanszp/express/dist/index.js.map +1 -0
- package/node_modules/@alanszp/express/dist/middlewares/accessLogger.d.ts +3 -0
- package/node_modules/@alanszp/express/dist/middlewares/accessLogger.js +30 -0
- package/node_modules/@alanszp/express/dist/middlewares/accessLogger.js.map +1 -0
- package/node_modules/@alanszp/express/dist/middlewares/auditLog.d.ts +8 -0
- package/node_modules/@alanszp/express/dist/middlewares/auditLog.js +43 -0
- package/node_modules/@alanszp/express/dist/middlewares/auditLog.js.map +1 -0
- package/node_modules/@alanszp/express/dist/middlewares/authedForOrg.d.ts +3 -0
- package/node_modules/@alanszp/express/dist/middlewares/authedForOrg.js +46 -0
- package/node_modules/@alanszp/express/dist/middlewares/authedForOrg.js.map +1 -0
- package/node_modules/@alanszp/express/dist/middlewares/authenticateUser.d.ts +25 -0
- package/node_modules/@alanszp/express/dist/middlewares/authenticateUser.js +115 -0
- package/node_modules/@alanszp/express/dist/middlewares/authenticateUser.js.map +1 -0
- package/node_modules/@alanszp/express/dist/middlewares/authenticateUser.test.d.ts +1 -0
- package/node_modules/@alanszp/express/dist/middlewares/authenticateUser.test.js +308 -0
- package/node_modules/@alanszp/express/dist/middlewares/authenticateUser.test.js.map +1 -0
- package/node_modules/@alanszp/express/dist/middlewares/createContext.d.ts +6 -0
- package/node_modules/@alanszp/express/dist/middlewares/createContext.js +36 -0
- package/node_modules/@alanszp/express/dist/middlewares/createContext.js.map +1 -0
- package/node_modules/@alanszp/express/dist/middlewares/createContext.test.d.ts +1 -0
- package/node_modules/@alanszp/express/dist/middlewares/createContext.test.js +50 -0
- package/node_modules/@alanszp/express/dist/middlewares/createContext.test.js.map +1 -0
- package/node_modules/@alanszp/express/dist/middlewares/hasRoles.d.ts +3 -0
- package/node_modules/@alanszp/express/dist/middlewares/hasRoles.js +23 -0
- package/node_modules/@alanszp/express/dist/middlewares/hasRoles.js.map +1 -0
- package/node_modules/@alanszp/express/dist/middlewares/jsonBodyParser.d.ts +4 -0
- package/node_modules/@alanszp/express/dist/middlewares/jsonBodyParser.js +23 -0
- package/node_modules/@alanszp/express/dist/middlewares/jsonBodyParser.js.map +1 -0
- package/node_modules/@alanszp/express/dist/middlewares/returnInternalServerError.d.ts +4 -0
- package/node_modules/@alanszp/express/dist/middlewares/returnInternalServerError.js +11 -0
- package/node_modules/@alanszp/express/dist/middlewares/returnInternalServerError.js.map +1 -0
- package/node_modules/@alanszp/express/dist/middlewares/returnNotFound.d.ts +3 -0
- package/node_modules/@alanszp/express/dist/middlewares/returnNotFound.js +10 -0
- package/node_modules/@alanszp/express/dist/middlewares/returnNotFound.js.map +1 -0
- package/node_modules/@alanszp/express/dist/test/mocks/authOptionsMocks.d.ts +8 -0
- package/node_modules/@alanszp/express/dist/test/mocks/authOptionsMocks.js +30 -0
- package/node_modules/@alanszp/express/dist/test/mocks/authOptionsMocks.js.map +1 -0
- package/node_modules/@alanszp/express/dist/test/mocks/expressMocks.d.ts +6 -0
- package/node_modules/@alanszp/express/dist/test/mocks/expressMocks.js +26 -0
- package/node_modules/@alanszp/express/dist/test/mocks/expressMocks.js.map +1 -0
- package/node_modules/@alanszp/express/dist/test/mocks/jwtUserMocks.d.ts +3 -0
- package/node_modules/@alanszp/express/dist/test/mocks/jwtUserMocks.js +20 -0
- package/node_modules/@alanszp/express/dist/test/mocks/jwtUserMocks.js.map +1 -0
- package/node_modules/@alanszp/express/dist/test/setup.d.ts +1 -0
- package/node_modules/@alanszp/express/dist/test/setup.js +5 -0
- package/node_modules/@alanszp/express/dist/test/setup.js.map +1 -0
- package/node_modules/@alanszp/express/dist/test/setup.test.d.ts +1 -0
- package/node_modules/@alanszp/express/dist/test/setup.test.js +14 -0
- package/node_modules/@alanszp/express/dist/test/setup.test.js.map +1 -0
- package/node_modules/@alanszp/express/dist/types/AuthMethod.d.ts +10 -0
- package/node_modules/@alanszp/express/dist/types/AuthMethod.js +3 -0
- package/node_modules/@alanszp/express/dist/types/AuthMethod.js.map +1 -0
- package/node_modules/@alanszp/express/dist/types/GenericRequest.d.ts +2 -0
- package/node_modules/@alanszp/express/dist/types/GenericRequest.js +3 -0
- package/node_modules/@alanszp/express/dist/types/GenericRequest.js.map +1 -0
- package/node_modules/@alanszp/express/dist/views/errorView.d.ts +2 -0
- package/node_modules/@alanszp/express/dist/views/errorView.js +14 -0
- package/node_modules/@alanszp/express/dist/views/errorView.js.map +1 -0
- package/node_modules/@alanszp/express/jest.config.js +10 -0
- package/node_modules/@alanszp/express/node_modules/@jest/expect-utils/LICENSE +21 -0
- package/node_modules/@alanszp/express/node_modules/@jest/expect-utils/README.md +5 -0
- package/node_modules/@alanszp/express/node_modules/@jest/expect-utils/build/index.d.ts +93 -0
- package/node_modules/@alanszp/express/node_modules/@jest/expect-utils/build/index.js +37 -0
- package/node_modules/@alanszp/express/node_modules/@jest/expect-utils/build/jasmineUtils.js +282 -0
- package/node_modules/@alanszp/express/node_modules/@jest/expect-utils/build/types.js +1 -0
- package/node_modules/@alanszp/express/node_modules/@jest/expect-utils/build/utils.js +457 -0
- package/node_modules/@alanszp/express/node_modules/@jest/expect-utils/package.json +33 -0
- package/node_modules/@alanszp/express/node_modules/@jest/types/LICENSE +21 -0
- package/node_modules/@alanszp/express/node_modules/@jest/types/README.md +30 -0
- package/node_modules/@alanszp/express/node_modules/@jest/types/build/Circus.js +1 -0
- package/node_modules/@alanszp/express/node_modules/@jest/types/build/Config.js +1 -0
- package/node_modules/@alanszp/express/node_modules/@jest/types/build/Global.js +1 -0
- package/node_modules/@alanszp/express/node_modules/@jest/types/build/TestResult.js +1 -0
- package/node_modules/@alanszp/express/node_modules/@jest/types/build/Transform.js +1 -0
- package/node_modules/@alanszp/express/node_modules/@jest/types/build/index.d.ts +1166 -0
- package/node_modules/@alanszp/express/node_modules/@jest/types/build/index.js +1 -0
- package/node_modules/@alanszp/express/node_modules/@jest/types/package.json +38 -0
- package/node_modules/@alanszp/express/node_modules/@types/jest/LICENSE +21 -0
- package/node_modules/@alanszp/express/node_modules/@types/jest/README.md +17 -0
- package/node_modules/@alanszp/express/node_modules/@types/jest/index.d.ts +1608 -0
- package/node_modules/@alanszp/express/node_modules/@types/jest/package.json +159 -0
- package/node_modules/@alanszp/express/node_modules/@types/node/LICENSE +21 -0
- package/node_modules/@alanszp/express/node_modules/@types/node/README.md +15 -0
- package/node_modules/@alanszp/express/node_modules/@types/node/assert/strict.d.ts +8 -0
- package/node_modules/@alanszp/express/node_modules/@types/node/assert.d.ts +996 -0
- package/node_modules/@alanszp/express/node_modules/@types/node/async_hooks.d.ts +539 -0
- package/node_modules/@alanszp/express/node_modules/@types/node/buffer.d.ts +2362 -0
- package/node_modules/@alanszp/express/node_modules/@types/node/child_process.d.ts +1540 -0
- package/node_modules/@alanszp/express/node_modules/@types/node/cluster.d.ts +432 -0
- package/node_modules/@alanszp/express/node_modules/@types/node/console.d.ts +415 -0
- package/node_modules/@alanszp/express/node_modules/@types/node/constants.d.ts +19 -0
- package/node_modules/@alanszp/express/node_modules/@types/node/crypto.d.ts +4487 -0
- package/node_modules/@alanszp/express/node_modules/@types/node/dgram.d.ts +596 -0
- package/node_modules/@alanszp/express/node_modules/@types/node/diagnostics_channel.d.ts +545 -0
- package/node_modules/@alanszp/express/node_modules/@types/node/dns/promises.d.ts +425 -0
- package/node_modules/@alanszp/express/node_modules/@types/node/dns.d.ts +809 -0
- package/node_modules/@alanszp/express/node_modules/@types/node/dom-events.d.ts +122 -0
- package/node_modules/@alanszp/express/node_modules/@types/node/domain.d.ts +170 -0
- package/node_modules/@alanszp/express/node_modules/@types/node/events.d.ts +879 -0
- package/node_modules/@alanszp/express/node_modules/@types/node/fs/promises.d.ts +1239 -0
- package/node_modules/@alanszp/express/node_modules/@types/node/fs.d.ts +4311 -0
- package/node_modules/@alanszp/express/node_modules/@types/node/globals.d.ts +411 -0
- package/node_modules/@alanszp/express/node_modules/@types/node/globals.global.d.ts +1 -0
- package/node_modules/@alanszp/express/node_modules/@types/node/http.d.ts +1887 -0
- package/node_modules/@alanszp/express/node_modules/@types/node/http2.d.ts +2382 -0
- package/node_modules/@alanszp/express/node_modules/@types/node/https.d.ts +550 -0
- package/node_modules/@alanszp/express/node_modules/@types/node/index.d.ts +88 -0
- package/node_modules/@alanszp/express/node_modules/@types/node/inspector.d.ts +2747 -0
- package/node_modules/@alanszp/express/node_modules/@types/node/module.d.ts +315 -0
- package/node_modules/@alanszp/express/node_modules/@types/node/net.d.ts +949 -0
- package/node_modules/@alanszp/express/node_modules/@types/node/os.d.ts +478 -0
- package/node_modules/@alanszp/express/node_modules/@types/node/package.json +229 -0
- package/node_modules/@alanszp/express/node_modules/@types/node/path.d.ts +191 -0
- package/node_modules/@alanszp/express/node_modules/@types/node/perf_hooks.d.ts +645 -0
- package/node_modules/@alanszp/express/node_modules/@types/node/process.d.ts +1561 -0
- package/node_modules/@alanszp/express/node_modules/@types/node/punycode.d.ts +117 -0
- package/node_modules/@alanszp/express/node_modules/@types/node/querystring.d.ts +141 -0
- package/node_modules/@alanszp/express/node_modules/@types/node/readline/promises.d.ts +150 -0
- package/node_modules/@alanszp/express/node_modules/@types/node/readline.d.ts +539 -0
- package/node_modules/@alanszp/express/node_modules/@types/node/repl.d.ts +430 -0
- package/node_modules/@alanszp/express/node_modules/@types/node/stream/consumers.d.ts +12 -0
- package/node_modules/@alanszp/express/node_modules/@types/node/stream/promises.d.ts +83 -0
- package/node_modules/@alanszp/express/node_modules/@types/node/stream/web.d.ts +366 -0
- package/node_modules/@alanszp/express/node_modules/@types/node/stream.d.ts +1701 -0
- package/node_modules/@alanszp/express/node_modules/@types/node/string_decoder.d.ts +67 -0
- package/node_modules/@alanszp/express/node_modules/@types/node/test.d.ts +1465 -0
- package/node_modules/@alanszp/express/node_modules/@types/node/timers/promises.d.ts +93 -0
- package/node_modules/@alanszp/express/node_modules/@types/node/timers.d.ts +240 -0
- package/node_modules/@alanszp/express/node_modules/@types/node/tls.d.ts +1210 -0
- package/node_modules/@alanszp/express/node_modules/@types/node/trace_events.d.ts +182 -0
- package/node_modules/@alanszp/express/node_modules/@types/node/ts4.8/assert/strict.d.ts +8 -0
- package/node_modules/@alanszp/express/node_modules/@types/node/ts4.8/assert.d.ts +996 -0
- package/node_modules/@alanszp/express/node_modules/@types/node/ts4.8/async_hooks.d.ts +539 -0
- package/node_modules/@alanszp/express/node_modules/@types/node/ts4.8/buffer.d.ts +2362 -0
- package/node_modules/@alanszp/express/node_modules/@types/node/ts4.8/child_process.d.ts +1540 -0
- package/node_modules/@alanszp/express/node_modules/@types/node/ts4.8/cluster.d.ts +432 -0
- package/node_modules/@alanszp/express/node_modules/@types/node/ts4.8/console.d.ts +415 -0
- package/node_modules/@alanszp/express/node_modules/@types/node/ts4.8/constants.d.ts +19 -0
- package/node_modules/@alanszp/express/node_modules/@types/node/ts4.8/crypto.d.ts +4487 -0
- package/node_modules/@alanszp/express/node_modules/@types/node/ts4.8/dgram.d.ts +596 -0
- package/node_modules/@alanszp/express/node_modules/@types/node/ts4.8/diagnostics_channel.d.ts +545 -0
- package/node_modules/@alanszp/express/node_modules/@types/node/ts4.8/dns/promises.d.ts +425 -0
- package/node_modules/@alanszp/express/node_modules/@types/node/ts4.8/dns.d.ts +809 -0
- package/node_modules/@alanszp/express/node_modules/@types/node/ts4.8/dom-events.d.ts +122 -0
- package/node_modules/@alanszp/express/node_modules/@types/node/ts4.8/domain.d.ts +170 -0
- package/node_modules/@alanszp/express/node_modules/@types/node/ts4.8/events.d.ts +879 -0
- package/node_modules/@alanszp/express/node_modules/@types/node/ts4.8/fs/promises.d.ts +1239 -0
- package/node_modules/@alanszp/express/node_modules/@types/node/ts4.8/fs.d.ts +4311 -0
- package/node_modules/@alanszp/express/node_modules/@types/node/ts4.8/globals.d.ts +411 -0
- package/node_modules/@alanszp/express/node_modules/@types/node/ts4.8/globals.global.d.ts +1 -0
- package/node_modules/@alanszp/express/node_modules/@types/node/ts4.8/http.d.ts +1887 -0
- package/node_modules/@alanszp/express/node_modules/@types/node/ts4.8/http2.d.ts +2382 -0
- package/node_modules/@alanszp/express/node_modules/@types/node/ts4.8/https.d.ts +550 -0
- package/node_modules/@alanszp/express/node_modules/@types/node/ts4.8/index.d.ts +88 -0
- package/node_modules/@alanszp/express/node_modules/@types/node/ts4.8/inspector.d.ts +2747 -0
- package/node_modules/@alanszp/express/node_modules/@types/node/ts4.8/module.d.ts +315 -0
- package/node_modules/@alanszp/express/node_modules/@types/node/ts4.8/net.d.ts +949 -0
- package/node_modules/@alanszp/express/node_modules/@types/node/ts4.8/os.d.ts +478 -0
- package/node_modules/@alanszp/express/node_modules/@types/node/ts4.8/path.d.ts +191 -0
- package/node_modules/@alanszp/express/node_modules/@types/node/ts4.8/perf_hooks.d.ts +645 -0
- package/node_modules/@alanszp/express/node_modules/@types/node/ts4.8/process.d.ts +1561 -0
- package/node_modules/@alanszp/express/node_modules/@types/node/ts4.8/punycode.d.ts +117 -0
- package/node_modules/@alanszp/express/node_modules/@types/node/ts4.8/querystring.d.ts +141 -0
- package/node_modules/@alanszp/express/node_modules/@types/node/ts4.8/readline/promises.d.ts +150 -0
- package/node_modules/@alanszp/express/node_modules/@types/node/ts4.8/readline.d.ts +539 -0
- package/node_modules/@alanszp/express/node_modules/@types/node/ts4.8/repl.d.ts +430 -0
- package/node_modules/@alanszp/express/node_modules/@types/node/ts4.8/stream/consumers.d.ts +12 -0
- package/node_modules/@alanszp/express/node_modules/@types/node/ts4.8/stream/promises.d.ts +83 -0
- package/node_modules/@alanszp/express/node_modules/@types/node/ts4.8/stream/web.d.ts +366 -0
- package/node_modules/@alanszp/express/node_modules/@types/node/ts4.8/stream.d.ts +1701 -0
- package/node_modules/@alanszp/express/node_modules/@types/node/ts4.8/string_decoder.d.ts +67 -0
- package/node_modules/@alanszp/express/node_modules/@types/node/ts4.8/test.d.ts +1465 -0
- package/node_modules/@alanszp/express/node_modules/@types/node/ts4.8/timers/promises.d.ts +93 -0
- package/node_modules/@alanszp/express/node_modules/@types/node/ts4.8/timers.d.ts +240 -0
- package/node_modules/@alanszp/express/node_modules/@types/node/ts4.8/tls.d.ts +1210 -0
- package/node_modules/@alanszp/express/node_modules/@types/node/ts4.8/trace_events.d.ts +182 -0
- package/node_modules/@alanszp/express/node_modules/@types/node/ts4.8/tty.d.ts +208 -0
- package/node_modules/@alanszp/express/node_modules/@types/node/ts4.8/url.d.ts +927 -0
- package/node_modules/@alanszp/express/node_modules/@types/node/ts4.8/util.d.ts +2183 -0
- package/node_modules/@alanszp/express/node_modules/@types/node/ts4.8/v8.d.ts +764 -0
- package/node_modules/@alanszp/express/node_modules/@types/node/ts4.8/vm.d.ts +903 -0
- package/node_modules/@alanszp/express/node_modules/@types/node/ts4.8/wasi.d.ts +179 -0
- package/node_modules/@alanszp/express/node_modules/@types/node/ts4.8/worker_threads.d.ts +691 -0
- package/node_modules/@alanszp/express/node_modules/@types/node/ts4.8/zlib.d.ts +517 -0
- package/node_modules/@alanszp/express/node_modules/@types/node/tty.d.ts +208 -0
- package/node_modules/@alanszp/express/node_modules/@types/node/url.d.ts +927 -0
- package/node_modules/@alanszp/express/node_modules/@types/node/util.d.ts +2183 -0
- package/node_modules/@alanszp/express/node_modules/@types/node/v8.d.ts +764 -0
- package/node_modules/@alanszp/express/node_modules/@types/node/vm.d.ts +903 -0
- package/node_modules/@alanszp/express/node_modules/@types/node/wasi.d.ts +179 -0
- package/node_modules/@alanszp/express/node_modules/@types/node/worker_threads.d.ts +691 -0
- package/node_modules/@alanszp/express/node_modules/@types/node/zlib.d.ts +517 -0
- package/node_modules/@alanszp/express/package.json +49 -0
- package/node_modules/@alanszp/express/src/helpers/appIdentifier.ts +5 -0
- package/node_modules/@alanszp/express/src/helpers/getIp.ts +5 -0
- package/node_modules/@alanszp/express/src/helpers/getRequestLogger.ts +6 -0
- package/node_modules/@alanszp/express/src/helpers/now.ts +3 -0
- package/node_modules/@alanszp/express/src/index.ts +11 -0
- package/node_modules/@alanszp/express/src/middlewares/accessLogger.ts +34 -0
- package/node_modules/@alanszp/express/src/middlewares/auditLog.ts +49 -0
- package/node_modules/@alanszp/express/src/middlewares/authedForOrg.ts +51 -0
- package/node_modules/@alanszp/express/src/middlewares/authenticateUser.test.ts +403 -0
- package/node_modules/@alanszp/express/src/middlewares/authenticateUser.ts +171 -0
- package/node_modules/@alanszp/express/src/middlewares/createContext.test.ts +85 -0
- package/node_modules/@alanszp/express/src/middlewares/createContext.ts +46 -0
- package/node_modules/@alanszp/express/src/middlewares/hasRoles.ts +26 -0
- package/node_modules/@alanszp/express/src/middlewares/jsonBodyParser.ts +23 -0
- package/node_modules/@alanszp/express/src/middlewares/returnInternalServerError.ts +16 -0
- package/node_modules/@alanszp/express/src/middlewares/returnNotFound.ts +12 -0
- package/node_modules/@alanszp/express/src/test/mocks/authOptionsMocks.ts +35 -0
- package/node_modules/@alanszp/express/src/test/mocks/expressMocks.ts +33 -0
- package/node_modules/@alanszp/express/src/test/mocks/jwtUserMocks.ts +19 -0
- package/node_modules/@alanszp/express/src/test/setup.test.ts +15 -0
- package/node_modules/@alanszp/express/src/test/setup.ts +3 -0
- package/node_modules/@alanszp/express/src/types/AuthMethod.ts +27 -0
- package/node_modules/@alanszp/express/src/types/GenericRequest.ts +3 -0
- package/node_modules/@alanszp/express/src/types/custom.d.ts +20 -0
- package/node_modules/@alanszp/express/src/views/errorView.ts +11 -0
- package/node_modules/@alanszp/express/tsconfig.json +18 -0
- package/node_modules/@alanszp/jwt/.gitignore +3 -0
- package/node_modules/@alanszp/jwt/.npmignore +3 -0
- package/node_modules/@alanszp/jwt/LICENSE +21 -0
- package/node_modules/@alanszp/jwt/dist/index.d.ts +2 -0
- package/node_modules/@alanszp/jwt/dist/index.js +15 -0
- package/node_modules/@alanszp/jwt/dist/index.js.map +1 -0
- package/node_modules/@alanszp/jwt/dist/jwt.d.ts +12 -0
- package/node_modules/@alanszp/jwt/dist/jwt.js +89 -0
- package/node_modules/@alanszp/jwt/dist/jwt.js.map +1 -0
- package/node_modules/@alanszp/jwt/dist/types.d.ts +26 -0
- package/node_modules/@alanszp/jwt/dist/types.js +3 -0
- package/node_modules/@alanszp/jwt/dist/types.js.map +1 -0
- package/node_modules/@alanszp/jwt/node_modules/@types/node/LICENSE +21 -0
- package/node_modules/@alanszp/jwt/node_modules/@types/node/README.md +15 -0
- package/node_modules/@alanszp/jwt/node_modules/@types/node/assert/strict.d.ts +8 -0
- package/node_modules/@alanszp/jwt/node_modules/@types/node/assert.d.ts +996 -0
- package/node_modules/@alanszp/jwt/node_modules/@types/node/async_hooks.d.ts +539 -0
- package/node_modules/@alanszp/jwt/node_modules/@types/node/buffer.d.ts +2362 -0
- package/node_modules/@alanszp/jwt/node_modules/@types/node/child_process.d.ts +1540 -0
- package/node_modules/@alanszp/jwt/node_modules/@types/node/cluster.d.ts +432 -0
- package/node_modules/@alanszp/jwt/node_modules/@types/node/console.d.ts +415 -0
- package/node_modules/@alanszp/jwt/node_modules/@types/node/constants.d.ts +19 -0
- package/node_modules/@alanszp/jwt/node_modules/@types/node/crypto.d.ts +4487 -0
- package/node_modules/@alanszp/jwt/node_modules/@types/node/dgram.d.ts +596 -0
- package/node_modules/@alanszp/jwt/node_modules/@types/node/diagnostics_channel.d.ts +545 -0
- package/node_modules/@alanszp/jwt/node_modules/@types/node/dns/promises.d.ts +425 -0
- package/node_modules/@alanszp/jwt/node_modules/@types/node/dns.d.ts +809 -0
- package/node_modules/@alanszp/jwt/node_modules/@types/node/dom-events.d.ts +122 -0
- package/node_modules/@alanszp/jwt/node_modules/@types/node/domain.d.ts +170 -0
- package/node_modules/@alanszp/jwt/node_modules/@types/node/events.d.ts +879 -0
- package/node_modules/@alanszp/jwt/node_modules/@types/node/fs/promises.d.ts +1239 -0
- package/node_modules/@alanszp/jwt/node_modules/@types/node/fs.d.ts +4311 -0
- package/node_modules/@alanszp/jwt/node_modules/@types/node/globals.d.ts +411 -0
- package/node_modules/@alanszp/jwt/node_modules/@types/node/globals.global.d.ts +1 -0
- package/node_modules/@alanszp/jwt/node_modules/@types/node/http.d.ts +1887 -0
- package/node_modules/@alanszp/jwt/node_modules/@types/node/http2.d.ts +2382 -0
- package/node_modules/@alanszp/jwt/node_modules/@types/node/https.d.ts +550 -0
- package/node_modules/@alanszp/jwt/node_modules/@types/node/index.d.ts +88 -0
- package/node_modules/@alanszp/jwt/node_modules/@types/node/inspector.d.ts +2747 -0
- package/node_modules/@alanszp/jwt/node_modules/@types/node/module.d.ts +315 -0
- package/node_modules/@alanszp/jwt/node_modules/@types/node/net.d.ts +949 -0
- package/node_modules/@alanszp/jwt/node_modules/@types/node/os.d.ts +478 -0
- package/node_modules/@alanszp/jwt/node_modules/@types/node/package.json +229 -0
- package/node_modules/@alanszp/jwt/node_modules/@types/node/path.d.ts +191 -0
- package/node_modules/@alanszp/jwt/node_modules/@types/node/perf_hooks.d.ts +645 -0
- package/node_modules/@alanszp/jwt/node_modules/@types/node/process.d.ts +1561 -0
- package/node_modules/@alanszp/jwt/node_modules/@types/node/punycode.d.ts +117 -0
- package/node_modules/@alanszp/jwt/node_modules/@types/node/querystring.d.ts +141 -0
- package/node_modules/@alanszp/jwt/node_modules/@types/node/readline/promises.d.ts +150 -0
- package/node_modules/@alanszp/jwt/node_modules/@types/node/readline.d.ts +539 -0
- package/node_modules/@alanszp/jwt/node_modules/@types/node/repl.d.ts +430 -0
- package/node_modules/@alanszp/jwt/node_modules/@types/node/stream/consumers.d.ts +12 -0
- package/node_modules/@alanszp/jwt/node_modules/@types/node/stream/promises.d.ts +83 -0
- package/node_modules/@alanszp/jwt/node_modules/@types/node/stream/web.d.ts +366 -0
- package/node_modules/@alanszp/jwt/node_modules/@types/node/stream.d.ts +1701 -0
- package/node_modules/@alanszp/jwt/node_modules/@types/node/string_decoder.d.ts +67 -0
- package/node_modules/@alanszp/jwt/node_modules/@types/node/test.d.ts +1465 -0
- package/node_modules/@alanszp/jwt/node_modules/@types/node/timers/promises.d.ts +93 -0
- package/node_modules/@alanszp/jwt/node_modules/@types/node/timers.d.ts +240 -0
- package/node_modules/@alanszp/jwt/node_modules/@types/node/tls.d.ts +1210 -0
- package/node_modules/@alanszp/jwt/node_modules/@types/node/trace_events.d.ts +182 -0
- package/node_modules/@alanszp/jwt/node_modules/@types/node/ts4.8/assert/strict.d.ts +8 -0
- package/node_modules/@alanszp/jwt/node_modules/@types/node/ts4.8/assert.d.ts +996 -0
- package/node_modules/@alanszp/jwt/node_modules/@types/node/ts4.8/async_hooks.d.ts +539 -0
- package/node_modules/@alanszp/jwt/node_modules/@types/node/ts4.8/buffer.d.ts +2362 -0
- package/node_modules/@alanszp/jwt/node_modules/@types/node/ts4.8/child_process.d.ts +1540 -0
- package/node_modules/@alanszp/jwt/node_modules/@types/node/ts4.8/cluster.d.ts +432 -0
- package/node_modules/@alanszp/jwt/node_modules/@types/node/ts4.8/console.d.ts +415 -0
- package/node_modules/@alanszp/jwt/node_modules/@types/node/ts4.8/constants.d.ts +19 -0
- package/node_modules/@alanszp/jwt/node_modules/@types/node/ts4.8/crypto.d.ts +4487 -0
- package/node_modules/@alanszp/jwt/node_modules/@types/node/ts4.8/dgram.d.ts +596 -0
- package/node_modules/@alanszp/jwt/node_modules/@types/node/ts4.8/diagnostics_channel.d.ts +545 -0
- package/node_modules/@alanszp/jwt/node_modules/@types/node/ts4.8/dns/promises.d.ts +425 -0
- package/node_modules/@alanszp/jwt/node_modules/@types/node/ts4.8/dns.d.ts +809 -0
- package/node_modules/@alanszp/jwt/node_modules/@types/node/ts4.8/dom-events.d.ts +122 -0
- package/node_modules/@alanszp/jwt/node_modules/@types/node/ts4.8/domain.d.ts +170 -0
- package/node_modules/@alanszp/jwt/node_modules/@types/node/ts4.8/events.d.ts +879 -0
- package/node_modules/@alanszp/jwt/node_modules/@types/node/ts4.8/fs/promises.d.ts +1239 -0
- package/node_modules/@alanszp/jwt/node_modules/@types/node/ts4.8/fs.d.ts +4311 -0
- package/node_modules/@alanszp/jwt/node_modules/@types/node/ts4.8/globals.d.ts +411 -0
- package/node_modules/@alanszp/jwt/node_modules/@types/node/ts4.8/globals.global.d.ts +1 -0
- package/node_modules/@alanszp/jwt/node_modules/@types/node/ts4.8/http.d.ts +1887 -0
- package/node_modules/@alanszp/jwt/node_modules/@types/node/ts4.8/http2.d.ts +2382 -0
- package/node_modules/@alanszp/jwt/node_modules/@types/node/ts4.8/https.d.ts +550 -0
- package/node_modules/@alanszp/jwt/node_modules/@types/node/ts4.8/index.d.ts +88 -0
- package/node_modules/@alanszp/jwt/node_modules/@types/node/ts4.8/inspector.d.ts +2747 -0
- package/node_modules/@alanszp/jwt/node_modules/@types/node/ts4.8/module.d.ts +315 -0
- package/node_modules/@alanszp/jwt/node_modules/@types/node/ts4.8/net.d.ts +949 -0
- package/node_modules/@alanszp/jwt/node_modules/@types/node/ts4.8/os.d.ts +478 -0
- package/node_modules/@alanszp/jwt/node_modules/@types/node/ts4.8/path.d.ts +191 -0
- package/node_modules/@alanszp/jwt/node_modules/@types/node/ts4.8/perf_hooks.d.ts +645 -0
- package/node_modules/@alanszp/jwt/node_modules/@types/node/ts4.8/process.d.ts +1561 -0
- package/node_modules/@alanszp/jwt/node_modules/@types/node/ts4.8/punycode.d.ts +117 -0
- package/node_modules/@alanszp/jwt/node_modules/@types/node/ts4.8/querystring.d.ts +141 -0
- package/node_modules/@alanszp/jwt/node_modules/@types/node/ts4.8/readline/promises.d.ts +150 -0
- package/node_modules/@alanszp/jwt/node_modules/@types/node/ts4.8/readline.d.ts +539 -0
- package/node_modules/@alanszp/jwt/node_modules/@types/node/ts4.8/repl.d.ts +430 -0
- package/node_modules/@alanszp/jwt/node_modules/@types/node/ts4.8/stream/consumers.d.ts +12 -0
- package/node_modules/@alanszp/jwt/node_modules/@types/node/ts4.8/stream/promises.d.ts +83 -0
- package/node_modules/@alanszp/jwt/node_modules/@types/node/ts4.8/stream/web.d.ts +366 -0
- package/node_modules/@alanszp/jwt/node_modules/@types/node/ts4.8/stream.d.ts +1701 -0
- package/node_modules/@alanszp/jwt/node_modules/@types/node/ts4.8/string_decoder.d.ts +67 -0
- package/node_modules/@alanszp/jwt/node_modules/@types/node/ts4.8/test.d.ts +1465 -0
- package/node_modules/@alanszp/jwt/node_modules/@types/node/ts4.8/timers/promises.d.ts +93 -0
- package/node_modules/@alanszp/jwt/node_modules/@types/node/ts4.8/timers.d.ts +240 -0
- package/node_modules/@alanszp/jwt/node_modules/@types/node/ts4.8/tls.d.ts +1210 -0
- package/node_modules/@alanszp/jwt/node_modules/@types/node/ts4.8/trace_events.d.ts +182 -0
- package/node_modules/@alanszp/jwt/node_modules/@types/node/ts4.8/tty.d.ts +208 -0
- package/node_modules/@alanszp/jwt/node_modules/@types/node/ts4.8/url.d.ts +927 -0
- package/node_modules/@alanszp/jwt/node_modules/@types/node/ts4.8/util.d.ts +2183 -0
- package/node_modules/@alanszp/jwt/node_modules/@types/node/ts4.8/v8.d.ts +764 -0
- package/node_modules/@alanszp/jwt/node_modules/@types/node/ts4.8/vm.d.ts +903 -0
- package/node_modules/@alanszp/jwt/node_modules/@types/node/ts4.8/wasi.d.ts +179 -0
- package/node_modules/@alanszp/jwt/node_modules/@types/node/ts4.8/worker_threads.d.ts +691 -0
- package/node_modules/@alanszp/jwt/node_modules/@types/node/ts4.8/zlib.d.ts +517 -0
- package/node_modules/@alanszp/jwt/node_modules/@types/node/tty.d.ts +208 -0
- package/node_modules/@alanszp/jwt/node_modules/@types/node/url.d.ts +927 -0
- package/node_modules/@alanszp/jwt/node_modules/@types/node/util.d.ts +2183 -0
- package/node_modules/@alanszp/jwt/node_modules/@types/node/v8.d.ts +764 -0
- package/node_modules/@alanszp/jwt/node_modules/@types/node/vm.d.ts +903 -0
- package/node_modules/@alanszp/jwt/node_modules/@types/node/wasi.d.ts +179 -0
- package/node_modules/@alanszp/jwt/node_modules/@types/node/worker_threads.d.ts +691 -0
- package/node_modules/@alanszp/jwt/node_modules/@types/node/zlib.d.ts +517 -0
- package/node_modules/@alanszp/jwt/package.json +30 -0
- package/node_modules/@alanszp/jwt/src/index.ts +2 -0
- package/node_modules/@alanszp/jwt/src/jwt.ts +106 -0
- package/node_modules/@alanszp/jwt/src/types.ts +31 -0
- package/node_modules/@alanszp/jwt/tsconfig.json +15 -0
- package/node_modules/@alanszp/logger/.gitignore +3 -0
- package/node_modules/@alanszp/logger/.npmignore +3 -0
- package/node_modules/@alanszp/logger/LICENSE +21 -0
- package/node_modules/@alanszp/logger/dist/config.d.ts +28 -0
- package/node_modules/@alanszp/logger/dist/config.js +3 -0
- package/node_modules/@alanszp/logger/dist/config.js.map +1 -0
- package/node_modules/@alanszp/logger/dist/factory.d.ts +5 -0
- package/node_modules/@alanszp/logger/dist/factory.js +55 -0
- package/node_modules/@alanszp/logger/dist/factory.js.map +1 -0
- package/node_modules/@alanszp/logger/dist/index.d.ts +5 -0
- package/node_modules/@alanszp/logger/dist/index.js +20 -0
- package/node_modules/@alanszp/logger/dist/index.js.map +1 -0
- package/node_modules/@alanszp/logger/dist/interfaces.d.ts +23 -0
- package/node_modules/@alanszp/logger/dist/interfaces.js +18 -0
- package/node_modules/@alanszp/logger/dist/interfaces.js.map +1 -0
- package/node_modules/@alanszp/logger/dist/logger.d.ts +14 -0
- package/node_modules/@alanszp/logger/dist/logger.js +45 -0
- package/node_modules/@alanszp/logger/dist/logger.js.map +1 -0
- package/node_modules/@alanszp/logger/dist/mock.d.ts +11 -0
- package/node_modules/@alanszp/logger/dist/mock.js +32 -0
- package/node_modules/@alanszp/logger/dist/mock.js.map +1 -0
- package/node_modules/@alanszp/logger/dist/serializer.d.ts +5 -0
- package/node_modules/@alanszp/logger/dist/serializer.js +67 -0
- package/node_modules/@alanszp/logger/dist/serializer.js.map +1 -0
- package/node_modules/@alanszp/logger/dist/slackBunyan.d.ts +16 -0
- package/node_modules/@alanszp/logger/dist/slackBunyan.js +108 -0
- package/node_modules/@alanszp/logger/dist/slackBunyan.js.map +1 -0
- package/node_modules/@alanszp/logger/node_modules/@types/node/LICENSE +21 -0
- package/node_modules/@alanszp/logger/node_modules/@types/node/README.md +15 -0
- package/node_modules/@alanszp/logger/node_modules/@types/node/assert/strict.d.ts +8 -0
- package/node_modules/@alanszp/logger/node_modules/@types/node/assert.d.ts +996 -0
- package/node_modules/@alanszp/logger/node_modules/@types/node/async_hooks.d.ts +539 -0
- package/node_modules/@alanszp/logger/node_modules/@types/node/buffer.d.ts +2362 -0
- package/node_modules/@alanszp/logger/node_modules/@types/node/child_process.d.ts +1540 -0
- package/node_modules/@alanszp/logger/node_modules/@types/node/cluster.d.ts +432 -0
- package/node_modules/@alanszp/logger/node_modules/@types/node/console.d.ts +415 -0
- package/node_modules/@alanszp/logger/node_modules/@types/node/constants.d.ts +19 -0
- package/node_modules/@alanszp/logger/node_modules/@types/node/crypto.d.ts +4487 -0
- package/node_modules/@alanszp/logger/node_modules/@types/node/dgram.d.ts +596 -0
- package/node_modules/@alanszp/logger/node_modules/@types/node/diagnostics_channel.d.ts +545 -0
- package/node_modules/@alanszp/logger/node_modules/@types/node/dns/promises.d.ts +425 -0
- package/node_modules/@alanszp/logger/node_modules/@types/node/dns.d.ts +809 -0
- package/node_modules/@alanszp/logger/node_modules/@types/node/dom-events.d.ts +122 -0
- package/node_modules/@alanszp/logger/node_modules/@types/node/domain.d.ts +170 -0
- package/node_modules/@alanszp/logger/node_modules/@types/node/events.d.ts +879 -0
- package/node_modules/@alanszp/logger/node_modules/@types/node/fs/promises.d.ts +1239 -0
- package/node_modules/@alanszp/logger/node_modules/@types/node/fs.d.ts +4311 -0
- package/node_modules/@alanszp/logger/node_modules/@types/node/globals.d.ts +411 -0
- package/node_modules/@alanszp/logger/node_modules/@types/node/globals.global.d.ts +1 -0
- package/node_modules/@alanszp/logger/node_modules/@types/node/http.d.ts +1887 -0
- package/node_modules/@alanszp/logger/node_modules/@types/node/http2.d.ts +2382 -0
- package/node_modules/@alanszp/logger/node_modules/@types/node/https.d.ts +550 -0
- package/node_modules/@alanszp/logger/node_modules/@types/node/index.d.ts +88 -0
- package/node_modules/@alanszp/logger/node_modules/@types/node/inspector.d.ts +2747 -0
- package/node_modules/@alanszp/logger/node_modules/@types/node/module.d.ts +315 -0
- package/node_modules/@alanszp/logger/node_modules/@types/node/net.d.ts +949 -0
- package/node_modules/@alanszp/logger/node_modules/@types/node/os.d.ts +478 -0
- package/node_modules/@alanszp/logger/node_modules/@types/node/package.json +229 -0
- package/node_modules/@alanszp/logger/node_modules/@types/node/path.d.ts +191 -0
- package/node_modules/@alanszp/logger/node_modules/@types/node/perf_hooks.d.ts +645 -0
- package/node_modules/@alanszp/logger/node_modules/@types/node/process.d.ts +1561 -0
- package/node_modules/@alanszp/logger/node_modules/@types/node/punycode.d.ts +117 -0
- package/node_modules/@alanszp/logger/node_modules/@types/node/querystring.d.ts +141 -0
- package/node_modules/@alanszp/logger/node_modules/@types/node/readline/promises.d.ts +150 -0
- package/node_modules/@alanszp/logger/node_modules/@types/node/readline.d.ts +539 -0
- package/node_modules/@alanszp/logger/node_modules/@types/node/repl.d.ts +430 -0
- package/node_modules/@alanszp/logger/node_modules/@types/node/stream/consumers.d.ts +12 -0
- package/node_modules/@alanszp/logger/node_modules/@types/node/stream/promises.d.ts +83 -0
- package/node_modules/@alanszp/logger/node_modules/@types/node/stream/web.d.ts +366 -0
- package/node_modules/@alanszp/logger/node_modules/@types/node/stream.d.ts +1701 -0
- package/node_modules/@alanszp/logger/node_modules/@types/node/string_decoder.d.ts +67 -0
- package/node_modules/@alanszp/logger/node_modules/@types/node/test.d.ts +1465 -0
- package/node_modules/@alanszp/logger/node_modules/@types/node/timers/promises.d.ts +93 -0
- package/node_modules/@alanszp/logger/node_modules/@types/node/timers.d.ts +240 -0
- package/node_modules/@alanszp/logger/node_modules/@types/node/tls.d.ts +1210 -0
- package/node_modules/@alanszp/logger/node_modules/@types/node/trace_events.d.ts +182 -0
- package/node_modules/@alanszp/logger/node_modules/@types/node/ts4.8/assert/strict.d.ts +8 -0
- package/node_modules/@alanszp/logger/node_modules/@types/node/ts4.8/assert.d.ts +996 -0
- package/node_modules/@alanszp/logger/node_modules/@types/node/ts4.8/async_hooks.d.ts +539 -0
- package/node_modules/@alanszp/logger/node_modules/@types/node/ts4.8/buffer.d.ts +2362 -0
- package/node_modules/@alanszp/logger/node_modules/@types/node/ts4.8/child_process.d.ts +1540 -0
- package/node_modules/@alanszp/logger/node_modules/@types/node/ts4.8/cluster.d.ts +432 -0
- package/node_modules/@alanszp/logger/node_modules/@types/node/ts4.8/console.d.ts +415 -0
- package/node_modules/@alanszp/logger/node_modules/@types/node/ts4.8/constants.d.ts +19 -0
- package/node_modules/@alanszp/logger/node_modules/@types/node/ts4.8/crypto.d.ts +4487 -0
- package/node_modules/@alanszp/logger/node_modules/@types/node/ts4.8/dgram.d.ts +596 -0
- package/node_modules/@alanszp/logger/node_modules/@types/node/ts4.8/diagnostics_channel.d.ts +545 -0
- package/node_modules/@alanszp/logger/node_modules/@types/node/ts4.8/dns/promises.d.ts +425 -0
- package/node_modules/@alanszp/logger/node_modules/@types/node/ts4.8/dns.d.ts +809 -0
- package/node_modules/@alanszp/logger/node_modules/@types/node/ts4.8/dom-events.d.ts +122 -0
- package/node_modules/@alanszp/logger/node_modules/@types/node/ts4.8/domain.d.ts +170 -0
- package/node_modules/@alanszp/logger/node_modules/@types/node/ts4.8/events.d.ts +879 -0
- package/node_modules/@alanszp/logger/node_modules/@types/node/ts4.8/fs/promises.d.ts +1239 -0
- package/node_modules/@alanszp/logger/node_modules/@types/node/ts4.8/fs.d.ts +4311 -0
- package/node_modules/@alanszp/logger/node_modules/@types/node/ts4.8/globals.d.ts +411 -0
- package/node_modules/@alanszp/logger/node_modules/@types/node/ts4.8/globals.global.d.ts +1 -0
- package/node_modules/@alanszp/logger/node_modules/@types/node/ts4.8/http.d.ts +1887 -0
- package/node_modules/@alanszp/logger/node_modules/@types/node/ts4.8/http2.d.ts +2382 -0
- package/node_modules/@alanszp/logger/node_modules/@types/node/ts4.8/https.d.ts +550 -0
- package/node_modules/@alanszp/logger/node_modules/@types/node/ts4.8/index.d.ts +88 -0
- package/node_modules/@alanszp/logger/node_modules/@types/node/ts4.8/inspector.d.ts +2747 -0
- package/node_modules/@alanszp/logger/node_modules/@types/node/ts4.8/module.d.ts +315 -0
- package/node_modules/@alanszp/logger/node_modules/@types/node/ts4.8/net.d.ts +949 -0
- package/node_modules/@alanszp/logger/node_modules/@types/node/ts4.8/os.d.ts +478 -0
- package/node_modules/@alanszp/logger/node_modules/@types/node/ts4.8/path.d.ts +191 -0
- package/node_modules/@alanszp/logger/node_modules/@types/node/ts4.8/perf_hooks.d.ts +645 -0
- package/node_modules/@alanszp/logger/node_modules/@types/node/ts4.8/process.d.ts +1561 -0
- package/node_modules/@alanszp/logger/node_modules/@types/node/ts4.8/punycode.d.ts +117 -0
- package/node_modules/@alanszp/logger/node_modules/@types/node/ts4.8/querystring.d.ts +141 -0
- package/node_modules/@alanszp/logger/node_modules/@types/node/ts4.8/readline/promises.d.ts +150 -0
- package/node_modules/@alanszp/logger/node_modules/@types/node/ts4.8/readline.d.ts +539 -0
- package/node_modules/@alanszp/logger/node_modules/@types/node/ts4.8/repl.d.ts +430 -0
- package/node_modules/@alanszp/logger/node_modules/@types/node/ts4.8/stream/consumers.d.ts +12 -0
- package/node_modules/@alanszp/logger/node_modules/@types/node/ts4.8/stream/promises.d.ts +83 -0
- package/node_modules/@alanszp/logger/node_modules/@types/node/ts4.8/stream/web.d.ts +366 -0
- package/node_modules/@alanszp/logger/node_modules/@types/node/ts4.8/stream.d.ts +1701 -0
- package/node_modules/@alanszp/logger/node_modules/@types/node/ts4.8/string_decoder.d.ts +67 -0
- package/node_modules/@alanszp/logger/node_modules/@types/node/ts4.8/test.d.ts +1465 -0
- package/node_modules/@alanszp/logger/node_modules/@types/node/ts4.8/timers/promises.d.ts +93 -0
- package/node_modules/@alanszp/logger/node_modules/@types/node/ts4.8/timers.d.ts +240 -0
- package/node_modules/@alanszp/logger/node_modules/@types/node/ts4.8/tls.d.ts +1210 -0
- package/node_modules/@alanszp/logger/node_modules/@types/node/ts4.8/trace_events.d.ts +182 -0
- package/node_modules/@alanszp/logger/node_modules/@types/node/ts4.8/tty.d.ts +208 -0
- package/node_modules/@alanszp/logger/node_modules/@types/node/ts4.8/url.d.ts +927 -0
- package/node_modules/@alanszp/logger/node_modules/@types/node/ts4.8/util.d.ts +2183 -0
- package/node_modules/@alanszp/logger/node_modules/@types/node/ts4.8/v8.d.ts +764 -0
- package/node_modules/@alanszp/logger/node_modules/@types/node/ts4.8/vm.d.ts +903 -0
- package/node_modules/@alanszp/logger/node_modules/@types/node/ts4.8/wasi.d.ts +179 -0
- package/node_modules/@alanszp/logger/node_modules/@types/node/ts4.8/worker_threads.d.ts +691 -0
- package/node_modules/@alanszp/logger/node_modules/@types/node/ts4.8/zlib.d.ts +517 -0
- package/node_modules/@alanszp/logger/node_modules/@types/node/tty.d.ts +208 -0
- package/node_modules/@alanszp/logger/node_modules/@types/node/url.d.ts +927 -0
- package/node_modules/@alanszp/logger/node_modules/@types/node/util.d.ts +2183 -0
- package/node_modules/@alanszp/logger/node_modules/@types/node/v8.d.ts +764 -0
- package/node_modules/@alanszp/logger/node_modules/@types/node/vm.d.ts +903 -0
- package/node_modules/@alanszp/logger/node_modules/@types/node/wasi.d.ts +179 -0
- package/node_modules/@alanszp/logger/node_modules/@types/node/worker_threads.d.ts +691 -0
- package/node_modules/@alanszp/logger/node_modules/@types/node/zlib.d.ts +517 -0
- package/node_modules/@alanszp/logger/package.json +36 -0
- package/node_modules/@alanszp/logger/src/config.ts +34 -0
- package/node_modules/@alanszp/logger/src/factory.ts +68 -0
- package/node_modules/@alanszp/logger/src/index.ts +5 -0
- package/node_modules/@alanszp/logger/src/interfaces.ts +26 -0
- package/node_modules/@alanszp/logger/src/logger.ts +54 -0
- package/node_modules/@alanszp/logger/src/mock.ts +35 -0
- package/node_modules/@alanszp/logger/src/serializer.ts +65 -0
- package/node_modules/@alanszp/logger/src/slackBunyan.ts +133 -0
- package/node_modules/@alanszp/logger/tsconfig.json +15 -0
- package/node_modules/@types/node/LICENSE +21 -0
- package/node_modules/@types/node/README.md +15 -0
- package/node_modules/@types/node/assert/strict.d.ts +8 -0
- package/node_modules/@types/node/assert.d.ts +996 -0
- package/node_modules/@types/node/async_hooks.d.ts +539 -0
- package/node_modules/@types/node/buffer.d.ts +2362 -0
- package/node_modules/@types/node/child_process.d.ts +1540 -0
- package/node_modules/@types/node/cluster.d.ts +432 -0
- package/node_modules/@types/node/console.d.ts +415 -0
- package/node_modules/@types/node/constants.d.ts +19 -0
- package/node_modules/@types/node/crypto.d.ts +4487 -0
- package/node_modules/@types/node/dgram.d.ts +596 -0
- package/node_modules/@types/node/diagnostics_channel.d.ts +545 -0
- package/node_modules/@types/node/dns/promises.d.ts +425 -0
- package/node_modules/@types/node/dns.d.ts +809 -0
- package/node_modules/@types/node/dom-events.d.ts +122 -0
- package/node_modules/@types/node/domain.d.ts +170 -0
- package/node_modules/@types/node/events.d.ts +879 -0
- package/node_modules/@types/node/fs/promises.d.ts +1239 -0
- package/node_modules/@types/node/fs.d.ts +4311 -0
- package/node_modules/@types/node/globals.d.ts +411 -0
- package/node_modules/@types/node/globals.global.d.ts +1 -0
- package/node_modules/@types/node/http.d.ts +1887 -0
- package/node_modules/@types/node/http2.d.ts +2382 -0
- package/node_modules/@types/node/https.d.ts +550 -0
- package/node_modules/@types/node/index.d.ts +88 -0
- package/node_modules/@types/node/inspector.d.ts +2747 -0
- package/node_modules/@types/node/module.d.ts +315 -0
- package/node_modules/@types/node/net.d.ts +949 -0
- package/node_modules/@types/node/os.d.ts +478 -0
- package/node_modules/@types/node/package.json +229 -0
- package/node_modules/@types/node/path.d.ts +191 -0
- package/node_modules/@types/node/perf_hooks.d.ts +645 -0
- package/node_modules/@types/node/process.d.ts +1561 -0
- package/node_modules/@types/node/punycode.d.ts +117 -0
- package/node_modules/@types/node/querystring.d.ts +141 -0
- package/node_modules/@types/node/readline/promises.d.ts +150 -0
- package/node_modules/@types/node/readline.d.ts +539 -0
- package/node_modules/@types/node/repl.d.ts +430 -0
- package/node_modules/@types/node/stream/consumers.d.ts +12 -0
- package/node_modules/@types/node/stream/promises.d.ts +83 -0
- package/node_modules/@types/node/stream/web.d.ts +366 -0
- package/node_modules/@types/node/stream.d.ts +1701 -0
- package/node_modules/@types/node/string_decoder.d.ts +67 -0
- package/node_modules/@types/node/test.d.ts +1465 -0
- package/node_modules/@types/node/timers/promises.d.ts +93 -0
- package/node_modules/@types/node/timers.d.ts +240 -0
- package/node_modules/@types/node/tls.d.ts +1210 -0
- package/node_modules/@types/node/trace_events.d.ts +182 -0
- package/node_modules/@types/node/ts4.8/assert/strict.d.ts +8 -0
- package/node_modules/@types/node/ts4.8/assert.d.ts +996 -0
- package/node_modules/@types/node/ts4.8/async_hooks.d.ts +539 -0
- package/node_modules/@types/node/ts4.8/buffer.d.ts +2362 -0
- package/node_modules/@types/node/ts4.8/child_process.d.ts +1540 -0
- package/node_modules/@types/node/ts4.8/cluster.d.ts +432 -0
- package/node_modules/@types/node/ts4.8/console.d.ts +415 -0
- package/node_modules/@types/node/ts4.8/constants.d.ts +19 -0
- package/node_modules/@types/node/ts4.8/crypto.d.ts +4487 -0
- package/node_modules/@types/node/ts4.8/dgram.d.ts +596 -0
- package/node_modules/@types/node/ts4.8/diagnostics_channel.d.ts +545 -0
- package/node_modules/@types/node/ts4.8/dns/promises.d.ts +425 -0
- package/node_modules/@types/node/ts4.8/dns.d.ts +809 -0
- package/node_modules/@types/node/ts4.8/dom-events.d.ts +122 -0
- package/node_modules/@types/node/ts4.8/domain.d.ts +170 -0
- package/node_modules/@types/node/ts4.8/events.d.ts +879 -0
- package/node_modules/@types/node/ts4.8/fs/promises.d.ts +1239 -0
- package/node_modules/@types/node/ts4.8/fs.d.ts +4311 -0
- package/node_modules/@types/node/ts4.8/globals.d.ts +411 -0
- package/node_modules/@types/node/ts4.8/globals.global.d.ts +1 -0
- package/node_modules/@types/node/ts4.8/http.d.ts +1887 -0
- package/node_modules/@types/node/ts4.8/http2.d.ts +2382 -0
- package/node_modules/@types/node/ts4.8/https.d.ts +550 -0
- package/node_modules/@types/node/ts4.8/index.d.ts +88 -0
- package/node_modules/@types/node/ts4.8/inspector.d.ts +2747 -0
- package/node_modules/@types/node/ts4.8/module.d.ts +315 -0
- package/node_modules/@types/node/ts4.8/net.d.ts +949 -0
- package/node_modules/@types/node/ts4.8/os.d.ts +478 -0
- package/node_modules/@types/node/ts4.8/path.d.ts +191 -0
- package/node_modules/@types/node/ts4.8/perf_hooks.d.ts +645 -0
- package/node_modules/@types/node/ts4.8/process.d.ts +1561 -0
- package/node_modules/@types/node/ts4.8/punycode.d.ts +117 -0
- package/node_modules/@types/node/ts4.8/querystring.d.ts +141 -0
- package/node_modules/@types/node/ts4.8/readline/promises.d.ts +150 -0
- package/node_modules/@types/node/ts4.8/readline.d.ts +539 -0
- package/node_modules/@types/node/ts4.8/repl.d.ts +430 -0
- package/node_modules/@types/node/ts4.8/stream/consumers.d.ts +12 -0
- package/node_modules/@types/node/ts4.8/stream/promises.d.ts +83 -0
- package/node_modules/@types/node/ts4.8/stream/web.d.ts +366 -0
- package/node_modules/@types/node/ts4.8/stream.d.ts +1701 -0
- package/node_modules/@types/node/ts4.8/string_decoder.d.ts +67 -0
- package/node_modules/@types/node/ts4.8/test.d.ts +1465 -0
- package/node_modules/@types/node/ts4.8/timers/promises.d.ts +93 -0
- package/node_modules/@types/node/ts4.8/timers.d.ts +240 -0
- package/node_modules/@types/node/ts4.8/tls.d.ts +1210 -0
- package/node_modules/@types/node/ts4.8/trace_events.d.ts +182 -0
- package/node_modules/@types/node/ts4.8/tty.d.ts +208 -0
- package/node_modules/@types/node/ts4.8/url.d.ts +927 -0
- package/node_modules/@types/node/ts4.8/util.d.ts +2183 -0
- package/node_modules/@types/node/ts4.8/v8.d.ts +764 -0
- package/node_modules/@types/node/ts4.8/vm.d.ts +903 -0
- package/node_modules/@types/node/ts4.8/wasi.d.ts +179 -0
- package/node_modules/@types/node/ts4.8/worker_threads.d.ts +691 -0
- package/node_modules/@types/node/ts4.8/zlib.d.ts +517 -0
- package/node_modules/@types/node/tty.d.ts +208 -0
- package/node_modules/@types/node/url.d.ts +927 -0
- package/node_modules/@types/node/util.d.ts +2183 -0
- package/node_modules/@types/node/v8.d.ts +764 -0
- package/node_modules/@types/node/vm.d.ts +903 -0
- package/node_modules/@types/node/wasi.d.ts +179 -0
- package/node_modules/@types/node/worker_threads.d.ts +691 -0
- package/node_modules/@types/node/zlib.d.ts +517 -0
- package/package.json +9 -7
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"rootDir": "src",
|
|
4
|
+
"outDir": "dist",
|
|
5
|
+
"module": "commonjs",
|
|
6
|
+
"target": "es6",
|
|
7
|
+
"types": ["node"],
|
|
8
|
+
"esModuleInterop": true,
|
|
9
|
+
"sourceMap": true,
|
|
10
|
+
|
|
11
|
+
"alwaysStrict": true,
|
|
12
|
+
"strictNullChecks": true
|
|
13
|
+
},
|
|
14
|
+
"exclude": ["node_modules"]
|
|
15
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2021 Alan Szpigiel
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function appIdentifier(): string;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.appIdentifier = void 0;
|
|
4
|
+
function appIdentifier() {
|
|
5
|
+
const appName = process.env.API_ORIGIN_NAME || "undefined";
|
|
6
|
+
const env = process.env.NODE_ENV || "development";
|
|
7
|
+
return `${appName}:${env}`;
|
|
8
|
+
}
|
|
9
|
+
exports.appIdentifier = appIdentifier;
|
|
10
|
+
//# sourceMappingURL=appIdentifier.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"appIdentifier.js","sourceRoot":"","sources":["../../src/helpers/appIdentifier.ts"],"names":[],"mappings":";;;AAAA,SAAgB,aAAa;IAC3B,MAAM,OAAO,GAAG,OAAO,CAAC,GAAG,CAAC,eAAe,IAAI,WAAW,CAAC;IAC3D,MAAM,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,QAAQ,IAAI,aAAa,CAAC;IAClD,OAAO,GAAG,OAAO,IAAI,GAAG,EAAE,CAAC;AAC7B,CAAC;AAJD,sCAIC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getIp = void 0;
|
|
4
|
+
function getIp(req) {
|
|
5
|
+
var _a;
|
|
6
|
+
return req.headers["cf-connecting-ip"] || req.ip || ((_a = req.socket) === null || _a === void 0 ? void 0 : _a.remoteAddress);
|
|
7
|
+
}
|
|
8
|
+
exports.getIp = getIp;
|
|
9
|
+
//# sourceMappingURL=getIp.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getIp.js","sourceRoot":"","sources":["../../src/helpers/getIp.ts"],"names":[],"mappings":";;;AAEA,SAAgB,KAAK,CAAC,GAAY;;IAChC,OAAO,GAAG,CAAC,OAAO,CAAC,kBAAkB,CAAC,IAAI,GAAG,CAAC,EAAE,KAAI,MAAA,GAAG,CAAC,MAAM,0CAAE,aAAa,CAAA,CAAC;AAChF,CAAC;AAFD,sBAEC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getRequestLogger = void 0;
|
|
4
|
+
const logger_1 = require("@alanszp/logger");
|
|
5
|
+
function getRequestLogger(req) {
|
|
6
|
+
var _a;
|
|
7
|
+
return ((_a = req.context) === null || _a === void 0 ? void 0 : _a.log) || new logger_1.MockLogger();
|
|
8
|
+
}
|
|
9
|
+
exports.getRequestLogger = getRequestLogger;
|
|
10
|
+
//# sourceMappingURL=getRequestLogger.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getRequestLogger.js","sourceRoot":"","sources":["../../src/helpers/getRequestLogger.ts"],"names":[],"mappings":";;;AACA,4CAA6C;AAE7C,SAAgB,gBAAgB,CAAC,GAAY;;IAC3C,OAAO,CAAA,MAAA,GAAG,CAAC,OAAO,0CAAE,GAAG,KAAI,IAAI,mBAAU,EAAE,CAAC;AAC9C,CAAC;AAFD,4CAEC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function now(): Date;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"now.js","sourceRoot":"","sources":["../../src/helpers/now.ts"],"names":[],"mappings":";;;AAAA,SAAgB,GAAG;IACjB,OAAO,IAAI,IAAI,EAAE,CAAC;AACpB,CAAC;AAFD,kBAEC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export * from "./views/errorView";
|
|
2
|
+
export * from "./types/AuthMethod";
|
|
3
|
+
export * from "./middlewares/auditLog";
|
|
4
|
+
export * from "./middlewares/accessLogger";
|
|
5
|
+
export * from "./middlewares/authedForOrg";
|
|
6
|
+
export * from "./middlewares/createContext";
|
|
7
|
+
export * from "./middlewares/authenticateUser";
|
|
8
|
+
export * from "./middlewares/returnInternalServerError";
|
|
9
|
+
export * from "./middlewares/returnNotFound";
|
|
10
|
+
export * from "./middlewares/jsonBodyParser";
|
|
11
|
+
export * from "./middlewares/hasRoles";
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
+
}) : (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
o[k2] = m[k];
|
|
8
|
+
}));
|
|
9
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
10
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
|
+
};
|
|
12
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
+
__exportStar(require("./views/errorView"), exports);
|
|
14
|
+
__exportStar(require("./types/AuthMethod"), exports);
|
|
15
|
+
__exportStar(require("./middlewares/auditLog"), exports);
|
|
16
|
+
__exportStar(require("./middlewares/accessLogger"), exports);
|
|
17
|
+
__exportStar(require("./middlewares/authedForOrg"), exports);
|
|
18
|
+
__exportStar(require("./middlewares/createContext"), exports);
|
|
19
|
+
__exportStar(require("./middlewares/authenticateUser"), exports);
|
|
20
|
+
__exportStar(require("./middlewares/returnInternalServerError"), exports);
|
|
21
|
+
__exportStar(require("./middlewares/returnNotFound"), exports);
|
|
22
|
+
__exportStar(require("./middlewares/jsonBodyParser"), exports);
|
|
23
|
+
__exportStar(require("./middlewares/hasRoles"), exports);
|
|
24
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAAkC;AAClC,qDAAmC;AACnC,yDAAuC;AACvC,6DAA2C;AAC3C,6DAA2C;AAC3C,8DAA4C;AAC5C,iEAA+C;AAC/C,0EAAwD;AACxD,+DAA6C;AAC7C,+DAA6C;AAC7C,yDAAuC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.accessLogger = void 0;
|
|
4
|
+
const logger_1 = require("@alanszp/logger");
|
|
5
|
+
const getIp_1 = require("../helpers/getIp");
|
|
6
|
+
function accessLogger(req, res, next) {
|
|
7
|
+
const startTime = process.hrtime.bigint();
|
|
8
|
+
res.on("finish", () => {
|
|
9
|
+
const endTime = process.hrtime.bigint();
|
|
10
|
+
req.context.log.info("", {
|
|
11
|
+
log_type: logger_1.LogType.ACCESS,
|
|
12
|
+
method: req.method,
|
|
13
|
+
env: process.env.NODE_ENV,
|
|
14
|
+
duration: (endTime - startTime).toString(),
|
|
15
|
+
durationMs: ((endTime - startTime) / BigInt(1000000)).toString(),
|
|
16
|
+
remoteAddress: (0, getIp_1.getIp)(req),
|
|
17
|
+
forwardedFor: req.headers["x-forwarded-for"],
|
|
18
|
+
authentication: req.context.authenticated,
|
|
19
|
+
statusCode: res.statusCode,
|
|
20
|
+
url: req.originalUrl || req.url,
|
|
21
|
+
httpVersion: `${req.httpVersionMajor}.${req.httpVersionMinor}`,
|
|
22
|
+
referrer: req.headers.referer || req.headers.referrer || "-",
|
|
23
|
+
userAgent: req.headers["user-agent"],
|
|
24
|
+
contentLength: res.getHeader("content-length"),
|
|
25
|
+
});
|
|
26
|
+
});
|
|
27
|
+
return next();
|
|
28
|
+
}
|
|
29
|
+
exports.accessLogger = accessLogger;
|
|
30
|
+
//# sourceMappingURL=accessLogger.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"accessLogger.js","sourceRoot":"","sources":["../../src/middlewares/accessLogger.ts"],"names":[],"mappings":";;;AACA,4CAA0C;AAC1C,4CAAyC;AAGzC,SAAgB,YAAY,CAC1B,GAAmB,EACnB,GAAa,EACb,IAAkB;IAElB,MAAM,SAAS,GAAG,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC;IAE1C,GAAG,CAAC,EAAE,CAAC,QAAQ,EAAE,GAAG,EAAE;QACpB,MAAM,OAAO,GAAG,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC;QACxC,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,EAAE;YACvB,QAAQ,EAAE,gBAAO,CAAC,MAAM;YACxB,MAAM,EAAE,GAAG,CAAC,MAAM;YAClB,GAAG,EAAE,OAAO,CAAC,GAAG,CAAC,QAAQ;YACzB,QAAQ,EAAE,CAAC,OAAO,GAAG,SAAS,CAAC,CAAC,QAAQ,EAAE;YAC1C,UAAU,EAAE,CAAC,CAAC,OAAO,GAAG,SAAS,CAAC,GAAG,MAAM,CAAC,OAAS,CAAC,CAAC,CAAC,QAAQ,EAAE;YAClE,aAAa,EAAE,IAAA,aAAK,EAAC,GAAG,CAAC;YACzB,YAAY,EAAE,GAAG,CAAC,OAAO,CAAC,iBAAiB,CAAC;YAC5C,cAAc,EAAE,GAAG,CAAC,OAAO,CAAC,aAAa;YACzC,UAAU,EAAE,GAAG,CAAC,UAAU;YAC1B,GAAG,EAAE,GAAG,CAAC,WAAW,IAAI,GAAG,CAAC,GAAG;YAC/B,WAAW,EAAE,GAAG,GAAG,CAAC,gBAAgB,IAAI,GAAG,CAAC,gBAAgB,EAAE;YAC9D,QAAQ,EAAE,GAAG,CAAC,OAAO,CAAC,OAAO,IAAI,GAAG,CAAC,OAAO,CAAC,QAAQ,IAAI,GAAG;YAC5D,SAAS,EAAE,GAAG,CAAC,OAAO,CAAC,YAAY,CAAC;YACpC,aAAa,EAAE,GAAG,CAAC,SAAS,CAAC,gBAAgB,CAAC;SAC/C,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;IAEH,OAAO,IAAI,EAAE,CAAC;AAChB,CAAC;AA5BD,oCA4BC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { NextFunction, Response, Request } from "express";
|
|
2
|
+
import { AuditBody } from "@alanszp/audit";
|
|
3
|
+
import { GenericRequest } from "../types/GenericRequest";
|
|
4
|
+
export declare type AuditBodyModifier = (req: Request<Record<string, string>, unknown, unknown>, res: Response) => Promise<Partial<AuditBody>> | Partial<AuditBody>;
|
|
5
|
+
/**
|
|
6
|
+
* Configures the audit log to execute AFTER the response is sent.
|
|
7
|
+
*/
|
|
8
|
+
export declare function auditLog(action: string, bodyModifier?: AuditBodyModifier): (req: GenericRequest, res: Response, next: NextFunction) => void;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.auditLog = void 0;
|
|
13
|
+
const getIp_1 = require("../helpers/getIp");
|
|
14
|
+
/**
|
|
15
|
+
* Configures the audit log to execute AFTER the response is sent.
|
|
16
|
+
*/
|
|
17
|
+
function auditLog(action, bodyModifier) {
|
|
18
|
+
return function writeAuditLogMiddleware(req, res, next) {
|
|
19
|
+
res.on("finish", function writeAuditLog() {
|
|
20
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
21
|
+
try {
|
|
22
|
+
const audit = req.context.audit;
|
|
23
|
+
const partialBody = bodyModifier
|
|
24
|
+
? yield Promise.resolve(bodyModifier(req, res))
|
|
25
|
+
: {};
|
|
26
|
+
if (req.context.jwtUser) {
|
|
27
|
+
partialBody.orgRef = req.context.jwtUser.organizationReference;
|
|
28
|
+
partialBody.actorRef = req.context.jwtUser.id;
|
|
29
|
+
}
|
|
30
|
+
partialBody.ip = (0, getIp_1.getIp)(req) || "no-ip";
|
|
31
|
+
audit.log(Object.assign(Object.assign({ succeed: res.statusCode === 304 ||
|
|
32
|
+
(res.statusCode >= 200 && res.statusCode < 300) }, partialBody), { action }));
|
|
33
|
+
}
|
|
34
|
+
catch (error) {
|
|
35
|
+
req.context.log.error("auditLog.writeLog.error", { action, error });
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
});
|
|
39
|
+
next();
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
exports.auditLog = auditLog;
|
|
43
|
+
//# sourceMappingURL=auditLog.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auditLog.js","sourceRoot":"","sources":["../../src/middlewares/auditLog.ts"],"names":[],"mappings":";;;;;;;;;;;;AAEA,4CAAyC;AAQzC;;GAEG;AACH,SAAgB,QAAQ,CAAC,MAAc,EAAE,YAAgC;IACvE,OAAO,SAAS,uBAAuB,CACrC,GAAmB,EACnB,GAAa,EACb,IAAkB;QAElB,GAAG,CAAC,EAAE,CAAC,QAAQ,EAAE,SAAe,aAAa;;gBAC3C,IAAI;oBACF,MAAM,KAAK,GAAG,GAAG,CAAC,OAAO,CAAC,KAAK,CAAC;oBAEhC,MAAM,WAAW,GAAG,YAAY;wBAC9B,CAAC,CAAC,MAAM,OAAO,CAAC,OAAO,CAAC,YAAY,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;wBAC/C,CAAC,CAAE,EAAyB,CAAC;oBAE/B,IAAI,GAAG,CAAC,OAAO,CAAC,OAAO,EAAE;wBACvB,WAAW,CAAC,MAAM,GAAG,GAAG,CAAC,OAAO,CAAC,OAAO,CAAC,qBAAqB,CAAC;wBAC/D,WAAW,CAAC,QAAQ,GAAG,GAAG,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC;qBAC/C;oBAED,WAAW,CAAC,EAAE,GAAG,IAAA,aAAK,EAAC,GAAG,CAAC,IAAI,OAAO,CAAC;oBAEvC,KAAK,CAAC,GAAG,+BACP,OAAO,EACL,GAAG,CAAC,UAAU,KAAK,GAAG;4BACtB,CAAC,GAAG,CAAC,UAAU,IAAI,GAAG,IAAI,GAAG,CAAC,UAAU,GAAG,GAAG,CAAC,IAC9C,WAAW,KACd,MAAM,IACN,CAAC;iBACJ;gBAAC,OAAO,KAAc,EAAE;oBACvB,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,yBAAyB,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,CAAC;iBACrE;YACH,CAAC;SAAA,CAAC,CAAC;QAEH,IAAI,EAAE,CAAC;IACT,CAAC,CAAC;AACJ,CAAC;AAnCD,4BAmCC"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.authForOrg = void 0;
|
|
4
|
+
const errors_1 = require("@alanszp/errors");
|
|
5
|
+
const errorView_1 = require("../views/errorView");
|
|
6
|
+
const getRequestLogger_1 = require("../helpers/getRequestLogger");
|
|
7
|
+
function response401(res) {
|
|
8
|
+
res.status(401).json((0, errorView_1.errorView)(new errors_1.UnauthorizedError(["jwt"])));
|
|
9
|
+
}
|
|
10
|
+
function authForOrg(req, res, next) {
|
|
11
|
+
var _a, _b, _c;
|
|
12
|
+
const { orgReference } = req.params;
|
|
13
|
+
const logger = (0, getRequestLogger_1.getRequestLogger)(req).child({ org: orgReference });
|
|
14
|
+
try {
|
|
15
|
+
if (!orgReference) {
|
|
16
|
+
logger.error("middleware.authForOrg.error.noOrgReferenceInPath");
|
|
17
|
+
return response401(res);
|
|
18
|
+
}
|
|
19
|
+
if (!((_b = (_a = req.context) === null || _a === void 0 ? void 0 : _a.jwtUser) === null || _b === void 0 ? void 0 : _b.organizationReference)) {
|
|
20
|
+
logger.info("middleware.authForOrg.error.noOrgInJwt", {
|
|
21
|
+
jwtUser: ((_c = req.context) === null || _c === void 0 ? void 0 : _c.jwtUser) || null,
|
|
22
|
+
});
|
|
23
|
+
return response401(res);
|
|
24
|
+
}
|
|
25
|
+
const jwtOrg = req.context.jwtUser.organizationReference;
|
|
26
|
+
if (jwtOrg !== orgReference) {
|
|
27
|
+
if (jwtOrg === "lara") {
|
|
28
|
+
req.context.jwtUser.organizationReference = orgReference;
|
|
29
|
+
return next();
|
|
30
|
+
}
|
|
31
|
+
logger.info("middleware.authForOrg.error.nonMatch", {
|
|
32
|
+
jwtOrg,
|
|
33
|
+
});
|
|
34
|
+
return response401(res);
|
|
35
|
+
}
|
|
36
|
+
return next();
|
|
37
|
+
}
|
|
38
|
+
catch (error) {
|
|
39
|
+
logger.info("middleware.authForOrg.error.noOrganization", {
|
|
40
|
+
error,
|
|
41
|
+
});
|
|
42
|
+
res.status(404).json((0, errorView_1.errorView)(new errors_1.NotFoundError()));
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
exports.authForOrg = authForOrg;
|
|
46
|
+
//# sourceMappingURL=authedForOrg.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"authedForOrg.js","sourceRoot":"","sources":["../../src/middlewares/authedForOrg.ts"],"names":[],"mappings":";;;AAAA,4CAAmE;AACnE,kDAA+C;AAE/C,kEAA+D;AAG/D,SAAS,WAAW,CAAC,GAAa;IAChC,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,IAAA,qBAAS,EAAC,IAAI,0BAAiB,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;AAClE,CAAC;AAED,SAAgB,UAAU,CACxB,GAAmB,EACnB,GAAa,EACb,IAAkB;;IAElB,MAAM,EAAE,YAAY,EAAE,GAAG,GAAG,CAAC,MAAM,CAAC;IACpC,MAAM,MAAM,GAAG,IAAA,mCAAgB,EAAC,GAAG,CAAC,CAAC,KAAK,CAAC,EAAE,GAAG,EAAE,YAAY,EAAE,CAAC,CAAC;IAClE,IAAI;QACF,IAAI,CAAC,YAAY,EAAE;YACjB,MAAM,CAAC,KAAK,CAAC,kDAAkD,CAAC,CAAC;YACjE,OAAO,WAAW,CAAC,GAAG,CAAC,CAAC;SACzB;QAED,IAAI,CAAC,CAAA,MAAA,MAAA,GAAG,CAAC,OAAO,0CAAE,OAAO,0CAAE,qBAAqB,CAAA,EAAE;YAChD,MAAM,CAAC,IAAI,CAAC,wCAAwC,EAAE;gBACpD,OAAO,EAAE,CAAA,MAAA,GAAG,CAAC,OAAO,0CAAE,OAAO,KAAI,IAAI;aACtC,CAAC,CAAC;YACH,OAAO,WAAW,CAAC,GAAG,CAAC,CAAC;SACzB;QAED,MAAM,MAAM,GAAG,GAAG,CAAC,OAAO,CAAC,OAAO,CAAC,qBAAqB,CAAC;QACzD,IAAI,MAAM,KAAK,YAAY,EAAE;YAC3B,IAAI,MAAM,KAAK,MAAM,EAAE;gBACrB,GAAG,CAAC,OAAO,CAAC,OAAO,CAAC,qBAAqB,GAAG,YAAY,CAAC;gBACzD,OAAO,IAAI,EAAE,CAAC;aACf;YAED,MAAM,CAAC,IAAI,CAAC,sCAAsC,EAAE;gBAClD,MAAM;aACP,CAAC,CAAC;YACH,OAAO,WAAW,CAAC,GAAG,CAAC,CAAC;SACzB;QAED,OAAO,IAAI,EAAE,CAAC;KACf;IAAC,OAAO,KAAc,EAAE;QACvB,MAAM,CAAC,IAAI,CAAC,4CAA4C,EAAE;YACxD,KAAK;SACN,CAAC,CAAC;QACH,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,IAAA,qBAAS,EAAC,IAAI,sBAAa,EAAE,CAAC,CAAC,CAAC;KACtD;AACH,CAAC;AAxCD,gCAwCC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { VerifyOptions } from "@alanszp/jwt";
|
|
2
|
+
import { NextFunction, Response } from "express";
|
|
3
|
+
import { GenericRequest } from "../types/GenericRequest";
|
|
4
|
+
export declare enum AuthMethods {
|
|
5
|
+
JWT = "JWT",
|
|
6
|
+
API_KEY = "API_KEY"
|
|
7
|
+
}
|
|
8
|
+
export interface JWTVerifyOptions extends Partial<VerifyOptions> {
|
|
9
|
+
publicKey: string;
|
|
10
|
+
}
|
|
11
|
+
export interface JWTOptions {
|
|
12
|
+
jwtVerifyOptions: JWTVerifyOptions;
|
|
13
|
+
types: [AuthMethods.JWT];
|
|
14
|
+
}
|
|
15
|
+
export interface ApiKeyOptions {
|
|
16
|
+
validApiKeys: string[];
|
|
17
|
+
types: [AuthMethods.API_KEY];
|
|
18
|
+
}
|
|
19
|
+
export interface BothMethodsOptions {
|
|
20
|
+
jwtVerifyOptions: JWTVerifyOptions;
|
|
21
|
+
validApiKeys: string[];
|
|
22
|
+
types: [AuthMethods.JWT, AuthMethods.API_KEY] | [AuthMethods.API_KEY, AuthMethods.JWT];
|
|
23
|
+
}
|
|
24
|
+
export declare type AuthOptions = JWTOptions | ApiKeyOptions | BothMethodsOptions;
|
|
25
|
+
export declare function createAuthContext<Options extends AuthOptions>(options: Options): (authMethods: Options["types"][number][]) => (req: GenericRequest, res: Response, next: NextFunction) => Promise<void>;
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.createAuthContext = exports.AuthMethods = void 0;
|
|
13
|
+
const jwt_1 = require("@alanszp/jwt");
|
|
14
|
+
const errors_1 = require("@alanszp/errors");
|
|
15
|
+
const errorView_1 = require("../views/errorView");
|
|
16
|
+
const getRequestLogger_1 = require("../helpers/getRequestLogger");
|
|
17
|
+
const lodash_1 = require("lodash");
|
|
18
|
+
function parseAuthorizationHeader(authorization) {
|
|
19
|
+
if (!authorization)
|
|
20
|
+
return undefined;
|
|
21
|
+
const [bearer, jwt, ...other] = authorization.split(" ");
|
|
22
|
+
if (bearer !== "Bearer" || other.length > 0)
|
|
23
|
+
return undefined;
|
|
24
|
+
return jwt;
|
|
25
|
+
}
|
|
26
|
+
var AuthMethods;
|
|
27
|
+
(function (AuthMethods) {
|
|
28
|
+
AuthMethods["JWT"] = "JWT";
|
|
29
|
+
AuthMethods["API_KEY"] = "API_KEY";
|
|
30
|
+
})(AuthMethods = exports.AuthMethods || (exports.AuthMethods = {}));
|
|
31
|
+
const middlewareGetterByAuthType = {
|
|
32
|
+
[AuthMethods.JWT]: (jwt, options, logger) => __awaiter(void 0, void 0, void 0, function* () {
|
|
33
|
+
try {
|
|
34
|
+
if (!jwt)
|
|
35
|
+
return undefined;
|
|
36
|
+
const jwtUser = yield (0, jwt_1.verifyJWT)(options.jwtVerifyOptions.publicKey, jwt, (0, lodash_1.omit)(options.jwtVerifyOptions, "publicKey"));
|
|
37
|
+
logger.debug("auth.authWithJwt.authed", {
|
|
38
|
+
user: jwtUser.id,
|
|
39
|
+
org: jwtUser.organizationReference,
|
|
40
|
+
});
|
|
41
|
+
return jwtUser;
|
|
42
|
+
}
|
|
43
|
+
catch (error) {
|
|
44
|
+
logger.info("auth.authWithJwt.invalidJwt", { jwt, error });
|
|
45
|
+
return null;
|
|
46
|
+
}
|
|
47
|
+
}),
|
|
48
|
+
[AuthMethods.API_KEY]: (token, options, logger) => __awaiter(void 0, void 0, void 0, function* () {
|
|
49
|
+
try {
|
|
50
|
+
if (!token)
|
|
51
|
+
return undefined;
|
|
52
|
+
if (options.validApiKeys.includes(token)) {
|
|
53
|
+
logger.debug("auth.authWithApiKey.authed", {
|
|
54
|
+
user: "0",
|
|
55
|
+
org: "lara",
|
|
56
|
+
});
|
|
57
|
+
return Promise.resolve({
|
|
58
|
+
id: "0",
|
|
59
|
+
employeeReference: "0",
|
|
60
|
+
organizationReference: "lara",
|
|
61
|
+
roles: [],
|
|
62
|
+
segmentReference: null,
|
|
63
|
+
permissions: [],
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
else {
|
|
67
|
+
return null;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
catch (error) {
|
|
71
|
+
logger.info("auth.authWithApiKey.invalidApiKey", { token, error });
|
|
72
|
+
return null;
|
|
73
|
+
}
|
|
74
|
+
}),
|
|
75
|
+
};
|
|
76
|
+
function createAuthContext(options) {
|
|
77
|
+
return function getMiddlewareForMethods(authMethods) {
|
|
78
|
+
return function authWithGivenMethods(req, res, next) {
|
|
79
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
80
|
+
const logger = (0, getRequestLogger_1.getRequestLogger)(req);
|
|
81
|
+
const cookies = req.cookies || {};
|
|
82
|
+
const jwt = cookies.jwt || parseAuthorizationHeader(req.headers.authorization);
|
|
83
|
+
try {
|
|
84
|
+
const authAttempts = yield Promise.all(authMethods.map((method) => middlewareGetterByAuthType[method](method === AuthMethods.JWT ? jwt : req.headers.authorization, options, logger)));
|
|
85
|
+
const successfulAuthAttempts = (0, lodash_1.compact)(authAttempts);
|
|
86
|
+
if ((0, lodash_1.isEmpty)(successfulAuthAttempts)) {
|
|
87
|
+
res
|
|
88
|
+
.status(401)
|
|
89
|
+
.json((0, errorView_1.errorView)(new errors_1.UnauthorizedError([
|
|
90
|
+
authAttempts.includes(null)
|
|
91
|
+
? `Token invalid for methods ${authMethods}`
|
|
92
|
+
: `Token not set for methods ${authMethods}`,
|
|
93
|
+
])));
|
|
94
|
+
return;
|
|
95
|
+
}
|
|
96
|
+
const jwtUser = successfulAuthAttempts[0];
|
|
97
|
+
req.context.jwtUser = jwtUser;
|
|
98
|
+
req.context.authenticated.push(jwtUser.employeeReference !== "0" ? "jwt" : "api_key");
|
|
99
|
+
next();
|
|
100
|
+
}
|
|
101
|
+
catch (error) {
|
|
102
|
+
logger.info("auth.authenticateUser.error", {
|
|
103
|
+
jwt,
|
|
104
|
+
token: req.headers.authorization,
|
|
105
|
+
methods: AuthMethods,
|
|
106
|
+
error,
|
|
107
|
+
});
|
|
108
|
+
res.status(401).json((0, errorView_1.errorView)(new errors_1.UnauthorizedError(authMethods)));
|
|
109
|
+
}
|
|
110
|
+
});
|
|
111
|
+
};
|
|
112
|
+
};
|
|
113
|
+
}
|
|
114
|
+
exports.createAuthContext = createAuthContext;
|
|
115
|
+
//# sourceMappingURL=authenticateUser.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"authenticateUser.js","sourceRoot":"","sources":["../../src/middlewares/authenticateUser.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,sCAAiE;AACjE,4CAAoD;AACpD,kDAA+C;AAE/C,kEAA+D;AAG/D,mCAAgD;AAEhD,SAAS,wBAAwB,CAC/B,aAAiC;IAEjC,IAAI,CAAC,aAAa;QAAE,OAAO,SAAS,CAAC;IACrC,MAAM,CAAC,MAAM,EAAE,GAAG,EAAE,GAAG,KAAK,CAAC,GAAG,aAAa,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAEzD,IAAI,MAAM,KAAK,QAAQ,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC;QAAE,OAAO,SAAS,CAAC;IAE9D,OAAO,GAAG,CAAC;AACb,CAAC;AAED,IAAY,WAGX;AAHD,WAAY,WAAW;IACrB,0BAAW,CAAA;IACX,kCAAmB,CAAA;AACrB,CAAC,EAHW,WAAW,GAAX,mBAAW,KAAX,mBAAW,QAGtB;AA0BD,MAAM,0BAA0B,GAO5B;IACF,CAAC,WAAW,CAAC,GAAG,CAAC,EAAE,CACjB,GAA8B,EAC9B,OAA4C,EAC5C,MAAe,EACf,EAAE;QACF,IAAI;YACF,IAAI,CAAC,GAAG;gBAAE,OAAO,SAAS,CAAC;YAC3B,MAAM,OAAO,GAAG,MAAM,IAAA,eAAS,EAC7B,OAAO,CAAC,gBAAgB,CAAC,SAAS,EAClC,GAAG,EACH,IAAA,aAAI,EAAC,OAAO,CAAC,gBAAgB,EAAE,WAAW,CAAC,CAC5C,CAAC;YACF,MAAM,CAAC,KAAK,CAAC,yBAAyB,EAAE;gBACtC,IAAI,EAAE,OAAO,CAAC,EAAE;gBAChB,GAAG,EAAE,OAAO,CAAC,qBAAqB;aACnC,CAAC,CAAC;YACH,OAAO,OAAO,CAAC;SAChB;QAAC,OAAO,KAAc,EAAE;YACvB,MAAM,CAAC,IAAI,CAAC,6BAA6B,EAAE,EAAE,GAAG,EAAE,KAAK,EAAE,CAAC,CAAC;YAC3D,OAAO,IAAI,CAAC;SACb;IACH,CAAC,CAAA;IACD,CAAC,WAAW,CAAC,OAAO,CAAC,EAAE,CACrB,KAAgC,EAChC,OAAyC,EACzC,MAAe,EACsB,EAAE;QACvC,IAAI;YACF,IAAI,CAAC,KAAK;gBAAE,OAAO,SAAS,CAAC;YAC7B,IAAI,OAAO,CAAC,YAAY,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE;gBACxC,MAAM,CAAC,KAAK,CAAC,4BAA4B,EAAE;oBACzC,IAAI,EAAE,GAAG;oBACT,GAAG,EAAE,MAAM;iBACZ,CAAC,CAAC;gBACH,OAAO,OAAO,CAAC,OAAO,CAAC;oBACrB,EAAE,EAAE,GAAG;oBACP,iBAAiB,EAAE,GAAG;oBACtB,qBAAqB,EAAE,MAAM;oBAC7B,KAAK,EAAE,EAAE;oBACT,gBAAgB,EAAE,IAAI;oBACtB,WAAW,EAAE,EAAE;iBAChB,CAAC,CAAC;aACJ;iBAAM;gBACL,OAAO,IAAI,CAAC;aACb;SACF;QAAC,OAAO,KAAc,EAAE;YACvB,MAAM,CAAC,IAAI,CAAC,mCAAmC,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,CAAC;YACnE,OAAO,IAAI,CAAC;SACb;IACH,CAAC,CAAA;CACF,CAAC;AAEF,SAAgB,iBAAiB,CAC/B,OAAgB;IAEhB,OAAO,SAAS,uBAAuB,CACrC,WAAuC;QAEvC,OAAO,SAAe,oBAAoB,CACxC,GAAmB,EACnB,GAAa,EACb,IAAkB;;gBAElB,MAAM,MAAM,GAAG,IAAA,mCAAgB,EAAC,GAAG,CAAC,CAAC;gBACrC,MAAM,OAAO,GAAI,GAAG,CAAC,OAA8C,IAAI,EAAE,CAAC;gBAC1E,MAAM,GAAG,GACP,OAAO,CAAC,GAAG,IAAI,wBAAwB,CAAC,GAAG,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC;gBAErE,IAAI;oBACF,MAAM,YAAY,GAAG,MAAM,OAAO,CAAC,GAAG,CACpC,WAAW,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CACzB,0BAA0B,CAAC,MAAM,CAAC,CAChC,MAAM,KAAK,WAAW,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,aAAa,EAC5D,OAAO,EACP,MAAM,CACP,CACF,CACF,CAAC;oBAEF,MAAM,sBAAsB,GAAG,IAAA,gBAAO,EAAC,YAAY,CAAC,CAAC;oBAErD,IAAI,IAAA,gBAAO,EAAC,sBAAsB,CAAC,EAAE;wBACnC,GAAG;6BACA,MAAM,CAAC,GAAG,CAAC;6BACX,IAAI,CACH,IAAA,qBAAS,EACP,IAAI,0BAAiB,CAAC;4BACpB,YAAY,CAAC,QAAQ,CAAC,IAAI,CAAC;gCACzB,CAAC,CAAC,6BAA6B,WAAW,EAAE;gCAC5C,CAAC,CAAC,6BAA6B,WAAW,EAAE;yBAC/C,CAAC,CACH,CACF,CAAC;wBACJ,OAAO;qBACR;oBAED,MAAM,OAAO,GAAY,sBAAsB,CAAC,CAAC,CAAC,CAAC;oBACnD,GAAG,CAAC,OAAO,CAAC,OAAO,GAAG,OAAO,CAAC;oBAC9B,GAAG,CAAC,OAAO,CAAC,aAAa,CAAC,IAAI,CAC5B,OAAO,CAAC,iBAAiB,KAAK,GAAG,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CACtD,CAAC;oBACF,IAAI,EAAE,CAAC;iBACR;gBAAC,OAAO,KAAc,EAAE;oBACvB,MAAM,CAAC,IAAI,CAAC,6BAA6B,EAAE;wBACzC,GAAG;wBACH,KAAK,EAAE,GAAG,CAAC,OAAO,CAAC,aAAa;wBAChC,OAAO,EAAE,WAAW;wBACpB,KAAK;qBACN,CAAC,CAAC;oBACH,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,IAAA,qBAAS,EAAC,IAAI,0BAAiB,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC;iBACrE;YACH,CAAC;SAAA,CAAC;IACJ,CAAC,CAAC;AACJ,CAAC;AA7DD,8CA6DC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|