@elaraai/e3-types 1.0.79 → 1.0.81
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 +1 -1
- package/dist/src/api.d.ts +829 -36
- package/dist/src/api.d.ts.map +1 -1
- package/dist/src/api.js +301 -32
- package/dist/src/api.js.map +1 -1
- package/dist/src/collection-manifest.d.ts +37 -0
- package/dist/src/collection-manifest.d.ts.map +1 -0
- package/dist/src/collection-manifest.js +37 -0
- package/dist/src/collection-manifest.js.map +1 -0
- package/dist/src/dataflow.d.ts +264 -19
- package/dist/src/dataflow.d.ts.map +1 -1
- package/dist/src/dataflow.js +156 -15
- package/dist/src/dataflow.js.map +1 -1
- package/dist/src/dataflow.spec.js +184 -27
- package/dist/src/dataflow.spec.js.map +1 -1
- package/dist/src/dataset-blob.d.ts +75 -15
- package/dist/src/dataset-blob.d.ts.map +1 -1
- package/dist/src/dataset-blob.js +95 -28
- package/dist/src/dataset-blob.js.map +1 -1
- package/dist/src/dataset-blob.spec.d.ts +6 -0
- package/dist/src/dataset-blob.spec.d.ts.map +1 -0
- package/dist/src/dataset-blob.spec.js +92 -0
- package/dist/src/dataset-blob.spec.js.map +1 -0
- package/dist/src/dataset-ref.d.ts +5 -4
- package/dist/src/dataset-ref.d.ts.map +1 -1
- package/dist/src/dataset-ref.js +5 -4
- package/dist/src/dataset-ref.js.map +1 -1
- package/dist/src/environment.d.ts +3 -2
- package/dist/src/environment.d.ts.map +1 -1
- package/dist/src/environment.js +3 -2
- package/dist/src/environment.js.map +1 -1
- package/dist/src/execution.d.ts +112 -18
- package/dist/src/execution.d.ts.map +1 -1
- package/dist/src/execution.js +174 -45
- package/dist/src/execution.js.map +1 -1
- package/dist/src/execution.spec.d.ts +6 -0
- package/dist/src/execution.spec.d.ts.map +1 -0
- package/dist/src/execution.spec.js +108 -0
- package/dist/src/execution.spec.js.map +1 -0
- package/dist/src/function.d.ts +14 -12
- package/dist/src/function.d.ts.map +1 -1
- package/dist/src/function.js +17 -32
- package/dist/src/function.js.map +1 -1
- package/dist/src/index.d.ts +17 -12
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +28 -20
- 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 +253 -21
- package/dist/src/lock.d.ts.map +1 -1
- package/dist/src/lock.js +55 -21
- package/dist/src/lock.js.map +1 -1
- package/dist/src/names.d.ts +21 -0
- package/dist/src/names.d.ts.map +1 -0
- package/dist/src/names.js +31 -0
- package/dist/src/names.js.map +1 -0
- package/dist/src/package.d.ts +11 -78
- package/dist/src/package.d.ts.map +1 -1
- package/dist/src/package.js +13 -66
- package/dist/src/package.js.map +1 -1
- package/dist/src/record.d.ts +582 -18
- package/dist/src/record.d.ts.map +1 -1
- package/dist/src/record.js +405 -7
- package/dist/src/record.js.map +1 -1
- package/dist/src/{stream.spec.d.ts → record.spec.d.ts} +1 -1
- package/dist/src/record.spec.d.ts.map +1 -0
- package/dist/src/record.spec.js +143 -0
- package/dist/src/record.spec.js.map +1 -0
- package/dist/src/release.d.ts +36 -0
- package/dist/src/release.d.ts.map +1 -0
- package/dist/src/release.js +71 -0
- package/dist/src/release.js.map +1 -0
- package/dist/src/release.spec.d.ts +6 -0
- package/dist/src/release.spec.d.ts.map +1 -0
- package/dist/src/release.spec.js +42 -0
- package/dist/src/release.spec.js.map +1 -0
- package/dist/src/repository.d.ts +64 -0
- package/dist/src/repository.d.ts.map +1 -0
- package/dist/src/repository.js +49 -0
- package/dist/src/repository.js.map +1 -0
- package/dist/src/runner.d.ts +16 -62
- package/dist/src/runner.d.ts.map +1 -1
- package/dist/src/runner.js +16 -79
- package/dist/src/runner.js.map +1 -1
- package/dist/src/runner.spec.js +11 -85
- package/dist/src/runner.spec.js.map +1 -1
- package/dist/src/structure.d.ts +0 -57
- package/dist/src/structure.d.ts.map +1 -1
- package/dist/src/structure.js +0 -3
- package/dist/src/structure.js.map +1 -1
- package/dist/src/task.d.ts +210 -318
- package/dist/src/task.d.ts.map +1 -1
- package/dist/src/task.js +117 -472
- package/dist/src/task.js.map +1 -1
- package/dist/src/task.spec.js +62 -154
- package/dist/src/task.spec.js.map +1 -1
- package/dist/src/transfer.d.ts +38 -26
- package/dist/src/transfer.d.ts.map +1 -1
- package/dist/src/transfer.js +22 -26
- package/dist/src/transfer.js.map +1 -1
- package/dist/src/transfer.spec.js +4 -34
- package/dist/src/transfer.spec.js.map +1 -1
- package/dist/src/unit-plan.d.ts +130 -0
- package/dist/src/unit-plan.d.ts.map +1 -0
- package/dist/src/unit-plan.js +107 -0
- package/dist/src/unit-plan.js.map +1 -0
- package/dist/src/unit-plan.spec.d.ts +6 -0
- package/dist/src/unit-plan.spec.d.ts.map +1 -0
- package/dist/src/unit-plan.spec.js +29 -0
- package/dist/src/unit-plan.spec.js.map +1 -0
- package/dist/src/workspace.d.ts +22 -11
- package/dist/src/workspace.d.ts.map +1 -1
- package/dist/src/workspace.js +10 -11
- package/dist/src/workspace.js.map +1 -1
- package/package.json +3 -3
- package/src/api.ts +326 -32
- package/src/collection-manifest.ts +53 -0
- package/src/dataflow.spec.ts +223 -31
- package/src/dataflow.ts +183 -26
- package/src/dataset-blob.spec.ts +117 -0
- package/src/dataset-blob.ts +157 -21
- package/src/dataset-ref.ts +5 -4
- package/src/environment.ts +3 -2
- package/src/execution.spec.ts +114 -0
- package/src/execution.ts +175 -51
- package/src/function.ts +19 -32
- package/src/index.ts +141 -39
- package/src/intake.ts +53 -0
- package/src/lock.ts +67 -21
- package/src/names.ts +39 -0
- package/src/package.ts +15 -71
- package/src/record.spec.ts +195 -0
- package/src/record.ts +489 -7
- package/src/release.spec.ts +47 -0
- package/src/release.ts +69 -0
- package/src/repository.ts +67 -0
- package/src/runner.spec.ts +11 -94
- package/src/runner.ts +16 -80
- package/src/structure.ts +0 -8
- package/src/task.spec.ts +67 -188
- package/src/task.ts +140 -522
- package/src/transfer.spec.ts +4 -51
- package/src/transfer.ts +22 -26
- package/src/unit-plan.spec.ts +31 -0
- package/src/unit-plan.ts +121 -0
- package/src/workspace.ts +13 -11
- package/dist/src/stream.d.ts +0 -97
- package/dist/src/stream.d.ts.map +0 -1
- package/dist/src/stream.js +0 -134
- package/dist/src/stream.js.map +0 -1
- package/dist/src/stream.spec.d.ts.map +0 -1
- package/dist/src/stream.spec.js +0 -60
- package/dist/src/stream.spec.js.map +0 -1
- package/src/stream.spec.ts +0 -88
- package/src/stream.ts +0 -170
package/dist/src/lock.d.ts
CHANGED
|
@@ -5,18 +5,19 @@
|
|
|
5
5
|
/**
|
|
6
6
|
* Lock state type definitions.
|
|
7
7
|
*
|
|
8
|
-
* A lock
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
* -
|
|
12
|
-
* -
|
|
8
|
+
* A lock gives exclusive or shared access to a resource: a workspace, a
|
|
9
|
+
* workspace's dataflow, the repository's tasks, or one dataset's ref. The state
|
|
10
|
+
* records:
|
|
11
|
+
* - what operation acquired the lock (dataflow, deployment, etc.);
|
|
12
|
+
* - who holds it: a local process, or a cloud function;
|
|
13
|
+
* - when it was acquired;
|
|
14
|
+
* - when it expires, for a cloud backend's lease.
|
|
13
15
|
*
|
|
14
|
-
*
|
|
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.
|
|
15
19
|
*
|
|
16
|
-
*
|
|
17
|
-
* to encode their own holder identification. Common patterns:
|
|
18
|
-
* - Local: `.process (pid=1234, bootId="abc-123", startTime=98765, command="e3 start")`
|
|
19
|
-
* - Cloud: `.lambda (requestId="req-123", functionName="e3-api")`
|
|
20
|
+
* A local repository keeps each resource's locks in `locks/<resource>/`.
|
|
20
21
|
*/
|
|
21
22
|
import { VariantType, StructType, StringType, IntegerType, DateTimeType, OptionType, NullType, ValueTypeOf } from '@elaraai/east';
|
|
22
23
|
/**
|
|
@@ -36,8 +37,8 @@ export declare const LockOperationType: VariantType<{
|
|
|
36
37
|
}>;
|
|
37
38
|
export type LockOperation = ValueTypeOf<typeof LockOperationType>;
|
|
38
39
|
/**
|
|
39
|
-
*
|
|
40
|
-
*
|
|
40
|
+
* A local process holding a lock: alive while a process of this pid and start
|
|
41
|
+
* time runs under this boot.
|
|
41
42
|
*/
|
|
42
43
|
export declare const ProcessHolderType: StructType<{
|
|
43
44
|
/** Process ID */
|
|
@@ -51,14 +52,44 @@ export declare const ProcessHolderType: StructType<{
|
|
|
51
52
|
}>;
|
|
52
53
|
export type ProcessHolder = ValueTypeOf<typeof ProcessHolderType>;
|
|
53
54
|
/**
|
|
54
|
-
*
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
55
|
+
* A cloud function holding a lock, which the lock's lease bounds.
|
|
56
|
+
*/
|
|
57
|
+
export declare const LambdaHolderType: StructType<{
|
|
58
|
+
/** The invocation's request ID */
|
|
59
|
+
readonly requestId: StringType;
|
|
60
|
+
/** The function's name */
|
|
61
|
+
readonly functionName: StringType;
|
|
62
|
+
}>;
|
|
63
|
+
export type LambdaHolder = ValueTypeOf<typeof LambdaHolderType>;
|
|
64
|
+
/**
|
|
65
|
+
* Who holds a lock.
|
|
66
|
+
*/
|
|
67
|
+
export declare const LockHolderVariantType: VariantType<{
|
|
68
|
+
/** A local process */
|
|
69
|
+
readonly process: StructType<{
|
|
70
|
+
/** Process ID */
|
|
71
|
+
readonly pid: IntegerType;
|
|
72
|
+
/** System boot ID (from /proc/sys/kernel/random/boot_id) */
|
|
73
|
+
readonly bootId: StringType;
|
|
74
|
+
/** Process start time in jiffies since boot */
|
|
75
|
+
readonly startTime: IntegerType;
|
|
76
|
+
/** Command that acquired the lock (for debugging) */
|
|
77
|
+
readonly command: StringType;
|
|
78
|
+
}>;
|
|
79
|
+
/** A cloud function */
|
|
80
|
+
readonly lambda: StructType<{
|
|
81
|
+
/** The invocation's request ID */
|
|
82
|
+
readonly requestId: StringType;
|
|
83
|
+
/** The function's name */
|
|
84
|
+
readonly functionName: StringType;
|
|
85
|
+
}>;
|
|
86
|
+
}>;
|
|
87
|
+
export type LockHolderVariant = ValueTypeOf<typeof LockHolderVariantType>;
|
|
88
|
+
/**
|
|
89
|
+
* The state of a held lock.
|
|
59
90
|
*
|
|
60
|
-
* The
|
|
61
|
-
*
|
|
91
|
+
* The locking itself is the backend's — an atomically created file locally, a
|
|
92
|
+
* conditional write in the cloud — and every backend records this state.
|
|
62
93
|
*/
|
|
63
94
|
export declare const LockStateType: StructType<{
|
|
64
95
|
/** What operation acquired the lock */
|
|
@@ -74,12 +105,213 @@ export declare const LockStateType: StructType<{
|
|
|
74
105
|
/** Exporting a workspace */
|
|
75
106
|
readonly export: NullType;
|
|
76
107
|
}>;
|
|
77
|
-
/** Who holds the lock
|
|
78
|
-
readonly holder:
|
|
108
|
+
/** Who holds the lock */
|
|
109
|
+
readonly holder: VariantType<{
|
|
110
|
+
/** A local process */
|
|
111
|
+
readonly process: StructType<{
|
|
112
|
+
/** Process ID */
|
|
113
|
+
readonly pid: IntegerType;
|
|
114
|
+
/** System boot ID (from /proc/sys/kernel/random/boot_id) */
|
|
115
|
+
readonly bootId: StringType;
|
|
116
|
+
/** Process start time in jiffies since boot */
|
|
117
|
+
readonly startTime: IntegerType;
|
|
118
|
+
/** Command that acquired the lock (for debugging) */
|
|
119
|
+
readonly command: StringType;
|
|
120
|
+
}>;
|
|
121
|
+
/** A cloud function */
|
|
122
|
+
readonly lambda: StructType<{
|
|
123
|
+
/** The invocation's request ID */
|
|
124
|
+
readonly requestId: StringType;
|
|
125
|
+
/** The function's name */
|
|
126
|
+
readonly functionName: StringType;
|
|
127
|
+
}>;
|
|
128
|
+
}>;
|
|
79
129
|
/** When the lock was acquired */
|
|
80
130
|
readonly acquiredAt: DateTimeType;
|
|
81
131
|
/** When the lock expires (for cloud TTL-based locks) */
|
|
82
132
|
readonly expiresAt: OptionType<DateTimeType>;
|
|
83
133
|
}>;
|
|
84
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>;
|
|
85
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
|
@@ -5,20 +5,22 @@
|
|
|
5
5
|
/**
|
|
6
6
|
* Lock state type definitions.
|
|
7
7
|
*
|
|
8
|
-
* A lock
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
* -
|
|
12
|
-
* -
|
|
8
|
+
* A lock gives exclusive or shared access to a resource: a workspace, a
|
|
9
|
+
* workspace's dataflow, the repository's tasks, or one dataset's ref. The state
|
|
10
|
+
* records:
|
|
11
|
+
* - what operation acquired the lock (dataflow, deployment, etc.);
|
|
12
|
+
* - who holds it: a local process, or a cloud function;
|
|
13
|
+
* - when it was acquired;
|
|
14
|
+
* - when it expires, for a cloud backend's lease.
|
|
13
15
|
*
|
|
14
|
-
*
|
|
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.
|
|
15
19
|
*
|
|
16
|
-
*
|
|
17
|
-
* to encode their own holder identification. Common patterns:
|
|
18
|
-
* - Local: `.process (pid=1234, bootId="abc-123", startTime=98765, command="e3 start")`
|
|
19
|
-
* - Cloud: `.lambda (requestId="req-123", functionName="e3-api")`
|
|
20
|
+
* A local repository keeps each resource's locks in `locks/<resource>/`.
|
|
20
21
|
*/
|
|
21
22
|
import { VariantType, StructType, StringType, IntegerType, DateTimeType, OptionType, NullType, } from '@elaraai/east';
|
|
23
|
+
import { DeployProgressType } from './api.js';
|
|
22
24
|
/**
|
|
23
25
|
* Lock operation - what acquired the lock.
|
|
24
26
|
*/
|
|
@@ -35,8 +37,8 @@ export const LockOperationType = VariantType({
|
|
|
35
37
|
export: NullType,
|
|
36
38
|
});
|
|
37
39
|
/**
|
|
38
|
-
*
|
|
39
|
-
*
|
|
40
|
+
* A local process holding a lock: alive while a process of this pid and start
|
|
41
|
+
* time runs under this boot.
|
|
40
42
|
*/
|
|
41
43
|
export const ProcessHolderType = StructType({
|
|
42
44
|
/** Process ID */
|
|
@@ -49,23 +51,55 @@ export const ProcessHolderType = StructType({
|
|
|
49
51
|
command: StringType,
|
|
50
52
|
});
|
|
51
53
|
/**
|
|
52
|
-
*
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
54
|
+
* A cloud function holding a lock, which the lock's lease bounds.
|
|
55
|
+
*/
|
|
56
|
+
export const LambdaHolderType = StructType({
|
|
57
|
+
/** The invocation's request ID */
|
|
58
|
+
requestId: StringType,
|
|
59
|
+
/** The function's name */
|
|
60
|
+
functionName: StringType,
|
|
61
|
+
});
|
|
62
|
+
/**
|
|
63
|
+
* Who holds a lock.
|
|
64
|
+
*/
|
|
65
|
+
export const LockHolderVariantType = VariantType({
|
|
66
|
+
/** A local process */
|
|
67
|
+
process: ProcessHolderType,
|
|
68
|
+
/** A cloud function */
|
|
69
|
+
lambda: LambdaHolderType,
|
|
70
|
+
});
|
|
71
|
+
/**
|
|
72
|
+
* The state of a held lock.
|
|
57
73
|
*
|
|
58
|
-
* The
|
|
59
|
-
*
|
|
74
|
+
* The locking itself is the backend's — an atomically created file locally, a
|
|
75
|
+
* conditional write in the cloud — and every backend records this state.
|
|
60
76
|
*/
|
|
61
77
|
export const LockStateType = StructType({
|
|
62
78
|
/** What operation acquired the lock */
|
|
63
79
|
operation: LockOperationType,
|
|
64
|
-
/** Who holds the lock
|
|
65
|
-
holder:
|
|
80
|
+
/** Who holds the lock */
|
|
81
|
+
holder: LockHolderVariantType,
|
|
66
82
|
/** When the lock was acquired */
|
|
67
83
|
acquiredAt: DateTimeType,
|
|
68
84
|
/** When the lock expires (for cloud TTL-based locks) */
|
|
69
85
|
expiresAt: OptionType(DateTimeType),
|
|
70
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
|
+
});
|
|
71
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"}
|
|
@@ -0,0 +1,21 @@
|
|
|
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
|
+
* The rule for the names e3 makes paths of: a repository's name where a server
|
|
7
|
+
* keeps several, a workspace's name, a package's name and version, and a
|
|
8
|
+
* lock's resource. One place holds it, so the SDK, the CLI, the API server and
|
|
9
|
+
* the stores refuse the same names.
|
|
10
|
+
*/
|
|
11
|
+
/** What a name names. */
|
|
12
|
+
export type NamedKind = 'repository' | 'workspace' | 'package' | 'package version' | 'lock';
|
|
13
|
+
/**
|
|
14
|
+
* Why a name cannot be one path segment, or `null` when it can.
|
|
15
|
+
*
|
|
16
|
+
* @param kind - What the name names
|
|
17
|
+
* @param name - The name
|
|
18
|
+
* @returns The problem, in words that follow the name, or `null`
|
|
19
|
+
*/
|
|
20
|
+
export declare function nameProblem(kind: NamedKind, name: string): string | null;
|
|
21
|
+
//# sourceMappingURL=names.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"names.d.ts","sourceRoot":"","sources":["../../src/names.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;GAKG;AAEH,yBAAyB;AACzB,MAAM,MAAM,SAAS,GAAG,YAAY,GAAG,WAAW,GAAG,SAAS,GAAG,iBAAiB,GAAG,MAAM,CAAC;AAU5F;;;;;;GAMG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAQxE"}
|
|
@@ -0,0 +1,31 @@
|
|
|
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
|
+
/** What no name may hold: a path separator, a character a Windows file name
|
|
6
|
+
* refuses, or a control character. */
|
|
7
|
+
const REFUSED = /[/\\:*?"<>|\u0000-\u001f]/;
|
|
8
|
+
/** What a workspace's name may not hold besides: the characters that join the
|
|
9
|
+
* parts of its locks' names. */
|
|
10
|
+
const REFUSED_IN_WORKSPACE = /[#~]/;
|
|
11
|
+
/**
|
|
12
|
+
* Why a name cannot be one path segment, or `null` when it can.
|
|
13
|
+
*
|
|
14
|
+
* @param kind - What the name names
|
|
15
|
+
* @param name - The name
|
|
16
|
+
* @returns The problem, in words that follow the name, or `null`
|
|
17
|
+
*/
|
|
18
|
+
export function nameProblem(kind, name) {
|
|
19
|
+
if (name === '')
|
|
20
|
+
return 'is empty';
|
|
21
|
+
if (name === '.' || name === '..')
|
|
22
|
+
return 'is a path of its own';
|
|
23
|
+
const refused = REFUSED.exec(name);
|
|
24
|
+
if (refused !== null)
|
|
25
|
+
return `holds ${JSON.stringify(refused[0])}, which a file name cannot`;
|
|
26
|
+
const joiner = kind === 'workspace' ? REFUSED_IN_WORKSPACE.exec(name) : null;
|
|
27
|
+
if (joiner !== null)
|
|
28
|
+
return `holds ${JSON.stringify(joiner[0])}, which joins the parts of a lock's name`;
|
|
29
|
+
return null;
|
|
30
|
+
}
|
|
31
|
+
//# sourceMappingURL=names.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"names.js","sourceRoot":"","sources":["../../src/names.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAYH;uCACuC;AACvC,MAAM,OAAO,GAAG,2BAA2B,CAAC;AAE5C;iCACiC;AACjC,MAAM,oBAAoB,GAAG,MAAM,CAAC;AAEpC;;;;;;GAMG;AACH,MAAM,UAAU,WAAW,CAAC,IAAe,EAAE,IAAY;IACvD,IAAI,IAAI,KAAK,EAAE;QAAE,OAAO,UAAU,CAAC;IACnC,IAAI,IAAI,KAAK,GAAG,IAAI,IAAI,KAAK,IAAI;QAAE,OAAO,sBAAsB,CAAC;IACjE,MAAM,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACnC,IAAI,OAAO,KAAK,IAAI;QAAE,OAAO,SAAS,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,4BAA4B,CAAC;IAC7F,MAAM,MAAM,GAAG,IAAI,KAAK,WAAW,CAAC,CAAC,CAAC,oBAAoB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;IAC7E,IAAI,MAAM,KAAK,IAAI;QAAE,OAAO,SAAS,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,0CAA0C,CAAC;IACzG,OAAO,IAAI,CAAC;AACd,CAAC"}
|
package/dist/src/package.d.ts
CHANGED
|
@@ -88,73 +88,6 @@ export declare const PackageDataType: StructType<{
|
|
|
88
88
|
}>;
|
|
89
89
|
export type PackageDataType = typeof PackageDataType;
|
|
90
90
|
export type PackageData = ValueTypeOf<typeof PackageDataType>;
|
|
91
|
-
/** @deprecated Use PackageDataType instead */
|
|
92
|
-
export declare const PackageDatasetsType: StructType<{
|
|
93
|
-
/** Structure defining tree shape (what's a group vs dataset) */
|
|
94
|
-
readonly structure: import("@elaraai/east").RecursiveType<VariantType<{
|
|
95
|
-
readonly value: StructType<{
|
|
96
|
-
readonly type: import("@elaraai/east").RecursiveType<VariantType<{
|
|
97
|
-
readonly Never: NullType;
|
|
98
|
-
readonly Null: NullType;
|
|
99
|
-
readonly Boolean: NullType;
|
|
100
|
-
readonly Integer: NullType;
|
|
101
|
-
readonly Float: NullType;
|
|
102
|
-
readonly String: NullType;
|
|
103
|
-
readonly DateTime: NullType;
|
|
104
|
-
readonly Blob: NullType;
|
|
105
|
-
readonly Ref: import("@elaraai/east").RecursiveTypeMarker;
|
|
106
|
-
readonly Array: import("@elaraai/east").RecursiveTypeMarker;
|
|
107
|
-
readonly Set: import("@elaraai/east").RecursiveTypeMarker;
|
|
108
|
-
readonly Dict: StructType<{
|
|
109
|
-
readonly key: import("@elaraai/east").RecursiveTypeMarker;
|
|
110
|
-
readonly value: import("@elaraai/east").RecursiveTypeMarker;
|
|
111
|
-
}>;
|
|
112
|
-
readonly Struct: import("@elaraai/east").ArrayType<StructType<{
|
|
113
|
-
readonly name: StringType;
|
|
114
|
-
readonly type: import("@elaraai/east").RecursiveTypeMarker;
|
|
115
|
-
}>>;
|
|
116
|
-
readonly Variant: import("@elaraai/east").ArrayType<StructType<{
|
|
117
|
-
readonly name: StringType;
|
|
118
|
-
readonly type: import("@elaraai/east").RecursiveTypeMarker;
|
|
119
|
-
}>>;
|
|
120
|
-
readonly Recursive: VariantType<{
|
|
121
|
-
readonly ref: IntegerType;
|
|
122
|
-
readonly wrapper: StructType<{
|
|
123
|
-
readonly id: IntegerType;
|
|
124
|
-
readonly inner: import("@elaraai/east").RecursiveTypeMarker;
|
|
125
|
-
}>;
|
|
126
|
-
}>;
|
|
127
|
-
readonly Function: StructType<{
|
|
128
|
-
readonly inputs: import("@elaraai/east").ArrayType<import("@elaraai/east").RecursiveTypeMarker>;
|
|
129
|
-
readonly output: import("@elaraai/east").RecursiveTypeMarker;
|
|
130
|
-
}>;
|
|
131
|
-
readonly AsyncFunction: StructType<{
|
|
132
|
-
readonly inputs: import("@elaraai/east").ArrayType<import("@elaraai/east").RecursiveTypeMarker>;
|
|
133
|
-
readonly output: import("@elaraai/east").RecursiveTypeMarker;
|
|
134
|
-
}>;
|
|
135
|
-
readonly Vector: import("@elaraai/east").RecursiveTypeMarker;
|
|
136
|
-
readonly Matrix: import("@elaraai/east").RecursiveTypeMarker;
|
|
137
|
-
}>>;
|
|
138
|
-
readonly writable: import("@elaraai/east").BooleanType;
|
|
139
|
-
}>;
|
|
140
|
-
readonly struct: DictType<StringType, import("@elaraai/east").RecursiveTypeMarker>;
|
|
141
|
-
}>>;
|
|
142
|
-
/** Per-dataset refs: refPath (e.g. "inputs/greeting") -> DatasetRef */
|
|
143
|
-
readonly refs: DictType<StringType, VariantType<{
|
|
144
|
-
readonly unassigned: NullType;
|
|
145
|
-
readonly null: StructType<{
|
|
146
|
-
readonly versions: DictType<StringType, StringType>;
|
|
147
|
-
}>;
|
|
148
|
-
readonly value: StructType<{
|
|
149
|
-
readonly hash: StringType;
|
|
150
|
-
readonly versions: DictType<StringType, StringType>;
|
|
151
|
-
}>;
|
|
152
|
-
}>>;
|
|
153
|
-
}>;
|
|
154
|
-
/** @deprecated Use PackageData instead */
|
|
155
|
-
export type PackageDatasetsType = PackageDataType;
|
|
156
|
-
/** @deprecated Use PackageData instead */
|
|
157
|
-
export type PackageDatasets = PackageData;
|
|
158
91
|
/**
|
|
159
92
|
* Package object stored in the object store.
|
|
160
93
|
*
|
|
@@ -270,12 +203,9 @@ export declare const PackageObjectType: StructType<{
|
|
|
270
203
|
}>;
|
|
271
204
|
/** Functions defined in this package: name -> FunctionObject hash. */
|
|
272
205
|
readonly functions: DictType<StringType, StringType>;
|
|
273
|
-
/** Records defined in this package: name -> RecordObject hash.
|
|
274
|
-
* BEAST2 encodes struct fields positionally in declaration order, so new
|
|
275
|
-
* fields MUST be appended LAST — never inserted between existing fields. */
|
|
206
|
+
/** Records defined in this package: name -> RecordObject hash. */
|
|
276
207
|
readonly records: DictType<StringType, StringType>;
|
|
277
|
-
/** Unresolved dataset sources: refPath (e.g. "inputs/table") -> descriptor.
|
|
278
|
-
* Appended LAST, per the positional rule above. */
|
|
208
|
+
/** Unresolved dataset sources: refPath (e.g. "inputs/table") -> descriptor. */
|
|
279
209
|
readonly sources: DictType<StringType, VariantType<{
|
|
280
210
|
/** A path on the machine that DEPLOYS the package, resolved at deploy. */
|
|
281
211
|
readonly file: StructType<{
|
|
@@ -286,13 +216,16 @@ export declare const PackageObjectType: StructType<{
|
|
|
286
216
|
export type PackageObjectType = typeof PackageObjectType;
|
|
287
217
|
export type PackageObject = ValueTypeOf<typeof PackageObjectType>;
|
|
288
218
|
/**
|
|
289
|
-
* Decode a `PackageObject` from BEAST2 bytes
|
|
290
|
-
*
|
|
219
|
+
* Decode a `PackageObject` from BEAST2 bytes.
|
|
220
|
+
*
|
|
221
|
+
* @remarks
|
|
222
|
+
* A package-borne wire, so it changes by hard cutover: a package exported by
|
|
223
|
+
* an older SDK is re-exported with the current one, and this says so.
|
|
291
224
|
*
|
|
292
|
-
*
|
|
293
|
-
*
|
|
294
|
-
* the
|
|
295
|
-
*
|
|
225
|
+
* @param data - the stored bytes
|
|
226
|
+
* @returns the package object
|
|
227
|
+
* @throws {Error} When the bytes are not a current package object — a package
|
|
228
|
+
* exported by an older SDK, which is re-exported with the current one.
|
|
296
229
|
*/
|
|
297
230
|
export declare function decodePackageObject(data: Uint8Array): PackageObject;
|
|
298
231
|
export declare const PackageTransferInitRequestType: StructType<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"package.d.ts","sourceRoot":"","sources":["../../src/package.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,WAAW,EAAE,WAAW,EAAE,QAAQ,EAAE,QAAQ,EAAE,WAAW,EAAmB,MAAM,eAAe,CAAC;AAInI;;;;;;;;;GASG;AACH,eAAO,MAAM,eAAe;IAC1B,gEAAgE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAEhE,uEAAuE;;;;;;;;;;;EAEvE,CAAC;AACH,MAAM,MAAM,eAAe,GAAG,OAAO,eAAe,CAAC;AAErD,MAAM,MAAM,WAAW,GAAG,WAAW,CAAC,OAAO,eAAe,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"package.d.ts","sourceRoot":"","sources":["../../src/package.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,WAAW,EAAE,WAAW,EAAE,QAAQ,EAAE,QAAQ,EAAE,WAAW,EAAmB,MAAM,eAAe,CAAC;AAInI;;;;;;;;;GASG;AACH,eAAO,MAAM,eAAe;IAC1B,gEAAgE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAEhE,uEAAuE;;;;;;;;;;;EAEvE,CAAC;AACH,MAAM,MAAM,eAAe,GAAG,OAAO,eAAe,CAAC;AAErD,MAAM,MAAM,WAAW,GAAG,WAAW,CAAC,OAAO,eAAe,CAAC,CAAC;AAE9D;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,qBAAqB;IAChC,0EAA0E;;;;EAE1E,CAAC;AACH,MAAM,MAAM,qBAAqB,GAAG,OAAO,qBAAqB,CAAC;AACjE,MAAM,MAAM,iBAAiB,GAAG,WAAW,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAE1E,eAAO,MAAM,iBAAiB;IAC5B,8DAA8D;;IAE9D,wCAAwC;;QA1DxC,gEAAgE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QAEhE,uEAAuE;;;;;;;;;;;;IA0DvE,sEAAsE;;IAEtE,kEAAkE;;IAElE,+EAA+E;;QAf/E,0EAA0E;;;;;EAiB1E,CAAC;AACH,MAAM,MAAM,iBAAiB,GAAG,OAAO,iBAAiB,CAAC;AAEzD,MAAM,MAAM,aAAa,GAAG,WAAW,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAIlE;;;;;;;;;;;GAWG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,UAAU,GAAG,aAAa,CASnE;AAMD,eAAO,MAAM,8BAA8B;;EAEzC,CAAC;AACH,MAAM,MAAM,0BAA0B,GAAG,WAAW,CAAC,OAAO,8BAA8B,CAAC,CAAC;AAE5F,eAAO,MAAM,+BAA+B;;;EAG1C,CAAC;AACH,MAAM,MAAM,2BAA2B,GAAG,WAAW,CAAC,OAAO,+BAA+B,CAAC,CAAC;AAE9F,eAAO,MAAM,sBAAsB;;EAEjC,CAAC;AACH,MAAM,MAAM,kBAAkB,GAAG,WAAW,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAE5E,eAAO,MAAM,uBAAuB;;;;;EAKlC,CAAC;AACH,MAAM,MAAM,mBAAmB,GAAG,WAAW,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAE9E,eAAO,MAAM,uBAAuB;;;EAGlC,CAAC;AACH,MAAM,MAAM,mBAAmB,GAAG,WAAW,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAE9E,eAAO,MAAM,yBAAyB;;;;;;EAIpC,CAAC;AACH,MAAM,MAAM,qBAAqB,GAAG,WAAW,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAElF,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;EAMlC,CAAC;AACH,MAAM,MAAM,mBAAmB,GAAG,WAAW,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAE9E,eAAO,MAAM,yBAAyB;;;;;;EAIpC,CAAC;AACH,MAAM,MAAM,qBAAqB,GAAG,WAAW,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAElF,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;EAMlC,CAAC;AACH,MAAM,MAAM,mBAAmB,GAAG,WAAW,CAAC,OAAO,uBAAuB,CAAC,CAAC"}
|