@8ms/helpers 3.0.6 → 3.0.8

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.
@@ -6,7 +6,7 @@ const getAwsTs = async (path, data = {}, config = {}) => {
6
6
  return require_api_get.get(`${require_emsApi_awsTs_endpoint.getAwsTsEndpoint()}${path}`, {
7
7
  ...config,
8
8
  headers: {
9
- "x-api-key": process.env?.EMS_API_KEY ?? "",
9
+ "x-api-key": process.env?.SERVER_EMS_API_KEY ?? process.env?.NEXT_PUBLIC_CLIENT_EMS_API_KEY ?? "",
10
10
  ...config?.headers ?? {}
11
11
  }
12
12
  });
@@ -5,7 +5,7 @@ const getAwsTs = async (path, data = {}, config = {}) => {
5
5
  return get(`${getAwsTsEndpoint()}${path}`, {
6
6
  ...config,
7
7
  headers: {
8
- "x-api-key": process.env?.EMS_API_KEY ?? "",
8
+ "x-api-key": process.env?.SERVER_EMS_API_KEY ?? process.env?.NEXT_PUBLIC_CLIENT_EMS_API_KEY ?? "",
9
9
  ...config?.headers ?? {}
10
10
  }
11
11
  });
@@ -6,7 +6,7 @@ const postAwsTs = async (path, data = {}, config = {}) => {
6
6
  return require_api_post.post(`${require_emsApi_awsTs_endpoint.getAwsTsEndpoint()}${path}`, data, {
7
7
  ...config,
8
8
  headers: {
9
- "x-api-key": process.env?.EMS_API_KEY ?? "",
9
+ "x-api-key": process.env?.SERVER_EMS_API_KEY ?? process.env?.NEXT_PUBLIC_CLIENT_EMS_API_KEY ?? "",
10
10
  ...config?.headers ?? {}
11
11
  }
12
12
  });
@@ -5,7 +5,7 @@ const postAwsTs = async (path, data = {}, config = {}) => {
5
5
  return post(`${getAwsTsEndpoint()}${path}`, data, {
6
6
  ...config,
7
7
  headers: {
8
- "x-api-key": process.env?.EMS_API_KEY ?? "",
8
+ "x-api-key": process.env?.SERVER_EMS_API_KEY ?? process.env?.NEXT_PUBLIC_CLIENT_EMS_API_KEY ?? "",
9
9
  ...config?.headers ?? {}
10
10
  }
11
11
  });
@@ -6,7 +6,7 @@ const getVercel = async (path, data = {}, config = {}) => {
6
6
  return require_api_get.get(`${require_emsApi_vercel_endpoint.getVercelEndpoint()}${path}`, {
7
7
  ...config,
8
8
  headers: {
9
- "x-api-key": process.env?.EMS_API_KEY ?? "",
9
+ "x-api-key": process.env?.SERVER_EMS_API_KEY ?? process.env?.NEXT_PUBLIC_CLIENT_EMS_API_KEY ?? "",
10
10
  ...config?.headers ?? {}
11
11
  }
12
12
  });
@@ -5,7 +5,7 @@ const getVercel = async (path, data = {}, config = {}) => {
5
5
  return get(`${getVercelEndpoint()}${path}`, {
6
6
  ...config,
7
7
  headers: {
8
- "x-api-key": process.env?.EMS_API_KEY ?? "",
8
+ "x-api-key": process.env?.SERVER_EMS_API_KEY ?? process.env?.NEXT_PUBLIC_CLIENT_EMS_API_KEY ?? "",
9
9
  ...config?.headers ?? {}
10
10
  }
11
11
  });
@@ -6,7 +6,7 @@ const postVercel = async (path, data = {}, config = {}) => {
6
6
  return require_api_post.post(`${require_emsApi_vercel_endpoint.getVercelEndpoint()}${path}`, data, {
7
7
  ...config,
8
8
  headers: {
9
- "x-api-key": process.env?.EMS_API_KEY ?? "",
9
+ "x-api-key": process.env?.SERVER_EMS_API_KEY ?? process.env?.NEXT_PUBLIC_CLIENT_EMS_API_KEY ?? "",
10
10
  ...config?.headers ?? {}
11
11
  }
12
12
  });
@@ -5,7 +5,7 @@ const postVercel = async (path, data = {}, config = {}) => {
5
5
  return post(`${getVercelEndpoint()}${path}`, data, {
6
6
  ...config,
7
7
  headers: {
8
- "x-api-key": process.env?.EMS_API_KEY ?? "",
8
+ "x-api-key": process.env?.SERVER_EMS_API_KEY ?? process.env?.NEXT_PUBLIC_CLIENT_EMS_API_KEY ?? "",
9
9
  ...config?.headers ?? {}
10
10
  }
11
11
  });
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@8ms/helpers",
3
3
  "license": "UNLICENSED",
4
- "version": "3.0.6",
4
+ "version": "3.0.8",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "git+https://github.com/8millionstories-organisation/8ms-helpers-ts.git"