@8ms/helpers 2.4.16 → 2.4.19
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/dist/api/config.cjs +0 -0
- package/dist/api/config.d.cts +7 -0
- package/dist/api/config.d.mts +7 -0
- package/dist/api/config.mjs +1 -0
- package/dist/api/deleteRequest.d.cts +2 -1
- package/dist/api/deleteRequest.d.mts +2 -1
- package/dist/api/get.d.cts +2 -1
- package/dist/api/get.d.mts +2 -1
- package/dist/api/post.d.cts +2 -1
- package/dist/api/post.d.mts +2 -1
- package/dist/emsApi/awsTs/endpoint.cjs +18 -0
- package/dist/emsApi/awsTs/endpoint.d.cts +10 -0
- package/dist/emsApi/awsTs/endpoint.d.mts +10 -0
- package/dist/emsApi/awsTs/endpoint.mjs +16 -0
- package/dist/emsApi/awsTs/get.cjs +15 -0
- package/dist/emsApi/awsTs/get.d.cts +6 -0
- package/dist/emsApi/awsTs/get.d.mts +6 -0
- package/dist/emsApi/awsTs/get.mjs +14 -0
- package/dist/emsApi/awsTs/index.cjs +8 -0
- package/dist/emsApi/awsTs/index.d.cts +4 -0
- package/dist/emsApi/awsTs/index.d.mts +4 -0
- package/dist/emsApi/awsTs/index.mjs +4 -0
- package/dist/emsApi/awsTs/post.cjs +15 -0
- package/dist/emsApi/awsTs/post.d.cts +6 -0
- package/dist/emsApi/awsTs/post.d.mts +6 -0
- package/dist/emsApi/awsTs/post.mjs +14 -0
- package/dist/emsApi/vercel/endpoint.cjs +18 -0
- package/dist/emsApi/vercel/endpoint.d.cts +10 -0
- package/dist/emsApi/vercel/endpoint.d.mts +10 -0
- package/dist/emsApi/vercel/endpoint.mjs +16 -0
- package/dist/emsApi/vercel/get.cjs +15 -0
- package/dist/emsApi/vercel/get.d.cts +6 -0
- package/dist/emsApi/vercel/get.d.mts +6 -0
- package/dist/emsApi/vercel/get.mjs +14 -0
- package/dist/emsApi/vercel/index.cjs +8 -0
- package/dist/emsApi/vercel/index.d.cts +4 -0
- package/dist/emsApi/vercel/index.d.mts +4 -0
- package/dist/emsApi/vercel/index.mjs +4 -0
- package/dist/emsApi/vercel/post.cjs +15 -0
- package/dist/emsApi/vercel/post.d.cts +6 -0
- package/dist/emsApi/vercel/post.d.mts +6 -0
- package/dist/emsApi/vercel/post.mjs +14 -0
- package/dist/environment/environment.cjs +1 -1
- package/dist/environment/environment.mjs +1 -1
- package/dist/onePassword/server/OnePasswordNamespace.cjs +2 -1
- package/dist/onePassword/server/OnePasswordNamespace.mjs +2 -1
- package/package.json +37 -1
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { ApiResponseClass } from "./ApiResponseClass.cjs";
|
|
2
|
+
import { Config } from "./config.cjs";
|
|
2
3
|
|
|
3
4
|
//#region src/api/deleteRequest.d.ts
|
|
4
5
|
/**
|
|
5
6
|
* Make a DELETE request.
|
|
6
7
|
* Can't use the function name delete as it's reserved
|
|
7
8
|
*/
|
|
8
|
-
declare const deleteRequest: (url: string, config?:
|
|
9
|
+
declare const deleteRequest: (url: string, config?: Config) => Promise<ApiResponseClass>;
|
|
9
10
|
//#endregion
|
|
10
11
|
export { deleteRequest };
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { ApiResponseClass } from "./ApiResponseClass.mjs";
|
|
2
|
+
import { Config } from "./config.mjs";
|
|
2
3
|
|
|
3
4
|
//#region src/api/deleteRequest.d.ts
|
|
4
5
|
/**
|
|
5
6
|
* Make a DELETE request.
|
|
6
7
|
* Can't use the function name delete as it's reserved
|
|
7
8
|
*/
|
|
8
|
-
declare const deleteRequest: (url: string, config?:
|
|
9
|
+
declare const deleteRequest: (url: string, config?: Config) => Promise<ApiResponseClass>;
|
|
9
10
|
//#endregion
|
|
10
11
|
export { deleteRequest };
|
package/dist/api/get.d.cts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { ApiResponseClass } from "./ApiResponseClass.cjs";
|
|
2
|
+
import { Config } from "./config.cjs";
|
|
2
3
|
|
|
3
4
|
//#region src/api/get.d.ts
|
|
4
5
|
/**
|
|
5
6
|
* Make a GET request.
|
|
6
7
|
*/
|
|
7
|
-
declare const get: (url: string, config?:
|
|
8
|
+
declare const get: (url: string, config?: Config) => Promise<ApiResponseClass>;
|
|
8
9
|
//#endregion
|
|
9
10
|
export { get };
|
package/dist/api/get.d.mts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { ApiResponseClass } from "./ApiResponseClass.mjs";
|
|
2
|
+
import { Config } from "./config.mjs";
|
|
2
3
|
|
|
3
4
|
//#region src/api/get.d.ts
|
|
4
5
|
/**
|
|
5
6
|
* Make a GET request.
|
|
6
7
|
*/
|
|
7
|
-
declare const get: (url: string, config?:
|
|
8
|
+
declare const get: (url: string, config?: Config) => Promise<ApiResponseClass>;
|
|
8
9
|
//#endregion
|
|
9
10
|
export { get };
|
package/dist/api/post.d.cts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { ApiResponseClass } from "./ApiResponseClass.cjs";
|
|
2
|
+
import { Config } from "./config.cjs";
|
|
2
3
|
|
|
3
4
|
//#region src/api/post.d.ts
|
|
4
5
|
/**
|
|
5
6
|
* Make a POST request.
|
|
6
7
|
*/
|
|
7
|
-
declare const post: (url: string, data?: {}, config?:
|
|
8
|
+
declare const post: (url: string, data?: {}, config?: Config) => Promise<ApiResponseClass>;
|
|
8
9
|
//#endregion
|
|
9
10
|
export { post };
|
package/dist/api/post.d.mts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { ApiResponseClass } from "./ApiResponseClass.mjs";
|
|
2
|
+
import { Config } from "./config.mjs";
|
|
2
3
|
|
|
3
4
|
//#region src/api/post.d.ts
|
|
4
5
|
/**
|
|
5
6
|
* Make a POST request.
|
|
6
7
|
*/
|
|
7
|
-
declare const post: (url: string, data?: {}, config?:
|
|
8
|
+
declare const post: (url: string, data?: {}, config?: Config) => Promise<ApiResponseClass>;
|
|
8
9
|
//#endregion
|
|
9
10
|
export { post };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
const require_environment_environment = require("../../environment/environment.cjs");
|
|
3
|
+
//#region src/emsApi/awsTs/endpoint.ts
|
|
4
|
+
const awsTsEndpointEnvironment = {
|
|
5
|
+
DEVELOPMENT: "https://dev.api-aws-ts.8mscodex.com",
|
|
6
|
+
STAGING: "https://staging.api-aws-ts.8mscodex.com",
|
|
7
|
+
PRODUCTION: "https://api-aws-ts.8mscodex.com"
|
|
8
|
+
};
|
|
9
|
+
const getAwsTsEndpoint = () => {
|
|
10
|
+
switch (require_environment_environment.getEnvironment()) {
|
|
11
|
+
case require_environment_environment.environment.PRODUCTION: return awsTsEndpointEnvironment.PRODUCTION;
|
|
12
|
+
case require_environment_environment.environment.STAGING: return awsTsEndpointEnvironment.STAGING;
|
|
13
|
+
default: return awsTsEndpointEnvironment.DEVELOPMENT;
|
|
14
|
+
}
|
|
15
|
+
};
|
|
16
|
+
//#endregion
|
|
17
|
+
exports.awsTsEndpointEnvironment = awsTsEndpointEnvironment;
|
|
18
|
+
exports.getAwsTsEndpoint = getAwsTsEndpoint;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
//#region src/emsApi/awsTs/endpoint.d.ts
|
|
2
|
+
declare const awsTsEndpointEnvironment: {
|
|
3
|
+
readonly DEVELOPMENT: "https://dev.api-aws-ts.8mscodex.com";
|
|
4
|
+
readonly STAGING: "https://staging.api-aws-ts.8mscodex.com";
|
|
5
|
+
readonly PRODUCTION: "https://api-aws-ts.8mscodex.com";
|
|
6
|
+
};
|
|
7
|
+
type AwsTsEndpointEnvironment = typeof awsTsEndpointEnvironment[keyof typeof awsTsEndpointEnvironment];
|
|
8
|
+
declare const getAwsTsEndpoint: () => "https://dev.api-aws-ts.8mscodex.com" | "https://staging.api-aws-ts.8mscodex.com" | "https://api-aws-ts.8mscodex.com";
|
|
9
|
+
//#endregion
|
|
10
|
+
export { AwsTsEndpointEnvironment, awsTsEndpointEnvironment, getAwsTsEndpoint };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
//#region src/emsApi/awsTs/endpoint.d.ts
|
|
2
|
+
declare const awsTsEndpointEnvironment: {
|
|
3
|
+
readonly DEVELOPMENT: "https://dev.api-aws-ts.8mscodex.com";
|
|
4
|
+
readonly STAGING: "https://staging.api-aws-ts.8mscodex.com";
|
|
5
|
+
readonly PRODUCTION: "https://api-aws-ts.8mscodex.com";
|
|
6
|
+
};
|
|
7
|
+
type AwsTsEndpointEnvironment = typeof awsTsEndpointEnvironment[keyof typeof awsTsEndpointEnvironment];
|
|
8
|
+
declare const getAwsTsEndpoint: () => "https://dev.api-aws-ts.8mscodex.com" | "https://staging.api-aws-ts.8mscodex.com" | "https://api-aws-ts.8mscodex.com";
|
|
9
|
+
//#endregion
|
|
10
|
+
export { AwsTsEndpointEnvironment, awsTsEndpointEnvironment, getAwsTsEndpoint };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { environment, getEnvironment } from "../../environment/environment.mjs";
|
|
2
|
+
//#region src/emsApi/awsTs/endpoint.ts
|
|
3
|
+
const awsTsEndpointEnvironment = {
|
|
4
|
+
DEVELOPMENT: "https://dev.api-aws-ts.8mscodex.com",
|
|
5
|
+
STAGING: "https://staging.api-aws-ts.8mscodex.com",
|
|
6
|
+
PRODUCTION: "https://api-aws-ts.8mscodex.com"
|
|
7
|
+
};
|
|
8
|
+
const getAwsTsEndpoint = () => {
|
|
9
|
+
switch (getEnvironment()) {
|
|
10
|
+
case environment.PRODUCTION: return awsTsEndpointEnvironment.PRODUCTION;
|
|
11
|
+
case environment.STAGING: return awsTsEndpointEnvironment.STAGING;
|
|
12
|
+
default: return awsTsEndpointEnvironment.DEVELOPMENT;
|
|
13
|
+
}
|
|
14
|
+
};
|
|
15
|
+
//#endregion
|
|
16
|
+
export { awsTsEndpointEnvironment, getAwsTsEndpoint };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
const require_api_get = require("../../api/get.cjs");
|
|
3
|
+
const require_emsApi_awsTs_endpoint = require("./endpoint.cjs");
|
|
4
|
+
//#region src/emsApi/awsTs/get.ts
|
|
5
|
+
const getAwsTs = async (path, data = {}, config = {}) => {
|
|
6
|
+
return require_api_get.get(`${require_emsApi_awsTs_endpoint.getAwsTsEndpoint()}${path}`, {
|
|
7
|
+
...config,
|
|
8
|
+
headers: {
|
|
9
|
+
"x-api-key": process.env?.EMS_API_KEY ?? "",
|
|
10
|
+
...config?.headers ?? {}
|
|
11
|
+
}
|
|
12
|
+
});
|
|
13
|
+
};
|
|
14
|
+
//#endregion
|
|
15
|
+
exports.getAwsTs = getAwsTs;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ApiResponseClass } from "../../api/ApiResponseClass.cjs";
|
|
2
|
+
import { Config } from "../../api/config.cjs";
|
|
3
|
+
//#region src/emsApi/awsTs/get.d.ts
|
|
4
|
+
declare const getAwsTs: (path: string, data?: {}, config?: Config) => Promise<ApiResponseClass<any, any>>;
|
|
5
|
+
//#endregion
|
|
6
|
+
export { getAwsTs };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ApiResponseClass } from "../../api/ApiResponseClass.mjs";
|
|
2
|
+
import { Config } from "../../api/config.mjs";
|
|
3
|
+
//#region src/emsApi/awsTs/get.d.ts
|
|
4
|
+
declare const getAwsTs: (path: string, data?: {}, config?: Config) => Promise<ApiResponseClass<any, any>>;
|
|
5
|
+
//#endregion
|
|
6
|
+
export { getAwsTs };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { get } from "../../api/get.mjs";
|
|
2
|
+
import { getAwsTsEndpoint } from "./endpoint.mjs";
|
|
3
|
+
//#region src/emsApi/awsTs/get.ts
|
|
4
|
+
const getAwsTs = async (path, data = {}, config = {}) => {
|
|
5
|
+
return get(`${getAwsTsEndpoint()}${path}`, {
|
|
6
|
+
...config,
|
|
7
|
+
headers: {
|
|
8
|
+
"x-api-key": process.env?.EMS_API_KEY ?? "",
|
|
9
|
+
...config?.headers ?? {}
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
};
|
|
13
|
+
//#endregion
|
|
14
|
+
export { getAwsTs };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
const require_emsApi_awsTs_endpoint = require("./endpoint.cjs");
|
|
3
|
+
const require_emsApi_awsTs_get = require("./get.cjs");
|
|
4
|
+
const require_emsApi_awsTs_post = require("./post.cjs");
|
|
5
|
+
exports.awsTsEndpointEnvironment = require_emsApi_awsTs_endpoint.awsTsEndpointEnvironment;
|
|
6
|
+
exports.getAwsTs = require_emsApi_awsTs_get.getAwsTs;
|
|
7
|
+
exports.getAwsTsEndpoint = require_emsApi_awsTs_endpoint.getAwsTsEndpoint;
|
|
8
|
+
exports.postAwsTs = require_emsApi_awsTs_post.postAwsTs;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { AwsTsEndpointEnvironment, awsTsEndpointEnvironment, getAwsTsEndpoint } from "./endpoint.cjs";
|
|
2
|
+
import { getAwsTs } from "./get.cjs";
|
|
3
|
+
import { postAwsTs } from "./post.cjs";
|
|
4
|
+
export { AwsTsEndpointEnvironment, awsTsEndpointEnvironment, getAwsTs, getAwsTsEndpoint, postAwsTs };
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { AwsTsEndpointEnvironment, awsTsEndpointEnvironment, getAwsTsEndpoint } from "./endpoint.mjs";
|
|
2
|
+
import { getAwsTs } from "./get.mjs";
|
|
3
|
+
import { postAwsTs } from "./post.mjs";
|
|
4
|
+
export { AwsTsEndpointEnvironment, awsTsEndpointEnvironment, getAwsTs, getAwsTsEndpoint, postAwsTs };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
const require_api_post = require("../../api/post.cjs");
|
|
3
|
+
const require_emsApi_awsTs_endpoint = require("./endpoint.cjs");
|
|
4
|
+
//#region src/emsApi/awsTs/post.ts
|
|
5
|
+
const postAwsTs = async (path, data = {}, config = {}) => {
|
|
6
|
+
return require_api_post.post(`${require_emsApi_awsTs_endpoint.getAwsTsEndpoint()}${path}`, data, {
|
|
7
|
+
...config,
|
|
8
|
+
headers: {
|
|
9
|
+
"x-api-key": process.env?.EMS_API_KEY ?? "",
|
|
10
|
+
...config?.headers ?? {}
|
|
11
|
+
}
|
|
12
|
+
});
|
|
13
|
+
};
|
|
14
|
+
//#endregion
|
|
15
|
+
exports.postAwsTs = postAwsTs;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ApiResponseClass } from "../../api/ApiResponseClass.cjs";
|
|
2
|
+
import { Config } from "../../api/config.cjs";
|
|
3
|
+
//#region src/emsApi/awsTs/post.d.ts
|
|
4
|
+
declare const postAwsTs: (path: string, data?: {}, config?: Config) => Promise<ApiResponseClass<any, any>>;
|
|
5
|
+
//#endregion
|
|
6
|
+
export { postAwsTs };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ApiResponseClass } from "../../api/ApiResponseClass.mjs";
|
|
2
|
+
import { Config } from "../../api/config.mjs";
|
|
3
|
+
//#region src/emsApi/awsTs/post.d.ts
|
|
4
|
+
declare const postAwsTs: (path: string, data?: {}, config?: Config) => Promise<ApiResponseClass<any, any>>;
|
|
5
|
+
//#endregion
|
|
6
|
+
export { postAwsTs };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { post } from "../../api/post.mjs";
|
|
2
|
+
import { getAwsTsEndpoint } from "./endpoint.mjs";
|
|
3
|
+
//#region src/emsApi/awsTs/post.ts
|
|
4
|
+
const postAwsTs = async (path, data = {}, config = {}) => {
|
|
5
|
+
return post(`${getAwsTsEndpoint()}${path}`, data, {
|
|
6
|
+
...config,
|
|
7
|
+
headers: {
|
|
8
|
+
"x-api-key": process.env?.EMS_API_KEY ?? "",
|
|
9
|
+
...config?.headers ?? {}
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
};
|
|
13
|
+
//#endregion
|
|
14
|
+
export { postAwsTs };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
const require_environment_environment = require("../../environment/environment.cjs");
|
|
3
|
+
//#region src/emsApi/vercel/endpoint.ts
|
|
4
|
+
const vercelEndpointEnvironment = {
|
|
5
|
+
DEVELOPMENT: "https://dev.api-vercel.8mscodex.com",
|
|
6
|
+
STAGING: "https://staging.api-vercel.8mscodex.com",
|
|
7
|
+
PRODUCTION: "https://api-vercel.8mscodex.com"
|
|
8
|
+
};
|
|
9
|
+
const getVercelEndpoint = () => {
|
|
10
|
+
switch (require_environment_environment.getEnvironment()) {
|
|
11
|
+
case require_environment_environment.environment.PRODUCTION: return vercelEndpointEnvironment.PRODUCTION;
|
|
12
|
+
case require_environment_environment.environment.STAGING: return vercelEndpointEnvironment.STAGING;
|
|
13
|
+
default: return vercelEndpointEnvironment.DEVELOPMENT;
|
|
14
|
+
}
|
|
15
|
+
};
|
|
16
|
+
//#endregion
|
|
17
|
+
exports.getVercelEndpoint = getVercelEndpoint;
|
|
18
|
+
exports.vercelEndpointEnvironment = vercelEndpointEnvironment;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
//#region src/emsApi/vercel/endpoint.d.ts
|
|
2
|
+
declare const vercelEndpointEnvironment: {
|
|
3
|
+
readonly DEVELOPMENT: "https://dev.api-vercel.8mscodex.com";
|
|
4
|
+
readonly STAGING: "https://staging.api-vercel.8mscodex.com";
|
|
5
|
+
readonly PRODUCTION: "https://api-vercel.8mscodex.com";
|
|
6
|
+
};
|
|
7
|
+
type VercelEndpointEnvironment = typeof vercelEndpointEnvironment[keyof typeof vercelEndpointEnvironment];
|
|
8
|
+
declare const getVercelEndpoint: () => "https://dev.api-vercel.8mscodex.com" | "https://staging.api-vercel.8mscodex.com" | "https://api-vercel.8mscodex.com";
|
|
9
|
+
//#endregion
|
|
10
|
+
export { VercelEndpointEnvironment, getVercelEndpoint, vercelEndpointEnvironment };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
//#region src/emsApi/vercel/endpoint.d.ts
|
|
2
|
+
declare const vercelEndpointEnvironment: {
|
|
3
|
+
readonly DEVELOPMENT: "https://dev.api-vercel.8mscodex.com";
|
|
4
|
+
readonly STAGING: "https://staging.api-vercel.8mscodex.com";
|
|
5
|
+
readonly PRODUCTION: "https://api-vercel.8mscodex.com";
|
|
6
|
+
};
|
|
7
|
+
type VercelEndpointEnvironment = typeof vercelEndpointEnvironment[keyof typeof vercelEndpointEnvironment];
|
|
8
|
+
declare const getVercelEndpoint: () => "https://dev.api-vercel.8mscodex.com" | "https://staging.api-vercel.8mscodex.com" | "https://api-vercel.8mscodex.com";
|
|
9
|
+
//#endregion
|
|
10
|
+
export { VercelEndpointEnvironment, getVercelEndpoint, vercelEndpointEnvironment };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { environment, getEnvironment } from "../../environment/environment.mjs";
|
|
2
|
+
//#region src/emsApi/vercel/endpoint.ts
|
|
3
|
+
const vercelEndpointEnvironment = {
|
|
4
|
+
DEVELOPMENT: "https://dev.api-vercel.8mscodex.com",
|
|
5
|
+
STAGING: "https://staging.api-vercel.8mscodex.com",
|
|
6
|
+
PRODUCTION: "https://api-vercel.8mscodex.com"
|
|
7
|
+
};
|
|
8
|
+
const getVercelEndpoint = () => {
|
|
9
|
+
switch (getEnvironment()) {
|
|
10
|
+
case environment.PRODUCTION: return vercelEndpointEnvironment.PRODUCTION;
|
|
11
|
+
case environment.STAGING: return vercelEndpointEnvironment.STAGING;
|
|
12
|
+
default: return vercelEndpointEnvironment.DEVELOPMENT;
|
|
13
|
+
}
|
|
14
|
+
};
|
|
15
|
+
//#endregion
|
|
16
|
+
export { getVercelEndpoint, vercelEndpointEnvironment };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
const require_api_get = require("../../api/get.cjs");
|
|
3
|
+
const require_emsApi_vercel_endpoint = require("./endpoint.cjs");
|
|
4
|
+
//#region src/emsApi/vercel/get.ts
|
|
5
|
+
const getVercel = async (path, data = {}, config = {}) => {
|
|
6
|
+
return require_api_get.get(`${require_emsApi_vercel_endpoint.getVercelEndpoint()}${path}`, {
|
|
7
|
+
...config,
|
|
8
|
+
headers: {
|
|
9
|
+
"x-api-key": process.env?.EMS_API_KEY ?? "",
|
|
10
|
+
...config?.headers ?? {}
|
|
11
|
+
}
|
|
12
|
+
});
|
|
13
|
+
};
|
|
14
|
+
//#endregion
|
|
15
|
+
exports.getVercel = getVercel;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ApiResponseClass } from "../../api/ApiResponseClass.cjs";
|
|
2
|
+
import { Config } from "../../api/config.cjs";
|
|
3
|
+
//#region src/emsApi/vercel/get.d.ts
|
|
4
|
+
declare const getVercel: (path: string, data?: {}, config?: Config) => Promise<ApiResponseClass<any, any>>;
|
|
5
|
+
//#endregion
|
|
6
|
+
export { getVercel };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ApiResponseClass } from "../../api/ApiResponseClass.mjs";
|
|
2
|
+
import { Config } from "../../api/config.mjs";
|
|
3
|
+
//#region src/emsApi/vercel/get.d.ts
|
|
4
|
+
declare const getVercel: (path: string, data?: {}, config?: Config) => Promise<ApiResponseClass<any, any>>;
|
|
5
|
+
//#endregion
|
|
6
|
+
export { getVercel };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { get } from "../../api/get.mjs";
|
|
2
|
+
import { getVercelEndpoint } from "./endpoint.mjs";
|
|
3
|
+
//#region src/emsApi/vercel/get.ts
|
|
4
|
+
const getVercel = async (path, data = {}, config = {}) => {
|
|
5
|
+
return get(`${getVercelEndpoint()}${path}`, {
|
|
6
|
+
...config,
|
|
7
|
+
headers: {
|
|
8
|
+
"x-api-key": process.env?.EMS_API_KEY ?? "",
|
|
9
|
+
...config?.headers ?? {}
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
};
|
|
13
|
+
//#endregion
|
|
14
|
+
export { getVercel };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
const require_emsApi_vercel_endpoint = require("./endpoint.cjs");
|
|
3
|
+
const require_emsApi_vercel_get = require("./get.cjs");
|
|
4
|
+
const require_emsApi_vercel_post = require("./post.cjs");
|
|
5
|
+
exports.getVercel = require_emsApi_vercel_get.getVercel;
|
|
6
|
+
exports.getVercelEndpoint = require_emsApi_vercel_endpoint.getVercelEndpoint;
|
|
7
|
+
exports.postVercel = require_emsApi_vercel_post.postVercel;
|
|
8
|
+
exports.vercelEndpointEnvironment = require_emsApi_vercel_endpoint.vercelEndpointEnvironment;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { VercelEndpointEnvironment, getVercelEndpoint, vercelEndpointEnvironment } from "./endpoint.cjs";
|
|
2
|
+
import { getVercel } from "./get.cjs";
|
|
3
|
+
import { postVercel } from "./post.cjs";
|
|
4
|
+
export { VercelEndpointEnvironment, getVercel, getVercelEndpoint, postVercel, vercelEndpointEnvironment };
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { VercelEndpointEnvironment, getVercelEndpoint, vercelEndpointEnvironment } from "./endpoint.mjs";
|
|
2
|
+
import { getVercel } from "./get.mjs";
|
|
3
|
+
import { postVercel } from "./post.mjs";
|
|
4
|
+
export { VercelEndpointEnvironment, getVercel, getVercelEndpoint, postVercel, vercelEndpointEnvironment };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
const require_api_post = require("../../api/post.cjs");
|
|
3
|
+
const require_emsApi_vercel_endpoint = require("./endpoint.cjs");
|
|
4
|
+
//#region src/emsApi/vercel/post.ts
|
|
5
|
+
const postVercel = async (path, data = {}, config = {}) => {
|
|
6
|
+
return require_api_post.post(`${require_emsApi_vercel_endpoint.getVercelEndpoint()}${path}`, data, {
|
|
7
|
+
...config,
|
|
8
|
+
headers: {
|
|
9
|
+
"x-api-key": process.env?.EMS_API_KEY ?? "",
|
|
10
|
+
...config?.headers ?? {}
|
|
11
|
+
}
|
|
12
|
+
});
|
|
13
|
+
};
|
|
14
|
+
//#endregion
|
|
15
|
+
exports.postVercel = postVercel;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ApiResponseClass } from "../../api/ApiResponseClass.cjs";
|
|
2
|
+
import { Config } from "../../api/config.cjs";
|
|
3
|
+
//#region src/emsApi/vercel/post.d.ts
|
|
4
|
+
declare const postVercel: (path: string, data?: {}, config?: Config) => Promise<ApiResponseClass<any, any>>;
|
|
5
|
+
//#endregion
|
|
6
|
+
export { postVercel };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ApiResponseClass } from "../../api/ApiResponseClass.mjs";
|
|
2
|
+
import { Config } from "../../api/config.mjs";
|
|
3
|
+
//#region src/emsApi/vercel/post.d.ts
|
|
4
|
+
declare const postVercel: (path: string, data?: {}, config?: Config) => Promise<ApiResponseClass<any, any>>;
|
|
5
|
+
//#endregion
|
|
6
|
+
export { postVercel };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { post } from "../../api/post.mjs";
|
|
2
|
+
import { getVercelEndpoint } from "./endpoint.mjs";
|
|
3
|
+
//#region src/emsApi/vercel/post.ts
|
|
4
|
+
const postVercel = async (path, data = {}, config = {}) => {
|
|
5
|
+
return post(`${getVercelEndpoint()}${path}`, data, {
|
|
6
|
+
...config,
|
|
7
|
+
headers: {
|
|
8
|
+
"x-api-key": process.env?.EMS_API_KEY ?? "",
|
|
9
|
+
...config?.headers ?? {}
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
};
|
|
13
|
+
//#endregion
|
|
14
|
+
export { postVercel };
|
|
@@ -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("
|
|
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("
|
|
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.
|
|
4
|
+
"version": "2.4.19",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "git+https://github.com/8millionstories-organisation/8ms-helpers-ts.git"
|
|
@@ -238,6 +238,10 @@
|
|
|
238
238
|
"import": "./dist/api/ApiResponseClass.mjs",
|
|
239
239
|
"require": "./dist/api/ApiResponseClass.cjs"
|
|
240
240
|
},
|
|
241
|
+
"./api/config": {
|
|
242
|
+
"import": "./dist/api/config.mjs",
|
|
243
|
+
"require": "./dist/api/config.cjs"
|
|
244
|
+
},
|
|
241
245
|
"./api/deleteRequest": {
|
|
242
246
|
"import": "./dist/api/deleteRequest.mjs",
|
|
243
247
|
"require": "./dist/api/deleteRequest.cjs"
|
|
@@ -538,6 +542,38 @@
|
|
|
538
542
|
"import": "./dist/drizzle/server/DrizzleNamespace.mjs",
|
|
539
543
|
"require": "./dist/drizzle/server/DrizzleNamespace.cjs"
|
|
540
544
|
},
|
|
545
|
+
"./emsApi/awsTs": {
|
|
546
|
+
"import": "./dist/emsApi/awsTs/index.mjs",
|
|
547
|
+
"require": "./dist/emsApi/awsTs/index.cjs"
|
|
548
|
+
},
|
|
549
|
+
"./emsApi/awsTs/endpoint": {
|
|
550
|
+
"import": "./dist/emsApi/awsTs/endpoint.mjs",
|
|
551
|
+
"require": "./dist/emsApi/awsTs/endpoint.cjs"
|
|
552
|
+
},
|
|
553
|
+
"./emsApi/awsTs/get": {
|
|
554
|
+
"import": "./dist/emsApi/awsTs/get.mjs",
|
|
555
|
+
"require": "./dist/emsApi/awsTs/get.cjs"
|
|
556
|
+
},
|
|
557
|
+
"./emsApi/awsTs/post": {
|
|
558
|
+
"import": "./dist/emsApi/awsTs/post.mjs",
|
|
559
|
+
"require": "./dist/emsApi/awsTs/post.cjs"
|
|
560
|
+
},
|
|
561
|
+
"./emsApi/vercel": {
|
|
562
|
+
"import": "./dist/emsApi/vercel/index.mjs",
|
|
563
|
+
"require": "./dist/emsApi/vercel/index.cjs"
|
|
564
|
+
},
|
|
565
|
+
"./emsApi/vercel/endpoint": {
|
|
566
|
+
"import": "./dist/emsApi/vercel/endpoint.mjs",
|
|
567
|
+
"require": "./dist/emsApi/vercel/endpoint.cjs"
|
|
568
|
+
},
|
|
569
|
+
"./emsApi/vercel/get": {
|
|
570
|
+
"import": "./dist/emsApi/vercel/get.mjs",
|
|
571
|
+
"require": "./dist/emsApi/vercel/get.cjs"
|
|
572
|
+
},
|
|
573
|
+
"./emsApi/vercel/post": {
|
|
574
|
+
"import": "./dist/emsApi/vercel/post.mjs",
|
|
575
|
+
"require": "./dist/emsApi/vercel/post.cjs"
|
|
576
|
+
},
|
|
541
577
|
"./environment": {
|
|
542
578
|
"import": "./dist/environment/index.mjs",
|
|
543
579
|
"require": "./dist/environment/index.cjs"
|