@8ms/helpers 2.3.5 → 2.3.7

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 (599) hide show
  1. package/.github/workflows/deploy_npmjs.yml +0 -3
  2. package/.yarn/install-state.gz +0 -0
  3. package/dist/_class/index.d.mts +2 -0
  4. package/dist/_class/index.mjs +62 -0
  5. package/dist/adverity/index.d.mts +2 -0
  6. package/dist/adverity/index.mjs +64 -0
  7. package/{adverity/server/getJobs.d.ts → dist/adverity/server/index.d.mts} +11 -8
  8. package/dist/adverity/server/index.mjs +25 -0
  9. package/dist/api/index.d.mts +2 -0
  10. package/dist/api/index.mjs +3 -0
  11. package/dist/api-DGKJDAfb.mjs +139 -0
  12. package/dist/array/index.d.mts +11 -0
  13. package/dist/array/index.mjs +14 -0
  14. package/dist/atInternet/index.d.mts +20 -0
  15. package/dist/atInternet/index.mjs +18 -0
  16. package/dist/aws/ec2/server/index.d.mts +18 -0
  17. package/dist/aws/ec2/server/index.mjs +48 -0
  18. package/dist/aws/ecs/server/index.d.mts +59 -0
  19. package/dist/aws/ecs/server/index.mjs +113 -0
  20. package/dist/aws/glue/server/index.d.mts +19 -0
  21. package/dist/aws/glue/server/index.mjs +36 -0
  22. package/dist/aws/lambda/server/index.d.mts +28 -0
  23. package/dist/aws/lambda/server/index.mjs +57 -0
  24. package/dist/aws/s3/server/index.d.mts +124 -0
  25. package/dist/aws/s3/server/index.mjs +361 -0
  26. package/dist/aws/server/index.d.mts +2 -0
  27. package/dist/aws/server/index.mjs +3 -0
  28. package/dist/aws/ses/server/index.d.mts +105 -0
  29. package/dist/aws/ses/server/index.mjs +269 -0
  30. package/dist/aws/sqs/server/index.d.mts +41 -0
  31. package/dist/aws/sqs/server/index.mjs +56 -0
  32. package/dist/aws/ssm/server/index.d.mts +18 -0
  33. package/dist/aws/ssm/server/index.mjs +47 -0
  34. package/dist/axios/index.d.mts +22 -0
  35. package/dist/axios/index.mjs +50 -0
  36. package/dist/boolean/index.d.mts +7 -0
  37. package/dist/boolean/index.mjs +15 -0
  38. package/dist/brightData/serpApi/server/index.d.mts +93 -0
  39. package/dist/brightData/serpApi/server/index.mjs +229 -0
  40. package/dist/brightData/server/index.d.mts +2 -0
  41. package/dist/brightData/server/index.mjs +18 -0
  42. package/dist/brightData/webScraperIde/server/index.d.mts +19 -0
  43. package/dist/brightData/webScraperIde/server/index.mjs +50 -0
  44. package/dist/cache/server/index.d.mts +10 -0
  45. package/dist/cache/server/index.mjs +31 -0
  46. package/dist/chunk-CgI6uo-e.mjs +32 -0
  47. package/dist/crud/index.d.mts +10 -0
  48. package/dist/crud/index.mjs +10 -0
  49. package/dist/crypto/index.d.mts +28 -0
  50. package/dist/crypto/index.mjs +47 -0
  51. package/dist/date/index.d.mts +2 -0
  52. package/dist/date/index.mjs +471 -0
  53. package/dist/environment/index.d.mts +37 -0
  54. package/dist/environment/index.mjs +60 -0
  55. package/dist/eskimi/index.d.mts +52 -0
  56. package/dist/eskimi/index.mjs +90 -0
  57. package/dist/eskimi/server/index.d.mts +25 -0
  58. package/dist/eskimi/server/index.mjs +50 -0
  59. package/dist/file/index.d.mts +7 -0
  60. package/dist/file/index.mjs +20 -0
  61. package/dist/file/server/index.d.mts +8 -0
  62. package/dist/file/server/index.mjs +16 -0
  63. package/dist/from-9s4TjsYv.mjs +3878 -0
  64. package/dist/geo/index.d.mts +26 -0
  65. package/dist/geo/index.mjs +1591 -0
  66. package/dist/getDecimal-CafxtLhH.mjs +40 -0
  67. package/dist/googleAds/keywordPlanner/server/index.d.mts +45 -0
  68. package/dist/googleAds/keywordPlanner/server/index.mjs +51 -0
  69. package/dist/googleAds/server/index.d.mts +27 -0
  70. package/dist/googleAds/server/index.mjs +48 -0
  71. package/dist/googleCloud/bigquery/server/index.d.mts +82 -0
  72. package/dist/googleCloud/bigquery/server/index.mjs +127 -0
  73. package/dist/googleCloud/server/index.d.mts +2 -0
  74. package/dist/googleCloud/server/index.mjs +24 -0
  75. package/dist/googleCloud/sheets/server/index.d.mts +22 -0
  76. package/dist/googleCloud/sheets/server/index.mjs +31 -0
  77. package/dist/googleCloud/storage/server/index.d.mts +31 -0
  78. package/dist/googleCloud/storage/server/index.mjs +79 -0
  79. package/dist/googlePageSpeed/server/index.d.mts +34 -0
  80. package/dist/googlePageSpeed/server/index.mjs +53 -0
  81. package/dist/googleSearchIncidents/server/index.d.mts +73 -0
  82. package/dist/googleSearchIncidents/server/index.mjs +55 -0
  83. package/dist/greenDomain/server/index.d.mts +25 -0
  84. package/dist/greenDomain/server/index.mjs +31 -0
  85. package/dist/index-B20FTOvk.d.mts +67 -0
  86. package/dist/index-B4K9Z1U-.d.mts +17 -0
  87. package/dist/index-CFaAdPAh.d.mts +32 -0
  88. package/dist/index-CIG08fpw.d.mts +32 -0
  89. package/dist/index-CMfxuwL1.d.mts +246 -0
  90. package/dist/index-DEm1Wodf.d.mts +116 -0
  91. package/dist/index-sfVt7tI_.d.mts +18 -0
  92. package/dist/inngest/index.d.mts +10 -0
  93. package/dist/inngest/index.mjs +10 -0
  94. package/dist/json/index.d.mts +7 -0
  95. package/dist/json/index.mjs +27 -0
  96. package/dist/littleWarden/server/index.d.mts +56 -0
  97. package/dist/littleWarden/server/index.mjs +79 -0
  98. package/dist/lumar/api/server/index.d.mts +66 -0
  99. package/dist/lumar/api/server/index.mjs +111 -0
  100. package/dist/lumar/graphql/server/index.d.mts +308 -0
  101. package/dist/lumar/graphql/server/index.mjs +172 -0
  102. package/dist/multipart-parser-BC14QSvI.mjs +290 -0
  103. package/dist/myTarget/server/index.d.mts +9 -0
  104. package/dist/myTarget/server/index.mjs +16 -0
  105. package/dist/nextAuth/index.d.mts +12 -0
  106. package/dist/nextAuth/index.mjs +15 -0
  107. package/dist/nextJs/client/index.d.mts +10 -0
  108. package/dist/nextJs/client/index.mjs +12 -0
  109. package/dist/nextJs/index.d.mts +19 -0
  110. package/dist/nextJs/index.mjs +12 -0
  111. package/dist/number/index.d.mts +54 -0
  112. package/dist/number/index.mjs +75 -0
  113. package/{object/replaceKeys.d.ts → dist/object/index.d.mts} +4 -1
  114. package/dist/object/index.mjs +22 -0
  115. package/dist/onePassword/server/index.d.mts +24 -0
  116. package/dist/onePassword/server/index.mjs +50 -0
  117. package/dist/openAi/server/index.d.mts +20 -0
  118. package/dist/openAi/server/index.mjs +46 -0
  119. package/dist/prisma/index.d.mts +7 -0
  120. package/dist/prisma/index.mjs +16 -0
  121. package/dist/prisma/server/index.d.mts +31 -0
  122. package/dist/prisma/server/index.mjs +72 -0
  123. package/dist/server-Bwy4JI8Z.mjs +33 -0
  124. package/dist/snapchat/server/index.d.mts +25 -0
  125. package/dist/snapchat/server/index.mjs +39 -0
  126. package/dist/sorting/index.d.mts +25 -0
  127. package/dist/sorting/index.mjs +50 -0
  128. package/dist/src-BeXFXTgz.mjs +1272 -0
  129. package/dist/stream/server/index.d.mts +15 -0
  130. package/dist/stream/server/index.mjs +48 -0
  131. package/dist/string/index.d.mts +107 -0
  132. package/dist/string/index.mjs +191 -0
  133. package/dist/swr/client/index.d.mts +46 -0
  134. package/dist/swr/client/index.mjs +40 -0
  135. package/dist/upTimeRobot/server/index.d.mts +72 -0
  136. package/dist/upTimeRobot/server/index.mjs +83 -0
  137. package/dist/url/index.d.mts +29 -0
  138. package/dist/url/index.mjs +52 -0
  139. package/dist/url/server/index.d.mts +9 -0
  140. package/dist/url/server/index.mjs +35 -0
  141. package/dist/util/index.d.mts +47 -0
  142. package/dist/util/index.mjs +99 -0
  143. package/dist/util/server/index.d.mts +27 -0
  144. package/dist/util/server/index.mjs +61 -0
  145. package/dist/webWorker/index.d.mts +11 -0
  146. package/dist/webWorker/index.mjs +11 -0
  147. package/dist/xml/server/index.d.mts +4 -0
  148. package/dist/xml/server/index.mjs +17 -0
  149. package/package.json +71 -1066
  150. package/tsdown.config.ts +10 -0
  151. package/.github/generate-exports.js +0 -111
  152. package/_class/BaseClass.d.ts +0 -18
  153. package/_class/BaseClass.js +0 -44
  154. package/_class/BaseNamespace.d.ts +0 -9
  155. package/_class/BaseNamespace.js +0 -24
  156. package/_class/index.d.ts +0 -2
  157. package/_class/index.js +0 -2
  158. package/adverity/adverity.d.ts +0 -112
  159. package/adverity/adverity.js +0 -58
  160. package/adverity/index.d.ts +0 -1
  161. package/adverity/index.js +0 -1
  162. package/adverity/server/getJobs.js +0 -26
  163. package/adverity/server/index.d.ts +0 -1
  164. package/adverity/server/index.js +0 -1
  165. package/api/ApiResponseClass.d.ts +0 -35
  166. package/api/ApiResponseClass.js +0 -93
  167. package/api/api.d.ts +0 -17
  168. package/api/api.js +0 -15
  169. package/api/functions.d.ts +0 -7
  170. package/api/functions.js +0 -19
  171. package/api/index.d.ts +0 -3
  172. package/api/index.js +0 -3
  173. package/array/array.d.ts +0 -8
  174. package/array/array.js +0 -9
  175. package/array/index.d.ts +0 -1
  176. package/array/index.js +0 -1
  177. package/atInternet/atInternet.d.ts +0 -16
  178. package/atInternet/atInternet.js +0 -15
  179. package/atInternet/index.d.ts +0 -1
  180. package/atInternet/index.js +0 -1
  181. package/aws/ec2/server/AwsEc2Namespace.d.ts +0 -10
  182. package/aws/ec2/server/AwsEc2Namespace.js +0 -37
  183. package/aws/ec2/server/awsEc2.d.ts +0 -3
  184. package/aws/ec2/server/awsEc2.js +0 -12
  185. package/aws/ec2/server/index.d.ts +0 -2
  186. package/aws/ec2/server/index.js +0 -2
  187. package/aws/ecs/server/AwsEcsNamespace.d.ts +0 -53
  188. package/aws/ecs/server/AwsEcsNamespace.js +0 -118
  189. package/aws/ecs/server/awsEcs.d.ts +0 -3
  190. package/aws/ecs/server/awsEcs.js +0 -12
  191. package/aws/ecs/server/index.d.ts +0 -2
  192. package/aws/ecs/server/index.js +0 -2
  193. package/aws/glue/server/AwsGlueNamespace.d.ts +0 -12
  194. package/aws/glue/server/AwsGlueNamespace.js +0 -29
  195. package/aws/glue/server/awsGlue.d.ts +0 -3
  196. package/aws/glue/server/awsGlue.js +0 -12
  197. package/aws/glue/server/index.d.ts +0 -2
  198. package/aws/glue/server/index.js +0 -2
  199. package/aws/lambda/server/AwsLambdaNamespace.d.ts +0 -21
  200. package/aws/lambda/server/AwsLambdaNamespace.js +0 -69
  201. package/aws/lambda/server/awsLambda.d.ts +0 -4
  202. package/aws/lambda/server/awsLambda.js +0 -16
  203. package/aws/lambda/server/index.d.ts +0 -2
  204. package/aws/lambda/server/index.js +0 -2
  205. package/aws/s3/server/AwsS3Namespace.d.ts +0 -65
  206. package/aws/s3/server/AwsS3Namespace.js +0 -364
  207. package/aws/s3/server/awsS3.d.ts +0 -13
  208. package/aws/s3/server/awsS3.js +0 -20
  209. package/aws/s3/server/index.d.ts +0 -3
  210. package/aws/s3/server/index.js +0 -3
  211. package/aws/s3/server/payload.d.ts +0 -42
  212. package/aws/s3/server/payload.js +0 -43
  213. package/aws/server/aws.d.ts +0 -9
  214. package/aws/server/aws.js +0 -29
  215. package/aws/server/index.d.ts +0 -2
  216. package/aws/server/index.js +0 -2
  217. package/aws/server/isResponse200.d.ts +0 -4
  218. package/aws/server/isResponse200.js +0 -12
  219. package/aws/ses/server/AwsSesNamespace.d.ts +0 -9
  220. package/aws/ses/server/AwsSesNamespace.js +0 -41
  221. package/aws/ses/server/SimpleEmail.d.ts +0 -81
  222. package/aws/ses/server/SimpleEmail.js +0 -296
  223. package/aws/ses/server/awsSes.d.ts +0 -4
  224. package/aws/ses/server/awsSes.js +0 -13
  225. package/aws/ses/server/index.d.ts +0 -3
  226. package/aws/ses/server/index.js +0 -3
  227. package/aws/sqs/server/AwsSqsNamespace.d.ts +0 -34
  228. package/aws/sqs/server/AwsSqsNamespace.js +0 -55
  229. package/aws/sqs/server/awsSqs.d.ts +0 -3
  230. package/aws/sqs/server/awsSqs.js +0 -12
  231. package/aws/sqs/server/index.d.ts +0 -2
  232. package/aws/sqs/server/index.js +0 -2
  233. package/aws/ssm/server/AwsSsmNamespace.d.ts +0 -11
  234. package/aws/ssm/server/AwsSsmNamespace.js +0 -52
  235. package/aws/ssm/server/awsSsm.d.ts +0 -3
  236. package/aws/ssm/server/awsSsm.js +0 -12
  237. package/aws/ssm/server/index.d.ts +0 -2
  238. package/aws/ssm/server/index.js +0 -2
  239. package/axios/deleteRequest.d.ts +0 -6
  240. package/axios/deleteRequest.js +0 -26
  241. package/axios/get.d.ts +0 -5
  242. package/axios/get.js +0 -24
  243. package/axios/index.d.ts +0 -3
  244. package/axios/index.js +0 -3
  245. package/axios/post.d.ts +0 -5
  246. package/axios/post.js +0 -25
  247. package/boolean/boolean.d.ts +0 -4
  248. package/boolean/boolean.js +0 -16
  249. package/boolean/index.d.ts +0 -1
  250. package/boolean/index.js +0 -1
  251. package/brightData/serpApi/server/brightDataSerpApi.d.ts +0 -10
  252. package/brightData/serpApi/server/brightDataSerpApi.js +0 -9
  253. package/brightData/serpApi/server/buildGoogleSerpUrl.d.ts +0 -32
  254. package/brightData/serpApi/server/buildGoogleSerpUrl.js +0 -112
  255. package/brightData/serpApi/server/buildGoogleTrendsUrl.d.ts +0 -22
  256. package/brightData/serpApi/server/buildGoogleTrendsUrl.js +0 -57
  257. package/brightData/serpApi/server/getAsyncRequestId.d.ts +0 -8
  258. package/brightData/serpApi/server/getAsyncRequestId.js +0 -32
  259. package/brightData/serpApi/server/getAsyncResults.d.ts +0 -7
  260. package/brightData/serpApi/server/getAsyncResults.js +0 -31
  261. package/brightData/serpApi/server/getRealtime.d.ts +0 -5
  262. package/brightData/serpApi/server/getRealtime.js +0 -26
  263. package/brightData/serpApi/server/index.d.ts +0 -6
  264. package/brightData/serpApi/server/index.js +0 -6
  265. package/brightData/server/brightData.d.ts +0 -15
  266. package/brightData/server/brightData.js +0 -15
  267. package/brightData/server/index.d.ts +0 -1
  268. package/brightData/server/index.js +0 -1
  269. package/brightData/webScraperIde/server/getBatch.d.ts +0 -7
  270. package/brightData/webScraperIde/server/getBatch.js +0 -24
  271. package/brightData/webScraperIde/server/getRealtime.d.ts +0 -7
  272. package/brightData/webScraperIde/server/getRealtime.js +0 -45
  273. package/brightData/webScraperIde/server/index.d.ts +0 -2
  274. package/brightData/webScraperIde/server/index.js +0 -2
  275. package/cache/server/cache.d.ts +0 -7
  276. package/cache/server/cache.js +0 -43
  277. package/cache/server/index.d.ts +0 -1
  278. package/cache/server/index.js +0 -1
  279. package/cache/server/test/cache.test.d.ts +0 -1
  280. package/cache/server/test/cache.test.js +0 -8
  281. package/crud/crud.d.ts +0 -7
  282. package/crud/crud.js +0 -6
  283. package/crud/index.d.ts +0 -1
  284. package/crud/index.js +0 -1
  285. package/crypto/getDecrypt.d.ts +0 -5
  286. package/crypto/getDecrypt.js +0 -10
  287. package/crypto/getEncrypt.d.ts +0 -5
  288. package/crypto/getEncrypt.js +0 -10
  289. package/crypto/getRandom.d.ts +0 -4
  290. package/crypto/getRandom.js +0 -8
  291. package/crypto/getSha256.d.ts +0 -5
  292. package/crypto/getSha256.js +0 -11
  293. package/crypto/index.d.ts +0 -4
  294. package/crypto/index.js +0 -4
  295. package/date/calculation.d.ts +0 -102
  296. package/date/calculation.js +0 -272
  297. package/date/date.d.ts +0 -36
  298. package/date/date.js +0 -20
  299. package/date/financialYear.d.ts +0 -19
  300. package/date/financialYear.js +0 -78
  301. package/date/format.d.ts +0 -85
  302. package/date/format.js +0 -160
  303. package/date/index.d.ts +0 -4
  304. package/date/index.js +0 -4
  305. package/environment/environment.d.ts +0 -34
  306. package/environment/environment.js +0 -79
  307. package/environment/index.d.ts +0 -1
  308. package/environment/index.js +0 -1
  309. package/eskimi/eskimi.d.ts +0 -49
  310. package/eskimi/eskimi.js +0 -93
  311. package/eskimi/index.d.ts +0 -1
  312. package/eskimi/index.js +0 -1
  313. package/eskimi/server/getAgeGroup.d.ts +0 -4
  314. package/eskimi/server/getAgeGroup.js +0 -11
  315. package/eskimi/server/getData.d.ts +0 -4
  316. package/eskimi/server/getData.js +0 -13
  317. package/eskimi/server/getDevice.d.ts +0 -4
  318. package/eskimi/server/getDevice.js +0 -11
  319. package/eskimi/server/getGender.d.ts +0 -4
  320. package/eskimi/server/getGender.js +0 -11
  321. package/eskimi/server/index.d.ts +0 -4
  322. package/eskimi/server/index.js +0 -4
  323. package/file/getFileKey.d.ts +0 -4
  324. package/file/getFileKey.js +0 -23
  325. package/file/index.d.ts +0 -1
  326. package/file/index.js +0 -1
  327. package/file/server/createDirectory.d.ts +0 -5
  328. package/file/server/createDirectory.js +0 -13
  329. package/file/server/index.d.ts +0 -1
  330. package/file/server/index.js +0 -1
  331. package/geo/countries.d.ts +0 -12
  332. package/geo/countries.js +0 -219
  333. package/geo/index.d.ts +0 -2
  334. package/geo/index.js +0 -2
  335. package/geo/languages.d.ts +0 -9
  336. package/geo/languages.js +0 -55
  337. package/googleAds/keywordPlanner/server/googleAdsKeywordPlanner.d.ts +0 -41
  338. package/googleAds/keywordPlanner/server/googleAdsKeywordPlanner.js +0 -55
  339. package/googleAds/keywordPlanner/server/index.d.ts +0 -1
  340. package/googleAds/keywordPlanner/server/index.js +0 -1
  341. package/googleAds/server/GoogleAdsNamespace.d.ts +0 -11
  342. package/googleAds/server/GoogleAdsNamespace.js +0 -30
  343. package/googleAds/server/googleAds.d.ts +0 -11
  344. package/googleAds/server/googleAds.js +0 -26
  345. package/googleAds/server/index.d.ts +0 -2
  346. package/googleAds/server/index.js +0 -2
  347. package/googleCloud/bigquery/server/GoogleCloudBigqueryNamespace.d.ts +0 -50
  348. package/googleCloud/bigquery/server/GoogleCloudBigqueryNamespace.js +0 -115
  349. package/googleCloud/bigquery/server/googleCloudBigquery.d.ts +0 -5
  350. package/googleCloud/bigquery/server/googleCloudBigquery.js +0 -41
  351. package/googleCloud/bigquery/server/index.d.ts +0 -3
  352. package/googleCloud/bigquery/server/index.js +0 -3
  353. package/googleCloud/bigquery/server/loadData.d.ts +0 -19
  354. package/googleCloud/bigquery/server/loadData.js +0 -14
  355. package/googleCloud/server/googleCloud.d.ts +0 -29
  356. package/googleCloud/server/googleCloud.js +0 -25
  357. package/googleCloud/server/index.d.ts +0 -1
  358. package/googleCloud/server/index.js +0 -1
  359. package/googleCloud/sheets/server/GoogleCloudSheetsNamespace.d.ts +0 -18
  360. package/googleCloud/sheets/server/GoogleCloudSheetsNamespace.js +0 -37
  361. package/googleCloud/sheets/server/getAssociatedData.d.ts +0 -10
  362. package/googleCloud/sheets/server/getAssociatedData.js +0 -39
  363. package/googleCloud/sheets/server/index.d.ts +0 -1
  364. package/googleCloud/sheets/server/index.js +0 -1
  365. package/googleCloud/storage/server/GoogleCloudStorageNamespace.d.ts +0 -22
  366. package/googleCloud/storage/server/GoogleCloudStorageNamespace.js +0 -66
  367. package/googleCloud/storage/server/googleCloudStorage.d.ts +0 -3
  368. package/googleCloud/storage/server/googleCloudStorage.js +0 -37
  369. package/googleCloud/storage/server/index.d.ts +0 -2
  370. package/googleCloud/storage/server/index.js +0 -2
  371. package/googlePageSpeed/server/GooglePageSpeedNamespace.d.ts +0 -11
  372. package/googlePageSpeed/server/GooglePageSpeedNamespace.js +0 -27
  373. package/googlePageSpeed/server/googlePageSpeed.d.ts +0 -19
  374. package/googlePageSpeed/server/googlePageSpeed.js +0 -38
  375. package/googlePageSpeed/server/index.d.ts +0 -2
  376. package/googlePageSpeed/server/index.js +0 -2
  377. package/googleSearchIncidents/server/googleSearchIncidents.d.ts +0 -69
  378. package/googleSearchIncidents/server/googleSearchIncidents.js +0 -42
  379. package/googleSearchIncidents/server/index.d.ts +0 -1
  380. package/googleSearchIncidents/server/index.js +0 -1
  381. package/greenDomain/server/greenDomain.d.ts +0 -21
  382. package/greenDomain/server/greenDomain.js +0 -37
  383. package/greenDomain/server/index.d.ts +0 -1
  384. package/greenDomain/server/index.js +0 -1
  385. package/inngest/index.d.ts +0 -1
  386. package/inngest/index.js +0 -1
  387. package/inngest/inngest.d.ts +0 -7
  388. package/inngest/inngest.js +0 -6
  389. package/json/getJsonNewline.d.ts +0 -1
  390. package/json/getJsonNewline.js +0 -9
  391. package/json/index.d.ts +0 -2
  392. package/json/index.js +0 -2
  393. package/json/isJson.d.ts +0 -1
  394. package/json/isJson.js +0 -22
  395. package/littleWarden/server/LittleWardenNamespace.d.ts +0 -11
  396. package/littleWarden/server/LittleWardenNamespace.js +0 -30
  397. package/littleWarden/server/getUrlStatus.d.ts +0 -4
  398. package/littleWarden/server/getUrlStatus.js +0 -12
  399. package/littleWarden/server/index.d.ts +0 -2
  400. package/littleWarden/server/index.js +0 -2
  401. package/littleWarden/server/littleWarden.d.ts +0 -30
  402. package/littleWarden/server/littleWarden.js +0 -65
  403. package/lumar/api/server/buildRequest.d.ts +0 -13
  404. package/lumar/api/server/buildRequest.js +0 -76
  405. package/lumar/api/server/getData.d.ts +0 -1
  406. package/lumar/api/server/getData.js +0 -9
  407. package/lumar/api/server/index.d.ts +0 -4
  408. package/lumar/api/server/index.js +0 -4
  409. package/lumar/api/server/initClient.d.ts +0 -6
  410. package/lumar/api/server/initClient.js +0 -22
  411. package/lumar/api/server/lumarApi.d.ts +0 -36
  412. package/lumar/api/server/lumarApi.js +0 -24
  413. package/lumar/graphql/server/columns.d.ts +0 -29
  414. package/lumar/graphql/server/columns.js +0 -28
  415. package/lumar/graphql/server/getData.d.ts +0 -1
  416. package/lumar/graphql/server/getData.js +0 -15
  417. package/lumar/graphql/server/index.d.ts +0 -11
  418. package/lumar/graphql/server/index.js +0 -11
  419. package/lumar/graphql/server/initClient.d.ts +0 -5
  420. package/lumar/graphql/server/initClient.js +0 -21
  421. package/lumar/graphql/server/lumarGraphql.d.ts +0 -27
  422. package/lumar/graphql/server/lumarGraphql.js +0 -27
  423. package/lumar/graphql/server/queries/crawl.d.ts +0 -5
  424. package/lumar/graphql/server/queries/crawl.js +0 -1
  425. package/lumar/graphql/server/queries/getCrawls.d.ts +0 -18
  426. package/lumar/graphql/server/queries/getCrawls.js +0 -31
  427. package/lumar/graphql/server/queries/getReportDifferences.d.ts +0 -24
  428. package/lumar/graphql/server/queries/getReportDifferences.js +0 -35
  429. package/lumar/graphql/server/queries/getRows.d.ts +0 -38
  430. package/lumar/graphql/server/queries/getRows.js +0 -55
  431. package/lumar/graphql/server/queries/getTotals.d.ts +0 -25
  432. package/lumar/graphql/server/queries/getTotals.js +0 -38
  433. package/lumar/graphql/server/queries/row.d.ts +0 -157
  434. package/lumar/graphql/server/queries/row.js +0 -1
  435. package/lumar/graphql/server/reportTemplates.d.ts +0 -68
  436. package/lumar/graphql/server/reportTemplates.js +0 -67
  437. package/myTarget/server/index.d.ts +0 -1
  438. package/myTarget/server/index.js +0 -1
  439. package/myTarget/server/myTarget.d.ts +0 -5
  440. package/myTarget/server/myTarget.js +0 -13
  441. package/nextAuth/index.d.ts +0 -2
  442. package/nextAuth/index.js +0 -2
  443. package/nextAuth/isSessionReady.d.ts +0 -1
  444. package/nextAuth/isSessionReady.js +0 -3
  445. package/nextAuth/nextAuth.d.ts +0 -7
  446. package/nextAuth/nextAuth.js +0 -6
  447. package/nextJs/client/LazyLoad.d.ts +0 -8
  448. package/nextJs/client/LazyLoad.js +0 -7
  449. package/nextJs/client/index.d.ts +0 -1
  450. package/nextJs/client/index.js +0 -1
  451. package/nextJs/index.d.ts +0 -1
  452. package/nextJs/index.js +0 -1
  453. package/nextJs/nextJs.d.ts +0 -12
  454. package/nextJs/nextJs.js +0 -8
  455. package/number/format.d.ts +0 -12
  456. package/number/format.js +0 -16
  457. package/number/formatCurrency.d.ts +0 -5
  458. package/number/formatCurrency.js +0 -17
  459. package/number/getDecimal.d.ts +0 -4
  460. package/number/getDecimal.js +0 -8
  461. package/number/getNumber.d.ts +0 -4
  462. package/number/getNumber.js +0 -44
  463. package/number/getPercent.d.ts +0 -1
  464. package/number/getPercent.js +0 -11
  465. package/number/getPercentIncrease.d.ts +0 -4
  466. package/number/getPercentIncrease.js +0 -12
  467. package/number/getSafeDivide.d.ts +0 -11
  468. package/number/getSafeDivide.js +0 -16
  469. package/number/index.d.ts +0 -7
  470. package/number/index.js +0 -7
  471. package/object/index.d.ts +0 -1
  472. package/object/index.js +0 -1
  473. package/object/replaceKeys.js +0 -21
  474. package/onePassword/server/OnePasswordNamespace.d.ts +0 -12
  475. package/onePassword/server/OnePasswordNamespace.js +0 -39
  476. package/onePassword/server/index.d.ts +0 -2
  477. package/onePassword/server/index.js +0 -2
  478. package/onePassword/server/onePassword.d.ts +0 -8
  479. package/onePassword/server/onePassword.js +0 -21
  480. package/openAi/server/OpenAiNamespace.d.ts +0 -11
  481. package/openAi/server/OpenAiNamespace.js +0 -35
  482. package/openAi/server/index.d.ts +0 -2
  483. package/openAi/server/index.js +0 -2
  484. package/openAi/server/openAi.d.ts +0 -6
  485. package/openAi/server/openAi.js +0 -26
  486. package/prisma/getDecimal.d.ts +0 -4
  487. package/prisma/getDecimal.js +0 -16
  488. package/prisma/index.d.ts +0 -1
  489. package/prisma/index.js +0 -1
  490. package/prisma/server/PrismaNamespace.d.ts +0 -7
  491. package/prisma/server/PrismaNamespace.js +0 -62
  492. package/prisma/server/index.d.ts +0 -2
  493. package/prisma/server/index.js +0 -2
  494. package/prisma/server/prisma.d.ts +0 -20
  495. package/prisma/server/prisma.js +0 -26
  496. package/snapchat/server/SnapchatNamespace.d.ts +0 -15
  497. package/snapchat/server/SnapchatNamespace.js +0 -22
  498. package/snapchat/server/index.d.ts +0 -2
  499. package/snapchat/server/index.js +0 -2
  500. package/snapchat/server/snapchat.d.ts +0 -7
  501. package/snapchat/server/snapchat.js +0 -26
  502. package/sorting/byNumberAscending.d.ts +0 -4
  503. package/sorting/byNumberAscending.js +0 -15
  504. package/sorting/byNumberDescending.d.ts +0 -4
  505. package/sorting/byNumberDescending.js +0 -18
  506. package/sorting/byStringAscending.d.ts +0 -4
  507. package/sorting/byStringAscending.js +0 -12
  508. package/sorting/byStringDescending.d.ts +0 -4
  509. package/sorting/byStringDescending.js +0 -12
  510. package/sorting/index.d.ts +0 -1
  511. package/sorting/index.js +0 -1
  512. package/sorting/sorting.d.ts +0 -4
  513. package/sorting/sorting.js +0 -4
  514. package/stream/server/index.d.ts +0 -1
  515. package/stream/server/index.js +0 -1
  516. package/stream/server/sort.d.ts +0 -13
  517. package/stream/server/sort.js +0 -47
  518. package/string/getCapitalised.d.ts +0 -5
  519. package/string/getCapitalised.js +0 -21
  520. package/string/getClean.d.ts +0 -18
  521. package/string/getClean.js +0 -47
  522. package/string/getFolder.d.ts +0 -4
  523. package/string/getFolder.js +0 -8
  524. package/string/getProperCase.d.ts +0 -11
  525. package/string/getProperCase.js +0 -43
  526. package/string/getString.d.ts +0 -4
  527. package/string/getString.js +0 -27
  528. package/string/getStringFromStream.d.ts +0 -5
  529. package/string/getStringFromStream.js +0 -13
  530. package/string/getUnescaped.d.ts +0 -6
  531. package/string/getUnescaped.js +0 -19
  532. package/string/getWithoutAccents.d.ts +0 -5
  533. package/string/getWithoutAccents.js +0 -9
  534. package/string/getWithoutHtmlTags.d.ts +0 -5
  535. package/string/getWithoutHtmlTags.js +0 -8
  536. package/string/getWithoutPunctuation.d.ts +0 -5
  537. package/string/getWithoutPunctuation.js +0 -9
  538. package/string/getWithoutUnderscores.d.ts +0 -4
  539. package/string/getWithoutUnderscores.js +0 -7
  540. package/string/getWithoutWhitespaces.d.ts +0 -5
  541. package/string/getWithoutWhitespaces.js +0 -9
  542. package/string/index.d.ts +0 -13
  543. package/string/index.js +0 -13
  544. package/string/reservedWords.d.ts +0 -5
  545. package/string/reservedWords.js +0 -22
  546. package/swr/client/index.d.ts +0 -1
  547. package/swr/client/index.js +0 -1
  548. package/swr/client/swr.d.ts +0 -42
  549. package/swr/client/swr.js +0 -50
  550. package/upTimeRobot/server/UpTimeRobotNamespace.d.ts +0 -31
  551. package/upTimeRobot/server/UpTimeRobotNamespace.js +0 -40
  552. package/upTimeRobot/server/index.d.ts +0 -2
  553. package/upTimeRobot/server/index.js +0 -2
  554. package/upTimeRobot/server/upTimeRobot.d.ts +0 -38
  555. package/upTimeRobot/server/upTimeRobot.js +0 -59
  556. package/url/index.d.ts +0 -1
  557. package/url/index.js +0 -1
  558. package/url/server/index.d.ts +0 -1
  559. package/url/server/index.js +0 -1
  560. package/url/server/writeUrlContents.d.ts +0 -6
  561. package/url/server/writeUrlContents.js +0 -35
  562. package/url/url.d.ts +0 -26
  563. package/url/url.js +0 -59
  564. package/util/defaultTo.d.ts +0 -4
  565. package/util/defaultTo.js +0 -37
  566. package/util/getClean.d.ts +0 -11
  567. package/util/getClean.js +0 -19
  568. package/util/getError.d.ts +0 -1
  569. package/util/getError.js +0 -10
  570. package/util/getWithoutHash.d.ts +0 -4
  571. package/util/getWithoutHash.js +0 -14
  572. package/util/getWithoutParameter.d.ts +0 -4
  573. package/util/getWithoutParameter.js +0 -14
  574. package/util/index.d.ts +0 -7
  575. package/util/index.js +0 -7
  576. package/util/isUndefined.d.ts +0 -4
  577. package/util/isUndefined.js +0 -9
  578. package/util/promiseChunks.d.ts +0 -5
  579. package/util/promiseChunks.js +0 -21
  580. package/util/server/getBrotliCompressed.d.ts +0 -5
  581. package/util/server/getBrotliCompressed.js +0 -16
  582. package/util/server/getBrotliDecompressed.d.ts +0 -5
  583. package/util/server/getBrotliDecompressed.js +0 -17
  584. package/util/server/getGzipCompressed.d.ts +0 -5
  585. package/util/server/getGzipCompressed.js +0 -16
  586. package/util/server/getGzipDecompressed.d.ts +0 -5
  587. package/util/server/getGzipDecompressed.js +0 -17
  588. package/util/server/index.d.ts +0 -4
  589. package/util/server/index.js +0 -4
  590. package/util/sleep.d.ts +0 -1
  591. package/util/sleep.js +0 -3
  592. package/webWorker/index.d.ts +0 -1
  593. package/webWorker/index.js +0 -1
  594. package/webWorker/webWorker.d.ts +0 -8
  595. package/webWorker/webWorker.js +0 -7
  596. package/xml/server/getXml.d.ts +0 -1
  597. package/xml/server/getXml.js +0 -14
  598. package/xml/server/index.d.ts +0 -1
  599. package/xml/server/index.js +0 -1
