@rotty3000/config-node 0.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/.nvmrc +1 -0
- package/LICENSE +201 -0
- package/README.md +73 -0
- package/dist/config-lxc/index.d.ts +22 -0
- package/dist/config-lxc/index.js +57 -0
- package/dist/config-lxc/index.js.map +1 -0
- package/dist/config-node/index.d.ts +11 -0
- package/dist/config-node/index.js +314 -0
- package/dist/config-node/index.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +19 -0
- package/dist/index.js.map +1 -0
- package/package.json +48 -0
- package/rotty3000-config-node-0.1.0.tgz +0 -0
package/.nvmrc
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
v16.20.2
|
package/LICENSE
ADDED
|
@@ -0,0 +1,201 @@
|
|
|
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
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
+
|
|
180
|
+
To apply the Apache License to your work, attach the following
|
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
+
replaced with your own identifying information. (Don't include
|
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
+
comment syntax for the file format. We also recommend that a
|
|
185
|
+
file or class name and description of purpose be included on the
|
|
186
|
+
same "printed page" as the copyright notice for easier
|
|
187
|
+
identification within third-party archives.
|
|
188
|
+
|
|
189
|
+
Copyright [yyyy] [name of copyright owner]
|
|
190
|
+
|
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
+
you may not use this file except in compliance with the License.
|
|
193
|
+
You may obtain a copy of the License at
|
|
194
|
+
|
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
+
|
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
+
See the License for the specific language governing permissions and
|
|
201
|
+
limitations under the License.
|
package/README.md
ADDED
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
# config-node
|
|
2
|
+
A library for obtaining external configuration for your application.
|
|
3
|
+
|
|
4
|
+
## Usage
|
|
5
|
+
|
|
6
|
+
```typescript
|
|
7
|
+
import {lookupConfig, defaultConfig} from '@rotty3000/config-node';
|
|
8
|
+
|
|
9
|
+
// It's best not to store the value and to always look it up because some providers are able to invalidate their caches in order to give updated values
|
|
10
|
+
let value = lookupConfig('a.configuration.key');
|
|
11
|
+
|
|
12
|
+
// Setting a default value to be used when no provider can locate a configured value
|
|
13
|
+
|
|
14
|
+
// do this before any access for the key has been performed
|
|
15
|
+
defaultConfig('config.node.config.trees', ['/configtree']);
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## Sources of Configuration
|
|
19
|
+
|
|
20
|
+
The following configuration sources are used in order of precedence.
|
|
21
|
+
|
|
22
|
+
1. A JSON file `~/.config-node-devtools.json` in the user home directory which contains configuration keys (following example above `{"a.configuration.key": {"some.value": "foo"}`)
|
|
23
|
+
1. Command line arguments formatted as `--key=value`.
|
|
24
|
+
1. From command line argument `--application.json=<json>` where the inline JSON is structured as in 1.
|
|
25
|
+
1. Properties from the APPLICATION_JSON environment variable whose value is inline JSON
|
|
26
|
+
1. From individual environment variables (following name mangling rules):
|
|
27
|
+
* Replace dots (.) with underscores (_).
|
|
28
|
+
* Remove any dashes (-).
|
|
29
|
+
* Convert to uppercase.
|
|
30
|
+
|
|
31
|
+
e.g. the key `a.configuration.key` becomes an environment variable called `A_CONFIGURATION_KEY`
|
|
32
|
+
the key `a-configuration-key` becomes an environment variable called `ACONFIGURATIONKEY`
|
|
33
|
+
1. From config tree structured directories (a.k.a. Volume mounted ConfigMaps/Secrets) specified (as an array) in the configuration property `config.node.config.trees`.
|
|
34
|
+
|
|
35
|
+
Setting the configuration property `config.node.config.trees` (using any of the sources described in this list, for instance as an environment variable `CONFIG_NODE_CONFIG_TREES=/config-map`) indicates the directories where keys will be lookup (where key matches the file name).
|
|
36
|
+
|
|
37
|
+
e.g. given a Kubernetes ConfigMap or Secret mounted at `/config-map` with a data file located at `/config-map/a.config.map.key`, looking up the property `a.config.map.key` will return the contents of the file as the value.
|
|
38
|
+
1. From application profile property json files in `${CWD}/config/application-{profile}.json` where profile is set using the property `config.node.profiles.active` (using any of the sources described in this list, for instance as an environment variable `CONFIG_NODE_PROFILES_ACTIVE=test`).
|
|
39
|
+
1. From application profile property json files in `${CWD}/application-{profile}.json` where profile is set using the property `config.node.profiles.active` (using any of the sources described in this list, for instance as an environment variable `CONFIG_NODE_PROFILES_ACTIVE=test`).
|
|
40
|
+
1. From application property json files in `${CWD}/config/application.json`.
|
|
41
|
+
1. From application property json files in `${CWD}/application.json`.
|
|
42
|
+
1. From application property json files packaged with the node.js app (i.e. adjacent to the main script).
|
|
43
|
+
1. From programer provided defaults. As demonstrated in the sample code above a developer can pre-set values to act as the defaults when no other source provides a value.
|
|
44
|
+
|
|
45
|
+
e.g.
|
|
46
|
+
```typescript
|
|
47
|
+
defaultConfig('my.custom.config', 'some value');
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
## Custom Providers
|
|
51
|
+
|
|
52
|
+
Custom providers can be added as middle ware to without affecting other parts of the code.
|
|
53
|
+
|
|
54
|
+
```typescript
|
|
55
|
+
import {addProvider, ConfigProvider} from '@rotty3000/config-node';
|
|
56
|
+
|
|
57
|
+
const customProvider: ConfigProvider = {
|
|
58
|
+
description: "From a database, vault or whatever",
|
|
59
|
+
priority: 100,
|
|
60
|
+
get: (cache, key) => {
|
|
61
|
+
// if the work is hard, put the value in the local cache for better performance over repeated uses.
|
|
62
|
+
if (key == 'custom.key') {
|
|
63
|
+
return 'custom value';
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
cacheInvalid() {
|
|
67
|
+
// if your data source can change during runtime use this function to invalidate the local cache
|
|
68
|
+
return false;
|
|
69
|
+
},
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
addProvider(customProvider);
|
|
73
|
+
```
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export declare enum OAuthApplicationProfile {
|
|
2
|
+
HEADLESS_SERVER = 0,
|
|
3
|
+
USER_AGENT = 1
|
|
4
|
+
}
|
|
5
|
+
export interface LXCOAuthApplication {
|
|
6
|
+
readonly applicationType: OAuthApplicationProfile;
|
|
7
|
+
readonly audience: () => string;
|
|
8
|
+
readonly authorizationUri: () => string;
|
|
9
|
+
readonly clientId: () => string;
|
|
10
|
+
readonly clientSecret: () => string;
|
|
11
|
+
readonly introspectionUri: () => string;
|
|
12
|
+
readonly jwksUri: () => string;
|
|
13
|
+
readonly scopes: () => string[];
|
|
14
|
+
readonly tokenUri: () => string;
|
|
15
|
+
}
|
|
16
|
+
export interface LXCConfig {
|
|
17
|
+
readonly dxpDomains: () => string[];
|
|
18
|
+
readonly dxpMainDomain: () => string;
|
|
19
|
+
readonly dxpProtocol: () => string;
|
|
20
|
+
readonly oauthApplication: (erc: string) => LXCOAuthApplication;
|
|
21
|
+
}
|
|
22
|
+
export declare const lxcConfig: LXCConfig;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.lxcConfig = exports.OAuthApplicationProfile = void 0;
|
|
4
|
+
const config_node_1 = require("../config-node");
|
|
5
|
+
var OAuthApplicationProfile;
|
|
6
|
+
(function (OAuthApplicationProfile) {
|
|
7
|
+
OAuthApplicationProfile[OAuthApplicationProfile["HEADLESS_SERVER"] = 0] = "HEADLESS_SERVER";
|
|
8
|
+
OAuthApplicationProfile[OAuthApplicationProfile["USER_AGENT"] = 1] = "USER_AGENT";
|
|
9
|
+
})(OAuthApplicationProfile || (exports.OAuthApplicationProfile = OAuthApplicationProfile = {}));
|
|
10
|
+
const oauthApplications = new Map();
|
|
11
|
+
exports.lxcConfig = {
|
|
12
|
+
dxpDomains: () => (0, config_node_1.lookupConfig)('com.liferay.lxc.dxp.domains'),
|
|
13
|
+
dxpMainDomain: () => {
|
|
14
|
+
let value = (0, config_node_1.lookupConfig)('com.liferay.lxc.dxp.main.domain');
|
|
15
|
+
if (!value) {
|
|
16
|
+
value = (0, config_node_1.lookupConfig)('com.liferay.lxc.dxp.mainDomain');
|
|
17
|
+
}
|
|
18
|
+
return value;
|
|
19
|
+
},
|
|
20
|
+
dxpProtocol: () => (0, config_node_1.lookupConfig)('com.liferay.lxc.dxp.server.protocol'),
|
|
21
|
+
oauthApplication: (erc) => {
|
|
22
|
+
let oauthApplication = oauthApplications.get(erc);
|
|
23
|
+
if (oauthApplication) {
|
|
24
|
+
return oauthApplication;
|
|
25
|
+
}
|
|
26
|
+
let ercs = (0, config_node_1.lookupConfig)('liferay.oauth.application.external.reference.codes');
|
|
27
|
+
if (ercs) {
|
|
28
|
+
ercs = Array.isArray(ercs) ? ercs : [ercs];
|
|
29
|
+
}
|
|
30
|
+
if (ercs.includes(erc)) {
|
|
31
|
+
let applicationType = OAuthApplicationProfile.USER_AGENT;
|
|
32
|
+
if ((0, config_node_1.lookupConfig)(`${erc}.oauth2.headless.server.client.id`)) {
|
|
33
|
+
applicationType = OAuthApplicationProfile.HEADLESS_SERVER;
|
|
34
|
+
}
|
|
35
|
+
oauthApplication = {
|
|
36
|
+
applicationType,
|
|
37
|
+
audience: () => (applicationType === OAuthApplicationProfile.HEADLESS_SERVER ?
|
|
38
|
+
(0, config_node_1.lookupConfig)(`${erc}.oauth2.headless.server.audience`) :
|
|
39
|
+
(0, config_node_1.lookupConfig)(`${erc}.oauth2.user.agent.audience`)),
|
|
40
|
+
authorizationUri: () => (0, config_node_1.lookupConfig)(`${erc}.oauth2.authorization.uri`),
|
|
41
|
+
clientId: () => (applicationType === OAuthApplicationProfile.HEADLESS_SERVER ?
|
|
42
|
+
(0, config_node_1.lookupConfig)(`${erc}.oauth2.headless.server.client.id`) :
|
|
43
|
+
(0, config_node_1.lookupConfig)(`${erc}.oauth2.user.agent.client.id`)),
|
|
44
|
+
clientSecret: () => (0, config_node_1.lookupConfig)(`${erc}.oauth2.headless.server.client.secret`),
|
|
45
|
+
introspectionUri: () => (0, config_node_1.lookupConfig)(`${erc}.oauth2.introspection.uri`),
|
|
46
|
+
jwksUri: () => (0, config_node_1.lookupConfig)(`${erc}.oauth2.jwks.uri`),
|
|
47
|
+
scopes: () => (applicationType === OAuthApplicationProfile.HEADLESS_SERVER ?
|
|
48
|
+
(0, config_node_1.lookupConfig)(`${erc}.oauth2.headless.server.scopes`) :
|
|
49
|
+
(0, config_node_1.lookupConfig)(`${erc}.oauth2.user.agent.scopes`)),
|
|
50
|
+
tokenUri: () => (0, config_node_1.lookupConfig)(`${erc}.oauth2.token.uri`),
|
|
51
|
+
};
|
|
52
|
+
oauthApplications.set(erc, oauthApplication);
|
|
53
|
+
}
|
|
54
|
+
return oauthApplication;
|
|
55
|
+
},
|
|
56
|
+
};
|
|
57
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/config-lxc/index.ts"],"names":[],"mappings":";;;AAAA,gDAA4C;AAE5C,IAAY,uBAGX;AAHD,WAAY,uBAAuB;IACjC,2FAAe,CAAA;IACf,iFAAU,CAAA;AACZ,CAAC,EAHW,uBAAuB,uCAAvB,uBAAuB,QAGlC;AAqBD,MAAM,iBAAiB,GAAG,IAAI,GAAG,EAA+B,CAAC;AAEpD,QAAA,SAAS,GAAc;IAClC,UAAU,EAAE,GAAG,EAAE,CAAC,IAAA,0BAAY,EAAC,6BAA6B,CAAa;IACzE,aAAa,EAAE,GAAG,EAAE;QAClB,IAAI,KAAK,GAAG,IAAA,0BAAY,EAAC,iCAAiC,CAAW,CAAC;QACtE,IAAI,CAAC,KAAK,EAAE,CAAC;YACX,KAAK,GAAG,IAAA,0BAAY,EAAC,gCAAgC,CAAW,CAAC;QACnE,CAAC;QACD,OAAO,KAAK,CAAC;IACf,CAAC;IACD,WAAW,EAAE,GAAG,EAAE,CAAC,IAAA,0BAAY,EAAC,qCAAqC,CAAW;IAChF,gBAAgB,EAAE,CAAC,GAAW,EAAE,EAAE;QAChC,IAAI,gBAAgB,GAAG,iBAAiB,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;QAElD,IAAI,gBAAgB,EAAE,CAAC;YACrB,OAAO,gBAAgB,CAAC;QAC1B,CAAC;QAED,IAAI,IAAI,GAAG,IAAA,0BAAY,EAAC,oDAAoD,CAAC,CAAC;QAE9E,IAAI,IAAI,EAAE,CAAC;YACT,IAAI,GAAG,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;Q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C,GAAG,GAAG,2BAA2B,CAAC,CAAa;gBAC9D,QAAQ,EAAE,GAAG,EAAE,CAAC,IAAA,0BAAY,EAAC,GAAG,GAAG,mBAAmB,CAAW;aAClE,CAAC;YAEF,iBAAiB,CAAC,GAAG,CAAC,GAAG,EAAE,gBAAgB,CAAC,CAAC;QAC/C,CAAC;QAED,OAAO,gBAAgB,CAAC;IAC1B,CAAC;CACF,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export interface ConfigProvider {
|
|
2
|
+
readonly priority: number;
|
|
3
|
+
readonly description: string;
|
|
4
|
+
readonly get: (cache: Map<string, any>, k: string) => any;
|
|
5
|
+
readonly cacheInvalid: () => boolean;
|
|
6
|
+
}
|
|
7
|
+
export declare function setVerbose(b: boolean): void;
|
|
8
|
+
export declare function addProvider(provider: ConfigProvider): void;
|
|
9
|
+
export declare function clearCache(): void;
|
|
10
|
+
export declare function defaultConfig(key: string, value: any): void;
|
|
11
|
+
export declare function lookupConfig(key: string): string | string[] | undefined;
|
|
@@ -0,0 +1,314 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.lookupConfig = exports.defaultConfig = exports.clearCache = exports.addProvider = exports.setVerbose = void 0;
|
|
7
|
+
const node_path_1 = __importDefault(require("node:path"));
|
|
8
|
+
const fs_1 = __importDefault(require("fs"));
|
|
9
|
+
const os_1 = __importDefault(require("os"));
|
|
10
|
+
let verbose = false;
|
|
11
|
+
function setVerbose(b) {
|
|
12
|
+
verbose = b;
|
|
13
|
+
}
|
|
14
|
+
exports.setVerbose = setVerbose;
|
|
15
|
+
class ConfigProviderHolder {
|
|
16
|
+
constructor(provider) {
|
|
17
|
+
this.provider = provider;
|
|
18
|
+
this.priority = this.provider.priority;
|
|
19
|
+
this.cache = new Map;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
const configProviders = [];
|
|
23
|
+
const commonCache = new Map();
|
|
24
|
+
const protectedKeys = [
|
|
25
|
+
'config.node.config.trees',
|
|
26
|
+
'config.node.profiles.active'
|
|
27
|
+
];
|
|
28
|
+
function addProvider(provider) {
|
|
29
|
+
configProviders.push(new ConfigProviderHolder(provider));
|
|
30
|
+
configProviders.sort(compareProviders);
|
|
31
|
+
}
|
|
32
|
+
exports.addProvider = addProvider;
|
|
33
|
+
function clearCache() {
|
|
34
|
+
configProviders.forEach(configProvider => configProvider.cache.clear());
|
|
35
|
+
commonCache.clear();
|
|
36
|
+
}
|
|
37
|
+
exports.clearCache = clearCache;
|
|
38
|
+
addProvider({
|
|
39
|
+
description: "From ~/.config-node-devtools.json",
|
|
40
|
+
priority: 11000,
|
|
41
|
+
get: (cache, key) => computeIfAbsent(cache, key, () => {
|
|
42
|
+
const homedir = computeIfAbsent(commonCache, 'homedir', () => os_1.default.homedir());
|
|
43
|
+
const filePath = node_path_1.default.join(homedir, '.config-node-devtools.json');
|
|
44
|
+
if (fs_1.default.existsSync(filePath)) {
|
|
45
|
+
const json = computeIfAbsent(cache, filePath, () => JSON.parse(fs_1.default.readFileSync(filePath, 'utf8')));
|
|
46
|
+
if (json) {
|
|
47
|
+
return unquote(json[key]);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}),
|
|
51
|
+
cacheInvalid() {
|
|
52
|
+
return false;
|
|
53
|
+
},
|
|
54
|
+
});
|
|
55
|
+
addProvider({
|
|
56
|
+
description: "From command line arguments (--key=value)",
|
|
57
|
+
priority: 1000,
|
|
58
|
+
get: (cache, key) => computeIfAbsent(cache, `process.args.${key}`, () => {
|
|
59
|
+
const prefix = `--${key}=`;
|
|
60
|
+
for (var arg of process.argv) {
|
|
61
|
+
if (arg.startsWith(prefix)) {
|
|
62
|
+
const value = arg.substring(prefix.length);
|
|
63
|
+
return unquote(value);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
return undefined;
|
|
67
|
+
}),
|
|
68
|
+
cacheInvalid() {
|
|
69
|
+
return false;
|
|
70
|
+
},
|
|
71
|
+
});
|
|
72
|
+
addProvider({
|
|
73
|
+
description: "From command line argument (--application.json=<json>)",
|
|
74
|
+
priority: 9000,
|
|
75
|
+
get: (cache, key) => computeIfAbsent(cache, `process.args.${key}`, () => {
|
|
76
|
+
const prefix = `--application.json=`;
|
|
77
|
+
for (var arg of process.argv) {
|
|
78
|
+
if (arg.startsWith(prefix)) {
|
|
79
|
+
const value = JSON.parse(arg.substring(prefix.length));
|
|
80
|
+
return unquote(value[key]);
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
return undefined;
|
|
84
|
+
}),
|
|
85
|
+
cacheInvalid() {
|
|
86
|
+
return false;
|
|
87
|
+
},
|
|
88
|
+
});
|
|
89
|
+
addProvider({
|
|
90
|
+
description: "Properties from APPLICATION_JSON (inline JSON embedded in an environment variable)",
|
|
91
|
+
priority: 8000,
|
|
92
|
+
get: (cache, key) => computeIfAbsent(cache, key, () => {
|
|
93
|
+
if (process.env.APPLICATION_JSON) {
|
|
94
|
+
const json = computeIfAbsent(cache, `process.env.APPLICATION_JSON`, () => JSON.parse(process.env.APPLICATION_JSON));
|
|
95
|
+
if (json) {
|
|
96
|
+
return unquote(json[key]);
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
}),
|
|
100
|
+
cacheInvalid() {
|
|
101
|
+
return false;
|
|
102
|
+
},
|
|
103
|
+
});
|
|
104
|
+
addProvider({
|
|
105
|
+
description: "From environment variables (following name mangling rules)",
|
|
106
|
+
priority: 7000,
|
|
107
|
+
get: (cache, key) => computeIfAbsent(cache, `process.env:${key}`, () => {
|
|
108
|
+
let modifiedKey = key.replace(/\./gi, '_');
|
|
109
|
+
modifiedKey = modifiedKey.replace(/-/gi, '');
|
|
110
|
+
modifiedKey = modifiedKey.toUpperCase();
|
|
111
|
+
return unquote(process.env[modifiedKey]);
|
|
112
|
+
}),
|
|
113
|
+
cacheInvalid() {
|
|
114
|
+
return false;
|
|
115
|
+
},
|
|
116
|
+
});
|
|
117
|
+
addProvider({
|
|
118
|
+
description: "From config tree directories (a.k.a. Volume mounted ConfigMaps/Secrets)",
|
|
119
|
+
priority: 6000,
|
|
120
|
+
get: (cache, key) => {
|
|
121
|
+
if (protectedKeys.includes(key)) {
|
|
122
|
+
return;
|
|
123
|
+
}
|
|
124
|
+
let configtrees = lookupConfig('config.node.config.trees');
|
|
125
|
+
if (!configtrees) {
|
|
126
|
+
return;
|
|
127
|
+
}
|
|
128
|
+
configtrees = Array.isArray(configtrees) ? configtrees : [configtrees];
|
|
129
|
+
return computeIfAbsent(cache, `configtree:${key}`, () => {
|
|
130
|
+
for (var configtree of configtrees) {
|
|
131
|
+
const configtreeEntry = node_path_1.default.join(configtree, key);
|
|
132
|
+
if (fs_1.default.existsSync(configtreeEntry)) {
|
|
133
|
+
return unquote(fs_1.default.readFileSync(configtreeEntry, 'utf8'));
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
});
|
|
137
|
+
},
|
|
138
|
+
cacheInvalid() {
|
|
139
|
+
return false;
|
|
140
|
+
},
|
|
141
|
+
});
|
|
142
|
+
addProvider({
|
|
143
|
+
description: "From application profile property json files in ${CWD}/config",
|
|
144
|
+
priority: 5000,
|
|
145
|
+
get: (cache, key) => {
|
|
146
|
+
if (protectedKeys.includes(key)) {
|
|
147
|
+
return;
|
|
148
|
+
}
|
|
149
|
+
let profile = lookupConfig('config.node.profiles.active');
|
|
150
|
+
if (!profile) {
|
|
151
|
+
return;
|
|
152
|
+
}
|
|
153
|
+
profile = Array.isArray(profile) ? profile[profile.length - 1] : profile;
|
|
154
|
+
const cwd = computeIfAbsent(commonCache, 'cwd', () => process.cwd());
|
|
155
|
+
const configPath = node_path_1.default.join(cwd, 'config', `application-${profile}.json`);
|
|
156
|
+
const json = computeIfAbsent(cache, configPath, () => JSON.parse(fs_1.default.readFileSync(configPath, 'utf8')));
|
|
157
|
+
if (json) {
|
|
158
|
+
return unquote(json[key]);
|
|
159
|
+
}
|
|
160
|
+
},
|
|
161
|
+
cacheInvalid() {
|
|
162
|
+
return false;
|
|
163
|
+
},
|
|
164
|
+
});
|
|
165
|
+
addProvider({
|
|
166
|
+
description: "From application profile property json files in ${CWD}",
|
|
167
|
+
priority: 4000,
|
|
168
|
+
get: (cache, key) => {
|
|
169
|
+
if (key === 'config.node.profiles.active') {
|
|
170
|
+
return;
|
|
171
|
+
}
|
|
172
|
+
let profile = lookupConfig('config.node.profiles.active');
|
|
173
|
+
if (!profile) {
|
|
174
|
+
return;
|
|
175
|
+
}
|
|
176
|
+
profile = Array.isArray(profile) ? profile[profile.length - 1] : profile;
|
|
177
|
+
const cwd = computeIfAbsent(commonCache, 'cwd', () => process.cwd());
|
|
178
|
+
const configPath = node_path_1.default.join(cwd, `application-${profile}.json`);
|
|
179
|
+
const json = computeIfAbsent(cache, configPath, () => JSON.parse(fs_1.default.readFileSync(configPath, 'utf8')));
|
|
180
|
+
if (json) {
|
|
181
|
+
return unquote(json[key]);
|
|
182
|
+
}
|
|
183
|
+
},
|
|
184
|
+
cacheInvalid() {
|
|
185
|
+
return false;
|
|
186
|
+
},
|
|
187
|
+
});
|
|
188
|
+
addProvider({
|
|
189
|
+
description: "From application property json files in ${CWD}/config",
|
|
190
|
+
priority: 3000,
|
|
191
|
+
get: (cache, key) => {
|
|
192
|
+
const cwd = computeIfAbsent(commonCache, 'cwd', () => process.cwd());
|
|
193
|
+
const configPath = node_path_1.default.join(cwd, 'config', 'application.json');
|
|
194
|
+
if (fs_1.default.existsSync(configPath)) {
|
|
195
|
+
const json = computeIfAbsent(cache, configPath, () => JSON.parse(fs_1.default.readFileSync(configPath, 'utf8')));
|
|
196
|
+
if (json) {
|
|
197
|
+
return unquote(json[key]);
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
},
|
|
201
|
+
cacheInvalid() {
|
|
202
|
+
return false;
|
|
203
|
+
},
|
|
204
|
+
});
|
|
205
|
+
addProvider({
|
|
206
|
+
description: "From application property json files in ${CWD}",
|
|
207
|
+
priority: 2000,
|
|
208
|
+
get: (cache, key) => {
|
|
209
|
+
const cwd = computeIfAbsent(commonCache, 'cwd', () => process.cwd());
|
|
210
|
+
const configPath = node_path_1.default.join(cwd, 'application.json');
|
|
211
|
+
if (fs_1.default.existsSync(configPath)) {
|
|
212
|
+
const json = computeIfAbsent(cache, configPath, () => JSON.parse(fs_1.default.readFileSync(configPath, 'utf8')));
|
|
213
|
+
if (json) {
|
|
214
|
+
return unquote(json[key]);
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
},
|
|
218
|
+
cacheInvalid() {
|
|
219
|
+
return false;
|
|
220
|
+
},
|
|
221
|
+
});
|
|
222
|
+
addProvider({
|
|
223
|
+
description: "From application property json files packaged with the app",
|
|
224
|
+
priority: 1000,
|
|
225
|
+
get: (cache, key) => {
|
|
226
|
+
const mainPath = computeIfAbsent(commonCache, 'require.main.path', () => { var _a; return (_a = require.main) === null || _a === void 0 ? void 0 : _a.path; });
|
|
227
|
+
const configPath = node_path_1.default.join(mainPath, 'application.json');
|
|
228
|
+
if (fs_1.default.existsSync(configPath)) {
|
|
229
|
+
const json = computeIfAbsent(cache, configPath, () => JSON.parse(fs_1.default.readFileSync(configPath, 'utf8')));
|
|
230
|
+
if (json) {
|
|
231
|
+
return unquote(json[key]);
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
},
|
|
235
|
+
cacheInvalid() {
|
|
236
|
+
return false;
|
|
237
|
+
},
|
|
238
|
+
});
|
|
239
|
+
addProvider({
|
|
240
|
+
description: "From programer provided defaults",
|
|
241
|
+
priority: -100,
|
|
242
|
+
get: (cache, key) => commonCache.get(key),
|
|
243
|
+
cacheInvalid() {
|
|
244
|
+
return false;
|
|
245
|
+
},
|
|
246
|
+
});
|
|
247
|
+
function compareProviders(a, b) {
|
|
248
|
+
if (a.priority < b.priority) {
|
|
249
|
+
return 1;
|
|
250
|
+
}
|
|
251
|
+
if (a.priority > b.priority) {
|
|
252
|
+
return -1;
|
|
253
|
+
}
|
|
254
|
+
return 0;
|
|
255
|
+
}
|
|
256
|
+
function computeIfAbsent(cache, key, fn) {
|
|
257
|
+
let value = cache.get(key);
|
|
258
|
+
if (!value) {
|
|
259
|
+
try {
|
|
260
|
+
value = fn();
|
|
261
|
+
}
|
|
262
|
+
catch (e) {
|
|
263
|
+
verbose && console.error(e);
|
|
264
|
+
}
|
|
265
|
+
if (value) {
|
|
266
|
+
verbose && console.info(`computed value of '${key}' as '${value}'`);
|
|
267
|
+
cache.set(key, value);
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
return value;
|
|
271
|
+
}
|
|
272
|
+
function unquote(it) {
|
|
273
|
+
if (typeof it === "string") {
|
|
274
|
+
if (it.startsWith('"') && it.endsWith('"')) {
|
|
275
|
+
return it.slice(1, -1);
|
|
276
|
+
}
|
|
277
|
+
else if (it.startsWith('\'') && it.endsWith('\'')) {
|
|
278
|
+
return it.slice(1, -1);
|
|
279
|
+
}
|
|
280
|
+
if (it.includes(',')) {
|
|
281
|
+
return it.split(',');
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
return it;
|
|
285
|
+
}
|
|
286
|
+
function defaultConfig(key, value) {
|
|
287
|
+
commonCache.set(key, value);
|
|
288
|
+
}
|
|
289
|
+
exports.defaultConfig = defaultConfig;
|
|
290
|
+
function lookupConfig(key) {
|
|
291
|
+
let value;
|
|
292
|
+
for (var holder of configProviders) {
|
|
293
|
+
if (holder.provider.cacheInvalid()) {
|
|
294
|
+
holder.cache.clear();
|
|
295
|
+
}
|
|
296
|
+
value = holder.provider.get(holder.cache, key);
|
|
297
|
+
if (typeof value === 'string') {
|
|
298
|
+
return value;
|
|
299
|
+
}
|
|
300
|
+
else if (Array.isArray(value)) {
|
|
301
|
+
if (value.length > 0 && typeof value[0] === 'string') {
|
|
302
|
+
return value;
|
|
303
|
+
}
|
|
304
|
+
else {
|
|
305
|
+
return [];
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
else if (value) {
|
|
309
|
+
return JSON.stringify(value);
|
|
310
|
+
}
|
|
311
|
+
}
|
|
312
|
+
}
|
|
313
|
+
exports.lookupConfig = lookupConfig;
|
|
314
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/config-node/index.ts"],"names":[],"mappings":";;;;;;AAAA,0DAA6B;AAC7B,4CAAoB;AACpB,4CAAoB;AASpB,IAAI,OAAO,GAAY,KAAK,CAAC;AAE7B,SAAgB,UAAU,CAAC,CAAW;IACpC,OAAO,GAAG,CAAC,CAAC;AACd,CAAC;AAFD,gCAEC;AAED,MAAM,oBAAoB;IAKxB,YAAY,QAAwB;QAClC,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAA;QACtC,IAAI,CAAC,KAAK,GAAG,IAAI,GAAgB,CAAC;IACpC,CAAC;CACF;AAED,MAAM,eAAe,GAA2B,EAAE,CAAC;AACnD,MAAM,WAAW,GAAG,IAAI,GAAG,EAAe,CAAC;AAC3C,MAAM,aAAa,GAAG;IACpB,0BAA0B;IAC1B,6BAA6B;CAC9B,CAAC;AAEF,SAAgB,WAAW,CAAC,QAAwB;IAClD,eAAe,CAAC,IAAI,CAAC,IAAI,oBAAoB,CAAC,QAAQ,CAAC,CAAC,CAAC;IACzD,eAAe,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC;AACzC,CAAC;AAHD,kCAGC;AAED,SAAgB,UAAU;IACxB,eAAe,CAAC,OAAO,CAAC,cAAc,CAAC,EAAE,CAAC,cAAc,CAAC,KAAK,CAAC,KAAK,EAAE,CAAC,CAAC;IACxE,WAAW,CAAC,KAAK,EAAE,CAAC;AACtB,CAAC;AAHD,gCAGC;AAED,WAAW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2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./config-node"), exports);
|
|
18
|
+
__exportStar(require("./config-lxc"), exports);
|
|
19
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,gDAA8B;AAC9B,+CAA6B"}
|
package/package.json
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@rotty3000/config-node",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "A library for obtaining external configuration for your application.",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"types": "dist/index.d.ts",
|
|
7
|
+
"scripts": {
|
|
8
|
+
"clean": "rm -rf dist",
|
|
9
|
+
"prepublish": "tsc",
|
|
10
|
+
"build": "tsc",
|
|
11
|
+
"run": "npm run clean && npm run build && node dist/src/index.js",
|
|
12
|
+
"test": "npm run clean && npm run build && ts-mocha test/*.ts"
|
|
13
|
+
},
|
|
14
|
+
"author": "Raymond Augé",
|
|
15
|
+
"license": "Apache-2.0",
|
|
16
|
+
"devDependencies": {
|
|
17
|
+
"@types/chai": "^4.3.11",
|
|
18
|
+
"@types/mocha": "^10.0.6",
|
|
19
|
+
"@types/node": "^20.10.4",
|
|
20
|
+
"@types/sinon": "^17.0.2",
|
|
21
|
+
"chai": "^4.3.10",
|
|
22
|
+
"copyfiles": "^2.4.1",
|
|
23
|
+
"mocha": "^10.2.0",
|
|
24
|
+
"sinon": "^17.0.1",
|
|
25
|
+
"ts-mocha": "^10.0.0",
|
|
26
|
+
"ts-node": "^10.9.2",
|
|
27
|
+
"typescript": "^5.3.3"
|
|
28
|
+
},
|
|
29
|
+
"directories": {
|
|
30
|
+
"example": "examples",
|
|
31
|
+
"test": "test"
|
|
32
|
+
},
|
|
33
|
+
"repository": {
|
|
34
|
+
"type": "git",
|
|
35
|
+
"url": "git+https://github.com/rotty3000/config-node.git"
|
|
36
|
+
},
|
|
37
|
+
"keywords": [
|
|
38
|
+
"external",
|
|
39
|
+
"configuration",
|
|
40
|
+
"kubernetes",
|
|
41
|
+
"properties",
|
|
42
|
+
"keys"
|
|
43
|
+
],
|
|
44
|
+
"bugs": {
|
|
45
|
+
"url": "https://github.com/rotty3000/config-node/issues"
|
|
46
|
+
},
|
|
47
|
+
"homepage": "https://github.com/rotty3000/config-node#readme"
|
|
48
|
+
}
|
|
Binary file
|