instrumentality 0.0.7 → 0.0.8
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/README.md +2 -2
- package/dist/base.d.ts +11 -12
- package/dist/base.d.ts.map +1 -1
- package/dist/base.js +23 -39
- package/dist/dom.d.ts +1 -6
- package/dist/dom.d.ts.map +1 -1
- package/dist/dom.js +1 -6
- package/dist/road.d.ts +130 -92
- package/dist/road.d.ts.map +1 -1
- package/dist/road.js +435 -313
- package/package.json +5 -3
- package/src/base.ts +22 -43
- package/src/dom.ts +1 -10
- package/src/road.ts +394 -350
package/README.md
CHANGED
|
@@ -13,13 +13,13 @@ A combination of files to handle TS/JS by itself, Node and DOM (for web) that pr
|
|
|
13
13
|
#
|
|
14
14
|
### How to use
|
|
15
15
|
```sh
|
|
16
|
-
npm install
|
|
16
|
+
npm install instrumentality
|
|
17
17
|
```
|
|
18
18
|
then
|
|
19
19
|
```ts
|
|
20
20
|
import * as ins from "instrumentality" // Base
|
|
21
21
|
import * as ind from "instrumentality/dom" // Browser (if available)
|
|
22
|
-
import * as inr from "instrumentality/road" // Filesystem using Node.js (if available)
|
|
22
|
+
import * as inr from "instrumentality/road" // Filesystem using Node.js (if available, deno 2 support is experimental)
|
|
23
23
|
```
|
|
24
24
|
thats literally it
|
|
25
25
|
|
package/dist/base.d.ts
CHANGED
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
/** Subclass of {@link Error} that represents an error thrown from this library, providing a specific name for easier identification. */
|
|
2
|
-
export declare class
|
|
2
|
+
export declare class Err extends Error {
|
|
3
3
|
name: string;
|
|
4
4
|
}
|
|
5
|
+
export { Err as InsErr };
|
|
5
6
|
/**
|
|
6
|
-
* Retries a function multiple times
|
|
7
|
+
* Retries a function multiple times until it succeeds or the maximum number of attempts is reached, or the error callback indicates to stop.
|
|
7
8
|
*
|
|
8
9
|
* @param fn_ - The function to be retried.
|
|
9
10
|
* @param maxAttempts_ - The maximum number of attempts to execute the function.
|
|
10
|
-
* @param cbErr_ - An optional callback function to
|
|
11
|
-
* @param abs_ - An optional AbortSignal to abort the retry process.
|
|
11
|
+
* @param cbErr_ - An optional callback function that is invoked when an error occurs. It receives the error and the remaining number of attempts as arguments and should return `true` to continue retrying or `false` to stop.
|
|
12
12
|
* @returns The result of {@link fn_} if it succeeds within the allowed attempts.
|
|
13
|
-
* @throws
|
|
14
|
-
* @throws
|
|
13
|
+
* @throws the last error thrown by {@link fn_} if it fails after the maximum attempts or if the error callback indicates to stop.
|
|
14
|
+
* @throws If {@link cbErr_} throws or returns a rejected promise, the error is propagated immediately.
|
|
15
|
+
* @throws {InsErr} If {@link maxAttempts_} isn't a positive integer.
|
|
15
16
|
*/
|
|
16
|
-
export declare function retry<T>(fn_: () => T
|
|
17
|
+
export declare function retry<T>(fn_: () => T | PromiseLike<T>, maxAttempts_: number, cbErr_?: (err: unknown, remainingAttempts: number) => boolean | PromiseLike<boolean>): Promise<T>;
|
|
17
18
|
/**
|
|
18
|
-
*
|
|
19
|
+
* Alias for `setTimeout`.
|
|
19
20
|
*
|
|
20
21
|
* @param ms_ - The number of milliseconds to sleep.
|
|
21
|
-
* @
|
|
22
|
-
* @throws {InsErr} If the sleep is aborted before or during the wait.
|
|
22
|
+
* @remarks The delay is a minimum, not an exact duration. The actual elapsed time also includes timer scheduling, event-loop latency, and promise-continuation overhead, so it may exceed {@link ms_}, especially for short delays.
|
|
23
23
|
*/
|
|
24
|
-
export declare function sleep(ms_: number
|
|
24
|
+
export declare function sleep(ms_: number): Promise<void>;
|
|
25
25
|
/**
|
|
26
26
|
* Build a tuple of a specified length.
|
|
27
27
|
*
|
|
@@ -115,7 +115,6 @@ export declare const BASE122_SHORT: 7;
|
|
|
115
115
|
*
|
|
116
116
|
* @param data_ - An array-like object containing the data to be encoded.
|
|
117
117
|
* @returns A string representing the base-122 encoded data.
|
|
118
|
-
* @throws If somehow malformed UTF-8 data is generated, the {@link TextDecoder} will throw an error (shouldn't happen if the input is valid).
|
|
119
118
|
* @remarks The high density might not be suitable for all use cases, especially if the medium used to transmit the data has limitations on character sets or encoding.
|
|
120
119
|
* @see {@link TextDecoder} how the output string is generated from the byte array (this step is necessary for accurate translation to a string).
|
|
121
120
|
*/
|
package/dist/base.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../src/base.ts"],"names":[],"mappings":"AAAA,wIAAwI;AACxI,qBAAa,
|
|
1
|
+
{"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../src/base.ts"],"names":[],"mappings":"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"}
|
package/dist/base.js
CHANGED
|
@@ -1,56 +1,38 @@
|
|
|
1
1
|
/** Subclass of {@link Error} that represents an error thrown from this library, providing a specific name for easier identification. */
|
|
2
|
-
export class
|
|
2
|
+
export class Err extends Error {
|
|
3
3
|
name = "Instrumentality-Error";
|
|
4
4
|
}
|
|
5
|
+
export { Err as InsErr };
|
|
5
6
|
/**
|
|
6
|
-
* Retries a function multiple times
|
|
7
|
+
* Retries a function multiple times until it succeeds or the maximum number of attempts is reached, or the error callback indicates to stop.
|
|
7
8
|
*
|
|
8
9
|
* @param fn_ - The function to be retried.
|
|
9
10
|
* @param maxAttempts_ - The maximum number of attempts to execute the function.
|
|
10
|
-
* @param cbErr_ - An optional callback function to
|
|
11
|
-
* @param abs_ - An optional AbortSignal to abort the retry process.
|
|
11
|
+
* @param cbErr_ - An optional callback function that is invoked when an error occurs. It receives the error and the remaining number of attempts as arguments and should return `true` to continue retrying or `false` to stop.
|
|
12
12
|
* @returns The result of {@link fn_} if it succeeds within the allowed attempts.
|
|
13
|
-
* @throws
|
|
14
|
-
* @throws
|
|
13
|
+
* @throws the last error thrown by {@link fn_} if it fails after the maximum attempts or if the error callback indicates to stop.
|
|
14
|
+
* @throws If {@link cbErr_} throws or returns a rejected promise, the error is propagated immediately.
|
|
15
|
+
* @throws {InsErr} If {@link maxAttempts_} isn't a positive integer.
|
|
15
16
|
*/
|
|
16
|
-
export async function retry(fn_, maxAttempts_, cbErr_
|
|
17
|
-
|
|
17
|
+
export async function retry(fn_, maxAttempts_, cbErr_) {
|
|
18
|
+
if (!Number.isInteger(maxAttempts_) || maxAttempts_ < 1)
|
|
19
|
+
throw new Err("Max attempts isn't a positive integer");
|
|
20
|
+
while (true)
|
|
18
21
|
try {
|
|
19
22
|
return await fn_();
|
|
20
23
|
}
|
|
21
24
|
catch (err) {
|
|
22
|
-
if (maxAttempts_ <= 0)
|
|
25
|
+
if (--maxAttempts_ <= 0 || (cbErr_ && !(await cbErr_(err, maxAttempts_))))
|
|
23
26
|
throw err;
|
|
24
|
-
await cbErr_?.();
|
|
25
27
|
}
|
|
26
|
-
if (maxAttempts_ < 0)
|
|
27
|
-
throw new InsErr("Max attempts must be at least 1");
|
|
28
|
-
else
|
|
29
|
-
throw new InsErr("Operation aborted");
|
|
30
28
|
}
|
|
31
29
|
/**
|
|
32
|
-
*
|
|
30
|
+
* Alias for `setTimeout`.
|
|
33
31
|
*
|
|
34
32
|
* @param ms_ - The number of milliseconds to sleep.
|
|
35
|
-
* @
|
|
36
|
-
* @throws {InsErr} If the sleep is aborted before or during the wait.
|
|
33
|
+
* @remarks The delay is a minimum, not an exact duration. The actual elapsed time also includes timer scheduling, event-loop latency, and promise-continuation overhead, so it may exceed {@link ms_}, especially for short delays.
|
|
37
34
|
*/
|
|
38
|
-
export
|
|
39
|
-
if (abs_?.aborted)
|
|
40
|
-
return Promise.reject(new InsErr("Sleep aborted before start"));
|
|
41
|
-
return new Promise((resolve, reject) => {
|
|
42
|
-
const timeout = setTimeout(() => {
|
|
43
|
-
abs_?.removeEventListener("abort", onAbort);
|
|
44
|
-
resolve();
|
|
45
|
-
}, ms_);
|
|
46
|
-
function onAbort() {
|
|
47
|
-
clearTimeout(timeout);
|
|
48
|
-
abs_?.removeEventListener("abort", onAbort);
|
|
49
|
-
reject(new InsErr("Sleep aborted during wait"));
|
|
50
|
-
}
|
|
51
|
-
abs_?.addEventListener("abort", onAbort, { once: true });
|
|
52
|
-
});
|
|
53
|
-
}
|
|
35
|
+
export function sleep(ms_) { return new Promise(r => setTimeout(r, ms_)); }
|
|
54
36
|
/**
|
|
55
37
|
* Wrapper around {@link performance.now}
|
|
56
38
|
*
|
|
@@ -123,12 +105,12 @@ export const BASE122_SHORT = 0b111;
|
|
|
123
105
|
*
|
|
124
106
|
* @param data_ - An array-like object containing the data to be encoded.
|
|
125
107
|
* @returns A string representing the base-122 encoded data.
|
|
126
|
-
* @throws If somehow malformed UTF-8 data is generated, the {@link TextDecoder} will throw an error (shouldn't happen if the input is valid).
|
|
127
108
|
* @remarks The high density might not be suitable for all use cases, especially if the medium used to transmit the data has limitations on character sets or encoding.
|
|
128
109
|
* @see {@link TextDecoder} how the output string is generated from the byte array (this step is necessary for accurate translation to a string).
|
|
129
110
|
*/
|
|
130
111
|
export function encode122(data_) {
|
|
131
|
-
const out =
|
|
112
|
+
const out = new Uint8Array(2 * Math.ceil(data_.length * 8 / 7));
|
|
113
|
+
let outIndex = 0;
|
|
132
114
|
let byteIndex = 0;
|
|
133
115
|
let bitIndex = 0;
|
|
134
116
|
function next7() {
|
|
@@ -149,14 +131,16 @@ export function encode122(data_) {
|
|
|
149
131
|
for (let value = next7(); value !== undefined; value = next7()) {
|
|
150
132
|
const illegalIndex = BASE122_ILLEGAL_INDEX[value];
|
|
151
133
|
if (illegalIndex === undefined)
|
|
152
|
-
out
|
|
134
|
+
out[outIndex++] = value;
|
|
153
135
|
else {
|
|
154
136
|
const next = next7();
|
|
155
137
|
const payload = next ?? value;
|
|
156
|
-
out
|
|
138
|
+
out[outIndex++] =
|
|
139
|
+
0b11000010 | ((next === undefined ? BASE122_SHORT : illegalIndex) << 2) | (payload >>> 6),
|
|
140
|
+
out[outIndex++] = 0b10000000 | (payload & 0b00111111);
|
|
157
141
|
}
|
|
158
142
|
}
|
|
159
|
-
return new TextDecoder("utf-8", { fatal: true }).decode(
|
|
143
|
+
return new TextDecoder("utf-8", { fatal: true }).decode(out.subarray(0, outIndex));
|
|
160
144
|
}
|
|
161
145
|
/**
|
|
162
146
|
* Decodes a base-122 encoded string back into its original byte representation.
|
|
@@ -190,7 +174,7 @@ export function decode122(base122_) {
|
|
|
190
174
|
if (illegalIndex < BASE122_ILLEGAL.length)
|
|
191
175
|
push7(BASE122_ILLEGAL[illegalIndex]);
|
|
192
176
|
else if (illegalIndex !== BASE122_SHORT)
|
|
193
|
-
throw new
|
|
177
|
+
throw new Err(`Invalid base-122 illegal index ${illegalIndex} at position ${i}`);
|
|
194
178
|
push7(code & 0b01111111);
|
|
195
179
|
}
|
|
196
180
|
return Uint8Array.from(out);
|
package/dist/dom.d.ts
CHANGED
|
@@ -1,8 +1,3 @@
|
|
|
1
|
-
import * as bs from "./base.ts";
|
|
2
|
-
/** Subclass of {@link bs.InsErr} that represents an error thrown from this specific module of the library */
|
|
3
|
-
export declare class DomErr extends bs.InsErr {
|
|
4
|
-
name: string;
|
|
5
|
-
}
|
|
6
1
|
/**
|
|
7
2
|
* Resolves on `DOMContentLoaded` or immediately if the document is already ready.
|
|
8
3
|
*/
|
|
@@ -19,7 +14,7 @@ export declare function byId<T extends HTMLElement>(id_: string, type_: new () =
|
|
|
19
14
|
* Typed accessor for {@link document.getElementsByClassName}
|
|
20
15
|
*
|
|
21
16
|
* @param className_ - The class name of the elements to retrieve.
|
|
22
|
-
* @param type_ -
|
|
17
|
+
* @param type_ - The constructor function for the expected element type.
|
|
23
18
|
* @returns All elements with the specified class name and type.
|
|
24
19
|
*/
|
|
25
20
|
export declare function byClass<T extends HTMLElement>(className_: string, type_: new () => T): T[];
|
package/dist/dom.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dom.d.ts","sourceRoot":"","sources":["../src/dom.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"dom.d.ts","sourceRoot":"","sources":["../src/dom.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,wBAAsB,SAAS,IAAI,OAAO,CAAC,IAAI,CAAC,CAI/C;AAID;;;;;;GAMG;AACH,wBAAgB,IAAI,CAAC,CAAC,SAAS,WAAW,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,UAAU,CAAC,GAAG,CAAC,GAAG,IAAI,CAKrF;AAGD;;;;;;GAMG;AACH,wBAAgB,OAAO,CAAC,CAAC,SAAS,WAAW,EAAE,UAAU,EAAE,MAAM,EAAE,KAAK,EAAE,UAAU,CAAC,GAAG,CAAC,EAAE,CAE1F;AAGD;;;;;GAKG;AACH,wBAAgB,KAAK,CAAC,CAAC,SAAS,MAAM,qBAAqB,EAAE,IAAI,EAAE,CAAC,GAAG,qBAAqB,CAAC,CAAC,CAAC,EAAE,CAEhG;AAID;;;;;;GAMG;AACH,wBAAgB,SAAS,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE;IAC9C,KAAK,EAAE,OAAO,CAAA;IACd,OAAO,CAAC,EAAE,IAAI,GAAG,MAAM,CAAA;IACvB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,QAAQ,CAAC,EAAE,QAAQ,GAAG,KAAK,GAAG,MAAM,CAAA;CACrC,EAAE,KAAK,SAAM,GAAG,IAAI,CASpB;AAED;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,SAAM,GAAG,IAAI,CAE7D;AAED;;;;GAIG;AACH,wBAAgB,OAAO,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAMjD"}
|
package/dist/dom.js
CHANGED
|
@@ -1,8 +1,3 @@
|
|
|
1
|
-
import * as bs from "./base.js";
|
|
2
|
-
/** Subclass of {@link bs.InsErr} that represents an error thrown from this specific module of the library */
|
|
3
|
-
export class DomErr extends bs.InsErr {
|
|
4
|
-
name = "Instrumentality-DOM-Error";
|
|
5
|
-
}
|
|
6
1
|
/**
|
|
7
2
|
* Resolves on `DOMContentLoaded` or immediately if the document is already ready.
|
|
8
3
|
*/
|
|
@@ -28,7 +23,7 @@ export function byId(id_, type_) {
|
|
|
28
23
|
* Typed accessor for {@link document.getElementsByClassName}
|
|
29
24
|
*
|
|
30
25
|
* @param className_ - The class name of the elements to retrieve.
|
|
31
|
-
* @param type_ -
|
|
26
|
+
* @param type_ - The constructor function for the expected element type.
|
|
32
27
|
* @returns All elements with the specified class name and type.
|
|
33
28
|
*/
|
|
34
29
|
export function byClass(className_, type_) {
|
package/dist/road.d.ts
CHANGED
|
@@ -1,19 +1,29 @@
|
|
|
1
|
-
import * as fs from "node:fs";
|
|
2
1
|
import * as cr from "node:crypto";
|
|
3
|
-
import * as
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
import * as fs from "node:fs";
|
|
3
|
+
import { InsErr } from "./base.ts";
|
|
4
|
+
/** Subclass of {@link InsErr} that represents an error thrown from this specific module of the library */
|
|
5
|
+
export declare class Err extends InsErr {
|
|
6
6
|
name: string;
|
|
7
7
|
}
|
|
8
|
-
export {
|
|
8
|
+
export { Err as RoadError, Err as RdErr };
|
|
9
9
|
/**
|
|
10
10
|
* Returns the constructor function corresponding to the file mode (statmode).
|
|
11
11
|
*
|
|
12
|
-
* @param statmode_ The file mode to check.
|
|
12
|
+
* @param statmode_ The file mode or {@link fs.Dirent} to check.
|
|
13
|
+
* @returns The constructor function corresponding to the road type (e.g., {@link File}, {@link Folder}, etc.).
|
|
14
|
+
* @throws If the file mode is unknown, throws a {@link Err}.
|
|
15
|
+
*/
|
|
16
|
+
export declare function resolveStat(statmode_: number): typeof File | typeof Folder | typeof BlockDevice | typeof CharacterDevice | typeof SymbolicLink | typeof Fifo | typeof Socket;
|
|
17
|
+
export { resolveStat as resStat };
|
|
18
|
+
/**
|
|
19
|
+
* Returns the constructor function corresponding to the type of the given {@link fs.Dirent}.
|
|
20
|
+
*
|
|
21
|
+
* @param dirent The directory entry to check.
|
|
13
22
|
* @returns The constructor function corresponding to the road type (e.g., {@link File}, {@link Folder}, etc.).
|
|
14
|
-
* @throws If the
|
|
23
|
+
* @throws If the directory entry type is unknown, throws a {@link Err}.
|
|
15
24
|
*/
|
|
16
|
-
export declare function
|
|
25
|
+
export declare function resolveDirent(dirent: fs.Dirent): typeof File | typeof Folder | typeof BlockDevice | typeof CharacterDevice | typeof SymbolicLink | typeof Fifo | typeof Socket;
|
|
26
|
+
export { resolveDirent as resDirent };
|
|
17
27
|
/**
|
|
18
28
|
* Creates the appropriate subclass of {@link Road} based on the file mode of the specified path.
|
|
19
29
|
*
|
|
@@ -22,12 +32,14 @@ export declare function resolveMode(statmode_: number): typeof File | typeof Fol
|
|
|
22
32
|
* @throws If {@link fp.lstat}/{@link fs.lstatSync} fails to retrieved the status of {@link path_}.
|
|
23
33
|
*/
|
|
24
34
|
export declare function factory(path_: string): Promise<BlockDevice | CharacterDevice | Fifo | File | Folder | Socket | SymbolicLink>;
|
|
35
|
+
export { factory as fac, factory as mk };
|
|
25
36
|
/** Sync version of {@link factory}. */
|
|
26
37
|
export declare function factorySync(path_: string): BlockDevice | CharacterDevice | Fifo | File | Folder | Socket | SymbolicLink;
|
|
38
|
+
export { factorySync as facSync, factorySync as mkSync };
|
|
27
39
|
/**
|
|
28
40
|
* A map that keeps track of locked roads to prevent concurrent modifications.
|
|
29
41
|
*
|
|
30
|
-
* @key The absolute path of the road that is currently locked.
|
|
42
|
+
* @key The **absolute** and **normalized** (**resolved**) path of the road that is currently locked.
|
|
31
43
|
* @value A promise that resolves when the lock on the road is released.
|
|
32
44
|
*
|
|
33
45
|
* @remarks The map is initialized lazily when the first lock is created to minimize import-time side effects.
|
|
@@ -62,25 +74,9 @@ export declare abstract class Road {
|
|
|
62
74
|
* @param path_ Any path-like string that can be resolved to an absolute path. It will be resolved to an absolute path using {@link ph.resolve}.
|
|
63
75
|
* @param typeCheck_ If true, the constructor will check if the path corresponds to the expected type of road (e.g., file, folder, etc.) and throw an error if it doesn't. If false, no type checking will be performed.
|
|
64
76
|
*
|
|
65
|
-
* @throws If {@link typeCheck_} is true and the path does not correspond to the expected type of road, a {@link
|
|
66
|
-
*/
|
|
67
|
-
constructor(path_: string, typeCheck_: boolean | 1 | 0);
|
|
68
|
-
/**
|
|
69
|
-
* Aquires a lock for the path represented by this Road instance, preventing concurrent modifications from this and other Road instances pointing to the same path.
|
|
70
|
-
*
|
|
71
|
-
* @param cb_ A callback function that will be called when the lock is released. This is used internally to manage the lock state.
|
|
72
|
-
* @returns An object with a dispose method that releases the lock when called.
|
|
73
|
-
* @throws If the road is immutable, a {@link RdErr} will be thrown.
|
|
74
|
-
*
|
|
75
|
-
* @remarks This method MUST be used with a `using` statement to ensure that the lock is released properly. Failing to do so may result in deadlocks or other concurrency issues.
|
|
76
|
-
* Non-deterministic release is unfortunately not possible due to the nature of JavaScript's garbage collection, thus the lock must be released deterministically by the user (to which the `using` statement is a convenient way to do so).
|
|
77
|
+
* @throws If {@link typeCheck_} is true and the path does not correspond to the expected type of road, a {@link Err} will be thrown.
|
|
77
78
|
*/
|
|
78
|
-
|
|
79
|
-
/**
|
|
80
|
-
* Sync version of {@link lock}.
|
|
81
|
-
* @throws Also throws a {@link RdErr} if the road is currently locked by another operation as it cannot wait for the lock to be released in a synchronous context.
|
|
82
|
-
*/
|
|
83
|
-
protected lockSync(cb_?: () => void): Disposable & AsyncDisposable;
|
|
79
|
+
constructor(path_: string, typeCheck_: boolean);
|
|
84
80
|
/** @returns An instance of {@link Folder} representing the parent directory of the current road. */
|
|
85
81
|
parent(): Folder;
|
|
86
82
|
/**
|
|
@@ -91,6 +87,23 @@ export declare abstract class Road {
|
|
|
91
87
|
ancestorsIt(): Generator<Folder, void, unknown>;
|
|
92
88
|
/** @returns An array of {@link Folder} instances representing the ancestors of the current road. */
|
|
93
89
|
ancestors(): Folder[];
|
|
90
|
+
/**
|
|
91
|
+
* Aquires a lock for the path represented by this Road instance, preventing concurrent modifications from this and other Road instances pointing to the same path.
|
|
92
|
+
*
|
|
93
|
+
* @returns An object with a dispose method that releases the lock when called.
|
|
94
|
+
* @throws If the road is immutable, a {@link Err} will be thrown.
|
|
95
|
+
*
|
|
96
|
+
* @remarks This method MUST be used with a `using` statement to ensure that the lock is released properly. Failing to do so WILL result in deadlocks and other concurrency issues.
|
|
97
|
+
* Non-deterministic release is unfortunately not possible due to the nature of JavaScript's garbage collection, thus the lock must be released deterministically by the user (for which the `using` statement is a convenient way to do so).
|
|
98
|
+
* @remarks Methods may call other methods that each acquire their own locks, and release them independently, meaning from the perspective of other instances, the lock may appear to be free even if the original method still has work to do.
|
|
99
|
+
* To fix this, it's recommeneded to aquire a lock at the beginning and use fs/fp operations within the locked context.
|
|
100
|
+
*/
|
|
101
|
+
protected lock(): Promise<Disposable & AsyncDisposable>;
|
|
102
|
+
/**
|
|
103
|
+
* Sync version of {@link lock}.
|
|
104
|
+
* @throws If the road is currently locked by another operation as it cannot wait for the lock to be released in a synchronous context.
|
|
105
|
+
*/
|
|
106
|
+
protected lockSync(): Disposable & AsyncDisposable;
|
|
94
107
|
/**
|
|
95
108
|
* Watches the current entry for changes and resolves when the entry becomes accessible (i.e., exists and can be accessed).
|
|
96
109
|
*
|
|
@@ -114,18 +127,19 @@ export declare abstract class Road {
|
|
|
114
127
|
lstat(): Promise<fs.Stats>;
|
|
115
128
|
/** @returns The result of {@link fs.lstatSync} for the current entry. */
|
|
116
129
|
lstatSync(): fs.Stats;
|
|
117
|
-
/**
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
130
|
+
/** Get the size of the this entry in bytes. */
|
|
131
|
+
abstract size(): Promise<number>;
|
|
132
|
+
abstract sizeSync(): number;
|
|
133
|
+
/** Wrapper around {@link fp.rm} with locking. */
|
|
134
|
+
delete(): Promise<void>;
|
|
135
|
+
/** Wrapper around {@link fs.rmSync} with locking. */
|
|
136
|
+
deleteSync(): void;
|
|
137
|
+
copy(into_: Folder, options_?: fs.CopyOptions): Promise<this>;
|
|
138
|
+
copySync(into_: Folder, options_?: fs.CopySyncOptions): this;
|
|
139
|
+
move(into_: Folder): Promise<void>;
|
|
140
|
+
moveSync(into_: Folder): void;
|
|
141
|
+
rename(newName_: string): Promise<void>;
|
|
142
|
+
renameSync(newName_: string): void;
|
|
129
143
|
abstract check(): Promise<boolean>;
|
|
130
144
|
abstract checkSync(): boolean;
|
|
131
145
|
/** Type narrowing for {@link File} (similar to `instanceof` without unnecessary runtime checks). */
|
|
@@ -136,10 +150,6 @@ export declare abstract class Road {
|
|
|
136
150
|
isFolder(): this is Folder;
|
|
137
151
|
/** Type narrowing for {@link Folder} (similar to `instanceof` without unnecessary runtime checks). */
|
|
138
152
|
isDirectory(): this is Folder;
|
|
139
|
-
/** Type narrowing for {@link Folder} (similar to `instanceof` without unnecessary runtime checks). */
|
|
140
|
-
isDict(): this is Folder;
|
|
141
|
-
/** Type narrowing for {@link Folder} (similar to `instanceof` without unnecessary runtime checks). */
|
|
142
|
-
isDictionary(): this is Folder;
|
|
143
153
|
/** Type narrowing for {@link SymbolicLink} (similar to `instanceof` without unnecessary runtime checks). */
|
|
144
154
|
isSymlink(): this is SymbolicLink;
|
|
145
155
|
/** Type narrowing for {@link SymbolicLink} (similar to `instanceof` without unnecessary runtime checks). */
|
|
@@ -155,48 +165,62 @@ export declare abstract class Road {
|
|
|
155
165
|
/** Type narrowing for {@link Socket} (similar to `instanceof` without unnecessary runtime checks). */
|
|
156
166
|
isSocket(): this is Socket;
|
|
157
167
|
}
|
|
158
|
-
|
|
168
|
+
/** Constructor type for a subclass of {@link Road}. */
|
|
169
|
+
export type road_t<T extends Road> = new (...args_: ConstructorParameters<typeof Road>) => T;
|
|
159
170
|
/** Subclass of {@link Road} that represents a file. */
|
|
160
171
|
export declare class File extends Road {
|
|
172
|
+
/**
|
|
173
|
+
* Creates a new file at the specified path if it does not already exist.
|
|
174
|
+
*
|
|
175
|
+
* @param at_ The path at which to create the file.
|
|
176
|
+
* @returns A promise that resolves to the newly created `File` instance.
|
|
177
|
+
* @throws if {@link fp.writeFile} throws.
|
|
178
|
+
*/
|
|
161
179
|
static create(at_: string): Promise<File>;
|
|
180
|
+
/** Alias for {@link File.create}. */
|
|
162
181
|
static readonly mk: typeof File.create;
|
|
182
|
+
/** Synchronous version of {@link File.create}. */
|
|
163
183
|
static createSync(at_: string): File;
|
|
184
|
+
/** Alias for {@link File.createSync}. */
|
|
164
185
|
static readonly mkSync: typeof File.createSync;
|
|
186
|
+
/** The file extension of this file, including the leading dot. */
|
|
165
187
|
get ext(): string;
|
|
188
|
+
/** The file name without its extension. */
|
|
166
189
|
get noExt(): string;
|
|
190
|
+
/**
|
|
191
|
+
* Reads the contents of the file.
|
|
192
|
+
*
|
|
193
|
+
* @returns A promise that resolves to the contents of the file as a `Buffer` or `string`, depending on the specified encoding.
|
|
194
|
+
* @throws If the file can't be read due to permission issues or other filesystem errors.
|
|
195
|
+
*/
|
|
167
196
|
read(): Promise<Buffer>;
|
|
168
197
|
read(encoding_: BufferEncoding, flag_?: string): Promise<string>;
|
|
169
198
|
readSync(): Buffer;
|
|
170
199
|
readSync(encoding_: BufferEncoding, flag_?: string): string;
|
|
200
|
+
sameAs(other_: File): Promise<boolean>;
|
|
201
|
+
sameAsSync(other_: File): boolean;
|
|
171
202
|
itBuff(chunkSize_?: number, flags_?: string | number, mode_?: fs.Mode): AsyncGenerator<Buffer<ArrayBuffer>, void, unknown>;
|
|
172
203
|
itBuffSync(chunkSize_?: number, flags_?: string | number, mode_?: fs.Mode): Generator<Buffer<ArrayBuffer>, void, unknown>;
|
|
204
|
+
itLines(chunkSize_?: number, flags_?: string | number, mode_?: fs.Mode): AsyncGenerator<string, void, unknown>;
|
|
205
|
+
itLinesSync(chunkSize_?: number, flags_?: string | number, mode_?: fs.Mode): Generator<string, void, unknown>;
|
|
206
|
+
hash(algorithm_?: string, options_?: cr.HashOptions): Promise<Buffer>;
|
|
207
|
+
hash(algorithm_?: string, options_?: cr.HashOptions, encoding_?: BufferEncoding): Promise<string>;
|
|
208
|
+
hashSync(algorithm_?: string, options_?: cr.HashOptions): Buffer;
|
|
209
|
+
hashSync(algorithm_?: string, options_?: cr.HashOptions, encoding_?: BufferEncoding): string;
|
|
210
|
+
size(): Promise<number>;
|
|
211
|
+
sizeSync(): number;
|
|
212
|
+
writeAtomic(data_: Buffer | string, options_?: fs.WriteFileOptions): Promise<void>;
|
|
213
|
+
writeAtomicSync(data_: Buffer | string, options_?: fs.WriteFileOptions): void;
|
|
173
214
|
write(data_: Buffer | string, options_?: fs.WriteFileOptions): Promise<void>;
|
|
174
215
|
writeSync(data_: Buffer | string, options_?: fs.WriteFileOptions): void;
|
|
175
216
|
append(data_: Buffer | string, options_?: fs.WriteFileOptions): Promise<void>;
|
|
176
217
|
appendSync(data_: Buffer | string, options_?: fs.WriteFileOptions): void;
|
|
177
|
-
delete(): Promise<void>;
|
|
178
|
-
deleteSync(): void;
|
|
179
|
-
move(into_: Folder): Promise<void>;
|
|
180
|
-
moveSync(into_: Folder): void;
|
|
181
|
-
copy(into_: Folder): Promise<this>;
|
|
182
|
-
copySync(into_: Folder): this;
|
|
183
|
-
rename(to_: string): Promise<void>;
|
|
184
|
-
renameSync(to_: string): void;
|
|
185
218
|
check(): Promise<boolean>;
|
|
186
219
|
checkSync(): boolean;
|
|
187
220
|
isFile(): this is File;
|
|
188
221
|
}
|
|
189
|
-
|
|
190
|
-
export
|
|
191
|
-
export declare function hashSync(f_: File, algorithm_?: string, options_?: cr.HashOptions): Buffer;
|
|
192
|
-
export declare function hashSync(f_: File, algorithm_?: string, options_?: cr.HashOptions, encoding_?: BufferEncoding): string;
|
|
193
|
-
export declare function streamHash(f_: File, algorithm_?: string, options_?: cr.HashOptions): Promise<Buffer>;
|
|
194
|
-
export declare function streamHash(f_: File, algorithm_?: string, options_?: cr.HashOptions, encoding_?: BufferEncoding): Promise<string>;
|
|
195
|
-
export declare function streamHashSync(f_: File, algorithm_?: string, options_?: cr.HashOptions): Buffer;
|
|
196
|
-
export declare function streamHashSync(f_: File, algorithm_?: string, options_?: cr.HashOptions, encoding_?: BufferEncoding): string;
|
|
197
|
-
export declare function itLines(f_: File, options_?: fs.ReadStreamOptions): AsyncGenerator<string, void, unknown>;
|
|
198
|
-
export declare function fileSameAs(f1_: File, f2_: File): Promise<boolean>;
|
|
199
|
-
export declare function fileSameAsSync(f1_: File, f2_: File): boolean;
|
|
222
|
+
/** Helper type for filtering {@link Road} instances. */
|
|
223
|
+
export type filter_t<T extends Road> = ((road: Road) => road is T);
|
|
200
224
|
export declare class Folder extends Road {
|
|
201
225
|
static create(at_: string): Promise<Folder>;
|
|
202
226
|
static readonly mk: typeof Folder.create;
|
|
@@ -204,38 +228,36 @@ export declare class Folder extends Road {
|
|
|
204
228
|
static readonly mkSync: typeof Folder.createSync;
|
|
205
229
|
join(...paths_: string[]): string;
|
|
206
230
|
it(): AsyncIterable<Road>;
|
|
207
|
-
it<T extends Road>(
|
|
231
|
+
it<T extends Road>(filter_: filter_t<T>): AsyncIterable<T>;
|
|
208
232
|
itSync(): Iterable<Road>;
|
|
209
|
-
itSync<T extends Road>(
|
|
233
|
+
itSync<T extends Road>(filter_: filter_t<T>): Iterable<T>;
|
|
210
234
|
list(): Promise<Road[]>;
|
|
211
|
-
list<T extends Road>(
|
|
235
|
+
list<T extends Road>(filter_: filter_t<T>): Promise<T[]>;
|
|
212
236
|
listSync(): Road[];
|
|
213
|
-
listSync<T extends Road>(
|
|
237
|
+
listSync<T extends Road>(filter_: filter_t<T>): T[];
|
|
238
|
+
walk(): AsyncIterable<Road>;
|
|
239
|
+
walk<T extends Road>(filter_: filter_t<T>): AsyncIterable<T>;
|
|
240
|
+
walk(filter_: (r: Road) => boolean): AsyncIterable<Road>;
|
|
241
|
+
walkSync(): Iterable<Road>;
|
|
242
|
+
walkSync<T extends Road>(filter_: filter_t<T>): Iterable<T>;
|
|
243
|
+
walkSync(filter_: (r: Road) => boolean): Iterable<Road>;
|
|
214
244
|
find(name_: string): Promise<Road | null>;
|
|
215
|
-
find<T extends Road>(name_: string,
|
|
245
|
+
find<T extends Road>(name_: string, expect_: road_t<T>): Promise<T | null>;
|
|
216
246
|
findSync(name_: string): Road | null;
|
|
217
|
-
findSync<T extends Road>(name_: string,
|
|
247
|
+
findSync<T extends Road>(name_: string, expect_: road_t<T>): T | null;
|
|
218
248
|
add<T extends Road>(name_: string, createable_: {
|
|
219
249
|
create: (at: string) => Promise<T>;
|
|
220
250
|
}): Promise<T>;
|
|
221
251
|
addSync<T extends Road>(name_: string, createable_: {
|
|
222
252
|
createSync: (at: string) => T;
|
|
223
253
|
}): T;
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
move(into_: Folder): Promise<void>;
|
|
227
|
-
moveSync(into_: Folder): void;
|
|
228
|
-
copy(into_: Folder): Promise<this>;
|
|
229
|
-
copySync(into_: Folder): this;
|
|
230
|
-
rename(to_: string): Promise<void>;
|
|
231
|
-
renameSync(to_: string): void;
|
|
254
|
+
size(): Promise<number>;
|
|
255
|
+
sizeSync(): number;
|
|
232
256
|
check(): Promise<boolean>;
|
|
233
257
|
checkSync(): boolean;
|
|
234
258
|
isFolder(): this is Folder;
|
|
235
259
|
isDir(): this is Folder;
|
|
236
260
|
isDirectory(): this is Folder;
|
|
237
|
-
isDict(): this is Folder;
|
|
238
|
-
isDictionary(): this is Folder;
|
|
239
261
|
}
|
|
240
262
|
export declare function sysRoot(): Folder;
|
|
241
263
|
export declare function home(): Folder;
|
|
@@ -251,14 +273,10 @@ export declare class SymbolicLink extends Road {
|
|
|
251
273
|
targetSync(): BlockDevice | CharacterDevice | Fifo | File | Folder | Socket | SymbolicLink;
|
|
252
274
|
retarget(to_: Road): Promise<void>;
|
|
253
275
|
retargetSync(to_: Road): void;
|
|
276
|
+
size(): Promise<number>;
|
|
277
|
+
sizeSync(): number;
|
|
254
278
|
delete(): Promise<void>;
|
|
255
279
|
deleteSync(): void;
|
|
256
|
-
move(into_: Folder): Promise<void>;
|
|
257
|
-
moveSync(into_: Folder): void;
|
|
258
|
-
copy(into_: Folder): Promise<this>;
|
|
259
|
-
copySync(into_: Folder): this;
|
|
260
|
-
rename(to_: string): Promise<void>;
|
|
261
|
-
renameSync(to_: string): void;
|
|
262
280
|
check(): Promise<boolean>;
|
|
263
281
|
checkSync(): boolean;
|
|
264
282
|
isSymlink(): this is SymbolicLink;
|
|
@@ -267,17 +285,28 @@ export declare class SymbolicLink extends Road {
|
|
|
267
285
|
export { SymbolicLink as Symlink };
|
|
268
286
|
export declare abstract class UnusableRoad extends Road {
|
|
269
287
|
readonly mutable: boolean;
|
|
270
|
-
|
|
288
|
+
size(): Promise<0>;
|
|
289
|
+
sizeSync(): 0;
|
|
271
290
|
error(): never;
|
|
272
|
-
|
|
291
|
+
/** @deprecated System-level resources (UnusableRoad) can't/shouldn't be locked */
|
|
292
|
+
lock(): never;
|
|
293
|
+
/** @deprecated System-level resources (UnusableRoad) can't/shouldn't be locked */
|
|
273
294
|
lockSync(): never;
|
|
274
|
-
|
|
295
|
+
/** @deprecated System-level resources (UnusableRoad) can't/shouldn't be deleted */
|
|
296
|
+
delete(): never;
|
|
297
|
+
/** @deprecated System-level resources (UnusableRoad) can't/shouldn't be deleted */
|
|
275
298
|
deleteSync(): never;
|
|
276
|
-
|
|
299
|
+
/** @deprecated System-level resources (UnusableRoad) can't/shouldn't be moved */
|
|
300
|
+
move(): never;
|
|
301
|
+
/** @deprecated System-level resources (UnusableRoad) can't/shouldn't be moved */
|
|
277
302
|
moveSync(): never;
|
|
278
|
-
|
|
303
|
+
/** @deprecated System-level resources (UnusableRoad) can't/shouldn't be copied */
|
|
304
|
+
copy(): never;
|
|
305
|
+
/** @deprecated System-level resources (UnusableRoad) can't/shouldn't be copied */
|
|
279
306
|
copySync(): never;
|
|
280
|
-
|
|
307
|
+
/** @deprecated System-level resources (UnusableRoad) can't/shouldn't be renamed */
|
|
308
|
+
rename(): never;
|
|
309
|
+
/** @deprecated System-level resources (UnusableRoad) can't/shouldn't be renamed */
|
|
281
310
|
renameSync(): never;
|
|
282
311
|
isUnusable(): this is UnusableRoad;
|
|
283
312
|
}
|
|
@@ -301,8 +330,17 @@ export declare class Socket extends UnusableRoad {
|
|
|
301
330
|
checkSync(): boolean;
|
|
302
331
|
isSocket(): this is Socket;
|
|
303
332
|
}
|
|
304
|
-
export declare function registerToCleanup(self_: Road): void;
|
|
305
333
|
export declare function Temp<T extends Road>(createable_: {
|
|
334
|
+
create: (at: string) => Promise<T>;
|
|
335
|
+
}): Promise<T & Disposable & AsyncDisposable>;
|
|
336
|
+
export declare function TempSync<T extends Road>(createable_: {
|
|
306
337
|
createSync: (at: string) => T;
|
|
338
|
+
}): T & Disposable & AsyncDisposable;
|
|
339
|
+
export declare function registerToCleanup(self_: Road): void;
|
|
340
|
+
export declare function AutoTemp<T extends Road>(createable_: {
|
|
341
|
+
mk: (at: string) => Promise<T>;
|
|
342
|
+
}): Promise<T & Disposable & AsyncDisposable>;
|
|
343
|
+
export declare function AutoTempSync<T extends Road>(createable_: {
|
|
344
|
+
mk: (at: string) => T;
|
|
307
345
|
}, autoCleanup_: boolean): T & Disposable & AsyncDisposable;
|
|
308
346
|
//# sourceMappingURL=road.d.ts.map
|