@elaraai/e3-types 1.0.80 → 1.0.82
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/src/api.d.ts +263 -3
- package/dist/src/api.d.ts.map +1 -1
- package/dist/src/api.js +46 -2
- package/dist/src/api.js.map +1 -1
- package/dist/src/index.d.ts +3 -2
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +5 -2
- package/dist/src/index.js.map +1 -1
- package/dist/src/intake.d.ts +75 -0
- package/dist/src/intake.d.ts.map +1 -0
- package/dist/src/intake.js +46 -0
- package/dist/src/intake.js.map +1 -0
- package/dist/src/lock.d.ts +186 -0
- package/dist/src/lock.d.ts.map +1 -1
- package/dist/src/lock.js +23 -0
- package/dist/src/lock.js.map +1 -1
- package/dist/src/release.d.ts +1 -1
- package/dist/src/release.js +1 -1
- package/dist/src/transfer.d.ts +25 -7
- package/dist/src/transfer.d.ts.map +1 -1
- package/dist/src/transfer.js +9 -7
- package/dist/src/transfer.js.map +1 -1
- package/package.json +2 -2
- package/src/api.ts +52 -2
- package/src/index.ts +19 -0
- package/src/intake.ts +53 -0
- package/src/lock.ts +29 -0
- package/src/release.ts +1 -1
- package/src/transfer.ts +9 -7
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2025 Elara AI Pty Ltd
|
|
3
|
+
* Dual-licensed under AGPL-3.0 and commercial license. See LICENSE for details.
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* How far a file being taken into the store has got: a deploy's file source,
|
|
7
|
+
* or an upload's delivery as its commit takes it in.
|
|
8
|
+
*
|
|
9
|
+
* A file is hashed first, since its SHA-256 is how the store knows a delivery
|
|
10
|
+
* it already holds, and then taken in: a collection by intake units on the
|
|
11
|
+
* runners, a piece of its segments each, and any other value as the object the
|
|
12
|
+
* file is.
|
|
13
|
+
*/
|
|
14
|
+
import { ArrayType, IntegerType, NullType, StringType, StructType, VariantType, type ValueTypeOf } from '@elaraai/east';
|
|
15
|
+
/**
|
|
16
|
+
* The step a file being taken in is at.
|
|
17
|
+
*/
|
|
18
|
+
export declare const IntakeStepType: VariantType<{
|
|
19
|
+
/** Not started: a deploy takes a bounded number of files in at once */
|
|
20
|
+
readonly waiting: NullType;
|
|
21
|
+
/** Being read for its SHA-256, by which the store knows a delivery it
|
|
22
|
+
* already holds */
|
|
23
|
+
readonly hashing: NullType;
|
|
24
|
+
/** Being taken in by intake units: its `pieces`, and how many are `done` */
|
|
25
|
+
readonly taking_in: StructType<{
|
|
26
|
+
readonly pieces: IntegerType;
|
|
27
|
+
readonly done: IntegerType;
|
|
28
|
+
}>;
|
|
29
|
+
/** In the store: one it already held; a value that is not a collection,
|
|
30
|
+
* carried as the object the file is; or a collection, taken in by the
|
|
31
|
+
* runners named, in the order each first took a piece in — none when every
|
|
32
|
+
* piece was taken in before, by an intake that stopped part way */
|
|
33
|
+
readonly done: VariantType<{
|
|
34
|
+
readonly known: NullType;
|
|
35
|
+
readonly carried: NullType;
|
|
36
|
+
readonly taken: ArrayType<StringType>;
|
|
37
|
+
}>;
|
|
38
|
+
}>;
|
|
39
|
+
export type IntakeStep = ValueTypeOf<typeof IntakeStepType>;
|
|
40
|
+
/**
|
|
41
|
+
* A file being taken into the store.
|
|
42
|
+
*/
|
|
43
|
+
export declare const IntakeFileType: StructType<{
|
|
44
|
+
/** The dataset it becomes, as `inputs/<name>` */
|
|
45
|
+
readonly path: StringType;
|
|
46
|
+
/** The step it is at */
|
|
47
|
+
readonly step: VariantType<{
|
|
48
|
+
/** Not started: a deploy takes a bounded number of files in at once */
|
|
49
|
+
readonly waiting: NullType;
|
|
50
|
+
/** Being read for its SHA-256, by which the store knows a delivery it
|
|
51
|
+
* already holds */
|
|
52
|
+
readonly hashing: NullType;
|
|
53
|
+
/** Being taken in by intake units: its `pieces`, and how many are `done` */
|
|
54
|
+
readonly taking_in: StructType<{
|
|
55
|
+
readonly pieces: IntegerType;
|
|
56
|
+
readonly done: IntegerType;
|
|
57
|
+
}>;
|
|
58
|
+
/** In the store: one it already held; a value that is not a collection,
|
|
59
|
+
* carried as the object the file is; or a collection, taken in by the
|
|
60
|
+
* runners named, in the order each first took a piece in — none when every
|
|
61
|
+
* piece was taken in before, by an intake that stopped part way */
|
|
62
|
+
readonly done: VariantType<{
|
|
63
|
+
readonly known: NullType;
|
|
64
|
+
readonly carried: NullType;
|
|
65
|
+
readonly taken: ArrayType<StringType>;
|
|
66
|
+
}>;
|
|
67
|
+
}>;
|
|
68
|
+
/** Bytes of the file its step has covered: read for its hash, or covered by
|
|
69
|
+
* the pieces taken in; its size once it is done */
|
|
70
|
+
readonly bytes: IntegerType;
|
|
71
|
+
/** The file's size */
|
|
72
|
+
readonly total: IntegerType;
|
|
73
|
+
}>;
|
|
74
|
+
export type IntakeFile = ValueTypeOf<typeof IntakeFileType>;
|
|
75
|
+
//# sourceMappingURL=intake.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"intake.d.ts","sourceRoot":"","sources":["../../src/intake.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;;GAQG;AAEH,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,QAAQ,EAAE,UAAU,EAAE,UAAU,EAAE,WAAW,EAAE,KAAK,WAAW,EAAE,MAAM,eAAe,CAAC;AAExH;;GAEG;AACH,eAAO,MAAM,cAAc;IACzB,uEAAuE;;IAEvE;wBACoB;;IAEpB,4EAA4E;;;;;IAE5E;;;wEAGoE;;;;;;EAEpE,CAAC;AAEH,MAAM,MAAM,UAAU,GAAG,WAAW,CAAC,OAAO,cAAc,CAAC,CAAC;AAE5D;;GAEG;AACH,eAAO,MAAM,cAAc;IACzB,iDAAiD;;IAEjD,wBAAwB;;QAtBxB,uEAAuE;;QAEvE;4BACoB;;QAEpB,4EAA4E;;;;;QAE5E;;;4EAGoE;;;;;;;IAcpE;wDACoD;;IAEpD,sBAAsB;;EAEtB,CAAC;AAEH,MAAM,MAAM,UAAU,GAAG,WAAW,CAAC,OAAO,cAAc,CAAC,CAAC"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2025 Elara AI Pty Ltd
|
|
3
|
+
* Dual-licensed under AGPL-3.0 and commercial license. See LICENSE for details.
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* How far a file being taken into the store has got: a deploy's file source,
|
|
7
|
+
* or an upload's delivery as its commit takes it in.
|
|
8
|
+
*
|
|
9
|
+
* A file is hashed first, since its SHA-256 is how the store knows a delivery
|
|
10
|
+
* it already holds, and then taken in: a collection by intake units on the
|
|
11
|
+
* runners, a piece of its segments each, and any other value as the object the
|
|
12
|
+
* file is.
|
|
13
|
+
*/
|
|
14
|
+
import { ArrayType, IntegerType, NullType, StringType, StructType, VariantType } from '@elaraai/east';
|
|
15
|
+
/**
|
|
16
|
+
* The step a file being taken in is at.
|
|
17
|
+
*/
|
|
18
|
+
export const IntakeStepType = VariantType({
|
|
19
|
+
/** Not started: a deploy takes a bounded number of files in at once */
|
|
20
|
+
waiting: NullType,
|
|
21
|
+
/** Being read for its SHA-256, by which the store knows a delivery it
|
|
22
|
+
* already holds */
|
|
23
|
+
hashing: NullType,
|
|
24
|
+
/** Being taken in by intake units: its `pieces`, and how many are `done` */
|
|
25
|
+
taking_in: StructType({ pieces: IntegerType, done: IntegerType }),
|
|
26
|
+
/** In the store: one it already held; a value that is not a collection,
|
|
27
|
+
* carried as the object the file is; or a collection, taken in by the
|
|
28
|
+
* runners named, in the order each first took a piece in — none when every
|
|
29
|
+
* piece was taken in before, by an intake that stopped part way */
|
|
30
|
+
done: VariantType({ known: NullType, carried: NullType, taken: ArrayType(StringType) }),
|
|
31
|
+
});
|
|
32
|
+
/**
|
|
33
|
+
* A file being taken into the store.
|
|
34
|
+
*/
|
|
35
|
+
export const IntakeFileType = StructType({
|
|
36
|
+
/** The dataset it becomes, as `inputs/<name>` */
|
|
37
|
+
path: StringType,
|
|
38
|
+
/** The step it is at */
|
|
39
|
+
step: IntakeStepType,
|
|
40
|
+
/** Bytes of the file its step has covered: read for its hash, or covered by
|
|
41
|
+
* the pieces taken in; its size once it is done */
|
|
42
|
+
bytes: IntegerType,
|
|
43
|
+
/** The file's size */
|
|
44
|
+
total: IntegerType,
|
|
45
|
+
});
|
|
46
|
+
//# sourceMappingURL=intake.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"intake.js","sourceRoot":"","sources":["../../src/intake.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;;GAQG;AAEH,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,QAAQ,EAAE,UAAU,EAAE,UAAU,EAAE,WAAW,EAAoB,MAAM,eAAe,CAAC;AAExH;;GAEG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,WAAW,CAAC;IACxC,uEAAuE;IACvE,OAAO,EAAE,QAAQ;IACjB;wBACoB;IACpB,OAAO,EAAE,QAAQ;IACjB,4EAA4E;IAC5E,SAAS,EAAE,UAAU,CAAC,EAAE,MAAM,EAAE,WAAW,EAAE,IAAI,EAAE,WAAW,EAAE,CAAC;IACjE;;;wEAGoE;IACpE,IAAI,EAAE,WAAW,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,SAAS,CAAC,UAAU,CAAC,EAAE,CAAC;CACxF,CAAC,CAAC;AAIH;;GAEG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,UAAU,CAAC;IACvC,iDAAiD;IACjD,IAAI,EAAE,UAAU;IAChB,wBAAwB;IACxB,IAAI,EAAE,cAAc;IACpB;wDACoD;IACpD,KAAK,EAAE,WAAW;IAClB,sBAAsB;IACtB,KAAK,EAAE,WAAW;CACnB,CAAC,CAAC"}
|
package/dist/src/lock.d.ts
CHANGED
|
@@ -13,6 +13,10 @@
|
|
|
13
13
|
* - when it was acquired;
|
|
14
14
|
* - when it expires, for a cloud backend's lease.
|
|
15
15
|
*
|
|
16
|
+
* An exclusive holder may also report how far its operation has got, for
|
|
17
|
+
* another process to read while it holds the lock: a deploy taking its file
|
|
18
|
+
* sources in and deploying its records.
|
|
19
|
+
*
|
|
16
20
|
* A local repository keeps each resource's locks in `locks/<resource>/`.
|
|
17
21
|
*/
|
|
18
22
|
import { VariantType, StructType, StringType, IntegerType, DateTimeType, OptionType, NullType, ValueTypeOf } from '@elaraai/east';
|
|
@@ -128,4 +132,186 @@ export declare const LockStateType: StructType<{
|
|
|
128
132
|
readonly expiresAt: OptionType<DateTimeType>;
|
|
129
133
|
}>;
|
|
130
134
|
export type LockState = ValueTypeOf<typeof LockStateType>;
|
|
135
|
+
/**
|
|
136
|
+
* How far the operation holding a lock exclusively has got, as its holder
|
|
137
|
+
* reports it for another process to read while it holds the lock.
|
|
138
|
+
*/
|
|
139
|
+
export declare const LockProgressType: VariantType<{
|
|
140
|
+
/** A deploy: its file sources and its records */
|
|
141
|
+
readonly deployment: StructType<{
|
|
142
|
+
readonly package: StructType<{
|
|
143
|
+
readonly name: StringType;
|
|
144
|
+
readonly version: StringType;
|
|
145
|
+
}>;
|
|
146
|
+
readonly startedAt: DateTimeType;
|
|
147
|
+
readonly files: import("@elaraai/east").ArrayType<StructType<{
|
|
148
|
+
readonly path: StringType;
|
|
149
|
+
readonly step: VariantType<{
|
|
150
|
+
readonly waiting: NullType;
|
|
151
|
+
readonly hashing: NullType;
|
|
152
|
+
readonly taking_in: StructType<{
|
|
153
|
+
readonly pieces: IntegerType;
|
|
154
|
+
readonly done: IntegerType;
|
|
155
|
+
}>;
|
|
156
|
+
readonly done: VariantType<{
|
|
157
|
+
readonly known: NullType;
|
|
158
|
+
readonly carried: NullType;
|
|
159
|
+
readonly taken: import("@elaraai/east").ArrayType<StringType>;
|
|
160
|
+
}>;
|
|
161
|
+
}>;
|
|
162
|
+
readonly bytes: IntegerType;
|
|
163
|
+
readonly total: IntegerType;
|
|
164
|
+
}>>;
|
|
165
|
+
readonly records: import("@elaraai/east").ArrayType<StructType<{
|
|
166
|
+
readonly plan: StructType<{
|
|
167
|
+
readonly record: StringType;
|
|
168
|
+
readonly action: VariantType<{
|
|
169
|
+
readonly mint: NullType;
|
|
170
|
+
readonly keep: StructType<{
|
|
171
|
+
readonly deploy: import("@elaraai/east").BooleanType;
|
|
172
|
+
}>;
|
|
173
|
+
readonly migrate: StructType<{
|
|
174
|
+
readonly steps: import("@elaraai/east").ArrayType<StringType>;
|
|
175
|
+
}>;
|
|
176
|
+
readonly reset: StructType<{
|
|
177
|
+
readonly reason: StringType;
|
|
178
|
+
}>;
|
|
179
|
+
readonly drop: NullType;
|
|
180
|
+
readonly refused: StructType<{
|
|
181
|
+
readonly reason: StringType;
|
|
182
|
+
}>;
|
|
183
|
+
}>;
|
|
184
|
+
}>;
|
|
185
|
+
readonly indexes: import("@elaraai/east").ArrayType<StringType>;
|
|
186
|
+
readonly step: VariantType<{
|
|
187
|
+
readonly waiting: NullType;
|
|
188
|
+
readonly migrating: StructType<{
|
|
189
|
+
readonly name: StringType;
|
|
190
|
+
readonly step: IntegerType;
|
|
191
|
+
readonly steps: IntegerType;
|
|
192
|
+
}>;
|
|
193
|
+
readonly indexing: StructType<{
|
|
194
|
+
readonly index: StringType;
|
|
195
|
+
readonly build: IntegerType;
|
|
196
|
+
readonly builds: IntegerType;
|
|
197
|
+
}>;
|
|
198
|
+
readonly done: NullType;
|
|
199
|
+
}>;
|
|
200
|
+
}>>;
|
|
201
|
+
}>;
|
|
202
|
+
}>;
|
|
203
|
+
export type LockProgress = ValueTypeOf<typeof LockProgressType>;
|
|
204
|
+
/**
|
|
205
|
+
* A resource's exclusive lock as another process reads it while it is held:
|
|
206
|
+
* what holds it, and how far that operation says it has got.
|
|
207
|
+
*/
|
|
208
|
+
export declare const LockStatusType: StructType<{
|
|
209
|
+
/** The lock's state: the operation, its holder, and when it was acquired */
|
|
210
|
+
readonly state: StructType<{
|
|
211
|
+
/** What operation acquired the lock */
|
|
212
|
+
readonly operation: VariantType<{
|
|
213
|
+
/** Running a dataflow */
|
|
214
|
+
readonly dataflow: NullType;
|
|
215
|
+
/** Deploying a package to the workspace */
|
|
216
|
+
readonly deployment: NullType;
|
|
217
|
+
/** Removing the workspace */
|
|
218
|
+
readonly removal: NullType;
|
|
219
|
+
/** Writing to a dataset */
|
|
220
|
+
readonly dataset_write: NullType;
|
|
221
|
+
/** Exporting a workspace */
|
|
222
|
+
readonly export: NullType;
|
|
223
|
+
}>;
|
|
224
|
+
/** Who holds the lock */
|
|
225
|
+
readonly holder: VariantType<{
|
|
226
|
+
/** A local process */
|
|
227
|
+
readonly process: StructType<{
|
|
228
|
+
/** Process ID */
|
|
229
|
+
readonly pid: IntegerType;
|
|
230
|
+
/** System boot ID (from /proc/sys/kernel/random/boot_id) */
|
|
231
|
+
readonly bootId: StringType;
|
|
232
|
+
/** Process start time in jiffies since boot */
|
|
233
|
+
readonly startTime: IntegerType;
|
|
234
|
+
/** Command that acquired the lock (for debugging) */
|
|
235
|
+
readonly command: StringType;
|
|
236
|
+
}>;
|
|
237
|
+
/** A cloud function */
|
|
238
|
+
readonly lambda: StructType<{
|
|
239
|
+
/** The invocation's request ID */
|
|
240
|
+
readonly requestId: StringType;
|
|
241
|
+
/** The function's name */
|
|
242
|
+
readonly functionName: StringType;
|
|
243
|
+
}>;
|
|
244
|
+
}>;
|
|
245
|
+
/** When the lock was acquired */
|
|
246
|
+
readonly acquiredAt: DateTimeType;
|
|
247
|
+
/** When the lock expires (for cloud TTL-based locks) */
|
|
248
|
+
readonly expiresAt: OptionType<DateTimeType>;
|
|
249
|
+
}>;
|
|
250
|
+
/** What the holder last reported of its progress; `none` until it reports */
|
|
251
|
+
readonly progress: OptionType<VariantType<{
|
|
252
|
+
/** A deploy: its file sources and its records */
|
|
253
|
+
readonly deployment: StructType<{
|
|
254
|
+
readonly package: StructType<{
|
|
255
|
+
readonly name: StringType;
|
|
256
|
+
readonly version: StringType;
|
|
257
|
+
}>;
|
|
258
|
+
readonly startedAt: DateTimeType;
|
|
259
|
+
readonly files: import("@elaraai/east").ArrayType<StructType<{
|
|
260
|
+
readonly path: StringType;
|
|
261
|
+
readonly step: VariantType<{
|
|
262
|
+
readonly waiting: NullType;
|
|
263
|
+
readonly hashing: NullType;
|
|
264
|
+
readonly taking_in: StructType<{
|
|
265
|
+
readonly pieces: IntegerType;
|
|
266
|
+
readonly done: IntegerType;
|
|
267
|
+
}>;
|
|
268
|
+
readonly done: VariantType<{
|
|
269
|
+
readonly known: NullType;
|
|
270
|
+
readonly carried: NullType;
|
|
271
|
+
readonly taken: import("@elaraai/east").ArrayType<StringType>;
|
|
272
|
+
}>;
|
|
273
|
+
}>;
|
|
274
|
+
readonly bytes: IntegerType;
|
|
275
|
+
readonly total: IntegerType;
|
|
276
|
+
}>>;
|
|
277
|
+
readonly records: import("@elaraai/east").ArrayType<StructType<{
|
|
278
|
+
readonly plan: StructType<{
|
|
279
|
+
readonly record: StringType;
|
|
280
|
+
readonly action: VariantType<{
|
|
281
|
+
readonly mint: NullType;
|
|
282
|
+
readonly keep: StructType<{
|
|
283
|
+
readonly deploy: import("@elaraai/east").BooleanType;
|
|
284
|
+
}>;
|
|
285
|
+
readonly migrate: StructType<{
|
|
286
|
+
readonly steps: import("@elaraai/east").ArrayType<StringType>;
|
|
287
|
+
}>;
|
|
288
|
+
readonly reset: StructType<{
|
|
289
|
+
readonly reason: StringType;
|
|
290
|
+
}>;
|
|
291
|
+
readonly drop: NullType;
|
|
292
|
+
readonly refused: StructType<{
|
|
293
|
+
readonly reason: StringType;
|
|
294
|
+
}>;
|
|
295
|
+
}>;
|
|
296
|
+
}>;
|
|
297
|
+
readonly indexes: import("@elaraai/east").ArrayType<StringType>;
|
|
298
|
+
readonly step: VariantType<{
|
|
299
|
+
readonly waiting: NullType;
|
|
300
|
+
readonly migrating: StructType<{
|
|
301
|
+
readonly name: StringType;
|
|
302
|
+
readonly step: IntegerType;
|
|
303
|
+
readonly steps: IntegerType;
|
|
304
|
+
}>;
|
|
305
|
+
readonly indexing: StructType<{
|
|
306
|
+
readonly index: StringType;
|
|
307
|
+
readonly build: IntegerType;
|
|
308
|
+
readonly builds: IntegerType;
|
|
309
|
+
}>;
|
|
310
|
+
readonly done: NullType;
|
|
311
|
+
}>;
|
|
312
|
+
}>>;
|
|
313
|
+
}>;
|
|
314
|
+
}>>;
|
|
315
|
+
}>;
|
|
316
|
+
export type LockStatus = ValueTypeOf<typeof LockStatusType>;
|
|
131
317
|
//# sourceMappingURL=lock.d.ts.map
|
package/dist/src/lock.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lock.d.ts","sourceRoot":"","sources":["../../src/lock.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH
|
|
1
|
+
{"version":3,"file":"lock.d.ts","sourceRoot":"","sources":["../../src/lock.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EACL,WAAW,EACX,UAAU,EACV,UAAU,EACV,WAAW,EACX,YAAY,EACZ,UAAU,EACV,QAAQ,EACR,WAAW,EACZ,MAAM,eAAe,CAAC;AAGvB;;GAEG;AACH,eAAO,MAAM,iBAAiB;IAC5B,yBAAyB;;IAEzB,2CAA2C;;IAE3C,6BAA6B;;IAE7B,2BAA2B;;IAE3B,4BAA4B;;EAE5B,CAAC;AAEH,MAAM,MAAM,aAAa,GAAG,WAAW,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAElE;;;GAGG;AACH,eAAO,MAAM,iBAAiB;IAC5B,iBAAiB;;IAEjB,4DAA4D;;IAE5D,+CAA+C;;IAE/C,qDAAqD;;EAErD,CAAC;AAEH,MAAM,MAAM,aAAa,GAAG,WAAW,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAElE;;GAEG;AACH,eAAO,MAAM,gBAAgB;IAC3B,kCAAkC;;IAElC,0BAA0B;;EAE1B,CAAC;AAEH,MAAM,MAAM,YAAY,GAAG,WAAW,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAEhE;;GAEG;AACH,eAAO,MAAM,qBAAqB;IAChC,sBAAsB;;QA5BtB,iBAAiB;;QAEjB,4DAA4D;;QAE5D,+CAA+C;;QAE/C,qDAAqD;;;IAwBrD,uBAAuB;;QAdvB,kCAAkC;;QAElC,0BAA0B;;;EAc1B,CAAC;AAEH,MAAM,MAAM,iBAAiB,GAAG,WAAW,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAE1E;;;;;GAKG;AACH,eAAO,MAAM,aAAa;IACxB,uCAAuC;;QA9DvC,yBAAyB;;QAEzB,2CAA2C;;QAE3C,6BAA6B;;QAE7B,2BAA2B;;QAE3B,4BAA4B;;;IAwD5B,yBAAyB;;QAjBzB,sBAAsB;;YA5BtB,iBAAiB;;YAEjB,4DAA4D;;YAE5D,+CAA+C;;YAE/C,qDAAqD;;;QAwBrD,uBAAuB;;YAdvB,kCAAkC;;YAElC,0BAA0B;;;;IA6B1B,iCAAiC;;IAEjC,wDAAwD;;EAExD,CAAC;AAEH,MAAM,MAAM,SAAS,GAAG,WAAW,CAAC,OAAO,aAAa,CAAC,CAAC;AAE1D;;;GAGG;AACH,eAAO,MAAM,gBAAgB;IAC3B,iDAAiD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAEjD,CAAC;AAEH,MAAM,MAAM,YAAY,GAAG,WAAW,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAEhE;;;GAGG;AACH,eAAO,MAAM,cAAc;IACzB,4EAA4E;;QA5B5E,uCAAuC;;YA9DvC,yBAAyB;;YAEzB,2CAA2C;;YAE3C,6BAA6B;;YAE7B,2BAA2B;;YAE3B,4BAA4B;;;QAwD5B,yBAAyB;;YAjBzB,sBAAsB;;gBA5BtB,iBAAiB;;gBAEjB,4DAA4D;;gBAE5D,+CAA+C;;gBAE/C,qDAAqD;;;YAwBrD,uBAAuB;;gBAdvB,kCAAkC;;gBAElC,0BAA0B;;;;QA6B1B,iCAAiC;;QAEjC,wDAAwD;;;IAwBxD,6EAA6E;;QAb7E,iDAAiD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAejD,CAAC;AAEH,MAAM,MAAM,UAAU,GAAG,WAAW,CAAC,OAAO,cAAc,CAAC,CAAC"}
|
package/dist/src/lock.js
CHANGED
|
@@ -13,9 +13,14 @@
|
|
|
13
13
|
* - when it was acquired;
|
|
14
14
|
* - when it expires, for a cloud backend's lease.
|
|
15
15
|
*
|
|
16
|
+
* An exclusive holder may also report how far its operation has got, for
|
|
17
|
+
* another process to read while it holds the lock: a deploy taking its file
|
|
18
|
+
* sources in and deploying its records.
|
|
19
|
+
*
|
|
16
20
|
* A local repository keeps each resource's locks in `locks/<resource>/`.
|
|
17
21
|
*/
|
|
18
22
|
import { VariantType, StructType, StringType, IntegerType, DateTimeType, OptionType, NullType, } from '@elaraai/east';
|
|
23
|
+
import { DeployProgressType } from './api.js';
|
|
19
24
|
/**
|
|
20
25
|
* Lock operation - what acquired the lock.
|
|
21
26
|
*/
|
|
@@ -79,4 +84,22 @@ export const LockStateType = StructType({
|
|
|
79
84
|
/** When the lock expires (for cloud TTL-based locks) */
|
|
80
85
|
expiresAt: OptionType(DateTimeType),
|
|
81
86
|
});
|
|
87
|
+
/**
|
|
88
|
+
* How far the operation holding a lock exclusively has got, as its holder
|
|
89
|
+
* reports it for another process to read while it holds the lock.
|
|
90
|
+
*/
|
|
91
|
+
export const LockProgressType = VariantType({
|
|
92
|
+
/** A deploy: its file sources and its records */
|
|
93
|
+
deployment: DeployProgressType,
|
|
94
|
+
});
|
|
95
|
+
/**
|
|
96
|
+
* A resource's exclusive lock as another process reads it while it is held:
|
|
97
|
+
* what holds it, and how far that operation says it has got.
|
|
98
|
+
*/
|
|
99
|
+
export const LockStatusType = StructType({
|
|
100
|
+
/** The lock's state: the operation, its holder, and when it was acquired */
|
|
101
|
+
state: LockStateType,
|
|
102
|
+
/** What the holder last reported of its progress; `none` until it reports */
|
|
103
|
+
progress: OptionType(LockProgressType),
|
|
104
|
+
});
|
|
82
105
|
//# sourceMappingURL=lock.js.map
|
package/dist/src/lock.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lock.js","sourceRoot":"","sources":["../../src/lock.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH
|
|
1
|
+
{"version":3,"file":"lock.js","sourceRoot":"","sources":["../../src/lock.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EACL,WAAW,EACX,UAAU,EACV,UAAU,EACV,WAAW,EACX,YAAY,EACZ,UAAU,EACV,QAAQ,GAET,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAE9C;;GAEG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,WAAW,CAAC;IAC3C,yBAAyB;IACzB,QAAQ,EAAE,QAAQ;IAClB,2CAA2C;IAC3C,UAAU,EAAE,QAAQ;IACpB,6BAA6B;IAC7B,OAAO,EAAE,QAAQ;IACjB,2BAA2B;IAC3B,aAAa,EAAE,QAAQ;IACvB,4BAA4B;IAC5B,MAAM,EAAE,QAAQ;CACjB,CAAC,CAAC;AAIH;;;GAGG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,UAAU,CAAC;IAC1C,iBAAiB;IACjB,GAAG,EAAE,WAAW;IAChB,4DAA4D;IAC5D,MAAM,EAAE,UAAU;IAClB,+CAA+C;IAC/C,SAAS,EAAE,WAAW;IACtB,qDAAqD;IACrD,OAAO,EAAE,UAAU;CACpB,CAAC,CAAC;AAIH;;GAEG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,UAAU,CAAC;IACzC,kCAAkC;IAClC,SAAS,EAAE,UAAU;IACrB,0BAA0B;IAC1B,YAAY,EAAE,UAAU;CACzB,CAAC,CAAC;AAIH;;GAEG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG,WAAW,CAAC;IAC/C,sBAAsB;IACtB,OAAO,EAAE,iBAAiB;IAC1B,uBAAuB;IACvB,MAAM,EAAE,gBAAgB;CACzB,CAAC,CAAC;AAIH;;;;;GAKG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,UAAU,CAAC;IACtC,uCAAuC;IACvC,SAAS,EAAE,iBAAiB;IAC5B,yBAAyB;IACzB,MAAM,EAAE,qBAAqB;IAC7B,iCAAiC;IACjC,UAAU,EAAE,YAAY;IACxB,wDAAwD;IACxD,SAAS,EAAE,UAAU,CAAC,YAAY,CAAC;CACpC,CAAC,CAAC;AAIH;;;GAGG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,WAAW,CAAC;IAC1C,iDAAiD;IACjD,UAAU,EAAE,kBAAkB;CAC/B,CAAC,CAAC;AAIH;;;GAGG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,UAAU,CAAC;IACvC,4EAA4E;IAC5E,KAAK,EAAE,aAAa;IACpB,6EAA6E;IAC7E,QAAQ,EAAE,UAAU,CAAC,gBAAgB,CAAC;CACvC,CAAC,CAAC"}
|
package/dist/src/release.d.ts
CHANGED
package/dist/src/release.js
CHANGED
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
* release beside this one.
|
|
16
16
|
*/
|
|
17
17
|
/** The release of e3 this build is. */
|
|
18
|
-
export const E3_RELEASE = '1.0.
|
|
18
|
+
export const E3_RELEASE = '1.0.82';
|
|
19
19
|
/** A semantic version: its core, a pre-release, and build metadata. */
|
|
20
20
|
const RELEASE = /^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-([0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*))?(?:\+[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?$/;
|
|
21
21
|
/**
|
package/dist/src/transfer.d.ts
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
* releases and the fix. The release decides nothing, so an older client and a
|
|
15
15
|
* newer server that speak one version work together.
|
|
16
16
|
*/
|
|
17
|
-
import { VariantType, StructType, StringType, IntegerType, NullType, DictType, type ValueTypeOf } from '@elaraai/east';
|
|
17
|
+
import { VariantType, StructType, StringType, IntegerType, NullType, DictType, OptionType, type ValueTypeOf } from '@elaraai/east';
|
|
18
18
|
/**
|
|
19
19
|
* The dataset transfer protocol version this build speaks, and the only one.
|
|
20
20
|
*
|
|
@@ -22,10 +22,10 @@ import { VariantType, StructType, StringType, IntegerType, NullType, DictType, t
|
|
|
22
22
|
* The server plans an upload as parts — each sent to its own URL with the
|
|
23
23
|
* request headers the server names, so an object store can bind a checksum to
|
|
24
24
|
* a single PUT or take a multipart upload larger than one PUT allows — and a
|
|
25
|
-
* commit may answer `processing` while the server verifies the bytes
|
|
26
|
-
* client to poll.
|
|
25
|
+
* commit may answer `processing` while the server verifies the bytes and takes
|
|
26
|
+
* them in, with how far it has got, for the client to poll.
|
|
27
27
|
*/
|
|
28
|
-
export declare const TRANSFER_PROTOCOL_VERSION =
|
|
28
|
+
export declare const TRANSFER_PROTOCOL_VERSION = 3;
|
|
29
29
|
/**
|
|
30
30
|
* How many parts an upload of `size` bytes has when planned with `partBytes`.
|
|
31
31
|
*
|
|
@@ -99,15 +99,33 @@ export type TransferPartResponse = ValueTypeOf<typeof TransferPartResponseType>;
|
|
|
99
99
|
*
|
|
100
100
|
* - `completed`: Hash verified, object stored, dataset ref updated
|
|
101
101
|
* - `error`: Hash mismatch or other failure
|
|
102
|
-
* - `processing`: the server is still verifying the bytes
|
|
103
|
-
* `GET …/upload/<id>` until
|
|
102
|
+
* - `processing`: the server is still verifying the bytes or taking them in,
|
|
103
|
+
* with how far it has got once it has said; poll `GET …/upload/<id>` until
|
|
104
|
+
* it answers `completed` or `error`
|
|
104
105
|
*/
|
|
105
106
|
export declare const TransferDoneResponseType: VariantType<{
|
|
106
107
|
readonly completed: NullType;
|
|
107
108
|
readonly error: StructType<{
|
|
108
109
|
readonly message: StringType;
|
|
109
110
|
}>;
|
|
110
|
-
readonly processing:
|
|
111
|
+
readonly processing: OptionType<StructType<{
|
|
112
|
+
readonly path: StringType;
|
|
113
|
+
readonly step: VariantType<{
|
|
114
|
+
readonly waiting: NullType;
|
|
115
|
+
readonly hashing: NullType;
|
|
116
|
+
readonly taking_in: StructType<{
|
|
117
|
+
readonly pieces: IntegerType;
|
|
118
|
+
readonly done: IntegerType;
|
|
119
|
+
}>;
|
|
120
|
+
readonly done: VariantType<{
|
|
121
|
+
readonly known: NullType;
|
|
122
|
+
readonly carried: NullType;
|
|
123
|
+
readonly taken: import("@elaraai/east").ArrayType<StringType>;
|
|
124
|
+
}>;
|
|
125
|
+
}>;
|
|
126
|
+
readonly bytes: IntegerType;
|
|
127
|
+
readonly total: IntegerType;
|
|
128
|
+
}>>;
|
|
111
129
|
}>;
|
|
112
130
|
export type TransferDoneResponse = ValueTypeOf<typeof TransferDoneResponseType>;
|
|
113
131
|
//# sourceMappingURL=transfer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transfer.d.ts","sourceRoot":"","sources":["../../src/transfer.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;;;;;GAWG;AAEH,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,UAAU,EAAE,WAAW,EAAE,QAAQ,EAAE,QAAQ,EAAE,KAAK,WAAW,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"transfer.d.ts","sourceRoot":"","sources":["../../src/transfer.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;;;;;GAWG;AAEH,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,UAAU,EAAE,WAAW,EAAE,QAAQ,EAAE,QAAQ,EAAE,UAAU,EAAE,KAAK,WAAW,EAAE,MAAM,eAAe,CAAC;AAGnI;;;;;;;;;GASG;AACH,eAAO,MAAM,yBAAyB,IAAI,CAAC;AAE3C;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,CAI3F;AAED;;;;;;;;GAQG;AACH,wBAAgB,iBAAiB,CAC/B,IAAI,EAAE,MAAM,GAAG,MAAM,EACrB,SAAS,EAAE,MAAM,GAAG,MAAM,EAC1B,IAAI,EAAE,MAAM,GACX;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,CAKvC;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,yBAAyB;;;EAGpC,CAAC;AACH,MAAM,MAAM,qBAAqB,GAAG,WAAW,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAElF;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,0BAA0B;;;;;;EAMrC,CAAC;AACH,MAAM,MAAM,sBAAsB,GAAG,WAAW,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAEpF;;;;;;;;GAQG;AACH,eAAO,MAAM,wBAAwB;;;EAGnC,CAAC;AACH,MAAM,MAAM,oBAAoB,GAAG,WAAW,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAEhF;;;;;;;;GAQG;AACH,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;EAMnC,CAAC;AACH,MAAM,MAAM,oBAAoB,GAAG,WAAW,CAAC,OAAO,wBAAwB,CAAC,CAAC"}
|
package/dist/src/transfer.js
CHANGED
|
@@ -14,7 +14,8 @@
|
|
|
14
14
|
* releases and the fix. The release decides nothing, so an older client and a
|
|
15
15
|
* newer server that speak one version work together.
|
|
16
16
|
*/
|
|
17
|
-
import { VariantType, StructType, StringType, IntegerType, NullType, DictType } from '@elaraai/east';
|
|
17
|
+
import { VariantType, StructType, StringType, IntegerType, NullType, DictType, OptionType } from '@elaraai/east';
|
|
18
|
+
import { IntakeFileType } from './intake.js';
|
|
18
19
|
/**
|
|
19
20
|
* The dataset transfer protocol version this build speaks, and the only one.
|
|
20
21
|
*
|
|
@@ -22,10 +23,10 @@ import { VariantType, StructType, StringType, IntegerType, NullType, DictType }
|
|
|
22
23
|
* The server plans an upload as parts — each sent to its own URL with the
|
|
23
24
|
* request headers the server names, so an object store can bind a checksum to
|
|
24
25
|
* a single PUT or take a multipart upload larger than one PUT allows — and a
|
|
25
|
-
* commit may answer `processing` while the server verifies the bytes
|
|
26
|
-
* client to poll.
|
|
26
|
+
* commit may answer `processing` while the server verifies the bytes and takes
|
|
27
|
+
* them in, with how far it has got, for the client to poll.
|
|
27
28
|
*/
|
|
28
|
-
export const TRANSFER_PROTOCOL_VERSION =
|
|
29
|
+
export const TRANSFER_PROTOCOL_VERSION = 3;
|
|
29
30
|
/**
|
|
30
31
|
* How many parts an upload of `size` bytes has when planned with `partBytes`.
|
|
31
32
|
*
|
|
@@ -103,14 +104,15 @@ export const TransferPartResponseType = StructType({
|
|
|
103
104
|
*
|
|
104
105
|
* - `completed`: Hash verified, object stored, dataset ref updated
|
|
105
106
|
* - `error`: Hash mismatch or other failure
|
|
106
|
-
* - `processing`: the server is still verifying the bytes
|
|
107
|
-
* `GET …/upload/<id>` until
|
|
107
|
+
* - `processing`: the server is still verifying the bytes or taking them in,
|
|
108
|
+
* with how far it has got once it has said; poll `GET …/upload/<id>` until
|
|
109
|
+
* it answers `completed` or `error`
|
|
108
110
|
*/
|
|
109
111
|
export const TransferDoneResponseType = VariantType({
|
|
110
112
|
completed: NullType,
|
|
111
113
|
error: StructType({
|
|
112
114
|
message: StringType,
|
|
113
115
|
}),
|
|
114
|
-
processing:
|
|
116
|
+
processing: OptionType(IntakeFileType),
|
|
115
117
|
});
|
|
116
118
|
//# sourceMappingURL=transfer.js.map
|
package/dist/src/transfer.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transfer.js","sourceRoot":"","sources":["../../src/transfer.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;;;;;GAWG;AAEH,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,UAAU,EAAE,WAAW,EAAE,QAAQ,EAAE,QAAQ,EAAoB,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"transfer.js","sourceRoot":"","sources":["../../src/transfer.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;;;;;GAWG;AAEH,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,UAAU,EAAE,WAAW,EAAE,QAAQ,EAAE,QAAQ,EAAE,UAAU,EAAoB,MAAM,eAAe,CAAC;AACnI,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAE7C;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG,CAAC,CAAC;AAE3C;;;;;;GAMG;AACH,MAAM,UAAU,iBAAiB,CAAC,IAAqB,EAAE,SAA0B;IACjF,MAAM,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC;IAC3B,MAAM,IAAI,GAAG,MAAM,CAAC,SAAS,CAAC,CAAC;IAC/B,OAAO,KAAK,IAAI,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,KAAK,GAAG,IAAI,GAAG,EAAE,CAAC,GAAG,IAAI,CAAC,CAAC;AAChE,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,UAAU,iBAAiB,CAC/B,IAAqB,EACrB,SAA0B,EAC1B,IAAY;IAEZ,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,IAAI,GAAG,CAAC,IAAI,IAAI,GAAG,iBAAiB,CAAC,IAAI,EAAE,SAAS,CAAC;QAAE,OAAO,IAAI,CAAC;IAClG,MAAM,KAAK,GAAG,MAAM,CAAC,IAAI,GAAG,CAAC,CAAC,GAAG,MAAM,CAAC,SAAS,CAAC,CAAC;IACnD,MAAM,GAAG,GAAG,KAAK,GAAG,MAAM,CAAC,SAAS,CAAC,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,KAAK,GAAG,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IAChG,OAAO,EAAE,KAAK,EAAE,MAAM,CAAC,KAAK,CAAC,EAAE,GAAG,EAAE,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC;AACpD,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG,UAAU,CAAC;IAClD,IAAI,EAAE,UAAU;IAChB,IAAI,EAAE,WAAW;CAClB,CAAC,CAAC;AAGH;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,MAAM,0BAA0B,GAAG,WAAW,CAAC;IACpD,SAAS,EAAE,QAAQ;IACnB,YAAY,EAAE,UAAU,CAAC;QACvB,EAAE,EAAE,UAAU;QACd,SAAS,EAAE,WAAW;KACvB,CAAC;CACH,CAAC,CAAC;AAGH;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG,UAAU,CAAC;IACjD,GAAG,EAAE,UAAU;IACf,OAAO,EAAE,QAAQ,CAAC,UAAU,EAAE,UAAU,CAAC;CAC1C,CAAC,CAAC;AAGH;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG,WAAW,CAAC;IAClD,SAAS,EAAE,QAAQ;IACnB,KAAK,EAAE,UAAU,CAAC;QAChB,OAAO,EAAE,UAAU;KACpB,CAAC;IACF,UAAU,EAAE,UAAU,CAAC,cAAc,CAAC;CACvC,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elaraai/e3-types",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.82",
|
|
4
4
|
"description": "Shared type definitions for e3 (East Execution Engine)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/src/index.js",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"directory": "libs/e3/packages/e3-types"
|
|
19
19
|
},
|
|
20
20
|
"peerDependencies": {
|
|
21
|
-
"@elaraai/east": "1.0.
|
|
21
|
+
"@elaraai/east": "1.0.82"
|
|
22
22
|
},
|
|
23
23
|
"devDependencies": {
|
|
24
24
|
"@types/node": "^22.0.0",
|
package/src/api.ts
CHANGED
|
@@ -36,6 +36,7 @@ import {
|
|
|
36
36
|
} from '@elaraai/east';
|
|
37
37
|
|
|
38
38
|
import { StructureType, TreePathType } from './structure.js';
|
|
39
|
+
import { IntakeFileType } from './intake.js';
|
|
39
40
|
import { RunnerType } from './runner.js';
|
|
40
41
|
import { TaskBodyType, TaskInputType, TaskOutputType, TaskRoleType } from './task.js';
|
|
41
42
|
import { RequeueReasonType, StageUnitType } from './dataflow.js';
|
|
@@ -367,6 +368,51 @@ export const RecordIndexPlanType = StructType({
|
|
|
367
368
|
}),
|
|
368
369
|
});
|
|
369
370
|
|
|
371
|
+
/**
|
|
372
|
+
* The step a deploy is at with one record.
|
|
373
|
+
*
|
|
374
|
+
* - `waiting`: its turn has not come, or it needs nothing but the deploy's
|
|
375
|
+
* commit
|
|
376
|
+
* - `migrating`: running migration step `step` of the `steps` it owes, `name`
|
|
377
|
+
* - `indexing`: building `index`, the `build`th of the `builds` it owes
|
|
378
|
+
* - `done`: its migrations and index builds have run
|
|
379
|
+
*/
|
|
380
|
+
export const RecordDeployStepType = VariantType({
|
|
381
|
+
waiting: NullType,
|
|
382
|
+
migrating: StructType({ name: StringType, step: IntegerType, steps: IntegerType }),
|
|
383
|
+
indexing: StructType({ index: StringType, build: IntegerType, builds: IntegerType }),
|
|
384
|
+
done: NullType,
|
|
385
|
+
});
|
|
386
|
+
|
|
387
|
+
/**
|
|
388
|
+
* One record a deploy is deploying.
|
|
389
|
+
*
|
|
390
|
+
* @property plan - What the deploy decided for it
|
|
391
|
+
* @property indexes - The indexes the package declares for it
|
|
392
|
+
* @property step - How far the deploy has got with it
|
|
393
|
+
*/
|
|
394
|
+
export const RecordDeployStateType = StructType({
|
|
395
|
+
plan: RecordPlanType,
|
|
396
|
+
indexes: ArrayType(StringType),
|
|
397
|
+
step: RecordDeployStepType,
|
|
398
|
+
});
|
|
399
|
+
|
|
400
|
+
/**
|
|
401
|
+
* How far a deploy has got, for a client to show while it runs.
|
|
402
|
+
*
|
|
403
|
+
* @property package - The package it deploys
|
|
404
|
+
* @property startedAt - When it began taking its files in
|
|
405
|
+
* @property files - Each file source it takes in, in the package's order
|
|
406
|
+
* @property records - Each record it deploys, in the package's order, and
|
|
407
|
+
* each it drops
|
|
408
|
+
*/
|
|
409
|
+
export const DeployProgressType = StructType({
|
|
410
|
+
package: StructType({ name: StringType, version: StringType }),
|
|
411
|
+
startedAt: DateTimeType,
|
|
412
|
+
files: ArrayType(IntakeFileType),
|
|
413
|
+
records: ArrayType(RecordDeployStateType),
|
|
414
|
+
});
|
|
415
|
+
|
|
370
416
|
/**
|
|
371
417
|
* What a deploy did, or under `plan` would do.
|
|
372
418
|
*
|
|
@@ -382,11 +428,12 @@ export const WorkspaceDeployResultType = StructType({
|
|
|
382
428
|
});
|
|
383
429
|
|
|
384
430
|
/**
|
|
385
|
-
* A deploy job's progress: `pending` until it starts, then `deploying
|
|
431
|
+
* A deploy job's progress: `pending` until it starts, then `deploying`, with
|
|
432
|
+
* how far it has got once it has said.
|
|
386
433
|
*/
|
|
387
434
|
export const WorkspaceDeployProgressType = VariantType({
|
|
388
435
|
pending: NullType,
|
|
389
|
-
deploying:
|
|
436
|
+
deploying: OptionType(DeployProgressType),
|
|
390
437
|
});
|
|
391
438
|
|
|
392
439
|
/**
|
|
@@ -1145,6 +1192,9 @@ export type WorkspaceDeployRequest = ValueTypeOf<typeof WorkspaceDeployRequestTy
|
|
|
1145
1192
|
export type SchemaPolicy = ValueTypeOf<typeof SchemaPolicyType>['type'];
|
|
1146
1193
|
export type RecordPlan = ValueTypeOf<typeof RecordPlanType>;
|
|
1147
1194
|
export type RecordIndexPlan = ValueTypeOf<typeof RecordIndexPlanType>;
|
|
1195
|
+
export type RecordDeployStep = ValueTypeOf<typeof RecordDeployStepType>;
|
|
1196
|
+
export type RecordDeployState = ValueTypeOf<typeof RecordDeployStateType>;
|
|
1197
|
+
export type DeployProgress = ValueTypeOf<typeof DeployProgressType>;
|
|
1148
1198
|
export type WorkspaceDeployResult = ValueTypeOf<typeof WorkspaceDeployResultType>;
|
|
1149
1199
|
export type WorkspaceDeployProgress = ValueTypeOf<typeof WorkspaceDeployProgressType>;
|
|
1150
1200
|
export type WorkspaceDeployStatus = ValueTypeOf<typeof WorkspaceDeployStatusType>;
|