@depup/jsonjoy.com__fs-node-to-fsa 4.68.2-depup.0 → 4.69.1-depup.0
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/changes.json +1 -1
- package/lib/types.d.ts +2 -9
- package/lib/types.js.map +1 -1
- package/lib/util.d.ts +1 -11
- package/lib/util.js +9 -35
- package/lib/util.js.map +1 -1
- package/package.json +8 -8
package/README.md
CHANGED
|
@@ -13,8 +13,8 @@ npm install @depup/jsonjoy.com__fs-node-to-fsa
|
|
|
13
13
|
|
|
14
14
|
| Field | Value |
|
|
15
15
|
|-------|-------|
|
|
16
|
-
| Original | [@jsonjoy.com/fs-node-to-fsa](https://www.npmjs.com/package/@jsonjoy.com/fs-node-to-fsa) @ 4.
|
|
17
|
-
| Processed | 2026-
|
|
16
|
+
| Original | [@jsonjoy.com/fs-node-to-fsa](https://www.npmjs.com/package/@jsonjoy.com/fs-node-to-fsa) @ 4.69.1 |
|
|
17
|
+
| Processed | 2026-09-03 |
|
|
18
18
|
| Smoke test | passed |
|
|
19
19
|
| Deps updated | 0 |
|
|
20
20
|
|
package/changes.json
CHANGED
package/lib/types.d.ts
CHANGED
|
@@ -1,18 +1,11 @@
|
|
|
1
1
|
import type { FsPromisesApi, FsSynchronousApi } from '@jsonjoy.com/fs-node-utils';
|
|
2
2
|
import type { FsCommonObjects } from '@jsonjoy.com/fs-node-utils/lib/types/FsCommonObjects';
|
|
3
|
-
import type {
|
|
3
|
+
import type { CoreFsaContext } from '@jsonjoy.com/fs-fsa';
|
|
4
4
|
/**
|
|
5
5
|
* Required Node.js `fs` module functions for File System Access API.
|
|
6
6
|
*/
|
|
7
7
|
export type NodeFsaFs = Pick<FsCommonObjects, 'constants'> & {
|
|
8
8
|
promises: FsPromisesApi;
|
|
9
9
|
} & Pick<FsSynchronousApi, 'openSync' | 'fsyncSync' | 'statSync' | 'closeSync' | 'readSync' | 'truncateSync' | 'writeSync' | 'accessSync'>;
|
|
10
|
-
export interface NodeFsaContext {
|
|
11
|
-
separator: '/' | '\\';
|
|
12
|
-
/** Whether synchronous file handles are allowed. */
|
|
13
|
-
syncHandleAllowed: boolean;
|
|
14
|
-
/** Whether writes are allowed, defaults to `read`. */
|
|
15
|
-
mode: 'read' | 'readwrite';
|
|
16
|
-
/** File lock manager for this context. */
|
|
17
|
-
locks: FileLockManager;
|
|
10
|
+
export interface NodeFsaContext extends CoreFsaContext {
|
|
18
11
|
}
|
package/lib/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"","sourcesContent":["import type { FsPromisesApi, FsSynchronousApi } from '@jsonjoy.com/fs-node-utils';\nimport type { FsCommonObjects } from '@jsonjoy.com/fs-node-utils/lib/types/FsCommonObjects';\nimport type {
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"","sourcesContent":["import type { FsPromisesApi, FsSynchronousApi } from '@jsonjoy.com/fs-node-utils';\nimport type { FsCommonObjects } from '@jsonjoy.com/fs-node-utils/lib/types/FsCommonObjects';\nimport type { CoreFsaContext } from '@jsonjoy.com/fs-fsa';\n\n/**\n * Required Node.js `fs` module functions for File System Access API.\n */\nexport type NodeFsaFs = Pick<FsCommonObjects, 'constants'> & { promises: FsPromisesApi } & Pick<\n FsSynchronousApi,\n 'openSync' | 'fsyncSync' | 'statSync' | 'closeSync' | 'readSync' | 'truncateSync' | 'writeSync' | 'accessSync'\n >;\n\nexport interface NodeFsaContext extends CoreFsaContext {}\n"]}
|
package/lib/util.d.ts
CHANGED
|
@@ -1,12 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
export { ctx, assertName, assertCanWrite, newNotFoundError, newTypeMismatchError, newNotAllowedError, newNoModificationAllowedError, } from '@jsonjoy.com/fs-fsa';
|
|
2
2
|
export { basename } from '@jsonjoy.com/fs-node-utils';
|
|
3
|
-
/**
|
|
4
|
-
* Creates a new {@link NodeFsaContext}.
|
|
5
|
-
*/
|
|
6
|
-
export declare const ctx: (partial?: Partial<NodeFsaContext>) => NodeFsaContext;
|
|
7
|
-
export declare const assertName: (name: string, method: string, klass: string) => void;
|
|
8
|
-
export declare const assertCanWrite: (mode: "read" | "readwrite") => void;
|
|
9
|
-
export declare const newNotFoundError: () => DOMException;
|
|
10
|
-
export declare const newTypeMismatchError: () => DOMException;
|
|
11
|
-
export declare const newNotAllowedError: () => DOMException;
|
|
12
|
-
export declare const newNoModificationAllowedError: () => DOMException;
|
package/lib/util.js
CHANGED
|
@@ -1,40 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.newNoModificationAllowedError = exports.newNotAllowedError = exports.newTypeMismatchError = exports.newNotFoundError = exports.assertCanWrite = exports.assertName = exports.ctx =
|
|
4
|
-
|
|
3
|
+
exports.basename = exports.newNoModificationAllowedError = exports.newNotAllowedError = exports.newTypeMismatchError = exports.newNotFoundError = exports.assertCanWrite = exports.assertName = exports.ctx = void 0;
|
|
4
|
+
var fs_fsa_1 = require("@jsonjoy.com/fs-fsa");
|
|
5
|
+
Object.defineProperty(exports, "ctx", { enumerable: true, get: function () { return fs_fsa_1.ctx; } });
|
|
6
|
+
Object.defineProperty(exports, "assertName", { enumerable: true, get: function () { return fs_fsa_1.assertName; } });
|
|
7
|
+
Object.defineProperty(exports, "assertCanWrite", { enumerable: true, get: function () { return fs_fsa_1.assertCanWrite; } });
|
|
8
|
+
Object.defineProperty(exports, "newNotFoundError", { enumerable: true, get: function () { return fs_fsa_1.newNotFoundError; } });
|
|
9
|
+
Object.defineProperty(exports, "newTypeMismatchError", { enumerable: true, get: function () { return fs_fsa_1.newTypeMismatchError; } });
|
|
10
|
+
Object.defineProperty(exports, "newNotAllowedError", { enumerable: true, get: function () { return fs_fsa_1.newNotAllowedError; } });
|
|
11
|
+
Object.defineProperty(exports, "newNoModificationAllowedError", { enumerable: true, get: function () { return fs_fsa_1.newNoModificationAllowedError; } });
|
|
5
12
|
var fs_node_utils_1 = require("@jsonjoy.com/fs-node-utils");
|
|
6
13
|
Object.defineProperty(exports, "basename", { enumerable: true, get: function () { return fs_node_utils_1.basename; } });
|
|
7
|
-
/**
|
|
8
|
-
* Creates a new {@link NodeFsaContext}.
|
|
9
|
-
*/
|
|
10
|
-
const ctx = (partial = {}) => {
|
|
11
|
-
return {
|
|
12
|
-
separator: '/',
|
|
13
|
-
syncHandleAllowed: false,
|
|
14
|
-
mode: 'read',
|
|
15
|
-
locks: new fs_fsa_1.FileLockManager(),
|
|
16
|
-
...partial,
|
|
17
|
-
};
|
|
18
|
-
};
|
|
19
|
-
exports.ctx = ctx;
|
|
20
|
-
const nameRegex = /^(\.{1,2})$|^(.*([\/\\]).*)$/;
|
|
21
|
-
const assertName = (name, method, klass) => {
|
|
22
|
-
const isInvalid = !name || nameRegex.test(name);
|
|
23
|
-
if (isInvalid)
|
|
24
|
-
throw new TypeError(`Failed to execute '${method}' on '${klass}': Name is not allowed.`);
|
|
25
|
-
};
|
|
26
|
-
exports.assertName = assertName;
|
|
27
|
-
const assertCanWrite = (mode) => {
|
|
28
|
-
if (mode !== 'readwrite')
|
|
29
|
-
throw new DOMException('The request is not allowed by the user agent or the platform in the current context.', 'NotAllowedError');
|
|
30
|
-
};
|
|
31
|
-
exports.assertCanWrite = assertCanWrite;
|
|
32
|
-
const newNotFoundError = () => new DOMException('A requested file or directory could not be found at the time an operation was processed.', 'NotFoundError');
|
|
33
|
-
exports.newNotFoundError = newNotFoundError;
|
|
34
|
-
const newTypeMismatchError = () => new DOMException('The path supplied exists, but was not an entry of requested type.', 'TypeMismatchError');
|
|
35
|
-
exports.newTypeMismatchError = newTypeMismatchError;
|
|
36
|
-
const newNotAllowedError = () => new DOMException('Permission not granted.', 'NotAllowedError');
|
|
37
|
-
exports.newNotAllowedError = newNotAllowedError;
|
|
38
|
-
const newNoModificationAllowedError = () => new DOMException('The file is locked and cannot be modified.', 'NoModificationAllowedError');
|
|
39
|
-
exports.newNoModificationAllowedError = newNoModificationAllowedError;
|
|
40
14
|
//# sourceMappingURL=util.js.map
|
package/lib/util.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"util.js","sourceRoot":"","sources":["../src/util.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"util.js","sourceRoot":"","sources":["../src/util.ts"],"names":[],"mappings":";;;AAAA,8CAQ6B;AAP3B,6FAAA,GAAG,OAAA;AACH,oGAAA,UAAU,OAAA;AACV,wGAAA,cAAc,OAAA;AACd,0GAAA,gBAAgB,OAAA;AAChB,8GAAA,oBAAoB,OAAA;AACpB,4GAAA,kBAAkB,OAAA;AAClB,uHAAA,6BAA6B,OAAA;AAE/B,4DAAsD;AAA7C,yGAAA,QAAQ,OAAA","sourcesContent":["export {\n ctx,\n assertName,\n assertCanWrite,\n newNotFoundError,\n newTypeMismatchError,\n newNotAllowedError,\n newNoModificationAllowedError,\n} from '@jsonjoy.com/fs-fsa';\nexport { basename } from '@jsonjoy.com/fs-node-utils';\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@depup/jsonjoy.com__fs-node-to-fsa",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.69.1-depup.0",
|
|
4
4
|
"description": "Adapter to convert Node.js fs API to File System Access API (with updated dependencies)",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "streamich",
|
|
@@ -70,11 +70,11 @@
|
|
|
70
70
|
]
|
|
71
71
|
},
|
|
72
72
|
"devDependencies": {
|
|
73
|
-
"@jsonjoy.com/fs-node": "4.
|
|
73
|
+
"@jsonjoy.com/fs-node": "4.69.1",
|
|
74
74
|
"@types/jest": "^29.0.0",
|
|
75
75
|
"@types/node": "^20.0.0",
|
|
76
76
|
"jest": "^29.0.0",
|
|
77
|
-
"memfs": "4.
|
|
77
|
+
"memfs": "4.69.1",
|
|
78
78
|
"rimraf": "^5.0.0",
|
|
79
79
|
"ts-jest": "^29.4.2",
|
|
80
80
|
"ts-node": "^10.9.2",
|
|
@@ -84,16 +84,16 @@
|
|
|
84
84
|
"tslib": "2"
|
|
85
85
|
},
|
|
86
86
|
"dependencies": {
|
|
87
|
-
"@jsonjoy.com/fs-fsa": "4.
|
|
88
|
-
"@jsonjoy.com/fs-node-builtins": "4.
|
|
89
|
-
"@jsonjoy.com/fs-node-utils": "4.
|
|
87
|
+
"@jsonjoy.com/fs-fsa": "4.69.1",
|
|
88
|
+
"@jsonjoy.com/fs-node-builtins": "4.69.1",
|
|
89
|
+
"@jsonjoy.com/fs-node-utils": "4.69.1"
|
|
90
90
|
},
|
|
91
91
|
"depup": {
|
|
92
92
|
"changes": {},
|
|
93
93
|
"depsUpdated": 0,
|
|
94
94
|
"originalPackage": "@jsonjoy.com/fs-node-to-fsa",
|
|
95
|
-
"originalVersion": "4.
|
|
96
|
-
"processedAt": "2026-
|
|
95
|
+
"originalVersion": "4.69.1",
|
|
96
|
+
"processedAt": "2026-09-03T00:34:32.112Z",
|
|
97
97
|
"smokeTest": "passed"
|
|
98
98
|
}
|
|
99
99
|
}
|