@8ms/helpers 2.2.18 → 2.2.22

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.
Files changed (228) hide show
  1. package/.github/generate-exports.js +78 -0
  2. package/.github/workflows/deploy_npmjs.yml +3 -0
  3. package/.yarn/install-state.gz +0 -0
  4. package/adverity/{getJobs.d.ts → server/getJobs.d.ts} +2 -2
  5. package/adverity/{getJobs.js → server/getJobs.js} +2 -2
  6. package/aws/ec2/{AwsEc2Namespace.d.ts → server/AwsEc2Namespace.d.ts} +4 -4
  7. package/aws/ec2/{AwsEc2Namespace.js → server/AwsEc2Namespace.js} +3 -3
  8. package/aws/ec2/{server.d.ts → server/index.d.ts} +1 -1
  9. package/aws/ec2/{server.js → server/index.js} +1 -1
  10. package/aws/ecs/{AwsEcsNamespace.d.ts → server/AwsEcsNamespace.d.ts} +3 -3
  11. package/aws/ecs/{AwsEcsNamespace.js → server/AwsEcsNamespace.js} +5 -5
  12. package/aws/ecs/{server.d.ts → server/index.d.ts} +1 -1
  13. package/aws/ecs/{server.js → server/index.js} +1 -1
  14. package/aws/glue/{AwsGlueNamespace.d.ts → server/AwsGlueNamespace.d.ts} +2 -2
  15. package/aws/glue/{AwsGlueNamespace.js → server/AwsGlueNamespace.js} +2 -2
  16. package/aws/glue/{server.d.ts → server/index.d.ts} +1 -1
  17. package/aws/glue/{server.js → server/index.js} +1 -1
  18. package/aws/lambda/{AwsLambdaNamespace.d.ts → server/AwsLambdaNamespace.d.ts} +2 -2
  19. package/aws/lambda/{AwsLambdaNamespace.js → server/AwsLambdaNamespace.js} +3 -3
  20. package/aws/lambda/{server.d.ts → server/index.d.ts} +1 -1
  21. package/aws/lambda/{server.js → server/index.js} +1 -1
  22. package/aws/s3/{AwsS3Namespace.d.ts → server/AwsS3Namespace.d.ts} +3 -3
  23. package/aws/s3/{AwsS3Namespace.js → server/AwsS3Namespace.js} +6 -6
  24. package/aws/s3/{server.d.ts → server/index.d.ts} +1 -1
  25. package/aws/s3/{server.js → server/index.js} +2 -2
  26. package/aws/{server.js → server/index.js} +1 -1
  27. package/aws/{isResponse200.js → server/isResponse200.js} +1 -1
  28. package/aws/ses/{AwsSesNamespace.d.ts → server/AwsSesNamespace.d.ts} +2 -2
  29. package/aws/ses/{AwsSesNamespace.js → server/AwsSesNamespace.js} +1 -1
  30. package/aws/ses/{SimpleEmail.d.ts → server/SimpleEmail.d.ts} +1 -1
  31. package/aws/ses/{SimpleEmail.js → server/SimpleEmail.js} +1 -1
  32. package/aws/ses/{server.d.ts → server/index.d.ts} +1 -1
  33. package/aws/ses/{server.js → server/index.js} +1 -1
  34. package/aws/sqs/{AwsSqsNamespace.d.ts → server/AwsSqsNamespace.d.ts} +2 -2
  35. package/aws/sqs/{AwsSqsNamespace.js → server/AwsSqsNamespace.js} +1 -1
  36. package/aws/sqs/{server.d.ts → server/index.d.ts} +1 -1
  37. package/aws/sqs/{server.js → server/index.js} +1 -1
  38. package/aws/ssm/{AwsSsmNamespace.d.ts → server/AwsSsmNamespace.d.ts} +2 -2
  39. package/aws/ssm/{AwsSsmNamespace.js → server/AwsSsmNamespace.js} +1 -1
  40. package/aws/ssm/{server.d.ts → server/index.d.ts} +1 -1
  41. package/aws/ssm/{server.js → server/index.js} +1 -1
  42. package/brightData/serpApi/{getAsyncRequestId.d.ts → server/getAsyncRequestId.d.ts} +2 -2
  43. package/brightData/serpApi/{getAsyncRequestId.js → server/getAsyncRequestId.js} +3 -3
  44. package/brightData/serpApi/{getAsyncResults.d.ts → server/getAsyncResults.d.ts} +2 -2
  45. package/brightData/serpApi/{getAsyncResults.js → server/getAsyncResults.js} +3 -3
  46. package/brightData/serpApi/{getRealtime.d.ts → server/getRealtime.d.ts} +1 -1
  47. package/brightData/serpApi/{getRealtime.js → server/getRealtime.js} +1 -1
  48. package/brightData/webScraperIde/{getBatch.d.ts → server/getBatch.d.ts} +1 -1
  49. package/brightData/webScraperIde/{getBatch.js → server/getBatch.js} +1 -1
  50. package/brightData/webScraperIde/{getRealtime.d.ts → server/getRealtime.d.ts} +1 -1
  51. package/brightData/webScraperIde/{getRealtime.js → server/getRealtime.js} +3 -3
  52. package/cache/{test → server/test}/cache.test.js +1 -1
  53. package/environment/index.js +7 -8
  54. package/eskimi/{getAgeGroup.js → server/getAgeGroup.js} +1 -1
  55. package/eskimi/{getData.js → server/getData.js} +1 -1
  56. package/eskimi/{getDevice.js → server/getDevice.js} +1 -1
  57. package/eskimi/{getGender.js → server/getGender.js} +1 -1
  58. package/eskimi/server/index.d.ts +4 -0
  59. package/eskimi/server/index.js +4 -0
  60. package/file/getFileKey.d.ts +4 -0
  61. package/file/getFileKey.js +23 -0
  62. package/file/index.d.ts +1 -9
  63. package/file/index.js +1 -36
  64. package/file/server/createDirectory.d.ts +5 -0
  65. package/file/server/createDirectory.js +13 -0
  66. package/file/server/index.d.ts +1 -0
  67. package/file/server/index.js +1 -0
  68. package/geo/index.d.ts +2 -2
  69. package/geo/index.js +2 -2
  70. package/google/bigQuery/{GoogleBigQueryNamespace.d.ts → server/GoogleBigQueryNamespace.d.ts} +2 -2
  71. package/google/bigQuery/{GoogleBigQueryNamespace.js → server/GoogleBigQueryNamespace.js} +2 -2
  72. package/google/bigQuery/{server.js → server/index.js} +1 -1
  73. package/google/sheets/{GoogleSheetsNamespace.d.ts → server/GoogleSheetsNamespace.d.ts} +2 -2
  74. package/google/sheets/{GoogleSheetsNamespace.js → server/GoogleSheetsNamespace.js} +2 -2
  75. package/google/sheets/{server.js → server/index.js} +1 -1
  76. package/google/storage/{GoogleCloudStorageNamespace.d.ts → server/GoogleCloudStorageNamespace.d.ts} +2 -2
  77. package/google/storage/{GoogleCloudStorageNamespace.js → server/GoogleCloudStorageNamespace.js} +2 -2
  78. package/google/storage/{server.js → server/index.js} +1 -1
  79. package/googleAds/{GoogleAdsNamespace.d.ts → server/GoogleAdsNamespace.d.ts} +2 -2
  80. package/googleAds/{GoogleAdsNamespace.js → server/GoogleAdsNamespace.js} +3 -3
  81. package/googleAds/{server.js → server/index.js} +1 -1
  82. package/googlePageSpeed/{GooglePageSpeedNamespace.d.ts → server/GooglePageSpeedNamespace.d.ts} +2 -2
  83. package/googlePageSpeed/{GooglePageSpeedNamespace.js → server/GooglePageSpeedNamespace.js} +3 -3
  84. package/googlePageSpeed/{server.js → server/index.js} +1 -1
  85. package/googleSearchIncidents/{server.js → server/index.js} +1 -1
  86. package/greenDomain/{server.js → server/index.js} +1 -1
  87. package/json/index.d.ts +2 -2
  88. package/json/index.js +2 -2
  89. package/littleWarden/{LittleWardenNamespace.d.ts → server/LittleWardenNamespace.d.ts} +2 -2
  90. package/littleWarden/{LittleWardenNamespace.js → server/LittleWardenNamespace.js} +2 -2
  91. package/littleWarden/{getUrlStatus.js → server/getUrlStatus.js} +1 -1
  92. package/littleWarden/{server.d.ts → server/index.d.ts} +1 -1
  93. package/littleWarden/{server.js → server/index.js} +2 -2
  94. package/lumar/api/{buildRequest.d.ts → server/buildRequest.d.ts} +1 -1
  95. package/lumar/api/{buildRequest.js → server/buildRequest.js} +1 -1
  96. package/lumar/api/server/getData.d.ts +1 -0
  97. package/lumar/api/server/getData.js +9 -0
  98. package/lumar/api/{server.d.ts → server/index.d.ts} +3 -3
  99. package/lumar/api/{server.js → server/index.js} +3 -3
  100. package/lumar/api/{initClient.js → server/initClient.js} +1 -1
  101. package/lumar/graphql/server/getData.d.ts +1 -0
  102. package/lumar/graphql/{getData.js → server/getData.js} +3 -3
  103. package/lumar/graphql/{initClient.js → server/initClient.js} +1 -1
  104. package/lumar/graphql/{queries → server/queries}/getReportDifferences.js +1 -1
  105. package/myTarget/server/index.d.ts +5 -0
  106. package/myTarget/{server.js → server/index.js} +3 -3
  107. package/nextAuth/isSessionReady.js +1 -7
  108. package/nextJs/client/index.d.ts +1 -0
  109. package/nextJs/client/index.js +1 -0
  110. package/number/index.d.ts +6 -6
  111. package/number/index.js +6 -6
  112. package/object/index.d.ts +1 -1
  113. package/object/index.js +1 -1
  114. package/onePassword/{OnePasswordNamespace.d.ts → server/OnePasswordNamespace.d.ts} +2 -2
  115. package/onePassword/{OnePasswordNamespace.js → server/OnePasswordNamespace.js} +1 -1
  116. package/openAi/{OpenAiNamespace.d.ts → server/OpenAiNamespace.d.ts} +2 -2
  117. package/openAi/{OpenAiNamespace.js → server/OpenAiNamespace.js} +2 -2
  118. package/openAi/{server.js → server/index.js} +1 -1
  119. package/package.json +780 -12
  120. package/prisma/index.d.ts +1 -0
  121. package/prisma/index.js +1 -0
  122. package/prisma/{PrismaNamespace.d.ts → server/PrismaNamespace.d.ts} +2 -3
  123. package/prisma/{PrismaNamespace.js → server/PrismaNamespace.js} +2 -2
  124. package/prisma/{server.d.ts → server/index.d.ts} +0 -1
  125. package/prisma/{server.js → server/index.js} +0 -1
  126. package/snapchat/{SnapchatNamespace.d.ts → server/SnapchatNamespace.d.ts} +2 -2
  127. package/snapchat/{SnapchatNamespace.js → server/SnapchatNamespace.js} +2 -2
  128. package/snapchat/{server.js → server/index.js} +1 -1
  129. package/swr/{index.d.ts → client/index.d.ts} +1 -1
  130. package/upTimeRobot/{UpTimeRobotNamespace.d.ts → server/UpTimeRobotNamespace.d.ts} +2 -2
  131. package/upTimeRobot/{UpTimeRobotNamespace.js → server/UpTimeRobotNamespace.js} +2 -2
  132. package/upTimeRobot/{server.js → server/index.js} +1 -1
  133. package/url/{writeUrlContents.js → server/writeUrlContents.js} +1 -1
  134. package/xml/{getXml.js → server/getXml.js} +1 -1
  135. package/xml/server/index.d.ts +1 -0
  136. package/xml/server/index.js +1 -0
  137. package/lumar/api/getData.d.ts +0 -5
  138. package/lumar/api/getData.js +0 -9
  139. package/lumar/graphql/getData.d.ts +0 -1
  140. package/myTarget/server.d.ts +0 -5
  141. package/nextJs/client.d.ts +0 -1
  142. package/nextJs/client.js +0 -1
  143. /package/adverity/{server.d.ts → server/index.d.ts} +0 -0
  144. /package/adverity/{server.js → server/index.js} +0 -0
  145. /package/aws/s3/{payload.d.ts → server/payload.d.ts} +0 -0
  146. /package/aws/s3/{payload.js → server/payload.js} +0 -0
  147. /package/aws/{server.d.ts → server/index.d.ts} +0 -0
  148. /package/aws/{isResponse200.d.ts → server/isResponse200.d.ts} +0 -0
  149. /package/brightData/serpApi/{buildGoogleSerpUrl.d.ts → server/buildGoogleSerpUrl.d.ts} +0 -0
  150. /package/brightData/serpApi/{buildGoogleSerpUrl.js → server/buildGoogleSerpUrl.js} +0 -0
  151. /package/brightData/serpApi/{buildGoogleTrendsUrl.d.ts → server/buildGoogleTrendsUrl.d.ts} +0 -0
  152. /package/brightData/serpApi/{buildGoogleTrendsUrl.js → server/buildGoogleTrendsUrl.js} +0 -0
  153. /package/brightData/serpApi/{server.d.ts → server/index.d.ts} +0 -0
  154. /package/brightData/serpApi/{server.js → server/index.js} +0 -0
  155. /package/brightData/{server.d.ts → server/index.d.ts} +0 -0
  156. /package/brightData/{server.js → server/index.js} +0 -0
  157. /package/brightData/webScraperIde/{server.d.ts → server/index.d.ts} +0 -0
  158. /package/brightData/webScraperIde/{server.js → server/index.js} +0 -0
  159. /package/cache/{server.d.ts → server/index.d.ts} +0 -0
  160. /package/cache/{server.js → server/index.js} +0 -0
  161. /package/cache/{test → server/test}/cache.test.d.ts +0 -0
  162. /package/eskimi/{server.d.ts → index.d.ts} +0 -0
  163. /package/eskimi/{server.js → index.js} +0 -0
  164. /package/eskimi/{getAgeGroup.d.ts → server/getAgeGroup.d.ts} +0 -0
  165. /package/eskimi/{getData.d.ts → server/getData.d.ts} +0 -0
  166. /package/eskimi/{getDevice.d.ts → server/getDevice.d.ts} +0 -0
  167. /package/eskimi/{getGender.d.ts → server/getGender.d.ts} +0 -0
  168. /package/google/bigQuery/{server.d.ts → server/index.d.ts} +0 -0
  169. /package/google/bigQuery/{loadData.d.ts → server/loadData.d.ts} +0 -0
  170. /package/google/bigQuery/{loadData.js → server/loadData.js} +0 -0
  171. /package/google/{server.d.ts → server/index.d.ts} +0 -0
  172. /package/google/{server.js → server/index.js} +0 -0
  173. /package/google/sheets/{getAssociatedData.d.ts → server/getAssociatedData.d.ts} +0 -0
  174. /package/google/sheets/{getAssociatedData.js → server/getAssociatedData.js} +0 -0
  175. /package/google/sheets/{server.d.ts → server/index.d.ts} +0 -0
  176. /package/google/storage/{server.d.ts → server/index.d.ts} +0 -0
  177. /package/googleAds/keywordPlanner/{server.d.ts → server/index.d.ts} +0 -0
  178. /package/googleAds/keywordPlanner/{server.js → server/index.js} +0 -0
  179. /package/googleAds/{server.d.ts → server/index.d.ts} +0 -0
  180. /package/googlePageSpeed/{server.d.ts → server/index.d.ts} +0 -0
  181. /package/googleSearchIncidents/{server.d.ts → server/index.d.ts} +0 -0
  182. /package/greenDomain/{server.d.ts → server/index.d.ts} +0 -0
  183. /package/inngest/{server.d.ts → index.d.ts} +0 -0
  184. /package/inngest/{server.js → index.js} +0 -0
  185. /package/littleWarden/{getUrlStatus.d.ts → server/getUrlStatus.d.ts} +0 -0
  186. /package/lumar/api/{initClient.d.ts → server/initClient.d.ts} +0 -0
  187. /package/lumar/graphql/{columns.d.ts → server/columns.d.ts} +0 -0
  188. /package/lumar/graphql/{columns.js → server/columns.js} +0 -0
  189. /package/lumar/graphql/{server.d.ts → server/index.d.ts} +0 -0
  190. /package/lumar/graphql/{server.js → server/index.js} +0 -0
  191. /package/lumar/graphql/{initClient.d.ts → server/initClient.d.ts} +0 -0
  192. /package/lumar/graphql/{queries → server/queries}/crawl.d.ts +0 -0
  193. /package/lumar/graphql/{queries → server/queries}/crawl.js +0 -0
  194. /package/lumar/graphql/{queries → server/queries}/getCrawls.d.ts +0 -0
  195. /package/lumar/graphql/{queries → server/queries}/getCrawls.js +0 -0
  196. /package/lumar/graphql/{queries → server/queries}/getReportDifferences.d.ts +0 -0
  197. /package/lumar/graphql/{queries → server/queries}/getRows.d.ts +0 -0
  198. /package/lumar/graphql/{queries → server/queries}/getRows.js +0 -0
  199. /package/lumar/graphql/{queries → server/queries}/getTotals.d.ts +0 -0
  200. /package/lumar/graphql/{queries → server/queries}/getTotals.js +0 -0
  201. /package/lumar/graphql/{queries → server/queries}/row.d.ts +0 -0
  202. /package/lumar/graphql/{queries → server/queries}/row.js +0 -0
  203. /package/lumar/graphql/{reportTemplates.d.ts → server/reportTemplates.d.ts} +0 -0
  204. /package/lumar/graphql/{reportTemplates.js → server/reportTemplates.js} +0 -0
  205. /package/onePassword/{server.d.ts → server/index.d.ts} +0 -0
  206. /package/onePassword/{server.js → server/index.js} +0 -0
  207. /package/openAi/{server.d.ts → server/index.d.ts} +0 -0
  208. /package/snapchat/{server.d.ts → server/index.d.ts} +0 -0
  209. /package/stream/{server.d.ts → server/index.d.ts} +0 -0
  210. /package/stream/{server.js → server/index.js} +0 -0
  211. /package/stream/{sort.d.ts → server/sort.d.ts} +0 -0
  212. /package/stream/{sort.js → server/sort.js} +0 -0
  213. /package/swr/{index.js → client/index.js} +0 -0
  214. /package/upTimeRobot/{server.d.ts → server/index.d.ts} +0 -0
  215. /package/url/{server.d.ts → server/index.d.ts} +0 -0
  216. /package/url/{server.js → server/index.js} +0 -0
  217. /package/url/{writeUrlContents.d.ts → server/writeUrlContents.d.ts} +0 -0
  218. /package/util/{getBrotliCompressed.d.ts → server/getBrotliCompressed.d.ts} +0 -0
  219. /package/util/{getBrotliCompressed.js → server/getBrotliCompressed.js} +0 -0
  220. /package/util/{getBrotliDecompressed.d.ts → server/getBrotliDecompressed.d.ts} +0 -0
  221. /package/util/{getBrotliDecompressed.js → server/getBrotliDecompressed.js} +0 -0
  222. /package/util/{getGzipCompressed.d.ts → server/getGzipCompressed.d.ts} +0 -0
  223. /package/util/{getGzipCompressed.js → server/getGzipCompressed.js} +0 -0
  224. /package/util/{getGzipDecompressed.d.ts → server/getGzipDecompressed.d.ts} +0 -0
  225. /package/util/{getGzipDecompressed.js → server/getGzipDecompressed.js} +0 -0
  226. /package/util/{server.d.ts → server/index.d.ts} +0 -0
  227. /package/util/{server.js → server/index.js} +0 -0
  228. /package/xml/{getXml.d.ts → server/getXml.d.ts} +0 -0
