@creator.co/wapi 1.3.13 → 1.3.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/package.json
CHANGED
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
* @property {boolean} [name.isRemote] - Indicates if the property is for remote use.
|
|
7
7
|
* @property {boolean} [name.required] - Indicates if the property is required.
|
|
8
8
|
* @property {string} [name.cachingPolicy] - The caching policy for the property.
|
|
9
|
+
* @property {string} [name.nameOverride] - The optional name override if the key differs
|
|
9
10
|
*/
|
|
10
11
|
export type ConfigurationSchema = {
|
|
11
12
|
[name: string]: {
|
|
@@ -15,6 +16,7 @@ export type ConfigurationSchema = {
|
|
|
15
16
|
required?: boolean;
|
|
16
17
|
noPrefix?: boolean;
|
|
17
18
|
cachingPolicy?: string;
|
|
19
|
+
nameOverride?: string;
|
|
18
20
|
};
|
|
19
21
|
};
|
|
20
22
|
/**
|
|
@@ -72,7 +72,7 @@ var Configuration = /** @class */ (function () {
|
|
|
72
72
|
var v = this.getCachedValue(propString);
|
|
73
73
|
v =
|
|
74
74
|
v ||
|
|
75
|
-
new EnvironmentVar_1.default(propString, EnvironmentVar_1.EnvironmentType.Local, !propSchema.required, !propSchema.noPrefix ? this.remotePrefix : '').syncResolve();
|
|
75
|
+
new EnvironmentVar_1.default(propSchema.nameOverride || propString, EnvironmentVar_1.EnvironmentType.Local, !propSchema.required, !propSchema.noPrefix ? this.remotePrefix : '').syncResolve();
|
|
76
76
|
this.cacheValue(propString, v, propSchema.cachingPolicy);
|
|
77
77
|
return v;
|
|
78
78
|
};
|
|
@@ -101,7 +101,7 @@ var Configuration = /** @class */ (function () {
|
|
|
101
101
|
this.cacheValue(propString, v_1, propSchema.cachingPolicy);
|
|
102
102
|
return [2 /*return*/, v_1];
|
|
103
103
|
}
|
|
104
|
-
return [4 /*yield*/, new EnvironmentVar_1.default(propString, propSchema.isSecure ? EnvironmentVar_1.EnvironmentType.SecureRemote : EnvironmentVar_1.EnvironmentType.PlainRemote, !propSchema.required, !propSchema.noPrefix ? this.remotePrefix : '').resolve()];
|
|
104
|
+
return [4 /*yield*/, new EnvironmentVar_1.default(propSchema.nameOverride || propString, propSchema.isSecure ? EnvironmentVar_1.EnvironmentType.SecureRemote : EnvironmentVar_1.EnvironmentType.PlainRemote, !propSchema.required, !propSchema.noPrefix ? this.remotePrefix : '').resolve()];
|
|
105
105
|
case 1:
|
|
106
106
|
// remote
|
|
107
107
|
v = _a.sent();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Configuration.js","sourceRoot":"","sources":["../../../src/Config/Configuration.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,qCAAsC;AACtC,+CAAgD;AAEhD,mDAAkE;AAElE,qCAAqC;AACrC,kCAAkC;AAClC;;;GAGG;AACH,IAAI,UAAU,GAAG,IAAI,QAAQ,EAAE,CAAA;
|
|
1
|
+
{"version":3,"file":"Configuration.js","sourceRoot":"","sources":["../../../src/Config/Configuration.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,qCAAsC;AACtC,+CAAgD;AAEhD,mDAAkE;AAElE,qCAAqC;AACrC,kCAAkC;AAClC;;;GAGG;AACH,IAAI,UAAU,GAAG,IAAI,QAAQ,EAAE,CAAA;AA6E/B;;;GAGG;AACH;IAkBE;;;;;OAKG;IACH,uBAAY,MAAS,EAAE,YAAoB;QACzC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAA;QACpB,IAAI,CAAC,YAAY,GAAG,YAAY,CAAA;IAClC,CAAC;IAED;;;;OAIG;IACI,2BAAG,GAAV,UAAW,QAAsD;QAC/D,IAAM,UAAU,GAAG,QAAkB,CAAA;QACrC,IAAM,UAAU,GAAG,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,CAAA;QAC1C,IAAI,CAAC,GAAG,IAAI,CAAC,cAAc,CAAC,UAAU,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EACpB,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,EAAE,CAC9C,CAAC,OAAO,EAAE,EAAA;;wBANX,SAAS;wBACT,CAAC,GAAG,SAKO,CAAA;wBACX,IAAI,CAAC,UAAU,CAAC,UAAU,EAAE,CAAC,EAAE,UAAU,CAAC,aAAa,CAAC,CAAA;wBACxD,sBAAO,CAAC,EAAA;;;;KACT;IAED;;;;OAIG;IACK,sCAAc,GAAtB,UAAuB,QAAgB;QACrC,OAAO,UAAU,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAA;IACjC,CAAC;IAED;;;;;;OAMG;IACK,kCAAU,GAAlB,UAAmB,QAAgB,EAAE,KAAU,EAAE,MAAqB;QAArB,uBAAA,EAAA,aAAqB;QACpE,UAAU,CAAC,GAAG,CAAC,QAAQ,EAAE,KAAK,EAAE,cAAc,CAAC,MAAM,EAAE,GAAG,CAAC,IAAI,EAAE,CAAC,CAAA;IACpE,CAAC;IAED;;;OAGG;IACK,kCAAU,GAAlB;QACE,UAAU,GAAG,IAAI,QAAQ,EAAE,CAAA;IAC7B,CAAC;IA9FD;;;;OAIG;IACqB,qBAAO,GAAY,OAAO,CAAC,GAAG,CAAC,QAAQ,IAAI,OAAO,CAAA;IA0F5E,oBAAC;CAAA,AA1GD,IA0GC;kBA1GoB,aAAa"}
|
package/package.json
CHANGED
|
@@ -19,6 +19,7 @@ let cacheStore = new MemCache()
|
|
|
19
19
|
* @property {boolean} [name.isRemote] - Indicates if the property is for remote use.
|
|
20
20
|
* @property {boolean} [name.required] - Indicates if the property is required.
|
|
21
21
|
* @property {string} [name.cachingPolicy] - The caching policy for the property.
|
|
22
|
+
* @property {string} [name.nameOverride] - The optional name override if the key differs
|
|
22
23
|
*/
|
|
23
24
|
export type ConfigurationSchema = {
|
|
24
25
|
[name: string]: {
|
|
@@ -28,6 +29,7 @@ export type ConfigurationSchema = {
|
|
|
28
29
|
required?: boolean
|
|
29
30
|
noPrefix?: boolean
|
|
30
31
|
cachingPolicy?: string
|
|
32
|
+
nameOverride?: string
|
|
31
33
|
}
|
|
32
34
|
}
|
|
33
35
|
|
|
@@ -129,7 +131,7 @@ export default class Configuration<T extends ConfigurationSchema> {
|
|
|
129
131
|
v =
|
|
130
132
|
v ||
|
|
131
133
|
new EnvironmentVar<string>(
|
|
132
|
-
propString,
|
|
134
|
+
propSchema.nameOverride || propString,
|
|
133
135
|
EnvironmentType.Local,
|
|
134
136
|
!propSchema.required,
|
|
135
137
|
!propSchema.noPrefix ? this.remotePrefix : ''
|
|
@@ -158,7 +160,7 @@ export default class Configuration<T extends ConfigurationSchema> {
|
|
|
158
160
|
}
|
|
159
161
|
// remote
|
|
160
162
|
v = await new EnvironmentVar<string>(
|
|
161
|
-
propString,
|
|
163
|
+
propSchema.nameOverride || propString,
|
|
162
164
|
propSchema.isSecure ? EnvironmentType.SecureRemote : EnvironmentType.PlainRemote,
|
|
163
165
|
!propSchema.required,
|
|
164
166
|
!propSchema.noPrefix ? this.remotePrefix : ''
|