@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,977 @@
|
|
|
1
|
+
// Copyright Joyent, Inc. and other Node contributors.
|
|
2
|
+
//
|
|
3
|
+
// Permission is hereby granted, free of charge, to any person obtaining a
|
|
4
|
+
// copy of this software and associated documentation files (the
|
|
5
|
+
// "Software"), to deal in the Software without restriction, including
|
|
6
|
+
// without limitation the rights to use, copy, modify, merge, publish,
|
|
7
|
+
// distribute, sublicense, and/or sell copies of the Software, and to permit
|
|
8
|
+
// persons to whom the Software is furnished to do so, subject to the
|
|
9
|
+
// following conditions:
|
|
10
|
+
//
|
|
11
|
+
// The above copyright notice and this permission notice shall be included
|
|
12
|
+
// in all copies or substantial portions of the Software.
|
|
13
|
+
//
|
|
14
|
+
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
|
15
|
+
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
16
|
+
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
|
|
17
|
+
// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
|
18
|
+
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
|
19
|
+
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
|
|
20
|
+
// USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
21
|
+
|
|
22
|
+
// Modified by the vm2 team to make this a standalone module to be loaded into the sandbox.
|
|
23
|
+
|
|
24
|
+
'use strict';
|
|
25
|
+
|
|
26
|
+
const host = fromhost;
|
|
27
|
+
|
|
28
|
+
const {
|
|
29
|
+
Boolean,
|
|
30
|
+
Error,
|
|
31
|
+
String,
|
|
32
|
+
Symbol
|
|
33
|
+
} = globalThis;
|
|
34
|
+
|
|
35
|
+
const ReflectApply = Reflect.apply;
|
|
36
|
+
const ReflectOwnKeys = Reflect.ownKeys;
|
|
37
|
+
|
|
38
|
+
const ErrorCaptureStackTrace = Error.captureStackTrace;
|
|
39
|
+
|
|
40
|
+
const NumberIsNaN = Number.isNaN;
|
|
41
|
+
|
|
42
|
+
const ObjectCreate = Object.create;
|
|
43
|
+
const ObjectDefineProperty = Object.defineProperty;
|
|
44
|
+
const ObjectDefineProperties = Object.defineProperties;
|
|
45
|
+
const ObjectGetPrototypeOf = Object.getPrototypeOf;
|
|
46
|
+
|
|
47
|
+
const SymbolFor = Symbol.for;
|
|
48
|
+
|
|
49
|
+
function uncurryThis(func) {
|
|
50
|
+
return (thiz, ...args) => ReflectApply(func, thiz, args);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
const ArrayPrototypeIndexOf = uncurryThis(Array.prototype.indexOf);
|
|
54
|
+
const ArrayPrototypeJoin = uncurryThis(Array.prototype.join);
|
|
55
|
+
const ArrayPrototypeSlice = uncurryThis(Array.prototype.slice);
|
|
56
|
+
const ArrayPrototypeSplice = uncurryThis(Array.prototype.splice);
|
|
57
|
+
const ArrayPrototypeUnshift = uncurryThis(Array.prototype.unshift);
|
|
58
|
+
|
|
59
|
+
const kRejection = SymbolFor('nodejs.rejection');
|
|
60
|
+
|
|
61
|
+
function inspect(obj) {
|
|
62
|
+
return typeof obj === 'symbol' ? obj.toString() : `${obj}`;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
function spliceOne(list, index) {
|
|
66
|
+
for (; index + 1 < list.length; index++)
|
|
67
|
+
list[index] = list[index + 1];
|
|
68
|
+
list.pop();
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
function assert(what, message) {
|
|
72
|
+
if (!what) throw new Error(message);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
function E(key, msg, Base) {
|
|
76
|
+
return function NodeError(...args) {
|
|
77
|
+
const error = new Base();
|
|
78
|
+
const message = ReflectApply(msg, error, args);
|
|
79
|
+
ObjectDefineProperties(error, {
|
|
80
|
+
message: {
|
|
81
|
+
value: message,
|
|
82
|
+
enumerable: false,
|
|
83
|
+
writable: true,
|
|
84
|
+
configurable: true,
|
|
85
|
+
},
|
|
86
|
+
toString: {
|
|
87
|
+
value() {
|
|
88
|
+
return `${this.name} [${key}]: ${this.message}`;
|
|
89
|
+
},
|
|
90
|
+
enumerable: false,
|
|
91
|
+
writable: true,
|
|
92
|
+
configurable: true,
|
|
93
|
+
},
|
|
94
|
+
});
|
|
95
|
+
error.code = key;
|
|
96
|
+
return error;
|
|
97
|
+
};
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
const ERR_INVALID_ARG_TYPE = E('ERR_INVALID_ARG_TYPE',
|
|
102
|
+
(name, expected, actual) => {
|
|
103
|
+
assert(typeof name === 'string', "'name' must be a string");
|
|
104
|
+
if (!ArrayIsArray(expected)) {
|
|
105
|
+
expected = [expected];
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
let msg = 'The ';
|
|
109
|
+
if (StringPrototypeEndsWith(name, ' argument')) {
|
|
110
|
+
// For cases like 'first argument'
|
|
111
|
+
msg += `${name} `;
|
|
112
|
+
} else {
|
|
113
|
+
const type = StringPrototypeIncludes(name, '.') ? 'property' : 'argument';
|
|
114
|
+
msg += `"${name}" ${type} `;
|
|
115
|
+
}
|
|
116
|
+
msg += 'must be ';
|
|
117
|
+
|
|
118
|
+
const types = [];
|
|
119
|
+
const instances = [];
|
|
120
|
+
const other = [];
|
|
121
|
+
|
|
122
|
+
for (const value of expected) {
|
|
123
|
+
assert(typeof value === 'string',
|
|
124
|
+
'All expected entries have to be of type string');
|
|
125
|
+
if (ArrayPrototypeIncludes(kTypes, value)) {
|
|
126
|
+
ArrayPrototypePush(types, StringPrototypeToLowerCase(value));
|
|
127
|
+
} else if (RegExpPrototypeTest(classRegExp, value)) {
|
|
128
|
+
ArrayPrototypePush(instances, value);
|
|
129
|
+
} else {
|
|
130
|
+
assert(value !== 'object',
|
|
131
|
+
'The value "object" should be written as "Object"');
|
|
132
|
+
ArrayPrototypePush(other, value);
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
// Special handle `object` in case other instances are allowed to outline
|
|
137
|
+
// the differences between each other.
|
|
138
|
+
if (instances.length > 0) {
|
|
139
|
+
const pos = ArrayPrototypeIndexOf(types, 'object');
|
|
140
|
+
if (pos !== -1) {
|
|
141
|
+
ArrayPrototypeSplice(types, pos, 1);
|
|
142
|
+
ArrayPrototypePush(instances, 'Object');
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
if (types.length > 0) {
|
|
147
|
+
if (types.length > 2) {
|
|
148
|
+
const last = ArrayPrototypePop(types);
|
|
149
|
+
msg += `one of type ${ArrayPrototypeJoin(types, ', ')}, or ${last}`;
|
|
150
|
+
} else if (types.length === 2) {
|
|
151
|
+
msg += `one of type ${types[0]} or ${types[1]}`;
|
|
152
|
+
} else {
|
|
153
|
+
msg += `of type ${types[0]}`;
|
|
154
|
+
}
|
|
155
|
+
if (instances.length > 0 || other.length > 0)
|
|
156
|
+
msg += ' or ';
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
if (instances.length > 0) {
|
|
160
|
+
if (instances.length > 2) {
|
|
161
|
+
const last = ArrayPrototypePop(instances);
|
|
162
|
+
msg +=
|
|
163
|
+
`an instance of ${ArrayPrototypeJoin(instances, ', ')}, or ${last}`;
|
|
164
|
+
} else {
|
|
165
|
+
msg += `an instance of ${instances[0]}`;
|
|
166
|
+
if (instances.length === 2) {
|
|
167
|
+
msg += ` or ${instances[1]}`;
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
if (other.length > 0)
|
|
171
|
+
msg += ' or ';
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
if (other.length > 0) {
|
|
175
|
+
if (other.length > 2) {
|
|
176
|
+
const last = ArrayPrototypePop(other);
|
|
177
|
+
msg += `one of ${ArrayPrototypeJoin(other, ', ')}, or ${last}`;
|
|
178
|
+
} else if (other.length === 2) {
|
|
179
|
+
msg += `one of ${other[0]} or ${other[1]}`;
|
|
180
|
+
} else {
|
|
181
|
+
if (StringPrototypeToLowerCase(other[0]) !== other[0])
|
|
182
|
+
msg += 'an ';
|
|
183
|
+
msg += `${other[0]}`;
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
if (actual == null) {
|
|
188
|
+
msg += `. Received ${actual}`;
|
|
189
|
+
} else if (typeof actual === 'function' && actual.name) {
|
|
190
|
+
msg += `. Received function ${actual.name}`;
|
|
191
|
+
} else if (typeof actual === 'object') {
|
|
192
|
+
if (actual.constructor && actual.constructor.name) {
|
|
193
|
+
msg += `. Received an instance of ${actual.constructor.name}`;
|
|
194
|
+
} else {
|
|
195
|
+
const inspected = inspect(actual, { depth: -1 });
|
|
196
|
+
msg += `. Received ${inspected}`;
|
|
197
|
+
}
|
|
198
|
+
} else {
|
|
199
|
+
let inspected = inspect(actual, { colors: false });
|
|
200
|
+
if (inspected.length > 25)
|
|
201
|
+
inspected = `${StringPrototypeSlice(inspected, 0, 25)}...`;
|
|
202
|
+
msg += `. Received type ${typeof actual} (${inspected})`;
|
|
203
|
+
}
|
|
204
|
+
return msg;
|
|
205
|
+
}, TypeError);
|
|
206
|
+
|
|
207
|
+
const ERR_INVALID_THIS = E('ERR_INVALID_THIS', s => `Value of "this" must be of type ${s}`, TypeError);
|
|
208
|
+
|
|
209
|
+
const ERR_OUT_OF_RANGE = E('ERR_OUT_OF_RANGE',
|
|
210
|
+
(str, range, input, replaceDefaultBoolean = false) => {
|
|
211
|
+
assert(range, 'Missing "range" argument');
|
|
212
|
+
let msg = replaceDefaultBoolean ? str :
|
|
213
|
+
`The value of "${str}" is out of range.`;
|
|
214
|
+
const received = inspect(input);
|
|
215
|
+
msg += ` It must be ${range}. Received ${received}`;
|
|
216
|
+
return msg;
|
|
217
|
+
}, RangeError);
|
|
218
|
+
|
|
219
|
+
const ERR_UNHANDLED_ERROR = E('ERR_UNHANDLED_ERROR',
|
|
220
|
+
err => {
|
|
221
|
+
const msg = 'Unhandled error.';
|
|
222
|
+
if (err === undefined) return msg;
|
|
223
|
+
return `${msg} (${err})`;
|
|
224
|
+
}, Error);
|
|
225
|
+
|
|
226
|
+
function validateBoolean(value, name) {
|
|
227
|
+
if (typeof value !== 'boolean')
|
|
228
|
+
throw new ERR_INVALID_ARG_TYPE(name, 'boolean', value);
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
function validateFunction(value, name) {
|
|
232
|
+
if (typeof value !== 'function')
|
|
233
|
+
throw new ERR_INVALID_ARG_TYPE(name, 'Function', value);
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
function validateString(value, name) {
|
|
237
|
+
if (typeof value !== 'string')
|
|
238
|
+
throw new ERR_INVALID_ARG_TYPE(name, 'string', value);
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
function nc(cond, e) {
|
|
242
|
+
return cond === undefined || cond === null ? e : cond;
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
function oc(base, key) {
|
|
246
|
+
return base === undefined || base === null ? undefined : base[key];
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
const kCapture = Symbol('kCapture');
|
|
250
|
+
const kErrorMonitor = host.kErrorMonitor || Symbol('events.errorMonitor');
|
|
251
|
+
const kMaxEventTargetListeners = Symbol('events.maxEventTargetListeners');
|
|
252
|
+
const kMaxEventTargetListenersWarned =
|
|
253
|
+
Symbol('events.maxEventTargetListenersWarned');
|
|
254
|
+
|
|
255
|
+
const kIsEventTarget = SymbolFor('nodejs.event_target');
|
|
256
|
+
|
|
257
|
+
function isEventTarget(obj) {
|
|
258
|
+
return oc(oc(obj, 'constructor'), kIsEventTarget);
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
/**
|
|
262
|
+
* Creates a new `EventEmitter` instance.
|
|
263
|
+
* @param {{ captureRejections?: boolean; }} [opts]
|
|
264
|
+
* @constructs {EventEmitter}
|
|
265
|
+
*/
|
|
266
|
+
function EventEmitter(opts) {
|
|
267
|
+
EventEmitter.init.call(this, opts);
|
|
268
|
+
}
|
|
269
|
+
module.exports = EventEmitter;
|
|
270
|
+
if (host.once) module.exports.once = host.once;
|
|
271
|
+
if (host.on) module.exports.on = host.on;
|
|
272
|
+
if (host.getEventListeners) module.exports.getEventListeners = host.getEventListeners;
|
|
273
|
+
// Backwards-compat with node 0.10.x
|
|
274
|
+
EventEmitter.EventEmitter = EventEmitter;
|
|
275
|
+
|
|
276
|
+
EventEmitter.usingDomains = false;
|
|
277
|
+
|
|
278
|
+
EventEmitter.captureRejectionSymbol = kRejection;
|
|
279
|
+
ObjectDefineProperty(EventEmitter, 'captureRejections', {
|
|
280
|
+
get() {
|
|
281
|
+
return EventEmitter.prototype[kCapture];
|
|
282
|
+
},
|
|
283
|
+
set(value) {
|
|
284
|
+
validateBoolean(value, 'EventEmitter.captureRejections');
|
|
285
|
+
|
|
286
|
+
EventEmitter.prototype[kCapture] = value;
|
|
287
|
+
},
|
|
288
|
+
enumerable: true
|
|
289
|
+
});
|
|
290
|
+
|
|
291
|
+
if (host.EventEmitterReferencingAsyncResource) {
|
|
292
|
+
const kAsyncResource = Symbol('kAsyncResource');
|
|
293
|
+
const EventEmitterReferencingAsyncResource = host.EventEmitterReferencingAsyncResource;
|
|
294
|
+
|
|
295
|
+
class EventEmitterAsyncResource extends EventEmitter {
|
|
296
|
+
/**
|
|
297
|
+
* @param {{
|
|
298
|
+
* name?: string,
|
|
299
|
+
* triggerAsyncId?: number,
|
|
300
|
+
* requireManualDestroy?: boolean,
|
|
301
|
+
* }} [options]
|
|
302
|
+
*/
|
|
303
|
+
constructor(options = undefined) {
|
|
304
|
+
let name;
|
|
305
|
+
if (typeof options === 'string') {
|
|
306
|
+
name = options;
|
|
307
|
+
options = undefined;
|
|
308
|
+
} else {
|
|
309
|
+
if (new.target === EventEmitterAsyncResource) {
|
|
310
|
+
validateString(oc(options, 'name'), 'options.name');
|
|
311
|
+
}
|
|
312
|
+
name = oc(options, 'name') || new.target.name;
|
|
313
|
+
}
|
|
314
|
+
super(options);
|
|
315
|
+
|
|
316
|
+
this[kAsyncResource] =
|
|
317
|
+
new EventEmitterReferencingAsyncResource(this, name, options);
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
/**
|
|
321
|
+
* @param {symbol,string} event
|
|
322
|
+
* @param {...any} args
|
|
323
|
+
* @returns {boolean}
|
|
324
|
+
*/
|
|
325
|
+
emit(event, ...args) {
|
|
326
|
+
if (this[kAsyncResource] === undefined)
|
|
327
|
+
throw new ERR_INVALID_THIS('EventEmitterAsyncResource');
|
|
328
|
+
const { asyncResource } = this;
|
|
329
|
+
ArrayPrototypeUnshift(args, super.emit, this, event);
|
|
330
|
+
return ReflectApply(asyncResource.runInAsyncScope, asyncResource,
|
|
331
|
+
args);
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
/**
|
|
335
|
+
* @returns {void}
|
|
336
|
+
*/
|
|
337
|
+
emitDestroy() {
|
|
338
|
+
if (this[kAsyncResource] === undefined)
|
|
339
|
+
throw new ERR_INVALID_THIS('EventEmitterAsyncResource');
|
|
340
|
+
this.asyncResource.emitDestroy();
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
/**
|
|
344
|
+
* @type {number}
|
|
345
|
+
*/
|
|
346
|
+
get asyncId() {
|
|
347
|
+
if (this[kAsyncResource] === undefined)
|
|
348
|
+
throw new ERR_INVALID_THIS('EventEmitterAsyncResource');
|
|
349
|
+
return this.asyncResource.asyncId();
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
/**
|
|
353
|
+
* @type {number}
|
|
354
|
+
*/
|
|
355
|
+
get triggerAsyncId() {
|
|
356
|
+
if (this[kAsyncResource] === undefined)
|
|
357
|
+
throw new ERR_INVALID_THIS('EventEmitterAsyncResource');
|
|
358
|
+
return this.asyncResource.triggerAsyncId();
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
/**
|
|
362
|
+
* @type {EventEmitterReferencingAsyncResource}
|
|
363
|
+
*/
|
|
364
|
+
get asyncResource() {
|
|
365
|
+
if (this[kAsyncResource] === undefined)
|
|
366
|
+
throw new ERR_INVALID_THIS('EventEmitterAsyncResource');
|
|
367
|
+
return this[kAsyncResource];
|
|
368
|
+
}
|
|
369
|
+
}
|
|
370
|
+
EventEmitter.EventEmitterAsyncResource = EventEmitterAsyncResource;
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
EventEmitter.errorMonitor = kErrorMonitor;
|
|
374
|
+
|
|
375
|
+
// The default for captureRejections is false
|
|
376
|
+
ObjectDefineProperty(EventEmitter.prototype, kCapture, {
|
|
377
|
+
value: false,
|
|
378
|
+
writable: true,
|
|
379
|
+
enumerable: false
|
|
380
|
+
});
|
|
381
|
+
|
|
382
|
+
EventEmitter.prototype._events = undefined;
|
|
383
|
+
EventEmitter.prototype._eventsCount = 0;
|
|
384
|
+
EventEmitter.prototype._maxListeners = undefined;
|
|
385
|
+
|
|
386
|
+
// By default EventEmitters will print a warning if more than 10 listeners are
|
|
387
|
+
// added to it. This is a useful default which helps finding memory leaks.
|
|
388
|
+
let defaultMaxListeners = 10;
|
|
389
|
+
|
|
390
|
+
function checkListener(listener) {
|
|
391
|
+
validateFunction(listener, 'listener');
|
|
392
|
+
}
|
|
393
|
+
|
|
394
|
+
ObjectDefineProperty(EventEmitter, 'defaultMaxListeners', {
|
|
395
|
+
enumerable: true,
|
|
396
|
+
get: function() {
|
|
397
|
+
return defaultMaxListeners;
|
|
398
|
+
},
|
|
399
|
+
set: function(arg) {
|
|
400
|
+
if (typeof arg !== 'number' || arg < 0 || NumberIsNaN(arg)) {
|
|
401
|
+
throw new ERR_OUT_OF_RANGE('defaultMaxListeners',
|
|
402
|
+
'a non-negative number',
|
|
403
|
+
arg);
|
|
404
|
+
}
|
|
405
|
+
defaultMaxListeners = arg;
|
|
406
|
+
}
|
|
407
|
+
});
|
|
408
|
+
|
|
409
|
+
ObjectDefineProperties(EventEmitter, {
|
|
410
|
+
kMaxEventTargetListeners: {
|
|
411
|
+
value: kMaxEventTargetListeners,
|
|
412
|
+
enumerable: false,
|
|
413
|
+
configurable: false,
|
|
414
|
+
writable: false,
|
|
415
|
+
},
|
|
416
|
+
kMaxEventTargetListenersWarned: {
|
|
417
|
+
value: kMaxEventTargetListenersWarned,
|
|
418
|
+
enumerable: false,
|
|
419
|
+
configurable: false,
|
|
420
|
+
writable: false,
|
|
421
|
+
}
|
|
422
|
+
});
|
|
423
|
+
|
|
424
|
+
/**
|
|
425
|
+
* Sets the max listeners.
|
|
426
|
+
* @param {number} n
|
|
427
|
+
* @param {EventTarget[] | EventEmitter[]} [eventTargets]
|
|
428
|
+
* @returns {void}
|
|
429
|
+
*/
|
|
430
|
+
EventEmitter.setMaxListeners =
|
|
431
|
+
function(n = defaultMaxListeners, ...eventTargets) {
|
|
432
|
+
if (typeof n !== 'number' || n < 0 || NumberIsNaN(n))
|
|
433
|
+
throw new ERR_OUT_OF_RANGE('n', 'a non-negative number', n);
|
|
434
|
+
if (eventTargets.length === 0) {
|
|
435
|
+
defaultMaxListeners = n;
|
|
436
|
+
} else {
|
|
437
|
+
for (let i = 0; i < eventTargets.length; i++) {
|
|
438
|
+
const target = eventTargets[i];
|
|
439
|
+
if (isEventTarget(target)) {
|
|
440
|
+
target[kMaxEventTargetListeners] = n;
|
|
441
|
+
target[kMaxEventTargetListenersWarned] = false;
|
|
442
|
+
} else if (typeof target.setMaxListeners === 'function') {
|
|
443
|
+
target.setMaxListeners(n);
|
|
444
|
+
} else {
|
|
445
|
+
throw new ERR_INVALID_ARG_TYPE(
|
|
446
|
+
'eventTargets',
|
|
447
|
+
['EventEmitter', 'EventTarget'],
|
|
448
|
+
target);
|
|
449
|
+
}
|
|
450
|
+
}
|
|
451
|
+
}
|
|
452
|
+
};
|
|
453
|
+
|
|
454
|
+
// If you're updating this function definition, please also update any
|
|
455
|
+
// re-definitions, such as the one in the Domain module (lib/domain.js).
|
|
456
|
+
EventEmitter.init = function(opts) {
|
|
457
|
+
|
|
458
|
+
if (this._events === undefined ||
|
|
459
|
+
this._events === ObjectGetPrototypeOf(this)._events) {
|
|
460
|
+
this._events = ObjectCreate(null);
|
|
461
|
+
this._eventsCount = 0;
|
|
462
|
+
}
|
|
463
|
+
|
|
464
|
+
this._maxListeners = this._maxListeners || undefined;
|
|
465
|
+
|
|
466
|
+
|
|
467
|
+
if (oc(opts, 'captureRejections')) {
|
|
468
|
+
validateBoolean(opts.captureRejections, 'options.captureRejections');
|
|
469
|
+
this[kCapture] = Boolean(opts.captureRejections);
|
|
470
|
+
} else {
|
|
471
|
+
// Assigning the kCapture property directly saves an expensive
|
|
472
|
+
// prototype lookup in a very sensitive hot path.
|
|
473
|
+
this[kCapture] = EventEmitter.prototype[kCapture];
|
|
474
|
+
}
|
|
475
|
+
};
|
|
476
|
+
|
|
477
|
+
function addCatch(that, promise, type, args) {
|
|
478
|
+
if (!that[kCapture]) {
|
|
479
|
+
return;
|
|
480
|
+
}
|
|
481
|
+
|
|
482
|
+
// Handle Promises/A+ spec, then could be a getter
|
|
483
|
+
// that throws on second use.
|
|
484
|
+
try {
|
|
485
|
+
const then = promise.then;
|
|
486
|
+
|
|
487
|
+
if (typeof then === 'function') {
|
|
488
|
+
then.call(promise, undefined, function(err) {
|
|
489
|
+
// The callback is called with nextTick to avoid a follow-up
|
|
490
|
+
// rejection from this promise.
|
|
491
|
+
process.nextTick(emitUnhandledRejectionOrErr, that, err, type, args);
|
|
492
|
+
});
|
|
493
|
+
}
|
|
494
|
+
} catch (err) {
|
|
495
|
+
that.emit('error', err);
|
|
496
|
+
}
|
|
497
|
+
}
|
|
498
|
+
|
|
499
|
+
function emitUnhandledRejectionOrErr(ee, err, type, args) {
|
|
500
|
+
if (typeof ee[kRejection] === 'function') {
|
|
501
|
+
ee[kRejection](err, type, ...args);
|
|
502
|
+
} else {
|
|
503
|
+
// We have to disable the capture rejections mechanism, otherwise
|
|
504
|
+
// we might end up in an infinite loop.
|
|
505
|
+
const prev = ee[kCapture];
|
|
506
|
+
|
|
507
|
+
// If the error handler throws, it is not catchable and it
|
|
508
|
+
// will end up in 'uncaughtException'. We restore the previous
|
|
509
|
+
// value of kCapture in case the uncaughtException is present
|
|
510
|
+
// and the exception is handled.
|
|
511
|
+
try {
|
|
512
|
+
ee[kCapture] = false;
|
|
513
|
+
ee.emit('error', err);
|
|
514
|
+
} finally {
|
|
515
|
+
ee[kCapture] = prev;
|
|
516
|
+
}
|
|
517
|
+
}
|
|
518
|
+
}
|
|
519
|
+
|
|
520
|
+
/**
|
|
521
|
+
* Increases the max listeners of the event emitter.
|
|
522
|
+
* @param {number} n
|
|
523
|
+
* @returns {EventEmitter}
|
|
524
|
+
*/
|
|
525
|
+
EventEmitter.prototype.setMaxListeners = function setMaxListeners(n) {
|
|
526
|
+
if (typeof n !== 'number' || n < 0 || NumberIsNaN(n)) {
|
|
527
|
+
throw new ERR_OUT_OF_RANGE('n', 'a non-negative number', n);
|
|
528
|
+
}
|
|
529
|
+
this._maxListeners = n;
|
|
530
|
+
return this;
|
|
531
|
+
};
|
|
532
|
+
|
|
533
|
+
function _getMaxListeners(that) {
|
|
534
|
+
if (that._maxListeners === undefined)
|
|
535
|
+
return EventEmitter.defaultMaxListeners;
|
|
536
|
+
return that._maxListeners;
|
|
537
|
+
}
|
|
538
|
+
|
|
539
|
+
/**
|
|
540
|
+
* Returns the current max listener value for the event emitter.
|
|
541
|
+
* @returns {number}
|
|
542
|
+
*/
|
|
543
|
+
EventEmitter.prototype.getMaxListeners = function getMaxListeners() {
|
|
544
|
+
return _getMaxListeners(this);
|
|
545
|
+
};
|
|
546
|
+
|
|
547
|
+
/**
|
|
548
|
+
* Synchronously calls each of the listeners registered
|
|
549
|
+
* for the event.
|
|
550
|
+
* @param {string | symbol} type
|
|
551
|
+
* @param {...any} [args]
|
|
552
|
+
* @returns {boolean}
|
|
553
|
+
*/
|
|
554
|
+
EventEmitter.prototype.emit = function emit(type, ...args) {
|
|
555
|
+
let doError = (type === 'error');
|
|
556
|
+
|
|
557
|
+
const events = this._events;
|
|
558
|
+
if (events !== undefined) {
|
|
559
|
+
if (doError && events[kErrorMonitor] !== undefined)
|
|
560
|
+
this.emit(kErrorMonitor, ...args);
|
|
561
|
+
doError = (doError && events.error === undefined);
|
|
562
|
+
} else if (!doError)
|
|
563
|
+
return false;
|
|
564
|
+
|
|
565
|
+
// If there is no 'error' event listener then throw.
|
|
566
|
+
if (doError) {
|
|
567
|
+
let er;
|
|
568
|
+
if (args.length > 0)
|
|
569
|
+
er = args[0];
|
|
570
|
+
if (er instanceof Error) {
|
|
571
|
+
try {
|
|
572
|
+
const capture = {};
|
|
573
|
+
ErrorCaptureStackTrace(capture, EventEmitter.prototype.emit);
|
|
574
|
+
} catch (e) {}
|
|
575
|
+
|
|
576
|
+
// Note: The comments on the `throw` lines are intentional, they show
|
|
577
|
+
// up in Node's output if this results in an unhandled exception.
|
|
578
|
+
throw er; // Unhandled 'error' event
|
|
579
|
+
}
|
|
580
|
+
|
|
581
|
+
let stringifiedEr;
|
|
582
|
+
try {
|
|
583
|
+
stringifiedEr = inspect(er);
|
|
584
|
+
} catch (e) {
|
|
585
|
+
stringifiedEr = er;
|
|
586
|
+
}
|
|
587
|
+
|
|
588
|
+
// At least give some kind of context to the user
|
|
589
|
+
const err = new ERR_UNHANDLED_ERROR(stringifiedEr);
|
|
590
|
+
err.context = er;
|
|
591
|
+
throw err; // Unhandled 'error' event
|
|
592
|
+
}
|
|
593
|
+
|
|
594
|
+
const handler = events[type];
|
|
595
|
+
|
|
596
|
+
if (handler === undefined)
|
|
597
|
+
return false;
|
|
598
|
+
|
|
599
|
+
if (typeof handler === 'function') {
|
|
600
|
+
const result = handler.apply(this, args);
|
|
601
|
+
|
|
602
|
+
// We check if result is undefined first because that
|
|
603
|
+
// is the most common case so we do not pay any perf
|
|
604
|
+
// penalty
|
|
605
|
+
if (result !== undefined && result !== null) {
|
|
606
|
+
addCatch(this, result, type, args);
|
|
607
|
+
}
|
|
608
|
+
} else {
|
|
609
|
+
const len = handler.length;
|
|
610
|
+
const listeners = arrayClone(handler);
|
|
611
|
+
for (let i = 0; i < len; ++i) {
|
|
612
|
+
const result = listeners[i].apply(this, args);
|
|
613
|
+
|
|
614
|
+
// We check if result is undefined first because that
|
|
615
|
+
// is the most common case so we do not pay any perf
|
|
616
|
+
// penalty.
|
|
617
|
+
// This code is duplicated because extracting it away
|
|
618
|
+
// would make it non-inlineable.
|
|
619
|
+
if (result !== undefined && result !== null) {
|
|
620
|
+
addCatch(this, result, type, args);
|
|
621
|
+
}
|
|
622
|
+
}
|
|
623
|
+
}
|
|
624
|
+
|
|
625
|
+
return true;
|
|
626
|
+
};
|
|
627
|
+
|
|
628
|
+
function _addListener(target, type, listener, prepend) {
|
|
629
|
+
let m;
|
|
630
|
+
let events;
|
|
631
|
+
let existing;
|
|
632
|
+
|
|
633
|
+
checkListener(listener);
|
|
634
|
+
|
|
635
|
+
events = target._events;
|
|
636
|
+
if (events === undefined) {
|
|
637
|
+
events = target._events = ObjectCreate(null);
|
|
638
|
+
target._eventsCount = 0;
|
|
639
|
+
} else {
|
|
640
|
+
// To avoid recursion in the case that type === "newListener"! Before
|
|
641
|
+
// adding it to the listeners, first emit "newListener".
|
|
642
|
+
if (events.newListener !== undefined) {
|
|
643
|
+
target.emit('newListener', type,
|
|
644
|
+
nc(listener.listener, listener));
|
|
645
|
+
|
|
646
|
+
// Re-assign `events` because a newListener handler could have caused the
|
|
647
|
+
// this._events to be assigned to a new object
|
|
648
|
+
events = target._events;
|
|
649
|
+
}
|
|
650
|
+
existing = events[type];
|
|
651
|
+
}
|
|
652
|
+
|
|
653
|
+
if (existing === undefined) {
|
|
654
|
+
// Optimize the case of one listener. Don't need the extra array object.
|
|
655
|
+
events[type] = listener;
|
|
656
|
+
++target._eventsCount;
|
|
657
|
+
} else {
|
|
658
|
+
if (typeof existing === 'function') {
|
|
659
|
+
// Adding the second element, need to change to array.
|
|
660
|
+
existing = events[type] =
|
|
661
|
+
prepend ? [listener, existing] : [existing, listener];
|
|
662
|
+
// If we've already got an array, just append.
|
|
663
|
+
} else if (prepend) {
|
|
664
|
+
existing.unshift(listener);
|
|
665
|
+
} else {
|
|
666
|
+
existing.push(listener);
|
|
667
|
+
}
|
|
668
|
+
|
|
669
|
+
// Check for listener leak
|
|
670
|
+
m = _getMaxListeners(target);
|
|
671
|
+
if (m > 0 && existing.length > m && !existing.warned) {
|
|
672
|
+
existing.warned = true;
|
|
673
|
+
// No error code for this since it is a Warning
|
|
674
|
+
// eslint-disable-next-line no-restricted-syntax
|
|
675
|
+
const w = new Error('Possible EventEmitter memory leak detected. ' +
|
|
676
|
+
`${existing.length} ${String(type)} listeners ` +
|
|
677
|
+
`added to ${inspect(target, { depth: -1 })}. Use ` +
|
|
678
|
+
'emitter.setMaxListeners() to increase limit');
|
|
679
|
+
w.name = 'MaxListenersExceededWarning';
|
|
680
|
+
w.emitter = target;
|
|
681
|
+
w.type = type;
|
|
682
|
+
w.count = existing.length;
|
|
683
|
+
process.emitWarning(w);
|
|
684
|
+
}
|
|
685
|
+
}
|
|
686
|
+
|
|
687
|
+
return target;
|
|
688
|
+
}
|
|
689
|
+
|
|
690
|
+
/**
|
|
691
|
+
* Adds a listener to the event emitter.
|
|
692
|
+
* @param {string | symbol} type
|
|
693
|
+
* @param {Function} listener
|
|
694
|
+
* @returns {EventEmitter}
|
|
695
|
+
*/
|
|
696
|
+
EventEmitter.prototype.addListener = function addListener(type, listener) {
|
|
697
|
+
return _addListener(this, type, listener, false);
|
|
698
|
+
};
|
|
699
|
+
|
|
700
|
+
EventEmitter.prototype.on = EventEmitter.prototype.addListener;
|
|
701
|
+
|
|
702
|
+
/**
|
|
703
|
+
* Adds the `listener` function to the beginning of
|
|
704
|
+
* the listeners array.
|
|
705
|
+
* @param {string | symbol} type
|
|
706
|
+
* @param {Function} listener
|
|
707
|
+
* @returns {EventEmitter}
|
|
708
|
+
*/
|
|
709
|
+
EventEmitter.prototype.prependListener =
|
|
710
|
+
function prependListener(type, listener) {
|
|
711
|
+
return _addListener(this, type, listener, true);
|
|
712
|
+
};
|
|
713
|
+
|
|
714
|
+
function onceWrapper() {
|
|
715
|
+
if (!this.fired) {
|
|
716
|
+
this.target.removeListener(this.type, this.wrapFn);
|
|
717
|
+
this.fired = true;
|
|
718
|
+
if (arguments.length === 0)
|
|
719
|
+
return this.listener.call(this.target);
|
|
720
|
+
return this.listener.apply(this.target, arguments);
|
|
721
|
+
}
|
|
722
|
+
}
|
|
723
|
+
|
|
724
|
+
function _onceWrap(target, type, listener) {
|
|
725
|
+
const state = { fired: false, wrapFn: undefined, target, type, listener };
|
|
726
|
+
const wrapped = onceWrapper.bind(state);
|
|
727
|
+
wrapped.listener = listener;
|
|
728
|
+
state.wrapFn = wrapped;
|
|
729
|
+
return wrapped;
|
|
730
|
+
}
|
|
731
|
+
|
|
732
|
+
/**
|
|
733
|
+
* Adds a one-time `listener` function to the event emitter.
|
|
734
|
+
* @param {string | symbol} type
|
|
735
|
+
* @param {Function} listener
|
|
736
|
+
* @returns {EventEmitter}
|
|
737
|
+
*/
|
|
738
|
+
EventEmitter.prototype.once = function once(type, listener) {
|
|
739
|
+
checkListener(listener);
|
|
740
|
+
|
|
741
|
+
this.on(type, _onceWrap(this, type, listener));
|
|
742
|
+
return this;
|
|
743
|
+
};
|
|
744
|
+
|
|
745
|
+
/**
|
|
746
|
+
* Adds a one-time `listener` function to the beginning of
|
|
747
|
+
* the listeners array.
|
|
748
|
+
* @param {string | symbol} type
|
|
749
|
+
* @param {Function} listener
|
|
750
|
+
* @returns {EventEmitter}
|
|
751
|
+
*/
|
|
752
|
+
EventEmitter.prototype.prependOnceListener =
|
|
753
|
+
function prependOnceListener(type, listener) {
|
|
754
|
+
checkListener(listener);
|
|
755
|
+
|
|
756
|
+
this.prependListener(type, _onceWrap(this, type, listener));
|
|
757
|
+
return this;
|
|
758
|
+
};
|
|
759
|
+
|
|
760
|
+
|
|
761
|
+
/**
|
|
762
|
+
* Removes the specified `listener` from the listeners array.
|
|
763
|
+
* @param {string | symbol} type
|
|
764
|
+
* @param {Function} listener
|
|
765
|
+
* @returns {EventEmitter}
|
|
766
|
+
*/
|
|
767
|
+
EventEmitter.prototype.removeListener =
|
|
768
|
+
function removeListener(type, listener) {
|
|
769
|
+
checkListener(listener);
|
|
770
|
+
|
|
771
|
+
const events = this._events;
|
|
772
|
+
if (events === undefined)
|
|
773
|
+
return this;
|
|
774
|
+
|
|
775
|
+
const list = events[type];
|
|
776
|
+
if (list === undefined)
|
|
777
|
+
return this;
|
|
778
|
+
|
|
779
|
+
if (list === listener || list.listener === listener) {
|
|
780
|
+
if (--this._eventsCount === 0)
|
|
781
|
+
this._events = ObjectCreate(null);
|
|
782
|
+
else {
|
|
783
|
+
delete events[type];
|
|
784
|
+
if (events.removeListener)
|
|
785
|
+
this.emit('removeListener', type, list.listener || listener);
|
|
786
|
+
}
|
|
787
|
+
} else if (typeof list !== 'function') {
|
|
788
|
+
let position = -1;
|
|
789
|
+
|
|
790
|
+
for (let i = list.length - 1; i >= 0; i--) {
|
|
791
|
+
if (list[i] === listener || list[i].listener === listener) {
|
|
792
|
+
position = i;
|
|
793
|
+
break;
|
|
794
|
+
}
|
|
795
|
+
}
|
|
796
|
+
|
|
797
|
+
if (position < 0)
|
|
798
|
+
return this;
|
|
799
|
+
|
|
800
|
+
if (position === 0)
|
|
801
|
+
list.shift();
|
|
802
|
+
else {
|
|
803
|
+
spliceOne(list, position);
|
|
804
|
+
}
|
|
805
|
+
|
|
806
|
+
if (list.length === 1)
|
|
807
|
+
events[type] = list[0];
|
|
808
|
+
|
|
809
|
+
if (events.removeListener !== undefined)
|
|
810
|
+
this.emit('removeListener', type, listener);
|
|
811
|
+
}
|
|
812
|
+
|
|
813
|
+
return this;
|
|
814
|
+
};
|
|
815
|
+
|
|
816
|
+
EventEmitter.prototype.off = EventEmitter.prototype.removeListener;
|
|
817
|
+
|
|
818
|
+
/**
|
|
819
|
+
* Removes all listeners from the event emitter. (Only
|
|
820
|
+
* removes listeners for a specific event name if specified
|
|
821
|
+
* as `type`).
|
|
822
|
+
* @param {string | symbol} [type]
|
|
823
|
+
* @returns {EventEmitter}
|
|
824
|
+
*/
|
|
825
|
+
EventEmitter.prototype.removeAllListeners =
|
|
826
|
+
function removeAllListeners(type) {
|
|
827
|
+
const events = this._events;
|
|
828
|
+
if (events === undefined)
|
|
829
|
+
return this;
|
|
830
|
+
|
|
831
|
+
// Not listening for removeListener, no need to emit
|
|
832
|
+
if (events.removeListener === undefined) {
|
|
833
|
+
if (arguments.length === 0) {
|
|
834
|
+
this._events = ObjectCreate(null);
|
|
835
|
+
this._eventsCount = 0;
|
|
836
|
+
} else if (events[type] !== undefined) {
|
|
837
|
+
if (--this._eventsCount === 0)
|
|
838
|
+
this._events = ObjectCreate(null);
|
|
839
|
+
else
|
|
840
|
+
delete events[type];
|
|
841
|
+
}
|
|
842
|
+
return this;
|
|
843
|
+
}
|
|
844
|
+
|
|
845
|
+
// Emit removeListener for all listeners on all events
|
|
846
|
+
if (arguments.length === 0) {
|
|
847
|
+
for (const key of ReflectOwnKeys(events)) {
|
|
848
|
+
if (key === 'removeListener') continue;
|
|
849
|
+
this.removeAllListeners(key);
|
|
850
|
+
}
|
|
851
|
+
this.removeAllListeners('removeListener');
|
|
852
|
+
this._events = ObjectCreate(null);
|
|
853
|
+
this._eventsCount = 0;
|
|
854
|
+
return this;
|
|
855
|
+
}
|
|
856
|
+
|
|
857
|
+
const listeners = events[type];
|
|
858
|
+
|
|
859
|
+
if (typeof listeners === 'function') {
|
|
860
|
+
this.removeListener(type, listeners);
|
|
861
|
+
} else if (listeners !== undefined) {
|
|
862
|
+
// LIFO order
|
|
863
|
+
for (let i = listeners.length - 1; i >= 0; i--) {
|
|
864
|
+
this.removeListener(type, listeners[i]);
|
|
865
|
+
}
|
|
866
|
+
}
|
|
867
|
+
|
|
868
|
+
return this;
|
|
869
|
+
};
|
|
870
|
+
|
|
871
|
+
function _listeners(target, type, unwrap) {
|
|
872
|
+
const events = target._events;
|
|
873
|
+
|
|
874
|
+
if (events === undefined)
|
|
875
|
+
return [];
|
|
876
|
+
|
|
877
|
+
const evlistener = events[type];
|
|
878
|
+
if (evlistener === undefined)
|
|
879
|
+
return [];
|
|
880
|
+
|
|
881
|
+
if (typeof evlistener === 'function')
|
|
882
|
+
return unwrap ? [evlistener.listener || evlistener] : [evlistener];
|
|
883
|
+
|
|
884
|
+
return unwrap ?
|
|
885
|
+
unwrapListeners(evlistener) : arrayClone(evlistener);
|
|
886
|
+
}
|
|
887
|
+
|
|
888
|
+
/**
|
|
889
|
+
* Returns a copy of the array of listeners for the event name
|
|
890
|
+
* specified as `type`.
|
|
891
|
+
* @param {string | symbol} type
|
|
892
|
+
* @returns {Function[]}
|
|
893
|
+
*/
|
|
894
|
+
EventEmitter.prototype.listeners = function listeners(type) {
|
|
895
|
+
return _listeners(this, type, true);
|
|
896
|
+
};
|
|
897
|
+
|
|
898
|
+
/**
|
|
899
|
+
* Returns a copy of the array of listeners and wrappers for
|
|
900
|
+
* the event name specified as `type`.
|
|
901
|
+
* @param {string | symbol} type
|
|
902
|
+
* @returns {Function[]}
|
|
903
|
+
*/
|
|
904
|
+
EventEmitter.prototype.rawListeners = function rawListeners(type) {
|
|
905
|
+
return _listeners(this, type, false);
|
|
906
|
+
};
|
|
907
|
+
|
|
908
|
+
/**
|
|
909
|
+
* Returns the number of listeners listening to the event name
|
|
910
|
+
* specified as `type`.
|
|
911
|
+
* @deprecated since v3.2.0
|
|
912
|
+
* @param {EventEmitter} emitter
|
|
913
|
+
* @param {string | symbol} type
|
|
914
|
+
* @returns {number}
|
|
915
|
+
*/
|
|
916
|
+
EventEmitter.listenerCount = function(emitter, type) {
|
|
917
|
+
if (typeof emitter.listenerCount === 'function') {
|
|
918
|
+
return emitter.listenerCount(type);
|
|
919
|
+
}
|
|
920
|
+
return emitter.listenerCount(type);
|
|
921
|
+
};
|
|
922
|
+
|
|
923
|
+
EventEmitter.prototype.listenerCount = listenerCount;
|
|
924
|
+
|
|
925
|
+
/**
|
|
926
|
+
* Returns the number of listeners listening to event name
|
|
927
|
+
* specified as `type`.
|
|
928
|
+
* @param {string | symbol} type
|
|
929
|
+
* @returns {number}
|
|
930
|
+
*/
|
|
931
|
+
function listenerCount(type) {
|
|
932
|
+
const events = this._events;
|
|
933
|
+
|
|
934
|
+
if (events !== undefined) {
|
|
935
|
+
const evlistener = events[type];
|
|
936
|
+
|
|
937
|
+
if (typeof evlistener === 'function') {
|
|
938
|
+
return 1;
|
|
939
|
+
} else if (evlistener !== undefined) {
|
|
940
|
+
return evlistener.length;
|
|
941
|
+
}
|
|
942
|
+
}
|
|
943
|
+
|
|
944
|
+
return 0;
|
|
945
|
+
}
|
|
946
|
+
|
|
947
|
+
/**
|
|
948
|
+
* Returns an array listing the events for which
|
|
949
|
+
* the emitter has registered listeners.
|
|
950
|
+
* @returns {any[]}
|
|
951
|
+
*/
|
|
952
|
+
EventEmitter.prototype.eventNames = function eventNames() {
|
|
953
|
+
return this._eventsCount > 0 ? ReflectOwnKeys(this._events) : [];
|
|
954
|
+
};
|
|
955
|
+
|
|
956
|
+
function arrayClone(arr) {
|
|
957
|
+
// At least since V8 8.3, this implementation is faster than the previous
|
|
958
|
+
// which always used a simple for-loop
|
|
959
|
+
switch (arr.length) {
|
|
960
|
+
case 2: return [arr[0], arr[1]];
|
|
961
|
+
case 3: return [arr[0], arr[1], arr[2]];
|
|
962
|
+
case 4: return [arr[0], arr[1], arr[2], arr[3]];
|
|
963
|
+
case 5: return [arr[0], arr[1], arr[2], arr[3], arr[4]];
|
|
964
|
+
case 6: return [arr[0], arr[1], arr[2], arr[3], arr[4], arr[5]];
|
|
965
|
+
}
|
|
966
|
+
return ArrayPrototypeSlice(arr);
|
|
967
|
+
}
|
|
968
|
+
|
|
969
|
+
function unwrapListeners(arr) {
|
|
970
|
+
const ret = arrayClone(arr);
|
|
971
|
+
for (let i = 0; i < ret.length; ++i) {
|
|
972
|
+
const orig = ret[i].listener;
|
|
973
|
+
if (typeof orig === 'function')
|
|
974
|
+
ret[i] = orig;
|
|
975
|
+
}
|
|
976
|
+
return ret;
|
|
977
|
+
}
|