update change cli
This commit is contained in:
@@ -152,10 +152,10 @@ export class SyncBase {
|
||||
async getSyncDirectoryList() {
|
||||
const config = this.config;
|
||||
const syncDirectory = config?.syncDirectory || [];
|
||||
let obj: Record<string, string> = {};
|
||||
let obj: Record<string, any> = {};
|
||||
const keys: string[] = [];
|
||||
for (let item of syncDirectory) {
|
||||
const { registry, ignore = [], files = [], replace = {} } = item;
|
||||
const { registry, ignore = [], files = [], replace = {}, meta } = item;
|
||||
const cwd = this.#dir;
|
||||
const glob_files = await glob(files, {
|
||||
ignore: this.getIngore(ignore),
|
||||
@@ -182,7 +182,10 @@ export class SyncBase {
|
||||
const pathname = path.join(_registryURL.pathname, newKey);
|
||||
_registryURL.pathname = pathname;
|
||||
keys.push(key);
|
||||
obj[key] = _registryURL.toString();
|
||||
obj[key] = { url: _registryURL.toString() };
|
||||
if (meta) {
|
||||
obj[key] = { ...obj[key], meta };
|
||||
}
|
||||
}
|
||||
}
|
||||
return { sync: obj, keys };
|
||||
|
||||
Reference in New Issue
Block a user