UEA-PRODEM

This commit is contained in:
2026-06-10 12:14:46 -03:00
parent f54126b9d8
commit 9947565694
5319 changed files with 148520 additions and 129332 deletions
+3 -3
View File
@@ -1,6 +1,6 @@
{
"name": "@humanfs/node",
"version": "0.16.7",
"version": "0.16.8",
"description": "The Node.js bindings of the humanfs library.",
"type": "module",
"main": "dist/index.js",
@@ -47,12 +47,12 @@
"devDependencies": {
"@types/node": "^20.9.4",
"@humanfs/test": "^0.15.0",
"@humanfs/types": "^0.15.0",
"mocha": "^10.2.0",
"typescript": "^5.2.2"
},
"dependencies": {
"@humanwhocodes/retry": "^0.4.0",
"@humanfs/core": "^0.19.1"
"@humanfs/core": "^0.19.2",
"@humanfs/types": "^0.15.0"
}
}
+10 -2
View File
@@ -359,7 +359,12 @@ export class NodeHfsImpl {
* @throws {Error} If the source file is a directory.
* @throws {Error} If the destination file is a directory.
*/
copy(source, destination) {
async copy(source, destination) {
const stat = await this.#fsp.lstat(source);
if (stat.isSymbolicLink()) {
const target = await this.#fsp.readlink(source);
return this.#fsp.symlink(target, destination);
}
return this.#fsp.copyFile(source, destination);
}
@@ -393,7 +398,10 @@ export class NodeHfsImpl {
const fromEntryPath = path.join(sourceStr, entry.name);
const toEntryPath = path.join(destinationStr, entry.name);
if (entry.isDirectory) {
if (entry.isSymlink) {
const target = await this.#fsp.readlink(fromEntryPath);
await this.#fsp.symlink(target, toEntryPath);
} else if (entry.isDirectory) {
await this.copyAll(fromEntryPath, toEntryPath);
} else {
await this.copy(fromEntryPath, toEntryPath);