@@ -0,0 +1,78 @@
1
+ import fs from 'fs';
2
+ import path from 'path';
3
+ import {fileURLToPath} from 'url';
4
+
5
+ const __filename = fileURLToPath(import.meta.url);
6
+ const __dirname = path.dirname(__filename);
7
+
8
+ const projectRoot = path.join(__dirname, '..');
9
+ const packageJsonPath = path.join(projectRoot, 'package.json');
10
+
11
+ // Read package.json
12
+ const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, 'utf8'));
13
+
14
+ // Directories to exclude from scanning
15
+ const excludeDirs = ['node_modules', 'scripts', 'jest', 'src', '.git', '.github', '.idea'];
16
+
17
+ // Build exports object
18
+ const exports = {
19
+ '.': {
20
+ types: './index.d.ts',
21
+ import: './index.js',
22
+ require: './index.js',
23
+ default: './index.js'
24
+ }
25
+ };
26
+
27
+ // Recursively find all directories with index.js files
28
+ function findIndexDirs(baseDir, relativePath = '')
29
+ {
30
+ const entries = fs.readdirSync(baseDir, {withFileTypes: true});
31
+
32
+ for(const entry of entries)
33
+ {
34
+ if(!entry.isDirectory() || excludeDirs.includes(entry.name) || entry.name.startsWith('.'))
35
+ {
36
+ continue;
37
+ }
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
44
+ if(fs.existsSync(indexJsPath))
45
+ {
46
+ const exportConfig = {
47
+ types: `./${newRelativePath}/index.d.ts`,
48
+ import: `./${newRelativePath}/index.js`,
49
+ require: `./${newRelativePath}/index.js`,
50
+ default: `./${newRelativePath}/index.js`
51
+ };
52
+
53
+ // Add both the directory path and explicit index.js path
54
+ exports[`./${newRelativePath}`] = exportConfig;
55
+ exports[`./${newRelativePath}/index.js`] = exportConfig;
56
+
57
+ // Also add .d.ts mapping for TypeScript
58
+ exports[`./${newRelativePath}/index.d.ts`] = {
59
+ types: `./${newRelativePath}/index.d.ts`,
60
+ default: `./${newRelativePath}/index.d.ts`
61
+ };
62
+ }
63
+
64
+ // Recursively scan subdirectories
65
+ findIndexDirs(fullPath, newRelativePath);
66
+ }
67
+ }
68
+
69
+ // Start scanning from project root
70
+ findIndexDirs(projectRoot);
71
+
72
+ // Update package.json with new exports
73
+ packageJson.exports = exports;
74
+
75
+ // Write back to package.json
76
+ fs.writeFileSync(packageJsonPath, JSON.stringify(packageJson, null, '\t') + '\n', 'utf8');
77
+
78
+ console.log(`Generated exports for ${Object.keys(exports).length} entries`);
@@ -23,6 +23,9 @@ jobs:
23
23
  - name: Build
