@k13engineering/linux-fuse 0.0.6 → 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.
@@ -4,6 +4,8 @@ declare const FUSE_MIN_READ_BUFFER = 8192;
4
4
  declare const FUSE_GETATTR_FH = 1n;
5
5
  declare const FUSE_BIG_WRITES: number;
6
6
  declare const FUSE_INIT_FLAGS: number;
7
+ declare const FUSE_SETXATTR_EXT: bigint;
8
+ declare const FUSE_COMPAT_SETXATTR_IN_SIZE = 8;
7
9
  declare const MS_NOSUID = 2n;
8
10
  declare const MS_NODEV = 4n;
9
11
  declare const MNT_DETACH = 2n;
@@ -88,7 +90,7 @@ declare const opcode: {
88
90
  readonly TMPFILE: 51;
89
91
  readonly STATX: 52;
90
92
  };
91
- declare const openCloseOnExecFlag: any;
93
+ declare const O_CLOEXEC = 524288;
92
94
  declare const abi: {
93
95
  readonly endianness: "little";
94
96
  readonly dataModel: "LP64";
@@ -159,7 +161,7 @@ declare const fuseAttrDefinition: {
159
161
  readonly name: "blksize";
160
162
  readonly definition: any;
161
163
  }, {
162
- readonly name: "padding";
164
+ readonly name: "flags";
163
165
  readonly definition: any;
164
166
  }];
165
167
  };
@@ -234,4 +236,4 @@ declare const MOUNT_ATTR_NODEV: bigint;
234
236
  declare const MOUNT_ATTR_NOEXEC: bigint;
235
237
  declare const MOUNT_ATTR_NOSYMFOLLOW: bigint;
236
238
  declare const MOUNT_ATTR_NODIRATIME: bigint;
237
- export { abi, DT_BLK, DT_CHR, DT_DIR, DT_FIFO, DT_LNK, DT_REG, DT_SOCK, DT_UNKNOWN, EINVAL, ENOENT, ENOSYS, ENOTDIR, EIO, EPROTO, ESTALE, FATTR_ATIME, FATTR_ATIME_NOW, FATTR_FH, FATTR_GID, FATTR_MODE, FATTR_MTIME, FATTR_MTIME_NOW, FATTR_SIZE, FATTR_UID, FUSE_BIG_WRITES, FUSE_GETATTR_FH, FUSE_INIT_FLAGS, FUSE_MIN_READ_BUFFER, FUSE_ROOT_ID, MS_NODEV, MS_NOSUID, MNT_DETACH, opcode, openCloseOnExecFlag, S_IFBLK, S_IFCHR, S_IFDIR, S_IFIFO, S_IFLNK, S_IFMT, S_IFREG, S_IFSOCK, textEncoder, uint16Array, uint32Array, uint64Array, fuseAttrDefinition, fuseKstatfsDefinition, fuseFileLockDefinition, FOPEN_DIRECT_IO, FOPEN_KEEP_CACHE, FOPEN_NONSEEKABLE, FSOPEN_CLOEXEC, FSCONFIG_SET_STRING, FSCONFIG_SET_FLAG, FSCONFIG_CMD_CREATE, FSMOUNT_CLOEXEC, MOVE_MOUNT_F_EMPTY_PATH, AT_FCWD, MOUNT_ATTR_RDONLY, MOUNT_ATTR_NOSUID, MOUNT_ATTR_NODEV, MOUNT_ATTR_NOEXEC, MOUNT_ATTR_NOSYMFOLLOW, MOUNT_ATTR_NODIRATIME, };
239
+ export { abi, DT_BLK, DT_CHR, DT_DIR, DT_FIFO, DT_LNK, DT_REG, DT_SOCK, DT_UNKNOWN, EINVAL, ENOENT, ENOSYS, ENOTDIR, EIO, EPROTO, ESTALE, FATTR_ATIME, FATTR_ATIME_NOW, FATTR_FH, FATTR_GID, FATTR_MODE, FATTR_MTIME, FATTR_MTIME_NOW, FATTR_SIZE, FATTR_UID, FUSE_BIG_WRITES, FUSE_COMPAT_SETXATTR_IN_SIZE, FUSE_GETATTR_FH, FUSE_INIT_FLAGS, FUSE_MIN_READ_BUFFER, FUSE_ROOT_ID, FUSE_SETXATTR_EXT, MS_NODEV, MS_NOSUID, MNT_DETACH, O_CLOEXEC, opcode, S_IFBLK, S_IFCHR, S_IFDIR, S_IFIFO, S_IFLNK, S_IFMT, S_IFREG, S_IFSOCK, textEncoder, uint16Array, uint32Array, uint64Array, fuseAttrDefinition, fuseKstatfsDefinition, fuseFileLockDefinition, FOPEN_DIRECT_IO, FOPEN_KEEP_CACHE, FOPEN_NONSEEKABLE, FSOPEN_CLOEXEC, FSCONFIG_SET_STRING, FSCONFIG_SET_FLAG, FSCONFIG_CMD_CREATE, FSMOUNT_CLOEXEC, MOVE_MOUNT_F_EMPTY_PATH, AT_FCWD, MOUNT_ATTR_RDONLY, MOUNT_ATTR_NOSUID, MOUNT_ATTR_NODEV, MOUNT_ATTR_NOEXEC, MOUNT_ATTR_NOSYMFOLLOW, MOUNT_ATTR_NODIRATIME, };
@@ -1,4 +1,3 @@
1
- import nodeFs from "node:fs";
2
1
  import nodeOs from "node:os";
