@8ms/helpers 2.4.24 → 3.0.1
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/dist/_class/BaseNamespace.cjs +4 -9
- package/dist/_class/BaseNamespace.d.cts +2 -4
- package/dist/_class/BaseNamespace.d.mts +2 -4
- package/dist/_class/BaseNamespace.mjs +4 -9
- package/dist/aws/cloudWatchLog/server/{AwsCloudWatchLogNamespace.cjs → AwsCloudWatchLog.cjs} +9 -10
- package/dist/aws/cloudWatchLog/server/{AwsCloudWatchLogNamespace.d.cts → AwsCloudWatchLog.d.cts} +5 -6
- package/dist/aws/cloudWatchLog/server/{AwsCloudWatchLogNamespace.d.mts → AwsCloudWatchLog.d.mts} +5 -6
- package/dist/aws/cloudWatchLog/server/{AwsCloudWatchLogNamespace.mjs → AwsCloudWatchLog.mjs} +9 -10
- package/dist/aws/cloudWatchLog/server/index.cjs +2 -4
- package/dist/aws/cloudWatchLog/server/index.d.cts +2 -3
- package/dist/aws/cloudWatchLog/server/index.d.mts +2 -3
- package/dist/aws/cloudWatchLog/server/index.mjs +2 -3
- package/dist/aws/cloudWatchMetric/server/{AwsCloudWatchMetricNamespace.cjs → AwsCloudWatchMetric.cjs} +11 -10
- package/dist/aws/cloudWatchMetric/server/{AwsCloudWatchMetricNamespace.d.cts → AwsCloudWatchMetric.d.cts} +5 -6
- package/dist/aws/cloudWatchMetric/server/{AwsCloudWatchMetricNamespace.d.mts → AwsCloudWatchMetric.d.mts} +5 -6
- package/dist/aws/cloudWatchMetric/server/{AwsCloudWatchMetricNamespace.mjs → AwsCloudWatchMetric.mjs} +10 -8
- package/dist/aws/cloudWatchMetric/server/index.cjs +2 -4
- package/dist/aws/cloudWatchMetric/server/index.d.cts +2 -3
- package/dist/aws/cloudWatchMetric/server/index.d.mts +2 -3
- package/dist/aws/cloudWatchMetric/server/index.mjs +2 -3
- package/dist/aws/ec2/server/{AwsEc2Namespace.cjs → AwsEc2.cjs} +9 -7
- package/dist/aws/ec2/server/{AwsEc2Namespace.d.cts → AwsEc2.d.cts} +5 -6
- package/dist/aws/ec2/server/{AwsEc2Namespace.d.mts → AwsEc2.d.mts} +5 -6
- package/dist/aws/ec2/server/{AwsEc2Namespace.mjs → AwsEc2.mjs} +9 -7
- package/dist/aws/ec2/server/index.cjs +2 -4
- package/dist/aws/ec2/server/index.d.cts +2 -3
- package/dist/aws/ec2/server/index.d.mts +2 -3
- package/dist/aws/ec2/server/index.mjs +2 -3
- package/dist/aws/ecs/server/{AwsEcsNamespace.cjs → AwsEcs.cjs} +9 -9
- package/dist/aws/ecs/server/{AwsEcsNamespace.d.cts → AwsEcs.d.cts} +5 -6
- package/dist/aws/ecs/server/{AwsEcsNamespace.d.mts → AwsEcs.d.mts} +5 -6
- package/dist/aws/ecs/server/{AwsEcsNamespace.mjs → AwsEcs.mjs} +9 -9
- package/dist/aws/ecs/server/index.cjs +2 -4
- package/dist/aws/ecs/server/index.d.cts +2 -3
- package/dist/aws/ecs/server/index.d.mts +2 -3
- package/dist/aws/ecs/server/index.mjs +2 -3
- package/dist/aws/glue/server/{AwsGlueNamespace.cjs → AwsGlue.cjs} +9 -6
- package/dist/aws/glue/server/{AwsGlueNamespace.d.cts → AwsGlue.d.cts} +5 -6
- package/dist/aws/glue/server/{AwsGlueNamespace.d.mts → AwsGlue.d.mts} +5 -6
- package/dist/aws/glue/server/{AwsGlueNamespace.mjs → AwsGlue.mjs} +9 -6
- package/dist/aws/glue/server/index.cjs +2 -4
- package/dist/aws/glue/server/index.d.cts +2 -3
- package/dist/aws/glue/server/index.d.mts +2 -3
- package/dist/aws/glue/server/index.mjs +2 -3
- package/dist/aws/lambda/server/{AwsLambdaNamespace.cjs → AwsLambda.cjs} +9 -6
- package/dist/aws/lambda/server/{AwsLambdaNamespace.d.cts → AwsLambda.d.cts} +5 -6
- package/dist/aws/lambda/server/{AwsLambdaNamespace.d.mts → AwsLambda.d.mts} +5 -6
- package/dist/aws/lambda/server/{AwsLambdaNamespace.mjs → AwsLambda.mjs} +9 -6
- package/dist/aws/lambda/server/getHandlerPath.cjs +7 -0
- package/dist/aws/lambda/server/getHandlerPath.d.cts +4 -0
- package/dist/aws/lambda/server/getHandlerPath.d.mts +4 -0
- package/dist/aws/lambda/server/getHandlerPath.mjs +6 -0
- package/dist/aws/lambda/server/index.cjs +4 -5
- package/dist/aws/lambda/server/index.d.cts +3 -3
- package/dist/aws/lambda/server/index.d.mts +3 -3
- package/dist/aws/lambda/server/index.mjs +3 -3
- package/dist/aws/s3/server/{AwsS3Namespace.cjs → AwsS3.cjs} +12 -31
- package/dist/aws/s3/server/{AwsS3Namespace.d.cts → AwsS3.d.cts} +6 -7
- package/dist/aws/s3/server/{AwsS3Namespace.d.mts → AwsS3.d.mts} +6 -7
- package/dist/aws/s3/server/{AwsS3Namespace.mjs → AwsS3.mjs} +10 -29
- package/dist/aws/s3/server/awsS3File.cjs +12 -0
- package/dist/aws/s3/server/awsS3File.d.cts +12 -0
- package/dist/aws/s3/server/awsS3File.d.mts +12 -0
- package/dist/aws/s3/server/awsS3File.mjs +11 -0
- package/dist/aws/s3/server/index.cjs +4 -5
- package/dist/aws/s3/server/index.d.cts +3 -3
- package/dist/aws/s3/server/index.d.mts +3 -3
- package/dist/aws/s3/server/index.mjs +3 -3
- package/dist/aws/server/getAwsConfig.cjs +15 -0
- package/dist/aws/server/getAwsConfig.d.cts +18 -0
- package/dist/aws/server/getAwsConfig.d.mts +18 -0
- package/dist/aws/server/getAwsConfig.mjs +14 -0
- package/dist/aws/server/index.cjs +2 -2
- package/dist/aws/server/index.d.cts +2 -2
- package/dist/aws/server/index.d.mts +2 -2
- package/dist/aws/server/index.mjs +2 -2
- package/dist/aws/ses/server/{AwsSesNamespace.cjs → AwsSes.cjs} +9 -6
- package/dist/aws/ses/server/{AwsSesNamespace.d.cts → AwsSes.d.cts} +5 -6
- package/dist/aws/ses/server/{AwsSesNamespace.d.mts → AwsSes.d.mts} +5 -6
- package/dist/aws/ses/server/{AwsSesNamespace.mjs → AwsSes.mjs} +9 -6
- package/dist/aws/ses/server/index.cjs +2 -4
- package/dist/aws/ses/server/index.d.cts +2 -3
- package/dist/aws/ses/server/index.d.mts +2 -3
- package/dist/aws/ses/server/index.mjs +2 -3
- package/dist/aws/sqs/server/{AwsSqsNamespace.cjs → AwsSqs.cjs} +9 -8
- package/dist/aws/sqs/server/{AwsSqsNamespace.d.cts → AwsSqs.d.cts} +5 -6
- package/dist/aws/sqs/server/{AwsSqsNamespace.d.mts → AwsSqs.d.mts} +5 -6
- package/dist/aws/sqs/server/{AwsSqsNamespace.mjs → AwsSqs.mjs} +9 -8
- package/dist/aws/sqs/server/index.cjs +2 -4
- package/dist/aws/sqs/server/index.d.cts +2 -3
- package/dist/aws/sqs/server/index.d.mts +2 -3
- package/dist/aws/sqs/server/index.mjs +2 -3
- package/dist/aws/ssm/server/{AwsSsmNamespace.cjs → AwsSsm.cjs} +14 -14
- package/dist/aws/ssm/server/AwsSsm.d.cts +13 -0
- package/dist/aws/ssm/server/AwsSsm.d.mts +13 -0
- package/dist/aws/ssm/server/AwsSsm.mjs +34 -0
- package/dist/aws/ssm/server/index.cjs +2 -4
- package/dist/aws/ssm/server/index.d.cts +2 -3
- package/dist/aws/ssm/server/index.d.mts +2 -3
- package/dist/aws/ssm/server/index.mjs +2 -3
- package/dist/brightData/webScraperIde/server/getBatch.cjs +3 -2
- package/dist/brightData/webScraperIde/server/getBatch.d.cts +5 -1
- package/dist/brightData/webScraperIde/server/getBatch.d.mts +5 -1
- package/dist/brightData/webScraperIde/server/getBatch.mjs +3 -2
- package/dist/drizzle/server/{DrizzleNamespace.cjs → Drizzle.cjs} +5 -5
- package/dist/drizzle/server/{drizzle.d.cts → Drizzle.d.cts} +8 -4
- package/dist/drizzle/server/{drizzle.d.mts → Drizzle.d.mts} +8 -4
- package/dist/drizzle/server/{DrizzleNamespace.mjs → Drizzle.mjs} +5 -5
- package/dist/drizzle/server/index.cjs +2 -4
- package/dist/drizzle/server/index.d.cts +2 -3
- package/dist/drizzle/server/index.d.mts +2 -3
- package/dist/drizzle/server/index.mjs +2 -3
- package/dist/environment/environment.cjs +2 -2
- package/dist/environment/environment.mjs +2 -2
- package/dist/googleAds/server/{GoogleAdsNamespace.cjs → GoogleAds.cjs} +9 -10
- package/dist/googleAds/server/{GoogleAdsNamespace.d.cts → GoogleAds.d.cts} +9 -5
- package/dist/googleAds/server/{GoogleAdsNamespace.d.mts → GoogleAds.d.mts} +9 -5
- package/dist/googleAds/server/GoogleAds.mjs +28 -0
- package/dist/googleAds/server/index.cjs +2 -4
- package/dist/googleAds/server/index.d.cts +2 -3
- package/dist/googleAds/server/index.d.mts +2 -3
- package/dist/googleAds/server/index.mjs +2 -3
- package/dist/googleCloud/bigquery/server/{GoogleCloudBigqueryNamespace.cjs → GoogleCloudBigquery.cjs} +27 -33
- package/dist/googleCloud/bigquery/server/{GoogleCloudBigqueryNamespace.d.cts → GoogleCloudBigquery.d.cts} +14 -16
- package/dist/googleCloud/bigquery/server/{GoogleCloudBigqueryNamespace.d.mts → GoogleCloudBigquery.d.mts} +14 -16
- package/dist/googleCloud/bigquery/server/{GoogleCloudBigqueryNamespace.mjs → GoogleCloudBigquery.mjs} +27 -33
- package/dist/googleCloud/bigquery/server/getHandlerPath.cjs +7 -0
- package/dist/googleCloud/bigquery/server/getHandlerPath.d.cts +4 -0
- package/dist/googleCloud/bigquery/server/getHandlerPath.d.mts +4 -0
- package/dist/googleCloud/bigquery/server/getHandlerPath.mjs +6 -0
- package/dist/googleCloud/bigquery/server/index.cjs +4 -5
- package/dist/googleCloud/bigquery/server/index.d.cts +3 -3
- package/dist/googleCloud/bigquery/server/index.d.mts +3 -3
- package/dist/googleCloud/bigquery/server/index.mjs +3 -3
- package/dist/googleCloud/bigquery/server/loadData.d.cts +2 -2
- package/dist/googleCloud/bigquery/server/loadData.d.mts +2 -2
- package/dist/googleCloud/server/getGoogleCloudConfig.cjs +81 -0
- package/dist/googleCloud/server/getGoogleCloudConfig.d.cts +77 -0
- package/dist/googleCloud/server/getGoogleCloudConfig.d.mts +77 -0
- package/dist/googleCloud/server/getGoogleCloudConfig.mjs +78 -0
- package/dist/googleCloud/server/index.cjs +4 -2
- package/dist/googleCloud/server/index.d.cts +2 -2
- package/dist/googleCloud/server/index.d.mts +2 -2
- package/dist/googleCloud/server/index.mjs +2 -2
- package/dist/googleCloud/sheets/server/{GoogleCloudSheetsNamespace.cjs → GoogleCloudSheets.cjs} +10 -8
- package/dist/googleCloud/sheets/server/{GoogleCloudSheetsNamespace.d.cts → GoogleCloudSheets.d.cts} +8 -8
- package/dist/googleCloud/sheets/server/{GoogleCloudSheetsNamespace.d.mts → GoogleCloudSheets.d.mts} +8 -8
- package/dist/googleCloud/sheets/server/{GoogleCloudSheetsNamespace.mjs → GoogleCloudSheets.mjs} +10 -8
- package/dist/googleCloud/sheets/server/index.cjs +2 -2
- package/dist/googleCloud/sheets/server/index.d.cts +2 -2
- package/dist/googleCloud/sheets/server/index.d.mts +2 -2
- package/dist/googleCloud/sheets/server/index.mjs +2 -2
- package/dist/googleCloud/storage/server/{GoogleCloudStorageNamespace.cjs → GoogleCloudStorage.cjs} +15 -10
- package/dist/googleCloud/storage/server/{GoogleCloudStorageNamespace.d.cts → GoogleCloudStorage.d.cts} +10 -8
- package/dist/googleCloud/storage/server/{GoogleCloudStorageNamespace.d.mts → GoogleCloudStorage.d.mts} +10 -8
- package/dist/googleCloud/storage/server/{GoogleCloudStorageNamespace.mjs → GoogleCloudStorage.mjs} +15 -10
- package/dist/googleCloud/storage/server/index.cjs +2 -4
- package/dist/googleCloud/storage/server/index.d.cts +2 -3
- package/dist/googleCloud/storage/server/index.d.mts +2 -3
- package/dist/googleCloud/storage/server/index.mjs +2 -3
- package/dist/googlePageSpeed/server/{GooglePageSpeedNamespace.cjs → GooglePageSpeed.cjs} +8 -7
- package/dist/googlePageSpeed/server/GooglePageSpeed.d.cts +19 -0
- package/dist/googlePageSpeed/server/GooglePageSpeed.d.mts +19 -0
- package/dist/googlePageSpeed/server/{GooglePageSpeedNamespace.mjs → GooglePageSpeed.mjs} +7 -6
- package/dist/googlePageSpeed/server/category.cjs +11 -0
- package/dist/googlePageSpeed/server/category.d.cts +11 -0
- package/dist/googlePageSpeed/server/category.d.mts +11 -0
- package/dist/googlePageSpeed/server/category.mjs +10 -0
- package/dist/googlePageSpeed/server/index.cjs +6 -6
- package/dist/googlePageSpeed/server/index.d.cts +4 -3
- package/dist/googlePageSpeed/server/index.d.mts +4 -3
- package/dist/googlePageSpeed/server/index.mjs +4 -3
- package/dist/googlePageSpeed/server/strategy.cjs +9 -0
- package/dist/googlePageSpeed/server/strategy.d.cts +9 -0
- package/dist/googlePageSpeed/server/strategy.d.mts +9 -0
- package/dist/googlePageSpeed/server/strategy.mjs +8 -0
- package/dist/inngest/index.cjs +2 -2
- package/dist/inngest/index.d.cts +1 -1
- package/dist/inngest/index.d.mts +1 -1
- package/dist/inngest/index.mjs +1 -1
- package/dist/inngest/{inngest.cjs → inngestState.cjs} +1 -1
- package/dist/inngest/{inngest.d.mts → inngestState.d.cts} +1 -1
- package/dist/inngest/{inngest.d.cts → inngestState.d.mts} +1 -1
- package/dist/inngest/{inngest.mjs → inngestState.mjs} +1 -1
- package/dist/littleWarden/server/{LittleWardenNamespace.cjs → LittleWarden.cjs} +5 -4
- package/dist/littleWarden/server/{LittleWardenNamespace.d.cts → LittleWarden.d.cts} +7 -5
- package/dist/littleWarden/server/{LittleWardenNamespace.d.mts → LittleWarden.d.mts} +7 -5
- package/dist/littleWarden/server/{LittleWardenNamespace.mjs → LittleWarden.mjs} +5 -4
- package/dist/littleWarden/server/index.cjs +7 -8
- package/dist/littleWarden/server/index.d.cts +3 -3
- package/dist/littleWarden/server/index.d.mts +3 -3
- package/dist/littleWarden/server/index.mjs +3 -3
- package/dist/littleWarden/server/littleWardenAttrs.cjs +38 -0
- package/dist/littleWarden/server/{littleWarden.d.cts → littleWardenAttrs.d.cts} +2 -7
- package/dist/littleWarden/server/{littleWarden.d.mts → littleWardenAttrs.d.mts} +2 -7
- package/dist/littleWarden/server/littleWardenAttrs.mjs +33 -0
- package/dist/node_modules/@smithy/types/dist-types/http/httpHandlerInitialization.d.cts +7 -0
- package/dist/node_modules/@smithy/types/dist-types/http/httpHandlerInitialization.d.mts +7 -0
- package/dist/node_modules/@smithy/types/dist-types/identity/awsCredentialIdentity.d.cts +35 -0
- package/dist/node_modules/@smithy/types/dist-types/identity/awsCredentialIdentity.d.mts +35 -0
- package/dist/node_modules/@smithy/types/dist-types/identity/identity.d.cts +18 -0
- package/dist/node_modules/@smithy/types/dist-types/identity/identity.d.mts +18 -0
- package/dist/node_modules/@smithy/types/dist-types/index.d.cts +2 -0
- package/dist/node_modules/@smithy/types/dist-types/index.d.mts +2 -0
- package/dist/onePassword/server/OnePassword.cjs +44 -0
- package/dist/onePassword/server/OnePassword.d.cts +21 -0
- package/dist/onePassword/server/OnePassword.d.mts +21 -0
- package/dist/onePassword/server/{OnePasswordNamespace.mjs → OnePassword.mjs} +19 -13
- package/dist/onePassword/server/getIdsFromUrl.cjs +2 -2
- package/dist/onePassword/server/getIdsFromUrl.d.cts +2 -2
- package/dist/onePassword/server/getIdsFromUrl.d.mts +2 -2
- package/dist/onePassword/server/getIdsFromUrl.mjs +2 -2
- package/dist/onePassword/server/index.cjs +2 -4
- package/dist/onePassword/server/index.d.cts +2 -3
- package/dist/onePassword/server/index.d.mts +2 -3
- package/dist/onePassword/server/index.mjs +2 -3
- package/dist/openAi/server/{OpenAiNamespace.cjs → OpenAi.cjs} +10 -7
- package/dist/openAi/server/{OpenAiNamespace.d.cts → OpenAi.d.cts} +7 -5
- package/dist/openAi/server/{OpenAiNamespace.d.mts → OpenAi.d.mts} +7 -5
- package/dist/openAi/server/{OpenAiNamespace.mjs → OpenAi.mjs} +10 -7
- package/dist/openAi/server/index.cjs +2 -4
- package/dist/openAi/server/index.d.cts +2 -3
- package/dist/openAi/server/index.d.mts +2 -3
- package/dist/openAi/server/index.mjs +2 -3
- package/dist/snapchat/server/{SnapchatNamespace.cjs → Snapchat.cjs} +5 -4
- package/dist/snapchat/server/Snapchat.d.cts +22 -0
- package/dist/snapchat/server/Snapchat.d.mts +22 -0
- package/dist/snapchat/server/{SnapchatNamespace.mjs → Snapchat.mjs} +5 -4
- package/dist/snapchat/server/index.cjs +2 -4
- package/dist/snapchat/server/index.d.cts +2 -3
- package/dist/snapchat/server/index.d.mts +2 -3
- package/dist/snapchat/server/index.mjs +2 -3
- package/dist/swr/client/swr.cjs +1 -1
- package/dist/swr/client/swr.mjs +1 -1
- package/dist/upTimeRobot/server/UpTimeRobot.cjs +34 -0
- package/dist/upTimeRobot/server/{UpTimeRobotNamespace.d.cts → UpTimeRobot.d.cts} +7 -5
- package/dist/upTimeRobot/server/{UpTimeRobotNamespace.d.mts → UpTimeRobot.d.mts} +7 -5
- package/dist/upTimeRobot/server/UpTimeRobot.mjs +33 -0
- package/dist/upTimeRobot/server/index.cjs +12 -9
- package/dist/upTimeRobot/server/index.d.cts +7 -3
- package/dist/upTimeRobot/server/index.d.mts +7 -3
- package/dist/upTimeRobot/server/index.mjs +7 -3
- package/dist/upTimeRobot/server/logType.cjs +10 -0
- package/dist/upTimeRobot/server/logType.d.cts +10 -0
- package/dist/upTimeRobot/server/logType.d.mts +10 -0
- package/dist/upTimeRobot/server/logType.mjs +9 -0
- package/dist/upTimeRobot/server/monitorStatus.cjs +11 -0
- package/dist/upTimeRobot/server/monitorStatus.d.cts +11 -0
- package/dist/upTimeRobot/server/monitorStatus.d.mts +11 -0
- package/dist/upTimeRobot/server/monitorStatus.mjs +10 -0
- package/dist/upTimeRobot/server/monitorSubTypes.cjs +13 -0
- package/dist/upTimeRobot/server/monitorSubTypes.d.cts +13 -0
- package/dist/upTimeRobot/server/monitorSubTypes.d.mts +13 -0
- package/dist/upTimeRobot/server/monitorSubTypes.mjs +12 -0
- package/dist/upTimeRobot/server/monitorType.cjs +11 -0
- package/dist/upTimeRobot/server/monitorType.d.cts +11 -0
- package/dist/upTimeRobot/server/monitorType.d.mts +11 -0
- package/dist/upTimeRobot/server/monitorType.mjs +10 -0
- package/dist/upTimeRobot/server/requestStatus.cjs +8 -0
- package/dist/upTimeRobot/server/requestStatus.d.cts +8 -0
- package/dist/upTimeRobot/server/requestStatus.d.mts +8 -0
- package/dist/upTimeRobot/server/requestStatus.mjs +7 -0
- package/dist/url/url.cjs +1 -1
- package/dist/url/url.mjs +1 -1
- package/dist/util/defaultTo.cjs +1 -1
- package/dist/util/defaultTo.mjs +1 -1
- package/dist/webWorker/index.cjs +2 -2
- package/dist/webWorker/index.d.cts +1 -1
- package/dist/webWorker/index.d.mts +1 -1
- package/dist/webWorker/index.mjs +1 -1
- package/dist/webWorker/{webWorker.cjs → webWorkerState.cjs} +1 -1
- package/dist/webWorker/{webWorker.d.cts → webWorkerState.d.cts} +1 -1
- package/dist/webWorker/{webWorker.d.mts → webWorkerState.d.mts} +1 -1
- package/dist/webWorker/{webWorker.mjs → webWorkerState.mjs} +1 -1
- package/package.json +138 -152
- package/dist/aws/cloudWatchLog/server/awsCloudWatchLog.cjs +0 -14
- package/dist/aws/cloudWatchLog/server/awsCloudWatchLog.d.cts +0 -7
- package/dist/aws/cloudWatchLog/server/awsCloudWatchLog.d.mts +0 -7
- package/dist/aws/cloudWatchLog/server/awsCloudWatchLog.mjs +0 -13
- package/dist/aws/cloudWatchMetric/server/awsCloudWatchMetric.cjs +0 -14
- package/dist/aws/cloudWatchMetric/server/awsCloudWatchMetric.d.cts +0 -7
- package/dist/aws/cloudWatchMetric/server/awsCloudWatchMetric.d.mts +0 -7
- package/dist/aws/cloudWatchMetric/server/awsCloudWatchMetric.mjs +0 -13
- package/dist/aws/ec2/server/awsEc2.cjs +0 -14
- package/dist/aws/ec2/server/awsEc2.d.cts +0 -7
- package/dist/aws/ec2/server/awsEc2.d.mts +0 -7
- package/dist/aws/ec2/server/awsEc2.mjs +0 -13
- package/dist/aws/ecs/server/awsEcs.cjs +0 -14
- package/dist/aws/ecs/server/awsEcs.d.cts +0 -7
- package/dist/aws/ecs/server/awsEcs.d.mts +0 -7
- package/dist/aws/ecs/server/awsEcs.mjs +0 -13
- package/dist/aws/glue/server/awsGlue.cjs +0 -14
- package/dist/aws/glue/server/awsGlue.d.cts +0 -7
- package/dist/aws/glue/server/awsGlue.d.mts +0 -7
- package/dist/aws/glue/server/awsGlue.mjs +0 -13
- package/dist/aws/lambda/server/awsLambda.cjs +0 -18
- package/dist/aws/lambda/server/awsLambda.d.cts +0 -8
- package/dist/aws/lambda/server/awsLambda.d.mts +0 -8
- package/dist/aws/lambda/server/awsLambda.mjs +0 -16
- package/dist/aws/s3/server/awsS3.cjs +0 -23
- package/dist/aws/s3/server/awsS3.d.cts +0 -16
- package/dist/aws/s3/server/awsS3.d.mts +0 -16
- package/dist/aws/s3/server/awsS3.mjs +0 -21
- package/dist/aws/server/aws.cjs +0 -23
- package/dist/aws/server/aws.d.cts +0 -13
- package/dist/aws/server/aws.d.mts +0 -13
- package/dist/aws/server/aws.mjs +0 -21
- package/dist/aws/ses/server/awsSes.cjs +0 -16
- package/dist/aws/ses/server/awsSes.d.cts +0 -8
- package/dist/aws/ses/server/awsSes.d.mts +0 -8
- package/dist/aws/ses/server/awsSes.mjs +0 -14
- package/dist/aws/sqs/server/awsSqs.cjs +0 -14
- package/dist/aws/sqs/server/awsSqs.d.cts +0 -7
- package/dist/aws/sqs/server/awsSqs.d.mts +0 -7
- package/dist/aws/sqs/server/awsSqs.mjs +0 -13
- package/dist/aws/ssm/server/AwsSsmNamespace.d.cts +0 -15
- package/dist/aws/ssm/server/AwsSsmNamespace.d.mts +0 -15
- package/dist/aws/ssm/server/AwsSsmNamespace.mjs +0 -34
- package/dist/aws/ssm/server/awsSsm.cjs +0 -14
- package/dist/aws/ssm/server/awsSsm.d.cts +0 -7
- package/dist/aws/ssm/server/awsSsm.d.mts +0 -7
- package/dist/aws/ssm/server/awsSsm.mjs +0 -13
- package/dist/drizzle/server/DrizzleNamespace.d.cts +0 -11
- package/dist/drizzle/server/DrizzleNamespace.d.mts +0 -11
- package/dist/drizzle/server/drizzle.cjs +0 -22
- package/dist/drizzle/server/drizzle.mjs +0 -21
- package/dist/googleAds/server/GoogleAdsNamespace.mjs +0 -29
- package/dist/googleAds/server/googleAds.cjs +0 -19
- package/dist/googleAds/server/googleAds.d.cts +0 -15
- package/dist/googleAds/server/googleAds.d.mts +0 -15
- package/dist/googleAds/server/googleAds.mjs +0 -18
- package/dist/googleCloud/bigquery/server/googleCloudBigquery.cjs +0 -32
- package/dist/googleCloud/bigquery/server/googleCloudBigquery.d.cts +0 -8
- package/dist/googleCloud/bigquery/server/googleCloudBigquery.d.mts +0 -8
- package/dist/googleCloud/bigquery/server/googleCloudBigquery.mjs +0 -30
- package/dist/googleCloud/server/googleCloud.cjs +0 -24
- package/dist/googleCloud/server/googleCloud.d.cts +0 -32
- package/dist/googleCloud/server/googleCloud.d.mts +0 -32
- package/dist/googleCloud/server/googleCloud.mjs +0 -23
- package/dist/googleCloud/storage/server/googleCloudStorage.cjs +0 -28
- package/dist/googleCloud/storage/server/googleCloudStorage.d.cts +0 -7
- package/dist/googleCloud/storage/server/googleCloudStorage.d.mts +0 -7
- package/dist/googleCloud/storage/server/googleCloudStorage.mjs +0 -27
- package/dist/googlePageSpeed/server/GooglePageSpeedNamespace.d.cts +0 -15
- package/dist/googlePageSpeed/server/GooglePageSpeedNamespace.d.mts +0 -15
- package/dist/googlePageSpeed/server/googlePageSpeed.cjs +0 -33
- package/dist/googlePageSpeed/server/googlePageSpeed.d.cts +0 -23
- package/dist/googlePageSpeed/server/googlePageSpeed.d.mts +0 -23
- package/dist/googlePageSpeed/server/googlePageSpeed.mjs +0 -30
- package/dist/littleWarden/server/littleWarden.cjs +0 -54
- package/dist/littleWarden/server/littleWarden.mjs +0 -48
- package/dist/onePassword/server/OnePasswordNamespace.cjs +0 -38
- package/dist/onePassword/server/OnePasswordNamespace.d.cts +0 -17
- package/dist/onePassword/server/OnePasswordNamespace.d.mts +0 -17
- package/dist/onePassword/server/onePassword.cjs +0 -14
- package/dist/onePassword/server/onePassword.d.cts +0 -11
- package/dist/onePassword/server/onePassword.d.mts +0 -11
- package/dist/onePassword/server/onePassword.mjs +0 -13
- package/dist/openAi/server/openAi.cjs +0 -19
- package/dist/openAi/server/openAi.d.cts +0 -9
- package/dist/openAi/server/openAi.d.mts +0 -9
- package/dist/openAi/server/openAi.mjs +0 -18
- package/dist/snapchat/server/SnapchatNamespace.d.cts +0 -18
- package/dist/snapchat/server/SnapchatNamespace.d.mts +0 -18
- package/dist/snapchat/server/snapchat.cjs +0 -19
- package/dist/snapchat/server/snapchat.d.cts +0 -11
- package/dist/snapchat/server/snapchat.d.mts +0 -11
- package/dist/snapchat/server/snapchat.mjs +0 -18
- package/dist/upTimeRobot/server/UpTimeRobotNamespace.cjs +0 -31
- package/dist/upTimeRobot/server/UpTimeRobotNamespace.mjs +0 -30
- package/dist/upTimeRobot/server/upTimeRobot.cjs +0 -57
- package/dist/upTimeRobot/server/upTimeRobot.d.cts +0 -42
- package/dist/upTimeRobot/server/upTimeRobot.d.mts +0 -42
- package/dist/upTimeRobot/server/upTimeRobot.mjs +0 -51
|
@@ -13,22 +13,25 @@ const require_util_server_getBrotliCompressed = require("../../../util/server/ge
|
|
|
13
13
|
const require_util_server_getBrotliDecompressed = require("../../../util/server/getBrotliDecompressed.cjs");
|
|
14
14
|
const require_util_server_getGzipCompressed = require("../../../util/server/getGzipCompressed.cjs");
|
|
15
15
|
const require_util_server_getGzipDecompressed = require("../../../util/server/getGzipDecompressed.cjs");
|
|
16
|
-
const
|
|
16
|
+
const require_aws_s3_server_awsS3File = require("./awsS3File.cjs");
|
|
17
17
|
require("./index.cjs");
|
|
18
18
|
let ky = require("ky");
|
|
19
19
|
ky = require_runtime.__toESM(ky);
|
|
20
|
-
//#region src/aws/s3/server/
|
|
21
|
-
var
|
|
22
|
-
|
|
20
|
+
//#region src/aws/s3/server/AwsS3.ts
|
|
21
|
+
var AwsS3 = class extends require__class_BaseNamespace.BaseNamespace {
|
|
22
|
+
init = async (config, region) => {
|
|
23
23
|
if (!this.client) try {
|
|
24
24
|
const { S3Client } = await import("@aws-sdk/client-s3");
|
|
25
|
-
this.client = new S3Client(
|
|
25
|
+
this.client = new S3Client({
|
|
26
|
+
...config,
|
|
27
|
+
region: region ?? "eu-west-2"
|
|
28
|
+
});
|
|
29
|
+
this.config = config;
|
|
26
30
|
} catch (e) {
|
|
27
31
|
throw new Error("AWS S3 Client not installed");
|
|
28
32
|
}
|
|
29
33
|
};
|
|
30
34
|
copy = async (fromBucket, fromKey, toBucket, toKey) => {
|
|
31
|
-
await this.ensureInit();
|
|
32
35
|
const { CopyObjectCommand } = await import("@aws-sdk/client-s3");
|
|
33
36
|
await this.client.send(new CopyObjectCommand({
|
|
34
37
|
Bucket: toBucket,
|
|
@@ -37,7 +40,6 @@ var AwsS3Namespace = class extends require__class_BaseNamespace.BaseNamespace {
|
|
|
37
40
|
}));
|
|
38
41
|
};
|
|
39
42
|
deleteFile = async (bucket, key) => {
|
|
40
|
-
await this.ensureInit();
|
|
41
43
|
const { DeleteObjectCommand } = await import("@aws-sdk/client-s3");
|
|
42
44
|
await this.client.send(new DeleteObjectCommand({
|
|
43
45
|
Bucket: bucket,
|
|
@@ -45,7 +47,6 @@ var AwsS3Namespace = class extends require__class_BaseNamespace.BaseNamespace {
|
|
|
45
47
|
}));
|
|
46
48
|
};
|
|
47
49
|
deleteFiles = async (bucket, keys) => {
|
|
48
|
-
await this.ensureInit();
|
|
49
50
|
const { DeleteObjectsCommand } = await import("@aws-sdk/client-s3");
|
|
50
51
|
await this.client.send(new DeleteObjectsCommand({
|
|
51
52
|
Bucket: bucket,
|
|
@@ -53,7 +54,6 @@ var AwsS3Namespace = class extends require__class_BaseNamespace.BaseNamespace {
|
|
|
53
54
|
}));
|
|
54
55
|
};
|
|
55
56
|
deleteFolder = async (bucket, folder) => {
|
|
56
|
-
await this.ensureInit();
|
|
57
57
|
const { ListObjectsV2Command, DeleteObjectsCommand } = await import("@aws-sdk/client-s3");
|
|
58
58
|
const cleanFolder = require_string_getFolder.getFolder(folder);
|
|
59
59
|
const apiResponse = await this.client.send(new ListObjectsV2Command({
|
|
@@ -72,7 +72,6 @@ var AwsS3Namespace = class extends require__class_BaseNamespace.BaseNamespace {
|
|
|
72
72
|
* List the files in the given bucket and option folder
|
|
73
73
|
*/
|
|
74
74
|
listFiles = async (bucket, folder = "") => {
|
|
75
|
-
await this.ensureInit();
|
|
76
75
|
const { ListObjectsV2Command } = await import("@aws-sdk/client-s3");
|
|
77
76
|
const cleanFolder = require_string_getFolder.getFolder(folder);
|
|
78
77
|
const apiResponse = await this.client.send(new ListObjectsV2Command({
|
|
@@ -93,7 +92,6 @@ var AwsS3Namespace = class extends require__class_BaseNamespace.BaseNamespace {
|
|
|
93
92
|
* Fetch all the files within a given directory recursively
|
|
94
93
|
*/
|
|
95
94
|
filesIteratively = async (bucket, folder) => {
|
|
96
|
-
await this.ensureInit();
|
|
97
95
|
return await this.iterateFolders(bucket, folder);
|
|
98
96
|
};
|
|
99
97
|
/**
|
|
@@ -117,7 +115,6 @@ var AwsS3Namespace = class extends require__class_BaseNamespace.BaseNamespace {
|
|
|
117
115
|
* List the files in the given bucket and option folder.
|
|
118
116
|
*/
|
|
119
117
|
listFolders = async (bucket, folder) => {
|
|
120
|
-
await this.ensureInit();
|
|
121
118
|
const { ListObjectsV2Command } = await import("@aws-sdk/client-s3");
|
|
122
119
|
const cleanFolder = require_string_getFolder.getFolder(folder);
|
|
123
120
|
const apiResponse = await this.client.send(new ListObjectsV2Command({
|
|
@@ -133,7 +130,6 @@ var AwsS3Namespace = class extends require__class_BaseNamespace.BaseNamespace {
|
|
|
133
130
|
}).filter((prefixFolder) => "" !== prefixFolder);
|
|
134
131
|
};
|
|
135
132
|
move = async (fromBucket, fromKey, toBucket, toKey) => {
|
|
136
|
-
await this.ensureInit();
|
|
137
133
|
const { CopyObjectCommand, DeleteObjectCommand } = await import("@aws-sdk/client-s3");
|
|
138
134
|
await this.client.send(new CopyObjectCommand({
|
|
139
135
|
Bucket: toBucket,
|
|
@@ -146,13 +142,11 @@ var AwsS3Namespace = class extends require__class_BaseNamespace.BaseNamespace {
|
|
|
146
142
|
}));
|
|
147
143
|
};
|
|
148
144
|
readBrotli = async (bucket, key, brotliOptions = {}, awsS3Options = {}) => {
|
|
149
|
-
await this.ensureInit();
|
|
150
145
|
const apiResponse = await this.readFile(bucket, key, awsS3Options);
|
|
151
146
|
if (void 0 !== apiResponse.body) apiResponse.body = await require_util_server_getBrotliDecompressed.getBrotliDecompressed(apiResponse.body, brotliOptions);
|
|
152
147
|
return apiResponse;
|
|
153
148
|
};
|
|
154
149
|
readJsonBrotli = async (bucket, key, brotliOptions = {}, awsS3Options = {}) => {
|
|
155
|
-
await this.ensureInit();
|
|
156
150
|
const apiResponse = await this.readFile(bucket, key, awsS3Options);
|
|
157
151
|
if (void 0 !== apiResponse.body) {
|
|
158
152
|
apiResponse.body = await require_util_server_getBrotliDecompressed.getBrotliDecompressed(apiResponse.body, brotliOptions);
|
|
@@ -161,10 +155,9 @@ var AwsS3Namespace = class extends require__class_BaseNamespace.BaseNamespace {
|
|
|
161
155
|
return apiResponse;
|
|
162
156
|
};
|
|
163
157
|
readBuffer = async (bucket, key) => {
|
|
164
|
-
await this.ensureInit();
|
|
165
158
|
const { GetObjectCommand } = await import("@aws-sdk/client-s3");
|
|
166
159
|
let response = {
|
|
167
|
-
...
|
|
160
|
+
...require_aws_s3_server_awsS3File.readFileDefault,
|
|
168
161
|
buffer: void 0
|
|
169
162
|
};
|
|
170
163
|
const apiResponse = await this.client.send(new GetObjectCommand({
|
|
@@ -183,7 +176,6 @@ var AwsS3Namespace = class extends require__class_BaseNamespace.BaseNamespace {
|
|
|
183
176
|
return response;
|
|
184
177
|
};
|
|
185
178
|
fileExists = async (bucket, key) => {
|
|
186
|
-
await this.ensureInit();
|
|
187
179
|
let response = false;
|
|
188
180
|
try {
|
|
189
181
|
const { HeadObjectCommand } = await import("@aws-sdk/client-s3");
|
|
@@ -197,8 +189,7 @@ var AwsS3Namespace = class extends require__class_BaseNamespace.BaseNamespace {
|
|
|
197
189
|
return response;
|
|
198
190
|
};
|
|
199
191
|
readFile = async (bucket, key, options = {}) => {
|
|
200
|
-
|
|
201
|
-
let response = structuredClone(require_aws_s3_server_awsS3.readFileDefault);
|
|
192
|
+
let response = structuredClone(require_aws_s3_server_awsS3File.readFileDefault);
|
|
202
193
|
const today = require_date_calculation.getToday();
|
|
203
194
|
require_date_calculation.getToday(true);
|
|
204
195
|
try {
|
|
@@ -220,13 +211,11 @@ var AwsS3Namespace = class extends require__class_BaseNamespace.BaseNamespace {
|
|
|
220
211
|
return response;
|
|
221
212
|
};
|
|
222
213
|
readJson = async (bucket, key) => {
|
|
223
|
-
await this.ensureInit();
|
|
224
214
|
const apiResponse = await this.readFile(bucket, key);
|
|
225
215
|
apiResponse.body = JSON.parse(apiResponse.body) || null;
|
|
226
216
|
return apiResponse;
|
|
227
217
|
};
|
|
228
218
|
readJsonGzip = async (bucket, key, gzipOptions = {}, awsS3Options = {}) => {
|
|
229
|
-
await this.ensureInit();
|
|
230
219
|
const apiResponse = await this.readFile(bucket, key, awsS3Options);
|
|
231
220
|
if (void 0 !== apiResponse.body) {
|
|
232
221
|
apiResponse.body = await require_util_server_getGzipDecompressed.getGzipDecompressed(apiResponse.body, gzipOptions);
|
|
@@ -235,19 +224,16 @@ var AwsS3Namespace = class extends require__class_BaseNamespace.BaseNamespace {
|
|
|
235
224
|
return apiResponse;
|
|
236
225
|
};
|
|
237
226
|
readGzip = async (bucket, key, gzipOptions = {}, awsS3Options = {}) => {
|
|
238
|
-
await this.ensureInit();
|
|
239
227
|
const apiResponse = await this.readFile(bucket, key, awsS3Options);
|
|
240
228
|
if (void 0 !== apiResponse.body) apiResponse.body = await require_util_server_getGzipDecompressed.getGzipDecompressed(apiResponse.body, gzipOptions);
|
|
241
229
|
return apiResponse;
|
|
242
230
|
};
|
|
243
231
|
writeBrotli = async (bucket, key, data, brotliOptions = {}, awsS3Options = {}) => {
|
|
244
|
-
await this.ensureInit();
|
|
245
232
|
let finalData = data;
|
|
246
233
|
finalData = await require_util_server_getBrotliCompressed.getBrotliCompressed(finalData, brotliOptions);
|
|
247
234
|
return await this.writeFile(bucket, key, finalData, awsS3Options);
|
|
248
235
|
};
|
|
249
236
|
writeFile = async (bucket, key, data, options = {}) => {
|
|
250
|
-
await this.ensureInit();
|
|
251
237
|
const { PutObjectCommand } = await import("@aws-sdk/client-s3");
|
|
252
238
|
return await this.client.send(new PutObjectCommand({
|
|
253
239
|
Bucket: bucket,
|
|
@@ -257,17 +243,14 @@ var AwsS3Namespace = class extends require__class_BaseNamespace.BaseNamespace {
|
|
|
257
243
|
}));
|
|
258
244
|
};
|
|
259
245
|
writeJson = async (bucket, key, data, options = {}) => {
|
|
260
|
-
await this.ensureInit();
|
|
261
246
|
return await this.writeFile(bucket, key, JSON.stringify(data), options);
|
|
262
247
|
};
|
|
263
248
|
writeJsonGzip = async (bucket, key, data, gzipOptions = {}, awsS3Options = {}) => {
|
|
264
|
-
await this.ensureInit();
|
|
265
249
|
let finalData = JSON.stringify(data);
|
|
266
250
|
finalData = await require_util_server_getGzipCompressed.getGzipCompressed(finalData, gzipOptions);
|
|
267
251
|
return await this.writeFile(bucket, key, finalData, awsS3Options);
|
|
268
252
|
};
|
|
269
253
|
writeGzip = async (bucket, key, data, gzipOptions = {}, awsS3Options = {}) => {
|
|
270
|
-
await this.ensureInit();
|
|
271
254
|
let finalData = data;
|
|
272
255
|
finalData = await require_util_server_getGzipCompressed.getGzipCompressed(finalData, gzipOptions);
|
|
273
256
|
return await this.writeFile(bucket, key, finalData, awsS3Options);
|
|
@@ -276,7 +259,6 @@ var AwsS3Namespace = class extends require__class_BaseNamespace.BaseNamespace {
|
|
|
276
259
|
* Get a presigned post URL so we can upload directly to S3 via frontend.
|
|
277
260
|
*/
|
|
278
261
|
presignedPost = async (props) => {
|
|
279
|
-
await this.ensureInit();
|
|
280
262
|
return new Promise(async (resolve, reject) => {
|
|
281
263
|
let response = null;
|
|
282
264
|
const formData = new FormData();
|
|
@@ -300,7 +282,6 @@ var AwsS3Namespace = class extends require__class_BaseNamespace.BaseNamespace {
|
|
|
300
282
|
* Download a file and write to S3.
|
|
301
283
|
*/
|
|
302
284
|
urlContents = async (bucket, key, url) => {
|
|
303
|
-
await this.ensureInit();
|
|
304
285
|
const response = await ky.default.get(url);
|
|
305
286
|
const arrayBuffer = await response.arrayBuffer();
|
|
306
287
|
const data = Buffer.from(arrayBuffer);
|
|
@@ -311,4 +292,4 @@ var AwsS3Namespace = class extends require__class_BaseNamespace.BaseNamespace {
|
|
|
311
292
|
};
|
|
312
293
|
};
|
|
313
294
|
//#endregion
|
|
314
|
-
exports.
|
|
295
|
+
exports.AwsS3 = AwsS3;
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { BaseNamespace } from "../../../_class/BaseNamespace.cjs";
|
|
2
|
-
import {
|
|
3
|
-
import { Modified, ReadFileResponse } from "./awsS3.cjs";
|
|
2
|
+
import { Modified, ReadFileResponse } from "./awsS3File.cjs";
|
|
4
3
|
import * as _$_aws_sdk_client_s30 from "@aws-sdk/client-s3";
|
|
5
4
|
import { S3Client } from "@aws-sdk/client-s3";
|
|
6
5
|
|
|
7
|
-
//#region src/aws/s3/server/
|
|
6
|
+
//#region src/aws/s3/server/AwsS3.d.ts
|
|
8
7
|
type ReadBufferResponse = Modified & {
|
|
9
8
|
buffer: any;
|
|
10
9
|
};
|
|
@@ -18,10 +17,10 @@ type WritePresignedPostProps = {
|
|
|
18
17
|
key: string;
|
|
19
18
|
url: string;
|
|
20
19
|
};
|
|
21
|
-
declare class
|
|
20
|
+
declare class AwsS3 extends BaseNamespace {
|
|
22
21
|
client: S3Client;
|
|
23
|
-
config:
|
|
24
|
-
|
|
22
|
+
config: any;
|
|
23
|
+
init: (config: any, region?: string) => Promise<void>;
|
|
25
24
|
copy: (fromBucket: string, fromKey: string, toBucket: string, toKey: string) => Promise<void>;
|
|
26
25
|
deleteFile: (bucket: string, key: string) => Promise<void>;
|
|
27
26
|
deleteFiles: (bucket: string, keys: string[]) => Promise<void>;
|
|
@@ -66,4 +65,4 @@ declare class AwsS3Namespace extends BaseNamespace {
|
|
|
66
65
|
urlContents: (bucket: string, key: string, url: string) => Promise<void>;
|
|
67
66
|
}
|
|
68
67
|
//#endregion
|
|
69
|
-
export {
|
|
68
|
+
export { AwsS3, ReadBufferResponse };
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { BaseNamespace } from "../../../_class/BaseNamespace.mjs";
|
|
2
|
-
import {
|
|
3
|
-
import { Modified, ReadFileResponse } from "./awsS3.mjs";
|
|
2
|
+
import { Modified, ReadFileResponse } from "./awsS3File.mjs";
|
|
4
3
|
import * as _$_aws_sdk_client_s30 from "@aws-sdk/client-s3";
|
|
5
4
|
import { S3Client } from "@aws-sdk/client-s3";
|
|
6
5
|
|
|
7
|
-
//#region src/aws/s3/server/
|
|
6
|
+
//#region src/aws/s3/server/AwsS3.d.ts
|
|
8
7
|
type ReadBufferResponse = Modified & {
|
|
9
8
|
buffer: any;
|
|
10
9
|
};
|
|
@@ -18,10 +17,10 @@ type WritePresignedPostProps = {
|
|
|
18
17
|
key: string;
|
|
19
18
|
url: string;
|
|
20
19
|
};
|
|
21
|
-
declare class
|
|
20
|
+
declare class AwsS3 extends BaseNamespace {
|
|
22
21
|
client: S3Client;
|
|
23
|
-
config:
|
|
24
|
-
|
|
22
|
+
config: any;
|
|
23
|
+
init: (config: any, region?: string) => Promise<void>;
|
|
25
24
|
copy: (fromBucket: string, fromKey: string, toBucket: string, toKey: string) => Promise<void>;
|
|
26
25
|
deleteFile: (bucket: string, key: string) => Promise<void>;
|
|
27
26
|
deleteFiles: (bucket: string, keys: string[]) => Promise<void>;
|
|
@@ -66,4 +65,4 @@ declare class AwsS3Namespace extends BaseNamespace {
|
|
|
66
65
|
urlContents: (bucket: string, key: string, url: string) => Promise<void>;
|
|
67
66
|
}
|
|
68
67
|
//#endregion
|
|
69
|
-
export {
|
|
68
|
+
export { AwsS3, ReadBufferResponse };
|
|
@@ -11,21 +11,24 @@ import { getBrotliCompressed } from "../../../util/server/getBrotliCompressed.mj
|
|
|
11
11
|
import { getBrotliDecompressed } from "../../../util/server/getBrotliDecompressed.mjs";
|
|
12
12
|
import { getGzipCompressed } from "../../../util/server/getGzipCompressed.mjs";
|
|
13
13
|
import { getGzipDecompressed } from "../../../util/server/getGzipDecompressed.mjs";
|
|
14
|
-
import { readFileDefault } from "./
|
|
14
|
+
import { readFileDefault } from "./awsS3File.mjs";
|
|
15
15
|
import "./index.mjs";
|
|
16
16
|
import ky from "ky";
|
|
17
|
-
//#region src/aws/s3/server/
|
|
18
|
-
var
|
|
19
|
-
|
|
17
|
+
//#region src/aws/s3/server/AwsS3.ts
|
|
18
|
+
var AwsS3 = class extends BaseNamespace {
|
|
19
|
+
init = async (config, region) => {
|
|
20
20
|
if (!this.client) try {
|
|
21
21
|
const { S3Client } = await import("@aws-sdk/client-s3");
|
|
22
|
-
this.client = new S3Client(
|
|
22
|
+
this.client = new S3Client({
|
|
23
|
+
...config,
|
|
24
|
+
region: region ?? "eu-west-2"
|
|
25
|
+
});
|
|
26
|
+
this.config = config;
|
|
23
27
|
} catch (e) {
|
|
24
28
|
throw new Error("AWS S3 Client not installed");
|
|
25
29
|
}
|
|
26
30
|
};
|
|
27
31
|
copy = async (fromBucket, fromKey, toBucket, toKey) => {
|
|
28
|
-
await this.ensureInit();
|
|
29
32
|
const { CopyObjectCommand } = await import("@aws-sdk/client-s3");
|
|
30
33
|
await this.client.send(new CopyObjectCommand({
|
|
31
34
|
Bucket: toBucket,
|
|
@@ -34,7 +37,6 @@ var AwsS3Namespace = class extends BaseNamespace {
|
|
|
34
37
|
}));
|
|
35
38
|
};
|
|
36
39
|
deleteFile = async (bucket, key) => {
|
|
37
|
-
await this.ensureInit();
|
|
38
40
|
const { DeleteObjectCommand } = await import("@aws-sdk/client-s3");
|
|
39
41
|
await this.client.send(new DeleteObjectCommand({
|
|
40
42
|
Bucket: bucket,
|
|
@@ -42,7 +44,6 @@ var AwsS3Namespace = class extends BaseNamespace {
|
|
|
42
44
|
}));
|
|
43
45
|
};
|
|
44
46
|
deleteFiles = async (bucket, keys) => {
|
|
45
|
-
await this.ensureInit();
|
|
46
47
|
const { DeleteObjectsCommand } = await import("@aws-sdk/client-s3");
|
|
47
48
|
await this.client.send(new DeleteObjectsCommand({
|
|
48
49
|
Bucket: bucket,
|
|
@@ -50,7 +51,6 @@ var AwsS3Namespace = class extends BaseNamespace {
|
|
|
50
51
|
}));
|
|
51
52
|
};
|
|
52
53
|
deleteFolder = async (bucket, folder) => {
|
|
53
|
-
await this.ensureInit();
|
|
54
54
|
const { ListObjectsV2Command, DeleteObjectsCommand } = await import("@aws-sdk/client-s3");
|
|
55
55
|
const cleanFolder = getFolder(folder);
|
|
56
56
|
const apiResponse = await this.client.send(new ListObjectsV2Command({
|
|
@@ -69,7 +69,6 @@ var AwsS3Namespace = class extends BaseNamespace {
|
|
|
69
69
|
* List the files in the given bucket and option folder
|
|
70
70
|
*/
|
|
71
71
|
listFiles = async (bucket, folder = "") => {
|
|
72
|
-
await this.ensureInit();
|
|
73
72
|
const { ListObjectsV2Command } = await import("@aws-sdk/client-s3");
|
|
74
73
|
const cleanFolder = getFolder(folder);
|
|
75
74
|
const apiResponse = await this.client.send(new ListObjectsV2Command({
|
|
@@ -90,7 +89,6 @@ var AwsS3Namespace = class extends BaseNamespace {
|
|
|
90
89
|
* Fetch all the files within a given directory recursively
|
|
91
90
|
*/
|
|
92
91
|
filesIteratively = async (bucket, folder) => {
|
|
93
|
-
await this.ensureInit();
|
|
94
92
|
return await this.iterateFolders(bucket, folder);
|
|
95
93
|
};
|
|
96
94
|
/**
|
|
@@ -114,7 +112,6 @@ var AwsS3Namespace = class extends BaseNamespace {
|
|
|
114
112
|
* List the files in the given bucket and option folder.
|
|
115
113
|
*/
|
|
116
114
|
listFolders = async (bucket, folder) => {
|
|
117
|
-
await this.ensureInit();
|
|
118
115
|
const { ListObjectsV2Command } = await import("@aws-sdk/client-s3");
|
|
119
116
|
const cleanFolder = getFolder(folder);
|
|
120
117
|
const apiResponse = await this.client.send(new ListObjectsV2Command({
|
|
@@ -130,7 +127,6 @@ var AwsS3Namespace = class extends BaseNamespace {
|
|
|
130
127
|
}).filter((prefixFolder) => "" !== prefixFolder);
|
|
131
128
|
};
|
|
132
129
|
move = async (fromBucket, fromKey, toBucket, toKey) => {
|
|
133
|
-
await this.ensureInit();
|
|
134
130
|
const { CopyObjectCommand, DeleteObjectCommand } = await import("@aws-sdk/client-s3");
|
|
135
131
|
await this.client.send(new CopyObjectCommand({
|
|
136
132
|
Bucket: toBucket,
|
|
@@ -143,13 +139,11 @@ var AwsS3Namespace = class extends BaseNamespace {
|
|
|
143
139
|
}));
|
|
144
140
|
};
|
|
145
141
|
readBrotli = async (bucket, key, brotliOptions = {}, awsS3Options = {}) => {
|
|
146
|
-
await this.ensureInit();
|
|
147
142
|
const apiResponse = await this.readFile(bucket, key, awsS3Options);
|
|
148
143
|
if (void 0 !== apiResponse.body) apiResponse.body = await getBrotliDecompressed(apiResponse.body, brotliOptions);
|
|
149
144
|
return apiResponse;
|
|
150
145
|
};
|
|
151
146
|
readJsonBrotli = async (bucket, key, brotliOptions = {}, awsS3Options = {}) => {
|
|
152
|
-
await this.ensureInit();
|
|
153
147
|
const apiResponse = await this.readFile(bucket, key, awsS3Options);
|
|
154
148
|
if (void 0 !== apiResponse.body) {
|
|
155
149
|
apiResponse.body = await getBrotliDecompressed(apiResponse.body, brotliOptions);
|
|
@@ -158,7 +152,6 @@ var AwsS3Namespace = class extends BaseNamespace {
|
|
|
158
152
|
return apiResponse;
|
|
159
153
|
};
|
|
160
154
|
readBuffer = async (bucket, key) => {
|
|
161
|
-
await this.ensureInit();
|
|
162
155
|
const { GetObjectCommand } = await import("@aws-sdk/client-s3");
|
|
163
156
|
let response = {
|
|
164
157
|
...readFileDefault,
|
|
@@ -180,7 +173,6 @@ var AwsS3Namespace = class extends BaseNamespace {
|
|
|
180
173
|
return response;
|
|
181
174
|
};
|
|
182
175
|
fileExists = async (bucket, key) => {
|
|
183
|
-
await this.ensureInit();
|
|
184
176
|
let response = false;
|
|
185
177
|
try {
|
|
186
178
|
const { HeadObjectCommand } = await import("@aws-sdk/client-s3");
|
|
@@ -194,7 +186,6 @@ var AwsS3Namespace = class extends BaseNamespace {
|
|
|
194
186
|
return response;
|
|
195
187
|
};
|
|
196
188
|
readFile = async (bucket, key, options = {}) => {
|
|
197
|
-
await this.ensureInit();
|
|
198
189
|
let response = structuredClone(readFileDefault);
|
|
199
190
|
const today = getToday();
|
|
200
191
|
getToday(true);
|
|
@@ -217,13 +208,11 @@ var AwsS3Namespace = class extends BaseNamespace {
|
|
|
217
208
|
return response;
|
|
218
209
|
};
|
|
219
210
|
readJson = async (bucket, key) => {
|
|
220
|
-
await this.ensureInit();
|
|
221
211
|
const apiResponse = await this.readFile(bucket, key);
|
|
222
212
|
apiResponse.body = JSON.parse(apiResponse.body) || null;
|
|
223
213
|
return apiResponse;
|
|
224
214
|
};
|
|
225
215
|
readJsonGzip = async (bucket, key, gzipOptions = {}, awsS3Options = {}) => {
|
|
226
|
-
await this.ensureInit();
|
|
227
216
|
const apiResponse = await this.readFile(bucket, key, awsS3Options);
|
|
228
217
|
if (void 0 !== apiResponse.body) {
|
|
229
218
|
apiResponse.body = await getGzipDecompressed(apiResponse.body, gzipOptions);
|
|
@@ -232,19 +221,16 @@ var AwsS3Namespace = class extends BaseNamespace {
|
|
|
232
221
|
return apiResponse;
|
|
233
222
|
};
|
|
234
223
|
readGzip = async (bucket, key, gzipOptions = {}, awsS3Options = {}) => {
|
|
235
|
-
await this.ensureInit();
|
|
236
224
|
const apiResponse = await this.readFile(bucket, key, awsS3Options);
|
|
237
225
|
if (void 0 !== apiResponse.body) apiResponse.body = await getGzipDecompressed(apiResponse.body, gzipOptions);
|
|
238
226
|
return apiResponse;
|
|
239
227
|
};
|
|
240
228
|
writeBrotli = async (bucket, key, data, brotliOptions = {}, awsS3Options = {}) => {
|
|
241
|
-
await this.ensureInit();
|
|
242
229
|
let finalData = data;
|
|
243
230
|
finalData = await getBrotliCompressed(finalData, brotliOptions);
|
|
244
231
|
return await this.writeFile(bucket, key, finalData, awsS3Options);
|
|
245
232
|
};
|
|
246
233
|
writeFile = async (bucket, key, data, options = {}) => {
|
|
247
|
-
await this.ensureInit();
|
|
248
234
|
const { PutObjectCommand } = await import("@aws-sdk/client-s3");
|
|
249
235
|
return await this.client.send(new PutObjectCommand({
|
|
250
236
|
Bucket: bucket,
|
|
@@ -254,17 +240,14 @@ var AwsS3Namespace = class extends BaseNamespace {
|
|
|
254
240
|
}));
|
|
255
241
|
};
|
|
256
242
|
writeJson = async (bucket, key, data, options = {}) => {
|
|
257
|
-
await this.ensureInit();
|
|
258
243
|
return await this.writeFile(bucket, key, JSON.stringify(data), options);
|
|
259
244
|
};
|
|
260
245
|
writeJsonGzip = async (bucket, key, data, gzipOptions = {}, awsS3Options = {}) => {
|
|
261
|
-
await this.ensureInit();
|
|
262
246
|
let finalData = JSON.stringify(data);
|
|
263
247
|
finalData = await getGzipCompressed(finalData, gzipOptions);
|
|
264
248
|
return await this.writeFile(bucket, key, finalData, awsS3Options);
|
|
265
249
|
};
|
|
266
250
|
writeGzip = async (bucket, key, data, gzipOptions = {}, awsS3Options = {}) => {
|
|
267
|
-
await this.ensureInit();
|
|
268
251
|
let finalData = data;
|
|
269
252
|
finalData = await getGzipCompressed(finalData, gzipOptions);
|
|
270
253
|
return await this.writeFile(bucket, key, finalData, awsS3Options);
|
|
@@ -273,7 +256,6 @@ var AwsS3Namespace = class extends BaseNamespace {
|
|
|
273
256
|
* Get a presigned post URL so we can upload directly to S3 via frontend.
|
|
274
257
|
*/
|
|
275
258
|
presignedPost = async (props) => {
|
|
276
|
-
await this.ensureInit();
|
|
277
259
|
return new Promise(async (resolve, reject) => {
|
|
278
260
|
let response = null;
|
|
279
261
|
const formData = new FormData();
|
|
@@ -297,7 +279,6 @@ var AwsS3Namespace = class extends BaseNamespace {
|
|
|
297
279
|
* Download a file and write to S3.
|
|
298
280
|
*/
|
|
299
281
|
urlContents = async (bucket, key, url) => {
|
|
300
|
-
await this.ensureInit();
|
|
301
282
|
const response = await ky.get(url);
|
|
302
283
|
const arrayBuffer = await response.arrayBuffer();
|
|
303
284
|
const data = Buffer.from(arrayBuffer);
|
|
@@ -308,4 +289,4 @@ var AwsS3Namespace = class extends BaseNamespace {
|
|
|
308
289
|
};
|
|
309
290
|
};
|
|
310
291
|
//#endregion
|
|
311
|
-
export {
|
|
292
|
+
export { AwsS3 };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
const require_date_date = require("../../../date/date.cjs");
|
|
3
|
+
require("../../../date/index.cjs");
|
|
4
|
+
//#region src/aws/s3/server/awsS3File.ts
|
|
5
|
+
const readFileDefault = {
|
|
6
|
+
body: void 0,
|
|
7
|
+
now: void 0,
|
|
8
|
+
error: void 0,
|
|
9
|
+
modified: require_date_date.defaultDateTime
|
|
10
|
+
};
|
|
11
|
+
//#endregion
|
|
12
|
+
exports.readFileDefault = readFileDefault;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
//#region src/aws/s3/server/awsS3File.d.ts
|
|
2
|
+
type Modified = {
|
|
3
|
+
now?: number;
|
|
4
|
+
modified: string;
|
|
5
|
+
};
|
|
6
|
+
type ReadFileResponse = Modified & {
|
|
7
|
+
body: any;
|
|
8
|
+
error: any;
|
|
9
|
+
};
|
|
10
|
+
declare const readFileDefault: ReadFileResponse;
|
|
11
|
+
//#endregion
|
|
12
|
+
export { Modified, ReadFileResponse, readFileDefault };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
//#region src/aws/s3/server/awsS3File.d.ts
|
|
2
|
+
type Modified = {
|
|
3
|
+
now?: number;
|
|
4
|
+
modified: string;
|
|
5
|
+
};
|
|
6
|
+
type ReadFileResponse = Modified & {
|
|
7
|
+
body: any;
|
|
8
|
+
error: any;
|
|
9
|
+
};
|
|
10
|
+
declare const readFileDefault: ReadFileResponse;
|
|
11
|
+
//#endregion
|
|
12
|
+
export { Modified, ReadFileResponse, readFileDefault };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { defaultDateTime } from "../../../date/date.mjs";
|
|
2
|
+
import "../../../date/index.mjs";
|
|
3
|
+
//#region src/aws/s3/server/awsS3File.ts
|
|
4
|
+
const readFileDefault = {
|
|
5
|
+
body: void 0,
|
|
6
|
+
now: void 0,
|
|
7
|
+
error: void 0,
|
|
8
|
+
modified: defaultDateTime
|
|
9
|
+
};
|
|
10
|
+
//#endregion
|
|
11
|
+
export { readFileDefault };
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const
|
|
2
|
+
const require_aws_s3_server_awsS3File = require("./awsS3File.cjs");
|
|
3
3
|
const require_aws_s3_server_payload = require("./payload.cjs");
|
|
4
|
-
const
|
|
5
|
-
exports.
|
|
6
|
-
exports.awsS3Client = require_aws_s3_server_awsS3.awsS3Client;
|
|
4
|
+
const require_aws_s3_server_AwsS3 = require("./AwsS3.cjs");
|
|
5
|
+
exports.AwsS3 = require_aws_s3_server_AwsS3.AwsS3;
|
|
7
6
|
exports.payloadSchema = require_aws_s3_server_payload.payloadSchema;
|
|
8
|
-
exports.readFileDefault =
|
|
7
|
+
exports.readFileDefault = require_aws_s3_server_awsS3File.readFileDefault;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Modified, ReadFileResponse,
|
|
1
|
+
import { Modified, ReadFileResponse, readFileDefault } from "./awsS3File.cjs";
|
|
2
2
|
import { PayloadSchemaType, payloadSchema } from "./payload.cjs";
|
|
3
|
-
import {
|
|
4
|
-
export {
|
|
3
|
+
import { AwsS3, ReadBufferResponse } from "./AwsS3.cjs";
|
|
4
|
+
export { AwsS3, Modified, PayloadSchemaType, ReadBufferResponse, ReadFileResponse, payloadSchema, readFileDefault };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Modified, ReadFileResponse,
|
|
1
|
+
import { Modified, ReadFileResponse, readFileDefault } from "./awsS3File.mjs";
|
|
2
2
|
import { PayloadSchemaType, payloadSchema } from "./payload.mjs";
|
|
3
|
-
import {
|
|
4
|
-
export {
|
|
3
|
+
import { AwsS3, ReadBufferResponse } from "./AwsS3.mjs";
|
|
4
|
+
export { AwsS3, Modified, PayloadSchemaType, ReadBufferResponse, ReadFileResponse, payloadSchema, readFileDefault };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { readFileDefault } from "./awsS3File.mjs";
|
|
2
2
|
import { payloadSchema } from "./payload.mjs";
|
|
3
|
-
import {
|
|
4
|
-
export {
|
|
3
|
+
import { AwsS3 } from "./AwsS3.mjs";
|
|
4
|
+
export { AwsS3, payloadSchema, readFileDefault };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
const require_environment_environment = require("../../environment/environment.cjs");
|
|
3
|
+
//#region src/aws/server/getAwsConfig.ts
|
|
4
|
+
const getAwsConfig = async (props) => {
|
|
5
|
+
if (props.isOidc && require_environment_environment.isVercel()) {
|
|
6
|
+
const { awsCredentialsProvider } = await import("@vercel/oidc-aws-credentials-provider");
|
|
7
|
+
return { credentials: awsCredentialsProvider({ roleArn: props?.oidcRoleArn ?? "" }) };
|
|
8
|
+
}
|
|
9
|
+
return { credentials: {
|
|
10
|
+
accessKeyId: props?.accessKeyId ?? "",
|
|
11
|
+
secretAccessKey: props?.secretAccessKey ?? ""
|
|
12
|
+
} };
|
|
13
|
+
};
|
|
14
|
+
//#endregion
|
|
15
|
+
exports.getAwsConfig = getAwsConfig;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { AwsCredentialIdentityProvider } from "../../node_modules/@smithy/types/dist-types/identity/awsCredentialIdentity.cjs";
|
|
2
|
+
//#region src/aws/server/getAwsConfig.d.ts
|
|
3
|
+
type GetAwsConfigProps = {
|
|
4
|
+
isOidc: boolean;
|
|
5
|
+
oidcRoleArn?: string;
|
|
6
|
+
accessKeyId?: string;
|
|
7
|
+
secretAccessKey?: string;
|
|
8
|
+
};
|
|
9
|
+
declare const getAwsConfig: (props: GetAwsConfigProps) => Promise<{
|
|
10
|
+
credentials: AwsCredentialIdentityProvider;
|
|
11
|
+
} | {
|
|
12
|
+
credentials: {
|
|
13
|
+
accessKeyId: string;
|
|
14
|
+
secretAccessKey: string;
|
|
15
|
+
};
|
|
16
|
+
}>;
|
|
17
|
+
//#endregion
|
|
18
|
+
export { getAwsConfig };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { AwsCredentialIdentityProvider } from "../../node_modules/@smithy/types/dist-types/identity/awsCredentialIdentity.mjs";
|
|
2
|
+
//#region src/aws/server/getAwsConfig.d.ts
|
|
3
|
+
type GetAwsConfigProps = {
|
|
4
|
+
isOidc: boolean;
|
|
5
|
+
oidcRoleArn?: string;
|
|
6
|
+
accessKeyId?: string;
|
|
7
|
+
secretAccessKey?: string;
|
|
8
|
+
};
|
|
9
|
+
declare const getAwsConfig: (props: GetAwsConfigProps) => Promise<{
|
|
10
|
+
credentials: AwsCredentialIdentityProvider;
|
|
11
|
+
} | {
|
|
12
|
+
credentials: {
|
|
13
|
+
accessKeyId: string;
|
|
14
|
+
secretAccessKey: string;
|
|
15
|
+
};
|
|
16
|
+
}>;
|
|
17
|
+
//#endregion
|
|
18
|
+
export { getAwsConfig };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { isVercel } from "../../environment/environment.mjs";
|
|
2
|
+
//#region src/aws/server/getAwsConfig.ts
|
|
3
|
+
const getAwsConfig = async (props) => {
|
|
4
|
+
if (props.isOidc && isVercel()) {
|
|
5
|
+
const { awsCredentialsProvider } = await import("@vercel/oidc-aws-credentials-provider");
|
|
6
|
+
return { credentials: awsCredentialsProvider({ roleArn: props?.oidcRoleArn ?? "" }) };
|
|
7
|
+
}
|
|
8
|
+
return { credentials: {
|
|
9
|
+
accessKeyId: props?.accessKeyId ?? "",
|
|
10
|
+
secretAccessKey: props?.secretAccessKey ?? ""
|
|
11
|
+
} };
|
|
12
|
+
};
|
|
13
|
+
//#endregion
|
|
14
|
+
export { getAwsConfig };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
const require_aws_server_getAwsConfig = require("./getAwsConfig.cjs");
|
|
2
3
|
const require_aws_server_isResponse200 = require("./isResponse200.cjs");
|
|
3
|
-
|
|
4
|
-
exports.getConfig = require_aws_server_aws.getConfig;
|
|
4
|
+
exports.getAwsConfig = require_aws_server_getAwsConfig.getAwsConfig;
|
|
5
5
|
exports.isResponse200 = require_aws_server_isResponse200.isResponse200;
|