24
24
  run: yarn build
25
25
 
26
+ - name: Generate exports field
27
+ run: node .github/generate-exports.js
28
+
26
29
  - name: Publish to npm
27
30
  run: npm publish --access public
28
31
  env:
Binary file
@@ -1,5 +1,5 @@
1
- import { InputDate } from "../date";
2
- import { JobSchemaType } from "./index";
1
+ import { InputDate } from "../../date";
2
+ import { JobSchemaType } from "../index";
3
3
  type AdverityJobsResponse = {
4
4
  count: number;
5
5
  next: string | null;
@@ -1,5 +1,5 @@
1
- import { getDate, getToday, getYesterday, getYmdString } from "../date";
2
- import { get } from "../axios";
1
+ import { getDate, 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.
@@ -1,10 +1,10 @@
1
- import { BaseNamespace } from "../../_class";
2
- import { AwsConfig } from "../server";
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<any>;
9
- stopInstances: (instanceIds: string[], hibernate?: boolean, force?: boolean, dryRun?: boolean) => Promise<any>;
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 "../../_class";
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 global.awsEc2Client.send(command);
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 global.awsEc2Client.send(command);
34
+ const response = await this.client.send(command);
35
35
  return response;
36
36
  };
37
37
  }
@@ -1,3 +1,3 @@
1
1
  import { AwsEc2Namespace } from "./AwsEc2Namespace";