@@ -1,5 +0,0 @@
1
- /**
2
- * Converts a stream into a string.
3
- * https://stackoverflow.com/a/49428486
4
- */
5
- export declare const getStringFromStream: (stream: any) => Promise<string>;
@@ -1,13 +0,0 @@
1
- /**
2
- * Converts a stream into a string.
3
- * https://stackoverflow.com/a/49428486
4
- */
5
- export const getStringFromStream = (stream) => {
6
- const chunks = [];
7
- return new Promise((resolve, reject) => {
8
- stream.on("data", (chunk) => chunks.push(Buffer.from(chunk)));
9
- stream.on("error", (err) => reject(err));
10
- stream.on("end", () => resolve(Buffer.concat(chunks)
11
- .toString("utf8")));
12
- });
13
- };
@@ -1,6 +0,0 @@
1
- /**
2
- * Convert escaped copy into unescaped.
3
- * E.g. there&#39;s => there's
4
- * https://stackoverflow.com/a/42182294/2664955
5
- */
6
- export declare const getUnescaped: (input: string) => string;
@@ -1,19 +0,0 @@
1
- import _unescape from "lodash/unescape";
2
- /**
3
- * Convert escaped copy into unescaped.
4
- * E.g. there&#39;s => there's
5
- * https://stackoverflow.com/a/42182294/2664955
6
- */
7
- export const getUnescaped = (input) => {
8
- let response = input;
9
- // Only works if DOM exists
10
- if ("undefined" !== typeof document) {
11
- let el = document.createElement("textarea");
12
- el.innerHTML = response;
13
- response = el.value;
14
- }
15
- else {
16
- response = _unescape(response);
17
- }
18
- return response;
19
- };
@@ -1,5 +0,0 @@
1
- /**
2
- * Remove the accents from a string.
3
- * https://stackoverflow.com/a/37511463
4
- */
5
- export declare const getWithoutAccents: (input: string) => string;
@@ -1,9 +0,0 @@
1
- /**
2
- * Remove the accents from a string.
3
- * https://stackoverflow.com/a/37511463
4
- */
5
- export const getWithoutAccents = (input) => {
6
- return input
7
- .normalize("NFD")
8
- .replace(/[\u0300-\u036f]/g, "");
9
- };
@@ -1,5 +0,0 @@
1
- /**
2
- * Removes all HTML tags from an input.
3
- * https://css-tricks.com/snippets/javascript/strip-html-tags-in-javascript/
4
- */
5
- export declare const getWithoutHtmlTags: (input: string) => string;
@@ -1,8 +0,0 @@
1
- /**
2
- * Removes all HTML tags from an input.
3
- * https://css-tricks.com/snippets/javascript/strip-html-tags-in-javascript/
4
- */
5
- export const getWithoutHtmlTags = (input) => {
6
- return input
7
- .replace(/(<([^>]+)>)/gi, "");
8
- };
@@ -1,5 +0,0 @@
1
- /**
2
- * Remove all punctuation from a string and replace with a space.
3
- * https://stackoverflow.com/a/25575009
4
- */
5
- export declare const getWithoutPunctuation: (input: string) => string;
@@ -1,9 +0,0 @@
1
- /**
2
- * Remove all punctuation from a string and replace with a space.
3
- * https://stackoverflow.com/a/25575009
4
- */
5
- export const getWithoutPunctuation = (input) => {
6
- return input
7
- .replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,\-.\/:;<=>?@\[\]^_`{|}~]/g, "")
8
- .replace(/\s+/g, " ");
9
- };
@@ -1,4 +0,0 @@
1
- /**
2
- * Replace all underscores with a space.
3
- */
4
- export declare const getWithoutUnderscores: (input: string) => string;
@@ -1,7 +0,0 @@
1
- /**
2
- * Replace all underscores with a space.
3
- */
4
- export const getWithoutUnderscores = (input) => {
5
- return input
6
- .replace("_", " ");
7
- };
@@ -1,5 +0,0 @@
1
- /**
2
- * Remove all new lines, tabs multiple spaces, with a single space.
3
- * https://stackoverflow.com/a/45029224
4
- */
5
- export declare const getWithoutWhitespaces: (input: string) => string;
@@ -1,9 +0,0 @@
1
- /**
2
- * Remove all new lines, tabs multiple spaces, with a single space.
3
- * https://stackoverflow.com/a/45029224
4
- */
5
- export const getWithoutWhitespaces = (input) => {
6
- return input
7
- .replace(/\s+/g, " ")
8
- .trim();
9
- };
package/string/index.d.ts DELETED
@@ -1,13 +0,0 @@
1
- export * from "./getCapitalised";
2
- export * from "./getClean";
3
- export * from "./getFolder";
4
- export * from "./getProperCase";
5
- export * from "./getString";
6
- export * from "./getStringFromStream";
7
- export * from "./getUnescaped";
8
- export * from "./getWithoutAccents";
9
- export * from "./getWithoutHtmlTags";
10
- export * from "./getWithoutPunctuation";
11
- export * from "./getWithoutUnderscores";
12
- export * from "./getWithoutWhitespaces";
13
- export * from "./reservedWords";
package/string/index.js DELETED
@@ -1,13 +0,0 @@
1
- export * from "./getCapitalised";
2
- export * from "./getClean";
3
- export * from "./getFolder";
4
- export * from "./getProperCase";
5
- export * from "./getString";
6
- export * from "./getStringFromStream";
7
- export * from "./getUnescaped";
8
- export * from "./getWithoutAccents";
9
- export * from "./getWithoutHtmlTags";
10
- export * from "./getWithoutPunctuation";
11
- export * from "./getWithoutUnderscores";
12
- export * from "./getWithoutWhitespaces";
13
- export * from "./reservedWords";
@@ -1,5 +0,0 @@
1
- export declare const reservedWords: string[];
2
- /**
3
- * Check if its a reserved word, the casing may be specific eg, OpenAI.
4
- */
5
- export declare const isReservedWord: (word: string) => any;
@@ -1,22 +0,0 @@
1
- export const reservedWords = [
2
- "AI",
3
- "GA4",
4
- "GSC",
5
- "OpenAI",
6
- "PPC",
7
- "SEO",
8
- "UpTimeRobot",
9
- ];
10
- /**
11
- * Check if its a reserved word, the casing may be specific eg, OpenAI.
12
- */
13
- export const isReservedWord = (word) => {
14
- let response = null;
15
- for (let i = 0; i < reservedWords.length; i++) {
16
- if (reservedWords[i].toLowerCase() === word.toLowerCase()) {
17
- response = reservedWords[i];
18
- break;
19
- }
20
- }
21
- return response;
22
- };
@@ -1 +0,0 @@
1
- export * from "./swr";
@@ -1 +0,0 @@
1
- export * from "./swr";
@@ -1,42 +0,0 @@
1
- import { ApiState } from "../../api";
2
- export type Swr = {
3
- data: any;
4
- onSuccess?: Function;
5
- skipFetch?: boolean;
6
- url: string;
7
- };
8
- export type SwrResponse = {
9
- data: any;
10
- error: any;
11
- fetcher: Function;
12
- mutate: {
13
- data: any;
14
- url: string;
15
- };
16
- state?: ApiState;
17
- swrMutate: Function;
18
- };
19
- /**
20
- * Check to see if a single SWR has an error.
21
- */
22
- export declare const isData: (swr: SwrResponse) => boolean;
23
- /**
24
- * Check to see if a single SWR is loading.
25
- */
26
- export declare const isLoading: (swr: SwrResponse) => boolean;
27
- /**
28
- * Check to see if a single SWR has an error.
29
- */
30
- export declare const isError: (swr: SwrResponse) => boolean;
31
- /**
32
- * Are any of SWRs loading
33
- */
34
- export declare const isAnyLoading: (swrs: SwrResponse[]) => boolean;
35
- /**
36
- * Are any of the SWRs marked as an error.
37
- */
38
- export declare const isAnyError: (swrs: SwrResponse[]) => boolean;
39
- /**
40
- * Are all SWRs data ready.
41
- */
42
- export declare const isAllData: (swrs: SwrResponse[]) => boolean;
package/swr/client/swr.js DELETED
@@ -1,50 +0,0 @@
1
- /**
2
- * Check to see if a single SWR has an error.
3
- */
4
- export const isData = (swr) => (undefined === swr.error || null === swr.error) &&
5
- "undefined" !== typeof swr.data &&
6
- "undefined" !== swr.data;
7
- /**
8
- * Check to see if a single SWR is loading.
9
- */
10
- export const isLoading = (swr) => !isError(swr) && !isData(swr);
11
- /**
12
- * Check to see if a single SWR has an error.
13
- */
14
- export const isError = (swr) => undefined !== swr.error && null !== swr.error;
15
- /**
16
- * Are any of SWRs loading
17
- */
18
- export const isAnyLoading = (swrs) => {
19
- let counter = 0;
20
- for (const swr in swrs) {
21
- if (isLoading(swrs[swr])) {
22
- counter++;
23
- }
24
- }
25
- return counter > 0;
26
- };
27
- /**
28
- * Are any of the SWRs marked as an error.
29
- */
30
- export const isAnyError = (swrs) => {
31
- let counter = 0;
32
- for (const swr in swrs) {
33
- if (isError(swrs[swr])) {
34
- counter++;
35
- }
36
- }
37
- return counter > 0;
38
- };
39
- /**
40
- * Are all SWRs data ready.
41
- */
42
- export const isAllData = (swrs) => {
43
- let counter = 0;
44
- for (const swr in swrs) {
45
- if (isData(swrs[swr])) {
46
- counter++;
47
- }
48
- }
49
- return counter === Object.keys(swrs).length;
50
- };
@@ -1,31 +0,0 @@
1
- import { UpTimeRobotConfig } from "./";
2
- import { BaseNamespace } from "../../_class";
3
- type GetReportProps = {
4
- custom_uptime_ranges?: string;
5
- logs?: boolean;
6
- logs_start_date?: string;
7
- logs_end_date?: string;
8
- monitors?: string | string[];
9
- response_times?: boolean;
10
- response_times_start_date?: string;
11
- response_times_end_date?: string;
12
- search?: string;
13
- statuses?: number | number[];
14
- types?: number | number[];
15
- limit?: number;
16
- offset?: number;
17
- };
18
- /**
19
- * Use the Up Time Robot API to retrieve up to 50 monitors at a time.
20
- * https://uptimerobot.com/api/
21
- */
22
- export declare class UpTimeRobotNamespace extends BaseNamespace {
23
- client: boolean;
24
- config: UpTimeRobotConfig;
25
- /**
26
- * Renew the access token as it expires every 3 hours.
27
- */
28
- ensureInit: () => Promise<void>;
29
- getReport: (props?: GetReportProps) => Promise<any>;
30
- }
31
- export {};
@@ -1,40 +0,0 @@
1
- import { BaseNamespace } from "../../_class";
2
- import { post } from "../../axios";
3
- import isArray from "lodash/isArray";
4
- /**
5
- * Use the Up Time Robot API to retrieve up to 50 monitors at a time.
6
- * https://uptimerobot.com/api/
7
- */
8
- export class UpTimeRobotNamespace extends BaseNamespace {
9
- /**
10
- * Renew the access token as it expires every 3 hours.
11
- */
12
- ensureInit = async () => {
13
- if (!this.client) {
14
- this.client = true;
15
- }
16
- };
17
- getReport = async (props) => {
18
- let response = null;
19
- let finalParams = {};
20
- if (undefined !== props) {
21
- finalParams = {
22
- ...props,
23
- };
24
- if (undefined !== props.monitors && isArray(props.monitors)) {
25
- finalParams["monitors"] = props.monitors.join("-");
26
- }
27
- if (undefined !== props.statuses && isArray(props.statuses)) {
28
- finalParams["statuses"] = props.statuses.join("-");
29
- }
30
- if (undefined !== props.types && isArray(props.types)) {
31
- finalParams["types"] = props.types.join("-");
32
- }
33
- }
34
- const apiResponse = await post(`https://api.uptimerobot.com/v2/getMonitors?api_key=${this.config.apiKey}`, finalParams);
35
- if (apiResponse.isSuccess()) {
36
- response = apiResponse.getBody();
37
- }
38
- return response;
39
- };
40
- }
@@ -1,2 +0,0 @@
1
- export * from "./upTimeRobot";
2
- export * from "./UpTimeRobotNamespace";
@@ -1,2 +0,0 @@
1
- export * from "./upTimeRobot";
2
- export * from "./UpTimeRobotNamespace";
@@ -1,38 +0,0 @@
1
- import { UpTimeRobotNamespace } from "./UpTimeRobotNamespace";
2
- export type UpTimeRobotConfig = {
3
- apiKey: string;
4
- };
5
- export declare const upTimeRobotClient: (key?: string, config?: UpTimeRobotConfig, vaultId?: string, itemId?: string) => Promise<UpTimeRobotNamespace>;
6
- export declare const logTypes: {
7
- DOWN: number;
8
- UP: number;
9
- PAUSED: number;
10
- STARTED: number;
11
- };
12
- export declare const monitorStatuses: {
13
- PAUSED: number;
14
- NOT_CHECKED: number;
15
- UP: number;
16
- SEEMS_DOWN: number;
17
- DOWN: number;
18
- };
19
- export declare const monitorSubTypes: {
20
- HTTP: number;
21
- HTTPS: number;
22
- FTP: number;
23
- SMTP: number;
24
- POP3: number;
25
- IMAP: number;
26
- CUSTOM_PORT: number;
27
- };
28
- export declare const monitorTypes: {
29
- HTTPS: number;
30
- KEYWORD: number;
31
- PING: number;
32
- PORT: number;
33
- HEARTBEAT: number;
34
- };
35
- export declare const requestStatuses: {
36
- ERROR: string;
37
- SUCCESS: string;
38
- };
@@ -1,59 +0,0 @@
1
- import { UpTimeRobotNamespace } from "./UpTimeRobotNamespace";
2
- import { onePasswordClient } from "../../onePassword/server";
3
- const upTimeRobotNamespaces = new Map();
4
- export const upTimeRobotClient = async (key = "default", config, vaultId, itemId) => {
5
- if (upTimeRobotNamespaces.has(key)) {
6
- return upTimeRobotNamespaces.get(key);
7
- }
8
- let instanceConfig;
9
- if (config) {
10
- instanceConfig = config;
11
- }
12
- else if (vaultId && itemId) {
13
- instanceConfig = await (await onePasswordClient())
14
- .getJsonNote(vaultId, itemId);
15
- }
16
- else if (process.env.UP_TIME_ROBOT_VAULT_ID && process.env.UP_TIME_ROBOT_ITEM_ID) {
17
- instanceConfig = await (await onePasswordClient())
18
- .getJsonNote(process.env.UP_TIME_ROBOT_VAULT_ID, process.env.UP_TIME_ROBOT_ITEM_ID);
19
- }
20
- else {
21
- throw new Error(`Config required for namespace '${key}'`);
22
- }
23
- const namespace = new UpTimeRobotNamespace(key, instanceConfig);
24
- upTimeRobotNamespaces.set(key, namespace);
25
- return namespace;
26
- };
27
- export const logTypes = {
28
- DOWN: 1,
29
- UP: 2,
30
- PAUSED: 99,
31
- STARTED: 98,
32
- };
33
- export const monitorStatuses = {
34
- PAUSED: 0,
35
- NOT_CHECKED: 1,
36
- UP: 2,
37
- SEEMS_DOWN: 8,
38
- DOWN: 9,
39
- };
40
- export const monitorSubTypes = {
41
- HTTP: 1,
42
- HTTPS: 2,
43
- FTP: 3,
44
- SMTP: 4,
45
- POP3: 5,
46
- IMAP: 6,
47
- CUSTOM_PORT: 99,
48
- };
49
- export const monitorTypes = {
50
- HTTPS: 1,
51
- KEYWORD: 2,
52
- PING: 3,
53
- PORT: 4,
54
- HEARTBEAT: 5,
55
- };
56
- export const requestStatuses = {
57
- ERROR: 'fail',
58
- SUCCESS: 'ok',
59
- };
package/url/index.d.ts DELETED
@@ -1 +0,0 @@
1
- export * from "./url";
package/url/index.js DELETED
@@ -1 +0,0 @@
1
- export * from "./url";
@@ -1 +0,0 @@
1
- export * from "./writeUrlContents";
@@ -1 +0,0 @@
1
- export * from "./writeUrlContents";
@@ -1,6 +0,0 @@
1
- /**
2
- * Downloads a given URL's contents to a local file.
3
- *
4
- * Requires fs-extra
5
- */
6
- export declare const writeUrlContents: (filePath: string, url: string) => Promise<void>;
@@ -1,35 +0,0 @@
1
- import axios from "axios";
2
- import { createDirectory } from "../../file/server";
3
- /**
4
- * Downloads a given URL's contents to a local file.
5
- *
6
- * Requires fs-extra
7
- */
8
- export const writeUrlContents = async (filePath, url) => {
9
- const fs = await import("fs-extra");
10
- await createDirectory(filePath);
11
- const writer = fs.createWriteStream(filePath);
12
- await axios({
13
- method: "get",
14
- url,
15
- responseType: "stream"
16
- })
17
- .then(response => {
18
- return new Promise(async (resolve, reject) => {
19
- response.data.pipe(writer);
20
- let error = null;
21
- writer.on("error", err => {
22
- error = err;
23
- writer.close();
24
- reject(err);
25
- });
26
- writer.on("close", () => {
27
- if (!error) {
28
- resolve(true);
29
- }
30
- //no need to call the reject here, as it will have been called in the
31
- //'error' stream;
32
- });
33
- });
34
- });
35
- };
package/url/url.d.ts DELETED
@@ -1,26 +0,0 @@
1
- export type EnvironmentUrl = {
2
- localhost: string;
3
- development: string;
4
- staging: string;
5
- production: string;
6
- };
7
- /**
8
- * Does the URL begin with HTTP or HTTPS?
9
- */
10
- export declare const isAbsolute: (input: string) => boolean;
11
- /**
12
- * Does the URL begin with a slash.
13
- */
14
- export declare const isRelative: (input: string) => boolean;
15
- /**
16
- * Take an object and return the parameter for a given URL irrespective of path.
17
- */
18
- export declare const buildParameters: (existing?: object, updated?: object) => string;
19
- /**
20
- * Create a new relative URL based on the current path.
21
- */
22
- export declare const buildRelative: (router: any, updated?: object) => string;
23
- /**
24
- * Get the current base url.
25
- */
26
- export declare const buildEnvironmentUrl: (path: string, url: EnvironmentUrl) => string;
package/url/url.js DELETED
@@ -1,59 +0,0 @@
1
- import { isDevelopment, isLocalhost, isProduction, isStaging } from "../environment";
2
- import merge from "lodash/merge";
3
- /**
4
- * Does the URL begin with HTTP or HTTPS?
5
- */
6
- export const isAbsolute = (input) => {
7
- try {
8
- new URL(input);
9
- }
10
- catch (error) {
11
- return false;
12
- }
13
- return true;
14
- };
15
- /**
16
- * Does the URL begin with a slash.
17
- */
18
- export const isRelative = (input) => "/" === input.trim()
19
- .charAt(0);
20
- /**
21
- * Take an object and return the parameter for a given URL irrespective of path.
22
- */
23
- export const buildParameters = (existing = {}, updated = {}) => {
24
- const merged = merge(existing, updated);
25
- let response = "";
26
- if (Object.values(merged).length) {
27
- for (const key in merged) {
28
- const value = undefined === updated[key] ? existing[key] : updated[key];
29
- response += "" === response ? "?" : "&";
30
- response += `${encodeURIComponent(key)}=${encodeURIComponent(value)}`;
31
- }
32
- }
33
- return response;
34
- };
35
- /**
36
- * Create a new relative URL based on the current path.
37
- */
38
- export const buildRelative = (router, updated = {}) => {
39
- return `${router.pathname}${buildParameters(router.query, updated || {})}`;
40
- };
41
- /**
42
- * Get the current base url.
43
- */
44
- export const buildEnvironmentUrl = (path, url) => {
45
- let response;
46
- if (isDevelopment() && isLocalhost()) {
47
- response = url.localhost;
48
- }
49
- else if (isStaging()) {
50
- response = url.staging;
51
- }
52
- else if (isProduction()) {
53
- response = url.production;
54
- }
55
- else {
56
- response = url.development;
57
- }
58
- return response + path || "";
59
- };
@@ -1,4 +0,0 @@
1
- /**
2
- * Function to default to a value, whilst filtering through an instance
3
- */
4
- export declare const defaultTo: (instance: any, keys: any | any[], defaultValue?: any) => any;
package/util/defaultTo.js DELETED
@@ -1,37 +0,0 @@
1
- import isObject from "lodash/isObject";
2
- import { getArray } from "../array";
3
- /**
4
- * Function to default to a value, whilst filtering through an instance
5
- */
6
- export const defaultTo = (instance, keys, defaultValue = null) => {
7
- const keysArray = getArray(keys);
8
- let found = true;
9
- let pointer = instance;
10
- // Instance is undefined or is null
11
- if ("undefined" === typeof instance || null === pointer) {
12
- found = false;
13
- }
14
- // Instance exists
15
- else {
16
- keysArray.forEach(key => {
17
- if (found) {
18
- // Sub key doesn't exist
19
- if (isObject(pointer)) {
20
- // @ts-ignore
21
- if (undefined === pointer[key] || null === pointer[key]) {
22
- found = false;
23
- }
24
- // Sub key exists, update pointer
25
- else {
26
- // @ts-ignore
27
- pointer = pointer[key];
28
- }
29
- }
30
- else {
31
- found = false;
32
- }
33
- }
34
- });
35
- }
36
- return found ? pointer : defaultValue;
37
- };