@elaraai/e3-core 0.0.2-beta.4 → 0.0.2-beta.40
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 +25 -22
- package/dist/src/dataflow/api-compat.d.ts +90 -0
- package/dist/src/dataflow/api-compat.d.ts.map +1 -0
- package/dist/src/dataflow/api-compat.js +139 -0
- package/dist/src/dataflow/api-compat.js.map +1 -0
- package/dist/src/dataflow/index.d.ts +18 -0
- package/dist/src/dataflow/index.d.ts.map +1 -0
- package/dist/src/dataflow/index.js +23 -0
- package/dist/src/dataflow/index.js.map +1 -0
- package/dist/src/dataflow/orchestrator/LocalOrchestrator.d.ts +76 -0
- package/dist/src/dataflow/orchestrator/LocalOrchestrator.d.ts.map +1 -0
- package/dist/src/dataflow/orchestrator/LocalOrchestrator.js +695 -0
- package/dist/src/dataflow/orchestrator/LocalOrchestrator.js.map +1 -0
- package/dist/src/dataflow/orchestrator/index.d.ts +12 -0
- package/dist/src/dataflow/orchestrator/index.d.ts.map +1 -0
- package/dist/src/dataflow/orchestrator/index.js +12 -0
- package/dist/src/dataflow/orchestrator/index.js.map +1 -0
- package/dist/src/dataflow/orchestrator/interfaces.d.ts +163 -0
- package/dist/src/dataflow/orchestrator/interfaces.d.ts.map +1 -0
- package/dist/src/dataflow/orchestrator/interfaces.js +52 -0
- package/dist/src/dataflow/orchestrator/interfaces.js.map +1 -0
- package/dist/src/dataflow/state-store/FileStateStore.d.ts +67 -0
- package/dist/src/dataflow/state-store/FileStateStore.d.ts.map +1 -0
- package/dist/src/dataflow/state-store/FileStateStore.js +300 -0
- package/dist/src/dataflow/state-store/FileStateStore.js.map +1 -0
- package/dist/src/dataflow/state-store/InMemoryStateStore.d.ts +42 -0
- package/dist/src/dataflow/state-store/InMemoryStateStore.d.ts.map +1 -0
- package/dist/src/dataflow/state-store/InMemoryStateStore.js +229 -0
- package/dist/src/dataflow/state-store/InMemoryStateStore.js.map +1 -0
- package/dist/src/dataflow/state-store/index.d.ts +13 -0
- package/dist/src/dataflow/state-store/index.d.ts.map +1 -0
- package/dist/src/dataflow/state-store/index.js +13 -0
- package/dist/src/dataflow/state-store/index.js.map +1 -0
- package/dist/src/dataflow/state-store/interfaces.d.ts +159 -0
- package/dist/src/dataflow/state-store/interfaces.d.ts.map +1 -0
- package/dist/src/dataflow/state-store/interfaces.js +6 -0
- package/dist/src/dataflow/state-store/interfaces.js.map +1 -0
- package/dist/src/dataflow/steps.d.ts +222 -0
- package/dist/src/dataflow/steps.d.ts.map +1 -0
- package/dist/src/dataflow/steps.js +707 -0
- package/dist/src/dataflow/steps.js.map +1 -0
- package/dist/src/dataflow/types.d.ts +127 -0
- package/dist/src/dataflow/types.d.ts.map +1 -0
- package/dist/src/dataflow/types.js +7 -0
- package/dist/src/dataflow/types.js.map +1 -0
- package/dist/src/dataflow.d.ts +113 -38
- package/dist/src/dataflow.d.ts.map +1 -1
- package/dist/src/dataflow.js +269 -416
- package/dist/src/dataflow.js.map +1 -1
- package/dist/src/dataset-refs.d.ts +124 -0
- package/dist/src/dataset-refs.d.ts.map +1 -0
- package/dist/src/dataset-refs.js +319 -0
- package/dist/src/dataset-refs.js.map +1 -0
- package/dist/src/errors.d.ts +39 -9
- package/dist/src/errors.d.ts.map +1 -1
- package/dist/src/errors.js +51 -8
- package/dist/src/errors.js.map +1 -1
- package/dist/src/execution/LocalTaskRunner.d.ts +73 -0
- package/dist/src/execution/LocalTaskRunner.d.ts.map +1 -0
- package/dist/src/execution/LocalTaskRunner.js +399 -0
- package/dist/src/execution/LocalTaskRunner.js.map +1 -0
- package/dist/src/execution/MockTaskRunner.d.ts +49 -0
- package/dist/src/execution/MockTaskRunner.d.ts.map +1 -0
- package/dist/src/execution/MockTaskRunner.js +54 -0
- package/dist/src/execution/MockTaskRunner.js.map +1 -0
- package/dist/src/execution/index.d.ts +16 -0
- package/dist/src/execution/index.d.ts.map +1 -0
- package/dist/src/execution/index.js +8 -0
- package/dist/src/execution/index.js.map +1 -0
- package/dist/src/execution/interfaces.d.ts +246 -0
- package/dist/src/execution/interfaces.d.ts.map +1 -0
- package/dist/src/execution/interfaces.js +6 -0
- package/dist/src/execution/interfaces.js.map +1 -0
- package/dist/src/execution/processHelpers.d.ts +20 -0
- package/dist/src/execution/processHelpers.d.ts.map +1 -0
- package/dist/src/execution/processHelpers.js +62 -0
- package/dist/src/execution/processHelpers.js.map +1 -0
- package/dist/src/executions.d.ts +71 -104
- package/dist/src/executions.d.ts.map +1 -1
- package/dist/src/executions.js +110 -476
- package/dist/src/executions.js.map +1 -1
- package/dist/src/index.d.ts +19 -9
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +48 -18
- package/dist/src/index.js.map +1 -1
- package/dist/src/objects.d.ts +8 -51
- package/dist/src/objects.d.ts.map +1 -1
- package/dist/src/objects.js +13 -230
- package/dist/src/objects.js.map +1 -1
- package/dist/src/packages.d.ts +22 -14
- package/dist/src/packages.d.ts.map +1 -1
- package/dist/src/packages.js +134 -88
- package/dist/src/packages.js.map +1 -1
- package/dist/src/storage/in-memory/InMemoryRepoStore.d.ts +35 -0
- package/dist/src/storage/in-memory/InMemoryRepoStore.d.ts.map +1 -0
- package/dist/src/storage/in-memory/InMemoryRepoStore.js +107 -0
- package/dist/src/storage/in-memory/InMemoryRepoStore.js.map +1 -0
- package/dist/src/storage/in-memory/InMemoryStorage.d.ts +139 -0
- package/dist/src/storage/in-memory/InMemoryStorage.d.ts.map +1 -0
- package/dist/src/storage/in-memory/InMemoryStorage.js +439 -0
- package/dist/src/storage/in-memory/InMemoryStorage.js.map +1 -0
- package/dist/src/storage/in-memory/index.d.ts +12 -0
- package/dist/src/storage/in-memory/index.d.ts.map +1 -0
- package/dist/src/storage/in-memory/index.js +12 -0
- package/dist/src/storage/in-memory/index.js.map +1 -0
- package/dist/src/storage/index.d.ts +18 -0
- package/dist/src/storage/index.d.ts.map +1 -0
- package/dist/src/storage/index.js +10 -0
- package/dist/src/storage/index.js.map +1 -0
- package/dist/src/storage/interfaces.d.ts +581 -0
- package/dist/src/storage/interfaces.d.ts.map +1 -0
- package/dist/src/storage/interfaces.js +6 -0
- package/dist/src/storage/interfaces.js.map +1 -0
- package/dist/src/storage/local/LocalBackend.d.ts +56 -0
- package/dist/src/storage/local/LocalBackend.d.ts.map +1 -0
- package/dist/src/storage/local/LocalBackend.js +145 -0
- package/dist/src/storage/local/LocalBackend.js.map +1 -0
- package/dist/src/storage/local/LocalDatasetRefStore.d.ts +22 -0
- package/dist/src/storage/local/LocalDatasetRefStore.d.ts.map +1 -0
- package/dist/src/storage/local/LocalDatasetRefStore.js +118 -0
- package/dist/src/storage/local/LocalDatasetRefStore.js.map +1 -0
- package/dist/src/storage/local/LocalLockService.d.ts +111 -0
- package/dist/src/storage/local/LocalLockService.d.ts.map +1 -0
- package/dist/src/storage/local/LocalLockService.js +355 -0
- package/dist/src/storage/local/LocalLockService.js.map +1 -0
- package/dist/src/storage/local/LocalLogStore.d.ts +23 -0
- package/dist/src/storage/local/LocalLogStore.d.ts.map +1 -0
- package/dist/src/storage/local/LocalLogStore.js +66 -0
- package/dist/src/storage/local/LocalLogStore.js.map +1 -0
- package/dist/src/storage/local/LocalObjectStore.d.ts +55 -0
- package/dist/src/storage/local/LocalObjectStore.d.ts.map +1 -0
- package/dist/src/storage/local/LocalObjectStore.js +300 -0
- package/dist/src/storage/local/LocalObjectStore.js.map +1 -0
- package/dist/src/storage/local/LocalRefStore.d.ts +50 -0
- package/dist/src/storage/local/LocalRefStore.d.ts.map +1 -0
- package/dist/src/storage/local/LocalRefStore.js +337 -0
- package/dist/src/storage/local/LocalRefStore.js.map +1 -0
- package/dist/src/storage/local/LocalRepoStore.d.ts +55 -0
- package/dist/src/storage/local/LocalRepoStore.d.ts.map +1 -0
- package/dist/src/storage/local/LocalRepoStore.js +365 -0
- package/dist/src/storage/local/LocalRepoStore.js.map +1 -0
- package/dist/src/storage/local/gc.d.ts +92 -0
- package/dist/src/storage/local/gc.d.ts.map +1 -0
- package/dist/src/storage/local/gc.js +377 -0
- package/dist/src/storage/local/gc.js.map +1 -0
- package/dist/src/storage/local/index.d.ts +18 -0
- package/dist/src/storage/local/index.d.ts.map +1 -0
- package/dist/src/storage/local/index.js +18 -0
- package/dist/src/storage/local/index.js.map +1 -0
- package/dist/src/storage/local/localHelpers.d.ts +25 -0
- package/dist/src/storage/local/localHelpers.d.ts.map +1 -0
- package/dist/src/storage/local/localHelpers.js +69 -0
- package/dist/src/storage/local/localHelpers.js.map +1 -0
- package/dist/src/{repository.d.ts → storage/local/repository.d.ts} +8 -4
- package/dist/src/storage/local/repository.d.ts.map +1 -0
- package/dist/src/{repository.js → storage/local/repository.js} +31 -29
- package/dist/src/storage/local/repository.js.map +1 -0
- package/dist/src/tasks.d.ts +16 -10
- package/dist/src/tasks.d.ts.map +1 -1
- package/dist/src/tasks.js +35 -41
- package/dist/src/tasks.js.map +1 -1
- package/dist/src/test-helpers.d.ts +5 -4
- package/dist/src/test-helpers.d.ts.map +1 -1
- package/dist/src/test-helpers.js +9 -21
- package/dist/src/test-helpers.js.map +1 -1
- package/dist/src/transfer/InMemoryTransferBackend.d.ts +66 -0
- package/dist/src/transfer/InMemoryTransferBackend.d.ts.map +1 -0
- package/dist/src/transfer/InMemoryTransferBackend.js +166 -0
- package/dist/src/transfer/InMemoryTransferBackend.js.map +1 -0
- package/dist/src/transfer/index.d.ts +8 -0
- package/dist/src/transfer/index.d.ts.map +1 -0
- package/dist/src/transfer/index.js +9 -0
- package/dist/src/transfer/index.js.map +1 -0
- package/dist/src/transfer/interfaces.d.ts +103 -0
- package/dist/src/transfer/interfaces.d.ts.map +1 -0
- package/dist/src/transfer/interfaces.js +6 -0
- package/dist/src/transfer/interfaces.js.map +1 -0
- package/dist/src/transfer/types.d.ts +79 -0
- package/dist/src/transfer/types.d.ts.map +1 -0
- package/dist/src/transfer/types.js +58 -0
- package/dist/src/transfer/types.js.map +1 -0
- package/dist/src/trees.d.ts +147 -59
- package/dist/src/trees.d.ts.map +1 -1
- package/dist/src/trees.js +372 -419
- package/dist/src/trees.js.map +1 -1
- package/dist/src/uuid.d.ts +26 -0
- package/dist/src/uuid.d.ts.map +1 -0
- package/dist/src/uuid.js +80 -0
- package/dist/src/uuid.js.map +1 -0
- package/dist/src/workspaceStatus.d.ts +6 -4
- package/dist/src/workspaceStatus.d.ts.map +1 -1
- package/dist/src/workspaceStatus.js +43 -49
- package/dist/src/workspaceStatus.js.map +1 -1
- package/dist/src/workspaces.d.ts +35 -47
- package/dist/src/workspaces.d.ts.map +1 -1
- package/dist/src/workspaces.js +194 -156
- package/dist/src/workspaces.js.map +1 -1
- package/package.json +4 -4
- package/dist/src/gc.d.ts +0 -54
- package/dist/src/gc.d.ts.map +0 -1
- package/dist/src/gc.js +0 -233
- package/dist/src/gc.js.map +0 -1
- package/dist/src/repository.d.ts.map +0 -1
- package/dist/src/repository.js.map +0 -1
- package/dist/src/workspaceLock.d.ts +0 -67
- package/dist/src/workspaceLock.d.ts.map +0 -1
- package/dist/src/workspaceLock.js +0 -217
- package/dist/src/workspaceLock.js.map +0 -1
package/dist/src/trees.d.ts
CHANGED
|
@@ -12,12 +12,15 @@
|
|
|
12
12
|
* tree node. This enables proper encoding/decoding with the correct StructType
|
|
13
13
|
* and supports future tree types (array, variant, etc.).
|
|
14
14
|
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
15
|
+
* Workspace operations use per-dataset ref files (DatasetRef) instead of tree
|
|
16
|
+
* traversal. This enables concurrent writes without serialization.
|
|
17
|
+
*
|
|
18
|
+
* Low-level tree read/write operations remain for computing root hashes and
|
|
19
|
+
* for package operations.
|
|
17
20
|
*/
|
|
18
21
|
import { type EastType, type EastTypeValue } from '@elaraai/east';
|
|
19
|
-
import { type DataRef, type Structure, type TreePath } from '@elaraai/e3-types';
|
|
20
|
-
import {
|
|
22
|
+
import { type DataRef, type Structure, type TreePath, type VersionVector } from '@elaraai/e3-types';
|
|
23
|
+
import type { StorageBackend, LockHandle } from './storage/interfaces.js';
|
|
21
24
|
/**
|
|
22
25
|
* A tree object: mapping of field names to data references.
|
|
23
26
|
*
|
|
@@ -28,69 +31,51 @@ export type TreeObject = Record<string, DataRef>;
|
|
|
28
31
|
/**
|
|
29
32
|
* Read and decode a tree object from the object store.
|
|
30
33
|
*
|
|
31
|
-
* @param
|
|
34
|
+
* @param storage - Storage backend
|
|
35
|
+
* @param repo - Repository identifier
|
|
32
36
|
* @param hash - Hash of the tree object
|
|
33
37
|
* @param structure - The structure describing this tree node's shape
|
|
34
38
|
* @returns The decoded tree object (field name -> DataRef)
|
|
35
39
|
* @throws If object not found, structure is not a tree, or decoding fails
|
|
36
40
|
*/
|
|
37
|
-
export declare function treeRead(
|
|
41
|
+
export declare function treeRead(storage: StorageBackend, repo: string, hash: string, structure: Structure): Promise<TreeObject>;
|
|
38
42
|
/**
|
|
39
43
|
* Encode and write a tree object to the object store.
|
|
40
44
|
*
|
|
41
|
-
* @param
|
|
45
|
+
* @param storage - Storage backend
|
|
46
|
+
* @param repo - Repository identifier
|
|
42
47
|
* @param fields - Object mapping field names to DataRefs
|
|
43
48
|
* @param structure - The structure describing this tree node's shape
|
|
44
49
|
* @returns Hash of the written tree object
|
|
45
50
|
* @throws If structure is not a tree or encoding fails
|
|
46
51
|
*/
|
|
47
|
-
export declare function treeWrite(
|
|
52
|
+
export declare function treeWrite(storage: StorageBackend, repo: string, fields: TreeObject, structure: Structure): Promise<string>;
|
|
48
53
|
/**
|
|
49
54
|
* Read and decode a dataset value from the object store.
|
|
50
55
|
*
|
|
51
56
|
* The .beast2 format includes type information in the header, so values
|
|
52
57
|
* can be decoded without knowing the schema in advance.
|
|
53
58
|
*
|
|
54
|
-
* @param
|
|
59
|
+
* @param storage - Storage backend
|
|
60
|
+
* @param repo - Repository identifier
|
|
55
61
|
* @param hash - Hash of the dataset value
|
|
56
62
|
* @returns The decoded value and its type
|
|
57
63
|
* @throws If object not found or not a valid beast2 object
|
|
58
64
|
*/
|
|
59
|
-
export declare function datasetRead(
|
|
65
|
+
export declare function datasetRead(storage: StorageBackend, repo: string, hash: string): Promise<{
|
|
60
66
|
type: EastType;
|
|
61
67
|
value: unknown;
|
|
62
68
|
}>;
|
|
63
69
|
/**
|
|
64
70
|
* Encode and write a dataset value to the object store.
|
|
65
71
|
*
|
|
66
|
-
* @param
|
|
72
|
+
* @param storage - Storage backend
|
|
73
|
+
* @param repo - Repository identifier
|
|
67
74
|
* @param value - The value to encode
|
|
68
75
|
* @param type - The East type for encoding (EastType or EastTypeValue)
|
|
69
76
|
* @returns Hash of the written dataset value
|
|
70
77
|
*/
|
|
71
|
-
export declare function datasetWrite(
|
|
72
|
-
/**
|
|
73
|
-
* List field names at a tree path within a package's data tree.
|
|
74
|
-
*
|
|
75
|
-
* @param repoPath - Path to .e3 repository
|
|
76
|
-
* @param name - Package name
|
|
77
|
-
* @param version - Package version
|
|
78
|
-
* @param path - Path to the tree node
|
|
79
|
-
* @returns Array of field names at the path
|
|
80
|
-
* @throws If package not found, path invalid, or path points to a dataset
|
|
81
|
-
*/
|
|
82
|
-
export declare function packageListTree(repoPath: string, name: string, version: string, path: TreePath): Promise<string[]>;
|
|
83
|
-
/**
|
|
84
|
-
* Read and decode a dataset value at a path within a package's data tree.
|
|
85
|
-
*
|
|
86
|
-
* @param repoPath - Path to .e3 repository
|
|
87
|
-
* @param name - Package name
|
|
88
|
-
* @param version - Package version
|
|
89
|
-
* @param path - Path to the dataset
|
|
90
|
-
* @returns The decoded dataset value
|
|
91
|
-
* @throws If package not found, path invalid, or path points to a tree
|
|
92
|
-
*/
|
|
93
|
-
export declare function packageGetDataset(repoPath: string, name: string, version: string, path: TreePath): Promise<unknown>;
|
|
78
|
+
export declare function datasetWrite(storage: StorageBackend, repo: string, value: unknown, type: EastType | EastTypeValue): Promise<string>;
|
|
94
79
|
/**
|
|
95
80
|
* Options for setting a workspace dataset.
|
|
96
81
|
*/
|
|
@@ -100,18 +85,16 @@ export interface WorkspaceSetDatasetOptions {
|
|
|
100
85
|
* for releasing the lock after the operation. If not provided, workspaceSetDataset
|
|
101
86
|
* will acquire and release a lock internally.
|
|
102
87
|
*/
|
|
103
|
-
lock?:
|
|
88
|
+
lock?: LockHandle;
|
|
104
89
|
}
|
|
105
90
|
/**
|
|
106
91
|
* Update a dataset at a path within a workspace.
|
|
107
92
|
*
|
|
108
|
-
*
|
|
109
|
-
*
|
|
110
|
-
*
|
|
111
|
-
* Acquires an exclusive lock on the workspace for the duration of the write
|
|
112
|
-
* to prevent concurrent modifications.
|
|
93
|
+
* Writes the value to the object store and updates the per-dataset ref file.
|
|
94
|
+
* Uses shared structure lock to allow concurrent writes.
|
|
113
95
|
*
|
|
114
|
-
* @param
|
|
96
|
+
* @param storage - Storage backend
|
|
97
|
+
* @param repo - Repository identifier
|
|
115
98
|
* @param ws - Workspace name
|
|
116
99
|
* @param treePath - Path to the dataset
|
|
117
100
|
* @param value - The new value to write
|
|
@@ -120,59 +103,164 @@ export interface WorkspaceSetDatasetOptions {
|
|
|
120
103
|
* @throws {WorkspaceLockError} If workspace is locked by another process
|
|
121
104
|
* @throws If workspace not deployed, path invalid, or path points to a tree
|
|
122
105
|
*/
|
|
123
|
-
export declare function workspaceSetDataset(
|
|
106
|
+
export declare function workspaceSetDataset(storage: StorageBackend, repo: string, ws: string, treePath: TreePath, value: unknown, type: EastType | EastTypeValue, options?: WorkspaceSetDatasetOptions): Promise<void>;
|
|
124
107
|
/**
|
|
125
108
|
* List field names at a tree path within a workspace's data tree.
|
|
126
109
|
*
|
|
127
|
-
*
|
|
110
|
+
* Uses the structure to determine available fields (no tree traversal needed).
|
|
111
|
+
*
|
|
112
|
+
* @param storage - Storage backend
|
|
113
|
+
* @param repo - Repository identifier
|
|
128
114
|
* @param ws - Workspace name
|
|
129
|
-
* @param
|
|
115
|
+
* @param treePath - Path to the tree node
|
|
130
116
|
* @returns Array of field names at the path
|
|
131
117
|
* @throws If workspace not deployed, path invalid, or path points to a dataset
|
|
132
118
|
*/
|
|
133
|
-
export declare function workspaceListTree(
|
|
119
|
+
export declare function workspaceListTree(storage: StorageBackend, repo: string, ws: string, treePath: TreePath): Promise<string[]>;
|
|
134
120
|
/**
|
|
135
121
|
* Read and decode a dataset value at a path within a workspace's data tree.
|
|
136
122
|
*
|
|
137
|
-
*
|
|
123
|
+
* Reads the per-dataset ref file to get the value hash, then decodes the value.
|
|
124
|
+
*
|
|
125
|
+
* @param storage - Storage backend
|
|
126
|
+
* @param repo - Repository identifier
|
|
138
127
|
* @param ws - Workspace name
|
|
139
|
-
* @param
|
|
128
|
+
* @param treePath - Path to the dataset
|
|
140
129
|
* @returns The decoded dataset value
|
|
141
130
|
* @throws If workspace not deployed, path invalid, or path points to a tree
|
|
142
131
|
*/
|
|
143
|
-
export declare function workspaceGetDataset(
|
|
132
|
+
export declare function workspaceGetDataset(storage: StorageBackend, repo: string, ws: string, treePath: TreePath): Promise<unknown>;
|
|
144
133
|
/**
|
|
145
134
|
* Get the hash of a dataset at a path within a workspace's data tree.
|
|
146
135
|
*
|
|
147
|
-
*
|
|
148
|
-
* hash reference. Useful for dataflow execution which operates on hashes.
|
|
136
|
+
* Reads the per-dataset ref file directly. No tree traversal needed.
|
|
149
137
|
*
|
|
150
|
-
* @param
|
|
138
|
+
* @param storage - Storage backend
|
|
139
|
+
* @param repo - Repository identifier
|
|
151
140
|
* @param ws - Workspace name
|
|
152
141
|
* @param treePath - Path to the dataset
|
|
153
142
|
* @returns Object with ref type and hash (null for unassigned/null refs)
|
|
154
143
|
* @throws If workspace not deployed, path invalid, or path points to a tree
|
|
155
144
|
*/
|
|
156
|
-
export declare function workspaceGetDatasetHash(
|
|
145
|
+
export declare function workspaceGetDatasetHash(storage: StorageBackend, repo: string, ws: string, treePath: TreePath): Promise<{
|
|
157
146
|
refType: DataRef['type'];
|
|
158
147
|
hash: string | null;
|
|
159
148
|
}>;
|
|
160
149
|
/**
|
|
161
150
|
* Set a dataset at a path within a workspace using a pre-computed hash.
|
|
162
151
|
*
|
|
163
|
-
*
|
|
164
|
-
* directly. Useful for dataflow execution which already has the output hash.
|
|
152
|
+
* Writes a DatasetRef file directly. No tree path-copy needed.
|
|
165
153
|
*
|
|
166
154
|
* IMPORTANT: This function does NOT acquire a workspace lock. The caller must
|
|
167
|
-
* hold
|
|
168
|
-
*
|
|
169
|
-
*
|
|
155
|
+
* hold a lock on the workspace before calling this function. This
|
|
156
|
+
* is typically used by dataflowExecute which holds the lock for the entire
|
|
157
|
+
* execution.
|
|
170
158
|
*
|
|
171
|
-
* @param
|
|
159
|
+
* @param storage - Storage backend
|
|
160
|
+
* @param repo - Repository identifier
|
|
172
161
|
* @param ws - Workspace name
|
|
173
162
|
* @param treePath - Path to the dataset
|
|
174
163
|
* @param valueHash - Hash of the dataset value already in the object store
|
|
175
164
|
* @throws If workspace not deployed, path invalid, or path points to a tree
|
|
176
165
|
*/
|
|
177
|
-
export declare function workspaceSetDatasetByHash(
|
|
166
|
+
export declare function workspaceSetDatasetByHash(storage: StorageBackend, repo: string, ws: string, treePath: TreePath, valueHash: string, versions: VersionVector): Promise<void>;
|
|
167
|
+
/**
|
|
168
|
+
* Result of querying a single dataset's status.
|
|
169
|
+
*/
|
|
170
|
+
export interface DatasetStatusResult {
|
|
171
|
+
/** Ref type: 'unassigned' | 'null' | 'value' */
|
|
172
|
+
refType: DataRef['type'];
|
|
173
|
+
/** Object hash (null for unassigned/null refs) */
|
|
174
|
+
hash: string | null;
|
|
175
|
+
/** East type of the dataset */
|
|
176
|
+
datasetType: EastTypeValue;
|
|
177
|
+
/** Size in bytes (null for unassigned) */
|
|
178
|
+
size: number | null;
|
|
179
|
+
}
|
|
180
|
+
/**
|
|
181
|
+
* Get the status of a single dataset at a path within a workspace.
|
|
182
|
+
*
|
|
183
|
+
* Returns the ref type, hash, East type, and size without downloading the value.
|
|
184
|
+
*
|
|
185
|
+
* @param storage - Storage backend
|
|
186
|
+
* @param repo - Repository identifier
|
|
187
|
+
* @param ws - Workspace name
|
|
188
|
+
* @param treePath - Path to the dataset
|
|
189
|
+
* @returns Dataset status including ref type, hash, type, and size
|
|
190
|
+
* @throws If workspace not deployed, path invalid, or path points to a tree
|
|
191
|
+
*/
|
|
192
|
+
export declare function workspaceGetDatasetStatus(storage: StorageBackend, repo: string, ws: string, treePath: TreePath): Promise<DatasetStatusResult>;
|
|
193
|
+
/**
|
|
194
|
+
* A tree branch node (contains children).
|
|
195
|
+
*/
|
|
196
|
+
export interface TreeBranchNode {
|
|
197
|
+
/** Field name */
|
|
198
|
+
name: string;
|
|
199
|
+
/** Discriminator */
|
|
200
|
+
kind: 'tree';
|
|
201
|
+
/** Child nodes */
|
|
202
|
+
children: TreeNode[];
|
|
203
|
+
}
|
|
204
|
+
/**
|
|
205
|
+
* A dataset leaf node (contains a value).
|
|
206
|
+
*/
|
|
207
|
+
export interface TreeLeafNode {
|
|
208
|
+
/** Field name */
|
|
209
|
+
name: string;
|
|
210
|
+
/** Discriminator */
|
|
211
|
+
kind: 'dataset';
|
|
212
|
+
/** East type value (only present if includeTypes option was true) */
|
|
213
|
+
datasetType?: EastTypeValue;
|
|
214
|
+
/** Object hash (only present if includeStatus option was true and ref is 'value') */
|
|
215
|
+
hash?: string;
|
|
216
|
+
/** Ref type: 'unassigned' | 'null' | 'value' (only present if includeStatus option was true) */
|
|
217
|
+
refType?: string;
|
|
218
|
+
/** Size in bytes (only present if includeStatus option was true and ref is 'null' or 'value') */
|
|
219
|
+
size?: number;
|
|
220
|
+
}
|
|
221
|
+
/**
|
|
222
|
+
* A node in the tree structure for display purposes.
|
|
223
|
+
*/
|
|
224
|
+
export type TreeNode = TreeBranchNode | TreeLeafNode;
|
|
225
|
+
/**
|
|
226
|
+
* Options for workspaceGetTree.
|
|
227
|
+
*/
|
|
228
|
+
export interface WorkspaceGetTreeOptions {
|
|
229
|
+
/** Maximum depth to recurse (undefined = unlimited) */
|
|
230
|
+
maxDepth?: number;
|
|
231
|
+
/** Include East types for dataset nodes */
|
|
232
|
+
includeTypes?: boolean;
|
|
233
|
+
/** Include hash, refType, and size for dataset nodes */
|
|
234
|
+
includeStatus?: boolean;
|
|
235
|
+
}
|
|
236
|
+
/**
|
|
237
|
+
* Get the full tree structure at a path within a workspace.
|
|
238
|
+
*
|
|
239
|
+
* Recursively walks the structure and ref files to build a hierarchical
|
|
240
|
+
* structure suitable for display. Tasks are shown as leaves with their output type.
|
|
241
|
+
*
|
|
242
|
+
* @param storage - Storage backend
|
|
243
|
+
* @param repo - Repository identifier
|
|
244
|
+
* @param ws - Workspace name
|
|
245
|
+
* @param treePath - Path to start from (empty for root)
|
|
246
|
+
* @param options - Optional settings for depth limit and type inclusion
|
|
247
|
+
* @returns Array of tree nodes at the path
|
|
248
|
+
* @throws If workspace not deployed or path invalid
|
|
249
|
+
*/
|
|
250
|
+
export declare function workspaceGetTree(storage: StorageBackend, repo: string, ws: string, treePath: TreePath, options?: WorkspaceGetTreeOptions): Promise<TreeNode[]>;
|
|
251
|
+
/**
|
|
252
|
+
* List field names at a tree path within a package's data tree.
|
|
253
|
+
*
|
|
254
|
+
* Note: In the new format, packages store per-dataset refs in data/ dir
|
|
255
|
+
* rather than tree objects. This function uses the structure directly.
|
|
256
|
+
*
|
|
257
|
+
* @param storage - Storage backend
|
|
258
|
+
* @param repo - Repository identifier
|
|
259
|
+
* @param name - Package name
|
|
260
|
+
* @param version - Package version
|
|
261
|
+
* @param path - Path to the tree node
|
|
262
|
+
* @returns Array of field names at the path
|
|
263
|
+
* @throws If package not found, path invalid, or path points to a dataset
|
|
264
|
+
*/
|
|
265
|
+
export declare function packageListTree(storage: StorageBackend, repo: string, name: string, version: string, path: TreePath): Promise<string[]>;
|
|
178
266
|
//# sourceMappingURL=trees.d.ts.map
|
package/dist/src/trees.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"trees.d.ts","sourceRoot":"","sources":["../../src/trees.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH
|
|
1
|
+
{"version":3,"file":"trees.d.ts","sourceRoot":"","sources":["../../src/trees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