UNPKG

@yuntools/ali-oss

Version:

阿里云 OSS 命令行工具 ossutil 封装,支持 ESM,CJS 导入,提供 TypeScript 类型定义

30 lines 861 B
import assert from 'node:assert'; import { undefined } from '../config.js'; import { commonProcessInputMap } from '../helper.js'; import { PlaceholderKey, } from '../types.js'; export const initBaseOptions = { accessKeyId: '', accessKeySecret: '', bucket: '', connectTimeoutSec: undefined, encodeSource: false, encodeTarget: true, readTimeoutSec: undefined, stsToken: '', endpoint: '', loglevel: undefined, }; export const initOptions = { ...initBaseOptions, target: '', }; /** * src will be delete */ export async function processInputWoSrc(input, initOptionsInput, globalConfig) { const map = commonProcessInputMap(input, initOptionsInput, globalConfig); assert(map.get(PlaceholderKey.dest), 'dest is required'); map.delete(PlaceholderKey.src); return map; } //# sourceMappingURL=common.js.map