disk 0.8.17 → 0.8.18

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/cli.js CHANGED
@@ -106,7 +106,7 @@ function deriveS3BaseUrl(controlBaseUrl) {
106
106
  }
107
107
 
108
108
  // src/version.ts
109
- var VERSION = true ? "0.8.17" : "0.0.0-dev";
109
+ var VERSION = true ? "0.8.18" : "0.0.0-dev";
110
110
  var USER_AGENT = `archil-js/${VERSION}`;
111
111
 
112
112
  // src/client.ts
@@ -1135,7 +1135,8 @@ var Archil = class {
1135
1135
  if (isExecMountSpec(mount)) {
1136
1136
  const entry = {
1137
1137
  disk: diskIdFromMount(mount.disk),
1138
- readOnly: mount.readOnly ?? false
1138
+ readOnly: mount.readOnly ?? false,
1139
+ conditional: mount.conditional ?? false
1139
1140
  };
1140
1141
  if (mount.subdirectory !== void 0) entry.subdirectory = mount.subdirectory;
1141
1142
  disks[relPath] = entry;
package/dist/index.cjs CHANGED
@@ -154,7 +154,7 @@ function deriveS3BaseUrl(controlBaseUrl) {
154
154
  }
155
155
 
156
156
  // src/version.ts
157
- var VERSION = true ? "0.8.17" : "0.0.0-dev";
157
+ var VERSION = true ? "0.8.18" : "0.0.0-dev";
158
158
  var USER_AGENT = `archil-js/${VERSION}`;
159
159
 
160
160
  // src/client.ts
@@ -1183,7 +1183,8 @@ var Archil = class {
1183
1183
  if (isExecMountSpec(mount)) {
1184
1184
  const entry = {
1185
1185
  disk: diskIdFromMount(mount.disk),
1186
- readOnly: mount.readOnly ?? false
1186
+ readOnly: mount.readOnly ?? false,
1187
+ conditional: mount.conditional ?? false
1187
1188
  };
1188
1189
  if (mount.subdirectory !== void 0) entry.subdirectory = mount.subdirectory;
1189
1190
  disks[relPath] = entry;
package/dist/index.d.cts CHANGED
@@ -756,7 +756,8 @@ interface components {
756
756
  *
757
757
  * Each value is either a plain disk ID string (mounts the disk's
758
758
  * root, read-write) or an object that additionally selects a
759
- * subdirectory of the disk and/or marks the mount as read-only.
759
+ * subdirectory of the disk and/or marks the mount as read-only or
760
+ * conditional.
760
761
  * @example {
761
762
  * "data": "dsk-abc123",
762
763
  * "logs": {
@@ -794,6 +795,14 @@ interface components {
794
795
  * @default false
795
796
  */
796
797
  readOnly: boolean;
798
+ /**
799
+ * @description When true, the disk is mounted in conditional mode, where mutating
800
+ * operations are sent directly to the server without a delegation
801
+ * checkout. This enables concurrent writes from multiple clients to
802
+ * the same disk.
803
+ * @default false
804
+ */
805
+ conditional: boolean;
797
806
  };
798
807
  ApiResponse_Exec: {
799
808
  /** @example true */
@@ -2080,8 +2089,9 @@ interface ArchilOptions {
2080
2089
  /**
2081
2090
  * Options that apply to a single mounted disk in an exec request.
2082
2091
  * Use this object form when you need to pin the mount to a subdirectoryectory
2083
- * of the disk and/or mount it read-only; for the default case (mount
2084
- * the disk's root, read-write), pass a `Disk` or disk-id string instead.
2092
+ * of the disk, mount it read-only, or mount it in conditional mode; for the
2093
+ * default case (mount the disk's root, read-write), pass a `Disk` or disk-id
2094
+ * string instead.
2085
2095
  */
2086
2096
  interface ExecMountSpec {
2087
2097
  /** Disk to mount, by `Disk` instance or raw disk id string. */
@@ -2097,13 +2107,20 @@ interface ExecMountSpec {
2097
2107
  * against the mount fail with EROFS. Defaults to false.
2098
2108
  */
2099
2109
  readOnly?: boolean;
2110
+ /**
2111
+ * When true, mount the disk in conditional mode, where mutating operations
2112
+ * are sent directly to the server without a delegation checkout. This
2113
+ * enables concurrent writes from multiple clients to the same disk.
2114
+ * Defaults to false.
2115
+ */
2116
+ conditional?: boolean;
2100
2117
  }
2101
2118
  /**
2102
2119
  * One disk to mount in an exec request. Either a `Disk`/disk-id string
2103
2120
  * (mounts the disk's root, read-write) or an `ExecMountSpec` object that
2104
2121
  * additionally selects a subdirectoryectory of the disk and/or marks the mount
2105
- * as read-only. Used by Archil#exec — the map key is the relative path
2106
- * under /mnt/archil at which to mount the disk.
2122
+ * as read-only or conditional. Used by Archil#exec — the map key is the
2123
+ * relative path under /mnt/archil at which to mount the disk.
2107
2124
  */
2108
2125
  type ExecMount = Disk | string | ExecMountSpec;
2109
2126
  interface ExecOptions {
package/dist/index.d.ts CHANGED
@@ -756,7 +756,8 @@ interface components {
756
756
  *
757
757
  * Each value is either a plain disk ID string (mounts the disk's
758
758
  * root, read-write) or an object that additionally selects a
759
- * subdirectory of the disk and/or marks the mount as read-only.
759
+ * subdirectory of the disk and/or marks the mount as read-only or
760
+ * conditional.
760
761
  * @example {
761
762
  * "data": "dsk-abc123",
762
763
  * "logs": {
@@ -794,6 +795,14 @@ interface components {
794
795
  * @default false
795
796
  */
796
797
  readOnly: boolean;
798
+ /**
799
+ * @description When true, the disk is mounted in conditional mode, where mutating
800
+ * operations are sent directly to the server without a delegation
801
+ * checkout. This enables concurrent writes from multiple clients to
802
+ * the same disk.
803
+ * @default false
804
+ */
805
+ conditional: boolean;
797
806
  };
798
807
  ApiResponse_Exec: {
799
808
  /** @example true */
@@ -2080,8 +2089,9 @@ interface ArchilOptions {
2080
2089
  /**
2081
2090
  * Options that apply to a single mounted disk in an exec request.
2082
2091
  * Use this object form when you need to pin the mount to a subdirectoryectory
2083
- * of the disk and/or mount it read-only; for the default case (mount
2084
- * the disk's root, read-write), pass a `Disk` or disk-id string instead.
2092
+ * of the disk, mount it read-only, or mount it in conditional mode; for the
2093
+ * default case (mount the disk's root, read-write), pass a `Disk` or disk-id
2094
+ * string instead.
2085
2095
  */
2086
2096
  interface ExecMountSpec {
2087
2097
  /** Disk to mount, by `Disk` instance or raw disk id string. */
@@ -2097,13 +2107,20 @@ interface ExecMountSpec {
2097
2107
  * against the mount fail with EROFS. Defaults to false.
2098
2108
  */
2099
2109
  readOnly?: boolean;
2110
+ /**
2111
+ * When true, mount the disk in conditional mode, where mutating operations
2112
+ * are sent directly to the server without a delegation checkout. This
2113
+ * enables concurrent writes from multiple clients to the same disk.
2114
+ * Defaults to false.
2115
+ */
2116
+ conditional?: boolean;
2100
2117
  }
2101
2118
  /**
2102
2119
  * One disk to mount in an exec request. Either a `Disk`/disk-id string
2103
2120
  * (mounts the disk's root, read-write) or an `ExecMountSpec` object that
2104
2121
  * additionally selects a subdirectoryectory of the disk and/or marks the mount
2105
- * as read-only. Used by Archil#exec — the map key is the relative path
2106
- * under /mnt/archil at which to mount the disk.
2122
+ * as read-only or conditional. Used by Archil#exec — the map key is the
2123
+ * relative path under /mnt/archil at which to mount the disk.
2107
2124
  */
2108
2125
  type ExecMount = Disk | string | ExecMountSpec;
2109
2126
  interface ExecOptions {
package/dist/index.js CHANGED
@@ -100,7 +100,7 @@ function deriveS3BaseUrl(controlBaseUrl) {
100
100
  }
101
101
 
102
102
  // src/version.ts
103
- var VERSION = true ? "0.8.17" : "0.0.0-dev";
103
+ var VERSION = true ? "0.8.18" : "0.0.0-dev";
104
104
  var USER_AGENT = `archil-js/${VERSION}`;
105
105
 
106
106
  // src/client.ts
@@ -1129,7 +1129,8 @@ var Archil = class {
1129
1129
  if (isExecMountSpec(mount)) {
1130
1130
  const entry = {
1131
1131
  disk: diskIdFromMount(mount.disk),
1132
- readOnly: mount.readOnly ?? false
1132
+ readOnly: mount.readOnly ?? false,
1133
+ conditional: mount.conditional ?? false
1133
1134
  };
1134
1135
  if (mount.subdirectory !== void 0) entry.subdirectory = mount.subdirectory;
1135
1136
  disks[relPath] = entry;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "disk",
3
- "version": "0.8.17",
3
+ "version": "0.8.18",
4
4
  "description": "Pure-JS client and CLI for Archil disks",
5
5
  "type": "module",
6
6
  "main": "dist/index.cjs",