@squide/env-vars 1.1.9 → 1.3.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.3.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#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.
8
+
9
+ ### Patch Changes
10
+
11
+ - Updated dependencies [[`8d3eae2`](https://github.com/workleap/wl-squide/commit/8d3eae2ee4dc0331f83047e3ef313c6abb15dc3f)]:
12
+ - @squide/core@5.6.0
13
+
14
+ ## 1.2.0
15
+
16
+ ### Minor Changes
17
+
18
+ - [#296](https://github.com/workleap/wl-squide/pull/296) [`a143988`](https://github.com/workleap/wl-squide/commit/a1439886931f773ff8e71fa8dd8b429108525717) Thanks [@patricklafrance](https://github.com/patricklafrance)! - Updated dependencies.
19
+
20
+ ### Patch Changes
21
+
22
+ - Updated dependencies [[`a143988`](https://github.com/workleap/wl-squide/commit/a1439886931f773ff8e71fa8dd8b429108525717)]:
23
+ - @squide/core@5.5.0
24
+
3
25
  ## 1.1.9
4
26
 
5
27
  ### Patch 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.debug("[squide] The following environment variables has been registered:", variables);
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.debug(\"[squide] The following environment variables has been registered:\", variables);\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,CAAC,KAAK,CAAC,qEAAqEA;IACpG;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"}
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.1.9",
4
+ "version": "1.3.0",
5
5
  "description": "Add support for environment variables to @squide application shell.",
6
6
  "license": "Apache-2.0",
7
7
  "repository": {
@@ -32,16 +32,16 @@
32
32
  },
33
33
  "dependencies": {
34
34
  "memoize": "^10.1.0",
35
- "@squide/core": "5.4.9"
35
+ "@squide/core": "5.6.0"
36
36
  },
37
37
  "devDependencies": {
38
- "@rsbuild/core": "1.4.0",
39
- "@rslib/core": "0.10.3",
38
+ "@rsbuild/core": "1.4.7",
39
+ "@rslib/core": "0.10.6",
40
40
  "@types/react": "19.1.8",
41
- "@typescript-eslint/parser": "8.35.0",
41
+ "@typescript-eslint/parser": "8.37.0",
42
42
  "@vitejs/plugin-react": "4.6.0",
43
- "@workleap/eslint-plugin": "3.4.2",
44
- "@workleap/rslib-configs": "1.0.6",
43
+ "@workleap/eslint-plugin": "3.5.0",
44
+ "@workleap/rslib-configs": "1.1.0",
45
45
  "@workleap/typescript-configs": "3.0.4",
46
46
  "eslint": "8.57.0",
47
47
  "happy-dom": "18.0.1",
@@ -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.debug("[squide] The following environment variables has been registered:", variables);
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) {