├── .gitignore ├── LICENSE ├── README.md ├── package-lock.json ├── package.json ├── src ├── datasource.ts ├── entity │ └── Account.ts └── index.ts └── tsconfig.json /.gitignore: -------------------------------------------------------------------------------- 1 | .idea/ 2 | .vscode/ 3 | node_modules/ 4 | build/ 5 | tmp/ 6 | temp/ 7 | .env -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | Copyright 2022 Cockroach Labs, Inc. 179 | 180 | Licensed under the Apache License, Version 2.0 (the "License"); 181 | you may not use this file except in compliance with the License. 182 | You may obtain a copy of the License at 183 | 184 | http://www.apache.org/licenses/LICENSE-2.0 185 | 186 | Unless required by applicable law or agreed to in writing, software 187 | distributed under the License is distributed on an "AS IS" BASIS, 188 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 189 | See the License for the specific language governing permissions and 190 | limitations under the License. 191 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | This repo contains an example "Hello World" TypeScript application that uses the [TypeORM](https://typeorm.io/#/) framework to connect to [CockroachDB](https://www.cockroachlabs.com/docs/stable/). 2 | 3 | To run the code: 4 | 5 | 1. Start a [demo CockroachDB cluster](https://www.cockroachlabs.com/docs/stable/cockroach-demo.html) from the command line: `cockroach demo --empty` 6 | 7 | 1. Create a `bank` database and a user and password as described in [Build a TypeScript App with CockroachDB](https://www.cockroachlabs.com/docs/stable/build-a-typescript-app-with-cockroachdb.html). 8 | 9 | 1. From the SQL client: 10 | 11 | ```sql 12 | > GRANT ALL ON DATABASE bank TO user; 13 | ``` 14 | 15 | 1. If necessary, update the `ormconfig.json` file with the correct connection values. 16 | 17 | 1. In your terminal, from the top of this project directory: 18 | 19 | ```shell 20 | $ npm i 21 | $ npm start 22 | ``` 23 | -------------------------------------------------------------------------------- /package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "hello-world-typescript-typeorm", 3 | "version": "0.0.1", 4 | "lockfileVersion": 3, 5 | "requires": true, 6 | "packages": { 7 | "": { 8 | "name": "hello-world-typescript-typeorm", 9 | "version": "0.0.1", 10 | "dependencies": { 11 | "pg": "^8.12.0", 12 | "reflect-metadata": "^0.2.2", 13 | "typeorm": "0.3.20" 14 | }, 15 | "devDependencies": { 16 | "@types/node": "^22.1.0", 17 | "ts-node": "10.9.2", 18 | "typescript": "5.5.4" 19 | } 20 | }, 21 | "node_modules/@cspotcode/source-map-support": { 22 | "version": "0.8.1", 23 | "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz", 24 | "integrity": "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==", 25 | "devOptional": true, 26 | "license": "MIT", 27 | "dependencies": { 28 | "@jridgewell/trace-mapping": "0.3.9" 29 | }, 30 | "engines": { 31 | "node": ">=12" 32 | } 33 | }, 34 | "node_modules/@isaacs/cliui": { 35 | "version": "8.0.2", 36 | "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", 37 | "integrity": "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==", 38 | "license": "ISC", 39 | "dependencies": { 40 | "string-width": "^5.1.2", 41 | "string-width-cjs": "npm:string-width@^4.2.0", 42 | "strip-ansi": "^7.0.1", 43 | "strip-ansi-cjs": "npm:strip-ansi@^6.0.1", 44 | "wrap-ansi": "^8.1.0", 45 | "wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0" 46 | }, 47 | "engines": { 48 | "node": ">=12" 49 | } 50 | }, 51 | "node_modules/@isaacs/cliui/node_modules/ansi-regex": { 52 | "version": "6.0.1", 53 | "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", 54 | "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", 55 | "license": "MIT", 56 | "engines": { 57 | "node": ">=12" 58 | }, 59 | "funding": { 60 | "url": "https://github.com/chalk/ansi-regex?sponsor=1" 61 | } 62 | }, 63 | "node_modules/@isaacs/cliui/node_modules/ansi-styles": { 64 | "version": "6.2.1", 65 | "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", 66 | "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", 67 | "license": "MIT", 68 | "engines": { 69 | "node": ">=12" 70 | }, 71 | "funding": { 72 | "url": "https://github.com/chalk/ansi-styles?sponsor=1" 73 | } 74 | }, 75 | "node_modules/@isaacs/cliui/node_modules/emoji-regex": { 76 | "version": "9.2.2", 77 | "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", 78 | "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", 79 | "license": "MIT" 80 | }, 81 | "node_modules/@isaacs/cliui/node_modules/string-width": { 82 | "version": "5.1.2", 83 | "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", 84 | "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", 85 | "license": "MIT", 86 | "dependencies": { 87 | "eastasianwidth": "^0.2.0", 88 | "emoji-regex": "^9.2.2", 89 | "strip-ansi": "^7.0.1" 90 | }, 91 | "engines": { 92 | "node": ">=12" 93 | }, 94 | "funding": { 95 | "url": "https://github.com/sponsors/sindresorhus" 96 | } 97 | }, 98 | "node_modules/@isaacs/cliui/node_modules/strip-ansi": { 99 | "version": "7.1.0", 100 | "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", 101 | "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", 102 | "license": "MIT", 103 | "dependencies": { 104 | "ansi-regex": "^6.0.1" 105 | }, 106 | "engines": { 107 | "node": ">=12" 108 | }, 109 | "funding": { 110 | "url": "https://github.com/chalk/strip-ansi?sponsor=1" 111 | } 112 | }, 113 | "node_modules/@isaacs/cliui/node_modules/wrap-ansi": { 114 | "version": "8.1.0", 115 | "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz", 116 | "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==", 117 | "license": "MIT", 118 | "dependencies": { 119 | "ansi-styles": "^6.1.0", 120 | "string-width": "^5.0.1", 121 | "strip-ansi": "^7.0.1" 122 | }, 123 | "engines": { 124 | "node": ">=12" 125 | }, 126 | "funding": { 127 | "url": "https://github.com/chalk/wrap-ansi?sponsor=1" 128 | } 129 | }, 130 | "node_modules/@jridgewell/resolve-uri": { 131 | "version": "3.1.2", 132 | "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", 133 | "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", 134 | "devOptional": true, 135 | "license": "MIT", 136 | "engines": { 137 | "node": ">=6.0.0" 138 | } 139 | }, 140 | "node_modules/@jridgewell/sourcemap-codec": { 141 | "version": "1.5.0", 142 | "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz", 143 | "integrity": "sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==", 144 | "devOptional": true, 145 | "license": "MIT" 146 | }, 147 | "node_modules/@jridgewell/trace-mapping": { 148 | "version": "0.3.9", 149 | "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz", 150 | "integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==", 151 | "devOptional": true, 152 | "license": "MIT", 153 | "dependencies": { 154 | "@jridgewell/resolve-uri": "^3.0.3", 155 | "@jridgewell/sourcemap-codec": "^1.4.10" 156 | } 157 | }, 158 | "node_modules/@pkgjs/parseargs": { 159 | "version": "0.11.0", 160 | "resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz", 161 | "integrity": "sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==", 162 | "license": "MIT", 163 | "optional": true, 164 | "engines": { 165 | "node": ">=14" 166 | } 167 | }, 168 | "node_modules/@sqltools/formatter": { 169 | "version": "1.2.5", 170 | "resolved": "https://registry.npmjs.org/@sqltools/formatter/-/formatter-1.2.5.tgz", 171 | "integrity": "sha512-Uy0+khmZqUrUGm5dmMqVlnvufZRSK0FbYzVgp0UMstm+F5+W2/jnEEQyc9vo1ZR/E5ZI/B1WjjoTqBqwJL6Krw==", 172 | "license": "MIT" 173 | }, 174 | "node_modules/@tsconfig/node10": { 175 | "version": "1.0.11", 176 | "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.11.tgz", 177 | "integrity": "sha512-DcRjDCujK/kCk/cUe8Xz8ZSpm8mS3mNNpta+jGCA6USEDfktlNvm1+IuZ9eTcDbNk41BHwpHHeW+N1lKCz4zOw==", 178 | "devOptional": true, 179 | "license": "MIT" 180 | }, 181 | "node_modules/@tsconfig/node12": { 182 | "version": "1.0.11", 183 | "resolved": "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.11.tgz", 184 | "integrity": "sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==", 185 | "devOptional": true, 186 | "license": "MIT" 187 | }, 188 | "node_modules/@tsconfig/node14": { 189 | "version": "1.0.3", 190 | "resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.3.tgz", 191 | "integrity": "sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==", 192 | "devOptional": true, 193 | "license": "MIT" 194 | }, 195 | "node_modules/@tsconfig/node16": { 196 | "version": "1.0.4", 197 | "resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.4.tgz", 198 | "integrity": "sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA==", 199 | "devOptional": true, 200 | "license": "MIT" 201 | }, 202 | "node_modules/@types/node": { 203 | "version": "22.1.0", 204 | "resolved": "https://registry.npmjs.org/@types/node/-/node-22.1.0.tgz", 205 | "integrity": "sha512-AOmuRF0R2/5j1knA3c6G3HOk523Ga+l+ZXltX8SF1+5oqcXijjfTd8fY3XRZqSihEu9XhtQnKYLmkFaoxgsJHw==", 206 | "devOptional": true, 207 | "license": "MIT", 208 | "dependencies": { 209 | "undici-types": "~6.13.0" 210 | } 211 | }, 212 | "node_modules/acorn": { 213 | "version": "8.12.1", 214 | "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.12.1.tgz", 215 | "integrity": "sha512-tcpGyI9zbizT9JbV6oYE477V6mTlXvvi0T0G3SNIYE2apm/G5huBa1+K89VGeovbg+jycCrfhl3ADxErOuO6Jg==", 216 | "devOptional": true, 217 | "license": "MIT", 218 | "bin": { 219 | "acorn": "bin/acorn" 220 | }, 221 | "engines": { 222 | "node": ">=0.4.0" 223 | } 224 | }, 225 | "node_modules/acorn-walk": { 226 | "version": "8.3.3", 227 | "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.3.tgz", 228 | "integrity": "sha512-MxXdReSRhGO7VlFe1bRG/oI7/mdLV9B9JJT0N8vZOhF7gFRR5l3M8W9G8JxmKV+JC5mGqJ0QvqfSOLsCPa4nUw==", 229 | "devOptional": true, 230 | "license": "MIT", 231 | "dependencies": { 232 | "acorn": "^8.11.0" 233 | }, 234 | "engines": { 235 | "node": ">=0.4.0" 236 | } 237 | }, 238 | "node_modules/ansi-regex": { 239 | "version": "5.0.1", 240 | "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", 241 | "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", 242 | "engines": { 243 | "node": ">=8" 244 | } 245 | }, 246 | "node_modules/ansi-styles": { 247 | "version": "4.3.0", 248 | "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", 249 | "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", 250 | "dependencies": { 251 | "color-convert": "^2.0.1" 252 | }, 253 | "engines": { 254 | "node": ">=8" 255 | }, 256 | "funding": { 257 | "url": "https://github.com/chalk/ansi-styles?sponsor=1" 258 | } 259 | }, 260 | "node_modules/any-promise": { 261 | "version": "1.3.0", 262 | "resolved": "https://registry.npmjs.org/any-promise/-/any-promise-1.3.0.tgz", 263 | "integrity": "sha1-q8av7tzqUugJzcA3au0845Y10X8=" 264 | }, 265 | "node_modules/app-root-path": { 266 | "version": "3.1.0", 267 | "resolved": "https://registry.npmjs.org/app-root-path/-/app-root-path-3.1.0.tgz", 268 | "integrity": "sha512-biN3PwB2gUtjaYy/isrU3aNWI5w+fAfvHkSvCKeQGxhmYpwKFUxudR3Yya+KqVRHBmEDYh+/lTozYCFbmzX4nA==", 269 | "license": "MIT", 270 | "engines": { 271 | "node": ">= 6.0.0" 272 | } 273 | }, 274 | "node_modules/arg": { 275 | "version": "4.1.3", 276 | "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz", 277 | "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==", 278 | "devOptional": true 279 | }, 280 | "node_modules/balanced-match": { 281 | "version": "1.0.2", 282 | "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", 283 | "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", 284 | "license": "MIT" 285 | }, 286 | "node_modules/base64-js": { 287 | "version": "1.5.1", 288 | "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", 289 | "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", 290 | "funding": [ 291 | { 292 | "type": "github", 293 | "url": "https://github.com/sponsors/feross" 294 | }, 295 | { 296 | "type": "patreon", 297 | "url": "https://www.patreon.com/feross" 298 | }, 299 | { 300 | "type": "consulting", 301 | "url": "https://feross.org/support" 302 | } 303 | ] 304 | }, 305 | "node_modules/brace-expansion": { 306 | "version": "2.0.1", 307 | "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", 308 | "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", 309 | "license": "MIT", 310 | "dependencies": { 311 | "balanced-match": "^1.0.0" 312 | } 313 | }, 314 | "node_modules/buffer": { 315 | "version": "6.0.3", 316 | "resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz", 317 | "integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==", 318 | "funding": [ 319 | { 320 | "type": "github", 321 | "url": "https://github.com/sponsors/feross" 322 | }, 323 | { 324 | "type": "patreon", 325 | "url": "https://www.patreon.com/feross" 326 | }, 327 | { 328 | "type": "consulting", 329 | "url": "https://feross.org/support" 330 | } 331 | ], 332 | "dependencies": { 333 | "base64-js": "^1.3.1", 334 | "ieee754": "^1.2.1" 335 | } 336 | }, 337 | "node_modules/chalk": { 338 | "version": "4.1.2", 339 | "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", 340 | "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", 341 | "dependencies": { 342 | "ansi-styles": "^4.1.0", 343 | "supports-color": "^7.1.0" 344 | }, 345 | "engines": { 346 | "node": ">=10" 347 | }, 348 | "funding": { 349 | "url": "https://github.com/chalk/chalk?sponsor=1" 350 | } 351 | }, 352 | "node_modules/cli-highlight": { 353 | "version": "2.1.11", 354 | "resolved": "https://registry.npmjs.org/cli-highlight/-/cli-highlight-2.1.11.tgz", 355 | "integrity": "sha512-9KDcoEVwyUXrjcJNvHD0NFc/hiwe/WPVYIleQh2O1N2Zro5gWJZ/K+3DGn8w8P/F6FxOgzyC5bxDyHIgCSPhGg==", 356 | "dependencies": { 357 | "chalk": "^4.0.0", 358 | "highlight.js": "^10.7.1", 359 | "mz": "^2.4.0", 360 | "parse5": "^5.1.1", 361 | "parse5-htmlparser2-tree-adapter": "^6.0.0", 362 | "yargs": "^16.0.0" 363 | }, 364 | "bin": { 365 | "highlight": "bin/highlight" 366 | }, 367 | "engines": { 368 | "node": ">=8.0.0", 369 | "npm": ">=5.0.0" 370 | } 371 | }, 372 | "node_modules/cli-highlight/node_modules/yargs": { 373 | "version": "16.2.0", 374 | "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", 375 | "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", 376 | "dependencies": { 377 | "cliui": "^7.0.2", 378 | "escalade": "^3.1.1", 379 | "get-caller-file": "^2.0.5", 380 | "require-directory": "^2.1.1", 381 | "string-width": "^4.2.0", 382 | "y18n": "^5.0.5", 383 | "yargs-parser": "^20.2.2" 384 | }, 385 | "engines": { 386 | "node": ">=10" 387 | } 388 | }, 389 | "node_modules/cliui": { 390 | "version": "7.0.4", 391 | "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", 392 | "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", 393 | "dependencies": { 394 | "string-width": "^4.2.0", 395 | "strip-ansi": "^6.0.0", 396 | "wrap-ansi": "^7.0.0" 397 | } 398 | }, 399 | "node_modules/color-convert": { 400 | "version": "2.0.1", 401 | "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", 402 | "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", 403 | "dependencies": { 404 | "color-name": "~1.1.4" 405 | }, 406 | "engines": { 407 | "node": ">=7.0.0" 408 | } 409 | }, 410 | "node_modules/color-name": { 411 | "version": "1.1.4", 412 | "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", 413 | "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" 414 | }, 415 | "node_modules/create-require": { 416 | "version": "1.1.1", 417 | "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz", 418 | "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==", 419 | "devOptional": true 420 | }, 421 | "node_modules/cross-spawn": { 422 | "version": "7.0.3", 423 | "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", 424 | "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", 425 | "license": "MIT", 426 | "dependencies": { 427 | "path-key": "^3.1.0", 428 | "shebang-command": "^2.0.0", 429 | "which": "^2.0.1" 430 | }, 431 | "engines": { 432 | "node": ">= 8" 433 | } 434 | }, 435 | "node_modules/dayjs": { 436 | "version": "1.11.12", 437 | "resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.12.tgz", 438 | "integrity": "sha512-Rt2g+nTbLlDWZTwwrIXjy9MeiZmSDI375FvZs72ngxx8PDC6YXOeR3q5LAuPzjZQxhiWdRKac7RKV+YyQYfYIg==", 439 | "license": "MIT" 440 | }, 441 | "node_modules/debug": { 442 | "version": "4.3.4", 443 | "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", 444 | "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", 445 | "dependencies": { 446 | "ms": "2.1.2" 447 | }, 448 | "engines": { 449 | "node": ">=6.0" 450 | }, 451 | "peerDependenciesMeta": { 452 | "supports-color": { 453 | "optional": true 454 | } 455 | } 456 | }, 457 | "node_modules/diff": { 458 | "version": "4.0.2", 459 | "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", 460 | "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", 461 | "devOptional": true, 462 | "engines": { 463 | "node": ">=0.3.1" 464 | } 465 | }, 466 | "node_modules/dotenv": { 467 | "version": "16.4.5", 468 | "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.4.5.tgz", 469 | "integrity": "sha512-ZmdL2rui+eB2YwhsWzjInR8LldtZHGDoQ1ugH85ppHKwpUHL7j7rN0Ti9NCnGiQbhaZ11FpR+7ao1dNsmduNUg==", 470 | "license": "BSD-2-Clause", 471 | "engines": { 472 | "node": ">=12" 473 | }, 474 | "funding": { 475 | "url": "https://dotenvx.com" 476 | } 477 | }, 478 | "node_modules/eastasianwidth": { 479 | "version": "0.2.0", 480 | "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", 481 | "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==", 482 | "license": "MIT" 483 | }, 484 | "node_modules/emoji-regex": { 485 | "version": "8.0.0", 486 | "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", 487 | "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" 488 | }, 489 | "node_modules/escalade": { 490 | "version": "3.1.1", 491 | "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", 492 | "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", 493 | "engines": { 494 | "node": ">=6" 495 | } 496 | }, 497 | "node_modules/foreground-child": { 498 | "version": "3.2.1", 499 | "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.2.1.tgz", 500 | "integrity": "sha512-PXUUyLqrR2XCWICfv6ukppP96sdFwWbNEnfEMt7jNsISjMsvaLNinAHNDYyvkyU+SZG2BTSbT5NjG+vZslfGTA==", 501 | "license": "ISC", 502 | "dependencies": { 503 | "cross-spawn": "^7.0.0", 504 | "signal-exit": "^4.0.1" 505 | }, 506 | "engines": { 507 | "node": ">=14" 508 | }, 509 | "funding": { 510 | "url": "https://github.com/sponsors/isaacs" 511 | } 512 | }, 513 | "node_modules/get-caller-file": { 514 | "version": "2.0.5", 515 | "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", 516 | "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", 517 | "engines": { 518 | "node": "6.* || 8.* || >= 10.*" 519 | } 520 | }, 521 | "node_modules/glob": { 522 | "version": "10.4.5", 523 | "resolved": "https://registry.npmjs.org/glob/-/glob-10.4.5.tgz", 524 | "integrity": "sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg==", 525 | "license": "ISC", 526 | "dependencies": { 527 | "foreground-child": "^3.1.0", 528 | "jackspeak": "^3.1.2", 529 | "minimatch": "^9.0.4", 530 | "minipass": "^7.1.2", 531 | "package-json-from-dist": "^1.0.0", 532 | "path-scurry": "^1.11.1" 533 | }, 534 | "bin": { 535 | "glob": "dist/esm/bin.mjs" 536 | }, 537 | "funding": { 538 | "url": "https://github.com/sponsors/isaacs" 539 | } 540 | }, 541 | "node_modules/has-flag": { 542 | "version": "4.0.0", 543 | "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", 544 | "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", 545 | "engines": { 546 | "node": ">=8" 547 | } 548 | }, 549 | "node_modules/highlight.js": { 550 | "version": "10.7.3", 551 | "resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-10.7.3.tgz", 552 | "integrity": "sha512-tzcUFauisWKNHaRkN4Wjl/ZA07gENAjFl3J/c480dprkGTg5EQstgaNFqBfUqCq54kZRIEcreTsAgF/m2quD7A==", 553 | "engines": { 554 | "node": "*" 555 | } 556 | }, 557 | "node_modules/ieee754": { 558 | "version": "1.2.1", 559 | "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", 560 | "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", 561 | "funding": [ 562 | { 563 | "type": "github", 564 | "url": "https://github.com/sponsors/feross" 565 | }, 566 | { 567 | "type": "patreon", 568 | "url": "https://www.patreon.com/feross" 569 | }, 570 | { 571 | "type": "consulting", 572 | "url": "https://feross.org/support" 573 | } 574 | ] 575 | }, 576 | "node_modules/inherits": { 577 | "version": "2.0.4", 578 | "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", 579 | "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" 580 | }, 581 | "node_modules/is-fullwidth-code-point": { 582 | "version": "3.0.0", 583 | "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", 584 | "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", 585 | "engines": { 586 | "node": ">=8" 587 | } 588 | }, 589 | "node_modules/isexe": { 590 | "version": "2.0.0", 591 | "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", 592 | "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", 593 | "license": "ISC" 594 | }, 595 | "node_modules/jackspeak": { 596 | "version": "3.4.3", 597 | "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-3.4.3.tgz", 598 | "integrity": "sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==", 599 | "license": "BlueOak-1.0.0", 600 | "dependencies": { 601 | "@isaacs/cliui": "^8.0.2" 602 | }, 603 | "funding": { 604 | "url": "https://github.com/sponsors/isaacs" 605 | }, 606 | "optionalDependencies": { 607 | "@pkgjs/parseargs": "^0.11.0" 608 | } 609 | }, 610 | "node_modules/lru-cache": { 611 | "version": "10.4.3", 612 | "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz", 613 | "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==", 614 | "license": "ISC" 615 | }, 616 | "node_modules/make-error": { 617 | "version": "1.3.6", 618 | "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", 619 | "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==", 620 | "devOptional": true 621 | }, 622 | "node_modules/minimatch": { 623 | "version": "9.0.5", 624 | "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", 625 | "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", 626 | "license": "ISC", 627 | "dependencies": { 628 | "brace-expansion": "^2.0.1" 629 | }, 630 | "engines": { 631 | "node": ">=16 || 14 >=14.17" 632 | }, 633 | "funding": { 634 | "url": "https://github.com/sponsors/isaacs" 635 | } 636 | }, 637 | "node_modules/minipass": { 638 | "version": "7.1.2", 639 | "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz", 640 | "integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==", 641 | "license": "ISC", 642 | "engines": { 643 | "node": ">=16 || 14 >=14.17" 644 | } 645 | }, 646 | "node_modules/mkdirp": { 647 | "version": "2.1.6", 648 | "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-2.1.6.tgz", 649 | "integrity": "sha512-+hEnITedc8LAtIP9u3HJDFIdcLV2vXP33sqLLIzkv1Db1zO/1OxbvYf0Y1OC/S/Qo5dxHXepofhmxL02PsKe+A==", 650 | "license": "MIT", 651 | "bin": { 652 | "mkdirp": "dist/cjs/src/bin.js" 653 | }, 654 | "engines": { 655 | "node": ">=10" 656 | }, 657 | "funding": { 658 | "url": "https://github.com/sponsors/isaacs" 659 | } 660 | }, 661 | "node_modules/ms": { 662 | "version": "2.1.2", 663 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", 664 | "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" 665 | }, 666 | "node_modules/mz": { 667 | "version": "2.7.0", 668 | "resolved": "https://registry.npmjs.org/mz/-/mz-2.7.0.tgz", 669 | "integrity": "sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q==", 670 | "dependencies": { 671 | "any-promise": "^1.0.0", 672 | "object-assign": "^4.0.1", 673 | "thenify-all": "^1.0.0" 674 | } 675 | }, 676 | "node_modules/object-assign": { 677 | "version": "4.1.1", 678 | "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", 679 | "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", 680 | "engines": { 681 | "node": ">=0.10.0" 682 | } 683 | }, 684 | "node_modules/package-json-from-dist": { 685 | "version": "1.0.0", 686 | "resolved": "https://registry.npmjs.org/package-json-from-dist/-/package-json-from-dist-1.0.0.tgz", 687 | "integrity": "sha512-dATvCeZN/8wQsGywez1mzHtTlP22H8OEfPrVMLNr4/eGa+ijtLn/6M5f0dY8UKNrC2O9UCU6SSoG3qRKnt7STw==", 688 | "license": "BlueOak-1.0.0" 689 | }, 690 | "node_modules/parse5": { 691 | "version": "5.1.1", 692 | "resolved": "https://registry.npmjs.org/parse5/-/parse5-5.1.1.tgz", 693 | "integrity": "sha512-ugq4DFI0Ptb+WWjAdOK16+u/nHfiIrcE+sh8kZMaM0WllQKLI9rOUq6c2b7cwPkXdzfQESqvoqK6ug7U/Yyzug==" 694 | }, 695 | "node_modules/parse5-htmlparser2-tree-adapter": { 696 | "version": "6.0.1", 697 | "resolved": "https://registry.npmjs.org/parse5-htmlparser2-tree-adapter/-/parse5-htmlparser2-tree-adapter-6.0.1.tgz", 698 | "integrity": "sha512-qPuWvbLgvDGilKc5BoicRovlT4MtYT6JfJyBOMDsKoiT+GiuP5qyrPCnR9HcPECIJJmZh5jRndyNThnhhb/vlA==", 699 | "dependencies": { 700 | "parse5": "^6.0.1" 701 | } 702 | }, 703 | "node_modules/parse5-htmlparser2-tree-adapter/node_modules/parse5": { 704 | "version": "6.0.1", 705 | "resolved": "https://registry.npmjs.org/parse5/-/parse5-6.0.1.tgz", 706 | "integrity": "sha512-Ofn/CTFzRGTTxwpNEs9PP93gXShHcTq255nzRYSKe8AkVpZY7e1fpmTfOyoIvjP5HG7Z2ZM7VS9PPhQGW2pOpw==" 707 | }, 708 | "node_modules/path-key": { 709 | "version": "3.1.1", 710 | "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", 711 | "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", 712 | "license": "MIT", 713 | "engines": { 714 | "node": ">=8" 715 | } 716 | }, 717 | "node_modules/path-scurry": { 718 | "version": "1.11.1", 719 | "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.11.1.tgz", 720 | "integrity": "sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==", 721 | "license": "BlueOak-1.0.0", 722 | "dependencies": { 723 | "lru-cache": "^10.2.0", 724 | "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" 725 | }, 726 | "engines": { 727 | "node": ">=16 || 14 >=14.18" 728 | }, 729 | "funding": { 730 | "url": "https://github.com/sponsors/isaacs" 731 | } 732 | }, 733 | "node_modules/pg": { 734 | "version": "8.12.0", 735 | "resolved": "https://registry.npmjs.org/pg/-/pg-8.12.0.tgz", 736 | "integrity": "sha512-A+LHUSnwnxrnL/tZ+OLfqR1SxLN3c/pgDztZ47Rpbsd4jUytsTtwQo/TLPRzPJMp/1pbhYVhH9cuSZLAajNfjQ==", 737 | "license": "MIT", 738 | "dependencies": { 739 | "pg-connection-string": "^2.6.4", 740 | "pg-pool": "^3.6.2", 741 | "pg-protocol": "^1.6.1", 742 | "pg-types": "^2.1.0", 743 | "pgpass": "1.x" 744 | }, 745 | "engines": { 746 | "node": ">= 8.0.0" 747 | }, 748 | "optionalDependencies": { 749 | "pg-cloudflare": "^1.1.1" 750 | }, 751 | "peerDependencies": { 752 | "pg-native": ">=3.0.1" 753 | }, 754 | "peerDependenciesMeta": { 755 | "pg-native": { 756 | "optional": true 757 | } 758 | } 759 | }, 760 | "node_modules/pg-cloudflare": { 761 | "version": "1.1.1", 762 | "resolved": "https://registry.npmjs.org/pg-cloudflare/-/pg-cloudflare-1.1.1.tgz", 763 | "integrity": "sha512-xWPagP/4B6BgFO+EKz3JONXv3YDgvkbVrGw2mTo3D6tVDQRh1e7cqVGvyR3BE+eQgAvx1XhW/iEASj4/jCWl3Q==", 764 | "license": "MIT", 765 | "optional": true 766 | }, 767 | "node_modules/pg-connection-string": { 768 | "version": "2.6.4", 769 | "resolved": "https://registry.npmjs.org/pg-connection-string/-/pg-connection-string-2.6.4.tgz", 770 | "integrity": "sha512-v+Z7W/0EO707aNMaAEfiGnGL9sxxumwLl2fJvCQtMn9Fxsg+lPpPkdcyBSv/KFgpGdYkMfn+EI1Or2EHjpgLCA==", 771 | "license": "MIT" 772 | }, 773 | "node_modules/pg-int8": { 774 | "version": "1.0.1", 775 | "resolved": "https://registry.npmjs.org/pg-int8/-/pg-int8-1.0.1.tgz", 776 | "integrity": "sha512-WCtabS6t3c8SkpDBUlb1kjOs7l66xsGdKpIPZsg4wR+B3+u9UAum2odSsF9tnvxg80h4ZxLWMy4pRjOsFIqQpw==", 777 | "engines": { 778 | "node": ">=4.0.0" 779 | } 780 | }, 781 | "node_modules/pg-pool": { 782 | "version": "3.6.2", 783 | "resolved": "https://registry.npmjs.org/pg-pool/-/pg-pool-3.6.2.tgz", 784 | "integrity": "sha512-Htjbg8BlwXqSBQ9V8Vjtc+vzf/6fVUuak/3/XXKA9oxZprwW3IMDQTGHP+KDmVL7rtd+R1QjbnCFPuTHm3G4hg==", 785 | "license": "MIT", 786 | "peerDependencies": { 787 | "pg": ">=8.0" 788 | } 789 | }, 790 | "node_modules/pg-protocol": { 791 | "version": "1.6.1", 792 | "resolved": "https://registry.npmjs.org/pg-protocol/-/pg-protocol-1.6.1.tgz", 793 | "integrity": "sha512-jPIlvgoD63hrEuihvIg+tJhoGjUsLPn6poJY9N5CnlPd91c2T18T/9zBtLxZSb1EhYxBRoZJtzScCaWlYLtktg==", 794 | "license": "MIT" 795 | }, 796 | "node_modules/pg-types": { 797 | "version": "2.2.0", 798 | "resolved": "https://registry.npmjs.org/pg-types/-/pg-types-2.2.0.tgz", 799 | "integrity": "sha512-qTAAlrEsl8s4OiEQY69wDvcMIdQN6wdz5ojQiOy6YRMuynxenON0O5oCpJI6lshc6scgAY8qvJ2On/p+CXY0GA==", 800 | "dependencies": { 801 | "pg-int8": "1.0.1", 802 | "postgres-array": "~2.0.0", 803 | "postgres-bytea": "~1.0.0", 804 | "postgres-date": "~1.0.4", 805 | "postgres-interval": "^1.1.0" 806 | }, 807 | "engines": { 808 | "node": ">=4" 809 | } 810 | }, 811 | "node_modules/pgpass": { 812 | "version": "1.0.5", 813 | "resolved": "https://registry.npmjs.org/pgpass/-/pgpass-1.0.5.tgz", 814 | "integrity": "sha512-FdW9r/jQZhSeohs1Z3sI1yxFQNFvMcnmfuj4WBMUTxOrAyLMaTcE1aAMBiTlbMNaXvBCQuVi0R7hd8udDSP7ug==", 815 | "dependencies": { 816 | "split2": "^4.1.0" 817 | } 818 | }, 819 | "node_modules/postgres-array": { 820 | "version": "2.0.0", 821 | "resolved": "https://registry.npmjs.org/postgres-array/-/postgres-array-2.0.0.tgz", 822 | "integrity": "sha512-VpZrUqU5A69eQyW2c5CA1jtLecCsN2U/bD6VilrFDWq5+5UIEVO7nazS3TEcHf1zuPYO/sqGvUvW62g86RXZuA==", 823 | "engines": { 824 | "node": ">=4" 825 | } 826 | }, 827 | "node_modules/postgres-bytea": { 828 | "version": "1.0.0", 829 | "resolved": "https://registry.npmjs.org/postgres-bytea/-/postgres-bytea-1.0.0.tgz", 830 | "integrity": "sha1-AntTPAqokOJtFy1Hz5zOzFIazTU=", 831 | "engines": { 832 | "node": ">=0.10.0" 833 | } 834 | }, 835 | "node_modules/postgres-date": { 836 | "version": "1.0.7", 837 | "resolved": "https://registry.npmjs.org/postgres-date/-/postgres-date-1.0.7.tgz", 838 | "integrity": "sha512-suDmjLVQg78nMK2UZ454hAG+OAW+HQPZ6n++TNDUX+L0+uUlLywnoxJKDou51Zm+zTCjrCl0Nq6J9C5hP9vK/Q==", 839 | "engines": { 840 | "node": ">=0.10.0" 841 | } 842 | }, 843 | "node_modules/postgres-interval": { 844 | "version": "1.2.0", 845 | "resolved": "https://registry.npmjs.org/postgres-interval/-/postgres-interval-1.2.0.tgz", 846 | "integrity": "sha512-9ZhXKM/rw350N1ovuWHbGxnGh/SNJ4cnxHiM0rxE4VN41wsg8P8zWn9hv/buK00RP4WvlOyr/RBDiptyxVbkZQ==", 847 | "dependencies": { 848 | "xtend": "^4.0.0" 849 | }, 850 | "engines": { 851 | "node": ">=0.10.0" 852 | } 853 | }, 854 | "node_modules/reflect-metadata": { 855 | "version": "0.2.2", 856 | "resolved": "https://registry.npmjs.org/reflect-metadata/-/reflect-metadata-0.2.2.tgz", 857 | "integrity": "sha512-urBwgfrvVP/eAyXx4hluJivBKzuEbSQs9rKWCrCkbSxNv8mxPcUZKeuoF3Uy4mJl3Lwprp6yy5/39VWigZ4K6Q==", 858 | "license": "Apache-2.0" 859 | }, 860 | "node_modules/require-directory": { 861 | "version": "2.1.1", 862 | "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", 863 | "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", 864 | "engines": { 865 | "node": ">=0.10.0" 866 | } 867 | }, 868 | "node_modules/safe-buffer": { 869 | "version": "5.2.1", 870 | "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", 871 | "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", 872 | "funding": [ 873 | { 874 | "type": "github", 875 | "url": "https://github.com/sponsors/feross" 876 | }, 877 | { 878 | "type": "patreon", 879 | "url": "https://www.patreon.com/feross" 880 | }, 881 | { 882 | "type": "consulting", 883 | "url": "https://feross.org/support" 884 | } 885 | ] 886 | }, 887 | "node_modules/sha.js": { 888 | "version": "2.4.11", 889 | "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz", 890 | "integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==", 891 | "dependencies": { 892 | "inherits": "^2.0.1", 893 | "safe-buffer": "^5.0.1" 894 | }, 895 | "bin": { 896 | "sha.js": "bin.js" 897 | } 898 | }, 899 | "node_modules/shebang-command": { 900 | "version": "2.0.0", 901 | "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", 902 | "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", 903 | "license": "MIT", 904 | "dependencies": { 905 | "shebang-regex": "^3.0.0" 906 | }, 907 | "engines": { 908 | "node": ">=8" 909 | } 910 | }, 911 | "node_modules/shebang-regex": { 912 | "version": "3.0.0", 913 | "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", 914 | "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", 915 | "license": "MIT", 916 | "engines": { 917 | "node": ">=8" 918 | } 919 | }, 920 | "node_modules/signal-exit": { 921 | "version": "4.1.0", 922 | "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", 923 | "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", 924 | "license": "ISC", 925 | "engines": { 926 | "node": ">=14" 927 | }, 928 | "funding": { 929 | "url": "https://github.com/sponsors/isaacs" 930 | } 931 | }, 932 | "node_modules/split2": { 933 | "version": "4.1.0", 934 | "resolved": "https://registry.npmjs.org/split2/-/split2-4.1.0.tgz", 935 | "integrity": "sha512-VBiJxFkxiXRlUIeyMQi8s4hgvKCSjtknJv/LVYbrgALPwf5zSKmEwV9Lst25AkvMDnvxODugjdl6KZgwKM1WYQ==", 936 | "engines": { 937 | "node": ">= 10.x" 938 | } 939 | }, 940 | "node_modules/string-width": { 941 | "version": "4.2.3", 942 | "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", 943 | "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", 944 | "dependencies": { 945 | "emoji-regex": "^8.0.0", 946 | "is-fullwidth-code-point": "^3.0.0", 947 | "strip-ansi": "^6.0.1" 948 | }, 949 | "engines": { 950 | "node": ">=8" 951 | } 952 | }, 953 | "node_modules/string-width-cjs": { 954 | "name": "string-width", 955 | "version": "4.2.3", 956 | "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", 957 | "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", 958 | "license": "MIT", 959 | "dependencies": { 960 | "emoji-regex": "^8.0.0", 961 | "is-fullwidth-code-point": "^3.0.0", 962 | "strip-ansi": "^6.0.1" 963 | }, 964 | "engines": { 965 | "node": ">=8" 966 | } 967 | }, 968 | "node_modules/strip-ansi": { 969 | "version": "6.0.1", 970 | "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", 971 | "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", 972 | "dependencies": { 973 | "ansi-regex": "^5.0.1" 974 | }, 975 | "engines": { 976 | "node": ">=8" 977 | } 978 | }, 979 | "node_modules/strip-ansi-cjs": { 980 | "name": "strip-ansi", 981 | "version": "6.0.1", 982 | "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", 983 | "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", 984 | "license": "MIT", 985 | "dependencies": { 986 | "ansi-regex": "^5.0.1" 987 | }, 988 | "engines": { 989 | "node": ">=8" 990 | } 991 | }, 992 | "node_modules/supports-color": { 993 | "version": "7.2.0", 994 | "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", 995 | "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", 996 | "dependencies": { 997 | "has-flag": "^4.0.0" 998 | }, 999 | "engines": { 1000 | "node": ">=8" 1001 | } 1002 | }, 1003 | "node_modules/thenify": { 1004 | "version": "3.3.1", 1005 | "resolved": "https://registry.npmjs.org/thenify/-/thenify-3.3.1.tgz", 1006 | "integrity": "sha512-RVZSIV5IG10Hk3enotrhvz0T9em6cyHBLkH/YAZuKqd8hRkKhSfCGIcP2KUY0EPxndzANBmNllzWPwak+bheSw==", 1007 | "dependencies": { 1008 | "any-promise": "^1.0.0" 1009 | } 1010 | }, 1011 | "node_modules/thenify-all": { 1012 | "version": "1.6.0", 1013 | "resolved": "https://registry.npmjs.org/thenify-all/-/thenify-all-1.6.0.tgz", 1014 | "integrity": "sha1-GhkY1ALY/D+Y+/I02wvMjMEOlyY=", 1015 | "dependencies": { 1016 | "thenify": ">= 3.1.0 < 4" 1017 | }, 1018 | "engines": { 1019 | "node": ">=0.8" 1020 | } 1021 | }, 1022 | "node_modules/ts-node": { 1023 | "version": "10.9.2", 1024 | "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.2.tgz", 1025 | "integrity": "sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ==", 1026 | "devOptional": true, 1027 | "license": "MIT", 1028 | "dependencies": { 1029 | "@cspotcode/source-map-support": "^0.8.0", 1030 | "@tsconfig/node10": "^1.0.7", 1031 | "@tsconfig/node12": "^1.0.7", 1032 | "@tsconfig/node14": "^1.0.0", 1033 | "@tsconfig/node16": "^1.0.2", 1034 | "acorn": "^8.4.1", 1035 | "acorn-walk": "^8.1.1", 1036 | "arg": "^4.1.0", 1037 | "create-require": "^1.1.0", 1038 | "diff": "^4.0.1", 1039 | "make-error": "^1.1.1", 1040 | "v8-compile-cache-lib": "^3.0.1", 1041 | "yn": "3.1.1" 1042 | }, 1043 | "bin": { 1044 | "ts-node": "dist/bin.js", 1045 | "ts-node-cwd": "dist/bin-cwd.js", 1046 | "ts-node-esm": "dist/bin-esm.js", 1047 | "ts-node-script": "dist/bin-script.js", 1048 | "ts-node-transpile-only": "dist/bin-transpile.js", 1049 | "ts-script": "dist/bin-script-deprecated.js" 1050 | }, 1051 | "peerDependencies": { 1052 | "@swc/core": ">=1.2.50", 1053 | "@swc/wasm": ">=1.2.50", 1054 | "@types/node": "*", 1055 | "typescript": ">=2.7" 1056 | }, 1057 | "peerDependenciesMeta": { 1058 | "@swc/core": { 1059 | "optional": true 1060 | }, 1061 | "@swc/wasm": { 1062 | "optional": true 1063 | } 1064 | } 1065 | }, 1066 | "node_modules/tslib": { 1067 | "version": "2.6.3", 1068 | "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.3.tgz", 1069 | "integrity": "sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==", 1070 | "license": "0BSD" 1071 | }, 1072 | "node_modules/typeorm": { 1073 | "version": "0.3.20", 1074 | "resolved": "https://registry.npmjs.org/typeorm/-/typeorm-0.3.20.tgz", 1075 | "integrity": "sha512-sJ0T08dV5eoZroaq9uPKBoNcGslHBR4E4y+EBHs//SiGbblGe7IeduP/IH4ddCcj0qp3PHwDwGnuvqEAnKlq/Q==", 1076 | "license": "MIT", 1077 | "dependencies": { 1078 | "@sqltools/formatter": "^1.2.5", 1079 | "app-root-path": "^3.1.0", 1080 | "buffer": "^6.0.3", 1081 | "chalk": "^4.1.2", 1082 | "cli-highlight": "^2.1.11", 1083 | "dayjs": "^1.11.9", 1084 | "debug": "^4.3.4", 1085 | "dotenv": "^16.0.3", 1086 | "glob": "^10.3.10", 1087 | "mkdirp": "^2.1.3", 1088 | "reflect-metadata": "^0.2.1", 1089 | "sha.js": "^2.4.11", 1090 | "tslib": "^2.5.0", 1091 | "uuid": "^9.0.0", 1092 | "yargs": "^17.6.2" 1093 | }, 1094 | "bin": { 1095 | "typeorm": "cli.js", 1096 | "typeorm-ts-node-commonjs": "cli-ts-node-commonjs.js", 1097 | "typeorm-ts-node-esm": "cli-ts-node-esm.js" 1098 | }, 1099 | "engines": { 1100 | "node": ">=16.13.0" 1101 | }, 1102 | "funding": { 1103 | "url": "https://opencollective.com/typeorm" 1104 | }, 1105 | "peerDependencies": { 1106 | "@google-cloud/spanner": "^5.18.0", 1107 | "@sap/hana-client": "^2.12.25", 1108 | "better-sqlite3": "^7.1.2 || ^8.0.0 || ^9.0.0", 1109 | "hdb-pool": "^0.1.6", 1110 | "ioredis": "^5.0.4", 1111 | "mongodb": "^5.8.0", 1112 | "mssql": "^9.1.1 || ^10.0.1", 1113 | "mysql2": "^2.2.5 || ^3.0.1", 1114 | "oracledb": "^6.3.0", 1115 | "pg": "^8.5.1", 1116 | "pg-native": "^3.0.0", 1117 | "pg-query-stream": "^4.0.0", 1118 | "redis": "^3.1.1 || ^4.0.0", 1119 | "sql.js": "^1.4.0", 1120 | "sqlite3": "^5.0.3", 1121 | "ts-node": "^10.7.0", 1122 | "typeorm-aurora-data-api-driver": "^2.0.0" 1123 | }, 1124 | "peerDependenciesMeta": { 1125 | "@google-cloud/spanner": { 1126 | "optional": true 1127 | }, 1128 | "@sap/hana-client": { 1129 | "optional": true 1130 | }, 1131 | "better-sqlite3": { 1132 | "optional": true 1133 | }, 1134 | "hdb-pool": { 1135 | "optional": true 1136 | }, 1137 | "ioredis": { 1138 | "optional": true 1139 | }, 1140 | "mongodb": { 1141 | "optional": true 1142 | }, 1143 | "mssql": { 1144 | "optional": true 1145 | }, 1146 | "mysql2": { 1147 | "optional": true 1148 | }, 1149 | "oracledb": { 1150 | "optional": true 1151 | }, 1152 | "pg": { 1153 | "optional": true 1154 | }, 1155 | "pg-native": { 1156 | "optional": true 1157 | }, 1158 | "pg-query-stream": { 1159 | "optional": true 1160 | }, 1161 | "redis": { 1162 | "optional": true 1163 | }, 1164 | "sql.js": { 1165 | "optional": true 1166 | }, 1167 | "sqlite3": { 1168 | "optional": true 1169 | }, 1170 | "ts-node": { 1171 | "optional": true 1172 | }, 1173 | "typeorm-aurora-data-api-driver": { 1174 | "optional": true 1175 | } 1176 | } 1177 | }, 1178 | "node_modules/typescript": { 1179 | "version": "5.5.4", 1180 | "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.5.4.tgz", 1181 | "integrity": "sha512-Mtq29sKDAEYP7aljRgtPOpTvOfbwRWlS6dPRzwjdE+C0R4brX/GUyhHSecbHMFLNBLcJIPt9nl9yG5TZ1weH+Q==", 1182 | "devOptional": true, 1183 | "license": "Apache-2.0", 1184 | "bin": { 1185 | "tsc": "bin/tsc", 1186 | "tsserver": "bin/tsserver" 1187 | }, 1188 | "engines": { 1189 | "node": ">=14.17" 1190 | } 1191 | }, 1192 | "node_modules/undici-types": { 1193 | "version": "6.13.0", 1194 | "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.13.0.tgz", 1195 | "integrity": "sha512-xtFJHudx8S2DSoujjMd1WeWvn7KKWFRESZTMeL1RptAYERu29D6jphMjjY+vn96jvN3kVPDNxU/E13VTaXj6jg==", 1196 | "devOptional": true, 1197 | "license": "MIT" 1198 | }, 1199 | "node_modules/uuid": { 1200 | "version": "9.0.1", 1201 | "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz", 1202 | "integrity": "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==", 1203 | "funding": [ 1204 | "https://github.com/sponsors/broofa", 1205 | "https://github.com/sponsors/ctavan" 1206 | ], 1207 | "license": "MIT", 1208 | "bin": { 1209 | "uuid": "dist/bin/uuid" 1210 | } 1211 | }, 1212 | "node_modules/v8-compile-cache-lib": { 1213 | "version": "3.0.1", 1214 | "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz", 1215 | "integrity": "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==", 1216 | "devOptional": true, 1217 | "license": "MIT" 1218 | }, 1219 | "node_modules/which": { 1220 | "version": "2.0.2", 1221 | "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", 1222 | "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", 1223 | "license": "ISC", 1224 | "dependencies": { 1225 | "isexe": "^2.0.0" 1226 | }, 1227 | "bin": { 1228 | "node-which": "bin/node-which" 1229 | }, 1230 | "engines": { 1231 | "node": ">= 8" 1232 | } 1233 | }, 1234 | "node_modules/wrap-ansi": { 1235 | "version": "7.0.0", 1236 | "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", 1237 | "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", 1238 | "dependencies": { 1239 | "ansi-styles": "^4.0.0", 1240 | "string-width": "^4.1.0", 1241 | "strip-ansi": "^6.0.0" 1242 | }, 1243 | "engines": { 1244 | "node": ">=10" 1245 | }, 1246 | "funding": { 1247 | "url": "https://github.com/chalk/wrap-ansi?sponsor=1" 1248 | } 1249 | }, 1250 | "node_modules/wrap-ansi-cjs": { 1251 | "name": "wrap-ansi", 1252 | "version": "7.0.0", 1253 | "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", 1254 | "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", 1255 | "license": "MIT", 1256 | "dependencies": { 1257 | "ansi-styles": "^4.0.0", 1258 | "string-width": "^4.1.0", 1259 | "strip-ansi": "^6.0.0" 1260 | }, 1261 | "engines": { 1262 | "node": ">=10" 1263 | }, 1264 | "funding": { 1265 | "url": "https://github.com/chalk/wrap-ansi?sponsor=1" 1266 | } 1267 | }, 1268 | "node_modules/xtend": { 1269 | "version": "4.0.2", 1270 | "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", 1271 | "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==", 1272 | "engines": { 1273 | "node": ">=0.4" 1274 | } 1275 | }, 1276 | "node_modules/y18n": { 1277 | "version": "5.0.8", 1278 | "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", 1279 | "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", 1280 | "engines": { 1281 | "node": ">=10" 1282 | } 1283 | }, 1284 | "node_modules/yargs": { 1285 | "version": "17.7.2", 1286 | "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", 1287 | "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", 1288 | "license": "MIT", 1289 | "dependencies": { 1290 | "cliui": "^8.0.1", 1291 | "escalade": "^3.1.1", 1292 | "get-caller-file": "^2.0.5", 1293 | "require-directory": "^2.1.1", 1294 | "string-width": "^4.2.3", 1295 | "y18n": "^5.0.5", 1296 | "yargs-parser": "^21.1.1" 1297 | }, 1298 | "engines": { 1299 | "node": ">=12" 1300 | } 1301 | }, 1302 | "node_modules/yargs-parser": { 1303 | "version": "20.2.9", 1304 | "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", 1305 | "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==", 1306 | "engines": { 1307 | "node": ">=10" 1308 | } 1309 | }, 1310 | "node_modules/yargs/node_modules/cliui": { 1311 | "version": "8.0.1", 1312 | "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", 1313 | "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", 1314 | "license": "ISC", 1315 | "dependencies": { 1316 | "string-width": "^4.2.0", 1317 | "strip-ansi": "^6.0.1", 1318 | "wrap-ansi": "^7.0.0" 1319 | }, 1320 | "engines": { 1321 | "node": ">=12" 1322 | } 1323 | }, 1324 | "node_modules/yargs/node_modules/yargs-parser": { 1325 | "version": "21.1.1", 1326 | "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", 1327 | "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", 1328 | "license": "ISC", 1329 | "engines": { 1330 | "node": ">=12" 1331 | } 1332 | }, 1333 | "node_modules/yn": { 1334 | "version": "3.1.1", 1335 | "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", 1336 | "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==", 1337 | "devOptional": true, 1338 | "engines": { 1339 | "node": ">=6" 1340 | } 1341 | } 1342 | } 1343 | } 1344 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "hello-world-typescript-typeorm", 3 | "version": "0.0.1", 4 | "description": "Awesome project developed with TypeORM.", 5 | "devDependencies": { 6 | "@types/node": "^22.1.0", 7 | "ts-node": "10.9.2", 8 | "typescript": "5.5.4" 9 | }, 10 | "dependencies": { 11 | "pg": "^8.12.0", 12 | "reflect-metadata": "^0.2.2", 13 | "typeorm": "0.3.20" 14 | }, 15 | "scripts": { 16 | "start": "ts-node src/index.ts" 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/datasource.ts: -------------------------------------------------------------------------------- 1 | import "reflect-metadata" 2 | import { DataSource } from "typeorm" 3 | 4 | export const AppDataSource = new DataSource({ 5 | type: "cockroachdb", 6 | url: process.env.DATABASE_URL, 7 | /*ssl: { rejectUnauthorized: false }, // For insecure connections only */ 8 | ssl: true, 9 | extra: { 10 | options: "--cluster=", 11 | application_name: "docs_simplecrud_typeorm" 12 | }, 13 | synchronize: true, 14 | logging: false, 15 | timeTravelQueries: false, 16 | entities: ["src/entity/**/*.ts"], 17 | migrations: ["src/migration/**/*.ts"], 18 | subscribers: ["src/subscriber/**/*.ts"], 19 | }) -------------------------------------------------------------------------------- /src/entity/Account.ts: -------------------------------------------------------------------------------- 1 | import { Entity, PrimaryGeneratedColumn, Column } from "typeorm"; 2 | 3 | @Entity() 4 | export class Account { 5 | @PrimaryGeneratedColumn("uuid") 6 | id: string; 7 | 8 | @Column() 9 | balance: number; 10 | } 11 | -------------------------------------------------------------------------------- /src/index.ts: -------------------------------------------------------------------------------- 1 | import "reflect-metadata"; 2 | import { Account } from "./entity/Account"; 3 | import { AppDataSource } from "./datasource"; 4 | 5 | async function insertAccount(repository, balance: number) { 6 | console.log("Inserting a new account into the database..."); 7 | 8 | let account = new Account(); 9 | account.balance = balance; 10 | 11 | await repository.save(account); 12 | 13 | console.log("Saved a new account."); 14 | return account.id; 15 | } 16 | 17 | async function printBalance(repository, id: string) { 18 | console.log("Printing balances from account " + id + "."); 19 | 20 | const account = await repository.find({where: {id: id}}); 21 | 22 | console.log(account); 23 | } 24 | 25 | async function transferFunds( 26 | repository, 27 | amount: number, 28 | from: string, 29 | to: string 30 | ) { 31 | console.log(`Transferring ${amount} from account ${from} to account ${to}.`); 32 | 33 | let accountFrom = await repository.find({where: {id: from}}); 34 | accountFrom.balance = accountFrom.balance - amount; 35 | await repository.save(accountFrom); 36 | 37 | let accountTo = await repository.find({where: {id: to}}); 38 | accountTo.balance = accountTo.balance + amount; 39 | await repository.save(accountTo); 40 | 41 | console.log("Transfer complete."); 42 | } 43 | 44 | AppDataSource.initialize() 45 | .then(async () => { 46 | const accountRepository = await AppDataSource.getRepository(Account); 47 | 48 | const accountOne = await insertAccount(accountRepository, 1000); 49 | await printBalance(accountRepository, accountOne); 50 | 51 | const accountTwo = await insertAccount(accountRepository, 250); 52 | await printBalance(accountRepository, accountTwo); 53 | 54 | await transferFunds(accountRepository, 500, accountOne, accountTwo); 55 | await printBalance(accountRepository, accountOne); 56 | await printBalance(accountRepository, accountTwo); 57 | }) 58 | .catch((error) => console.log(error)); 59 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "lib": ["es5", "es6"], 4 | "target": "es5", 5 | "module": "commonjs", 6 | "moduleResolution": "node", 7 | "outDir": "./build", 8 | "emitDecoratorMetadata": true, 9 | "experimentalDecorators": true, 10 | "sourceMap": true 11 | } 12 | } 13 | --------------------------------------------------------------------------------