2
- import { AwsConfig } from "../server";
2
+ import { AwsConfig } from "../../server";
3
3
  export declare const awsEc2Client: (key?: string, config?: AwsConfig, vaultId?: string, itemId?: string) => Promise<AwsEc2Namespace>;
@@ -1,5 +1,5 @@
1
1
  import { AwsEc2Namespace } from "./AwsEc2Namespace";
2
- import { getConfig } from "../server";
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 "../../_class";
2
- import { AwsConfig } from "../server";
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<boolean>;
51
+ runTask: (props: RunTaskProps) => Promise<any>;
52
52
  }
53
53
  export {};
@@ -1,5 +1,5 @@
1
- import { BaseNamespace } from "../../_class";
2
- import { isResponse200 } from "../server";
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 global.awsEcsClient.send(listTaskDefinitionsCommand);
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 global.awsEcsClient.send(listTasksCommand);
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 global.awsEcsClient.send(runtTaskCommand);
112
+ const apiResponse = await this.client.send(runtTaskCommand);
113
113
  if (isResponse200(apiResponse)) {
114
114
  response = apiResponse;
115
115
  }
@@ -1,3 +1,3 @@
1
1
  import { AwsEcsNamespace } from "./AwsEcsNamespace";
2
- import { AwsConfig } from "../server";
2
+ import { AwsConfig } from "../../server";
3
3
  export declare const awsEcsClient: (key?: string, config?: AwsConfig, vaultId?: string, itemId?: string) => Promise<AwsEcsNamespace>;
