@8ms/helpers 2.3.13 → 2.3.15
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/dist/_class/index.d.mts +1 -1
- package/dist/adverity/index.d.mts +1 -1
- package/dist/adverity/server/index.d.mts +2 -2
- package/dist/adverity/server/index.mjs +2 -2
- package/dist/api/index.d.mts +1 -1
- package/dist/api/index.mjs +1 -1
- package/dist/aws/ec2/server/index.d.mts +2 -2
- package/dist/aws/ec2/server/index.mjs +1 -1
- package/dist/aws/ecs/server/index.d.mts +2 -2
- package/dist/aws/ecs/server/index.mjs +1 -1
- package/dist/aws/glue/server/index.d.mts +2 -2
- package/dist/aws/glue/server/index.mjs +1 -1
- package/dist/aws/lambda/server/index.d.mts +2 -2
- package/dist/aws/lambda/server/index.mjs +2 -2
- package/dist/aws/s3/server/index.d.mts +2 -2
- package/dist/aws/s3/server/index.mjs +3 -3
- package/dist/aws/server/index.d.mts +1 -1
- package/dist/aws/server/index.mjs +1 -1
- package/dist/aws/ses/server/index.d.mts +2 -2
- package/dist/aws/ses/server/index.mjs +1 -1
- package/dist/aws/sqs/server/index.d.mts +2 -2
- package/dist/aws/sqs/server/index.mjs +1 -1
- package/dist/aws/ssm/server/index.d.mts +2 -2
- package/dist/aws/ssm/server/index.mjs +1 -1
- package/dist/axios/index.d.mts +1 -1
- package/dist/axios/index.mjs +5 -5
- package/dist/brightData/serpApi/server/index.d.mts +2 -2
- package/dist/brightData/serpApi/server/index.mjs +1 -1
- package/dist/brightData/server/index.d.mts +1 -1
- package/dist/brightData/webScraperIde/server/index.d.mts +1 -1
- package/dist/brightData/webScraperIde/server/index.mjs +1 -1
- package/dist/chunk-DDarj8oW.mjs +7 -0
- package/dist/crypto/index.d.mts +3 -6
- package/dist/crypto/index.mjs +22 -12
- package/dist/date/index.d.mts +1 -1
- package/dist/eskimi/server/index.mjs +2 -2
- package/dist/googleAds/server/index.d.mts +1 -1
- package/dist/googleCloud/bigquery/server/index.d.mts +2 -2
- package/dist/googleCloud/server/index.d.mts +1 -1
- package/dist/googleCloud/sheets/server/index.d.mts +2 -2
- package/dist/googleCloud/storage/server/index.d.mts +2 -2
- package/dist/googlePageSpeed/server/index.d.mts +1 -1
- package/dist/googlePageSpeed/server/index.mjs +1 -1
- package/dist/googleSearchIncidents/server/index.mjs +1 -1
- package/dist/greenDomain/server/index.mjs +1 -1
- package/dist/littleWarden/server/index.d.mts +1 -1
- package/dist/littleWarden/server/index.mjs +1 -1
- package/dist/lumar/api/server/index.d.mts +1 -1
- package/dist/lumar/api/server/index.mjs +1 -1
- package/dist/lumar/graphql/server/index.d.mts +1 -1
- package/dist/lumar/graphql/server/index.mjs +1 -1
- package/dist/myTarget/server/index.d.mts +1 -1
- package/dist/myTarget/server/index.mjs +1 -1
- package/dist/number/index.mjs +1 -1
- package/dist/onePassword/server/index.d.mts +1 -1
- package/dist/openAi/server/index.d.mts +1 -1
- package/dist/openAi/server/index.mjs +1 -1
- package/dist/prisma/index.mjs +1 -1
- package/dist/prisma/server/index.d.mts +1 -1
- package/dist/prisma/server/index.mjs +2 -10
- package/dist/snapchat/server/index.d.mts +1 -1
- package/dist/snapchat/server/index.mjs +1 -1
- package/dist/stream/server/index.mjs +1 -5
- package/dist/swr/client/index.d.mts +1 -1
- package/dist/upTimeRobot/server/index.d.mts +1 -1
- package/dist/upTimeRobot/server/index.mjs +1 -1
- package/dist/url/server/index.mjs +2 -2
- package/dist/util/index.d.mts +4 -1
- package/dist/util/index.mjs +10 -1
- package/dist/xml/server/index.mjs +1 -1
- package/package.json +1 -7
- /package/dist/{api-BlYy5Efh.mjs → api-DGKJDAfb.mjs} +0 -0
- /package/dist/{getDecimal-DRv1J8WD.mjs → getDecimal-CafxtLhH.mjs} +0 -0
- /package/dist/{index-Bfls0t50.d.mts → index-1fBbJGQz.d.mts} +0 -0
- /package/dist/{index-BOvAlQeY.d.mts → index-BHuvb_7y.d.mts} +0 -0
- /package/dist/{index-CN31pmsW.d.mts → index-BfyGIdDD.d.mts} +0 -0
- /package/dist/{index-ndHDK8xQ.d.mts → index-CqTOMR8f.d.mts} +0 -0
- /package/dist/{index-D1tpqoPU.d.mts → index-DW9yJLtI.d.mts} +0 -0
- /package/dist/{index-1SE8er2n.d.mts → index-DwB8X1lz.d.mts} +0 -0
- /package/dist/{index-Yx2783su.d.mts → index-jtr7o55v.d.mts} +0 -0
- /package/dist/{server-Dbl5Ic6I.mjs → server-Bwy4JI8Z.mjs} +0 -0
package/.yarn/install-state.gz
CHANGED
|
Binary file
|
package/dist/_class/index.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as BaseClass, t as BaseNamespace } from "../index-
|
|
1
|
+
import { n as BaseClass, t as BaseNamespace } from "../index-DwB8X1lz.mjs";
|
|
2
2
|
export { BaseClass, BaseNamespace };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as jobSchema, i as datastreamSchema, n as JobSchemaType, o as stackSchema, r as StackSchemaType, t as DatastreamSchemaType } from "../index-
|
|
1
|
+
import { a as jobSchema, i as datastreamSchema, n as JobSchemaType, o as stackSchema, r as StackSchemaType, t as DatastreamSchemaType } from "../index-BHuvb_7y.mjs";
|
|
2
2
|
export { DatastreamSchemaType, JobSchemaType, StackSchemaType, datastreamSchema, jobSchema, stackSchema };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { n as JobSchemaType } from "../../index-
|
|
2
|
-
import { X as InputDate } from "../../index-
|
|
1
|
+
import { n as JobSchemaType } from "../../index-BHuvb_7y.mjs";
|
|
2
|
+
import { X as InputDate } from "../../index-1fBbJGQz.mjs";
|
|
3
3
|
|
|
4
4
|
//#region src/adverity/server/getJobs.d.ts
|
|
5
5
|
type AdverityJobsResponse = {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import "../../api-
|
|
2
|
-
import { getLuxonDate, getToday, getYesterday, getYmdString } from "../../date/index.mjs";
|
|
1
|
+
import "../../api-DGKJDAfb.mjs";
|
|
3
2
|
import { get } from "../../axios/index.mjs";
|
|
3
|
+
import { getLuxonDate, getToday, getYesterday, getYmdString } from "../../date/index.mjs";
|
|
4
4
|
|
|
5
5
|
//#region src/adverity/server/getJobs.ts
|
|
6
6
|
/**
|
package/dist/api/index.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as isSuccess, c as ApiState, d as unexpectedError, f as ApiResponseClass, i as isPending, l as apiState, n as isError, o as isValidationError, r as isIdle, s as ApiResponse, t as isCancelled, u as defaultResponse } from "../index-
|
|
1
|
+
import { a as isSuccess, c as ApiState, d as unexpectedError, f as ApiResponseClass, i as isPending, l as apiState, n as isError, o as isValidationError, r as isIdle, s as ApiResponse, t as isCancelled, u as defaultResponse } from "../index-DW9yJLtI.mjs";
|
|
2
2
|
export { ApiResponse, ApiResponseClass, ApiState, apiState, defaultResponse, isCancelled, isError, isIdle, isPending, isSuccess, isValidationError, unexpectedError };
|
package/dist/api/index.mjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { a as isSuccess, c as defaultResponse, i as isPending, l as unexpectedError, n as isError, o as isValidationError, r as isIdle, s as apiState, t as isCancelled, u as ApiResponseClass } from "../api-
|
|
1
|
+
import { a as isSuccess, c as defaultResponse, i as isPending, l as unexpectedError, n as isError, o as isValidationError, r as isIdle, s as apiState, t as isCancelled, u as ApiResponseClass } from "../api-DGKJDAfb.mjs";
|
|
2
2
|
|
|
3
3
|
export { ApiResponseClass, apiState, defaultResponse, isCancelled, isError, isIdle, isPending, isSuccess, isValidationError, unexpectedError };
|
|
@@ -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-DwB8X1lz.mjs";
|
|
2
|
+
import { t as AwsConfig } from "../../../index-CqTOMR8f.mjs";
|
|
3
3
|
import * as _aws_sdk_client_ec20 from "@aws-sdk/client-ec2";
|
|
4
4
|
import { EC2Client } from "@aws-sdk/client-ec2";
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BaseNamespace } from "../../../_class/index.mjs";
|
|
2
|
-
import { t as getConfig } from "../../../server-
|
|
2
|
+
import { t as getConfig } from "../../../server-Bwy4JI8Z.mjs";
|
|
3
3
|
|
|
4
4
|
//#region src/aws/ec2/server/AwsEc2Namespace.ts
|
|
5
5
|
var AwsEc2Namespace = class extends BaseNamespace {
|
|
@@ -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-DwB8X1lz.mjs";
|
|
2
|
+
import { t as AwsConfig } from "../../../index-CqTOMR8f.mjs";
|
|
3
3
|
import { DesiredStatus, ECSClient, LaunchType, NetworkConfiguration, SortOrder, TaskDefinitionStatus, TaskOverride } from "@aws-sdk/client-ecs";
|
|
4
4
|
|
|
5
5
|
//#region src/aws/ecs/server/AwsEcsNamespace.d.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BaseNamespace } from "../../../_class/index.mjs";
|
|
2
|
-
import { n as isResponse200, t as getConfig } from "../../../server-
|
|
2
|
+
import { n as isResponse200, t as getConfig } from "../../../server-Bwy4JI8Z.mjs";
|
|
3
3
|
|
|
4
4
|
//#region src/aws/ecs/server/AwsEcsNamespace.ts
|
|
5
5
|
var AwsEcsNamespace = class extends BaseNamespace {
|
|
@@ -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-DwB8X1lz.mjs";
|
|
2
|
+
import { t as AwsConfig } from "../../../index-CqTOMR8f.mjs";
|
|
3
3
|
import { GlueClient } from "@aws-sdk/client-glue";
|
|
4
4
|
|
|
5
5
|
//#region src/aws/glue/server/AwsGlueNamespace.d.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BaseNamespace } from "../../../_class/index.mjs";
|
|
2
|
-
import { n as isResponse200, t as getConfig } from "../../../server-
|
|
2
|
+
import { n as isResponse200, t as getConfig } from "../../../server-Bwy4JI8Z.mjs";
|
|
3
3
|
|
|
4
4
|
//#region src/aws/glue/server/AwsGlueNamespace.ts
|
|
5
5
|
var AwsGlueNamespace = class extends BaseNamespace {
|
|
@@ -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-DwB8X1lz.mjs";
|
|
2
|
+
import { t as AwsConfig } from "../../../index-CqTOMR8f.mjs";
|
|
3
3
|
import { LambdaClient } from "@aws-sdk/client-lambda";
|
|
4
4
|
|
|
5
5
|
//#region src/aws/lambda/server/AwsLambdaNamespace.d.ts
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { BaseNamespace } from "../../../_class/index.mjs";
|
|
2
|
-
import { u as ApiResponseClass } from "../../../api-
|
|
3
|
-
import { n as isResponse200, t as getConfig } from "../../../server-
|
|
2
|
+
import { u as ApiResponseClass } from "../../../api-DGKJDAfb.mjs";
|
|
3
|
+
import { n as isResponse200, t as getConfig } from "../../../server-Bwy4JI8Z.mjs";
|
|
4
4
|
|
|
5
5
|
//#region src/aws/lambda/server/AwsLambdaNamespace.ts
|
|
6
6
|
var AwsLambdaNamespace = class extends BaseNamespace {
|
|
@@ -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-DwB8X1lz.mjs";
|
|
2
|
+
import { t as AwsConfig } from "../../../index-CqTOMR8f.mjs";
|
|
3
3
|
import { z } from "zod/v4";
|
|
4
4
|
import * as _aws_sdk_client_s30 from "@aws-sdk/client-s3";
|
|
5
5
|
import { S3Client } from "@aws-sdk/client-s3";
|
|
@@ -1,10 +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-Bwy4JI8Z.mjs";
|
|
5
5
|
import { getBrotliCompressed, getBrotliDecompressed, getGzipCompressed, getGzipDecompressed } from "../../../util/server/index.mjs";
|
|
6
6
|
import { z } from "zod/v4";
|
|
7
|
-
import
|
|
7
|
+
import get from "axios";
|
|
8
8
|
|
|
9
9
|
//#region src/aws/s3/server/AwsS3Namespace.ts
|
|
10
10
|
var AwsS3Namespace = class extends BaseNamespace {
|
|
@@ -293,7 +293,7 @@ var AwsS3Namespace = class extends BaseNamespace {
|
|
|
293
293
|
*/
|
|
294
294
|
urlContents = async (bucket, key, url) => {
|
|
295
295
|
await this.ensureInit();
|
|
296
|
-
return
|
|
296
|
+
return get(url, {
|
|
297
297
|
responseType: "arraybuffer",
|
|
298
298
|
responseEncoding: "binary"
|
|
299
299
|
}).then(async (response) => {
|
|
@@ -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-CqTOMR8f.mjs";
|
|
2
2
|
export { AwsConfig, 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-DwB8X1lz.mjs";
|
|
2
|
+
import { t as AwsConfig } from "../../../index-CqTOMR8f.mjs";
|
|
3
3
|
import { SESClient, SendEmailCommandInput, SendRawEmailCommandInput } from "@aws-sdk/client-ses";
|
|
4
4
|
|
|
5
5
|
//#region src/aws/ses/server/AwsSesNamespace.d.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BaseClass, BaseNamespace } from "../../../_class/index.mjs";
|
|
2
|
-
import { t as getConfig } from "../../../server-
|
|
2
|
+
import { t as getConfig } from "../../../server-Bwy4JI8Z.mjs";
|
|
3
3
|
|
|
4
4
|
//#region src/aws/ses/server/AwsSesNamespace.ts
|
|
5
5
|
var AwsSesNamespace = class extends BaseNamespace {
|
|
@@ -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-DwB8X1lz.mjs";
|
|
2
|
+
import { t as AwsConfig } from "../../../index-CqTOMR8f.mjs";
|
|
3
3
|
import * as _aws_sdk_client_sqs0 from "@aws-sdk/client-sqs";
|
|
4
4
|
import { SQSClient } from "@aws-sdk/client-sqs";
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BaseNamespace } from "../../../_class/index.mjs";
|
|
2
|
-
import { t as getConfig } from "../../../server-
|
|
2
|
+
import { t as getConfig } from "../../../server-Bwy4JI8Z.mjs";
|
|
3
3
|
|
|
4
4
|
//#region src/aws/sqs/server/AwsSqsNamespace.ts
|
|
5
5
|
var AwsSqsNamespace = class extends BaseNamespace {
|
|
@@ -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-DwB8X1lz.mjs";
|
|
2
|
+
import { t as AwsConfig } from "../../../index-CqTOMR8f.mjs";
|
|
3
3
|
import { SSMClient } from "@aws-sdk/client-ssm";
|
|
4
4
|
|
|
5
5
|
//#region src/aws/ssm/server/AwsSsmNamespace.d.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BaseNamespace } from "../../../_class/index.mjs";
|
|
2
|
-
import { t as getConfig } from "../../../server-
|
|
2
|
+
import { t as getConfig } from "../../../server-Bwy4JI8Z.mjs";
|
|
3
3
|
|
|
4
4
|
//#region src/aws/ssm/server/AwsSsmNamespace.ts
|
|
5
5
|
var AwsSsmNamespace = class extends BaseNamespace {
|
package/dist/axios/index.d.mts
CHANGED
package/dist/axios/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { u as ApiResponseClass } from "../api-
|
|
2
|
-
import
|
|
1
|
+
import { u as ApiResponseClass } from "../api-DGKJDAfb.mjs";
|
|
2
|
+
import get$1 from "axios";
|
|
3
3
|
|
|
4
4
|
//#region src/axios/deleteRequest.ts
|
|
5
5
|
/**
|
|
@@ -7,7 +7,7 @@ import axios from "axios";
|
|
|
7
7
|
* Can't use the function name delete as it's reserved
|
|
8
8
|
*/
|
|
9
9
|
const deleteRequest = async (url, config = {}) => {
|
|
10
|
-
return await
|
|
10
|
+
return await get$1.delete(url, config).then(async (response) => {
|
|
11
11
|
if (void 0 !== response.data.body && void 0 !== response.data.error && void 0 !== response.data.state) return new ApiResponseClass(response.data);
|
|
12
12
|
else if (response.status >= 200 && response.status <= 299) return new ApiResponseClass().setToSuccess(response.data);
|
|
13
13
|
return new ApiResponseClass().setToError(response.data, response.statusText);
|
|
@@ -22,7 +22,7 @@ const deleteRequest = async (url, config = {}) => {
|
|
|
22
22
|
* Make a GET request.
|
|
23
23
|
*/
|
|
24
24
|
const get = async (url, config = {}) => {
|
|
25
|
-
return await
|
|
25
|
+
return await get$1.get(url, config).then(async (response) => {
|
|
26
26
|
if (void 0 !== response.data.body && void 0 !== response.data.error && void 0 !== response.data.state) return new ApiResponseClass(response.data);
|
|
27
27
|
else if (response.status >= 200 && response.status <= 299) return new ApiResponseClass().setToSuccess(response.data);
|
|
28
28
|
return new ApiResponseClass().setToError(response.data, response.statusText);
|
|
@@ -37,7 +37,7 @@ const get = async (url, config = {}) => {
|
|
|
37
37
|
* Make a POST request.
|
|
38
38
|
*/
|
|
39
39
|
const post = async (url, data = {}, config = {}) => {
|
|
40
|
-
return await
|
|
40
|
+
return await get$1.post(url, data, config).then(async (response) => {
|
|
41
41
|
if (void 0 !== response.data.body && void 0 !== response.data.error && void 0 !== response.data.state) return new ApiResponseClass(response.data);
|
|
42
42
|
else if (response.status >= 200 && response.status <= 299) return new ApiResponseClass().setToSuccess(response.data);
|
|
43
43
|
return new ApiResponseClass().setToError(response.data, response.statusText);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { f as ApiResponseClass } from "../../../index-
|
|
2
|
-
import { t as Auth } from "../../../index-
|
|
1
|
+
import { f as ApiResponseClass } from "../../../index-DW9yJLtI.mjs";
|
|
2
|
+
import { t as Auth } from "../../../index-BfyGIdDD.mjs";
|
|
3
3
|
|
|
4
4
|
//#region src/brightData/serpApi/server/brightDataSerpApi.d.ts
|
|
5
5
|
declare const brightDataSerpApiType: {
|
|
@@ -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-BfyGIdDD.mjs";
|
|
2
2
|
export { Auth, getCustomerId, getZone };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { sleep } from "../../../util/index.mjs";
|
|
2
|
-
import { s as apiState } from "../../../api-
|
|
2
|
+
import { s as apiState } from "../../../api-DGKJDAfb.mjs";
|
|
3
3
|
import { get, post } from "../../../axios/index.mjs";
|
|
4
4
|
|
|
5
5
|
//#region src/brightData/webScraperIde/server/getBatch.ts
|
package/dist/crypto/index.d.mts
CHANGED
|
@@ -1,14 +1,12 @@
|
|
|
1
1
|
//#region src/crypto/getDecrypt.d.ts
|
|
2
2
|
/**
|
|
3
|
-
* Decrypt an encoding string using a salt
|
|
4
|
-
* Library: crypto-js
|
|
3
|
+
* Decrypt an encoding string using a salt.
|
|
5
4
|
*/
|
|
6
5
|
declare const getDecrypt: (appSalt: string, input: string, salt: string) => Promise<string>;
|
|
7
6
|
//#endregion
|
|
8
7
|
//#region src/crypto/getEncrypt.d.ts
|
|
9
8
|
/**
|
|
10
|
-
* Encrypt an encoding string using a salt
|
|
11
|
-
* Library: crypto-js
|
|
9
|
+
* Encrypt an encoding string using a salt.
|
|
12
10
|
*/
|
|
13
11
|
declare const getEncrypt: (appSalt: string, input: string, salt: string) => Promise<string>;
|
|
14
12
|
//#endregion
|
|
@@ -20,8 +18,7 @@ declare const getRandom: (length: number) => string;
|
|
|
20
18
|
//#endregion
|
|
21
19
|
//#region src/crypto/getSha256.d.ts
|
|
22
20
|
/**
|
|
23
|
-
* Encrypt a string using sha256
|
|
24
|
-
* Library: crypto-js
|
|
21
|
+
* Encrypt a string using sha256.
|
|
25
22
|
*/
|
|
26
23
|
declare const getSha256: (input: any) => Promise<string>;
|
|
27
24
|
//#endregion
|
package/dist/crypto/index.mjs
CHANGED
|
@@ -1,26 +1,36 @@
|
|
|
1
|
+
import { t as __require } from "../chunk-DDarj8oW.mjs";
|
|
1
2
|
import { getString } from "../string/index.mjs";
|
|
2
3
|
|
|
3
4
|
//#region src/crypto/getDecrypt.ts
|
|
4
5
|
/**
|
|
5
|
-
* Decrypt an encoding string using a salt
|
|
6
|
-
* Library: crypto-js
|
|
6
|
+
* Decrypt an encoding string using a salt.
|
|
7
7
|
*/
|
|
8
8
|
const getDecrypt = async (appSalt, input, salt) => {
|
|
9
|
-
const
|
|
9
|
+
const crypto = __require("crypto");
|
|
10
|
+
const ALGORITHM = "aes-256-cbc";
|
|
10
11
|
const customSalt = `${appSalt}-${salt}`;
|
|
11
|
-
|
|
12
|
+
const [ivHex, encryptedHex] = input.split(":");
|
|
13
|
+
const key = crypto.scryptSync(customSalt, "salt", 32);
|
|
14
|
+
const iv = Buffer.from(ivHex, "hex");
|
|
15
|
+
const encrypted = Buffer.from(encryptedHex, "hex");
|
|
16
|
+
const decipher = crypto.createDecipheriv(ALGORITHM, key, iv);
|
|
17
|
+
return Buffer.concat([decipher.update(encrypted), decipher.final()]).toString("utf8");
|
|
12
18
|
};
|
|
13
19
|
|
|
14
20
|
//#endregion
|
|
15
21
|
//#region src/crypto/getEncrypt.ts
|
|
16
22
|
/**
|
|
17
|
-
* Encrypt an encoding string using a salt
|
|
18
|
-
* Library: crypto-js
|
|
23
|
+
* Encrypt an encoding string using a salt.
|
|
19
24
|
*/
|
|
20
25
|
const getEncrypt = async (appSalt, input, salt) => {
|
|
21
|
-
const
|
|
26
|
+
const crypto = __require("crypto");
|
|
27
|
+
const ALGORITHM = "aes-256-cbc";
|
|
22
28
|
const customSalt = `${appSalt}-${salt}`;
|
|
23
|
-
|
|
29
|
+
const key = crypto.scryptSync(customSalt, "salt", 32);
|
|
30
|
+
const iv = crypto.randomBytes(16);
|
|
31
|
+
const cipher = crypto.createCipheriv(ALGORITHM, key, iv);
|
|
32
|
+
const encrypted = Buffer.concat([cipher.update(input, "utf8"), cipher.final()]);
|
|
33
|
+
return iv.toString("hex") + ":" + encrypted.toString("hex");
|
|
24
34
|
};
|
|
25
35
|
|
|
26
36
|
//#endregion
|
|
@@ -35,12 +45,12 @@ const getRandom = (length) => {
|
|
|
35
45
|
//#endregion
|
|
36
46
|
//#region src/crypto/getSha256.ts
|
|
37
47
|
/**
|
|
38
|
-
* Encrypt a string using sha256
|
|
39
|
-
* Library: crypto-js
|
|
48
|
+
* Encrypt a string using sha256.
|
|
40
49
|
*/
|
|
41
50
|
const getSha256 = async (input) => {
|
|
42
|
-
const
|
|
43
|
-
|
|
51
|
+
const crypto = __require("crypto");
|
|
52
|
+
const inputString = getString(input);
|
|
53
|
+
return crypto.createHash("sha256").update(inputString).digest("hex");
|
|
44
54
|
};
|
|
45
55
|
|
|
46
56
|
//#endregion
|
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-1fBbJGQz.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 };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import "../../api-
|
|
2
|
-
import { ageGroups, devices, genders } from "../index.mjs";
|
|
1
|
+
import "../../api-DGKJDAfb.mjs";
|
|
3
2
|
import { post } from "../../axios/index.mjs";
|
|
3
|
+
import { ageGroups, devices, genders } from "../index.mjs";
|
|
4
4
|
|
|
5
5
|
//#region src/eskimi/server/getAgeGroup.ts
|
|
6
6
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as BaseNamespace } from "../../../index-
|
|
2
|
-
import { t as GoogleCloudConfig } from "../../../index-
|
|
1
|
+
import { t as BaseNamespace } from "../../../index-DwB8X1lz.mjs";
|
|
2
|
+
import { t as GoogleCloudConfig } from "../../../index-jtr7o55v.mjs";
|
|
3
3
|
import { BigQuery, DatasetResource, QueryOptions } from "@google-cloud/bigquery";
|
|
4
4
|
import { GoogleAuthOptions } from "@google-cloud/common";
|
|
5
5
|
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as getConfig, t as GoogleCloudConfig } from "../../index-
|
|
1
|
+
import { n as getConfig, t as GoogleCloudConfig } from "../../index-jtr7o55v.mjs";
|
|
2
2
|
export { GoogleCloudConfig, getConfig };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as BaseNamespace } from "../../../index-
|
|
2
|
-
import { t as GoogleCloudConfig } from "../../../index-
|
|
1
|
+
import { t as BaseNamespace } from "../../../index-DwB8X1lz.mjs";
|
|
2
|
+
import { t as GoogleCloudConfig } from "../../../index-jtr7o55v.mjs";
|
|
3
3
|
import * as _googleapis_sheets0 from "@googleapis/sheets";
|
|
4
4
|
import { GoogleAuth } from "googleapis-common";
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as BaseNamespace } from "../../../index-
|
|
2
|
-
import { t as GoogleCloudConfig } from "../../../index-
|
|
1
|
+
import { t as BaseNamespace } from "../../../index-DwB8X1lz.mjs";
|
|
2
|
+
import { t as GoogleCloudConfig } from "../../../index-jtr7o55v.mjs";
|
|
3
3
|
import * as _google_cloud_storage0 from "@google-cloud/storage";
|
|
4
4
|
import { Storage } from "@google-cloud/storage";
|
|
5
5
|
import { GoogleAuthOptions } from "@google-cloud/common";
|
package/dist/number/index.mjs
CHANGED
package/dist/prisma/index.mjs
CHANGED
|
@@ -1,14 +1,6 @@
|
|
|
1
|
+
import { getError } from "../../util/index.mjs";
|
|
1
2
|
import { BaseNamespace } from "../../_class/index.mjs";
|
|
2
3
|
|
|
3
|
-
//#region src/util/getError.ts
|
|
4
|
-
const getError = (error) => {
|
|
5
|
-
let response = "";
|
|
6
|
-
if (typeof error === "string") response = error.toUpperCase();
|
|
7
|
-
else if (error instanceof Error) response = error.message;
|
|
8
|
-
return response;
|
|
9
|
-
};
|
|
10
|
-
|
|
11
|
-
//#endregion
|
|
12
4
|
//#region src/prisma/server/PrismaNamespace.ts
|
|
13
5
|
var PrismaNamespace = class extends BaseNamespace {
|
|
14
6
|
ensureInit = async () => {
|
|
@@ -33,7 +25,7 @@ var PrismaNamespace = class extends BaseNamespace {
|
|
|
33
25
|
throw new Error(`Postgres adapter not installed - ${getError(e)}`);
|
|
34
26
|
}
|
|
35
27
|
try {
|
|
36
|
-
const { PrismaClient } = await import("
|
|
28
|
+
const { PrismaClient } = await import("@prisma/client");
|
|
37
29
|
if (this.config.isDebug) this.client = new PrismaClient({
|
|
38
30
|
adapter,
|
|
39
31
|
log: [{
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BaseNamespace } from "../../_class/index.mjs";
|
|
2
|
-
import "../../api-
|
|
2
|
+
import "../../api-DGKJDAfb.mjs";
|
|
3
3
|
import { post } from "../../axios/index.mjs";
|
|
4
4
|
import { onePasswordClient } from "../../onePassword/server/index.mjs";
|
|
5
5
|
import { DateTime } from "luxon";
|
|
@@ -1,9 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { t as __require } from "../../chunk-DDarj8oW.mjs";
|
|
2
2
|
|
|
3
|
-
//#region \0rolldown/runtime.js
|
|
4
|
-
var __require = /* @__PURE__ */ createRequire(import.meta.url);
|
|
5
|
-
|
|
6
|
-
//#endregion
|
|
7
3
|
//#region src/stream/server/sort.ts
|
|
8
4
|
const Transform = __require("stream").Transform;
|
|
9
5
|
const batch = 15e3;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createDirectory } from "../../file/server/index.mjs";
|
|
2
|
-
import
|
|
2
|
+
import get from "axios";
|
|
3
3
|
|
|
4
4
|
//#region src/url/server/writeUrlContents.ts
|
|
5
5
|
/**
|
|
@@ -11,7 +11,7 @@ const writeUrlContents = async (filePath, url) => {
|
|
|
11
11
|
const fs = await import("fs-extra");
|
|
12
12
|
await createDirectory(filePath);
|
|
13
13
|
const writer = fs.createWriteStream(filePath);
|
|
14
|
-
await
|
|
14
|
+
await get({
|
|
15
15
|
method: "get",
|
|
16
16
|
url,
|
|
17
17
|
responseType: "stream"
|
package/dist/util/index.d.mts
CHANGED
|
@@ -16,6 +16,9 @@ type GetClean = {
|
|
|
16
16
|
*/
|
|
17
17
|
declare const getClean: (props: GetClean) => string;
|
|
18
18
|
//#endregion
|
|
19
|
+
//#region src/util/getError.d.ts
|
|
20
|
+
declare const getError: (error: any) => string;
|
|
21
|
+
//#endregion
|
|
19
22
|
//#region src/util/getWithoutHash.d.ts
|
|
20
23
|
/**
|
|
21
24
|
* Get a URL without the parameter query.
|
|
@@ -44,4 +47,4 @@ declare const promiseChunks: (promises: Promise<any>[], size: number, sleepSecon
|
|
|
44
47
|
//#region src/util/sleep.d.ts
|
|
45
48
|
declare const sleep: (seconds: number) => Promise<void>;
|
|
46
49
|
//#endregion
|
|
47
|
-
export { defaultTo, getClean, getWithoutHash, getWithoutParameter, isUndefined, promiseChunks, sleep };
|
|
50
|
+
export { defaultTo, getClean, getError, getWithoutHash, getWithoutParameter, isUndefined, promiseChunks, sleep };
|
package/dist/util/index.mjs
CHANGED
|
@@ -59,6 +59,15 @@ const getClean = (props) => {
|
|
|
59
59
|
return response;
|
|
60
60
|
};
|
|
61
61
|
|
|
62
|
+
//#endregion
|
|
63
|
+
//#region src/util/getError.ts
|
|
64
|
+
const getError = (error) => {
|
|
65
|
+
let response = "";
|
|
66
|
+
if (typeof error === "string") response = error.toUpperCase();
|
|
67
|
+
else if (error instanceof Error) response = error.message;
|
|
68
|
+
return response;
|
|
69
|
+
};
|
|
70
|
+
|
|
62
71
|
//#endregion
|
|
63
72
|
//#region src/util/isUndefined.ts
|
|
64
73
|
const undefinedValue = "__!!UNDEFINED!!__";
|
|
@@ -95,4 +104,4 @@ const promiseChunks = async (promises, size, sleepSeconds = 0, callbackFunction)
|
|
|
95
104
|
};
|
|
96
105
|
|
|
97
106
|
//#endregion
|
|
98
|
-
export { defaultTo, getClean, getWithoutHash, getWithoutParameter, isUndefined, promiseChunks, sleep };
|
|
107
|
+
export { defaultTo, getClean, getError, getWithoutHash, getWithoutParameter, isUndefined, promiseChunks, sleep };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@8ms/helpers",
|
|
3
3
|
"license": "UNLICENSED",
|
|
4
|
-
"version": "2.3.
|
|
4
|
+
"version": "2.3.15",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "git+https://github.com/8millionstories-organisation/8ms-helpers-ts.git"
|
|
@@ -41,7 +41,6 @@
|
|
|
41
41
|
"@prisma/adapter-pg": "^7.0.0",
|
|
42
42
|
"@prisma/adapter-planetscale": "^7.0.0",
|
|
43
43
|
"@prisma/client": "^7.0.0",
|
|
44
|
-
"crypto-js": "^4.0.0",
|
|
45
44
|
"fs-extra": "^11.0.0",
|
|
46
45
|
"google-ads-api": "^23.0.0",
|
|
47
46
|
"googleapis-common": "^8.0.0",
|
|
@@ -113,9 +112,6 @@
|
|
|
113
112
|
"@prisma/client": {
|
|
114
113
|
"optional": true
|
|
115
114
|
},
|
|
116
|
-
"crypto-js": {
|
|
117
|
-
"optional": true
|
|
118
|
-
},
|
|
119
115
|
"fs-extra": {
|
|
120
116
|
"optional": true
|
|
121
117
|
},
|
|
@@ -167,14 +163,12 @@
|
|
|
167
163
|
"@prisma/adapter-planetscale": "^7.4.0",
|
|
168
164
|
"@prisma/client": "^7.4.0",
|
|
169
165
|
"@types/babel__core": "^7.20.5",
|
|
170
|
-
"@types/crypto-js": "^4.2.2",
|
|
171
166
|
"@types/fs-extra": "11.0.4",
|
|
172
167
|
"@types/jest": "30.0.0",
|
|
173
168
|
"@types/luxon": "3.7.1",
|
|
174
169
|
"@types/node": "^24.10.13",
|
|
175
170
|
"@types/react": "^19.2.14",
|
|
176
171
|
"babel-jest": "30.2.0",
|
|
177
|
-
"crypto-js": "^4.2.0",
|
|
178
172
|
"dotenv": "^17.3.1",
|
|
179
173
|
"fs-extra": "11.3.3",
|
|
180
174
|
"google-ads-api": "^23.0.0",
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|