@squide/env-vars 1.1.8 → 1.2.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,25 @@
1
1
  # @squide/env-vars
2
2
 
3
+ ## 1.2.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#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.
8
+
9
+ ### Patch Changes
10
+
11
+ - Updated dependencies [[`a143988`](https://github.com/workleap/wl-squide/commit/a1439886931f773ff8e71fa8dd8b429108525717)]:
12
+ - @squide/core@5.5.0
13
+
14
+ ## 1.1.9
15
+
16
+ ### Patch Changes
17
+
18
+ - [#289](https://github.com/workleap/wl-squide/pull/289) [`ee6f7d5`](https://github.com/workleap/wl-squide/commit/ee6f7d52ff6afa8ac757770c89b39978c40a70bc) Thanks [@patricklafrance](https://github.com/patricklafrance)! - Fixed Honeycomb telemetry traces when data fetching fails and bumped dependencies versions.
19
+
20
+ - Updated dependencies [[`ee6f7d5`](https://github.com/workleap/wl-squide/commit/ee6f7d52ff6afa8ac757770c89b39978c40a70bc)]:
21
+ - @squide/core@5.4.9
22
+
3
23
  ## 1.1.8
4
24
 
5
25
  ### Patch Changes
@@ -1,5 +1,5 @@
1
- import * as __WEBPACK_EXTERNAL_MODULE__squide_core_7a405b8f__ from "@squide/core";
2
- import * as __WEBPACK_EXTERNAL_MODULE__EnvironmentVariablesRegistry_js_a784aed2__ from "./EnvironmentVariablesRegistry.js";
1
+ import { Plugin, isNil } from "@squide/core";
2
+ import { EnvironmentVariablesRegistry } from "./EnvironmentVariablesRegistry.js";
3
3
 
4
4
  ;// CONCATENATED MODULE: external "@squide/core"
5
5
 
@@ -9,8 +9,8 @@ import * as __WEBPACK_EXTERNAL_MODULE__EnvironmentVariablesRegistry_js_a784aed2_
9
9
 
10
10
 
11
11
  const EnvironmentVariablesPluginName = "env-vars-plugin";
12
- class EnvironmentVariablesPlugin extends __WEBPACK_EXTERNAL_MODULE__squide_core_7a405b8f__.Plugin {
13
- #environmentVariablesRegistry = new __WEBPACK_EXTERNAL_MODULE__EnvironmentVariablesRegistry_js_a784aed2__.EnvironmentVariablesRegistry();
12
+ class EnvironmentVariablesPlugin extends Plugin {
13
+ #environmentVariablesRegistry = new EnvironmentVariablesRegistry();
14
14
  constructor(runtime){
15
15
  super(EnvironmentVariablesPluginName, runtime);
16
16
  }
@@ -31,7 +31,7 @@ class EnvironmentVariablesPlugin extends __WEBPACK_EXTERNAL_MODULE__squide_core_
31
31
  }
32
32
  function getEnvironmentVariablesPlugin(runtime) {
33
33
  const plugin = runtime.getPlugin(EnvironmentVariablesPluginName);
34
- if ((0,__WEBPACK_EXTERNAL_MODULE__squide_core_7a405b8f__.isNil)(plugin)) {
34
+ if (isNil(plugin)) {
35
35
  throw new Error("[squide] The getEnvironmentVariablesPlugin function is called but no EnvironmentVariablesPlugin instance has been registered with the runtime.");
36
36
  }
37
37
  return plugin;
@@ -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,wDAAMA;IACzC,6BAA6B,GAAG,IAAIC,kGAA4BA,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,2DAAKA,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.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,4 +1,4 @@
1
- import * as __WEBPACK_EXTERNAL_MODULE_memoize__ from "memoize";
1
+ import memoize, { memoizeClear } from "memoize";
2
2
 
3
3
  ;// CONCATENATED MODULE: external "memoize"
4
4
 
@@ -8,7 +8,7 @@ class EnvironmentVariablesRegistry {
8
8
  #variables = new Map();
9
9
  // Since the "getVariables" function is transforming the variables from a Map to an Object, the result of
10
10
  // the transformation is memoized to ensure the returned Object is immutable and can be use in React closures.
11
- #memoizedGetVariables = (0,__WEBPACK_EXTERNAL_MODULE_memoize__["default"])(()=>Object.fromEntries(this.#variables));
11
+ #memoizedGetVariables = memoize(()=>Object.fromEntries(this.#variables));
12
12
  add(key, value) {
13
13
  if (this.#variables.has(key)) {
14
14
  const existingValue = this.#variables.get(key);
@@ -17,7 +17,7 @@ class EnvironmentVariablesRegistry {
17
17
  }
18
18
  } else {
19
19
  this.#variables.set(key, value);
20
- (0,__WEBPACK_EXTERNAL_MODULE_memoize__.memoizeClear)(this.#memoizedGetVariables);
20
+ memoizeClear(this.#memoizedGetVariables);
21
21
  }
22
22
  }
23
23
  addVariables(variables) {
@@ -26,7 +26,7 @@ class EnvironmentVariablesRegistry {
26
26
  for (const [key, value] of Object.entries(variables)){
27
27
  this.add(key, value);
28
28
  }
29
- (0,__WEBPACK_EXTERNAL_MODULE_memoize__.memoizeClear)(this.#memoizedGetVariables);
29
+ memoizeClear(this.#memoizedGetVariables);
30
30
  }
31
31
  }
32
32
  getVariable(key) {
@@ -1 +1 @@
1
- {"version":3,"file":"EnvironmentVariablesRegistry.js","sources":["webpack://@squide/env-vars/./src/EnvironmentVariablesRegistry.ts"],"sourcesContent":["import memoize, { memoizeClear } from \"memoize\";\n\n// The \"EnvironmentVariables\" interface is expected to be extended by remote modules adding their own environment variables to the runtime.\n// This magic is called module augmentation: https://www.typescriptlang.org/docs/handbook/declaration-merging.html#module-augmentation.\n// eslint-disable-next-line @typescript-eslint/no-empty-object-type\nexport interface EnvironmentVariables {}\n\nexport type EnvironmentVariablesRegistryKey = keyof EnvironmentVariables;\nexport type EnvironmentVariablesRegistryValue = EnvironmentVariables[keyof EnvironmentVariables];\n\nexport class EnvironmentVariablesRegistry {\n readonly #variables = new Map<EnvironmentVariablesRegistryKey, EnvironmentVariablesRegistryValue>();\n\n // Since the \"getVariables\" function is transforming the variables from a Map to an Object, the result of\n // the transformation is memoized to ensure the returned Object is immutable and can be use in React closures.\n readonly #memoizedGetVariables = memoize(() => Object.fromEntries(this.#variables) as unknown as EnvironmentVariables);\n\n add(key: EnvironmentVariablesRegistryKey, value: EnvironmentVariablesRegistryValue) {\n if (this.#variables.has(key)) {\n const existingValue = this.#variables.get(key);\n\n if (existingValue !== value) {\n throw new Error(`[squide] An environment variable with the key \"${key}\" already exist and the new value differs from the existing one. Existing value: \"${existingValue}\" - New Value: \"${value}\"`);\n }\n } else {\n this.#variables.set(key, value);\n\n memoizeClear(this.#memoizedGetVariables);\n }\n }\n\n addVariables(variables: Partial<EnvironmentVariables>) {\n // Do not clear the \"getVariables\" memoize result if there are no variables.\n if (Object.keys(variables).length > 0) {\n for (const [key, value] of Object.entries(variables)) {\n this.add(key as EnvironmentVariablesRegistryKey, value as EnvironmentVariablesRegistryValue);\n }\n\n memoizeClear(this.#memoizedGetVariables);\n }\n }\n\n getVariable(key: EnvironmentVariablesRegistryKey) {\n const value = this.#variables.get(key);\n\n if (!value) {\n throw new Error(`[squide] No environment variable has been registered for the key \"${key}\".`);\n }\n\n return value;\n }\n\n getVariables() {\n return this.#memoizedGetVariables();\n }\n}\n"],"names":["memoize","memoizeClear","EnvironmentVariablesRegistry","Map","Object","key","value","existingValue","Error","variables"],"mappings":";;;;;AAAgD;AAUzC,MAAME;IACA,UAAU,GAAG,IAAIC,MAA0E;IAEpG,yGAAyG;IACzG,8GAA8G;IACrG,qBAAqB,GAAGH,kDAAOA,CAAC,IAAMI,OAAO,WAAW,CAAC,IAAI,CAAC,UAAU,GAAsC;IAEvH,IAAIC,GAAoC,EAAEC,KAAwC,EAAE;QAChF,IAAI,IAAI,CAAC,UAAU,CAAC,GAAG,CAACD,MAAM;YAC1B,MAAME,gBAAgB,IAAI,CAAC,UAAU,CAAC,GAAG,CAACF;YAE1C,IAAIE,kBAAkBD,OAAO;gBACzB,MAAM,IAAIE,MAAM,CAAC,+CAA+C,EAAEH,IAAI,kFAAkF,EAAEE,cAAc,gBAAgB,EAAED,MAAM,CAAC,CAAC;YACtM;QACJ,OAAO;YACH,IAAI,CAAC,UAAU,CAAC,GAAG,CAACD,KAAKC;YAEzBL,oDAAYA,CAAC,IAAI,CAAC,qBAAqB;QAC3C;IACJ;IAEA,aAAaQ,SAAwC,EAAE;QACnD,4EAA4E;QAC5E,IAAIL,OAAO,IAAI,CAACK,WAAW,MAAM,GAAG,GAAG;YACnC,KAAK,MAAM,CAACJ,KAAKC,MAAM,IAAIF,OAAO,OAAO,CAACK,WAAY;gBAClD,IAAI,CAAC,GAAG,CAACJ,KAAwCC;YACrD;YAEAL,oDAAYA,CAAC,IAAI,CAAC,qBAAqB;QAC3C;IACJ;IAEA,YAAYI,GAAoC,EAAE;QAC9C,MAAMC,QAAQ,IAAI,CAAC,UAAU,CAAC,GAAG,CAACD;QAElC,IAAI,CAACC,OAAO;YACR,MAAM,IAAIE,MAAM,CAAC,kEAAkE,EAAEH,IAAI,EAAE,CAAC;QAChG;QAEA,OAAOC;IACX;IAEA,eAAe;QACX,OAAO,IAAI,CAAC,qBAAqB;IACrC;AACJ"}
1
+ {"version":3,"file":"EnvironmentVariablesRegistry.js","sources":["webpack://@squide/env-vars/./src/EnvironmentVariablesRegistry.ts"],"sourcesContent":["import memoize, { memoizeClear } from \"memoize\";\n\n// The \"EnvironmentVariables\" interface is expected to be extended by remote modules adding their own environment variables to the runtime.\n// This magic is called module augmentation: https://www.typescriptlang.org/docs/handbook/declaration-merging.html#module-augmentation.\n// eslint-disable-next-line @typescript-eslint/no-empty-object-type\nexport interface EnvironmentVariables {}\n\nexport type EnvironmentVariablesRegistryKey = keyof EnvironmentVariables;\nexport type EnvironmentVariablesRegistryValue = EnvironmentVariables[keyof EnvironmentVariables];\n\nexport class EnvironmentVariablesRegistry {\n readonly #variables = new Map<EnvironmentVariablesRegistryKey, EnvironmentVariablesRegistryValue>();\n\n // Since the \"getVariables\" function is transforming the variables from a Map to an Object, the result of\n // the transformation is memoized to ensure the returned Object is immutable and can be use in React closures.\n readonly #memoizedGetVariables = memoize(() => Object.fromEntries(this.#variables) as unknown as EnvironmentVariables);\n\n add(key: EnvironmentVariablesRegistryKey, value: EnvironmentVariablesRegistryValue) {\n if (this.#variables.has(key)) {\n const existingValue = this.#variables.get(key);\n\n if (existingValue !== value) {\n throw new Error(`[squide] An environment variable with the key \"${key}\" already exist and the new value differs from the existing one. Existing value: \"${existingValue}\" - New Value: \"${value}\"`);\n }\n } else {\n this.#variables.set(key, value);\n\n memoizeClear(this.#memoizedGetVariables);\n }\n }\n\n addVariables(variables: Partial<EnvironmentVariables>) {\n // Do not clear the \"getVariables\" memoize result if there are no variables.\n if (Object.keys(variables).length > 0) {\n for (const [key, value] of Object.entries(variables)) {\n this.add(key as EnvironmentVariablesRegistryKey, value as EnvironmentVariablesRegistryValue);\n }\n\n memoizeClear(this.#memoizedGetVariables);\n }\n }\n\n getVariable(key: EnvironmentVariablesRegistryKey) {\n const value = this.#variables.get(key);\n\n if (!value) {\n throw new Error(`[squide] No environment variable has been registered for the key \"${key}\".`);\n }\n\n return value;\n }\n\n getVariables() {\n return this.#memoizedGetVariables();\n }\n}\n"],"names":["memoize","memoizeClear","EnvironmentVariablesRegistry","Map","Object","key","value","existingValue","Error","variables"],"mappings":";;;;;AAAgD;AAUzC,MAAME;IACA,UAAU,GAAG,IAAIC,MAA0E;IAEpG,yGAAyG;IACzG,8GAA8G;IACrG,qBAAqB,GAAGH,OAAOA,CAAC,IAAMI,OAAO,WAAW,CAAC,IAAI,CAAC,UAAU,GAAsC;IAEvH,IAAIC,GAAoC,EAAEC,KAAwC,EAAE;QAChF,IAAI,IAAI,CAAC,UAAU,CAAC,GAAG,CAACD,MAAM;YAC1B,MAAME,gBAAgB,IAAI,CAAC,UAAU,CAAC,GAAG,CAACF;YAE1C,IAAIE,kBAAkBD,OAAO;gBACzB,MAAM,IAAIE,MAAM,CAAC,+CAA+C,EAAEH,IAAI,kFAAkF,EAAEE,cAAc,gBAAgB,EAAED,MAAM,CAAC,CAAC;YACtM;QACJ,OAAO;YACH,IAAI,CAAC,UAAU,CAAC,GAAG,CAACD,KAAKC;YAEzBL,YAAYA,CAAC,IAAI,CAAC,qBAAqB;QAC3C;IACJ;IAEA,aAAaQ,SAAwC,EAAE;QACnD,4EAA4E;QAC5E,IAAIL,OAAO,IAAI,CAACK,WAAW,MAAM,GAAG,GAAG;YACnC,KAAK,MAAM,CAACJ,KAAKC,MAAM,IAAIF,OAAO,OAAO,CAACK,WAAY;gBAClD,IAAI,CAAC,GAAG,CAACJ,KAAwCC;YACrD;YAEAL,YAAYA,CAAC,IAAI,CAAC,qBAAqB;QAC3C;IACJ;IAEA,YAAYI,GAAoC,EAAE;QAC9C,MAAMC,QAAQ,IAAI,CAAC,UAAU,CAAC,GAAG,CAACD;QAElC,IAAI,CAACC,OAAO;YACR,MAAM,IAAIE,MAAM,CAAC,kEAAkE,EAAEH,IAAI,EAAE,CAAC;QAChG;QAEA,OAAOC;IACX;IAEA,eAAe;QACX,OAAO,IAAI,CAAC,qBAAqB;IACrC;AACJ"}
@@ -1,5 +1,5 @@
1
- import * as __WEBPACK_EXTERNAL_MODULE__squide_core_7a405b8f__ from "@squide/core";
2
- import * as __WEBPACK_EXTERNAL_MODULE__EnvironmentVariablesPlugin_js_3420fecf__ from "./EnvironmentVariablesPlugin.js";
1
+ import { useRuntime } from "@squide/core";
2
+ import { getEnvironmentVariablesPlugin } from "./EnvironmentVariablesPlugin.js";
3
3
 
4
4
  ;// CONCATENATED MODULE: external "@squide/core"
5
5
 
@@ -9,13 +9,13 @@ import * as __WEBPACK_EXTERNAL_MODULE__EnvironmentVariablesPlugin_js_3420fecf__
9
9
 
10
10
 
11
11
  function useEnvironmentVariable(key) {
12
- const runtime = (0,__WEBPACK_EXTERNAL_MODULE__squide_core_7a405b8f__.useRuntime)();
13
- const plugin = (0,__WEBPACK_EXTERNAL_MODULE__EnvironmentVariablesPlugin_js_3420fecf__.getEnvironmentVariablesPlugin)(runtime);
12
+ const runtime = useRuntime();
13
+ const plugin = getEnvironmentVariablesPlugin(runtime);
14
14
  return plugin.getVariable(key);
15
15
  }
16
16
  function useEnvironmentVariables() {
17
- const runtime = (0,__WEBPACK_EXTERNAL_MODULE__squide_core_7a405b8f__.useRuntime)();
18
- const plugin = (0,__WEBPACK_EXTERNAL_MODULE__EnvironmentVariablesPlugin_js_3420fecf__.getEnvironmentVariablesPlugin)(runtime);
17
+ const runtime = useRuntime();
18
+ const plugin = getEnvironmentVariablesPlugin(runtime);
19
19
  return plugin.getVariables();
20
20
  }
21
21
 
@@ -1 +1 @@
1
- {"version":3,"file":"useEnvironmentVariable.js","sources":["webpack://@squide/env-vars/./src/useEnvironmentVariable.ts"],"sourcesContent":["import { useRuntime } from \"@squide/core\";\nimport { getEnvironmentVariablesPlugin } from \"./EnvironmentVariablesPlugin.ts\";\nimport type { EnvironmentVariablesRegistryKey } from \"./EnvironmentVariablesRegistry.ts\";\n\nexport function useEnvironmentVariable(key: EnvironmentVariablesRegistryKey) {\n const runtime = useRuntime();\n const plugin = getEnvironmentVariablesPlugin(runtime);\n\n return plugin.getVariable(key);\n}\n\nexport function useEnvironmentVariables() {\n const runtime = useRuntime();\n const plugin = getEnvironmentVariablesPlugin(runtime);\n\n return plugin.getVariables();\n}\n"],"names":["useRuntime","getEnvironmentVariablesPlugin","useEnvironmentVariable","key","runtime","plugin","useEnvironmentVariables"],"mappings":";;;;;;;;AAA0C;AACsC;AAGzE,SAASE,uBAAuBC,GAAoC;IACvE,MAAMC,UAAUJ,gEAAUA;IAC1B,MAAMK,SAASJ,qGAA6BA,CAACG;IAE7C,OAAOC,OAAO,WAAW,CAACF;AAC9B;AAEO,SAASG;IACZ,MAAMF,UAAUJ,gEAAUA;IAC1B,MAAMK,SAASJ,qGAA6BA,CAACG;IAE7C,OAAOC,OAAO,YAAY;AAC9B"}
1
+ {"version":3,"file":"useEnvironmentVariable.js","sources":["webpack://@squide/env-vars/./src/useEnvironmentVariable.ts"],"sourcesContent":["import { useRuntime } from \"@squide/core\";\nimport { getEnvironmentVariablesPlugin } from \"./EnvironmentVariablesPlugin.ts\";\nimport type { EnvironmentVariablesRegistryKey } from \"./EnvironmentVariablesRegistry.ts\";\n\nexport function useEnvironmentVariable(key: EnvironmentVariablesRegistryKey) {\n const runtime = useRuntime();\n const plugin = getEnvironmentVariablesPlugin(runtime);\n\n return plugin.getVariable(key);\n}\n\nexport function useEnvironmentVariables() {\n const runtime = useRuntime();\n const plugin = getEnvironmentVariablesPlugin(runtime);\n\n return plugin.getVariables();\n}\n"],"names":["useRuntime","getEnvironmentVariablesPlugin","useEnvironmentVariable","key","runtime","plugin","useEnvironmentVariables"],"mappings":";;;;;;;;AAA0C;AACsC;AAGzE,SAASE,uBAAuBC,GAAoC;IACvE,MAAMC,UAAUJ,UAAUA;IAC1B,MAAMK,SAASJ,6BAA6BA,CAACG;IAE7C,OAAOC,OAAO,WAAW,CAACF;AAC9B;AAEO,SAASG;IACZ,MAAMF,UAAUJ,UAAUA;IAC1B,MAAMK,SAASJ,6BAA6BA,CAACG;IAE7C,OAAOC,OAAO,YAAY;AAC9B"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@squide/env-vars",
3
3
  "author": "Workleap",
4
- "version": "1.1.8",
4
+ "version": "1.2.0",
5
5
  "description": "Add support for environment variables to @squide application shell.",
6
6
  "license": "Apache-2.0",
7
7
  "repository": {
@@ -32,21 +32,21 @@
32
32
  },
33
33
  "dependencies": {
34
34
  "memoize": "^10.1.0",
35
- "@squide/core": "5.4.8"
35
+ "@squide/core": "5.5.0"
36
36
  },
37
37
  "devDependencies": {
38
- "@rsbuild/core": "1.3.21",
39
- "@rslib/core": "0.8.0",
40
- "@types/react": "19.1.5",
41
- "@typescript-eslint/parser": "8.32.1",
42
- "@vitejs/plugin-react": "4.5.0",
43
- "@workleap/eslint-plugin": "3.4.2",
44
- "@workleap/rslib-configs": "1.0.6",
38
+ "@rsbuild/core": "1.4.7",
39
+ "@rslib/core": "0.10.6",
40
+ "@types/react": "19.1.8",
41
+ "@typescript-eslint/parser": "8.37.0",
42
+ "@vitejs/plugin-react": "4.6.0",
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
- "happy-dom": "17.4.7",
47
+ "happy-dom": "18.0.1",
48
48
  "typescript": "5.8.3",
49
- "vitest": "3.1.4"
49
+ "vitest": "3.2.4"
50
50
  },
51
51
  "sideEffects": false,
52
52
  "engines": {