@nocobase/plugin-file-manager 0.17.0-alpha.7 → 0.18.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/dist/externalVersion.js +11 -11
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/S3.js +4 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/S3Client.js +10 -5
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/AbortMultipartUploadCommand.js +7 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/CompleteMultipartUploadCommand.js +7 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/CopyObjectCommand.js +6 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/CreateBucketCommand.js +7 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/CreateMultipartUploadCommand.js +7 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/CreateSessionCommand.js +59 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/DeleteBucketAnalyticsConfigurationCommand.js +7 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/DeleteBucketCommand.js +7 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/DeleteBucketCorsCommand.js +7 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/DeleteBucketEncryptionCommand.js +7 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/DeleteBucketIntelligentTieringConfigurationCommand.js +7 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/DeleteBucketInventoryConfigurationCommand.js +7 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/DeleteBucketLifecycleCommand.js +7 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/DeleteBucketMetricsConfigurationCommand.js +7 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/DeleteBucketOwnershipControlsCommand.js +7 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/DeleteBucketPolicyCommand.js +7 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/DeleteBucketReplicationCommand.js +7 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/DeleteBucketTaggingCommand.js +7 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/DeleteBucketWebsiteCommand.js +7 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/DeleteObjectCommand.js +7 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/DeleteObjectTaggingCommand.js +6 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/DeleteObjectsCommand.js +6 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/DeletePublicAccessBlockCommand.js +7 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/GetBucketAccelerateConfigurationCommand.js +7 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/GetBucketAclCommand.js +7 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/GetBucketAnalyticsConfigurationCommand.js +7 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/GetBucketCorsCommand.js +7 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/GetBucketEncryptionCommand.js +7 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/GetBucketIntelligentTieringConfigurationCommand.js +7 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/GetBucketInventoryConfigurationCommand.js +7 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/GetBucketLifecycleConfigurationCommand.js +7 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/GetBucketLocationCommand.js +7 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/GetBucketLoggingCommand.js +7 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/GetBucketMetricsConfigurationCommand.js +7 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/GetBucketNotificationConfigurationCommand.js +7 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/GetBucketOwnershipControlsCommand.js +7 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/GetBucketPolicyCommand.js +7 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/GetBucketPolicyStatusCommand.js +7 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/GetBucketReplicationCommand.js +7 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/GetBucketRequestPaymentCommand.js +7 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/GetBucketTaggingCommand.js +7 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/GetBucketVersioningCommand.js +7 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/GetBucketWebsiteCommand.js +7 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/GetObjectAclCommand.js +7 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/GetObjectAttributesCommand.js +6 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/GetObjectCommand.js +7 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/GetObjectLegalHoldCommand.js +6 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/GetObjectLockConfigurationCommand.js +6 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/GetObjectRetentionCommand.js +6 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/GetObjectTaggingCommand.js +6 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/GetObjectTorrentCommand.js +6 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/GetPublicAccessBlockCommand.js +7 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/HeadBucketCommand.js +6 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/HeadObjectCommand.js +7 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/ListBucketAnalyticsConfigurationsCommand.js +7 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/ListBucketIntelligentTieringConfigurationsCommand.js +7 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/ListBucketInventoryConfigurationsCommand.js +7 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/ListBucketMetricsConfigurationsCommand.js +6 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/ListBucketsCommand.js +6 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/ListDirectoryBucketsCommand.js +58 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/ListMultipartUploadsCommand.js +7 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/ListObjectVersionsCommand.js +7 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/ListObjectsCommand.js +7 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/ListObjectsV2Command.js +7 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/ListPartsCommand.js +7 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/PutBucketAccelerateConfigurationCommand.js +7 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/PutBucketAclCommand.js +7 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/PutBucketAnalyticsConfigurationCommand.js +7 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/PutBucketCorsCommand.js +7 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/PutBucketEncryptionCommand.js +7 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/PutBucketIntelligentTieringConfigurationCommand.js +7 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/PutBucketInventoryConfigurationCommand.js +7 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/PutBucketLifecycleConfigurationCommand.js +7 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/PutBucketLoggingCommand.js +7 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/PutBucketMetricsConfigurationCommand.js +7 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/PutBucketNotificationConfigurationCommand.js +7 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/PutBucketOwnershipControlsCommand.js +7 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/PutBucketPolicyCommand.js +7 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/PutBucketReplicationCommand.js +7 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/PutBucketRequestPaymentCommand.js +7 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/PutBucketTaggingCommand.js +7 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/PutBucketVersioningCommand.js +7 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/PutBucketWebsiteCommand.js +7 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/PutObjectAclCommand.js +7 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/PutObjectCommand.js +10 -3
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/PutObjectLegalHoldCommand.js +6 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/PutObjectLockConfigurationCommand.js +6 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/PutObjectRetentionCommand.js +6 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/PutObjectTaggingCommand.js +6 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/PutPublicAccessBlockCommand.js +7 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/RestoreObjectCommand.js +6 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/SelectObjectContentCommand.js +9 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/UploadPartCommand.js +7 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/UploadPartCopyCommand.js +6 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/WriteGetObjectResponseCommand.js +6 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/index.js +2 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/endpoint/EndpointParameters.js +1 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/endpoint/endpointResolver.js +1 -1
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/endpoint/ruleset.js +3 -3
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/extensionConfiguration.js +2 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/index.js +3 -3
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/models/models_0.js +50 -32
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/models/models_1.js +18 -1
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/pagination/ListDirectoryBucketsPaginator.js +29 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/pagination/index.js +1 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/protocols/Aws_restXml.js +226 -97
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/runtimeConfig.browser.js +2 -2
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/runtimeConfig.js +5 -1
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/runtimeConfig.shared.js +20 -17
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/runtimeExtensions.js +22 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/S3.js +4 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/S3Client.js +11 -6
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/AbortMultipartUploadCommand.js +7 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/CompleteMultipartUploadCommand.js +7 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/CopyObjectCommand.js +6 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/CreateBucketCommand.js +7 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/CreateMultipartUploadCommand.js +7 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/CreateSessionCommand.js +55 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/DeleteBucketAnalyticsConfigurationCommand.js +7 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/DeleteBucketCommand.js +7 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/DeleteBucketCorsCommand.js +7 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/DeleteBucketEncryptionCommand.js +7 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/DeleteBucketIntelligentTieringConfigurationCommand.js +7 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/DeleteBucketInventoryConfigurationCommand.js +7 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/DeleteBucketLifecycleCommand.js +7 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/DeleteBucketMetricsConfigurationCommand.js +7 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/DeleteBucketOwnershipControlsCommand.js +7 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/DeleteBucketPolicyCommand.js +7 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/DeleteBucketReplicationCommand.js +7 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/DeleteBucketTaggingCommand.js +7 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/DeleteBucketWebsiteCommand.js +7 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/DeleteObjectCommand.js +7 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/DeleteObjectTaggingCommand.js +6 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/DeleteObjectsCommand.js +6 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/DeletePublicAccessBlockCommand.js +7 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketAccelerateConfigurationCommand.js +7 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketAclCommand.js +7 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketAnalyticsConfigurationCommand.js +7 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketCorsCommand.js +7 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketEncryptionCommand.js +7 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketIntelligentTieringConfigurationCommand.js +7 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketInventoryConfigurationCommand.js +7 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketLifecycleConfigurationCommand.js +7 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketLocationCommand.js +7 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketLoggingCommand.js +7 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketMetricsConfigurationCommand.js +7 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketNotificationConfigurationCommand.js +7 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketOwnershipControlsCommand.js +7 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketPolicyCommand.js +7 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketPolicyStatusCommand.js +7 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketReplicationCommand.js +7 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketRequestPaymentCommand.js +7 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketTaggingCommand.js +7 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketVersioningCommand.js +7 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketWebsiteCommand.js +7 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/GetObjectAclCommand.js +7 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/GetObjectAttributesCommand.js +6 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/GetObjectCommand.js +7 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/GetObjectLegalHoldCommand.js +6 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/GetObjectLockConfigurationCommand.js +6 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/GetObjectRetentionCommand.js +6 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/GetObjectTaggingCommand.js +6 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/GetObjectTorrentCommand.js +6 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/GetPublicAccessBlockCommand.js +7 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/HeadBucketCommand.js +6 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/HeadObjectCommand.js +7 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/ListBucketAnalyticsConfigurationsCommand.js +7 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/ListBucketIntelligentTieringConfigurationsCommand.js +7 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/ListBucketInventoryConfigurationsCommand.js +7 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/ListBucketMetricsConfigurationsCommand.js +6 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/ListBucketsCommand.js +6 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/ListDirectoryBucketsCommand.js +54 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/ListMultipartUploadsCommand.js +7 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/ListObjectVersionsCommand.js +7 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/ListObjectsCommand.js +7 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/ListObjectsV2Command.js +7 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/ListPartsCommand.js +7 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketAccelerateConfigurationCommand.js +7 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketAclCommand.js +7 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketAnalyticsConfigurationCommand.js +7 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketCorsCommand.js +7 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketEncryptionCommand.js +7 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketIntelligentTieringConfigurationCommand.js +7 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketInventoryConfigurationCommand.js +7 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketLifecycleConfigurationCommand.js +7 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketLoggingCommand.js +7 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketMetricsConfigurationCommand.js +7 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketNotificationConfigurationCommand.js +7 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketOwnershipControlsCommand.js +7 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketPolicyCommand.js +7 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketReplicationCommand.js +7 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketRequestPaymentCommand.js +7 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketTaggingCommand.js +7 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketVersioningCommand.js +7 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketWebsiteCommand.js +7 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/PutObjectAclCommand.js +7 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/PutObjectCommand.js +8 -1
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/PutObjectLegalHoldCommand.js +6 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/PutObjectLockConfigurationCommand.js +6 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/PutObjectRetentionCommand.js +6 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/PutObjectTaggingCommand.js +6 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/PutPublicAccessBlockCommand.js +7 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/RestoreObjectCommand.js +6 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/SelectObjectContentCommand.js +9 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/UploadPartCommand.js +7 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/UploadPartCopyCommand.js +6 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/WriteGetObjectResponseCommand.js +6 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/index.js +2 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/endpoint/EndpointParameters.js +1 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/endpoint/endpointResolver.js +1 -1
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/endpoint/ruleset.js +3 -3
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/extensionConfiguration.js +1 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/index.js +1 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/models/models_0.js +45 -27
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/models/models_1.js +15 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/pagination/ListDirectoryBucketsPaginator.js +25 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/pagination/index.js +1 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/protocols/Aws_restXml.js +218 -93
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/runtimeConfig.browser.js +2 -2
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/runtimeConfig.js +5 -1
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/runtimeConfig.shared.js +20 -17
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/runtimeExtensions.js +18 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/S3.d.ts +14 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/S3Client.d.ts +14 -5
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/AbortMultipartUploadCommand.d.ts +37 -5
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/CompleteMultipartUploadCommand.d.ts +98 -62
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/CopyObjectCommand.d.ts +108 -164
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/CreateBucketCommand.d.ts +116 -69
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/CreateMultipartUploadCommand.d.ts +146 -222
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/CreateSessionCommand.d.ts +145 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/DeleteBucketAnalyticsConfigurationCommand.d.ts +4 -1
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/DeleteBucketCommand.d.ts +35 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/DeleteBucketCorsCommand.d.ts +4 -1
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/DeleteBucketEncryptionCommand.d.ts +6 -3
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/DeleteBucketIntelligentTieringConfigurationCommand.d.ts +4 -1
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/DeleteBucketInventoryConfigurationCommand.d.ts +4 -1
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/DeleteBucketLifecycleCommand.d.ts +4 -1
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/DeleteBucketMetricsConfigurationCommand.d.ts +4 -1
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/DeleteBucketOwnershipControlsCommand.d.ts +4 -1
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/DeleteBucketPolicyCommand.d.ts +48 -19
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/DeleteBucketReplicationCommand.d.ts +4 -1
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/DeleteBucketTaggingCommand.d.ts +4 -1
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/DeleteBucketWebsiteCommand.d.ts +4 -1
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/DeleteObjectCommand.d.ts +83 -11
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/DeleteObjectTaggingCommand.d.ts +4 -1
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/DeleteObjectsCommand.d.ts +109 -34
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/DeletePublicAccessBlockCommand.d.ts +4 -1
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/GetBucketAccelerateConfigurationCommand.d.ts +6 -2
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/GetBucketAclCommand.d.ts +7 -4
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/GetBucketAnalyticsConfigurationCommand.d.ts +6 -2
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/GetBucketCorsCommand.d.ts +6 -3
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/GetBucketEncryptionCommand.d.ts +4 -1
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/GetBucketIntelligentTieringConfigurationCommand.d.ts +4 -1
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/GetBucketInventoryConfigurationCommand.d.ts +5 -2
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/GetBucketLifecycleConfigurationCommand.d.ts +3 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/GetBucketLocationCommand.d.ts +7 -4
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/GetBucketLoggingCommand.d.ts +10 -1
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/GetBucketMetricsConfigurationCommand.d.ts +4 -1
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/GetBucketNotificationConfigurationCommand.d.ts +6 -3
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/GetBucketOwnershipControlsCommand.d.ts +4 -1
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/GetBucketPolicyCommand.d.ts +54 -23
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/GetBucketPolicyStatusCommand.d.ts +4 -1
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/GetBucketReplicationCommand.d.ts +5 -2
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/GetBucketRequestPaymentCommand.d.ts +4 -1
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/GetBucketTaggingCommand.d.ts +4 -1
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/GetBucketVersioningCommand.d.ts +4 -1
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/GetBucketWebsiteCommand.d.ts +4 -1
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/GetObjectAclCommand.d.ts +5 -2
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/GetObjectAttributesCommand.d.ts +113 -73
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/GetObjectCommand.d.ts +127 -136
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/GetObjectLegalHoldCommand.d.ts +5 -2
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/GetObjectLockConfigurationCommand.d.ts +4 -1
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/GetObjectRetentionCommand.d.ts +5 -2
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/GetObjectTaggingCommand.d.ts +23 -20
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/GetObjectTorrentCommand.d.ts +8 -4
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/GetPublicAccessBlockCommand.d.ts +4 -1
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/HeadBucketCommand.d.ts +53 -19
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/HeadObjectCommand.d.ts +95 -80
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/ListBucketAnalyticsConfigurationsCommand.d.ts +4 -1
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/ListBucketIntelligentTieringConfigurationsCommand.d.ts +4 -1
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/ListBucketInventoryConfigurationsCommand.d.ts +5 -2
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/ListBucketMetricsConfigurationsCommand.d.ts +4 -1
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/ListBucketsCommand.d.ts +4 -1
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/ListDirectoryBucketsCommand.d.ts +98 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/ListMultipartUploadsCommand.d.ts +117 -49
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/ListObjectVersionsCommand.d.ts +4 -2
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/ListObjectsCommand.d.ts +5 -2
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/ListObjectsV2Command.d.ts +52 -10
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/ListPartsCommand.d.ts +47 -14
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/PutBucketAccelerateConfigurationCommand.d.ts +4 -1
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/PutBucketAclCommand.d.ts +46 -37
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/PutBucketAnalyticsConfigurationCommand.d.ts +6 -2
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/PutBucketCorsCommand.d.ts +4 -1
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/PutBucketEncryptionCommand.d.ts +8 -9
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/PutBucketIntelligentTieringConfigurationCommand.d.ts +9 -5
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/PutBucketInventoryConfigurationCommand.d.ts +23 -20
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/PutBucketLifecycleConfigurationCommand.d.ts +33 -26
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/PutBucketLoggingCommand.d.ts +22 -11
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/PutBucketMetricsConfigurationCommand.d.ts +4 -1
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/PutBucketNotificationConfigurationCommand.d.ts +4 -1
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/PutBucketOwnershipControlsCommand.d.ts +4 -1
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/PutBucketPolicyCommand.d.ts +54 -18
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/PutBucketReplicationCommand.d.ts +29 -20
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/PutBucketRequestPaymentCommand.d.ts +5 -2
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/PutBucketTaggingCommand.d.ts +23 -37
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/PutBucketVersioningCommand.d.ts +11 -8
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/PutBucketWebsiteCommand.d.ts +6 -2
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/PutObjectAclCommand.d.ts +46 -40
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/PutObjectCommand.d.ts +150 -119
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/PutObjectLegalHoldCommand.d.ts +6 -3
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/PutObjectLockConfigurationCommand.d.ts +7 -3
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/PutObjectRetentionCommand.d.ts +5 -2
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/PutObjectTaggingCommand.d.ts +24 -58
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/PutPublicAccessBlockCommand.d.ts +4 -1
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/RestoreObjectCommand.d.ts +99 -94
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/SelectObjectContentCommand.d.ts +51 -42
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/UploadPartCommand.d.ts +104 -71
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/UploadPartCopyCommand.d.ts +108 -99
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/WriteGetObjectResponseCommand.d.ts +9 -12
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/index.d.ts +2 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/endpoint/EndpointParameters.d.ts +8 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/extensionConfiguration.d.ts +8 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/index.d.ts +4 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/models/models_0.d.ts +3714 -1386
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/models/models_1.d.ts +1639 -111
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/pagination/ListDirectoryBucketsPaginator.d.ts +7 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/pagination/index.d.ts +1 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/protocols/Aws_restXml.d.ts +18 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/runtimeConfig.browser.d.ts +9 -2
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/runtimeConfig.d.ts +45 -37
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/runtimeConfig.native.d.ts +9 -2
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/runtimeConfig.shared.d.ts +2 -1
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/runtimeExtensions.d.ts +17 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/S3.d.ts +34 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/S3Client.d.ts +17 -1
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/CreateSessionCommand.d.ts +35 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/GetObjectCommand.d.ts +5 -3
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/GetObjectTorrentCommand.d.ts +8 -3
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/HeadBucketCommand.d.ts +4 -2
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/ListDirectoryBucketsCommand.d.ts +42 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/PutBucketReplicationCommand.d.ts +1 -1
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/PutBucketRequestPaymentCommand.d.ts +1 -1
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/PutBucketTaggingCommand.d.ts +1 -1
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/PutBucketVersioningCommand.d.ts +1 -1
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/PutBucketWebsiteCommand.d.ts +1 -1
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/PutObjectAclCommand.d.ts +1 -1
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/PutObjectCommand.d.ts +6 -8
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/PutObjectLegalHoldCommand.d.ts +1 -1
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/UploadPartCommand.d.ts +5 -7
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/WriteGetObjectResponseCommand.d.ts +7 -7
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/index.d.ts +2 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/endpoint/EndpointParameters.d.ts +5 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/extensionConfiguration.d.ts +7 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/index.d.ts +4 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/models/models_0.d.ts +235 -303
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/models/models_1.d.ts +201 -41
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/pagination/ListDirectoryBucketsPaginator.d.ts +11 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/pagination/index.d.ts +1 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/protocols/Aws_restXml.d.ts +24 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/runtimeConfig.browser.d.ts +18 -2
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/runtimeConfig.d.ts +72 -54
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/runtimeConfig.native.d.ts +18 -2
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/runtimeConfig.shared.d.ts +2 -1
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/runtimeExtensions.d.ts +11 -0
- package/dist/node_modules/@aws-sdk/client-s3/package.json +1 -1
- package/dist/node_modules/mime-match/package.json +1 -1
- package/dist/node_modules/mkdirp/package.json +1 -1
- package/dist/node_modules/multer-aliyun-oss/index.js +14 -106
- package/dist/node_modules/multer-aliyun-oss/package.json +1 -1
- package/dist/node_modules/multer-cos/index.js +4 -4
- package/dist/node_modules/multer-cos/package.json +1 -1
- package/dist/node_modules/multer-s3/index.js +4 -4
- package/dist/node_modules/multer-s3/package.json +1 -1
- package/dist/server/migrations/20231120142523-fix-storage.js +1 -0
- package/package.json +2 -2
- package/dist/node_modules/multer-aliyun-oss/bridge.js +0 -1010
- package/dist/node_modules/multer-aliyun-oss/events.js +0 -977
- package/dist/node_modules/multer-aliyun-oss/setup-node-sandbox.js +0 -461
- package/dist/node_modules/multer-aliyun-oss/setup-sandbox.js +0 -545
|
@@ -1,545 +0,0 @@
|
|
|
1
|
-
/* global host, bridge, data, context */
|
|
2
|
-
|
|
3
|
-
'use strict';
|
|
4
|
-
|
|
5
|
-
const {
|
|
6
|
-
Object: localObject,
|
|
7
|
-
Array: localArray,
|
|
8
|
-
Error: LocalError,
|
|
9
|
-
Reflect: localReflect,
|
|
10
|
-
Proxy: LocalProxy,
|
|
11
|
-
WeakMap: LocalWeakMap,
|
|
12
|
-
Function: localFunction,
|
|
13
|
-
Promise: localPromise,
|
|
14
|
-
eval: localEval
|
|
15
|
-
} = global;
|
|
16
|
-
|
|
17
|
-
const {
|
|
18
|
-
freeze: localObjectFreeze
|
|
19
|
-
} = localObject;
|
|
20
|
-
|
|
21
|
-
const {
|
|
22
|
-
getPrototypeOf: localReflectGetPrototypeOf,
|
|
23
|
-
apply: localReflectApply,
|
|
24
|
-
construct: localReflectConstruct,
|
|
25
|
-
deleteProperty: localReflectDeleteProperty,
|
|
26
|
-
has: localReflectHas,
|
|
27
|
-
defineProperty: localReflectDefineProperty,
|
|
28
|
-
setPrototypeOf: localReflectSetPrototypeOf,
|
|
29
|
-
getOwnPropertyDescriptor: localReflectGetOwnPropertyDescriptor
|
|
30
|
-
} = localReflect;
|
|
31
|
-
|
|
32
|
-
const {
|
|
33
|
-
isArray: localArrayIsArray
|
|
34
|
-
} = localArray;
|
|
35
|
-
|
|
36
|
-
const {
|
|
37
|
-
ensureThis,
|
|
38
|
-
ReadOnlyHandler,
|
|
39
|
-
from,
|
|
40
|
-
fromWithFactory,
|
|
41
|
-
readonlyFactory,
|
|
42
|
-
connect,
|
|
43
|
-
addProtoMapping,
|
|
44
|
-
VMError,
|
|
45
|
-
ReadOnlyMockHandler
|
|
46
|
-
} = bridge;
|
|
47
|
-
|
|
48
|
-
const {
|
|
49
|
-
allowAsync,
|
|
50
|
-
GeneratorFunction,
|
|
51
|
-
AsyncFunction,
|
|
52
|
-
AsyncGeneratorFunction
|
|
53
|
-
} = data;
|
|
54
|
-
|
|
55
|
-
const {
|
|
56
|
-
get: localWeakMapGet,
|
|
57
|
-
set: localWeakMapSet
|
|
58
|
-
} = LocalWeakMap.prototype;
|
|
59
|
-
|
|
60
|
-
function localUnexpected() {
|
|
61
|
-
return new VMError('Should not happen');
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
// global is originally prototype of host.Object so it can be used to climb up from the sandbox.
|
|
65
|
-
if (!localReflectSetPrototypeOf(context, localObject.prototype)) throw localUnexpected();
|
|
66
|
-
|
|
67
|
-
Object.defineProperties(global, {
|
|
68
|
-
global: {value: global, writable: true, configurable: true, enumerable: true},
|
|
69
|
-
globalThis: {value: global, writable: true, configurable: true},
|
|
70
|
-
GLOBAL: {value: global, writable: true, configurable: true},
|
|
71
|
-
root: {value: global, writable: true, configurable: true},
|
|
72
|
-
Error: {value: LocalError}
|
|
73
|
-
});
|
|
74
|
-
|
|
75
|
-
if (!localReflectDefineProperty(global, 'VMError', {
|
|
76
|
-
__proto__: null,
|
|
77
|
-
value: VMError,
|
|
78
|
-
writable: true,
|
|
79
|
-
enumerable: false,
|
|
80
|
-
configurable: true
|
|
81
|
-
})) throw localUnexpected();
|
|
82
|
-
|
|
83
|
-
// Fixes buffer unsafe allocation
|
|
84
|
-
/* eslint-disable no-use-before-define */
|
|
85
|
-
class BufferHandler extends ReadOnlyHandler {
|
|
86
|
-
|
|
87
|
-
apply(target, thiz, args) {
|
|
88
|
-
if (args.length > 0 && typeof args[0] === 'number') {
|
|
89
|
-
return LocalBuffer.alloc(args[0]);
|
|
90
|
-
}
|
|
91
|
-
return localReflectApply(LocalBuffer.from, LocalBuffer, args);
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
construct(target, args, newTarget) {
|
|
95
|
-
if (args.length > 0 && typeof args[0] === 'number') {
|
|
96
|
-
return LocalBuffer.alloc(args[0]);
|
|
97
|
-
}
|
|
98
|
-
return localReflectApply(LocalBuffer.from, LocalBuffer, args);
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
}
|
|
102
|
-
/* eslint-enable no-use-before-define */
|
|
103
|
-
|
|
104
|
-
const LocalBuffer = fromWithFactory(obj => new BufferHandler(obj), host.Buffer);
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
if (!localReflectDefineProperty(global, 'Buffer', {
|
|
108
|
-
__proto__: null,
|
|
109
|
-
value: LocalBuffer,
|
|
110
|
-
writable: true,
|
|
111
|
-
enumerable: false,
|
|
112
|
-
configurable: true
|
|
113
|
-
})) throw localUnexpected();
|
|
114
|
-
|
|
115
|
-
addProtoMapping(LocalBuffer.prototype, host.Buffer.prototype, 'Uint8Array');
|
|
116
|
-
|
|
117
|
-
/**
|
|
118
|
-
*
|
|
119
|
-
* @param {*} size Size of new buffer
|
|
120
|
-
* @this LocalBuffer
|
|
121
|
-
* @return {LocalBuffer}
|
|
122
|
-
*/
|
|
123
|
-
function allocUnsafe(size) {
|
|
124
|
-
return LocalBuffer.alloc(size);
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
connect(allocUnsafe, host.Buffer.allocUnsafe);
|
|
128
|
-
|
|
129
|
-
/**
|
|
130
|
-
*
|
|
131
|
-
* @param {*} size Size of new buffer
|
|
132
|
-
* @this LocalBuffer
|
|
133
|
-
* @return {LocalBuffer}
|
|
134
|
-
*/
|
|
135
|
-
function allocUnsafeSlow(size) {
|
|
136
|
-
return LocalBuffer.alloc(size);
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
connect(allocUnsafeSlow, host.Buffer.allocUnsafeSlow);
|
|
140
|
-
|
|
141
|
-
/**
|
|
142
|
-
* Replacement for Buffer inspect
|
|
143
|
-
*
|
|
144
|
-
* @param {*} recurseTimes
|
|
145
|
-
* @param {*} ctx
|
|
146
|
-
* @this LocalBuffer
|
|
147
|
-
* @return {string}
|
|
148
|
-
*/
|
|
149
|
-
function inspect(recurseTimes, ctx) {
|
|
150
|
-
// Mimic old behavior, could throw but didn't pass a test.
|
|
151
|
-
const max = host.INSPECT_MAX_BYTES;
|
|
152
|
-
const actualMax = Math.min(max, this.length);
|
|
153
|
-
const remaining = this.length - max;
|
|
154
|
-
let str = this.hexSlice(0, actualMax).replace(/(.{2})/g, '$1 ').trim();
|
|
155
|
-
if (remaining > 0) str += ` ... ${remaining} more byte${remaining > 1 ? 's' : ''}`;
|
|
156
|
-
return `<${this.constructor.name} ${str}>`;
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
connect(inspect, host.Buffer.prototype.inspect);
|
|
160
|
-
|
|
161
|
-
connect(localFunction.prototype.bind, host.Function.prototype.bind);
|
|
162
|
-
|
|
163
|
-
connect(localObject.prototype.__defineGetter__, host.Object.prototype.__defineGetter__);
|
|
164
|
-
connect(localObject.prototype.__defineSetter__, host.Object.prototype.__defineSetter__);
|
|
165
|
-
connect(localObject.prototype.__lookupGetter__, host.Object.prototype.__lookupGetter__);
|
|
166
|
-
connect(localObject.prototype.__lookupSetter__, host.Object.prototype.__lookupSetter__);
|
|
167
|
-
|
|
168
|
-
/*
|
|
169
|
-
* PrepareStackTrace sanitization
|
|
170
|
-
*/
|
|
171
|
-
|
|
172
|
-
const oldPrepareStackTraceDesc = localReflectGetOwnPropertyDescriptor(LocalError, 'prepareStackTrace');
|
|
173
|
-
|
|
174
|
-
let currentPrepareStackTrace = LocalError.prepareStackTrace;
|
|
175
|
-
const wrappedPrepareStackTrace = new LocalWeakMap();
|
|
176
|
-
if (typeof currentPrepareStackTrace === 'function') {
|
|
177
|
-
wrappedPrepareStackTrace.set(currentPrepareStackTrace, currentPrepareStackTrace);
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
let OriginalCallSite;
|
|
181
|
-
LocalError.prepareStackTrace = (e, sst) => {
|
|
182
|
-
OriginalCallSite = sst[0].constructor;
|
|
183
|
-
};
|
|
184
|
-
new LocalError().stack;
|
|
185
|
-
if (typeof OriginalCallSite === 'function') {
|
|
186
|
-
LocalError.prepareStackTrace = undefined;
|
|
187
|
-
|
|
188
|
-
function makeCallSiteGetters(list) {
|
|
189
|
-
const callSiteGetters = [];
|
|
190
|
-
for (let i=0; i<list.length; i++) {
|
|
191
|
-
const name = list[i];
|
|
192
|
-
const func = OriginalCallSite.prototype[name];
|
|
193
|
-
callSiteGetters[i] = {__proto__: null,
|
|
194
|
-
name,
|
|
195
|
-
propName: '_' + name,
|
|
196
|
-
func: (thiz) => {
|
|
197
|
-
return localReflectApply(func, thiz, []);
|
|
198
|
-
}
|
|
199
|
-
};
|
|
200
|
-
}
|
|
201
|
-
return callSiteGetters;
|
|
202
|
-
}
|
|
203
|
-
|
|
204
|
-
function applyCallSiteGetters(thiz, callSite, getters) {
|
|
205
|
-
for (let i=0; i<getters.length; i++) {
|
|
206
|
-
const getter = getters[i];
|
|
207
|
-
localReflectDefineProperty(thiz, getter.propName, {
|
|
208
|
-
__proto__: null,
|
|
209
|
-
value: getter.func(callSite)
|
|
210
|
-
});
|
|
211
|
-
}
|
|
212
|
-
}
|
|
213
|
-
|
|
214
|
-
const callSiteGetters = makeCallSiteGetters([
|
|
215
|
-
'getTypeName',
|
|
216
|
-
'getFunctionName',
|
|
217
|
-
'getMethodName',
|
|
218
|
-
'getFileName',
|
|
219
|
-
'getLineNumber',
|
|
220
|
-
'getColumnNumber',
|
|
221
|
-
'getEvalOrigin',
|
|
222
|
-
'isToplevel',
|
|
223
|
-
'isEval',
|
|
224
|
-
'isNative',
|
|
225
|
-
'isConstructor',
|
|
226
|
-
'isAsync',
|
|
227
|
-
'isPromiseAll',
|
|
228
|
-
'getPromiseIndex'
|
|
229
|
-
]);
|
|
230
|
-
|
|
231
|
-
class CallSite {
|
|
232
|
-
constructor(callSite) {
|
|
233
|
-
applyCallSiteGetters(this, callSite, callSiteGetters);
|
|
234
|
-
}
|
|
235
|
-
getThis() {
|
|
236
|
-
return undefined;
|
|
237
|
-
}
|
|
238
|
-
getFunction() {
|
|
239
|
-
return undefined;
|
|
240
|
-
}
|
|
241
|
-
toString() {
|
|
242
|
-
return 'CallSite {}';
|
|
243
|
-
}
|
|
244
|
-
}
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
for (let i=0; i<callSiteGetters.length; i++) {
|
|
248
|
-
const name = callSiteGetters[i].name;
|
|
249
|
-
const funcProp = localReflectGetOwnPropertyDescriptor(OriginalCallSite.prototype, name);
|
|
250
|
-
if (!funcProp) continue;
|
|
251
|
-
const propertyName = callSiteGetters[i].propName;
|
|
252
|
-
const func = {func() {
|
|
253
|
-
return this[propertyName];
|
|
254
|
-
}}.func;
|
|
255
|
-
const nameProp = localReflectGetOwnPropertyDescriptor(func, 'name');
|
|
256
|
-
if (!nameProp) throw localUnexpected();
|
|
257
|
-
nameProp.value = name;
|
|
258
|
-
if (!localReflectDefineProperty(func, 'name', nameProp)) throw localUnexpected();
|
|
259
|
-
funcProp.value = func;
|
|
260
|
-
if (!localReflectDefineProperty(CallSite.prototype, name, funcProp)) throw localUnexpected();
|
|
261
|
-
}
|
|
262
|
-
|
|
263
|
-
if (!localReflectDefineProperty(LocalError, 'prepareStackTrace', {
|
|
264
|
-
configurable: false,
|
|
265
|
-
enumerable: false,
|
|
266
|
-
get() {
|
|
267
|
-
return currentPrepareStackTrace;
|
|
268
|
-
},
|
|
269
|
-
set(value) {
|
|
270
|
-
if (typeof(value) !== 'function') {
|
|
271
|
-
currentPrepareStackTrace = value;
|
|
272
|
-
return;
|
|
273
|
-
}
|
|
274
|
-
const wrapped = localReflectApply(localWeakMapGet, wrappedPrepareStackTrace, [value]);
|
|
275
|
-
if (wrapped) {
|
|
276
|
-
currentPrepareStackTrace = wrapped;
|
|
277
|
-
return;
|
|
278
|
-
}
|
|
279
|
-
const newWrapped = (error, sst) => {
|
|
280
|
-
const sandboxSst = ensureThis(sst);
|
|
281
|
-
if (localArrayIsArray(sst)) {
|
|
282
|
-
if (sst === sandboxSst) {
|
|
283
|
-
for (let i=0; i < sst.length; i++) {
|
|
284
|
-
const cs = sst[i];
|
|
285
|
-
if (typeof cs === 'object' && localReflectGetPrototypeOf(cs) === OriginalCallSite.prototype) {
|
|
286
|
-
sst[i] = new CallSite(cs);
|
|
287
|
-
}
|
|
288
|
-
}
|
|
289
|
-
} else {
|
|
290
|
-
sst = [];
|
|
291
|
-
for (let i=0; i < sandboxSst.length; i++) {
|
|
292
|
-
const cs = sandboxSst[i];
|
|
293
|
-
localReflectDefineProperty(sst, i, {
|
|
294
|
-
__proto__: null,
|
|
295
|
-
value: new CallSite(cs),
|
|
296
|
-
enumerable: true,
|
|
297
|
-
configurable: true,
|
|
298
|
-
writable: true
|
|
299
|
-
});
|
|
300
|
-
}
|
|
301
|
-
}
|
|
302
|
-
} else {
|
|
303
|
-
sst = sandboxSst;
|
|
304
|
-
}
|
|
305
|
-
return value(error, sst);
|
|
306
|
-
};
|
|
307
|
-
localReflectApply(localWeakMapSet, wrappedPrepareStackTrace, [value, newWrapped]);
|
|
308
|
-
localReflectApply(localWeakMapSet, wrappedPrepareStackTrace, [newWrapped, newWrapped]);
|
|
309
|
-
currentPrepareStackTrace = newWrapped;
|
|
310
|
-
}
|
|
311
|
-
})) throw localUnexpected();
|
|
312
|
-
} else if (oldPrepareStackTraceDesc) {
|
|
313
|
-
localReflectDefineProperty(LocalError, 'prepareStackTrace', oldPrepareStackTraceDesc);
|
|
314
|
-
} else {
|
|
315
|
-
localReflectDeleteProperty(LocalError, 'prepareStackTrace');
|
|
316
|
-
}
|
|
317
|
-
|
|
318
|
-
/*
|
|
319
|
-
* Exception sanitization
|
|
320
|
-
*/
|
|
321
|
-
|
|
322
|
-
const withProxy = localObjectFreeze({
|
|
323
|
-
__proto__: null,
|
|
324
|
-
has(target, key) {
|
|
325
|
-
if (key === host.INTERNAL_STATE_NAME) return false;
|
|
326
|
-
return localReflectHas(target, key);
|
|
327
|
-
}
|
|
328
|
-
});
|
|
329
|
-
|
|
330
|
-
const interanState = localObjectFreeze({
|
|
331
|
-
__proto__: null,
|
|
332
|
-
wrapWith(x) {
|
|
333
|
-
if (x === null || x === undefined) return x;
|
|
334
|
-
return new LocalProxy(localObject(x), withProxy);
|
|
335
|
-
},
|
|
336
|
-
handleException: ensureThis,
|
|
337
|
-
import(what) {
|
|
338
|
-
throw new VMError('Dynamic Import not supported');
|
|
339
|
-
}
|
|
340
|
-
});
|
|
341
|
-
|
|
342
|
-
if (!localReflectDefineProperty(global, host.INTERNAL_STATE_NAME, {
|
|
343
|
-
__proto__: null,
|
|
344
|
-
configurable: false,
|
|
345
|
-
enumerable: false,
|
|
346
|
-
writable: false,
|
|
347
|
-
value: interanState
|
|
348
|
-
})) throw localUnexpected();
|
|
349
|
-
|
|
350
|
-
/*
|
|
351
|
-
* Eval sanitization
|
|
352
|
-
*/
|
|
353
|
-
|
|
354
|
-
function throwAsync() {
|
|
355
|
-
return new VMError('Async not available');
|
|
356
|
-
}
|
|
357
|
-
|
|
358
|
-
function makeFunction(inputArgs, isAsync, isGenerator) {
|
|
359
|
-
const lastArgs = inputArgs.length - 1;
|
|
360
|
-
let code = lastArgs >= 0 ? `${inputArgs[lastArgs]}` : '';
|
|
361
|
-
let args = lastArgs > 0 ? `${inputArgs[0]}` : '';
|
|
362
|
-
for (let i = 1; i < lastArgs; i++) {
|
|
363
|
-
args += `,${inputArgs[i]}`;
|
|
364
|
-
}
|
|
365
|
-
try {
|
|
366
|
-
code = host.transformAndCheck(args, code, isAsync, isGenerator, allowAsync);
|
|
367
|
-
} catch (e) {
|
|
368
|
-
throw bridge.from(e);
|
|
369
|
-
}
|
|
370
|
-
return localEval(code);
|
|
371
|
-
}
|
|
372
|
-
|
|
373
|
-
const FunctionHandler = {
|
|
374
|
-
__proto__: null,
|
|
375
|
-
apply(target, thiz, args) {
|
|
376
|
-
return makeFunction(args, this.isAsync, this.isGenerator);
|
|
377
|
-
},
|
|
378
|
-
construct(target, args, newTarget) {
|
|
379
|
-
return makeFunction(args, this.isAsync, this.isGenerator);
|
|
380
|
-
}
|
|
381
|
-
};
|
|
382
|
-
|
|
383
|
-
const EvalHandler = {
|
|
384
|
-
__proto__: null,
|
|
385
|
-
apply(target, thiz, args) {
|
|
386
|
-
if (args.length === 0) return undefined;
|
|
387
|
-
let code = `${args[0]}`;
|
|
388
|
-
try {
|
|
389
|
-
code = host.transformAndCheck(null, code, false, false, allowAsync);
|
|
390
|
-
} catch (e) {
|
|
391
|
-
throw bridge.from(e);
|
|
392
|
-
}
|
|
393
|
-
return localEval(code);
|
|
394
|
-
}
|
|
395
|
-
};
|
|
396
|
-
|
|
397
|
-
const AsyncErrorHandler = {
|
|
398
|
-
__proto__: null,
|
|
399
|
-
apply(target, thiz, args) {
|
|
400
|
-
throw throwAsync();
|
|
401
|
-
},
|
|
402
|
-
construct(target, args, newTarget) {
|
|
403
|
-
throw throwAsync();
|
|
404
|
-
}
|
|
405
|
-
};
|
|
406
|
-
|
|
407
|
-
function makeCheckFunction(isAsync, isGenerator) {
|
|
408
|
-
if (isAsync && !allowAsync) return AsyncErrorHandler;
|
|
409
|
-
return {
|
|
410
|
-
__proto__: FunctionHandler,
|
|
411
|
-
isAsync,
|
|
412
|
-
isGenerator
|
|
413
|
-
};
|
|
414
|
-
}
|
|
415
|
-
|
|
416
|
-
function overrideWithProxy(obj, prop, value, handler) {
|
|
417
|
-
const proxy = new LocalProxy(value, handler);
|
|
418
|
-
if (!localReflectDefineProperty(obj, prop, {__proto__: null, value: proxy})) throw localUnexpected();
|
|
419
|
-
return proxy;
|
|
420
|
-
}
|
|
421
|
-
|
|
422
|
-
const proxiedFunction = overrideWithProxy(localFunction.prototype, 'constructor', localFunction, makeCheckFunction(false, false));
|
|
423
|
-
if (GeneratorFunction) {
|
|
424
|
-
if (!localReflectSetPrototypeOf(GeneratorFunction, proxiedFunction)) throw localUnexpected();
|
|
425
|
-
overrideWithProxy(GeneratorFunction.prototype, 'constructor', GeneratorFunction, makeCheckFunction(false, true));
|
|
426
|
-
}
|
|
427
|
-
if (AsyncFunction) {
|
|
428
|
-
if (!localReflectSetPrototypeOf(AsyncFunction, proxiedFunction)) throw localUnexpected();
|
|
429
|
-
overrideWithProxy(AsyncFunction.prototype, 'constructor', AsyncFunction, makeCheckFunction(true, false));
|
|
430
|
-
}
|
|
431
|
-
if (AsyncGeneratorFunction) {
|
|
432
|
-
if (!localReflectSetPrototypeOf(AsyncGeneratorFunction, proxiedFunction)) throw localUnexpected();
|
|
433
|
-
overrideWithProxy(AsyncGeneratorFunction.prototype, 'constructor', AsyncGeneratorFunction, makeCheckFunction(true, true));
|
|
434
|
-
}
|
|
435
|
-
|
|
436
|
-
function makeSafeHandlerArgs(args) {
|
|
437
|
-
const sArgs = ensureThis(args);
|
|
438
|
-
if (sArgs === args) return args;
|
|
439
|
-
const a = [];
|
|
440
|
-
for (let i=0; i < sArgs.length; i++) {
|
|
441
|
-
localReflectDefineProperty(a, i, {
|
|
442
|
-
__proto__: null,
|
|
443
|
-
value: sArgs[i],
|
|
444
|
-
enumerable: true,
|
|
445
|
-
configurable: true,
|
|
446
|
-
writable: true
|
|
447
|
-
});
|
|
448
|
-
}
|
|
449
|
-
return a;
|
|
450
|
-
}
|
|
451
|
-
|
|
452
|
-
const makeSafeArgs = Object.freeze({
|
|
453
|
-
__proto__: null,
|
|
454
|
-
apply(target, thiz, args) {
|
|
455
|
-
return localReflectApply(target, thiz, makeSafeHandlerArgs(args));
|
|
456
|
-
},
|
|
457
|
-
construct(target, args, newTarget) {
|
|
458
|
-
return localReflectConstruct(target, makeSafeHandlerArgs(args), newTarget);
|
|
459
|
-
}
|
|
460
|
-
});
|
|
461
|
-
|
|
462
|
-
const proxyHandlerHandler = Object.freeze({
|
|
463
|
-
__proto__: null,
|
|
464
|
-
get(target, name, receiver) {
|
|
465
|
-
const value = target.handler[name];
|
|
466
|
-
if (typeof value !== 'function') return value;
|
|
467
|
-
return new LocalProxy(value, makeSafeArgs);
|
|
468
|
-
}
|
|
469
|
-
});
|
|
470
|
-
|
|
471
|
-
function wrapProxyHandler(args) {
|
|
472
|
-
if (args.length < 2) return args;
|
|
473
|
-
const handler = args[1];
|
|
474
|
-
args[1] = new LocalProxy({__proto__: null, handler}, proxyHandlerHandler);
|
|
475
|
-
return args;
|
|
476
|
-
}
|
|
477
|
-
|
|
478
|
-
const proxyHandler = Object.freeze({
|
|
479
|
-
__proto__: null,
|
|
480
|
-
apply(target, thiz, args) {
|
|
481
|
-
return localReflectApply(target, thiz, wrapProxyHandler(args));
|
|
482
|
-
},
|
|
483
|
-
construct(target, args, newTarget) {
|
|
484
|
-
return localReflectConstruct(target, wrapProxyHandler(args), newTarget);
|
|
485
|
-
}
|
|
486
|
-
});
|
|
487
|
-
|
|
488
|
-
const proxiedProxy = new LocalProxy(LocalProxy, proxyHandler);
|
|
489
|
-
|
|
490
|
-
overrideWithProxy(LocalProxy, 'revocable', LocalProxy.revocable, proxyHandler);
|
|
491
|
-
|
|
492
|
-
global.Proxy = proxiedProxy;
|
|
493
|
-
global.Function = proxiedFunction;
|
|
494
|
-
global.eval = new LocalProxy(localEval, EvalHandler);
|
|
495
|
-
|
|
496
|
-
/*
|
|
497
|
-
* Promise sanitization
|
|
498
|
-
*/
|
|
499
|
-
|
|
500
|
-
if (localPromise) {
|
|
501
|
-
|
|
502
|
-
const PromisePrototype = localPromise.prototype;
|
|
503
|
-
|
|
504
|
-
if (!allowAsync) {
|
|
505
|
-
|
|
506
|
-
overrideWithProxy(PromisePrototype, 'then', PromisePrototype.then, AsyncErrorHandler);
|
|
507
|
-
// This seems not to work, and will produce
|
|
508
|
-
// UnhandledPromiseRejectionWarning: TypeError: Method Promise.prototype.then called on incompatible receiver [object Object].
|
|
509
|
-
// This is likely caused since the host.Promise.prototype.then cannot use the VM Proxy object.
|
|
510
|
-
// Contextify.connect(host.Promise.prototype.then, Promise.prototype.then);
|
|
511
|
-
|
|
512
|
-
} else {
|
|
513
|
-
|
|
514
|
-
overrideWithProxy(PromisePrototype, 'then', PromisePrototype.then, {
|
|
515
|
-
__proto__: null,
|
|
516
|
-
apply(target, thiz, args) {
|
|
517
|
-
if (args.length > 1) {
|
|
518
|
-
const onRejected = args[1];
|
|
519
|
-
if (typeof onRejected === 'function') {
|
|
520
|
-
args[1] = function wrapper(error) {
|
|
521
|
-
error = ensureThis(error);
|
|
522
|
-
return localReflectApply(onRejected, this, [error]);
|
|
523
|
-
};
|
|
524
|
-
}
|
|
525
|
-
}
|
|
526
|
-
return localReflectApply(target, thiz, args);
|
|
527
|
-
}
|
|
528
|
-
});
|
|
529
|
-
|
|
530
|
-
}
|
|
531
|
-
|
|
532
|
-
}
|
|
533
|
-
|
|
534
|
-
function readonly(other, mock) {
|
|
535
|
-
// Note: other@other(unsafe) mock@other(unsafe) returns@this(unsafe) throws@this(unsafe)
|
|
536
|
-
if (!mock) return fromWithFactory(readonlyFactory, other);
|
|
537
|
-
const tmock = from(mock);
|
|
538
|
-
return fromWithFactory(obj=>new ReadOnlyMockHandler(obj, tmock), other);
|
|
539
|
-
}
|
|
540
|
-
|
|
541
|
-
return {
|
|
542
|
-
__proto__: null,
|
|
543
|
-
readonly,
|
|
544
|
-
global
|
|
545
|
-
};
|