@8ms/helpers 2.0.3 → 2.0.6
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/adverity/server.d.ts +1 -0
- package/adverity/server.js +5 -0
- package/aws/athenaExpress/AwsAthenaNamespace.d.ts +1 -1
- package/aws/athenaExpress/{index.js → server.js} +3 -3
- package/aws/ec2/AwsEc2Namespace.d.ts +1 -1
- package/aws/ec2/{index.d.ts → server.d.ts} +1 -1
- package/aws/ec2/{index.js → server.js} +2 -2
- package/aws/ecs/AwsEcsNamespace.d.ts +1 -1
- package/aws/ecs/AwsEcsNamespace.js +5 -5
- package/aws/ecs/{index.d.ts → server.d.ts} +1 -1
- package/aws/ecs/{index.js → server.js} +2 -2
- package/aws/glue/AwsGlueNamespace.d.ts +1 -1
- package/aws/glue/AwsGlueNamespace.js +2 -2
- package/aws/glue/{index.d.ts → server.d.ts} +1 -1
- package/aws/glue/{index.js → server.js} +2 -2
- package/aws/lambda/AwsLambdaNamespace.d.ts +1 -1
- package/aws/lambda/AwsLambdaNamespace.js +2 -2
- package/aws/lambda/{index.d.ts → server.d.ts} +1 -1
- package/aws/lambda/{index.js → server.js} +2 -2
- package/aws/s3/AwsS3Namespace.d.ts +2 -2
- package/aws/s3/AwsS3Namespace.js +12 -12
- package/aws/s3/{index.d.ts → server.d.ts} +1 -1
- package/aws/s3/{index.js → server.js} +2 -2
- package/aws/{index.js → server.js} +3 -3
- package/aws/ses/AwsSesNamespace.d.ts +1 -1
- package/aws/ses/{index.d.ts → server.d.ts} +1 -1
- package/aws/ses/{index.js → server.js} +2 -2
- package/aws/sqs/AwsSqsNamespace.d.ts +1 -1
- package/aws/sqs/{index.d.ts → server.d.ts} +1 -1
- package/aws/sqs/{index.js → server.js} +2 -2
- package/aws/ssm/AwsSsmNamespace.d.ts +1 -1
- package/aws/ssm/{index.d.ts → server.d.ts} +1 -1
- package/aws/ssm/{index.js → server.js} +2 -2
- package/boolean/index.d.ts +4 -1
- package/boolean/index.js +20 -2
- package/brightData/serpApi/getAsyncRequestId.d.ts +2 -2
- package/brightData/serpApi/getAsyncRequestId.js +5 -5
- package/brightData/serpApi/getAsyncResults.d.ts +1 -1
- package/brightData/serpApi/getAsyncResults.js +3 -3
- package/brightData/serpApi/getRealtime.d.ts +1 -1
- package/brightData/webScraperIde/getBatch.d.ts +1 -1
- package/brightData/webScraperIde/getRealtime.d.ts +1 -1
- package/cache/{index.d.ts → server.d.ts} +5 -0
- package/cache/test/cache.test.js +5 -5
- package/eskimi/getAgeGroup.js +2 -2
- package/eskimi/getDevice.js +2 -2
- package/eskimi/getGender.js +2 -2
- package/file/index.d.ts +5 -1
- package/file/index.js +47 -2
- package/google/bigQuery/GoogleBigQueryNamespace.d.ts +1 -1
- package/google/bigQuery/GoogleBigQueryNamespace.js +2 -2
- package/google/bigQuery/{index.js → server.js} +3 -3
- package/google/sheets/GoogleSheetsNamespace.d.ts +1 -1
- package/google/sheets/GoogleSheetsNamespace.js +2 -2
- package/google/sheets/{index.js → server.js} +3 -3
- package/google/storage/GoogleCloudStorageNamespace.d.ts +1 -1
- package/google/storage/GoogleCloudStorageNamespace.js +2 -2
- package/google/storage/{index.js → server.js} +3 -3
- package/googleAds/GoogleAdsNamespace.d.ts +1 -1
- package/googleAds/{index.js → server.js} +3 -3
- package/googlePageSpeed/GooglePageSpeedNamespace.d.ts +1 -1
- package/googlePageSpeed/GooglePageSpeedNamespace.js +2 -2
- package/googlePageSpeed/{index.js → server.js} +3 -3
- package/littleWarden/LittleWardenNamespace.d.ts +1 -1
- package/littleWarden/{index.js → server.js} +3 -3
- package/lumar/api/buildRequest.d.ts +1 -1
- package/lumar/api/buildRequest.js +13 -13
- package/lumar/graphql/queries/getReportDifferences.js +2 -2
- package/nextJs/index.d.ts +12 -2
- package/nextJs/index.js +16 -4
- package/onePassword/OnePasswordNamespace.d.ts +1 -1
- package/openAi/OpenAiNamespace.d.ts +1 -1
- package/openAi/{index.js → server.js} +3 -3
- package/package.json +1 -1
- package/prisma/PrismaNamespace.d.ts +1 -1
- package/snapchat/SnapchatNamespace.d.ts +1 -1
- package/snapchat/{index.js → server.js} +3 -3
- package/upTimeRobot/UpTimeRobotNamespace.d.ts +1 -1
- package/upTimeRobot/{index.d.ts → server.d.ts} +2 -2
- package/upTimeRobot/{index.js → server.js} +5 -5
- package/url/index.d.ts +0 -1
- package/url/index.js +1 -3
- package/url/server.d.ts +1 -0
- package/url/server.js +5 -0
- package/util/index.d.ts +0 -4
- package/util/index.js +1 -9
- package/util/server.d.ts +4 -0
- package/util/server.js +11 -0
- package/boolean/getBoolean.d.ts +0 -4
- package/boolean/getBoolean.js +0 -23
- package/file/createDirectory.d.ts +0 -5
- package/file/createDirectory.js +0 -50
- package/nextJs/getIp.d.ts +0 -6
- package/nextJs/getIp.js +0 -14
- package/nextJs/getUserAgent.d.ts +0 -6
- package/nextJs/getUserAgent.js +0 -8
- /package/aws/athenaExpress/{index.d.ts → server.d.ts} +0 -0
- /package/aws/{index.d.ts → server.d.ts} +0 -0
- /package/brightData/serpApi/{index.d.ts → server.d.ts} +0 -0
- /package/brightData/serpApi/{index.js → server.js} +0 -0
- /package/brightData/{index.d.ts → server.d.ts} +0 -0
- /package/brightData/{index.js → server.js} +0 -0
- /package/brightData/webScraperIde/{index.d.ts → server.d.ts} +0 -0
- /package/brightData/webScraperIde/{index.js → server.js} +0 -0
- /package/cache/{index.js → server.js} +0 -0
- /package/eskimi/{index.d.ts → server.d.ts} +0 -0
- /package/eskimi/{index.js → server.js} +0 -0
- /package/google/bigQuery/{index.d.ts → server.d.ts} +0 -0
- /package/google/{index.d.ts → server.d.ts} +0 -0
- /package/google/{index.js → server.js} +0 -0
- /package/google/sheets/{index.d.ts → server.d.ts} +0 -0
- /package/google/storage/{index.d.ts → server.d.ts} +0 -0
- /package/googleAds/keywordPlanner/{index.d.ts → server.d.ts} +0 -0
- /package/googleAds/keywordPlanner/{index.js → server.js} +0 -0
- /package/googleAds/{index.d.ts → server.d.ts} +0 -0
- /package/googlePageSpeed/{index.d.ts → server.d.ts} +0 -0
- /package/googleSearchIncidents/{index.d.ts → server.d.ts} +0 -0
- /package/googleSearchIncidents/{index.js → server.js} +0 -0
- /package/greenDomain/{index.d.ts → server.d.ts} +0 -0
- /package/greenDomain/{index.js → server.js} +0 -0
- /package/inngest/{index.d.ts → server.d.ts} +0 -0
- /package/inngest/{index.js → server.js} +0 -0
- /package/littleWarden/{index.d.ts → server.d.ts} +0 -0
- /package/lumar/api/{index.d.ts → server.d.ts} +0 -0
- /package/lumar/api/{index.js → server.js} +0 -0
- /package/lumar/graphql/{index.d.ts → server.d.ts} +0 -0
- /package/lumar/graphql/{index.js → server.js} +0 -0
- /package/myTarget/{request.d.ts → server.d.ts} +0 -0
- /package/myTarget/{request.js → server.js} +0 -0
- /package/onePassword/{index.d.ts → server.d.ts} +0 -0
- /package/onePassword/{index.js → server.js} +0 -0
- /package/openAi/{index.d.ts → server.d.ts} +0 -0
- /package/prisma/{index.d.ts → server.d.ts} +0 -0
- /package/prisma/{index.js → server.js} +0 -0
- /package/snapchat/{index.d.ts → server.d.ts} +0 -0
- /package/stream/{index.d.ts → server.d.ts} +0 -0
- /package/stream/{index.js → server.js} +0 -0
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.requestStatuses = exports.monitorTypes = exports.monitorSubTypes = exports.monitorStatuses = exports.logTypes = exports.upTimeRobotClient = void 0;
|
|
4
|
-
const
|
|
5
|
-
const
|
|
4
|
+
const UpTimeRobotNamespace_1 = require("./UpTimeRobotNamespace");
|
|
5
|
+
const server_1 = require("../onePassword/server");
|
|
6
6
|
const upTimeRobotNamespaces = new Map();
|
|
7
7
|
const upTimeRobotClient = async (key = "default", config, vaultId, itemId) => {
|
|
8
8
|
if (upTimeRobotNamespaces.has(key)) {
|
|
@@ -13,17 +13,17 @@ const upTimeRobotClient = async (key = "default", config, vaultId, itemId) => {
|
|
|
13
13
|
instanceConfig = config;
|
|
14
14
|
}
|
|
15
15
|
else if (vaultId && itemId) {
|
|
16
|
-
instanceConfig = await (await (0,
|
|
16
|
+
instanceConfig = await (await (0, server_1.onePasswordClient)())
|
|
17
17
|
.getJsonNote(vaultId, itemId);
|
|
18
18
|
}
|
|
19
19
|
else if ("default" === key && process.env.UP_TIME_ROBOT_VAULT_ID && process.env.UP_TIME_ROBOT_ITEM_ID) {
|
|
20
|
-
instanceConfig = await (await (0,
|
|
20
|
+
instanceConfig = await (await (0, server_1.onePasswordClient)())
|
|
21
21
|
.getJsonNote(process.env.UP_TIME_ROBOT_VAULT_ID, process.env.UP_TIME_ROBOT_ITEM_ID);
|
|
22
22
|
}
|
|
23
23
|
else {
|
|
24
24
|
throw new Error(`Config required for namespace '${key}'`);
|
|
25
25
|
}
|
|
26
|
-
const namespace = new
|
|
26
|
+
const namespace = new UpTimeRobotNamespace_1.UpTimeRobotNamespace(key, instanceConfig);
|
|
27
27
|
upTimeRobotNamespaces.set(key, namespace);
|
|
28
28
|
return namespace;
|
|
29
29
|
};
|
package/url/index.d.ts
CHANGED
package/url/index.js
CHANGED
|
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.
|
|
6
|
+
exports.buildEnvironmentUrl = exports.buildRelative = exports.buildParameters = exports.isRelative = exports.isAbsolute = void 0;
|
|
7
7
|
const environment_1 = require("../environment");
|
|
8
8
|
const merge_1 = __importDefault(require("lodash/merge"));
|
|
9
9
|
/**
|
|
@@ -68,5 +68,3 @@ const buildEnvironmentUrl = (path, url) => {
|
|
|
68
68
|
return response + path || "";
|
|
69
69
|
};
|
|
70
70
|
exports.buildEnvironmentUrl = buildEnvironmentUrl;
|
|
71
|
-
var writeUrlContents_1 = require("./writeUrlContents");
|
|
72
|
-
Object.defineProperty(exports, "writeUrlContents", { enumerable: true, get: function () { return writeUrlContents_1.writeUrlContents; } });
|
package/url/server.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { writeUrlContents } from "./writeUrlContents";
|
package/url/server.js
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.writeUrlContents = void 0;
|
|
4
|
+
var writeUrlContents_1 = require("./writeUrlContents");
|
|
5
|
+
Object.defineProperty(exports, "writeUrlContents", { enumerable: true, get: function () { return writeUrlContents_1.writeUrlContents; } });
|
package/util/index.d.ts
CHANGED
|
@@ -1,9 +1,5 @@
|
|
|
1
1
|
export { defaultTo } from "./defaultTo";
|
|
2
|
-
export { getBrotliCompressed } from "./getBrotliCompressed";
|
|
3
|
-
export { getBrotliDecompressed } from "./getBrotliDecompressed";
|
|
4
2
|
export { getClean } from "./getClean";
|
|
5
|
-
export { getGzipCompressed } from "./getGzipCompressed";
|
|
6
|
-
export { getGzipDecompressed } from "./getGzipDecompressed";
|
|
7
3
|
export { getWithoutHash } from "./getWithoutHash";
|
|
8
4
|
export { getWithoutParameter } from "./getWithoutParameter";
|
|
9
5
|
export { isUndefined } from "./isUndefined";
|
package/util/index.js
CHANGED
|
@@ -1,18 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.sleep = exports.promiseChunks = exports.isUndefined = exports.getWithoutParameter = exports.getWithoutHash = exports.
|
|
3
|
+
exports.sleep = exports.promiseChunks = exports.isUndefined = exports.getWithoutParameter = exports.getWithoutHash = exports.getClean = exports.defaultTo = void 0;
|
|
4
4
|
var defaultTo_1 = require("./defaultTo");
|
|
5
5
|
Object.defineProperty(exports, "defaultTo", { enumerable: true, get: function () { return defaultTo_1.defaultTo; } });
|
|
6
|
-
var getBrotliCompressed_1 = require("./getBrotliCompressed");
|
|
7
|
-
Object.defineProperty(exports, "getBrotliCompressed", { enumerable: true, get: function () { return getBrotliCompressed_1.getBrotliCompressed; } });
|
|
8
|
-
var getBrotliDecompressed_1 = require("./getBrotliDecompressed");
|
|
9
|
-
Object.defineProperty(exports, "getBrotliDecompressed", { enumerable: true, get: function () { return getBrotliDecompressed_1.getBrotliDecompressed; } });
|
|
10
6
|
var getClean_1 = require("./getClean");
|
|
11
7
|
Object.defineProperty(exports, "getClean", { enumerable: true, get: function () { return getClean_1.getClean; } });
|
|
12
|
-
var getGzipCompressed_1 = require("./getGzipCompressed");
|
|
13
|
-
Object.defineProperty(exports, "getGzipCompressed", { enumerable: true, get: function () { return getGzipCompressed_1.getGzipCompressed; } });
|
|
14
|
-
var getGzipDecompressed_1 = require("./getGzipDecompressed");
|
|
15
|
-
Object.defineProperty(exports, "getGzipDecompressed", { enumerable: true, get: function () { return getGzipDecompressed_1.getGzipDecompressed; } });
|
|
16
8
|
var getWithoutHash_1 = require("./getWithoutHash");
|
|
17
9
|
Object.defineProperty(exports, "getWithoutHash", { enumerable: true, get: function () { return getWithoutHash_1.getWithoutHash; } });
|
|
18
10
|
var getWithoutParameter_1 = require("./getWithoutParameter");
|
package/util/server.d.ts
ADDED
package/util/server.js
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getGzipDecompressed = exports.getGzipCompressed = exports.getBrotliDecompressed = exports.getBrotliCompressed = void 0;
|
|
4
|
+
var getBrotliCompressed_1 = require("./getBrotliCompressed");
|
|
5
|
+
Object.defineProperty(exports, "getBrotliCompressed", { enumerable: true, get: function () { return getBrotliCompressed_1.getBrotliCompressed; } });
|
|
6
|
+
var getBrotliDecompressed_1 = require("./getBrotliDecompressed");
|
|
7
|
+
Object.defineProperty(exports, "getBrotliDecompressed", { enumerable: true, get: function () { return getBrotliDecompressed_1.getBrotliDecompressed; } });
|
|
8
|
+
var getGzipCompressed_1 = require("./getGzipCompressed");
|
|
9
|
+
Object.defineProperty(exports, "getGzipCompressed", { enumerable: true, get: function () { return getGzipCompressed_1.getGzipCompressed; } });
|
|
10
|
+
var getGzipDecompressed_1 = require("./getGzipDecompressed");
|
|
11
|
+
Object.defineProperty(exports, "getGzipDecompressed", { enumerable: true, get: function () { return getGzipDecompressed_1.getGzipDecompressed; } });
|
package/boolean/getBoolean.d.ts
DELETED
package/boolean/getBoolean.js
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.getBoolean = void 0;
|
|
7
|
-
const isBoolean_1 = __importDefault(require("lodash/isBoolean"));
|
|
8
|
-
/**
|
|
9
|
-
* Convert an input from a variety of forms into boolean.
|
|
10
|
-
*/
|
|
11
|
-
const getBoolean = (input, defaultValue = false) => {
|
|
12
|
-
if ((0, isBoolean_1.default)(input)) {
|
|
13
|
-
return input;
|
|
14
|
-
}
|
|
15
|
-
else if ("string" === typeof input) {
|
|
16
|
-
return "true" === input || "1" === input || "yes" === input || "y" === input;
|
|
17
|
-
}
|
|
18
|
-
else if ("number" === typeof input) {
|
|
19
|
-
return 1 === input;
|
|
20
|
-
}
|
|
21
|
-
return defaultValue;
|
|
22
|
-
};
|
|
23
|
-
exports.getBoolean = getBoolean;
|
package/file/createDirectory.js
DELETED
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
-
var ownKeys = function(o) {
|
|
20
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
-
var ar = [];
|
|
22
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
-
return ar;
|
|
24
|
-
};
|
|
25
|
-
return ownKeys(o);
|
|
26
|
-
};
|
|
27
|
-
return function (mod) {
|
|
28
|
-
if (mod && mod.__esModule) return mod;
|
|
29
|
-
var result = {};
|
|
30
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
-
__setModuleDefault(result, mod);
|
|
32
|
-
return result;
|
|
33
|
-
};
|
|
34
|
-
})();
|
|
35
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
-
exports.createDirectory = void 0;
|
|
37
|
-
/**
|
|
38
|
-
* Create a directory recursively.
|
|
39
|
-
* Requires fs-extra
|
|
40
|
-
*/
|
|
41
|
-
const createDirectory = (filePath) => {
|
|
42
|
-
return new Promise(async (resolve, reject) => {
|
|
43
|
-
const fs = await Promise.resolve().then(() => __importStar(require("fs-extra")));
|
|
44
|
-
const path = await Promise.resolve().then(() => __importStar(require("path")));
|
|
45
|
-
const fileDir = path.parse(filePath).dir;
|
|
46
|
-
fs.ensureDirSync(fileDir);
|
|
47
|
-
resolve(true);
|
|
48
|
-
});
|
|
49
|
-
};
|
|
50
|
-
exports.createDirectory = createDirectory;
|
package/nextJs/getIp.d.ts
DELETED
package/nextJs/getIp.js
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getIp = void 0;
|
|
4
|
-
/**
|
|
5
|
-
* Get the user's remote IP Address
|
|
6
|
-
*/
|
|
7
|
-
const getIp = ({ req }) => {
|
|
8
|
-
let response = 'unset';
|
|
9
|
-
if (undefined !== req.headers['x-real-ip']) {
|
|
10
|
-
response = String(req.headers['x-real-ip']);
|
|
11
|
-
}
|
|
12
|
-
return response;
|
|
13
|
-
};
|
|
14
|
-
exports.getIp = getIp;
|
package/nextJs/getUserAgent.d.ts
DELETED
package/nextJs/getUserAgent.js
DELETED
|
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
|
|
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
|
|
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
|
|
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
|
|
File without changes
|