@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.
- package/.github/workflows/deploy_npmjs.yml +0 -3
- package/.yarn/install-state.gz +0 -0
- package/dist/_class/index.d.mts +2 -0
- package/dist/_class/index.mjs +62 -0
- package/dist/adverity/index.d.mts +2 -0
- package/dist/adverity/index.mjs +64 -0
- package/{adverity/server/getJobs.d.ts → dist/adverity/server/index.d.mts} +11 -8
- package/dist/adverity/server/index.mjs +25 -0
- package/dist/api/index.d.mts +2 -0
- package/dist/api/index.mjs +3 -0
- package/dist/api-DGKJDAfb.mjs +139 -0
- package/dist/array/index.d.mts +11 -0
- package/dist/array/index.mjs +14 -0
- package/dist/atInternet/index.d.mts +20 -0
- package/dist/atInternet/index.mjs +18 -0
- package/dist/aws/ec2/server/index.d.mts +18 -0
- package/dist/aws/ec2/server/index.mjs +48 -0
- package/dist/aws/ecs/server/index.d.mts +59 -0
- package/dist/aws/ecs/server/index.mjs +113 -0
- package/dist/aws/glue/server/index.d.mts +19 -0
- package/dist/aws/glue/server/index.mjs +36 -0
- package/dist/aws/lambda/server/index.d.mts +28 -0
- package/dist/aws/lambda/server/index.mjs +57 -0
- package/dist/aws/s3/server/index.d.mts +124 -0
- package/dist/aws/s3/server/index.mjs +361 -0
- package/dist/aws/server/index.d.mts +2 -0
- package/dist/aws/server/index.mjs +3 -0
- package/dist/aws/ses/server/index.d.mts +105 -0
- package/dist/aws/ses/server/index.mjs +269 -0
- package/dist/aws/sqs/server/index.d.mts +41 -0
- package/dist/aws/sqs/server/index.mjs +56 -0
- package/dist/aws/ssm/server/index.d.mts +18 -0
- package/dist/aws/ssm/server/index.mjs +47 -0
- package/dist/axios/index.d.mts +22 -0
- package/dist/axios/index.mjs +50 -0
- package/dist/boolean/index.d.mts +7 -0
- package/dist/boolean/index.mjs +15 -0
- package/dist/brightData/serpApi/server/index.d.mts +93 -0
- package/dist/brightData/serpApi/server/index.mjs +229 -0
- package/dist/brightData/server/index.d.mts +2 -0
- package/dist/brightData/server/index.mjs +18 -0
- package/dist/brightData/webScraperIde/server/index.d.mts +19 -0
- package/dist/brightData/webScraperIde/server/index.mjs +50 -0
- package/dist/cache/server/index.d.mts +10 -0
- package/dist/cache/server/index.mjs +31 -0
- package/dist/chunk-CgI6uo-e.mjs +32 -0
- package/dist/crud/index.d.mts +10 -0
- package/dist/crud/index.mjs +10 -0
- package/dist/crypto/index.d.mts +28 -0
- package/dist/crypto/index.mjs +47 -0
- package/dist/date/index.d.mts +2 -0
- package/dist/date/index.mjs +471 -0
- package/dist/environment/index.d.mts +37 -0
- package/dist/environment/index.mjs +60 -0
- package/dist/eskimi/index.d.mts +52 -0
- package/dist/eskimi/index.mjs +90 -0
- package/dist/eskimi/server/index.d.mts +25 -0
- package/dist/eskimi/server/index.mjs +50 -0
- package/dist/file/index.d.mts +7 -0
- package/dist/file/index.mjs +20 -0
- package/dist/file/server/index.d.mts +8 -0
- package/dist/file/server/index.mjs +16 -0
- package/dist/from-9s4TjsYv.mjs +3878 -0
- package/dist/geo/index.d.mts +26 -0
- package/dist/geo/index.mjs +1591 -0
- package/dist/getDecimal-CafxtLhH.mjs +40 -0
- package/dist/googleAds/keywordPlanner/server/index.d.mts +45 -0
- package/dist/googleAds/keywordPlanner/server/index.mjs +51 -0
- package/dist/googleAds/server/index.d.mts +27 -0
- package/dist/googleAds/server/index.mjs +48 -0
- package/dist/googleCloud/bigquery/server/index.d.mts +82 -0
- package/dist/googleCloud/bigquery/server/index.mjs +127 -0
- package/dist/googleCloud/server/index.d.mts +2 -0
- package/dist/googleCloud/server/index.mjs +24 -0
- package/dist/googleCloud/sheets/server/index.d.mts +22 -0
- package/dist/googleCloud/sheets/server/index.mjs +31 -0
- package/dist/googleCloud/storage/server/index.d.mts +31 -0
- package/dist/googleCloud/storage/server/index.mjs +79 -0
- package/dist/googlePageSpeed/server/index.d.mts +34 -0
- package/dist/googlePageSpeed/server/index.mjs +53 -0
- package/dist/googleSearchIncidents/server/index.d.mts +73 -0
- package/dist/googleSearchIncidents/server/index.mjs +55 -0
- package/dist/greenDomain/server/index.d.mts +25 -0
- package/dist/greenDomain/server/index.mjs +31 -0
- package/dist/index-B20FTOvk.d.mts +67 -0
- package/dist/index-B4K9Z1U-.d.mts +17 -0
- package/dist/index-CFaAdPAh.d.mts +32 -0
- package/dist/index-CIG08fpw.d.mts +32 -0
- package/dist/index-CMfxuwL1.d.mts +246 -0
- package/dist/index-DEm1Wodf.d.mts +116 -0
- package/dist/index-sfVt7tI_.d.mts +18 -0
- package/dist/inngest/index.d.mts +10 -0
- package/dist/inngest/index.mjs +10 -0
- package/dist/json/index.d.mts +7 -0
- package/dist/json/index.mjs +27 -0
- package/dist/littleWarden/server/index.d.mts +56 -0
- package/dist/littleWarden/server/index.mjs +79 -0
- package/dist/lumar/api/server/index.d.mts +66 -0
- package/dist/lumar/api/server/index.mjs +111 -0
- package/dist/lumar/graphql/server/index.d.mts +308 -0
- package/dist/lumar/graphql/server/index.mjs +172 -0
- package/dist/multipart-parser-BC14QSvI.mjs +290 -0
- package/dist/myTarget/server/index.d.mts +9 -0
- package/dist/myTarget/server/index.mjs +16 -0
- package/dist/nextAuth/index.d.mts +12 -0
- package/dist/nextAuth/index.mjs +15 -0
- package/dist/nextJs/client/index.d.mts +10 -0
- package/dist/nextJs/client/index.mjs +12 -0
- package/dist/nextJs/index.d.mts +19 -0
- package/dist/nextJs/index.mjs +12 -0
- package/dist/number/index.d.mts +54 -0
- package/dist/number/index.mjs +75 -0
- package/{object/replaceKeys.d.ts → dist/object/index.d.mts} +4 -1
- package/dist/object/index.mjs +22 -0
- package/dist/onePassword/server/index.d.mts +24 -0
- package/dist/onePassword/server/index.mjs +50 -0
- package/dist/openAi/server/index.d.mts +20 -0
- package/dist/openAi/server/index.mjs +46 -0
- package/dist/prisma/index.d.mts +7 -0
- package/dist/prisma/index.mjs +16 -0
- package/dist/prisma/server/index.d.mts +31 -0
- package/dist/prisma/server/index.mjs +72 -0
- package/dist/server-Bwy4JI8Z.mjs +33 -0
- package/dist/snapchat/server/index.d.mts +25 -0
- package/dist/snapchat/server/index.mjs +39 -0
- package/dist/sorting/index.d.mts +25 -0
- package/dist/sorting/index.mjs +50 -0
- package/dist/src-BeXFXTgz.mjs +1272 -0
- package/dist/stream/server/index.d.mts +15 -0
- package/dist/stream/server/index.mjs +48 -0
- package/dist/string/index.d.mts +107 -0
- package/dist/string/index.mjs +191 -0
- package/dist/swr/client/index.d.mts +46 -0
- package/dist/swr/client/index.mjs +40 -0
- package/dist/upTimeRobot/server/index.d.mts +72 -0
- package/dist/upTimeRobot/server/index.mjs +83 -0
- package/dist/url/index.d.mts +29 -0
- package/dist/url/index.mjs +52 -0
- package/dist/url/server/index.d.mts +9 -0
- package/dist/url/server/index.mjs +35 -0
- package/dist/util/index.d.mts +47 -0
- package/dist/util/index.mjs +99 -0
- package/dist/util/server/index.d.mts +27 -0
- package/dist/util/server/index.mjs +61 -0
- package/dist/webWorker/index.d.mts +11 -0
- package/dist/webWorker/index.mjs +11 -0
- package/dist/xml/server/index.d.mts +4 -0
- package/dist/xml/server/index.mjs +17 -0
- package/package.json +71 -1066
- package/tsdown.config.ts +10 -0
- package/.github/generate-exports.js +0 -111
- package/_class/BaseClass.d.ts +0 -18
- package/_class/BaseClass.js +0 -44
- package/_class/BaseNamespace.d.ts +0 -9
- package/_class/BaseNamespace.js +0 -24
- package/_class/index.d.ts +0 -2
- package/_class/index.js +0 -2
- package/adverity/adverity.d.ts +0 -112
- package/adverity/adverity.js +0 -58
- package/adverity/index.d.ts +0 -1
- package/adverity/index.js +0 -1
- package/adverity/server/getJobs.js +0 -26
- package/adverity/server/index.d.ts +0 -1
- package/adverity/server/index.js +0 -1
- package/api/ApiResponseClass.d.ts +0 -35
- package/api/ApiResponseClass.js +0 -93
- package/api/api.d.ts +0 -17
- package/api/api.js +0 -15
- package/api/functions.d.ts +0 -7
- package/api/functions.js +0 -19
- package/api/index.d.ts +0 -3
- package/api/index.js +0 -3
- package/array/array.d.ts +0 -8
- package/array/array.js +0 -9
- package/array/index.d.ts +0 -1
- package/array/index.js +0 -1
- package/atInternet/atInternet.d.ts +0 -16
- package/atInternet/atInternet.js +0 -15
- package/atInternet/index.d.ts +0 -1
- package/atInternet/index.js +0 -1
- package/aws/ec2/server/AwsEc2Namespace.d.ts +0 -10
- package/aws/ec2/server/AwsEc2Namespace.js +0 -37
- package/aws/ec2/server/awsEc2.d.ts +0 -3
- package/aws/ec2/server/awsEc2.js +0 -12
- package/aws/ec2/server/index.d.ts +0 -2
- package/aws/ec2/server/index.js +0 -2
- package/aws/ecs/server/AwsEcsNamespace.d.ts +0 -53
- package/aws/ecs/server/AwsEcsNamespace.js +0 -118
- package/aws/ecs/server/awsEcs.d.ts +0 -3
- package/aws/ecs/server/awsEcs.js +0 -12
- package/aws/ecs/server/index.d.ts +0 -2
- package/aws/ecs/server/index.js +0 -2
- package/aws/glue/server/AwsGlueNamespace.d.ts +0 -12
- package/aws/glue/server/AwsGlueNamespace.js +0 -29
- package/aws/glue/server/awsGlue.d.ts +0 -3
- package/aws/glue/server/awsGlue.js +0 -12
- package/aws/glue/server/index.d.ts +0 -2
- package/aws/glue/server/index.js +0 -2
- package/aws/lambda/server/AwsLambdaNamespace.d.ts +0 -21
- package/aws/lambda/server/AwsLambdaNamespace.js +0 -69
- package/aws/lambda/server/awsLambda.d.ts +0 -4
- package/aws/lambda/server/awsLambda.js +0 -16
- package/aws/lambda/server/index.d.ts +0 -2
- package/aws/lambda/server/index.js +0 -2
- package/aws/s3/server/AwsS3Namespace.d.ts +0 -65
- package/aws/s3/server/AwsS3Namespace.js +0 -364
- package/aws/s3/server/awsS3.d.ts +0 -13
- package/aws/s3/server/awsS3.js +0 -20
- package/aws/s3/server/index.d.ts +0 -3
- package/aws/s3/server/index.js +0 -3
- package/aws/s3/server/payload.d.ts +0 -42
- package/aws/s3/server/payload.js +0 -43
- package/aws/server/aws.d.ts +0 -9
- package/aws/server/aws.js +0 -29
- package/aws/server/index.d.ts +0 -2
- package/aws/server/index.js +0 -2
- package/aws/server/isResponse200.d.ts +0 -4
- package/aws/server/isResponse200.js +0 -12
- package/aws/ses/server/AwsSesNamespace.d.ts +0 -9
- package/aws/ses/server/AwsSesNamespace.js +0 -41
- package/aws/ses/server/SimpleEmail.d.ts +0 -81
- package/aws/ses/server/SimpleEmail.js +0 -296
- package/aws/ses/server/awsSes.d.ts +0 -4
- package/aws/ses/server/awsSes.js +0 -13
- package/aws/ses/server/index.d.ts +0 -3
- package/aws/ses/server/index.js +0 -3
- package/aws/sqs/server/AwsSqsNamespace.d.ts +0 -34
- package/aws/sqs/server/AwsSqsNamespace.js +0 -55
- package/aws/sqs/server/awsSqs.d.ts +0 -3
- package/aws/sqs/server/awsSqs.js +0 -12
- package/aws/sqs/server/index.d.ts +0 -2
- package/aws/sqs/server/index.js +0 -2
- package/aws/ssm/server/AwsSsmNamespace.d.ts +0 -11
- package/aws/ssm/server/AwsSsmNamespace.js +0 -52
- package/aws/ssm/server/awsSsm.d.ts +0 -3
- package/aws/ssm/server/awsSsm.js +0 -12
- package/aws/ssm/server/index.d.ts +0 -2
- package/aws/ssm/server/index.js +0 -2
- package/axios/deleteRequest.d.ts +0 -6
- package/axios/deleteRequest.js +0 -26
- package/axios/get.d.ts +0 -5
- package/axios/get.js +0 -24
- package/axios/index.d.ts +0 -3
- package/axios/index.js +0 -3
- package/axios/post.d.ts +0 -5
- package/axios/post.js +0 -25
- package/boolean/boolean.d.ts +0 -4
- package/boolean/boolean.js +0 -16
- package/boolean/index.d.ts +0 -1
- package/boolean/index.js +0 -1
- package/brightData/serpApi/server/brightDataSerpApi.d.ts +0 -10
- package/brightData/serpApi/server/brightDataSerpApi.js +0 -9
- package/brightData/serpApi/server/buildGoogleSerpUrl.d.ts +0 -32
- package/brightData/serpApi/server/buildGoogleSerpUrl.js +0 -112
- package/brightData/serpApi/server/buildGoogleTrendsUrl.d.ts +0 -22
- package/brightData/serpApi/server/buildGoogleTrendsUrl.js +0 -57
- package/brightData/serpApi/server/getAsyncRequestId.d.ts +0 -8
- package/brightData/serpApi/server/getAsyncRequestId.js +0 -32
- package/brightData/serpApi/server/getAsyncResults.d.ts +0 -7
- package/brightData/serpApi/server/getAsyncResults.js +0 -31
- package/brightData/serpApi/server/getRealtime.d.ts +0 -5
- package/brightData/serpApi/server/getRealtime.js +0 -26
- package/brightData/serpApi/server/index.d.ts +0 -6
- package/brightData/serpApi/server/index.js +0 -6
- package/brightData/server/brightData.d.ts +0 -15
- package/brightData/server/brightData.js +0 -15
- package/brightData/server/index.d.ts +0 -1
- package/brightData/server/index.js +0 -1
- package/brightData/webScraperIde/server/getBatch.d.ts +0 -7
- package/brightData/webScraperIde/server/getBatch.js +0 -24
- package/brightData/webScraperIde/server/getRealtime.d.ts +0 -7
- package/brightData/webScraperIde/server/getRealtime.js +0 -45
- package/brightData/webScraperIde/server/index.d.ts +0 -2
- package/brightData/webScraperIde/server/index.js +0 -2
- package/cache/server/cache.d.ts +0 -7
- package/cache/server/cache.js +0 -43
- package/cache/server/index.d.ts +0 -1
- package/cache/server/index.js +0 -1
- package/cache/server/test/cache.test.d.ts +0 -1
- package/cache/server/test/cache.test.js +0 -8
- package/crud/crud.d.ts +0 -7
- package/crud/crud.js +0 -6
- package/crud/index.d.ts +0 -1
- package/crud/index.js +0 -1
- package/crypto/getDecrypt.d.ts +0 -5
- package/crypto/getDecrypt.js +0 -10
- package/crypto/getEncrypt.d.ts +0 -5
- package/crypto/getEncrypt.js +0 -10
- package/crypto/getRandom.d.ts +0 -4
- package/crypto/getRandom.js +0 -8
- package/crypto/getSha256.d.ts +0 -5
- package/crypto/getSha256.js +0 -11
- package/crypto/index.d.ts +0 -4
- package/crypto/index.js +0 -4
- package/date/calculation.d.ts +0 -102
- package/date/calculation.js +0 -272
- package/date/date.d.ts +0 -36
- package/date/date.js +0 -20
- package/date/financialYear.d.ts +0 -19
- package/date/financialYear.js +0 -78
- package/date/format.d.ts +0 -85
- package/date/format.js +0 -160
- package/date/index.d.ts +0 -4
- package/date/index.js +0 -4
- package/environment/environment.d.ts +0 -34
- package/environment/environment.js +0 -79
- package/environment/index.d.ts +0 -1
- package/environment/index.js +0 -1
- package/eskimi/eskimi.d.ts +0 -49
- package/eskimi/eskimi.js +0 -93
- package/eskimi/index.d.ts +0 -1
- package/eskimi/index.js +0 -1
- package/eskimi/server/getAgeGroup.d.ts +0 -4
- package/eskimi/server/getAgeGroup.js +0 -11
- package/eskimi/server/getData.d.ts +0 -4
- package/eskimi/server/getData.js +0 -13
- package/eskimi/server/getDevice.d.ts +0 -4
- package/eskimi/server/getDevice.js +0 -11
- package/eskimi/server/getGender.d.ts +0 -4
- package/eskimi/server/getGender.js +0 -11
- package/eskimi/server/index.d.ts +0 -4
- package/eskimi/server/index.js +0 -4
- package/file/getFileKey.d.ts +0 -4
- package/file/getFileKey.js +0 -23
- package/file/index.d.ts +0 -1
- package/file/index.js +0 -1
- package/file/server/createDirectory.d.ts +0 -5
- package/file/server/createDirectory.js +0 -13
- package/file/server/index.d.ts +0 -1
- package/file/server/index.js +0 -1
- package/geo/countries.d.ts +0 -12
- package/geo/countries.js +0 -219
- package/geo/index.d.ts +0 -2
- package/geo/index.js +0 -2
- package/geo/languages.d.ts +0 -9
- package/geo/languages.js +0 -55
- package/googleAds/keywordPlanner/server/googleAdsKeywordPlanner.d.ts +0 -41
- package/googleAds/keywordPlanner/server/googleAdsKeywordPlanner.js +0 -55
- package/googleAds/keywordPlanner/server/index.d.ts +0 -1
- package/googleAds/keywordPlanner/server/index.js +0 -1
- package/googleAds/server/GoogleAdsNamespace.d.ts +0 -11
- package/googleAds/server/GoogleAdsNamespace.js +0 -30
- package/googleAds/server/googleAds.d.ts +0 -11
- package/googleAds/server/googleAds.js +0 -26
- package/googleAds/server/index.d.ts +0 -2
- package/googleAds/server/index.js +0 -2
- package/googleCloud/bigquery/server/GoogleCloudBigqueryNamespace.d.ts +0 -50
- package/googleCloud/bigquery/server/GoogleCloudBigqueryNamespace.js +0 -115
- package/googleCloud/bigquery/server/googleCloudBigquery.d.ts +0 -5
- package/googleCloud/bigquery/server/googleCloudBigquery.js +0 -41
- package/googleCloud/bigquery/server/index.d.ts +0 -3
- package/googleCloud/bigquery/server/index.js +0 -3
- package/googleCloud/bigquery/server/loadData.d.ts +0 -19
- package/googleCloud/bigquery/server/loadData.js +0 -14
- package/googleCloud/server/googleCloud.d.ts +0 -29
- package/googleCloud/server/googleCloud.js +0 -25
- package/googleCloud/server/index.d.ts +0 -1
- package/googleCloud/server/index.js +0 -1
- package/googleCloud/sheets/server/GoogleCloudSheetsNamespace.d.ts +0 -18
- package/googleCloud/sheets/server/GoogleCloudSheetsNamespace.js +0 -37
- package/googleCloud/sheets/server/getAssociatedData.d.ts +0 -10
- package/googleCloud/sheets/server/getAssociatedData.js +0 -39
- package/googleCloud/sheets/server/index.d.ts +0 -1
- package/googleCloud/sheets/server/index.js +0 -1
- package/googleCloud/storage/server/GoogleCloudStorageNamespace.d.ts +0 -22
- package/googleCloud/storage/server/GoogleCloudStorageNamespace.js +0 -66
- package/googleCloud/storage/server/googleCloudStorage.d.ts +0 -3
- package/googleCloud/storage/server/googleCloudStorage.js +0 -37
- package/googleCloud/storage/server/index.d.ts +0 -2
- package/googleCloud/storage/server/index.js +0 -2
- package/googlePageSpeed/server/GooglePageSpeedNamespace.d.ts +0 -11
- package/googlePageSpeed/server/GooglePageSpeedNamespace.js +0 -27
- package/googlePageSpeed/server/googlePageSpeed.d.ts +0 -19
- package/googlePageSpeed/server/googlePageSpeed.js +0 -38
- package/googlePageSpeed/server/index.d.ts +0 -2
- package/googlePageSpeed/server/index.js +0 -2
- package/googleSearchIncidents/server/googleSearchIncidents.d.ts +0 -69
- package/googleSearchIncidents/server/googleSearchIncidents.js +0 -42
- package/googleSearchIncidents/server/index.d.ts +0 -1
- package/googleSearchIncidents/server/index.js +0 -1
- package/greenDomain/server/greenDomain.d.ts +0 -21
- package/greenDomain/server/greenDomain.js +0 -37
- package/greenDomain/server/index.d.ts +0 -1
- package/greenDomain/server/index.js +0 -1
- package/inngest/index.d.ts +0 -1
- package/inngest/index.js +0 -1
- package/inngest/inngest.d.ts +0 -7
- package/inngest/inngest.js +0 -6
- package/json/getJsonNewline.d.ts +0 -1
- package/json/getJsonNewline.js +0 -9
- package/json/index.d.ts +0 -2
- package/json/index.js +0 -2
- package/json/isJson.d.ts +0 -1
- package/json/isJson.js +0 -22
- package/littleWarden/server/LittleWardenNamespace.d.ts +0 -11
- package/littleWarden/server/LittleWardenNamespace.js +0 -30
- package/littleWarden/server/getUrlStatus.d.ts +0 -4
- package/littleWarden/server/getUrlStatus.js +0 -12
- package/littleWarden/server/index.d.ts +0 -2
- package/littleWarden/server/index.js +0 -2
- package/littleWarden/server/littleWarden.d.ts +0 -30
- package/littleWarden/server/littleWarden.js +0 -65
- package/lumar/api/server/buildRequest.d.ts +0 -13
- package/lumar/api/server/buildRequest.js +0 -76
- package/lumar/api/server/getData.d.ts +0 -1
- package/lumar/api/server/getData.js +0 -9
- package/lumar/api/server/index.d.ts +0 -4
- package/lumar/api/server/index.js +0 -4
- package/lumar/api/server/initClient.d.ts +0 -6
- package/lumar/api/server/initClient.js +0 -22
- package/lumar/api/server/lumarApi.d.ts +0 -36
- package/lumar/api/server/lumarApi.js +0 -24
- package/lumar/graphql/server/columns.d.ts +0 -29
- package/lumar/graphql/server/columns.js +0 -28
- package/lumar/graphql/server/getData.d.ts +0 -1
- package/lumar/graphql/server/getData.js +0 -15
- package/lumar/graphql/server/index.d.ts +0 -11
- package/lumar/graphql/server/index.js +0 -11
- package/lumar/graphql/server/initClient.d.ts +0 -5
- package/lumar/graphql/server/initClient.js +0 -21
- package/lumar/graphql/server/lumarGraphql.d.ts +0 -27
- package/lumar/graphql/server/lumarGraphql.js +0 -27
- package/lumar/graphql/server/queries/crawl.d.ts +0 -5
- package/lumar/graphql/server/queries/crawl.js +0 -1
- package/lumar/graphql/server/queries/getCrawls.d.ts +0 -18
- package/lumar/graphql/server/queries/getCrawls.js +0 -31
- package/lumar/graphql/server/queries/getReportDifferences.d.ts +0 -24
- package/lumar/graphql/server/queries/getReportDifferences.js +0 -35
- package/lumar/graphql/server/queries/getRows.d.ts +0 -38
- package/lumar/graphql/server/queries/getRows.js +0 -55
- package/lumar/graphql/server/queries/getTotals.d.ts +0 -25
- package/lumar/graphql/server/queries/getTotals.js +0 -38
- package/lumar/graphql/server/queries/row.d.ts +0 -157
- package/lumar/graphql/server/queries/row.js +0 -1
- package/lumar/graphql/server/reportTemplates.d.ts +0 -68
- package/lumar/graphql/server/reportTemplates.js +0 -67
- package/myTarget/server/index.d.ts +0 -1
- package/myTarget/server/index.js +0 -1
- package/myTarget/server/myTarget.d.ts +0 -5
- package/myTarget/server/myTarget.js +0 -13
- package/nextAuth/index.d.ts +0 -2
- package/nextAuth/index.js +0 -2
- package/nextAuth/isSessionReady.d.ts +0 -1
- package/nextAuth/isSessionReady.js +0 -3
- package/nextAuth/nextAuth.d.ts +0 -7
- package/nextAuth/nextAuth.js +0 -6
- package/nextJs/client/LazyLoad.d.ts +0 -8
- package/nextJs/client/LazyLoad.js +0 -7
- package/nextJs/client/index.d.ts +0 -1
- package/nextJs/client/index.js +0 -1
- package/nextJs/index.d.ts +0 -1
- package/nextJs/index.js +0 -1
- package/nextJs/nextJs.d.ts +0 -12
- package/nextJs/nextJs.js +0 -8
- package/number/format.d.ts +0 -12
- package/number/format.js +0 -16
- package/number/formatCurrency.d.ts +0 -5
- package/number/formatCurrency.js +0 -17
- package/number/getDecimal.d.ts +0 -4
- package/number/getDecimal.js +0 -8
- package/number/getNumber.d.ts +0 -4
- package/number/getNumber.js +0 -44
- package/number/getPercent.d.ts +0 -1
- package/number/getPercent.js +0 -11
- package/number/getPercentIncrease.d.ts +0 -4
- package/number/getPercentIncrease.js +0 -12
- package/number/getSafeDivide.d.ts +0 -11
- package/number/getSafeDivide.js +0 -16
- package/number/index.d.ts +0 -7
- package/number/index.js +0 -7
- package/object/index.d.ts +0 -1
- package/object/index.js +0 -1
- package/object/replaceKeys.js +0 -21
- package/onePassword/server/OnePasswordNamespace.d.ts +0 -12
- package/onePassword/server/OnePasswordNamespace.js +0 -39
- package/onePassword/server/index.d.ts +0 -2
- package/onePassword/server/index.js +0 -2
- package/onePassword/server/onePassword.d.ts +0 -8
- package/onePassword/server/onePassword.js +0 -21
- package/openAi/server/OpenAiNamespace.d.ts +0 -11
- package/openAi/server/OpenAiNamespace.js +0 -35
- package/openAi/server/index.d.ts +0 -2
- package/openAi/server/index.js +0 -2
- package/openAi/server/openAi.d.ts +0 -6
- package/openAi/server/openAi.js +0 -26
- package/prisma/getDecimal.d.ts +0 -4
- package/prisma/getDecimal.js +0 -16
- package/prisma/index.d.ts +0 -1
- package/prisma/index.js +0 -1
- package/prisma/server/PrismaNamespace.d.ts +0 -7
- package/prisma/server/PrismaNamespace.js +0 -62
- package/prisma/server/index.d.ts +0 -2
- package/prisma/server/index.js +0 -2
- package/prisma/server/prisma.d.ts +0 -20
- package/prisma/server/prisma.js +0 -26
- package/snapchat/server/SnapchatNamespace.d.ts +0 -15
- package/snapchat/server/SnapchatNamespace.js +0 -22
- package/snapchat/server/index.d.ts +0 -2
- package/snapchat/server/index.js +0 -2
- package/snapchat/server/snapchat.d.ts +0 -7
- package/snapchat/server/snapchat.js +0 -26
- package/sorting/byNumberAscending.d.ts +0 -4
- package/sorting/byNumberAscending.js +0 -15
- package/sorting/byNumberDescending.d.ts +0 -4
- package/sorting/byNumberDescending.js +0 -18
- package/sorting/byStringAscending.d.ts +0 -4
- package/sorting/byStringAscending.js +0 -12
- package/sorting/byStringDescending.d.ts +0 -4
- package/sorting/byStringDescending.js +0 -12
- package/sorting/index.d.ts +0 -1
- package/sorting/index.js +0 -1
- package/sorting/sorting.d.ts +0 -4
- package/sorting/sorting.js +0 -4
- package/stream/server/index.d.ts +0 -1
- package/stream/server/index.js +0 -1
- package/stream/server/sort.d.ts +0 -13
- package/stream/server/sort.js +0 -47
- package/string/getCapitalised.d.ts +0 -5
- package/string/getCapitalised.js +0 -21
- package/string/getClean.d.ts +0 -18
- package/string/getClean.js +0 -47
- package/string/getFolder.d.ts +0 -4
- package/string/getFolder.js +0 -8
- package/string/getProperCase.d.ts +0 -11
- package/string/getProperCase.js +0 -43
- package/string/getString.d.ts +0 -4
- package/string/getString.js +0 -27
- package/string/getStringFromStream.d.ts +0 -5
- package/string/getStringFromStream.js +0 -13
- package/string/getUnescaped.d.ts +0 -6
- package/string/getUnescaped.js +0 -19
- package/string/getWithoutAccents.d.ts +0 -5
- package/string/getWithoutAccents.js +0 -9
- package/string/getWithoutHtmlTags.d.ts +0 -5
- package/string/getWithoutHtmlTags.js +0 -8
- package/string/getWithoutPunctuation.d.ts +0 -5
- package/string/getWithoutPunctuation.js +0 -9
- package/string/getWithoutUnderscores.d.ts +0 -4
- package/string/getWithoutUnderscores.js +0 -7
- package/string/getWithoutWhitespaces.d.ts +0 -5
- package/string/getWithoutWhitespaces.js +0 -9
- package/string/index.d.ts +0 -13
- package/string/index.js +0 -13
- package/string/reservedWords.d.ts +0 -5
- package/string/reservedWords.js +0 -22
- package/swr/client/index.d.ts +0 -1
- package/swr/client/index.js +0 -1
- package/swr/client/swr.d.ts +0 -42
- package/swr/client/swr.js +0 -50
- package/upTimeRobot/server/UpTimeRobotNamespace.d.ts +0 -31
- package/upTimeRobot/server/UpTimeRobotNamespace.js +0 -40
- package/upTimeRobot/server/index.d.ts +0 -2
- package/upTimeRobot/server/index.js +0 -2
- package/upTimeRobot/server/upTimeRobot.d.ts +0 -38
- package/upTimeRobot/server/upTimeRobot.js +0 -59
- package/url/index.d.ts +0 -1
- package/url/index.js +0 -1
- package/url/server/index.d.ts +0 -1
- package/url/server/index.js +0 -1
- package/url/server/writeUrlContents.d.ts +0 -6
- package/url/server/writeUrlContents.js +0 -35
- package/url/url.d.ts +0 -26
- package/url/url.js +0 -59
- package/util/defaultTo.d.ts +0 -4
- package/util/defaultTo.js +0 -37
- package/util/getClean.d.ts +0 -11
- package/util/getClean.js +0 -19
- package/util/getError.d.ts +0 -1
- package/util/getError.js +0 -10
- package/util/getWithoutHash.d.ts +0 -4
- package/util/getWithoutHash.js +0 -14
- package/util/getWithoutParameter.d.ts +0 -4
- package/util/getWithoutParameter.js +0 -14
- package/util/index.d.ts +0 -7
- package/util/index.js +0 -7
- package/util/isUndefined.d.ts +0 -4
- package/util/isUndefined.js +0 -9
- package/util/promiseChunks.d.ts +0 -5
- package/util/promiseChunks.js +0 -21
- package/util/server/getBrotliCompressed.d.ts +0 -5
- package/util/server/getBrotliCompressed.js +0 -16
- package/util/server/getBrotliDecompressed.d.ts +0 -5
- package/util/server/getBrotliDecompressed.js +0 -17
- package/util/server/getGzipCompressed.d.ts +0 -5
- package/util/server/getGzipCompressed.js +0 -16
- package/util/server/getGzipDecompressed.d.ts +0 -5
- package/util/server/getGzipDecompressed.js +0 -17
- package/util/server/index.d.ts +0 -4
- package/util/server/index.js +0 -4
- package/util/sleep.d.ts +0 -1
- package/util/sleep.js +0 -3
- package/webWorker/index.d.ts +0 -1
- package/webWorker/index.js +0 -1
- package/webWorker/webWorker.d.ts +0 -8
- package/webWorker/webWorker.js +0 -7
- package/xml/server/getXml.d.ts +0 -1
- package/xml/server/getXml.js +0 -14
- package/xml/server/index.d.ts +0 -1
- package/xml/server/index.js +0 -1
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
export type { OpenAiNamespace } from "./OpenAiNamespace";
|
|
2
|
-
import { OpenAiNamespace } from "./OpenAiNamespace";
|
|
3
|
-
export type OpenAiConfig = {
|
|
4
|
-
apiKey: string;
|
|
5
|
-
};
|
|
6
|
-
export declare const openAiClient: (key?: string, config?: OpenAiConfig, vaultId?: string, itemId?: string) => Promise<OpenAiNamespace>;
|
package/openAi/server/openAi.js
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { OpenAiNamespace } from "./OpenAiNamespace";
|
|
2
|
-
import { onePasswordClient } from "../../onePassword/server";
|
|
3
|
-
const openAiNamespaces = new Map();
|
|
4
|
-
export const openAiClient = async (key = "default", config, vaultId, itemId) => {
|
|
5
|
-
if (openAiNamespaces.has(key)) {
|
|
6
|
-
return openAiNamespaces.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.OPEN_AI_VAULT_ID && process.env.OPEN_AI_ITEM_ID) {
|
|
17
|
-
instanceConfig = await (await onePasswordClient())
|
|
18
|
-
.getJsonNote(process.env.OPEN_AI_VAULT_ID, process.env.OPEN_AI_ITEM_ID);
|
|
19
|
-
}
|
|
20
|
-
else {
|
|
21
|
-
throw new Error(`Config required for namespace '${key}'`);
|
|
22
|
-
}
|
|
23
|
-
const namespace = new OpenAiNamespace(key, instanceConfig);
|
|
24
|
-
openAiNamespaces.set(key, namespace);
|
|
25
|
-
return namespace;
|
|
26
|
-
};
|
package/prisma/getDecimal.d.ts
DELETED
package/prisma/getDecimal.js
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { getDecimal as getNumberDecimal } from "../number/getDecimal";
|
|
2
|
-
import isArray from "lodash/isArray";
|
|
3
|
-
/**
|
|
4
|
-
* Fetch the number from a prisma decimal (comes through as an object).
|
|
5
|
-
*/
|
|
6
|
-
export const getDecimal = (input, dp = 2) => {
|
|
7
|
-
let numberString = "";
|
|
8
|
-
// Prisma value
|
|
9
|
-
if (isArray(input?.d)) {
|
|
10
|
-
numberString = input.absoluteValue();
|
|
11
|
-
}
|
|
12
|
-
else {
|
|
13
|
-
numberString = input.toString();
|
|
14
|
-
}
|
|
15
|
-
return getNumberDecimal(numberString, dp);
|
|
16
|
-
};
|
package/prisma/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./getDecimal";
|
package/prisma/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./getDecimal";
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
import { BaseNamespace } from "../../_class";
|
|
2
|
-
import { getError } from "../../util/getError";
|
|
3
|
-
export class PrismaNamespace extends BaseNamespace {
|
|
4
|
-
// Async setup to only initialise where required
|
|
5
|
-
ensureInit = async () => {
|
|
6
|
-
if (!this.client) {
|
|
7
|
-
let adapter = null;
|
|
8
|
-
if (this.config.isPlanetScale) {
|
|
9
|
-
try {
|
|
10
|
-
const { PrismaPlanetScale } = await import("@prisma/adapter-planetscale");
|
|
11
|
-
adapter = new PrismaPlanetScale({
|
|
12
|
-
url: this.config.url,
|
|
13
|
-
});
|
|
14
|
-
}
|
|
15
|
-
catch (e) {
|
|
16
|
-
throw new Error(`PlanetScale adapter not installed - ${getError(e)}`);
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
if (this.config.isMysql) {
|
|
20
|
-
try {
|
|
21
|
-
const { PrismaMariaDb } = await import("@prisma/adapter-mariadb");
|
|
22
|
-
adapter = new PrismaMariaDb(this.config.url);
|
|
23
|
-
}
|
|
24
|
-
catch (e) {
|
|
25
|
-
throw new Error(`MariaDB adapter not installed - ${getError(e)}`);
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
else {
|
|
29
|
-
// Prisma v7 requires a driver adapter — use the one matching your database
|
|
30
|
-
// e.g. @prisma/adapter-pg for Postgres, @prisma/adapter-mysql2 for MySQL
|
|
31
|
-
try {
|
|
32
|
-
const { PrismaPg } = await import("@prisma/adapter-pg");
|
|
33
|
-
adapter = new PrismaPg({
|
|
34
|
-
connectionString: process.env.DATABASE_URL,
|
|
35
|
-
});
|
|
36
|
-
}
|
|
37
|
-
catch (e) {
|
|
38
|
-
throw new Error(`Postgres adapter not installed - ${getError(e)}`);
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
try {
|
|
42
|
-
// In Prisma v7, the client is generated to a custom output path
|
|
43
|
-
// @ts-ignore
|
|
44
|
-
const { PrismaClient } = await import("../../generated/prisma/client");
|
|
45
|
-
// Show the full query if debugging
|
|
46
|
-
if (this.config.isDebug) {
|
|
47
|
-
this.client = new PrismaClient({
|
|
48
|
-
adapter,
|
|
49
|
-
log: [{ emit: "event", level: "query" }],
|
|
50
|
-
});
|
|
51
|
-
}
|
|
52
|
-
// Standard prisma
|
|
53
|
-
else {
|
|
54
|
-
this.client = new PrismaClient({ adapter });
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
catch (e) {
|
|
58
|
-
throw new Error(`Prisma Client not installed - ${getError(e)}`);
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
};
|
|
62
|
-
}
|
package/prisma/server/index.d.ts
DELETED
package/prisma/server/index.js
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { PrismaNamespace } from "./PrismaNamespace";
|
|
2
|
-
export type PrismaConfig = {
|
|
3
|
-
url: string;
|
|
4
|
-
isDebug: boolean;
|
|
5
|
-
isPlanetScale: boolean;
|
|
6
|
-
isMysql: boolean;
|
|
7
|
-
isPostgres: boolean;
|
|
8
|
-
};
|
|
9
|
-
/**
|
|
10
|
-
* Minimal interface representing a Prisma Client instance.
|
|
11
|
-
* Consumers of this library will have their own generated PrismaClient
|
|
12
|
-
* that satisfies this interface.
|
|
13
|
-
*/
|
|
14
|
-
export interface PrismaClientLike {
|
|
15
|
-
$connect(): Promise<void>;
|
|
16
|
-
$disconnect(): Promise<void>;
|
|
17
|
-
$transaction(...args: any[]): Promise<any>;
|
|
18
|
-
[key: string]: any;
|
|
19
|
-
}
|
|
20
|
-
export declare const prismaClient: (key?: string, config?: PrismaConfig) => Promise<PrismaNamespace>;
|
package/prisma/server/prisma.js
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { PrismaNamespace } from "./PrismaNamespace";
|
|
2
|
-
const prismaNamespaces = new Map();
|
|
3
|
-
// Main client that is used by system
|
|
4
|
-
export const prismaClient = async (key = "default", config) => {
|
|
5
|
-
if (prismaNamespaces.has(key)) {
|
|
6
|
-
return prismaNamespaces.get(key);
|
|
7
|
-
}
|
|
8
|
-
if (!config) {
|
|
9
|
-
if (key === "default") {
|
|
10
|
-
config = {
|
|
11
|
-
url: process.env.DATABASE_URL,
|
|
12
|
-
isDebug: 'true' === process.env.DATABASE_IS_DEBUG,
|
|
13
|
-
isPlanetScale: 'true' === process.env.DATABASE_IS_PLANETSCALE,
|
|
14
|
-
isMysql: 'true' === process.env.DATABASE_IS_MYSQL,
|
|
15
|
-
isPostgres: 'true' === process.env.DATABASE_IS_POSTGRES,
|
|
16
|
-
};
|
|
17
|
-
}
|
|
18
|
-
else {
|
|
19
|
-
throw new Error(`Config required for namespace '${key}'`);
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
const namespace = new PrismaNamespace(key, config);
|
|
23
|
-
await namespace.ensureInit();
|
|
24
|
-
prismaNamespaces.set(key, namespace);
|
|
25
|
-
return namespace;
|
|
26
|
-
};
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import type { SnapchatConfig } from "./";
|
|
2
|
-
import { BaseNamespace } from "../../_class";
|
|
3
|
-
type Client = {
|
|
4
|
-
expires: number;
|
|
5
|
-
refreshToken: string;
|
|
6
|
-
};
|
|
7
|
-
export declare class SnapchatNamespace extends BaseNamespace {
|
|
8
|
-
client: Client;
|
|
9
|
-
config: SnapchatConfig;
|
|
10
|
-
/**
|
|
11
|
-
* Renew the access token as it expires every 3 hours.
|
|
12
|
-
*/
|
|
13
|
-
ensureInit: () => Promise<void>;
|
|
14
|
-
}
|
|
15
|
-
export {};
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { BaseNamespace } from "../../_class";
|
|
2
|
-
import { post } from "../../axios";
|
|
3
|
-
import { DateTime } from "luxon";
|
|
4
|
-
export class SnapchatNamespace extends BaseNamespace {
|
|
5
|
-
/**
|
|
6
|
-
* Renew the access token as it expires every 3 hours.
|
|
7
|
-
*/
|
|
8
|
-
ensureInit = async () => {
|
|
9
|
-
if (!this.client) {
|
|
10
|
-
// Build the token request for Snapchat
|
|
11
|
-
const url = `https://accounts.snapchat.com/login/oauth2/access_token?client_id=${this.config.clientId}&client_secret=${this.config.clientSecret}&grant_type=refresh_token&refresh_token=${this.config.refreshToken}`;
|
|
12
|
-
const apiResponse = await post(url);
|
|
13
|
-
if (apiResponse.isSuccess()) {
|
|
14
|
-
this.client = {
|
|
15
|
-
expires: DateTime.now()
|
|
16
|
-
.toUnixInteger() + (3 * 60 * 60 * 1000),
|
|
17
|
-
refreshToken: apiResponse.getBodyDefaultTo(["data", "access_token"], null)
|
|
18
|
-
};
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
};
|
|
22
|
-
}
|
package/snapchat/server/index.js
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { SnapchatNamespace } from "./SnapchatNamespace";
|
|
2
|
-
export type SnapchatConfig = {
|
|
3
|
-
clientId: string;
|
|
4
|
-
clientSecret: string;
|
|
5
|
-
refreshToken: string;
|
|
6
|
-
};
|
|
7
|
-
export declare const snapchatClient: (key?: string, config?: SnapchatConfig, vaultId?: string, itemId?: string) => Promise<SnapchatNamespace>;
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { SnapchatNamespace } from "./SnapchatNamespace";
|
|
2
|
-
import { onePasswordClient } from "../../onePassword/server";
|
|
3
|
-
const snapchatNamespaces = new Map();
|
|
4
|
-
export const snapchatClient = async (key = "default", config, vaultId, itemId) => {
|
|
5
|
-
if (snapchatNamespaces.has(key)) {
|
|
6
|
-
return snapchatNamespaces.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.SNAPCHAT_VAULT_ID && process.env.SNAPCHAT_ITEM_ID) {
|
|
17
|
-
instanceConfig = await (await onePasswordClient())
|
|
18
|
-
.getJsonNote(process.env.SNAPCHAT_VAULT_ID, process.env.SNAPCHAT_ITEM_ID);
|
|
19
|
-
}
|
|
20
|
-
else {
|
|
21
|
-
throw new Error(`Config required for namespace '${key}'`);
|
|
22
|
-
}
|
|
23
|
-
const namespace = new SnapchatNamespace(key, instanceConfig);
|
|
24
|
-
snapchatNamespaces.set(key, namespace);
|
|
25
|
-
return namespace;
|
|
26
|
-
};
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Take two values, ensure they are numbers and return the sorting value.
|
|
3
|
-
*/
|
|
4
|
-
export const byNumberAscending = (valueA, valueB) => {
|
|
5
|
-
const a = Number(valueA);
|
|
6
|
-
const b = Number(valueB);
|
|
7
|
-
// Handle NaN cases
|
|
8
|
-
if (isNaN(a) && isNaN(b))
|
|
9
|
-
return 0;
|
|
10
|
-
if (isNaN(a))
|
|
11
|
-
return 1;
|
|
12
|
-
if (isNaN(b))
|
|
13
|
-
return -1;
|
|
14
|
-
return a - b;
|
|
15
|
-
};
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Take two values, ensure they are numbers and return the sorting value.
|
|
3
|
-
*/
|
|
4
|
-
export const byNumberDescending = (valueA, valueB) => {
|
|
5
|
-
const a = Number(valueA);
|
|
6
|
-
const b = Number(valueB);
|
|
7
|
-
// Handle NaN cases
|
|
8
|
-
if (isNaN(a) && isNaN(b)) {
|
|
9
|
-
return 0;
|
|
10
|
-
}
|
|
11
|
-
if (isNaN(a)) {
|
|
12
|
-
return 1;
|
|
13
|
-
}
|
|
14
|
-
if (isNaN(b)) {
|
|
15
|
-
return -1;
|
|
16
|
-
}
|
|
17
|
-
return b - a;
|
|
18
|
-
};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Take two values, clean the strings and return the sorting value.
|
|
3
|
-
*/
|
|
4
|
-
export const byStringAscending = (valueA, valueB) => {
|
|
5
|
-
const valueAClean = valueA.toString()
|
|
6
|
-
.trim()
|
|
7
|
-
.toLowerCase();
|
|
8
|
-
const valueBClean = valueB.toString()
|
|
9
|
-
.trim()
|
|
10
|
-
.toLowerCase();
|
|
11
|
-
return valueAClean.localeCompare(valueBClean);
|
|
12
|
-
};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Take two values, clean the strings and return the sorting value.
|
|
3
|
-
*/
|
|
4
|
-
export const byStringDescending = (valueA, valueB) => {
|
|
5
|
-
const valueAClean = valueA.toString()
|
|
6
|
-
.trim()
|
|
7
|
-
.toLowerCase();
|
|
8
|
-
const valueBClean = valueB.toString()
|
|
9
|
-
.trim()
|
|
10
|
-
.toLowerCase();
|
|
11
|
-
return valueBClean.localeCompare(valueAClean);
|
|
12
|
-
};
|
package/sorting/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./sorting";
|
package/sorting/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./sorting";
|
package/sorting/sorting.d.ts
DELETED
package/sorting/sorting.js
DELETED
package/stream/server/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./sort";
|
package/stream/server/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./sort";
|
package/stream/server/sort.d.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
declare const Transform: any;
|
|
2
|
-
/**
|
|
3
|
-
* Batch sort stream without overloading the memory limit.
|
|
4
|
-
* https://www.npmjs.com/package/fast-stream-sort
|
|
5
|
-
*/
|
|
6
|
-
declare class SortStreamer extends Transform {
|
|
7
|
-
constructor(options: any, comp: any);
|
|
8
|
-
_transform(data: any, _: any, callback: any): void;
|
|
9
|
-
_flush(): void;
|
|
10
|
-
fullflush(): void;
|
|
11
|
-
}
|
|
12
|
-
export declare const sort: (comp: any, options: any) => SortStreamer;
|
|
13
|
-
export {};
|
package/stream/server/sort.js
DELETED
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
const Transform = require("stream").Transform;
|
|
2
|
-
const batch = 15000;
|
|
3
|
-
/**
|
|
4
|
-
* Batch sort stream without overloading the memory limit.
|
|
5
|
-
* https://www.npmjs.com/package/fast-stream-sort
|
|
6
|
-
*/
|
|
7
|
-
class SortStreamer extends Transform {
|
|
8
|
-
constructor(options, comp) {
|
|
9
|
-
super(options);
|
|
10
|
-
this.a = new Array(batch);
|
|
11
|
-
this.i = 0;
|
|
12
|
-
this.k = 0;
|
|
13
|
-
this.currentSize = batch;
|
|
14
|
-
this.isDone = false;
|
|
15
|
-
this.sortedArray = undefined;
|
|
16
|
-
this.comp = comp;
|
|
17
|
-
}
|
|
18
|
-
_transform(data, _, callback) {
|
|
19
|
-
if (data) {
|
|
20
|
-
this.a[this.i++] = data;
|
|
21
|
-
if (this.i == this.currentSize) {
|
|
22
|
-
this.currentSize = this.currentSize * 2;
|
|
23
|
-
var tmp = new Array(this.currentSize);
|
|
24
|
-
for (var j = 0; j < this.i; j++) {
|
|
25
|
-
tmp[j] = this.a[j];
|
|
26
|
-
}
|
|
27
|
-
this.a = tmp;
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
callback();
|
|
31
|
-
}
|
|
32
|
-
_flush() {
|
|
33
|
-
this.sortedArray = this.a.slice(0, this.i)
|
|
34
|
-
.sort(this.comp);
|
|
35
|
-
this.fullflush();
|
|
36
|
-
}
|
|
37
|
-
fullflush() {
|
|
38
|
-
while (this.k < this.i) {
|
|
39
|
-
this.push(this.sortedArray[this.k++]);
|
|
40
|
-
}
|
|
41
|
-
this.push(null);
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
export const sort = (comp, options) => {
|
|
45
|
-
options = options || { objectMode: true };
|
|
46
|
-
return new SortStreamer(options, comp);
|
|
47
|
-
};
|
package/string/getCapitalised.js
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { isReservedWord } from "./reservedWords";
|
|
2
|
-
/**
|
|
3
|
-
* Convert a string into Capitalised Text.
|
|
4
|
-
* https://stackoverflow.com/a/196991/2664955
|
|
5
|
-
*/
|
|
6
|
-
export const getCapitalised = (input, split = "_") => {
|
|
7
|
-
const regex = new RegExp(split || "_", "g");
|
|
8
|
-
return input
|
|
9
|
-
.replace(regex, " ")
|
|
10
|
-
.replace(/\w\S*/g, function (txt) {
|
|
11
|
-
// Check if individual word is reserved
|
|
12
|
-
const reservedWord = isReservedWord(txt);
|
|
13
|
-
if (reservedWord) {
|
|
14
|
-
return reservedWord;
|
|
15
|
-
}
|
|
16
|
-
// Regular capitalization for non-reserved words
|
|
17
|
-
return txt.charAt(0)
|
|
18
|
-
.toUpperCase() + txt.substr(1)
|
|
19
|
-
.toLowerCase();
|
|
20
|
-
});
|
|
21
|
-
};
|
package/string/getClean.d.ts
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
type GetCleanProps = {
|
|
2
|
-
accents?: boolean;
|
|
3
|
-
decoded?: boolean;
|
|
4
|
-
htmlTags?: boolean;
|
|
5
|
-
input: any;
|
|
6
|
-
lowercase?: boolean;
|
|
7
|
-
propercase?: boolean;
|
|
8
|
-
punctuation?: boolean;
|
|
9
|
-
trim?: boolean;
|
|
10
|
-
underscores?: boolean;
|
|
11
|
-
uppercase?: boolean;
|
|
12
|
-
whitespace?: boolean;
|
|
13
|
-
};
|
|
14
|
-
/**
|
|
15
|
-
* Shorthand function to get a clean version of a string.
|
|
16
|
-
*/
|
|
17
|
-
export declare const getClean: (props: GetCleanProps) => string;
|
|
18
|
-
export {};
|
package/string/getClean.js
DELETED
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import { getString } from "./getString";
|
|
2
|
-
import { getWithoutHtmlTags } from "./getWithoutHtmlTags";
|
|
3
|
-
import { getWithoutAccents } from "./getWithoutAccents";
|
|
4
|
-
import { getProperCase } from "./getProperCase";
|
|
5
|
-
import { getWithoutWhitespaces } from "./getWithoutWhitespaces";
|
|
6
|
-
import { getWithoutPunctuation } from "./getWithoutPunctuation";
|
|
7
|
-
import { getWithoutUnderscores } from "./getWithoutUnderscores";
|
|
8
|
-
import { getUnescaped } from "./getUnescaped";
|
|
9
|
-
/**
|
|
10
|
-
* Shorthand function to get a clean version of a string.
|
|
11
|
-
*/
|
|
12
|
-
export const getClean = (props) => {
|
|
13
|
-
let response = getString(props.input);
|
|
14
|
-
if (props.decoded) {
|
|
15
|
-
response = getUnescaped(response);
|
|
16
|
-
}
|
|
17
|
-
if (props.accents) {
|
|
18
|
-
response = getWithoutAccents(response);
|
|
19
|
-
}
|
|
20
|
-
if (props.htmlTags) {
|
|
21
|
-
response = getWithoutHtmlTags(response);
|
|
22
|
-
}
|
|
23
|
-
if (props.underscores) {
|
|
24
|
-
response = getWithoutUnderscores(response);
|
|
25
|
-
}
|
|
26
|
-
if (props.punctuation) {
|
|
27
|
-
response = getWithoutPunctuation(response);
|
|
28
|
-
}
|
|
29
|
-
if (props.whitespace) {
|
|
30
|
-
response = getWithoutWhitespaces(response);
|
|
31
|
-
}
|
|
32
|
-
if (props.lowercase) {
|
|
33
|
-
response = response.toLowerCase();
|
|
34
|
-
}
|
|
35
|
-
if (props.propercase) {
|
|
36
|
-
response = getProperCase({
|
|
37
|
-
input: response,
|
|
38
|
-
});
|
|
39
|
-
}
|
|
40
|
-
if (props.uppercase) {
|
|
41
|
-
response = response.toUpperCase();
|
|
42
|
-
}
|
|
43
|
-
if (props.trim) {
|
|
44
|
-
response = response.trim();
|
|
45
|
-
}
|
|
46
|
-
return response;
|
|
47
|
-
};
|
package/string/getFolder.d.ts
DELETED
package/string/getFolder.js
DELETED
package/string/getProperCase.js
DELETED
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import { isReservedWord, reservedWords } from "./reservedWords";
|
|
2
|
-
/**
|
|
3
|
-
* Return a string "With Proper Casing".
|
|
4
|
-
*/
|
|
5
|
-
export const getProperCase = (props) => {
|
|
6
|
-
const cleanInput = props.input.toString()
|
|
7
|
-
.trim();
|
|
8
|
-
// Don't process if the entire input is a reserved word
|
|
9
|
-
if (reservedWords.includes(cleanInput.toUpperCase())) {
|
|
10
|
-
return cleanInput;
|
|
11
|
-
}
|
|
12
|
-
// Build the split pattern - always include spaces
|
|
13
|
-
let splitPattern = /\s+/;
|
|
14
|
-
// Add optional separators based on user preferences
|
|
15
|
-
const separators = [];
|
|
16
|
-
if (props?.hyphen) {
|
|
17
|
-
separators.push("-");
|
|
18
|
-
}
|
|
19
|
-
if (props?.pipe) {
|
|
20
|
-
separators.push("\\|");
|
|
21
|
-
}
|
|
22
|
-
if (props?.underscore) {
|
|
23
|
-
separators.push("_");
|
|
24
|
-
}
|
|
25
|
-
if (separators.length > 0) {
|
|
26
|
-
splitPattern = new RegExp(`[\\s${separators.join("")}]+`, "g");
|
|
27
|
-
}
|
|
28
|
-
// Split the input into words and apply proper casing
|
|
29
|
-
const words = cleanInput.split(splitPattern)
|
|
30
|
-
.filter(word => word.length > 0) // Remove empty strings
|
|
31
|
-
.map(word => {
|
|
32
|
-
// Check if individual word is reserved
|
|
33
|
-
const reservedWord = isReservedWord(word);
|
|
34
|
-
if (reservedWord) {
|
|
35
|
-
return reservedWord;
|
|
36
|
-
}
|
|
37
|
-
// Apply proper case
|
|
38
|
-
return word.charAt(0)
|
|
39
|
-
.toUpperCase() + word.slice(1)
|
|
40
|
-
.toLowerCase();
|
|
41
|
-
});
|
|
42
|
-
return words.join(' ');
|
|
43
|
-
};
|
package/string/getString.d.ts
DELETED
package/string/getString.js
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import isArray from "lodash/isArray";
|
|
2
|
-
import isDate from "lodash/isDate";
|
|
3
|
-
import isObject from "lodash/isObject";
|
|
4
|
-
import { getYmdString } from "../date";
|
|
5
|
-
/**
|
|
6
|
-
* Convert into string.
|
|
7
|
-
*/
|
|
8
|
-
export const getString = (input) => {
|
|
9
|
-
let string = "";
|
|
10
|
-
// Already a string
|
|
11
|
-
if ("string" === typeof input) {
|
|
12
|
-
string = input;
|
|
13
|
-
}
|
|
14
|
-
// Convert a number into a date
|
|
15
|
-
else if ("number" === typeof input) {
|
|
16
|
-
string = input.toString();
|
|
17
|
-
}
|
|
18
|
-
// Object or array to JSON
|
|
19
|
-
else if (isObject(input) || isArray(input)) {
|
|
20
|
-
string = JSON.stringify(input);
|
|
21
|
-
}
|
|
22
|
-
// Date
|
|
23
|
-
else if (isDate(input)) {
|
|
24
|
-
string = getYmdString(input);
|
|
25
|
-
}
|
|
26
|
-
return string;
|
|
27
|
-
};
|