@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
|
@@ -1,332 +0,0 @@
|
|
|
1
|
-
import { promises as fs } from 'fs';
|
|
2
|
-
import path from 'path';
|
|
3
|
-
import { getApp } from '.';
|
|
4
|
-
import { FILE_FIELD_NAME, STORAGE_TYPE_LOCAL } from '../constants';
|
|
5
|
-
|
|
6
|
-
const { LOCAL_STORAGE_BASE_URL, LOCAL_STORAGE_DEST = 'storage/uploads', APP_PORT = '13000' } = process.env;
|
|
7
|
-
|
|
8
|
-
const DEFAULT_LOCAL_BASE_URL = LOCAL_STORAGE_BASE_URL || `http://localhost:${APP_PORT}/storage/uploads`;
|
|
9
|
-
|
|
10
|
-
describe('action', () => {
|
|
11
|
-
let app;
|
|
12
|
-
let agent;
|
|
13
|
-
let db;
|
|
14
|
-
let StorageRepo;
|
|
15
|
-
let AttachmentRepo;
|
|
16
|
-
|
|
17
|
-
beforeEach(async () => {
|
|
18
|
-
app = await getApp({
|
|
19
|
-
database: {},
|
|
20
|
-
});
|
|
21
|
-
agent = app.agent();
|
|
22
|
-
db = app.db;
|
|
23
|
-
|
|
24
|
-
AttachmentRepo = db.getCollection('attachments').repository;
|
|
25
|
-
StorageRepo = db.getCollection('storages').repository;
|
|
26
|
-
await StorageRepo.create({
|
|
27
|
-
values: {
|
|
28
|
-
name: 'local1',
|
|
29
|
-
type: STORAGE_TYPE_LOCAL,
|
|
30
|
-
baseUrl: DEFAULT_LOCAL_BASE_URL,
|
|
31
|
-
rules: {
|
|
32
|
-
size: 1024,
|
|
33
|
-
},
|
|
34
|
-
paranoid: true,
|
|
35
|
-
},
|
|
36
|
-
});
|
|
37
|
-
});
|
|
38
|
-
|
|
39
|
-
afterEach(async () => {
|
|
40
|
-
await db.close();
|
|
41
|
-
});
|
|
42
|
-
|
|
43
|
-
describe('create / upload', () => {
|
|
44
|
-
describe('default storage', () => {
|
|
45
|
-
it('upload file should be ok', async () => {
|
|
46
|
-
const { body } = await agent.resource('attachments').create({
|
|
47
|
-
[FILE_FIELD_NAME]: path.resolve(__dirname, './files/text.txt'),
|
|
48
|
-
});
|
|
49
|
-
|
|
50
|
-
const matcher = {
|
|
51
|
-
title: 'text',
|
|
52
|
-
extname: '.txt',
|
|
53
|
-
path: '',
|
|
54
|
-
size: 13,
|
|
55
|
-
mimetype: 'text/plain',
|
|
56
|
-
meta: {},
|
|
57
|
-
storageId: 1,
|
|
58
|
-
};
|
|
59
|
-
|
|
60
|
-
// 文件上传和解析是否正常
|
|
61
|
-
expect(body.data).toMatchObject(matcher);
|
|
62
|
-
// 文件的 url 是否正常生成
|
|
63
|
-
expect(body.data.url).toBe(`${DEFAULT_LOCAL_BASE_URL}${body.data.path}/${body.data.filename}`);
|
|
64
|
-
|
|
65
|
-
const Attachment = db.getModel('attachments');
|
|
66
|
-
const attachment = await Attachment.findOne({
|
|
67
|
-
where: { id: body.data.id },
|
|
68
|
-
include: ['storage'],
|
|
69
|
-
});
|
|
70
|
-
// 文件的数据是否正常保存
|
|
71
|
-
expect(attachment).toMatchObject(matcher);
|
|
72
|
-
|
|
73
|
-
// 关联的存储引擎是否正确
|
|
74
|
-
const storage = await attachment.getStorage();
|
|
75
|
-
expect(storage).toMatchObject({
|
|
76
|
-
type: 'local',
|
|
77
|
-
options: { documentRoot: LOCAL_STORAGE_DEST },
|
|
78
|
-
rules: {},
|
|
79
|
-
path: '',
|
|
80
|
-
baseUrl: DEFAULT_LOCAL_BASE_URL,
|
|
81
|
-
default: true,
|
|
82
|
-
});
|
|
83
|
-
|
|
84
|
-
const { documentRoot = 'storage/uploads' } = storage.options || {};
|
|
85
|
-
const destPath = path.resolve(
|
|
86
|
-
path.isAbsolute(documentRoot) ? documentRoot : path.join(process.cwd(), documentRoot),
|
|
87
|
-
storage.path,
|
|
88
|
-
);
|
|
89
|
-
const file = await fs.readFile(`${destPath}/${attachment.filename}`);
|
|
90
|
-
// 文件是否保存到指定路径
|
|
91
|
-
expect(file.toString()).toBe('Hello world!\n');
|
|
92
|
-
|
|
93
|
-
// 通过 url 是否能正确访问
|
|
94
|
-
const url = attachment.url.replace(`http://localhost:${APP_PORT}`, '');
|
|
95
|
-
const content = await agent.get(url);
|
|
96
|
-
expect(content.text).toBe('Hello world!\n');
|
|
97
|
-
});
|
|
98
|
-
});
|
|
99
|
-
|
|
100
|
-
describe('specific storage', () => {
|
|
101
|
-
it('fail as 400 because file size greater than rules', async () => {
|
|
102
|
-
db.collection({
|
|
103
|
-
name: 'customers',
|
|
104
|
-
fields: [
|
|
105
|
-
{
|
|
106
|
-
name: 'avatar',
|
|
107
|
-
type: 'belongsTo',
|
|
108
|
-
target: 'attachments',
|
|
109
|
-
storage: 'local1',
|
|
110
|
-
},
|
|
111
|
-
],
|
|
112
|
-
});
|
|
113
|
-
|
|
114
|
-
const response = await agent.resource('attachments').create({
|
|
115
|
-
attachmentField: 'customers.avatar',
|
|
116
|
-
file: path.resolve(__dirname, './files/image.jpg'),
|
|
117
|
-
});
|
|
118
|
-
expect(response.status).toBe(400);
|
|
119
|
-
});
|
|
120
|
-
|
|
121
|
-
it('fail as 400 because file mimetype does not match', async () => {
|
|
122
|
-
const textStorage = await StorageRepo.create({
|
|
123
|
-
values: {
|
|
124
|
-
name: 'local2',
|
|
125
|
-
type: STORAGE_TYPE_LOCAL,
|
|
126
|
-
baseUrl: DEFAULT_LOCAL_BASE_URL,
|
|
127
|
-
rules: {
|
|
128
|
-
mimetype: ['text/*'],
|
|
129
|
-
},
|
|
130
|
-
},
|
|
131
|
-
});
|
|
132
|
-
|
|
133
|
-
db.collection({
|
|
134
|
-
name: 'customers',
|
|
135
|
-
fields: [
|
|
136
|
-
{
|
|
137
|
-
name: 'avatar',
|
|
138
|
-
type: 'belongsTo',
|
|
139
|
-
target: 'attachments',
|
|
140
|
-
storage: textStorage.name,
|
|
141
|
-
},
|
|
142
|
-
],
|
|
143
|
-
});
|
|
144
|
-
|
|
145
|
-
// await db.sync();
|
|
146
|
-
|
|
147
|
-
const response = await agent.resource('attachments').create({
|
|
148
|
-
attachmentField: 'customers.avatar',
|
|
149
|
-
file: path.resolve(__dirname, './files/image.jpg'),
|
|
150
|
-
});
|
|
151
|
-
|
|
152
|
-
expect(response.status).toBe(400);
|
|
153
|
-
});
|
|
154
|
-
|
|
155
|
-
it('upload to storage which is not default', async () => {
|
|
156
|
-
const BASE_URL = `http://localhost:${APP_PORT}/another-uploads`;
|
|
157
|
-
const urlPath = 'test/path';
|
|
158
|
-
|
|
159
|
-
// 动态添加 storage
|
|
160
|
-
const storage = await StorageRepo.create({
|
|
161
|
-
values: {
|
|
162
|
-
name: 'local_private',
|
|
163
|
-
type: STORAGE_TYPE_LOCAL,
|
|
164
|
-
rules: {
|
|
165
|
-
mimetype: ['text/*'],
|
|
166
|
-
},
|
|
167
|
-
path: urlPath,
|
|
168
|
-
baseUrl: BASE_URL,
|
|
169
|
-
options: {
|
|
170
|
-
documentRoot: 'uploads/another',
|
|
171
|
-
},
|
|
172
|
-
},
|
|
173
|
-
});
|
|
174
|
-
|
|
175
|
-
db.collection({
|
|
176
|
-
name: 'customers',
|
|
177
|
-
fields: [
|
|
178
|
-
{
|
|
179
|
-
name: 'file',
|
|
180
|
-
type: 'belongsTo',
|
|
181
|
-
target: 'attachments',
|
|
182
|
-
storage: storage.name,
|
|
183
|
-
},
|
|
184
|
-
],
|
|
185
|
-
});
|
|
186
|
-
|
|
187
|
-
const { body } = await agent.resource('attachments').create({
|
|
188
|
-
attachmentField: 'customers.file',
|
|
189
|
-
file: path.resolve(__dirname, './files/text.txt'),
|
|
190
|
-
});
|
|
191
|
-
|
|
192
|
-
// 文件的 url 是否正常生成
|
|
193
|
-
expect(body.data.url).toBe(`${BASE_URL}/${urlPath}/${body.data.filename}`);
|
|
194
|
-
console.log(body.data.url);
|
|
195
|
-
const url = body.data.url.replace(`http://localhost:${APP_PORT}`, '');
|
|
196
|
-
const content = await agent.get(url);
|
|
197
|
-
expect(content.text).toBe('Hello world!\n');
|
|
198
|
-
});
|
|
199
|
-
});
|
|
200
|
-
});
|
|
201
|
-
|
|
202
|
-
describe('destroy', () => {
|
|
203
|
-
it('destroy one existing file with `paranoid`', async () => {
|
|
204
|
-
db.collection({
|
|
205
|
-
name: 'customers',
|
|
206
|
-
fields: [
|
|
207
|
-
{
|
|
208
|
-
name: 'file',
|
|
209
|
-
type: 'belongsTo',
|
|
210
|
-
target: 'attachments',
|
|
211
|
-
storage: 'local1',
|
|
212
|
-
},
|
|
213
|
-
],
|
|
214
|
-
});
|
|
215
|
-
|
|
216
|
-
await db.sync();
|
|
217
|
-
|
|
218
|
-
const { body } = await agent.resource('attachments').create({
|
|
219
|
-
[FILE_FIELD_NAME]: path.resolve(__dirname, './files/text.txt'),
|
|
220
|
-
attachmentField: 'customers.file',
|
|
221
|
-
});
|
|
222
|
-
|
|
223
|
-
const { data: attachment } = body;
|
|
224
|
-
|
|
225
|
-
// 关联的存储引擎是否正确
|
|
226
|
-
const storage = await StorageRepo.findById(attachment.storageId);
|
|
227
|
-
|
|
228
|
-
const { documentRoot = 'storage/uploads' } = storage.options || {};
|
|
229
|
-
const destPath = path.resolve(
|
|
230
|
-
path.isAbsolute(documentRoot) ? documentRoot : path.join(process.cwd(), documentRoot),
|
|
231
|
-
storage.path,
|
|
232
|
-
);
|
|
233
|
-
const file = await fs.stat(path.join(destPath, attachment.filename));
|
|
234
|
-
expect(file).toBeTruthy();
|
|
235
|
-
|
|
236
|
-
const res2 = await agent.resource('attachments').destroy({ filterByTk: attachment.id });
|
|
237
|
-
|
|
238
|
-
const attachmentExists = await AttachmentRepo.findById(attachment.id);
|
|
239
|
-
expect(attachmentExists).toBeNull();
|
|
240
|
-
|
|
241
|
-
const fileExists = await fs.stat(path.join(destPath, attachment.filename)).catch(() => false);
|
|
242
|
-
expect(fileExists).toBeTruthy();
|
|
243
|
-
});
|
|
244
|
-
|
|
245
|
-
it('destroy one existing file', async () => {
|
|
246
|
-
const { body } = await agent.resource('attachments').create({
|
|
247
|
-
[FILE_FIELD_NAME]: path.resolve(__dirname, './files/text.txt'),
|
|
248
|
-
});
|
|
249
|
-
|
|
250
|
-
const { data: attachment } = body;
|
|
251
|
-
|
|
252
|
-
const storage = await StorageRepo.findById(attachment.storageId);
|
|
253
|
-
|
|
254
|
-
const { documentRoot = path.join('storage', 'uploads') } = storage.options || {};
|
|
255
|
-
const destPath = path.resolve(
|
|
256
|
-
path.isAbsolute(documentRoot) ? documentRoot : path.join(process.cwd(), documentRoot),
|
|
257
|
-
storage.path,
|
|
258
|
-
);
|
|
259
|
-
const file = await fs.stat(path.join(destPath, attachment.filename));
|
|
260
|
-
expect(file).toBeTruthy();
|
|
261
|
-
|
|
262
|
-
const res2 = await agent.resource('attachments').destroy({ filterByTk: attachment.id });
|
|
263
|
-
|
|
264
|
-
const attachmentExists = await AttachmentRepo.findById(attachment.id);
|
|
265
|
-
expect(attachmentExists).toBeNull();
|
|
266
|
-
|
|
267
|
-
const fileExists = await fs.stat(path.join(destPath, attachment.filename)).catch(() => false);
|
|
268
|
-
expect(fileExists).toBeFalsy();
|
|
269
|
-
});
|
|
270
|
-
|
|
271
|
-
it('destroy multiple existing files', async () => {
|
|
272
|
-
const { body: f1 } = await agent.resource('attachments').create({
|
|
273
|
-
[FILE_FIELD_NAME]: path.resolve(__dirname, './files/text.txt'),
|
|
274
|
-
});
|
|
275
|
-
|
|
276
|
-
const { body: f2 } = await agent.resource('attachments').create({
|
|
277
|
-
[FILE_FIELD_NAME]: path.resolve(__dirname, './files/text.txt'),
|
|
278
|
-
});
|
|
279
|
-
|
|
280
|
-
const storage = await StorageRepo.findOne({
|
|
281
|
-
filter: {
|
|
282
|
-
name: 'local1',
|
|
283
|
-
},
|
|
284
|
-
});
|
|
285
|
-
|
|
286
|
-
const { documentRoot = path.join('storage', 'uploads') } = storage.options || {};
|
|
287
|
-
const destPath = path.resolve(
|
|
288
|
-
path.isAbsolute(documentRoot) ? documentRoot : path.join(process.cwd(), documentRoot),
|
|
289
|
-
storage.path,
|
|
290
|
-
);
|
|
291
|
-
const file1 = await fs.stat(path.join(destPath, f1.data.filename));
|
|
292
|
-
expect(file1).toBeTruthy();
|
|
293
|
-
|
|
294
|
-
const res2 = await agent.resource('attachments').destroy({ filter: { id: [f1.data.id, f2.data.id] } });
|
|
295
|
-
|
|
296
|
-
const attachmentExists = await AttachmentRepo.count();
|
|
297
|
-
expect(attachmentExists).toBe(0);
|
|
298
|
-
|
|
299
|
-
const file1Exists = await fs.stat(path.join(destPath, f1.data.filename)).catch(() => false);
|
|
300
|
-
expect(file1Exists).toBeFalsy();
|
|
301
|
-
|
|
302
|
-
const file2Exists = await fs.stat(path.join(destPath, f2.data.filename)).catch(() => false);
|
|
303
|
-
expect(file2Exists).toBeFalsy();
|
|
304
|
-
});
|
|
305
|
-
|
|
306
|
-
it('destroy record without file exists should be ok', async () => {
|
|
307
|
-
const { body } = await agent.resource('attachments').create({
|
|
308
|
-
[FILE_FIELD_NAME]: path.resolve(__dirname, './files/text.txt'),
|
|
309
|
-
});
|
|
310
|
-
|
|
311
|
-
const { data: attachment } = body;
|
|
312
|
-
|
|
313
|
-
const storage = await StorageRepo.findById(attachment.storageId);
|
|
314
|
-
|
|
315
|
-
const { documentRoot = path.join('storage', 'uploads') } = storage.options || {};
|
|
316
|
-
const destPath = path.resolve(
|
|
317
|
-
path.isAbsolute(documentRoot) ? documentRoot : path.join(process.cwd(), documentRoot),
|
|
318
|
-
storage.path,
|
|
319
|
-
);
|
|
320
|
-
const filePath = path.join(destPath, attachment.filename);
|
|
321
|
-
const file = await fs.stat(filePath);
|
|
322
|
-
expect(file).toBeTruthy();
|
|
323
|
-
await fs.unlink(filePath);
|
|
324
|
-
|
|
325
|
-
const res2 = await agent.resource('attachments').destroy({ filterByTk: attachment.id });
|
|
326
|
-
expect(res2.status).toBe(200);
|
|
327
|
-
|
|
328
|
-
const attachmentExists = await AttachmentRepo.findById(attachment.id);
|
|
329
|
-
expect(attachmentExists).toBeNull();
|
|
330
|
-
});
|
|
331
|
-
});
|
|
332
|
-
});
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import { getApp } from '.';
|
|
2
|
-
|
|
3
|
-
describe('attachment', () => {
|
|
4
|
-
let db;
|
|
5
|
-
let app;
|
|
6
|
-
|
|
7
|
-
beforeEach(async () => {
|
|
8
|
-
app = await getApp();
|
|
9
|
-
db = app.db;
|
|
10
|
-
});
|
|
11
|
-
|
|
12
|
-
afterEach(async () => {
|
|
13
|
-
await app.destroy();
|
|
14
|
-
});
|
|
15
|
-
|
|
16
|
-
it('should linked to a instance', async () => {
|
|
17
|
-
const testCollection = db.collection({
|
|
18
|
-
name: 'test',
|
|
19
|
-
fields: [
|
|
20
|
-
{
|
|
21
|
-
name: 'name',
|
|
22
|
-
type: 'string',
|
|
23
|
-
},
|
|
24
|
-
{
|
|
25
|
-
type: 'belongsTo',
|
|
26
|
-
name: 'logo',
|
|
27
|
-
target: 'attachments',
|
|
28
|
-
},
|
|
29
|
-
],
|
|
30
|
-
});
|
|
31
|
-
|
|
32
|
-
await db.sync();
|
|
33
|
-
|
|
34
|
-
await testCollection.repository.create({
|
|
35
|
-
values: {
|
|
36
|
-
name: 'test',
|
|
37
|
-
logo: {
|
|
38
|
-
title: 'nocobase-logo',
|
|
39
|
-
filename: '682e5ad037dd02a0fe4800a3e91c283b.png',
|
|
40
|
-
extname: '.png',
|
|
41
|
-
mimetype: 'image/png',
|
|
42
|
-
url: 'https://nocobase.oss-cn-beijing.aliyuncs.com/682e5ad037dd02a0fe4800a3e91c283b.png',
|
|
43
|
-
},
|
|
44
|
-
},
|
|
45
|
-
});
|
|
46
|
-
|
|
47
|
-
const item = await testCollection.repository.findOne({});
|
|
48
|
-
expect(item.get('logoId')).toBeDefined();
|
|
49
|
-
});
|
|
50
|
-
});
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
Hello world!
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { MockServer, mockServer } from '@nocobase/test';
|
|
2
|
-
import path from 'path';
|
|
3
|
-
import supertest from 'supertest';
|
|
4
|
-
|
|
5
|
-
import plugin from '../';
|
|
6
|
-
|
|
7
|
-
export async function getApp(options = {}): Promise<MockServer> {
|
|
8
|
-
const app = mockServer({
|
|
9
|
-
...options,
|
|
10
|
-
cors: {
|
|
11
|
-
origin: '*',
|
|
12
|
-
},
|
|
13
|
-
acl: false,
|
|
14
|
-
});
|
|
15
|
-
|
|
16
|
-
await app.cleanDb();
|
|
17
|
-
|
|
18
|
-
app.plugin(plugin);
|
|
19
|
-
|
|
20
|
-
app.db.import({
|
|
21
|
-
directory: path.resolve(__dirname, './tables'),
|
|
22
|
-
});
|
|
23
|
-
|
|
24
|
-
await app.loadAndInstall();
|
|
25
|
-
|
|
26
|
-
return app;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
// because the app in supertest will use a random port
|
|
30
|
-
export function requestFile(url, agent) {
|
|
31
|
-
// url starts with double slash "//" will be considered as http or https
|
|
32
|
-
// url starts with single slash "/" will be considered from local server
|
|
33
|
-
return url[0] === '/' && url[1] !== '/' ? agent.get(url) : supertest.agent(url).get('');
|
|
34
|
-
}
|
|
@@ -1,127 +0,0 @@
|
|
|
1
|
-
import path from 'path';
|
|
2
|
-
import { MockServer } from '@nocobase/test';
|
|
3
|
-
import aliossStorage from '../../storages/ali-oss';
|
|
4
|
-
import { FILE_FIELD_NAME } from '../../constants';
|
|
5
|
-
import { getApp, requestFile } from '..';
|
|
6
|
-
import { Database } from '@nocobase/database';
|
|
7
|
-
|
|
8
|
-
const itif = process.env.ALI_OSS_ACCESS_KEY_SECRET ? it : it.skip;
|
|
9
|
-
|
|
10
|
-
describe('storage:ali-oss', () => {
|
|
11
|
-
let app: MockServer;
|
|
12
|
-
let agent;
|
|
13
|
-
let db: Database;
|
|
14
|
-
let AttachmentRepo;
|
|
15
|
-
let StorageRepo;
|
|
16
|
-
let storage;
|
|
17
|
-
|
|
18
|
-
beforeEach(async () => {
|
|
19
|
-
app = await getApp();
|
|
20
|
-
agent = app.agent();
|
|
21
|
-
db = app.db;
|
|
22
|
-
|
|
23
|
-
AttachmentRepo = db.getCollection('attachments').repository;
|
|
24
|
-
StorageRepo = db.getCollection('storages').repository;
|
|
25
|
-
|
|
26
|
-
storage = await StorageRepo.create({
|
|
27
|
-
values: {
|
|
28
|
-
...aliossStorage.defaults(),
|
|
29
|
-
name: 'ali-oss',
|
|
30
|
-
default: true,
|
|
31
|
-
path: 'test/path',
|
|
32
|
-
},
|
|
33
|
-
});
|
|
34
|
-
});
|
|
35
|
-
|
|
36
|
-
afterEach(async () => {
|
|
37
|
-
await db.close();
|
|
38
|
-
});
|
|
39
|
-
|
|
40
|
-
describe('upload', () => {
|
|
41
|
-
itif('upload file should be ok', async () => {
|
|
42
|
-
const { body } = await agent.resource('attachments').create({
|
|
43
|
-
[FILE_FIELD_NAME]: path.resolve(__dirname, '../files/text.txt'),
|
|
44
|
-
});
|
|
45
|
-
|
|
46
|
-
const Attachment = db.getCollection('attachments').model;
|
|
47
|
-
const attachment = await Attachment.findOne<any>({
|
|
48
|
-
where: { id: body.data.id },
|
|
49
|
-
include: ['storage'],
|
|
50
|
-
});
|
|
51
|
-
|
|
52
|
-
const matcher = {
|
|
53
|
-
title: 'text',
|
|
54
|
-
extname: '.txt',
|
|
55
|
-
path: 'test/path',
|
|
56
|
-
size: 13,
|
|
57
|
-
mimetype: 'text/plain',
|
|
58
|
-
meta: {},
|
|
59
|
-
storageId: storage.id,
|
|
60
|
-
};
|
|
61
|
-
|
|
62
|
-
// 文件上传和解析是否正常
|
|
63
|
-
expect(body.data).toMatchObject(matcher);
|
|
64
|
-
// 文件的 url 是否正常生成
|
|
65
|
-
expect(body.data.url).toBe(`${attachment.storage.baseUrl}/${body.data.path}/${body.data.filename}`);
|
|
66
|
-
// 文件的数据是否正常保存
|
|
67
|
-
expect(attachment).toMatchObject(matcher);
|
|
68
|
-
|
|
69
|
-
// 通过 url 是否能正确访问
|
|
70
|
-
const content = await requestFile(attachment.url, agent);
|
|
71
|
-
|
|
72
|
-
expect(content.text).toBe('Hello world!\n');
|
|
73
|
-
});
|
|
74
|
-
});
|
|
75
|
-
|
|
76
|
-
describe('destroy', () => {
|
|
77
|
-
itif('destroy record should also delete file', async () => {
|
|
78
|
-
const { body } = await agent.resource('attachments').create({
|
|
79
|
-
[FILE_FIELD_NAME]: path.resolve(__dirname, '../files/text.txt'),
|
|
80
|
-
});
|
|
81
|
-
// 通过 url 是否能正确访问
|
|
82
|
-
const content1 = await requestFile(body.data.url, agent);
|
|
83
|
-
expect(content1.text).toBe('Hello world!\n');
|
|
84
|
-
|
|
85
|
-
const res = await agent.resource('attachments').destroy({
|
|
86
|
-
filterByTk: body.data.id,
|
|
87
|
-
});
|
|
88
|
-
|
|
89
|
-
expect(res.statusCode).toBe(200);
|
|
90
|
-
const count = await AttachmentRepo.count();
|
|
91
|
-
expect(count).toBe(0);
|
|
92
|
-
|
|
93
|
-
const content2 = await requestFile(body.data.url, agent);
|
|
94
|
-
expect(content2.status).toBe(404);
|
|
95
|
-
});
|
|
96
|
-
|
|
97
|
-
itif('destroy record should not delete file when paranoid', async () => {
|
|
98
|
-
const paranoidStorage = await StorageRepo.create({
|
|
99
|
-
values: {
|
|
100
|
-
...aliossStorage.defaults(),
|
|
101
|
-
name: 'ali-oss-2',
|
|
102
|
-
path: 'test/nocobase',
|
|
103
|
-
paranoid: true,
|
|
104
|
-
default: true,
|
|
105
|
-
},
|
|
106
|
-
});
|
|
107
|
-
|
|
108
|
-
const { body } = await agent.resource('attachments').create({
|
|
109
|
-
[FILE_FIELD_NAME]: path.resolve(__dirname, '../files/text.txt'),
|
|
110
|
-
});
|
|
111
|
-
// 通过 url 是否能正确访问
|
|
112
|
-
const content1 = await requestFile(body.data.url, agent);
|
|
113
|
-
expect(content1.text).toBe('Hello world!\n');
|
|
114
|
-
|
|
115
|
-
const res = await agent.resource('attachments').destroy({
|
|
116
|
-
filterByTk: body.data.id,
|
|
117
|
-
});
|
|
118
|
-
|
|
119
|
-
expect(res.statusCode).toBe(200);
|
|
120
|
-
const count = await AttachmentRepo.count();
|
|
121
|
-
expect(count).toBe(0);
|
|
122
|
-
|
|
123
|
-
const content2 = await requestFile(body.data.url, agent);
|
|
124
|
-
expect(content2.status).toBe(200);
|
|
125
|
-
});
|
|
126
|
-
});
|
|
127
|
-
});
|
|
@@ -1,126 +0,0 @@
|
|
|
1
|
-
import path from 'path';
|
|
2
|
-
import { MockServer } from '@nocobase/test';
|
|
3
|
-
import s3Storage from '../../storages/s3';
|
|
4
|
-
import { FILE_FIELD_NAME } from '../../constants';
|
|
5
|
-
import { getApp, requestFile } from '..';
|
|
6
|
-
import Database from '@nocobase/database';
|
|
7
|
-
|
|
8
|
-
const itif = process.env.AWS_SECRET_ACCESS_KEY ? it : it.skip;
|
|
9
|
-
|
|
10
|
-
describe('storage:s3', () => {
|
|
11
|
-
let app: MockServer;
|
|
12
|
-
let agent;
|
|
13
|
-
let db: Database;
|
|
14
|
-
let AttachmentRepo;
|
|
15
|
-
let StorageRepo;
|
|
16
|
-
let storage;
|
|
17
|
-
|
|
18
|
-
beforeEach(async () => {
|
|
19
|
-
app = await getApp();
|
|
20
|
-
agent = app.agent();
|
|
21
|
-
db = app.db;
|
|
22
|
-
|
|
23
|
-
AttachmentRepo = db.getCollection('attachments').repository;
|
|
24
|
-
StorageRepo = db.getCollection('storages').repository;
|
|
25
|
-
|
|
26
|
-
storage = await StorageRepo.create({
|
|
27
|
-
values: {
|
|
28
|
-
...s3Storage.defaults(),
|
|
29
|
-
name: 's3',
|
|
30
|
-
default: true,
|
|
31
|
-
path: 'test/path',
|
|
32
|
-
},
|
|
33
|
-
});
|
|
34
|
-
});
|
|
35
|
-
|
|
36
|
-
afterEach(async () => {
|
|
37
|
-
await db.close();
|
|
38
|
-
});
|
|
39
|
-
|
|
40
|
-
describe('direct attachment', () => {
|
|
41
|
-
itif('upload file should be ok', async () => {
|
|
42
|
-
const { body } = await agent.resource('attachments').create({
|
|
43
|
-
[FILE_FIELD_NAME]: path.resolve(__dirname, '../files/text.txt'),
|
|
44
|
-
});
|
|
45
|
-
|
|
46
|
-
const attachment = await AttachmentRepo.findOne({
|
|
47
|
-
filterByTk: body.data.id,
|
|
48
|
-
appends: ['storage'],
|
|
49
|
-
});
|
|
50
|
-
|
|
51
|
-
const matcher = {
|
|
52
|
-
title: 'text',
|
|
53
|
-
extname: '.txt',
|
|
54
|
-
path: 'test/path',
|
|
55
|
-
size: 13,
|
|
56
|
-
mimetype: 'text/plain',
|
|
57
|
-
meta: {},
|
|
58
|
-
storageId: storage.id,
|
|
59
|
-
};
|
|
60
|
-
|
|
61
|
-
// 文件上传和解析是否正常
|
|
62
|
-
expect(body.data).toMatchObject(matcher);
|
|
63
|
-
// 文件的 url 是否正常生成
|
|
64
|
-
expect(body.data.url).toBe(`${attachment.storage.baseUrl}/${body.data.path}/${body.data.filename}`);
|
|
65
|
-
// 文件的数据是否正常保存
|
|
66
|
-
expect(attachment).toMatchObject(matcher);
|
|
67
|
-
|
|
68
|
-
// 通过 url 是否能正确访问
|
|
69
|
-
const content = await requestFile(attachment.url, agent);
|
|
70
|
-
expect(content.text).toBe('Hello world!\n');
|
|
71
|
-
});
|
|
72
|
-
});
|
|
73
|
-
|
|
74
|
-
describe('destroy', () => {
|
|
75
|
-
itif('destroy record should also delete file', async () => {
|
|
76
|
-
const { body } = await agent.resource('attachments').create({
|
|
77
|
-
[FILE_FIELD_NAME]: path.resolve(__dirname, '../files/text.txt'),
|
|
78
|
-
});
|
|
79
|
-
// 通过 url 是否能正确访问
|
|
80
|
-
const content1 = await requestFile(body.data.url, agent);
|
|
81
|
-
expect(content1.text).toBe('Hello world!\n');
|
|
82
|
-
|
|
83
|
-
const res = await agent.resource('attachments').destroy({
|
|
84
|
-
filterByTk: body.data.id,
|
|
85
|
-
});
|
|
86
|
-
|
|
87
|
-
expect(res.statusCode).toBe(200);
|
|
88
|
-
const count = await AttachmentRepo.count();
|
|
89
|
-
expect(count).toBe(0);
|
|
90
|
-
|
|
91
|
-
const content2 = await requestFile(body.data.url, agent);
|
|
92
|
-
console.log(content2.status, body.data.url);
|
|
93
|
-
expect(content2.status).toBe(403);
|
|
94
|
-
});
|
|
95
|
-
|
|
96
|
-
itif('destroy record should not delete file when paranoid', async () => {
|
|
97
|
-
const paranoidStorage = await StorageRepo.create({
|
|
98
|
-
values: {
|
|
99
|
-
...s3Storage.defaults(),
|
|
100
|
-
name: 's3-2',
|
|
101
|
-
path: 'test/nocobase',
|
|
102
|
-
paranoid: true,
|
|
103
|
-
default: true,
|
|
104
|
-
},
|
|
105
|
-
});
|
|
106
|
-
|
|
107
|
-
const { body } = await agent.resource('attachments').create({
|
|
108
|
-
[FILE_FIELD_NAME]: path.resolve(__dirname, '../files/text.txt'),
|
|
109
|
-
});
|
|
110
|
-
// 通过 url 是否能正确访问
|
|
111
|
-
const content1 = await requestFile(body.data.url, agent);
|
|
112
|
-
expect(content1.text).toBe('Hello world!\n');
|
|
113
|
-
|
|
114
|
-
const res = await agent.resource('attachments').destroy({
|
|
115
|
-
filterByTk: body.data.id,
|
|
116
|
-
});
|
|
117
|
-
|
|
118
|
-
expect(res.statusCode).toBe(200);
|
|
119
|
-
const count = await AttachmentRepo.count();
|
|
120
|
-
expect(count).toBe(0);
|
|
121
|
-
|
|
122
|
-
const content2 = await requestFile(body.data.url, agent);
|
|
123
|
-
expect(content2.status).toBe(200);
|
|
124
|
-
});
|
|
125
|
-
});
|
|
126
|
-
});
|