@@ -1,5 +1,5 @@
1
1
  import { AwsEcsNamespace } from "./AwsEcsNamespace";
2
- import { getConfig } from "../server";
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 "../../_class";
2
- import { AwsConfig } from "../server";
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 "../../_class";
2
- import { isResponse200 } from "../server";
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 "../server";
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 "../server";
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 "../../_class";
2
- import { AwsConfig } from "../server";
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 "../../_class";
2
- import { isResponse200 } from "../server";
3
- import { ApiResponseClass } from "../../api";
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 "../server";
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 "../server";
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 "../../_class";
2
- import { AwsConfig } from "../server";
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 "./server";
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 "../../_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 "./server";
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 "../../date";
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 "../server";
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 "../server";
3
- import { defaultDateTime } from "../../date";
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,4 +1,4 @@
1
- import { onePasswordClient } from "../onePassword/server";
1
+ import { onePasswordClient } from "../../onePassword/server";
2
2
  export const getConfig = async (key, config, vaultId, itemId) => {
3
3
  let response;
4
4
  if (config) {
@@ -1,4 +1,4 @@
1
- import { defaultTo } from "../util";
1
+ import { defaultTo } from "../../util";
2
2
  /**
3
3
  * Was the API response a 200?
4
4
  */
@@ -1,5 +1,5 @@
1
- import { BaseNamespace } from "../../_class";
2
- import { AwsConfig } from "../server";
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
- import { BaseNamespace } from "../../_class";
1
+ import { BaseNamespace } from "../../../_class";
2
2
  export class AwsSesNamespace extends BaseNamespace {
3
3
  ensureInit = async () => {
4
4
  if (!this.client) {
@@ -1,4 +1,4 @@
1
- import { BaseClass } from "../../_class";
1
+ import { BaseClass } from "../../../_class";
2
2
  type AttachmentSource = {
3
3
  filename: string;
4
4
  contentType?: string;
@@ -1,5 +1,5 @@
1
1
  import uniq from "lodash/uniq";
2
- import { BaseClass } from "../../_class";
2
+ import { BaseClass } from "../../../_class";
3
3
  /**
4
4
  * Class to build and send an AWS SES email.
5
5
  */
@@ -1,4 +1,4 @@
1
1
  import { AwsSesNamespace } from "./AwsSesNamespace";
2
- import { AwsConfig } from "../server";
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 "../server";
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 "../../_class";
2
- import { AwsConfig } from "../server";
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,4 +1,4 @@
1
- import { BaseNamespace } from "../../_class";
1
+ import { BaseNamespace } from "../../../_class";
2
2
  export class AwsSqsNamespace extends BaseNamespace {
3
3
  ensureInit = async () => {
4
4
  if (!this.client) {
@@ -1,3 +1,3 @@
1
1
  import { AwsSqsNamespace } from "./AwsSqsNamespace";
2
- import { AwsConfig } from "../server";
2
+ import { AwsConfig } from "../../server";
3
3
  export declare const awsSqsClient: (key?: string, config?: AwsConfig, vaultId?: string, itemId?: string) => Promise<AwsSqsNamespace>;
@@ -1,5 +1,5 @@
1
1
  import { AwsSqsNamespace } from "./AwsSqsNamespace";
2
- import { getConfig } from "../server";
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 "../../_class";
2
- import { AwsConfig } from "../server";
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,4 +1,4 @@
1
- import { BaseNamespace } from "../../_class";
1
+ import { BaseNamespace } from "../../../_class";
2
2
  export class AwsSsmNamespace extends BaseNamespace {
3
3
  parameters;
4
4
  constructor(key, config) {
@@ -1,3 +1,3 @@
1
1
  import { AwsSsmNamespace } from "./AwsSsmNamespace";
2
- import { AwsConfig } from "../server";
2
+ import { AwsConfig } from "../../server";
3
3
  export declare const awsSsmClient: (key?: string, config?: AwsConfig, vaultId?: string, itemId?: string) => Promise<AwsSsmNamespace>;
@@ -1,5 +1,5 @@
1
1
  import { AwsSsmNamespace } from "./AwsSsmNamespace";
2
- import { getConfig } from "../server";
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 "../server";
2
- import { BrightDataSerpApiType } from "./server";
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 "../../axios";
2
- import { getCustomerId, getZone } from "../server";
3
- import { BrightDataSerpApiType } from "./server";
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 "../server";
2
- import { ApiResponseClass } from "../../api";
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 "../../axios";
2
- import { getCustomerId, getZone } from "../server";
3
- import { ApiResponseClass } from "../../api";
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,4 +1,4 @@
1
- import { Auth } from "../server";
1
+ import { Auth } from "../../server";
2
2
  /**
3
3
  * Make a request to the SERP API using the Bright Data proxy
4
4
  */
@@ -1,4 +1,4 @@
1
- import { get } from "../../axios";
1
+ import { get } from "../../../axios";
2
2
  /**
3
3
  * Make a request to the SERP API using the Bright Data proxy
4
4
  */
@@ -1,4 +1,4 @@
1
- import { Auth } from "../server";
1
+ import { Auth } from "../../server";
2
2
  /**
3
3
  * Depends on the Scraper setup!
4
4
  *
@@ -1,4 +1,4 @@
1
- import { post } from "../../axios";
1
+ import { post } from "../../../axios";
2
2
  /**
3
3
  * Depends on the Scraper setup!
4
4
  *
@@ -1,4 +1,4 @@
1
- import { Auth } from "../server";
1
+ import { Auth } from "../../server";
2
2
  /**
3
3
  * Depends on the Scraper setup!
4
4
  *
@@ -1,6 +1,6 @@
1
- import { get, post } from "../../axios";
2
- import { ApiState } from "../../api";
3
- import { sleep } from "../../util";
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
  *
@@ -1,4 +1,4 @@
1
- import { getCache, setCache } from "../server";
1
+ import { getCache, setCache } from "../";
2
2
  test("cache", () => {
3
3
  const item1 = getCache("test");
4
4
  // console.log('item1', item1);
@@ -65,16 +65,15 @@ export const isProduction = () => Environment.PRODUCTION === getEnvironment();
65
65
  * Check to see if we are developing locally or on the hosted platform.
66
66
  */
67
67
  export const isLocalhost = () => {
68
- let response = false;
69
68
  if ("true" === process.env["IS_LOCAL"]) {
70
- response = true;
69
+ return true;
71
70
  }
72
- else if (isAws()) {
73
- response = "true" === process.env["AWS_SAM_LOCAL"];
71
+ if (isAws()) {
72
+ return "true" === process.env["AWS_SAM_LOCAL"];
74
73
  }
75
- else if (isVercel()) {
76
- // This value needs to only be included in Vercel but undefined in locally
77
- response = undefined === process.env["NEXT_PUBLIC_VERCEL_GIT_REPO_ID"];
74
+ // This value needs to only be included in Vercel but undefined in locally
75
+ if (isVercel()) {
76
+ return undefined === process.env["NEXT_PUBLIC_VERCEL_GIT_REPO_ID"];
78
77
  }
79
- return response;
78
+ return false;
80
79
  };
@@ -1,4 +1,4 @@
1
- import { ageGroups } from "./server";
1
+ import { ageGroups } from "../";
2
2
  /**
3
3
  * Map the Age Group and return the user-friendly string.
4
4
  */
@@ -1,4 +1,4 @@
1
- import { post } from "../axios";
1
+ import { post } from "../../axios";
2
2
  /**
3
3
  * Make the request to Eskimi API using the access token.
4
4
  */
@@ -1,4 +1,4 @@
1
- import { devices } from "./server";
1
+ import { devices } from "../";
2
2
  /**
3
3
  * Map the Devices and return the user-friendly string.
4
4
  */