@n8n/config 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE.md ADDED
@@ -0,0 +1,86 @@
1
+ # License
2
+
3
+ Portions of this software are licensed as follows:
4
+
5
+ - Content of branches other than the main branch (i.e. "master") are not licensed.
6
+ - Source code files that contain ".ee." in their filename are NOT licensed under the Sustainable Use License.
7
+ To use source code files that contain ".ee." in their filename you must hold a valid n8n Enterprise License
8
+ specifically allowing you access to such source code files and as defined in "LICENSE_EE.md".
9
+ - All third party components incorporated into the n8n Software are licensed under the original license
10
+ provided by the owner of the applicable component.
11
+ - Content outside of the above mentioned files or restrictions is available under the "Sustainable Use
12
+ License" as defined below.
13
+
14
+ ## Sustainable Use License
15
+
16
+ Version 1.0
17
+
18
+ ### Acceptance
19
+
20
+ By using the software, you agree to all of the terms and conditions below.
21
+
22
+ ### Copyright License
23
+
24
+ The licensor grants you a non-exclusive, royalty-free, worldwide, non-sublicensable, non-transferable license
25
+ to use, copy, distribute, make available, and prepare derivative works of the software, in each case subject
26
+ to the limitations below.
27
+
28
+ ### Limitations
29
+
30
+ You may use or modify the software only for your own internal business purposes or for non-commercial or
31
+ personal use. You may distribute the software or provide it to others only if you do so free of charge for
32
+ non-commercial purposes. You may not alter, remove, or obscure any licensing, copyright, or other notices of
33
+ the licensor in the software. Any use of the licensor’s trademarks is subject to applicable law.
34
+
35
+ ### Patents
36
+
37
+ The licensor grants you a license, under any patent claims the licensor can license, or becomes able to
38
+ license, to make, have made, use, sell, offer for sale, import and have imported the software, in each case
39
+ subject to the limitations and conditions in this license. This license does not cover any patent claims that
40
+ you cause to be infringed by modifications or additions to the software. If you or your company make any
41
+ written claim that the software infringes or contributes to infringement of any patent, your patent license
42
+ for the software granted under these terms ends immediately. If your company makes such a claim, your patent
43
+ license ends immediately for work on behalf of your company.
44
+
45
+ ### Notices
46
+
47
+ You must ensure that anyone who gets a copy of any part of the software from you also gets a copy of these
48
+ terms. If you modify the software, you must include in any modified copies of the software a prominent notice
49
+ stating that you have modified the software.
50
+
51
+ ### No Other Rights
52
+
53
+ These terms do not imply any licenses other than those expressly granted in these terms.
54
+
55
+ ### Termination
56
+
57
+ If you use the software in violation of these terms, such use is not licensed, and your license will
58
+ automatically terminate. If the licensor provides you with a notice of your violation, and you cease all
59
+ violation of this license no later than 30 days after you receive that notice, your license will be reinstated
60
+ retroactively. However, if you violate these terms after such reinstatement, any additional violation of these
61
+ terms will cause your license to terminate automatically and permanently.
62
+
63
+ ### No Liability
64
+
65
+ As far as the law allows, the software comes as is, without any warranty or condition, and the licensor will
66
+ not be liable to you for any damages arising out of these terms or the use or nature of the software, under
67
+ any kind of legal claim.
68
+
69
+ ### Definitions
70
+
71
+ The “licensor” is the entity offering these terms.
72
+
73
+ The “software” is the software the licensor makes available under these terms, including any portion of it.
74
+
75
+ “You” refers to the individual or entity agreeing to these terms.
76
+
77
+ “Your company” is any legal entity, sole proprietorship, or other kind of organization that you work for, plus
78
+ all organizations that have control over, are under the control of, or are under common control with that
79
+ organization. Control means ownership of substantially all the assets of an entity, or the power to direct its
80
+ management and policies by vote, contract, or otherwise. Control can be direct or indirect.
81
+
82
+ “Your license” is the license granted to you for the software under these terms.
83
+
84
+ “Use” means anything you do with the software requiring your license.
85
+
86
+ “Trademark” means trademarks, service marks, and similar rights.
package/LICENSE_EE.md ADDED
@@ -0,0 +1,27 @@
1
+ # The n8n Enterprise License (the “Enterprise License”)
2
+
3
+ Copyright (c) 2022-present n8n GmbH.
4
+
5
+ With regard to the n8n Software:
6
+
7
+ This software and associated documentation files (the "Software") may only be used in production, if
8
+ you (and any entity that you represent) hold a valid n8n Enterprise license corresponding to your
9
+ usage. Subject to the foregoing sentence, you are free to modify this Software and publish patches
10
+ to the Software. You agree that n8n and/or its licensors (as applicable) retain all right, title and
11
+ interest in and to all such modifications and/or patches, and all such modifications and/or patches
12
+ may only be used, copied, modified, displayed, distributed, or otherwise exploited with a valid n8n
13
+ Enterprise license for the corresponding usage. Notwithstanding the foregoing, you may copy and
14
+ modify the Software for development and testing purposes, without requiring a subscription. You
15
+ agree that n8n and/or its licensors (as applicable) retain all right, title and interest in and to
16
+ all such modifications. You are not granted any other rights beyond what is expressly stated herein.
17
+ Subject to the foregoing, it is forbidden to copy, merge, publish, distribute, sublicense, and/or
18
+ sell the Software.
19
+
20
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT
21
+ NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
22
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES
23
+ OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
24
+ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
25
+
26
+ For all third party components incorporated into the n8n Software, those components are licensed
27
+ under the original license provided by the owner of the applicable component.
@@ -0,0 +1 @@
1
+ {"program":{"fileNames":["../../../../node_modules/.pnpm/typescript@5.5.2/node_modules/typescript/lib/lib.es5.d.ts","../../../../node_modules/.pnpm/typescript@5.5.2/node_modules/typescript/lib/lib.es2015.d.ts","../../../../node_modules/.pnpm/typescript@5.5.2/node_modules/typescript/lib/lib.es2016.d.ts","../../../../node_modules/.pnpm/typescript@5.5.2/node_modules/typescript/lib/lib.es2017.d.ts","../../../../node_modules/.pnpm/typescript@5.5.2/node_modules/typescript/lib/lib.es2018.d.ts","../../../../node_modules/.pnpm/typescript@5.5.2/node_modules/typescript/lib/lib.es2019.d.ts","../../../../node_modules/.pnpm/typescript@5.5.2/node_modules/typescript/lib/lib.es2020.d.ts","../../../../node_modules/.pnpm/typescript@5.5.2/node_modules/typescript/lib/lib.es2015.core.d.ts","../../../../node_modules/.pnpm/typescript@5.5.2/node_modules/typescript/lib/lib.es2015.collection.d.ts","../../../../node_modules/.pnpm/typescript@5.5.2/node_modules/typescript/lib/lib.es2015.generator.d.ts","../../../../node_modules/.pnpm/typescript@5.5.2/node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../../../node_modules/.pnpm/typescript@5.5.2/node_modules/typescript/lib/lib.es2015.promise.d.ts","../../../../node_modules/.pnpm/typescript@5.5.2/node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../../../node_modules/.pnpm/typescript@5.5.2/node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../../../node_modules/.pnpm/typescript@5.5.2/node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../../../node_modules/.pnpm/typescript@5.5.2/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../../../node_modules/.pnpm/typescript@5.5.2/node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../../../node_modules/.pnpm/typescript@5.5.2/node_modules/typescript/lib/lib.es2016.intl.d.ts","../../../../node_modules/.pnpm/typescript@5.5.2/node_modules/typescript/lib/lib.es2017.date.d.ts","../../../../node_modules/.pnpm/typescript@5.5.2/node_modules/typescript/lib/lib.es2017.object.d.ts","../../../../node_modules/.pnpm/typescript@5.5.2/node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../../../node_modules/.pnpm/typescript@5.5.2/node_modules/typescript/lib/lib.es2017.string.d.ts","../../../../node_modules/.pnpm/typescript@5.5.2/node_modules/typescript/lib/lib.es2017.intl.d.ts","../../../../node_modules/.pnpm/typescript@5.5.2/node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../../../node_modules/.pnpm/typescript@5.5.2/node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../../../node_modules/.pnpm/typescript@5.5.2/node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../../../node_modules/.pnpm/typescript@5.5.2/node_modules/typescript/lib/lib.es2018.intl.d.ts","../../../../node_modules/.pnpm/typescript@5.5.2/node_modules/typescript/lib/lib.es2018.promise.d.ts","../../../../node_modules/.pnpm/typescript@5.5.2/node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../../../node_modules/.pnpm/typescript@5.5.2/node_modules/typescript/lib/lib.es2019.array.d.ts","../../../../node_modules/.pnpm/typescript@5.5.2/node_modules/typescript/lib/lib.es2019.object.d.ts","../../../../node_modules/.pnpm/typescript@5.5.2/node_modules/typescript/lib/lib.es2019.string.d.ts","../../../../node_modules/.pnpm/typescript@5.5.2/node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../../../node_modules/.pnpm/typescript@5.5.2/node_modules/typescript/lib/lib.es2019.intl.d.ts","../../../../node_modules/.pnpm/typescript@5.5.2/node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../../../node_modules/.pnpm/typescript@5.5.2/node_modules/typescript/lib/lib.es2020.date.d.ts","../../../../node_modules/.pnpm/typescript@5.5.2/node_modules/typescript/lib/lib.es2020.promise.d.ts","../../../../node_modules/.pnpm/typescript@5.5.2/node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../../../node_modules/.pnpm/typescript@5.5.2/node_modules/typescript/lib/lib.es2020.string.d.ts","../../../../node_modules/.pnpm/typescript@5.5.2/node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../../../node_modules/.pnpm/typescript@5.5.2/node_modules/typescript/lib/lib.es2020.intl.d.ts","../../../../node_modules/.pnpm/typescript@5.5.2/node_modules/typescript/lib/lib.es2020.number.d.ts","../../../../node_modules/.pnpm/typescript@5.5.2/node_modules/typescript/lib/lib.es2022.error.d.ts","../../../../node_modules/.pnpm/typescript@5.5.2/node_modules/typescript/lib/lib.esnext.intl.d.ts","../../../../node_modules/.pnpm/typescript@5.5.2/node_modules/typescript/lib/lib.decorators.d.ts","../../../../node_modules/.pnpm/typescript@5.5.2/node_modules/typescript/lib/lib.decorators.legacy.d.ts","../../../../node_modules/jest-expect-message/types/index.d.ts","../../../../node_modules/.pnpm/reflect-metadata@0.2.2/node_modules/reflect-metadata/index.d.ts","../../../../node_modules/.pnpm/typedi@0.10.0_patch_hash=sk6omkefrosihg7lmqbzh7vfxe/node_modules/typedi/types/token.class.d.ts","../../../../node_modules/.pnpm/typedi@0.10.0_patch_hash=sk6omkefrosihg7lmqbzh7vfxe/node_modules/typedi/types/types/constructable.type.d.ts","../../../../node_modules/.pnpm/typedi@0.10.0_patch_hash=sk6omkefrosihg7lmqbzh7vfxe/node_modules/typedi/types/types/abstract-constructable.type.d.ts","../../../../node_modules/.pnpm/typedi@0.10.0_patch_hash=sk6omkefrosihg7lmqbzh7vfxe/node_modules/typedi/types/types/service-identifier.type.d.ts","../../../../node_modules/.pnpm/typedi@0.10.0_patch_hash=sk6omkefrosihg7lmqbzh7vfxe/node_modules/typedi/types/interfaces/service-metadata.interface.d.ts","../../../../node_modules/.pnpm/typedi@0.10.0_patch_hash=sk6omkefrosihg7lmqbzh7vfxe/node_modules/typedi/types/interfaces/service-options.interface.d.ts","../../../../node_modules/.pnpm/typedi@0.10.0_patch_hash=sk6omkefrosihg7lmqbzh7vfxe/node_modules/typedi/types/container-instance.class.d.ts","../../../../node_modules/.pnpm/typedi@0.10.0_patch_hash=sk6omkefrosihg7lmqbzh7vfxe/node_modules/typedi/types/interfaces/handler.interface.d.ts","../../../../node_modules/.pnpm/typedi@0.10.0_patch_hash=sk6omkefrosihg7lmqbzh7vfxe/node_modules/typedi/types/container.class.d.ts","../../../../node_modules/.pnpm/typedi@0.10.0_patch_hash=sk6omkefrosihg7lmqbzh7vfxe/node_modules/typedi/types/decorators/inject-many.decorator.d.ts","../../../../node_modules/.pnpm/typedi@0.10.0_patch_hash=sk6omkefrosihg7lmqbzh7vfxe/node_modules/typedi/types/decorators/inject.decorator.d.ts","../../../../node_modules/.pnpm/typedi@0.10.0_patch_hash=sk6omkefrosihg7lmqbzh7vfxe/node_modules/typedi/types/decorators/service.decorator.d.ts","../../../../node_modules/.pnpm/typedi@0.10.0_patch_hash=sk6omkefrosihg7lmqbzh7vfxe/node_modules/typedi/types/error/cannot-inject-value.error.d.ts","../../../../node_modules/.pnpm/typedi@0.10.0_patch_hash=sk6omkefrosihg7lmqbzh7vfxe/node_modules/typedi/types/error/cannot-instantiate-value.error.d.ts","../../../../node_modules/.pnpm/typedi@0.10.0_patch_hash=sk6omkefrosihg7lmqbzh7vfxe/node_modules/typedi/types/error/service-not-found.error.d.ts","../../../../node_modules/.pnpm/typedi@0.10.0_patch_hash=sk6omkefrosihg7lmqbzh7vfxe/node_modules/typedi/types/index.d.ts","../src/decorators.ts","../src/configs/credentials.ts","../src/configs/database.ts","../src/configs/email.ts","../src/index.ts","../../../../node_modules/.pnpm/@types+node@18.16.16/node_modules/@types/node/assert.d.ts","../../../../node_modules/.pnpm/@types+node@18.16.16/node_modules/@types/node/assert/strict.d.ts","../../../../node_modules/.pnpm/@types+node@18.16.16/node_modules/@types/node/globals.d.ts","../../../../node_modules/.pnpm/@types+node@18.16.16/node_modules/@types/node/async_hooks.d.ts","../../../../node_modules/.pnpm/@types+node@18.16.16/node_modules/@types/node/buffer.d.ts","../../../../node_modules/.pnpm/@types+node@18.16.16/node_modules/@types/node/child_process.d.ts","../../../../node_modules/.pnpm/@types+node@18.16.16/node_modules/@types/node/cluster.d.ts","../../../../node_modules/.pnpm/@types+node@18.16.16/node_modules/@types/node/console.d.ts","../../../../node_modules/.pnpm/@types+node@18.16.16/node_modules/@types/node/constants.d.ts","../../../../node_modules/.pnpm/@types+node@18.16.16/node_modules/@types/node/crypto.d.ts","../../../../node_modules/.pnpm/@types+node@18.16.16/node_modules/@types/node/dgram.d.ts","../../../../node_modules/.pnpm/@types+node@18.16.16/node_modules/@types/node/diagnostics_channel.d.ts","../../../../node_modules/.pnpm/@types+node@18.16.16/node_modules/@types/node/dns.d.ts","../../../../node_modules/.pnpm/@types+node@18.16.16/node_modules/@types/node/dns/promises.d.ts","../../../../node_modules/.pnpm/@types+node@18.16.16/node_modules/@types/node/domain.d.ts","../../../../node_modules/.pnpm/@types+node@18.16.16/node_modules/@types/node/dom-events.d.ts","../../../../node_modules/.pnpm/@types+node@18.16.16/node_modules/@types/node/events.d.ts","../../../../node_modules/.pnpm/@types+node@18.16.16/node_modules/@types/node/fs.d.ts","../../../../node_modules/.pnpm/@types+node@18.16.16/node_modules/@types/node/fs/promises.d.ts","../../../../node_modules/.pnpm/@types+node@18.16.16/node_modules/@types/node/http.d.ts","../../../../node_modules/.pnpm/@types+node@18.16.16/node_modules/@types/node/http2.d.ts","../../../../node_modules/.pnpm/@types+node@18.16.16/node_modules/@types/node/https.d.ts","../../../../node_modules/.pnpm/@types+node@18.16.16/node_modules/@types/node/inspector.d.ts","../../../../node_modules/.pnpm/@types+node@18.16.16/node_modules/@types/node/module.d.ts","../../../../node_modules/.pnpm/@types+node@18.16.16/node_modules/@types/node/net.d.ts","../../../../node_modules/.pnpm/@types+node@18.16.16/node_modules/@types/node/os.d.ts","../../../../node_modules/.pnpm/@types+node@18.16.16/node_modules/@types/node/path.d.ts","../../../../node_modules/.pnpm/@types+node@18.16.16/node_modules/@types/node/perf_hooks.d.ts","../../../../node_modules/.pnpm/@types+node@18.16.16/node_modules/@types/node/process.d.ts","../../../../node_modules/.pnpm/@types+node@18.16.16/node_modules/@types/node/punycode.d.ts","../../../../node_modules/.pnpm/@types+node@18.16.16/node_modules/@types/node/querystring.d.ts","../../../../node_modules/.pnpm/@types+node@18.16.16/node_modules/@types/node/readline.d.ts","../../../../node_modules/.pnpm/@types+node@18.16.16/node_modules/@types/node/readline/promises.d.ts","../../../../node_modules/.pnpm/@types+node@18.16.16/node_modules/@types/node/repl.d.ts","../../../../node_modules/.pnpm/@types+node@18.16.16/node_modules/@types/node/stream.d.ts","../../../../node_modules/.pnpm/@types+node@18.16.16/node_modules/@types/node/stream/promises.d.ts","../../../../node_modules/.pnpm/@types+node@18.16.16/node_modules/@types/node/stream/consumers.d.ts","../../../../node_modules/.pnpm/@types+node@18.16.16/node_modules/@types/node/stream/web.d.ts","../../../../node_modules/.pnpm/@types+node@18.16.16/node_modules/@types/node/string_decoder.d.ts","../../../../node_modules/.pnpm/@types+node@18.16.16/node_modules/@types/node/test.d.ts","../../../../node_modules/.pnpm/@types+node@18.16.16/node_modules/@types/node/timers.d.ts","../../../../node_modules/.pnpm/@types+node@18.16.16/node_modules/@types/node/timers/promises.d.ts","../../../../node_modules/.pnpm/@types+node@18.16.16/node_modules/@types/node/tls.d.ts","../../../../node_modules/.pnpm/@types+node@18.16.16/node_modules/@types/node/trace_events.d.ts","../../../../node_modules/.pnpm/@types+node@18.16.16/node_modules/@types/node/tty.d.ts","../../../../node_modules/.pnpm/@types+node@18.16.16/node_modules/@types/node/url.d.ts","../../../../node_modules/.pnpm/@types+node@18.16.16/node_modules/@types/node/util.d.ts","../../../../node_modules/.pnpm/@types+node@18.16.16/node_modules/@types/node/v8.d.ts","../../../../node_modules/.pnpm/@types+node@18.16.16/node_modules/@types/node/vm.d.ts","../../../../node_modules/.pnpm/@types+node@18.16.16/node_modules/@types/node/wasi.d.ts","../../../../node_modules/.pnpm/@types+node@18.16.16/node_modules/@types/node/worker_threads.d.ts","../../../../node_modules/.pnpm/@types+node@18.16.16/node_modules/@types/node/zlib.d.ts","../../../../node_modules/.pnpm/@types+node@18.16.16/node_modules/@types/node/globals.global.d.ts","../../../../node_modules/.pnpm/@types+node@18.16.16/node_modules/@types/node/index.d.ts"],"fileInfos":[{"version":"44e584d4f6444f58791784f1d530875970993129442a847597db702a073ca68c","affectsGlobalScope":true},"45b7ab580deca34ae9729e97c13cfd999df04416a79116c3bfb483804f85ded4","3facaf05f0c5fc569c5649dd359892c98a85557e3e0c847964caeb67076f4d75","9a68c0c07ae2fa71b44384a839b7b8d81662a236d4b9ac30916718f7510b1b2d","5e1c4c362065a6b95ff952c0eab010f04dcd2c3494e813b493ecfd4fcb9fc0d8","68d73b4a11549f9c0b7d352d10e91e5dca8faa3322bfb77b661839c42b1ddec7","5efce4fc3c29ea84e8928f97adec086e3dc876365e0982cc8479a07954a3efd4",{"version":"6920e1448680767498a0b77c6a00a8e77d14d62c3da8967b171f1ddffa3c18e4","affectsGlobalScope":true},{"version":"dc2df20b1bcdc8c2d34af4926e2c3ab15ffe1160a63e58b7e09833f616efff44","affectsGlobalScope":true},{"version":"4443e68b35f3332f753eacc66a04ac1d2053b8b035a0e0ac1d455392b5e243b3","affectsGlobalScope":true},{"version":"bc47685641087c015972a3f072480889f0d6c65515f12bd85222f49a98952ed7","affectsGlobalScope":true},{"version":"0dc1e7ceda9b8b9b455c3a2d67b0412feab00bd2f66656cd8850e8831b08b537","affectsGlobalScope":true},{"version":"ce691fb9e5c64efb9547083e4a34091bcbe5bdb41027e310ebba8f7d96a98671","affectsGlobalScope":true},{"version":"8d697a2a929a5fcb38b7a65594020fcef05ec1630804a33748829c5ff53640d0","affectsGlobalScope":true},{"version":"4ff2a353abf8a80ee399af572debb8faab2d33ad38c4b4474cff7f26e7653b8d","affectsGlobalScope":true},{"version":"93495ff27b8746f55d19fcbcdbaccc99fd95f19d057aed1bd2c0cafe1335fbf0","affectsGlobalScope":true},{"version":"6fc23bb8c3965964be8c597310a2878b53a0306edb71d4b5a4dfe760186bcc01","affectsGlobalScope":true},{"version":"ea011c76963fb15ef1cdd7ce6a6808b46322c527de2077b6cfdf23ae6f5f9ec7","affectsGlobalScope":true},{"version":"38f0219c9e23c915ef9790ab1d680440d95419ad264816fa15009a8851e79119","affectsGlobalScope":true},{"version":"bb42a7797d996412ecdc5b2787720de477103a0b2e53058569069a0e2bae6c7e","affectsGlobalScope":true},{"version":"4738f2420687fd85629c9efb470793bb753709c2379e5f85bc1815d875ceadcd","affectsGlobalScope":true},{"version":"2f11ff796926e0832f9ae148008138ad583bd181899ab7dd768a2666700b1893","affectsGlobalScope":true},{"version":"4de680d5bb41c17f7f68e0419412ca23c98d5749dcaaea1896172f06435891fc","affectsGlobalScope":true},{"version":"9fc46429fbe091ac5ad2608c657201eb68b6f1b8341bd6d670047d32ed0a88fa","affectsGlobalScope":true},{"version":"61c37c1de663cf4171e1192466e52c7a382afa58da01b1dc75058f032ddf0839","affectsGlobalScope":true},{"version":"b541a838a13f9234aba650a825393ffc2292dc0fc87681a5d81ef0c96d281e7a","affectsGlobalScope":true},{"version":"9e9fbd7030c440b33d021da145d3232984c8bb7916f277e8ffd3dc2e3eae2bdb","affectsGlobalScope":true},{"version":"811ec78f7fefcabbda4bfa93b3eb67d9ae166ef95f9bff989d964061cbf81a0c","affectsGlobalScope":true},{"version":"717937616a17072082152a2ef351cb51f98802fb4b2fdabd32399843875974ca","affectsGlobalScope":true},{"version":"d7e7d9b7b50e5f22c915b525acc5a49a7a6584cf8f62d0569e557c5cfc4b2ac2","affectsGlobalScope":true},{"version":"71c37f4c9543f31dfced6c7840e068c5a5aacb7b89111a4364b1d5276b852557","affectsGlobalScope":true},{"version":"576711e016cf4f1804676043e6a0a5414252560eb57de9faceee34d79798c850","affectsGlobalScope":true},{"version":"89c1b1281ba7b8a96efc676b11b264de7a8374c5ea1e6617f11880a13fc56dc6","affectsGlobalScope":true},{"version":"74f7fa2d027d5b33eb0471c8e82a6c87216223181ec31247c357a3e8e2fddc5b","affectsGlobalScope":true},{"version":"ae37d6ccd1560b0203ab88d46987393adaaa78c919e51acf32fb82c86502e98c","affectsGlobalScope":true},{"version":"063600664504610fe3e99b717a1223f8b1900087fab0b4cad1496a114744f8df","affectsGlobalScope":true},{"version":"934019d7e3c81950f9a8426d093458b65d5aff2c7c1511233c0fd5b941e608ab","affectsGlobalScope":true},{"version":"bf14a426dbbf1022d11bd08d6b8e709a2e9d246f0c6c1032f3b2edb9a902adbe","affectsGlobalScope":true},{"version":"5e07ed3809d48205d5b985642a59f2eba47c402374a7cf8006b686f79efadcbd","affectsGlobalScope":true},{"version":"2b72d528b2e2fe3c57889ca7baef5e13a56c957b946906d03767c642f386bbc3","affectsGlobalScope":true},{"version":"479553e3779be7d4f68e9f40cdb82d038e5ef7592010100410723ceced22a0f7","affectsGlobalScope":true},{"version":"368af93f74c9c932edd84c58883e736c9e3d53cec1fe24c0b0ff451f529ceab1","affectsGlobalScope":true},{"version":"e6633e05da3ff36e6da2ec170d0d03ccf33de50ca4dc6f5aeecb572cedd162fb","affectsGlobalScope":true},{"version":"811c71eee4aa0ac5f7adf713323a5c41b0cf6c4e17367a34fbce379e12bbf0a4","affectsGlobalScope":true},{"version":"33358442698bb565130f52ba79bfd3d4d484ac85fe33f3cb1759c54d18201393","affectsGlobalScope":true},{"version":"782dec38049b92d4e85c1585fbea5474a219c6984a35b004963b00beb1aab538","affectsGlobalScope":true},{"version":"406a5a771d97867cba07e7fbd3cd1fb2dd1004558b973733205737e9dd7ed929","affectsGlobalScope":true},{"version":"8d6d51a5118d000ed3bfe6e1dd1335bebfff3fef23cd2af2f84a24d30f90cc90","affectsGlobalScope":true},"04df0403a2543fd41fe26173516429c63f063e84561a0ab95f454287513d8039","30b72a42d30fce0f0a3b4b0129f8312e731489a2e90eda205ef426111b052b03","e6dd29a675f8e961c24260e2732d07f1fe6213ef105fee5d81efc207ab197141","6f9177af80ad8c7f4576e62e73b1b2235c34f3249ef7f0a929d7ee2a168b5f66","a2c23caea897ed576e695615898e6abf6cc5498da7b22d5998be503ae75c8d8d","d602798b75151f8ad250aaf0d0e770631b08adb8e7277e95d34b2e107c2950c7","6b8c6a516b8310124b541971b0ff95f723735f34114eadaaf0ab8dbe6b954403","509ab4c65df8edf8a0078af9e745305424012f4e9ea77ee3665e5b2ba80e0645","f1601f465a865a46bf3272353f54816ca21b535279c6232ce6dc460025898ab9","2699da414b33601392b4b3d162e1755da6f9185a3c979fd0e1790c83f1771309","32b9ad5cba6e168c0abf5e7ad0a0c7179a7ac74e2d05028e2f026cc042e695c9","49eacc1d7e5e47f2c4d456890a8dcedf70ee9e067612c774d71880176b70b069","a99df6edd2d2d23eadb5f23d938dcfe1cf71002c42412935a00efe87cdaab1b5","d879d3a6fae2918cdff3aad42637d646eb562bd89dedd7816599390dab7dacbd","5fce2fbba05047a53da3fb26a0b62df0a5005b3007217a2a7185b4e4fd60c46b","b665b2c66feaf54a2a56bf56c8c37d7dce0dad5caa4eff781bc9b78b17f651e8",{"version":"7f1762611897684c7d8af130b411b3d40a3776202d60fc2a364fc363457f384b","signature":"cded351340551007594558cbeb6f1f1d11358d6e177a08a53963cff0e9b2c229"},{"version":"e9375cb98ed2048588f017c30bc119e1681d76e4be34f0504cb48bdb04b0773a","signature":"e7a7bb6a2cad16a2260cc920adba7e279d82e8e2027511d3762631815a47f82f"},{"version":"a06fc9456d23d03b4a6364119260227a204d0eedf5f4ea2e7b428814141a30ed","signature":"b5abf32b4238204507d583e8bf0a4bbafa68e6c3516b168bfc0d20c161a9ee54"},{"version":"8d05231ba810a4e027b29622006f580a70aba07122e6b23e9ad8cd5aac3968fd","signature":"edf132855f9004766a992baf5bbcf288dac52b172bf0dfc844d7c89edac729e2"},{"version":"ca97af6213428024cba50fef936e0037fa9c9ecb153c91f324524c3eb88ef40b","signature":"4336fefb35a52d96dcfc0385c469c511c07a78130a52083ccf80c1e21ed0669b"},"ba8691cf6bea9d53e6bf6cbc22af964a9633a21793981a1be3dce65e7a714d8b","a69c09dbea52352f479d3e7ac949fde3d17b195abe90b045d619f747b38d6d1a",{"version":"bce910d9164785c9f0d4dcea4be359f5f92130c7c7833dea6138ab1db310a1f9","affectsGlobalScope":true},"7d2e3fea24c712c99c03ad8f556abedbfe105f87f1be10b95dbd409d24bc05a3",{"version":"c7a976828c7acb8ada184935195aef0f389c4e37d87daa52eb4f2f3df3edcdea","affectsGlobalScope":true},"3719525a8f6ab731e3dfd585d9f87df55ec7d50d461df84f74eb4d68bb165244","5a94487653355b56018122d92392beb2e5f4a6c63ba5cef83bbe1c99775ef713",{"version":"d5135ad93b33adcce80b18f8065087934cdc1730d63db58562edcf017e1aad9b","affectsGlobalScope":true},"82408ed3e959ddc60d3e9904481b5a8dc16469928257af22a3f7d1a3bc7fd8c4","b787b5b54349a24f07d089b612a9fb8ff024dbbe991ff52ea2b188a6b1230644","bb9c4ffa5e6290c6980b63c815cdd1625876dadb2efaf77edbe82984be93e55e","1cdcfc1f624d6c08aa12c73935f6e13f095919cd99edf95752951796eb225729","4eaff3d8e10676fd7913d8c108890e71c688e1e7d52f6d1d55c39514f493dc47","14b5aa23c5d0ae1907bc696ac7b6915d88f7d85799cc0dc2dcf98fbce2c5a67c","5c439dafdc09abe4d6c260a96b822fa0ba5be7203c71a63ab1f1423cd9e838ea",{"version":"6b526a5ec4a401ca7c26cfe6a48e641d8f30af76673bad3b06a1b4504594a960","affectsGlobalScope":true},{"version":"00dee7cdca8b8420c47ea4a31a34b8e8294013ebc4f463fd941e867e7bf05029","affectsGlobalScope":true},"7abd2623cdd8148233c0c6b9da0289e124f1718bc58dcb8da4262432e9ce0f0a","f4a3088770ba56a4c72e9907bc9798706ab1575097cd024503f57966df2d3d3a","7f138842074d0a40681775af008c8452093b68c383c94de31759e853c6d06b5c","a3d541d303ee505053f5dcbf9fafb65cac3d5631037501cd616195863a6c5740","8d3c583a07e0c37e876908c2d5da575019f689df8d9fa4c081d99119d53dba22","2c828a5405191d006115ab34e191b8474bc6c86ffdc401d1a9864b1b6e088a58",{"version":"e630e5528e899219ae319e83bef54bf3bcb91b01d76861ecf881e8e614b167f0","affectsGlobalScope":true},"bcebb922784739bdb34c18ee51095d25a92b560c78ccd2eaacd6bd00f7443d83","7ee6ed878c4528215c82b664fe0cfe80e8b4da6c0d4cc80869367868774db8b1","b0973c3cbcdc59b37bf477731d468696ecaf442593ec51bab497a613a580fe30",{"version":"4989e92ba5b69b182d2caaea6295af52b7dc73a4f7a2e336a676722884e7139d","affectsGlobalScope":true},{"version":"0715e4cd28ad471b2a93f3e552ff51a3ae423417a01a10aa1d3bc7c6b95059d6","affectsGlobalScope":true},"5153a2fd150e46ce57bb3f8db1318d33f6ad3261ed70ceeff92281c0608c74a3","210d54cd652ec0fec8c8916e4af59bb341065576ecda039842f9ffb2e908507c","36b03690b628eab08703d63f04eaa89c5df202e5f1edf3989f13ad389cd2c091","0effadd232a20498b11308058e334d3339cc5bf8c4c858393e38d9d4c0013dcf","25846d43937c672bab7e8195f3d881f93495df712ee901860effc109918938cc","4f3fdeba4e28e21aa719c081b8dc8f91d47e12e773389b9d35679c08151c9d37","1b952304137851e45bc009785de89ada562d9376177c97e37702e39e60c2f1ff","69ee23dd0d215b09907ad30d23f88b7790c93329d1faf31d7835552a10cf7cbf","44b8b584a338b190a59f4f6929d072431950c7bd92ec2694821c11bce180c8a5","23b89798789dffbd437c0c423f5d02d11f9736aea73d6abf16db4f812ff36eda","5629c03c44d1e07698c31d04318c9950d78940461269c0f692a42091cedea142",{"version":"3c4ba1dd9b12ffa284b565063108f2f031d150ea15b8fafbdc17f5d2a07251f3","affectsGlobalScope":true},"e10177274a35a9d07c825615340b2fcde2f610f53f3fb40269fd196b4288dda6","1422cd9e705adcc09088fda85a900c2b70e3ad36ea85846f68bd1a884cdf4e2b","3c13ef48634e7b5012fcf7e8fce7496352c2d779a7201389ca96a2a81ee4314d","5d0a25ec910fa36595f85a67ac992d7a53dd4064a1ba6aea1c9f14ab73a023f2",{"version":"c6b124041039647ff446e19ea0e90a7a83256593d64f23c66b4fda6e0c5b968e","affectsGlobalScope":true},{"version":"a9fc1469744055a3435f203123246b96c094e7ff8c4e1c3863829d9b705b7a34","affectsGlobalScope":true},"868831cab82b65dfe1d68180e898af1f2101e89ba9b754d1db6fb8cc2fac1921","0fe8985a28f82c450a04a6edf1279d7181c0893f37da7d2a27f8efd4fd5edb03","e59a892d87e72733e2a9ca21611b9beb52977be2696c7ba4b216cbbb9a48f5aa",{"version":"52120bb7e4583612225bdf08e7c12559548170f11e660d33a33623bae9bbdbba","affectsGlobalScope":true},"8a300fa9b698845a1f9c41ecbe2c5966634582a8e2020d51abcace9b55aa959e",{"version":"ab9b9a36e5284fd8d3bf2f7d5fcbc60052f25f27e4d20954782099282c60d23e","affectsGlobalScope":true},"a6dd3dba8e665ac43d279e0fdf5219edda0eed69b5e9a5061f46cd6a65c4f7a1"],"root":[47,[65,69]],"options":{"composite":true,"declaration":true,"emitDecoratorMetadata":true,"esModuleInterop":true,"experimentalDecorators":true,"module":1,"noImplicitAny":true,"noImplicitReturns":true,"noUnusedLocals":false,"noUnusedParameters":false,"outDir":"./","preserveConstEnums":true,"removeComments":true,"rootDir":"../src","skipLibCheck":true,"sourceMap":true,"strict":true,"strictNullChecks":true,"strictPropertyInitialization":false,"target":6,"tsBuildInfoFile":"./build.tsbuildinfo","useUnknownInCatchVariables":true},"fileIdsList":[[70,116],[73,116],[74,79,107,116],[75,86,87,94,104,115,116],[75,76,86,94,116],[77,116],[78,79,87,95,116],[79,104,112,116],[80,82,86,94,116],[81,116],[82,83,116],[86,116],[84,86,116],[86,87,88,104,115,116],[86,87,88,101,104,107,116],[116,120],[116],[82,86,89,94,104,115,116],[86,87,89,90,94,104,112,115,116],[89,91,104,112,115,116],[70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122],[86,92,116],[93,115,116],[82,86,94,104,116],[95,116],[96,116],[73,97,116],[98,114,116,120],[99,116],[100,116],[86,101,102,116],[101,103,116,118],[74,86,104,105,106,107,116],[74,104,106,116],[104,105,116],[107,116],[108,116],[86,110,111,116],[110,111,116],[79,94,104,112,116],[113,116],[94,114,116],[74,89,100,115,116],[79,116],[104,116,117],[116,118],[116,119],[74,79,86,88,97,104,115,116,118,120],[104,116,121],[49,50,51,52,53,54,116],[49,50,51,52,54,55,56,116],[49,116],[49,50,116],[49,54,116],[50,116],[52,116],[49,50,52,53,54,55,56,57,58,59,60,61,62,63,116],[50,55,116],[50,52,116],[53,116],[49,50,51,116],[65,116],[48,64,87,116],[65,66,67,68,116]],"referencedMap":[[70,1],[71,1],[73,2],[74,3],[75,4],[76,5],[77,6],[78,7],[79,8],[80,9],[81,10],[82,11],[83,11],[85,12],[84,13],[86,12],[87,14],[88,15],[72,16],[122,17],[89,18],[90,19],[91,20],[123,21],[92,22],[93,23],[94,24],[95,25],[96,26],[97,27],[98,28],[99,29],[100,30],[101,31],[102,31],[103,32],[104,33],[106,34],[105,35],[107,36],[108,37],[109,17],[110,38],[111,39],[112,40],[113,41],[114,42],[115,43],[116,44],[117,45],[118,46],[119,47],[120,48],[121,49],[48,17],[55,50],[57,51],[58,52],[59,53],[60,54],[61,55],[62,56],[63,56],[64,57],[56,58],[53,59],[54,60],[49,17],[51,17],[50,17],[52,61],[45,17],[46,17],[9,17],[8,17],[2,17],[10,17],[11,17],[12,17],[13,17],[14,17],[15,17],[16,17],[17,17],[3,17],[18,17],[4,17],[19,17],[23,17],[20,17],[21,17],[22,17],[24,17],[25,17],[26,17],[5,17],[27,17],[28,17],[29,17],[30,17],[6,17],[34,17],[31,17],[32,17],[33,17],[35,17],[7,17],[36,17],[41,17],[42,17],[37,17],[38,17],[39,17],[40,17],[43,17],[1,17],[44,17],[47,17],[66,62],[67,62],[68,62],[65,63],[69,64]],"latestChangedDtsFile":"./index.d.ts"},"version":"5.5.2"}
@@ -0,0 +1,9 @@
1
+ declare class CredentialsOverwrite {
2
+ readonly data: string;
3
+ readonly endpoint: string;
4
+ }
5
+ export declare class CredentialsConfig {
6
+ readonly defaultName: string;
7
+ readonly overwrite: CredentialsOverwrite;
8
+ }
9
+ export {};
@@ -0,0 +1,48 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.CredentialsConfig = void 0;
13
+ const decorators_1 = require("../decorators");
14
+ let CredentialsOverwrite = class CredentialsOverwrite {
15
+ constructor() {
16
+ this.data = '{}';
17
+ this.endpoint = '';
18
+ }
19
+ };
20
+ __decorate([
21
+ (0, decorators_1.Env)('CREDENTIALS_OVERWRITE_DATA'),
22
+ __metadata("design:type", String)
23
+ ], CredentialsOverwrite.prototype, "data", void 0);
24
+ __decorate([
25
+ (0, decorators_1.Env)('CREDENTIALS_OVERWRITE_ENDPOINT'),
26
+ __metadata("design:type", String)
27
+ ], CredentialsOverwrite.prototype, "endpoint", void 0);
28
+ CredentialsOverwrite = __decorate([
29
+ decorators_1.Config
30
+ ], CredentialsOverwrite);
31
+ let CredentialsConfig = class CredentialsConfig {
32
+ constructor() {
33
+ this.defaultName = 'My credentials';
34
+ }
35
+ };
36
+ exports.CredentialsConfig = CredentialsConfig;
37
+ __decorate([
38
+ (0, decorators_1.Env)('CREDENTIALS_DEFAULT_NAME'),
39
+ __metadata("design:type", String)
40
+ ], CredentialsConfig.prototype, "defaultName", void 0);
41
+ __decorate([
42
+ decorators_1.Nested,
43
+ __metadata("design:type", CredentialsOverwrite)
44
+ ], CredentialsConfig.prototype, "overwrite", void 0);
45
+ exports.CredentialsConfig = CredentialsConfig = __decorate([
46
+ decorators_1.Config
47
+ ], CredentialsConfig);
48
+ //# sourceMappingURL=credentials.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"credentials.js","sourceRoot":"","sources":["../../src/configs/credentials.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,8CAAoD;AAGpD,IAAM,oBAAoB,GAA1B,MAAM,oBAAoB;IAA1B;QAMU,SAAI,GAAW,IAAI,CAAC;QAIpB,aAAQ,GAAW,EAAE,CAAC;IAChC,CAAC;CAAA,CAAA;AALS;IADR,IAAA,gBAAG,EAAC,4BAA4B,CAAC;;kDACL;AAIpB;IADR,IAAA,gBAAG,EAAC,gCAAgC,CAAC;;sDACP;AAV1B,oBAAoB;IADzB,mBAAM;GACD,oBAAoB,CAWzB;AAGM,IAAM,iBAAiB,GAAvB,MAAM,iBAAiB;IAAvB;QAGG,gBAAW,GAAW,gBAAgB,CAAC;IAIjD,CAAC;CAAA,CAAA;AAPY,8CAAiB;AAGpB;IADR,IAAA,gBAAG,EAAC,0BAA0B,CAAC;;sDACgB;AAGvC;IADR,mBAAM;8BACa,oBAAoB;oDAAC;4BAN7B,iBAAiB;IAD7B,mBAAM;GACM,iBAAiB,CAO7B"}
@@ -0,0 +1,44 @@
1
+ declare class LoggingConfig {
2
+ readonly enabled: boolean;
3
+ readonly options: 'query' | 'error' | 'schema' | 'warn' | 'info' | 'log' | 'all';
4
+ readonly maxQueryExecutionTime: number;
5
+ }
6
+ declare class PostgresSSLConfig {
7
+ readonly enabled: boolean;
8
+ readonly ca: string;
9
+ readonly cert: string;
10
+ readonly key: string;
11
+ readonly rejectUnauthorized: boolean;
12
+ }
13
+ declare class PostgresConfig {
14
+ database: string;
15
+ readonly host: string;
16
+ readonly password: string;
17
+ readonly port: number;
18
+ readonly user: string;
19
+ readonly schema: string;
20
+ readonly poolSize = 2;
21
+ readonly ssl: PostgresSSLConfig;
22
+ }
23
+ declare class MysqlConfig {
24
+ database: string;
25
+ readonly host: string;
26
+ readonly password: string;
27
+ readonly port: number;
28
+ readonly user: string;
29
+ }
30
+ declare class SqliteConfig {
31
+ readonly database: string;
32
+ readonly poolSize: number;
33
+ readonly enableWAL: boolean;
34
+ readonly executeVacuumOnStartup: boolean;
35
+ }
36
+ export declare class DatabaseConfig {
37
+ type: 'sqlite' | 'mariadb' | 'mysqldb' | 'postgresdb';
38
+ readonly tablePrefix: string;
39
+ readonly logging: LoggingConfig;
40
+ readonly postgresdb: PostgresConfig;
41
+ readonly mysqldb: MysqlConfig;
42
+ readonly sqlite: SqliteConfig;
43
+ }
44
+ export {};
@@ -0,0 +1,207 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.DatabaseConfig = void 0;
13
+ const decorators_1 = require("../decorators");
14
+ let LoggingConfig = class LoggingConfig {
15
+ constructor() {
16
+ this.enabled = false;
17
+ this.options = 'error';
18
+ this.maxQueryExecutionTime = 0;
19
+ }
20
+ };
21
+ __decorate([
22
+ (0, decorators_1.Env)('DB_LOGGING_ENABLED'),
23
+ __metadata("design:type", Boolean)
24
+ ], LoggingConfig.prototype, "enabled", void 0);
25
+ __decorate([
26
+ (0, decorators_1.Env)('DB_LOGGING_OPTIONS'),
27
+ __metadata("design:type", String)
28
+ ], LoggingConfig.prototype, "options", void 0);
29
+ __decorate([
30
+ (0, decorators_1.Env)('DB_LOGGING_MAX_EXECUTION_TIME'),
31
+ __metadata("design:type", Number)
32
+ ], LoggingConfig.prototype, "maxQueryExecutionTime", void 0);
33
+ LoggingConfig = __decorate([
34
+ decorators_1.Config
35
+ ], LoggingConfig);
36
+ let PostgresSSLConfig = class PostgresSSLConfig {
37
+ constructor() {
38
+ this.enabled = false;
39
+ this.ca = '';
40
+ this.cert = '';
41
+ this.key = '';
42
+ this.rejectUnauthorized = true;
43
+ }
44
+ };
45
+ __decorate([
46
+ (0, decorators_1.Env)('DB_POSTGRESDB_SSL_ENABLED'),
47
+ __metadata("design:type", Boolean)
48
+ ], PostgresSSLConfig.prototype, "enabled", void 0);
49
+ __decorate([
50
+ (0, decorators_1.Env)('DB_POSTGRESDB_SSL_CA'),
51
+ __metadata("design:type", String)
52
+ ], PostgresSSLConfig.prototype, "ca", void 0);
53
+ __decorate([
54
+ (0, decorators_1.Env)('DB_POSTGRESDB_SSL_CERT'),
55
+ __metadata("design:type", String)
56
+ ], PostgresSSLConfig.prototype, "cert", void 0);
57
+ __decorate([
58
+ (0, decorators_1.Env)('DB_POSTGRESDB_SSL_KEY'),
59
+ __metadata("design:type", String)
60
+ ], PostgresSSLConfig.prototype, "key", void 0);
61
+ __decorate([
62
+ (0, decorators_1.Env)('DB_POSTGRESDB_SSL_REJECT_UNAUTHORIZED'),
63
+ __metadata("design:type", Boolean)
64
+ ], PostgresSSLConfig.prototype, "rejectUnauthorized", void 0);
65
+ PostgresSSLConfig = __decorate([
66
+ decorators_1.Config
67
+ ], PostgresSSLConfig);
68
+ let PostgresConfig = class PostgresConfig {
69
+ constructor() {
70
+ this.database = 'n8n';
71
+ this.host = 'localhost';
72
+ this.password = '';
73
+ this.port = 5432;
74
+ this.user = 'postgres';
75
+ this.schema = 'public';
76
+ this.poolSize = 2;
77
+ }
78
+ };
79
+ __decorate([
80
+ (0, decorators_1.Env)('DB_POSTGRESDB_DATABASE'),
81
+ __metadata("design:type", String)
82
+ ], PostgresConfig.prototype, "database", void 0);
83
+ __decorate([
84
+ (0, decorators_1.Env)('DB_POSTGRESDB_HOST'),
85
+ __metadata("design:type", String)
86
+ ], PostgresConfig.prototype, "host", void 0);
87
+ __decorate([
88
+ (0, decorators_1.Env)('DB_POSTGRESDB_PASSWORD'),
89
+ __metadata("design:type", String)
90
+ ], PostgresConfig.prototype, "password", void 0);
91
+ __decorate([
92
+ (0, decorators_1.Env)('DB_POSTGRESDB_PORT'),
93
+ __metadata("design:type", Number)
94
+ ], PostgresConfig.prototype, "port", void 0);
95
+ __decorate([
96
+ (0, decorators_1.Env)('DB_POSTGRESDB_USER'),
97
+ __metadata("design:type", String)
98
+ ], PostgresConfig.prototype, "user", void 0);
99
+ __decorate([
100
+ (0, decorators_1.Env)('DB_POSTGRESDB_SCHEMA'),
101
+ __metadata("design:type", String)
102
+ ], PostgresConfig.prototype, "schema", void 0);
103
+ __decorate([
104
+ (0, decorators_1.Env)('DB_POSTGRESDB_POOL_SIZE'),
105
+ __metadata("design:type", Object)
106
+ ], PostgresConfig.prototype, "poolSize", void 0);
107
+ __decorate([
108
+ decorators_1.Nested,
109
+ __metadata("design:type", PostgresSSLConfig)
110
+ ], PostgresConfig.prototype, "ssl", void 0);
111
+ PostgresConfig = __decorate([
112
+ decorators_1.Config
113
+ ], PostgresConfig);
114
+ let MysqlConfig = class MysqlConfig {
115
+ constructor() {
116
+ this.database = 'n8n';
117
+ this.host = 'localhost';
118
+ this.password = '';
119
+ this.port = 3306;
120
+ this.user = 'root';
121
+ }
122
+ };
123
+ __decorate([
124
+ (0, decorators_1.Env)('DB_MYSQLDB_DATABASE'),
125
+ __metadata("design:type", String)
126
+ ], MysqlConfig.prototype, "database", void 0);
127
+ __decorate([
128
+ (0, decorators_1.Env)('DB_MYSQLDB_HOST'),
129
+ __metadata("design:type", String)
130
+ ], MysqlConfig.prototype, "host", void 0);
131
+ __decorate([
132
+ (0, decorators_1.Env)('DB_MYSQLDB_PASSWORD'),
133
+ __metadata("design:type", String)
134
+ ], MysqlConfig.prototype, "password", void 0);
135
+ __decorate([
136
+ (0, decorators_1.Env)('DB_MYSQLDB_PORT'),
137
+ __metadata("design:type", Number)
138
+ ], MysqlConfig.prototype, "port", void 0);
139
+ __decorate([
140
+ (0, decorators_1.Env)('DB_MYSQLDB_USER'),
141
+ __metadata("design:type", String)
142
+ ], MysqlConfig.prototype, "user", void 0);
143
+ MysqlConfig = __decorate([
144
+ decorators_1.Config
145
+ ], MysqlConfig);
146
+ let SqliteConfig = class SqliteConfig {
147
+ constructor() {
148
+ this.database = 'database.sqlite';
149
+ this.poolSize = 0;
150
+ this.enableWAL = this.poolSize > 1;
151
+ this.executeVacuumOnStartup = false;
152
+ }
153
+ };
154
+ __decorate([
155
+ (0, decorators_1.Env)('DB_SQLITE_DATABASE'),
156
+ __metadata("design:type", String)
157
+ ], SqliteConfig.prototype, "database", void 0);
158
+ __decorate([
159
+ (0, decorators_1.Env)('DB_SQLITE_POOL_SIZE'),
160
+ __metadata("design:type", Number)
161
+ ], SqliteConfig.prototype, "poolSize", void 0);
162
+ __decorate([
163
+ (0, decorators_1.Env)('DB_SQLITE_ENABLE_WAL'),
164
+ __metadata("design:type", Boolean)
165
+ ], SqliteConfig.prototype, "enableWAL", void 0);
166
+ __decorate([
167
+ (0, decorators_1.Env)('DB_SQLITE_VACUUM_ON_STARTUP'),
168
+ __metadata("design:type", Boolean)
169
+ ], SqliteConfig.prototype, "executeVacuumOnStartup", void 0);
170
+ SqliteConfig = __decorate([
171
+ decorators_1.Config
172
+ ], SqliteConfig);
173
+ let DatabaseConfig = class DatabaseConfig {
174
+ constructor() {
175
+ this.type = 'sqlite';
176
+ this.tablePrefix = '';
177
+ }
178
+ };
179
+ exports.DatabaseConfig = DatabaseConfig;
180
+ __decorate([
181
+ (0, decorators_1.Env)('DB_TYPE'),
182
+ __metadata("design:type", String)
183
+ ], DatabaseConfig.prototype, "type", void 0);
184
+ __decorate([
185
+ (0, decorators_1.Env)('DB_TABLE_PREFIX'),
186
+ __metadata("design:type", String)
187
+ ], DatabaseConfig.prototype, "tablePrefix", void 0);
188
+ __decorate([
189
+ decorators_1.Nested,
190
+ __metadata("design:type", LoggingConfig)
191
+ ], DatabaseConfig.prototype, "logging", void 0);
192
+ __decorate([
193
+ decorators_1.Nested,
194
+ __metadata("design:type", PostgresConfig)
195
+ ], DatabaseConfig.prototype, "postgresdb", void 0);
196
+ __decorate([
197
+ decorators_1.Nested,
198
+ __metadata("design:type", MysqlConfig)
199
+ ], DatabaseConfig.prototype, "mysqldb", void 0);
200
+ __decorate([
201
+ decorators_1.Nested,
202
+ __metadata("design:type", SqliteConfig)
203
+ ], DatabaseConfig.prototype, "sqlite", void 0);
204
+ exports.DatabaseConfig = DatabaseConfig = __decorate([
205
+ decorators_1.Config
206
+ ], DatabaseConfig);
207
+ //# sourceMappingURL=database.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"database.js","sourceRoot":"","sources":["../../src/configs/database.ts"],"names":[],"mappings":"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"}
@@ -0,0 +1,25 @@
1
+ export declare class SmtpAuth {
2
+ readonly user: string;
3
+ readonly pass: string;
4
+ readonly serviceClient: string;
5
+ readonly privateKey: string;
6
+ }
7
+ export declare class SmtpConfig {
8
+ readonly host: string;
9
+ readonly port: number;
10
+ readonly secure: boolean;
11
+ readonly startTLS: boolean;
12
+ readonly sender: string;
13
+ readonly auth: SmtpAuth;
14
+ }
15
+ export declare class TemplateConfig {
16
+ readonly invite: string;
17
+ readonly passwordReset: string;
18
+ readonly workflowShared: string;
19
+ readonly credentialsShared: string;
20
+ }
21
+ export declare class EmailConfig {
22
+ readonly mode: '' | 'smtp';
23
+ readonly smtp: SmtpConfig;
24
+ readonly template: TemplateConfig;
25
+ }
@@ -0,0 +1,128 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.EmailConfig = exports.TemplateConfig = exports.SmtpConfig = exports.SmtpAuth = void 0;
13
+ const decorators_1 = require("../decorators");
14
+ let SmtpAuth = class SmtpAuth {
15
+ constructor() {
16
+ this.user = '';
17
+ this.pass = '';
18
+ this.serviceClient = '';
19
+ this.privateKey = '';
20
+ }
21
+ };
22
+ exports.SmtpAuth = SmtpAuth;
23
+ __decorate([
24
+ (0, decorators_1.Env)('N8N_SMTP_USER'),
25
+ __metadata("design:type", String)
26
+ ], SmtpAuth.prototype, "user", void 0);
27
+ __decorate([
28
+ (0, decorators_1.Env)('N8N_SMTP_PASS'),
29
+ __metadata("design:type", String)
30
+ ], SmtpAuth.prototype, "pass", void 0);
31
+ __decorate([
32
+ (0, decorators_1.Env)('N8N_SMTP_OAUTH_SERVICE_CLIENT'),
33
+ __metadata("design:type", String)
34
+ ], SmtpAuth.prototype, "serviceClient", void 0);
35
+ __decorate([
36
+ (0, decorators_1.Env)('N8N_SMTP_OAUTH_PRIVATE_KEY'),
37
+ __metadata("design:type", String)
38
+ ], SmtpAuth.prototype, "privateKey", void 0);
39
+ exports.SmtpAuth = SmtpAuth = __decorate([
40
+ decorators_1.Config
41
+ ], SmtpAuth);
42
+ let SmtpConfig = class SmtpConfig {
43
+ constructor() {
44
+ this.host = '';
45
+ this.port = 465;
46
+ this.secure = true;
47
+ this.startTLS = true;
48
+ this.sender = '';
49
+ }
50
+ };
51
+ exports.SmtpConfig = SmtpConfig;
52
+ __decorate([
53
+ (0, decorators_1.Env)('N8N_SMTP_HOST'),
54
+ __metadata("design:type", String)
55
+ ], SmtpConfig.prototype, "host", void 0);
56
+ __decorate([
57
+ (0, decorators_1.Env)('N8N_SMTP_PORT'),
58
+ __metadata("design:type", Number)
59
+ ], SmtpConfig.prototype, "port", void 0);
60
+ __decorate([
61
+ (0, decorators_1.Env)('N8N_SMTP_SSL'),
62
+ __metadata("design:type", Boolean)
63
+ ], SmtpConfig.prototype, "secure", void 0);
64
+ __decorate([
65
+ (0, decorators_1.Env)('N8N_SMTP_STARTTLS'),
66
+ __metadata("design:type", Boolean)
67
+ ], SmtpConfig.prototype, "startTLS", void 0);
68
+ __decorate([
69
+ (0, decorators_1.Env)('N8N_SMTP_SENDER'),
70
+ __metadata("design:type", String)
71
+ ], SmtpConfig.prototype, "sender", void 0);
72
+ __decorate([
73
+ decorators_1.Nested,
74
+ __metadata("design:type", SmtpAuth)
75
+ ], SmtpConfig.prototype, "auth", void 0);
76
+ exports.SmtpConfig = SmtpConfig = __decorate([
77
+ decorators_1.Config
78
+ ], SmtpConfig);
79
+ let TemplateConfig = class TemplateConfig {
80
+ constructor() {
81
+ this.invite = '';
82
+ this.passwordReset = '';
83
+ this.workflowShared = '';
84
+ this.credentialsShared = '';
85
+ }
86
+ };
87
+ exports.TemplateConfig = TemplateConfig;
88
+ __decorate([
89
+ (0, decorators_1.Env)('N8N_UM_EMAIL_TEMPLATES_INVITE'),
90
+ __metadata("design:type", String)
91
+ ], TemplateConfig.prototype, "invite", void 0);
92
+ __decorate([
93
+ (0, decorators_1.Env)('N8N_UM_EMAIL_TEMPLATES_PWRESET'),
94
+ __metadata("design:type", String)
95
+ ], TemplateConfig.prototype, "passwordReset", void 0);
96
+ __decorate([
97
+ (0, decorators_1.Env)('N8N_UM_EMAIL_TEMPLATES_WORKFLOW_SHARED'),
98
+ __metadata("design:type", String)
99
+ ], TemplateConfig.prototype, "workflowShared", void 0);
100
+ __decorate([
101
+ (0, decorators_1.Env)('N8N_UM_EMAIL_TEMPLATES_CREDENTIALS_SHARED'),
102
+ __metadata("design:type", String)
103
+ ], TemplateConfig.prototype, "credentialsShared", void 0);
104
+ exports.TemplateConfig = TemplateConfig = __decorate([
105
+ decorators_1.Config
106
+ ], TemplateConfig);
107
+ let EmailConfig = class EmailConfig {
108
+ constructor() {
109
+ this.mode = 'smtp';
110
+ }
111
+ };
112
+ exports.EmailConfig = EmailConfig;
113
+ __decorate([
114
+ (0, decorators_1.Env)('N8N_EMAIL_MODE'),
115
+ __metadata("design:type", String)
116
+ ], EmailConfig.prototype, "mode", void 0);
117
+ __decorate([
118
+ decorators_1.Nested,
119
+ __metadata("design:type", SmtpConfig)
120
+ ], EmailConfig.prototype, "smtp", void 0);
121
+ __decorate([
122
+ decorators_1.Nested,
123
+ __metadata("design:type", TemplateConfig)
124
+ ], EmailConfig.prototype, "template", void 0);
125
+ exports.EmailConfig = EmailConfig = __decorate([
126
+ decorators_1.Config
127
+ ], EmailConfig);
128
+ //# sourceMappingURL=email.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"email.js","sourceRoot":"","sources":["../../src/configs/email.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,8CAAoD;AAG7C,IAAM,QAAQ,GAAd,MAAM,QAAQ;IAAd;QAGG,SAAI,GAAW,EAAE,CAAC;QAIlB,SAAI,GAAW,EAAE,CAAC;QAIlB,kBAAa,GAAW,EAAE,CAAC;QAI3B,eAAU,GAAW,EAAE,CAAC;IAClC,CAAC;CAAA,CAAA;AAhBY,4BAAQ;AAGX;IADR,IAAA,gBAAG,EAAC,eAAe,CAAC;;sCACM;AAIlB;IADR,IAAA,gBAAG,EAAC,eAAe,CAAC;;sCACM;AAIlB;IADR,IAAA,gBAAG,EAAC,+BAA+B,CAAC;;+CACD;AAI3B;IADR,IAAA,gBAAG,EAAC,4BAA4B,CAAC;;4CACD;mBAfrB,QAAQ;IADpB,mBAAM;GACM,QAAQ,CAgBpB;AAGM,IAAM,UAAU,GAAhB,MAAM,UAAU;IAAhB;QAGG,SAAI,GAAW,EAAE,CAAC;QAIlB,SAAI,GAAW,GAAG,CAAC;QAInB,WAAM,GAAY,IAAI,CAAC;QAIvB,aAAQ,GAAY,IAAI,CAAC;QAIzB,WAAM,GAAW,EAAE,CAAC;IAI9B,CAAC;CAAA,CAAA;AAvBY,gCAAU;AAGb;IADR,IAAA,gBAAG,EAAC,eAAe,CAAC;;wCACM;AAIlB;IADR,IAAA,gBAAG,EAAC,eAAe,CAAC;;wCACO;AAInB;IADR,IAAA,gBAAG,EAAC,cAAc,CAAC;;0CACY;AAIvB;IADR,IAAA,gBAAG,EAAC,mBAAmB,CAAC;;4CACS;AAIzB;IADR,IAAA,gBAAG,EAAC,iBAAiB,CAAC;;0CACM;AAGpB;IADR,mBAAM;8BACQ,QAAQ;wCAAC;qBAtBZ,UAAU;IADtB,mBAAM;GACM,UAAU,CAuBtB;AAGM,IAAM,cAAc,GAApB,MAAM,cAAc;IAApB;QAGG,WAAM,GAAW,EAAE,CAAC;QAIpB,kBAAa,GAAW,EAAE,CAAC;QAI3B,mBAAc,GAAW,EAAE,CAAC;QAI5B,sBAAiB,GAAW,EAAE,CAAC;IACzC,CAAC;CAAA,CAAA;AAhBY,wCAAc;AAGjB;IADR,IAAA,gBAAG,EAAC,+BAA+B,CAAC;;8CACR;AAIpB;IADR,IAAA,gBAAG,EAAC,gCAAgC,CAAC;;qDACF;AAI3B;IADR,IAAA,gBAAG,EAAC,wCAAwC,CAAC;;sDACT;AAI5B;IADR,IAAA,gBAAG,EAAC,2CAA2C,CAAC;;yDACT;yBAf5B,cAAc;IAD1B,mBAAM;GACM,cAAc,CAgB1B;AAGM,IAAM,WAAW,GAAjB,MAAM,WAAW;IAAjB;QAGG,SAAI,GAAgB,MAAM,CAAC;IAOrC,CAAC;CAAA,CAAA;AAVY,kCAAW;AAGd;IADR,IAAA,gBAAG,EAAC,gBAAgB,CAAC;;yCACc;AAG3B;IADR,mBAAM;8BACQ,UAAU;yCAAC;AAGjB;IADR,mBAAM;8BACY,cAAc;6CAAC;sBATtB,WAAW;IADvB,mBAAM;GACM,WAAW,CAUvB"}
@@ -0,0 +1,4 @@
1
+ import 'reflect-metadata';
2
+ export declare const Config: ClassDecorator;
3
+ export declare const Nested: PropertyDecorator;
4
+ export declare const Env: (envName: string) => PropertyDecorator;
@@ -0,0 +1,67 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Env = exports.Nested = exports.Config = void 0;
4
+ require("reflect-metadata");
5
+ const fs_1 = require("fs");
6
+ const typedi_1 = require("typedi");
7
+ const globalMetadata = new Map();
8
+ const Config = (ConfigClass) => {
9
+ const factory = function () {
10
+ const config = new ConfigClass();
11
+ const classMetadata = globalMetadata.get(ConfigClass);
12
+ if (!classMetadata) {
13
+ throw new Error('Invalid config class: ' + ConfigClass.name);
14
+ }
15
+ for (const [key, { type, envName }] of classMetadata) {
16
+ if (typeof type === 'function' && globalMetadata.has(type)) {
17
+ config[key] = typedi_1.Container.get(type);
18
+ }
19
+ else if (envName) {
20
+ let value = process.env[envName];
21
+ const filePath = process.env[`${envName}_FILE`];
22
+ if (filePath) {
23
+ value = (0, fs_1.readFileSync)(filePath, 'utf8');
24
+ }
25
+ if (type === Number) {
26
+ value = Number(value);
27
+ if (isNaN(value)) {
28
+ value = undefined;
29
+ }
30
+ }
31
+ else if (type === Boolean) {
32
+ if (value !== 'true' && value !== 'false') {
33
+ value = undefined;
34
+ }
35
+ else {
36
+ value = value === 'true';
37
+ }
38
+ }
39
+ if (value !== undefined) {
40
+ config[key] = value;
41
+ }
42
+ }
43
+ }
44
+ return config;
45
+ };
46
+ return (0, typedi_1.Service)({ factory })(ConfigClass);
47
+ };
48
+ exports.Config = Config;
49
+ const Nested = (target, key) => {
50
+ var _a;
51
+ const ConfigClass = target.constructor;
52
+ const classMetadata = (_a = globalMetadata.get(ConfigClass)) !== null && _a !== void 0 ? _a : new Map();
53
+ const type = Reflect.getMetadata('design:type', target, key);
54
+ classMetadata.set(key, { type });
55
+ globalMetadata.set(ConfigClass, classMetadata);
56
+ };
57
+ exports.Nested = Nested;
58
+ const Env = (envName) => (target, key) => {
59
+ var _a;
60
+ const ConfigClass = target.constructor;
61
+ const classMetadata = (_a = globalMetadata.get(ConfigClass)) !== null && _a !== void 0 ? _a : new Map();
62
+ const type = Reflect.getMetadata('design:type', target, key);
63
+ classMetadata.set(key, { type, envName });
64
+ globalMetadata.set(ConfigClass, classMetadata);
65
+ };
66
+ exports.Env = Env;
67
+ //# sourceMappingURL=decorators.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"decorators.js","sourceRoot":"","sources":["../src/decorators.ts"],"names":[],"mappings":"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"}
@@ -0,0 +1,12 @@
1
+ import { CredentialsConfig } from './configs/credentials';
2
+ import { DatabaseConfig } from './configs/database';
3
+ import { EmailConfig } from './configs/email';
4
+ declare class UserManagementConfig {
5
+ emails: EmailConfig;
6
+ }
7
+ export declare class GlobalConfig {
8
+ database: DatabaseConfig;
9
+ credentials: CredentialsConfig;
10
+ userManagement: UserManagementConfig;
11
+ }
12
+ export {};
package/dist/index.js ADDED
@@ -0,0 +1,44 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.GlobalConfig = void 0;
13
+ const decorators_1 = require("./decorators");
14
+ const credentials_1 = require("./configs/credentials");
15
+ const database_1 = require("./configs/database");
16
+ const email_1 = require("./configs/email");
17
+ let UserManagementConfig = class UserManagementConfig {
18
+ };
19
+ __decorate([
20
+ decorators_1.Nested,
21
+ __metadata("design:type", email_1.EmailConfig)
22
+ ], UserManagementConfig.prototype, "emails", void 0);
23
+ UserManagementConfig = __decorate([
24
+ decorators_1.Config
25
+ ], UserManagementConfig);
26
+ let GlobalConfig = class GlobalConfig {
27
+ };
28
+ exports.GlobalConfig = GlobalConfig;
29
+ __decorate([
30
+ decorators_1.Nested,
31
+ __metadata("design:type", database_1.DatabaseConfig)
32
+ ], GlobalConfig.prototype, "database", void 0);
33
+ __decorate([
34
+ decorators_1.Nested,
35
+ __metadata("design:type", credentials_1.CredentialsConfig)
36
+ ], GlobalConfig.prototype, "credentials", void 0);
37
+ __decorate([
38
+ decorators_1.Nested,
39
+ __metadata("design:type", UserManagementConfig)
40
+ ], GlobalConfig.prototype, "userManagement", void 0);
41
+ exports.GlobalConfig = GlobalConfig = __decorate([
42
+ decorators_1.Config
43
+ ], GlobalConfig);
44
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6CAA8C;AAC9C,uDAA0D;AAC1D,iDAAoD;AACpD,2CAA8C;AAG9C,IAAM,oBAAoB,GAA1B,MAAM,oBAAoB;CAGzB,CAAA;AADA;IADC,mBAAM;8BACC,mBAAW;oDAAC;AAFf,oBAAoB;IADzB,mBAAM;GACD,oBAAoB,CAGzB;AAGM,IAAM,YAAY,GAAlB,MAAM,YAAY;CASxB,CAAA;AATY,oCAAY;AAExB;IADC,mBAAM;8BACG,yBAAc;8CAAC;AAGzB;IADC,mBAAM;8BACM,+BAAiB;iDAAC;AAG/B;IADC,mBAAM;8BACS,oBAAoB;oDAAC;uBARzB,YAAY;IADxB,mBAAM;GACM,YAAY,CASxB"}
package/package.json ADDED
@@ -0,0 +1,38 @@
1
+ {
2
+ "name": "@n8n/config",
3
+ "version": "1.1.0",
4
+ "main": "dist/index.js",
5
+ "module": "src/index.ts",
6
+ "types": "dist/index.d.ts",
7
+ "files": [
8
+ "dist/**/*",
9
+ "LICENSE.md",
10
+ "LICENSE_EE.md"
11
+ ],
12
+ "dependencies": {
13
+ "reflect-metadata": "0.2.2",
14
+ "typedi": "0.10.0"
15
+ },
16
+ "license": "SEE LICENSE IN LICENSE.md",
17
+ "homepage": "https://n8n.io",
18
+ "author": {
19
+ "name": "Jan Oberhauser",
20
+ "email": "jan@n8n.io"
21
+ },
22
+ "repository": {
23
+ "type": "git",
24
+ "url": "git+https://github.com/n8n-io/n8n.git"
25
+ },
26
+ "scripts": {
27
+ "clean": "rimraf dist .turbo",
28
+ "dev": "pnpm watch",
29
+ "typecheck": "tsc --noEmit",
30
+ "build": "tsc -p tsconfig.build.json",
31
+ "format": "prettier --write . --ignore-path ../../../.prettierignore",
32
+ "lint": "eslint .",
33
+ "lintfix": "eslint . --fix",
34
+ "watch": "tsc -p tsconfig.build.json --watch",
35
+ "test": "jest",
36
+ "test:dev": "jest --watch"
37
+ }
38
+ }