@8ms/helpers 2.4.16 → 2.4.17

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.
@@ -19,7 +19,7 @@ const getEnvironment = () => {
19
19
  else if (process.env.NEXT_PUBLIC_EMS_ENVIRONMENT) platformEnvironment = process.env.NEXT_PUBLIC_EMS_ENVIRONMENT;
20
20
  else if (process.env.NEXT_PUBLIC_VERCEL_GIT_COMMIT_REF) platformEnvironment = process.env.NEXT_PUBLIC_VERCEL_GIT_COMMIT_REF;
21
21
  else if (process.env.VERCEL_GIT_COMMIT_REF) platformEnvironment = process.env.VERCEL_GIT_COMMIT_REF;
22
- switch (platformEnvironment.toLowerCase().trim()) {
22
+ switch (String(platformEnvironment).toLowerCase().trim()) {
23
23
  case "production":
24
24
  response = environment.PRODUCTION;
25
25
  break;
@@ -18,7 +18,7 @@ const getEnvironment = () => {
18
18
  else if (process.env.NEXT_PUBLIC_EMS_ENVIRONMENT) platformEnvironment = process.env.NEXT_PUBLIC_EMS_ENVIRONMENT;
19
19
  else if (process.env.NEXT_PUBLIC_VERCEL_GIT_COMMIT_REF) platformEnvironment = process.env.NEXT_PUBLIC_VERCEL_GIT_COMMIT_REF;
20
20
  else if (process.env.VERCEL_GIT_COMMIT_REF) platformEnvironment = process.env.VERCEL_GIT_COMMIT_REF;
21
- switch (platformEnvironment.toLowerCase().trim()) {
21
+ switch (String(platformEnvironment).toLowerCase().trim()) {
22
22
  case "production":
23
23
  response = environment.PRODUCTION;
24
24
  break;
@@ -11,7 +11,8 @@ var OnePasswordNamespace = class extends require__class_BaseNamespace.BaseNamesp
11
11
  integrationVersion: this.config.integrationVersion || "v1.0.0"
12
12
  });
13
13
  } catch (e) {
14
- throw new Error("1Password SDK not installed");
14
+ if (e instanceof Error) throw new Error("Error initialising 1Password client", e);
15
+ throw new Error("An unexpected error occurred during 1Password setup");
15
16
  }
16
17
  };
17
18
  listVaults = async () => {
@@ -10,7 +10,8 @@ var OnePasswordNamespace = class extends BaseNamespace {
10
10
  integrationVersion: this.config.integrationVersion || "v1.0.0"
11
11
  });
12
12
  } catch (e) {
13
- throw new Error("1Password SDK not installed");
13
+ if (e instanceof Error) throw new Error("Error initialising 1Password client", e);
14
+ throw new Error("An unexpected error occurred during 1Password setup");
14
15
  }
15
16
  };
16
17
  listVaults = async () => {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@8ms/helpers",
3
3
  "license": "UNLICENSED",
4
- "version": "2.4.16",
4
+ "version": "2.4.17",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "git+https://github.com/8millionstories-organisation/8ms-helpers-ts.git"