3
2
  import { types } from "ya-struct";
4
3
 
@@ -10,6 +9,8 @@ const FUSE_GETATTR_FH = 1n;
10
9
  const FUSE_ASYNC_READ = 1 << 0;
11
10
  const FUSE_BIG_WRITES = 1 << 5;
12
11
  const FUSE_INIT_FLAGS = FUSE_ASYNC_READ | FUSE_BIG_WRITES;
12
+ const FUSE_SETXATTR_EXT = 1n << 29n;
13
+ const FUSE_COMPAT_SETXATTR_IN_SIZE = 8;
13
14
  const MS_NOSUID = 2n;
14
15
  const MS_NODEV = 4n;
15
16
  const MNT_DETACH = 2n;
@@ -106,9 +107,8 @@ const opcode = {
106
107
  STATX: 52,
107
108
  } /*as const*/;
108
109
 
109
- const openCloseOnExecFlag = "O_CLOEXEC" in nodeFs.constants
110
- ? (nodeFs.constants /*as typeof nodeFs.constants & { O_CLOEXEC: number }*/).O_CLOEXEC
111
- : 0;
110
+ // not exposed by node:fs, same value on all architectures supported by syscall-napi
111
+ const O_CLOEXEC = 0o2000000;
112
112
 
113
113
  const abi = {
114
114
  endianness: "little",
@@ -160,7 +160,7 @@ const fuseAttrDefinition = {
160
160
  { name: "gid", definition: types.UInt32 },
161
161
  { name: "rdev", definition: types.UInt32 },
162
162
  { name: "blksize", definition: types.UInt32 },
163
- { name: "padding", definition: types.UInt32 },
163
+ { name: "flags", definition: types.UInt32 },
164
164
  ],
165
165
  } /*as const*/;
166
166
 
@@ -210,8 +210,8 @@ const MOUNT_ATTR_RDONLY = 1n << 0n;
210
210
  const MOUNT_ATTR_NOSUID = 1n << 1n;
211
211
  const MOUNT_ATTR_NODEV = 1n << 2n;
212
212
  const MOUNT_ATTR_NOEXEC = 1n << 3n;
213
- const MOUNT_ATTR_NOSYMFOLLOW = 1n << 4n;
214
- const MOUNT_ATTR_NODIRATIME = 1n << 5n;
213
+ const MOUNT_ATTR_NOSYMFOLLOW = 1n << 21n;
214
+ const MOUNT_ATTR_NODIRATIME = 1n << 7n;
215
215
 
216
216
  export {
217
217
  abi,
@@ -240,15 +240,17 @@ export {
240
240
  FATTR_SIZE,
241
241
  FATTR_UID,
242
242
  FUSE_BIG_WRITES,
243
+ FUSE_COMPAT_SETXATTR_IN_SIZE,
243
244
  FUSE_GETATTR_FH,
244
245
  FUSE_INIT_FLAGS,
245
246
  FUSE_MIN_READ_BUFFER,
246
247
  FUSE_ROOT_ID,
248
+ FUSE_SETXATTR_EXT,
247
249
  MS_NODEV,
248
250
  MS_NOSUID,
249
251
  MNT_DETACH,
252
+ O_CLOEXEC,
250
253
  opcode,
251
- openCloseOnExecFlag,
252
254
  S_IFBLK,
253
255
  S_IFCHR,
254
256
  S_IFDIR,