hlink
Advanced tools
Comparing version 0.6.0-next.2 to 0.6.0-next.3
@@ -28,8 +28,11 @@ import chalk from 'chalk'; | ||
if (!isSupported) { | ||
delete sourceMap[fullPath]; | ||
excludeFiles.push(fullPath); | ||
} | ||
else if (openCache && cached.indexOf(fullPath) > -1) { | ||
delete sourceMap[fullPath]; | ||
cacheFiles.push(fullPath); | ||
} | ||
else if (dstInodes.indexOf(inode) > -1) { | ||
delete sourceMap[fullPath]; | ||
existFiles.push(fullPath); | ||
@@ -36,0 +39,0 @@ } |
@@ -138,3 +138,3 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
endLog(successCount, failCount, jumpCount, failReasons); | ||
log.info('正在写入缓存...'); | ||
log.info('正在写入硬链记录...'); | ||
// 移除失败的文件 | ||
@@ -149,3 +149,3 @@ failFiles.forEach(function (f) { | ||
}); | ||
log.success('缓存写入成功!'); | ||
log.success('硬链记录写入成功!'); | ||
_b.label = 6; | ||
@@ -152,0 +152,0 @@ case 6: |
@@ -30,3 +30,3 @@ import hlink from './hlink.js'; | ||
global.printOnExit = function () { | ||
log.info('手动打断硬链过程,不会保存缓存'); | ||
log.info('手动打断硬链过程,不会保存硬链记录'); | ||
}; | ||
@@ -33,0 +33,0 @@ hlink(inputs, flags); |
@@ -44,10 +44,12 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
'Invalid cross-device link': function () { | ||
log.info('跨设备硬链,以下两种情况属于跨设备硬链:'); | ||
log.info(" 1. \u8BF7\u68C0\u67E5\u662F\u5426\u8DE8\u76D8\uFF01"); | ||
log.info(" 2. \u8BF7\u68C0\u67E5\u662F\u5426\u8DE8\u8D8A\u5171\u4EAB\u6587\u4EF6\u5939! \u76EE\u524D\u53EA\u652F\u6301\u7FA4\u6656ext4\u624D\u80FD\u540C\u76D8\u8DE8\u5171\u4EAB\u6587\u4EF6\u5939\u786C\u94FE"); | ||
console.log(); | ||
log.warn('跨设备硬链,以下两种情况属于跨设备硬链:'); | ||
log.warn(" 1. \u8BF7\u68C0\u67E5\u662F\u5426\u8DE8\u76D8\uFF01"); | ||
log.warn(" 2. \u8BF7\u68C0\u67E5\u662F\u5426\u8DE8\u8D8A\u5171\u4EAB\u6587\u4EF6\u5939! \u76EE\u524D\u53EA\u652F\u6301\u7FA4\u6656ext4\u624D\u80FD\u540C\u76D8\u8DE8\u5171\u4EAB\u6587\u4EF6\u5939\u786C\u94FE"); | ||
return false; | ||
}, | ||
'Operation not permitted': function () { | ||
log.info('hlink没有权限'); | ||
log.info(" \u8BD5\u8BD5\u4F7F\u7528sudo\u6267\u884C: " + chalk.cyan('sudo hlink xxxx')); | ||
console.log(); | ||
log.warn('hlink没有权限'); | ||
log.warn(" \u8BD5\u8BD5\u4F7F\u7528sudo\u6267\u884C: " + chalk.cyan('sudo hlink xxxx')); | ||
return false; | ||
@@ -99,3 +101,3 @@ }, | ||
ignore, | ||
chalk.gray(getDirBasePath(source, sourceFile)) + " " + chalk.cyan('-->') + " " + getDirBasePath(dest, path.join(originalDestPath, path.basename(sourceFile))) | ||
chalk.gray(getDirBasePath(source, sourceFile)) + " " + chalk.cyan('>') + " " + getDirBasePath(dest, path.join(originalDestPath, path.basename(sourceFile))) | ||
], | ||
@@ -102,0 +104,0 @@ path: sourceFile |
@@ -181,7 +181,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
console.log(); | ||
log.warn('以下文件存在问题:'); | ||
failReasons.forEach(function (key) { | ||
log.warn('', chalk.yellow(key + ':')); | ||
log.warn('', chalk.yellow(key)); | ||
failFiles[key].forEach(function (v) { return log.warn('', '', v); }); | ||
}); | ||
log.warn('以上文件存在问题'); | ||
console.log(); | ||
@@ -188,0 +188,0 @@ } |
{ | ||
"name": "hlink", | ||
"version": "0.6.0-next.2", | ||
"version": "0.6.0-next.3", | ||
"description": "hlink", | ||
@@ -39,5 +39,2 @@ "license": "MIT", | ||
"dependencies": { | ||
"@types/fs-extra": "^9.0.6", | ||
"@types/inquirer": "^7.3.1", | ||
"@types/node": "^14.14.25", | ||
"ansi-escapes": "^5.0.0", | ||
@@ -48,10 +45,11 @@ "chalk": "^4.1.0", | ||
"fs-extra": "^9.0.1", | ||
"global": "^4.4.0", | ||
"inquirer": "^7.3.3", | ||
"meow": "^10.1.2", | ||
"progress": "^2.0.3", | ||
"single-line-log": "^1.1.2", | ||
"wrap-ansi": "^8.0.1" | ||
}, | ||
"devDependencies": { | ||
"@types/fs-extra": "^9.0.6", | ||
"@types/inquirer": "^7.3.1", | ||
"@types/node": "^14.14.25", | ||
"@types/meow": "^5.0.0", | ||
@@ -58,0 +56,0 @@ "@types/single-line-log": "^1.1.0", |
89326
9
1754
16
- Removed@types/fs-extra@^9.0.6
- Removed@types/inquirer@^7.3.1
- Removed@types/node@^14.14.25
- Removedglobal@^4.4.0
- Removedsingle-line-log@^1.1.2
- Removed@types/fs-extra@9.0.13(transitive)
- Removed@types/inquirer@7.3.3(transitive)
- Removed@types/node@14.18.63(transitive)
- Removed@types/through@0.0.33(transitive)
- Removedansi-regex@2.1.1(transitive)
- Removedcode-point-at@1.1.0(transitive)
- Removeddom-walk@0.1.2(transitive)
- Removedglobal@4.4.0(transitive)
- Removedis-fullwidth-code-point@1.0.0(transitive)
- Removedmin-document@2.19.0(transitive)
- Removednumber-is-nan@1.0.1(transitive)
- Removedprocess@0.11.10(transitive)
- Removedsingle-line-log@1.1.2(transitive)
- Removedstring-width@1.0.2(transitive)
- Removedstrip-ansi@3.0.1(transitive)