@yuntools/ali-oss
Version:
阿里云 OSS 命令行工具 ossutil 封装,支持 ESM,CJS 导入,提供 TypeScript 类型定义
40 lines • 1.31 kB
JavaScript
import assert from 'node:assert';
import { undefined } from '../config.js';
import { commonProcessInputMap } from '../helper.js';
import { DataKey, PlaceholderKey, } from '../types.js';
import { initOptions as mvOptions } from './mv.js';
export const initOptions = {
...mvOptions,
bigfileThreshold: undefined,
checkpointDir: undefined,
disableCrc64: undefined,
disableIgnoreError: undefined,
enableSymlinkDir: undefined,
onlyCurrentDir: undefined,
partSize: undefined,
snapshotPath: undefined,
acl: undefined,
exclude: undefined,
force: false,
jobs: undefined,
include: undefined,
maxupspeed: 0,
meta: undefined,
parallel: undefined,
payer: undefined,
recursive: false,
tagging: undefined,
update: false,
};
export async function processInput(input, globalConfig) {
const map = commonProcessInputMap(input, initOptions, globalConfig);
assert(map.get(PlaceholderKey.dest), 'dest is required');
const bucket = map.get(PlaceholderKey.bucket);
assert(bucket, 'bucket is required');
assert(typeof bucket === 'string', 'bucket must be string');
const src = map.get(PlaceholderKey.src);
assert(src, 'src is required');
assert(typeof src === 'string');
return map;
}
//# sourceMappingURL=cp.js.map