@8ms/helpers 2.2.19 → 2.2.23
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/.github/generate-exports.js +31 -17
- package/.yarn/install-state.gz +0 -0
- package/adverity/{getJobs.d.ts → server/getJobs.d.ts} +2 -2
- package/adverity/{getJobs.js → server/getJobs.js} +4 -4
- package/aws/ec2/{AwsEc2Namespace.d.ts → server/AwsEc2Namespace.d.ts} +4 -4
- package/aws/ec2/{AwsEc2Namespace.js → server/AwsEc2Namespace.js} +3 -3
- package/aws/ec2/{server.d.ts → server/index.d.ts} +1 -1
- package/aws/ec2/{server.js → server/index.js} +1 -1
- package/aws/ecs/{AwsEcsNamespace.d.ts → server/AwsEcsNamespace.d.ts} +3 -3
- package/aws/ecs/{AwsEcsNamespace.js → server/AwsEcsNamespace.js} +5 -5
- package/aws/ecs/{server.d.ts → server/index.d.ts} +1 -1
- package/aws/ecs/{server.js → server/index.js} +1 -1
- package/aws/glue/{AwsGlueNamespace.d.ts → server/AwsGlueNamespace.d.ts} +2 -2
- package/aws/glue/{AwsGlueNamespace.js → server/AwsGlueNamespace.js} +2 -2
- package/aws/glue/{server.d.ts → server/index.d.ts} +1 -1
- package/aws/glue/{server.js → server/index.js} +1 -1
- package/aws/lambda/{AwsLambdaNamespace.d.ts → server/AwsLambdaNamespace.d.ts} +2 -2
- package/aws/lambda/{AwsLambdaNamespace.js → server/AwsLambdaNamespace.js} +3 -3
- package/aws/lambda/{server.d.ts → server/index.d.ts} +1 -1
- package/aws/lambda/{server.js → server/index.js} +1 -1
- package/aws/s3/{AwsS3Namespace.d.ts → server/AwsS3Namespace.d.ts} +3 -3
- package/aws/s3/{AwsS3Namespace.js → server/AwsS3Namespace.js} +6 -6
- package/aws/s3/{server.d.ts → server/index.d.ts} +1 -1
- package/aws/s3/{server.js → server/index.js} +2 -2
- package/aws/{server.js → server/index.js} +1 -1
- package/aws/{isResponse200.js → server/isResponse200.js} +1 -1
- package/aws/ses/{AwsSesNamespace.d.ts → server/AwsSesNamespace.d.ts} +2 -2
- package/aws/ses/{AwsSesNamespace.js → server/AwsSesNamespace.js} +1 -1
- package/aws/ses/{SimpleEmail.d.ts → server/SimpleEmail.d.ts} +1 -1
- package/aws/ses/{SimpleEmail.js → server/SimpleEmail.js} +1 -1
- package/aws/ses/{server.d.ts → server/index.d.ts} +1 -1
- package/aws/ses/{server.js → server/index.js} +1 -1
- package/aws/sqs/{AwsSqsNamespace.d.ts → server/AwsSqsNamespace.d.ts} +2 -2
- package/aws/sqs/{AwsSqsNamespace.js → server/AwsSqsNamespace.js} +1 -1
- package/aws/sqs/{server.d.ts → server/index.d.ts} +1 -1
- package/aws/sqs/{server.js → server/index.js} +1 -1
- package/aws/ssm/{AwsSsmNamespace.d.ts → server/AwsSsmNamespace.d.ts} +2 -2
- package/aws/ssm/{AwsSsmNamespace.js → server/AwsSsmNamespace.js} +1 -1
- package/aws/ssm/{server.d.ts → server/index.d.ts} +1 -1
- package/aws/ssm/{server.js → server/index.js} +1 -1
- package/brightData/serpApi/{getAsyncRequestId.d.ts → server/getAsyncRequestId.d.ts} +2 -2
- package/brightData/serpApi/{getAsyncRequestId.js → server/getAsyncRequestId.js} +3 -3
- package/brightData/serpApi/{getAsyncResults.d.ts → server/getAsyncResults.d.ts} +2 -2
- package/brightData/serpApi/{getAsyncResults.js → server/getAsyncResults.js} +3 -3
- package/brightData/serpApi/{getRealtime.d.ts → server/getRealtime.d.ts} +1 -1
- package/brightData/serpApi/{getRealtime.js → server/getRealtime.js} +1 -1
- package/brightData/webScraperIde/{getBatch.d.ts → server/getBatch.d.ts} +1 -1
- package/brightData/webScraperIde/{getBatch.js → server/getBatch.js} +1 -1
- package/brightData/webScraperIde/{getRealtime.d.ts → server/getRealtime.d.ts} +1 -1
- package/brightData/webScraperIde/{getRealtime.js → server/getRealtime.js} +3 -3
- package/cache/{test → server/test}/cache.test.js +1 -1
- package/date/calculation.d.ts +1 -1
- package/date/calculation.js +31 -36
- package/date/financialYear.js +4 -4
- package/date/format.d.ts +1 -1
- package/date/format.js +3 -4
- package/environment/index.js +7 -8
- package/eskimi/{getAgeGroup.js → server/getAgeGroup.js} +1 -1
- package/eskimi/{getData.js → server/getData.js} +1 -1
- package/eskimi/{getDevice.js → server/getDevice.js} +1 -1
- package/eskimi/{getGender.js → server/getGender.js} +1 -1
- package/eskimi/server/index.d.ts +4 -0
- package/eskimi/server/index.js +4 -0
- package/file/getFileKey.d.ts +4 -0
- package/file/getFileKey.js +23 -0
- package/file/index.d.ts +1 -9
- package/file/index.js +1 -36
- package/file/server/createDirectory.d.ts +5 -0
- package/file/server/createDirectory.js +13 -0
- package/file/server/index.d.ts +1 -0
- package/file/server/index.js +1 -0
- package/geo/index.d.ts +2 -2
- package/geo/index.js +2 -2
- package/google/bigQuery/{GoogleBigQueryNamespace.d.ts → server/GoogleBigQueryNamespace.d.ts} +2 -2
- package/google/bigQuery/{GoogleBigQueryNamespace.js → server/GoogleBigQueryNamespace.js} +2 -2
- package/google/bigQuery/{server.js → server/index.js} +1 -1
- package/google/sheets/{GoogleSheetsNamespace.d.ts → server/GoogleSheetsNamespace.d.ts} +2 -2
- package/google/sheets/{GoogleSheetsNamespace.js → server/GoogleSheetsNamespace.js} +2 -2
- package/google/sheets/{server.js → server/index.js} +1 -1
- package/google/storage/{GoogleCloudStorageNamespace.d.ts → server/GoogleCloudStorageNamespace.d.ts} +2 -2
- package/google/storage/{GoogleCloudStorageNamespace.js → server/GoogleCloudStorageNamespace.js} +2 -2
- package/google/storage/{server.js → server/index.js} +1 -1
- package/googleAds/{GoogleAdsNamespace.d.ts → server/GoogleAdsNamespace.d.ts} +2 -2
- package/googleAds/{GoogleAdsNamespace.js → server/GoogleAdsNamespace.js} +3 -3
- package/googleAds/{server.js → server/index.js} +1 -1
- package/googlePageSpeed/{GooglePageSpeedNamespace.d.ts → server/GooglePageSpeedNamespace.d.ts} +2 -2
- package/googlePageSpeed/{GooglePageSpeedNamespace.js → server/GooglePageSpeedNamespace.js} +3 -3
- package/googlePageSpeed/{server.js → server/index.js} +1 -1
- package/googleSearchIncidents/{server.js → server/index.js} +1 -1
- package/greenDomain/{server.js → server/index.js} +1 -1
- package/json/index.d.ts +2 -2
- package/json/index.js +2 -2
- package/littleWarden/{LittleWardenNamespace.d.ts → server/LittleWardenNamespace.d.ts} +2 -2
- package/littleWarden/{LittleWardenNamespace.js → server/LittleWardenNamespace.js} +2 -2
- package/littleWarden/{getUrlStatus.js → server/getUrlStatus.js} +1 -1
- package/littleWarden/{server.d.ts → server/index.d.ts} +1 -1
- package/littleWarden/{server.js → server/index.js} +2 -2
- package/lumar/api/{buildRequest.d.ts → server/buildRequest.d.ts} +1 -1
- package/lumar/api/{buildRequest.js → server/buildRequest.js} +1 -1
- package/lumar/api/server/getData.d.ts +1 -0
- package/lumar/api/server/getData.js +9 -0
- package/lumar/api/{server.d.ts → server/index.d.ts} +3 -3
- package/lumar/api/{server.js → server/index.js} +3 -3
- package/lumar/api/{initClient.js → server/initClient.js} +1 -1
- package/lumar/graphql/server/getData.d.ts +1 -0
- package/lumar/graphql/{getData.js → server/getData.js} +3 -3
- package/lumar/graphql/{initClient.js → server/initClient.js} +1 -1
- package/lumar/graphql/{queries → server/queries}/getReportDifferences.js +1 -1
- package/myTarget/server/index.d.ts +5 -0
- package/myTarget/{server.js → server/index.js} +3 -3
- package/nextAuth/isSessionReady.js +1 -7
- package/nextJs/client/index.d.ts +1 -0
- package/nextJs/client/index.js +1 -0
- package/number/index.d.ts +6 -6
- package/number/index.js +6 -6
- package/object/index.d.ts +1 -1
- package/object/index.js +1 -1
- package/onePassword/{OnePasswordNamespace.d.ts → server/OnePasswordNamespace.d.ts} +2 -2
- package/onePassword/{OnePasswordNamespace.js → server/OnePasswordNamespace.js} +1 -1
- package/openAi/{OpenAiNamespace.d.ts → server/OpenAiNamespace.d.ts} +2 -2
- package/openAi/{OpenAiNamespace.js → server/OpenAiNamespace.js} +2 -2
- package/openAi/{server.js → server/index.js} +1 -1
- package/package.json +688 -16
- package/prisma/index.d.ts +1 -0
- package/prisma/index.js +1 -0
- package/prisma/{PrismaNamespace.d.ts → server/PrismaNamespace.d.ts} +2 -3
- package/prisma/{PrismaNamespace.js → server/PrismaNamespace.js} +2 -2
- package/prisma/{server.d.ts → server/index.d.ts} +0 -1
- package/prisma/{server.js → server/index.js} +0 -1
- package/snapchat/{SnapchatNamespace.d.ts → server/SnapchatNamespace.d.ts} +2 -2
- package/snapchat/{SnapchatNamespace.js → server/SnapchatNamespace.js} +2 -2
- package/snapchat/{server.js → server/index.js} +1 -1
- package/swr/{index.d.ts → client/index.d.ts} +1 -1
- package/upTimeRobot/{UpTimeRobotNamespace.d.ts → server/UpTimeRobotNamespace.d.ts} +2 -2
- package/upTimeRobot/{UpTimeRobotNamespace.js → server/UpTimeRobotNamespace.js} +2 -2
- package/upTimeRobot/{server.js → server/index.js} +1 -1
- package/url/{writeUrlContents.js → server/writeUrlContents.js} +1 -1
- package/xml/{getXml.js → server/getXml.js} +1 -1
- package/xml/server/index.d.ts +1 -0
- package/xml/server/index.js +1 -0
- package/lumar/api/getData.d.ts +0 -5
- package/lumar/api/getData.js +0 -9
- package/lumar/graphql/getData.d.ts +0 -1
- package/myTarget/server.d.ts +0 -5
- package/nextJs/client.d.ts +0 -1
- package/nextJs/client.js +0 -1
- /package/adverity/{server.d.ts → server/index.d.ts} +0 -0
- /package/adverity/{server.js → server/index.js} +0 -0
- /package/aws/s3/{payload.d.ts → server/payload.d.ts} +0 -0
- /package/aws/s3/{payload.js → server/payload.js} +0 -0
- /package/aws/{server.d.ts → server/index.d.ts} +0 -0
- /package/aws/{isResponse200.d.ts → server/isResponse200.d.ts} +0 -0
- /package/brightData/serpApi/{buildGoogleSerpUrl.d.ts → server/buildGoogleSerpUrl.d.ts} +0 -0
- /package/brightData/serpApi/{buildGoogleSerpUrl.js → server/buildGoogleSerpUrl.js} +0 -0
- /package/brightData/serpApi/{buildGoogleTrendsUrl.d.ts → server/buildGoogleTrendsUrl.d.ts} +0 -0
- /package/brightData/serpApi/{buildGoogleTrendsUrl.js → server/buildGoogleTrendsUrl.js} +0 -0
- /package/brightData/serpApi/{server.d.ts → server/index.d.ts} +0 -0
- /package/brightData/serpApi/{server.js → server/index.js} +0 -0
- /package/brightData/{server.d.ts → server/index.d.ts} +0 -0
- /package/brightData/{server.js → server/index.js} +0 -0
- /package/brightData/webScraperIde/{server.d.ts → server/index.d.ts} +0 -0
- /package/brightData/webScraperIde/{server.js → server/index.js} +0 -0
- /package/cache/{server.d.ts → server/index.d.ts} +0 -0
- /package/cache/{server.js → server/index.js} +0 -0
- /package/cache/{test → server/test}/cache.test.d.ts +0 -0
- /package/eskimi/{server.d.ts → index.d.ts} +0 -0
- /package/eskimi/{server.js → index.js} +0 -0
- /package/eskimi/{getAgeGroup.d.ts → server/getAgeGroup.d.ts} +0 -0
- /package/eskimi/{getData.d.ts → server/getData.d.ts} +0 -0
- /package/eskimi/{getDevice.d.ts → server/getDevice.d.ts} +0 -0
- /package/eskimi/{getGender.d.ts → server/getGender.d.ts} +0 -0
- /package/google/bigQuery/{server.d.ts → server/index.d.ts} +0 -0
- /package/google/bigQuery/{loadData.d.ts → server/loadData.d.ts} +0 -0
- /package/google/bigQuery/{loadData.js → server/loadData.js} +0 -0
- /package/google/{server.d.ts → server/index.d.ts} +0 -0
- /package/google/{server.js → server/index.js} +0 -0
- /package/google/sheets/{getAssociatedData.d.ts → server/getAssociatedData.d.ts} +0 -0
- /package/google/sheets/{getAssociatedData.js → server/getAssociatedData.js} +0 -0
- /package/google/sheets/{server.d.ts → server/index.d.ts} +0 -0
- /package/google/storage/{server.d.ts → server/index.d.ts} +0 -0
- /package/googleAds/keywordPlanner/{server.d.ts → server/index.d.ts} +0 -0
- /package/googleAds/keywordPlanner/{server.js → server/index.js} +0 -0
- /package/googleAds/{server.d.ts → server/index.d.ts} +0 -0
- /package/googlePageSpeed/{server.d.ts → server/index.d.ts} +0 -0
- /package/googleSearchIncidents/{server.d.ts → server/index.d.ts} +0 -0
- /package/greenDomain/{server.d.ts → server/index.d.ts} +0 -0
- /package/inngest/{server.d.ts → index.d.ts} +0 -0
- /package/inngest/{server.js → index.js} +0 -0
- /package/littleWarden/{getUrlStatus.d.ts → server/getUrlStatus.d.ts} +0 -0
- /package/lumar/api/{initClient.d.ts → server/initClient.d.ts} +0 -0
- /package/lumar/graphql/{columns.d.ts → server/columns.d.ts} +0 -0
- /package/lumar/graphql/{columns.js → server/columns.js} +0 -0
- /package/lumar/graphql/{server.d.ts → server/index.d.ts} +0 -0
- /package/lumar/graphql/{server.js → server/index.js} +0 -0
- /package/lumar/graphql/{initClient.d.ts → server/initClient.d.ts} +0 -0
- /package/lumar/graphql/{queries → server/queries}/crawl.d.ts +0 -0
- /package/lumar/graphql/{queries → server/queries}/crawl.js +0 -0
- /package/lumar/graphql/{queries → server/queries}/getCrawls.d.ts +0 -0
- /package/lumar/graphql/{queries → server/queries}/getCrawls.js +0 -0
- /package/lumar/graphql/{queries → server/queries}/getReportDifferences.d.ts +0 -0
- /package/lumar/graphql/{queries → server/queries}/getRows.d.ts +0 -0
- /package/lumar/graphql/{queries → server/queries}/getRows.js +0 -0
- /package/lumar/graphql/{queries → server/queries}/getTotals.d.ts +0 -0
- /package/lumar/graphql/{queries → server/queries}/getTotals.js +0 -0
- /package/lumar/graphql/{queries → server/queries}/row.d.ts +0 -0
- /package/lumar/graphql/{queries → server/queries}/row.js +0 -0
- /package/lumar/graphql/{reportTemplates.d.ts → server/reportTemplates.d.ts} +0 -0
- /package/lumar/graphql/{reportTemplates.js → server/reportTemplates.js} +0 -0
- /package/onePassword/{server.d.ts → server/index.d.ts} +0 -0
- /package/onePassword/{server.js → server/index.js} +0 -0
- /package/openAi/{server.d.ts → server/index.d.ts} +0 -0
- /package/snapchat/{server.d.ts → server/index.d.ts} +0 -0
- /package/stream/{server.d.ts → server/index.d.ts} +0 -0
- /package/stream/{server.js → server/index.js} +0 -0
- /package/stream/{sort.d.ts → server/sort.d.ts} +0 -0
- /package/stream/{sort.js → server/sort.js} +0 -0
- /package/swr/{index.js → client/index.js} +0 -0
- /package/upTimeRobot/{server.d.ts → server/index.d.ts} +0 -0
- /package/url/{server.d.ts → server/index.d.ts} +0 -0
- /package/url/{server.js → server/index.js} +0 -0
- /package/url/{writeUrlContents.d.ts → server/writeUrlContents.d.ts} +0 -0
- /package/util/{getBrotliCompressed.d.ts → server/getBrotliCompressed.d.ts} +0 -0
- /package/util/{getBrotliCompressed.js → server/getBrotliCompressed.js} +0 -0
- /package/util/{getBrotliDecompressed.d.ts → server/getBrotliDecompressed.d.ts} +0 -0
- /package/util/{getBrotliDecompressed.js → server/getBrotliDecompressed.js} +0 -0
- /package/util/{getGzipCompressed.d.ts → server/getGzipCompressed.d.ts} +0 -0
- /package/util/{getGzipCompressed.js → server/getGzipCompressed.js} +0 -0
- /package/util/{getGzipDecompressed.d.ts → server/getGzipDecompressed.d.ts} +0 -0
- /package/util/{getGzipDecompressed.js → server/getGzipDecompressed.js} +0 -0
- /package/util/{server.d.ts → server/index.d.ts} +0 -0
- /package/util/{server.js → server/index.js} +0 -0
- /package/xml/{getXml.d.ts → server/getXml.d.ts} +0 -0
|
@@ -11,9 +11,8 @@ const packageJsonPath = path.join(projectRoot, 'package.json');
|
|
|
11
11
|
// Read package.json
|
|
12
12
|
const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, 'utf8'));
|
|
13
13
|
|
|
14
|
-
//
|
|
14
|
+
// Directories to exclude from scanning
|
|
15
15
|
const excludeDirs = ['node_modules', 'scripts', 'jest', 'src', '.git', '.github', '.idea'];
|
|
16
|
-
const entries = fs.readdirSync(projectRoot, {withFileTypes: true});
|
|
17
16
|
|
|
18
17
|
// Build exports object
|
|
19
18
|
const exports = {
|
|
@@ -25,35 +24,50 @@ const exports = {
|
|
|
25
24
|
}
|
|
26
25
|
};
|
|
27
26
|
|
|
28
|
-
//
|
|
29
|
-
|
|
27
|
+
// Recursively find all directories with index.js files
|
|
28
|
+
function findIndexDirs(baseDir, relativePath = '')
|
|
30
29
|
{
|
|
31
|
-
|
|
30
|
+
const entries = fs.readdirSync(baseDir, {withFileTypes: true});
|
|
31
|
+
|
|
32
|
+
for(const entry of entries)
|
|
32
33
|
{
|
|
33
|
-
|
|
34
|
-
|
|
34
|
+
if(!entry.isDirectory() || excludeDirs.includes(entry.name) || entry.name.startsWith('.'))
|
|
35
|
+
{
|
|
36
|
+
continue;
|
|
37
|
+
}
|
|
35
38
|
|
|
39
|
+
const fullPath = path.join(baseDir, entry.name);
|
|
40
|
+
const newRelativePath = relativePath ? `${relativePath}/${entry.name}` : entry.name;
|
|
41
|
+
const indexJsPath = path.join(fullPath, 'index.js');
|
|
42
|
+
|
|
43
|
+
// If this directory has an index.js, add it to exports
|
|
36
44
|
if(fs.existsSync(indexJsPath))
|
|
37
45
|
{
|
|
38
46
|
const exportConfig = {
|
|
39
|
-
types: `./${
|
|
40
|
-
import: `./${
|
|
41
|
-
require: `./${
|
|
42
|
-
default: `./${
|
|
47
|
+
types: `./${newRelativePath}/index.d.ts`,
|
|
48
|
+
import: `./${newRelativePath}/index.js`,
|
|
49
|
+
require: `./${newRelativePath}/index.js`,
|
|
50
|
+
default: `./${newRelativePath}/index.js`
|
|
43
51
|
};
|
|
44
52
|
|
|
45
53
|
// Add both the directory path and explicit index.js path
|
|
46
|
-
exports[`./${
|
|
47
|
-
exports[`./${
|
|
54
|
+
exports[`./${newRelativePath}`] = exportConfig;
|
|
55
|
+
exports[`./${newRelativePath}/index.js`] = exportConfig;
|
|
48
56
|
|
|
49
57
|
// Also add .d.ts mapping for TypeScript
|
|
50
|
-
exports[`./${
|
|
51
|
-
types: `./${
|
|
52
|
-
default: `./${
|
|
58
|
+
exports[`./${newRelativePath}/index.d.ts`] = {
|
|
59
|
+
types: `./${newRelativePath}/index.d.ts`,
|
|
60
|
+
default: `./${newRelativePath}/index.d.ts`
|
|
53
61
|
};
|
|
54
62
|
}
|
|
63
|
+
|
|
64
|
+
// Recursively scan subdirectories
|
|
65
|
+
findIndexDirs(fullPath, newRelativePath);
|
|
55
66
|
}
|
|
56
|
-
}
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
// Start scanning from project root
|
|
70
|
+
findIndexDirs(projectRoot);
|
|
57
71
|
|
|
58
72
|
// Update package.json with new exports
|
|
59
73
|
packageJson.exports = exports;
|
package/.yarn/install-state.gz
CHANGED
|
Binary file
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { get } from "
|
|
1
|
+
import { getLuxonDate, getToday, getYesterday, getYmdString } from "../../date";
|
|
2
|
+
import { get } from "../../axios";
|
|
3
3
|
/**
|
|
4
4
|
* Fetch all the jobs that ran yesterday by default.
|
|
5
5
|
* A job can either by in Fetch, Enrich or Transfer states, but all have different job ids. This makes it difficult to track and we would be reliant on the start/end time which could varu.
|
|
6
6
|
* As a result, we only store the Transfer jobs as this is when it gets moved into Bigquery. If it's not in Bigquery we cant use it anyway.
|
|
7
7
|
*/
|
|
8
8
|
export const getJobs = async (apiKey, start, end, url) => {
|
|
9
|
-
const startYmd = getYmdString(start ?
|
|
10
|
-
const endYmd = getYmdString(end ?
|
|
9
|
+
const startYmd = getYmdString(start ? getLuxonDate(start) : getYesterday());
|
|
10
|
+
const endYmd = getYmdString(end ? getLuxonDate(end) : getToday());
|
|
11
11
|
const finalUrl = "undefined" !== typeof url ? url : `https://8ms.datatap.adverity.com/api/jobs/?start=${startYmd}&end=${endYmd}&page_size=300`;
|
|
12
12
|
let response = [];
|
|
13
13
|
const apiResponse = await get(finalUrl, {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { BaseNamespace } from "
|
|
2
|
-
import { AwsConfig } from "
|
|
1
|
+
import { BaseNamespace } from "../../../_class";
|
|
2
|
+
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;
|
|
6
6
|
config: AwsConfig;
|
|
7
7
|
ensureInit: () => Promise<void>;
|
|
8
|
-
startInstances: (instanceIds: string[], additionalInfo?: string, dryRun?: boolean) => Promise<
|
|
9
|
-
stopInstances: (instanceIds: string[], hibernate?: boolean, force?: boolean, dryRun?: boolean) => Promise<
|
|
8
|
+
startInstances: (instanceIds: string[], additionalInfo?: string, dryRun?: boolean) => Promise<import("@aws-sdk/client-ec2").StartInstancesCommandOutput>;
|
|
9
|
+
stopInstances: (instanceIds: string[], hibernate?: boolean, force?: boolean, dryRun?: boolean) => Promise<import("@aws-sdk/client-ec2").StopInstancesCommandOutput>;
|
|
10
10
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BaseNamespace } from "
|
|
1
|
+
import { BaseNamespace } from "../../../_class";
|
|
2
2
|
export class AwsEc2Namespace extends BaseNamespace {
|
|
3
3
|
ensureInit = async () => {
|
|
4
4
|
if (!this.client) {
|
|
@@ -19,7 +19,7 @@ export class AwsEc2Namespace extends BaseNamespace {
|
|
|
19
19
|
AdditionalInfo: additionalInfo,
|
|
20
20
|
DryRun: dryRun,
|
|
21
21
|
});
|
|
22
|
-
const response = await
|
|
22
|
+
const response = await this.client.send(command);
|
|
23
23
|
return response;
|
|
24
24
|
};
|
|
25
25
|
stopInstances = async (instanceIds, hibernate, force, dryRun) => {
|
|
@@ -31,7 +31,7 @@ export class AwsEc2Namespace extends BaseNamespace {
|
|
|
31
31
|
DryRun: dryRun,
|
|
32
32
|
Force: force,
|
|
33
33
|
});
|
|
34
|
-
const response = await
|
|
34
|
+
const response = await this.client.send(command);
|
|
35
35
|
return response;
|
|
36
36
|
};
|
|
37
37
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AwsEc2Namespace } from "./AwsEc2Namespace";
|
|
2
|
-
import { getConfig } from "
|
|
2
|
+
import { getConfig } from "../../server";
|
|
3
3
|
const awsEc2Namespaces = new Map();
|
|
4
4
|
export const awsEc2Client = async (key = "default", config, vaultId, itemId) => {
|
|
5
5
|
if (awsEc2Namespaces.has(key)) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { BaseNamespace } from "
|
|
2
|
-
import { AwsConfig } from "
|
|
1
|
+
import { BaseNamespace } from "../../../_class";
|
|
2
|
+
import { AwsConfig } from "../../server";
|
|
3
3
|
import type { DesiredStatus, ECSClient, LaunchType, NetworkConfiguration, SortOrder, TaskDefinitionStatus, TaskOverride } from "@aws-sdk/client-ecs";
|
|
4
4
|
type GetTaskDefinitionsProps = {
|
|
5
5
|
familyPrefix?: string;
|
|
@@ -48,6 +48,6 @@ export declare class AwsEcsNamespace extends BaseNamespace {
|
|
|
48
48
|
* https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/ecs/command/RunTaskCommand/
|
|
49
49
|
* https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-ecs/Interface/RunTaskCommandInput/
|
|
50
50
|
*/
|
|
51
|
-
runTask: (props: RunTaskProps) => Promise<
|
|
51
|
+
runTask: (props: RunTaskProps) => Promise<any>;
|
|
52
52
|
}
|
|
53
53
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { BaseNamespace } from "
|
|
2
|
-
import { isResponse200 } from "
|
|
1
|
+
import { BaseNamespace } from "../../../_class";
|
|
2
|
+
import { isResponse200 } from "../../server";
|
|
3
3
|
export class AwsEcsNamespace extends BaseNamespace {
|
|
4
4
|
ensureInit = async () => {
|
|
5
5
|
if (!this.client) {
|
|
@@ -53,7 +53,7 @@ export class AwsEcsNamespace extends BaseNamespace {
|
|
|
53
53
|
status: props?.status,
|
|
54
54
|
nextToken: apiResponse?.nextToken,
|
|
55
55
|
});
|
|
56
|
-
apiResponse = await
|
|
56
|
+
apiResponse = await this.client.send(listTaskDefinitionsCommand);
|
|
57
57
|
if (isResponse200(apiResponse)) {
|
|
58
58
|
response = [
|
|
59
59
|
...response,
|
|
@@ -83,7 +83,7 @@ export class AwsEcsNamespace extends BaseNamespace {
|
|
|
83
83
|
serviceName: props?.serviceName,
|
|
84
84
|
startedBy: props?.startedBy,
|
|
85
85
|
});
|
|
86
|
-
apiResponse = await
|
|
86
|
+
apiResponse = await this.client.send(listTasksCommand);
|
|
87
87
|
if (isResponse200(apiResponse)) {
|
|
88
88
|
response = [
|
|
89
89
|
...response,
|
|
@@ -109,7 +109,7 @@ export class AwsEcsNamespace extends BaseNamespace {
|
|
|
109
109
|
overrides: props?.overrides,
|
|
110
110
|
taskDefinition: props?.taskDefinition,
|
|
111
111
|
});
|
|
112
|
-
const apiResponse = await
|
|
112
|
+
const apiResponse = await this.client.send(runtTaskCommand);
|
|
113
113
|
if (isResponse200(apiResponse)) {
|
|
114
114
|
response = apiResponse;
|
|
115
115
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AwsEcsNamespace } from "./AwsEcsNamespace";
|
|
2
|
-
import { getConfig } from "
|
|
2
|
+
import { getConfig } from "../../server";
|
|
3
3
|
const awsEcsNamespaces = new Map();
|
|
4
4
|
export const awsEcsClient = async (key = "default", config, vaultId, itemId) => {
|
|
5
5
|
if (awsEcsNamespaces.has(key)) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { BaseNamespace } from "
|
|
2
|
-
import { AwsConfig } from "
|
|
1
|
+
import { BaseNamespace } from "../../../_class";
|
|
2
|
+
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;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { BaseNamespace } from "
|
|
2
|
-
import { isResponse200 } from "
|
|
1
|
+
import { BaseNamespace } from "../../../_class";
|
|
2
|
+
import { isResponse200 } from "../../server";
|
|
3
3
|
export class AwsGlueNamespace extends BaseNamespace {
|
|
4
4
|
ensureInit = async () => {
|
|
5
5
|
if (!this.client) {
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { AwsGlueNamespace } from "./AwsGlueNamespace";
|
|
2
|
-
import { AwsConfig } from "
|
|
2
|
+
import { AwsConfig } from "../../server";
|
|
3
3
|
export declare const awsGlueClient: (key?: string, config?: AwsConfig, vaultId?: string, itemId?: string) => Promise<AwsGlueNamespace>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AwsGlueNamespace } from "./AwsGlueNamespace";
|
|
2
|
-
import { getConfig } from "
|
|
2
|
+
import { getConfig } from "../../server";
|
|
3
3
|
const awsGlueNamespaces = new Map();
|
|
4
4
|
export const awsGlueClient = async (key = "default", config, vaultId, itemId) => {
|
|
5
5
|
if (awsGlueNamespaces.has(key)) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { BaseNamespace } from "
|
|
2
|
-
import { AwsConfig } from "
|
|
1
|
+
import { BaseNamespace } from "../../../_class";
|
|
2
|
+
import { AwsConfig } from "../../server";
|
|
3
3
|
import type { LambdaClient } from "@aws-sdk/client-lambda";
|
|
4
4
|
type InvokeProps = {
|
|
5
5
|
awaitResponse?: boolean;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { BaseNamespace } from "
|
|
2
|
-
import { isResponse200 } from "
|
|
3
|
-
import { ApiResponseClass } from "
|
|
1
|
+
import { BaseNamespace } from "../../../_class";
|
|
2
|
+
import { isResponse200 } from "../../server";
|
|
3
|
+
import { ApiResponseClass } from "../../../api";
|
|
4
4
|
export class AwsLambdaNamespace extends BaseNamespace {
|
|
5
5
|
ensureInit = async () => {
|
|
6
6
|
if (!this.client) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { AwsLambdaNamespace } from "./AwsLambdaNamespace";
|
|
2
|
-
import { AwsConfig } from "
|
|
2
|
+
import { AwsConfig } from "../../server";
|
|
3
3
|
export declare const awsLambdaClient: (key?: string, config?: AwsConfig, vaultId?: string, itemId?: string) => Promise<AwsLambdaNamespace>;
|
|
4
4
|
export declare const getHandlerPath: (input: string) => string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AwsLambdaNamespace } from "./AwsLambdaNamespace";
|
|
2
|
-
import { getConfig } from "
|
|
2
|
+
import { getConfig } from "../../server";
|
|
3
3
|
const awsLambdaNamespaces = new Map();
|
|
4
4
|
export const awsLambdaClient = async (key = "default", config, vaultId, itemId) => {
|
|
5
5
|
if (awsLambdaNamespaces.has(key)) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { BaseNamespace } from "
|
|
2
|
-
import { AwsConfig } from "
|
|
1
|
+
import { BaseNamespace } from "../../../_class";
|
|
2
|
+
import { AwsConfig } from "../../server";
|
|
3
3
|
import type { S3Client } from "@aws-sdk/client-s3";
|
|
4
|
-
import { Modified, ReadFileResponse } from "./
|
|
4
|
+
import { Modified, ReadFileResponse } from "./";
|
|
5
5
|
export type ReadBufferResponse = Modified & {
|
|
6
6
|
buffer: any;
|
|
7
7
|
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { BaseNamespace } from "
|
|
2
|
-
import { isResponse200 } from "
|
|
3
|
-
import { getFolder, getStringFromStream } from "
|
|
4
|
-
import { getBrotliCompressed, getBrotliDecompressed, getGzipCompressed, getGzipDecompressed } from "
|
|
5
|
-
import { readFileDefault } from "./
|
|
1
|
+
import { BaseNamespace } from "../../../_class";
|
|
2
|
+
import { isResponse200 } from "../../server";
|
|
3
|
+
import { getFolder, getStringFromStream } from "../../../string";
|
|
4
|
+
import { getBrotliCompressed, getBrotliDecompressed, getGzipCompressed, getGzipDecompressed } from "../../../util/server";
|
|
5
|
+
import { readFileDefault } from "./";
|
|
6
6
|
import cloneDeep from "lodash/cloneDeep";
|
|
7
|
-
import { getToday, getYmdHisString } from "
|
|
7
|
+
import { getToday, getYmdHisString } from "../../../date";
|
|
8
8
|
import get from "axios";
|
|
9
9
|
export class AwsS3Namespace extends BaseNamespace {
|
|
10
10
|
ensureInit = async () => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AwsS3Namespace } from "./AwsS3Namespace";
|
|
2
|
-
import { AwsConfig } from "
|
|
2
|
+
import { AwsConfig } from "../../server";
|
|
3
3
|
export declare const awsS3Client: (key?: string, config?: AwsConfig, vaultId?: string, itemId?: string) => Promise<AwsS3Namespace>;
|
|
4
4
|
export type Modified = {
|
|
5
5
|
now: number;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { AwsS3Namespace } from "./AwsS3Namespace";
|
|
2
|
-
import { getConfig } from "
|
|
3
|
-
import { defaultDateTime } from "
|
|
2
|
+
import { getConfig } from "../../server";
|
|
3
|
+
import { defaultDateTime } from "../../../date";
|
|
4
4
|
const awsS3Namespaces = new Map();
|
|
5
5
|
export const awsS3Client = async (key = "default", config, vaultId, itemId) => {
|
|
6
6
|
if (awsS3Namespaces.has(key)) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { BaseNamespace } from "
|
|
2
|
-
import { AwsConfig } from "
|
|
1
|
+
import { BaseNamespace } from "../../../_class";
|
|
2
|
+
import { AwsConfig } from "../../server";
|
|
3
3
|
import { SendEmailCommandInput, SendRawEmailCommandInput, SESClient } from "@aws-sdk/client-ses";
|
|
4
4
|
export declare class AwsSesNamespace extends BaseNamespace {
|
|
5
5
|
client: SESClient;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { AwsSesNamespace } from "./AwsSesNamespace";
|
|
2
|
-
import { AwsConfig } from "
|
|
2
|
+
import { AwsConfig } from "../../server";
|
|
3
3
|
export declare const awsSesClient: (key?: string, config?: AwsConfig, vaultId?: string, itemId?: string) => Promise<AwsSesNamespace>;
|
|
4
4
|
export { SimpleEmail } from "./SimpleEmail";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AwsSesNamespace } from "./AwsSesNamespace";
|
|
2
|
-
import { getConfig } from "
|
|
2
|
+
import { getConfig } from "../../server";
|
|
3
3
|
const awsSesNamespaces = new Map();
|
|
4
4
|
export const awsSesClient = async (key = "default", config, vaultId, itemId) => {
|
|
5
5
|
if (awsSesNamespaces.has(key)) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { BaseNamespace } from "
|
|
2
|
-
import { AwsConfig } from "
|
|
1
|
+
import { BaseNamespace } from "../../../_class";
|
|
2
|
+
import { AwsConfig } from "../../server";
|
|
3
3
|
import type { SQSClient } from "@aws-sdk/client-sqs";
|
|
4
4
|
type SqsEventRecord = {
|
|
5
5
|
messageId: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AwsSqsNamespace } from "./AwsSqsNamespace";
|
|
2
|
-
import { getConfig } from "
|
|
2
|
+
import { getConfig } from "../../server";
|
|
3
3
|
const awsSqsNamespaces = new Map();
|
|
4
4
|
export const awsSqsClient = async (key = "default", config, vaultId, itemId) => {
|
|
5
5
|
if (awsSqsNamespaces.has(key)) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { BaseNamespace } from "
|
|
2
|
-
import { AwsConfig } from "
|
|
1
|
+
import { BaseNamespace } from "../../../_class";
|
|
2
|
+
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;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AwsSsmNamespace } from "./AwsSsmNamespace";
|
|
2
|
-
import { getConfig } from "
|
|
2
|
+
import { getConfig } from "../../server";
|
|
3
3
|
const awsSsmNamespaces = new Map();
|
|
4
4
|
export const awsSsmClient = async (key = "default", config, vaultId, itemId) => {
|
|
5
5
|
if (awsSsmNamespaces.has(key)) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Auth } from "
|
|
2
|
-
import { BrightDataSerpApiType } from "
|
|
1
|
+
import { Auth } from "../../server";
|
|
2
|
+
import { BrightDataSerpApiType } from "../server";
|
|
3
3
|
/**
|
|
4
4
|
* Make an async request to the SERP API using the Bright Data proxy.
|
|
5
5
|
* Returns a request ID used with getAsyncResults
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { post } from "
|
|
2
|
-
import { getCustomerId, getZone } from "
|
|
3
|
-
import { BrightDataSerpApiType } from "
|
|
1
|
+
import { post } from "../../../axios";
|
|
2
|
+
import { getCustomerId, getZone } from "../../server";
|
|
3
|
+
import { BrightDataSerpApiType } from "../server";
|
|
4
4
|
/**
|
|
5
5
|
* Make an async request to the SERP API using the Bright Data proxy.
|
|
6
6
|
* Returns a request ID used with getAsyncResults
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Auth } from "
|
|
2
|
-
import { ApiResponseClass } from "
|
|
1
|
+
import { Auth } from "../../server";
|
|
2
|
+
import { ApiResponseClass } from "../../../api";
|
|
3
3
|
/**
|
|
4
4
|
* Using the request ID from getAsyncRequestId fetch to see if the data is available.
|
|
5
5
|
* https://docs.brightdata.com/scraping-automation/serp-api/asynchronous-requests
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { get } from "
|
|
2
|
-
import { getCustomerId, getZone } from "
|
|
3
|
-
import { ApiResponseClass } from "
|
|
1
|
+
import { get } from "../../../axios";
|
|
2
|
+
import { getCustomerId, getZone } from "../../server";
|
|
3
|
+
import { ApiResponseClass } from "../../../api";
|
|
4
4
|
/**
|
|
5
5
|
* Using the request ID from getAsyncRequestId fetch to see if the data is available.
|
|
6
6
|
* https://docs.brightdata.com/scraping-automation/serp-api/asynchronous-requests
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { get, post } from "
|
|
2
|
-
import { ApiState } from "
|
|
3
|
-
import { sleep } from "
|
|
1
|
+
import { get, post } from "../../../axios";
|
|
2
|
+
import { ApiState } from "../../../api";
|
|
3
|
+
import { sleep } from "../../../util";
|
|
4
4
|
/**
|
|
5
5
|
* Depends on the Scraper setup!
|
|
6
6
|
*
|
package/date/calculation.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ export declare const getUnix: (input?: InputDate) => number;
|
|
|
6
6
|
*
|
|
7
7
|
* If it's not UTC, it needs to be converted to UTC before being used.
|
|
8
8
|
*/
|
|
9
|
-
export declare const
|
|
9
|
+
export declare const getLuxonDate: (input?: InputDate, setMidnight?: boolean) => DateTime<boolean>;
|
|
10
10
|
export declare const isMonday: (input?: InputDate) => boolean;
|
|
11
11
|
export declare const isTuesday: (input?: InputDate) => boolean;
|
|
12
12
|
export declare const isWednesday: (input?: InputDate) => boolean;
|