@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/package.js
CHANGED
|
@@ -32,9 +32,6 @@ export const PackageDataType = StructType({
|
|
|
32
32
|
/** Per-dataset refs: refPath (e.g. "inputs/greeting") -> DatasetRef */
|
|
33
33
|
refs: DictType(StringType, DatasetRefType),
|
|
34
34
|
});
|
|
35
|
-
// Backwards compatibility alias
|
|
36
|
-
/** @deprecated Use PackageDataType instead */
|
|
37
|
-
export const PackageDatasetsType = PackageDataType;
|
|
38
35
|
/**
|
|
39
36
|
* Package object stored in the object store.
|
|
40
37
|
*
|
|
@@ -85,81 +82,31 @@ export const PackageObjectType = StructType({
|
|
|
85
82
|
data: PackageDataType,
|
|
86
83
|
/** Functions defined in this package: name -> FunctionObject hash. */
|
|
87
84
|
functions: DictType(StringType, StringType),
|
|
88
|
-
/** Records defined in this package: name -> RecordObject hash.
|
|
89
|
-
* BEAST2 encodes struct fields positionally in declaration order, so new
|
|
90
|
-
* fields MUST be appended LAST — never inserted between existing fields. */
|
|
85
|
+
/** Records defined in this package: name -> RecordObject hash. */
|
|
91
86
|
records: DictType(StringType, StringType),
|
|
92
|
-
/** Unresolved dataset sources: refPath (e.g. "inputs/table") -> descriptor.
|
|
93
|
-
* Appended LAST, per the positional rule above. */
|
|
87
|
+
/** Unresolved dataset sources: refPath (e.g. "inputs/table") -> descriptor. */
|
|
94
88
|
sources: DictType(StringType, DatasetSourceWireType),
|
|
95
89
|
});
|
|
96
|
-
/**
|
|
97
|
-
* The pre-`sources` package object wire shape (tasks, data, functions,
|
|
98
|
-
* records), kept only so {@link decodePackageObject} can read packages exported
|
|
99
|
-
* before path-initialised inputs existed.
|
|
100
|
-
*/
|
|
101
|
-
const RecordsEraPackageObjectType = StructType({
|
|
102
|
-
tasks: DictType(StringType, StringType),
|
|
103
|
-
data: PackageDataType,
|
|
104
|
-
functions: DictType(StringType, StringType),
|
|
105
|
-
records: DictType(StringType, StringType),
|
|
106
|
-
});
|
|
107
|
-
/**
|
|
108
|
-
* The pre-`records` package object wire shape (tasks, data, functions), kept
|
|
109
|
-
* only so {@link decodePackageObject} can read packages exported before records
|
|
110
|
-
* existed.
|
|
111
|
-
*/
|
|
112
|
-
const FunctionsEraPackageObjectType = StructType({
|
|
113
|
-
tasks: DictType(StringType, StringType),
|
|
114
|
-
data: PackageDataType,
|
|
115
|
-
functions: DictType(StringType, StringType),
|
|
116
|
-
});
|
|
117
|
-
/**
|
|
118
|
-
* The pre-`functions` package object wire shape (tasks, data), kept only so
|
|
119
|
-
* {@link decodePackageObject} can read packages exported before functions
|
|
120
|
-
* existed.
|
|
121
|
-
*/
|
|
122
|
-
const LegacyPackageObjectType = StructType({
|
|
123
|
-
tasks: DictType(StringType, StringType),
|
|
124
|
-
data: PackageDataType,
|
|
125
|
-
});
|
|
126
90
|
const decodeCurrent = decodeBeast2For(PackageObjectType);
|
|
127
|
-
const decodeRecordsEra = decodeBeast2For(RecordsEraPackageObjectType);
|
|
128
|
-
const decodeFunctionsEra = decodeBeast2For(FunctionsEraPackageObjectType);
|
|
129
|
-
const decodeLegacy = decodeBeast2For(LegacyPackageObjectType);
|
|
130
91
|
/**
|
|
131
|
-
* Decode a `PackageObject` from BEAST2 bytes
|
|
132
|
-
*
|
|
92
|
+
* Decode a `PackageObject` from BEAST2 bytes.
|
|
93
|
+
*
|
|
94
|
+
* @remarks
|
|
95
|
+
* A package-borne wire, so it changes by hard cutover: a package exported by
|
|
96
|
+
* an older SDK is re-exported with the current one, and this says so.
|
|
133
97
|
*
|
|
134
|
-
*
|
|
135
|
-
*
|
|
136
|
-
* the
|
|
137
|
-
*
|
|
98
|
+
* @param data - the stored bytes
|
|
99
|
+
* @returns the package object
|
|
100
|
+
* @throws {Error} When the bytes are not a current package object — a package
|
|
101
|
+
* exported by an older SDK, which is re-exported with the current one.
|
|
138
102
|
*/
|
|
139
103
|
export function decodePackageObject(data) {
|
|
140
104
|
try {
|
|
141
105
|
return decodeCurrent(data);
|
|
142
106
|
}
|
|
143
107
|
catch (err) {
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
return { ...recEra, sources: new Map() };
|
|
147
|
-
}
|
|
148
|
-
catch {
|
|
149
|
-
try {
|
|
150
|
-
const fnEra = decodeFunctionsEra(data);
|
|
151
|
-
return { tasks: fnEra.tasks, data: fnEra.data, functions: fnEra.functions, records: new Map(), sources: new Map() };
|
|
152
|
-
}
|
|
153
|
-
catch {
|
|
154
|
-
try {
|
|
155
|
-
const legacy = decodeLegacy(data);
|
|
156
|
-
return { tasks: legacy.tasks, data: legacy.data, functions: new Map(), records: new Map(), sources: new Map() };
|
|
157
|
-
}
|
|
158
|
-
catch {
|
|
159
|
-
throw err; // no known shape — surface the current-format error
|
|
160
|
-
}
|
|
161
|
-
}
|
|
162
|
-
}
|
|
108
|
+
throw new Error(`the package object does not decode: the package was exported by an older e3 SDK — re-export it with the current one ` +
|
|
109
|
+
`(${err instanceof Error ? err.message : String(err)})`);
|
|
163
110
|
}
|
|
164
111
|
}
|
|
165
112
|
// =============================================================================
|
package/dist/src/package.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"package.js","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,eAAe,EAAE,MAAM,eAAe,CAAC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