@twin.org/core 0.9.0-next.1 → 0.9.1-next.1
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.
|
@@ -15,25 +15,48 @@ export class EnvHelper {
|
|
|
15
15
|
*/
|
|
16
16
|
static envToJson(envVars, prefix) {
|
|
17
17
|
const result = {};
|
|
18
|
-
if (
|
|
18
|
+
if (Is.object(envVars)) {
|
|
19
19
|
if (Is.empty(prefix)) {
|
|
20
20
|
for (const envVar in envVars) {
|
|
21
21
|
if (Is.stringValue(envVars[envVar])) {
|
|
22
|
-
|
|
23
|
-
ObjectHelper.propertySet(result, camelCaseName, envVars[envVar]);
|
|
22
|
+
ObjectHelper.propertySet(result, EnvHelper.envVarKeyToJsonKey(envVar, prefix), envVars[envVar]);
|
|
24
23
|
}
|
|
25
24
|
}
|
|
26
25
|
}
|
|
27
26
|
else {
|
|
28
27
|
for (const envVar in envVars) {
|
|
29
28
|
if (envVar.startsWith(prefix) && Is.stringValue(envVars[envVar])) {
|
|
30
|
-
|
|
31
|
-
ObjectHelper.propertySet(result, camelCaseName, envVars[envVar]);
|
|
29
|
+
ObjectHelper.propertySet(result, EnvHelper.envVarKeyToJsonKey(envVar, prefix), envVars[envVar]);
|
|
32
30
|
}
|
|
33
31
|
}
|
|
34
32
|
}
|
|
35
33
|
}
|
|
36
34
|
return result;
|
|
37
35
|
}
|
|
36
|
+
/**
|
|
37
|
+
* Convert an environment variable key to a JSON key.
|
|
38
|
+
* @param envVarKey The environment variable key.
|
|
39
|
+
* @param prefix The prefix of the environment variable key, if not provided gets all.
|
|
40
|
+
* @returns The JSON key.
|
|
41
|
+
*/
|
|
42
|
+
static envVarKeyToJsonKey(envVarKey, prefix) {
|
|
43
|
+
if (Is.stringValue(prefix) && envVarKey.startsWith(prefix)) {
|
|
44
|
+
envVarKey = envVarKey.replace(prefix, "");
|
|
45
|
+
}
|
|
46
|
+
return StringHelper.camelCase(envVarKey.toLowerCase());
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Convert a JSON key to an environment variable key.
|
|
50
|
+
* @param jsonKey The JSON key.
|
|
51
|
+
* @param prefix The prefix of the environment variable key, if not provided gets all.
|
|
52
|
+
* @returns The environment variable key.
|
|
53
|
+
*/
|
|
54
|
+
static jsonKeyToEnvVarKey(jsonKey, prefix) {
|
|
55
|
+
const envVarKey = StringHelper.snakeCase(jsonKey).toUpperCase();
|
|
56
|
+
if (Is.stringValue(prefix)) {
|
|
57
|
+
return `${prefix}${envVarKey}`;
|
|
58
|
+
}
|
|
59
|
+
return envVarKey;
|
|
60
|
+
}
|
|
38
61
|
}
|
|
39
62
|
//# sourceMappingURL=envHelper.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"envHelper.js","sourceRoot":"","sources":["../../../src/helpers/envHelper.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AACvC,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,EAAE,EAAE,MAAM,gBAAgB,CAAC;AAEpC;;GAEG;AACH,MAAM,OAAO,SAAS;IACrB;;;;;OAKG;IACI,MAAM,CAAC,SAAS,CACtB,OAA6C,EAC7C,MAAe;QAEf,MAAM,MAAM,GAA6B,EAAE,CAAC;QAE5C,IAAI,
|
|
1
|
+
{"version":3,"file":"envHelper.js","sourceRoot":"","sources":["../../../src/helpers/envHelper.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AACvC,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,EAAE,EAAE,MAAM,gBAAgB,CAAC;AAEpC;;GAEG;AACH,MAAM,OAAO,SAAS;IACrB;;;;;OAKG;IACI,MAAM,CAAC,SAAS,CACtB,OAA6C,EAC7C,MAAe;QAEf,MAAM,MAAM,GAA6B,EAAE,CAAC;QAE5C,IAAI,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE,CAAC;YACxB,IAAI,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC,EAAE,CAAC;gBACtB,KAAK,MAAM,MAAM,IAAI,OAAO,EAAE,CAAC;oBAC9B,IAAI,EAAE,CAAC,WAAW,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC;wBACrC,YAAY,CAAC,WAAW,CACvB,MAAM,EACN,SAAS,CAAC,kBAAkB,CAAC,MAAM,EAAE,MAAM,CAAC,EAC5C,OAAO,CAAC,MAAM,CAAC,CACf,CAAC;oBACH,CAAC;gBACF,CAAC;YACF,CAAC;iBAAM,CAAC;gBACP,KAAK,MAAM,MAAM,IAAI,OAAO,EAAE,CAAC;oBAC9B,IAAI,MAAM,CAAC,UAAU,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC,WAAW,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC;wBAClE,YAAY,CAAC,WAAW,CACvB,MAAM,EACN,SAAS,CAAC,kBAAkB,CAAC,MAAM,EAAE,MAAM,CAAC,EAC5C,OAAO,CAAC,MAAM,CAAC,CACf,CAAC;oBACH,CAAC;gBACF,CAAC;YACF,CAAC;QACF,CAAC;QAED,OAAO,MAAW,CAAC;IACpB,CAAC;IAED;;;;;OAKG;IACI,MAAM,CAAC,kBAAkB,CAAC,SAAiB,EAAE,MAAe;QAClE,IAAI,EAAE,CAAC,WAAW,CAAC,MAAM,CAAC,IAAI,SAAS,CAAC,UAAU,CAAC,MAAM,CAAC,EAAE,CAAC;YAC5D,SAAS,GAAG,SAAS,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;QAC3C,CAAC;QACD,OAAO,YAAY,CAAC,SAAS,CAAC,SAAS,CAAC,WAAW,EAAE,CAAC,CAAC;IACxD,CAAC;IAED;;;;;OAKG;IACI,MAAM,CAAC,kBAAkB,CAAC,OAAe,EAAE,MAAe;QAChE,MAAM,SAAS,GAAG,YAAY,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,WAAW,EAAE,CAAC;QAChE,IAAI,EAAE,CAAC,WAAW,CAAC,MAAM,CAAC,EAAE,CAAC;YAC5B,OAAO,GAAG,MAAM,GAAG,SAAS,EAAE,CAAC;QAChC,CAAC;QACD,OAAO,SAAS,CAAC;IAClB,CAAC;CACD","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport { ObjectHelper } from \"./objectHelper.js\";\nimport { StringHelper } from \"./stringHelper.js\";\nimport { Is } from \"../utils/is.js\";\n\n/**\n * Environment variable helper.\n */\nexport class EnvHelper {\n\t/**\n\t * Get the environment variable as an object with camel cased names.\n\t * @param envVars The environment variables.\n\t * @param prefix The prefix of the environment variables, if not provided gets all.\n\t * @returns The object with camel cased names.\n\t */\n\tpublic static envToJson<T = { [id: string]: string }>(\n\t\tenvVars: { [id: string]: string | undefined },\n\t\tprefix?: string\n\t): T {\n\t\tconst result: { [id: string]: string } = {};\n\n\t\tif (Is.object(envVars)) {\n\t\t\tif (Is.empty(prefix)) {\n\t\t\t\tfor (const envVar in envVars) {\n\t\t\t\t\tif (Is.stringValue(envVars[envVar])) {\n\t\t\t\t\t\tObjectHelper.propertySet(\n\t\t\t\t\t\t\tresult,\n\t\t\t\t\t\t\tEnvHelper.envVarKeyToJsonKey(envVar, prefix),\n\t\t\t\t\t\t\tenvVars[envVar]\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tfor (const envVar in envVars) {\n\t\t\t\t\tif (envVar.startsWith(prefix) && Is.stringValue(envVars[envVar])) {\n\t\t\t\t\t\tObjectHelper.propertySet(\n\t\t\t\t\t\t\tresult,\n\t\t\t\t\t\t\tEnvHelper.envVarKeyToJsonKey(envVar, prefix),\n\t\t\t\t\t\t\tenvVars[envVar]\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn result as T;\n\t}\n\n\t/**\n\t * Convert an environment variable key to a JSON key.\n\t * @param envVarKey The environment variable key.\n\t * @param prefix The prefix of the environment variable key, if not provided gets all.\n\t * @returns The JSON key.\n\t */\n\tpublic static envVarKeyToJsonKey(envVarKey: string, prefix?: string): string {\n\t\tif (Is.stringValue(prefix) && envVarKey.startsWith(prefix)) {\n\t\t\tenvVarKey = envVarKey.replace(prefix, \"\");\n\t\t}\n\t\treturn StringHelper.camelCase(envVarKey.toLowerCase());\n\t}\n\n\t/**\n\t * Convert a JSON key to an environment variable key.\n\t * @param jsonKey The JSON key.\n\t * @param prefix The prefix of the environment variable key, if not provided gets all.\n\t * @returns The environment variable key.\n\t */\n\tpublic static jsonKeyToEnvVarKey(jsonKey: string, prefix?: string): string {\n\t\tconst envVarKey = StringHelper.snakeCase(jsonKey).toUpperCase();\n\t\tif (Is.stringValue(prefix)) {\n\t\t\treturn `${prefix}${envVarKey}`;\n\t\t}\n\t\treturn envVarKey;\n\t}\n}\n"]}
|
|
@@ -13,4 +13,18 @@ export declare class EnvHelper {
|
|
|
13
13
|
}>(envVars: {
|
|
14
14
|
[id: string]: string | undefined;
|
|
15
15
|
}, prefix?: string): T;
|
|
16
|
+
/**
|
|
17
|
+
* Convert an environment variable key to a JSON key.
|
|
18
|
+
* @param envVarKey The environment variable key.
|
|
19
|
+
* @param prefix The prefix of the environment variable key, if not provided gets all.
|
|
20
|
+
* @returns The JSON key.
|
|
21
|
+
*/
|
|
22
|
+
static envVarKeyToJsonKey(envVarKey: string, prefix?: string): string;
|
|
23
|
+
/**
|
|
24
|
+
* Convert a JSON key to an environment variable key.
|
|
25
|
+
* @param jsonKey The JSON key.
|
|
26
|
+
* @param prefix The prefix of the environment variable key, if not provided gets all.
|
|
27
|
+
* @returns The environment variable key.
|
|
28
|
+
*/
|
|
29
|
+
static jsonKeyToEnvVarKey(jsonKey: string, prefix?: string): string;
|
|
16
30
|
}
|
package/docs/changelog.md
CHANGED
|
@@ -1,5 +1,106 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.9.1-next.1](https://github.com/iotaledger/twin-framework/compare/core-v0.9.1-next.0...core-v0.9.1-next.1) (2026-06-25)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* add context id features ([#206](https://github.com/iotaledger/twin-framework/issues/206)) ([ef0d4ee](https://github.com/iotaledger/twin-framework/commit/ef0d4ee11a4f5fc6cc6f52a4958ce905c04ee13b))
|
|
9
|
+
* add duration support ([#362](https://github.com/iotaledger/twin-framework/issues/362)) ([24dbe8b](https://github.com/iotaledger/twin-framework/commit/24dbe8b208eb127a52024cb219d31d27731e9ae3))
|
|
10
|
+
* add factory.createIfExists ([aad5a53](https://github.com/iotaledger/twin-framework/commit/aad5a53cef1b1c2e04344ea46244d41e371dff9b))
|
|
11
|
+
* add Factory.getFactory ([ad6cd2d](https://github.com/iotaledger/twin-framework/commit/ad6cd2d30351c145c70212f8cce1b66d5e8a5235))
|
|
12
|
+
* add guard.dateString ([#335](https://github.com/iotaledger/twin-framework/issues/335)) ([a26a166](https://github.com/iotaledger/twin-framework/commit/a26a166eb1f62ece05b2432730cb7354feacecfc))
|
|
13
|
+
* add health method to components ([a88016d](https://github.com/iotaledger/twin-framework/commit/a88016d90d172413e5bc5238dc1b3e35f82fcc2c))
|
|
14
|
+
* add Is.class method ([4988205](https://github.com/iotaledger/twin-framework/commit/498820543e256a130b4888c958fe1d87ca865d7f))
|
|
15
|
+
* add isDefault option to factory registration ([a8a700b](https://github.com/iotaledger/twin-framework/commit/a8a700bb8ddaf7dd5097869a358b8fc5f7c40ce7))
|
|
16
|
+
* add mutex ([#316](https://github.com/iotaledger/twin-framework/issues/316)) ([1027e5a](https://github.com/iotaledger/twin-framework/commit/1027e5ac77aa9804178b4253abdeefd6f1c3d521))
|
|
17
|
+
* add objectHelper.split ([386830a](https://github.com/iotaledger/twin-framework/commit/386830a77f8e842a5b119be0983708e042c3b14b))
|
|
18
|
+
* add partial second support ([39bf087](https://github.com/iotaledger/twin-framework/commit/39bf087ddc113a9bf73e0d0e99f738f6f60c2f2d))
|
|
19
|
+
* add rsa cipher support ([7af6cc6](https://github.com/iotaledger/twin-framework/commit/7af6cc67512d3363bd4a2f2e87bd7733c2800147))
|
|
20
|
+
* add single occurrence array type ([e890e43](https://github.com/iotaledger/twin-framework/commit/e890e4399e75ae5097f3ad8b1007321cbb1ed4ac))
|
|
21
|
+
* add single occurrence array type ([#245](https://github.com/iotaledger/twin-framework/issues/245)) ([771dc78](https://github.com/iotaledger/twin-framework/commit/771dc78025b5546c9c9681be9494a76ab71171c6))
|
|
22
|
+
* add support for health i18n validation ([7a286dd](https://github.com/iotaledger/twin-framework/commit/7a286ddb0c1bfa498bf3a77126cd589042bad6de))
|
|
23
|
+
* add teardown to IComponent interface ([32c173c](https://github.com/iotaledger/twin-framework/commit/32c173cda115c20d3b4cee14b8a29cdc08e91555))
|
|
24
|
+
* add teardown to IComponent interface ([98ce864](https://github.com/iotaledger/twin-framework/commit/98ce8648e709310c4435de334825b381fb4e32cb))
|
|
25
|
+
* add typeName method to factory ([699fcbd](https://github.com/iotaledger/twin-framework/commit/699fcbd1168228401ddb81fdacb959b8cdc4206a))
|
|
26
|
+
* add uuidv7 support ([#219](https://github.com/iotaledger/twin-framework/issues/219)) ([916c657](https://github.com/iotaledger/twin-framework/commit/916c657d270ce99fafe554233739fdd9ca28635b))
|
|
27
|
+
* adding link header helper ([#225](https://github.com/iotaledger/twin-framework/issues/225)) ([703c072](https://github.com/iotaledger/twin-framework/commit/703c0725aceac6b6ec0c4fa729ef832d12fb3fd7))
|
|
28
|
+
* additional nameof operators ([a5aab60](https://github.com/iotaledger/twin-framework/commit/a5aab60bf66a86f1b7ff8af7c4f044cb03706d50))
|
|
29
|
+
* additional RSA methods and async ([1fceee2](https://github.com/iotaledger/twin-framework/commit/1fceee2d1248a24a7620846025fcf906495c07f4))
|
|
30
|
+
* bump version ([c5354fa](https://github.com/iotaledger/twin-framework/commit/c5354fa906f4493c70f2642a9175a66780a10636))
|
|
31
|
+
* configurable timeout for mutex ([2087e04](https://github.com/iotaledger/twin-framework/commit/2087e04464a110a3f009fbc8b066696ed6784fc2))
|
|
32
|
+
* env helper conversion methods ([e8c607e](https://github.com/iotaledger/twin-framework/commit/e8c607e59f6f79d4b1d562e9313babe348778835))
|
|
33
|
+
* eslint migration to flat config ([74427d7](https://github.com/iotaledger/twin-framework/commit/74427d78d342167f7850e49ab87269326355befe))
|
|
34
|
+
* expand error params to accept properties ([032e9fd](https://github.com/iotaledger/twin-framework/commit/032e9fd1388e457cde32ca1005dfe014a5a9c077))
|
|
35
|
+
* factory create and integrity ([#235](https://github.com/iotaledger/twin-framework/issues/235)) ([9f98b99](https://github.com/iotaledger/twin-framework/commit/9f98b99daf46eb365346fae49cc4ffba63e74cb3))
|
|
36
|
+
* health status grouping ([5007c29](https://github.com/iotaledger/twin-framework/commit/5007c29fe4123fe56f754450b993dbe5dc32a057))
|
|
37
|
+
* improve async cache edge cases ([4e57a6e](https://github.com/iotaledger/twin-framework/commit/4e57a6ec4113533b0ea903eae7d469200fa1348c))
|
|
38
|
+
* improve error formatting ([#313](https://github.com/iotaledger/twin-framework/issues/313)) ([5a19623](https://github.com/iotaledger/twin-framework/commit/5a196231bcbf088bf9ba92a93b7478d3b8c5593f))
|
|
39
|
+
* improve Is.function and ModuleHelper.getModuleMethod signatures ([ecf968b](https://github.com/iotaledger/twin-framework/commit/ecf968b02934b3676be4bf7cd2d1e7f8e7af6ce2))
|
|
40
|
+
* improve Is.function definition to retain types ([f20b6b0](https://github.com/iotaledger/twin-framework/commit/f20b6b0dd16e74b75dc359be72b05989305c6410))
|
|
41
|
+
* improve signatures ([45a7d58](https://github.com/iotaledger/twin-framework/commit/45a7d58baa5b6abc8c0735656f393d402fabb4ad))
|
|
42
|
+
* improve signatures ([cdd24be](https://github.com/iotaledger/twin-framework/commit/cdd24be6fb898d33955b6f2f93c3ddbd73582269))
|
|
43
|
+
* improve signatures ([2041ae2](https://github.com/iotaledger/twin-framework/commit/2041ae214cbd8d472d5e8be8d3403cd06a114040))
|
|
44
|
+
* improve signatures ([d8a0ee1](https://github.com/iotaledger/twin-framework/commit/d8a0ee16542134a3f8b0653065239f42045125b4))
|
|
45
|
+
* improve signatures ([1d084c5](https://github.com/iotaledger/twin-framework/commit/1d084c58c7eb41ae50b0ce80ce57e48a22dd3102))
|
|
46
|
+
* improve signatures ([#287](https://github.com/iotaledger/twin-framework/issues/287)) ([c9f38f0](https://github.com/iotaledger/twin-framework/commit/c9f38f00e1cea8759e1105b41872a650c66c00f4))
|
|
47
|
+
* is and coerce accept duration object ([51dffa1](https://github.com/iotaledger/twin-framework/commit/51dffa18066eb86a14c700d90d3c1bd8b322c0fc))
|
|
48
|
+
* locales validation ([#197](https://github.com/iotaledger/twin-framework/issues/197)) ([55fdadb](https://github.com/iotaledger/twin-framework/commit/55fdadb13595ce0047f787bd1d4135d429a99f12))
|
|
49
|
+
* mutex safe usage in browser ([#339](https://github.com/iotaledger/twin-framework/issues/339)) ([02d409f](https://github.com/iotaledger/twin-framework/commit/02d409f211e91267964208d58a27f29791715086))
|
|
50
|
+
* nodeIdentity optional in IComponent methods ([c78dc17](https://github.com/iotaledger/twin-framework/commit/c78dc17f4357d3e1ae40e415f468d3eae13e81f4))
|
|
51
|
+
* shared object buffer ([#355](https://github.com/iotaledger/twin-framework/issues/355)) ([70d82ea](https://github.com/iotaledger/twin-framework/commit/70d82ea8f43f01aa840ae90ee0b1f23b064a07c6))
|
|
52
|
+
* simplify factory options ([7f85a85](https://github.com/iotaledger/twin-framework/commit/7f85a8553dd3008364e8e1104f2e6f6b6595d77e))
|
|
53
|
+
* simplify StringHelper signature ([0390403](https://github.com/iotaledger/twin-framework/commit/039040344952f91ee3c671249bc0e1c8f3b38e17))
|
|
54
|
+
* typescript 6 update ([1d10f31](https://github.com/iotaledger/twin-framework/commit/1d10f31e6516ec622773f45e88af82fe749b384a))
|
|
55
|
+
* update dependencies ([4da77ab](https://github.com/iotaledger/twin-framework/commit/4da77ab30f499e52825ac5a76f51436ceb59c26e))
|
|
56
|
+
* update dependencies ([f3bd015](https://github.com/iotaledger/twin-framework/commit/f3bd015efd169196b7e0335f5cab876ba6ca1d75))
|
|
57
|
+
* urn random switched to using uuidv7 ([606c9a2](https://github.com/iotaledger/twin-framework/commit/606c9a2ed68a10fc7fc2bc5f93388c1b71033154))
|
|
58
|
+
* urn random switched to using uuidv7 ([6a29f8b](https://github.com/iotaledger/twin-framework/commit/6a29f8bd573d06992b7eaa027b1daf4c2a2e1e85))
|
|
59
|
+
* use cause instead of inner for errors ([1f4acc4](https://github.com/iotaledger/twin-framework/commit/1f4acc4d7a6b71a134d9547da9bf40de1e1e49da))
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
### Bug Fixes
|
|
63
|
+
|
|
64
|
+
* async thread lock ([97a96a5](https://github.com/iotaledger/twin-framework/commit/97a96a57f60c7b45a0ccbbfa1c43199b6e7512f9))
|
|
65
|
+
* ensure __decorate is defined for decorators ([103a563](https://github.com/iotaledger/twin-framework/commit/103a563ce01ebdef6240d2e590e7b026e8692684))
|
|
66
|
+
* improve exception handling in asyncCache ([c81b29b](https://github.com/iotaledger/twin-framework/commit/c81b29b660b152d2f0757d323430287e6491bf59))
|
|
67
|
+
* improve jsdoc comments ([f7c8e43](https://github.com/iotaledger/twin-framework/commit/f7c8e43fab9803dffa6461950d5b9979e25bcd24))
|
|
68
|
+
* linting ([b77511d](https://github.com/iotaledger/twin-framework/commit/b77511de8781707088b1beb4c92f12d7d6e0fd5f))
|
|
69
|
+
* mutex locking ([d5af3c1](https://github.com/iotaledger/twin-framework/commit/d5af3c1e66070f86408ba1410809689c6d22958b))
|
|
70
|
+
* pick non iterable keys ([399399a](https://github.com/iotaledger/twin-framework/commit/399399abfb8947c4eb235df527532ffe186986b3))
|
|
71
|
+
* prevent TOCTOU race in Mutex.getOrFetchLock for concurrent async callers ([#343](https://github.com/iotaledger/twin-framework/issues/343)) ([5238ad1](https://github.com/iotaledger/twin-framework/commit/5238ad1a68e24c69162204b02030c6686c15e9f4))
|
|
72
|
+
* remove misleading undefined from AsyncCache return type ([05b3291](https://github.com/iotaledger/twin-framework/commit/05b32914e03a63c7daf7b77952a2ebedb7ca7f6b))
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
### Dependencies
|
|
76
|
+
|
|
77
|
+
* The following workspace dependencies were updated
|
|
78
|
+
* dependencies
|
|
79
|
+
* @twin.org/nameof bumped from 0.9.1-next.0 to 0.9.1-next.1
|
|
80
|
+
* devDependencies
|
|
81
|
+
* @twin.org/nameof-transformer bumped from 0.9.1-next.0 to 0.9.1-next.1
|
|
82
|
+
* @twin.org/nameof-vitest-plugin bumped from 0.9.1-next.0 to 0.9.1-next.1
|
|
83
|
+
|
|
84
|
+
## [0.9.0](https://github.com/iotaledger/twin-framework/compare/core-v0.9.0...core-v0.9.0) (2026-06-22)
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
### Features
|
|
88
|
+
|
|
89
|
+
* release to production ([b24cba1](https://github.com/iotaledger/twin-framework/commit/b24cba1b6a969278d638e632590602ec881e49fb))
|
|
90
|
+
* release to production ([787287d](https://github.com/iotaledger/twin-framework/commit/787287d06ea8319657401589d61fff369310c422))
|
|
91
|
+
* release to production ([53f4843](https://github.com/iotaledger/twin-framework/commit/53f484326b2851d7a506d2620db24c4a65cee7b3))
|
|
92
|
+
* release to production ([56cda4d](https://github.com/iotaledger/twin-framework/commit/56cda4da93e978c5be19ec7cfd421ae2a7fe4147))
|
|
93
|
+
* release to production ([f7c6586](https://github.com/iotaledger/twin-framework/commit/f7c6586f6976b903b647b4c5ac5ad9421e0c9051))
|
|
94
|
+
* release to production ([829d53d](https://github.com/iotaledger/twin-framework/commit/829d53d3953b1e1b40b0243c04cfdfd3842aac7b))
|
|
95
|
+
* release to production ([5cf3a76](https://github.com/iotaledger/twin-framework/commit/5cf3a76a09eff2e6414d0cba846c7c37400a11d6))
|
|
96
|
+
* release to production ([#330](https://github.com/iotaledger/twin-framework/issues/330)) ([d73f565](https://github.com/iotaledger/twin-framework/commit/d73f565588d156d23ef49b2a5718973756f7a696))
|
|
97
|
+
* release to production ([#382](https://github.com/iotaledger/twin-framework/issues/382)) ([bbed01a](https://github.com/iotaledger/twin-framework/commit/bbed01a605ee9724bda77a0f7feab249118c2d90))
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
### Miscellaneous Chores
|
|
101
|
+
|
|
102
|
+
* release to production ([63cae24](https://github.com/iotaledger/twin-framework/commit/63cae2401f6c11f93b2a01260b665064e8bd28e0))
|
|
103
|
+
|
|
3
104
|
## [0.9.0-next.1](https://github.com/iotaledger/twin-framework/compare/core-v0.9.0-next.0...core-v0.9.0-next.1) (2026-06-22)
|
|
4
105
|
|
|
5
106
|
|
|
@@ -43,3 +43,59 @@ The prefix of the environment variables, if not provided gets all.
|
|
|
43
43
|
`T`
|
|
44
44
|
|
|
45
45
|
The object with camel cased names.
|
|
46
|
+
|
|
47
|
+
***
|
|
48
|
+
|
|
49
|
+
### envVarKeyToJsonKey() {#envvarkeytojsonkey}
|
|
50
|
+
|
|
51
|
+
> `static` **envVarKeyToJsonKey**(`envVarKey`, `prefix?`): `string`
|
|
52
|
+
|
|
53
|
+
Convert an environment variable key to a JSON key.
|
|
54
|
+
|
|
55
|
+
#### Parameters
|
|
56
|
+
|
|
57
|
+
##### envVarKey
|
|
58
|
+
|
|
59
|
+
`string`
|
|
60
|
+
|
|
61
|
+
The environment variable key.
|
|
62
|
+
|
|
63
|
+
##### prefix?
|
|
64
|
+
|
|
65
|
+
`string`
|
|
66
|
+
|
|
67
|
+
The prefix of the environment variable key, if not provided gets all.
|
|
68
|
+
|
|
69
|
+
#### Returns
|
|
70
|
+
|
|
71
|
+
`string`
|
|
72
|
+
|
|
73
|
+
The JSON key.
|
|
74
|
+
|
|
75
|
+
***
|
|
76
|
+
|
|
77
|
+
### jsonKeyToEnvVarKey() {#jsonkeytoenvvarkey}
|
|
78
|
+
|
|
79
|
+
> `static` **jsonKeyToEnvVarKey**(`jsonKey`, `prefix?`): `string`
|
|
80
|
+
|
|
81
|
+
Convert a JSON key to an environment variable key.
|
|
82
|
+
|
|
83
|
+
#### Parameters
|
|
84
|
+
|
|
85
|
+
##### jsonKey
|
|
86
|
+
|
|
87
|
+
`string`
|
|
88
|
+
|
|
89
|
+
The JSON key.
|
|
90
|
+
|
|
91
|
+
##### prefix?
|
|
92
|
+
|
|
93
|
+
`string`
|
|
94
|
+
|
|
95
|
+
The prefix of the environment variable key, if not provided gets all.
|
|
96
|
+
|
|
97
|
+
#### Returns
|
|
98
|
+
|
|
99
|
+
`string`
|
|
100
|
+
|
|
101
|
+
The environment variable key.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@twin.org/core",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.1-next.1",
|
|
4
4
|
"description": "Helper methods/classes for data type checking/validation/guarding/error handling",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"node": ">=20.0.0"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@twin.org/nameof": "0.9.
|
|
17
|
+
"@twin.org/nameof": "0.9.1-next.1",
|
|
18
18
|
"intl-messageformat": "11.2.8",
|
|
19
19
|
"rfc6902": "5.2.0"
|
|
20
20
|
},
|