pwd-fs 3.5.4 → 3.5.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bitmask.d.ts +10 -0
- package/dist/bitmask.js +10 -0
- package/dist/powered-file-system/append.d.ts +10 -0
- package/dist/powered-file-system/append.js +10 -0
- package/dist/powered-file-system/chmod.d.ts +10 -0
- package/dist/powered-file-system/chmod.js +10 -0
- package/dist/powered-file-system/chown.d.ts +10 -0
- package/dist/powered-file-system/chown.js +10 -0
- package/dist/powered-file-system/copy.d.ts +10 -0
- package/dist/powered-file-system/copy.js +10 -0
- package/dist/powered-file-system/empty-dir.d.ts +10 -0
- package/dist/powered-file-system/empty-dir.js +10 -0
- package/dist/powered-file-system/mkdir.d.ts +10 -0
- package/dist/powered-file-system/mkdir.js +10 -0
- package/dist/powered-file-system/read.d.ts +10 -0
- package/dist/powered-file-system/read.js +10 -0
- package/dist/powered-file-system/readdir.d.ts +10 -0
- package/dist/powered-file-system/readdir.js +10 -0
- package/dist/powered-file-system/readlink.d.ts +10 -0
- package/dist/powered-file-system/readlink.js +10 -0
- package/dist/powered-file-system/realpath.d.ts +10 -0
- package/dist/powered-file-system/realpath.js +10 -0
- package/dist/powered-file-system/remove.d.ts +10 -0
- package/dist/powered-file-system/remove.js +10 -0
- package/dist/powered-file-system/rename.d.ts +10 -0
- package/dist/powered-file-system/rename.js +10 -0
- package/dist/powered-file-system/stat.d.ts +10 -0
- package/dist/powered-file-system/stat.js +10 -0
- package/dist/powered-file-system/symlink.d.ts +10 -0
- package/dist/powered-file-system/symlink.js +10 -0
- package/dist/powered-file-system/test.d.ts +10 -0
- package/dist/powered-file-system/test.js +10 -0
- package/dist/powered-file-system/write.d.ts +10 -0
- package/dist/powered-file-system/write.js +10 -0
- package/dist/powered-file-system.d.ts +10 -0
- package/dist/powered-file-system.js +10 -0
- package/dist/recurse-io-sync.d.ts +10 -0
- package/dist/recurse-io-sync.js +10 -0
- package/dist/recurse-io.d.ts +10 -0
- package/dist/recurse-io.js +10 -0
- package/package.json +8 -19
- package/readme.md +273 -426
- package/dist/bitmask.test.d.ts +0 -1
- package/dist/bitmask.test.js +0 -29
- package/dist/powered-file-system/append.test.d.ts +0 -1
- package/dist/powered-file-system/append.test.js +0 -47
- package/dist/powered-file-system/chmod.test.d.ts +0 -1
- package/dist/powered-file-system/chmod.test.js +0 -71
- package/dist/powered-file-system/chown.test.d.ts +0 -1
- package/dist/powered-file-system/chown.test.js +0 -82
- package/dist/powered-file-system/copy.test.d.ts +0 -1
- package/dist/powered-file-system/copy.test.js +0 -128
- package/dist/powered-file-system/empty-dir.test.d.ts +0 -1
- package/dist/powered-file-system/empty-dir.test.js +0 -61
- package/dist/powered-file-system/mkdir.test.d.ts +0 -1
- package/dist/powered-file-system/mkdir.test.js +0 -116
- package/dist/powered-file-system/read.test.d.ts +0 -1
- package/dist/powered-file-system/read.test.js +0 -75
- package/dist/powered-file-system/readdir.test.d.ts +0 -1
- package/dist/powered-file-system/readdir.test.js +0 -72
- package/dist/powered-file-system/readlink.test.d.ts +0 -1
- package/dist/powered-file-system/readlink.test.js +0 -44
- package/dist/powered-file-system/realpath.test.d.ts +0 -1
- package/dist/powered-file-system/realpath.test.js +0 -44
- package/dist/powered-file-system/remove.test.d.ts +0 -1
- package/dist/powered-file-system/remove.test.js +0 -78
- package/dist/powered-file-system/rename.test.d.ts +0 -1
- package/dist/powered-file-system/rename.test.js +0 -70
- package/dist/powered-file-system/stat.test.d.ts +0 -1
- package/dist/powered-file-system/stat.test.js +0 -79
- package/dist/powered-file-system/symlink.test.d.ts +0 -1
- package/dist/powered-file-system/symlink.test.js +0 -77
- package/dist/powered-file-system/test.test.d.ts +0 -1
- package/dist/powered-file-system/test.test.js +0 -76
- package/dist/powered-file-system/write.test.d.ts +0 -1
- package/dist/powered-file-system/write.test.js +0 -97
- package/dist/powered-file-system.test.d.ts +0 -1
- package/dist/powered-file-system.test.js +0 -46
- package/dist/suite.test.d.ts +0 -1
- package/dist/suite.test.js +0 -40
- package/dist/test-utils.d.ts +0 -18
- package/dist/test-utils.js +0 -72
package/dist/bitmask.d.ts
CHANGED
|
@@ -1,3 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Module permission mask normalization helper for public stat-derived mode values.
|
|
3
|
+
*
|
|
4
|
+
* Allowed here:
|
|
5
|
+
* - extracting standard rwxrwxrwx permission bits;
|
|
6
|
+
* - rejecting non-number input before bit operations;
|
|
7
|
+
* - staying independent from filesystem reads and platform state.
|
|
8
|
+
*
|
|
9
|
+
* This file must not contain path resolution, filesystem access, or wrapper method wiring.
|
|
10
|
+
*/
|
|
1
11
|
/**
|
|
2
12
|
* Normalizes a permission mask to the standard rwxrwxrwx bit set.
|
|
3
13
|
*/
|
package/dist/bitmask.js
CHANGED
|
@@ -1,4 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Module permission mask normalization helper for public stat-derived mode values.
|
|
4
|
+
*
|
|
5
|
+
* Allowed here:
|
|
6
|
+
* - extracting standard rwxrwxrwx permission bits;
|
|
7
|
+
* - rejecting non-number input before bit operations;
|
|
8
|
+
* - staying independent from filesystem reads and platform state.
|
|
9
|
+
*
|
|
10
|
+
* This file must not contain path resolution, filesystem access, or wrapper method wiring.
|
|
11
|
+
*/
|
|
2
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
13
|
exports.bitmask = bitmask;
|
|
4
14
|
/**
|
|
@@ -1,3 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Module deprecated append method adapter for the path-aware filesystem wrapper.
|
|
3
|
+
*
|
|
4
|
+
* Allowed here:
|
|
5
|
+
* - preserving the legacy `append()` public method;
|
|
6
|
+
* - forwarding append behavior to `write()` with append flags;
|
|
7
|
+
* - keeping async and sync overloads aligned with the wrapper contract.
|
|
8
|
+
*
|
|
9
|
+
* This file must not contain independent file writing logic.
|
|
10
|
+
*/
|
|
1
11
|
import type { AsyncOption, MaybeSyncOption, PoweredFileSystem, SyncOption } from '../powered-file-system';
|
|
2
12
|
type AppendOptions = {
|
|
3
13
|
encoding?: BufferEncoding | null;
|
|
@@ -1,4 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Module deprecated append method adapter for the path-aware filesystem wrapper.
|
|
4
|
+
*
|
|
5
|
+
* Allowed here:
|
|
6
|
+
* - preserving the legacy `append()` public method;
|
|
7
|
+
* - forwarding append behavior to `write()` with append flags;
|
|
8
|
+
* - keeping async and sync overloads aligned with the wrapper contract.
|
|
9
|
+
*
|
|
10
|
+
* This file must not contain independent file writing logic.
|
|
11
|
+
*/
|
|
2
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
13
|
exports.append = append;
|
|
4
14
|
function append(src, data, options) {
|
|
@@ -1,3 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Module chmod method adapter for the path-aware filesystem wrapper.
|
|
3
|
+
*
|
|
4
|
+
* Allowed here:
|
|
5
|
+
* - resolving instance-relative paths before permission changes;
|
|
6
|
+
* - selecting async or sync recursive chmod implementation;
|
|
7
|
+
* - preserving wrapper error propagation for missing targets.
|
|
8
|
+
*
|
|
9
|
+
* This file must not contain recursive traversal logic.
|
|
10
|
+
*/
|
|
1
11
|
import type { AsyncOption, MaybeSyncOption, PoweredFileSystem, SyncOption } from '../powered-file-system';
|
|
2
12
|
/**
|
|
3
13
|
* Resolves the target path and delegates recursive mode updates.
|
|
@@ -1,4 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Module chmod method adapter for the path-aware filesystem wrapper.
|
|
4
|
+
*
|
|
5
|
+
* Allowed here:
|
|
6
|
+
* - resolving instance-relative paths before permission changes;
|
|
7
|
+
* - selecting async or sync recursive chmod implementation;
|
|
8
|
+
* - preserving wrapper error propagation for missing targets.
|
|
9
|
+
*
|
|
10
|
+
* This file must not contain recursive traversal logic.
|
|
11
|
+
*/
|
|
2
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
13
|
exports.chmod = chmod;
|
|
4
14
|
const recurse_io_1 = require("../recurse-io");
|
|
@@ -1,3 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Module chown method adapter for the path-aware filesystem wrapper.
|
|
3
|
+
*
|
|
4
|
+
* Allowed here:
|
|
5
|
+
* - resolving instance-relative paths before ownership changes;
|
|
6
|
+
* - preserving Windows path validation without POSIX ownership mutation;
|
|
7
|
+
* - selecting async or sync recursive chown implementation.
|
|
8
|
+
*
|
|
9
|
+
* This file must not contain generic permission or copy behavior.
|
|
10
|
+
*/
|
|
1
11
|
import type { AsyncOption, MaybeSyncOption, PoweredFileSystem, SyncOption } from '../powered-file-system';
|
|
2
12
|
/**
|
|
3
13
|
* Resolves the target path and applies recursive ownership changes where supported.
|
|
@@ -1,4 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Module chown method adapter for the path-aware filesystem wrapper.
|
|
4
|
+
*
|
|
5
|
+
* Allowed here:
|
|
6
|
+
* - resolving instance-relative paths before ownership changes;
|
|
7
|
+
* - preserving Windows path validation without POSIX ownership mutation;
|
|
8
|
+
* - selecting async or sync recursive chown implementation.
|
|
9
|
+
*
|
|
10
|
+
* This file must not contain generic permission or copy behavior.
|
|
11
|
+
*/
|
|
2
12
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
13
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
14
|
};
|
|
@@ -1,3 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Module copy method adapter for the path-aware filesystem wrapper.
|
|
3
|
+
*
|
|
4
|
+
* Allowed here:
|
|
5
|
+
* - resolving source and destination paths against the instance base path;
|
|
6
|
+
* - shaping copy options for recursive copy implementations;
|
|
7
|
+
* - selecting async or sync copy execution.
|
|
8
|
+
*
|
|
9
|
+
* This file must not contain recursive copy traversal or collision replacement algorithms.
|
|
10
|
+
*/
|
|
1
11
|
import type { AsyncOption, CopyFilter, MaybeSyncOption, PoweredFileSystem, SyncOption } from '../powered-file-system';
|
|
2
12
|
type CopyOptions = {
|
|
3
13
|
umask?: number;
|
|
@@ -1,4 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Module copy method adapter for the path-aware filesystem wrapper.
|
|
4
|
+
*
|
|
5
|
+
* Allowed here:
|
|
6
|
+
* - resolving source and destination paths against the instance base path;
|
|
7
|
+
* - shaping copy options for recursive copy implementations;
|
|
8
|
+
* - selecting async or sync copy execution.
|
|
9
|
+
*
|
|
10
|
+
* This file must not contain recursive copy traversal or collision replacement algorithms.
|
|
11
|
+
*/
|
|
2
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
13
|
exports.copy = copy;
|
|
4
14
|
const recurse_io_1 = require("../recurse-io");
|
|
@@ -1,3 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Module empty-directory method adapter for the path-aware filesystem wrapper.
|
|
3
|
+
*
|
|
4
|
+
* Allowed here:
|
|
5
|
+
* - resolving the target directory against the instance base path;
|
|
6
|
+
* - preserving the directory while delegating entry removal;
|
|
7
|
+
* - selecting async or sync empty-directory execution.
|
|
8
|
+
*
|
|
9
|
+
* This file must not contain recursive removal algorithms.
|
|
10
|
+
*/
|
|
1
11
|
import type { AsyncOption, MaybeSyncOption, PoweredFileSystem, SyncOption } from '../powered-file-system';
|
|
2
12
|
/**
|
|
3
13
|
* Removes directory contents while preserving the directory itself.
|
|
@@ -1,4 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Module empty-directory method adapter for the path-aware filesystem wrapper.
|
|
4
|
+
*
|
|
5
|
+
* Allowed here:
|
|
6
|
+
* - resolving the target directory against the instance base path;
|
|
7
|
+
* - preserving the directory while delegating entry removal;
|
|
8
|
+
* - selecting async or sync empty-directory execution.
|
|
9
|
+
*
|
|
10
|
+
* This file must not contain recursive removal algorithms.
|
|
11
|
+
*/
|
|
2
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
13
|
exports.emptyDir = emptyDir;
|
|
4
14
|
const recurse_io_1 = require("../recurse-io");
|
|
@@ -1,3 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Module mkdir method adapter for the path-aware filesystem wrapper.
|
|
3
|
+
*
|
|
4
|
+
* Allowed here:
|
|
5
|
+
* - resolving directory paths against the instance base path;
|
|
6
|
+
* - applying wrapper umask options to recursive directory creation;
|
|
7
|
+
* - selecting async or sync mkdir execution.
|
|
8
|
+
*
|
|
9
|
+
* This file must not contain unrelated file creation or cleanup behavior.
|
|
10
|
+
*/
|
|
1
11
|
import type { AsyncOption, MaybeSyncOption, PoweredFileSystem, SyncOption } from '../powered-file-system';
|
|
2
12
|
type MkdirOptions = {
|
|
3
13
|
umask?: number;
|
|
@@ -1,4 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Module mkdir method adapter for the path-aware filesystem wrapper.
|
|
4
|
+
*
|
|
5
|
+
* Allowed here:
|
|
6
|
+
* - resolving directory paths against the instance base path;
|
|
7
|
+
* - applying wrapper umask options to recursive directory creation;
|
|
8
|
+
* - selecting async or sync mkdir execution.
|
|
9
|
+
*
|
|
10
|
+
* This file must not contain unrelated file creation or cleanup behavior.
|
|
11
|
+
*/
|
|
2
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
13
|
exports.mkdir = mkdir;
|
|
4
14
|
const recurse_io_1 = require("../recurse-io");
|
|
@@ -1,3 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Module read method adapter for the path-aware filesystem wrapper.
|
|
3
|
+
*
|
|
4
|
+
* Allowed here:
|
|
5
|
+
* - resolving file paths against the instance base path;
|
|
6
|
+
* - preserving string and Buffer return modes from read options;
|
|
7
|
+
* - selecting async or sync file read execution.
|
|
8
|
+
*
|
|
9
|
+
* This file must not contain parsing, transformation, or stream handling.
|
|
10
|
+
*/
|
|
1
11
|
import type { AsyncOption, MaybeSyncOption, PoweredFileSystem, ReadOptions, SyncOption } from '../powered-file-system';
|
|
2
12
|
/**
|
|
3
13
|
* Reads a file relative to `pwd` and preserves Buffer mode when `encoding` is `null`.
|
|
@@ -1,4 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Module read method adapter for the path-aware filesystem wrapper.
|
|
4
|
+
*
|
|
5
|
+
* Allowed here:
|
|
6
|
+
* - resolving file paths against the instance base path;
|
|
7
|
+
* - preserving string and Buffer return modes from read options;
|
|
8
|
+
* - selecting async or sync file read execution.
|
|
9
|
+
*
|
|
10
|
+
* This file must not contain parsing, transformation, or stream handling.
|
|
11
|
+
*/
|
|
2
12
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
13
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
14
|
};
|
|
@@ -1,3 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Module readdir method adapter for the path-aware filesystem wrapper.
|
|
3
|
+
*
|
|
4
|
+
* Allowed here:
|
|
5
|
+
* - resolving directory paths against the instance base path;
|
|
6
|
+
* - preserving string and Buffer entry modes from readdir options;
|
|
7
|
+
* - selecting async or sync directory listing execution.
|
|
8
|
+
*
|
|
9
|
+
* This file must not contain recursive traversal or filtering policy.
|
|
10
|
+
*/
|
|
1
11
|
import type { AsyncOption, MaybeSyncOption, PoweredFileSystem, ReaddirOptions, SyncOption } from '../powered-file-system';
|
|
2
12
|
/**
|
|
3
13
|
* Lists directory entries relative to the instance base path.
|
|
@@ -1,4 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Module readdir method adapter for the path-aware filesystem wrapper.
|
|
4
|
+
*
|
|
5
|
+
* Allowed here:
|
|
6
|
+
* - resolving directory paths against the instance base path;
|
|
7
|
+
* - preserving string and Buffer entry modes from readdir options;
|
|
8
|
+
* - selecting async or sync directory listing execution.
|
|
9
|
+
*
|
|
10
|
+
* This file must not contain recursive traversal or filtering policy.
|
|
11
|
+
*/
|
|
2
12
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
13
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
14
|
};
|
|
@@ -1,3 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Module readlink method adapter for the path-aware filesystem wrapper.
|
|
3
|
+
*
|
|
4
|
+
* Allowed here:
|
|
5
|
+
* - resolving link paths against the instance base path;
|
|
6
|
+
* - preserving Node readlink encoding behavior;
|
|
7
|
+
* - selecting async or sync symbolic-link target reads.
|
|
8
|
+
*
|
|
9
|
+
* This file must not contain canonical path resolution or symlink creation.
|
|
10
|
+
*/
|
|
1
11
|
import type { AsyncOption, MaybeSyncOption, PoweredFileSystem, SyncOption } from '../powered-file-system';
|
|
2
12
|
/**
|
|
3
13
|
* Reads the target path stored in a symbolic link.
|
|
@@ -1,4 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Module readlink method adapter for the path-aware filesystem wrapper.
|
|
4
|
+
*
|
|
5
|
+
* Allowed here:
|
|
6
|
+
* - resolving link paths against the instance base path;
|
|
7
|
+
* - preserving Node readlink encoding behavior;
|
|
8
|
+
* - selecting async or sync symbolic-link target reads.
|
|
9
|
+
*
|
|
10
|
+
* This file must not contain canonical path resolution or symlink creation.
|
|
11
|
+
*/
|
|
2
12
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
13
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
14
|
};
|
|
@@ -1,3 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Module realpath method adapter for the path-aware filesystem wrapper.
|
|
3
|
+
*
|
|
4
|
+
* Allowed here:
|
|
5
|
+
* - resolving input paths against the instance base path;
|
|
6
|
+
* - delegating canonical path resolution to Node filesystem APIs;
|
|
7
|
+
* - selecting async or sync realpath execution.
|
|
8
|
+
*
|
|
9
|
+
* This file must not contain symlink creation or raw link-target reads.
|
|
10
|
+
*/
|
|
1
11
|
import type { AsyncOption, MaybeSyncOption, PoweredFileSystem, SyncOption } from '../powered-file-system';
|
|
2
12
|
/**
|
|
3
13
|
* Resolves a path to its canonical absolute location.
|
|
@@ -1,4 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Module realpath method adapter for the path-aware filesystem wrapper.
|
|
4
|
+
*
|
|
5
|
+
* Allowed here:
|
|
6
|
+
* - resolving input paths against the instance base path;
|
|
7
|
+
* - delegating canonical path resolution to Node filesystem APIs;
|
|
8
|
+
* - selecting async or sync realpath execution.
|
|
9
|
+
*
|
|
10
|
+
* This file must not contain symlink creation or raw link-target reads.
|
|
11
|
+
*/
|
|
2
12
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
13
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
14
|
};
|
|
@@ -1,3 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Module remove method adapter for the path-aware filesystem wrapper.
|
|
3
|
+
*
|
|
4
|
+
* Allowed here:
|
|
5
|
+
* - resolving removal targets against the instance base path;
|
|
6
|
+
* - delegating recursive removal while preserving symlink behavior;
|
|
7
|
+
* - selecting async or sync remove execution.
|
|
8
|
+
*
|
|
9
|
+
* This file must not contain directory-emptying or copy replacement policy.
|
|
10
|
+
*/
|
|
1
11
|
import type { AsyncOption, MaybeSyncOption, PoweredFileSystem, SyncOption } from '../powered-file-system';
|
|
2
12
|
/**
|
|
3
13
|
* Removes a path relative to the instance base path.
|
|
@@ -1,4 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Module remove method adapter for the path-aware filesystem wrapper.
|
|
4
|
+
*
|
|
5
|
+
* Allowed here:
|
|
6
|
+
* - resolving removal targets against the instance base path;
|
|
7
|
+
* - delegating recursive removal while preserving symlink behavior;
|
|
8
|
+
* - selecting async or sync remove execution.
|
|
9
|
+
*
|
|
10
|
+
* This file must not contain directory-emptying or copy replacement policy.
|
|
11
|
+
*/
|
|
2
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
13
|
exports.remove = remove;
|
|
4
14
|
const recurse_io_1 = require("../recurse-io");
|
|
@@ -1,3 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Module rename method adapter for the path-aware filesystem wrapper.
|
|
3
|
+
*
|
|
4
|
+
* Allowed here:
|
|
5
|
+
* - resolving source and destination paths against the instance base path;
|
|
6
|
+
* - delegating rename operations to Node filesystem APIs;
|
|
7
|
+
* - selecting async or sync rename execution.
|
|
8
|
+
*
|
|
9
|
+
* This file must not contain recursive copy or overwrite replacement behavior.
|
|
10
|
+
*/
|
|
1
11
|
import type { AsyncOption, MaybeSyncOption, PoweredFileSystem, SyncOption } from '../powered-file-system';
|
|
2
12
|
/**
|
|
3
13
|
* Resolves both paths against the instance base path before delegating to Node's rename API.
|
|
@@ -1,4 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Module rename method adapter for the path-aware filesystem wrapper.
|
|
4
|
+
*
|
|
5
|
+
* Allowed here:
|
|
6
|
+
* - resolving source and destination paths against the instance base path;
|
|
7
|
+
* - delegating rename operations to Node filesystem APIs;
|
|
8
|
+
* - selecting async or sync rename execution.
|
|
9
|
+
*
|
|
10
|
+
* This file must not contain recursive copy or overwrite replacement behavior.
|
|
11
|
+
*/
|
|
2
12
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
13
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
14
|
};
|
|
@@ -1,3 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Module stat method adapter for the path-aware filesystem wrapper.
|
|
3
|
+
*
|
|
4
|
+
* Allowed here:
|
|
5
|
+
* - resolving paths against the instance base path;
|
|
6
|
+
* - returning `lstat` data so symbolic links remain observable;
|
|
7
|
+
* - selecting async or sync stat execution.
|
|
8
|
+
*
|
|
9
|
+
* This file must not contain permission normalization or existence fallback behavior.
|
|
10
|
+
*/
|
|
1
11
|
import type { AsyncOption, MaybeSyncOption, PoweredFileSystem, Stats, SyncOption } from '../powered-file-system';
|
|
2
12
|
/**
|
|
3
13
|
* Returns `lstat` data so symlinks are reported as links instead of followed targets.
|
|
@@ -1,4 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Module stat method adapter for the path-aware filesystem wrapper.
|
|
4
|
+
*
|
|
5
|
+
* Allowed here:
|
|
6
|
+
* - resolving paths against the instance base path;
|
|
7
|
+
* - returning `lstat` data so symbolic links remain observable;
|
|
8
|
+
* - selecting async or sync stat execution.
|
|
9
|
+
*
|
|
10
|
+
* This file must not contain permission normalization or existence fallback behavior.
|
|
11
|
+
*/
|
|
2
12
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
13
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
14
|
};
|
|
@@ -1,3 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Module symlink method adapter for the path-aware filesystem wrapper.
|
|
3
|
+
*
|
|
4
|
+
* Allowed here:
|
|
5
|
+
* - resolving source and destination paths against the instance base path;
|
|
6
|
+
* - handling Windows symlink type requirements;
|
|
7
|
+
* - selecting async or sync symbolic-link creation.
|
|
8
|
+
*
|
|
9
|
+
* This file must not contain link target reading or canonical path resolution.
|
|
10
|
+
*/
|
|
1
11
|
import type { AsyncOption, MaybeSyncOption, PoweredFileSystem, SyncOption } from '../powered-file-system';
|
|
2
12
|
export declare function symlink(this: PoweredFileSystem, src: string, dest: string, options: SyncOption): void;
|
|
3
13
|
export declare function symlink(this: PoweredFileSystem, src: string, dest: string, options?: AsyncOption): Promise<void>;
|
|
@@ -1,4 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Module symlink method adapter for the path-aware filesystem wrapper.
|
|
4
|
+
*
|
|
5
|
+
* Allowed here:
|
|
6
|
+
* - resolving source and destination paths against the instance base path;
|
|
7
|
+
* - handling Windows symlink type requirements;
|
|
8
|
+
* - selecting async or sync symbolic-link creation.
|
|
9
|
+
*
|
|
10
|
+
* This file must not contain link target reading or canonical path resolution.
|
|
11
|
+
*/
|
|
2
12
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
13
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
14
|
};
|
|
@@ -1,3 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Module access-test method adapter for the path-aware filesystem wrapper.
|
|
3
|
+
*
|
|
4
|
+
* Allowed here:
|
|
5
|
+
* - resolving paths against the instance base path;
|
|
6
|
+
* - mapping wrapper access flags to Node access constants;
|
|
7
|
+
* - converting access errors into boolean results.
|
|
8
|
+
*
|
|
9
|
+
* This file must not contain stat metadata reads or mutation behavior.
|
|
10
|
+
*/
|
|
1
11
|
import type { AsyncOption, MaybeSyncOption, Mode, PoweredFileSystem, SyncOption } from '../powered-file-system';
|
|
2
12
|
/**
|
|
3
13
|
* Thin wrapper around `fs.access` that resolves paths against the instance base path.
|
|
@@ -1,4 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Module access-test method adapter for the path-aware filesystem wrapper.
|
|
4
|
+
*
|
|
5
|
+
* Allowed here:
|
|
6
|
+
* - resolving paths against the instance base path;
|
|
7
|
+
* - mapping wrapper access flags to Node access constants;
|
|
8
|
+
* - converting access errors into boolean results.
|
|
9
|
+
*
|
|
10
|
+
* This file must not contain stat metadata reads or mutation behavior.
|
|
11
|
+
*/
|
|
2
12
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
13
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
14
|
};
|
|
@@ -1,3 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Module write method adapter for the path-aware filesystem wrapper.
|
|
3
|
+
*
|
|
4
|
+
* Allowed here:
|
|
5
|
+
* - resolving file paths against the instance base path;
|
|
6
|
+
* - applying write options and explicit final permissions;
|
|
7
|
+
* - selecting async or sync file write execution.
|
|
8
|
+
*
|
|
9
|
+
* This file must not contain append compatibility routing or stream handling.
|
|
10
|
+
*/
|
|
1
11
|
import type { AsyncOption, Flag, MaybeSyncOption, PoweredFileSystem, SyncOption } from '../powered-file-system';
|
|
2
12
|
type WriteOptions = {
|
|
3
13
|
encoding?: BufferEncoding | null;
|
|
@@ -1,4 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Module write method adapter for the path-aware filesystem wrapper.
|
|
4
|
+
*
|
|
5
|
+
* Allowed here:
|
|
6
|
+
* - resolving file paths against the instance base path;
|
|
7
|
+
* - applying write options and explicit final permissions;
|
|
8
|
+
* - selecting async or sync file write execution.
|
|
9
|
+
*
|
|
10
|
+
* This file must not contain append compatibility routing or stream handling.
|
|
11
|
+
*/
|
|
2
12
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
13
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
14
|
};
|
|
@@ -1,3 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Module public path-aware filesystem wrapper contract.
|
|
3
|
+
*
|
|
4
|
+
* Allowed here:
|
|
5
|
+
* - defining public method overloads and shared option types;
|
|
6
|
+
* - binding method modules to a resolved instance base path;
|
|
7
|
+
* - exposing permission constants and public helpers.
|
|
8
|
+
*
|
|
9
|
+
* This file must not contain recursive filesystem algorithms or test fixture behavior.
|
|
10
|
+
*/
|
|
1
11
|
import fs from 'node:fs';
|
|
2
12
|
import { bitmask } from './bitmask';
|
|
3
13
|
/**
|
|
@@ -1,4 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Module public path-aware filesystem wrapper contract.
|
|
4
|
+
*
|
|
5
|
+
* Allowed here:
|
|
6
|
+
* - defining public method overloads and shared option types;
|
|
7
|
+
* - binding method modules to a resolved instance base path;
|
|
8
|
+
* - exposing permission constants and public helpers.
|
|
9
|
+
*
|
|
10
|
+
* This file must not contain recursive filesystem algorithms or test fixture behavior.
|
|
11
|
+
*/
|
|
2
12
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
13
|
if (k2 === undefined) k2 = k;
|
|
4
14
|
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
@@ -1,3 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Module synchronous recursive filesystem algorithms.
|
|
3
|
+
*
|
|
4
|
+
* Allowed here:
|
|
5
|
+
* - mirroring recursive filesystem behavior for `{ sync: true }` calls;
|
|
6
|
+
* - applying replace-before-copy and permission rules synchronously;
|
|
7
|
+
* - sharing only option shapes with the asynchronous recursive module.
|
|
8
|
+
*
|
|
9
|
+
* This file must not contain Promise or callback orchestration.
|
|
10
|
+
*/
|
|
1
11
|
import type { ICopyOptions } from './recurse-io';
|
|
2
12
|
/**
|
|
3
13
|
* Synchronous counterpart of the recursive chmod implementation.
|
package/dist/recurse-io-sync.js
CHANGED
|
@@ -1,4 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Module synchronous recursive filesystem algorithms.
|
|
4
|
+
*
|
|
5
|
+
* Allowed here:
|
|
6
|
+
* - mirroring recursive filesystem behavior for `{ sync: true }` calls;
|
|
7
|
+
* - applying replace-before-copy and permission rules synchronously;
|
|
8
|
+
* - sharing only option shapes with the asynchronous recursive module.
|
|
9
|
+
*
|
|
10
|
+
* This file must not contain Promise or callback orchestration.
|
|
11
|
+
*/
|
|
2
12
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
13
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
14
|
};
|
package/dist/recurse-io.d.ts
CHANGED
|
@@ -1,3 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Module asynchronous recursive filesystem algorithms.
|
|
3
|
+
*
|
|
4
|
+
* Allowed here:
|
|
5
|
+
* - traversing filesystem trees with callback-based Node APIs;
|
|
6
|
+
* - preserving recursive chmod, chown, copy, remove, empty, and mkdir semantics;
|
|
7
|
+
* - normalizing callback completion for concurrent recursive branches.
|
|
8
|
+
*
|
|
9
|
+
* This file must not contain public path-aware wrapper overloads or synchronous variants.
|
|
10
|
+
*/
|
|
1
11
|
import { NoParamCallback } from 'node:fs';
|
|
2
12
|
export interface ICopyOptions {
|
|
3
13
|
umask: number;
|
package/dist/recurse-io.js
CHANGED
|
@@ -1,4 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Module asynchronous recursive filesystem algorithms.
|
|
4
|
+
*
|
|
5
|
+
* Allowed here:
|
|
6
|
+
* - traversing filesystem trees with callback-based Node APIs;
|
|
7
|
+
* - preserving recursive chmod, chown, copy, remove, empty, and mkdir semantics;
|
|
8
|
+
* - normalizing callback completion for concurrent recursive branches.
|
|
9
|
+
*
|
|
10
|
+
* This file must not contain public path-aware wrapper overloads or synchronous variants.
|
|
11
|
+
*/
|
|
2
12
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
13
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
14
|
};
|