@squide/env-vars 1.2.0 → 1.4.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/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,27 @@
|
|
|
1
1
|
# @squide/env-vars
|
|
2
2
|
|
|
3
|
+
## 1.4.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#302](https://github.com/workleap/wl-squide/pull/302) [`e55c60b`](https://github.com/workleap/wl-squide/commit/e55c60b8e5a3c258a5a7d667ce990f73021f8e5d) Thanks [@patricklafrance](https://github.com/patricklafrance)! - Improved the logging API.
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- Updated dependencies [[`e55c60b`](https://github.com/workleap/wl-squide/commit/e55c60b8e5a3c258a5a7d667ce990f73021f8e5d)]:
|
|
12
|
+
- @squide/core@5.7.0
|
|
13
|
+
|
|
14
|
+
## 1.3.0
|
|
15
|
+
|
|
16
|
+
### Minor Changes
|
|
17
|
+
|
|
18
|
+
- [#300](https://github.com/workleap/wl-squide/pull/300) [`8d3eae2`](https://github.com/workleap/wl-squide/commit/8d3eae2ee4dc0331f83047e3ef313c6abb15dc3f) Thanks [@patricklafrance](https://github.com/patricklafrance)! - Improved the logging API.
|
|
19
|
+
|
|
20
|
+
### Patch Changes
|
|
21
|
+
|
|
22
|
+
- Updated dependencies [[`8d3eae2`](https://github.com/workleap/wl-squide/commit/8d3eae2ee4dc0331f83047e3ef313c6abb15dc3f)]:
|
|
23
|
+
- @squide/core@5.6.0
|
|
24
|
+
|
|
3
25
|
## 1.2.0
|
|
4
26
|
|
|
5
27
|
### Minor Changes
|
|
@@ -20,7 +20,7 @@ class EnvironmentVariablesPlugin extends Plugin {
|
|
|
20
20
|
}
|
|
21
21
|
registerVariables(variables) {
|
|
22
22
|
this.#environmentVariablesRegistry.addVariables(variables);
|
|
23
|
-
this._runtime.logger.
|
|
23
|
+
this._runtime.logger.withText("[squide] The following environment variables has been registered:").withObject(variables).debug();
|
|
24
24
|
}
|
|
25
25
|
getVariable(key) {
|
|
26
26
|
return this.#environmentVariablesRegistry.getVariable(key);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EnvironmentVariablesPlugin.js","sources":["webpack://@squide/env-vars/./src/EnvironmentVariablesPlugin.ts"],"sourcesContent":["import { isNil, Plugin, type Runtime } from \"@squide/core\";\nimport { type EnvironmentVariables, EnvironmentVariablesRegistry, type EnvironmentVariablesRegistryKey, type EnvironmentVariablesRegistryValue } from \"./EnvironmentVariablesRegistry.ts\";\n\nexport const EnvironmentVariablesPluginName = \"env-vars-plugin\";\n\nexport class EnvironmentVariablesPlugin extends Plugin {\n readonly #environmentVariablesRegistry = new EnvironmentVariablesRegistry();\n\n constructor(runtime: Runtime) {\n super(EnvironmentVariablesPluginName, runtime);\n }\n\n registerVariable(key: EnvironmentVariablesRegistryKey, value: EnvironmentVariablesRegistryValue) {\n this.#environmentVariablesRegistry.add(key, value);\n\n this._runtime.logger.debug(`[squide] An environment variable for key \"${key}\" has been registered with the value \"${value}\".`);\n }\n\n registerVariables(variables: Partial<EnvironmentVariables>) {\n this.#environmentVariablesRegistry.addVariables(variables);\n\n this._runtime.logger.
|
|
1
|
+
{"version":3,"file":"EnvironmentVariablesPlugin.js","sources":["webpack://@squide/env-vars/./src/EnvironmentVariablesPlugin.ts"],"sourcesContent":["import { isNil, Plugin, type Runtime } from \"@squide/core\";\nimport { type EnvironmentVariables, EnvironmentVariablesRegistry, type EnvironmentVariablesRegistryKey, type EnvironmentVariablesRegistryValue } from \"./EnvironmentVariablesRegistry.ts\";\n\nexport const EnvironmentVariablesPluginName = \"env-vars-plugin\";\n\nexport class EnvironmentVariablesPlugin extends Plugin {\n readonly #environmentVariablesRegistry = new EnvironmentVariablesRegistry();\n\n constructor(runtime: Runtime) {\n super(EnvironmentVariablesPluginName, runtime);\n }\n\n registerVariable(key: EnvironmentVariablesRegistryKey, value: EnvironmentVariablesRegistryValue) {\n this.#environmentVariablesRegistry.add(key, value);\n\n this._runtime.logger.debug(`[squide] An environment variable for key \"${key}\" has been registered with the value \"${value}\".`);\n }\n\n registerVariables(variables: Partial<EnvironmentVariables>) {\n this.#environmentVariablesRegistry.addVariables(variables);\n\n this._runtime.logger\n .withText(\"[squide] The following environment variables has been registered:\")\n .withObject(variables)\n .debug();\n }\n\n getVariable(key: EnvironmentVariablesRegistryKey) {\n return this.#environmentVariablesRegistry.getVariable(key);\n }\n\n getVariables() {\n return this.#environmentVariablesRegistry.getVariables();\n }\n}\n\nexport function getEnvironmentVariablesPlugin(runtime: Runtime) {\n const plugin = runtime.getPlugin(EnvironmentVariablesPluginName);\n\n if (isNil(plugin)) {\n throw new Error(\"[squide] The getEnvironmentVariablesPlugin function is called but no EnvironmentVariablesPlugin instance has been registered with the runtime.\");\n }\n\n return plugin as EnvironmentVariablesPlugin;\n}\n"],"names":["isNil","Plugin","EnvironmentVariablesRegistry","EnvironmentVariablesPluginName","EnvironmentVariablesPlugin","runtime","key","value","variables","getEnvironmentVariablesPlugin","plugin","Error"],"mappings":";;;;;;;;AAA2D;AAC+H;AAEnL,MAAMG,iCAAiC,kBAAkB;AAEzD,MAAMC,mCAAmCH,MAAMA;IACzC,6BAA6B,GAAG,IAAIC,4BAA4BA,GAAG;IAE5E,YAAYG,OAAgB,CAAE;QAC1B,KAAK,CAACF,gCAAgCE;IAC1C;IAEA,iBAAiBC,GAAoC,EAAEC,KAAwC,EAAE;QAC7F,IAAI,CAAC,6BAA6B,CAAC,GAAG,CAACD,KAAKC;QAE5C,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,0CAA0C,EAAED,IAAI,sCAAsC,EAAEC,MAAM,EAAE,CAAC;IACjI;IAEA,kBAAkBC,SAAwC,EAAE;QACxD,IAAI,CAAC,6BAA6B,CAAC,YAAY,CAACA;QAEhD,IAAI,CAAC,QAAQ,CAAC,MAAM,CACf,QAAQ,CAAC,qEACT,UAAU,CAACA,WACX,KAAK;IACd;IAEA,YAAYF,GAAoC,EAAE;QAC9C,OAAO,IAAI,CAAC,6BAA6B,CAAC,WAAW,CAACA;IAC1D;IAEA,eAAe;QACX,OAAO,IAAI,CAAC,6BAA6B,CAAC,YAAY;IAC1D;AACJ;AAEO,SAASG,8BAA8BJ,OAAgB;IAC1D,MAAMK,SAASL,QAAQ,SAAS,CAACF;IAEjC,IAAIH,KAAKA,CAACU,SAAS;QACf,MAAM,IAAIC,MAAM;IACpB;IAEA,OAAOD;AACX"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@squide/env-vars",
|
|
3
3
|
"author": "Workleap",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.4.0",
|
|
5
5
|
"description": "Add support for environment variables to @squide application shell.",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"repository": {
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"memoize": "^10.1.0",
|
|
35
|
-
"@squide/core": "5.
|
|
35
|
+
"@squide/core": "5.7.0"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
38
|
"@rsbuild/core": "1.4.7",
|
|
@@ -19,7 +19,10 @@ export class EnvironmentVariablesPlugin extends Plugin {
|
|
|
19
19
|
registerVariables(variables: Partial<EnvironmentVariables>) {
|
|
20
20
|
this.#environmentVariablesRegistry.addVariables(variables);
|
|
21
21
|
|
|
22
|
-
this._runtime.logger
|
|
22
|
+
this._runtime.logger
|
|
23
|
+
.withText("[squide] The following environment variables has been registered:")
|
|
24
|
+
.withObject(variables)
|
|
25
|
+
.debug();
|
|
23
26
|
}
|
|
24
27
|
|
|
25
28
|
getVariable(key: EnvironmentVariablesRegistryKey) {
|