@elaraai/e3-cloud-cli 1.1.18 → 1.1.20
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 +92 -4
- package/dist/src/app-source.d.ts +184 -11
- package/dist/src/app-source.d.ts.map +1 -1
- package/dist/src/app-source.js +302 -0
- package/dist/src/app-source.js.map +1 -1
- package/dist/src/cli.js +13 -2
- package/dist/src/cli.js.map +1 -1
- package/dist/src/commands/app.d.ts +9 -2
- package/dist/src/commands/app.d.ts.map +1 -1
- package/dist/src/commands/app.js +674 -38
- package/dist/src/commands/app.js.map +1 -1
- package/dist/src/commands/release.d.ts.map +1 -1
- package/dist/src/commands/release.js +53 -19
- package/dist/src/commands/release.js.map +1 -1
- package/dist/src/package-compare.d.ts +139 -0
- package/dist/src/package-compare.d.ts.map +1 -0
- package/dist/src/package-compare.js +422 -0
- package/dist/src/package-compare.js.map +1 -0
- package/package.json +9 -9
|
@@ -0,0 +1,422 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2025 Elara AI Pty Ltd
|
|
3
|
+
* Licensed under BSL 1.1. See LICENSE for details.
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* Whether an app built from its source may be bound to the package its
|
|
7
|
+
* workspace runs (`--against-workspace`), and what of the two packages
|
|
8
|
+
* differs ({@link bindingDecision}).
|
|
9
|
+
*
|
|
10
|
+
* - **An app with an indexed read is never bound.** A page that reads a
|
|
11
|
+
* record through indexes (`Data.bindPaged(record, { indexes })`, e3-ui's
|
|
12
|
+
* `data_bind_indexed` call) carries the record's index programs from its
|
|
13
|
+
* own source: each index's key function and e3's maintenance programs.
|
|
14
|
+
* Nothing shows they are the workspace's: e3's compiled programs carry
|
|
15
|
+
* where their source was compiled ({@link indexedReads}). The platform's
|
|
16
|
+
* checks don't read such a call, so this is the one guard for it, and it
|
|
17
|
+
* fails closed: east-ui's record Slice over such a read counts as one, and
|
|
18
|
+
* a bind of the workspace (e3-ui's data, record, function and decision
|
|
19
|
+
* families) this module doesn't know refuses too ({@link unknownBinds}).
|
|
20
|
+
* A page-local bind (east-ui's `State.bind`, `Slice.bind`) binds nothing of
|
|
21
|
+
* the workspace and is no matter here.
|
|
22
|
+
* - **What the app's pages bind is held to the held package's names and
|
|
23
|
+
* types** by the checks the platform runs at its deploy: `checkApp` of
|
|
24
|
+
* `@elaraai/e3-cloud-ui/check`, against the held package's view. So the
|
|
25
|
+
* CLI refuses in the platform's words what the platform would refuse.
|
|
26
|
+
* - **Anything else that differs is printed, and allowed**
|
|
27
|
+
* ({@link comparePackages}): a dataset, a record's index or mutation, a
|
|
28
|
+
* function or a task that no page binds, whose type e3 or east-ui itself may
|
|
29
|
+
* have changed between releases (a ui() task's `UIComponentType`, the span
|
|
30
|
+
* index e3 generates beside a nested series index); code; a record's
|
|
31
|
+
* programs; initial values; the inputs taken from files.
|
|
32
|
+
* - **A `Page.task` page whose task's output the two type otherwise is
|
|
33
|
+
* named.** The checks hold a task page to its task and its UI role alone,
|
|
34
|
+
* so it is bound; after the platform's move it shows output computed in the
|
|
35
|
+
* held package's type ({@link BindingDecision.taskPages}).
|
|
36
|
+
*
|
|
37
|
+
* Types are compared by their structure, as the checks compare them, never by
|
|
38
|
+
* the ids an export gave recursive types.
|
|
39
|
+
*/
|
|
40
|
+
import { StringType, compareFor, constValueOf, equalFor, isValueOf, variant, walkIR } from '@elaraai/east';
|
|
41
|
+
import { PackageObjectType, decodeFunctionObject, decodeMutationObject, decodePackageObject, decodeRecordIndexObject, decodeRecordObject, decodeTaskObject, pathToString, TreePathType, } from '@elaraai/e3-types';
|
|
42
|
+
import { iterateZipEntries, openZip } from '@elaraai/e3-core';
|
|
43
|
+
import * as ownChecks from '@elaraai/e3-cloud-ui/check';
|
|
44
|
+
import { typeListsEqual, typeValuesEqual } from '@elaraai/e3-cloud-ui/check';
|
|
45
|
+
/** e3-ui's platform function for a record read through indexes (`Data.bindPaged(record, { indexes })`). */
|
|
46
|
+
const DATA_BIND_INDEXED = 'data_bind_indexed';
|
|
47
|
+
/**
|
|
48
|
+
* The calls of an indexed read beside its bind:
|
|
49
|
+
* - e3-ui's on a handle read through indexes (`data_indexed_page`,
|
|
50
|
+
* `data_indexed_seek`, …);
|
|
51
|
+
* - east-ui's record Slice (`Slice.bindRecord`, `slice_bind_record`) and
|
|
52
|
+
* its operations (`slice_record_read`, …). Its source must be
|
|
53
|
+
* `Data.bindPaged(record, { indexes })` (east-ui `platform/slice/record.js`,
|
|
54
|
+
* `bindRecord`): the handle, its maintenance programs and copies among it,
|
|
55
|
+
* is the call's second argument, and its reads go through the record's
|
|
56
|
+
* indexes.
|
|
57
|
+
*/
|
|
58
|
+
const INDEXED_CALL = /^data_indexed_|^slice_bind_record$|^slice_record_/;
|
|
59
|
+
/**
|
|
60
|
+
* A bind of the workspace: e3-ui's families of data, records, functions and
|
|
61
|
+
* decisions (`data_bind`, `record_bind`, `function_bind`, `decision_bind`,
|
|
62
|
+
* and any other of theirs naming a bind). east-ui's binds (`state_bind`, a
|
|
63
|
+
* value kept in the browser; `slice_bind`, a narrowing of rows the page
|
|
64
|
+
* already holds) bind nothing of the workspace, so are no part of it.
|
|
65
|
+
*/
|
|
66
|
+
const WORKSPACE_BIND = /^(?:data|record|function|decision)_(?:\w+_)?bind(?:_\w+)?$/;
|
|
67
|
+
/**
|
|
68
|
+
* The binds of the workspace whose bindings this CLI knows the platform's
|
|
69
|
+
* checks hold, or that carry no program: `Data.bind`, `Data.bindPaged` with
|
|
70
|
+
* no indexes and pinned, `Func.bind`, `Record.bind` (names and types alone),
|
|
71
|
+
* and `Decision.bind` (resolved through `Data.bind` handles, which are
|
|
72
|
+
* checked).
|
|
73
|
+
*/
|
|
74
|
+
const KNOWN_BINDS = new Set(['data_bind', 'data_bind_paged', 'data_bind_paged_pinned', 'function_bind', 'record_bind', 'decision_bind']);
|
|
75
|
+
const sameHash = equalFor(StringType);
|
|
76
|
+
const byName = compareFor(StringType);
|
|
77
|
+
/** The platform calls of a page's IR, by name, each with its arguments. */
|
|
78
|
+
function platformCalls(body, visit) {
|
|
79
|
+
walkIR(body, (node) => {
|
|
80
|
+
if (node.type !== 'Platform')
|
|
81
|
+
return;
|
|
82
|
+
const { name, arguments: args } = node.value;
|
|
83
|
+
visit(name, args);
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* The pages of an app that read a record through indexes, each with the
|
|
88
|
+
* records it reads so: every `data_bind_indexed` call in a page's IR, whose
|
|
89
|
+
* sixth argument is the record's name (and first its path). A task's page
|
|
90
|
+
* reads what its task's output holds, which is the workspace's own.
|
|
91
|
+
*
|
|
92
|
+
* @param app - The app, as built
|
|
93
|
+
* @returns Its pages with an indexed read, in its order; none for an app without
|
|
94
|
+
*/
|
|
95
|
+
export function indexedReads(app) {
|
|
96
|
+
const reads = [];
|
|
97
|
+
for (const page of app.pages) {
|
|
98
|
+
if (page.body.type !== 'east')
|
|
99
|
+
continue;
|
|
100
|
+
const records = new Set();
|
|
101
|
+
platformCalls(page.body.value, (name, args) => {
|
|
102
|
+
if (sameHash(name, DATA_BIND_INDEXED))
|
|
103
|
+
records.add(recordOf(args));
|
|
104
|
+
// A call on an indexed handle, or a record Slice over one, whose bind this walk didn't see: still an indexed read
|
|
105
|
+
else if (INDEXED_CALL.test(name))
|
|
106
|
+
records.add('a record');
|
|
107
|
+
});
|
|
108
|
+
if (records.size > 1)
|
|
109
|
+
records.delete('a record');
|
|
110
|
+
if (records.size > 0)
|
|
111
|
+
reads.push({ page: page.name, records: [...records].sort(byName) });
|
|
112
|
+
}
|
|
113
|
+
return reads;
|
|
114
|
+
}
|
|
115
|
+
/**
|
|
116
|
+
* The pages of an app that call a bind of the workspace this CLI doesn't
|
|
117
|
+
* know: one of e3-ui's data, record, function or decision families naming a
|
|
118
|
+
* bind, other than the known ones and the indexed read; a newer e3-ui's,
|
|
119
|
+
* say. Such a bind may carry programs from its own source, as the indexed
|
|
120
|
+
* read does, which nothing here can show to be the workspace's: it refuses
|
|
121
|
+
* the binding, as an indexed read does. A page-local bind is no part of it.
|
|
122
|
+
*
|
|
123
|
+
* @param app - The app, as built
|
|
124
|
+
* @returns Its pages with such a call, in its order; none for an app without
|
|
125
|
+
*/
|
|
126
|
+
export function unknownBinds(app) {
|
|
127
|
+
const found = [];
|
|
128
|
+
for (const page of app.pages) {
|
|
129
|
+
if (page.body.type !== 'east')
|
|
130
|
+
continue;
|
|
131
|
+
const calls = new Set();
|
|
132
|
+
platformCalls(page.body.value, (name) => {
|
|
133
|
+
if (WORKSPACE_BIND.test(name) && !KNOWN_BINDS.has(name) && !sameHash(name, DATA_BIND_INDEXED))
|
|
134
|
+
calls.add(name);
|
|
135
|
+
});
|
|
136
|
+
if (calls.size > 0)
|
|
137
|
+
found.push({ page: page.name, calls: [...calls].sort(byName) });
|
|
138
|
+
}
|
|
139
|
+
return found;
|
|
140
|
+
}
|
|
141
|
+
/** The record an indexed read reads: its name, else its path, else that it is unknown. */
|
|
142
|
+
function recordOf(args) {
|
|
143
|
+
for (const [at, words] of [[5, (v) => (isValueOf(v, StringType) ? v : null)], [0, pathWords]]) {
|
|
144
|
+
try {
|
|
145
|
+
const value = words(constValueOf(args[at]));
|
|
146
|
+
if (value !== null)
|
|
147
|
+
return value;
|
|
148
|
+
}
|
|
149
|
+
catch {
|
|
150
|
+
// not a constant: the next
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
return 'a record';
|
|
154
|
+
}
|
|
155
|
+
/** A tree path's constant, in e3's words: `.records.orders`; null for what is no path. */
|
|
156
|
+
function pathWords(value) {
|
|
157
|
+
return isValueOf(value, TreePathType) ? pathToString(value) : null;
|
|
158
|
+
}
|
|
159
|
+
/** Two lists of names, as sets: whether they hold the same names. */
|
|
160
|
+
function sameNameSet(a, b) {
|
|
161
|
+
const x = [...a].sort(byName);
|
|
162
|
+
const y = [...b].sort(byName);
|
|
163
|
+
return x.length === y.length && x.every((name, i) => sameHash(name, y[i]));
|
|
164
|
+
}
|
|
165
|
+
const sameRef = equalFor(PackageObjectType.fields.data.fields.refs.value);
|
|
166
|
+
const sameSource = equalFor(PackageObjectType.fields.sources.value);
|
|
167
|
+
/** Every dataset of a structure, by its path in e3's words (`.inputs.target`), with its type. */
|
|
168
|
+
function datasetsOf(structure, at, into) {
|
|
169
|
+
if (structure.type === 'value') {
|
|
170
|
+
into.set(pathToString(at), structure.value.type);
|
|
171
|
+
return into;
|
|
172
|
+
}
|
|
173
|
+
for (const [name, child] of structure.value)
|
|
174
|
+
datasetsOf(child, [...at, variant('field', name)], into);
|
|
175
|
+
return into;
|
|
176
|
+
}
|
|
177
|
+
/** A ref path in words: `inputs/target` is `.inputs.target`. */
|
|
178
|
+
function refWords(path) {
|
|
179
|
+
return `.${path.split('/').filter((part) => part !== '').join('.')}`;
|
|
180
|
+
}
|
|
181
|
+
/** Each name of either dictionary, sorted. */
|
|
182
|
+
function namesOf(a, b) {
|
|
183
|
+
return [...new Set([...a.keys(), ...b.keys()])].sort(byName);
|
|
184
|
+
}
|
|
185
|
+
/** What differs of one record on both sides, in words: its mutations' and its indexes' names and types. */
|
|
186
|
+
async function recordDifferences(name, x, y, source, held, heldWords) {
|
|
187
|
+
const ours = decodeRecordObject(await source.read(x));
|
|
188
|
+
const theirs = decodeRecordObject(await held.read(y));
|
|
189
|
+
const only = (inSource) => (inSource ? "is only in the source's package" : `is only in ${heldWords}`);
|
|
190
|
+
const found = [];
|
|
191
|
+
for (const mutation of namesOf(ours.mutations, theirs.mutations)) {
|
|
192
|
+
const m = ours.mutations.get(mutation);
|
|
193
|
+
const n = theirs.mutations.get(mutation);
|
|
194
|
+
if (m === undefined || n === undefined) {
|
|
195
|
+
found.push(`record ${name}: its mutation ${mutation} ${only(m !== undefined)}`);
|
|
196
|
+
continue;
|
|
197
|
+
}
|
|
198
|
+
if (sameHash(m, n))
|
|
199
|
+
continue;
|
|
200
|
+
const a = decodeMutationObject(await source.read(m));
|
|
201
|
+
const b = decodeMutationObject(await held.read(n));
|
|
202
|
+
if (!typeListsEqual(a.argTypes, b.argTypes))
|
|
203
|
+
found.push(`record ${name}: its mutation ${mutation} takes other arguments`);
|
|
204
|
+
}
|
|
205
|
+
for (const index of namesOf(ours.indexes, theirs.indexes)) {
|
|
206
|
+
const i = ours.indexes.get(index);
|
|
207
|
+
const j = theirs.indexes.get(index);
|
|
208
|
+
if (i === undefined || j === undefined) {
|
|
209
|
+
found.push(`record ${name}: its index ${index} ${only(i !== undefined)}`);
|
|
210
|
+
continue;
|
|
211
|
+
}
|
|
212
|
+
if (sameHash(i, j))
|
|
213
|
+
continue;
|
|
214
|
+
const a = decodeRecordIndexObject(await source.read(i));
|
|
215
|
+
const b = decodeRecordIndexObject(await held.read(j));
|
|
216
|
+
if (!typeValuesEqual(a.keyType, b.keyType))
|
|
217
|
+
found.push(`record ${name}: its index ${index} has another key type`);
|
|
218
|
+
if (!typeValuesEqual(a.valueType, b.valueType))
|
|
219
|
+
found.push(`record ${name}: its index ${index} has another projection`);
|
|
220
|
+
}
|
|
221
|
+
return found;
|
|
222
|
+
}
|
|
223
|
+
/**
|
|
224
|
+
* Everything that differs between the package an app's source exports and
|
|
225
|
+
* the one its workspace runs, in words, one line each: see the module's
|
|
226
|
+
* documentation. Nothing here refuses: what a page binds is the checks'.
|
|
227
|
+
*
|
|
228
|
+
* @param source - The package the source exports, read from its zip
|
|
229
|
+
* @param held - The package the workspace runs, read from its repository
|
|
230
|
+
* @param heldWords - The held package in words, e.g. `acme@1.5.0, which production runs`
|
|
231
|
+
* @returns The differences; none when the two are one package
|
|
232
|
+
* @throws When an object of either does not read or decode
|
|
233
|
+
*/
|
|
234
|
+
export async function comparePackages(source, held, heldWords) {
|
|
235
|
+
return (await packageDifferences(source, held, heldWords)).map((difference) => difference.line);
|
|
236
|
+
}
|
|
237
|
+
/**
|
|
238
|
+
* {@link comparePackages}' differences, each with its kind, which is
|
|
239
|
+
* decided here, where each is found: never from its words.
|
|
240
|
+
*
|
|
241
|
+
* @param source - The package the source exports, read from its zip
|
|
242
|
+
* @param held - The package the workspace runs, read from its repository
|
|
243
|
+
* @param heldWords - The held package in words
|
|
244
|
+
* @returns The differences; none when the two are one package
|
|
245
|
+
* @throws When an object of either does not read or decode
|
|
246
|
+
*/
|
|
247
|
+
export async function packageDifferences(source, held, heldWords) {
|
|
248
|
+
const all = [];
|
|
249
|
+
const lines = { push: (...shown) => all.push(...shown.map((line) => ({ line, kind: 'shown' }))) };
|
|
250
|
+
if (sameHash(source.hash, held.hash))
|
|
251
|
+
return all;
|
|
252
|
+
const ours = decodePackageObject(await source.read(source.hash));
|
|
253
|
+
const theirs = decodePackageObject(await held.read(held.hash));
|
|
254
|
+
const only = (inSource) => (inSource ? "is only in the source's package" : `is only in ${heldWords}`);
|
|
255
|
+
// The data: every dataset and its type (a record's, and a task's output,
|
|
256
|
+
// among them: a record or a task on one side alone is a dataset on one side
|
|
257
|
+
// alone; and a path's kind, input, output or record, is in the path)
|
|
258
|
+
const a = datasetsOf(ours.data.structure, [], new Map());
|
|
259
|
+
const b = datasetsOf(theirs.data.structure, [], new Map());
|
|
260
|
+
for (const path of namesOf(a, b)) {
|
|
261
|
+
const x = a.get(path);
|
|
262
|
+
const y = b.get(path);
|
|
263
|
+
if (x === undefined || y === undefined)
|
|
264
|
+
lines.push(`dataset ${path} ${only(x !== undefined)}`);
|
|
265
|
+
else if (!typeValuesEqual(x, y))
|
|
266
|
+
lines.push(`dataset ${path} has another type`);
|
|
267
|
+
}
|
|
268
|
+
// Each record on both sides: its mutations' and indexes' names and types, then its programs
|
|
269
|
+
const programs = [];
|
|
270
|
+
for (const name of namesOf(ours.records, theirs.records)) {
|
|
271
|
+
const x = ours.records.get(name);
|
|
272
|
+
const y = theirs.records.get(name);
|
|
273
|
+
if (x === undefined || y === undefined || sameHash(x, y))
|
|
274
|
+
continue;
|
|
275
|
+
const found = await recordDifferences(name, x, y, source, held, heldWords);
|
|
276
|
+
if (found.length > 0)
|
|
277
|
+
lines.push(...found);
|
|
278
|
+
else
|
|
279
|
+
programs.push(name);
|
|
280
|
+
}
|
|
281
|
+
// Each function: its signature, then its code
|
|
282
|
+
const code = [];
|
|
283
|
+
for (const name of namesOf(ours.functions, theirs.functions)) {
|
|
284
|
+
const x = ours.functions.get(name);
|
|
285
|
+
const y = theirs.functions.get(name);
|
|
286
|
+
if (x === undefined || y === undefined) {
|
|
287
|
+
lines.push(`function ${name} ${only(x !== undefined)}`);
|
|
288
|
+
continue;
|
|
289
|
+
}
|
|
290
|
+
if (sameHash(x, y))
|
|
291
|
+
continue;
|
|
292
|
+
const f = decodeFunctionObject(await source.read(x));
|
|
293
|
+
const g = decodeFunctionObject(await held.read(y));
|
|
294
|
+
if (!typeListsEqual(f.argTypes, g.argTypes))
|
|
295
|
+
lines.push(`function ${name} takes other arguments`);
|
|
296
|
+
if (!typeValuesEqual(f.outputType, g.outputType))
|
|
297
|
+
lines.push(`function ${name} gives another result`);
|
|
298
|
+
if (!sameNameSet(f.drafts, g.drafts))
|
|
299
|
+
lines.push(`function ${name}'s calls may pass drafts of other records`);
|
|
300
|
+
if (typeListsEqual(f.argTypes, g.argTypes) && typeValuesEqual(f.outputType, g.outputType) && sameNameSet(f.drafts, g.drafts))
|
|
301
|
+
code.push(`function ${name}`);
|
|
302
|
+
}
|
|
303
|
+
// Each task on both sides whose object differs: its output's type is its
|
|
304
|
+
// dataset's, above, and a page that shows it is held to its role by the checks
|
|
305
|
+
for (const name of namesOf(ours.tasks, theirs.tasks)) {
|
|
306
|
+
const x = ours.tasks.get(name);
|
|
307
|
+
const y = theirs.tasks.get(name);
|
|
308
|
+
if (x !== undefined && y !== undefined && !sameHash(x, y))
|
|
309
|
+
code.push(`task ${name}`);
|
|
310
|
+
}
|
|
311
|
+
if (code.length > 0)
|
|
312
|
+
all.push({ line: `the compiled code of ${code.join(', ')} (their code, or only where their source was compiled)`, kind: 'code' });
|
|
313
|
+
if (programs.length > 0)
|
|
314
|
+
all.push({ line: `the programs of record ${programs.join(', ')} (their mutations', indexes' or migrations' code, or only where it was compiled)`, kind: 'code' });
|
|
315
|
+
const values = namesOf(ours.data.refs, theirs.data.refs).filter((path) => {
|
|
316
|
+
const x = ours.data.refs.get(path);
|
|
317
|
+
const y = theirs.data.refs.get(path);
|
|
318
|
+
return x === undefined || y === undefined || !sameRef(x, y);
|
|
319
|
+
});
|
|
320
|
+
if (values.length > 0)
|
|
321
|
+
lines.push(`the initial value of ${values.map(refWords).join(', ')}`);
|
|
322
|
+
const files = namesOf(ours.sources, theirs.sources).filter((path) => {
|
|
323
|
+
const x = ours.sources.get(path);
|
|
324
|
+
const y = theirs.sources.get(path);
|
|
325
|
+
return x === undefined || y === undefined || !sameSource(x, y);
|
|
326
|
+
});
|
|
327
|
+
if (files.length > 0)
|
|
328
|
+
all.push({ line: `the inputs taken from a file on one side, or from another file: ${files.map(refWords).join(', ')}`, kind: 'files' });
|
|
329
|
+
// Two packages whose hashes differ where nothing compared here does: a
|
|
330
|
+
// part this CLI does not read (a field a later e3 adds, say). Never taken
|
|
331
|
+
// for code alone: shown, so a binding refuses it
|
|
332
|
+
if (all.length === 0)
|
|
333
|
+
all.push({ line: `the packages themselves, in a part this CLI does not compare (${source.hash.slice(0, 12)}, not ${held.hash.slice(0, 12)}): what differs there is not known`, kind: 'shown' });
|
|
334
|
+
return all;
|
|
335
|
+
}
|
|
336
|
+
/**
|
|
337
|
+
* The `Page.task` pages of an app whose task's output the two packages type
|
|
338
|
+
* otherwise. The checks hold such a page to its task and its UI role, never
|
|
339
|
+
* to its output's type: the page is bound, and shows what the held package's
|
|
340
|
+
* task computes, in the held package's type.
|
|
341
|
+
*
|
|
342
|
+
* @param app - The app, as built
|
|
343
|
+
* @param source - The package its source exports
|
|
344
|
+
* @param held - The package the workspace runs
|
|
345
|
+
* @returns Those pages, in the app's order; none when the two are one package
|
|
346
|
+
* @throws When an object of either does not read or decode
|
|
347
|
+
*/
|
|
348
|
+
async function taskPagesTypedOtherwise(app, source, held) {
|
|
349
|
+
const shown = app.pages.flatMap((page) => (page.body.type === 'task' ? [{ page: page.name, task: page.body.value }] : []));
|
|
350
|
+
if (shown.length === 0 || sameHash(source.hash, held.hash))
|
|
351
|
+
return [];
|
|
352
|
+
const sides = await Promise.all([source, held].map(async (side) => {
|
|
353
|
+
const pkg = decodePackageObject(await side.read(side.hash));
|
|
354
|
+
return { side, pkg, types: datasetsOf(pkg.data.structure, [], new Map()) };
|
|
355
|
+
}));
|
|
356
|
+
const pages = [];
|
|
357
|
+
for (const entry of shown) {
|
|
358
|
+
const outputs = [];
|
|
359
|
+
for (const { side, pkg, types } of sides) {
|
|
360
|
+
const task = pkg.tasks.get(entry.task);
|
|
361
|
+
const path = task === undefined ? null : pathWords(decodeTaskObject(await side.read(task)).output.path);
|
|
362
|
+
outputs.push(path === null ? undefined : types.get(path));
|
|
363
|
+
}
|
|
364
|
+
const [ours, theirs] = outputs;
|
|
365
|
+
// A task on one side alone is the checks' (task_missing)
|
|
366
|
+
if (ours !== undefined && theirs !== undefined && !typeValuesEqual(ours, theirs))
|
|
367
|
+
pages.push(entry);
|
|
368
|
+
}
|
|
369
|
+
return pages;
|
|
370
|
+
}
|
|
371
|
+
/**
|
|
372
|
+
* Whether an app, built from its source, may be bound to the package its
|
|
373
|
+
* workspace runs: see the module's documentation.
|
|
374
|
+
*
|
|
375
|
+
* @param app - The app, as built (on its source's package)
|
|
376
|
+
* @param source - The package its source exports, read from its zip
|
|
377
|
+
* @param held - The package the workspace runs, read from its repository
|
|
378
|
+
* @param heldRef - That package's name, version and hash
|
|
379
|
+
* @param heldWords - That package in words, e.g. `acme@1.5.0, which production runs`
|
|
380
|
+
* @param checks - The checks to run: the project's, as its build ran them (`@elaraai/e3-cloud-ui/check`
|
|
381
|
+
* resolved from the source); this CLI's own by default
|
|
382
|
+
* @returns Its indexed reads and unknown binds, the checks' problems against the held package, the differences, and its task pages typed otherwise
|
|
383
|
+
* @throws When an object of either does not read or decode
|
|
384
|
+
*/
|
|
385
|
+
export async function bindingDecision(app, source, held, heldRef, heldWords, checks = ownChecks) {
|
|
386
|
+
const indexed = indexedReads(app);
|
|
387
|
+
const unknown = unknownBinds(app);
|
|
388
|
+
if (indexed.length > 0 || unknown.length > 0)
|
|
389
|
+
return { indexed, unknown, problems: [], differences: [], kinds: [], taskPages: [] };
|
|
390
|
+
const bound = { ...app, package: { name: heldRef.name, version: heldRef.version, hash: heldRef.hash } };
|
|
391
|
+
const problems = checks.checkApp(bound, await checks.readPackageView(held.read, heldRef), { e3Version: null });
|
|
392
|
+
const kinds = await packageDifferences(source, held, heldWords);
|
|
393
|
+
const taskPages = problems.length > 0 ? [] : await taskPagesTypedOtherwise(app, source, held);
|
|
394
|
+
return { indexed, unknown, problems, differences: kinds.map((difference) => difference.line), kinds, taskPages };
|
|
395
|
+
}
|
|
396
|
+
/**
|
|
397
|
+
* A reader of a package zip's objects, as e3's export lays them out
|
|
398
|
+
* (`objects/<2>/<62>.beast2`), whatever release of e3 exported it.
|
|
399
|
+
*
|
|
400
|
+
* @param zip - The zip's bytes
|
|
401
|
+
* @returns The reader
|
|
402
|
+
* @throws When the zip does not read
|
|
403
|
+
*/
|
|
404
|
+
export async function zipObjects(zip) {
|
|
405
|
+
const reader = await openZip({ size: zip.byteLength, read: (offset, length) => Promise.resolve(zip.subarray(offset, offset + length)) });
|
|
406
|
+
const objects = new Map();
|
|
407
|
+
try {
|
|
408
|
+
for await (const entry of iterateZipEntries(reader)) {
|
|
409
|
+
const object = /^objects\/([0-9a-f]{2})\/([0-9a-f]{62})\.beast2$/.exec(entry.fileName);
|
|
410
|
+
if (object !== null)
|
|
411
|
+
objects.set(`${object[1]}${object[2]}`, await entry.getData());
|
|
412
|
+
}
|
|
413
|
+
}
|
|
414
|
+
finally {
|
|
415
|
+
reader.close();
|
|
416
|
+
}
|
|
417
|
+
return (hash) => {
|
|
418
|
+
const bytes = objects.get(hash);
|
|
419
|
+
return bytes === undefined ? Promise.reject(new Error(`the package's zip holds no object ${hash}`)) : Promise.resolve(bytes);
|
|
420
|
+
};
|
|
421
|
+
}
|
|
422
|
+
//# sourceMappingURL=package-compare.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"package-compare.js","sourceRoot":"","sources":["../../src/package-compare.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AAEH,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,YAAY,EAAE,QAAQ,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,EAA+B,MAAM,eAAe,CAAC;AACxI,OAAO,EACL,iBAAiB,EACjB,oBAAoB,EACpB,oBAAoB,EACpB,mBAAmB,EACnB,uBAAuB,EACvB,kBAAkB,EAClB,gBAAgB,EAChB,YAAY,EACZ,YAAY,GAIb,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,iBAAiB,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAE9D,OAAO,KAAK,SAAS,MAAM,4BAA4B,CAAC;AACxD,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAY7E,2GAA2G;AAC3G,MAAM,iBAAiB,GAAG,mBAAmB,CAAC;AAE9C;;;;;;;;;;GAUG;AACH,MAAM,YAAY,GAAG,mDAAmD,CAAC;AAEzE;;;;;;GAMG;AACH,MAAM,cAAc,GAAG,4DAA4D,CAAC;AAEpF;;;;;;GAMG;AACH,MAAM,WAAW,GAAwB,IAAI,GAAG,CAAC,CAAC,WAAW,EAAE,iBAAiB,EAAE,wBAAwB,EAAE,eAAe,EAAE,aAAa,EAAE,eAAe,CAAC,CAAC,CAAC;AAE9J,MAAM,QAAQ,GAAG,QAAQ,CAAC,UAAU,CAAC,CAAC;AACtC,MAAM,MAAM,GAAG,UAAU,CAAC,UAAU,CAAC,CAAC;AAEtC,2EAA2E;AAC3E,SAAS,aAAa,CAAC,IAAQ,EAAE,KAAkD;IACjF,MAAM,CAAC,IAAI,EAAE,CAAC,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IACD,OAAO,CAAC,IAAI,EAAE,EAAE;QACd,MAAM,KAAK,GAAG,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QAChC,OAAO,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,KAAK,CAAC,qCAAqC,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;IAC/H,CAAC,CAAC;AACJ,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elaraai/e3-cloud-cli",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.20",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "CLI for e3 cloud management",
|
|
6
6
|
"license": "BUSL-1.1",
|
|
@@ -10,18 +10,18 @@
|
|
|
10
10
|
"main": "dist/src/cli.js",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@aws-sdk/client-s3": "^3.966.0",
|
|
13
|
-
"@elaraai/e3-api-client": "1.0.
|
|
14
|
-
"@elaraai/e3-core": "1.0.
|
|
15
|
-
"@elaraai/e3-types": "1.0.
|
|
13
|
+
"@elaraai/e3-api-client": "1.0.121",
|
|
14
|
+
"@elaraai/e3-core": "1.0.121",
|
|
15
|
+
"@elaraai/e3-types": "1.0.121",
|
|
16
16
|
"commander": "^12.0.0",
|
|
17
17
|
"esbuild": "^0.27.2",
|
|
18
|
-
"@elaraai/e3-cloud-
|
|
19
|
-
"@elaraai/e3-cloud-types": "1.1.
|
|
20
|
-
"@elaraai/e3-cloud-
|
|
21
|
-
"@elaraai/e3-cloud-
|
|
18
|
+
"@elaraai/e3-cloud-files": "1.1.20",
|
|
19
|
+
"@elaraai/e3-cloud-types": "1.1.20",
|
|
20
|
+
"@elaraai/e3-cloud-ui": "1.1.20",
|
|
21
|
+
"@elaraai/e3-cloud-client": "1.1.20"
|
|
22
22
|
},
|
|
23
23
|
"peerDependencies": {
|
|
24
|
-
"@elaraai/east": "1.0.
|
|
24
|
+
"@elaraai/east": "1.0.121"
|
|
25
25
|
},
|
|
26
26
|
"files": [
|
|
27
27
|
"dist/src/**/*",
|