@8ms/helpers 2.3.48 → 2.4.0
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/_class/index.d.mts +1 -1
- package/dist/_class/index.mjs +1 -4
- package/dist/adverity/index.d.mts +1 -1
- package/dist/adverity/index.mjs +1 -3
- package/dist/adverity/server/index.d.mts +2 -2
- package/dist/adverity/server/index.mjs +2 -5
- package/dist/api/index.d.mts +3 -2
- package/dist/api/index.mjs +44 -3
- package/dist/{api-D7uUBIq4.mjs → api-BJgcoGmU.mjs} +1 -25
- package/dist/{index-c5HdwLaY.d.mts → api-DoLMPDFM.d.mts} +1 -9
- package/dist/array/index.mjs +1 -2
- package/dist/atInternet/index.mjs +1 -3
- package/dist/aws/cloudWatchLog/server/index.d.mts +8 -8
- package/dist/aws/cloudWatchLog/server/index.mjs +2 -6
- package/dist/aws/cloudWatchMetric/server/index.d.mts +5 -5
- package/dist/aws/cloudWatchMetric/server/index.mjs +2 -5
- package/dist/aws/ec2/server/index.d.mts +5 -5
- package/dist/aws/ec2/server/index.mjs +2 -5
- package/dist/aws/ecs/server/index.d.mts +2 -2
- package/dist/aws/ecs/server/index.mjs +2 -5
- package/dist/aws/glue/server/index.d.mts +2 -2
- package/dist/aws/glue/server/index.mjs +2 -5
- package/dist/aws/lambda/server/index.d.mts +2 -2
- package/dist/aws/lambda/server/index.mjs +4 -6
- package/dist/aws/s3/server/index.d.mts +10 -10
- package/dist/aws/s3/server/index.mjs +28 -37
- package/dist/aws/server/index.d.mts +1 -1
- package/dist/aws/server/index.mjs +2 -3
- package/dist/aws/ses/server/index.d.mts +8 -8
- package/dist/aws/ses/server/index.mjs +2 -6
- package/dist/aws/sqs/server/index.d.mts +5 -5
- package/dist/aws/sqs/server/index.mjs +2 -5
- package/dist/aws/ssm/server/index.d.mts +2 -2
- package/dist/aws/ssm/server/index.mjs +2 -5
- package/dist/boolean/index.mjs +1 -2
- package/dist/brightData/serpApi/server/index.d.mts +3 -3
- package/dist/brightData/serpApi/server/index.mjs +5 -10
- package/dist/brightData/server/index.d.mts +1 -1
- package/dist/brightData/server/index.mjs +1 -2
- package/dist/brightData/webScraperIde/server/index.d.mts +1 -1
- package/dist/brightData/webScraperIde/server/index.mjs +4 -6
- package/dist/cache/server/index.mjs +1 -2
- package/dist/{chunk-DDarj8oW.mjs → chunk-y_GBKt04.mjs} +1 -3
- package/dist/crud/index.mjs +1 -2
- package/dist/crypto/server/index.mjs +2 -8
- package/dist/date/index.d.mts +1 -1
- package/dist/date/index.mjs +11 -10
- package/dist/drizzle/server/index.d.mts +1 -1
- package/dist/drizzle/server/index.mjs +1 -4
- package/dist/environment/index.mjs +1 -2
- package/dist/eskimi/index.mjs +1 -3
- package/dist/eskimi/server/index.mjs +2 -8
- package/dist/file/index.mjs +1 -3
- package/dist/file/server/index.mjs +1 -2
- package/dist/geo/index.mjs +1 -3
- package/dist/get-B9XztVOu.mjs +21 -0
- package/dist/{getDecimal-CafxtLhH.mjs → getDecimal-B9S_nqSJ.mjs} +1 -4
- package/dist/googleAds/keywordPlanner/server/index.mjs +1 -3
- package/dist/googleAds/server/index.d.mts +7 -5
- package/dist/googleAds/server/index.mjs +5 -9
- package/dist/googleCloud/bigquery/server/index.d.mts +4 -4
- package/dist/googleCloud/bigquery/server/index.mjs +1 -5
- package/dist/googleCloud/server/index.d.mts +1 -1
- package/dist/googleCloud/server/index.mjs +1 -2
- package/dist/googleCloud/sheets/server/index.d.mts +4 -4
- package/dist/googleCloud/sheets/server/index.mjs +1 -3
- package/dist/googleCloud/storage/server/index.d.mts +5 -5
- package/dist/googleCloud/storage/server/index.mjs +1 -4
- package/dist/googlePageSpeed/server/index.d.mts +1 -1
- package/dist/googlePageSpeed/server/index.mjs +2 -6
- package/dist/googleSearchIncidents/server/index.mjs +2 -5
- package/dist/greenDomain/server/index.mjs +2 -5
- package/dist/{index-1fBbJGQz.d.mts → index-BAU-daxD.d.mts} +12 -12
- package/dist/index-BlUxbvhl.d.mts +30 -0
- package/dist/inngest/index.mjs +1 -2
- package/dist/json/index.mjs +1 -4
- package/dist/littleWarden/server/index.d.mts +1 -1
- package/dist/littleWarden/server/index.mjs +2 -7
- package/dist/lodash/index.mjs +1 -15
- package/dist/lumar/api/server/index.d.mts +1 -2
- package/dist/lumar/api/server/index.mjs +3 -8
- package/dist/lumar/graphql/server/index.d.mts +1 -2
- package/dist/lumar/graphql/server/index.mjs +2 -9
- package/dist/myTarget/server/index.d.mts +1 -1
- package/dist/myTarget/server/index.mjs +2 -5
- package/dist/nextAuth/index.mjs +1 -3
- package/dist/nextJs/client/index.mjs +1 -3
- package/dist/nextJs/index.mjs +1 -2
- package/dist/number/index.mjs +2 -9
- package/dist/object/index.mjs +1 -2
- package/dist/onePassword/server/index.d.mts +7 -7
- package/dist/onePassword/server/index.mjs +1 -5
- package/dist/openAi/server/index.d.mts +1 -1
- package/dist/openAi/server/index.mjs +2 -6
- package/dist/post-DiwZvONk.mjs +22 -0
- package/dist/prisma/index.mjs +2 -4
- package/dist/prisma/server/index.d.mts +1 -1
- package/dist/prisma/server/index.mjs +1 -4
- package/dist/{server-Bwy4JI8Z.mjs → server-CCX9gh5k.mjs} +1 -4
- package/dist/snapchat/server/index.d.mts +1 -1
- package/dist/snapchat/server/index.mjs +2 -6
- package/dist/sorting/index.mjs +1 -5
- package/dist/stream/server/index.mjs +2 -4
- package/dist/string/index.d.mts +1 -1
- package/dist/string/index.mjs +1 -15
- package/dist/swr/client/index.d.mts +1 -2
- package/dist/swr/client/index.mjs +1 -2
- package/dist/upTimeRobot/server/index.d.mts +1 -1
- package/dist/upTimeRobot/server/index.mjs +2 -6
- package/dist/url/index.mjs +1 -3
- package/dist/url/server/index.mjs +15 -20
- package/dist/util/index.d.mts +1 -1
- package/dist/util/index.mjs +1 -10
- package/dist/util/server/index.mjs +1 -6
- package/dist/webWorker/index.mjs +1 -2
- package/dist/xml/server/index.mjs +2 -5
- package/package.json +33 -44
- package/dist/axios/index.d.mts +0 -22
- package/dist/axios/index.mjs +0 -50
- /package/dist/{index-DwB8X1lz.d.mts → index-1SE8er2n.d.mts} +0 -0
- /package/dist/{index-BHuvb_7y.d.mts → index-CXrNMYVx.d.mts} +0 -0
- /package/dist/{index-CqTOMR8f.d.mts → index-D-8_Li4c.d.mts} +0 -0
- /package/dist/{index-DDH4qfj3.d.mts → index-DVYYb5tw.d.mts} +0 -0
- /package/dist/{index-DInsoSQm.d.mts → index-DwYd5z_c.d.mts} +0 -0
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { BaseNamespace } from "../../../_class/index.mjs";
|
|
2
2
|
import { defaultDateTime, getToday, getYmdHisString } from "../../../date/index.mjs";
|
|
3
3
|
import { getFolder, getStringFromStream } from "../../../string/index.mjs";
|
|
4
|
-
import { n as isResponse200, t as getConfig } from "../../../server-
|
|
4
|
+
import { n as isResponse200, t as getConfig } from "../../../server-CCX9gh5k.mjs";
|
|
5
5
|
import { getBrotliCompressed, getBrotliDecompressed, getGzipCompressed, getGzipDecompressed } from "../../../util/server/index.mjs";
|
|
6
6
|
import { z } from "zod/v4";
|
|
7
|
-
import
|
|
8
|
-
|
|
7
|
+
import ky from "ky";
|
|
9
8
|
//#region src/aws/s3/server/AwsS3Namespace.ts
|
|
10
9
|
var AwsS3Namespace = class extends BaseNamespace {
|
|
11
10
|
ensureInit = async () => {
|
|
@@ -49,7 +48,7 @@ var AwsS3Namespace = class extends BaseNamespace {
|
|
|
49
48
|
Bucket: bucket,
|
|
50
49
|
Prefix: "" === cleanFolder ? "" : cleanFolder + "/"
|
|
51
50
|
}));
|
|
52
|
-
if (apiResponse.Contents
|
|
51
|
+
if (!apiResponse.Contents?.length || 0 === apiResponse.Contents.length) return;
|
|
53
52
|
const keys = apiResponse.Contents.map((file) => ({ Key: file.Key }));
|
|
54
53
|
await this.client.send(new DeleteObjectsCommand({
|
|
55
54
|
Bucket: bucket,
|
|
@@ -64,21 +63,19 @@ var AwsS3Namespace = class extends BaseNamespace {
|
|
|
64
63
|
await this.ensureInit();
|
|
65
64
|
const { ListObjectsV2Command } = await import("@aws-sdk/client-s3");
|
|
66
65
|
const cleanFolder = getFolder(folder);
|
|
67
|
-
let response = [];
|
|
68
|
-
let valid = [];
|
|
69
66
|
const apiResponse = await this.client.send(new ListObjectsV2Command({
|
|
70
67
|
Bucket: bucket,
|
|
71
68
|
Delimiter: "/",
|
|
72
69
|
Prefix: "" === cleanFolder ? "" : cleanFolder + "/"
|
|
73
70
|
}));
|
|
74
|
-
if (
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
return
|
|
71
|
+
if (!apiResponse?.["Contents"]) return [];
|
|
72
|
+
const valid = apiResponse["Contents"].filter((content) => {
|
|
73
|
+
if (!content?.["Key"]) return false;
|
|
74
|
+
const keyExploded = content["Key"].split("/");
|
|
75
|
+
return keyExploded[keyExploded.length - 1].indexOf(".") > -1;
|
|
76
|
+
});
|
|
77
|
+
if (0 === valid.length) return [];
|
|
78
|
+
return valid.map((entry) => entry?.["Key"] ?? "").filter((entryKey) => "" !== entryKey);
|
|
82
79
|
};
|
|
83
80
|
/**
|
|
84
81
|
* Fetch all the files within a given directory recursively
|
|
@@ -111,17 +108,17 @@ var AwsS3Namespace = class extends BaseNamespace {
|
|
|
111
108
|
await this.ensureInit();
|
|
112
109
|
const { ListObjectsV2Command } = await import("@aws-sdk/client-s3");
|
|
113
110
|
const cleanFolder = getFolder(folder);
|
|
114
|
-
let response = [];
|
|
115
111
|
const apiResponse = await this.client.send(new ListObjectsV2Command({
|
|
116
112
|
Bucket: bucket,
|
|
117
113
|
Delimiter: "/",
|
|
118
114
|
Prefix: "" === cleanFolder ? "" : cleanFolder + "/"
|
|
119
115
|
}));
|
|
120
|
-
if (
|
|
116
|
+
if (!apiResponse?.["CommonPrefixes"]) return [];
|
|
117
|
+
return apiResponse["CommonPrefixes"].map((prefix) => {
|
|
118
|
+
if (!prefix?.Prefix) return "";
|
|
121
119
|
const fileFolders = prefix.Prefix.slice(0, -1).split("/");
|
|
122
120
|
return fileFolders[fileFolders.length - 1];
|
|
123
|
-
});
|
|
124
|
-
return response;
|
|
121
|
+
}).filter((prefixFolder) => "" !== prefixFolder);
|
|
125
122
|
};
|
|
126
123
|
move = async (fromBucket, fromKey, toBucket, toKey) => {
|
|
127
124
|
await this.ensureInit();
|
|
@@ -165,9 +162,10 @@ var AwsS3Namespace = class extends BaseNamespace {
|
|
|
165
162
|
if (isResponse200(apiResponse)) {
|
|
166
163
|
const chunks = [];
|
|
167
164
|
response.buffer = await new Promise((resolve, reject) => {
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
165
|
+
const body = apiResponse.Body;
|
|
166
|
+
body.on("data", (chunk) => chunks.push(chunk));
|
|
167
|
+
body.on("error", (err) => reject(err));
|
|
168
|
+
body.on("end", () => resolve(Buffer.concat(chunks)));
|
|
171
169
|
});
|
|
172
170
|
} else throw new Error("Error reading file.");
|
|
173
171
|
return response;
|
|
@@ -270,12 +268,10 @@ var AwsS3Namespace = class extends BaseNamespace {
|
|
|
270
268
|
return new Promise(async (resolve, reject) => {
|
|
271
269
|
let response = null;
|
|
272
270
|
const formData = new FormData();
|
|
273
|
-
Object.entries({
|
|
274
|
-
fields: props.fields,
|
|
275
|
-
file: props.file
|
|
276
|
-
}).forEach(([key, value]) => {
|
|
271
|
+
Object.entries(props.fields).forEach(([key, value]) => {
|
|
277
272
|
formData.append(key, value);
|
|
278
273
|
});
|
|
274
|
+
formData.append("file", props.file);
|
|
279
275
|
if ((await fetch(props.url, {
|
|
280
276
|
method: "POST",
|
|
281
277
|
body: formData
|
|
@@ -293,18 +289,15 @@ var AwsS3Namespace = class extends BaseNamespace {
|
|
|
293
289
|
*/
|
|
294
290
|
urlContents = async (bucket, key, url) => {
|
|
295
291
|
await this.ensureInit();
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
ContentLength: response.headers["content-length"]
|
|
303
|
-
});
|
|
292
|
+
const response = await ky.get(url);
|
|
293
|
+
const arrayBuffer = await response.arrayBuffer();
|
|
294
|
+
const data = Buffer.from(arrayBuffer);
|
|
295
|
+
await this.writeFile(bucket, key, data, {
|
|
296
|
+
ContentType: response.headers.get("content-type"),
|
|
297
|
+
ContentLength: response.headers.get("content-length")
|
|
304
298
|
});
|
|
305
299
|
};
|
|
306
300
|
};
|
|
307
|
-
|
|
308
301
|
//#endregion
|
|
309
302
|
//#region src/aws/s3/server/awsS3.ts
|
|
310
303
|
const awsS3Namespaces = /* @__PURE__ */ new Map();
|
|
@@ -320,7 +313,6 @@ const readFileDefault = {
|
|
|
320
313
|
error: void 0,
|
|
321
314
|
modified: defaultDateTime
|
|
322
315
|
};
|
|
323
|
-
|
|
324
316
|
//#endregion
|
|
325
317
|
//#region src/aws/s3/server/payload.ts
|
|
326
318
|
/**
|
|
@@ -355,6 +347,5 @@ const payloadSchema = z.object({ Records: z.object({
|
|
|
355
347
|
})
|
|
356
348
|
})
|
|
357
349
|
}).array() });
|
|
358
|
-
|
|
359
350
|
//#endregion
|
|
360
|
-
export { AwsS3Namespace, awsS3Client, payloadSchema, readFileDefault };
|
|
351
|
+
export { AwsS3Namespace, awsS3Client, payloadSchema, readFileDefault };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as getConfig, r as isResponse200, t as AwsConfig } from "../../index-
|
|
1
|
+
import { n as getConfig, r as isResponse200, t as AwsConfig } from "../../index-D-8_Li4c.mjs";
|
|
2
2
|
export { AwsConfig, getConfig, isResponse200 };
|
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
import { n as isResponse200, t as getConfig } from "../../server-
|
|
2
|
-
|
|
3
|
-
export { getConfig, isResponse200 };
|
|
1
|
+
import { n as isResponse200, t as getConfig } from "../../server-CCX9gh5k.mjs";
|
|
2
|
+
export { getConfig, isResponse200 };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { n as BaseClass, t as BaseNamespace } from "../../../index-
|
|
2
|
-
import { t as AwsConfig } from "../../../index-
|
|
1
|
+
import { n as BaseClass, t as BaseNamespace } from "../../../index-1SE8er2n.mjs";
|
|
2
|
+
import { t as AwsConfig } from "../../../index-D-8_Li4c.mjs";
|
|
3
3
|
import { SESClient, SendEmailCommandInput, SendRawEmailCommandInput } from "@aws-sdk/client-ses";
|
|
4
4
|
|
|
5
5
|
//#region src/aws/ses/server/AwsSesNamespace.d.ts
|
|
@@ -7,7 +7,7 @@ declare class AwsSesNamespace extends BaseNamespace {
|
|
|
7
7
|
client: SESClient;
|
|
8
8
|
config: AwsConfig;
|
|
9
9
|
ensureInit: () => Promise<void>;
|
|
10
|
-
send: (input: SendEmailCommandInput | SendRawEmailCommandInput) => Promise<
|
|
10
|
+
send: (input: SendEmailCommandInput | SendRawEmailCommandInput) => Promise<unknown>;
|
|
11
11
|
}
|
|
12
12
|
//#endregion
|
|
13
13
|
//#region src/aws/ses/server/SimpleEmail.d.ts
|
|
@@ -65,7 +65,7 @@ declare class SimpleEmail extends BaseClass {
|
|
|
65
65
|
RawMessage: {
|
|
66
66
|
Data: string;
|
|
67
67
|
};
|
|
68
|
-
Source: string;
|
|
68
|
+
Source: string | undefined;
|
|
69
69
|
} | {
|
|
70
70
|
Destination: {
|
|
71
71
|
BccAddresses: string[];
|
|
@@ -76,19 +76,19 @@ declare class SimpleEmail extends BaseClass {
|
|
|
76
76
|
Body: {
|
|
77
77
|
Html: {
|
|
78
78
|
Charset: string;
|
|
79
|
-
Data: string;
|
|
79
|
+
Data: string | undefined;
|
|
80
80
|
};
|
|
81
81
|
Text: {
|
|
82
82
|
Charset: string;
|
|
83
|
-
Data: string;
|
|
83
|
+
Data: string | undefined;
|
|
84
84
|
};
|
|
85
85
|
};
|
|
86
86
|
Subject: {
|
|
87
87
|
Charset: string;
|
|
88
|
-
Data: string;
|
|
88
|
+
Data: string | undefined;
|
|
89
89
|
};
|
|
90
90
|
};
|
|
91
|
-
Source: string;
|
|
91
|
+
Source: string | undefined;
|
|
92
92
|
}>;
|
|
93
93
|
private _getRawEmailParams;
|
|
94
94
|
private _isTextFile;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { BaseClass, BaseNamespace } from "../../../_class/index.mjs";
|
|
2
|
-
import { t as getConfig } from "../../../server-
|
|
3
|
-
|
|
2
|
+
import { t as getConfig } from "../../../server-CCX9gh5k.mjs";
|
|
4
3
|
//#region src/aws/ses/server/AwsSesNamespace.ts
|
|
5
4
|
var AwsSesNamespace = class extends BaseNamespace {
|
|
6
5
|
ensureInit = async () => {
|
|
@@ -31,7 +30,6 @@ var AwsSesNamespace = class extends BaseNamespace {
|
|
|
31
30
|
return response;
|
|
32
31
|
};
|
|
33
32
|
};
|
|
34
|
-
|
|
35
33
|
//#endregion
|
|
36
34
|
//#region src/aws/ses/server/SimpleEmail.ts
|
|
37
35
|
/**
|
|
@@ -253,7 +251,6 @@ var SimpleEmail = class extends BaseClass {
|
|
|
253
251
|
return response;
|
|
254
252
|
};
|
|
255
253
|
};
|
|
256
|
-
|
|
257
254
|
//#endregion
|
|
258
255
|
//#region src/aws/ses/server/awsSes.ts
|
|
259
256
|
const awsSesNamespaces = /* @__PURE__ */ new Map();
|
|
@@ -263,6 +260,5 @@ const awsSesClient = async (key = "default", config, vaultId, itemId) => {
|
|
|
263
260
|
awsSesNamespaces.set(key, namespace);
|
|
264
261
|
return namespace;
|
|
265
262
|
};
|
|
266
|
-
|
|
267
263
|
//#endregion
|
|
268
|
-
export { AwsSesNamespace, SimpleEmail, awsSesClient };
|
|
264
|
+
export { AwsSesNamespace, SimpleEmail, awsSesClient };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { t as BaseNamespace } from "../../../index-
|
|
2
|
-
import { t as AwsConfig } from "../../../index-
|
|
3
|
-
import * as _aws_sdk_client_sqs0 from "@aws-sdk/client-sqs";
|
|
1
|
+
import { t as BaseNamespace } from "../../../index-1SE8er2n.mjs";
|
|
2
|
+
import { t as AwsConfig } from "../../../index-D-8_Li4c.mjs";
|
|
3
|
+
import * as _$_aws_sdk_client_sqs0 from "@aws-sdk/client-sqs";
|
|
4
4
|
import { SQSClient } from "@aws-sdk/client-sqs";
|
|
5
5
|
|
|
6
6
|
//#region src/aws/sqs/server/AwsSqsNamespace.d.ts
|
|
@@ -30,8 +30,8 @@ declare class AwsSqsNamespace extends BaseNamespace {
|
|
|
30
30
|
client: SQSClient;
|
|
31
31
|
config: AwsConfig;
|
|
32
32
|
ensureInit: () => Promise<void>;
|
|
33
|
-
addToQueue: (props: AddToQueue) => Promise<_aws_sdk_client_sqs0.SendMessageCommandOutput>;
|
|
34
|
-
deleteFromQueue: (queueUrl: string, recipientHandle: string) => Promise<_aws_sdk_client_sqs0.DeleteMessageCommandOutput>;
|
|
33
|
+
addToQueue: (props: AddToQueue) => Promise<_$_aws_sdk_client_sqs0.SendMessageCommandOutput>;
|
|
34
|
+
deleteFromQueue: (queueUrl: string, recipientHandle: string) => Promise<_$_aws_sdk_client_sqs0.DeleteMessageCommandOutput>;
|
|
35
35
|
isEventSqs: (event: SqsEvent) => Promise<boolean>;
|
|
36
36
|
}
|
|
37
37
|
//#endregion
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { BaseNamespace } from "../../../_class/index.mjs";
|
|
2
|
-
import { t as getConfig } from "../../../server-
|
|
3
|
-
|
|
2
|
+
import { t as getConfig } from "../../../server-CCX9gh5k.mjs";
|
|
4
3
|
//#region src/aws/sqs/server/AwsSqsNamespace.ts
|
|
5
4
|
var AwsSqsNamespace = class extends BaseNamespace {
|
|
6
5
|
ensureInit = async () => {
|
|
@@ -41,7 +40,6 @@ var AwsSqsNamespace = class extends BaseNamespace {
|
|
|
41
40
|
return response;
|
|
42
41
|
};
|
|
43
42
|
};
|
|
44
|
-
|
|
45
43
|
//#endregion
|
|
46
44
|
//#region src/aws/sqs/server/awsSqs.ts
|
|
47
45
|
const awsSqsNamespaces = /* @__PURE__ */ new Map();
|
|
@@ -51,6 +49,5 @@ const awsSqsClient = async (key = "default", config, vaultId, itemId) => {
|
|
|
51
49
|
awsSqsNamespaces.set(key, namespace);
|
|
52
50
|
return namespace;
|
|
53
51
|
};
|
|
54
|
-
|
|
55
52
|
//#endregion
|
|
56
|
-
export { AwsSqsNamespace, awsSqsClient };
|
|
53
|
+
export { AwsSqsNamespace, awsSqsClient };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as BaseNamespace } from "../../../index-
|
|
2
|
-
import { t as AwsConfig } from "../../../index-
|
|
1
|
+
import { t as BaseNamespace } from "../../../index-1SE8er2n.mjs";
|
|
2
|
+
import { t as AwsConfig } from "../../../index-D-8_Li4c.mjs";
|
|
3
3
|
import { SSMClient } from "@aws-sdk/client-ssm";
|
|
4
4
|
|
|
5
5
|
//#region src/aws/ssm/server/AwsSsmNamespace.d.ts
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { BaseNamespace } from "../../../_class/index.mjs";
|
|
2
|
-
import { t as getConfig } from "../../../server-
|
|
3
|
-
|
|
2
|
+
import { t as getConfig } from "../../../server-CCX9gh5k.mjs";
|
|
4
3
|
//#region src/aws/ssm/server/AwsSsmNamespace.ts
|
|
5
4
|
var AwsSsmNamespace = class extends BaseNamespace {
|
|
6
5
|
parameters;
|
|
@@ -32,7 +31,6 @@ var AwsSsmNamespace = class extends BaseNamespace {
|
|
|
32
31
|
return this.parameters.get(name);
|
|
33
32
|
};
|
|
34
33
|
};
|
|
35
|
-
|
|
36
34
|
//#endregion
|
|
37
35
|
//#region src/aws/ssm/server/awsSsm.ts
|
|
38
36
|
const awsSsmNamespaces = /* @__PURE__ */ new Map();
|
|
@@ -42,6 +40,5 @@ const awsSsmClient = async (key = "default", config, vaultId, itemId) => {
|
|
|
42
40
|
awsSsmNamespaces.set(key, namespace);
|
|
43
41
|
return namespace;
|
|
44
42
|
};
|
|
45
|
-
|
|
46
43
|
//#endregion
|
|
47
|
-
export { AwsSsmNamespace, awsSsmClient };
|
|
44
|
+
export { AwsSsmNamespace, awsSsmClient };
|
package/dist/boolean/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t as Auth } from "../../../index-
|
|
1
|
+
import { o as ApiResponseClass } from "../../../api-DoLMPDFM.mjs";
|
|
2
|
+
import { t as Auth } from "../../../index-DwYd5z_c.mjs";
|
|
3
3
|
|
|
4
4
|
//#region src/brightData/serpApi/server/brightDataSerpApi.d.ts
|
|
5
5
|
declare const brightDataSerpApiType: {
|
|
@@ -82,7 +82,7 @@ declare const getAsyncResults: (auth: Auth, requestId: string) => Promise<ApiRes
|
|
|
82
82
|
* Returns a request ID used with getAsyncResults
|
|
83
83
|
* https://docs.brightdata.com/scraping-automation/serp-api/asynchronous-requests
|
|
84
84
|
*/
|
|
85
|
-
declare const getAsyncRequestId: (auth: Auth, data: {}, type: BrightDataSerpApiType) => Promise<string>;
|
|
85
|
+
declare const getAsyncRequestId: (auth: Auth, data: {} | undefined, type: BrightDataSerpApiType) => Promise<string>;
|
|
86
86
|
//#endregion
|
|
87
87
|
//#region src/brightData/serpApi/server/getRealtime.d.ts
|
|
88
88
|
/**
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { get
|
|
1
|
+
import { i as ApiResponseClass } from "../../../api-BJgcoGmU.mjs";
|
|
2
|
+
import { t as get } from "../../../get-B9XztVOu.mjs";
|
|
3
|
+
import { t as post } from "../../../post-DiwZvONk.mjs";
|
|
4
|
+
import "../../../api/index.mjs";
|
|
3
5
|
import { getCustomerId, getZone } from "../../server/index.mjs";
|
|
4
|
-
|
|
5
6
|
//#region src/brightData/serpApi/server/brightDataSerpApi.ts
|
|
6
7
|
const brightDataSerpApiType = {
|
|
7
8
|
GOOGLE_FLIGHTS: "GOOGLE_FLIGHTS",
|
|
@@ -12,7 +13,6 @@ const brightDataSerpApiType = {
|
|
|
12
13
|
GOOGLE_SEARCH: "GOOGLE_SEARCH",
|
|
13
14
|
GOOGLE_TRENDS: "GOOGLE_TRENDS"
|
|
14
15
|
};
|
|
15
|
-
|
|
16
16
|
//#endregion
|
|
17
17
|
//#region src/brightData/serpApi/server/buildGoogleSerpUrl.ts
|
|
18
18
|
/**
|
|
@@ -112,7 +112,6 @@ const buildGoogleSerpUrl = (props) => {
|
|
|
112
112
|
if ("json" === props.returnType) return params;
|
|
113
113
|
return url.toString();
|
|
114
114
|
};
|
|
115
|
-
|
|
116
115
|
//#endregion
|
|
117
116
|
//#region src/brightData/serpApi/server/buildGoogleTrendsUrl.ts
|
|
118
117
|
/**
|
|
@@ -163,7 +162,6 @@ const buildGoogleTrendsUrl = (props) => {
|
|
|
163
162
|
if ("json" === props.returnType) return params;
|
|
164
163
|
return url.toString();
|
|
165
164
|
};
|
|
166
|
-
|
|
167
165
|
//#endregion
|
|
168
166
|
//#region src/brightData/serpApi/server/getAsyncResults.ts
|
|
169
167
|
/**
|
|
@@ -179,7 +177,6 @@ const getAsyncResults = async (auth, requestId) => {
|
|
|
179
177
|
else response.setToError(null, "Error in request");
|
|
180
178
|
return response;
|
|
181
179
|
};
|
|
182
|
-
|
|
183
180
|
//#endregion
|
|
184
181
|
//#region src/brightData/serpApi/server/getAsyncRequestId.ts
|
|
185
182
|
/**
|
|
@@ -203,7 +200,6 @@ const getAsyncRequestId = async (auth, data = {}, type) => {
|
|
|
203
200
|
if (requestResponse.isSuccess()) response = requestResponse.getBodyDefaultTo(["response_id"], "");
|
|
204
201
|
return response;
|
|
205
202
|
};
|
|
206
|
-
|
|
207
203
|
//#endregion
|
|
208
204
|
//#region src/brightData/serpApi/server/getRealtime.ts
|
|
209
205
|
/**
|
|
@@ -224,6 +220,5 @@ const getRealtime = async (auth, url) => {
|
|
|
224
220
|
if (apiResponse.isSuccess()) response = apiResponse.getBody();
|
|
225
221
|
return response;
|
|
226
222
|
};
|
|
227
|
-
|
|
228
223
|
//#endregion
|
|
229
|
-
export { brightDataSerpApiType, buildGoogleSerpUrl, buildGoogleTrendsUrl, getAsyncRequestId, getAsyncResults, getRealtime };
|
|
224
|
+
export { brightDataSerpApiType, buildGoogleSerpUrl, buildGoogleTrendsUrl, getAsyncRequestId, getAsyncResults, getRealtime };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as getCustomerId, r as getZone, t as Auth } from "../../index-
|
|
1
|
+
import { n as getCustomerId, r as getZone, t as Auth } from "../../index-DwYd5z_c.mjs";
|
|
2
2
|
export { Auth, getCustomerId, getZone };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { sleep } from "../../../util/index.mjs";
|
|
2
|
-
import {
|
|
3
|
-
import { get
|
|
4
|
-
|
|
2
|
+
import { t as apiState } from "../../../api-BJgcoGmU.mjs";
|
|
3
|
+
import { t as get } from "../../../get-B9XztVOu.mjs";
|
|
4
|
+
import { t as post } from "../../../post-DiwZvONk.mjs";
|
|
5
5
|
//#region src/brightData/webScraperIde/server/getBatch.ts
|
|
6
6
|
/**
|
|
7
7
|
* Depends on the Scraper setup!
|
|
@@ -17,7 +17,6 @@ const getBatch = async (auth, scraperId, data = {}, isDev = false) => {
|
|
|
17
17
|
if ((await post(requestUrl.toString(), data, { headers: { Authorization: `Bearer ${auth.apiKey}` } })).isSuccess()) response = true;
|
|
18
18
|
return response;
|
|
19
19
|
};
|
|
20
|
-
|
|
21
20
|
//#endregion
|
|
22
21
|
//#region src/brightData/webScraperIde/server/getRealtime.ts
|
|
23
22
|
/**
|
|
@@ -45,6 +44,5 @@ const getRealtime = async (auth, scraperId, data = {}) => {
|
|
|
45
44
|
}
|
|
46
45
|
return response;
|
|
47
46
|
};
|
|
48
|
-
|
|
49
47
|
//#endregion
|
|
50
|
-
export { getBatch, getRealtime };
|
|
48
|
+
export { getBatch, getRealtime };
|
package/dist/crud/index.mjs
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { t as __require } from "../../chunk-
|
|
1
|
+
import { t as __require } from "../../chunk-y_GBKt04.mjs";
|
|
2
2
|
import { getString } from "../../string/index.mjs";
|
|
3
|
-
|
|
4
3
|
//#region src/crypto/server/getDecrypt.ts
|
|
5
4
|
/**
|
|
6
5
|
* Decrypt an encoding string using a salt.
|
|
@@ -16,7 +15,6 @@ const getDecrypt = (appSalt, input, salt) => {
|
|
|
16
15
|
const decipher = crypto.createDecipheriv(ALGORITHM, key, iv);
|
|
17
16
|
return Buffer.concat([decipher.update(encrypted), decipher.final()]).toString("utf8");
|
|
18
17
|
};
|
|
19
|
-
|
|
20
18
|
//#endregion
|
|
21
19
|
//#region src/crypto/server/getEncrypt.ts
|
|
22
20
|
/**
|
|
@@ -32,7 +30,6 @@ const getEncrypt = (appSalt, input, salt) => {
|
|
|
32
30
|
const encrypted = Buffer.concat([cipher.update(input, "utf8"), cipher.final()]);
|
|
33
31
|
return iv.toString("hex") + ":" + encrypted.toString("hex");
|
|
34
32
|
};
|
|
35
|
-
|
|
36
33
|
//#endregion
|
|
37
34
|
//#region src/crypto/server/getMd5.ts
|
|
38
35
|
/**
|
|
@@ -43,7 +40,6 @@ const getMd5 = (input) => {
|
|
|
43
40
|
const inputString = getString(input);
|
|
44
41
|
return crypto.createHash("md5").update(inputString).digest("hex");
|
|
45
42
|
};
|
|
46
|
-
|
|
47
43
|
//#endregion
|
|
48
44
|
//#region src/crypto/server/getRandom.ts
|
|
49
45
|
/**
|
|
@@ -52,7 +48,6 @@ const getMd5 = (input) => {
|
|
|
52
48
|
const getRandom = (length) => {
|
|
53
49
|
return Math.random().toString(36).substr(0, length);
|
|
54
50
|
};
|
|
55
|
-
|
|
56
51
|
//#endregion
|
|
57
52
|
//#region src/crypto/server/getSha256.ts
|
|
58
53
|
/**
|
|
@@ -63,6 +58,5 @@ const getSha256 = (input) => {
|
|
|
63
58
|
const inputString = getString(input);
|
|
64
59
|
return crypto.createHash("sha256").update(inputString).digest("hex");
|
|
65
60
|
};
|
|
66
|
-
|
|
67
61
|
//#endregion
|
|
68
|
-
export { getDecrypt, getEncrypt, getMd5, getRandom, getSha256 };
|
|
62
|
+
export { getDecrypt, getEncrypt, getMd5, getRandom, getSha256 };
|
package/dist/date/index.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { $ as defaultDate, A as getMonday, B as isLastWeek, C as differenceInBusinessDays, D as getLuxonDate, E as getLastWeek, F as getTwoWeeksAgo, G as isThursday, H as isSaturday, I as getUnix, J as isWeekend, K as isTuesday, L as getWeeksAgo, M as getSunday, N as getThisWeek, O as getMax, P as getToday, Q as Timeframe, R as getYesterday, S as getFinancialYearWeeks, T as getDatesBetween, U as isSunday, V as isMonday, W as isThisWeek, X as InputDate, Y as FinancialWeek, Z as Month, _ as getYmdNumber, a as getFullDate, b as getFinancialYearToDate, c as getMonthYearString, d as getTodayYmdNumber, et as defaultDateNumber, f as getTodayYmdString, g as getYmdHisString, h as getYmdHisNumber, i as getDurationMinutes, j as getMonthsBetween, k as getMin, l as getTodayYmdHisNumber, m as getYearNumber, n as getDayNumber, nt as month, o as getFullDateTime, p as getYearMonthString, q as isWednesday, r as getDurationHours, s as getLuxonDateFromExcel, t as format, tt as defaultDateTime, u as getTodayYmdHisString, v as getYmdString, w as differenceInMinutes, x as getFinancialYearToYesterday, y as getFinancialYear, z as isFriday } from "../index-
|
|
1
|
+
import { $ as defaultDate, A as getMonday, B as isLastWeek, C as differenceInBusinessDays, D as getLuxonDate, E as getLastWeek, F as getTwoWeeksAgo, G as isThursday, H as isSaturday, I as getUnix, J as isWeekend, K as isTuesday, L as getWeeksAgo, M as getSunday, N as getThisWeek, O as getMax, P as getToday, Q as Timeframe, R as getYesterday, S as getFinancialYearWeeks, T as getDatesBetween, U as isSunday, V as isMonday, W as isThisWeek, X as InputDate, Y as FinancialWeek, Z as Month, _ as getYmdNumber, a as getFullDate, b as getFinancialYearToDate, c as getMonthYearString, d as getTodayYmdNumber, et as defaultDateNumber, f as getTodayYmdString, g as getYmdHisString, h as getYmdHisNumber, i as getDurationMinutes, j as getMonthsBetween, k as getMin, l as getTodayYmdHisNumber, m as getYearNumber, n as getDayNumber, nt as month, o as getFullDateTime, p as getYearMonthString, q as isWednesday, r as getDurationHours, s as getLuxonDateFromExcel, t as format, tt as defaultDateTime, u as getTodayYmdHisString, v as getYmdString, w as differenceInMinutes, x as getFinancialYearToYesterday, y as getFinancialYear, z as isFriday } from "../index-BAU-daxD.mjs";
|
|
2
2
|
export { FinancialWeek, InputDate, Month, Timeframe, defaultDate, defaultDateNumber, defaultDateTime, differenceInBusinessDays, differenceInMinutes, format, getDatesBetween, getDayNumber, getDurationHours, getDurationMinutes, getFinancialYear, getFinancialYearToDate, getFinancialYearToYesterday, getFinancialYearWeeks, getFullDate, getFullDateTime, getLastWeek, getLuxonDate, getLuxonDateFromExcel, getMax, getMin, getMonday, getMonthYearString, getMonthsBetween, getSunday, getThisWeek, getToday, getTodayYmdHisNumber, getTodayYmdHisString, getTodayYmdNumber, getTodayYmdString, getTwoWeeksAgo, getUnix, getWeeksAgo, getYearMonthString, getYearNumber, getYesterday, getYmdHisNumber, getYmdHisString, getYmdNumber, getYmdString, isFriday, isLastWeek, isMonday, isSaturday, isSunday, isThisWeek, isThursday, isTuesday, isWednesday, isWeekend, month };
|
package/dist/date/index.mjs
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { DateTime, Interval } from "luxon";
|
|
2
|
-
|
|
3
2
|
//#region src/date/date.ts
|
|
4
3
|
const defaultDate = "1901-01-01";
|
|
5
4
|
const defaultDateNumber = 19010101;
|
|
@@ -21,7 +20,6 @@ const month = {
|
|
|
21
20
|
NOVEMBER: "NOVEMBER",
|
|
22
21
|
DECEMBER: "DECEMBER"
|
|
23
22
|
};
|
|
24
|
-
|
|
25
23
|
//#endregion
|
|
26
24
|
//#region src/date/calculation.ts
|
|
27
25
|
/**
|
|
@@ -54,9 +52,15 @@ const getLuxonDate = (input, setMidnight) => {
|
|
|
54
52
|
else {
|
|
55
53
|
const inputString = input.toString().toLowerCase();
|
|
56
54
|
instance = DateTime.fromISO(inputString, { zone: "utc" });
|
|
57
|
-
if (!instance.isValid)
|
|
58
|
-
|
|
59
|
-
|
|
55
|
+
if (!instance.isValid) {
|
|
56
|
+
const len = inputString.length;
|
|
57
|
+
if (23 === len) instance = DateTime.fromFormat(inputString, "yyyy-MM-dd HH:mm:ss.SSS", { zone: "utc" });
|
|
58
|
+
else if (19 === len) instance = DateTime.fromFormat(inputString, "yyyy-MM-dd HH:mm:ss", { zone: "utc" });
|
|
59
|
+
else {
|
|
60
|
+
instance = DateTime.fromFormat(inputString, "yyyy MMMM dd", { zone: "utc" });
|
|
61
|
+
if (!instance.isValid) instance = DateTime.fromFormat(inputString, "yyyy-MMMM-dd", { zone: "utc" });
|
|
62
|
+
}
|
|
63
|
+
}
|
|
60
64
|
}
|
|
61
65
|
instance = instance.setZone("utc", { keepLocalTime: false });
|
|
62
66
|
if (setMidnight) instance = instance.set({
|
|
@@ -259,7 +263,6 @@ const isLastWeek = (start, end) => {
|
|
|
259
263
|
const lastWeek = getLastWeek();
|
|
260
264
|
return inputWeek.start.hasSame(lastWeek.start, "day") && inputWeek.end.hasSame(lastWeek.end, "day");
|
|
261
265
|
};
|
|
262
|
-
|
|
263
266
|
//#endregion
|
|
264
267
|
//#region src/date/financialYear.ts
|
|
265
268
|
/**
|
|
@@ -313,7 +316,6 @@ const getFinancialYearWeeks = (year) => {
|
|
|
313
316
|
const financialYear = getFinancialYear(year);
|
|
314
317
|
return Interval.fromDateTimes(financialYear.start, financialYear.end).splitBy({ weeks: 1 });
|
|
315
318
|
};
|
|
316
|
-
|
|
317
319
|
//#endregion
|
|
318
320
|
//#region src/date/format.ts
|
|
319
321
|
/**
|
|
@@ -360,7 +362,7 @@ const getDurationMinutes = (seconds) => {
|
|
|
360
362
|
* Simple function takes any DateTime, String or Number and formats it.
|
|
361
363
|
*/
|
|
362
364
|
const format = (input, dateFormat) => {
|
|
363
|
-
return getLuxonDate(input).toFormat(dateFormat);
|
|
365
|
+
return getLuxonDate(input).toFormat(dateFormat ?? "yyyy-MM-dd HH:mm:ss");
|
|
364
366
|
};
|
|
365
367
|
/**
|
|
366
368
|
* Convert a Date into a dd number.
|
|
@@ -469,6 +471,5 @@ const getLuxonDateFromExcel = (serial) => {
|
|
|
469
471
|
const minutes = Math.floor(totalSeconds / 60) % 60;
|
|
470
472
|
return DateTime.fromISO(`${dateInfo.getFullYear()}-${dateInfo.getMonth()}-${dateInfo.getDate()}T${hours}:${minutes}:${seconds}Z`);
|
|
471
473
|
};
|
|
472
|
-
|
|
473
474
|
//#endregion
|
|
474
|
-
export { defaultDate, defaultDateNumber, defaultDateTime, differenceInBusinessDays, differenceInMinutes, format, getDatesBetween, getDayNumber, getDurationHours, getDurationMinutes, getFinancialYear, getFinancialYearToDate, getFinancialYearToYesterday, getFinancialYearWeeks, getFullDate, getFullDateTime, getLastWeek, getLuxonDate, getLuxonDateFromExcel, getMax, getMin, getMonday, getMonthYearString, getMonthsBetween, getSunday, getThisWeek, getToday, getTodayYmdHisNumber, getTodayYmdHisString, getTodayYmdNumber, getTodayYmdString, getTwoWeeksAgo, getUnix, getWeeksAgo, getYearMonthString, getYearNumber, getYesterday, getYmdHisNumber, getYmdHisString, getYmdNumber, getYmdString, isFriday, isLastWeek, isMonday, isSaturday, isSunday, isThisWeek, isThursday, isTuesday, isWednesday, isWeekend, month };
|
|
475
|
+
export { defaultDate, defaultDateNumber, defaultDateTime, differenceInBusinessDays, differenceInMinutes, format, getDatesBetween, getDayNumber, getDurationHours, getDurationMinutes, getFinancialYear, getFinancialYearToDate, getFinancialYearToYesterday, getFinancialYearWeeks, getFullDate, getFullDateTime, getLastWeek, getLuxonDate, getLuxonDateFromExcel, getMax, getMin, getMonday, getMonthYearString, getMonthsBetween, getSunday, getThisWeek, getToday, getTodayYmdHisNumber, getTodayYmdHisString, getTodayYmdNumber, getTodayYmdString, getTwoWeeksAgo, getUnix, getWeeksAgo, getYearMonthString, getYearNumber, getYesterday, getYmdHisNumber, getYmdHisString, getYmdNumber, getYmdString, isFriday, isLastWeek, isMonday, isSaturday, isSunday, isThisWeek, isThursday, isTuesday, isWednesday, isWeekend, month };
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { getError } from "../../util/index.mjs";
|
|
2
2
|
import { BaseNamespace } from "../../_class/index.mjs";
|
|
3
|
-
|
|
4
3
|
//#region src/drizzle/server/DrizzleNamespace.ts
|
|
5
4
|
var DrizzleNamespace = class extends BaseNamespace {
|
|
6
5
|
ensureInit = async () => {
|
|
@@ -44,7 +43,6 @@ var DrizzleNamespace = class extends BaseNamespace {
|
|
|
44
43
|
}
|
|
45
44
|
};
|
|
46
45
|
};
|
|
47
|
-
|
|
48
46
|
//#endregion
|
|
49
47
|
//#region src/drizzle/server/drizzle.ts
|
|
50
48
|
const drizzleNamespaces = /* @__PURE__ */ new Map();
|
|
@@ -64,6 +62,5 @@ const drizzleClient = async (key = "default", config) => {
|
|
|
64
62
|
drizzleNamespaces.set(key, namespace);
|
|
65
63
|
return namespace;
|
|
66
64
|
};
|
|
67
|
-
|
|
68
65
|
//#endregion
|
|
69
|
-
export { DrizzleNamespace, drizzleClient };
|
|
66
|
+
export { DrizzleNamespace, drizzleClient };
|
|
@@ -55,6 +55,5 @@ const isLocalhost = () => {
|
|
|
55
55
|
if (isVercel()) return void 0 === process.env["NEXT_PUBLIC_VERCEL_GIT_REPO_ID"];
|
|
56
56
|
return false;
|
|
57
57
|
};
|
|
58
|
-
|
|
59
58
|
//#endregion
|
|
60
|
-
export { environment, getEnvironment, isAws, isDevelopment, isLocalhost, isProduction, isServer, isStaging, isVercel, platform };
|
|
59
|
+
export { environment, getEnvironment, isAws, isDevelopment, isLocalhost, isProduction, isServer, isStaging, isVercel, platform };
|