@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,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.encoder = void 0;
|
|
4
|
+
function encoder(str, encoding = 'utf-8') {
|
|
5
|
+
if (encoding === 'utf-8')
|
|
6
|
+
return str;
|
|
7
|
+
return Buffer.from(str).toString('latin1');
|
|
8
|
+
}
|
|
9
|
+
exports.encoder = encoder;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function formatInventoryConfig(inventoryConfig: any, toArray?: boolean): any;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.formatInventoryConfig = void 0;
|
|
4
|
+
const dataFix_1 = require("../utils/dataFix");
|
|
5
|
+
const isObject_1 = require("../utils/isObject");
|
|
6
|
+
const isArray_1 = require("../utils/isArray");
|
|
7
|
+
const formatObjKey_1 = require("../utils/formatObjKey");
|
|
8
|
+
function formatInventoryConfig(inventoryConfig, toArray = false) {
|
|
9
|
+
if (toArray && isObject_1.isObject(inventoryConfig))
|
|
10
|
+
inventoryConfig = [inventoryConfig];
|
|
11
|
+
if (isArray_1.isArray(inventoryConfig)) {
|
|
12
|
+
inventoryConfig = inventoryConfig.map(formatFn);
|
|
13
|
+
}
|
|
14
|
+
else {
|
|
15
|
+
inventoryConfig = formatFn(inventoryConfig);
|
|
16
|
+
}
|
|
17
|
+
return inventoryConfig;
|
|
18
|
+
}
|
|
19
|
+
exports.formatInventoryConfig = formatInventoryConfig;
|
|
20
|
+
function formatFn(_) {
|
|
21
|
+
dataFix_1.dataFix(_, { bool: ['IsEnabled'] }, conf => {
|
|
22
|
+
var _a, _b;
|
|
23
|
+
// prefix
|
|
24
|
+
conf.prefix = conf.Filter.Prefix;
|
|
25
|
+
delete conf.Filter;
|
|
26
|
+
// OSSBucketDestination
|
|
27
|
+
conf.OSSBucketDestination = conf.Destination.OSSBucketDestination;
|
|
28
|
+
// OSSBucketDestination.rolename
|
|
29
|
+
conf.OSSBucketDestination.rolename = conf.OSSBucketDestination.RoleArn.replace(/.*\//, '');
|
|
30
|
+
delete conf.OSSBucketDestination.RoleArn;
|
|
31
|
+
// OSSBucketDestination.bucket
|
|
32
|
+
conf.OSSBucketDestination.bucket = conf.OSSBucketDestination.Bucket.replace(/.*:::/, '');
|
|
33
|
+
delete conf.OSSBucketDestination.Bucket;
|
|
34
|
+
delete conf.Destination;
|
|
35
|
+
// frequency
|
|
36
|
+
conf.frequency = conf.Schedule.Frequency;
|
|
37
|
+
delete conf.Schedule.Frequency;
|
|
38
|
+
// optionalFields
|
|
39
|
+
if (((_a = conf === null || conf === void 0 ? void 0 : conf.OptionalFields) === null || _a === void 0 ? void 0 : _a.Field) && !isArray_1.isArray((_b = conf.OptionalFields) === null || _b === void 0 ? void 0 : _b.Field))
|
|
40
|
+
conf.OptionalFields.Field = [conf.OptionalFields.Field];
|
|
41
|
+
});
|
|
42
|
+
// firstLowerCase
|
|
43
|
+
_ = formatObjKey_1.formatObjKey(_, 'firstLowerCase', { exclude: ['OSSBucketDestination', 'SSE-OSS', 'SSE-KMS'] });
|
|
44
|
+
return _;
|
|
45
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { dataFix } from '../utils/dataFix';
|
|
2
|
+
import { isObject } from '../utils/isObject';
|
|
3
|
+
import { isArray } from '../utils/isArray';
|
|
4
|
+
import { formatObjKey } from '../utils/formatObjKey';
|
|
5
|
+
|
|
6
|
+
export function formatInventoryConfig(inventoryConfig, toArray = false) {
|
|
7
|
+
if (toArray && isObject(inventoryConfig)) inventoryConfig = [inventoryConfig];
|
|
8
|
+
|
|
9
|
+
if (isArray(inventoryConfig)) {
|
|
10
|
+
inventoryConfig = inventoryConfig.map(formatFn);
|
|
11
|
+
} else {
|
|
12
|
+
inventoryConfig = formatFn(inventoryConfig);
|
|
13
|
+
}
|
|
14
|
+
return inventoryConfig;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
function formatFn(_) {
|
|
18
|
+
dataFix(_, { bool: ['IsEnabled'] }, conf => {
|
|
19
|
+
// prefix
|
|
20
|
+
conf.prefix = conf.Filter.Prefix;
|
|
21
|
+
delete conf.Filter;
|
|
22
|
+
// OSSBucketDestination
|
|
23
|
+
conf.OSSBucketDestination = conf.Destination.OSSBucketDestination;
|
|
24
|
+
// OSSBucketDestination.rolename
|
|
25
|
+
conf.OSSBucketDestination.rolename = conf.OSSBucketDestination.RoleArn.replace(/.*\//, '');
|
|
26
|
+
delete conf.OSSBucketDestination.RoleArn;
|
|
27
|
+
// OSSBucketDestination.bucket
|
|
28
|
+
conf.OSSBucketDestination.bucket = conf.OSSBucketDestination.Bucket.replace(/.*:::/, '');
|
|
29
|
+
delete conf.OSSBucketDestination.Bucket;
|
|
30
|
+
delete conf.Destination;
|
|
31
|
+
// frequency
|
|
32
|
+
conf.frequency = conf.Schedule.Frequency;
|
|
33
|
+
delete conf.Schedule.Frequency;
|
|
34
|
+
// optionalFields
|
|
35
|
+
if (conf?.OptionalFields?.Field && !isArray(conf.OptionalFields?.Field))
|
|
36
|
+
conf.OptionalFields.Field = [conf.OptionalFields.Field];
|
|
37
|
+
});
|
|
38
|
+
// firstLowerCase
|
|
39
|
+
_ = formatObjKey(_, 'firstLowerCase', { exclude: ['OSSBucketDestination', 'SSE-OSS', 'SSE-KMS'] });
|
|
40
|
+
return _;
|
|
41
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.formatObjKey = void 0;
|
|
4
|
+
function formatObjKey(obj, type, options) {
|
|
5
|
+
if (obj === null || typeof obj !== 'object') {
|
|
6
|
+
return obj;
|
|
7
|
+
}
|
|
8
|
+
let o;
|
|
9
|
+
if (Array.isArray(obj)) {
|
|
10
|
+
o = [];
|
|
11
|
+
for (let i = 0; i < obj.length; i++) {
|
|
12
|
+
o.push(formatObjKey(obj[i], type, options));
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
else {
|
|
16
|
+
o = {};
|
|
17
|
+
Object.keys(obj).forEach(key => {
|
|
18
|
+
o[handelFormat(key, type, options)] = formatObjKey(obj[key], type, options);
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
return o;
|
|
22
|
+
}
|
|
23
|
+
exports.formatObjKey = formatObjKey;
|
|
24
|
+
function handelFormat(key, type, options) {
|
|
25
|
+
if (options && options.exclude && options.exclude.includes(key))
|
|
26
|
+
return key;
|
|
27
|
+
if (type === 'firstUpperCase') {
|
|
28
|
+
key = key.replace(/^./, (_) => _.toUpperCase());
|
|
29
|
+
}
|
|
30
|
+
else if (type === 'firstLowerCase') {
|
|
31
|
+
key = key.replace(/^./, (_) => _.toLowerCase());
|
|
32
|
+
}
|
|
33
|
+
return key;
|
|
34
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
interface Config {
|
|
2
|
+
exclude?: string[];
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
type FormatObjKeyType = 'firstUpperCase' | 'firstLowerCase';
|
|
6
|
+
|
|
7
|
+
export function formatObjKey(obj: any, type: FormatObjKeyType, options?: Config) {
|
|
8
|
+
if (obj === null || typeof obj !== 'object') {
|
|
9
|
+
return obj;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
let o: any;
|
|
13
|
+
if (Array.isArray(obj)) {
|
|
14
|
+
o = [];
|
|
15
|
+
for (let i = 0; i < obj.length; i++) {
|
|
16
|
+
o.push(formatObjKey(obj[i], type, options));
|
|
17
|
+
}
|
|
18
|
+
} else {
|
|
19
|
+
o = {};
|
|
20
|
+
Object.keys(obj).forEach(key => {
|
|
21
|
+
o[handelFormat(key, type, options)] = formatObjKey(obj[key], type, options);
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
return o;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
function handelFormat(key: string, type: FormatObjKeyType, options?: Config) {
|
|
28
|
+
if (options && options.exclude && options.exclude.includes(key)) return key;
|
|
29
|
+
if (type === 'firstUpperCase') {
|
|
30
|
+
key = key.replace(/^./, (_: string) => _.toUpperCase());
|
|
31
|
+
} else if (type === 'firstLowerCase') {
|
|
32
|
+
key = key.replace(/^./, (_: string) => _.toLowerCase());
|
|
33
|
+
}
|
|
34
|
+
return key;
|
|
35
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function formatTag(obj: any): {};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.formatTag = void 0;
|
|
4
|
+
const isObject_1 = require("./isObject");
|
|
5
|
+
function formatTag(obj) {
|
|
6
|
+
if (obj.Tagging !== undefined) {
|
|
7
|
+
obj = obj.Tagging.TagSet.Tag;
|
|
8
|
+
}
|
|
9
|
+
else if (obj.TagSet !== undefined) {
|
|
10
|
+
obj = obj.TagSet.Tag;
|
|
11
|
+
}
|
|
12
|
+
else if (obj.Tag !== undefined) {
|
|
13
|
+
obj = obj.Tag;
|
|
14
|
+
}
|
|
15
|
+
obj = obj && isObject_1.isObject(obj) ? [obj] : obj || [];
|
|
16
|
+
const tag = {};
|
|
17
|
+
obj.forEach(item => {
|
|
18
|
+
tag[item.Key] = item.Value;
|
|
19
|
+
});
|
|
20
|
+
return tag;
|
|
21
|
+
}
|
|
22
|
+
exports.formatTag = formatTag;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { isObject } from './isObject';
|
|
2
|
+
|
|
3
|
+
export function formatTag(obj) {
|
|
4
|
+
if (obj.Tagging !== undefined) {
|
|
5
|
+
obj = obj.Tagging.TagSet.Tag;
|
|
6
|
+
} else if (obj.TagSet !== undefined) {
|
|
7
|
+
obj = obj.TagSet.Tag;
|
|
8
|
+
} else if (obj.Tag !== undefined) {
|
|
9
|
+
obj = obj.Tag;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
obj = obj && isObject(obj) ? [obj] : obj || [];
|
|
13
|
+
|
|
14
|
+
const tag = {};
|
|
15
|
+
obj.forEach(item => {
|
|
16
|
+
tag[item.Key] = item.Value;
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
return tag;
|
|
20
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function getStandardRegion(str: string): string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function getStrBytesCount(str: any): number;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getStrBytesCount = void 0;
|
|
4
|
+
function getStrBytesCount(str) {
|
|
5
|
+
let bytesCount = 0;
|
|
6
|
+
for (let i = 0; i < str.length; i++) {
|
|
7
|
+
const c = str.charAt(i);
|
|
8
|
+
if (/^[\u00-\uff]$/.test(c)) {
|
|
9
|
+
bytesCount += 1;
|
|
10
|
+
}
|
|
11
|
+
else {
|
|
12
|
+
bytesCount += 2;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
return bytesCount;
|
|
16
|
+
}
|
|
17
|
+
exports.getStrBytesCount = getStrBytesCount;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const getUserAgent: () => any;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.getUserAgent = void 0;
|
|
7
|
+
const platform_1 = __importDefault(require("platform"));
|
|
8
|
+
const version_1 = __importDefault(require("../../browser/version"));
|
|
9
|
+
const checkUserAgent_1 = require("./checkUserAgent");
|
|
10
|
+
exports.getUserAgent = () => {
|
|
11
|
+
const agent = process && process.browser ? 'js' : 'nodejs';
|
|
12
|
+
const sdk = `aliyun-sdk-${agent}/${version_1.default.version}`;
|
|
13
|
+
let plat = platform_1.default.description;
|
|
14
|
+
if (!plat && process) {
|
|
15
|
+
plat = `Node.js ${process.version.slice(1)} on ${process.platform} ${process.arch}`;
|
|
16
|
+
}
|
|
17
|
+
return checkUserAgent_1.checkUserAgent(`${sdk} ${plat}`);
|
|
18
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import platform from 'platform';
|
|
2
|
+
import pkg from '../../browser/version';
|
|
3
|
+
import { checkUserAgent } from './checkUserAgent';
|
|
4
|
+
|
|
5
|
+
export const getUserAgent = () => {
|
|
6
|
+
const agent = process && process.browser ? 'js' : 'nodejs';
|
|
7
|
+
const sdk = `aliyun-sdk-${agent}/${pkg.version}`;
|
|
8
|
+
let plat = platform.description;
|
|
9
|
+
if (!plat && process) {
|
|
10
|
+
plat = `Node.js ${process.version.slice(1)} on ${process.platform} ${process.arch}`;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
return checkUserAgent(`${sdk} ${plat}`);
|
|
14
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const isArray: (obj: any) => boolean;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function isBlob(blob: any): boolean;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function isBuffer(obj: any): boolean;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function isDingTalk(): boolean;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.isDingTalk = void 0;
|
|
4
|
+
function isDingTalk() {
|
|
5
|
+
if (process.browser && window.navigator.userAgent.toLowerCase().includes('aliapp(dingtalk')) {
|
|
6
|
+
return true;
|
|
7
|
+
}
|
|
8
|
+
return false;
|
|
9
|
+
}
|
|
10
|
+
exports.isDingTalk = isDingTalk;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const isFile: (obj: any) => boolean;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const isFunction: (v: any) => boolean;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.isIP = void 0;
|
|
4
|
+
// it provide commont methods for node and browser , we will add more solutions later in this file
|
|
5
|
+
/**
|
|
6
|
+
* Judge isIP include ipv4 or ipv6
|
|
7
|
+
* @param {String} options
|
|
8
|
+
* @return {Array} the multipart uploads
|
|
9
|
+
*/
|
|
10
|
+
exports.isIP = host => {
|
|
11
|
+
const ipv4Regex = /^(25[0-5]|2[0-4]\d|[0-1]?\d?\d)(\.(25[0-5]|2[0-4]\d|[0-1]?\d?\d)){3}$/;
|
|
12
|
+
const ipv6Regex = /^\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$/;
|
|
13
|
+
return ipv4Regex.test(host) || ipv6Regex.test(host);
|
|
14
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
// it provide commont methods for node and browser , we will add more solutions later in this file
|
|
2
|
+
/**
|
|
3
|
+
* Judge isIP include ipv4 or ipv6
|
|
4
|
+
* @param {String} options
|
|
5
|
+
* @return {Array} the multipart uploads
|
|
6
|
+
*/
|
|
7
|
+
export const isIP = host => {
|
|
8
|
+
const ipv4Regex = /^(25[0-5]|2[0-4]\d|[0-1]?\d?\d)(\.(25[0-5]|2[0-4]\d|[0-1]?\d?\d)){3}$/;
|
|
9
|
+
const ipv6Regex =
|
|
10
|
+
/^\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$/;
|
|
11
|
+
return ipv4Regex.test(host) || ipv6Regex.test(host);
|
|
12
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const isObject: (obj: any) => boolean;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function lowercaseKeyHeader(headers: any): {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.lowercaseKeyHeader = void 0;
|
|
4
|
+
const isObject_1 = require("./isObject");
|
|
5
|
+
function lowercaseKeyHeader(headers) {
|
|
6
|
+
const lowercaseHeader = {};
|
|
7
|
+
if (isObject_1.isObject(headers)) {
|
|
8
|
+
Object.keys(headers).forEach(key => {
|
|
9
|
+
lowercaseHeader[key.toLowerCase()] = headers[key];
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
return lowercaseHeader;
|
|
13
|
+
}
|
|
14
|
+
exports.lowercaseKeyHeader = lowercaseKeyHeader;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { isObject } from './isObject';
|
|
2
|
+
|
|
3
|
+
export function lowercaseKeyHeader(headers) {
|
|
4
|
+
const lowercaseHeader = {};
|
|
5
|
+
if (isObject(headers)) {
|
|
6
|
+
Object.keys(headers).forEach(key => {
|
|
7
|
+
lowercaseHeader[key.toLowerCase()] = headers[key];
|
|
8
|
+
});
|
|
9
|
+
}
|
|
10
|
+
return lowercaseHeader;
|
|
11
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function obj2xml(obj: any, options?: any): string;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.obj2xml = void 0;
|
|
4
|
+
const formatObjKey_1 = require("./formatObjKey");
|
|
5
|
+
function type(params) {
|
|
6
|
+
return Object.prototype.toString
|
|
7
|
+
.call(params)
|
|
8
|
+
.replace(/(.*? |])/g, '')
|
|
9
|
+
.toLowerCase();
|
|
10
|
+
}
|
|
11
|
+
function obj2xml(obj, options) {
|
|
12
|
+
let s = '';
|
|
13
|
+
if (options && options.headers) {
|
|
14
|
+
s = '<?xml version="1.0" encoding="UTF-8"?>\n';
|
|
15
|
+
}
|
|
16
|
+
if (options && options.firstUpperCase) {
|
|
17
|
+
obj = formatObjKey_1.formatObjKey(obj, 'firstUpperCase');
|
|
18
|
+
}
|
|
19
|
+
if (type(obj) === 'object') {
|
|
20
|
+
Object.keys(obj).forEach(key => {
|
|
21
|
+
// filter undefined or null
|
|
22
|
+
if (type(obj[key]) !== 'undefined' && type(obj[key]) !== 'null') {
|
|
23
|
+
if (type(obj[key]) === 'string' || type(obj[key]) === 'number') {
|
|
24
|
+
s += `<${key}>${obj[key]}</${key}>`;
|
|
25
|
+
}
|
|
26
|
+
else if (type(obj[key]) === 'object') {
|
|
27
|
+
s += `<${key}>${obj2xml(obj[key])}</${key}>`;
|
|
28
|
+
}
|
|
29
|
+
else if (type(obj[key]) === 'array') {
|
|
30
|
+
s += obj[key].map(keyChild => `<${key}>${obj2xml(keyChild)}</${key}>`).join('');
|
|
31
|
+
}
|
|
32
|
+
else {
|
|
33
|
+
s += `<${key}>${obj[key].toString()}</${key}>`;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
else {
|
|
39
|
+
s += obj.toString();
|
|
40
|
+
}
|
|
41
|
+
return s;
|
|
42
|
+
}
|
|
43
|
+
exports.obj2xml = obj2xml;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { formatObjKey } from './formatObjKey';
|
|
2
|
+
|
|
3
|
+
function type(params) {
|
|
4
|
+
return Object.prototype.toString
|
|
5
|
+
.call(params)
|
|
6
|
+
.replace(/(.*? |])/g, '')
|
|
7
|
+
.toLowerCase();
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export function obj2xml(obj, options?) {
|
|
11
|
+
let s = '';
|
|
12
|
+
if (options && options.headers) {
|
|
13
|
+
s = '<?xml version="1.0" encoding="UTF-8"?>\n';
|
|
14
|
+
}
|
|
15
|
+
if (options && options.firstUpperCase) {
|
|
16
|
+
obj = formatObjKey(obj, 'firstUpperCase');
|
|
17
|
+
}
|
|
18
|
+
if (type(obj) === 'object') {
|
|
19
|
+
Object.keys(obj).forEach(key => {
|
|
20
|
+
// filter undefined or null
|
|
21
|
+
if (type(obj[key]) !== 'undefined' && type(obj[key]) !== 'null') {
|
|
22
|
+
if (type(obj[key]) === 'string' || type(obj[key]) === 'number') {
|
|
23
|
+
s += `<${key}>${obj[key]}</${key}>`;
|
|
24
|
+
} else if (type(obj[key]) === 'object') {
|
|
25
|
+
s += `<${key}>${obj2xml(obj[key])}</${key}>`;
|
|
26
|
+
} else if (type(obj[key]) === 'array') {
|
|
27
|
+
s += obj[key].map(keyChild => `<${key}>${obj2xml(keyChild)}</${key}>`).join('');
|
|
28
|
+
} else {
|
|
29
|
+
s += `<${key}>${obj[key].toString()}</${key}>`;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
});
|
|
33
|
+
} else {
|
|
34
|
+
s += obj.toString();
|
|
35
|
+
}
|
|
36
|
+
return s;
|
|
37
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function omit(originalObject: {}, keysToOmit: string[]): {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.omit = void 0;
|
|
4
|
+
function omit(originalObject, keysToOmit) {
|
|
5
|
+
const cloneObject = Object.assign({}, originalObject);
|
|
6
|
+
for (const path of keysToOmit) {
|
|
7
|
+
delete cloneObject[path];
|
|
8
|
+
}
|
|
9
|
+
return cloneObject;
|
|
10
|
+
}
|
|
11
|
+
exports.omit = omit;
|