@nocobase/plugin-file-manager 0.11.1-alpha.5 → 0.12.0-alpha.2
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/client.d.ts +2 -3
- package/client.js +1 -1
- package/dist/client/index.js +979 -0
- package/{lib → dist}/index.d.ts +1 -0
- package/dist/index.js +18 -0
- package/dist/locale/en-US.js +25 -0
- package/dist/locale/fr-FR.js +25 -0
- package/dist/locale/ja-JP.js +22 -0
- package/dist/locale/ru-RU.js +22 -0
- package/dist/locale/tr-TR.js +21 -0
- package/dist/locale/zh-CN.js +35 -0
- package/dist/node_modules/@aws-sdk/client-s3/LICENSE +201 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/S3.js +197 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/S3Client.js +48 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/AbortMultipartUploadCommand.js +52 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/CompleteMultipartUploadCommand.js +57 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/CopyObjectCommand.js +57 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/CreateBucketCommand.js +55 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/CreateMultipartUploadCommand.js +55 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/DeleteBucketAnalyticsConfigurationCommand.js +52 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/DeleteBucketCommand.js +52 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/DeleteBucketCorsCommand.js +52 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/DeleteBucketEncryptionCommand.js +52 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/DeleteBucketIntelligentTieringConfigurationCommand.js +52 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/DeleteBucketInventoryConfigurationCommand.js +52 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/DeleteBucketLifecycleCommand.js +52 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/DeleteBucketMetricsConfigurationCommand.js +52 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/DeleteBucketOwnershipControlsCommand.js +52 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/DeleteBucketPolicyCommand.js +52 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/DeleteBucketReplicationCommand.js +52 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/DeleteBucketTaggingCommand.js +52 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/DeleteBucketWebsiteCommand.js +52 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/DeleteObjectCommand.js +52 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/DeleteObjectTaggingCommand.js +52 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/DeleteObjectsCommand.js +58 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/DeletePublicAccessBlockCommand.js +52 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/GetBucketAccelerateConfigurationCommand.js +52 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/GetBucketAclCommand.js +52 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/GetBucketAnalyticsConfigurationCommand.js +52 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/GetBucketCorsCommand.js +52 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/GetBucketEncryptionCommand.js +53 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/GetBucketIntelligentTieringConfigurationCommand.js +52 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/GetBucketInventoryConfigurationCommand.js +53 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/GetBucketLifecycleConfigurationCommand.js +52 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/GetBucketLocationCommand.js +52 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/GetBucketLoggingCommand.js +52 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/GetBucketMetricsConfigurationCommand.js +52 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/GetBucketNotificationConfigurationCommand.js +52 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/GetBucketOwnershipControlsCommand.js +52 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/GetBucketPolicyCommand.js +52 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/GetBucketPolicyStatusCommand.js +52 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/GetBucketReplicationCommand.js +52 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/GetBucketRequestPaymentCommand.js +52 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/GetBucketTaggingCommand.js +52 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/GetBucketVersioningCommand.js +52 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/GetBucketWebsiteCommand.js +52 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/GetObjectAclCommand.js +52 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/GetObjectAttributesCommand.js +55 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/GetObjectCommand.js +62 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/GetObjectLegalHoldCommand.js +52 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/GetObjectLockConfigurationCommand.js +52 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/GetObjectRetentionCommand.js +52 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/GetObjectTaggingCommand.js +52 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/GetObjectTorrentCommand.js +53 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/GetPublicAccessBlockCommand.js +52 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/HeadBucketCommand.js +52 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/HeadObjectCommand.js +55 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/ListBucketAnalyticsConfigurationsCommand.js +52 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/ListBucketIntelligentTieringConfigurationsCommand.js +52 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/ListBucketInventoryConfigurationsCommand.js +53 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/ListBucketMetricsConfigurationsCommand.js +52 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/ListBucketsCommand.js +51 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/ListMultipartUploadsCommand.js +52 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/ListObjectVersionsCommand.js +52 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/ListObjectsCommand.js +52 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/ListObjectsV2Command.js +52 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/ListPartsCommand.js +55 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/PutBucketAccelerateConfigurationCommand.js +58 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/PutBucketAclCommand.js +58 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/PutBucketAnalyticsConfigurationCommand.js +52 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/PutBucketCorsCommand.js +58 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/PutBucketEncryptionCommand.js +59 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/PutBucketIntelligentTieringConfigurationCommand.js +52 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/PutBucketInventoryConfigurationCommand.js +53 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/PutBucketLifecycleConfigurationCommand.js +58 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/PutBucketLoggingCommand.js +58 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/PutBucketMetricsConfigurationCommand.js +52 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/PutBucketNotificationConfigurationCommand.js +52 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/PutBucketOwnershipControlsCommand.js +54 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/PutBucketPolicyCommand.js +58 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/PutBucketReplicationCommand.js +58 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/PutBucketRequestPaymentCommand.js +58 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/PutBucketTaggingCommand.js +58 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/PutBucketVersioningCommand.js +58 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/PutBucketWebsiteCommand.js +58 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/PutObjectAclCommand.js +58 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/PutObjectCommand.js +63 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/PutObjectLegalHoldCommand.js +58 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/PutObjectLockConfigurationCommand.js +58 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/PutObjectRetentionCommand.js +58 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/PutObjectTaggingCommand.js +58 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/PutPublicAccessBlockCommand.js +58 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/RestoreObjectCommand.js +59 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/SelectObjectContentCommand.js +55 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/UploadPartCommand.js +61 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/UploadPartCopyCommand.js +57 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/WriteGetObjectResponseCommand.js +53 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/index.js +96 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/endpoint/EndpointParameters.js +15 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/endpoint/endpointResolver.js +12 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/endpoint/ruleset.js +7 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/index.js +31 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/models/S3ServiceException.js +12 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/models/index.js +5 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/models/models_0.js +629 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/models/models_1.js +139 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/pagination/Interfaces.js +2 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/pagination/ListObjectsV2Paginator.js +29 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/pagination/ListPartsPaginator.js +29 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/pagination/index.js +6 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/protocols/Aws_restXml.js +9691 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/runtimeConfig.browser.js +47 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/runtimeConfig.js +56 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/runtimeConfig.native.js +15 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/runtimeConfig.shared.js +28 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/waiters/index.js +7 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/waiters/waitForBucketExists.js +31 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/waiters/waitForBucketNotExists.js +30 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/waiters/waitForObjectExists.js +31 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/waiters/waitForObjectNotExists.js +30 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/S3.js +193 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/S3Client.js +44 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/AbortMultipartUploadCommand.js +48 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/CompleteMultipartUploadCommand.js +53 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/CopyObjectCommand.js +53 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/CreateBucketCommand.js +51 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/CreateMultipartUploadCommand.js +51 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/DeleteBucketAnalyticsConfigurationCommand.js +48 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/DeleteBucketCommand.js +48 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/DeleteBucketCorsCommand.js +48 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/DeleteBucketEncryptionCommand.js +48 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/DeleteBucketIntelligentTieringConfigurationCommand.js +48 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/DeleteBucketInventoryConfigurationCommand.js +48 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/DeleteBucketLifecycleCommand.js +48 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/DeleteBucketMetricsConfigurationCommand.js +48 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/DeleteBucketOwnershipControlsCommand.js +48 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/DeleteBucketPolicyCommand.js +48 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/DeleteBucketReplicationCommand.js +48 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/DeleteBucketTaggingCommand.js +48 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/DeleteBucketWebsiteCommand.js +48 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/DeleteObjectCommand.js +48 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/DeleteObjectTaggingCommand.js +48 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/DeleteObjectsCommand.js +54 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/DeletePublicAccessBlockCommand.js +48 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketAccelerateConfigurationCommand.js +48 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketAclCommand.js +48 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketAnalyticsConfigurationCommand.js +48 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketCorsCommand.js +48 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketEncryptionCommand.js +49 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketIntelligentTieringConfigurationCommand.js +48 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketInventoryConfigurationCommand.js +49 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketLifecycleConfigurationCommand.js +48 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketLocationCommand.js +48 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketLoggingCommand.js +48 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketMetricsConfigurationCommand.js +48 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketNotificationConfigurationCommand.js +48 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketOwnershipControlsCommand.js +48 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketPolicyCommand.js +48 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketPolicyStatusCommand.js +48 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketReplicationCommand.js +48 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketRequestPaymentCommand.js +48 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketTaggingCommand.js +48 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketVersioningCommand.js +48 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketWebsiteCommand.js +48 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/GetObjectAclCommand.js +48 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/GetObjectAttributesCommand.js +51 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/GetObjectCommand.js +58 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/GetObjectLegalHoldCommand.js +48 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/GetObjectLockConfigurationCommand.js +48 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/GetObjectRetentionCommand.js +48 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/GetObjectTaggingCommand.js +48 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/GetObjectTorrentCommand.js +49 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/GetPublicAccessBlockCommand.js +48 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/HeadBucketCommand.js +48 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/HeadObjectCommand.js +51 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/ListBucketAnalyticsConfigurationsCommand.js +48 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/ListBucketIntelligentTieringConfigurationsCommand.js +48 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/ListBucketInventoryConfigurationsCommand.js +49 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/ListBucketMetricsConfigurationsCommand.js +48 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/ListBucketsCommand.js +47 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/ListMultipartUploadsCommand.js +48 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/ListObjectVersionsCommand.js +48 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/ListObjectsCommand.js +48 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/ListObjectsV2Command.js +48 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/ListPartsCommand.js +51 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketAccelerateConfigurationCommand.js +54 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketAclCommand.js +54 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketAnalyticsConfigurationCommand.js +48 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketCorsCommand.js +54 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketEncryptionCommand.js +55 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketIntelligentTieringConfigurationCommand.js +48 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketInventoryConfigurationCommand.js +49 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketLifecycleConfigurationCommand.js +54 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketLoggingCommand.js +54 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketMetricsConfigurationCommand.js +48 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketNotificationConfigurationCommand.js +48 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketOwnershipControlsCommand.js +50 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketPolicyCommand.js +54 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketReplicationCommand.js +54 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketRequestPaymentCommand.js +54 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketTaggingCommand.js +54 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketVersioningCommand.js +54 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketWebsiteCommand.js +54 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/PutObjectAclCommand.js +54 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/PutObjectCommand.js +59 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/PutObjectLegalHoldCommand.js +54 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/PutObjectLockConfigurationCommand.js +54 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/PutObjectRetentionCommand.js +54 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/PutObjectTaggingCommand.js +54 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/PutPublicAccessBlockCommand.js +54 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/RestoreObjectCommand.js +55 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/SelectObjectContentCommand.js +51 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/UploadPartCommand.js +57 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/UploadPartCopyCommand.js +53 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/WriteGetObjectResponseCommand.js +49 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/index.js +93 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/endpoint/EndpointParameters.js +11 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/endpoint/endpointResolver.js +8 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/endpoint/ruleset.js +4 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/index.js +7 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/models/S3ServiceException.js +8 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/models/index.js +2 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/models/models_0.js +589 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/models/models_1.js +122 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/pagination/Interfaces.js +1 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/pagination/ListObjectsV2Paginator.js +25 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/pagination/ListPartsPaginator.js +25 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/pagination/index.js +3 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/protocols/Aws_restXml.js +9499 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/runtimeConfig.browser.js +42 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/runtimeConfig.js +51 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/runtimeConfig.native.js +11 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/runtimeConfig.shared.js +24 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/waiters/index.js +4 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/waiters/waitForBucketExists.js +26 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/waiters/waitForBucketNotExists.js +25 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/waiters/waitForObjectExists.js +26 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/waiters/waitForObjectNotExists.js +25 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/S3.d.ts +661 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/S3Client.d.ts +299 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/AbortMultipartUploadCommand.d.ts +131 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/CompleteMultipartUploadCommand.d.ts +260 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/CopyObjectCommand.d.ts +370 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/CreateBucketCommand.d.ts +213 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/CreateMultipartUploadCommand.d.ts +427 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/DeleteBucketAnalyticsConfigurationCommand.d.ts +100 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/DeleteBucketCommand.d.ts +97 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/DeleteBucketCorsCommand.d.ts +103 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/DeleteBucketEncryptionCommand.d.ts +94 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/DeleteBucketIntelligentTieringConfigurationCommand.d.ts +93 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/DeleteBucketInventoryConfigurationCommand.d.ts +98 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/DeleteBucketLifecycleCommand.d.ts +105 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/DeleteBucketMetricsConfigurationCommand.d.ts +106 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/DeleteBucketOwnershipControlsCommand.d.ts +90 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/DeleteBucketPolicyCommand.d.ts +115 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/DeleteBucketReplicationCommand.d.ts +107 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/DeleteBucketTaggingCommand.d.ts +99 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/DeleteBucketWebsiteCommand.d.ts +106 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/DeleteObjectCommand.d.ts +130 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/DeleteObjectTaggingCommand.d.ts +130 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/DeleteObjectsCommand.d.ts +229 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/DeletePublicAccessBlockCommand.d.ts +99 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/GetBucketAccelerateConfigurationCommand.d.ts +100 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/GetBucketAclCommand.d.ts +114 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/GetBucketAnalyticsConfigurationCommand.d.ts +133 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/GetBucketCorsCommand.d.ts +144 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/GetBucketEncryptionCommand.d.ts +105 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/GetBucketIntelligentTieringConfigurationCommand.d.ts +120 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/GetBucketInventoryConfigurationCommand.d.ts +128 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/GetBucketLifecycleConfigurationCommand.d.ts +207 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/GetBucketLocationCommand.d.ts +115 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/GetBucketLoggingCommand.d.ts +103 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/GetBucketMetricsConfigurationCommand.d.ts +127 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/GetBucketNotificationConfigurationCommand.d.ts +153 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/GetBucketOwnershipControlsCommand.d.ts +98 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/GetBucketPolicyCommand.d.ts +120 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/GetBucketPolicyStatusCommand.d.ts +104 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/GetBucketReplicationCommand.d.ts +194 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/GetBucketRequestPaymentCommand.d.ts +100 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/GetBucketTaggingCommand.d.ts +133 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/GetBucketVersioningCommand.d.ts +114 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/GetBucketWebsiteCommand.d.ts +138 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/GetObjectAclCommand.d.ts +188 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/GetObjectAttributesCommand.d.ts +263 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/GetObjectCommand.d.ts +351 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/GetObjectLegalHoldCommand.d.ts +89 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/GetObjectLockConfigurationCommand.d.ts +93 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/GetObjectRetentionCommand.d.ts +90 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/GetObjectTaggingCommand.d.ts +162 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/GetObjectTorrentCommand.d.ts +105 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/GetPublicAccessBlockCommand.d.ts +115 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/HeadBucketCommand.d.ts +106 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/HeadObjectCommand.d.ts +267 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/ListBucketAnalyticsConfigurationsCommand.d.ts +146 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/ListBucketIntelligentTieringConfigurationsCommand.d.ts +125 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/ListBucketInventoryConfigurationsCommand.d.ts +141 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/ListBucketMetricsConfigurationsCommand.d.ts +135 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/ListBucketsCommand.d.ts +114 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/ListMultipartUploadsCommand.d.ts +258 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/ListObjectVersionsCommand.d.ts +213 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/ListObjectsCommand.d.ts +195 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/ListObjectsV2Command.d.ts +197 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/ListPartsCommand.d.ts +201 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/PutBucketAccelerateConfigurationCommand.d.ts +114 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/PutBucketAclCommand.d.ts +302 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/PutBucketAnalyticsConfigurationCommand.d.ts +206 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/PutBucketCorsCommand.d.ts +192 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/PutBucketEncryptionCommand.d.ts +119 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/PutBucketIntelligentTieringConfigurationCommand.d.ts +151 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/PutBucketInventoryConfigurationCommand.d.ts +184 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/PutBucketLifecycleConfigurationCommand.d.ts +248 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/PutBucketLoggingCommand.d.ts +200 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/PutBucketMetricsConfigurationCommand.d.ts +140 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/PutBucketNotificationConfigurationCommand.d.ts +205 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/PutBucketOwnershipControlsCommand.d.ts +98 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/PutBucketPolicyCommand.d.ts +118 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/PutBucketReplicationCommand.d.ts +227 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/PutBucketRequestPaymentCommand.d.ts +108 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/PutBucketTaggingCommand.d.ts +179 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/PutBucketVersioningCommand.d.ts +134 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/PutBucketWebsiteCommand.d.ts +242 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/PutObjectAclCommand.d.ts +303 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/PutObjectCommand.d.ts +366 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/PutObjectLegalHoldCommand.d.ts +85 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/PutObjectLockConfigurationCommand.d.ts +107 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/PutObjectRetentionCommand.d.ts +88 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/PutObjectTaggingCommand.d.ts +205 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/PutPublicAccessBlockCommand.d.ts +116 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/RestoreObjectCommand.d.ts +439 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/SelectObjectContentCommand.d.ts +247 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/UploadPartCommand.d.ts +249 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/UploadPartCopyCommand.d.ts +320 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/WriteGetObjectResponseCommand.d.ts +152 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/index.d.ts +93 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/endpoint/EndpointParameters.d.ts +32 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/endpoint/endpointResolver.d.ts +5 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/endpoint/ruleset.d.ts +2 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/index.d.ts +12 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/models/S3ServiceException.d.ts +13 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/models/index.d.ts +2 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/models/models_0.d.ts +10348 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/models/models_1.d.ts +1764 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/pagination/Interfaces.d.ts +8 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/pagination/ListObjectsV2Paginator.d.ts +7 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/pagination/ListPartsPaginator.d.ts +7 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/pagination/index.d.ts +3 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/protocols/Aws_restXml.d.ts +839 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/runtimeConfig.browser.d.ts +54 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/runtimeConfig.d.ts +54 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/runtimeConfig.native.d.ts +53 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/runtimeConfig.shared.d.ts +25 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/S3.d.ts +1646 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/S3Client.d.ts +693 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/AbortMultipartUploadCommand.d.ts +42 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/CompleteMultipartUploadCommand.d.ts +42 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/CopyObjectCommand.d.ts +35 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/CreateBucketCommand.d.ts +35 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/CreateMultipartUploadCommand.d.ts +42 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/DeleteBucketAnalyticsConfigurationCommand.d.ts +38 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/DeleteBucketCommand.d.ts +33 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/DeleteBucketCorsCommand.d.ts +33 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/DeleteBucketEncryptionCommand.d.ts +37 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/DeleteBucketIntelligentTieringConfigurationCommand.d.ts +38 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/DeleteBucketInventoryConfigurationCommand.d.ts +38 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/DeleteBucketLifecycleCommand.d.ts +37 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/DeleteBucketMetricsConfigurationCommand.d.ts +38 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/DeleteBucketOwnershipControlsCommand.d.ts +38 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/DeleteBucketPolicyCommand.d.ts +34 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/DeleteBucketReplicationCommand.d.ts +38 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/DeleteBucketTaggingCommand.d.ts +34 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/DeleteBucketWebsiteCommand.d.ts +34 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/DeleteObjectCommand.d.ts +35 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/DeleteObjectTaggingCommand.d.ts +39 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/DeleteObjectsCommand.d.ts +35 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/DeletePublicAccessBlockCommand.d.ts +38 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/GetBucketAccelerateConfigurationCommand.d.ts +42 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/GetBucketAclCommand.d.ts +35 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/GetBucketAnalyticsConfigurationCommand.d.ts +42 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/GetBucketCorsCommand.d.ts +35 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/GetBucketEncryptionCommand.d.ts +39 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/GetBucketIntelligentTieringConfigurationCommand.d.ts +42 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/GetBucketInventoryConfigurationCommand.d.ts +42 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/GetBucketLifecycleConfigurationCommand.d.ts +42 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/GetBucketLocationCommand.d.ts +39 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/GetBucketLoggingCommand.d.ts +38 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/GetBucketMetricsConfigurationCommand.d.ts +42 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/GetBucketNotificationConfigurationCommand.d.ts +42 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/GetBucketOwnershipControlsCommand.d.ts +42 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/GetBucketPolicyCommand.d.ts +38 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/GetBucketPolicyStatusCommand.d.ts +42 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/GetBucketReplicationCommand.d.ts +42 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/GetBucketRequestPaymentCommand.d.ts +42 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/GetBucketTaggingCommand.d.ts +38 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/GetBucketVersioningCommand.d.ts +39 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/GetBucketWebsiteCommand.d.ts +38 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/GetObjectAclCommand.d.ts +35 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/GetObjectAttributesCommand.d.ts +39 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/GetObjectCommand.d.ts +36 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/GetObjectLegalHoldCommand.d.ts +39 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/GetObjectLockConfigurationCommand.d.ts +42 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/GetObjectRetentionCommand.d.ts +39 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/GetObjectTaggingCommand.d.ts +38 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/GetObjectTorrentCommand.d.ts +39 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/GetPublicAccessBlockCommand.d.ts +42 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/HeadBucketCommand.d.ts +33 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/HeadObjectCommand.d.ts +35 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/ListBucketAnalyticsConfigurationsCommand.d.ts +42 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/ListBucketIntelligentTieringConfigurationsCommand.d.ts +42 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/ListBucketInventoryConfigurationsCommand.d.ts +42 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/ListBucketMetricsConfigurationsCommand.d.ts +42 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/ListBucketsCommand.d.ts +35 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/ListMultipartUploadsCommand.d.ts +42 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/ListObjectVersionsCommand.d.ts +39 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/ListObjectsCommand.d.ts +35 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/ListObjectsV2Command.d.ts +35 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/ListPartsCommand.d.ts +35 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/PutBucketAccelerateConfigurationCommand.d.ts +38 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/PutBucketAclCommand.d.ts +33 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/PutBucketAnalyticsConfigurationCommand.d.ts +38 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/PutBucketCorsCommand.d.ts +33 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/PutBucketEncryptionCommand.d.ts +34 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/PutBucketIntelligentTieringConfigurationCommand.d.ts +38 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/PutBucketInventoryConfigurationCommand.d.ts +38 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/PutBucketLifecycleConfigurationCommand.d.ts +38 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/PutBucketLoggingCommand.d.ts +33 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/PutBucketMetricsConfigurationCommand.d.ts +38 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/PutBucketNotificationConfigurationCommand.d.ts +38 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/PutBucketOwnershipControlsCommand.d.ts +38 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/PutBucketPolicyCommand.d.ts +33 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/PutBucketReplicationCommand.d.ts +37 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/PutBucketRequestPaymentCommand.d.ts +38 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/PutBucketTaggingCommand.d.ts +33 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/PutBucketVersioningCommand.d.ts +34 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/PutBucketWebsiteCommand.d.ts +33 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/PutObjectAclCommand.d.ts +35 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/PutObjectCommand.d.ts +41 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/PutObjectLegalHoldCommand.d.ts +39 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/PutObjectLockConfigurationCommand.d.ts +42 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/PutObjectRetentionCommand.d.ts +39 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/PutObjectTaggingCommand.d.ts +38 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/PutPublicAccessBlockCommand.d.ts +37 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/RestoreObjectCommand.d.ts +35 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/SelectObjectContentCommand.d.ts +39 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/UploadPartCommand.d.ts +41 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/UploadPartCopyCommand.d.ts +38 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/WriteGetObjectResponseCommand.d.ts +43 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/index.d.ts +93 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/endpoint/EndpointParameters.d.ts +46 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/endpoint/endpointResolver.d.ts +8 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/endpoint/ruleset.d.ts +2 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/index.d.ts +7 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/models/S3ServiceException.d.ts +8 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/models/index.d.ts +2 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/models/models_0.d.ts +2211 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/models/models_1.d.ts +460 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/pagination/Interfaces.d.ts +5 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/pagination/ListObjectsV2Paginator.d.ts +11 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/pagination/ListPartsPaginator.d.ts +11 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/pagination/index.d.ts +3 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/protocols/Aws_restXml.d.ts +1125 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/runtimeConfig.browser.d.ts +115 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/runtimeConfig.d.ts +115 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/runtimeConfig.native.d.ts +100 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/runtimeConfig.shared.d.ts +33 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/waiters/index.d.ts +4 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/waiters/waitForBucketExists.d.ts +11 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/waiters/waitForBucketNotExists.d.ts +11 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/waiters/waitForObjectExists.d.ts +11 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/waiters/waitForObjectNotExists.d.ts +11 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/waiters/index.d.ts +4 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/waiters/waitForBucketExists.d.ts +14 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/waiters/waitForBucketNotExists.d.ts +14 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/waiters/waitForObjectExists.d.ts +14 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/waiters/waitForObjectNotExists.d.ts +14 -0
- package/dist/node_modules/@aws-sdk/client-s3/package.json +1 -0
- package/dist/node_modules/mime-match/.travis.yml +11 -0
- package/dist/node_modules/mime-match/example.js +17 -0
- package/dist/node_modules/mime-match/index.js +1 -0
- package/dist/node_modules/mime-match/package.json +1 -0
- package/dist/node_modules/mime-match/test.js +45 -0
- package/dist/node_modules/mkdirp/LICENSE +21 -0
- package/dist/node_modules/mkdirp/bin/cmd.js +33 -0
- package/dist/node_modules/mkdirp/bin/usage.txt +12 -0
- package/dist/node_modules/mkdirp/index.js +1 -0
- package/dist/node_modules/mkdirp/package.json +1 -0
- package/dist/node_modules/mkdirp/readme.markdown +100 -0
- package/dist/node_modules/multer-aliyun-oss/bridge.js +1010 -0
- package/dist/node_modules/multer-aliyun-oss/events.js +977 -0
- package/dist/node_modules/multer-aliyun-oss/index.js +166 -0
- package/dist/node_modules/multer-aliyun-oss/package.json +1 -0
- package/dist/node_modules/multer-aliyun-oss/setup-node-sandbox.js +461 -0
- package/dist/node_modules/multer-aliyun-oss/setup-sandbox.js +545 -0
- package/dist/node_modules/multer-cos/LICENSE +24 -0
- package/dist/node_modules/multer-cos/demo/index.js +39 -0
- package/dist/node_modules/multer-cos/demo/myMulter.js +88 -0
- package/dist/node_modules/multer-cos/index.js +220 -0
- package/dist/node_modules/multer-cos/package.json +1 -0
- package/dist/node_modules/multer-s3/.gitattributes +1 -0
- package/dist/node_modules/multer-s3/.travis.yml +6 -0
- package/dist/node_modules/multer-s3/LICENSE +22 -0
- package/dist/node_modules/multer-s3/index.js +35 -0
- package/dist/node_modules/multer-s3/package.json +1 -0
- package/dist/node_modules/multer-s3/test/basic.js +293 -0
- package/dist/node_modules/multer-s3/test/files/a.txt +1 -0
- package/dist/node_modules/multer-s3/test/files/test.svg +3 -0
- package/dist/node_modules/multer-s3/test/files/test2.svg +9 -0
- package/dist/node_modules/multer-s3/test/util/mock-s3.js +17 -0
- package/dist/server/actions/attachments.js +173 -0
- package/dist/server/actions/index.js +16 -0
- package/dist/server/collections/attachments.js +67 -0
- package/dist/server/collections/storages.js +67 -0
- package/dist/server/constants.js +17 -0
- package/dist/server/index.js +23 -0
- package/dist/server/rules/index.js +14 -0
- package/dist/server/rules/mimetype.js +13 -0
- package/dist/server/server.js +75 -0
- package/{src/server/storages/ali-oss.ts → dist/server/storages/ali-oss.js} +17 -14
- package/dist/server/storages/index.js +30 -0
- package/dist/server/storages/local.js +148 -0
- package/{src/server/storages/s3.ts → dist/server/storages/s3.js} +26 -26
- package/dist/server/storages/tx-cos.js +44 -0
- package/dist/server/utils.js +26 -0
- package/package.json +21 -32
- package/server.d.ts +2 -3
- package/server.js +1 -1
- package/lib/client/FileManagerProvider.js +0 -94
- package/lib/client/FileStorage.js +0 -41
- package/lib/client/StorageOptions.js +0 -181
- package/lib/client/hooks/index.js +0 -16
- package/lib/client/hooks/useUploadFiles.js +0 -78
- package/lib/client/index.js +0 -27
- package/lib/client/initializers/UploadActionInitializer.js +0 -67
- package/lib/client/initializers/index.js +0 -16
- package/lib/client/interfaces/attachment.js +0 -139
- package/lib/client/locale/index.js +0 -19
- package/lib/client/schemas/storage.js +0 -408
- package/lib/client/templates/file.js +0 -164
- package/lib/client/templates/index.js +0 -16
- package/lib/index.js +0 -13
- package/lib/locale/en-US.js +0 -28
- package/lib/locale/fr-FR.js +0 -28
- package/lib/locale/ja-JP.js +0 -25
- package/lib/locale/ru-RU.js +0 -25
- package/lib/locale/tr-TR.js +0 -24
- package/lib/locale/zh-CN.js +0 -38
- package/lib/server/actions/attachments.js +0 -211
- package/lib/server/actions/index.js +0 -22
- package/lib/server/collections/attachments.js +0 -61
- package/lib/server/collections/storages.js +0 -61
- package/lib/server/constants.js +0 -20
- package/lib/server/index.js +0 -26
- package/lib/server/rules/index.js +0 -13
- package/lib/server/rules/mimetype.js +0 -17
- package/lib/server/server.js +0 -105
- package/lib/server/storages/ali-oss.js +0 -44
- package/lib/server/storages/index.js +0 -30
- package/lib/server/storages/local.js +0 -233
- package/lib/server/storages/s3.js +0 -86
- package/lib/server/storages/tx-cos.js +0 -58
- package/lib/server/utils.js +0 -36
- package/src/client/FileManagerProvider.tsx +0 -84
- package/src/client/FileStorage.tsx +0 -15
- package/src/client/StorageOptions.tsx +0 -146
- package/src/client/hooks/index.ts +0 -1
- package/src/client/hooks/useUploadFiles.ts +0 -55
- package/src/client/index.tsx +0 -10
- package/src/client/initializers/UploadActionInitializer.tsx +0 -42
- package/src/client/initializers/index.ts +0 -1
- package/src/client/interfaces/attachment.ts +0 -116
- package/src/client/locale/index.ts +0 -7
- package/src/client/schemas/storage.ts +0 -391
- package/src/client/templates/file.ts +0 -154
- package/src/client/templates/index.ts +0 -1
- package/src/index.ts +0 -1
- package/src/locale/en-US.ts +0 -21
- package/src/locale/fr-FR.ts +0 -21
- package/src/locale/ja-JP.ts +0 -18
- package/src/locale/ru-RU.ts +0 -18
- package/src/locale/tr-TR.ts +0 -17
- package/src/locale/zh-CN.ts +0 -31
- package/src/server/__tests__/action.test.ts +0 -332
- package/src/server/__tests__/attachment.test.ts +0 -50
- package/src/server/__tests__/files/image.jpg +0 -0
- package/src/server/__tests__/files/image.png +0 -0
- package/src/server/__tests__/files/text.txt +0 -1
- package/src/server/__tests__/index.ts +0 -34
- package/src/server/__tests__/storages/ali-oss.test.ts +0 -127
- package/src/server/__tests__/storages/s3.test.ts +0 -126
- package/src/server/__tests__/storages/tx-cos.test.ts +0 -69
- package/src/server/__tests__/tables/users.ts +0 -26
- package/src/server/actions/attachments.ts +0 -175
- package/src/server/actions/index.ts +0 -9
- package/src/server/collections/attachments.ts +0 -65
- package/src/server/collections/storages.ts +0 -65
- package/src/server/constants.ts +0 -8
- package/src/server/index.ts +0 -2
- package/src/server/rules/index.ts +0 -3
- package/src/server/rules/mimetype.ts +0 -5
- package/src/server/server.ts +0 -79
- package/src/server/storages/index.ts +0 -46
- package/src/server/storages/local.ts +0 -167
- package/src/server/storages/tx-cos.ts +0 -42
- package/src/server/utils.ts +0 -17
- /package/{lib → dist}/client/FileManagerProvider.d.ts +0 -0
- /package/{lib → dist}/client/FileStorage.d.ts +0 -0
- /package/{lib → dist}/client/StorageOptions.d.ts +0 -0
- /package/{lib → dist}/client/hooks/index.d.ts +0 -0
- /package/{lib → dist}/client/hooks/useUploadFiles.d.ts +0 -0
- /package/{lib → dist}/client/index.d.ts +0 -0
- /package/{lib → dist}/client/initializers/UploadActionInitializer.d.ts +0 -0
- /package/{lib → dist}/client/initializers/index.d.ts +0 -0
- /package/{lib → dist}/client/interfaces/attachment.d.ts +0 -0
- /package/{lib → dist}/client/locale/index.d.ts +0 -0
- /package/{lib → dist}/client/schemas/storage.d.ts +0 -0
- /package/{lib → dist}/client/templates/file.d.ts +0 -0
- /package/{lib → dist}/client/templates/index.d.ts +0 -0
- /package/{lib → dist}/locale/en-US.d.ts +0 -0
- /package/{lib → dist}/locale/fr-FR.d.ts +0 -0
- /package/{lib → dist}/locale/ja-JP.d.ts +0 -0
- /package/{lib → dist}/locale/ru-RU.d.ts +0 -0
- /package/{lib → dist}/locale/tr-TR.d.ts +0 -0
- /package/{lib → dist}/locale/zh-CN.d.ts +0 -0
- /package/{lib → dist}/server/actions/attachments.d.ts +0 -0
- /package/{lib → dist}/server/actions/index.d.ts +0 -0
- /package/{lib → dist}/server/collections/attachments.d.ts +0 -0
- /package/{lib → dist}/server/collections/storages.d.ts +0 -0
- /package/{lib → dist}/server/constants.d.ts +0 -0
- /package/{lib → dist}/server/index.d.ts +0 -0
- /package/{lib → dist}/server/rules/index.d.ts +0 -0
- /package/{lib → dist}/server/rules/mimetype.d.ts +0 -0
- /package/{lib → dist}/server/server.d.ts +0 -0
- /package/{lib → dist}/server/storages/ali-oss.d.ts +0 -0
- /package/{lib → dist}/server/storages/index.d.ts +0 -0
- /package/{lib → dist}/server/storages/local.d.ts +0 -0
- /package/{lib → dist}/server/storages/s3.d.ts +0 -0
- /package/{lib → dist}/server/storages/tx-cos.d.ts +0 -0
- /package/{lib → dist}/server/utils.d.ts +0 -0
|
@@ -0,0 +1,545 @@
|
|
|
1
|
+
/* global host, bridge, data, context */
|
|
2
|
+
|
|
3
|
+
'use strict';
|
|
4
|
+
|
|
5
|
+
const {
|
|
6
|
+
Object: localObject,
|
|
7
|
+
Array: localArray,
|
|
8
|
+
Error: LocalError,
|
|
9
|
+
Reflect: localReflect,
|
|
10
|
+
Proxy: LocalProxy,
|
|
11
|
+
WeakMap: LocalWeakMap,
|
|
12
|
+
Function: localFunction,
|
|
13
|
+
Promise: localPromise,
|
|
14
|
+
eval: localEval
|
|
15
|
+
} = global;
|
|
16
|
+
|
|
17
|
+
const {
|
|
18
|
+
freeze: localObjectFreeze
|
|
19
|
+
} = localObject;
|
|
20
|
+
|
|
21
|
+
const {
|
|
22
|
+
getPrototypeOf: localReflectGetPrototypeOf,
|
|
23
|
+
apply: localReflectApply,
|
|
24
|
+
construct: localReflectConstruct,
|
|
25
|
+
deleteProperty: localReflectDeleteProperty,
|
|
26
|
+
has: localReflectHas,
|
|
27
|
+
defineProperty: localReflectDefineProperty,
|
|
28
|
+
setPrototypeOf: localReflectSetPrototypeOf,
|
|
29
|
+
getOwnPropertyDescriptor: localReflectGetOwnPropertyDescriptor
|
|
30
|
+
} = localReflect;
|
|
31
|
+
|
|
32
|
+
const {
|
|
33
|
+
isArray: localArrayIsArray
|
|
34
|
+
} = localArray;
|
|
35
|
+
|
|
36
|
+
const {
|
|
37
|
+
ensureThis,
|
|
38
|
+
ReadOnlyHandler,
|
|
39
|
+
from,
|
|
40
|
+
fromWithFactory,
|
|
41
|
+
readonlyFactory,
|
|
42
|
+
connect,
|
|
43
|
+
addProtoMapping,
|
|
44
|
+
VMError,
|
|
45
|
+
ReadOnlyMockHandler
|
|
46
|
+
} = bridge;
|
|
47
|
+
|
|
48
|
+
const {
|
|
49
|
+
allowAsync,
|
|
50
|
+
GeneratorFunction,
|
|
51
|
+
AsyncFunction,
|
|
52
|
+
AsyncGeneratorFunction
|
|
53
|
+
} = data;
|
|
54
|
+
|
|
55
|
+
const {
|
|
56
|
+
get: localWeakMapGet,
|
|
57
|
+
set: localWeakMapSet
|
|
58
|
+
} = LocalWeakMap.prototype;
|
|
59
|
+
|
|
60
|
+
function localUnexpected() {
|
|
61
|
+
return new VMError('Should not happen');
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
// global is originally prototype of host.Object so it can be used to climb up from the sandbox.
|
|
65
|
+
if (!localReflectSetPrototypeOf(context, localObject.prototype)) throw localUnexpected();
|
|
66
|
+
|
|
67
|
+
Object.defineProperties(global, {
|
|
68
|
+
global: {value: global, writable: true, configurable: true, enumerable: true},
|
|
69
|
+
globalThis: {value: global, writable: true, configurable: true},
|
|
70
|
+
GLOBAL: {value: global, writable: true, configurable: true},
|
|
71
|
+
root: {value: global, writable: true, configurable: true},
|
|
72
|
+
Error: {value: LocalError}
|
|
73
|
+
});
|
|
74
|
+
|
|
75
|
+
if (!localReflectDefineProperty(global, 'VMError', {
|
|
76
|
+
__proto__: null,
|
|
77
|
+
value: VMError,
|
|
78
|
+
writable: true,
|
|
79
|
+
enumerable: false,
|
|
80
|
+
configurable: true
|
|
81
|
+
})) throw localUnexpected();
|
|
82
|
+
|
|
83
|
+
// Fixes buffer unsafe allocation
|
|
84
|
+
/* eslint-disable no-use-before-define */
|
|
85
|
+
class BufferHandler extends ReadOnlyHandler {
|
|
86
|
+
|
|
87
|
+
apply(target, thiz, args) {
|
|
88
|
+
if (args.length > 0 && typeof args[0] === 'number') {
|
|
89
|
+
return LocalBuffer.alloc(args[0]);
|
|
90
|
+
}
|
|
91
|
+
return localReflectApply(LocalBuffer.from, LocalBuffer, args);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
construct(target, args, newTarget) {
|
|
95
|
+
if (args.length > 0 && typeof args[0] === 'number') {
|
|
96
|
+
return LocalBuffer.alloc(args[0]);
|
|
97
|
+
}
|
|
98
|
+
return localReflectApply(LocalBuffer.from, LocalBuffer, args);
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
}
|
|
102
|
+
/* eslint-enable no-use-before-define */
|
|
103
|
+
|
|
104
|
+
const LocalBuffer = fromWithFactory(obj => new BufferHandler(obj), host.Buffer);
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
if (!localReflectDefineProperty(global, 'Buffer', {
|
|
108
|
+
__proto__: null,
|
|
109
|
+
value: LocalBuffer,
|
|
110
|
+
writable: true,
|
|
111
|
+
enumerable: false,
|
|
112
|
+
configurable: true
|
|
113
|
+
})) throw localUnexpected();
|
|
114
|
+
|
|
115
|
+
addProtoMapping(LocalBuffer.prototype, host.Buffer.prototype, 'Uint8Array');
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
*
|
|
119
|
+
* @param {*} size Size of new buffer
|
|
120
|
+
* @this LocalBuffer
|
|
121
|
+
* @return {LocalBuffer}
|
|
122
|
+
*/
|
|
123
|
+
function allocUnsafe(size) {
|
|
124
|
+
return LocalBuffer.alloc(size);
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
connect(allocUnsafe, host.Buffer.allocUnsafe);
|
|
128
|
+
|
|
129
|
+
/**
|
|
130
|
+
*
|
|
131
|
+
* @param {*} size Size of new buffer
|
|
132
|
+
* @this LocalBuffer
|
|
133
|
+
* @return {LocalBuffer}
|
|
134
|
+
*/
|
|
135
|
+
function allocUnsafeSlow(size) {
|
|
136
|
+
return LocalBuffer.alloc(size);
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
connect(allocUnsafeSlow, host.Buffer.allocUnsafeSlow);
|
|
140
|
+
|
|
141
|
+
/**
|
|
142
|
+
* Replacement for Buffer inspect
|
|
143
|
+
*
|
|
144
|
+
* @param {*} recurseTimes
|
|
145
|
+
* @param {*} ctx
|
|
146
|
+
* @this LocalBuffer
|
|
147
|
+
* @return {string}
|
|
148
|
+
*/
|
|
149
|
+
function inspect(recurseTimes, ctx) {
|
|
150
|
+
// Mimic old behavior, could throw but didn't pass a test.
|
|
151
|
+
const max = host.INSPECT_MAX_BYTES;
|
|
152
|
+
const actualMax = Math.min(max, this.length);
|
|
153
|
+
const remaining = this.length - max;
|
|
154
|
+
let str = this.hexSlice(0, actualMax).replace(/(.{2})/g, '$1 ').trim();
|
|
155
|
+
if (remaining > 0) str += ` ... ${remaining} more byte${remaining > 1 ? 's' : ''}`;
|
|
156
|
+
return `<${this.constructor.name} ${str}>`;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
connect(inspect, host.Buffer.prototype.inspect);
|
|
160
|
+
|
|
161
|
+
connect(localFunction.prototype.bind, host.Function.prototype.bind);
|
|
162
|
+
|
|
163
|
+
connect(localObject.prototype.__defineGetter__, host.Object.prototype.__defineGetter__);
|
|
164
|
+
connect(localObject.prototype.__defineSetter__, host.Object.prototype.__defineSetter__);
|
|
165
|
+
connect(localObject.prototype.__lookupGetter__, host.Object.prototype.__lookupGetter__);
|
|
166
|
+
connect(localObject.prototype.__lookupSetter__, host.Object.prototype.__lookupSetter__);
|
|
167
|
+
|
|
168
|
+
/*
|
|
169
|
+
* PrepareStackTrace sanitization
|
|
170
|
+
*/
|
|
171
|
+
|
|
172
|
+
const oldPrepareStackTraceDesc = localReflectGetOwnPropertyDescriptor(LocalError, 'prepareStackTrace');
|
|
173
|
+
|
|
174
|
+
let currentPrepareStackTrace = LocalError.prepareStackTrace;
|
|
175
|
+
const wrappedPrepareStackTrace = new LocalWeakMap();
|
|
176
|
+
if (typeof currentPrepareStackTrace === 'function') {
|
|
177
|
+
wrappedPrepareStackTrace.set(currentPrepareStackTrace, currentPrepareStackTrace);
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
let OriginalCallSite;
|
|
181
|
+
LocalError.prepareStackTrace = (e, sst) => {
|
|
182
|
+
OriginalCallSite = sst[0].constructor;
|
|
183
|
+
};
|
|
184
|
+
new LocalError().stack;
|
|
185
|
+
if (typeof OriginalCallSite === 'function') {
|
|
186
|
+
LocalError.prepareStackTrace = undefined;
|
|
187
|
+
|
|
188
|
+
function makeCallSiteGetters(list) {
|
|
189
|
+
const callSiteGetters = [];
|
|
190
|
+
for (let i=0; i<list.length; i++) {
|
|
191
|
+
const name = list[i];
|
|
192
|
+
const func = OriginalCallSite.prototype[name];
|
|
193
|
+
callSiteGetters[i] = {__proto__: null,
|
|
194
|
+
name,
|
|
195
|
+
propName: '_' + name,
|
|
196
|
+
func: (thiz) => {
|
|
197
|
+
return localReflectApply(func, thiz, []);
|
|
198
|
+
}
|
|
199
|
+
};
|
|
200
|
+
}
|
|
201
|
+
return callSiteGetters;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
function applyCallSiteGetters(thiz, callSite, getters) {
|
|
205
|
+
for (let i=0; i<getters.length; i++) {
|
|
206
|
+
const getter = getters[i];
|
|
207
|
+
localReflectDefineProperty(thiz, getter.propName, {
|
|
208
|
+
__proto__: null,
|
|
209
|
+
value: getter.func(callSite)
|
|
210
|
+
});
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
const callSiteGetters = makeCallSiteGetters([
|
|
215
|
+
'getTypeName',
|
|
216
|
+
'getFunctionName',
|
|
217
|
+
'getMethodName',
|
|
218
|
+
'getFileName',
|
|
219
|
+
'getLineNumber',
|
|
220
|
+
'getColumnNumber',
|
|
221
|
+
'getEvalOrigin',
|
|
222
|
+
'isToplevel',
|
|
223
|
+
'isEval',
|
|
224
|
+
'isNative',
|
|
225
|
+
'isConstructor',
|
|
226
|
+
'isAsync',
|
|
227
|
+
'isPromiseAll',
|
|
228
|
+
'getPromiseIndex'
|
|
229
|
+
]);
|
|
230
|
+
|
|
231
|
+
class CallSite {
|
|
232
|
+
constructor(callSite) {
|
|
233
|
+
applyCallSiteGetters(this, callSite, callSiteGetters);
|
|
234
|
+
}
|
|
235
|
+
getThis() {
|
|
236
|
+
return undefined;
|
|
237
|
+
}
|
|
238
|
+
getFunction() {
|
|
239
|
+
return undefined;
|
|
240
|
+
}
|
|
241
|
+
toString() {
|
|
242
|
+
return 'CallSite {}';
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
|
|
247
|
+
for (let i=0; i<callSiteGetters.length; i++) {
|
|
248
|
+
const name = callSiteGetters[i].name;
|
|
249
|
+
const funcProp = localReflectGetOwnPropertyDescriptor(OriginalCallSite.prototype, name);
|
|
250
|
+
if (!funcProp) continue;
|
|
251
|
+
const propertyName = callSiteGetters[i].propName;
|
|
252
|
+
const func = {func() {
|
|
253
|
+
return this[propertyName];
|
|
254
|
+
}}.func;
|
|
255
|
+
const nameProp = localReflectGetOwnPropertyDescriptor(func, 'name');
|
|
256
|
+
if (!nameProp) throw localUnexpected();
|
|
257
|
+
nameProp.value = name;
|
|
258
|
+
if (!localReflectDefineProperty(func, 'name', nameProp)) throw localUnexpected();
|
|
259
|
+
funcProp.value = func;
|
|
260
|
+
if (!localReflectDefineProperty(CallSite.prototype, name, funcProp)) throw localUnexpected();
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
if (!localReflectDefineProperty(LocalError, 'prepareStackTrace', {
|
|
264
|
+
configurable: false,
|
|
265
|
+
enumerable: false,
|
|
266
|
+
get() {
|
|
267
|
+
return currentPrepareStackTrace;
|
|
268
|
+
},
|
|
269
|
+
set(value) {
|
|
270
|
+
if (typeof(value) !== 'function') {
|
|
271
|
+
currentPrepareStackTrace = value;
|
|
272
|
+
return;
|
|
273
|
+
}
|
|
274
|
+
const wrapped = localReflectApply(localWeakMapGet, wrappedPrepareStackTrace, [value]);
|
|
275
|
+
if (wrapped) {
|
|
276
|
+
currentPrepareStackTrace = wrapped;
|
|
277
|
+
return;
|
|
278
|
+
}
|
|
279
|
+
const newWrapped = (error, sst) => {
|
|
280
|
+
const sandboxSst = ensureThis(sst);
|
|
281
|
+
if (localArrayIsArray(sst)) {
|
|
282
|
+
if (sst === sandboxSst) {
|
|
283
|
+
for (let i=0; i < sst.length; i++) {
|
|
284
|
+
const cs = sst[i];
|
|
285
|
+
if (typeof cs === 'object' && localReflectGetPrototypeOf(cs) === OriginalCallSite.prototype) {
|
|
286
|
+
sst[i] = new CallSite(cs);
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
} else {
|
|
290
|
+
sst = [];
|
|
291
|
+
for (let i=0; i < sandboxSst.length; i++) {
|
|
292
|
+
const cs = sandboxSst[i];
|
|
293
|
+
localReflectDefineProperty(sst, i, {
|
|
294
|
+
__proto__: null,
|
|
295
|
+
value: new CallSite(cs),
|
|
296
|
+
enumerable: true,
|
|
297
|
+
configurable: true,
|
|
298
|
+
writable: true
|
|
299
|
+
});
|
|
300
|
+
}
|
|
301
|
+
}
|
|
302
|
+
} else {
|
|
303
|
+
sst = sandboxSst;
|
|
304
|
+
}
|
|
305
|
+
return value(error, sst);
|
|
306
|
+
};
|
|
307
|
+
localReflectApply(localWeakMapSet, wrappedPrepareStackTrace, [value, newWrapped]);
|
|
308
|
+
localReflectApply(localWeakMapSet, wrappedPrepareStackTrace, [newWrapped, newWrapped]);
|
|
309
|
+
currentPrepareStackTrace = newWrapped;
|
|
310
|
+
}
|
|
311
|
+
})) throw localUnexpected();
|
|
312
|
+
} else if (oldPrepareStackTraceDesc) {
|
|
313
|
+
localReflectDefineProperty(LocalError, 'prepareStackTrace', oldPrepareStackTraceDesc);
|
|
314
|
+
} else {
|
|
315
|
+
localReflectDeleteProperty(LocalError, 'prepareStackTrace');
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
/*
|
|
319
|
+
* Exception sanitization
|
|
320
|
+
*/
|
|
321
|
+
|
|
322
|
+
const withProxy = localObjectFreeze({
|
|
323
|
+
__proto__: null,
|
|
324
|
+
has(target, key) {
|
|
325
|
+
if (key === host.INTERNAL_STATE_NAME) return false;
|
|
326
|
+
return localReflectHas(target, key);
|
|
327
|
+
}
|
|
328
|
+
});
|
|
329
|
+
|
|
330
|
+
const interanState = localObjectFreeze({
|
|
331
|
+
__proto__: null,
|
|
332
|
+
wrapWith(x) {
|
|
333
|
+
if (x === null || x === undefined) return x;
|
|
334
|
+
return new LocalProxy(localObject(x), withProxy);
|
|
335
|
+
},
|
|
336
|
+
handleException: ensureThis,
|
|
337
|
+
import(what) {
|
|
338
|
+
throw new VMError('Dynamic Import not supported');
|
|
339
|
+
}
|
|
340
|
+
});
|
|
341
|
+
|
|
342
|
+
if (!localReflectDefineProperty(global, host.INTERNAL_STATE_NAME, {
|
|
343
|
+
__proto__: null,
|
|
344
|
+
configurable: false,
|
|
345
|
+
enumerable: false,
|
|
346
|
+
writable: false,
|
|
347
|
+
value: interanState
|
|
348
|
+
})) throw localUnexpected();
|
|
349
|
+
|
|
350
|
+
/*
|
|
351
|
+
* Eval sanitization
|
|
352
|
+
*/
|
|
353
|
+
|
|
354
|
+
function throwAsync() {
|
|
355
|
+
return new VMError('Async not available');
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
function makeFunction(inputArgs, isAsync, isGenerator) {
|
|
359
|
+
const lastArgs = inputArgs.length - 1;
|
|
360
|
+
let code = lastArgs >= 0 ? `${inputArgs[lastArgs]}` : '';
|
|
361
|
+
let args = lastArgs > 0 ? `${inputArgs[0]}` : '';
|
|
362
|
+
for (let i = 1; i < lastArgs; i++) {
|
|
363
|
+
args += `,${inputArgs[i]}`;
|
|
364
|
+
}
|
|
365
|
+
try {
|
|
366
|
+
code = host.transformAndCheck(args, code, isAsync, isGenerator, allowAsync);
|
|
367
|
+
} catch (e) {
|
|
368
|
+
throw bridge.from(e);
|
|
369
|
+
}
|
|
370
|
+
return localEval(code);
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
const FunctionHandler = {
|
|
374
|
+
__proto__: null,
|
|
375
|
+
apply(target, thiz, args) {
|
|
376
|
+
return makeFunction(args, this.isAsync, this.isGenerator);
|
|
377
|
+
},
|
|
378
|
+
construct(target, args, newTarget) {
|
|
379
|
+
return makeFunction(args, this.isAsync, this.isGenerator);
|
|
380
|
+
}
|
|
381
|
+
};
|
|
382
|
+
|
|
383
|
+
const EvalHandler = {
|
|
384
|
+
__proto__: null,
|
|
385
|
+
apply(target, thiz, args) {
|
|
386
|
+
if (args.length === 0) return undefined;
|
|
387
|
+
let code = `${args[0]}`;
|
|
388
|
+
try {
|
|
389
|
+
code = host.transformAndCheck(null, code, false, false, allowAsync);
|
|
390
|
+
} catch (e) {
|
|
391
|
+
throw bridge.from(e);
|
|
392
|
+
}
|
|
393
|
+
return localEval(code);
|
|
394
|
+
}
|
|
395
|
+
};
|
|
396
|
+
|
|
397
|
+
const AsyncErrorHandler = {
|
|
398
|
+
__proto__: null,
|
|
399
|
+
apply(target, thiz, args) {
|
|
400
|
+
throw throwAsync();
|
|
401
|
+
},
|
|
402
|
+
construct(target, args, newTarget) {
|
|
403
|
+
throw throwAsync();
|
|
404
|
+
}
|
|
405
|
+
};
|
|
406
|
+
|
|
407
|
+
function makeCheckFunction(isAsync, isGenerator) {
|
|
408
|
+
if (isAsync && !allowAsync) return AsyncErrorHandler;
|
|
409
|
+
return {
|
|
410
|
+
__proto__: FunctionHandler,
|
|
411
|
+
isAsync,
|
|
412
|
+
isGenerator
|
|
413
|
+
};
|
|
414
|
+
}
|
|
415
|
+
|
|
416
|
+
function overrideWithProxy(obj, prop, value, handler) {
|
|
417
|
+
const proxy = new LocalProxy(value, handler);
|
|
418
|
+
if (!localReflectDefineProperty(obj, prop, {__proto__: null, value: proxy})) throw localUnexpected();
|
|
419
|
+
return proxy;
|
|
420
|
+
}
|
|
421
|
+
|
|
422
|
+
const proxiedFunction = overrideWithProxy(localFunction.prototype, 'constructor', localFunction, makeCheckFunction(false, false));
|
|
423
|
+
if (GeneratorFunction) {
|
|
424
|
+
if (!localReflectSetPrototypeOf(GeneratorFunction, proxiedFunction)) throw localUnexpected();
|
|
425
|
+
overrideWithProxy(GeneratorFunction.prototype, 'constructor', GeneratorFunction, makeCheckFunction(false, true));
|
|
426
|
+
}
|
|
427
|
+
if (AsyncFunction) {
|
|
428
|
+
if (!localReflectSetPrototypeOf(AsyncFunction, proxiedFunction)) throw localUnexpected();
|
|
429
|
+
overrideWithProxy(AsyncFunction.prototype, 'constructor', AsyncFunction, makeCheckFunction(true, false));
|
|
430
|
+
}
|
|
431
|
+
if (AsyncGeneratorFunction) {
|
|
432
|
+
if (!localReflectSetPrototypeOf(AsyncGeneratorFunction, proxiedFunction)) throw localUnexpected();
|
|
433
|
+
overrideWithProxy(AsyncGeneratorFunction.prototype, 'constructor', AsyncGeneratorFunction, makeCheckFunction(true, true));
|
|
434
|
+
}
|
|
435
|
+
|
|
436
|
+
function makeSafeHandlerArgs(args) {
|
|
437
|
+
const sArgs = ensureThis(args);
|
|
438
|
+
if (sArgs === args) return args;
|
|
439
|
+
const a = [];
|
|
440
|
+
for (let i=0; i < sArgs.length; i++) {
|
|
441
|
+
localReflectDefineProperty(a, i, {
|
|
442
|
+
__proto__: null,
|
|
443
|
+
value: sArgs[i],
|
|
444
|
+
enumerable: true,
|
|
445
|
+
configurable: true,
|
|
446
|
+
writable: true
|
|
447
|
+
});
|
|
448
|
+
}
|
|
449
|
+
return a;
|
|
450
|
+
}
|
|
451
|
+
|
|
452
|
+
const makeSafeArgs = Object.freeze({
|
|
453
|
+
__proto__: null,
|
|
454
|
+
apply(target, thiz, args) {
|
|
455
|
+
return localReflectApply(target, thiz, makeSafeHandlerArgs(args));
|
|
456
|
+
},
|
|
457
|
+
construct(target, args, newTarget) {
|
|
458
|
+
return localReflectConstruct(target, makeSafeHandlerArgs(args), newTarget);
|
|
459
|
+
}
|
|
460
|
+
});
|
|
461
|
+
|
|
462
|
+
const proxyHandlerHandler = Object.freeze({
|
|
463
|
+
__proto__: null,
|
|
464
|
+
get(target, name, receiver) {
|
|
465
|
+
const value = target.handler[name];
|
|
466
|
+
if (typeof value !== 'function') return value;
|
|
467
|
+
return new LocalProxy(value, makeSafeArgs);
|
|
468
|
+
}
|
|
469
|
+
});
|
|
470
|
+
|
|
471
|
+
function wrapProxyHandler(args) {
|
|
472
|
+
if (args.length < 2) return args;
|
|
473
|
+
const handler = args[1];
|
|
474
|
+
args[1] = new LocalProxy({__proto__: null, handler}, proxyHandlerHandler);
|
|
475
|
+
return args;
|
|
476
|
+
}
|
|
477
|
+
|
|
478
|
+
const proxyHandler = Object.freeze({
|
|
479
|
+
__proto__: null,
|
|
480
|
+
apply(target, thiz, args) {
|
|
481
|
+
return localReflectApply(target, thiz, wrapProxyHandler(args));
|
|
482
|
+
},
|
|
483
|
+
construct(target, args, newTarget) {
|
|
484
|
+
return localReflectConstruct(target, wrapProxyHandler(args), newTarget);
|
|
485
|
+
}
|
|
486
|
+
});
|
|
487
|
+
|
|
488
|
+
const proxiedProxy = new LocalProxy(LocalProxy, proxyHandler);
|
|
489
|
+
|
|
490
|
+
overrideWithProxy(LocalProxy, 'revocable', LocalProxy.revocable, proxyHandler);
|
|
491
|
+
|
|
492
|
+
global.Proxy = proxiedProxy;
|
|
493
|
+
global.Function = proxiedFunction;
|
|
494
|
+
global.eval = new LocalProxy(localEval, EvalHandler);
|
|
495
|
+
|
|
496
|
+
/*
|
|
497
|
+
* Promise sanitization
|
|
498
|
+
*/
|
|
499
|
+
|
|
500
|
+
if (localPromise) {
|
|
501
|
+
|
|
502
|
+
const PromisePrototype = localPromise.prototype;
|
|
503
|
+
|
|
504
|
+
if (!allowAsync) {
|
|
505
|
+
|
|
506
|
+
overrideWithProxy(PromisePrototype, 'then', PromisePrototype.then, AsyncErrorHandler);
|
|
507
|
+
// This seems not to work, and will produce
|
|
508
|
+
// UnhandledPromiseRejectionWarning: TypeError: Method Promise.prototype.then called on incompatible receiver [object Object].
|
|
509
|
+
// This is likely caused since the host.Promise.prototype.then cannot use the VM Proxy object.
|
|
510
|
+
// Contextify.connect(host.Promise.prototype.then, Promise.prototype.then);
|
|
511
|
+
|
|
512
|
+
} else {
|
|
513
|
+
|
|
514
|
+
overrideWithProxy(PromisePrototype, 'then', PromisePrototype.then, {
|
|
515
|
+
__proto__: null,
|
|
516
|
+
apply(target, thiz, args) {
|
|
517
|
+
if (args.length > 1) {
|
|
518
|
+
const onRejected = args[1];
|
|
519
|
+
if (typeof onRejected === 'function') {
|
|
520
|
+
args[1] = function wrapper(error) {
|
|
521
|
+
error = ensureThis(error);
|
|
522
|
+
return localReflectApply(onRejected, this, [error]);
|
|
523
|
+
};
|
|
524
|
+
}
|
|
525
|
+
}
|
|
526
|
+
return localReflectApply(target, thiz, args);
|
|
527
|
+
}
|
|
528
|
+
});
|
|
529
|
+
|
|
530
|
+
}
|
|
531
|
+
|
|
532
|
+
}
|
|
533
|
+
|
|
534
|
+
function readonly(other, mock) {
|
|
535
|
+
// Note: other@other(unsafe) mock@other(unsafe) returns@this(unsafe) throws@this(unsafe)
|
|
536
|
+
if (!mock) return fromWithFactory(readonlyFactory, other);
|
|
537
|
+
const tmock = from(mock);
|
|
538
|
+
return fromWithFactory(obj=>new ReadOnlyMockHandler(obj, tmock), other);
|
|
539
|
+
}
|
|
540
|
+
|
|
541
|
+
return {
|
|
542
|
+
__proto__: null,
|
|
543
|
+
readonly,
|
|
544
|
+
global
|
|
545
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
(The MIT License)
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2009-2014 TJ Holowaychuk <tj@vision-media.ca>
|
|
4
|
+
Copyright (c) 2013-2014 Roman Shtylman <shtylman+expressjs@gmail.com>
|
|
5
|
+
Copyright (c) 2014-2015 Douglas Christopher Wilson <doug@somethingdoug.com>
|
|
6
|
+
|
|
7
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
|
8
|
+
a copy of this software and associated documentation files (the
|
|
9
|
+
'Software'), to deal in the Software without restriction, including
|
|
10
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
|
11
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
|
12
|
+
permit persons to whom the Software is furnished to do so, subject to
|
|
13
|
+
the following conditions:
|
|
14
|
+
|
|
15
|
+
The above copyright notice and this permission notice shall be
|
|
16
|
+
included in all copies or substantial portions of the Software.
|
|
17
|
+
|
|
18
|
+
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
|
|
19
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
20
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
|
21
|
+
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
|
22
|
+
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
|
23
|
+
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
|
24
|
+
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
let express= require('express');
|
|
2
|
+
let myMulter = require('./myMulter');
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
let app = express();
|
|
6
|
+
let server = require('http').Server(app);
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
//文件上传服务
|
|
10
|
+
app.post('/upload', function (req, res, next) {
|
|
11
|
+
|
|
12
|
+
let responseData; //响应的数据
|
|
13
|
+
|
|
14
|
+
var upload=myMulter('file',1);
|
|
15
|
+
|
|
16
|
+
upload(req, res, function (err) {
|
|
17
|
+
|
|
18
|
+
try {
|
|
19
|
+
if (err) throw err;
|
|
20
|
+
if(req.files.length==0) throw new Error("不能上传空文件");
|
|
21
|
+
|
|
22
|
+
responseData={msg:"上传成功",code:2000};
|
|
23
|
+
responseData.url=req.files[0].url;
|
|
24
|
+
res.json(responseData);
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
}
|
|
28
|
+
catch (err) {
|
|
29
|
+
responseData={msg:"上传失败",code:4000};;
|
|
30
|
+
responseData.error=err.message;
|
|
31
|
+
res.status(500).json(responseData);
|
|
32
|
+
}
|
|
33
|
+
});
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
server.listen(3000);
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
let path=require('path');
|
|
2
|
+
let multer = require('multer');
|
|
3
|
+
let multerCOS = require('multer-COS');
|
|
4
|
+
require( 'dotenv' ).config();
|
|
5
|
+
/**
|
|
6
|
+
* multer
|
|
7
|
+
* https://github.com/expressjs/multer/blob/master/doc/README-zh-cn.md
|
|
8
|
+
* cos
|
|
9
|
+
* https://cloud.tencent.com/document/product/436/12264#options-object
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
//定义临时文件
|
|
14
|
+
let dir=path.resolve(__dirname,'./tmp');
|
|
15
|
+
|
|
16
|
+
//定义mimes-type
|
|
17
|
+
const mimes = {
|
|
18
|
+
'.png': 'image/png',
|
|
19
|
+
'.gif': 'image/gif',
|
|
20
|
+
'.jpg': 'image/jpeg',
|
|
21
|
+
'.jpeg': 'image/jpeg',
|
|
22
|
+
'.zip':'application/zip',
|
|
23
|
+
'.txt':'text/plain'
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
const cosConfig={
|
|
28
|
+
//id和key是必须
|
|
29
|
+
|
|
30
|
+
//SecretId: AKIXXXXXXXXXXX,
|
|
31
|
+
//SecretKey:XXXXXXXXXXXXXX,
|
|
32
|
+
//Bucket:test-bucket-125XXXXXXXXX
|
|
33
|
+
//Region=ap-shanghai
|
|
34
|
+
// 可选参数
|
|
35
|
+
FileParallelLimit: 3, // 控制文件上传并发数
|
|
36
|
+
ChunkParallelLimit: 3, // 控制单个文件下分片上传并发数
|
|
37
|
+
ChunkSize: 1024 * 1024, // 控制分片大小,单位 B
|
|
38
|
+
domain:'static.dorodoro-lab.com', //cos域名
|
|
39
|
+
dir:'upload', //cos文件路径
|
|
40
|
+
onProgress:function(progressData){//进度回调函数,回调是一个对象,包含进度信息
|
|
41
|
+
//console.log(progressData);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
//定义仓库
|
|
48
|
+
const storage = multerCOS({
|
|
49
|
+
cos:cosConfig,
|
|
50
|
+
//Note:如果你传递的是一个函数,你负责创建文件夹,如果你传递的是一个字符串,multer会自动创建 如果什么都不传 系统自己会生成tmp目录
|
|
51
|
+
destination: function (req, file, cb) {
|
|
52
|
+
cb(null, dir);
|
|
53
|
+
},
|
|
54
|
+
//自己会生成个随机16字母的文件名和后缀
|
|
55
|
+
filename:'auto'
|
|
56
|
+
});
|
|
57
|
+
|
|
58
|
+
//测试cos
|
|
59
|
+
//storage.test();
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
//定义过滤器
|
|
63
|
+
const fileFilter =function (req, file, cb) {
|
|
64
|
+
|
|
65
|
+
// 指示是否应接受该文件
|
|
66
|
+
let test = Object.values(mimes).filter(type=>type===file.mimetype);
|
|
67
|
+
|
|
68
|
+
// 接受这个文件,使用`true`,像这样:
|
|
69
|
+
if(test.length>0){
|
|
70
|
+
cb(null, true);
|
|
71
|
+
}else{ // 拒绝这个文件,使用`false`,像这样:
|
|
72
|
+
cb(new Error('file mimes not allow!'), false);
|
|
73
|
+
}
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
//定义限制
|
|
77
|
+
const limits={
|
|
78
|
+
fileSize:1024 * 1024 * 30
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
module.exports=function(opt) {
|
|
83
|
+
return multer({
|
|
84
|
+
storage: storage,
|
|
85
|
+
fileFilter:fileFilter,
|
|
86
|
+
limits: limits,
|
|
87
|
+
}).array(opt);
|
|
88
|
+
};
|