@zenfs/devel 0.0.1 → 0.1.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/dist/bin/zenfs-test.js +3 -2
- package/dist/tests/common.js +1 -1
- package/dist/tests/fs/append.test.d.ts +1 -0
- package/dist/tests/fs/append.test.js +27 -0
- package/dist/tests/fs/concurrency.test.d.ts +1 -0
- package/dist/tests/fs/concurrency.test.js +76 -0
- package/dist/tests/fs/dir.test.d.ts +1 -0
- package/dist/tests/fs/dir.test.js +83 -0
- package/dist/tests/fs/directory.test.d.ts +1 -0
- package/dist/tests/fs/directory.test.js +151 -0
- package/dist/tests/fs/errors.test.d.ts +1 -0
- package/dist/tests/fs/errors.test.js +141 -0
- package/dist/tests/fs/exists.test.d.ts +1 -0
- package/dist/tests/fs/exists.test.js +19 -0
- package/dist/tests/fs/links.test.d.ts +1 -0
- package/dist/tests/fs/links.test.js +248 -0
- package/dist/tests/fs/open.test.d.ts +1 -0
- package/dist/tests/fs/open.test.js +95 -0
- package/dist/tests/fs/permissions.test.d.ts +1 -0
- package/dist/tests/fs/permissions.test.js +346 -0
- package/dist/tests/fs/read.test.d.ts +1 -0
- package/dist/tests/fs/read.test.js +149 -0
- package/dist/tests/fs/readFile.test.d.ts +1 -0
- package/dist/tests/fs/readFile.test.js +110 -0
- package/dist/tests/fs/rename.test.d.ts +1 -0
- package/dist/tests/fs/rename.test.js +70 -0
- package/dist/tests/fs/scaling.test.d.ts +1 -0
- package/dist/tests/fs/scaling.test.js +27 -0
- package/dist/tests/fs/stat.test.d.ts +1 -0
- package/dist/tests/fs/stat.test.js +93 -0
- package/dist/tests/fs/streams.test.d.ts +1 -0
- package/dist/tests/fs/streams.test.js +161 -0
- package/dist/tests/fs/tempdir.test.d.ts +1 -0
- package/dist/tests/fs/tempdir.test.js +118 -0
- package/dist/tests/fs/times.test.d.ts +7 -0
- package/dist/tests/fs/times.test.js +134 -0
- package/dist/tests/fs/truncate.test.d.ts +1 -0
- package/dist/tests/fs/truncate.test.js +62 -0
- package/dist/tests/fs/watch.test.d.ts +1 -0
- package/dist/tests/fs/watch.test.js +320 -0
- package/dist/tests/fs/write.test.d.ts +1 -0
- package/dist/tests/fs/write.test.js +83 -0
- package/dist/tests/fs/xattr.test.d.ts +1 -0
- package/dist/tests/fs/xattr.test.js +137 -0
- package/dist/tests/setup/memory.d.ts +1 -0
- package/dist/tests/setup/memory.js +3 -0
- package/package.json +5 -5
- package/tests/readme.md +2 -2
- package/tests/fs/append.test.ts +0 -34
- package/tests/fs/concurrency.test.ts +0 -113
- package/tests/fs/dir.test.ts +0 -103
- package/tests/fs/directory.test.ts +0 -189
- package/tests/fs/errors.test.ts +0 -159
- package/tests/fs/exists.test.ts +0 -23
- package/tests/fs/links.test.ts +0 -308
- package/tests/fs/open.test.ts +0 -23
- package/tests/fs/permissions.test.ts +0 -344
- package/tests/fs/read.test.ts +0 -94
- package/tests/fs/readFile.test.ts +0 -58
- package/tests/fs/rename.test.ts +0 -93
- package/tests/fs/scaling.test.ts +0 -35
- package/tests/fs/stat.test.ts +0 -115
- package/tests/fs/streams.test.ts +0 -204
- package/tests/fs/tempdir.test.ts +0 -64
- package/tests/fs/times.test.ts +0 -85
- package/tests/fs/truncate.test.ts +0 -89
- package/tests/fs/watch.test.ts +0 -246
- package/tests/fs/write.test.ts +0 -118
- package/tests/fs/xattr.test.ts +0 -96
- package/tests/setup/memory.ts +0 -3
- package/tests/tsconfig.json +0 -8
|
@@ -0,0 +1,346 @@
|
|
|
1
|
+
var __addDisposableResource = (this && this.__addDisposableResource) || function (env, value, async) {
|
|
2
|
+
if (value !== null && value !== void 0) {
|
|
3
|
+
if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected.");
|
|
4
|
+
var dispose, inner;
|
|
5
|
+
if (async) {
|
|
6
|
+
if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined.");
|
|
7
|
+
dispose = value[Symbol.asyncDispose];
|
|
8
|
+
}
|
|
9
|
+
if (dispose === void 0) {
|
|
10
|
+
if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined.");
|
|
11
|
+
dispose = value[Symbol.dispose];
|
|
12
|
+
if (async) inner = dispose;
|
|
13
|
+
}
|
|
14
|
+
if (typeof dispose !== "function") throw new TypeError("Object not disposable.");
|
|
15
|
+
if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } };
|
|
16
|
+
env.stack.push({ value: value, dispose: dispose, async: async });
|
|
17
|
+
}
|
|
18
|
+
else if (async) {
|
|
19
|
+
env.stack.push({ async: true });
|
|
20
|
+
}
|
|
21
|
+
return value;
|
|
22
|
+
};
|
|
23
|
+
var __disposeResources = (this && this.__disposeResources) || (function (SuppressedError) {
|
|
24
|
+
return function (env) {
|
|
25
|
+
function fail(e) {
|
|
26
|
+
env.error = env.hasError ? new SuppressedError(e, env.error, "An error was suppressed during disposal.") : e;
|
|
27
|
+
env.hasError = true;
|
|
28
|
+
}
|
|
29
|
+
var r, s = 0;
|
|
30
|
+
function next() {
|
|
31
|
+
while (r = env.stack.pop()) {
|
|
32
|
+
try {
|
|
33
|
+
if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next);
|
|
34
|
+
if (r.dispose) {
|
|
35
|
+
var result = r.dispose.call(r.value);
|
|
36
|
+
if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { fail(e); return next(); });
|
|
37
|
+
}
|
|
38
|
+
else s |= 1;
|
|
39
|
+
}
|
|
40
|
+
catch (e) {
|
|
41
|
+
fail(e);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve();
|
|
45
|
+
if (env.hasError) throw env.error;
|
|
46
|
+
}
|
|
47
|
+
return next();
|
|
48
|
+
};
|
|
49
|
+
})(typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
|
|
50
|
+
var e = new Error(message);
|
|
51
|
+
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
52
|
+
});
|
|
53
|
+
// SPDX-License-Identifier: LGPL-3.0-or-later
|
|
54
|
+
import { bindContext, fs as rootFS } from '@zenfs/core';
|
|
55
|
+
import { R_OK, W_OK, X_OK } from '@zenfs/core/constants';
|
|
56
|
+
import { defaultContext } from '@zenfs/core/internal/contexts';
|
|
57
|
+
import { hasAccess } from '@zenfs/core/internal/inode';
|
|
58
|
+
import { join } from '@zenfs/core/path';
|
|
59
|
+
import * as vfsConfig from '@zenfs/core/vfs/config';
|
|
60
|
+
import assert from 'node:assert/strict';
|
|
61
|
+
import { suite, test } from 'node:test';
|
|
62
|
+
import { encodeUTF8 } from 'utilium';
|
|
63
|
+
import { config, fs } from '../common.js';
|
|
64
|
+
const asyncMode = 0o777;
|
|
65
|
+
const syncMode = 0o644;
|
|
66
|
+
const file = 'a.js';
|
|
67
|
+
suite('Permissions', config('permissions'), () => {
|
|
68
|
+
test('chmod', config('sync', 'async'), async () => {
|
|
69
|
+
await fs.promises.chmod(file, asyncMode.toString(8));
|
|
70
|
+
const stats = await fs.promises.stat(file);
|
|
71
|
+
assert.equal(stats.mode & 0o777, asyncMode);
|
|
72
|
+
fs.chmodSync(file, syncMode);
|
|
73
|
+
assert.equal(fs.statSync(file).mode & 0o777, syncMode);
|
|
74
|
+
});
|
|
75
|
+
test('fchmod', config('sync', 'async'), async () => {
|
|
76
|
+
const env_1 = { stack: [], error: void 0, hasError: false };
|
|
77
|
+
try {
|
|
78
|
+
const handle = __addDisposableResource(env_1, await fs.promises.open(file, 'a', 0o644), true);
|
|
79
|
+
await handle.chmod(asyncMode);
|
|
80
|
+
const stats = await handle.stat();
|
|
81
|
+
assert.equal(stats.mode & 0o777, asyncMode);
|
|
82
|
+
fs.fchmodSync(handle.fd, syncMode);
|
|
83
|
+
assert.equal(fs.statSync(file).mode & 0o777, syncMode);
|
|
84
|
+
}
|
|
85
|
+
catch (e_1) {
|
|
86
|
+
env_1.error = e_1;
|
|
87
|
+
env_1.hasError = true;
|
|
88
|
+
}
|
|
89
|
+
finally {
|
|
90
|
+
const result_1 = __disposeResources(env_1);
|
|
91
|
+
if (result_1)
|
|
92
|
+
await result_1;
|
|
93
|
+
}
|
|
94
|
+
});
|
|
95
|
+
test('lchmod', config('lchmod', 'async'), async () => {
|
|
96
|
+
const link = 'symbolic-link';
|
|
97
|
+
await fs.promises.symlink(file, link);
|
|
98
|
+
await fs.promises.lchmod(link, asyncMode);
|
|
99
|
+
const stats = await fs.promises.lstat(link);
|
|
100
|
+
assert.equal(stats.mode & 0o777, asyncMode);
|
|
101
|
+
await fs.promises.lchmod(link, syncMode);
|
|
102
|
+
assert.equal((await fs.promises.lstat(link)).mode & 0o777, syncMode);
|
|
103
|
+
});
|
|
104
|
+
async function test_item(path) {
|
|
105
|
+
const stats = await fs.promises.stat(path).catch((error) => {
|
|
106
|
+
assert.equal(error.code, 'EACCES');
|
|
107
|
+
});
|
|
108
|
+
if (!stats)
|
|
109
|
+
return;
|
|
110
|
+
if (stats.isDirectory())
|
|
111
|
+
assert(hasAccess(defaultContext, stats, X_OK));
|
|
112
|
+
function checkError(access) {
|
|
113
|
+
return function (error) {
|
|
114
|
+
assert(Error.isError(error));
|
|
115
|
+
assert(!hasAccess(defaultContext, stats, access));
|
|
116
|
+
};
|
|
117
|
+
}
|
|
118
|
+
if (stats.isDirectory()) {
|
|
119
|
+
for (const dir of await fs.promises.readdir(path)) {
|
|
120
|
+
await test('Access controls: ' + join(path, dir), () => test_item(join(path, dir)));
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
else {
|
|
124
|
+
await fs.promises.readFile(path).catch(checkError(R_OK));
|
|
125
|
+
}
|
|
126
|
+
assert(hasAccess(defaultContext, stats, R_OK));
|
|
127
|
+
if (stats.isDirectory()) {
|
|
128
|
+
const testFile = join(path, '__test_file_plz_ignore.txt');
|
|
129
|
+
await fs.promises.writeFile(testFile, encodeUTF8('this is a test file, please ignore.')).catch(checkError(W_OK));
|
|
130
|
+
await fs.promises.unlink(testFile).catch(checkError(W_OK));
|
|
131
|
+
}
|
|
132
|
+
else {
|
|
133
|
+
const handle = await fs.promises.open(path, 'a').catch(checkError(W_OK));
|
|
134
|
+
if (!handle)
|
|
135
|
+
return;
|
|
136
|
+
await handle.close();
|
|
137
|
+
}
|
|
138
|
+
assert(hasAccess(defaultContext, stats, W_OK));
|
|
139
|
+
}
|
|
140
|
+
test('unprivileged users can read files they do not own #326', async () => {
|
|
141
|
+
await rootFS.promises.writeFile('/root-owned.txt', 'shared', { mode: 0o644 });
|
|
142
|
+
const user = bindContext({ credentials: { uid: 1000, gid: 1000 } });
|
|
143
|
+
assert.equal(user.fs.readFileSync('/root-owned.txt', 'utf8'), 'shared');
|
|
144
|
+
assert.equal(await user.fs.promises.readFile('/root-owned.txt', 'utf8'), 'shared');
|
|
145
|
+
assert.throws(() => user.fs.writeFileSync('/root-owned.txt', 'nope'), { code: 'EACCES' });
|
|
146
|
+
await assert.rejects(user.fs.promises.writeFile('/root-owned.txt', 'nope'), { code: 'EACCES' });
|
|
147
|
+
});
|
|
148
|
+
test('access checks follow Linux #326', () => {
|
|
149
|
+
const as = (uid, gid, euid = uid, egid = gid, groups = []) => bindContext({ credentials: { uid, gid, euid, egid, groups } });
|
|
150
|
+
const file = (mode, uid = 1000, gid = 1000) => ({ mode: 0o100000 | mode, uid, gid });
|
|
151
|
+
assert(!hasAccess(as(1000, 0), file(0o600, 0, 0), R_OK));
|
|
152
|
+
assert(hasAccess(as(0, 1000), file(0o000, 5, 5), R_OK | W_OK));
|
|
153
|
+
assert(hasAccess(as(1000, 1000, 2000, 1000), file(0o600, 2000, 5), R_OK | W_OK));
|
|
154
|
+
assert(!hasAccess(as(2000, 1000, 1000, 1000), file(0o600, 2000, 5), R_OK));
|
|
155
|
+
assert(!hasAccess(as(1000, 0, 1000, 1000), file(0o060, 2000, 0), R_OK));
|
|
156
|
+
assert(!hasAccess(as(1000, 1000), file(0o077), R_OK));
|
|
157
|
+
assert(!hasAccess(as(1000, 1000), file(0o407, 2000), R_OK));
|
|
158
|
+
assert(hasAccess(as(1000, 3000), file(0o004, 2000, 2000), R_OK));
|
|
159
|
+
assert(hasAccess(as(1000, 3000, 1000, 3000, [2000]), file(0o040, 2000, 2000), R_OK));
|
|
160
|
+
assert(hasAccess(as(1000, 2000), file(0o021, 0, 2000), W_OK));
|
|
161
|
+
assert(!hasAccess(as(1000, 2000), file(0o021, 0, 2000), X_OK));
|
|
162
|
+
});
|
|
163
|
+
test('stat needs no permission on the file itself #326', async () => {
|
|
164
|
+
await rootFS.promises.writeFile('/secret-stat.txt', 'x', { mode: 0o000 });
|
|
165
|
+
const user = bindContext({ credentials: { uid: 1000, gid: 1000 } });
|
|
166
|
+
assert.equal(user.fs.statSync('/secret-stat.txt').size, 1);
|
|
167
|
+
assert.equal((await user.fs.promises.lstat('/secret-stat.txt')).size, 1);
|
|
168
|
+
assert.throws(() => user.fs.readFileSync('/secret-stat.txt'), { code: 'EACCES' });
|
|
169
|
+
});
|
|
170
|
+
test('removing an entry needs write and search permission on its parent #326', async () => {
|
|
171
|
+
const alice = bindContext({ credentials: { uid: 1000, gid: 1000 } });
|
|
172
|
+
await rootFS.promises.mkdir('/removal-root', { mode: 0o755 });
|
|
173
|
+
await rootFS.promises.writeFile('/removal-root/file', 'x', { mode: 0o666 });
|
|
174
|
+
await rootFS.promises.mkdir('/removal-root/dir', { mode: 0o777 });
|
|
175
|
+
await rootFS.promises.mkdir('/removal-own', { mode: 0o755 });
|
|
176
|
+
await rootFS.promises.chown('/removal-own', 1000, 1000);
|
|
177
|
+
await rootFS.promises.writeFile('/removal-own/readonly', 'x', { mode: 0o444 });
|
|
178
|
+
await rootFS.promises.mkdir('/removal-own/readonly-dir', { mode: 0o555 });
|
|
179
|
+
await rootFS.promises.mkdir('/removal-unreadable', { mode: 0o300 });
|
|
180
|
+
await rootFS.promises.chown('/removal-unreadable', 1000, 1000);
|
|
181
|
+
await rootFS.promises.writeFile('/removal-unreadable/file', 'x');
|
|
182
|
+
await assert.rejects(alice.fs.promises.unlink('/removal-root/file'), { code: 'EACCES' });
|
|
183
|
+
assert.throws(() => alice.fs.unlinkSync('/removal-root/file'), { code: 'EACCES' });
|
|
184
|
+
await assert.rejects(alice.fs.promises.rmdir('/removal-root/dir'), { code: 'EACCES' });
|
|
185
|
+
assert.throws(() => alice.fs.rmdirSync('/removal-root/dir'), { code: 'EACCES' });
|
|
186
|
+
assert.throws(() => alice.fs.renameSync('/removal-root/file', '/removal-own/file'), { code: 'EACCES' });
|
|
187
|
+
await assert.rejects(alice.fs.promises.rename('/removal-own/readonly', '/removal-root/file'), { code: 'EACCES' });
|
|
188
|
+
await alice.fs.promises.unlink('/removal-own/readonly');
|
|
189
|
+
alice.fs.rmdirSync('/removal-own/readonly-dir');
|
|
190
|
+
assert.deepEqual(rootFS.readdirSync('/removal-own'), []);
|
|
191
|
+
await alice.fs.promises.rename('/removal-unreadable/file', '/removal-unreadable/renamed');
|
|
192
|
+
alice.fs.renameSync('/removal-unreadable/renamed', '/removal-unreadable/file');
|
|
193
|
+
});
|
|
194
|
+
test('sticky directories only let owners remove entries #326', async () => {
|
|
195
|
+
const alice = bindContext({ credentials: { uid: 1000, gid: 1000 } });
|
|
196
|
+
const bob = bindContext({ credentials: { uid: 2000, gid: 2000 } });
|
|
197
|
+
await rootFS.promises.mkdir('/sticky', { mode: 0o1777 });
|
|
198
|
+
await alice.fs.promises.writeFile('/sticky/alice', 'a', { mode: 0o666 });
|
|
199
|
+
await alice.fs.promises.mkdir('/sticky/alice-dir', { mode: 0o777 });
|
|
200
|
+
await bob.fs.promises.writeFile('/sticky/bob', 'b');
|
|
201
|
+
await assert.rejects(bob.fs.promises.unlink('/sticky/alice'), { code: 'EPERM' });
|
|
202
|
+
assert.throws(() => bob.fs.unlinkSync('/sticky/alice'), { code: 'EPERM' });
|
|
203
|
+
await assert.rejects(bob.fs.promises.rmdir('/sticky/alice-dir'), { code: 'EPERM' });
|
|
204
|
+
assert.throws(() => bob.fs.rmdirSync('/sticky/alice-dir'), { code: 'EPERM' });
|
|
205
|
+
assert.throws(() => bob.fs.renameSync('/sticky/alice', '/sticky/stolen'), { code: 'EPERM' });
|
|
206
|
+
await assert.rejects(alice.fs.promises.rename('/sticky/alice', '/sticky/bob'), { code: 'EPERM' });
|
|
207
|
+
await alice.fs.promises.unlink('/sticky/alice');
|
|
208
|
+
alice.fs.rmdirSync('/sticky/alice-dir');
|
|
209
|
+
await rootFS.promises.unlink('/sticky/bob');
|
|
210
|
+
assert.deepEqual(rootFS.readdirSync('/sticky'), []);
|
|
211
|
+
await rootFS.promises.mkdir('/sticky-alice', { mode: 0o1777 });
|
|
212
|
+
await rootFS.promises.chown('/sticky-alice', 1000, 1000);
|
|
213
|
+
await bob.fs.promises.writeFile('/sticky-alice/bob', 'b');
|
|
214
|
+
await alice.fs.promises.unlink('/sticky-alice/bob');
|
|
215
|
+
});
|
|
216
|
+
test('only owners may change the mode, owner, or times of a file #326', async () => {
|
|
217
|
+
const alice = bindContext({ credentials: { uid: 1000, gid: 1000, groups: [3000] } });
|
|
218
|
+
const bob = bindContext({ credentials: { uid: 2000, gid: 2000 } });
|
|
219
|
+
await rootFS.promises.writeFile('/owned', 'x', { mode: 0o666 });
|
|
220
|
+
rootFS.chownSync('/owned', 1000, 1000);
|
|
221
|
+
assert.throws(() => bob.fs.chmodSync('/owned', 0o600), { code: 'EPERM' });
|
|
222
|
+
await assert.rejects(bob.fs.promises.chmod('/owned', 0o600), { code: 'EPERM' });
|
|
223
|
+
assert.throws(() => bob.fs.utimesSync('/owned', 1, 2), { code: 'EPERM' });
|
|
224
|
+
await assert.rejects(bob.fs.promises.utimes('/owned', 1, 2), { code: 'EPERM' });
|
|
225
|
+
assert.throws(() => bob.fs.chownSync('/owned', -1, 2000), { code: 'EPERM' });
|
|
226
|
+
assert.throws(() => bob.fs.chownSync('/owned', 1000, -1), { code: 'EPERM' });
|
|
227
|
+
bob.fs.chownSync('/owned', -1, -1);
|
|
228
|
+
alice.fs.chmodSync('/owned', 0o644);
|
|
229
|
+
await alice.fs.promises.utimes('/owned', 1, 2);
|
|
230
|
+
alice.fs.chownSync('/owned', -1, 3000);
|
|
231
|
+
await alice.fs.promises.chown('/owned', 1000, 1000);
|
|
232
|
+
assert.throws(() => alice.fs.chownSync('/owned', -1, 4000), { code: 'EPERM' });
|
|
233
|
+
assert.throws(() => alice.fs.chownSync('/owned', 2000, -1), { code: 'EPERM' });
|
|
234
|
+
rootFS.chownSync('/owned', 2000, 2000);
|
|
235
|
+
const stats = rootFS.statSync('/owned');
|
|
236
|
+
assert.equal(stats.mode & 0o777, 0o644);
|
|
237
|
+
assert.equal(stats.mtimeMs, 2000);
|
|
238
|
+
assert.equal(stats.uid, 2000);
|
|
239
|
+
});
|
|
240
|
+
test('changing metadata needs no read or write access, even on directories #327', async () => {
|
|
241
|
+
const alice = bindContext({ credentials: { uid: 1000, gid: 1000 } });
|
|
242
|
+
await rootFS.promises.writeFile('/metadata-file', 'x', { mode: 0o000 });
|
|
243
|
+
await rootFS.promises.mkdir('/metadata-dir', { mode: 0o000 });
|
|
244
|
+
for (const path of ['/metadata-file', '/metadata-dir']) {
|
|
245
|
+
rootFS.chownSync(path, 1000, 1000);
|
|
246
|
+
alice.fs.chmodSync(path, 0o500);
|
|
247
|
+
await alice.fs.promises.chmod(path, 0o400);
|
|
248
|
+
alice.fs.utimesSync(path, 1, 2);
|
|
249
|
+
await alice.fs.promises.utimes(path, 3, 4);
|
|
250
|
+
alice.fs.chownSync(path, -1, -1);
|
|
251
|
+
await alice.fs.promises.chown(path, -1, -1);
|
|
252
|
+
const stats = rootFS.statSync(path);
|
|
253
|
+
assert.equal(stats.mode & 0o777, 0o400);
|
|
254
|
+
assert.equal(stats.mtimeMs, 4000);
|
|
255
|
+
}
|
|
256
|
+
});
|
|
257
|
+
test('moving a directory to another parent needs write permission on it', async () => {
|
|
258
|
+
const alice = bindContext({ credentials: { uid: 1000, gid: 1000 } });
|
|
259
|
+
await rootFS.promises.mkdir('/move-a', { mode: 0o777 });
|
|
260
|
+
await rootFS.promises.mkdir('/move-b', { mode: 0o777 });
|
|
261
|
+
await rootFS.promises.mkdir('/move-a/dir', { mode: 0o755 });
|
|
262
|
+
await rootFS.promises.writeFile('/move-a/file', 'x', { mode: 0o644 });
|
|
263
|
+
assert.throws(() => alice.fs.renameSync('/move-a/dir', '/move-b/dir'), { code: 'EACCES' });
|
|
264
|
+
await assert.rejects(alice.fs.promises.rename('/move-a/dir', '/move-b/dir'), { code: 'EACCES' });
|
|
265
|
+
await alice.fs.promises.rename('/move-a/dir', '/move-a/renamed');
|
|
266
|
+
await alice.fs.promises.rename('/move-a/file', '/move-b/file');
|
|
267
|
+
});
|
|
268
|
+
test('chmod and chown clear setuid and setgid like Linux', async () => {
|
|
269
|
+
const alice = bindContext({ credentials: { uid: 1000, gid: 1000, groups: [3000] } });
|
|
270
|
+
const modeOf = (path) => rootFS.statSync(path).mode & 0o7777;
|
|
271
|
+
await rootFS.promises.mkdir('/sid', { mode: 0o777 });
|
|
272
|
+
await alice.fs.promises.writeFile('/sid/file', 'x');
|
|
273
|
+
await alice.fs.promises.mkdir('/sid/dir');
|
|
274
|
+
alice.fs.chmodSync('/sid/file', 0o6755);
|
|
275
|
+
assert.equal(modeOf('/sid/file'), 0o6755);
|
|
276
|
+
alice.fs.chownSync('/sid/file', -1, -1);
|
|
277
|
+
assert.equal(modeOf('/sid/file'), 0o755);
|
|
278
|
+
alice.fs.chmodSync('/sid/file', 0o2745);
|
|
279
|
+
alice.fs.chownSync('/sid/file', -1, 3000);
|
|
280
|
+
assert.equal(modeOf('/sid/file'), 0o2745);
|
|
281
|
+
rootFS.chmodSync('/sid/file', 0o4755);
|
|
282
|
+
rootFS.chownSync('/sid/file', 1000, 0);
|
|
283
|
+
assert.equal(modeOf('/sid/file'), 0o755);
|
|
284
|
+
alice.fs.chmodSync('/sid/file', 0o2755);
|
|
285
|
+
assert.equal(modeOf('/sid/file'), 0o755);
|
|
286
|
+
await alice.fs.promises.chmod('/sid/dir', 0o6755);
|
|
287
|
+
await alice.fs.promises.chown('/sid/dir', -1, -1);
|
|
288
|
+
assert.equal(modeOf('/sid/dir'), 0o6755);
|
|
289
|
+
});
|
|
290
|
+
test('access checks see unsynced changes to an open file', async () => {
|
|
291
|
+
const alice = bindContext({ credentials: { uid: 1000, gid: 1000 } });
|
|
292
|
+
await rootFS.promises.writeFile('/unsynced', 'x', { mode: 0o644 });
|
|
293
|
+
const fd = rootFS.openSync('/unsynced', 'r');
|
|
294
|
+
rootFS.fchmodSync(fd, 0o600);
|
|
295
|
+
assert.throws(() => alice.fs.readFileSync('/unsynced'), { code: 'EACCES' });
|
|
296
|
+
await assert.rejects(alice.fs.promises.readFile('/unsynced'), { code: 'EACCES' });
|
|
297
|
+
rootFS.closeSync(fd);
|
|
298
|
+
});
|
|
299
|
+
test('reaching a path needs search permission on every directory leading to it #326', async () => {
|
|
300
|
+
const alice = bindContext({ credentials: { uid: 1000, gid: 1000 } });
|
|
301
|
+
const bob = bindContext({ credentials: { uid: 2000, gid: 2000 } });
|
|
302
|
+
await rootFS.promises.mkdir('/private', { mode: 0o700 });
|
|
303
|
+
await rootFS.promises.chown('/private', 1000, 1000);
|
|
304
|
+
await rootFS.promises.mkdir('/private/inner', { mode: 0o755 });
|
|
305
|
+
await rootFS.promises.writeFile('/private/inner/readable.txt', 'secret', { mode: 0o644 });
|
|
306
|
+
await rootFS.promises.symlink('/private', '/private-link');
|
|
307
|
+
await rootFS.promises.mkdir('/search-only', { mode: 0o711 });
|
|
308
|
+
await rootFS.promises.writeFile('/search-only/known.txt', 'known', { mode: 0o644 });
|
|
309
|
+
await rootFS.promises.mkdir('/no-search', { mode: 0o722 });
|
|
310
|
+
assert.throws(() => bob.fs.readFileSync('/private-link/inner/readable.txt'), { code: 'EACCES' });
|
|
311
|
+
await assert.rejects(bob.fs.promises.readFile('/private-link/inner/readable.txt'), { code: 'EACCES' });
|
|
312
|
+
assert.throws(() => bob.fs.lstatSync('/private/inner'), { code: 'EACCES' });
|
|
313
|
+
assert.throws(() => bob.fs.mkdirSync('/no-search/dir'), { code: 'EACCES' });
|
|
314
|
+
assert.throws(() => bob.fs.writeFileSync('/no-search/file', 'x'), { code: 'EACCES' });
|
|
315
|
+
const { checkAccess, resolveFullWalk } = vfsConfig;
|
|
316
|
+
vfsConfig._setVFSConfig({ checkAccess, resolveFullWalk: true });
|
|
317
|
+
try {
|
|
318
|
+
assert.equal(alice.fs.readFileSync('/private/inner/readable.txt', 'utf8'), 'secret');
|
|
319
|
+
assert.equal(rootFS.readFileSync('/private/inner/readable.txt', 'utf8'), 'secret');
|
|
320
|
+
assert.throws(() => bob.fs.readFileSync('/private/inner/readable.txt'), { code: 'EACCES' });
|
|
321
|
+
await assert.rejects(bob.fs.promises.readFile('/private/inner/readable.txt'), { code: 'EACCES' });
|
|
322
|
+
assert.throws(() => bob.fs.statSync('/private/inner/readable.txt'), { code: 'EACCES' });
|
|
323
|
+
await assert.rejects(bob.fs.promises.stat('/private/inner/readable.txt'), { code: 'EACCES' });
|
|
324
|
+
assert.throws(() => bob.fs.readdirSync('/private/inner'), { code: 'EACCES' });
|
|
325
|
+
assert.throws(() => bob.fs.writeFileSync('/private/inner/new.txt', 'x'), { code: 'EACCES' });
|
|
326
|
+
assert.throws(() => bob.fs.unlinkSync('/private/inner/readable.txt'), { code: 'EACCES' });
|
|
327
|
+
assert.throws(() => bob.fs.mkdirSync('/private/inner/dir'), { code: 'EACCES' });
|
|
328
|
+
assert.throws(() => bob.fs.renameSync('/private/inner/readable.txt', '/stolen.txt'), { code: 'EACCES' });
|
|
329
|
+
assert(rootFS.existsSync('/private/inner/readable.txt'));
|
|
330
|
+
assert.equal(bob.fs.statSync('/private').mode & 0o777, 0o700);
|
|
331
|
+
assert.throws(() => bob.fs.readdirSync('/private'), { code: 'EACCES' });
|
|
332
|
+
assert.equal(bob.fs.readFileSync('/search-only/known.txt', 'utf8'), 'known');
|
|
333
|
+
assert.throws(() => bob.fs.readdirSync('/search-only'), { code: 'EACCES' });
|
|
334
|
+
assert.equal(bob.fs.existsSync('/private/inner/readable.txt'), false);
|
|
335
|
+
assert.equal(await bob.fs.promises.exists('/private/inner/readable.txt'), false);
|
|
336
|
+
assert.equal(bob.fs.existsSync('/search-only/known.txt'), true);
|
|
337
|
+
}
|
|
338
|
+
finally {
|
|
339
|
+
vfsConfig._setVFSConfig({ checkAccess, resolveFullWalk });
|
|
340
|
+
}
|
|
341
|
+
});
|
|
342
|
+
const copy = { ...defaultContext.credentials };
|
|
343
|
+
Object.assign(defaultContext.credentials, { uid: 1000, gid: 1000, euid: 1000, egid: 1000 });
|
|
344
|
+
test('Access controls: /', () => test_item('/'));
|
|
345
|
+
Object.assign(defaultContext.credentials, copy);
|
|
346
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
var __addDisposableResource = (this && this.__addDisposableResource) || function (env, value, async) {
|
|
2
|
+
if (value !== null && value !== void 0) {
|
|
3
|
+
if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected.");
|
|
4
|
+
var dispose, inner;
|
|
5
|
+
if (async) {
|
|
6
|
+
if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined.");
|
|
7
|
+
dispose = value[Symbol.asyncDispose];
|
|
8
|
+
}
|
|
9
|
+
if (dispose === void 0) {
|
|
10
|
+
if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined.");
|
|
11
|
+
dispose = value[Symbol.dispose];
|
|
12
|
+
if (async) inner = dispose;
|
|
13
|
+
}
|
|
14
|
+
if (typeof dispose !== "function") throw new TypeError("Object not disposable.");
|
|
15
|
+
if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } };
|
|
16
|
+
env.stack.push({ value: value, dispose: dispose, async: async });
|
|
17
|
+
}
|
|
18
|
+
else if (async) {
|
|
19
|
+
env.stack.push({ async: true });
|
|
20
|
+
}
|
|
21
|
+
return value;
|
|
22
|
+
};
|
|
23
|
+
var __disposeResources = (this && this.__disposeResources) || (function (SuppressedError) {
|
|
24
|
+
return function (env) {
|
|
25
|
+
function fail(e) {
|
|
26
|
+
env.error = env.hasError ? new SuppressedError(e, env.error, "An error was suppressed during disposal.") : e;
|
|
27
|
+
env.hasError = true;
|
|
28
|
+
}
|
|
29
|
+
var r, s = 0;
|
|
30
|
+
function next() {
|
|
31
|
+
while (r = env.stack.pop()) {
|
|
32
|
+
try {
|
|
33
|
+
if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next);
|
|
34
|
+
if (r.dispose) {
|
|
35
|
+
var result = r.dispose.call(r.value);
|
|
36
|
+
if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { fail(e); return next(); });
|
|
37
|
+
}
|
|
38
|
+
else s |= 1;
|
|
39
|
+
}
|
|
40
|
+
catch (e) {
|
|
41
|
+
fail(e);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve();
|
|
45
|
+
if (env.hasError) throw env.error;
|
|
46
|
+
}
|
|
47
|
+
return next();
|
|
48
|
+
};
|
|
49
|
+
})(typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
|
|
50
|
+
var e = new Error(message);
|
|
51
|
+
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
52
|
+
});
|
|
53
|
+
// SPDX-License-Identifier: LGPL-3.0-or-later
|
|
54
|
+
import { sync } from '@zenfs/core';
|
|
55
|
+
import { Buffer } from 'buffer';
|
|
56
|
+
import assert from 'node:assert/strict';
|
|
57
|
+
import { suite, test } from 'node:test';
|
|
58
|
+
import { promisify } from 'node:util';
|
|
59
|
+
import { config, fs } from '../common.js';
|
|
60
|
+
const filepath = 'x.txt';
|
|
61
|
+
const expected = 'xyz\n';
|
|
62
|
+
const ellipses = '…'.repeat(10_000);
|
|
63
|
+
suite('read', () => {
|
|
64
|
+
test('read file asynchronously', config('async'), async () => {
|
|
65
|
+
const env_1 = { stack: [], error: void 0, hasError: false };
|
|
66
|
+
try {
|
|
67
|
+
const handle = __addDisposableResource(env_1, await fs.promises.open(filepath, 'r'), true);
|
|
68
|
+
const { bytesRead, buffer } = await handle.read(Buffer.alloc(expected.length), 0, expected.length, 0);
|
|
69
|
+
assert.equal(bytesRead, expected.length);
|
|
70
|
+
assert.equal(buffer.toString(), expected);
|
|
71
|
+
}
|
|
72
|
+
catch (e_1) {
|
|
73
|
+
env_1.error = e_1;
|
|
74
|
+
env_1.hasError = true;
|
|
75
|
+
}
|
|
76
|
+
finally {
|
|
77
|
+
const result_1 = __disposeResources(env_1);
|
|
78
|
+
if (result_1)
|
|
79
|
+
await result_1;
|
|
80
|
+
}
|
|
81
|
+
});
|
|
82
|
+
test('read file synchronously', config('sync'), () => {
|
|
83
|
+
const fd = fs.openSync(filepath, 'r');
|
|
84
|
+
const buffer = Buffer.alloc(expected.length);
|
|
85
|
+
const bytesRead = fs.readSync(fd, buffer, 0, expected.length, 0);
|
|
86
|
+
assert.equal(bytesRead, expected.length);
|
|
87
|
+
assert.equal(buffer.toString(), expected);
|
|
88
|
+
});
|
|
89
|
+
test('Read a file and check its binary bytes asynchronously', config('async'), async () => {
|
|
90
|
+
const buff = await fs.promises.readFile('elipses.txt');
|
|
91
|
+
assert.equal(buff.length, 30_000);
|
|
92
|
+
assert.equal(buff.toString(), ellipses);
|
|
93
|
+
assert.equal((buff[1] << 8) | buff[0], 32994);
|
|
94
|
+
});
|
|
95
|
+
test('Read a file and check its binary bytes synchronously', config('sync'), () => {
|
|
96
|
+
const buff = fs.readFileSync('elipses.txt');
|
|
97
|
+
assert.equal(buff.length, 30_000);
|
|
98
|
+
assert.equal(buff.toString(), ellipses);
|
|
99
|
+
assert.equal((buff[1] << 8) | buff[0], 32994);
|
|
100
|
+
});
|
|
101
|
+
const bufferAsync = Buffer.alloc(expected.length);
|
|
102
|
+
const bufferSync = Buffer.alloc(expected.length);
|
|
103
|
+
test('read file from handle asynchronously', config('async'), async () => {
|
|
104
|
+
const env_2 = { stack: [], error: void 0, hasError: false };
|
|
105
|
+
try {
|
|
106
|
+
const handle = __addDisposableResource(env_2, await fs.promises.open(filepath, 'r'), true);
|
|
107
|
+
const { bytesRead } = await handle.read(bufferAsync, 0, expected.length, 0);
|
|
108
|
+
assert.equal(bytesRead, expected.length);
|
|
109
|
+
assert.equal(bufferAsync.toString(), expected);
|
|
110
|
+
}
|
|
111
|
+
catch (e_2) {
|
|
112
|
+
env_2.error = e_2;
|
|
113
|
+
env_2.hasError = true;
|
|
114
|
+
}
|
|
115
|
+
finally {
|
|
116
|
+
const result_2 = __disposeResources(env_2);
|
|
117
|
+
if (result_2)
|
|
118
|
+
await result_2;
|
|
119
|
+
}
|
|
120
|
+
});
|
|
121
|
+
test('read file from handle synchronously', config('sync'), () => {
|
|
122
|
+
const fd = fs.openSync(filepath, 'r');
|
|
123
|
+
const bytesRead = fs.readSync(fd, bufferSync, 0, expected.length, 0);
|
|
124
|
+
assert.equal(bufferSync.toString(), expected);
|
|
125
|
+
assert.equal(bytesRead, expected.length);
|
|
126
|
+
});
|
|
127
|
+
test('read file synchronously to non-zero offset', config('sync'), () => {
|
|
128
|
+
const fd = fs.openSync(filepath, 'r');
|
|
129
|
+
const buffer = Buffer.alloc(expected.length + 10);
|
|
130
|
+
const bytesRead = fs.readSync(fd, buffer, 10, expected.length, 0);
|
|
131
|
+
assert.equal(buffer.subarray(10, buffer.length).toString(), expected);
|
|
132
|
+
assert.equal(bytesRead, expected.length);
|
|
133
|
+
});
|
|
134
|
+
test('read using callback API #239', config('sync', 'write'), async () => {
|
|
135
|
+
const path = '/text.txt';
|
|
136
|
+
fs.writeFileSync(path, 'hello world');
|
|
137
|
+
await sync();
|
|
138
|
+
const fd = (await promisify(fs.open)(path, 0, 0));
|
|
139
|
+
const read = promisify(fs.read);
|
|
140
|
+
const buf = Buffer.alloc(1024);
|
|
141
|
+
const n0 = await read(fd, buf, 0, 1024, undefined);
|
|
142
|
+
assert.equal(n0, 11);
|
|
143
|
+
assert.equal(buf.subarray(0, n0).toString('utf8'), 'hello world');
|
|
144
|
+
const n1 = await read(fd, buf, 0, 1024, undefined);
|
|
145
|
+
assert.equal(n1, 0);
|
|
146
|
+
assert.equal(buf.subarray(0, n1).toString('utf8'), '');
|
|
147
|
+
await promisify(fs.close)(fd);
|
|
148
|
+
});
|
|
149
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
var __addDisposableResource = (this && this.__addDisposableResource) || function (env, value, async) {
|
|
2
|
+
if (value !== null && value !== void 0) {
|
|
3
|
+
if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected.");
|
|
4
|
+
var dispose, inner;
|
|
5
|
+
if (async) {
|
|
6
|
+
if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined.");
|
|
7
|
+
dispose = value[Symbol.asyncDispose];
|
|
8
|
+
}
|
|
9
|
+
if (dispose === void 0) {
|
|
10
|
+
if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined.");
|
|
11
|
+
dispose = value[Symbol.dispose];
|
|
12
|
+
if (async) inner = dispose;
|
|
13
|
+
}
|
|
14
|
+
if (typeof dispose !== "function") throw new TypeError("Object not disposable.");
|
|
15
|
+
if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } };
|
|
16
|
+
env.stack.push({ value: value, dispose: dispose, async: async });
|
|
17
|
+
}
|
|
18
|
+
else if (async) {
|
|
19
|
+
env.stack.push({ async: true });
|
|
20
|
+
}
|
|
21
|
+
return value;
|
|
22
|
+
};
|
|
23
|
+
var __disposeResources = (this && this.__disposeResources) || (function (SuppressedError) {
|
|
24
|
+
return function (env) {
|
|
25
|
+
function fail(e) {
|
|
26
|
+
env.error = env.hasError ? new SuppressedError(e, env.error, "An error was suppressed during disposal.") : e;
|
|
27
|
+
env.hasError = true;
|
|
28
|
+
}
|
|
29
|
+
var r, s = 0;
|
|
30
|
+
function next() {
|
|
31
|
+
while (r = env.stack.pop()) {
|
|
32
|
+
try {
|
|
33
|
+
if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next);
|
|
34
|
+
if (r.dispose) {
|
|
35
|
+
var result = r.dispose.call(r.value);
|
|
36
|
+
if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { fail(e); return next(); });
|
|
37
|
+
}
|
|
38
|
+
else s |= 1;
|
|
39
|
+
}
|
|
40
|
+
catch (e) {
|
|
41
|
+
fail(e);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve();
|
|
45
|
+
if (env.hasError) throw env.error;
|
|
46
|
+
}
|
|
47
|
+
return next();
|
|
48
|
+
};
|
|
49
|
+
})(typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
|
|
50
|
+
var e = new Error(message);
|
|
51
|
+
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
52
|
+
});
|
|
53
|
+
// SPDX-License-Identifier: LGPL-3.0-or-later
|
|
54
|
+
import assert from 'node:assert/strict';
|
|
55
|
+
import { suite, test } from 'node:test';
|
|
56
|
+
import { config, fs } from '../common.js';
|
|
57
|
+
suite('Reading', () => {
|
|
58
|
+
test('Cannot read a file with an invalid encoding', config('sync'), () => {
|
|
59
|
+
assert.throws(() => fs.readFileSync('a.js', 'wrong-encoding'));
|
|
60
|
+
});
|
|
61
|
+
test('Reading past the end of a file should not be an error', config('async'), async () => {
|
|
62
|
+
const env_1 = { stack: [], error: void 0, hasError: false };
|
|
63
|
+
try {
|
|
64
|
+
const handle = __addDisposableResource(env_1, await fs.promises.open('a.js', 'r'), true);
|
|
65
|
+
const { bytesRead } = await handle.read(new Uint8Array(10), 0, 10, 10000);
|
|
66
|
+
assert.equal(bytesRead, 0);
|
|
67
|
+
}
|
|
68
|
+
catch (e_1) {
|
|
69
|
+
env_1.error = e_1;
|
|
70
|
+
env_1.hasError = true;
|
|
71
|
+
}
|
|
72
|
+
finally {
|
|
73
|
+
const result_1 = __disposeResources(env_1);
|
|
74
|
+
if (result_1)
|
|
75
|
+
await result_1;
|
|
76
|
+
}
|
|
77
|
+
});
|
|
78
|
+
const dir = 'test-readfile-unlink';
|
|
79
|
+
const file = 'test-readfile-unlink/test.bin';
|
|
80
|
+
const data = new Uint8Array(512).fill(42);
|
|
81
|
+
test('create directory and write file', config('async', 'write', 'directories'), async () => {
|
|
82
|
+
await fs.promises.mkdir(dir);
|
|
83
|
+
await fs.promises.writeFile(file, data);
|
|
84
|
+
});
|
|
85
|
+
test('read file and verify its content', config('async'), async () => {
|
|
86
|
+
const read = await fs.promises.readFile(file);
|
|
87
|
+
assert.equal(read.length, data.length);
|
|
88
|
+
assert.equal(read[0], 42);
|
|
89
|
+
});
|
|
90
|
+
test('unlink file and remove directory', config('async', 'write', 'directories'), async () => {
|
|
91
|
+
await fs.promises.unlink(file);
|
|
92
|
+
await fs.promises.rmdir(dir);
|
|
93
|
+
});
|
|
94
|
+
const fileName = 'empty.txt';
|
|
95
|
+
test('read file', config('sync', 'async'), async () => {
|
|
96
|
+
assert.equal((await fs.promises.readFile(fileName)).toString(), '');
|
|
97
|
+
assert.equal(fs.readFileSync(fileName).toString(), '');
|
|
98
|
+
});
|
|
99
|
+
test('read file with utf-8 encoding', config('sync', 'async'), async () => {
|
|
100
|
+
assert.equal(await fs.promises.readFile(fileName, 'utf8'), '');
|
|
101
|
+
assert.equal(fs.readFileSync(fileName, 'utf8'), '');
|
|
102
|
+
});
|
|
103
|
+
test('read file synchronously and verify the content', config('sync'), () => {
|
|
104
|
+
const content = fs.readFileSync('elipses.txt', 'utf8');
|
|
105
|
+
assert.equal(content.length, 10000);
|
|
106
|
+
for (let i = 0; i < content.length; i++) {
|
|
107
|
+
assert.equal(content[i], '…');
|
|
108
|
+
}
|
|
109
|
+
});
|
|
110
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|