@nocobase/plugin-file-manager 2.0.0-alpha.9 → 2.0.0-beta.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/client/index.d.ts +1 -1
- package/dist/client/index.js +1 -1
- package/dist/client/models/DisplayPreviewFieldModel.d.ts +1 -0
- package/dist/client/models/UploadActionModel.d.ts +3 -1
- package/dist/client/schemas/storageTypes/ali-oss.d.ts +12 -0
- package/dist/client/schemas/storageTypes/common.d.ts +12 -0
- package/dist/client/schemas/storageTypes/index.d.ts +48 -0
- package/dist/client/schemas/storageTypes/local.d.ts +12 -0
- package/dist/client/schemas/storageTypes/s3.d.ts +12 -0
- package/dist/client/schemas/storageTypes/tx-cos.d.ts +12 -0
- package/dist/client/templates/file.d.ts +4 -0
- package/dist/common/collections/storages.d.ts +11 -0
- package/dist/common/collections/storages.js +6 -0
- package/dist/externalVersion.js +8 -8
- package/dist/locale/de-DE.json +42 -29
- package/dist/locale/en-US.json +43 -30
- package/dist/locale/es-ES.json +54 -0
- package/dist/locale/fr-FR.json +45 -12
- package/dist/locale/hu-HU.json +48 -0
- package/dist/locale/id-ID.json +48 -0
- package/dist/locale/it-IT.json +43 -28
- package/dist/locale/ja-JP.json +43 -30
- package/dist/locale/ko-KR.json +46 -24
- package/dist/locale/nl-NL.json +53 -39
- package/dist/locale/pt-BR.json +54 -0
- package/dist/locale/ru-RU.json +47 -11
- package/dist/locale/tr-TR.json +47 -10
- package/dist/locale/uk-UA.json +54 -0
- package/dist/locale/vi-VN.json +48 -0
- package/dist/locale/zh-CN.json +41 -31
- package/dist/locale/zh-TW.json +54 -0
- package/dist/node_modules/@aws-sdk/client-s3/package.json +1 -1
- package/dist/node_modules/@aws-sdk/lib-storage/LICENSE +201 -0
- package/dist/node_modules/{multer-s3 → @aws-sdk/lib-storage/dist-cjs}/index.js +574 -6229
- package/dist/node_modules/@aws-sdk/lib-storage/dist-cjs/runtimeConfig.browser.js +8 -0
- package/dist/node_modules/@aws-sdk/lib-storage/dist-cjs/runtimeConfig.js +10 -0
- package/dist/node_modules/@aws-sdk/lib-storage/dist-cjs/runtimeConfig.native.js +8 -0
- package/dist/node_modules/@aws-sdk/lib-storage/dist-cjs/runtimeConfig.shared.js +6 -0
- package/dist/node_modules/@aws-sdk/lib-storage/dist-es/Upload.js +304 -0
- package/dist/node_modules/@aws-sdk/lib-storage/dist-es/bytelength.js +27 -0
- package/dist/node_modules/@aws-sdk/lib-storage/dist-es/chunker.js +24 -0
- package/dist/node_modules/@aws-sdk/lib-storage/dist-es/chunks/getChunkStream.js +24 -0
- package/dist/node_modules/@aws-sdk/lib-storage/dist-es/chunks/getChunkUint8Array.js +19 -0
- package/dist/node_modules/@aws-sdk/lib-storage/dist-es/chunks/getDataReadable.js +11 -0
- package/dist/node_modules/@aws-sdk/lib-storage/dist-es/chunks/getDataReadableStream.js +24 -0
- package/dist/node_modules/@aws-sdk/lib-storage/dist-es/index.js +2 -0
- package/dist/node_modules/@aws-sdk/lib-storage/dist-es/runtimeConfig.browser.js +5 -0
- package/dist/node_modules/@aws-sdk/lib-storage/dist-es/runtimeConfig.js +7 -0
- package/dist/node_modules/@aws-sdk/lib-storage/dist-es/runtimeConfig.native.js +5 -0
- package/dist/node_modules/@aws-sdk/lib-storage/dist-es/runtimeConfig.shared.js +3 -0
- package/dist/node_modules/@aws-sdk/lib-storage/dist-es/types.js +1 -0
- package/dist/node_modules/@aws-sdk/lib-storage/dist-types/Upload.d.ts +59 -0
- package/dist/node_modules/@aws-sdk/lib-storage/dist-types/bytelength.d.ts +1 -0
- package/dist/node_modules/@aws-sdk/lib-storage/dist-types/chunker.d.ts +3 -0
- package/dist/node_modules/@aws-sdk/lib-storage/dist-types/chunks/getChunkStream.d.ts +2 -0
- package/dist/node_modules/@aws-sdk/lib-storage/dist-types/chunks/getChunkUint8Array.d.ts +2 -0
- package/dist/node_modules/@aws-sdk/lib-storage/dist-types/chunks/getDataReadable.d.ts +3 -0
- package/dist/node_modules/@aws-sdk/lib-storage/dist-types/chunks/getDataReadableStream.d.ts +1 -0
- package/dist/node_modules/@aws-sdk/lib-storage/dist-types/index.d.ts +2 -0
- package/dist/node_modules/@aws-sdk/lib-storage/dist-types/runtimeConfig.browser.d.ts +7 -0
- package/dist/node_modules/@aws-sdk/lib-storage/dist-types/runtimeConfig.d.ts +8 -0
- package/dist/node_modules/@aws-sdk/lib-storage/dist-types/runtimeConfig.native.d.ts +7 -0
- package/dist/node_modules/@aws-sdk/lib-storage/dist-types/runtimeConfig.shared.d.ts +6 -0
- package/dist/node_modules/@aws-sdk/lib-storage/dist-types/ts3.4/Upload.d.ts +43 -0
- package/dist/node_modules/@aws-sdk/lib-storage/dist-types/ts3.4/bytelength.d.ts +1 -0
- package/dist/node_modules/@aws-sdk/lib-storage/dist-types/ts3.4/chunker.d.ts +6 -0
- package/dist/node_modules/@aws-sdk/lib-storage/dist-types/ts3.4/chunks/getChunkStream.d.ts +6 -0
- package/dist/node_modules/@aws-sdk/lib-storage/dist-types/ts3.4/chunks/getChunkUint8Array.d.ts +5 -0
- package/dist/node_modules/@aws-sdk/lib-storage/dist-types/ts3.4/chunks/getDataReadable.d.ts +4 -0
- package/dist/node_modules/@aws-sdk/lib-storage/dist-types/ts3.4/chunks/getDataReadableStream.d.ts +3 -0
- package/dist/node_modules/@aws-sdk/lib-storage/dist-types/ts3.4/index.d.ts +2 -0
- package/dist/node_modules/@aws-sdk/lib-storage/dist-types/ts3.4/runtimeConfig.browser.d.ts +4 -0
- package/dist/node_modules/@aws-sdk/lib-storage/dist-types/ts3.4/runtimeConfig.d.ts +4 -0
- package/dist/node_modules/@aws-sdk/lib-storage/dist-types/ts3.4/runtimeConfig.native.d.ts +4 -0
- package/dist/node_modules/@aws-sdk/lib-storage/dist-types/ts3.4/runtimeConfig.shared.d.ts +3 -0
- package/dist/node_modules/@aws-sdk/lib-storage/dist-types/ts3.4/types.d.ts +22 -0
- package/dist/node_modules/@aws-sdk/lib-storage/dist-types/types.d.ts +51 -0
- package/dist/node_modules/@aws-sdk/lib-storage/package.json +1 -0
- package/dist/node_modules/{multer-s3 → ali-oss}/LICENSE +1 -2
- package/dist/node_modules/ali-oss/dist/aliyun-oss-sdk.js +44018 -0
- package/dist/node_modules/ali-oss/dist/aliyun-oss-sdk.min.js +4 -0
- package/dist/node_modules/ali-oss/lib/browser/bucket.js +296 -0
- package/dist/node_modules/ali-oss/lib/browser/client.js +452 -0
- package/dist/node_modules/ali-oss/lib/browser/managed-upload.js +360 -0
- package/dist/node_modules/ali-oss/lib/browser/object.js +385 -0
- package/dist/node_modules/ali-oss/lib/browser/version.js +1 -0
- package/dist/node_modules/ali-oss/lib/browser.js +6 -0
- package/dist/node_modules/ali-oss/lib/bucket.js +337 -0
- package/dist/node_modules/{multer-aliyun-oss/index.js → ali-oss/lib/client.js} +2 -2
- package/dist/node_modules/ali-oss/lib/cluster.js +228 -0
- package/dist/node_modules/ali-oss/lib/common/bucket/abortBucketWorm.d.ts +4 -0
- package/dist/node_modules/ali-oss/lib/common/bucket/abortBucketWorm.js +14 -0
- package/dist/node_modules/ali-oss/lib/common/bucket/abortBucketWorm.ts +12 -0
- package/dist/node_modules/ali-oss/lib/common/bucket/completeBucketWorm.d.ts +4 -0
- package/dist/node_modules/ali-oss/lib/common/bucket/completeBucketWorm.js +14 -0
- package/dist/node_modules/ali-oss/lib/common/bucket/completeBucketWorm.ts +12 -0
- package/dist/node_modules/ali-oss/lib/common/bucket/deleteBucketEncryption.js +20 -0
- package/dist/node_modules/ali-oss/lib/common/bucket/deleteBucketInventory.d.ts +10 -0
- package/dist/node_modules/ali-oss/lib/common/bucket/deleteBucketInventory.js +22 -0
- package/dist/node_modules/ali-oss/lib/common/bucket/deleteBucketInventory.ts +21 -0
- package/dist/node_modules/ali-oss/lib/common/bucket/deleteBucketLifecycle.js +13 -0
- package/dist/node_modules/ali-oss/lib/common/bucket/deleteBucketPolicy.js +21 -0
- package/dist/node_modules/ali-oss/lib/common/bucket/deleteBucketTags.js +21 -0
- package/dist/node_modules/ali-oss/lib/common/bucket/deleteBucketWebsite.js +13 -0
- package/dist/node_modules/ali-oss/lib/common/bucket/extendBucketWorm.d.ts +4 -0
- package/dist/node_modules/ali-oss/lib/common/bucket/extendBucketWorm.js +23 -0
- package/dist/node_modules/ali-oss/lib/common/bucket/extendBucketWorm.ts +21 -0
- package/dist/node_modules/ali-oss/lib/common/bucket/getBucketEncryption.js +21 -0
- package/dist/node_modules/ali-oss/lib/common/bucket/getBucketInventory.d.ts +11 -0
- package/dist/node_modules/ali-oss/lib/common/bucket/getBucketInventory.js +25 -0
- package/dist/node_modules/ali-oss/lib/common/bucket/getBucketInventory.ts +24 -0
- package/dist/node_modules/ali-oss/lib/common/bucket/getBucketLifecycle.js +33 -0
- package/dist/node_modules/ali-oss/lib/common/bucket/getBucketPolicy.js +28 -0
- package/dist/node_modules/ali-oss/lib/common/bucket/getBucketRequestPayment.js +25 -0
- package/dist/node_modules/ali-oss/lib/common/bucket/getBucketStat.d.ts +23 -0
- package/dist/node_modules/ali-oss/lib/common/bucket/getBucketStat.js +17 -0
- package/dist/node_modules/ali-oss/lib/common/bucket/getBucketStat.ts +34 -0
- package/dist/node_modules/ali-oss/lib/common/bucket/getBucketTags.js +23 -0
- package/dist/node_modules/ali-oss/lib/common/bucket/getBucketVersioning.js +22 -0
- package/dist/node_modules/ali-oss/lib/common/bucket/getBucketWebsite.js +28 -0
- package/dist/node_modules/ali-oss/lib/common/bucket/getBucketWorm.d.ts +1 -0
- package/dist/node_modules/ali-oss/lib/common/bucket/getBucketWorm.js +20 -0
- package/dist/node_modules/ali-oss/lib/common/bucket/getBucketWorm.ts +22 -0
- package/dist/node_modules/ali-oss/lib/common/bucket/index.js +34 -0
- package/dist/node_modules/ali-oss/lib/common/bucket/initiateBucketWorm.d.ts +5 -0
- package/dist/node_modules/ali-oss/lib/common/bucket/initiateBucketWorm.js +24 -0
- package/dist/node_modules/ali-oss/lib/common/bucket/initiateBucketWorm.ts +23 -0
- package/dist/node_modules/ali-oss/lib/common/bucket/listBucketInventory.d.ts +13 -0
- package/dist/node_modules/ali-oss/lib/common/bucket/listBucketInventory.js +29 -0
- package/dist/node_modules/ali-oss/lib/common/bucket/listBucketInventory.ts +32 -0
- package/dist/node_modules/ali-oss/lib/common/bucket/putBucket.js +31 -0
- package/dist/node_modules/ali-oss/lib/common/bucket/putBucketEncryption.js +36 -0
- package/dist/node_modules/ali-oss/lib/common/bucket/putBucketInventory.d.ts +36 -0
- package/dist/node_modules/ali-oss/lib/common/bucket/putBucketInventory.js +58 -0
- package/dist/node_modules/ali-oss/lib/common/bucket/putBucketInventory.ts +84 -0
- package/dist/node_modules/ali-oss/lib/common/bucket/putBucketLifecycle.js +127 -0
- package/dist/node_modules/ali-oss/lib/common/bucket/putBucketPolicy.js +27 -0
- package/dist/node_modules/ali-oss/lib/common/bucket/putBucketRequestPayment.js +40 -0
- package/dist/node_modules/ali-oss/lib/common/bucket/putBucketTags.js +39 -0
- package/dist/node_modules/ali-oss/lib/common/bucket/putBucketVersioning.js +35 -0
- package/dist/node_modules/ali-oss/lib/common/bucket/putBucketWebsite.js +50 -0
- package/dist/node_modules/ali-oss/lib/common/callback.js +27 -0
- package/dist/node_modules/ali-oss/lib/common/client/getReqUrl.d.ts +1 -0
- package/dist/node_modules/ali-oss/lib/common/client/getReqUrl.js +52 -0
- package/dist/node_modules/ali-oss/lib/common/client/getReqUrl.ts +51 -0
- package/dist/node_modules/ali-oss/lib/common/client/initOptions.js +72 -0
- package/dist/node_modules/ali-oss/lib/common/image/index.js +5 -0
- package/dist/node_modules/ali-oss/lib/common/image/processObjectSave.js +45 -0
- package/dist/node_modules/ali-oss/lib/common/multipart-copy.js +240 -0
- package/dist/node_modules/ali-oss/lib/common/multipart.js +271 -0
- package/dist/node_modules/ali-oss/lib/common/object/asyncSignatureUrl.js +57 -0
- package/dist/node_modules/ali-oss/lib/common/object/calculatePostSignature.js +35 -0
- package/dist/node_modules/ali-oss/lib/common/object/copyObject.js +74 -0
- package/dist/node_modules/ali-oss/lib/common/object/delete.js +22 -0
- package/dist/node_modules/ali-oss/lib/common/object/deleteMulti.js +57 -0
- package/dist/node_modules/ali-oss/lib/common/object/deleteObjectTagging.js +22 -0
- package/dist/node_modules/ali-oss/lib/common/object/generateObjectUrl.js +28 -0
- package/dist/node_modules/ali-oss/lib/common/object/get.js +64 -0
- package/dist/node_modules/ali-oss/lib/common/object/getACL.js +30 -0
- package/dist/node_modules/ali-oss/lib/common/object/getAsyncFetch.d.ts +1 -0
- package/dist/node_modules/ali-oss/lib/common/object/getAsyncFetch.js +26 -0
- package/dist/node_modules/ali-oss/lib/common/object/getAsyncFetch.ts +25 -0
- package/dist/node_modules/ali-oss/lib/common/object/getBucketVersions.js +98 -0
- package/dist/node_modules/ali-oss/lib/common/object/getObjectMeta.js +23 -0
- package/dist/node_modules/ali-oss/lib/common/object/getObjectTagging.js +34 -0
- package/dist/node_modules/ali-oss/lib/common/object/getObjectUrl.js +21 -0
- package/dist/node_modules/ali-oss/lib/common/object/getSymlink.js +23 -0
- package/dist/node_modules/ali-oss/lib/common/object/head.js +40 -0
- package/dist/node_modules/ali-oss/lib/common/object/index.js +26 -0
- package/dist/node_modules/ali-oss/lib/common/object/postAsyncFetch.d.ts +1 -0
- package/dist/node_modules/ali-oss/lib/common/object/postAsyncFetch.js +44 -0
- package/dist/node_modules/ali-oss/lib/common/object/postAsyncFetch.ts +46 -0
- package/dist/node_modules/ali-oss/lib/common/object/putACL.js +27 -0
- package/dist/node_modules/ali-oss/lib/common/object/putObjectTagging.js +43 -0
- package/dist/node_modules/ali-oss/lib/common/object/putSymlink.js +33 -0
- package/dist/node_modules/ali-oss/lib/common/object/signatureUrl.js +52 -0
- package/dist/node_modules/ali-oss/lib/common/object/signatureUrlV4.js +70 -0
- package/dist/node_modules/ali-oss/lib/common/parallel.js +177 -0
- package/dist/node_modules/ali-oss/lib/common/signUtils.js +355 -0
- package/dist/node_modules/ali-oss/lib/common/utils/checkBucketName.d.ts +1 -0
- package/dist/node_modules/ali-oss/lib/common/utils/checkBucketName.js +9 -0
- package/dist/node_modules/ali-oss/lib/common/utils/checkBucketName.ts +6 -0
- package/dist/node_modules/ali-oss/lib/common/utils/checkBucketNameTest.d.ts +1 -0
- package/dist/node_modules/ali-oss/lib/common/utils/checkBucketNameTest.js +14 -0
- package/dist/node_modules/ali-oss/lib/common/utils/checkBucketNameTest.ts +12 -0
- package/dist/node_modules/ali-oss/lib/common/utils/checkBucketTag.d.ts +1 -0
- package/dist/node_modules/ali-oss/lib/common/utils/checkBucketTag.js +49 -0
- package/dist/node_modules/ali-oss/lib/common/utils/checkBucketTag.ts +52 -0
- package/dist/node_modules/ali-oss/lib/common/utils/checkConfigValid.d.ts +1 -0
- package/dist/node_modules/ali-oss/lib/common/utils/checkConfigValid.js +30 -0
- package/dist/node_modules/ali-oss/lib/common/utils/checkConfigValid.ts +27 -0
- package/dist/node_modules/ali-oss/lib/common/utils/checkEnv.d.ts +1 -0
- package/dist/node_modules/ali-oss/lib/common/utils/checkEnv.js +9 -0
- package/dist/node_modules/ali-oss/lib/common/utils/checkEnv.ts +5 -0
- package/dist/node_modules/ali-oss/lib/common/utils/checkObjectTag.d.ts +1 -0
- package/dist/node_modules/ali-oss/lib/common/utils/checkObjectTag.js +50 -0
- package/dist/node_modules/ali-oss/lib/common/utils/checkObjectTag.ts +53 -0
- package/dist/node_modules/ali-oss/lib/common/utils/checkUserAgent.d.ts +1 -0
- package/dist/node_modules/ali-oss/lib/common/utils/checkUserAgent.js +7 -0
- package/dist/node_modules/ali-oss/lib/common/utils/checkUserAgent.ts +4 -0
- package/dist/node_modules/ali-oss/lib/common/utils/checkValid.d.ts +1 -0
- package/dist/node_modules/ali-oss/lib/common/utils/checkValid.js +14 -0
- package/dist/node_modules/ali-oss/lib/common/utils/checkValid.ts +9 -0
- package/dist/node_modules/ali-oss/lib/common/utils/createRequest.d.ts +8 -0
- package/dist/node_modules/ali-oss/lib/common/utils/createRequest.js +139 -0
- package/dist/node_modules/ali-oss/lib/common/utils/createRequest.ts +169 -0
- package/dist/node_modules/ali-oss/lib/common/utils/dataFix.d.ts +12 -0
- package/dist/node_modules/ali-oss/lib/common/utils/dataFix.js +63 -0
- package/dist/node_modules/ali-oss/lib/common/utils/dataFix.ts +78 -0
- package/dist/node_modules/ali-oss/lib/common/utils/deepCopy.d.ts +2 -0
- package/dist/node_modules/ali-oss/lib/common/utils/deepCopy.js +41 -0
- package/dist/node_modules/ali-oss/lib/common/utils/deepCopy.ts +47 -0
- package/dist/node_modules/ali-oss/lib/common/utils/encodeString.d.ts +1 -0
- package/dist/node_modules/ali-oss/lib/common/utils/encodeString.js +12 -0
- package/dist/node_modules/ali-oss/lib/common/utils/encodeString.ts +7 -0
- package/dist/node_modules/ali-oss/lib/common/utils/encoder.d.ts +2 -0
- package/dist/node_modules/ali-oss/lib/common/utils/encoder.js +9 -0
- package/dist/node_modules/ali-oss/lib/common/utils/encoder.ts +6 -0
- package/dist/node_modules/ali-oss/lib/common/utils/formatInventoryConfig.d.ts +1 -0
- package/dist/node_modules/ali-oss/lib/common/utils/formatInventoryConfig.js +45 -0
- package/dist/node_modules/ali-oss/lib/common/utils/formatInventoryConfig.ts +41 -0
- package/dist/node_modules/ali-oss/lib/common/utils/formatObjKey.d.ts +6 -0
- package/dist/node_modules/ali-oss/lib/common/utils/formatObjKey.js +34 -0
- package/dist/node_modules/ali-oss/lib/common/utils/formatObjKey.ts +35 -0
- package/dist/node_modules/ali-oss/lib/common/utils/formatTag.d.ts +1 -0
- package/dist/node_modules/ali-oss/lib/common/utils/formatTag.js +22 -0
- package/dist/node_modules/ali-oss/lib/common/utils/formatTag.ts +20 -0
- package/dist/node_modules/ali-oss/lib/common/utils/getStandardRegion.d.ts +1 -0
- package/dist/node_modules/ali-oss/lib/common/utils/getStandardRegion.js +7 -0
- package/dist/node_modules/ali-oss/lib/common/utils/getStandardRegion.ts +3 -0
- package/dist/node_modules/ali-oss/lib/common/utils/getStrBytesCount.d.ts +1 -0
- package/dist/node_modules/ali-oss/lib/common/utils/getStrBytesCount.js +17 -0
- package/dist/node_modules/ali-oss/lib/common/utils/getStrBytesCount.ts +12 -0
- package/dist/node_modules/ali-oss/lib/common/utils/getUserAgent.d.ts +1 -0
- package/dist/node_modules/ali-oss/lib/common/utils/getUserAgent.js +18 -0
- package/dist/node_modules/ali-oss/lib/common/utils/getUserAgent.ts +14 -0
- package/dist/node_modules/ali-oss/lib/common/utils/isArray.d.ts +1 -0
- package/dist/node_modules/ali-oss/lib/common/utils/isArray.js +6 -0
- package/dist/node_modules/ali-oss/lib/common/utils/isArray.ts +3 -0
- package/dist/node_modules/ali-oss/lib/common/utils/isBlob.d.ts +1 -0
- package/dist/node_modules/ali-oss/lib/common/utils/isBlob.js +7 -0
- package/dist/node_modules/ali-oss/lib/common/utils/isBlob.ts +3 -0
- package/dist/node_modules/ali-oss/lib/common/utils/isBuffer.d.ts +1 -0
- package/dist/node_modules/ali-oss/lib/common/utils/isBuffer.js +7 -0
- package/dist/node_modules/ali-oss/lib/common/utils/isBuffer.ts +3 -0
- package/dist/node_modules/ali-oss/lib/common/utils/isDingTalk.d.ts +1 -0
- package/dist/node_modules/ali-oss/lib/common/utils/isDingTalk.js +10 -0
- package/dist/node_modules/ali-oss/lib/common/utils/isDingTalk.ts +6 -0
- package/dist/node_modules/ali-oss/lib/common/utils/isFile.d.ts +1 -0
- package/dist/node_modules/ali-oss/lib/common/utils/isFile.js +6 -0
- package/dist/node_modules/ali-oss/lib/common/utils/isFile.ts +3 -0
- package/dist/node_modules/ali-oss/lib/common/utils/isFunction.d.ts +1 -0
- package/dist/node_modules/ali-oss/lib/common/utils/isFunction.js +6 -0
- package/dist/node_modules/ali-oss/lib/common/utils/isFunction.ts +3 -0
- package/dist/node_modules/ali-oss/lib/common/utils/isIP.d.ts +6 -0
- package/dist/node_modules/ali-oss/lib/common/utils/isIP.js +14 -0
- package/dist/node_modules/ali-oss/lib/common/utils/isIP.ts +12 -0
- package/dist/node_modules/ali-oss/lib/common/utils/isObject.d.ts +1 -0
- package/dist/node_modules/ali-oss/lib/common/utils/isObject.js +6 -0
- package/dist/node_modules/ali-oss/lib/common/utils/isObject.ts +3 -0
- package/dist/node_modules/ali-oss/lib/common/utils/lowercaseKeyHeader.d.ts +1 -0
- package/dist/node_modules/ali-oss/lib/common/utils/lowercaseKeyHeader.js +14 -0
- package/dist/node_modules/ali-oss/lib/common/utils/lowercaseKeyHeader.ts +11 -0
- package/dist/node_modules/ali-oss/lib/common/utils/obj2xml.d.ts +1 -0
- package/dist/node_modules/ali-oss/lib/common/utils/obj2xml.js +43 -0
- package/dist/node_modules/ali-oss/lib/common/utils/obj2xml.ts +37 -0
- package/dist/node_modules/ali-oss/lib/common/utils/omit.d.ts +1 -0
- package/dist/node_modules/ali-oss/lib/common/utils/omit.js +11 -0
- package/dist/node_modules/ali-oss/lib/common/utils/omit.ts +9 -0
- package/dist/node_modules/ali-oss/lib/common/utils/policy2Str.d.ts +1 -0
- package/dist/node_modules/ali-oss/lib/common/utils/policy2Str.js +21 -0
- package/dist/node_modules/ali-oss/lib/common/utils/policy2Str.ts +15 -0
- package/dist/node_modules/ali-oss/lib/common/utils/retry.d.ts +1 -0
- package/dist/node_modules/ali-oss/lib/common/utils/retry.js +30 -0
- package/dist/node_modules/ali-oss/lib/common/utils/retry.ts +26 -0
- package/dist/node_modules/ali-oss/lib/common/utils/setRegion.d.ts +3 -0
- package/dist/node_modules/ali-oss/lib/common/utils/setRegion.js +20 -0
- package/dist/node_modules/ali-oss/lib/common/utils/setRegion.ts +15 -0
- package/dist/node_modules/ali-oss/lib/common/utils/setSTSToken.d.ts +2 -0
- package/dist/node_modules/ali-oss/lib/common/utils/setSTSToken.js +36 -0
- package/dist/node_modules/ali-oss/lib/common/utils/setSTSToken.ts +32 -0
- package/dist/node_modules/ali-oss/lib/global.d.ts +6 -0
- package/dist/node_modules/ali-oss/lib/image.js +146 -0
- package/dist/node_modules/ali-oss/lib/managed-upload.js +380 -0
- package/dist/node_modules/ali-oss/lib/object.js +420 -0
- package/dist/node_modules/ali-oss/lib/rtmp.js +295 -0
- package/dist/node_modules/ali-oss/lib/setConfig.d.ts +3 -0
- package/dist/node_modules/ali-oss/lib/setConfig.js +42 -0
- package/dist/node_modules/ali-oss/lib/setConfig.ts +52 -0
- package/dist/node_modules/ali-oss/lib/sts.js +156 -0
- package/dist/node_modules/ali-oss/lib/types/experimental.d.ts +1 -0
- package/dist/node_modules/ali-oss/lib/types/experimental.js +2 -0
- package/dist/node_modules/ali-oss/lib/types/experimental.ts +1 -0
- package/dist/node_modules/ali-oss/node_modules/bowser/.editorconfig +17 -0
- package/dist/node_modules/ali-oss/node_modules/bowser/.idea/.name +1 -0
- package/dist/node_modules/ali-oss/node_modules/bowser/.idea/bowser.iml +8 -0
- package/dist/node_modules/ali-oss/node_modules/bowser/.idea/encodings.xml +6 -0
- package/dist/node_modules/ali-oss/node_modules/bowser/.idea/inspectionProfiles/Project_Default.xml +6 -0
- package/dist/node_modules/ali-oss/node_modules/bowser/.idea/jsLibraryMappings.xml +8 -0
- package/dist/node_modules/ali-oss/node_modules/bowser/.idea/markdown-exported-files.xml +8 -0
- package/dist/node_modules/ali-oss/node_modules/bowser/.idea/markdown-navigator/profiles_settings.xml +3 -0
- package/dist/node_modules/ali-oss/node_modules/bowser/.idea/markdown-navigator.xml +67 -0
- package/dist/node_modules/ali-oss/node_modules/bowser/.idea/misc.xml +6 -0
- package/dist/node_modules/ali-oss/node_modules/bowser/.idea/modules.xml +8 -0
- package/dist/node_modules/ali-oss/node_modules/bowser/.idea/vcs.xml +6 -0
- package/dist/node_modules/ali-oss/node_modules/bowser/.idea/watcherTasks.xml +4 -0
- package/dist/node_modules/ali-oss/node_modules/bowser/.idea/workspace.xml +696 -0
- package/dist/node_modules/ali-oss/node_modules/bowser/.travis.yml +8 -0
- package/dist/node_modules/ali-oss/node_modules/bowser/bower.json +33 -0
- package/dist/node_modules/ali-oss/node_modules/bowser/bowser.js +644 -0
- package/dist/node_modules/ali-oss/node_modules/bowser/bowser.min.js +6 -0
- package/dist/node_modules/ali-oss/node_modules/bowser/package.json +38 -0
- package/dist/node_modules/ali-oss/node_modules/bowser/src/bowser.js +644 -0
- package/dist/node_modules/ali-oss/node_modules/bowser/test/test.js +151 -0
- package/dist/node_modules/ali-oss/node_modules/bowser/typings.d.ts +115 -0
- package/dist/node_modules/ali-oss/node_modules/dateformat/.vs/ProjectSettings.json +3 -0
- package/dist/node_modules/ali-oss/node_modules/dateformat/.vs/config/applicationhost.config +1031 -0
- package/dist/node_modules/ali-oss/node_modules/dateformat/.vs/node-dateformat/v15/.suo +0 -0
- package/dist/node_modules/ali-oss/node_modules/dateformat/.vs/slnx.sqlite +0 -0
- package/dist/node_modules/ali-oss/node_modules/dateformat/lib/dateformat.js +226 -0
- package/dist/node_modules/ali-oss/node_modules/dateformat/package.json +30 -0
- package/dist/node_modules/ali-oss/node_modules/mime/Mime.js +97 -0
- package/dist/node_modules/ali-oss/node_modules/mime/cli.js +46 -0
- package/dist/node_modules/ali-oss/node_modules/mime/index.js +4 -0
- package/dist/node_modules/ali-oss/node_modules/mime/lite.js +4 -0
- package/dist/node_modules/ali-oss/node_modules/mime/package.json +52 -0
- package/dist/node_modules/ali-oss/node_modules/mime/types/other.js +1 -0
- package/dist/node_modules/ali-oss/node_modules/mime/types/standard.js +1 -0
- package/dist/node_modules/ali-oss/package.json +1 -0
- package/dist/node_modules/ali-oss/shims/crypto/crypto.js +98 -0
- package/dist/node_modules/ali-oss/shims/crypto/helpers.js +36 -0
- package/dist/node_modules/ali-oss/shims/crypto/md5.js +152 -0
- package/dist/node_modules/ali-oss/shims/crypto/sha.js +91 -0
- package/dist/node_modules/ali-oss/shims/crypto/sha256.js +163 -0
- package/dist/node_modules/ali-oss/shims/debug.js +3 -0
- package/dist/node_modules/ali-oss/shims/is-type-of.js +18 -0
- package/dist/node_modules/ali-oss/shims/process.js +35 -0
- package/dist/node_modules/ali-oss/shims/stream-http/index.js +82 -0
- package/dist/node_modules/ali-oss/shims/stream-http/lib/capability.js +72 -0
- package/dist/node_modules/ali-oss/shims/stream-http/lib/request.js +320 -0
- package/dist/node_modules/ali-oss/shims/stream-http/lib/response.js +217 -0
- package/dist/node_modules/ali-oss/shims/url/index.js +696 -0
- package/dist/node_modules/ali-oss/shims/url/util.js +16 -0
- package/dist/node_modules/ali-oss/shims/utility.js +25 -0
- package/dist/node_modules/ali-oss/shims/xhr.js +798 -0
- package/dist/node_modules/mime-match/package.json +1 -1
- package/dist/node_modules/mime-types/package.json +1 -1
- package/dist/node_modules/mkdirp/package.json +1 -1
- package/dist/node_modules/multer-cos/package.json +1 -1
- package/dist/node_modules/url-join/package.json +1 -1
- package/dist/server/actions/storages.js +4 -6
- package/dist/server/server.js +1 -0
- package/dist/server/storages/ali-oss.d.ts +15 -1
- package/dist/server/storages/ali-oss.js +66 -2
- package/dist/server/storages/index.d.ts +1 -0
- package/dist/server/storages/local.js +1 -1
- package/dist/server/storages/s3.d.ts +10 -3
- package/dist/server/storages/s3.js +121 -29
- package/dist/server/storages/tx-cos.js +1 -1
- package/dist/server/utils.d.ts +1 -0
- package/dist/server/utils.js +43 -0
- package/package.json +7 -3
- package/dist/node_modules/multer-aliyun-oss/package.json +0 -1
- package/dist/node_modules/multer-s3/.gitattributes +0 -1
- package/dist/node_modules/multer-s3/.travis.yml +0 -6
- package/dist/node_modules/multer-s3/package.json +0 -1
- package/dist/node_modules/multer-s3/test/basic.js +0 -293
- package/dist/node_modules/multer-s3/test/files/a.txt +0 -1
- package/dist/node_modules/multer-s3/test/files/test.svg +0 -3
- package/dist/node_modules/multer-s3/test/files/test2.svg +0 -9
- package/dist/node_modules/multer-s3/test/util/mock-s3.js +0 -17
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
interface bucketStatRes {
|
|
2
|
+
Storage: string;
|
|
3
|
+
ObjectCount: string;
|
|
4
|
+
MultipartUploadCount: string;
|
|
5
|
+
LiveChannelCount: string;
|
|
6
|
+
LastModifiedTime: string;
|
|
7
|
+
StandardStorage: string;
|
|
8
|
+
StandardObjectCount: string;
|
|
9
|
+
InfrequentAccessStorage: string;
|
|
10
|
+
InfrequentAccessRealStorage: string;
|
|
11
|
+
InfrequentAccessObjectCount: string;
|
|
12
|
+
ArchiveStorage: string;
|
|
13
|
+
ArchiveRealStorage: string;
|
|
14
|
+
ArchiveObjectCount: string;
|
|
15
|
+
ColdArchiveStorage: string;
|
|
16
|
+
ColdArchiveRealStorage: string;
|
|
17
|
+
ColdArchiveObjectCount: string;
|
|
18
|
+
}
|
|
19
|
+
export declare function getBucketStat(this: any, name: string, options: {}): Promise<{
|
|
20
|
+
res: any;
|
|
21
|
+
stat: bucketStatRes;
|
|
22
|
+
}>;
|
|
23
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getBucketStat = void 0;
|
|
4
|
+
const checkBucketName_1 = require("../utils/checkBucketName");
|
|
5
|
+
async function getBucketStat(name, options) {
|
|
6
|
+
name = name || this.options.bucket;
|
|
7
|
+
checkBucketName_1.checkBucketName(name);
|
|
8
|
+
const params = this._bucketRequestParams('GET', name, 'stat', options);
|
|
9
|
+
params.successStatuses = [200];
|
|
10
|
+
params.xmlResponse = true;
|
|
11
|
+
const result = await this.request(params);
|
|
12
|
+
return {
|
|
13
|
+
res: result.res,
|
|
14
|
+
stat: result.data
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
exports.getBucketStat = getBucketStat;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { checkBucketName } from '../utils/checkBucketName';
|
|
2
|
+
|
|
3
|
+
interface bucketStatRes {
|
|
4
|
+
Storage: string;
|
|
5
|
+
ObjectCount: string;
|
|
6
|
+
MultipartUploadCount: string;
|
|
7
|
+
LiveChannelCount: string;
|
|
8
|
+
LastModifiedTime: string;
|
|
9
|
+
StandardStorage: string;
|
|
10
|
+
StandardObjectCount: string;
|
|
11
|
+
InfrequentAccessStorage: string;
|
|
12
|
+
InfrequentAccessRealStorage: string;
|
|
13
|
+
InfrequentAccessObjectCount: string;
|
|
14
|
+
ArchiveStorage: string;
|
|
15
|
+
ArchiveRealStorage: string;
|
|
16
|
+
ArchiveObjectCount: string;
|
|
17
|
+
ColdArchiveStorage: string;
|
|
18
|
+
ColdArchiveRealStorage: string;
|
|
19
|
+
ColdArchiveObjectCount: string;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export async function getBucketStat(this: any, name: string, options: {}): Promise<{ res: any; stat: bucketStatRes }> {
|
|
23
|
+
name = name || this.options.bucket;
|
|
24
|
+
checkBucketName(name);
|
|
25
|
+
const params = this._bucketRequestParams('GET', name, 'stat', options);
|
|
26
|
+
params.successStatuses = [200];
|
|
27
|
+
params.xmlResponse = true;
|
|
28
|
+
const result = await this.request(params);
|
|
29
|
+
|
|
30
|
+
return {
|
|
31
|
+
res: result.res,
|
|
32
|
+
stat: result.data
|
|
33
|
+
};
|
|
34
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
const proto = exports;
|
|
2
|
+
const { checkBucketName: _checkBucketName } = require('../utils/checkBucketName');
|
|
3
|
+
const { formatTag } = require('../utils/formatTag');
|
|
4
|
+
/**
|
|
5
|
+
* getBucketTags
|
|
6
|
+
* @param {String} name - bucket name
|
|
7
|
+
* @param {Object} options
|
|
8
|
+
* @return {Object}
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
proto.getBucketTags = async function getBucketTags(name, options = {}) {
|
|
12
|
+
_checkBucketName(name);
|
|
13
|
+
const params = this._bucketRequestParams('GET', name, 'tagging', options);
|
|
14
|
+
params.successStatuses = [200];
|
|
15
|
+
const result = await this.request(params);
|
|
16
|
+
const Tagging = await this.parseXML(result.data);
|
|
17
|
+
|
|
18
|
+
return {
|
|
19
|
+
status: result.status,
|
|
20
|
+
res: result.res,
|
|
21
|
+
tag: formatTag(Tagging)
|
|
22
|
+
};
|
|
23
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
const { checkBucketName: _checkBucketName } = require('../utils/checkBucketName');
|
|
2
|
+
|
|
3
|
+
const proto = exports;
|
|
4
|
+
/**
|
|
5
|
+
* getBucketVersioning
|
|
6
|
+
* @param {String} bucketName - bucket name
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
proto.getBucketVersioning = async function getBucketVersioning(bucketName, options) {
|
|
10
|
+
_checkBucketName(bucketName);
|
|
11
|
+
const params = this._bucketRequestParams('GET', bucketName, 'versioning', options);
|
|
12
|
+
params.xmlResponse = true;
|
|
13
|
+
params.successStatuses = [200];
|
|
14
|
+
const result = await this.request(params);
|
|
15
|
+
|
|
16
|
+
const versionStatus = result.data.Status;
|
|
17
|
+
return {
|
|
18
|
+
status: result.status,
|
|
19
|
+
versionStatus,
|
|
20
|
+
res: result.res
|
|
21
|
+
};
|
|
22
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
const { checkBucketName: _checkBucketName } = require('../utils/checkBucketName');
|
|
2
|
+
const { isObject } = require('../utils/isObject');
|
|
3
|
+
|
|
4
|
+
const proto = exports;
|
|
5
|
+
|
|
6
|
+
proto.getBucketWebsite = async function getBucketWebsite(name, options) {
|
|
7
|
+
_checkBucketName(name);
|
|
8
|
+
const params = this._bucketRequestParams('GET', name, 'website', options);
|
|
9
|
+
params.successStatuses = [200];
|
|
10
|
+
params.xmlResponse = true;
|
|
11
|
+
const result = await this.request(params);
|
|
12
|
+
let routingRules = [];
|
|
13
|
+
if (result.data.RoutingRules && result.data.RoutingRules.RoutingRule) {
|
|
14
|
+
if (isObject(result.data.RoutingRules.RoutingRule)) {
|
|
15
|
+
routingRules = [result.data.RoutingRules.RoutingRule];
|
|
16
|
+
} else {
|
|
17
|
+
routingRules = result.data.RoutingRules.RoutingRule;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
return {
|
|
21
|
+
index: (result.data.IndexDocument && result.data.IndexDocument.Suffix) || '',
|
|
22
|
+
supportSubDir: (result.data.IndexDocument && result.data.IndexDocument.SupportSubDir) || 'false',
|
|
23
|
+
type: result.data.IndexDocument && result.data.IndexDocument.Type,
|
|
24
|
+
routingRules,
|
|
25
|
+
error: (result.data.ErrorDocument && result.data.ErrorDocument.Key) || null,
|
|
26
|
+
res: result.res
|
|
27
|
+
};
|
|
28
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function getBucketWorm(this: any, name: string, options: any): Promise<any>;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getBucketWorm = void 0;
|
|
4
|
+
const checkBucketName_1 = require("../utils/checkBucketName");
|
|
5
|
+
const dataFix_1 = require("../utils/dataFix");
|
|
6
|
+
async function getBucketWorm(name, options) {
|
|
7
|
+
checkBucketName_1.checkBucketName(name);
|
|
8
|
+
const params = this._bucketRequestParams('GET', name, 'worm', options);
|
|
9
|
+
params.successStatuses = [200];
|
|
10
|
+
params.xmlResponse = true;
|
|
11
|
+
const result = await this.request(params);
|
|
12
|
+
dataFix_1.dataFix(result.data, {
|
|
13
|
+
lowerFirst: true,
|
|
14
|
+
rename: {
|
|
15
|
+
RetentionPeriodInDays: 'days'
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
return Object.assign(Object.assign({}, result.data), { res: result.res, status: result.status });
|
|
19
|
+
}
|
|
20
|
+
exports.getBucketWorm = getBucketWorm;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { checkBucketName } from '../utils/checkBucketName';
|
|
2
|
+
import { dataFix } from '../utils/dataFix';
|
|
3
|
+
|
|
4
|
+
export async function getBucketWorm(this: any, name: string, options) {
|
|
5
|
+
checkBucketName(name);
|
|
6
|
+
const params = this._bucketRequestParams('GET', name, 'worm', options);
|
|
7
|
+
params.successStatuses = [200];
|
|
8
|
+
params.xmlResponse = true;
|
|
9
|
+
|
|
10
|
+
const result = await this.request(params);
|
|
11
|
+
dataFix(result.data, {
|
|
12
|
+
lowerFirst: true,
|
|
13
|
+
rename: {
|
|
14
|
+
RetentionPeriodInDays: 'days'
|
|
15
|
+
}
|
|
16
|
+
});
|
|
17
|
+
return {
|
|
18
|
+
...result.data,
|
|
19
|
+
res: result.res,
|
|
20
|
+
status: result.status
|
|
21
|
+
};
|
|
22
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
const merge = require('merge-descriptors');
|
|
2
|
+
|
|
3
|
+
const proto = exports;
|
|
4
|
+
|
|
5
|
+
merge(proto, require('./getBucketRequestPayment'));
|
|
6
|
+
merge(proto, require('./putBucketRequestPayment'));
|
|
7
|
+
merge(proto, require('./putBucketEncryption'));
|
|
8
|
+
merge(proto, require('./getBucketEncryption'));
|
|
9
|
+
merge(proto, require('./deleteBucketEncryption'));
|
|
10
|
+
merge(proto, require('./getBucketTags'));
|
|
11
|
+
merge(proto, require('./putBucketTags'));
|
|
12
|
+
merge(proto, require('./deleteBucketTags'));
|
|
13
|
+
merge(proto, require('./putBucket'));
|
|
14
|
+
merge(proto, require('./getBucketWebsite'));
|
|
15
|
+
merge(proto, require('./putBucketWebsite'));
|
|
16
|
+
merge(proto, require('./deleteBucketWebsite'));
|
|
17
|
+
merge(proto, require('./getBucketLifecycle'));
|
|
18
|
+
merge(proto, require('./putBucketLifecycle'));
|
|
19
|
+
merge(proto, require('./deleteBucketLifecycle'));
|
|
20
|
+
merge(proto, require('./getBucketPolicy'));
|
|
21
|
+
merge(proto, require('./putBucketPolicy'));
|
|
22
|
+
merge(proto, require('./deleteBucketPolicy'));
|
|
23
|
+
merge(proto, require('./getBucketVersioning'));
|
|
24
|
+
merge(proto, require('./putBucketVersioning'));
|
|
25
|
+
merge(proto, require('./getBucketInventory'));
|
|
26
|
+
merge(proto, require('./deleteBucketInventory'));
|
|
27
|
+
merge(proto, require('./listBucketInventory'));
|
|
28
|
+
merge(proto, require('./putBucketInventory'));
|
|
29
|
+
merge(proto, require('./abortBucketWorm'));
|
|
30
|
+
merge(proto, require('./completeBucketWorm'));
|
|
31
|
+
merge(proto, require('./extendBucketWorm'));
|
|
32
|
+
merge(proto, require('./getBucketWorm'));
|
|
33
|
+
merge(proto, require('./initiateBucketWorm'));
|
|
34
|
+
merge(proto, require('./getBucketStat'));
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.initiateBucketWorm = void 0;
|
|
4
|
+
const obj2xml_1 = require("../utils/obj2xml");
|
|
5
|
+
const checkBucketName_1 = require("../utils/checkBucketName");
|
|
6
|
+
async function initiateBucketWorm(name, days, options) {
|
|
7
|
+
checkBucketName_1.checkBucketName(name);
|
|
8
|
+
const params = this._bucketRequestParams('POST', name, 'worm', options);
|
|
9
|
+
const paramlXMLObJ = {
|
|
10
|
+
InitiateWormConfiguration: {
|
|
11
|
+
RetentionPeriodInDays: days
|
|
12
|
+
}
|
|
13
|
+
};
|
|
14
|
+
params.mime = 'xml';
|
|
15
|
+
params.content = obj2xml_1.obj2xml(paramlXMLObJ, { headers: true });
|
|
16
|
+
params.successStatuses = [200];
|
|
17
|
+
const result = await this.request(params);
|
|
18
|
+
return {
|
|
19
|
+
res: result.res,
|
|
20
|
+
wormId: result.res.headers['x-oss-worm-id'],
|
|
21
|
+
status: result.status
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
exports.initiateBucketWorm = initiateBucketWorm;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { obj2xml } from '../utils/obj2xml';
|
|
2
|
+
import { checkBucketName } from '../utils/checkBucketName';
|
|
3
|
+
|
|
4
|
+
export async function initiateBucketWorm(this: any, name: string, days: string, options) {
|
|
5
|
+
checkBucketName(name);
|
|
6
|
+
const params = this._bucketRequestParams('POST', name, 'worm', options);
|
|
7
|
+
const paramlXMLObJ = {
|
|
8
|
+
InitiateWormConfiguration: {
|
|
9
|
+
RetentionPeriodInDays: days
|
|
10
|
+
}
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
params.mime = 'xml';
|
|
14
|
+
params.content = obj2xml(paramlXMLObJ, { headers: true });
|
|
15
|
+
params.successStatuses = [200];
|
|
16
|
+
|
|
17
|
+
const result = await this.request(params);
|
|
18
|
+
return {
|
|
19
|
+
res: result.res,
|
|
20
|
+
wormId: result.res.headers['x-oss-worm-id'],
|
|
21
|
+
status: result.status
|
|
22
|
+
};
|
|
23
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* listBucketInventory
|
|
3
|
+
* @param {String} bucketName - bucket name
|
|
4
|
+
* @param {String} inventoryId
|
|
5
|
+
* @param {Object} options
|
|
6
|
+
*/
|
|
7
|
+
export declare function listBucketInventory(this: any, bucketName: string, options?: any): Promise<{
|
|
8
|
+
isTruncated: boolean;
|
|
9
|
+
nextContinuationToken: any;
|
|
10
|
+
inventoryList: any;
|
|
11
|
+
status: any;
|
|
12
|
+
res: any;
|
|
13
|
+
}>;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.listBucketInventory = void 0;
|
|
4
|
+
const checkBucketName_1 = require("../utils/checkBucketName");
|
|
5
|
+
const formatInventoryConfig_1 = require("../utils/formatInventoryConfig");
|
|
6
|
+
/**
|
|
7
|
+
* listBucketInventory
|
|
8
|
+
* @param {String} bucketName - bucket name
|
|
9
|
+
* @param {String} inventoryId
|
|
10
|
+
* @param {Object} options
|
|
11
|
+
*/
|
|
12
|
+
async function listBucketInventory(bucketName, options = {}) {
|
|
13
|
+
const { continuationToken } = options;
|
|
14
|
+
const subres = Object.assign({ inventory: '' }, continuationToken && { 'continuation-token': continuationToken }, options.subres);
|
|
15
|
+
checkBucketName_1.checkBucketName(bucketName);
|
|
16
|
+
const params = this._bucketRequestParams('GET', bucketName, subres, options);
|
|
17
|
+
params.successStatuses = [200];
|
|
18
|
+
params.xmlResponse = true;
|
|
19
|
+
const result = await this.request(params);
|
|
20
|
+
const { data, res, status } = result;
|
|
21
|
+
return {
|
|
22
|
+
isTruncated: data.IsTruncated === 'true',
|
|
23
|
+
nextContinuationToken: data.NextContinuationToken,
|
|
24
|
+
inventoryList: formatInventoryConfig_1.formatInventoryConfig(data.InventoryConfiguration, true),
|
|
25
|
+
status,
|
|
26
|
+
res
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
exports.listBucketInventory = listBucketInventory;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { checkBucketName } from '../utils/checkBucketName';
|
|
2
|
+
import { formatInventoryConfig } from '../utils/formatInventoryConfig';
|
|
3
|
+
/**
|
|
4
|
+
* listBucketInventory
|
|
5
|
+
* @param {String} bucketName - bucket name
|
|
6
|
+
* @param {String} inventoryId
|
|
7
|
+
* @param {Object} options
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
export async function listBucketInventory(this: any, bucketName: string, options: any = {}) {
|
|
11
|
+
const { continuationToken } = options;
|
|
12
|
+
const subres: any = Object.assign(
|
|
13
|
+
{ inventory: '' },
|
|
14
|
+
continuationToken && { 'continuation-token': continuationToken },
|
|
15
|
+
options.subres
|
|
16
|
+
);
|
|
17
|
+
checkBucketName(bucketName);
|
|
18
|
+
|
|
19
|
+
const params = this._bucketRequestParams('GET', bucketName, subres, options);
|
|
20
|
+
params.successStatuses = [200];
|
|
21
|
+
|
|
22
|
+
params.xmlResponse = true;
|
|
23
|
+
const result = await this.request(params);
|
|
24
|
+
const { data, res, status } = result;
|
|
25
|
+
return {
|
|
26
|
+
isTruncated: data.IsTruncated === 'true',
|
|
27
|
+
nextContinuationToken: data.NextContinuationToken,
|
|
28
|
+
inventoryList: formatInventoryConfig(data.InventoryConfiguration, true),
|
|
29
|
+
status,
|
|
30
|
+
res
|
|
31
|
+
};
|
|
32
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
const proto = exports;
|
|
2
|
+
const { checkBucketName: _checkBucketName } = require('../utils/checkBucketName');
|
|
3
|
+
const { obj2xml } = require('../utils/obj2xml');
|
|
4
|
+
|
|
5
|
+
proto.putBucket = async function putBucket(name, options = {}) {
|
|
6
|
+
_checkBucketName(name, true);
|
|
7
|
+
const params = this._bucketRequestParams('PUT', name, '', options);
|
|
8
|
+
|
|
9
|
+
const CreateBucketConfiguration = {};
|
|
10
|
+
const paramlXMLObJ = {
|
|
11
|
+
CreateBucketConfiguration
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
const storageClass = options.StorageClass || options.storageClass;
|
|
15
|
+
const dataRedundancyType = options.DataRedundancyType || options.dataRedundancyType;
|
|
16
|
+
if (storageClass || dataRedundancyType) {
|
|
17
|
+
storageClass && (CreateBucketConfiguration.StorageClass = storageClass);
|
|
18
|
+
dataRedundancyType && (CreateBucketConfiguration.DataRedundancyType = dataRedundancyType);
|
|
19
|
+
params.mime = 'xml';
|
|
20
|
+
params.content = obj2xml(paramlXMLObJ, { headers: true });
|
|
21
|
+
}
|
|
22
|
+
const { acl, headers = {} } = options;
|
|
23
|
+
acl && (headers['x-oss-acl'] = acl);
|
|
24
|
+
params.headers = headers;
|
|
25
|
+
params.successStatuses = [200];
|
|
26
|
+
const result = await this.request(params);
|
|
27
|
+
return {
|
|
28
|
+
bucket: (result.headers.location && result.headers.location.substring(1)) || null,
|
|
29
|
+
res: result.res
|
|
30
|
+
};
|
|
31
|
+
};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
const proto = exports;
|
|
2
|
+
// const jstoxml = require('jstoxml');
|
|
3
|
+
const { checkBucketName: _checkBucketName } = require('../utils/checkBucketName');
|
|
4
|
+
const { obj2xml } = require('../utils/obj2xml');
|
|
5
|
+
/**
|
|
6
|
+
* putBucketEncryption
|
|
7
|
+
* @param {String} bucketName - bucket name
|
|
8
|
+
* @param {Object} options
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
proto.putBucketEncryption = async function putBucketEncryption(bucketName, options) {
|
|
12
|
+
options = options || {};
|
|
13
|
+
_checkBucketName(bucketName);
|
|
14
|
+
const params = this._bucketRequestParams('PUT', bucketName, 'encryption', options);
|
|
15
|
+
params.successStatuses = [200];
|
|
16
|
+
const paramXMLObj = {
|
|
17
|
+
ServerSideEncryptionRule: {
|
|
18
|
+
ApplyServerSideEncryptionByDefault: {
|
|
19
|
+
SSEAlgorithm: options.SSEAlgorithm
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
if (options.KMSMasterKeyID !== undefined) {
|
|
24
|
+
paramXMLObj.ServerSideEncryptionRule.ApplyServerSideEncryptionByDefault.KMSMasterKeyID = options.KMSMasterKeyID;
|
|
25
|
+
}
|
|
26
|
+
const paramXML = obj2xml(paramXMLObj, {
|
|
27
|
+
headers: true
|
|
28
|
+
});
|
|
29
|
+
params.mime = 'xml';
|
|
30
|
+
params.content = paramXML;
|
|
31
|
+
const result = await this.request(params);
|
|
32
|
+
return {
|
|
33
|
+
status: result.status,
|
|
34
|
+
res: result.res
|
|
35
|
+
};
|
|
36
|
+
};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
declare type Field = 'Size | LastModifiedDate | ETag | StorageClass | IsMultipartUploaded | EncryptionStatus';
|
|
2
|
+
interface Inventory {
|
|
3
|
+
id: string;
|
|
4
|
+
isEnabled: true | false;
|
|
5
|
+
prefix?: string;
|
|
6
|
+
OSSBucketDestination: {
|
|
7
|
+
format: 'CSV';
|
|
8
|
+
accountId: string;
|
|
9
|
+
rolename: string;
|
|
10
|
+
bucket: string;
|
|
11
|
+
prefix?: string;
|
|
12
|
+
encryption?: {
|
|
13
|
+
'SSE-OSS': '';
|
|
14
|
+
} | {
|
|
15
|
+
'SSE-KMS': {
|
|
16
|
+
keyId: string;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
frequency: 'Daily' | 'Weekly';
|
|
21
|
+
includedObjectVersions: 'Current' | 'All';
|
|
22
|
+
optionalFields?: {
|
|
23
|
+
field?: Field[];
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* putBucketInventory
|
|
28
|
+
* @param {String} bucketName - bucket name
|
|
29
|
+
* @param {Inventory} inventory
|
|
30
|
+
* @param {Object} options
|
|
31
|
+
*/
|
|
32
|
+
export declare function putBucketInventory(this: any, bucketName: string, inventory: Inventory, options?: any): Promise<{
|
|
33
|
+
status: any;
|
|
34
|
+
res: any;
|
|
35
|
+
}>;
|
|
36
|
+
export {};
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.putBucketInventory = void 0;
|
|
4
|
+
const checkBucketName_1 = require("../utils/checkBucketName");
|
|
5
|
+
const obj2xml_1 = require("../utils/obj2xml");
|
|
6
|
+
/**
|
|
7
|
+
* putBucketInventory
|
|
8
|
+
* @param {String} bucketName - bucket name
|
|
9
|
+
* @param {Inventory} inventory
|
|
10
|
+
* @param {Object} options
|
|
11
|
+
*/
|
|
12
|
+
async function putBucketInventory(bucketName, inventory, options = {}) {
|
|
13
|
+
const subres = Object.assign({ inventory: '', inventoryId: inventory.id }, options.subres);
|
|
14
|
+
checkBucketName_1.checkBucketName(bucketName);
|
|
15
|
+
const { OSSBucketDestination, optionalFields, includedObjectVersions } = inventory;
|
|
16
|
+
const destinationBucketPrefix = 'acs:oss:::';
|
|
17
|
+
const rolePrefix = `acs:ram::${OSSBucketDestination.accountId}:role/`;
|
|
18
|
+
const paramXMLObj = {
|
|
19
|
+
InventoryConfiguration: {
|
|
20
|
+
Id: inventory.id,
|
|
21
|
+
IsEnabled: inventory.isEnabled,
|
|
22
|
+
Filter: {
|
|
23
|
+
Prefix: inventory.prefix || ''
|
|
24
|
+
},
|
|
25
|
+
Destination: {
|
|
26
|
+
OSSBucketDestination: {
|
|
27
|
+
Format: OSSBucketDestination.format,
|
|
28
|
+
AccountId: OSSBucketDestination.accountId,
|
|
29
|
+
RoleArn: `${rolePrefix}${OSSBucketDestination.rolename}`,
|
|
30
|
+
Bucket: `${destinationBucketPrefix}${OSSBucketDestination.bucket}`,
|
|
31
|
+
Prefix: OSSBucketDestination.prefix || '',
|
|
32
|
+
Encryption: OSSBucketDestination.encryption || ''
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
Schedule: {
|
|
36
|
+
Frequency: inventory.frequency
|
|
37
|
+
},
|
|
38
|
+
IncludedObjectVersions: includedObjectVersions,
|
|
39
|
+
OptionalFields: {
|
|
40
|
+
Field: (optionalFields === null || optionalFields === void 0 ? void 0 : optionalFields.field) || []
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
const paramXML = obj2xml_1.obj2xml(paramXMLObj, {
|
|
45
|
+
headers: true,
|
|
46
|
+
firstUpperCase: true
|
|
47
|
+
});
|
|
48
|
+
const params = this._bucketRequestParams('PUT', bucketName, subres, options);
|
|
49
|
+
params.successStatuses = [200];
|
|
50
|
+
params.mime = 'xml';
|
|
51
|
+
params.content = paramXML;
|
|
52
|
+
const result = await this.request(params);
|
|
53
|
+
return {
|
|
54
|
+
status: result.status,
|
|
55
|
+
res: result.res
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
exports.putBucketInventory = putBucketInventory;
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { checkBucketName } from '../utils/checkBucketName';
|
|
2
|
+
import { obj2xml } from '../utils/obj2xml';
|
|
3
|
+
|
|
4
|
+
type Field = 'Size | LastModifiedDate | ETag | StorageClass | IsMultipartUploaded | EncryptionStatus';
|
|
5
|
+
|
|
6
|
+
interface Inventory {
|
|
7
|
+
id: string;
|
|
8
|
+
isEnabled: true | false;
|
|
9
|
+
prefix?: string;
|
|
10
|
+
OSSBucketDestination: {
|
|
11
|
+
format: 'CSV';
|
|
12
|
+
accountId: string;
|
|
13
|
+
rolename: string;
|
|
14
|
+
bucket: string;
|
|
15
|
+
prefix?: string;
|
|
16
|
+
encryption?:
|
|
17
|
+
| { 'SSE-OSS': '' }
|
|
18
|
+
| {
|
|
19
|
+
'SSE-KMS': {
|
|
20
|
+
keyId: string;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
frequency: 'Daily' | 'Weekly';
|
|
25
|
+
includedObjectVersions: 'Current' | 'All';
|
|
26
|
+
optionalFields?: {
|
|
27
|
+
field?: Field[];
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* putBucketInventory
|
|
33
|
+
* @param {String} bucketName - bucket name
|
|
34
|
+
* @param {Inventory} inventory
|
|
35
|
+
* @param {Object} options
|
|
36
|
+
*/
|
|
37
|
+
|
|
38
|
+
export async function putBucketInventory(this: any, bucketName: string, inventory: Inventory, options: any = {}) {
|
|
39
|
+
const subres: any = Object.assign({ inventory: '', inventoryId: inventory.id }, options.subres);
|
|
40
|
+
checkBucketName(bucketName);
|
|
41
|
+
const { OSSBucketDestination, optionalFields, includedObjectVersions } = inventory;
|
|
42
|
+
const destinationBucketPrefix = 'acs:oss:::';
|
|
43
|
+
const rolePrefix = `acs:ram::${OSSBucketDestination.accountId}:role/`;
|
|
44
|
+
const paramXMLObj: any = {
|
|
45
|
+
InventoryConfiguration: {
|
|
46
|
+
Id: inventory.id,
|
|
47
|
+
IsEnabled: inventory.isEnabled,
|
|
48
|
+
Filter: {
|
|
49
|
+
Prefix: inventory.prefix || ''
|
|
50
|
+
},
|
|
51
|
+
Destination: {
|
|
52
|
+
OSSBucketDestination: {
|
|
53
|
+
Format: OSSBucketDestination.format,
|
|
54
|
+
AccountId: OSSBucketDestination.accountId,
|
|
55
|
+
RoleArn: `${rolePrefix}${OSSBucketDestination.rolename}`,
|
|
56
|
+
Bucket: `${destinationBucketPrefix}${OSSBucketDestination.bucket}`,
|
|
57
|
+
Prefix: OSSBucketDestination.prefix || '',
|
|
58
|
+
Encryption: OSSBucketDestination.encryption || ''
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
Schedule: {
|
|
62
|
+
Frequency: inventory.frequency
|
|
63
|
+
},
|
|
64
|
+
IncludedObjectVersions: includedObjectVersions,
|
|
65
|
+
OptionalFields: {
|
|
66
|
+
Field: optionalFields?.field || []
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
};
|
|
70
|
+
const paramXML = obj2xml(paramXMLObj, {
|
|
71
|
+
headers: true,
|
|
72
|
+
firstUpperCase: true
|
|
73
|
+
});
|
|
74
|
+
|
|
75
|
+
const params = this._bucketRequestParams('PUT', bucketName, subres, options);
|
|
76
|
+
params.successStatuses = [200];
|
|
77
|
+
params.mime = 'xml';
|
|
78
|
+
params.content = paramXML;
|
|
79
|
+
const result = await this.request(params);
|
|
80
|
+
return {
|
|
81
|
+
status: result.status,
|
|
82
|
+
res: result.res
|
|
83
|
+
};
|
|
84
|
+
}
|