builder-util
Advanced tools
Comparing version 4.2.2 to 4.2.3
@@ -45,2 +45,3 @@ /// <reference types="node" /> | ||
export declare function copyDir(src: string, destination: string, options?: CopyDirOptions): Promise<any>; | ||
export declare function copyDirUsingHardLinks(source: string, destination: string): Promise<string>; | ||
export declare const DO_NOT_USE_HARD_LINKS: (file: string) => boolean; | ||
@@ -47,0 +48,0 @@ export declare const USE_HARD_LINKS: (file: string) => boolean; |
@@ -124,2 +124,3 @@ "use strict"; | ||
exports.copyDir = copyDir; | ||
exports.copyDirUsingHardLinks = copyDirUsingHardLinks; | ||
@@ -152,2 +153,8 @@ var _fsExtraP; | ||
var _util; | ||
function _load_util() { | ||
return _util = require("./util"); | ||
} | ||
var _promise; | ||
@@ -313,4 +320,18 @@ | ||
} | ||
// https://unix.stackexchange.com/questions/202430/how-to-copy-a-directory-recursively-using-hardlinks-for-each-file | ||
function copyDirUsingHardLinks(source, destination) { | ||
if (process.platform !== "darwin") { | ||
const args = ["-d", "--recursive", "--preserve=mode"]; | ||
args.push("--link"); | ||
args.push(source + "/", destination + "/"); | ||
return (0, (_fsExtraP || _load_fsExtraP()).ensureDir)(_path.dirname(destination)).then(() => (0, (_util || _load_util()).exec)("cp", args)); | ||
} | ||
// pax requires created dir | ||
const promise = (0, (_fsExtraP || _load_fsExtraP()).ensureDir)(destination); | ||
return promise.then(() => (0, (_util || _load_util()).exec)("pax", ["-rwl", "-p", "amp" /* Do not preserve file access times, Do not preserve file modification times, Preserve the file mode bits */, ".", destination], { | ||
cwd: source | ||
})); | ||
} | ||
const DO_NOT_USE_HARD_LINKS = exports.DO_NOT_USE_HARD_LINKS = file => false; | ||
const USE_HARD_LINKS = exports.USE_HARD_LINKS = file => true; | ||
//# sourceMappingURL=fs.js.map |
@@ -474,3 +474,3 @@ "use strict"; | ||
function replaceDefault(inList, defaultList) { | ||
if (inList == null) { | ||
if (inList == null || inList.length === 1 && inList[0] === "default") { | ||
return defaultList; | ||
@@ -477,0 +477,0 @@ } |
{ | ||
"name": "builder-util", | ||
"version": "4.2.2", | ||
"version": "4.2.3", | ||
"main": "out/util.js", | ||
@@ -23,3 +23,3 @@ "author": "Vladimir Krivosheev", | ||
"source-map-support": "^0.5.3", | ||
"7zip-bin": "^2.4.1", | ||
"7zip-bin": "~3.0.0", | ||
"ini": "^1.3.5", | ||
@@ -26,0 +26,0 @@ "tunnel-agent": "^0.6.0", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
205823
2530
+ Added7zip-bin@3.0.0(transitive)
- Removed7zip-bin@2.4.1(transitive)
- Removed7zip-bin-linux@1.3.1(transitive)
- Removed7zip-bin-mac@1.0.1(transitive)
- Removed7zip-bin-win@2.1.1(transitive)
Updated7zip-bin@~3.0.0