@capillarytech/cap-ui-utils 3.0.4 → 3.0.5

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.
@@ -0,0 +1,18 @@
1
+
2
+ name: Gitleaks - Scanning Secrets in PR
3
+
4
+ on:
5
+ pull_request:
6
+ types:
7
+ - synchronize
8
+ - opened
9
+ branches:
10
+ - 'main'
11
+ - 'master'
12
+
13
+ jobs:
14
+ scan:
15
+ uses: Capillary/security-workflows/.github/workflows/gitLeaks_reusable_worflow.yml@main
16
+ secrets:
17
+ GITLEAKS_LICENSE: ${{ secrets.GITLEAKS_LICENSE }}
18
+
@@ -0,0 +1,7 @@
1
+
2
+ repos:
3
+ - repo: https://github.com/gitleaks/gitleaks
4
+ rev: v8.18.1
5
+ hooks:
6
+ - id: gitleaks
7
+
package/index.js CHANGED
@@ -10,3 +10,4 @@ export { default as GTMTracker } from './utils/gtmTracker';
10
10
  export { default as compileHandlebars } from './utils/compileHandlebars';
11
11
  export { default as sanitizeTemplateWithRegexp } from "./utils/contentSanitizationHelper";
12
12
  export { default as decompressJsonObject } from "./utils/zlibDataDecompress";
13
+ export { default as getEnvVariable } from "./utils/getEnvVariables";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@capillarytech/cap-ui-utils",
3
- "version": "3.0.4",
3
+ "version": "3.0.5",
4
4
  "description": "Utility functions shared accross all the modules",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -0,0 +1,4 @@
1
+ const getEnvVariable = key =>
2
+ key && (process.env?.[key] ?? window?.APP_ENV?.[key] ?? undefined);
3
+
4
+ export default getEnvVariable;