@8ms/helpers 2.0.6 → 2.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.
- package/.yarn/install-state.gz +0 -0
- package/aws/ec2/AwsEc2Namespace.d.ts +1 -1
- package/aws/ec2/AwsEc2Namespace.js +0 -1
- package/aws/ecs/AwsEcsNamespace.d.ts +1 -1
- package/aws/ecs/AwsEcsNamespace.js +0 -1
- package/aws/glue/AwsGlueNamespace.d.ts +1 -1
- package/aws/glue/AwsGlueNamespace.js +0 -1
- package/aws/lambda/AwsLambdaNamespace.d.ts +1 -1
- package/aws/lambda/AwsLambdaNamespace.js +0 -1
- package/aws/s3/AwsS3Namespace.d.ts +1 -1
- package/aws/s3/AwsS3Namespace.js +0 -1
- package/aws/ses/AwsSesNamespace.d.ts +1 -1
- package/aws/ses/AwsSesNamespace.js +0 -1
- package/aws/sqs/AwsSqsNamespace.d.ts +1 -1
- package/aws/sqs/AwsSqsNamespace.js +0 -1
- package/aws/ssm/AwsSsmNamespace.d.ts +1 -1
- package/aws/ssm/AwsSsmNamespace.js +0 -1
- package/google/bigQuery/GoogleBigQueryNamespace.d.ts +1 -1
- package/google/bigQuery/GoogleBigQueryNamespace.js +0 -1
- package/google/sheets/GoogleSheetsNamespace.js +0 -3
- package/google/storage/GoogleCloudStorageNamespace.d.ts +1 -1
- package/google/storage/GoogleCloudStorageNamespace.js +0 -1
- package/googleAds/GoogleAdsNamespace.js +0 -2
- package/googlePageSpeed/GooglePageSpeedNamespace.d.ts +1 -1
- package/googlePageSpeed/GooglePageSpeedNamespace.js +0 -1
- package/littleWarden/LittleWardenNamespace.d.ts +1 -1
- package/littleWarden/LittleWardenNamespace.js +0 -1
- package/onePassword/OnePasswordNamespace.d.ts +1 -2
- package/onePassword/OnePasswordNamespace.js +2 -4
- package/openAi/OpenAiNamespace.js +0 -2
- package/package.json +1 -1
- package/prisma/PrismaNamespace.js +0 -2
- package/prisma/server.d.ts +1 -1
- package/snapchat/SnapchatNamespace.js +2 -3
- package/upTimeRobot/UpTimeRobotNamespace.js +0 -2
package/.yarn/install-state.gz
CHANGED
|
Binary file
|
|
@@ -3,7 +3,7 @@ import { AwsConfig } from "../server";
|
|
|
3
3
|
import type { EC2Client } from "@aws-sdk/client-ec2";
|
|
4
4
|
export declare class AwsEc2Namespace extends BaseNamespace {
|
|
5
5
|
client: EC2Client | null;
|
|
6
|
-
config: AwsConfig;
|
|
6
|
+
config: AwsConfig | null;
|
|
7
7
|
ensureInit: () => Promise<void>;
|
|
8
8
|
startInstances: (instanceIds: string[], additionalInfo?: string, dryRun?: boolean) => Promise<any>;
|
|
9
9
|
stopInstances: (instanceIds: string[], hibernate?: boolean, force?: boolean, dryRun?: boolean) => Promise<any>;
|
|
@@ -26,7 +26,7 @@ type RunTaskProps = {
|
|
|
26
26
|
};
|
|
27
27
|
export declare class AwsEcsNamespace extends BaseNamespace {
|
|
28
28
|
client: ECSClient | null;
|
|
29
|
-
config: AwsConfig;
|
|
29
|
+
config: AwsConfig | null;
|
|
30
30
|
ensureInit: () => Promise<void>;
|
|
31
31
|
/**
|
|
32
32
|
* https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/ecs/command/ListClustersCommand/
|
|
@@ -3,7 +3,7 @@ import { AwsConfig } from "../server";
|
|
|
3
3
|
import type { GlueClient } from "@aws-sdk/client-glue";
|
|
4
4
|
export declare class AwsGlueNamespace extends BaseNamespace {
|
|
5
5
|
client: GlueClient | null;
|
|
6
|
-
config: AwsConfig;
|
|
6
|
+
config: AwsConfig | null;
|
|
7
7
|
ensureInit: () => Promise<void>;
|
|
8
8
|
/**
|
|
9
9
|
* Invoke an AWS Glue Crawler by passing in the name of the Crawler.
|
|
@@ -9,7 +9,7 @@ type InvokeProps = {
|
|
|
9
9
|
};
|
|
10
10
|
export declare class AwsLambdaNamespace extends BaseNamespace {
|
|
11
11
|
client: LambdaClient | null;
|
|
12
|
-
config: AwsConfig;
|
|
12
|
+
config: AwsConfig | null;
|
|
13
13
|
ensureInit: () => Promise<void>;
|
|
14
14
|
/**
|
|
15
15
|
* Invoke a AWS Lambda function by passing in the Function name and optional Payload data.
|
|
@@ -17,7 +17,7 @@ type WritePresignedPostProps = {
|
|
|
17
17
|
};
|
|
18
18
|
export declare class AwsS3Namespace extends BaseNamespace {
|
|
19
19
|
client: S3Client | null;
|
|
20
|
-
config: AwsConfig;
|
|
20
|
+
config: AwsConfig | null;
|
|
21
21
|
ensureInit: () => Promise<void>;
|
|
22
22
|
copy: (fromBucket: string, fromKey: string, toBucket: string, toKey: string) => Promise<void>;
|
|
23
23
|
deleteFile: (bucket: string, key: string) => Promise<void>;
|
package/aws/s3/AwsS3Namespace.js
CHANGED
|
@@ -25,7 +25,7 @@ type AddToQueue = {
|
|
|
25
25
|
};
|
|
26
26
|
export declare class AwsSqsNamespace extends BaseNamespace {
|
|
27
27
|
client: SQSClient | null;
|
|
28
|
-
config: AwsConfig;
|
|
28
|
+
config: AwsConfig | null;
|
|
29
29
|
ensureInit: () => Promise<void>;
|
|
30
30
|
addToQueue: (props: AddToQueue) => Promise<import("@aws-sdk/client-sqs").SendMessageCommandOutput>;
|
|
31
31
|
deleteFromQueue: (queueUrl: string, recipientHandle: string) => Promise<import("@aws-sdk/client-sqs").DeleteMessageCommandOutput>;
|
|
@@ -3,7 +3,7 @@ import { AwsConfig } from "../server";
|
|
|
3
3
|
import type { SSMClient } from "@aws-sdk/client-ssm";
|
|
4
4
|
export declare class AwsSsmNamespace extends BaseNamespace {
|
|
5
5
|
client: SSMClient | null;
|
|
6
|
-
config: AwsConfig;
|
|
6
|
+
config: AwsConfig | null;
|
|
7
7
|
parameters: Map<string, any>;
|
|
8
8
|
constructor(key: string, config: any);
|
|
9
9
|
ensureInit: () => Promise<void>;
|
|
@@ -16,7 +16,7 @@ type Tables = {
|
|
|
16
16
|
};
|
|
17
17
|
export declare class GoogleBigQueryNamespace extends BaseNamespace {
|
|
18
18
|
client: BigQuery | null;
|
|
19
|
-
config: GoogleCloudConfig;
|
|
19
|
+
config: GoogleCloudConfig | null;
|
|
20
20
|
ensureInit: () => Promise<void>;
|
|
21
21
|
/**
|
|
22
22
|
* Create a Dataset if it doesn't already exist.
|
|
@@ -39,9 +39,6 @@ const server_1 = require("../server");
|
|
|
39
39
|
class GoogleSheetsNamespace extends _class_1.BaseNamespace {
|
|
40
40
|
constructor() {
|
|
41
41
|
super(...arguments);
|
|
42
|
-
// Stores auth only for Google Sheets
|
|
43
|
-
this.client = null;
|
|
44
|
-
this.config = null;
|
|
45
42
|
this.ensureInit = async () => {
|
|
46
43
|
if (!this.client) {
|
|
47
44
|
try {
|
|
@@ -3,7 +3,7 @@ import type { Storage } from "@google-cloud/storage";
|
|
|
3
3
|
import { GoogleCloudConfig } from "../server";
|
|
4
4
|
export declare class GoogleCloudStorageNamespace extends BaseNamespace {
|
|
5
5
|
client: Storage | null;
|
|
6
|
-
config: GoogleCloudConfig;
|
|
6
|
+
config: GoogleCloudConfig | null;
|
|
7
7
|
ensureInit: () => Promise<void>;
|
|
8
8
|
/**
|
|
9
9
|
* Copy a local file to Google Cloud Storage.
|
|
@@ -38,8 +38,6 @@ const _class_1 = require("../_class");
|
|
|
38
38
|
class GoogleAdsNamespace extends _class_1.BaseNamespace {
|
|
39
39
|
constructor() {
|
|
40
40
|
super(...arguments);
|
|
41
|
-
this.client = null;
|
|
42
|
-
this.config = null;
|
|
43
41
|
this.mccAccountId = "";
|
|
44
42
|
this.refreshToken = "";
|
|
45
43
|
this.ensureInit = async () => {
|
|
@@ -5,7 +5,7 @@ import { Category, GooglePageSpeedConfig, Strategy } from "./server";
|
|
|
5
5
|
*/
|
|
6
6
|
export declare class GooglePageSpeedNamespace extends BaseNamespace {
|
|
7
7
|
client: boolean | null;
|
|
8
|
-
config: GooglePageSpeedConfig;
|
|
8
|
+
config: GooglePageSpeedConfig | null;
|
|
9
9
|
ensureInit: () => Promise<void>;
|
|
10
10
|
getReport: (url: string, category?: Category, strategy?: Strategy) => Promise<any>;
|
|
11
11
|
}
|
|
@@ -5,7 +5,7 @@ import { LittleWardenConfig } from "./server";
|
|
|
5
5
|
*/
|
|
6
6
|
export declare class LittleWardenNamespace extends BaseNamespace {
|
|
7
7
|
client: boolean | null;
|
|
8
|
-
config: LittleWardenConfig;
|
|
8
|
+
config: LittleWardenConfig | null;
|
|
9
9
|
ensureInit: () => Promise<void>;
|
|
10
10
|
getReport: (urlId: string) => Promise<any>;
|
|
11
11
|
}
|
|
@@ -3,8 +3,7 @@ import { BaseNamespace } from "../_class";
|
|
|
3
3
|
import type { Client } from "@1password/sdk";
|
|
4
4
|
export declare class OnePasswordNamespace extends BaseNamespace {
|
|
5
5
|
client: Client | null;
|
|
6
|
-
config: OnePasswordConfig;
|
|
7
|
-
constructor(key: string, config: OnePasswordConfig);
|
|
6
|
+
config: OnePasswordConfig | null;
|
|
8
7
|
ensureInit: () => Promise<void>;
|
|
9
8
|
listVaults: () => Promise<import("@1password/sdk").VaultOverview[]>;
|
|
10
9
|
getItem: (vaultId: string, itemId: string) => Promise<import("@1password/sdk").Item>;
|
|
@@ -36,9 +36,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
36
36
|
exports.OnePasswordNamespace = void 0;
|
|
37
37
|
const _class_1 = require("../_class");
|
|
38
38
|
class OnePasswordNamespace extends _class_1.BaseNamespace {
|
|
39
|
-
constructor(
|
|
40
|
-
super(
|
|
41
|
-
this.client = null;
|
|
39
|
+
constructor() {
|
|
40
|
+
super(...arguments);
|
|
42
41
|
// Async setup to only initialise where required
|
|
43
42
|
this.ensureInit = async () => {
|
|
44
43
|
if (!this.client) {
|
|
@@ -76,6 +75,5 @@ class OnePasswordNamespace extends _class_1.BaseNamespace {
|
|
|
76
75
|
return this.client.items.list(vaultId);
|
|
77
76
|
};
|
|
78
77
|
}
|
|
79
|
-
;
|
|
80
78
|
}
|
|
81
79
|
exports.OnePasswordNamespace = OnePasswordNamespace;
|
package/package.json
CHANGED
|
@@ -38,8 +38,6 @@ const _class_1 = require("../_class");
|
|
|
38
38
|
class PrismaNamespace extends _class_1.BaseNamespace {
|
|
39
39
|
constructor() {
|
|
40
40
|
super(...arguments);
|
|
41
|
-
this.client = null;
|
|
42
|
-
this.config = null;
|
|
43
41
|
// Async setup to only initialise where required
|
|
44
42
|
this.ensureInit = async () => {
|
|
45
43
|
if (!this.client) {
|
package/prisma/server.d.ts
CHANGED
|
@@ -4,5 +4,5 @@ export type PrismaConfig = {
|
|
|
4
4
|
isDebug: boolean;
|
|
5
5
|
isPlanetScale: boolean;
|
|
6
6
|
};
|
|
7
|
-
export declare const prismaClient: (key
|
|
7
|
+
export declare const prismaClient: (key?: string, config?: PrismaConfig) => Promise<PrismaNamespace>;
|
|
8
8
|
export { getDecimal } from "./getDecimal";
|
|
@@ -7,8 +7,6 @@ const luxon_1 = require("luxon");
|
|
|
7
7
|
class SnapchatNamespace extends _class_1.BaseNamespace {
|
|
8
8
|
constructor() {
|
|
9
9
|
super(...arguments);
|
|
10
|
-
this.client = null;
|
|
11
|
-
this.config = null;
|
|
12
10
|
/**
|
|
13
11
|
* Renew the access token as it expires every 3 hours.
|
|
14
12
|
*/
|
|
@@ -19,7 +17,8 @@ class SnapchatNamespace extends _class_1.BaseNamespace {
|
|
|
19
17
|
const apiResponse = await (0, axios_1.post)(url);
|
|
20
18
|
if (apiResponse.isSuccess()) {
|
|
21
19
|
this.client = {
|
|
22
|
-
expires: luxon_1.DateTime.now()
|
|
20
|
+
expires: luxon_1.DateTime.now()
|
|
21
|
+
.toUnixInteger() + (3 * 60 * 60 * 1000),
|
|
23
22
|
refreshToken: apiResponse.getBodyDefaultTo(["data", "access_token"], null)
|
|
24
23
|
};
|
|
25
24
|
}
|
|
@@ -14,8 +14,6 @@ const isArray_1 = __importDefault(require("lodash/isArray"));
|
|
|
14
14
|
class UpTimeRobotNamespace extends _class_1.BaseNamespace {
|
|
15
15
|
constructor() {
|
|
16
16
|
super(...arguments);
|
|
17
|
-
this.client = null;
|
|
18
|
-
this.config = null;
|
|
19
17
|
/**
|
|
20
18
|
* Renew the access token as it expires every 3 hours.
|
|
21
19
|
*/
|