diff --git a/package-lock.json b/package-lock.json index f4a652ea..cc868e2f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -601,12 +601,24 @@ "integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==", "dev": true }, + "node_modules/@cheeket/aws": { + "resolved": "packages/cheeket-aws", + "link": true + }, "node_modules/@cheeket/injector": { - "resolved": "packages/@cheeket-injector", + "resolved": "packages/cheeket-injector", "link": true }, "node_modules/@cheeket/koa": { - "resolved": "packages/@cheeket-koa", + "resolved": "packages/cheeket-koa", + "link": true + }, + "node_modules/@cheeket/typeorm": { + "resolved": "packages/cheeket-typerom", + "link": true + }, + "node_modules/@cheeket/winston": { + "resolved": "packages/cheeket-winston", "link": true }, "node_modules/@cnakazawa/watch": { @@ -625,6 +637,17 @@ "node": ">=0.1.95" } }, + "node_modules/@dabh/diagnostics": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@dabh/diagnostics/-/diagnostics-2.0.2.tgz", + "integrity": "sha512-+A1YivoVDNNVCdfozHSR8v/jyuuLTMXwjWuxPFlFlUapXoGc+Gj9mDlTDDfrwl7rXCl2tNZ0kE8sIBO6YOn96Q==", + "dev": true, + "dependencies": { + "colorspace": "1.1.x", + "enabled": "2.0.x", + "kuler": "^2.0.0" + } + }, "node_modules/@eslint/eslintrc": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-0.4.0.tgz", @@ -2452,6 +2475,12 @@ "@sinonjs/commons": "^1.7.0" } }, + "node_modules/@sqltools/formatter": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/@sqltools/formatter/-/formatter-1.2.2.tgz", + "integrity": "sha512-/5O7Fq6Vnv8L6ucmPjaWbVG1XkP4FO+w5glqfkIsq3Xw4oyNAdJddbnYodNDAfjVUvo/rrSCTom4kAND7T1o5Q==", + "dev": true + }, "node_modules/@tootallnate/once": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-1.1.2.tgz", @@ -3282,6 +3311,15 @@ "node": ">=0.10.0" } }, + "node_modules/app-root-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/app-root-path/-/app-root-path-3.0.0.tgz", + "integrity": "sha512-qMcx+Gy2UZynHjOHOIXPNvpf+9cjvk3cWrBBK7zg4gH9+clobJRb9NGzcT7mQTcV/6Gm/1WelUtqxVXnNlrwcw==", + "dev": true, + "engines": { + "node": ">= 6.0.0" + } + }, "node_modules/append-buffer": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/append-buffer/-/append-buffer-1.0.2.tgz", @@ -3620,6 +3658,12 @@ "node": ">=8" } }, + "node_modules/async": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/async/-/async-3.2.0.tgz", + "integrity": "sha512-TR2mEZFVOj2pLStYxLht7TyfuRzaydfpxr3k9RpHIzMgw7A64dzsdqCxH1WJyQdoe8T10nDXd9wnEigmiuHIZw==", + "dev": true + }, "node_modules/async-done": { "version": "1.3.2", "resolved": "https://registry.npmjs.org/async-done/-/async-done-1.3.2.tgz", @@ -3680,6 +3724,35 @@ "node": ">= 4.5.0" } }, + "node_modules/aws-sdk": { + "version": "2.868.0", + "resolved": "https://registry.npmjs.org/aws-sdk/-/aws-sdk-2.868.0.tgz", + "integrity": "sha512-ZayPsA/ycaAXqqa2oDyf8iUpl1WOLODZS8ZdvYj77L5owMQm0XC7yqiD+WHj9nToUECF9VAD+AKQMIN6695tVQ==", + "dev": true, + "dependencies": { + "buffer": "4.9.2", + "events": "1.1.1", + "ieee754": "1.1.13", + "jmespath": "0.15.0", + "querystring": "0.2.0", + "sax": "1.2.1", + "url": "0.10.3", + "uuid": "3.3.2", + "xml2js": "0.4.19" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/aws-sdk/node_modules/uuid": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz", + "integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA==", + "dev": true, + "bin": { + "uuid": "bin/uuid" + } + }, "node_modules/aws-sign2": { "version": "0.7.0", "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", @@ -3907,6 +3980,26 @@ "node": ">=0.10.0" } }, + "node_modules/base64-js": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, "node_modules/bcrypt-pbkdf": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", @@ -4022,6 +4115,17 @@ "node-int64": "^0.4.0" } }, + "node_modules/buffer": { + "version": "4.9.2", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-4.9.2.tgz", + "integrity": "sha512-xq+q3SRMOxGivLhBNaUdC64hDTQwejJ+H0T/NB1XMtTVEwNTrfFF3gAxiyW0Bu/xWEGhjVKgUcMhCrUy2+uCWg==", + "dev": true, + "dependencies": { + "base64-js": "^1.0.2", + "ieee754": "^1.1.4", + "isarray": "^1.0.0" + } + }, "node_modules/buffer-equal": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/buffer-equal/-/buffer-equal-1.0.0.tgz", @@ -4331,6 +4435,97 @@ "node": ">=8" } }, + "node_modules/cli-highlight": { + "version": "2.1.10", + "resolved": "https://registry.npmjs.org/cli-highlight/-/cli-highlight-2.1.10.tgz", + "integrity": "sha512-CcPFD3JwdQ2oSzy+AMG6j3LRTkNjM82kzcSKzoVw6cLanDCJNlsLjeqVTOTfOfucnWv5F0rmBemVf1m9JiIasw==", + "dev": true, + "dependencies": { + "chalk": "^4.0.0", + "highlight.js": "^10.0.0", + "mz": "^2.4.0", + "parse5": "^5.1.1", + "parse5-htmlparser2-tree-adapter": "^6.0.0", + "yargs": "^16.0.0" + }, + "bin": { + "highlight": "bin/highlight" + }, + "engines": { + "node": ">=8.0.0", + "npm": ">=5.0.0" + } + }, + "node_modules/cli-highlight/node_modules/cliui": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", + "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", + "dev": true, + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^7.0.0" + } + }, + "node_modules/cli-highlight/node_modules/get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "dev": true, + "engines": { + "node": "6.* || 8.* || >= 10.*" + } + }, + "node_modules/cli-highlight/node_modules/parse5": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/parse5/-/parse5-5.1.1.tgz", + "integrity": "sha512-ugq4DFI0Ptb+WWjAdOK16+u/nHfiIrcE+sh8kZMaM0WllQKLI9rOUq6c2b7cwPkXdzfQESqvoqK6ug7U/Yyzug==", + "dev": true + }, + "node_modules/cli-highlight/node_modules/wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/cli-highlight/node_modules/y18n": { + "version": "5.0.5", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.5.tgz", + "integrity": "sha512-hsRUr4FFrvhhRH12wOdfs38Gy7k2FFzB9qgN9v3aLykRq0dRcdcpz5C9FxdS2NuhOrI/628b/KSTJ3rwHysYSg==", + "dev": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/cli-highlight/node_modules/yargs": { + "version": "16.2.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", + "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", + "dev": true, + "dependencies": { + "cliui": "^7.0.2", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.0", + "y18n": "^5.0.5", + "yargs-parser": "^20.2.2" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/cli-width": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-3.0.0.tgz", @@ -4532,6 +4727,16 @@ "node": ">=0.10.0" } }, + "node_modules/color": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/color/-/color-3.0.0.tgz", + "integrity": "sha512-jCpd5+s0s0t7p3pHQKpnJ0TpQKKdleP71LWcA0aqiljpiuAkOSUFN/dyH8ZwF0hRmFlrIuRhufds1QyEP9EB+w==", + "dev": true, + "dependencies": { + "color-convert": "^1.9.1", + "color-string": "^1.5.2" + } + }, "node_modules/color-convert": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", @@ -4550,6 +4755,16 @@ "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", "dev": true }, + "node_modules/color-string": { + "version": "1.5.5", + "resolved": "https://registry.npmjs.org/color-string/-/color-string-1.5.5.tgz", + "integrity": "sha512-jgIoum0OfQfq9Whcfc2z/VhCNcmQjWbey6qBX0vqt7YICflUmBCh9E9CiQD5GSJ+Uehixm3NUwHVhqUAWRivZg==", + "dev": true, + "dependencies": { + "color-name": "^1.0.0", + "simple-swizzle": "^0.2.2" + } + }, "node_modules/color-support": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/color-support/-/color-support-1.1.3.tgz", @@ -4559,12 +4774,46 @@ "color-support": "bin.js" } }, + "node_modules/color/node_modules/color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "dependencies": { + "color-name": "1.1.3" + } + }, + "node_modules/color/node_modules/color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "dev": true + }, "node_modules/colorette": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/colorette/-/colorette-1.2.2.tgz", "integrity": "sha512-MKGMzyfeuutC/ZJ1cba9NqcNpfeqMUcYmyF1ZFY6/Cn7CNSAKx6a+s48sqLqyAiZuaP2TcqMhoo+dlwFnVxT9w==", "dev": true }, + "node_modules/colors": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/colors/-/colors-1.4.0.tgz", + "integrity": "sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA==", + "dev": true, + "engines": { + "node": ">=0.1.90" + } + }, + "node_modules/colorspace": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/colorspace/-/colorspace-1.1.2.tgz", + "integrity": "sha512-vt+OoIP2d76xLhjwbBaucYlNSpPsrJWPlBTtwCpQKIu6/CSMutyzX93O/Do0qzpH3YoHEes8YEFXyZ797rEhzQ==", + "dev": true, + "dependencies": { + "color": "3.0.x", + "text-hex": "1.0.x" + } + }, "node_modules/columnify": { "version": "1.5.4", "resolved": "https://registry.npmjs.org/columnify/-/columnify-1.5.4.tgz", @@ -5570,6 +5819,15 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/dotenv": { + "version": "8.2.0", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-8.2.0.tgz", + "integrity": "sha512-8sJ78ElpbDJBHNeBzUbUVLsqKdccaa/BXF1uPTw3GrvQTBgrQrtObr2mUrE38vzYd8cEv+m/JBfDLioYcfXoaw==", + "dev": true, + "engines": { + "node": ">=8" + } + }, "node_modules/duplexer": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/duplexer/-/duplexer-0.1.2.tgz", @@ -5665,6 +5923,12 @@ "dev": true, "peer": true }, + "node_modules/enabled": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/enabled/-/enabled-2.0.0.tgz", + "integrity": "sha512-AKrN98kuwOzMIdAizXGI86UFBoo26CL21UM763y1h/GMSJ4/OHU9k2YlsmBpyScFo/wbLzWQJBMCW4+IO3/+OQ==", + "dev": true + }, "node_modules/encodeurl": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", @@ -6443,6 +6707,15 @@ "integrity": "sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw==", "dev": true }, + "node_modules/events": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/events/-/events-1.1.1.tgz", + "integrity": "sha1-nr23Y1rQmccNzEwqH1AEKI6L2SQ=", + "dev": true, + "engines": { + "node": ">=0.4.x" + } + }, "node_modules/exec-sh": { "version": "0.3.4", "resolved": "https://registry.npmjs.org/exec-sh/-/exec-sh-0.3.4.tgz", @@ -6733,6 +7006,12 @@ "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", "dev": true }, + "node_modules/fast-safe-stringify": { + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/fast-safe-stringify/-/fast-safe-stringify-2.0.7.tgz", + "integrity": "sha512-Utm6CdzT+6xsDk2m8S6uL8VHxNwI6Jub+e9NYTcAms28T84pTa25GJQV9j0CY0N1rM8hK4x6grpF2BQf+2qwVA==", + "dev": true + }, "node_modules/fastq": { "version": "1.11.0", "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.11.0.tgz", @@ -6751,6 +7030,21 @@ "bser": "2.1.1" } }, + "node_modules/fecha": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/fecha/-/fecha-4.2.0.tgz", + "integrity": "sha512-aN3pcx/DSmtyoovUudctc8+6Hl4T+hI9GBBHLjA76jdZl7+b1sgh5g4k+u/GL3dTy1/pnYzKp69FpJ0OicE3Wg==", + "dev": true + }, + "node_modules/figlet": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/figlet/-/figlet-1.5.0.tgz", + "integrity": "sha512-ZQJM4aifMpz6H19AW1VqvZ7l4pOE9p7i/3LyxgO2kp+PO/VcDYNqIHEMtkccqIhTXMKci4kjueJr/iCQEaT/Ww==", + "dev": true, + "engines": { + "node": ">= 0.4.0" + } + }, "node_modules/figures": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/figures/-/figures-3.2.0.tgz", @@ -7024,6 +7318,12 @@ "readable-stream": "^2.3.6" } }, + "node_modules/fn.name": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/fn.name/-/fn.name-1.1.0.tgz", + "integrity": "sha512-GRnmB5gPyJpAhTQdSZTSp9uaPSvl09KoYcMQtsB9rQoOmzs9dH6ffeccH+Z+cv6P68Hu5bC6JjRh4Ah/mHSNRw==", + "dev": true + }, "node_modules/for-in": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", @@ -8262,6 +8562,27 @@ "node": ">= 0.4.0" } }, + "node_modules/has-ansi": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", + "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", + "dev": true, + "dependencies": { + "ansi-regex": "^2.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/has-ansi/node_modules/ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/has-bigints": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.1.tgz", @@ -8349,6 +8670,15 @@ "node": ">=0.10.0" } }, + "node_modules/highlight.js": { + "version": "10.6.0", + "resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-10.6.0.tgz", + "integrity": "sha512-8mlRcn5vk/r4+QcqerapwBYTe+iPL5ih6xrNylxrnBdHQiijDETfXX7VIxC3UiCRiINBJfANBAsPzAvRQj8RpQ==", + "dev": true, + "engines": { + "node": "*" + } + }, "node_modules/homedir-polyfill": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/homedir-polyfill/-/homedir-polyfill-1.0.3.tgz", @@ -8536,6 +8866,12 @@ "node": ">=0.10.0" } }, + "node_modules/ieee754": { + "version": "1.1.13", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.13.tgz", + "integrity": "sha512-4vf7I2LYV/HaWerSo3XmlMkp5eZ83i+/CDluXi/IGTs/O1sejBNhTtnxzmRZfvOUqj7lZjqHkeTvpgSFDlWZTg==", + "dev": true + }, "node_modules/ignore": { "version": "4.0.6", "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", @@ -10157,6 +10493,15 @@ "node": ">= 10.13.0" } }, + "node_modules/jmespath": { + "version": "0.15.0", + "resolved": "https://registry.npmjs.org/jmespath/-/jmespath-0.15.0.tgz", + "integrity": "sha1-o/Iiqarp+Wb10nx5ZRDigJF2Qhc=", + "dev": true, + "engines": { + "node": ">= 0.6.0" + } + }, "node_modules/js-tokens": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", @@ -10489,6 +10834,12 @@ "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", "dev": true }, + "node_modules/kuler": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/kuler/-/kuler-2.0.0.tgz", + "integrity": "sha512-Xq9nH7KlWZmXAtodXDDRE7vs6DU1gTU8zYDHDiWLSip45Egwq3plLHzPn27NgvzL2r1LMPC1vdqh98sQxtqj4A==", + "dev": true + }, "node_modules/language-subtag-registry": { "version": "0.3.21", "resolved": "https://registry.npmjs.org/language-subtag-registry/-/language-subtag-registry-0.3.21.tgz", @@ -10756,6 +11107,19 @@ "lodash._reinterpolate": "^3.0.0" } }, + "node_modules/logform": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/logform/-/logform-2.2.0.tgz", + "integrity": "sha512-N0qPlqfypFx7UHNn4B3lzS/b0uLqt2hmuoa+PpuXNYgozdJYAyauF5Ky0BWVjrxDlMWiT3qN4zPq3vVAfZy7Yg==", + "dev": true, + "dependencies": { + "colors": "^1.2.1", + "fast-safe-stringify": "^2.0.4", + "fecha": "^4.2.0", + "ms": "^2.1.1", + "triple-beam": "^1.3.0" + } + }, "node_modules/loose-envify": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", @@ -11599,6 +11963,17 @@ "integrity": "sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==", "dev": true }, + "node_modules/mz": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/mz/-/mz-2.7.0.tgz", + "integrity": "sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q==", + "dev": true, + "dependencies": { + "any-promise": "^1.0.0", + "object-assign": "^4.0.1", + "thenify-all": "^1.0.0" + } + }, "node_modules/nan": { "version": "2.14.2", "resolved": "https://registry.npmjs.org/nan/-/nan-2.14.2.tgz", @@ -12404,6 +12779,15 @@ "wrappy": "1" } }, + "node_modules/one-time": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/one-time/-/one-time-1.0.0.tgz", + "integrity": "sha512-5DXOiRKwuSEcQ/l0kGCF6Q3jcADFv5tSmRaJck/OqkVFcOzutB134KRSfF0xDrL39MNnqxbHBbUUcjZIhTgb2g==", + "dev": true, + "dependencies": { + "fn.name": "1.x.x" + } + }, "node_modules/onetime": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", @@ -12681,6 +13065,15 @@ "node": ">=6" } }, + "node_modules/parent-require": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/parent-require/-/parent-require-1.0.0.tgz", + "integrity": "sha1-dGoWdjgIOoYLDu9nMssn7UbDKXc=", + "dev": true, + "engines": { + "node": ">= 0.4.0" + } + }, "node_modules/parse-filepath": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/parse-filepath/-/parse-filepath-1.0.2.tgz", @@ -12767,6 +13160,15 @@ "integrity": "sha512-Ofn/CTFzRGTTxwpNEs9PP93gXShHcTq255nzRYSKe8AkVpZY7e1fpmTfOyoIvjP5HG7Z2ZM7VS9PPhQGW2pOpw==", "dev": true }, + "node_modules/parse5-htmlparser2-tree-adapter": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/parse5-htmlparser2-tree-adapter/-/parse5-htmlparser2-tree-adapter-6.0.1.tgz", + "integrity": "sha512-qPuWvbLgvDGilKc5BoicRovlT4MtYT6JfJyBOMDsKoiT+GiuP5qyrPCnR9HcPECIJJmZh5jRndyNThnhhb/vlA==", + "dev": true, + "dependencies": { + "parse5": "^6.0.1" + } + }, "node_modules/parseurl": { "version": "1.3.3", "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", @@ -13421,6 +13823,15 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/querystring": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz", + "integrity": "sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA=", + "dev": true, + "engines": { + "node": ">=0.4.x" + } + }, "node_modules/queue-microtask": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.2.tgz", @@ -14786,6 +15197,12 @@ "which": "bin/which" } }, + "node_modules/sax": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.1.tgz", + "integrity": "sha1-e45lYZCyKOgaZq6nSEgNgozS03o=", + "dev": true + }, "node_modules/saxes": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/saxes/-/saxes-5.0.1.tgz", @@ -14864,9 +15281,22 @@ "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==", "dev": true }, - "node_modules/shallow-clone": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/shallow-clone/-/shallow-clone-3.0.1.tgz", + "node_modules/sha.js": { + "version": "2.4.11", + "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz", + "integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==", + "dev": true, + "dependencies": { + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + }, + "bin": { + "sha.js": "bin.js" + } + }, + "node_modules/shallow-clone": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/shallow-clone/-/shallow-clone-3.0.1.tgz", "integrity": "sha512-/6KqX+GVUdqPuPPd2LxDDxzX6CAbjJehAAOKlNpqqUpAqPM6HeL8f+o3a+JsyGjn2lv0WY8UsTgUJjU9Ok55NA==", "dev": true, "dependencies": { @@ -14950,6 +15380,21 @@ "integrity": "sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA==", "dev": true }, + "node_modules/simple-swizzle": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/simple-swizzle/-/simple-swizzle-0.2.2.tgz", + "integrity": "sha1-pNprY1/8zMoz9w0Xy5JZLeleVXo=", + "dev": true, + "dependencies": { + "is-arrayish": "^0.3.1" + } + }, + "node_modules/simple-swizzle/node_modules/is-arrayish": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.3.2.tgz", + "integrity": "sha512-eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ==", + "dev": true + }, "node_modules/sisteransi": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.5.tgz", @@ -15925,12 +16370,39 @@ "node": ">=0.10" } }, + "node_modules/text-hex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/text-hex/-/text-hex-1.0.0.tgz", + "integrity": "sha512-uuVGNWzgJ4yhRaNSiubPY7OjISw4sw4E5Uv0wbjp+OzcbmVU/rsT8ujgcXJhn9ypzsgr5vlzpPqP+MBBKcGvbg==", + "dev": true + }, "node_modules/text-table": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=", "dev": true }, + "node_modules/thenify": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/thenify/-/thenify-3.3.1.tgz", + "integrity": "sha512-RVZSIV5IG10Hk3enotrhvz0T9em6cyHBLkH/YAZuKqd8hRkKhSfCGIcP2KUY0EPxndzANBmNllzWPwak+bheSw==", + "dev": true, + "dependencies": { + "any-promise": "^1.0.0" + } + }, + "node_modules/thenify-all": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/thenify-all/-/thenify-all-1.6.0.tgz", + "integrity": "sha1-GhkY1ALY/D+Y+/I02wvMjMEOlyY=", + "dev": true, + "dependencies": { + "thenify": ">= 3.1.0 < 4" + }, + "engines": { + "node": ">=0.8" + } + }, "node_modules/throat": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/throat/-/throat-5.0.0.tgz", @@ -16265,6 +16737,12 @@ "node": ">=0.10.0" } }, + "node_modules/triple-beam": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/triple-beam/-/triple-beam-1.3.0.tgz", + "integrity": "sha512-XrHUvV5HpdLmIj4uVMxHggLbFSZYIn7HEWsqePZcI50pco+MPqJ50wMGY794X7AOOhxOBAjbkqfAbEe/QMp2Lw==", + "dev": true + }, "node_modules/ts-jest": { "version": "26.5.4", "resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-26.5.4.tgz", @@ -16440,6 +16918,146 @@ "is-typedarray": "^1.0.0" } }, + "node_modules/typeorm": { + "version": "0.2.31", + "resolved": "https://registry.npmjs.org/typeorm/-/typeorm-0.2.31.tgz", + "integrity": "sha512-dVvCEVHH48DG0QPXAKfo0l6ecQrl3A8ucGP4Yw4myz4YEDMProebTQo8as83uyES+nrwCbu3qdkL4ncC2+qcMA==", + "dev": true, + "dependencies": { + "@sqltools/formatter": "1.2.2", + "app-root-path": "^3.0.0", + "buffer": "^5.5.0", + "chalk": "^4.1.0", + "cli-highlight": "^2.1.10", + "debug": "^4.1.1", + "dotenv": "^8.2.0", + "glob": "^7.1.6", + "js-yaml": "^3.14.0", + "mkdirp": "^1.0.4", + "reflect-metadata": "^0.1.13", + "sha.js": "^2.4.11", + "tslib": "^1.13.0", + "xml2js": "^0.4.23", + "yargonaut": "^1.1.2", + "yargs": "^16.0.3" + }, + "bin": { + "typeorm": "cli.js" + }, + "funding": { + "url": "https://opencollective.com/typeorm" + } + }, + "node_modules/typeorm/node_modules/buffer": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", + "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "dependencies": { + "base64-js": "^1.3.1", + "ieee754": "^1.1.13" + } + }, + "node_modules/typeorm/node_modules/cliui": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", + "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", + "dev": true, + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^7.0.0" + } + }, + "node_modules/typeorm/node_modules/get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "dev": true, + "engines": { + "node": "6.* || 8.* || >= 10.*" + } + }, + "node_modules/typeorm/node_modules/wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/typeorm/node_modules/xml2js": { + "version": "0.4.23", + "resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.4.23.tgz", + "integrity": "sha512-ySPiMjM0+pLDftHgXY4By0uswI3SPKLDw/i3UXbnO8M/p28zqexCUoPmQFrYD+/1BzhGJSs2i1ERWKJAtiLrug==", + "dev": true, + "dependencies": { + "sax": ">=0.6.0", + "xmlbuilder": "~11.0.0" + }, + "engines": { + "node": ">=4.0.0" + } + }, + "node_modules/typeorm/node_modules/xmlbuilder": { + "version": "11.0.1", + "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-11.0.1.tgz", + "integrity": "sha512-fDlsI/kFEx7gLvbecc0/ohLG50fugQp8ryHzMTuW9vSa1GJ0XYWKnhsUx7oie3G98+r56aTQIUB4kht42R3JvA==", + "dev": true, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/typeorm/node_modules/y18n": { + "version": "5.0.5", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.5.tgz", + "integrity": "sha512-hsRUr4FFrvhhRH12wOdfs38Gy7k2FFzB9qgN9v3aLykRq0dRcdcpz5C9FxdS2NuhOrI/628b/KSTJ3rwHysYSg==", + "dev": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/typeorm/node_modules/yargs": { + "version": "16.2.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", + "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", + "dev": true, + "dependencies": { + "cliui": "^7.0.2", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.0", + "y18n": "^5.0.5", + "yargs-parser": "^20.2.2" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/typescript": { "version": "4.2.3", "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.2.3.tgz", @@ -16674,6 +17292,22 @@ "deprecated": "Please see https://github.com/lydell/urix#deprecated", "dev": true }, + "node_modules/url": { + "version": "0.10.3", + "resolved": "https://registry.npmjs.org/url/-/url-0.10.3.tgz", + "integrity": "sha1-Ah5NnHcF8hu/N9A861h2dAJ3TGQ=", + "dev": true, + "dependencies": { + "punycode": "1.3.2", + "querystring": "0.2.0" + } + }, + "node_modules/url/node_modules/punycode": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz", + "integrity": "sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0=", + "dev": true + }, "node_modules/use": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/use/-/use-3.1.1.tgz", @@ -17069,6 +17703,53 @@ "node": ">=4" } }, + "node_modules/winston": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/winston/-/winston-3.3.3.tgz", + "integrity": "sha512-oEXTISQnC8VlSAKf1KYSSd7J6IWuRPQqDdo8eoRNaYKLvwSb5+79Z3Yi1lrl6KDpU6/VWaxpakDAtb1oQ4n9aw==", + "dev": true, + "dependencies": { + "@dabh/diagnostics": "^2.0.2", + "async": "^3.1.0", + "is-stream": "^2.0.0", + "logform": "^2.2.0", + "one-time": "^1.0.0", + "readable-stream": "^3.4.0", + "stack-trace": "0.0.x", + "triple-beam": "^1.3.0", + "winston-transport": "^4.4.0" + }, + "engines": { + "node": ">= 6.4.0" + } + }, + "node_modules/winston-transport": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/winston-transport/-/winston-transport-4.4.0.tgz", + "integrity": "sha512-Lc7/p3GtqtqPBYYtS6KCN3c77/2QCev51DvcJKbkFPQNoj1sinkGwLGFDxkXY9J6p9+EPnYs+D90uwbnaiURTw==", + "dev": true, + "dependencies": { + "readable-stream": "^2.3.7", + "triple-beam": "^1.2.0" + }, + "engines": { + "node": ">= 6.4.0" + } + }, + "node_modules/winston/node_modules/readable-stream": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", + "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", + "dev": true, + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } + }, "node_modules/word-wrap": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", @@ -17321,6 +18002,25 @@ "integrity": "sha512-A5CUptxDsvxKJEU3yO6DuWBSJz/qizqzJKOMIfUJHETbBw/sFaDxgd6fxm1ewUaM0jZ444Fc5vC5ROYurg/4Pw==", "dev": true }, + "node_modules/xml2js": { + "version": "0.4.19", + "resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.4.19.tgz", + "integrity": "sha512-esZnJZJOiJR9wWKMyuvSE1y6Dq5LCuJanqhxslH2bxM6duahNZ+HMpCLhBQGZkbX6xRf8x1Y2eJlgt2q3qo49Q==", + "dev": true, + "dependencies": { + "sax": ">=0.6.0", + "xmlbuilder": "~9.0.1" + } + }, + "node_modules/xmlbuilder": { + "version": "9.0.7", + "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-9.0.7.tgz", + "integrity": "sha1-Ey7mPS7FVlxVfiD0wi35rKaGsQ0=", + "dev": true, + "engines": { + "node": ">=4.0" + } + }, "node_modules/xmlchars": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/xmlchars/-/xmlchars-2.2.0.tgz", @@ -17357,6 +18057,72 @@ "node": ">= 6" } }, + "node_modules/yargonaut": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/yargonaut/-/yargonaut-1.1.4.tgz", + "integrity": "sha512-rHgFmbgXAAzl+1nngqOcwEljqHGG9uUZoPjsdZEs1w5JW9RXYzrSvH/u70C1JE5qFi0qjsdhnUX/dJRpWqitSA==", + "dev": true, + "dependencies": { + "chalk": "^1.1.1", + "figlet": "^1.1.1", + "parent-require": "^1.0.0" + } + }, + "node_modules/yargonaut/node_modules/ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/yargonaut/node_modules/ansi-styles": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", + "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/yargonaut/node_modules/chalk": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "dev": true, + "dependencies": { + "ansi-styles": "^2.2.1", + "escape-string-regexp": "^1.0.2", + "has-ansi": "^2.0.0", + "strip-ansi": "^3.0.0", + "supports-color": "^2.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/yargonaut/node_modules/strip-ansi": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "dev": true, + "dependencies": { + "ansi-regex": "^2.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/yargonaut/node_modules/supports-color": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", + "dev": true, + "engines": { + "node": ">=0.8.0" + } + }, "node_modules/yargs": { "version": "7.1.1", "resolved": "https://registry.npmjs.org/yargs/-/yargs-7.1.1.tgz", @@ -17598,8 +18364,30 @@ "node": ">= 4.0.0" } }, - "packages/@cheeket-injector": { - "name": "@cheeket/injector", + "packages/cheeket": { + "version": "2.3.5", + "license": "MIT", + "dependencies": { + "eventemitter2": "^6.4.3", + "uniqid": "^5.2.0" + }, + "devDependencies": { + "@types/uniqid": "^5.2.0" + } + }, + "packages/cheeket-aws": { + "version": "1.0.0", + "license": "ISC", + "devDependencies": { + "aws-sdk": "^2.868.0", + "cheeket": "^2.3.5" + }, + "peerDependencies": { + "aws-sdk": "^2.x", + "cheeket": "^2.3.x" + } + }, + "packages/cheeket-injector": { "version": "2.3.5", "license": "MIT", "devDependencies": { @@ -17611,8 +18399,7 @@ "reflect-metadata": "0.1" } }, - "packages/@cheeket-koa": { - "name": "@cheeket/koa", + "packages/cheeket-koa": { "version": "1.0.0-alpha.3", "license": "MIT", "devDependencies": { @@ -17629,15 +18416,28 @@ "koa": "2.x" } }, - "packages/cheeket": { - "version": "2.3.5", - "license": "MIT", - "dependencies": { - "eventemitter2": "^6.4.3", - "uniqid": "^5.2.0" + "packages/cheeket-typerom": { + "version": "1.0.0", + "license": "ISC", + "devDependencies": { + "cheeket": "^2.3.5", + "typeorm": "^0.2.31" }, + "peerDependencies": { + "cheeket": "^2.3.x", + "typeorm": "^0.2.x" + } + }, + "packages/cheeket-winston": { + "version": "1.0.0", + "license": "ISC", "devDependencies": { - "@types/uniqid": "^5.2.0" + "cheeket": "^2.3.5", + "winston": "^3.3.3" + }, + "peerDependencies": { + "cheeket": "^2.3.x", + "winston": "^3.3.x" } } }, @@ -18137,15 +18937,22 @@ "integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==", "dev": true }, + "@cheeket/aws": { + "version": "file:packages/cheeket-aws", + "requires": { + "aws-sdk": "^2.868.0", + "cheeket": "^2.3.5" + } + }, "@cheeket/injector": { - "version": "file:packages/@cheeket-injector", + "version": "file:packages/cheeket-injector", "requires": { "cheeket": "^2.3.5", "reflect-metadata": "^0.1.13" } }, "@cheeket/koa": { - "version": "file:packages/@cheeket-koa", + "version": "file:packages/cheeket-koa", "requires": { "@types/accepts": "^1.3.5", "@types/cookies": "^0.7.5", @@ -18154,6 +18961,20 @@ "koa": "^2.13.0" } }, + "@cheeket/typeorm": { + "version": "file:packages/cheeket-typerom", + "requires": { + "cheeket": "^2.3.5", + "typeorm": "^0.2.31" + } + }, + "@cheeket/winston": { + "version": "file:packages/cheeket-winston", + "requires": { + "cheeket": "^2.3.5", + "winston": "^3.3.3" + } + }, "@cnakazawa/watch": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/@cnakazawa/watch/-/watch-1.0.4.tgz", @@ -18164,6 +18985,17 @@ "minimist": "^1.2.0" } }, + "@dabh/diagnostics": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@dabh/diagnostics/-/diagnostics-2.0.2.tgz", + "integrity": "sha512-+A1YivoVDNNVCdfozHSR8v/jyuuLTMXwjWuxPFlFlUapXoGc+Gj9mDlTDDfrwl7rXCl2tNZ0kE8sIBO6YOn96Q==", + "dev": true, + "requires": { + "colorspace": "1.1.x", + "enabled": "2.0.x", + "kuler": "^2.0.0" + } + }, "@eslint/eslintrc": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-0.4.0.tgz", @@ -19669,6 +20501,12 @@ "@sinonjs/commons": "^1.7.0" } }, + "@sqltools/formatter": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/@sqltools/formatter/-/formatter-1.2.2.tgz", + "integrity": "sha512-/5O7Fq6Vnv8L6ucmPjaWbVG1XkP4FO+w5glqfkIsq3Xw4oyNAdJddbnYodNDAfjVUvo/rrSCTom4kAND7T1o5Q==", + "dev": true + }, "@tootallnate/once": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-1.1.2.tgz", @@ -20339,6 +21177,12 @@ } } }, + "app-root-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/app-root-path/-/app-root-path-3.0.0.tgz", + "integrity": "sha512-qMcx+Gy2UZynHjOHOIXPNvpf+9cjvk3cWrBBK7zg4gH9+clobJRb9NGzcT7mQTcV/6Gm/1WelUtqxVXnNlrwcw==", + "dev": true + }, "append-buffer": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/append-buffer/-/append-buffer-1.0.2.tgz", @@ -20597,6 +21441,12 @@ "integrity": "sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==", "dev": true }, + "async": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/async/-/async-3.2.0.tgz", + "integrity": "sha512-TR2mEZFVOj2pLStYxLht7TyfuRzaydfpxr3k9RpHIzMgw7A64dzsdqCxH1WJyQdoe8T10nDXd9wnEigmiuHIZw==", + "dev": true + }, "async-done": { "version": "1.3.2", "resolved": "https://registry.npmjs.org/async-done/-/async-done-1.3.2.tgz", @@ -20642,6 +21492,31 @@ "integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==", "dev": true }, + "aws-sdk": { + "version": "2.868.0", + "resolved": "https://registry.npmjs.org/aws-sdk/-/aws-sdk-2.868.0.tgz", + "integrity": "sha512-ZayPsA/ycaAXqqa2oDyf8iUpl1WOLODZS8ZdvYj77L5owMQm0XC7yqiD+WHj9nToUECF9VAD+AKQMIN6695tVQ==", + "dev": true, + "requires": { + "buffer": "4.9.2", + "events": "1.1.1", + "ieee754": "1.1.13", + "jmespath": "0.15.0", + "querystring": "0.2.0", + "sax": "1.2.1", + "url": "0.10.3", + "uuid": "3.3.2", + "xml2js": "0.4.19" + }, + "dependencies": { + "uuid": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz", + "integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA==", + "dev": true + } + } + }, "aws-sign2": { "version": "0.7.0", "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", @@ -20823,6 +21698,12 @@ } } }, + "base64-js": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", + "dev": true + }, "bcrypt-pbkdf": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", @@ -20919,6 +21800,17 @@ "node-int64": "^0.4.0" } }, + "buffer": { + "version": "4.9.2", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-4.9.2.tgz", + "integrity": "sha512-xq+q3SRMOxGivLhBNaUdC64hDTQwejJ+H0T/NB1XMtTVEwNTrfFF3gAxiyW0Bu/xWEGhjVKgUcMhCrUy2+uCWg==", + "dev": true, + "requires": { + "base64-js": "^1.0.2", + "ieee754": "^1.1.4", + "isarray": "^1.0.0" + } + }, "buffer-equal": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/buffer-equal/-/buffer-equal-1.0.0.tgz", @@ -21173,6 +22065,77 @@ "restore-cursor": "^3.1.0" } }, + "cli-highlight": { + "version": "2.1.10", + "resolved": "https://registry.npmjs.org/cli-highlight/-/cli-highlight-2.1.10.tgz", + "integrity": "sha512-CcPFD3JwdQ2oSzy+AMG6j3LRTkNjM82kzcSKzoVw6cLanDCJNlsLjeqVTOTfOfucnWv5F0rmBemVf1m9JiIasw==", + "dev": true, + "requires": { + "chalk": "^4.0.0", + "highlight.js": "^10.0.0", + "mz": "^2.4.0", + "parse5": "^5.1.1", + "parse5-htmlparser2-tree-adapter": "^6.0.0", + "yargs": "^16.0.0" + }, + "dependencies": { + "cliui": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", + "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", + "dev": true, + "requires": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^7.0.0" + } + }, + "get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "dev": true + }, + "parse5": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/parse5/-/parse5-5.1.1.tgz", + "integrity": "sha512-ugq4DFI0Ptb+WWjAdOK16+u/nHfiIrcE+sh8kZMaM0WllQKLI9rOUq6c2b7cwPkXdzfQESqvoqK6ug7U/Yyzug==", + "dev": true + }, + "wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "requires": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + } + }, + "y18n": { + "version": "5.0.5", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.5.tgz", + "integrity": "sha512-hsRUr4FFrvhhRH12wOdfs38Gy7k2FFzB9qgN9v3aLykRq0dRcdcpz5C9FxdS2NuhOrI/628b/KSTJ3rwHysYSg==", + "dev": true + }, + "yargs": { + "version": "16.2.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", + "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", + "dev": true, + "requires": { + "cliui": "^7.0.2", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.0", + "y18n": "^5.0.5", + "yargs-parser": "^20.2.2" + } + } + } + }, "cli-width": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-3.0.0.tgz", @@ -21332,6 +22295,33 @@ "object-visit": "^1.0.0" } }, + "color": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/color/-/color-3.0.0.tgz", + "integrity": "sha512-jCpd5+s0s0t7p3pHQKpnJ0TpQKKdleP71LWcA0aqiljpiuAkOSUFN/dyH8ZwF0hRmFlrIuRhufds1QyEP9EB+w==", + "dev": true, + "requires": { + "color-convert": "^1.9.1", + "color-string": "^1.5.2" + }, + "dependencies": { + "color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "requires": { + "color-name": "1.1.3" + } + }, + "color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "dev": true + } + } + }, "color-convert": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", @@ -21347,6 +22337,16 @@ "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", "dev": true }, + "color-string": { + "version": "1.5.5", + "resolved": "https://registry.npmjs.org/color-string/-/color-string-1.5.5.tgz", + "integrity": "sha512-jgIoum0OfQfq9Whcfc2z/VhCNcmQjWbey6qBX0vqt7YICflUmBCh9E9CiQD5GSJ+Uehixm3NUwHVhqUAWRivZg==", + "dev": true, + "requires": { + "color-name": "^1.0.0", + "simple-swizzle": "^0.2.2" + } + }, "color-support": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/color-support/-/color-support-1.1.3.tgz", @@ -21359,6 +22359,22 @@ "integrity": "sha512-MKGMzyfeuutC/ZJ1cba9NqcNpfeqMUcYmyF1ZFY6/Cn7CNSAKx6a+s48sqLqyAiZuaP2TcqMhoo+dlwFnVxT9w==", "dev": true }, + "colors": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/colors/-/colors-1.4.0.tgz", + "integrity": "sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA==", + "dev": true + }, + "colorspace": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/colorspace/-/colorspace-1.1.2.tgz", + "integrity": "sha512-vt+OoIP2d76xLhjwbBaucYlNSpPsrJWPlBTtwCpQKIu6/CSMutyzX93O/Do0qzpH3YoHEes8YEFXyZ797rEhzQ==", + "dev": true, + "requires": { + "color": "3.0.x", + "text-hex": "1.0.x" + } + }, "columnify": { "version": "1.5.4", "resolved": "https://registry.npmjs.org/columnify/-/columnify-1.5.4.tgz", @@ -22171,6 +23187,12 @@ "is-obj": "^2.0.0" } }, + "dotenv": { + "version": "8.2.0", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-8.2.0.tgz", + "integrity": "sha512-8sJ78ElpbDJBHNeBzUbUVLsqKdccaa/BXF1uPTw3GrvQTBgrQrtObr2mUrE38vzYd8cEv+m/JBfDLioYcfXoaw==", + "dev": true + }, "duplexer": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/duplexer/-/duplexer-0.1.2.tgz", @@ -22258,6 +23280,12 @@ "dev": true, "peer": true }, + "enabled": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/enabled/-/enabled-2.0.0.tgz", + "integrity": "sha512-AKrN98kuwOzMIdAizXGI86UFBoo26CL21UM763y1h/GMSJ4/OHU9k2YlsmBpyScFo/wbLzWQJBMCW4+IO3/+OQ==", + "dev": true + }, "encodeurl": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", @@ -22877,6 +23905,12 @@ "integrity": "sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw==", "dev": true }, + "events": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/events/-/events-1.1.1.tgz", + "integrity": "sha1-nr23Y1rQmccNzEwqH1AEKI6L2SQ=", + "dev": true + }, "exec-sh": { "version": "0.3.4", "resolved": "https://registry.npmjs.org/exec-sh/-/exec-sh-0.3.4.tgz", @@ -23122,6 +24156,12 @@ "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", "dev": true }, + "fast-safe-stringify": { + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/fast-safe-stringify/-/fast-safe-stringify-2.0.7.tgz", + "integrity": "sha512-Utm6CdzT+6xsDk2m8S6uL8VHxNwI6Jub+e9NYTcAms28T84pTa25GJQV9j0CY0N1rM8hK4x6grpF2BQf+2qwVA==", + "dev": true + }, "fastq": { "version": "1.11.0", "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.11.0.tgz", @@ -23140,6 +24180,18 @@ "bser": "2.1.1" } }, + "fecha": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/fecha/-/fecha-4.2.0.tgz", + "integrity": "sha512-aN3pcx/DSmtyoovUudctc8+6Hl4T+hI9GBBHLjA76jdZl7+b1sgh5g4k+u/GL3dTy1/pnYzKp69FpJ0OicE3Wg==", + "dev": true + }, + "figlet": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/figlet/-/figlet-1.5.0.tgz", + "integrity": "sha512-ZQJM4aifMpz6H19AW1VqvZ7l4pOE9p7i/3LyxgO2kp+PO/VcDYNqIHEMtkccqIhTXMKci4kjueJr/iCQEaT/Ww==", + "dev": true + }, "figures": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/figures/-/figures-3.2.0.tgz", @@ -23357,6 +24409,12 @@ "readable-stream": "^2.3.6" } }, + "fn.name": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/fn.name/-/fn.name-1.1.0.tgz", + "integrity": "sha512-GRnmB5gPyJpAhTQdSZTSp9uaPSvl09KoYcMQtsB9rQoOmzs9dH6ffeccH+Z+cv6P68Hu5bC6JjRh4Ah/mHSNRw==", + "dev": true + }, "for-in": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", @@ -24332,6 +25390,23 @@ "function-bind": "^1.1.1" } }, + "has-ansi": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", + "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", + "dev": true, + "requires": { + "ansi-regex": "^2.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", + "dev": true + } + } + }, "has-bigints": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.1.tgz", @@ -24397,6 +25472,12 @@ } } }, + "highlight.js": { + "version": "10.6.0", + "resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-10.6.0.tgz", + "integrity": "sha512-8mlRcn5vk/r4+QcqerapwBYTe+iPL5ih6xrNylxrnBdHQiijDETfXX7VIxC3UiCRiINBJfANBAsPzAvRQj8RpQ==", + "dev": true + }, "homedir-polyfill": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/homedir-polyfill/-/homedir-polyfill-1.0.3.tgz", @@ -24539,6 +25620,12 @@ "safer-buffer": ">= 2.1.2 < 3" } }, + "ieee754": { + "version": "1.1.13", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.13.tgz", + "integrity": "sha512-4vf7I2LYV/HaWerSo3XmlMkp5eZ83i+/CDluXi/IGTs/O1sejBNhTtnxzmRZfvOUqj7lZjqHkeTvpgSFDlWZTg==", + "dev": true + }, "ignore": { "version": "4.0.6", "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", @@ -25800,6 +26887,12 @@ "supports-color": "^7.0.0" } }, + "jmespath": { + "version": "0.15.0", + "resolved": "https://registry.npmjs.org/jmespath/-/jmespath-0.15.0.tgz", + "integrity": "sha1-o/Iiqarp+Wb10nx5ZRDigJF2Qhc=", + "dev": true + }, "js-tokens": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", @@ -26071,6 +27164,12 @@ } } }, + "kuler": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/kuler/-/kuler-2.0.0.tgz", + "integrity": "sha512-Xq9nH7KlWZmXAtodXDDRE7vs6DU1gTU8zYDHDiWLSip45Egwq3plLHzPn27NgvzL2r1LMPC1vdqh98sQxtqj4A==", + "dev": true + }, "language-subtag-registry": { "version": "0.3.21", "resolved": "https://registry.npmjs.org/language-subtag-registry/-/language-subtag-registry-0.3.21.tgz", @@ -26297,6 +27396,19 @@ "lodash._reinterpolate": "^3.0.0" } }, + "logform": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/logform/-/logform-2.2.0.tgz", + "integrity": "sha512-N0qPlqfypFx7UHNn4B3lzS/b0uLqt2hmuoa+PpuXNYgozdJYAyauF5Ky0BWVjrxDlMWiT3qN4zPq3vVAfZy7Yg==", + "dev": true, + "requires": { + "colors": "^1.2.1", + "fast-safe-stringify": "^2.0.4", + "fecha": "^4.2.0", + "ms": "^2.1.1", + "triple-beam": "^1.3.0" + } + }, "loose-envify": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", @@ -26957,6 +28069,17 @@ "integrity": "sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==", "dev": true }, + "mz": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/mz/-/mz-2.7.0.tgz", + "integrity": "sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q==", + "dev": true, + "requires": { + "any-promise": "^1.0.0", + "object-assign": "^4.0.1", + "thenify-all": "^1.0.0" + } + }, "nan": { "version": "2.14.2", "resolved": "https://registry.npmjs.org/nan/-/nan-2.14.2.tgz", @@ -27609,6 +28732,15 @@ "wrappy": "1" } }, + "one-time": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/one-time/-/one-time-1.0.0.tgz", + "integrity": "sha512-5DXOiRKwuSEcQ/l0kGCF6Q3jcADFv5tSmRaJck/OqkVFcOzutB134KRSfF0xDrL39MNnqxbHBbUUcjZIhTgb2g==", + "dev": true, + "requires": { + "fn.name": "1.x.x" + } + }, "onetime": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", @@ -27805,6 +28937,12 @@ "callsites": "^3.0.0" } }, + "parent-require": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/parent-require/-/parent-require-1.0.0.tgz", + "integrity": "sha1-dGoWdjgIOoYLDu9nMssn7UbDKXc=", + "dev": true + }, "parse-filepath": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/parse-filepath/-/parse-filepath-1.0.2.tgz", @@ -27876,6 +29014,15 @@ "integrity": "sha512-Ofn/CTFzRGTTxwpNEs9PP93gXShHcTq255nzRYSKe8AkVpZY7e1fpmTfOyoIvjP5HG7Z2ZM7VS9PPhQGW2pOpw==", "dev": true }, + "parse5-htmlparser2-tree-adapter": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/parse5-htmlparser2-tree-adapter/-/parse5-htmlparser2-tree-adapter-6.0.1.tgz", + "integrity": "sha512-qPuWvbLgvDGilKc5BoicRovlT4MtYT6JfJyBOMDsKoiT+GiuP5qyrPCnR9HcPECIJJmZh5jRndyNThnhhb/vlA==", + "dev": true, + "requires": { + "parse5": "^6.0.1" + } + }, "parseurl": { "version": "1.3.3", "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", @@ -28384,6 +29531,12 @@ "strict-uri-encode": "^2.0.0" } }, + "querystring": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz", + "integrity": "sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA=", + "dev": true + }, "queue-microtask": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.2.tgz", @@ -29437,6 +30590,12 @@ } } }, + "sax": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.1.tgz", + "integrity": "sha1-e45lYZCyKOgaZq6nSEgNgozS03o=", + "dev": true + }, "saxes": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/saxes/-/saxes-5.0.1.tgz", @@ -29499,6 +30658,16 @@ "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==", "dev": true }, + "sha.js": { + "version": "2.4.11", + "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz", + "integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==", + "dev": true, + "requires": { + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + } + }, "shallow-clone": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/shallow-clone/-/shallow-clone-3.0.1.tgz", @@ -29566,6 +30735,23 @@ "integrity": "sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA==", "dev": true }, + "simple-swizzle": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/simple-swizzle/-/simple-swizzle-0.2.2.tgz", + "integrity": "sha1-pNprY1/8zMoz9w0Xy5JZLeleVXo=", + "dev": true, + "requires": { + "is-arrayish": "^0.3.1" + }, + "dependencies": { + "is-arrayish": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.3.2.tgz", + "integrity": "sha512-eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ==", + "dev": true + } + } + }, "sisteransi": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.5.tgz", @@ -30345,12 +31531,36 @@ "integrity": "sha512-wiBrwC1EhBelW12Zy26JeOUkQ5mRu+5o8rpsJk5+2t+Y5vE7e842qtZDQ2g1NpX/29HdyFeJ4nSIhI47ENSxlQ==", "dev": true }, + "text-hex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/text-hex/-/text-hex-1.0.0.tgz", + "integrity": "sha512-uuVGNWzgJ4yhRaNSiubPY7OjISw4sw4E5Uv0wbjp+OzcbmVU/rsT8ujgcXJhn9ypzsgr5vlzpPqP+MBBKcGvbg==", + "dev": true + }, "text-table": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=", "dev": true }, + "thenify": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/thenify/-/thenify-3.3.1.tgz", + "integrity": "sha512-RVZSIV5IG10Hk3enotrhvz0T9em6cyHBLkH/YAZuKqd8hRkKhSfCGIcP2KUY0EPxndzANBmNllzWPwak+bheSw==", + "dev": true, + "requires": { + "any-promise": "^1.0.0" + } + }, + "thenify-all": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/thenify-all/-/thenify-all-1.6.0.tgz", + "integrity": "sha1-GhkY1ALY/D+Y+/I02wvMjMEOlyY=", + "dev": true, + "requires": { + "thenify": ">= 3.1.0 < 4" + } + }, "throat": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/throat/-/throat-5.0.0.tgz", @@ -30626,6 +31836,12 @@ "integrity": "sha1-n5up2e+odkw4dpi8v+sshI8RrbM=", "dev": true }, + "triple-beam": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/triple-beam/-/triple-beam-1.3.0.tgz", + "integrity": "sha512-XrHUvV5HpdLmIj4uVMxHggLbFSZYIn7HEWsqePZcI50pco+MPqJ50wMGY794X7AOOhxOBAjbkqfAbEe/QMp2Lw==", + "dev": true + }, "ts-jest": { "version": "26.5.4", "resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-26.5.4.tgz", @@ -30760,6 +31976,107 @@ "is-typedarray": "^1.0.0" } }, + "typeorm": { + "version": "0.2.31", + "resolved": "https://registry.npmjs.org/typeorm/-/typeorm-0.2.31.tgz", + "integrity": "sha512-dVvCEVHH48DG0QPXAKfo0l6ecQrl3A8ucGP4Yw4myz4YEDMProebTQo8as83uyES+nrwCbu3qdkL4ncC2+qcMA==", + "dev": true, + "requires": { + "@sqltools/formatter": "1.2.2", + "app-root-path": "^3.0.0", + "buffer": "^5.5.0", + "chalk": "^4.1.0", + "cli-highlight": "^2.1.10", + "debug": "^4.1.1", + "dotenv": "^8.2.0", + "glob": "^7.1.6", + "js-yaml": "^3.14.0", + "mkdirp": "^1.0.4", + "reflect-metadata": "^0.1.13", + "sha.js": "^2.4.11", + "tslib": "^1.13.0", + "xml2js": "^0.4.23", + "yargonaut": "^1.1.2", + "yargs": "^16.0.3" + }, + "dependencies": { + "buffer": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", + "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", + "dev": true, + "requires": { + "base64-js": "^1.3.1", + "ieee754": "^1.1.13" + } + }, + "cliui": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", + "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", + "dev": true, + "requires": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^7.0.0" + } + }, + "get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "dev": true + }, + "wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "requires": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + } + }, + "xml2js": { + "version": "0.4.23", + "resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.4.23.tgz", + "integrity": "sha512-ySPiMjM0+pLDftHgXY4By0uswI3SPKLDw/i3UXbnO8M/p28zqexCUoPmQFrYD+/1BzhGJSs2i1ERWKJAtiLrug==", + "dev": true, + "requires": { + "sax": ">=0.6.0", + "xmlbuilder": "~11.0.0" + } + }, + "xmlbuilder": { + "version": "11.0.1", + "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-11.0.1.tgz", + "integrity": "sha512-fDlsI/kFEx7gLvbecc0/ohLG50fugQp8ryHzMTuW9vSa1GJ0XYWKnhsUx7oie3G98+r56aTQIUB4kht42R3JvA==", + "dev": true + }, + "y18n": { + "version": "5.0.5", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.5.tgz", + "integrity": "sha512-hsRUr4FFrvhhRH12wOdfs38Gy7k2FFzB9qgN9v3aLykRq0dRcdcpz5C9FxdS2NuhOrI/628b/KSTJ3rwHysYSg==", + "dev": true + }, + "yargs": { + "version": "16.2.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", + "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", + "dev": true, + "requires": { + "cliui": "^7.0.2", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.0", + "y18n": "^5.0.5", + "yargs-parser": "^20.2.2" + } + } + } + }, "typescript": { "version": "4.2.3", "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.2.3.tgz", @@ -30952,6 +32269,24 @@ "integrity": "sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI=", "dev": true }, + "url": { + "version": "0.10.3", + "resolved": "https://registry.npmjs.org/url/-/url-0.10.3.tgz", + "integrity": "sha1-Ah5NnHcF8hu/N9A861h2dAJ3TGQ=", + "dev": true, + "requires": { + "punycode": "1.3.2", + "querystring": "0.2.0" + }, + "dependencies": { + "punycode": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz", + "integrity": "sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0=", + "dev": true + } + } + }, "use": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/use/-/use-3.1.1.tgz", @@ -31288,6 +32623,46 @@ } } }, + "winston": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/winston/-/winston-3.3.3.tgz", + "integrity": "sha512-oEXTISQnC8VlSAKf1KYSSd7J6IWuRPQqDdo8eoRNaYKLvwSb5+79Z3Yi1lrl6KDpU6/VWaxpakDAtb1oQ4n9aw==", + "dev": true, + "requires": { + "@dabh/diagnostics": "^2.0.2", + "async": "^3.1.0", + "is-stream": "^2.0.0", + "logform": "^2.2.0", + "one-time": "^1.0.0", + "readable-stream": "^3.4.0", + "stack-trace": "0.0.x", + "triple-beam": "^1.3.0", + "winston-transport": "^4.4.0" + }, + "dependencies": { + "readable-stream": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", + "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", + "dev": true, + "requires": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + } + } + } + }, + "winston-transport": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/winston-transport/-/winston-transport-4.4.0.tgz", + "integrity": "sha512-Lc7/p3GtqtqPBYYtS6KCN3c77/2QCev51DvcJKbkFPQNoj1sinkGwLGFDxkXY9J6p9+EPnYs+D90uwbnaiURTw==", + "dev": true, + "requires": { + "readable-stream": "^2.3.7", + "triple-beam": "^1.2.0" + } + }, "word-wrap": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", @@ -31481,6 +32856,22 @@ "integrity": "sha512-A5CUptxDsvxKJEU3yO6DuWBSJz/qizqzJKOMIfUJHETbBw/sFaDxgd6fxm1ewUaM0jZ444Fc5vC5ROYurg/4Pw==", "dev": true }, + "xml2js": { + "version": "0.4.19", + "resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.4.19.tgz", + "integrity": "sha512-esZnJZJOiJR9wWKMyuvSE1y6Dq5LCuJanqhxslH2bxM6duahNZ+HMpCLhBQGZkbX6xRf8x1Y2eJlgt2q3qo49Q==", + "dev": true, + "requires": { + "sax": ">=0.6.0", + "xmlbuilder": "~9.0.1" + } + }, + "xmlbuilder": { + "version": "9.0.7", + "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-9.0.7.tgz", + "integrity": "sha1-Ey7mPS7FVlxVfiD0wi35rKaGsQ0=", + "dev": true + }, "xmlchars": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/xmlchars/-/xmlchars-2.2.0.tgz", @@ -31511,6 +32902,59 @@ "integrity": "sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==", "dev": true }, + "yargonaut": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/yargonaut/-/yargonaut-1.1.4.tgz", + "integrity": "sha512-rHgFmbgXAAzl+1nngqOcwEljqHGG9uUZoPjsdZEs1w5JW9RXYzrSvH/u70C1JE5qFi0qjsdhnUX/dJRpWqitSA==", + "dev": true, + "requires": { + "chalk": "^1.1.1", + "figlet": "^1.1.1", + "parent-require": "^1.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", + "dev": true + }, + "ansi-styles": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", + "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", + "dev": true + }, + "chalk": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "dev": true, + "requires": { + "ansi-styles": "^2.2.1", + "escape-string-regexp": "^1.0.2", + "has-ansi": "^2.0.0", + "strip-ansi": "^3.0.0", + "supports-color": "^2.0.0" + } + }, + "strip-ansi": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "dev": true, + "requires": { + "ansi-regex": "^2.0.0" + } + }, + "supports-color": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", + "dev": true + } + } + }, "yargs": { "version": "7.1.1", "resolved": "https://registry.npmjs.org/yargs/-/yargs-7.1.1.tgz", diff --git a/packages/@cheeket-injector/.eslintignore b/packages/cheeket-aws/.eslintignore similarity index 100% rename from packages/@cheeket-injector/.eslintignore rename to packages/cheeket-aws/.eslintignore diff --git a/packages/@cheeket-injector/.eslintrc.json b/packages/cheeket-aws/.eslintrc.json similarity index 100% rename from packages/@cheeket-injector/.eslintrc.json rename to packages/cheeket-aws/.eslintrc.json diff --git a/packages/@cheeket-injector/.gitignore b/packages/cheeket-aws/.gitignore similarity index 100% rename from packages/@cheeket-injector/.gitignore rename to packages/cheeket-aws/.gitignore diff --git a/packages/@cheeket-injector/.npmignore b/packages/cheeket-aws/.npmignore similarity index 100% rename from packages/@cheeket-injector/.npmignore rename to packages/cheeket-aws/.npmignore diff --git a/packages/cheeket-aws/gulpfile.js b/packages/cheeket-aws/gulpfile.js new file mode 100644 index 00000000..13fcaad2 --- /dev/null +++ b/packages/cheeket-aws/gulpfile.js @@ -0,0 +1,64 @@ +const fs = require('fs'); +const path = require("path"); + +const { src, dest, series } = require('gulp'); +const sourcemaps = require('gulp-sourcemaps'); +const gulpif = require('gulp-if'); +const ts = require('gulp-typescript'); +const uglify = require('gulp-uglify'); +const merge = require('deepmerge') + +function getTsconfigName() { + if (!process.env.NODE_ENV) return 'tsconfig.json'; + + const specificConfig = `tsconfig.${process.env.NODE_ENV.toLowerCase()}.json`; + if (fs.existsSync(specificConfig)) { + return specificConfig; + } + + return 'tsconfig.json'; +} + +function getFinalTsConfig(config, currentPath) { + const { extends: parentConfigPath, ...rest } = config; + + if (parentConfigPath) { + const finalParentConfigPath = path.join(currentPath, parentConfigPath); + const parentProject = ts.createProject(finalParentConfigPath); + + const parentConfig = getFinalTsConfig(parentProject.rawConfig, parentProject.projectDirectory); + return merge(parentConfig, rest); + } + return rest; +} + +function getTsconfig(tsProject) { + return getFinalTsConfig(tsProject.rawConfig, tsProject.projectDirectory) +} + +const tsProject = ts.createProject(getTsconfigName()); +const tsconfig = getTsconfig(tsProject); + +function compile() { + const useSourcemaps = tsconfig.compilerOptions.sourceMap; + + return tsProject.src() + .pipe(gulpif(useSourcemaps, sourcemaps.init())) + .pipe(tsProject()) + .pipe(gulpif(useSourcemaps, sourcemaps.write('.'))) + .pipe(dest(tsconfig.compilerOptions.outDir)); +} + +function compression() { + const isProduction = process.env.NODE_ENV === 'production'; + + return src(path.join(tsconfig.compilerOptions.outDir, '**/*.js')) + .pipe(gulpif(isProduction, sourcemaps.init())) + .pipe(gulpif(isProduction, uglify())) + .pipe(gulpif(isProduction, sourcemaps.write('.'))) + .pipe(dest(tsconfig.compilerOptions.outDir)); +} + +const build = series(compile, compression); + +exports.default = series(build); diff --git a/packages/@cheeket-injector/jest.config.js b/packages/cheeket-aws/jest.config.js similarity index 100% rename from packages/@cheeket-injector/jest.config.js rename to packages/cheeket-aws/jest.config.js diff --git a/packages/cheeket-aws/lib/dynamo-db.provider.ts b/packages/cheeket-aws/lib/dynamo-db.provider.ts new file mode 100644 index 00000000..e82f526a --- /dev/null +++ b/packages/cheeket-aws/lib/dynamo-db.provider.ts @@ -0,0 +1,10 @@ +import { interfaces } from "cheeket"; +import * as AWS from "aws-sdk"; + +function dynamoDBProvider( + configuration: AWS.DynamoDB.ClientConfiguration +): interfaces.Provider { + return () => new AWS.DynamoDB(configuration); +} + +export default dynamoDBProvider; diff --git a/packages/cheeket-aws/lib/index.spec.ts b/packages/cheeket-aws/lib/index.spec.ts new file mode 100644 index 00000000..c5848699 --- /dev/null +++ b/packages/cheeket-aws/lib/index.spec.ts @@ -0,0 +1 @@ +test.todo("Add test"); diff --git a/packages/cheeket-aws/lib/index.ts b/packages/cheeket-aws/lib/index.ts new file mode 100644 index 00000000..02173ef5 --- /dev/null +++ b/packages/cheeket-aws/lib/index.ts @@ -0,0 +1,2 @@ +export { default as s3Provider } from "./s3.provider"; +export { default as dynamoDBProvider } from "./dynamo-db.provider"; diff --git a/packages/cheeket-aws/lib/s3.provider.ts b/packages/cheeket-aws/lib/s3.provider.ts new file mode 100644 index 00000000..cb5c08a0 --- /dev/null +++ b/packages/cheeket-aws/lib/s3.provider.ts @@ -0,0 +1,12 @@ +import { interfaces } from "cheeket"; +import * as AWS from "aws-sdk"; + +function s3Provider( + configuration: AWS.S3.ClientConfiguration +): interfaces.Provider { + return () => { + return new AWS.S3(configuration); + }; +} + +export default s3Provider; diff --git a/packages/cheeket-aws/package.json b/packages/cheeket-aws/package.json new file mode 100644 index 00000000..98274d5d --- /dev/null +++ b/packages/cheeket-aws/package.json @@ -0,0 +1,26 @@ +{ + "name": "@cheeket/aws", + "version": "1.0.0", + "description": "", + "license": "ISC", + "author": "", + "main": "dist/index.js", + "types": "dist/index.d.ts", + "scripts": { + "test": "jest", + "build": "npm run clean && npm run compile", + "clean": "rm -rf ./dist", + "compile": "gulp", + "lint": "eslint .", + "lint:fix": "eslint --fix .", + "prepublishOnly": "cross-env NODE_ENV=production npm run build" + }, + "devDependencies": { + "aws-sdk": "^2.868.0", + "cheeket": "^2.3.5" + }, + "peerDependencies": { + "aws-sdk": "^2.x", + "cheeket": "^2.3.x" + } +} diff --git a/packages/@cheeket-injector/tsconfig.eslint.json b/packages/cheeket-aws/tsconfig.eslint.json similarity index 100% rename from packages/@cheeket-injector/tsconfig.eslint.json rename to packages/cheeket-aws/tsconfig.eslint.json diff --git a/packages/@cheeket-koa/tsconfig.json b/packages/cheeket-aws/tsconfig.json similarity index 100% rename from packages/@cheeket-koa/tsconfig.json rename to packages/cheeket-aws/tsconfig.json diff --git a/packages/@cheeket-koa/tsconfig.production.json b/packages/cheeket-aws/tsconfig.production.json similarity index 100% rename from packages/@cheeket-koa/tsconfig.production.json rename to packages/cheeket-aws/tsconfig.production.json diff --git a/packages/@cheeket-koa/.eslintignore b/packages/cheeket-injector/.eslintignore similarity index 100% rename from packages/@cheeket-koa/.eslintignore rename to packages/cheeket-injector/.eslintignore diff --git a/packages/@cheeket-koa/.eslintrc.json b/packages/cheeket-injector/.eslintrc.json similarity index 100% rename from packages/@cheeket-koa/.eslintrc.json rename to packages/cheeket-injector/.eslintrc.json diff --git a/packages/@cheeket-koa/.gitignore b/packages/cheeket-injector/.gitignore similarity index 100% rename from packages/@cheeket-koa/.gitignore rename to packages/cheeket-injector/.gitignore diff --git a/packages/@cheeket-koa/.npmignore b/packages/cheeket-injector/.npmignore similarity index 100% rename from packages/@cheeket-koa/.npmignore rename to packages/cheeket-injector/.npmignore diff --git a/packages/@cheeket-injector/README.md b/packages/cheeket-injector/README.md similarity index 100% rename from packages/@cheeket-injector/README.md rename to packages/cheeket-injector/README.md diff --git a/packages/@cheeket-injector/gulpfile.js b/packages/cheeket-injector/gulpfile.js similarity index 100% rename from packages/@cheeket-injector/gulpfile.js rename to packages/cheeket-injector/gulpfile.js diff --git a/packages/@cheeket-koa/jest.config.js b/packages/cheeket-injector/jest.config.js similarity index 100% rename from packages/@cheeket-koa/jest.config.js rename to packages/cheeket-injector/jest.config.js diff --git a/packages/@cheeket-injector/lib/constant/error-msg.ts b/packages/cheeket-injector/lib/constant/error-msg.ts similarity index 100% rename from packages/@cheeket-injector/lib/constant/error-msg.ts rename to packages/cheeket-injector/lib/constant/error-msg.ts diff --git a/packages/@cheeket-injector/lib/constant/metadata-key.ts b/packages/cheeket-injector/lib/constant/metadata-key.ts similarity index 100% rename from packages/@cheeket-injector/lib/constant/metadata-key.ts rename to packages/cheeket-injector/lib/constant/metadata-key.ts diff --git a/packages/@cheeket-injector/lib/decorator/class-decorator.ts b/packages/cheeket-injector/lib/decorator/class-decorator.ts similarity index 100% rename from packages/@cheeket-injector/lib/decorator/class-decorator.ts rename to packages/cheeket-injector/lib/decorator/class-decorator.ts diff --git a/packages/@cheeket-injector/lib/decorator/inject.ts b/packages/cheeket-injector/lib/decorator/inject.ts similarity index 100% rename from packages/@cheeket-injector/lib/decorator/inject.ts rename to packages/cheeket-injector/lib/decorator/inject.ts diff --git a/packages/@cheeket-injector/lib/decorator/injectable.ts b/packages/cheeket-injector/lib/decorator/injectable.ts similarity index 100% rename from packages/@cheeket-injector/lib/decorator/injectable.ts rename to packages/cheeket-injector/lib/decorator/injectable.ts diff --git a/packages/@cheeket-injector/lib/identifier/type.ts b/packages/cheeket-injector/lib/identifier/type.ts similarity index 100% rename from packages/@cheeket-injector/lib/identifier/type.ts rename to packages/cheeket-injector/lib/identifier/type.ts diff --git a/packages/@cheeket-injector/lib/index.ts b/packages/cheeket-injector/lib/index.ts similarity index 100% rename from packages/@cheeket-injector/lib/index.ts rename to packages/cheeket-injector/lib/index.ts diff --git a/packages/@cheeket-injector/lib/injector/auto-injected.ts b/packages/cheeket-injector/lib/injector/auto-injected.ts similarity index 94% rename from packages/@cheeket-injector/lib/injector/auto-injected.ts rename to packages/cheeket-injector/lib/injector/auto-injected.ts index 6e08c7b2..6a210322 100644 --- a/packages/@cheeket-injector/lib/injector/auto-injected.ts +++ b/packages/cheeket-injector/lib/injector/auto-injected.ts @@ -24,7 +24,7 @@ function autoInjected(Target: interfaces.Type): interfaces.Provider { }) ); - return new Target(...parameters); + return new Target(...(parameters as never[])); }; } diff --git a/packages/@cheeket-injector/lib/meta-data/meta-data.ts b/packages/cheeket-injector/lib/meta-data/meta-data.ts similarity index 100% rename from packages/@cheeket-injector/lib/meta-data/meta-data.ts rename to packages/cheeket-injector/lib/meta-data/meta-data.ts diff --git a/packages/@cheeket-injector/lib/type/type.ts b/packages/cheeket-injector/lib/type/type.ts similarity index 100% rename from packages/@cheeket-injector/lib/type/type.ts rename to packages/cheeket-injector/lib/type/type.ts diff --git a/packages/@cheeket-injector/package-lock.json b/packages/cheeket-injector/package-lock.json similarity index 100% rename from packages/@cheeket-injector/package-lock.json rename to packages/cheeket-injector/package-lock.json diff --git a/packages/@cheeket-injector/package.json b/packages/cheeket-injector/package.json similarity index 100% rename from packages/@cheeket-injector/package.json rename to packages/cheeket-injector/package.json index 0280d4f3..c437c273 100644 --- a/packages/@cheeket-injector/package.json +++ b/packages/cheeket-injector/package.json @@ -2,6 +2,9 @@ "name": "@cheeket/injector", "version": "2.3.5", "description": "a decorator-based injector plugin for of cheeket", + "homepage": "https://github.com/siyual-park/cheeket.js", + "license": "MIT", + "author": "siyual.park", "main": "dist/index.js", "types": "dist/index.d.ts", "scripts": { @@ -14,9 +17,6 @@ "lint:fix": "eslint --fix .", "prepublishOnly": "cross-env NODE_ENV=production npm run build" }, - "author": "siyual.park", - "license": "MIT", - "homepage": "https://github.com/siyual-park/cheeket.js", "devDependencies": { "cheeket": "^2.3.5", "reflect-metadata": "^0.1.13" diff --git a/packages/@cheeket-injector/test/mock/katana.ts b/packages/cheeket-injector/test/mock/katana.ts similarity index 100% rename from packages/@cheeket-injector/test/mock/katana.ts rename to packages/cheeket-injector/test/mock/katana.ts diff --git a/packages/@cheeket-injector/test/mock/ninja.ts b/packages/cheeket-injector/test/mock/ninja.ts similarity index 100% rename from packages/@cheeket-injector/test/mock/ninja.ts rename to packages/cheeket-injector/test/mock/ninja.ts diff --git a/packages/@cheeket-injector/test/mock/shuriken.ts b/packages/cheeket-injector/test/mock/shuriken.ts similarity index 100% rename from packages/@cheeket-injector/test/mock/shuriken.ts rename to packages/cheeket-injector/test/mock/shuriken.ts diff --git a/packages/@cheeket-injector/test/mock/throwable-weapon.ts b/packages/cheeket-injector/test/mock/throwable-weapon.ts similarity index 100% rename from packages/@cheeket-injector/test/mock/throwable-weapon.ts rename to packages/cheeket-injector/test/mock/throwable-weapon.ts diff --git a/packages/@cheeket-injector/test/mock/types.ts b/packages/cheeket-injector/test/mock/types.ts similarity index 100% rename from packages/@cheeket-injector/test/mock/types.ts rename to packages/cheeket-injector/test/mock/types.ts diff --git a/packages/@cheeket-injector/test/mock/warrior.ts b/packages/cheeket-injector/test/mock/warrior.ts similarity index 100% rename from packages/@cheeket-injector/test/mock/warrior.ts rename to packages/cheeket-injector/test/mock/warrior.ts diff --git a/packages/@cheeket-injector/test/mock/weapon.ts b/packages/cheeket-injector/test/mock/weapon.ts similarity index 100% rename from packages/@cheeket-injector/test/mock/weapon.ts rename to packages/cheeket-injector/test/mock/weapon.ts diff --git a/packages/@cheeket-injector/test/unit/inject.spec.ts b/packages/cheeket-injector/test/unit/inject.spec.ts similarity index 100% rename from packages/@cheeket-injector/test/unit/inject.spec.ts rename to packages/cheeket-injector/test/unit/inject.spec.ts diff --git a/packages/@cheeket-koa/tsconfig.eslint.json b/packages/cheeket-injector/tsconfig.eslint.json similarity index 100% rename from packages/@cheeket-koa/tsconfig.eslint.json rename to packages/cheeket-injector/tsconfig.eslint.json diff --git a/packages/@cheeket-injector/tsconfig.json b/packages/cheeket-injector/tsconfig.json similarity index 100% rename from packages/@cheeket-injector/tsconfig.json rename to packages/cheeket-injector/tsconfig.json diff --git a/packages/@cheeket-injector/tsconfig.production.json b/packages/cheeket-injector/tsconfig.production.json similarity index 100% rename from packages/@cheeket-injector/tsconfig.production.json rename to packages/cheeket-injector/tsconfig.production.json diff --git a/packages/cheeket-koa/.eslintignore b/packages/cheeket-koa/.eslintignore new file mode 100644 index 00000000..8334ed30 --- /dev/null +++ b/packages/cheeket-koa/.eslintignore @@ -0,0 +1,5 @@ +script +node_modules +dist +*.js +*.json diff --git a/packages/cheeket-koa/.eslintrc.json b/packages/cheeket-koa/.eslintrc.json new file mode 100644 index 00000000..279d1b1a --- /dev/null +++ b/packages/cheeket-koa/.eslintrc.json @@ -0,0 +1,8 @@ +{ + "extends": [ + "../../.eslintrc.json" + ], + "parserOptions": { + "project": "tsconfig.eslint.json" + } +} diff --git a/packages/cheeket-koa/.gitignore b/packages/cheeket-koa/.gitignore new file mode 100644 index 00000000..d069f8e3 --- /dev/null +++ b/packages/cheeket-koa/.gitignore @@ -0,0 +1,119 @@ +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* +lerna-debug.log* + +# Diagnostic reports (https://nodejs.org/api/report.html) +report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json + +# Runtime data +pids +*.pid +*.seed +*.pid.lock + +# Directory for instrumented libs generated by jscoverage/JSCover +lib-cov + +# Coverage directory used by tools like istanbul +coverage +*.lcov + +# nyc test coverage +.nyc_output + +# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) +.grunt + +# Bower dependency directory (https://bower.io/) +bower_components + +# node-waf configuration +.lock-wscript + +# Compiled binary addons (https://nodejs.org/api/addons.html) +build/Release + +# Dependency directories +node_modules/ +jspm_packages/ + +# Snowpack dependency directory (https://snowpack.dev/) +web_modules/ + +# TypeScript cache +*.tsbuildinfo + +# Optional npm cache directory +.npm + +# Optional eslint cache +.eslintcache + +# Microbundle cache +.rpt2_cache/ +.rts2_cache_cjs/ +.rts2_cache_es/ +.rts2_cache_umd/ + +# Optional REPL history +.node_repl_history + +# Output of 'npm pack' +*.tgz + +# Yarn Integrity file +.yarn-integrity + +# dotenv environment variables file +.env +.env.test + +# parcel-bundler cache (https://parceljs.org/) +.cache +.parcel-cache + +# Next.js build output +.next +out + +# Nuxt.js build / generate output +.nuxt +dist + +# Gatsby files +.cache/ +# Comment in the public line in if your project uses Gatsby and not Next.js +# https://nextjs.org/blog/next-9-1#public-directory-support +# public + +# vuepress build output +.vuepress/dist + +# Serverless directories +.serverless/ + +# FuseBox cache +.fusebox/ + +# DynamoDB Local files +.dynamodb/ + +# TernJS port file +.tern-port + +# Stores VSCode versions used for testing VSCode extensions +.vscode-test + +# yarn v2 +.yarn/cache +.yarn/unplugged +.yarn/build-state.yml +.yarn/install-state.gz +.pnp.* + +# intelliJ +.idea/ diff --git a/packages/cheeket-koa/.npmignore b/packages/cheeket-koa/.npmignore new file mode 100644 index 00000000..d800b6dd --- /dev/null +++ b/packages/cheeket-koa/.npmignore @@ -0,0 +1,3 @@ +* +!dist/* +!dist/**/* diff --git a/packages/@cheeket-koa/gulpfile.js b/packages/cheeket-koa/gulpfile.js similarity index 100% rename from packages/@cheeket-koa/gulpfile.js rename to packages/cheeket-koa/gulpfile.js diff --git a/packages/cheeket-koa/jest.config.js b/packages/cheeket-koa/jest.config.js new file mode 100644 index 00000000..faa38786 --- /dev/null +++ b/packages/cheeket-koa/jest.config.js @@ -0,0 +1,16 @@ +module.exports = { + verbose: true, + transform: { + '^.+\\.ts$': 'ts-jest' + }, + testRegex: '\\.spec\\.ts$', + moduleFileExtensions: [ + 'ts', + 'js' + ], + globals: { + 'ts-jest': { + 'diagnostics': true + } + } +}; diff --git a/packages/@cheeket-koa/lib/container-context.ts b/packages/cheeket-koa/lib/container-context.ts similarity index 100% rename from packages/@cheeket-koa/lib/container-context.ts rename to packages/cheeket-koa/lib/container-context.ts diff --git a/packages/@cheeket-koa/lib/dependency.middleware.ts b/packages/cheeket-koa/lib/dependency.middleware.ts similarity index 100% rename from packages/@cheeket-koa/lib/dependency.middleware.ts rename to packages/cheeket-koa/lib/dependency.middleware.ts diff --git a/packages/@cheeket-koa/lib/index.spec.ts b/packages/cheeket-koa/lib/index.spec.ts similarity index 100% rename from packages/@cheeket-koa/lib/index.spec.ts rename to packages/cheeket-koa/lib/index.spec.ts diff --git a/packages/@cheeket-koa/lib/index.ts b/packages/cheeket-koa/lib/index.ts similarity index 100% rename from packages/@cheeket-koa/lib/index.ts rename to packages/cheeket-koa/lib/index.ts diff --git a/packages/@cheeket-koa/lib/initializer.ts b/packages/cheeket-koa/lib/initializer.ts similarity index 100% rename from packages/@cheeket-koa/lib/initializer.ts rename to packages/cheeket-koa/lib/initializer.ts diff --git a/packages/@cheeket-koa/lib/token.ts b/packages/cheeket-koa/lib/token.ts similarity index 100% rename from packages/@cheeket-koa/lib/token.ts rename to packages/cheeket-koa/lib/token.ts diff --git a/packages/@cheeket-koa/package-lock.json b/packages/cheeket-koa/package-lock.json similarity index 100% rename from packages/@cheeket-koa/package-lock.json rename to packages/cheeket-koa/package-lock.json diff --git a/packages/@cheeket-koa/package.json b/packages/cheeket-koa/package.json similarity index 100% rename from packages/@cheeket-koa/package.json rename to packages/cheeket-koa/package.json index 1eebdda6..42bfe94b 100644 --- a/packages/@cheeket-koa/package.json +++ b/packages/cheeket-koa/package.json @@ -2,6 +2,9 @@ "name": "@cheeket/koa", "version": "1.0.0-alpha.3", "description": "use cheeket in koa", + "homepage": "https://github.com/siyual-park/cheeket.js", + "license": "MIT", + "author": "siyual.park", "main": "dist/index.js", "types": "dist/index.d.ts", "scripts": { @@ -14,9 +17,6 @@ "lint:fix": "eslint --fix .", "prepublishOnly": "cross-env NODE_ENV=production npm run build" }, - "author": "siyual.park", - "license": "MIT", - "homepage": "https://github.com/siyual-park/cheeket.js", "devDependencies": { "@types/accepts": "^1.3.5", "@types/cookies": "^0.7.5", diff --git a/packages/cheeket-koa/tsconfig.eslint.json b/packages/cheeket-koa/tsconfig.eslint.json new file mode 100644 index 00000000..2c485ee0 --- /dev/null +++ b/packages/cheeket-koa/tsconfig.eslint.json @@ -0,0 +1,7 @@ +{ + "extends": "./tsconfig.json", + "include": [ + "lib", + "test" + ] +} diff --git a/packages/cheeket-koa/tsconfig.json b/packages/cheeket-koa/tsconfig.json new file mode 100644 index 00000000..53a16bcc --- /dev/null +++ b/packages/cheeket-koa/tsconfig.json @@ -0,0 +1,9 @@ +{ + "extends": "../../tsconfig.json", + "compilerOptions": { + "outDir": "./dist" + }, + "include": [ + "lib/**/*" + ] +} diff --git a/packages/cheeket-koa/tsconfig.production.json b/packages/cheeket-koa/tsconfig.production.json new file mode 100644 index 00000000..195f8d29 --- /dev/null +++ b/packages/cheeket-koa/tsconfig.production.json @@ -0,0 +1,8 @@ +{ + "extends": "./tsconfig.json", + "exclude": [ + "*/**/*.test.ts", + "*/**/*.spec.ts", + "*/**/*.mock.ts" + ] +} diff --git a/packages/cheeket-typerom/.eslintignore b/packages/cheeket-typerom/.eslintignore new file mode 100644 index 00000000..8334ed30 --- /dev/null +++ b/packages/cheeket-typerom/.eslintignore @@ -0,0 +1,5 @@ +script +node_modules +dist +*.js +*.json diff --git a/packages/cheeket-typerom/.eslintrc.json b/packages/cheeket-typerom/.eslintrc.json new file mode 100644 index 00000000..279d1b1a --- /dev/null +++ b/packages/cheeket-typerom/.eslintrc.json @@ -0,0 +1,8 @@ +{ + "extends": [ + "../../.eslintrc.json" + ], + "parserOptions": { + "project": "tsconfig.eslint.json" + } +} diff --git a/packages/cheeket-typerom/.gitignore b/packages/cheeket-typerom/.gitignore new file mode 100644 index 00000000..d069f8e3 --- /dev/null +++ b/packages/cheeket-typerom/.gitignore @@ -0,0 +1,119 @@ +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* +lerna-debug.log* + +# Diagnostic reports (https://nodejs.org/api/report.html) +report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json + +# Runtime data +pids +*.pid +*.seed +*.pid.lock + +# Directory for instrumented libs generated by jscoverage/JSCover +lib-cov + +# Coverage directory used by tools like istanbul +coverage +*.lcov + +# nyc test coverage +.nyc_output + +# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) +.grunt + +# Bower dependency directory (https://bower.io/) +bower_components + +# node-waf configuration +.lock-wscript + +# Compiled binary addons (https://nodejs.org/api/addons.html) +build/Release + +# Dependency directories +node_modules/ +jspm_packages/ + +# Snowpack dependency directory (https://snowpack.dev/) +web_modules/ + +# TypeScript cache +*.tsbuildinfo + +# Optional npm cache directory +.npm + +# Optional eslint cache +.eslintcache + +# Microbundle cache +.rpt2_cache/ +.rts2_cache_cjs/ +.rts2_cache_es/ +.rts2_cache_umd/ + +# Optional REPL history +.node_repl_history + +# Output of 'npm pack' +*.tgz + +# Yarn Integrity file +.yarn-integrity + +# dotenv environment variables file +.env +.env.test + +# parcel-bundler cache (https://parceljs.org/) +.cache +.parcel-cache + +# Next.js build output +.next +out + +# Nuxt.js build / generate output +.nuxt +dist + +# Gatsby files +.cache/ +# Comment in the public line in if your project uses Gatsby and not Next.js +# https://nextjs.org/blog/next-9-1#public-directory-support +# public + +# vuepress build output +.vuepress/dist + +# Serverless directories +.serverless/ + +# FuseBox cache +.fusebox/ + +# DynamoDB Local files +.dynamodb/ + +# TernJS port file +.tern-port + +# Stores VSCode versions used for testing VSCode extensions +.vscode-test + +# yarn v2 +.yarn/cache +.yarn/unplugged +.yarn/build-state.yml +.yarn/install-state.gz +.pnp.* + +# intelliJ +.idea/ diff --git a/packages/cheeket-typerom/.npmignore b/packages/cheeket-typerom/.npmignore new file mode 100644 index 00000000..d800b6dd --- /dev/null +++ b/packages/cheeket-typerom/.npmignore @@ -0,0 +1,3 @@ +* +!dist/* +!dist/**/* diff --git a/packages/cheeket-typerom/gulpfile.js b/packages/cheeket-typerom/gulpfile.js new file mode 100644 index 00000000..13fcaad2 --- /dev/null +++ b/packages/cheeket-typerom/gulpfile.js @@ -0,0 +1,64 @@ +const fs = require('fs'); +const path = require("path"); + +const { src, dest, series } = require('gulp'); +const sourcemaps = require('gulp-sourcemaps'); +const gulpif = require('gulp-if'); +const ts = require('gulp-typescript'); +const uglify = require('gulp-uglify'); +const merge = require('deepmerge') + +function getTsconfigName() { + if (!process.env.NODE_ENV) return 'tsconfig.json'; + + const specificConfig = `tsconfig.${process.env.NODE_ENV.toLowerCase()}.json`; + if (fs.existsSync(specificConfig)) { + return specificConfig; + } + + return 'tsconfig.json'; +} + +function getFinalTsConfig(config, currentPath) { + const { extends: parentConfigPath, ...rest } = config; + + if (parentConfigPath) { + const finalParentConfigPath = path.join(currentPath, parentConfigPath); + const parentProject = ts.createProject(finalParentConfigPath); + + const parentConfig = getFinalTsConfig(parentProject.rawConfig, parentProject.projectDirectory); + return merge(parentConfig, rest); + } + return rest; +} + +function getTsconfig(tsProject) { + return getFinalTsConfig(tsProject.rawConfig, tsProject.projectDirectory) +} + +const tsProject = ts.createProject(getTsconfigName()); +const tsconfig = getTsconfig(tsProject); + +function compile() { + const useSourcemaps = tsconfig.compilerOptions.sourceMap; + + return tsProject.src() + .pipe(gulpif(useSourcemaps, sourcemaps.init())) + .pipe(tsProject()) + .pipe(gulpif(useSourcemaps, sourcemaps.write('.'))) + .pipe(dest(tsconfig.compilerOptions.outDir)); +} + +function compression() { + const isProduction = process.env.NODE_ENV === 'production'; + + return src(path.join(tsconfig.compilerOptions.outDir, '**/*.js')) + .pipe(gulpif(isProduction, sourcemaps.init())) + .pipe(gulpif(isProduction, uglify())) + .pipe(gulpif(isProduction, sourcemaps.write('.'))) + .pipe(dest(tsconfig.compilerOptions.outDir)); +} + +const build = series(compile, compression); + +exports.default = series(build); diff --git a/packages/cheeket-typerom/jest.config.js b/packages/cheeket-typerom/jest.config.js new file mode 100644 index 00000000..faa38786 --- /dev/null +++ b/packages/cheeket-typerom/jest.config.js @@ -0,0 +1,16 @@ +module.exports = { + verbose: true, + transform: { + '^.+\\.ts$': 'ts-jest' + }, + testRegex: '\\.spec\\.ts$', + moduleFileExtensions: [ + 'ts', + 'js' + ], + globals: { + 'ts-jest': { + 'diagnostics': true + } + } +}; diff --git a/packages/cheeket-typerom/lib/connection.provider.ts b/packages/cheeket-typerom/lib/connection.provider.ts new file mode 100644 index 00000000..4b303989 --- /dev/null +++ b/packages/cheeket-typerom/lib/connection.provider.ts @@ -0,0 +1,10 @@ +import { interfaces } from "cheeket"; +import { Connection, createConnection, ConnectionOptions } from "typeorm"; + +function connectionProvider( + options: ConnectionOptions +): interfaces.Provider { + return async () => createConnection(options); +} + +export default connectionProvider; diff --git a/packages/cheeket-typerom/lib/index.spec.ts b/packages/cheeket-typerom/lib/index.spec.ts new file mode 100644 index 00000000..c5848699 --- /dev/null +++ b/packages/cheeket-typerom/lib/index.spec.ts @@ -0,0 +1 @@ +test.todo("Add test"); diff --git a/packages/cheeket-typerom/lib/index.ts b/packages/cheeket-typerom/lib/index.ts new file mode 100644 index 00000000..50755a11 --- /dev/null +++ b/packages/cheeket-typerom/lib/index.ts @@ -0,0 +1,2 @@ +export { default as connectionProvider } from "./connection.provider"; +export { default as repositoryProvider } from "./repository.provider"; diff --git a/packages/cheeket-typerom/lib/repository.provider.ts b/packages/cheeket-typerom/lib/repository.provider.ts new file mode 100644 index 00000000..cb32ef0c --- /dev/null +++ b/packages/cheeket-typerom/lib/repository.provider.ts @@ -0,0 +1,14 @@ +import { interfaces } from "cheeket"; +import { Connection, EntityTarget, Repository } from "typeorm"; + +function repositoryProvider( + connectionToken: interfaces.Token, + target: EntityTarget +): interfaces.Provider> { + return async (context) => { + const connection = await context.resolve(connectionToken); + return connection.getRepository(target); + }; +} + +export default repositoryProvider; diff --git a/packages/cheeket-typerom/package.json b/packages/cheeket-typerom/package.json new file mode 100644 index 00000000..1c9df105 --- /dev/null +++ b/packages/cheeket-typerom/package.json @@ -0,0 +1,26 @@ +{ + "name": "@cheeket/typeorm", + "version": "1.0.0", + "description": "", + "license": "ISC", + "author": "", + "main": "dist/index.js", + "types": "dist/index.d.ts", + "scripts": { + "test": "jest", + "build": "npm run clean && npm run compile", + "clean": "rm -rf ./dist", + "compile": "gulp", + "lint": "eslint .", + "lint:fix": "eslint --fix .", + "prepublishOnly": "cross-env NODE_ENV=production npm run build" + }, + "devDependencies": { + "cheeket": "^2.3.5", + "typeorm": "^0.2.31" + }, + "peerDependencies": { + "cheeket": "^2.3.x", + "typeorm": "^0.2.x" + } +} diff --git a/packages/cheeket-typerom/tsconfig.eslint.json b/packages/cheeket-typerom/tsconfig.eslint.json new file mode 100644 index 00000000..2c485ee0 --- /dev/null +++ b/packages/cheeket-typerom/tsconfig.eslint.json @@ -0,0 +1,7 @@ +{ + "extends": "./tsconfig.json", + "include": [ + "lib", + "test" + ] +} diff --git a/packages/cheeket-typerom/tsconfig.json b/packages/cheeket-typerom/tsconfig.json new file mode 100644 index 00000000..53a16bcc --- /dev/null +++ b/packages/cheeket-typerom/tsconfig.json @@ -0,0 +1,9 @@ +{ + "extends": "../../tsconfig.json", + "compilerOptions": { + "outDir": "./dist" + }, + "include": [ + "lib/**/*" + ] +} diff --git a/packages/cheeket-typerom/tsconfig.production.json b/packages/cheeket-typerom/tsconfig.production.json new file mode 100644 index 00000000..195f8d29 --- /dev/null +++ b/packages/cheeket-typerom/tsconfig.production.json @@ -0,0 +1,8 @@ +{ + "extends": "./tsconfig.json", + "exclude": [ + "*/**/*.test.ts", + "*/**/*.spec.ts", + "*/**/*.mock.ts" + ] +} diff --git a/packages/cheeket-winston/.eslintignore b/packages/cheeket-winston/.eslintignore new file mode 100644 index 00000000..8334ed30 --- /dev/null +++ b/packages/cheeket-winston/.eslintignore @@ -0,0 +1,5 @@ +script +node_modules +dist +*.js +*.json diff --git a/packages/cheeket-winston/.eslintrc.json b/packages/cheeket-winston/.eslintrc.json new file mode 100644 index 00000000..279d1b1a --- /dev/null +++ b/packages/cheeket-winston/.eslintrc.json @@ -0,0 +1,8 @@ +{ + "extends": [ + "../../.eslintrc.json" + ], + "parserOptions": { + "project": "tsconfig.eslint.json" + } +} diff --git a/packages/cheeket-winston/.gitignore b/packages/cheeket-winston/.gitignore new file mode 100644 index 00000000..d069f8e3 --- /dev/null +++ b/packages/cheeket-winston/.gitignore @@ -0,0 +1,119 @@ +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* +lerna-debug.log* + +# Diagnostic reports (https://nodejs.org/api/report.html) +report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json + +# Runtime data +pids +*.pid +*.seed +*.pid.lock + +# Directory for instrumented libs generated by jscoverage/JSCover +lib-cov + +# Coverage directory used by tools like istanbul +coverage +*.lcov + +# nyc test coverage +.nyc_output + +# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) +.grunt + +# Bower dependency directory (https://bower.io/) +bower_components + +# node-waf configuration +.lock-wscript + +# Compiled binary addons (https://nodejs.org/api/addons.html) +build/Release + +# Dependency directories +node_modules/ +jspm_packages/ + +# Snowpack dependency directory (https://snowpack.dev/) +web_modules/ + +# TypeScript cache +*.tsbuildinfo + +# Optional npm cache directory +.npm + +# Optional eslint cache +.eslintcache + +# Microbundle cache +.rpt2_cache/ +.rts2_cache_cjs/ +.rts2_cache_es/ +.rts2_cache_umd/ + +# Optional REPL history +.node_repl_history + +# Output of 'npm pack' +*.tgz + +# Yarn Integrity file +.yarn-integrity + +# dotenv environment variables file +.env +.env.test + +# parcel-bundler cache (https://parceljs.org/) +.cache +.parcel-cache + +# Next.js build output +.next +out + +# Nuxt.js build / generate output +.nuxt +dist + +# Gatsby files +.cache/ +# Comment in the public line in if your project uses Gatsby and not Next.js +# https://nextjs.org/blog/next-9-1#public-directory-support +# public + +# vuepress build output +.vuepress/dist + +# Serverless directories +.serverless/ + +# FuseBox cache +.fusebox/ + +# DynamoDB Local files +.dynamodb/ + +# TernJS port file +.tern-port + +# Stores VSCode versions used for testing VSCode extensions +.vscode-test + +# yarn v2 +.yarn/cache +.yarn/unplugged +.yarn/build-state.yml +.yarn/install-state.gz +.pnp.* + +# intelliJ +.idea/ diff --git a/packages/cheeket-winston/.npmignore b/packages/cheeket-winston/.npmignore new file mode 100644 index 00000000..d800b6dd --- /dev/null +++ b/packages/cheeket-winston/.npmignore @@ -0,0 +1,3 @@ +* +!dist/* +!dist/**/* diff --git a/packages/cheeket-winston/gulpfile.js b/packages/cheeket-winston/gulpfile.js new file mode 100644 index 00000000..13fcaad2 --- /dev/null +++ b/packages/cheeket-winston/gulpfile.js @@ -0,0 +1,64 @@ +const fs = require('fs'); +const path = require("path"); + +const { src, dest, series } = require('gulp'); +const sourcemaps = require('gulp-sourcemaps'); +const gulpif = require('gulp-if'); +const ts = require('gulp-typescript'); +const uglify = require('gulp-uglify'); +const merge = require('deepmerge') + +function getTsconfigName() { + if (!process.env.NODE_ENV) return 'tsconfig.json'; + + const specificConfig = `tsconfig.${process.env.NODE_ENV.toLowerCase()}.json`; + if (fs.existsSync(specificConfig)) { + return specificConfig; + } + + return 'tsconfig.json'; +} + +function getFinalTsConfig(config, currentPath) { + const { extends: parentConfigPath, ...rest } = config; + + if (parentConfigPath) { + const finalParentConfigPath = path.join(currentPath, parentConfigPath); + const parentProject = ts.createProject(finalParentConfigPath); + + const parentConfig = getFinalTsConfig(parentProject.rawConfig, parentProject.projectDirectory); + return merge(parentConfig, rest); + } + return rest; +} + +function getTsconfig(tsProject) { + return getFinalTsConfig(tsProject.rawConfig, tsProject.projectDirectory) +} + +const tsProject = ts.createProject(getTsconfigName()); +const tsconfig = getTsconfig(tsProject); + +function compile() { + const useSourcemaps = tsconfig.compilerOptions.sourceMap; + + return tsProject.src() + .pipe(gulpif(useSourcemaps, sourcemaps.init())) + .pipe(tsProject()) + .pipe(gulpif(useSourcemaps, sourcemaps.write('.'))) + .pipe(dest(tsconfig.compilerOptions.outDir)); +} + +function compression() { + const isProduction = process.env.NODE_ENV === 'production'; + + return src(path.join(tsconfig.compilerOptions.outDir, '**/*.js')) + .pipe(gulpif(isProduction, sourcemaps.init())) + .pipe(gulpif(isProduction, uglify())) + .pipe(gulpif(isProduction, sourcemaps.write('.'))) + .pipe(dest(tsconfig.compilerOptions.outDir)); +} + +const build = series(compile, compression); + +exports.default = series(build); diff --git a/packages/cheeket-winston/jest.config.js b/packages/cheeket-winston/jest.config.js new file mode 100644 index 00000000..faa38786 --- /dev/null +++ b/packages/cheeket-winston/jest.config.js @@ -0,0 +1,16 @@ +module.exports = { + verbose: true, + transform: { + '^.+\\.ts$': 'ts-jest' + }, + testRegex: '\\.spec\\.ts$', + moduleFileExtensions: [ + 'ts', + 'js' + ], + globals: { + 'ts-jest': { + 'diagnostics': true + } + } +}; diff --git a/packages/cheeket-winston/lib/child-logger.provider.ts b/packages/cheeket-winston/lib/child-logger.provider.ts new file mode 100644 index 00000000..35e40750 --- /dev/null +++ b/packages/cheeket-winston/lib/child-logger.provider.ts @@ -0,0 +1,14 @@ +import { interfaces } from "cheeket"; +import { Logger } from "winston"; + +function childLoggerProvider( + loggerToken: interfaces.Token, + options?: Record +): interfaces.Provider { + return async (context) => { + const logger = await context.resolve(loggerToken); + return logger.child(options as never); + }; +} + +export default childLoggerProvider; diff --git a/packages/cheeket-winston/lib/console-transport.provider.ts b/packages/cheeket-winston/lib/console-transport.provider.ts new file mode 100644 index 00000000..40902d5d --- /dev/null +++ b/packages/cheeket-winston/lib/console-transport.provider.ts @@ -0,0 +1,10 @@ +import { interfaces } from "cheeket"; +import { transport as Transport, transports } from "winston"; + +function consoleTransportProvider( + options?: transports.ConsoleTransportOptions +): interfaces.Provider { + return async () => new transports.Console(options); +} + +export default consoleTransportProvider; diff --git a/packages/cheeket-winston/lib/file-transport.provider.ts b/packages/cheeket-winston/lib/file-transport.provider.ts new file mode 100644 index 00000000..9773565e --- /dev/null +++ b/packages/cheeket-winston/lib/file-transport.provider.ts @@ -0,0 +1,10 @@ +import { interfaces } from "cheeket"; +import { transport as Transport, transports } from "winston"; + +function fileTransportProvider( + options?: transports.FileTransportOptions +): interfaces.Provider { + return async () => new transports.File(options); +} + +export default fileTransportProvider; diff --git a/packages/cheeket-winston/lib/http-transport.provider.ts b/packages/cheeket-winston/lib/http-transport.provider.ts new file mode 100644 index 00000000..aed4ef6d --- /dev/null +++ b/packages/cheeket-winston/lib/http-transport.provider.ts @@ -0,0 +1,10 @@ +import { interfaces } from "cheeket"; +import { transport as Transport, transports } from "winston"; + +function httpTransportProvider( + options?: transports.HttpTransportOptions +): interfaces.Provider { + return async () => new transports.Http(options); +} + +export default httpTransportProvider; diff --git a/packages/cheeket-winston/lib/index.ts b/packages/cheeket-winston/lib/index.ts new file mode 100644 index 00000000..25d7cb49 --- /dev/null +++ b/packages/cheeket-winston/lib/index.ts @@ -0,0 +1,6 @@ +export { default as fileTransportProvider } from "./file-transport.provider"; +export { default as consoleTransportProvider } from "./console-transport.provider"; +export { default as httpTransportProvider } from "./http-transport.provider"; + +export { default as loggerProvider } from "./logger.provider"; +export { default as childLoggerProvider } from "./child-logger.provider"; diff --git a/packages/cheeket-winston/lib/logger.provider.ts b/packages/cheeket-winston/lib/logger.provider.ts new file mode 100644 index 00000000..43ce47f7 --- /dev/null +++ b/packages/cheeket-winston/lib/logger.provider.ts @@ -0,0 +1,21 @@ +import { interfaces } from "cheeket"; +import { + createLogger, + Logger, + LoggerOptions, + transport as Transport, +} from "winston"; + +function loggerProvider( + transportToken: interfaces.Token, + options?: LoggerOptions +): interfaces.Provider { + return async (context) => { + return createLogger({ + transports: await context.resolveAll(transportToken), + ...options, + }); + }; +} + +export default loggerProvider; diff --git a/packages/cheeket-winston/package.json b/packages/cheeket-winston/package.json new file mode 100644 index 00000000..868c2eba --- /dev/null +++ b/packages/cheeket-winston/package.json @@ -0,0 +1,26 @@ +{ + "name": "@cheeket/winston", + "version": "1.0.0", + "description": "", + "license": "ISC", + "author": "", + "main": "dist/index.js", + "types": "dist/index.d.ts", + "scripts": { + "test": "jest", + "build": "npm run clean && npm run compile", + "clean": "rm -rf ./dist", + "compile": "gulp", + "lint": "eslint .", + "lint:fix": "eslint --fix .", + "prepublishOnly": "npm run build:prd" + }, + "devDependencies": { + "cheeket": "^2.3.5", + "winston": "^3.3.3" + }, + "peerDependencies": { + "cheeket": "^2.3.x", + "winston": "^3.3.x" + } +} diff --git a/packages/cheeket-winston/test/index.spec.ts b/packages/cheeket-winston/test/index.spec.ts new file mode 100644 index 00000000..c5848699 --- /dev/null +++ b/packages/cheeket-winston/test/index.spec.ts @@ -0,0 +1 @@ +test.todo("Add test"); diff --git a/packages/cheeket-winston/tsconfig.eslint.json b/packages/cheeket-winston/tsconfig.eslint.json new file mode 100644 index 00000000..2c485ee0 --- /dev/null +++ b/packages/cheeket-winston/tsconfig.eslint.json @@ -0,0 +1,7 @@ +{ + "extends": "./tsconfig.json", + "include": [ + "lib", + "test" + ] +} diff --git a/packages/cheeket-winston/tsconfig.json b/packages/cheeket-winston/tsconfig.json new file mode 100644 index 00000000..53a16bcc --- /dev/null +++ b/packages/cheeket-winston/tsconfig.json @@ -0,0 +1,9 @@ +{ + "extends": "../../tsconfig.json", + "compilerOptions": { + "outDir": "./dist" + }, + "include": [ + "lib/**/*" + ] +} diff --git a/packages/cheeket-winston/tsconfig.production.json b/packages/cheeket-winston/tsconfig.production.json new file mode 100644 index 00000000..195f8d29 --- /dev/null +++ b/packages/cheeket-winston/tsconfig.production.json @@ -0,0 +1,8 @@ +{ + "extends": "./tsconfig.json", + "exclude": [ + "*/**/*.test.ts", + "*/**/*.spec.ts", + "*/**/*.mock.ts" + ] +} diff --git a/packages/cheeket/lib/interfaces/type.ts b/packages/cheeket/lib/interfaces/type.ts new file mode 100644 index 00000000..aa2a8a19 --- /dev/null +++ b/packages/cheeket/lib/interfaces/type.ts @@ -0,0 +1,5 @@ +interface Type extends Function { + new (...args: never[]): T; +} + +export default Type; diff --git a/packages/cheeket/package.json b/packages/cheeket/package.json index aa98f8e7..741f61f5 100644 --- a/packages/cheeket/package.json +++ b/packages/cheeket/package.json @@ -2,6 +2,9 @@ "name": "cheeket", "version": "2.3.5", "description": "A very lightweight dependency injection container for TypeScript/JavaScript for constructor injection as functional.", + "homepage": "https://github.com/siyual-park/cheeket.js", + "license": "MIT", + "author": "siyual.park", "main": "dist/index.js", "types": "dist/index.d.ts", "scripts": { @@ -14,15 +17,12 @@ "lint:fix": "eslint --fix .", "prepublishOnly": "cross-env NODE_ENV=production npm run build" }, - "author": "siyual.park", - "license": "MIT", - "homepage": "https://github.com/siyual-park/cheeket.js", - "devDependencies": { - "@types/uniqid": "^5.2.0" - }, "dependencies": { "eventemitter2": "^6.4.3", "uniqid": "^5.2.0" }, + "devDependencies": { + "@types/uniqid": "^5.2.0" + }, "gitHead": "715b9e353f5449d9caf406ef61e5a74678a0a2cb" }