@archildata/client 0.1.9 → 0.1.10

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 CHANGED
@@ -92,7 +92,7 @@ The main client class for interacting with Archil filesystems.
92
92
  - `create(parentInodeId, name, attributes, options?)` - Create file/directory
93
93
  - `unlink(parentInodeId, name, options?)` - Delete file or empty directory
94
94
  - `rename(parentInodeId, name, newParentInodeId, newName, options?)` - Move/rename
95
- - `setattr(inodeId, options)` - Update file attributes (user required in options)
95
+ - `setattr(inodeId, attributes, options)` - Update file attributes (user required in options)
96
96
  - `setImmutable(inodeId)` - Mark subtree as immutable
97
97
  - `setMutable(inodeId)` - Mark subtree as mutable
98
98
  - `listImmutableSubtrees()` - List immutable roots
@@ -143,14 +143,13 @@ interface CheckoutOptions {
143
143
  user?: UnixUser; // Unix user context for permission checks
144
144
  }
145
145
 
146
- interface SetAttrOptions {
146
+ interface SetAttrAttributes {
147
147
  mode?: number;
148
148
  uid?: number;
149
149
  gid?: number;
150
150
  size?: number;
151
151
  atimeMs?: number; // use -1 for current time
152
152
  mtimeMs?: number; // use -1 for current time
153
- user: UnixUser; // required for setattr
154
153
  }
155
154
  ```
156
155
 
Binary file
package/index.d.ts CHANGED
@@ -161,12 +161,12 @@ export interface CheckoutOptions {
161
161
  user?: UnixUser
162
162
  }
163
163
  /**
164
- * Options for setattr operation
164
+ * Attributes to set in a setattr operation
165
165
  *
166
166
  * All fields are optional - only provided fields will be updated.
167
167
  * For atime/mtime: use timestamp in milliseconds, or -1 to set to current time.
168
168
  */
169
- export interface SetAttrOptions {
169
+ export interface SetAttrAttributes {
170
170
  /** New permission mode (e.g., 0o644) */
171
171
  mode?: number
172
172
  /** New owner user ID */
@@ -181,8 +181,6 @@ export interface SetAttrOptions {
181
181
  mtimeMs?: number
182
182
  /** New change time in milliseconds since epoch */
183
183
  ctimeMs?: number
184
- /** Unix user context for permission checks (required for setattr) */
185
- user?: UnixUser
186
184
  }
187
185
  /**
188
186
  * ArchilClient provides low-level access to Archil filesystem operations.
@@ -305,14 +303,14 @@ export declare class ArchilClient {
305
303
  * // First checkout to get write delegation
306
304
  * await client.checkout(inodeId);
307
305
  * // Update timestamps (touch)
308
- * await client.setattr(inodeId, { atimeMs: -1, mtimeMs: -1, user: { uid: 1000, gid: 1000 } });
306
+ * await client.setattr(inodeId, { atimeMs: -1, mtimeMs: -1 }, { user: { uid: 1000, gid: 1000 } });
309
307
  * // Or change mode
310
- * await client.setattr(inodeId, { mode: 0o755, user: { uid: 1000, gid: 1000 } });
308
+ * await client.setattr(inodeId, { mode: 0o755 }, { user: { uid: 1000, gid: 1000 } });
311
309
  * // Checkin when done
312
310
  * await client.checkin(inodeId);
313
311
  * ```
314
312
  */
315
- setattr(inodeId: number, options: SetAttrOptions): Promise<InodeAttributes>
313
+ setattr(inodeId: number, attributes: SetAttrAttributes, options?: OperationOptions | undefined | null): Promise<InodeAttributes>
316
314
  /**
317
315
  * Unlink (delete) a file or empty directory.
318
316
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@archildata/client",
3
- "version": "0.1.9",
3
+ "version": "0.1.10",
4
4
  "description": "High-performance Node.js client for Archil distributed filesystem",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
@@ -50,10 +50,10 @@
50
50
  "native"
51
51
  ],
52
52
  "optionalDependencies": {
53
- "@archildata/client-win32-x64-msvc": "0.1.9",
54
- "@archildata/client-darwin-x64": "0.1.9",
55
- "@archildata/client-linux-x64-gnu": "0.1.9",
56
- "@archildata/client-darwin-arm64": "0.1.9",
57
- "@archildata/client-linux-arm64-gnu": "0.1.9"
53
+ "@archildata/client-win32-x64-msvc": "0.1.10",
54
+ "@archildata/client-darwin-x64": "0.1.10",
55
+ "@archildata/client-linux-x64-gnu": "0.1.10",
56
+ "@archildata/client-darwin-arm64": "0.1.10",
57
+ "@archildata/client-linux-arm64-gnu": "0.1.10"
58
58
  }
59
59
  }