@elaraai/e3-cloud-cli 1.0.93 → 1.0.97
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 +23 -10
- package/dist/src/cli.js +15 -3
- package/dist/src/cli.js.map +1 -1
- package/dist/src/commands/files.d.ts +23 -6
- package/dist/src/commands/files.d.ts.map +1 -1
- package/dist/src/commands/files.js +173 -38
- package/dist/src/commands/files.js.map +1 -1
- package/dist/src/commands/release.d.ts.map +1 -1
- package/dist/src/commands/release.js +33 -15
- package/dist/src/commands/release.js.map +1 -1
- package/dist/src/files-local.d.ts +336 -30
- package/dist/src/files-local.d.ts.map +1 -1
- package/dist/src/files-local.js +187 -52
- package/dist/src/files-local.js.map +1 -1
- package/dist/src/files-push.d.ts +100 -0
- package/dist/src/files-push.d.ts.map +1 -0
- package/dist/src/files-push.js +387 -0
- package/dist/src/files-push.js.map +1 -0
- package/package.json +9 -9
|
@@ -2,24 +2,121 @@
|
|
|
2
2
|
* Copyright (c) 2025 Elara AI Pty Ltd
|
|
3
3
|
* Licensed under BSL 1.1. See LICENSE for details.
|
|
4
4
|
*/
|
|
5
|
-
import { ArrayType, DictType, OptionType, StringType, StructType, type ValueTypeOf } from '@elaraai/east';
|
|
6
|
-
import { type
|
|
5
|
+
import { ArrayType, DictType, IntegerType, OptionType, StringType, StructType, type ValueTypeOf } from '@elaraai/east';
|
|
6
|
+
import { type TaskRunner } from '@elaraai/e3-core';
|
|
7
|
+
import { type FilesBinding, type FilesManifest, type FilesProblem, type FilesPushPlan, type FilesStatus, type FilesSyncReport, type FilesTarget } from '@elaraai/e3-cloud-types';
|
|
7
8
|
import { type FilesLedger, type FilesReader } from '@elaraai/e3-cloud-files/sync';
|
|
9
|
+
import type { OfferedFile } from './files-push.js';
|
|
10
|
+
/** The version of the state file this CLI writes. */
|
|
11
|
+
export declare const LOCAL_FILES_VERSION = 2n;
|
|
8
12
|
/** What a local repository keeps of one workspace's Files. */
|
|
9
13
|
export declare const LocalFilesStateType: StructType<{
|
|
14
|
+
/** The state file's version: {@link LOCAL_FILES_VERSION} */
|
|
15
|
+
readonly version: IntegerType;
|
|
10
16
|
/** The declarations deployed to the workspace */
|
|
11
17
|
readonly manifest: OptionType<StructType<{
|
|
12
18
|
readonly sources: ArrayType<StringType>;
|
|
13
19
|
readonly mappings: ArrayType<StructType<{
|
|
14
|
-
readonly
|
|
20
|
+
readonly target: import("@elaraai/east").VariantType<{
|
|
21
|
+
readonly input: StringType;
|
|
22
|
+
readonly record: StringType;
|
|
23
|
+
readonly mutation: StructType<{
|
|
24
|
+
readonly record: StringType;
|
|
25
|
+
readonly mutation: StringType;
|
|
26
|
+
}>;
|
|
27
|
+
}>;
|
|
15
28
|
readonly source: StringType;
|
|
16
29
|
readonly shape: import("@elaraai/east").VariantType<{
|
|
17
30
|
readonly file: StructType<{
|
|
18
31
|
readonly key: StringType;
|
|
32
|
+
readonly type: OptionType<import("@elaraai/east").RecursiveType<import("@elaraai/east").VariantType<{
|
|
33
|
+
readonly Never: import("@elaraai/east").NullType;
|
|
34
|
+
readonly Null: import("@elaraai/east").NullType;
|
|
35
|
+
readonly Boolean: import("@elaraai/east").NullType;
|
|
36
|
+
readonly Integer: import("@elaraai/east").NullType;
|
|
37
|
+
readonly Float: import("@elaraai/east").NullType;
|
|
38
|
+
readonly String: import("@elaraai/east").NullType;
|
|
39
|
+
readonly DateTime: import("@elaraai/east").NullType;
|
|
40
|
+
readonly Blob: import("@elaraai/east").NullType;
|
|
41
|
+
readonly Ref: import("@elaraai/east").RecursiveTypeMarker;
|
|
42
|
+
readonly Array: import("@elaraai/east").RecursiveTypeMarker;
|
|
43
|
+
readonly Set: import("@elaraai/east").RecursiveTypeMarker;
|
|
44
|
+
readonly Dict: StructType<{
|
|
45
|
+
readonly key: import("@elaraai/east").RecursiveTypeMarker;
|
|
46
|
+
readonly value: import("@elaraai/east").RecursiveTypeMarker;
|
|
47
|
+
}>;
|
|
48
|
+
readonly Struct: ArrayType<StructType<{
|
|
49
|
+
readonly name: StringType;
|
|
50
|
+
readonly type: import("@elaraai/east").RecursiveTypeMarker;
|
|
51
|
+
}>>;
|
|
52
|
+
readonly Variant: ArrayType<StructType<{
|
|
53
|
+
readonly name: StringType;
|
|
54
|
+
readonly type: import("@elaraai/east").RecursiveTypeMarker;
|
|
55
|
+
}>>;
|
|
56
|
+
readonly Recursive: import("@elaraai/east").VariantType<{
|
|
57
|
+
readonly ref: IntegerType;
|
|
58
|
+
readonly wrapper: StructType<{
|
|
59
|
+
readonly id: IntegerType;
|
|
60
|
+
readonly inner: import("@elaraai/east").RecursiveTypeMarker;
|
|
61
|
+
}>;
|
|
62
|
+
}>;
|
|
63
|
+
readonly Function: StructType<{
|
|
64
|
+
readonly inputs: ArrayType<import("@elaraai/east").RecursiveTypeMarker>;
|
|
65
|
+
readonly output: import("@elaraai/east").RecursiveTypeMarker;
|
|
66
|
+
}>;
|
|
67
|
+
readonly AsyncFunction: StructType<{
|
|
68
|
+
readonly inputs: ArrayType<import("@elaraai/east").RecursiveTypeMarker>;
|
|
69
|
+
readonly output: import("@elaraai/east").RecursiveTypeMarker;
|
|
70
|
+
}>;
|
|
71
|
+
readonly Vector: import("@elaraai/east").RecursiveTypeMarker;
|
|
72
|
+
readonly Matrix: import("@elaraai/east").RecursiveTypeMarker;
|
|
73
|
+
}>>>;
|
|
19
74
|
}>;
|
|
20
75
|
readonly latest: StructType<{
|
|
21
76
|
readonly prefix: StringType;
|
|
22
77
|
readonly include: OptionType<StringType>;
|
|
78
|
+
readonly type: OptionType<import("@elaraai/east").RecursiveType<import("@elaraai/east").VariantType<{
|
|
79
|
+
readonly Never: import("@elaraai/east").NullType;
|
|
80
|
+
readonly Null: import("@elaraai/east").NullType;
|
|
81
|
+
readonly Boolean: import("@elaraai/east").NullType;
|
|
82
|
+
readonly Integer: import("@elaraai/east").NullType;
|
|
83
|
+
readonly Float: import("@elaraai/east").NullType;
|
|
84
|
+
readonly String: import("@elaraai/east").NullType;
|
|
85
|
+
readonly DateTime: import("@elaraai/east").NullType;
|
|
86
|
+
readonly Blob: import("@elaraai/east").NullType;
|
|
87
|
+
readonly Ref: import("@elaraai/east").RecursiveTypeMarker;
|
|
88
|
+
readonly Array: import("@elaraai/east").RecursiveTypeMarker;
|
|
89
|
+
readonly Set: import("@elaraai/east").RecursiveTypeMarker;
|
|
90
|
+
readonly Dict: StructType<{
|
|
91
|
+
readonly key: import("@elaraai/east").RecursiveTypeMarker;
|
|
92
|
+
readonly value: import("@elaraai/east").RecursiveTypeMarker;
|
|
93
|
+
}>;
|
|
94
|
+
readonly Struct: ArrayType<StructType<{
|
|
95
|
+
readonly name: StringType;
|
|
96
|
+
readonly type: import("@elaraai/east").RecursiveTypeMarker;
|
|
97
|
+
}>>;
|
|
98
|
+
readonly Variant: ArrayType<StructType<{
|
|
99
|
+
readonly name: StringType;
|
|
100
|
+
readonly type: import("@elaraai/east").RecursiveTypeMarker;
|
|
101
|
+
}>>;
|
|
102
|
+
readonly Recursive: import("@elaraai/east").VariantType<{
|
|
103
|
+
readonly ref: IntegerType;
|
|
104
|
+
readonly wrapper: StructType<{
|
|
105
|
+
readonly id: IntegerType;
|
|
106
|
+
readonly inner: import("@elaraai/east").RecursiveTypeMarker;
|
|
107
|
+
}>;
|
|
108
|
+
}>;
|
|
109
|
+
readonly Function: StructType<{
|
|
110
|
+
readonly inputs: ArrayType<import("@elaraai/east").RecursiveTypeMarker>;
|
|
111
|
+
readonly output: import("@elaraai/east").RecursiveTypeMarker;
|
|
112
|
+
}>;
|
|
113
|
+
readonly AsyncFunction: StructType<{
|
|
114
|
+
readonly inputs: ArrayType<import("@elaraai/east").RecursiveTypeMarker>;
|
|
115
|
+
readonly output: import("@elaraai/east").RecursiveTypeMarker;
|
|
116
|
+
}>;
|
|
117
|
+
readonly Vector: import("@elaraai/east").RecursiveTypeMarker;
|
|
118
|
+
readonly Matrix: import("@elaraai/east").RecursiveTypeMarker;
|
|
119
|
+
}>>>;
|
|
23
120
|
}>;
|
|
24
121
|
readonly folder: StructType<{
|
|
25
122
|
readonly prefix: StringType;
|
|
@@ -38,16 +135,26 @@ export declare const LocalFilesStateType: StructType<{
|
|
|
38
135
|
readonly url: StringType;
|
|
39
136
|
readonly region: OptionType<StringType>;
|
|
40
137
|
readonly profile: OptionType<StringType>;
|
|
41
|
-
readonly latest: OptionType<
|
|
138
|
+
readonly latest: OptionType<IntegerType>;
|
|
42
139
|
}>>;
|
|
43
|
-
/** What each
|
|
140
|
+
/** What each target took last, by its ledger key */
|
|
44
141
|
readonly ledgers: DictType<StringType, StructType<{
|
|
45
142
|
readonly entries: DictType<StringType, StructType<{
|
|
46
143
|
readonly etag: StringType;
|
|
47
|
-
readonly size:
|
|
144
|
+
readonly size: IntegerType;
|
|
145
|
+
readonly sha256: OptionType<StringType>;
|
|
146
|
+
readonly modified: OptionType<import("@elaraai/east").DateTimeType>;
|
|
48
147
|
}>>;
|
|
49
148
|
readonly value: OptionType<StringType>;
|
|
50
149
|
readonly under: OptionType<StringType>;
|
|
150
|
+
readonly commit: OptionType<StringType>;
|
|
151
|
+
readonly tried: OptionType<StringType>;
|
|
152
|
+
readonly taking: OptionType<StructType<{
|
|
153
|
+
readonly key: StringType;
|
|
154
|
+
readonly etag: StringType;
|
|
155
|
+
readonly sha256: OptionType<StringType>;
|
|
156
|
+
readonly staging: OptionType<StringType>;
|
|
157
|
+
}>>;
|
|
51
158
|
}>>;
|
|
52
159
|
/** The last sync's report; a dry run's is never kept */
|
|
53
160
|
readonly lastSync: OptionType<StructType<{
|
|
@@ -55,17 +162,180 @@ export declare const LocalFilesStateType: StructType<{
|
|
|
55
162
|
readonly finished: import("@elaraai/east").DateTimeType;
|
|
56
163
|
readonly dryRun: import("@elaraai/east").BooleanType;
|
|
57
164
|
readonly mappings: ArrayType<StructType<{
|
|
58
|
-
readonly
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
165
|
+
readonly target: import("@elaraai/east").VariantType<{
|
|
166
|
+
readonly input: StringType;
|
|
167
|
+
readonly record: StringType;
|
|
168
|
+
readonly mutation: StructType<{
|
|
169
|
+
readonly record: StringType;
|
|
170
|
+
readonly mutation: StringType;
|
|
171
|
+
}>;
|
|
172
|
+
}>;
|
|
173
|
+
readonly added: IntegerType;
|
|
174
|
+
readonly changed: IntegerType;
|
|
175
|
+
readonly removed: IntegerType;
|
|
176
|
+
readonly unchanged: IntegerType;
|
|
63
177
|
readonly refused: ArrayType<StructType<{
|
|
64
178
|
readonly key: StringType;
|
|
65
|
-
readonly reason:
|
|
179
|
+
readonly reason: import("@elaraai/east").VariantType<{
|
|
180
|
+
readonly too_large: StructType<{
|
|
181
|
+
readonly size: IntegerType;
|
|
182
|
+
readonly limit: IntegerType;
|
|
183
|
+
}>;
|
|
184
|
+
readonly segment_too_large: StructType<{
|
|
185
|
+
readonly bytes: IntegerType;
|
|
186
|
+
readonly limit: IntegerType;
|
|
187
|
+
}>;
|
|
188
|
+
readonly unreadable: StringType;
|
|
189
|
+
readonly not_beast2: StringType;
|
|
190
|
+
readonly type_mismatch: StructType<{
|
|
191
|
+
readonly expected: import("@elaraai/east").RecursiveType<import("@elaraai/east").VariantType<{
|
|
192
|
+
readonly Never: import("@elaraai/east").NullType;
|
|
193
|
+
readonly Null: import("@elaraai/east").NullType;
|
|
194
|
+
readonly Boolean: import("@elaraai/east").NullType;
|
|
195
|
+
readonly Integer: import("@elaraai/east").NullType;
|
|
196
|
+
readonly Float: import("@elaraai/east").NullType;
|
|
197
|
+
readonly String: import("@elaraai/east").NullType;
|
|
198
|
+
readonly DateTime: import("@elaraai/east").NullType;
|
|
199
|
+
readonly Blob: import("@elaraai/east").NullType;
|
|
200
|
+
readonly Ref: import("@elaraai/east").RecursiveTypeMarker;
|
|
201
|
+
readonly Array: import("@elaraai/east").RecursiveTypeMarker;
|
|
202
|
+
readonly Set: import("@elaraai/east").RecursiveTypeMarker;
|
|
203
|
+
readonly Dict: StructType<{
|
|
204
|
+
readonly key: import("@elaraai/east").RecursiveTypeMarker;
|
|
205
|
+
readonly value: import("@elaraai/east").RecursiveTypeMarker;
|
|
206
|
+
}>;
|
|
207
|
+
readonly Struct: ArrayType<StructType<{
|
|
208
|
+
readonly name: StringType;
|
|
209
|
+
readonly type: import("@elaraai/east").RecursiveTypeMarker;
|
|
210
|
+
}>>;
|
|
211
|
+
readonly Variant: ArrayType<StructType<{
|
|
212
|
+
readonly name: StringType;
|
|
213
|
+
readonly type: import("@elaraai/east").RecursiveTypeMarker;
|
|
214
|
+
}>>;
|
|
215
|
+
readonly Recursive: import("@elaraai/east").VariantType<{
|
|
216
|
+
readonly ref: IntegerType;
|
|
217
|
+
readonly wrapper: StructType<{
|
|
218
|
+
readonly id: IntegerType;
|
|
219
|
+
readonly inner: import("@elaraai/east").RecursiveTypeMarker;
|
|
220
|
+
}>;
|
|
221
|
+
}>;
|
|
222
|
+
readonly Function: StructType<{
|
|
223
|
+
readonly inputs: ArrayType<import("@elaraai/east").RecursiveTypeMarker>;
|
|
224
|
+
readonly output: import("@elaraai/east").RecursiveTypeMarker;
|
|
225
|
+
}>;
|
|
226
|
+
readonly AsyncFunction: StructType<{
|
|
227
|
+
readonly inputs: ArrayType<import("@elaraai/east").RecursiveTypeMarker>;
|
|
228
|
+
readonly output: import("@elaraai/east").RecursiveTypeMarker;
|
|
229
|
+
}>;
|
|
230
|
+
readonly Vector: import("@elaraai/east").RecursiveTypeMarker;
|
|
231
|
+
readonly Matrix: import("@elaraai/east").RecursiveTypeMarker;
|
|
232
|
+
}>>;
|
|
233
|
+
readonly actual: import("@elaraai/east").RecursiveType<import("@elaraai/east").VariantType<{
|
|
234
|
+
readonly Never: import("@elaraai/east").NullType;
|
|
235
|
+
readonly Null: import("@elaraai/east").NullType;
|
|
236
|
+
readonly Boolean: import("@elaraai/east").NullType;
|
|
237
|
+
readonly Integer: import("@elaraai/east").NullType;
|
|
238
|
+
readonly Float: import("@elaraai/east").NullType;
|
|
239
|
+
readonly String: import("@elaraai/east").NullType;
|
|
240
|
+
readonly DateTime: import("@elaraai/east").NullType;
|
|
241
|
+
readonly Blob: import("@elaraai/east").NullType;
|
|
242
|
+
readonly Ref: import("@elaraai/east").RecursiveTypeMarker;
|
|
243
|
+
readonly Array: import("@elaraai/east").RecursiveTypeMarker;
|
|
244
|
+
readonly Set: import("@elaraai/east").RecursiveTypeMarker;
|
|
245
|
+
readonly Dict: StructType<{
|
|
246
|
+
readonly key: import("@elaraai/east").RecursiveTypeMarker;
|
|
247
|
+
readonly value: import("@elaraai/east").RecursiveTypeMarker;
|
|
248
|
+
}>;
|
|
249
|
+
readonly Struct: ArrayType<StructType<{
|
|
250
|
+
readonly name: StringType;
|
|
251
|
+
readonly type: import("@elaraai/east").RecursiveTypeMarker;
|
|
252
|
+
}>>;
|
|
253
|
+
readonly Variant: ArrayType<StructType<{
|
|
254
|
+
readonly name: StringType;
|
|
255
|
+
readonly type: import("@elaraai/east").RecursiveTypeMarker;
|
|
256
|
+
}>>;
|
|
257
|
+
readonly Recursive: import("@elaraai/east").VariantType<{
|
|
258
|
+
readonly ref: IntegerType;
|
|
259
|
+
readonly wrapper: StructType<{
|
|
260
|
+
readonly id: IntegerType;
|
|
261
|
+
readonly inner: import("@elaraai/east").RecursiveTypeMarker;
|
|
262
|
+
}>;
|
|
263
|
+
}>;
|
|
264
|
+
readonly Function: StructType<{
|
|
265
|
+
readonly inputs: ArrayType<import("@elaraai/east").RecursiveTypeMarker>;
|
|
266
|
+
readonly output: import("@elaraai/east").RecursiveTypeMarker;
|
|
267
|
+
}>;
|
|
268
|
+
readonly AsyncFunction: StructType<{
|
|
269
|
+
readonly inputs: ArrayType<import("@elaraai/east").RecursiveTypeMarker>;
|
|
270
|
+
readonly output: import("@elaraai/east").RecursiveTypeMarker;
|
|
271
|
+
}>;
|
|
272
|
+
readonly Vector: import("@elaraai/east").RecursiveTypeMarker;
|
|
273
|
+
readonly Matrix: import("@elaraai/east").RecursiveTypeMarker;
|
|
274
|
+
}>>;
|
|
275
|
+
}>;
|
|
276
|
+
readonly mutation: StructType<{
|
|
277
|
+
readonly outcome: StringType;
|
|
278
|
+
readonly message: StringType;
|
|
279
|
+
}>;
|
|
280
|
+
readonly missing: StringType;
|
|
281
|
+
readonly other: StringType;
|
|
282
|
+
}>;
|
|
66
283
|
}>>;
|
|
67
|
-
readonly bytes:
|
|
284
|
+
readonly bytes: IntegerType;
|
|
68
285
|
readonly updated: import("@elaraai/east").BooleanType;
|
|
286
|
+
readonly taken: OptionType<StructType<{
|
|
287
|
+
readonly key: StringType;
|
|
288
|
+
readonly type: import("@elaraai/east").RecursiveType<import("@elaraai/east").VariantType<{
|
|
289
|
+
readonly Never: import("@elaraai/east").NullType;
|
|
290
|
+
readonly Null: import("@elaraai/east").NullType;
|
|
291
|
+
readonly Boolean: import("@elaraai/east").NullType;
|
|
292
|
+
readonly Integer: import("@elaraai/east").NullType;
|
|
293
|
+
readonly Float: import("@elaraai/east").NullType;
|
|
294
|
+
readonly String: import("@elaraai/east").NullType;
|
|
295
|
+
readonly DateTime: import("@elaraai/east").NullType;
|
|
296
|
+
readonly Blob: import("@elaraai/east").NullType;
|
|
297
|
+
readonly Ref: import("@elaraai/east").RecursiveTypeMarker;
|
|
298
|
+
readonly Array: import("@elaraai/east").RecursiveTypeMarker;
|
|
299
|
+
readonly Set: import("@elaraai/east").RecursiveTypeMarker;
|
|
300
|
+
readonly Dict: StructType<{
|
|
301
|
+
readonly key: import("@elaraai/east").RecursiveTypeMarker;
|
|
302
|
+
readonly value: import("@elaraai/east").RecursiveTypeMarker;
|
|
303
|
+
}>;
|
|
304
|
+
readonly Struct: ArrayType<StructType<{
|
|
305
|
+
readonly name: StringType;
|
|
306
|
+
readonly type: import("@elaraai/east").RecursiveTypeMarker;
|
|
307
|
+
}>>;
|
|
308
|
+
readonly Variant: ArrayType<StructType<{
|
|
309
|
+
readonly name: StringType;
|
|
310
|
+
readonly type: import("@elaraai/east").RecursiveTypeMarker;
|
|
311
|
+
}>>;
|
|
312
|
+
readonly Recursive: import("@elaraai/east").VariantType<{
|
|
313
|
+
readonly ref: IntegerType;
|
|
314
|
+
readonly wrapper: StructType<{
|
|
315
|
+
readonly id: IntegerType;
|
|
316
|
+
readonly inner: import("@elaraai/east").RecursiveTypeMarker;
|
|
317
|
+
}>;
|
|
318
|
+
}>;
|
|
319
|
+
readonly Function: StructType<{
|
|
320
|
+
readonly inputs: ArrayType<import("@elaraai/east").RecursiveTypeMarker>;
|
|
321
|
+
readonly output: import("@elaraai/east").RecursiveTypeMarker;
|
|
322
|
+
}>;
|
|
323
|
+
readonly AsyncFunction: StructType<{
|
|
324
|
+
readonly inputs: ArrayType<import("@elaraai/east").RecursiveTypeMarker>;
|
|
325
|
+
readonly output: import("@elaraai/east").RecursiveTypeMarker;
|
|
326
|
+
}>;
|
|
327
|
+
readonly Vector: import("@elaraai/east").RecursiveTypeMarker;
|
|
328
|
+
readonly Matrix: import("@elaraai/east").RecursiveTypeMarker;
|
|
329
|
+
}>>;
|
|
330
|
+
readonly rows: OptionType<IntegerType>;
|
|
331
|
+
readonly how: import("@elaraai/east").VariantType<{
|
|
332
|
+
readonly carried: import("@elaraai/east").NullType;
|
|
333
|
+
readonly split: import("@elaraai/east").NullType;
|
|
334
|
+
}>;
|
|
335
|
+
}>>;
|
|
336
|
+
readonly commit: OptionType<StringType>;
|
|
337
|
+
readonly kept: OptionType<StringType>;
|
|
338
|
+
readonly waiting: OptionType<StringType>;
|
|
69
339
|
}>>;
|
|
70
340
|
}>>;
|
|
71
341
|
}>;
|
|
@@ -85,11 +355,11 @@ export declare function openLocalRepository(repoArg: string): Promise<string>;
|
|
|
85
355
|
* @throws {Error} When the name is no workspace's
|
|
86
356
|
*/
|
|
87
357
|
export declare function statePath(repoPath: string, ws: string): string;
|
|
88
|
-
/** What a repository keeps of a workspace's Files: nothing yet, before its first deploy. */
|
|
358
|
+
/** What a repository keeps of a workspace's Files: nothing yet, before its first deploy; a first-version file lifted. */
|
|
89
359
|
export declare function readState(repoPath: string, ws: string): LocalFilesState;
|
|
90
360
|
/** Keeps a workspace's Files, replacing the file whole so a reader never sees half of it. */
|
|
91
361
|
export declare function writeState(repoPath: string, ws: string, state: LocalFilesState): void;
|
|
92
|
-
/** The ledger over the repository's file: each write keeps what
|
|
362
|
+
/** The ledger over the repository's file: each write keeps what a target took the moment it is written. */
|
|
93
363
|
export declare function stateLedger(repoPath: string, ws: string): FilesLedger;
|
|
94
364
|
/**
|
|
95
365
|
* Reads each bound source's bucket with the developer's credentials: the
|
|
@@ -109,18 +379,18 @@ export interface LocalDeployResult {
|
|
|
109
379
|
};
|
|
110
380
|
/** Why the declarations do not fit it; none when they were deployed */
|
|
111
381
|
readonly problems: readonly FilesProblem[];
|
|
112
|
-
/** The
|
|
113
|
-
readonly retaken: readonly
|
|
382
|
+
/** The targets whose declaration changed, which the next sync takes again whole */
|
|
383
|
+
readonly retaken: readonly FilesTarget[];
|
|
114
384
|
}
|
|
115
385
|
/**
|
|
116
386
|
* Deploys declarations to a workspace, checked against the package it runs.
|
|
117
|
-
*
|
|
387
|
+
* A target whose declaration changed is taken again whole by the next sync.
|
|
118
388
|
*
|
|
119
389
|
* @param repoPath - The repository ({@link openLocalRepository})
|
|
120
390
|
* @param ws - The workspace
|
|
121
391
|
* @param manifest - The declarations
|
|
122
392
|
* @param options - `dryRun`: check them, and keep nothing
|
|
123
|
-
* @returns The package, every problem, and the
|
|
393
|
+
* @returns The package, every problem, and the targets taken again
|
|
124
394
|
*/
|
|
125
395
|
export declare function deployLocal(repoPath: string, ws: string, manifest: FilesManifest, options?: {
|
|
126
396
|
dryRun?: boolean;
|
|
@@ -129,48 +399,84 @@ export declare function deployLocal(repoPath: string, ws: string, manifest: File
|
|
|
129
399
|
export interface LocalBindResult {
|
|
130
400
|
/** Why the binding does not fit the declarations; none when it was kept */
|
|
131
401
|
readonly problems: readonly FilesProblem[];
|
|
132
|
-
/** The
|
|
133
|
-
readonly retaken: readonly
|
|
402
|
+
/** The targets the source fills, which the next sync takes again whole when the binding moved */
|
|
403
|
+
readonly retaken: readonly FilesTarget[];
|
|
134
404
|
}
|
|
135
405
|
/**
|
|
136
406
|
* Binds a source to where its files are, for a workspace. A binding moved to
|
|
137
|
-
* another URL has its
|
|
407
|
+
* another URL has its targets taken again whole by the next sync.
|
|
138
408
|
*
|
|
139
409
|
* @param repoPath - The repository
|
|
140
410
|
* @param ws - The workspace
|
|
141
411
|
* @param binding - The binding
|
|
142
|
-
* @returns Every problem, and the
|
|
412
|
+
* @returns Every problem, and the targets taken again
|
|
143
413
|
* @throws {Error} When the workspace has no declarations deployed
|
|
144
414
|
*/
|
|
145
415
|
export declare function bindLocal(repoPath: string, ws: string, binding: FilesBinding): LocalBindResult;
|
|
146
416
|
/** What a local sync is given. */
|
|
147
417
|
export interface LocalSyncOptions {
|
|
148
|
-
/** Only these
|
|
149
|
-
readonly
|
|
418
|
+
/** Only these targets; every declared target when absent */
|
|
419
|
+
readonly targets?: readonly FilesTarget[];
|
|
420
|
+
/** Records whose file is taken as their state again, whatever has mutated them since their seed */
|
|
421
|
+
readonly reset?: readonly string[];
|
|
150
422
|
/** List what a sync would take, and take nothing */
|
|
151
423
|
readonly dryRun?: boolean;
|
|
152
424
|
/** Reads a bound source: its bucket, with the developer's credentials, when absent ({@link s3Readers}) */
|
|
153
425
|
readonly reader?: (binding: FilesBinding) => FilesReader;
|
|
426
|
+
/** The runner that takes a typed collection in and runs a fed mutation: this machine's, when absent */
|
|
427
|
+
readonly runner?: TaskRunner;
|
|
154
428
|
}
|
|
155
429
|
/**
|
|
156
|
-
* Syncs a workspace's
|
|
430
|
+
* Syncs a workspace's targets with their sources' files. The declarations are
|
|
157
431
|
* checked again first, against the package the workspace runs now.
|
|
158
432
|
*
|
|
159
433
|
* @param repoPath - The repository
|
|
160
434
|
* @param ws - The workspace
|
|
161
|
-
* @param options - Which
|
|
162
|
-
* @returns What it did, per
|
|
435
|
+
* @param options - Which targets, whether a dry run, the reader and the runner
|
|
436
|
+
* @returns What it did, per target
|
|
163
437
|
* @throws {FilesSyncError} When the declarations no longer fit the package, or
|
|
164
438
|
* a source is not bound, before anything is read
|
|
165
439
|
* @throws {Error} When the workspace has no declarations deployed
|
|
166
440
|
*/
|
|
167
441
|
export declare function syncLocal(repoPath: string, ws: string, options?: LocalSyncOptions): Promise<FilesSyncReport>;
|
|
168
442
|
/**
|
|
169
|
-
* A workspace's Files: its declarations, its bindings
|
|
443
|
+
* A workspace's Files: its declarations, its bindings, its last sync, and
|
|
444
|
+
* what each mapping holds (a pending record among them).
|
|
170
445
|
*
|
|
171
446
|
* @param repoPath - The repository
|
|
172
447
|
* @param ws - The workspace
|
|
173
448
|
* @returns Its status
|
|
174
449
|
*/
|
|
175
|
-
export declare function statusLocal(repoPath: string, ws: string): FilesStatus
|
|
450
|
+
export declare function statusLocal(repoPath: string, ws: string): Promise<FilesStatus>;
|
|
451
|
+
/** What a local push is given. */
|
|
452
|
+
export interface LocalPushOptions {
|
|
453
|
+
/** The target every file is for; null to match each by its name */
|
|
454
|
+
readonly as?: string;
|
|
455
|
+
/** Records whose file is taken as their state again */
|
|
456
|
+
readonly reset?: readonly string[];
|
|
457
|
+
/** Plan, and put nothing */
|
|
458
|
+
readonly dryRun?: boolean;
|
|
459
|
+
/** The profile to put with, over each binding's */
|
|
460
|
+
readonly profile?: string;
|
|
461
|
+
/** Reads a bound source, when not its bucket with the developer's credentials ({@link s3Readers}) */
|
|
462
|
+
readonly reader?: (binding: FilesBinding) => FilesReader;
|
|
463
|
+
/** Puts a file to a binding, when not through the developer's credentials (a test's) */
|
|
464
|
+
readonly put?: (binding: FilesBinding, key: string, file: OfferedFile) => Promise<void>;
|
|
465
|
+
/** The runner that takes a typed collection in and runs a fed mutation */
|
|
466
|
+
readonly runner?: TaskRunner;
|
|
467
|
+
}
|
|
468
|
+
/**
|
|
469
|
+
* Plans a push on a local repository: the same plan a deployed workspace's
|
|
470
|
+
* route makes, over the repository's declarations, bindings and ledgers,
|
|
471
|
+
* a `latest` prefix listed and a key read through the developer's own
|
|
472
|
+
* credentials; every put is the client's own (`external`).
|
|
473
|
+
*
|
|
474
|
+
* @param repoPath - The repository
|
|
475
|
+
* @param ws - The workspace
|
|
476
|
+
* @param files - The files offered
|
|
477
|
+
* @param options - The target named, and the reader
|
|
478
|
+
* @returns The plan, as the route answers one
|
|
479
|
+
* @throws {Error} When the workspace has no declarations deployed
|
|
480
|
+
*/
|
|
481
|
+
export declare function planLocal(repoPath: string, ws: string, files: readonly OfferedFile[], options?: Pick<LocalPushOptions, 'as' | 'reader'>): Promise<FilesPushPlan>;
|
|
176
482
|
//# sourceMappingURL=files-local.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"files-local.d.ts","sourceRoot":"","sources":["../../src/files-local.ts"],"names":[],"mappings":"AAAA;;;GAGG;
|
|
1
|
+
{"version":3,"file":"files-local.d.ts","sourceRoot":"","sources":["../../src/files-local.ts"],"names":[],"mappings":"AAAA;;;GAGG;AA2BH,OAAO,EACL,SAAS,EAAE,QAAQ,EAAE,WAAW,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU,EACP,KAAK,WAAW,EAC9E,MAAM,eAAe,CAAC;AACvB,OAAO,EAAwG,KAAK,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAEzJ,OAAO,EAEL,KAAK,YAAY,EAAE,KAAK,aAAa,EAA2B,KAAK,YAAY,EAAE,KAAK,aAAa,EAAE,KAAK,WAAW,EAAE,KAAK,eAAe,EAAE,KAAK,WAAW,EAChK,MAAM,yBAAyB,CAAC;AAKjC,OAAO,EAAmH,KAAK,WAAW,EAAE,KAAK,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAEnM,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAInD,qDAAqD;AACrD,eAAO,MAAM,mBAAmB,KAAK,CAAC;AAEtC,8DAA8D;AAC9D,eAAO,MAAM,mBAAmB;IAC9B,4DAA4D;;IAE5D,iDAAiD;;;;;;;;;;;;;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