@8ms/helpers 1.38.0 → 2.0.0
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 +22 -14
- package/.yarn/install-state.gz +0 -0
- package/.yarn/releases/yarn-4.9.2.cjs +942 -0
- package/.yarnrc.yml +2 -0
- package/README.md +12 -0
- package/package.json +175 -46
- package/api/ApiResponse.d.ts +0 -50
- package/api/ApiResponse.js +0 -94
- package/api/index.d.ts +0 -9
- package/api/index.js +0 -13
- package/api/isError.d.ts +0 -6
- package/api/isError.js +0 -7
- package/api/isSuccess.d.ts +0 -6
- package/api/isSuccess.js +0 -7
- package/api/response.d.ts +0 -8
- package/api/response.js +0 -9
- package/array/contains.d.ts +0 -9
- package/array/contains.js +0 -7
- package/array/getArray.d.ts +0 -8
- package/array/getArray.js +0 -11
- package/atInternet/request.d.ts +0 -30
- package/atInternet/request.js +0 -2
- package/aws/athenaExpress/initClient.d.ts +0 -12
- package/aws/athenaExpress/initClient.js +0 -31
- package/aws/athenaExpress/query.d.ts +0 -8
- package/aws/athenaExpress/query.js +0 -16
- package/aws/ec2/initClient.d.ts +0 -11
- package/aws/ec2/initClient.js +0 -23
- package/aws/ec2/startInstances.d.ts +0 -11
- package/aws/ec2/startInstances.js +0 -18
- package/aws/ec2/stopInstances.d.ts +0 -12
- package/aws/ec2/stopInstances.js +0 -19
- package/aws/ecs/getClusters.d.ts +0 -9
- package/aws/ecs/getClusters.js +0 -32
- package/aws/ecs/getTaskDefinitions.d.ts +0 -13
- package/aws/ecs/getTaskDefinitions.js +0 -35
- package/aws/ecs/getTasks.d.ts +0 -16
- package/aws/ecs/getTasks.js +0 -38
- package/aws/ecs/initClient.d.ts +0 -11
- package/aws/ecs/initClient.js +0 -23
- package/aws/ecs/runTask.d.ts +0 -16
- package/aws/ecs/runTask.js +0 -30
- package/aws/getConfig.d.ts +0 -13
- package/aws/getConfig.js +0 -27
- package/aws/glue/initClient.d.ts +0 -10
- package/aws/glue/initClient.js +0 -21
- package/aws/glue/invoke.d.ts +0 -9
- package/aws/glue/invoke.js +0 -23
- package/aws/isResponse200.d.ts +0 -7
- package/aws/isResponse200.js +0 -22
- package/aws/lambda/getHandlerPath.d.ts +0 -5
- package/aws/lambda/getHandlerPath.js +0 -7
- package/aws/lambda/initClient.d.ts +0 -10
- package/aws/lambda/initClient.js +0 -21
- package/aws/lambda/invoke.d.ts +0 -13
- package/aws/lambda/invoke.js +0 -61
- package/aws/s3/copyFile.d.ts +0 -13
- package/aws/s3/copyFile.js +0 -14
- package/aws/s3/deleteFile.d.ts +0 -9
- package/aws/s3/deleteFile.js +0 -13
- package/aws/s3/deleteFiles.d.ts +0 -9
- package/aws/s3/deleteFiles.js +0 -17
- package/aws/s3/deleteFolder.d.ts +0 -9
- package/aws/s3/deleteFolder.js +0 -36
- package/aws/s3/getGlueJson.d.ts +0 -8
- package/aws/s3/getGlueJson.js +0 -11
- package/aws/s3/getPresignedPost.d.ts +0 -20
- package/aws/s3/getPresignedPost.js +0 -19
- package/aws/s3/getSignedUrl.d.ts +0 -12
- package/aws/s3/getSignedUrl.js +0 -17
- package/aws/s3/initClient.d.ts +0 -10
- package/aws/s3/initClient.js +0 -19
- package/aws/s3/isFileExists.d.ts +0 -9
- package/aws/s3/isFileExists.js +0 -27
- package/aws/s3/listFiles.d.ts +0 -9
- package/aws/s3/listFiles.js +0 -33
- package/aws/s3/listFilesIteratively.d.ts +0 -9
- package/aws/s3/listFilesIteratively.js +0 -44
- package/aws/s3/listFolders.d.ts +0 -9
- package/aws/s3/listFolders.js +0 -32
- package/aws/s3/moveFile.d.ts +0 -10
- package/aws/s3/moveFile.js +0 -21
- package/aws/s3/readBrotli.d.ts +0 -11
- package/aws/s3/readBrotli.js +0 -28
- package/aws/s3/readBuffer.d.ts +0 -13
- package/aws/s3/readBuffer.js +0 -39
- package/aws/s3/readFile.d.ts +0 -31
- package/aws/s3/readFile.js +0 -83
- package/aws/s3/readGzip.d.ts +0 -11
- package/aws/s3/readGzip.js +0 -28
- package/aws/s3/writeBrotli.d.ts +0 -12
- package/aws/s3/writeBrotli.js +0 -28
- package/aws/s3/writeFile.d.ts +0 -11
- package/aws/s3/writeFile.js +0 -16
- package/aws/s3/writeGzip.d.ts +0 -12
- package/aws/s3/writeGzip.js +0 -28
- package/aws/s3/writePresignedPost.d.ts +0 -14
- package/aws/s3/writePresignedPost.js +0 -31
- package/aws/s3/writeUrlContents.d.ts +0 -10
- package/aws/s3/writeUrlContents.js +0 -26
- package/aws/s3cache/getCache.d.ts +0 -11
- package/aws/s3cache/getCache.js +0 -37
- package/aws/s3cache/getKey.d.ts +0 -10
- package/aws/s3cache/getKey.js +0 -18
- package/aws/s3cache/index.d.ts +0 -6
- package/aws/s3cache/index.js +0 -2
- package/aws/s3cache/saveCache.d.ts +0 -10
- package/aws/s3cache/saveCache.js +0 -17
- package/aws/s3cache/updateCache.d.ts +0 -10
- package/aws/s3cache/updateCache.js +0 -24
- package/aws/ses/SimpleEmail.d.ts +0 -51
- package/aws/ses/SimpleEmail.js +0 -114
- package/aws/ses/initClient.d.ts +0 -10
- package/aws/ses/initClient.js +0 -19
- package/aws/sqs/addToQueue.d.ts +0 -27
- package/aws/sqs/addToQueue.js +0 -26
- package/aws/sqs/deleteFromQueue.d.ts +0 -10
- package/aws/sqs/deleteFromQueue.js +0 -15
- package/aws/sqs/initClient.d.ts +0 -10
- package/aws/sqs/initClient.js +0 -19
- package/aws/sqs/isEventSqs.d.ts +0 -1
- package/aws/sqs/isEventSqs.js +0 -13
- package/aws/ssm/getParameter.d.ts +0 -10
- package/aws/ssm/getParameter.js +0 -40
- package/aws/ssm/initClient.d.ts +0 -10
- package/aws/ssm/initClient.js +0 -19
- package/axios/delete.d.ts +0 -11
- package/axios/delete.js +0 -39
- package/axios/get.d.ts +0 -10
- package/axios/get.js +0 -38
- package/axios/post.d.ts +0 -11
- package/axios/post.js +0 -38
- package/boolean/getBoolean.d.ts +0 -7
- package/boolean/getBoolean.js +0 -16
- package/brightData/getCustomerId.d.ts +0 -10
- package/brightData/getCustomerId.js +0 -11
- package/brightData/getZone.d.ts +0 -9
- package/brightData/getZone.js +0 -10
- package/brightData/param.d.ts +0 -9
- package/brightData/param.js +0 -3
- package/brightData/serpApi/buildGoogleSerpUrl.d.ts +0 -32
- package/brightData/serpApi/buildGoogleSerpUrl.js +0 -115
- package/brightData/serpApi/buildGoogleTrendsUrl.d.ts +0 -22
- package/brightData/serpApi/buildGoogleTrendsUrl.js +0 -60
- package/brightData/serpApi/getAsyncRequestId.d.ts +0 -14
- package/brightData/serpApi/getAsyncRequestId.js +0 -50
- package/brightData/serpApi/getAsyncResults.d.ts +0 -12
- package/brightData/serpApi/getAsyncResults.js +0 -49
- package/brightData/serpApi/getRealtime.d.ts +0 -10
- package/brightData/serpApi/getRealtime.js +0 -35
- package/brightData/serpApi/type.d.ts +0 -11
- package/brightData/serpApi/type.js +0 -14
- package/brightData/webScraperIde/getBatch.d.ts +0 -14
- package/brightData/webScraperIde/getBatch.js +0 -34
- package/brightData/webScraperIde/getRealtime.d.ts +0 -13
- package/brightData/webScraperIde/getRealtime.js +0 -64
- package/class/BaseClass.d.ts +0 -31
- package/class/BaseClass.js +0 -50
- package/crud/index.d.ts +0 -6
- package/crud/index.js +0 -10
- package/crypto/getDecrypt.d.ts +0 -10
- package/crypto/getDecrypt.js +0 -13
- package/crypto/getEncrypt.d.ts +0 -10
- package/crypto/getEncrypt.js +0 -13
- package/crypto/getRandom.d.ts +0 -8
- package/crypto/getRandom.js +0 -12
- package/crypto/getSha256.d.ts +0 -8
- package/crypto/getSha256.js +0 -17
- package/date/format.d.ts +0 -10
- package/date/format.js +0 -21
- package/date/getDate.d.ts +0 -14
- package/date/getDate.js +0 -138
- package/date/getDatesBetween.d.ts +0 -13
- package/date/getDatesBetween.js +0 -54
- package/date/getDurationHours.d.ts +0 -9
- package/date/getDurationHours.js +0 -24
- package/date/getDurationMinutes.d.ts +0 -9
- package/date/getDurationMinutes.js +0 -22
- package/date/getFinancialYear.d.ts +0 -9
- package/date/getFinancialYear.js +0 -52
- package/date/getFinancialYearToDate.d.ts +0 -7
- package/date/getFinancialYearToDate.js +0 -20
- package/date/getFinancialYearToYesterday.d.ts +0 -7
- package/date/getFinancialYearToYesterday.js +0 -20
- package/date/getFinancialYearWeeks.d.ts +0 -9
- package/date/getFinancialYearWeeks.js +0 -33
- package/date/getLastWeek.d.ts +0 -10
- package/date/getLastWeek.js +0 -34
- package/date/getMax.d.ts +0 -13
- package/date/getMax.js +0 -24
- package/date/getMidnight.d.ts +0 -10
- package/date/getMidnight.js +0 -13
- package/date/getMin.d.ts +0 -13
- package/date/getMin.js +0 -24
- package/date/getMonday.d.ts +0 -15
- package/date/getMonday.js +0 -46
- package/date/getNumber.d.ts +0 -7
- package/date/getNumber.js +0 -20
- package/date/getPredefinedTimeframe.d.ts +0 -8
- package/date/getPredefinedTimeframe.js +0 -24
- package/date/getSunday.d.ts +0 -15
- package/date/getSunday.js +0 -42
- package/date/getThisWeek.d.ts +0 -10
- package/date/getThisWeek.js +0 -36
- package/date/getTimeZoned.d.ts +0 -13
- package/date/getTimeZoned.js +0 -55
- package/date/getToday.d.ts +0 -9
- package/date/getToday.js +0 -24
- package/date/getTodayYmd.d.ts +0 -5
- package/date/getTodayYmd.js +0 -21
- package/date/getTodayYmdhis.d.ts +0 -5
- package/date/getTodayYmdhis.js +0 -21
- package/date/getTwoWeeksAgo.d.ts +0 -10
- package/date/getTwoWeeksAgo.js +0 -36
- package/date/getWeeksAgo.d.ts +0 -13
- package/date/getWeeksAgo.js +0 -25
- package/date/getYesterday.d.ts +0 -9
- package/date/getYesterday.js +0 -52
- package/date/index.d.ts +0 -55
- package/date/index.js +0 -36
- package/date/isDateValid.d.ts +0 -7
- package/date/isDateValid.js +0 -20
- package/date/isLastWeek.d.ts +0 -6
- package/date/isLastWeek.js +0 -14
- package/date/isThisWeek.d.ts +0 -6
- package/date/isThisWeek.js +0 -14
- package/date/parseExcelDate.d.ts +0 -8
- package/date/parseExcelDate.js +0 -19
- package/environment/getEnvironment.d.ts +0 -6
- package/environment/getEnvironment.js +0 -43
- package/environment/index.d.ts +0 -9
- package/environment/index.js +0 -14
- package/environment/isAws.d.ts +0 -5
- package/environment/isAws.js +0 -8
- package/environment/isDevelopment.d.ts +0 -2
- package/environment/isDevelopment.js +0 -9
- package/environment/isLocalhost.d.ts +0 -5
- package/environment/isLocalhost.js +0 -25
- package/environment/isProduction.d.ts +0 -2
- package/environment/isProduction.js +0 -9
- package/environment/isStaging.d.ts +0 -2
- package/environment/isStaging.js +0 -9
- package/environment/isVercel.d.ts +0 -5
- package/environment/isVercel.js +0 -7
- package/eskimi/ageGroups.d.ts +0 -5
- package/eskimi/ageGroups.js +0 -41
- package/eskimi/campaign.d.ts +0 -19
- package/eskimi/campaign.js +0 -2
- package/eskimi/devices.d.ts +0 -5
- package/eskimi/devices.js +0 -13
- package/eskimi/endpoints.d.ts +0 -16
- package/eskimi/endpoints.js +0 -18
- package/eskimi/genders.d.ts +0 -5
- package/eskimi/genders.js +0 -13
- package/eskimi/getAccessToken.d.ts +0 -9
- package/eskimi/getAccessToken.js +0 -23
- package/eskimi/getAgeGroup.d.ts +0 -7
- package/eskimi/getAgeGroup.js +0 -17
- package/eskimi/getCampaignIds.d.ts +0 -7
- package/eskimi/getCampaignIds.js +0 -12
- package/eskimi/getData.d.ts +0 -8
- package/eskimi/getData.js +0 -23
- package/eskimi/getDevice.d.ts +0 -7
- package/eskimi/getDevice.js +0 -17
- package/eskimi/getGender.d.ts +0 -7
- package/eskimi/getGender.js +0 -17
- package/file/createDirectory.d.ts +0 -9
- package/file/createDirectory.js +0 -16
- package/file/writeFile.d.ts +0 -1
- package/file/writeFile.js +0 -2
- package/global/forceUpdate.d.ts +0 -8
- package/global/forceUpdate.js +0 -25
- package/global/init.d.ts +0 -10
- package/global/init.js +0 -18
- package/global/isSet.d.ts +0 -8
- package/global/isSet.js +0 -9
- package/global/maxCache.d.ts +0 -8
- package/global/maxCache.js +0 -17
- package/global/read.d.ts +0 -8
- package/global/read.js +0 -30
- package/google/bigQuery/IsTableExists.d.ts +0 -11
- package/google/bigQuery/IsTableExists.js +0 -25
- package/google/bigQuery/createDataset.d.ts +0 -11
- package/google/bigQuery/createDataset.js +0 -22
- package/google/bigQuery/createTable.d.ts +0 -12
- package/google/bigQuery/createTable.js +0 -31
- package/google/bigQuery/getClient.d.ts +0 -9
- package/google/bigQuery/getClient.js +0 -18
- package/google/bigQuery/getDatasets.d.ts +0 -13
- package/google/bigQuery/getDatasets.js +0 -27
- package/google/bigQuery/getTables.d.ts +0 -12
- package/google/bigQuery/getTables.js +0 -25
- package/google/bigQuery/initClient.d.ts +0 -11
- package/google/bigQuery/initClient.js +0 -29
- package/google/bigQuery/isDatasetExists.d.ts +0 -11
- package/google/bigQuery/isDatasetExists.js +0 -25
- package/google/bigQuery/loadData.d.ts +0 -18
- package/google/bigQuery/loadData.js +0 -32
- package/google/bigQuery/query.d.ts +0 -19
- package/google/bigQuery/query.js +0 -15
- package/google/getConfig.d.ts +0 -20
- package/google/getConfig.js +0 -23
- package/google/sheets/getAssociatedData.d.ts +0 -16
- package/google/sheets/getAssociatedData.js +0 -53
- package/google/sheets/getBatchData.d.ts +0 -18
- package/google/sheets/getBatchData.js +0 -19
- package/google/sheets/initClient.d.ts +0 -11
- package/google/sheets/initClient.js +0 -25
- package/google/sheets/isCellNa.d.ts +0 -7
- package/google/sheets/isCellNa.js +0 -7
- package/google/storage/copyToCloud.d.ts +0 -11
- package/google/storage/copyToCloud.js +0 -18
- package/google/storage/getClient.d.ts +0 -8
- package/google/storage/getClient.js +0 -18
- package/google/storage/initClient.d.ts +0 -12
- package/google/storage/initClient.js +0 -29
- package/google/storage/isFileExists.d.ts +0 -10
- package/google/storage/isFileExists.js +0 -19
- package/google/storage/writeFile.d.ts +0 -11
- package/google/storage/writeFile.js +0 -37
- package/googleAds/getCustomer.d.ts +0 -8
- package/googleAds/getCustomer.js +0 -14
- package/googleAds/initClient.d.ts +0 -16
- package/googleAds/initClient.js +0 -25
- package/googleAds/keywordPlanner/index.d.ts +0 -238
- package/googleAds/keywordPlanner/index.js +0 -244
- package/googleAds/keywordPlanner/request.d.ts +0 -18
- package/googleAds/keywordPlanner/request.js +0 -13
- package/googleAds/keywordPlanner/response.d.ts +0 -25
- package/googleAds/keywordPlanner/response.js +0 -2
- package/initClients.d.ts +0 -43
- package/initClients.js +0 -131
- package/json/getJsonNewline.d.ts +0 -5
- package/json/getJsonNewline.js +0 -17
- package/json/isJson.d.ts +0 -8
- package/json/isJson.js +0 -20
- package/littleWarden/getUrlStatus.d.ts +0 -9
- package/littleWarden/getUrlStatus.js +0 -21
- package/littleWarden/index.d.ts +0 -5
- package/littleWarden/index.js +0 -9
- package/littleWarden/isAllGood.d.ts +0 -7
- package/littleWarden/isAllGood.js +0 -15
- package/littleWarden/isDanger.d.ts +0 -7
- package/littleWarden/isDanger.js +0 -15
- package/littleWarden/isWarning.d.ts +0 -7
- package/littleWarden/isWarning.js +0 -15
- package/lumar/api/buildRequest.d.ts +0 -15
- package/lumar/api/buildRequest.js +0 -83
- package/lumar/api/filter.d.ts +0 -5
- package/lumar/api/filter.js +0 -2
- package/lumar/api/getData.d.ts +0 -6
- package/lumar/api/getData.js +0 -18
- package/lumar/api/initClient.d.ts +0 -13
- package/lumar/api/initClient.js +0 -38
- package/lumar/api/operands.d.ts +0 -11
- package/lumar/api/operands.js +0 -13
- package/lumar/api/orders.d.ts +0 -9
- package/lumar/api/orders.js +0 -7
- package/lumar/api/reports.d.ts +0 -11
- package/lumar/api/reports.js +0 -13
- package/lumar/graphql/columns.d.ts +0 -29
- package/lumar/graphql/columns.js +0 -31
- package/lumar/graphql/getData.d.ts +0 -9
- package/lumar/graphql/getData.js +0 -26
- package/lumar/graphql/getReportKey.d.ts +0 -9
- package/lumar/graphql/getReportKey.js +0 -9
- package/lumar/graphql/initClient.d.ts +0 -12
- package/lumar/graphql/initClient.js +0 -38
- package/lumar/graphql/operands.d.ts +0 -16
- package/lumar/graphql/operands.js +0 -18
- package/lumar/graphql/queries/crawl.d.ts +0 -5
- package/lumar/graphql/queries/crawl.js +0 -2
- package/lumar/graphql/queries/getCrawls.d.ts +0 -18
- package/lumar/graphql/queries/getCrawls.js +0 -33
- package/lumar/graphql/queries/getReportDifferences.d.ts +0 -24
- package/lumar/graphql/queries/getReportDifferences.js +0 -40
- package/lumar/graphql/queries/getRows.d.ts +0 -38
- package/lumar/graphql/queries/getRows.js +0 -57
- package/lumar/graphql/queries/getTotals.d.ts +0 -25
- package/lumar/graphql/queries/getTotals.js +0 -40
- package/lumar/graphql/queries/row.d.ts +0 -157
- package/lumar/graphql/queries/row.js +0 -2
- package/lumar/graphql/reportTemplates.d.ts +0 -68
- package/lumar/graphql/reportTemplates.js +0 -70
- package/lumar/graphql/reportTypes.d.ts +0 -7
- package/lumar/graphql/reportTypes.js +0 -9
- package/myTarget/getAccessToken.d.ts +0 -9
- package/myTarget/getAccessToken.js +0 -23
- package/myTarget/request.d.ts +0 -9
- package/myTarget/request.js +0 -23
- package/nextAuth/index.d.ts +0 -5
- package/nextAuth/index.js +0 -9
- package/nextAuth/isSessionReady.d.ts +0 -4
- package/nextAuth/isSessionReady.js +0 -12
- package/nextJs/getIp.d.ts +0 -7
- package/nextJs/getIp.js +0 -13
- package/nextJs/getUserAgent.d.ts +0 -7
- package/nextJs/getUserAgent.js +0 -7
- package/number/format.d.ts +0 -11
- package/number/format.js +0 -23
- package/number/getCurrency.d.ts +0 -10
- package/number/getCurrency.js +0 -20
- package/number/getDecimal.d.ts +0 -9
- package/number/getDecimal.js +0 -16
- package/number/getDivide.d.ts +0 -11
- package/number/getDivide.js +0 -26
- package/number/getNumber.d.ts +0 -8
- package/number/getNumber.js +0 -51
- package/number/getPercentIncrease.d.ts +0 -10
- package/number/getPercentIncrease.js +0 -22
- package/object/replaceKeys.d.ts +0 -10
- package/object/replaceKeys.js +0 -30
- package/prisma/getDecimal.d.ts +0 -9
- package/prisma/getDecimal.js +0 -18
- package/prisma/initClient.d.ts +0 -6
- package/prisma/initClient.js +0 -36
- package/snapchat/getAccessToken.d.ts +0 -9
- package/snapchat/getAccessToken.js +0 -35
- package/sorting/byNumberAscending.d.ts +0 -8
- package/sorting/byNumberAscending.js +0 -17
- package/sorting/byNumberDescending.d.ts +0 -8
- package/sorting/byNumberDescending.js +0 -17
- package/sorting/byStringAscending.d.ts +0 -8
- package/sorting/byStringAscending.js +0 -21
- package/sorting/byStringDescending.d.ts +0 -8
- package/sorting/byStringDescending.js +0 -21
- package/stream/sort.d.ts +0 -14
- package/stream/sort.js +0 -50
- package/string/getCapitalised.d.ts +0 -10
- package/string/getCapitalised.js +0 -17
- package/string/getClean.d.ts +0 -18
- package/string/getClean.js +0 -65
- package/string/getDecoded.d.ts +0 -10
- package/string/getDecoded.js +0 -26
- package/string/getFolder.d.ts +0 -8
- package/string/getFolder.js +0 -14
- package/string/getProperCase.d.ts +0 -11
- package/string/getProperCase.js +0 -27
- package/string/getString.d.ts +0 -7
- package/string/getString.js +0 -34
- package/string/getStringFromStream.d.ts +0 -8
- package/string/getStringFromStream.js +0 -16
- package/string/getWithoutAccents.d.ts +0 -9
- package/string/getWithoutAccents.js +0 -16
- package/string/getWithoutHtmlTags.d.ts +0 -9
- package/string/getWithoutHtmlTags.js +0 -15
- package/string/getWithoutPunctuation.d.ts +0 -9
- package/string/getWithoutPunctuation.js +0 -16
- package/string/getWithoutUnderscores.d.ts +0 -8
- package/string/getWithoutUnderscores.js +0 -14
- package/string/getWithoutWhitespaces.d.ts +0 -9
- package/string/getWithoutWhitespaces.js +0 -16
- package/swr/isAllData.d.ts +0 -7
- package/swr/isAllData.js +0 -19
- package/swr/isAnyError.d.ts +0 -7
- package/swr/isAnyError.js +0 -19
- package/swr/isAnyLoading.d.ts +0 -7
- package/swr/isAnyLoading.js +0 -21
- package/swr/isData.d.ts +0 -7
- package/swr/isData.js +0 -9
- package/swr/isError.d.ts +0 -7
- package/swr/isError.js +0 -7
- package/swr/isLoading.d.ts +0 -7
- package/swr/isLoading.js +0 -12
- package/upTimeRobot/getMonitors.d.ts +0 -1
- package/upTimeRobot/getMonitors.js +0 -33
- package/upTimeRobot/logTypes.d.ts +0 -7
- package/upTimeRobot/logTypes.js +0 -9
- package/upTimeRobot/monitorStatuses.d.ts +0 -8
- package/upTimeRobot/monitorStatuses.js +0 -10
- package/upTimeRobot/monitorSubTypes.d.ts +0 -10
- package/upTimeRobot/monitorSubTypes.js +0 -12
- package/upTimeRobot/monitorTypes.d.ts +0 -8
- package/upTimeRobot/monitorTypes.js +0 -10
- package/upTimeRobot/requestStatuses.d.ts +0 -5
- package/upTimeRobot/requestStatuses.js +0 -7
- package/url/buildParameters.d.ts +0 -8
- package/url/buildParameters.js +0 -22
- package/url/buildRelative.d.ts +0 -8
- package/url/buildRelative.js +0 -13
- package/url/buildUrl.d.ts +0 -10
- package/url/buildUrl.js +0 -29
- package/url/isAbsolute.d.ts +0 -7
- package/url/isAbsolute.js +0 -15
- package/url/isRelative.d.ts +0 -7
- package/url/isRelative.js +0 -8
- package/url/url.d.ts +0 -6
- package/url/url.js +0 -2
- package/url/writeUrlContents.d.ts +0 -11
- package/url/writeUrlContents.js +0 -43
- package/util/defaultTo.d.ts +0 -10
- package/util/defaultTo.js +0 -43
- package/util/getBrotliCompressed.d.ts +0 -9
- package/util/getBrotliCompressed.js +0 -19
- package/util/getBrotliDecompressed.d.ts +0 -9
- package/util/getBrotliDecompressed.js +0 -20
- package/util/getClean.d.ts +0 -11
- package/util/getClean.js +0 -28
- package/util/getGzipCompressed.d.ts +0 -9
- package/util/getGzipCompressed.js +0 -19
- package/util/getGzipDecompressed.d.ts +0 -9
- package/util/getGzipDecompressed.js +0 -20
- package/util/getWithoutHash.d.ts +0 -8
- package/util/getWithoutHash.js +0 -17
- package/util/getWithoutParameter.d.ts +0 -8
- package/util/getWithoutParameter.js +0 -17
- package/util/isUndefined.d.ts +0 -9
- package/util/isUndefined.js +0 -19
- package/util/promiseChunks.d.ts +0 -10
- package/util/promiseChunks.js +0 -18
- package/util/sleep.d.ts +0 -5
- package/util/sleep.js +0 -6
- package/webWorker/index.d.ts +0 -5
- package/webWorker/index.js +0 -9
- package/xml/getXml.d.ts +0 -5
- package/xml/getXml.js +0 -22
package/date/getThisWeek.js
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const getMonday_1 = __importDefault(require("./getMonday"));
|
|
7
|
-
const getNumber_1 = __importDefault(require("./getNumber"));
|
|
8
|
-
const getSunday_1 = __importDefault(require("./getSunday"));
|
|
9
|
-
const getTimeZoned_1 = require("./getTimeZoned");
|
|
10
|
-
/**
|
|
11
|
-
* Return an object of start/end predefined date of This Week.
|
|
12
|
-
* Creating a date from scratch (no user input), thus needs to be London time.
|
|
13
|
-
*/
|
|
14
|
-
const getThisWeek = ({ setMidnight = true, setTimeZone = getTimeZoned_1.timeZoneLondon } = { setMidnight: true, setTimeZone: getTimeZoned_1.timeZoneLondon }) => {
|
|
15
|
-
const sunday = (0, getSunday_1.default)({
|
|
16
|
-
weeksAgo: -1,
|
|
17
|
-
setMidnight,
|
|
18
|
-
setTimeZone,
|
|
19
|
-
});
|
|
20
|
-
const monday = (0, getMonday_1.default)({
|
|
21
|
-
weeksAgo: 0,
|
|
22
|
-
setMidnight,
|
|
23
|
-
setTimeZone,
|
|
24
|
-
});
|
|
25
|
-
return {
|
|
26
|
-
end: (0, getNumber_1.default)({
|
|
27
|
-
input: sunday,
|
|
28
|
-
isUtc: true,
|
|
29
|
-
}),
|
|
30
|
-
start: (0, getNumber_1.default)({
|
|
31
|
-
input: monday,
|
|
32
|
-
isUtc: true,
|
|
33
|
-
}),
|
|
34
|
-
};
|
|
35
|
-
};
|
|
36
|
-
exports.default = getThisWeek;
|
package/date/getTimeZoned.d.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
export type GetTimeZoned = {
|
|
2
|
-
setTimeZone?: string | false;
|
|
3
|
-
};
|
|
4
|
-
export declare const timeZoneLondon = "Europe/London";
|
|
5
|
-
/**
|
|
6
|
-
* Convert an input into a given timezone.
|
|
7
|
-
* We can't use getDate here as it becomes a circular issue.
|
|
8
|
-
* Returns a new Date instance.
|
|
9
|
-
*/
|
|
10
|
-
declare const getTimeZoned: (props: GetTimeZoned & {
|
|
11
|
-
input: Date;
|
|
12
|
-
}) => Date;
|
|
13
|
-
export default getTimeZoned;
|
package/date/getTimeZoned.js
DELETED
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.timeZoneLondon = void 0;
|
|
4
|
-
exports.timeZoneLondon = 'Europe/London';
|
|
5
|
-
/**
|
|
6
|
-
* Convert an input into a given timezone.
|
|
7
|
-
* We can't use getDate here as it becomes a circular issue.
|
|
8
|
-
* Returns a new Date instance.
|
|
9
|
-
*/
|
|
10
|
-
const getTimeZoned = (props) => {
|
|
11
|
-
let dateInstance = props.input;
|
|
12
|
-
/**
|
|
13
|
-
|
|
14
|
-
if (props?.input && 'string' === typeof props.setTimeZone)
|
|
15
|
-
{
|
|
16
|
-
// Cannot convert YYYY-MM-DD into new Date as Safari doesn't support this
|
|
17
|
-
const dateString = formatInTimeZone(
|
|
18
|
-
dateInstance,
|
|
19
|
-
props?.setTimeZone,
|
|
20
|
-
'yyyy-MM-dd HH:mm:ss'
|
|
21
|
-
);
|
|
22
|
-
|
|
23
|
-
const year = Number(dateString.substring(0, 4));
|
|
24
|
-
const month = Number(dateString.substring(5, 7)) - 1;
|
|
25
|
-
const day = Number(dateString.substring(8, 10));
|
|
26
|
-
|
|
27
|
-
const hours = Number(dateString.substring(11, 13));
|
|
28
|
-
const minutes = Number(dateString.substring(14, 16));
|
|
29
|
-
const seconds = Number(dateString.substring(17, 19));
|
|
30
|
-
|
|
31
|
-
dateInstance = new Date();
|
|
32
|
-
|
|
33
|
-
// Reset the date to the 1st initially at 1am
|
|
34
|
-
dateInstance.setUTCDate(1);
|
|
35
|
-
dateInstance.setUTCHours(1, 0, 0, 0);
|
|
36
|
-
|
|
37
|
-
dateInstance.setFullYear(year);
|
|
38
|
-
dateInstance.setUTCMonth(month);
|
|
39
|
-
dateInstance.setUTCDate(day);
|
|
40
|
-
dateInstance.setUTCHours(hours, minutes, seconds);
|
|
41
|
-
|
|
42
|
-
// console.log('dateInstance', dateInstance);
|
|
43
|
-
// console.log('dateInstance.getTimezoneOffset()', dateInstance.getTimezoneOffset());
|
|
44
|
-
|
|
45
|
-
// Fixes the timezone offset due to daylight savings
|
|
46
|
-
dateInstance = addMinutes(
|
|
47
|
-
dateInstance,
|
|
48
|
-
dateInstance.getTimezoneOffset() * -1
|
|
49
|
-
);
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
*/
|
|
53
|
-
return dateInstance;
|
|
54
|
-
};
|
|
55
|
-
exports.default = getTimeZoned;
|
package/date/getToday.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { GetMidnight } from "./getMidnight";
|
|
2
|
-
import { GetTimeZoned } from "./getTimeZoned";
|
|
3
|
-
type GetToday = GetTimeZoned & GetMidnight;
|
|
4
|
-
/**
|
|
5
|
-
* Shortcut to get today's date.
|
|
6
|
-
* Creating a date from scratch (no user input), thus needs to be London time.
|
|
7
|
-
*/
|
|
8
|
-
declare const getToday: (props?: GetToday) => Date;
|
|
9
|
-
export default getToday;
|
package/date/getToday.js
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const getMidnight_1 = __importDefault(require("./getMidnight"));
|
|
7
|
-
const getTimeZoned_1 = __importDefault(require("./getTimeZoned"));
|
|
8
|
-
/**
|
|
9
|
-
* Shortcut to get today's date.
|
|
10
|
-
* Creating a date from scratch (no user input), thus needs to be London time.
|
|
11
|
-
*/
|
|
12
|
-
const getToday = (props = {}) => {
|
|
13
|
-
let today = new Date();
|
|
14
|
-
today = (0, getMidnight_1.default)({
|
|
15
|
-
input: today,
|
|
16
|
-
setMidnight: undefined === props?.setMidnight ? true : props?.setMidnight,
|
|
17
|
-
});
|
|
18
|
-
today = (0, getTimeZoned_1.default)({
|
|
19
|
-
input: today,
|
|
20
|
-
setTimeZone: undefined === props?.setTimeZone ? undefined : props?.setTimeZone,
|
|
21
|
-
});
|
|
22
|
-
return today;
|
|
23
|
-
};
|
|
24
|
-
exports.default = getToday;
|
package/date/getTodayYmd.d.ts
DELETED
package/date/getTodayYmd.js
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const format_1 = __importDefault(require("./format"));
|
|
7
|
-
const getToday_1 = __importDefault(require("./getToday"));
|
|
8
|
-
/**
|
|
9
|
-
* Shorthand to get the current date.
|
|
10
|
-
*/
|
|
11
|
-
const getTodayYmd = () => {
|
|
12
|
-
const today = (0, getToday_1.default)({ setMidnight: false });
|
|
13
|
-
const todayYmd = (0, format_1.default)({
|
|
14
|
-
input: today,
|
|
15
|
-
isUtc: true,
|
|
16
|
-
dateFormat: "yyyy-MM-dd",
|
|
17
|
-
setMidnight: false,
|
|
18
|
-
});
|
|
19
|
-
return todayYmd;
|
|
20
|
-
};
|
|
21
|
-
exports.default = getTodayYmd;
|
package/date/getTodayYmdhis.d.ts
DELETED
package/date/getTodayYmdhis.js
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const format_1 = __importDefault(require("./format"));
|
|
7
|
-
const getToday_1 = __importDefault(require("./getToday"));
|
|
8
|
-
/**
|
|
9
|
-
* Shorthand to get the current timestamp.
|
|
10
|
-
*/
|
|
11
|
-
const getTodayYmdhis = () => {
|
|
12
|
-
const today = (0, getToday_1.default)({ setMidnight: false });
|
|
13
|
-
const todayYmdhis = (0, format_1.default)({
|
|
14
|
-
input: today,
|
|
15
|
-
isUtc: true,
|
|
16
|
-
dateFormat: 'yyyy-MM-dd HH:mm:ss',
|
|
17
|
-
setMidnight: false,
|
|
18
|
-
});
|
|
19
|
-
return todayYmdhis;
|
|
20
|
-
};
|
|
21
|
-
exports.default = getTodayYmdhis;
|
package/date/getTwoWeeksAgo.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { GetMidnight } from "./getMidnight";
|
|
2
|
-
import { GetTimeZoned } from "./getTimeZoned";
|
|
3
|
-
import { Timeframe } from "./";
|
|
4
|
-
type GetTwoWeeksAgo = GetTimeZoned & GetMidnight;
|
|
5
|
-
/**
|
|
6
|
-
* Return an object of start/end predefined date of Two Weeks Ago.
|
|
7
|
-
* Creating a date from scratch (no user input), thus needs to be London time.
|
|
8
|
-
*/
|
|
9
|
-
declare const getTwoWeeksAgo: ({ setMidnight, setTimeZone }?: GetTwoWeeksAgo) => Timeframe;
|
|
10
|
-
export default getTwoWeeksAgo;
|
package/date/getTwoWeeksAgo.js
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const getMonday_1 = __importDefault(require("./getMonday"));
|
|
7
|
-
const getNumber_1 = __importDefault(require("./getNumber"));
|
|
8
|
-
const getSunday_1 = __importDefault(require("./getSunday"));
|
|
9
|
-
const getTimeZoned_1 = require("./getTimeZoned");
|
|
10
|
-
/**
|
|
11
|
-
* Return an object of start/end predefined date of Two Weeks Ago.
|
|
12
|
-
* Creating a date from scratch (no user input), thus needs to be London time.
|
|
13
|
-
*/
|
|
14
|
-
const getTwoWeeksAgo = ({ setMidnight = true, setTimeZone = getTimeZoned_1.timeZoneLondon } = { setMidnight: true, setTimeZone: getTimeZoned_1.timeZoneLondon }) => {
|
|
15
|
-
const sunday = (0, getSunday_1.default)({
|
|
16
|
-
weeksAgo: 1,
|
|
17
|
-
setMidnight,
|
|
18
|
-
setTimeZone,
|
|
19
|
-
});
|
|
20
|
-
const monday = (0, getMonday_1.default)({
|
|
21
|
-
weeksAgo: 2,
|
|
22
|
-
setMidnight,
|
|
23
|
-
setTimeZone,
|
|
24
|
-
});
|
|
25
|
-
return {
|
|
26
|
-
end: (0, getNumber_1.default)({
|
|
27
|
-
input: sunday,
|
|
28
|
-
isUtc: true,
|
|
29
|
-
}),
|
|
30
|
-
start: (0, getNumber_1.default)({
|
|
31
|
-
input: monday,
|
|
32
|
-
isUtc: true,
|
|
33
|
-
}),
|
|
34
|
-
};
|
|
35
|
-
};
|
|
36
|
-
exports.default = getTwoWeeksAgo;
|
package/date/getWeeksAgo.d.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { DateType } from './';
|
|
2
|
-
import { GetTimeZoned } from './getTimeZoned';
|
|
3
|
-
type GetWeeksAgo = GetTimeZoned & {
|
|
4
|
-
input: DateType;
|
|
5
|
-
isUtc: boolean;
|
|
6
|
-
weeksAgo: number;
|
|
7
|
-
setMidnight?: boolean;
|
|
8
|
-
};
|
|
9
|
-
/**
|
|
10
|
-
* From a given input, move the date back X weeksAgo
|
|
11
|
-
*/
|
|
12
|
-
declare const getWeeksAgo: ({ input, isUtc, weeksAgo, setMidnight, setTimeZone }: GetWeeksAgo) => number;
|
|
13
|
-
export default getWeeksAgo;
|
package/date/getWeeksAgo.js
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const date_fns_1 = require("date-fns");
|
|
7
|
-
const getDate_1 = __importDefault(require("./getDate"));
|
|
8
|
-
const getNumber_1 = __importDefault(require("./getNumber"));
|
|
9
|
-
/**
|
|
10
|
-
* From a given input, move the date back X weeksAgo
|
|
11
|
-
*/
|
|
12
|
-
const getWeeksAgo = ({ input, isUtc, weeksAgo = 0, setMidnight = true, setTimeZone = false }) => {
|
|
13
|
-
let dateInstance = (0, getDate_1.default)({
|
|
14
|
-
input,
|
|
15
|
-
isUtc,
|
|
16
|
-
setMidnight,
|
|
17
|
-
setTimeZone
|
|
18
|
-
});
|
|
19
|
-
dateInstance = (0, date_fns_1.sub)(dateInstance, { weeks: weeksAgo });
|
|
20
|
-
return (0, getNumber_1.default)({
|
|
21
|
-
input: dateInstance,
|
|
22
|
-
isUtc,
|
|
23
|
-
});
|
|
24
|
-
};
|
|
25
|
-
exports.default = getWeeksAgo;
|
package/date/getYesterday.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { GetMidnight } from './getMidnight';
|
|
2
|
-
import { GetTimeZoned } from './getTimeZoned';
|
|
3
|
-
type GetYesterday = GetTimeZoned & GetMidnight;
|
|
4
|
-
/**
|
|
5
|
-
* Shortcut to get yesterday's date.
|
|
6
|
-
* Creating a date from scratch (no user input), thus needs to be London time.
|
|
7
|
-
*/
|
|
8
|
-
declare const getYesterday: ({ setMidnight, setTimeZone }?: GetYesterday) => Date;
|
|
9
|
-
export default getYesterday;
|
package/date/getYesterday.js
DELETED
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
-
var ownKeys = function(o) {
|
|
20
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
-
var ar = [];
|
|
22
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
-
return ar;
|
|
24
|
-
};
|
|
25
|
-
return ownKeys(o);
|
|
26
|
-
};
|
|
27
|
-
return function (mod) {
|
|
28
|
-
if (mod && mod.__esModule) return mod;
|
|
29
|
-
var result = {};
|
|
30
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
-
__setModuleDefault(result, mod);
|
|
32
|
-
return result;
|
|
33
|
-
};
|
|
34
|
-
})();
|
|
35
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
36
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
37
|
-
};
|
|
38
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
const date_fns_1 = require("date-fns");
|
|
40
|
-
const getTimeZoned_1 = __importStar(require("./getTimeZoned"));
|
|
41
|
-
const getToday_1 = __importDefault(require("./getToday"));
|
|
42
|
-
/**
|
|
43
|
-
* Shortcut to get yesterday's date.
|
|
44
|
-
* Creating a date from scratch (no user input), thus needs to be London time.
|
|
45
|
-
*/
|
|
46
|
-
const getYesterday = ({ setMidnight = true, setTimeZone = getTimeZoned_1.timeZoneLondon } = { setMidnight: true, setTimeZone: getTimeZoned_1.timeZoneLondon }) => {
|
|
47
|
-
const today = (0, getToday_1.default)({ setMidnight, setTimeZone: false });
|
|
48
|
-
let yesterday = (0, date_fns_1.subDays)(today, 1);
|
|
49
|
-
yesterday = (0, getTimeZoned_1.default)({ input: yesterday, setTimeZone });
|
|
50
|
-
return yesterday;
|
|
51
|
-
};
|
|
52
|
-
exports.default = getYesterday;
|
package/date/index.d.ts
DELETED
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* A date can be either a number (YYYYMMDD), string (YYYY-MM-DD) or Date instance.
|
|
3
|
-
*/
|
|
4
|
-
export type DateType = number | string | Date;
|
|
5
|
-
/**
|
|
6
|
-
* When a date isn't specified and we need a value.
|
|
7
|
-
*/
|
|
8
|
-
export declare const defaultDate = "1901-01-01";
|
|
9
|
-
/**
|
|
10
|
-
* When a date time isn't specified and we need a value.
|
|
11
|
-
*/
|
|
12
|
-
export declare const defaultDateTime = "1901-01-01 00:00:00";
|
|
13
|
-
export type Duration = {
|
|
14
|
-
hours: number;
|
|
15
|
-
minutes: number;
|
|
16
|
-
seconds: number;
|
|
17
|
-
};
|
|
18
|
-
export declare enum DurationComparison {
|
|
19
|
-
VS_NOW = "VS_NOW",
|
|
20
|
-
VS_MIDNIGHT = "VS_MIDNIGHT"
|
|
21
|
-
}
|
|
22
|
-
export declare enum Interval {
|
|
23
|
-
FOREVER = "FOREVER",
|
|
24
|
-
MONTHS = "MONTHS",
|
|
25
|
-
DAYS = "DAYS",
|
|
26
|
-
HOURS = "HOURS",
|
|
27
|
-
MINUTES = "MINUTES"
|
|
28
|
-
}
|
|
29
|
-
export type FinancialYear = {
|
|
30
|
-
end: Date;
|
|
31
|
-
start: Date;
|
|
32
|
-
};
|
|
33
|
-
export type FinancialYearWeekType = {
|
|
34
|
-
end: Date;
|
|
35
|
-
financialWeek: number;
|
|
36
|
-
financialYear: number;
|
|
37
|
-
start: Date;
|
|
38
|
-
};
|
|
39
|
-
/**
|
|
40
|
-
* A timeframe has a start and an end date.
|
|
41
|
-
*/
|
|
42
|
-
export type Timeframe = {
|
|
43
|
-
end: DateType;
|
|
44
|
-
start: DateType;
|
|
45
|
-
};
|
|
46
|
-
export declare enum Timeframes {
|
|
47
|
-
CURRENT = "CURRENT",
|
|
48
|
-
COMPARISON = "COMPARISON"
|
|
49
|
-
}
|
|
50
|
-
export declare enum PredefinedTimeframe {
|
|
51
|
-
NONE = "NONE",
|
|
52
|
-
CUSTOM = "CUSTOM",
|
|
53
|
-
THIS_WEEK = "THIS_WEEK",
|
|
54
|
-
LAST_WEEK = "LAST_WEEK"
|
|
55
|
-
}
|
package/date/index.js
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.PredefinedTimeframe = exports.Timeframes = exports.Interval = exports.DurationComparison = exports.defaultDateTime = exports.defaultDate = void 0;
|
|
4
|
-
/**
|
|
5
|
-
* When a date isn't specified and we need a value.
|
|
6
|
-
*/
|
|
7
|
-
exports.defaultDate = "1901-01-01";
|
|
8
|
-
/**
|
|
9
|
-
* When a date time isn't specified and we need a value.
|
|
10
|
-
*/
|
|
11
|
-
exports.defaultDateTime = "1901-01-01 00:00:00";
|
|
12
|
-
var DurationComparison;
|
|
13
|
-
(function (DurationComparison) {
|
|
14
|
-
DurationComparison["VS_NOW"] = "VS_NOW";
|
|
15
|
-
DurationComparison["VS_MIDNIGHT"] = "VS_MIDNIGHT";
|
|
16
|
-
})(DurationComparison || (exports.DurationComparison = DurationComparison = {}));
|
|
17
|
-
var Interval;
|
|
18
|
-
(function (Interval) {
|
|
19
|
-
Interval["FOREVER"] = "FOREVER";
|
|
20
|
-
Interval["MONTHS"] = "MONTHS";
|
|
21
|
-
Interval["DAYS"] = "DAYS";
|
|
22
|
-
Interval["HOURS"] = "HOURS";
|
|
23
|
-
Interval["MINUTES"] = "MINUTES";
|
|
24
|
-
})(Interval || (exports.Interval = Interval = {}));
|
|
25
|
-
var Timeframes;
|
|
26
|
-
(function (Timeframes) {
|
|
27
|
-
Timeframes["CURRENT"] = "CURRENT";
|
|
28
|
-
Timeframes["COMPARISON"] = "COMPARISON";
|
|
29
|
-
})(Timeframes || (exports.Timeframes = Timeframes = {}));
|
|
30
|
-
var PredefinedTimeframe;
|
|
31
|
-
(function (PredefinedTimeframe) {
|
|
32
|
-
PredefinedTimeframe["NONE"] = "NONE";
|
|
33
|
-
PredefinedTimeframe["CUSTOM"] = "CUSTOM";
|
|
34
|
-
PredefinedTimeframe["THIS_WEEK"] = "THIS_WEEK";
|
|
35
|
-
PredefinedTimeframe["LAST_WEEK"] = "LAST_WEEK";
|
|
36
|
-
})(PredefinedTimeframe || (exports.PredefinedTimeframe = PredefinedTimeframe = {}));
|
package/date/isDateValid.d.ts
DELETED
package/date/isDateValid.js
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const date_fns_1 = require("date-fns");
|
|
4
|
-
const date_fns_2 = require("date-fns");
|
|
5
|
-
/**
|
|
6
|
-
* Ensure the date string provided is in YYYY-MM-DD format and is a valid date.
|
|
7
|
-
*/
|
|
8
|
-
const isDateValid = ({ input }) => {
|
|
9
|
-
const cleanInput = input.trim();
|
|
10
|
-
const parsedInput = (0, date_fns_2.parseISO)(cleanInput);
|
|
11
|
-
if ((0, date_fns_1.isValid)(parsedInput)) {
|
|
12
|
-
const matches = cleanInput.match(/^([0-9]{4}-[0-9]{2}-[0-9]{2})$/);
|
|
13
|
-
if (matches) {
|
|
14
|
-
return matches.length ? true : false;
|
|
15
|
-
}
|
|
16
|
-
return false;
|
|
17
|
-
}
|
|
18
|
-
return false;
|
|
19
|
-
};
|
|
20
|
-
exports.default = isDateValid;
|
package/date/isLastWeek.d.ts
DELETED
package/date/isLastWeek.js
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const getLastWeek_1 = __importDefault(require("./getLastWeek"));
|
|
7
|
-
/**
|
|
8
|
-
* Check to see if a given timeframe is Last Week.
|
|
9
|
-
*/
|
|
10
|
-
const isLastWeek = ({ end, start }) => {
|
|
11
|
-
const lastWeek = (0, getLastWeek_1.default)();
|
|
12
|
-
return start === lastWeek.start && end === lastWeek.end;
|
|
13
|
-
};
|
|
14
|
-
exports.default = isLastWeek;
|
package/date/isThisWeek.d.ts
DELETED
package/date/isThisWeek.js
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const getThisWeek_1 = __importDefault(require("./getThisWeek"));
|
|
7
|
-
/**
|
|
8
|
-
* Check to see if a given timeframe is This Week.
|
|
9
|
-
*/
|
|
10
|
-
const isThisWeek = ({ end, start }) => {
|
|
11
|
-
const thisWeek = (0, getThisWeek_1.default)();
|
|
12
|
-
return start === thisWeek.start && end === thisWeek.end;
|
|
13
|
-
};
|
|
14
|
-
exports.default = isThisWeek;
|
package/date/parseExcelDate.d.ts
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Convert an excel date "e.g. 44216" into a JavaScript date object.
|
|
3
|
-
* https://stackoverflow.com/questions/16229494/converting-excel-date-serial-number-to-date-using-javascript
|
|
4
|
-
*/
|
|
5
|
-
declare const parseExcelDate: ({ serial }: {
|
|
6
|
-
serial: number;
|
|
7
|
-
}) => Date;
|
|
8
|
-
export default parseExcelDate;
|
package/date/parseExcelDate.js
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
/**
|
|
4
|
-
* Convert an excel date "e.g. 44216" into a JavaScript date object.
|
|
5
|
-
* https://stackoverflow.com/questions/16229494/converting-excel-date-serial-number-to-date-using-javascript
|
|
6
|
-
*/
|
|
7
|
-
const parseExcelDate = ({ serial }) => {
|
|
8
|
-
const utcDates = Math.floor(serial - 25569);
|
|
9
|
-
const utcValue = utcDates * 86400;
|
|
10
|
-
const dateInfo = new Date(utcValue * 1000);
|
|
11
|
-
const fractionalDay = serial - Math.floor(serial) + 0.0000001;
|
|
12
|
-
let totalSeconds = Math.floor(86400 * fractionalDay);
|
|
13
|
-
const seconds = totalSeconds % 60;
|
|
14
|
-
totalSeconds -= seconds;
|
|
15
|
-
const hours = Math.floor(totalSeconds / (60 * 60));
|
|
16
|
-
const minutes = Math.floor(totalSeconds / 60) % 60;
|
|
17
|
-
return new Date(dateInfo.getFullYear(), dateInfo.getMonth(), dateInfo.getDate(), hours, minutes, seconds);
|
|
18
|
-
};
|
|
19
|
-
exports.default = parseExcelDate;
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const _1 = require("./");
|
|
4
|
-
/**
|
|
5
|
-
* Determine the environment we're using.
|
|
6
|
-
*/
|
|
7
|
-
const getEnvironment = () => {
|
|
8
|
-
let platformEnvironment = process.env.ENVIRONMENT;
|
|
9
|
-
let response;
|
|
10
|
-
// Custom - Backend/AWS
|
|
11
|
-
if (process.env.EMS_ENVIRONMENT) {
|
|
12
|
-
platformEnvironment = process.env.EMS_ENVIRONMENT;
|
|
13
|
-
}
|
|
14
|
-
// Custom - Frontend
|
|
15
|
-
else if (process.env.NEXT_PUBLIC_EMS_ENVIRONMENT) {
|
|
16
|
-
platformEnvironment = process.env.NEXT_PUBLIC_EMS_ENVIRONMENT;
|
|
17
|
-
}
|
|
18
|
-
// Vercel - Frontend
|
|
19
|
-
else if (process.env.NEXT_PUBLIC_VERCEL_GIT_COMMIT_REF) {
|
|
20
|
-
platformEnvironment = process.env.NEXT_PUBLIC_VERCEL_GIT_COMMIT_REF;
|
|
21
|
-
}
|
|
22
|
-
// Vercel - Backend
|
|
23
|
-
else if (process.env.VERCEL_GIT_COMMIT_REF) {
|
|
24
|
-
platformEnvironment = process.env.VERCEL_GIT_COMMIT_REF;
|
|
25
|
-
}
|
|
26
|
-
const platformEnvironmentClean = platformEnvironment
|
|
27
|
-
.toLowerCase()
|
|
28
|
-
.trim();
|
|
29
|
-
switch (platformEnvironmentClean) {
|
|
30
|
-
case 'development':
|
|
31
|
-
response = _1.Environment.DEVELOPMENT;
|
|
32
|
-
break;
|
|
33
|
-
case 'demo':
|
|
34
|
-
case 'preview':
|
|
35
|
-
case 'staging':
|
|
36
|
-
response = _1.Environment.STAGING;
|
|
37
|
-
break;
|
|
38
|
-
default:
|
|
39
|
-
response = _1.Environment.PRODUCTION;
|
|
40
|
-
}
|
|
41
|
-
return response;
|
|
42
|
-
};
|
|
43
|
-
exports.default = getEnvironment;
|
package/environment/index.d.ts
DELETED
package/environment/index.js
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Platform = exports.Environment = void 0;
|
|
4
|
-
var Environment;
|
|
5
|
-
(function (Environment) {
|
|
6
|
-
Environment["DEVELOPMENT"] = "development";
|
|
7
|
-
Environment["STAGING"] = "staging";
|
|
8
|
-
Environment["PRODUCTION"] = "production";
|
|
9
|
-
})(Environment || (exports.Environment = Environment = {}));
|
|
10
|
-
var Platform;
|
|
11
|
-
(function (Platform) {
|
|
12
|
-
Platform["AWS"] = "AWS";
|
|
13
|
-
Platform["VERCEL"] = "VERCEL";
|
|
14
|
-
})(Platform || (exports.Platform = Platform = {}));
|
package/environment/isAws.d.ts
DELETED
package/environment/isAws.js
DELETED