@ibgib/core-gib 0.1.38 → 0.1.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/dist/common/other/graph-helper.d.mts.map +1 -1
- package/dist/common/other/graph-helper.mjs +18 -3
- package/dist/common/other/graph-helper.mjs.map +1 -1
- package/dist/sync/graft-info/graft-info-helpers.mjs +1 -1
- package/dist/sync/graft-info/graft-info-helpers.mjs.map +1 -1
- package/dist/sync/sync-conflict-adv-multitimelines.respec.mjs +321 -235
- package/dist/sync/sync-conflict-adv-multitimelines.respec.mjs.map +1 -1
- package/dist/sync/sync-conflict-basic-multitimelines.respec.mjs +6 -6
- package/dist/sync/sync-conflict-basic-multitimelines.respec.mjs.map +1 -1
- package/dist/sync/sync-peer/sync-peer-innerspace/sync-peer-innerspace-v1.mjs +1 -1
- package/dist/sync/sync-peer/sync-peer-innerspace/sync-peer-innerspace-v1.mjs.map +1 -1
- package/dist/sync/sync-saga-coordinator.d.mts.map +1 -1
- package/dist/sync/sync-saga-coordinator.mjs +49 -12
- package/dist/sync/sync-saga-coordinator.mjs.map +1 -1
- package/dist/sync/sync-saga-message/sync-saga-message-types.d.mts +4 -0
- package/dist/sync/sync-saga-message/sync-saga-message-types.d.mts.map +1 -1
- package/dist/test-helpers.d.mts +104 -47
- package/dist/test-helpers.d.mts.map +1 -1
- package/dist/test-helpers.mjs +335 -131
- package/dist/test-helpers.mjs.map +1 -1
- package/dist/test-types.d.mts +25 -7
- package/dist/test-types.d.mts.map +1 -1
- package/dist/witness/space/reconciliation-space/reconciliation-space-helper.mjs +2 -2
- package/dist/witness/space/reconciliation-space/reconciliation-space-helper.mjs.map +1 -1
- package/package.json +1 -1
- package/src/common/other/graph-helper.mts +14 -2
- package/src/sync/SYNC_TESTING.md +135 -70
- package/src/sync/graft-info/graft-info-helpers.mts +1 -1
- package/src/sync/sync-conflict-adv-multitimelines.respec.mts +332 -245
- package/src/sync/sync-conflict-basic-multitimelines.respec.mts +5 -5
- package/src/sync/sync-peer/sync-peer-innerspace/sync-peer-innerspace-v1.mts +1 -1
- package/src/sync/sync-saga-coordinator.mts +58 -14
- package/src/sync/sync-saga-message/sync-saga-message-types.mts +4 -0
- package/src/test-helpers.mts +429 -152
- package/src/test-types.mts +30 -7
- package/src/witness/space/reconciliation-space/reconciliation-space-helper.mts +2 -2
- package/tmp.md +205 -1160
package/dist/test-helpers.mjs
CHANGED
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
* actions for creating and modifying data.
|
|
7
7
|
*/
|
|
8
8
|
import { extractErrorMsg, getUUID } from '@ibgib/helper-gib/dist/helpers/utils-helper.mjs';
|
|
9
|
+
import { getIbGibAddr } from '@ibgib/ts-gib/dist/helper.mjs';
|
|
9
10
|
import { GLOBAL_LOG_A_LOT } from './core-constants.mjs';
|
|
10
11
|
import { KeystoneService_V1 } from './keystone/keystone-service-v1.mjs';
|
|
11
12
|
import { Factory_V1 } from '@ibgib/ts-gib/dist/V1/factory.mjs';
|
|
@@ -62,14 +63,6 @@ export async function createTimelineRootTestHelper({ ib, data, space, }) {
|
|
|
62
63
|
if (logalot) {
|
|
63
64
|
console.log(`${lc} starting... (I: 8f50a8cf0268742048f7c188feb5a825)`);
|
|
64
65
|
}
|
|
65
|
-
// const resTimeline = await createTimeline({
|
|
66
|
-
// ib,
|
|
67
|
-
// data,
|
|
68
|
-
// rel8ns: undefined,
|
|
69
|
-
// metaspace, space
|
|
70
|
-
// });
|
|
71
|
-
// const timeline = resTimeline.newIbGib;
|
|
72
|
-
// return timeline;
|
|
73
66
|
// Determine the parent to fork based on the provided options.
|
|
74
67
|
const atom = ib.split(' ').at(0);
|
|
75
68
|
const parentIbGib = Factory_V1.primitive({ ib: atom });
|
|
@@ -131,6 +124,103 @@ export async function getTestKeystoneServiceHelper() {
|
|
|
131
124
|
}
|
|
132
125
|
return new MockKeystoneService();
|
|
133
126
|
}
|
|
127
|
+
/**
|
|
128
|
+
* r0, r0r1, r0r1r2
|
|
129
|
+
*/
|
|
130
|
+
const TEST_IB_ROUNDS_REGEXP = /^(r\d)+$/;
|
|
131
|
+
/**
|
|
132
|
+
* v0, v0v1, v0v1v2
|
|
133
|
+
*/
|
|
134
|
+
const TEST_IB_VERSIONS_REGEXP = /^(v\d)+$/;
|
|
135
|
+
/**
|
|
136
|
+
* Parses ib to extract base, rounds, and version.
|
|
137
|
+
* Schema: [base] [r1r2...] [v0v1...] (space-delimited)
|
|
138
|
+
* Example: "alpha r0r1 v0v1v2" → { base: "alpha", rounds: "r1", version: 2 }
|
|
139
|
+
*/
|
|
140
|
+
export function parseTestIb(ib) {
|
|
141
|
+
const lc = `[${parseTestIb.name}]`;
|
|
142
|
+
try {
|
|
143
|
+
if (logalot) {
|
|
144
|
+
console.log(`${lc} starting... (I: 87b6d85567f2e2a4b84a4278fb1bc826)`);
|
|
145
|
+
}
|
|
146
|
+
const parts = ib.split(' ');
|
|
147
|
+
if (parts.length === 1) {
|
|
148
|
+
// Initial ib, no rounds or versions yet
|
|
149
|
+
throw new Error(`(UNEXPECTED) does this ever hit? (E: 584978e0c644aec1e86f7e964a547526)`);
|
|
150
|
+
// return {
|
|
151
|
+
// atom: parts[0],
|
|
152
|
+
// rounds: '',
|
|
153
|
+
// roundNumber: -1,
|
|
154
|
+
// versions: '',
|
|
155
|
+
// versionNumber: -1,
|
|
156
|
+
// comments_snake_plus_CamelCase: undefined,
|
|
157
|
+
// };
|
|
158
|
+
}
|
|
159
|
+
const [atom, // alpha, beta, etc.
|
|
160
|
+
rounds, versions, comments_snake_plus_CamelCase,] = parts;
|
|
161
|
+
// ignoring possibility of later erroneous parts for now
|
|
162
|
+
// Find round and version parts
|
|
163
|
+
if (!rounds) {
|
|
164
|
+
throw new Error(`invalid ib. rounds falsy (E: b706c8005e7f619e0386b6981d835826)`);
|
|
165
|
+
}
|
|
166
|
+
if (!TEST_IB_ROUNDS_REGEXP.test(rounds)) {
|
|
167
|
+
throw new Error(`invalid ib. rounds (${rounds}) does not match TEST_IB_ROUNDS_REGEXP: ${TEST_IB_ROUNDS_REGEXP.source} (E: 5498b89c25321a97a8728be82b1f7b26)`);
|
|
168
|
+
}
|
|
169
|
+
const roundNumber = Number.parseInt(rounds.split('r').at(-1));
|
|
170
|
+
if (!versions) {
|
|
171
|
+
throw new Error(`invalid ib. versions falsy (E: 79aa180471b434c685ea27987b50e726)`);
|
|
172
|
+
}
|
|
173
|
+
if (!TEST_IB_VERSIONS_REGEXP.test(versions)) {
|
|
174
|
+
throw new Error(`invalid ib. versions (${versions}) does not match TEST_IB_VERSIONS_REGEXP: ${TEST_IB_VERSIONS_REGEXP.source} (E: 5498b89c25321a97a8728be82b1f7b26)`);
|
|
175
|
+
}
|
|
176
|
+
const versionNumber = Number.parseInt(versions.split('v').at(-1));
|
|
177
|
+
return {
|
|
178
|
+
atom,
|
|
179
|
+
rounds,
|
|
180
|
+
roundNumber,
|
|
181
|
+
versions,
|
|
182
|
+
versionNumber,
|
|
183
|
+
comments_snake_plus_CamelCase,
|
|
184
|
+
};
|
|
185
|
+
}
|
|
186
|
+
catch (error) {
|
|
187
|
+
console.error(`${lc} ${extractErrorMsg(error)}`);
|
|
188
|
+
throw error;
|
|
189
|
+
}
|
|
190
|
+
finally {
|
|
191
|
+
if (logalot) {
|
|
192
|
+
console.log(`${lc} complete.`);
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
function getNewTestIb({ atom, comments_snake_plus_CamelCase, }) {
|
|
197
|
+
const lc = `[${getNewTestIb.name}]`;
|
|
198
|
+
try {
|
|
199
|
+
if (logalot) {
|
|
200
|
+
console.log(`${lc} starting... (I: 60aebdb828f72bbfbcbf401e7af09826)`);
|
|
201
|
+
}
|
|
202
|
+
if (!atom)
|
|
203
|
+
throw new Error(`atom required (E: dc041852cdd88d692a8c2168ae4c7626)`);
|
|
204
|
+
let ib = [
|
|
205
|
+
atom,
|
|
206
|
+
'r1',
|
|
207
|
+
'v0',
|
|
208
|
+
].join(' ');
|
|
209
|
+
if (comments_snake_plus_CamelCase) {
|
|
210
|
+
ib += ' ' + comments_snake_plus_CamelCase;
|
|
211
|
+
}
|
|
212
|
+
return ib;
|
|
213
|
+
}
|
|
214
|
+
catch (error) {
|
|
215
|
+
console.error(`${lc} ${extractErrorMsg(error)}`);
|
|
216
|
+
throw error;
|
|
217
|
+
}
|
|
218
|
+
finally {
|
|
219
|
+
if (logalot) {
|
|
220
|
+
console.log(`${lc} complete.`);
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
}
|
|
134
224
|
/**
|
|
135
225
|
* Stateful transformer for test operations.
|
|
136
226
|
* Manages counters, rounds, and execution history.
|
|
@@ -141,37 +231,39 @@ export async function getTestKeystoneServiceHelper() {
|
|
|
141
231
|
* const r1 = transformer.newRound({ name: 'r1_common_history' });
|
|
142
232
|
*
|
|
143
233
|
* const step = await transformer.mut8({
|
|
144
|
-
*
|
|
145
|
-
*
|
|
146
|
-
* });
|
|
234
|
+
* Test transformer class that provides fluent method chaining for timeline testing.
|
|
235
|
+
* Automatically tracks rounds, steps, provides test data snapshots, and auto-versions ibs.
|
|
147
236
|
*
|
|
148
|
-
*
|
|
149
|
-
* r1
|
|
150
|
-
* const mut8Info = step.infos[0] as TestMut8Info;
|
|
151
|
-
* // verify step.ibGib.data[mut8Info.key] === mut8Info.value
|
|
152
|
-
* });
|
|
153
|
-
* ```
|
|
237
|
+
* Ib versioning schema: `[base] [r1r2...] [v0v1v2]` (space-delimited)
|
|
238
|
+
* Example: `alpha r1 v0` → `alpha r1 v1` → `alpha r1r2 v0`
|
|
154
239
|
*/
|
|
155
240
|
export class TestTransformer {
|
|
241
|
+
lc = `[${TestTransformer.name}]`;
|
|
242
|
+
metaspace;
|
|
243
|
+
sourceSpace;
|
|
244
|
+
destSpace;
|
|
156
245
|
mut8Counter = 0;
|
|
157
246
|
rel8Counter = 0;
|
|
158
247
|
rounds = [];
|
|
159
|
-
currentRound
|
|
248
|
+
get currentRound() {
|
|
249
|
+
return this.rounds && this.rounds.length > 0 ?
|
|
250
|
+
this.rounds.at(-1) :
|
|
251
|
+
undefined;
|
|
252
|
+
}
|
|
253
|
+
;
|
|
254
|
+
constructor(metaspace, sourceSpace, destSpace) {
|
|
255
|
+
this.metaspace = metaspace;
|
|
256
|
+
this.sourceSpace = sourceSpace;
|
|
257
|
+
this.destSpace = destSpace;
|
|
258
|
+
}
|
|
160
259
|
/**
|
|
161
|
-
* Start a new round of
|
|
260
|
+
* Start a new round of testing operations.
|
|
162
261
|
*/
|
|
163
262
|
newRound({ name, description }) {
|
|
164
263
|
const round = { name, description, steps: [] };
|
|
165
264
|
this.rounds.push(round);
|
|
166
|
-
this.currentRound = round;
|
|
167
265
|
return round;
|
|
168
266
|
}
|
|
169
|
-
/**
|
|
170
|
-
* Get the current active round.
|
|
171
|
-
*/
|
|
172
|
-
getCurrentRound() {
|
|
173
|
-
return this.currentRound;
|
|
174
|
-
}
|
|
175
267
|
/**
|
|
176
268
|
* Get all steps across all rounds.
|
|
177
269
|
*/
|
|
@@ -191,133 +283,245 @@ export class TestTransformer {
|
|
|
191
283
|
this.mut8Counter = 0;
|
|
192
284
|
this.rel8Counter = 0;
|
|
193
285
|
this.rounds = [];
|
|
194
|
-
this.currentRound = undefined;
|
|
195
|
-
}
|
|
196
|
-
getNextMut8Key(prefix) {
|
|
197
|
-
this.mut8Counter++;
|
|
198
|
-
const baseKey = prefix ?? 'testField';
|
|
199
|
-
return `${baseKey}_${this.mut8Counter}`;
|
|
200
286
|
}
|
|
201
|
-
|
|
202
|
-
|
|
287
|
+
/**
|
|
288
|
+
* Get space by location.
|
|
289
|
+
*/
|
|
290
|
+
getSpace(location) {
|
|
291
|
+
return location === 'source' ? this.sourceSpace : this.destSpace;
|
|
203
292
|
}
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
293
|
+
/**
|
|
294
|
+
* Generates next ib based on current ib and round context.
|
|
295
|
+
* Increments version and appends round if needed.
|
|
296
|
+
*/
|
|
297
|
+
generateNextIb({ currentIb, comments_snake_plus_CamelCase, }) {
|
|
298
|
+
const lc = `${this.lc}[${this.generateNextIb.name}]`;
|
|
299
|
+
try {
|
|
300
|
+
if (logalot) {
|
|
301
|
+
console.log(`${lc} starting... (I: 9291a8f3c6b168e53856c61ba9d5c826)`);
|
|
302
|
+
}
|
|
303
|
+
const { atom, rounds, roundNumber, versions, versionNumber } = parseTestIb(currentIb);
|
|
304
|
+
if (!this.currentRound) {
|
|
305
|
+
throw new Error(`(UNEXPECTED) this.currentRound falsy? (E: 4594188ef0a859759daaa4b8ea1a7926)`);
|
|
306
|
+
}
|
|
307
|
+
const currentRoundNumber = this.rounds.length;
|
|
308
|
+
const needsNewRounds = roundNumber !== currentRoundNumber;
|
|
309
|
+
/**
|
|
310
|
+
* the next rounds is only different if we are in a different round.
|
|
311
|
+
*/
|
|
312
|
+
const nextRounds = needsNewRounds ?
|
|
313
|
+
`${rounds}r${roundNumber + 1}` :
|
|
314
|
+
rounds;
|
|
315
|
+
/**
|
|
316
|
+
* always increment the version
|
|
317
|
+
*/
|
|
318
|
+
const nextVersions = `${versions}v${versionNumber + 1}`;
|
|
319
|
+
if (comments_snake_plus_CamelCase && comments_snake_plus_CamelCase.includes(' ')) {
|
|
320
|
+
throw new Error(`comments_snake_plus_CamelCase contains spaces. must be underscore-delimited camelCase comments (E: de725d4090de648bf221cbaf4e041826)`);
|
|
321
|
+
}
|
|
322
|
+
let nextIb = `${atom} ${nextRounds} ${nextVersions}`;
|
|
323
|
+
if (comments_snake_plus_CamelCase) {
|
|
324
|
+
nextIb += ' ' + comments_snake_plus_CamelCase;
|
|
325
|
+
}
|
|
326
|
+
return nextIb;
|
|
327
|
+
}
|
|
328
|
+
catch (error) {
|
|
329
|
+
console.error(`${lc} ${extractErrorMsg(error)}`);
|
|
330
|
+
throw error;
|
|
331
|
+
}
|
|
332
|
+
finally {
|
|
333
|
+
if (logalot) {
|
|
334
|
+
console.log(`${lc} complete.`);
|
|
335
|
+
}
|
|
336
|
+
}
|
|
208
337
|
}
|
|
209
338
|
/**
|
|
210
|
-
*
|
|
211
|
-
* Automatically adds step to current round if one exists.
|
|
339
|
+
* Create a timeline root with auto-tracking to current round.
|
|
212
340
|
*
|
|
213
341
|
* @example
|
|
214
|
-
*
|
|
215
|
-
*
|
|
342
|
+
* const transformer = new TestTransformer(metaspace, sourceSpace, destSpace);
|
|
343
|
+
* transformer.newRound({ name: 'r1_setup' });
|
|
344
|
+
* const step = await transformer.create({
|
|
345
|
+
* ib: 'alpha',
|
|
346
|
+
* data: { type: 'alpha' },
|
|
347
|
+
* in: 'source',
|
|
348
|
+
* });
|
|
349
|
+
*/
|
|
350
|
+
async create({ atom, data, in: location, name, comments_snake_plus_CamelCase, }) {
|
|
351
|
+
const lc = `${this.lc}[create]`;
|
|
352
|
+
if (!this.currentRound) {
|
|
353
|
+
throw new Error(`${lc} No active round. Call newRound() first.`);
|
|
354
|
+
}
|
|
355
|
+
const space = this.getSpace(location);
|
|
356
|
+
const timeline = await createTimelineRootTestHelper({
|
|
357
|
+
ib: getNewTestIb({ atom, comments_snake_plus_CamelCase }),
|
|
358
|
+
data,
|
|
359
|
+
space,
|
|
360
|
+
});
|
|
361
|
+
const result = {
|
|
362
|
+
ibGib: timeline,
|
|
363
|
+
addr: getIbGibAddr({ ibGib: timeline }),
|
|
364
|
+
space,
|
|
365
|
+
metaspace: this.metaspace,
|
|
366
|
+
infos: [],
|
|
367
|
+
name: name || `${this.currentRound.name}_${atom}_create`,
|
|
368
|
+
};
|
|
369
|
+
this.currentRound.steps.push(result);
|
|
370
|
+
return result;
|
|
371
|
+
}
|
|
372
|
+
/**
|
|
373
|
+
* Perform a mutation with optional field mutation and auto-versioning.
|
|
216
374
|
*
|
|
217
|
-
*
|
|
218
|
-
*
|
|
375
|
+
* @example
|
|
376
|
+
* // With field and auto value
|
|
377
|
+
* const step = await transformer.mut8({
|
|
378
|
+
* stepInfo: prevStep,
|
|
379
|
+
* strField: 'commonField',
|
|
380
|
+
* });
|
|
381
|
+
* // Creates: alpha r1 v0, sets commonField: 'value_1'
|
|
219
382
|
*
|
|
220
383
|
* @example
|
|
221
|
-
* // With
|
|
384
|
+
* // With field and custom value
|
|
222
385
|
* const step = await transformer.mut8({
|
|
223
|
-
*
|
|
224
|
-
* name: '
|
|
386
|
+
* stepInfo: prevStep,
|
|
387
|
+
* strField: { name: 'count', value: '42' },
|
|
225
388
|
* });
|
|
389
|
+
*
|
|
390
|
+
* @example
|
|
391
|
+
* // Ib-only mutation (no field)
|
|
392
|
+
* const step = await transformer.mut8({ stepInfo: prevStep });
|
|
226
393
|
*/
|
|
227
|
-
async mut8({ ibGib,
|
|
228
|
-
const lc =
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
const currentSpace = stepInfo?.space ?? space;
|
|
232
|
-
const currentMetaspace = stepInfo?.metaspace ?? metaspace;
|
|
233
|
-
const currentName = name ?? stepInfo?.name;
|
|
234
|
-
if (!currentIbGib)
|
|
235
|
-
throw new Error(`ibGib required (E: 8c4a5e1f2b3d4e5f6a7b8c9d0e1f2a3b)`);
|
|
236
|
-
if (!currentSpace)
|
|
237
|
-
throw new Error(`space required (E: 9d5b6f2c3e4a5d6f7b8c9d0e1f2a3b4c)`);
|
|
238
|
-
const key = this.getNextMut8Key(fieldPrefix);
|
|
239
|
-
const value = this.getNextMut8Value();
|
|
240
|
-
const mut8Ib = `${currentIbGib.ib} x_${value}`;
|
|
241
|
-
const mutated = await mut8Timeline({
|
|
242
|
-
timeline: currentIbGib,
|
|
243
|
-
mut8Opts: {
|
|
244
|
-
mut8Ib,
|
|
245
|
-
dataToAddOrPatch: { [key]: value }
|
|
246
|
-
},
|
|
247
|
-
metaspace: currentMetaspace,
|
|
248
|
-
space: currentSpace,
|
|
249
|
-
});
|
|
250
|
-
const mut8Info = { key, value };
|
|
251
|
-
const result = {
|
|
252
|
-
ibGib: mutated,
|
|
253
|
-
space: currentSpace,
|
|
254
|
-
metaspace: currentMetaspace,
|
|
255
|
-
infos: [...(stepInfo?.infos ?? []), mut8Info],
|
|
256
|
-
name: currentName,
|
|
257
|
-
};
|
|
258
|
-
// Add to current round if exists
|
|
259
|
-
this.currentRound?.steps.push(result);
|
|
260
|
-
return result;
|
|
394
|
+
async mut8({ ibGib, stepInfo, in: location, strField, name, comments_snake_plus_CamelCase, }) {
|
|
395
|
+
const lc = `${this.lc}[mut8]`;
|
|
396
|
+
if (!this.currentRound) {
|
|
397
|
+
throw new Error(`${lc} No active round. Call newRound() first.`);
|
|
261
398
|
}
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
399
|
+
// Extract context
|
|
400
|
+
let targetIbGib;
|
|
401
|
+
let space;
|
|
402
|
+
if (stepInfo) {
|
|
403
|
+
targetIbGib = stepInfo.ibGib;
|
|
404
|
+
space = stepInfo.space;
|
|
405
|
+
}
|
|
406
|
+
else if (ibGib && location) {
|
|
407
|
+
targetIbGib = ibGib;
|
|
408
|
+
space = this.getSpace(location);
|
|
265
409
|
}
|
|
410
|
+
else {
|
|
411
|
+
throw new Error(`${lc} Must provide either stepInfo or (ibGib + in)`);
|
|
412
|
+
}
|
|
413
|
+
// Generate next ib with auto-versioning
|
|
414
|
+
const nextIb = this.generateNextIb({
|
|
415
|
+
currentIb: targetIbGib.ib,
|
|
416
|
+
comments_snake_plus_CamelCase,
|
|
417
|
+
});
|
|
418
|
+
// Build data to add/patch
|
|
419
|
+
const dataToAddOrPatch = {};
|
|
420
|
+
if (strField) {
|
|
421
|
+
let fieldName;
|
|
422
|
+
let fieldValue;
|
|
423
|
+
if (typeof strField === 'string') {
|
|
424
|
+
// Field name only, generate random value
|
|
425
|
+
fieldName = strField;
|
|
426
|
+
fieldValue = `value_${++this.mut8Counter}`;
|
|
427
|
+
}
|
|
428
|
+
else {
|
|
429
|
+
// Field name and value provided
|
|
430
|
+
fieldName = strField.name;
|
|
431
|
+
fieldValue = strField.value;
|
|
432
|
+
this.mut8Counter++; // Still increment counter
|
|
433
|
+
}
|
|
434
|
+
dataToAddOrPatch[fieldName] = fieldValue;
|
|
435
|
+
}
|
|
436
|
+
// Perform mutation
|
|
437
|
+
const mutatedIbGib = await mut8Timeline({
|
|
438
|
+
timeline: targetIbGib,
|
|
439
|
+
mut8Opts: {
|
|
440
|
+
mut8Ib: nextIb,
|
|
441
|
+
dataToAddOrPatch,
|
|
442
|
+
},
|
|
443
|
+
metaspace: this.metaspace,
|
|
444
|
+
space,
|
|
445
|
+
});
|
|
446
|
+
const mut8Info = {
|
|
447
|
+
type: 'mut8',
|
|
448
|
+
ib: nextIb,
|
|
449
|
+
key: strField ? (typeof strField === 'string' ? strField : strField.name) : undefined,
|
|
450
|
+
value: strField ? (typeof strField === 'string' ? `value_${this.mut8Counter}` : strField.value) : undefined,
|
|
451
|
+
};
|
|
452
|
+
const result = {
|
|
453
|
+
ibGib: mutatedIbGib,
|
|
454
|
+
addr: getIbGibAddr({ ibGib: mutatedIbGib }),
|
|
455
|
+
space,
|
|
456
|
+
metaspace: this.metaspace,
|
|
457
|
+
infos: [mut8Info],
|
|
458
|
+
name: name || `${this.currentRound.name}_${nextIb}`,
|
|
459
|
+
};
|
|
460
|
+
this.currentRound.steps.push(result);
|
|
461
|
+
return result;
|
|
266
462
|
}
|
|
267
463
|
/**
|
|
268
|
-
* Perform a relation with auto-generated rel8n name.
|
|
269
|
-
* Automatically adds step to current round if one exists.
|
|
464
|
+
* Perform a relation with auto-generated rel8n name and auto-versioning.
|
|
270
465
|
*
|
|
271
466
|
* @example
|
|
272
|
-
*
|
|
273
|
-
*
|
|
274
|
-
*
|
|
275
|
-
*
|
|
467
|
+
* const step = await transformer.rel8({
|
|
468
|
+
* stepInfo: prevStep,
|
|
469
|
+
* targetIbGibs: [beta, gamma],
|
|
470
|
+
* rel8nName: 'depends_on',
|
|
276
471
|
* });
|
|
277
|
-
*
|
|
278
|
-
* // Continue chaining
|
|
279
|
-
* step = await transformer.rel8({ stepInfo: step, targetIbGibs: [gamma] });
|
|
280
472
|
*/
|
|
281
|
-
async rel8({
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
const currentName = name ?? stepInfo?.name;
|
|
288
|
-
if (!currentIbGib)
|
|
289
|
-
throw new Error(`ibGib required (E: a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6)`);
|
|
290
|
-
if (!currentSpace)
|
|
291
|
-
throw new Error(`space required (E: b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7)`);
|
|
292
|
-
if (!currentMetaspace)
|
|
293
|
-
throw new Error(`metaspace required (E: c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8)`);
|
|
294
|
-
const rel8nName = this.getNextRel8nName(rel8nPrefix);
|
|
295
|
-
const targets = Array.isArray(targetIbGibs) ? targetIbGibs : [targetIbGibs];
|
|
296
|
-
const related = await appendToTimeline({
|
|
297
|
-
timeline: currentIbGib,
|
|
298
|
-
metaspace: currentMetaspace,
|
|
299
|
-
space: currentSpace,
|
|
300
|
-
rel8nInfos: [{
|
|
301
|
-
rel8nName,
|
|
302
|
-
ibGibs: targets
|
|
303
|
-
}],
|
|
304
|
-
});
|
|
305
|
-
const rel8Info = { rel8nName, targetIbGibs: targets };
|
|
306
|
-
const result = {
|
|
307
|
-
ibGib: related,
|
|
308
|
-
space: currentSpace,
|
|
309
|
-
metaspace: currentMetaspace,
|
|
310
|
-
infos: [...(stepInfo?.infos ?? []), rel8Info],
|
|
311
|
-
name: currentName,
|
|
312
|
-
};
|
|
313
|
-
// Add to current round if exists
|
|
314
|
-
this.currentRound?.steps.push(result);
|
|
315
|
-
return result;
|
|
473
|
+
async rel8({ stepInfo, ibGib, in: location, targetIbGibs, rel8nName, name,
|
|
474
|
+
// comments_snake_plus_CamelCase,
|
|
475
|
+
}) {
|
|
476
|
+
const lc = `${this.lc}[rel8]`;
|
|
477
|
+
if (!this.currentRound) {
|
|
478
|
+
throw new Error(`${lc} No active round. Call newRound() first.`);
|
|
316
479
|
}
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
480
|
+
// Extract context
|
|
481
|
+
let sourceIbGib;
|
|
482
|
+
let space;
|
|
483
|
+
if (stepInfo) {
|
|
484
|
+
sourceIbGib = stepInfo.ibGib;
|
|
485
|
+
space = stepInfo.space;
|
|
486
|
+
}
|
|
487
|
+
else if (ibGib && location) {
|
|
488
|
+
sourceIbGib = ibGib;
|
|
489
|
+
space = this.getSpace(location);
|
|
490
|
+
}
|
|
491
|
+
else {
|
|
492
|
+
throw new Error(`${lc} Must provide either stepInfo or (ibGib + in)`);
|
|
320
493
|
}
|
|
494
|
+
// Generate next ib with auto-versioning
|
|
495
|
+
// we can't do this right now because the rel8 transform cannot itself
|
|
496
|
+
// change the ib. this only currently is available through the mut8
|
|
497
|
+
// call.
|
|
498
|
+
// const nextIb = this.generateNextIb({currentIb: sourceIbGib.ib, comments_snake_plus_CamelCase});
|
|
499
|
+
// Perform relation
|
|
500
|
+
const relatedIbGib = await appendToTimeline({
|
|
501
|
+
timeline: sourceIbGib,
|
|
502
|
+
rel8nInfos: [{
|
|
503
|
+
rel8nName,
|
|
504
|
+
ibGibs: targetIbGibs
|
|
505
|
+
}],
|
|
506
|
+
metaspace: this.metaspace,
|
|
507
|
+
space,
|
|
508
|
+
});
|
|
509
|
+
const rel8Info = {
|
|
510
|
+
type: 'rel8',
|
|
511
|
+
ib: sourceIbGib.ib,
|
|
512
|
+
rel8nName,
|
|
513
|
+
targetAddrs: targetIbGibs.map(x => getIbGibAddr({ ibGib: x })),
|
|
514
|
+
};
|
|
515
|
+
const result = {
|
|
516
|
+
ibGib: relatedIbGib,
|
|
517
|
+
addr: getIbGibAddr({ ibGib: relatedIbGib }),
|
|
518
|
+
space,
|
|
519
|
+
metaspace: this.metaspace,
|
|
520
|
+
infos: [rel8Info],
|
|
521
|
+
name: name || `${this.currentRound.name}_autoname_${sourceIbGib.ib}`,
|
|
522
|
+
};
|
|
523
|
+
this.currentRound.steps.push(result);
|
|
524
|
+
return result;
|
|
321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AG,IAAI,CAAC,YAAY,CAAC,IAAI,aAAa,WAAW,CAAC,EAAE,EAAE;SACvE,CAAC;QAEF,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QAErC,OAAO,MAAM,CAAC;IAClB,CAAC;CACJ"}
|
package/dist/test-types.d.mts
CHANGED
|
@@ -7,36 +7,50 @@
|
|
|
7
7
|
import { IbGib_V1 } from '@ibgib/ts-gib/dist/V1/types.mjs';
|
|
8
8
|
import { IbGibSpaceAny } from './witness/space/space-base-v1.mjs';
|
|
9
9
|
import { MetaspaceService } from './witness/space/metaspace/metaspace-types.mjs';
|
|
10
|
+
import { IbGibAddr } from '@ibgib/ts-gib';
|
|
10
11
|
/**
|
|
11
12
|
* Information returned from a mut8 operation.
|
|
12
13
|
* Captures what was mutated for later verification.
|
|
13
14
|
*/
|
|
14
15
|
export interface TestMut8Info {
|
|
16
|
+
type: 'mut8';
|
|
17
|
+
/**
|
|
18
|
+
* The resulting ib after mutation
|
|
19
|
+
*/
|
|
20
|
+
ib: string;
|
|
15
21
|
/**
|
|
16
22
|
* The data field key that was added/modified
|
|
17
23
|
* e.g., "testField_1", "testField_2"
|
|
24
|
+
* Optional - may be undefined for ib-only mutations
|
|
18
25
|
*/
|
|
19
|
-
key
|
|
26
|
+
key?: string;
|
|
20
27
|
/**
|
|
21
28
|
* The value that was set to the field
|
|
22
|
-
*
|
|
29
|
+
* Optional - may be undefined for ib-only mutations
|
|
23
30
|
*/
|
|
24
|
-
value
|
|
31
|
+
value?: string;
|
|
25
32
|
}
|
|
26
33
|
/**
|
|
27
34
|
* Information returned from a rel8 operation.
|
|
28
35
|
* Captures what relation was added for later verification.
|
|
29
36
|
*/
|
|
30
37
|
export interface TestRel8Info {
|
|
38
|
+
type: 'rel8';
|
|
39
|
+
/**
|
|
40
|
+
* The resulting ib after relation...THIS DOES NOT EXIST ATOW.
|
|
41
|
+
* I need to implement the ability to mut8 the ib when doing a rel8
|
|
42
|
+
* transform. This property is questionable right now.
|
|
43
|
+
*/
|
|
44
|
+
ib: string;
|
|
31
45
|
/**
|
|
32
46
|
* The rel8n name that was used
|
|
33
47
|
* e.g., "testrel8n_1", "testrel8n_2"
|
|
34
48
|
*/
|
|
35
49
|
rel8nName: string;
|
|
36
50
|
/**
|
|
37
|
-
* The ibgibs that were related
|
|
51
|
+
* The addresses of ibgibs that were related
|
|
38
52
|
*/
|
|
39
|
-
|
|
53
|
+
targetAddrs: string[];
|
|
40
54
|
}
|
|
41
55
|
/**
|
|
42
56
|
* Aggregated information about test operations.
|
|
@@ -59,14 +73,18 @@ export interface TestStepInfo {
|
|
|
59
73
|
* The current ibGib after all operations
|
|
60
74
|
*/
|
|
61
75
|
ibGib: IbGib_V1;
|
|
76
|
+
/**
|
|
77
|
+
* addr of {@link ibGib}
|
|
78
|
+
*/
|
|
79
|
+
addr: IbGibAddr;
|
|
62
80
|
/**
|
|
63
81
|
* The space this test operates in
|
|
64
82
|
*/
|
|
65
83
|
space: IbGibSpaceAny;
|
|
66
84
|
/**
|
|
67
|
-
*
|
|
85
|
+
* Metaspace for timeline operations
|
|
68
86
|
*/
|
|
69
|
-
metaspace
|
|
87
|
+
metaspace: MetaspaceService;
|
|
70
88
|
/**
|
|
71
89
|
* Array of operation infos in order executed
|
|
72
90
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"test-types.d.mts","sourceRoot":"","sources":["../src/test-types.mts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,iCAAiC,CAAC;AAC3D,OAAO,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAC;AAClE,OAAO,EAAE,gBAAgB,EAAE,MAAM,+CAA+C,CAAC;
|
|
1
|
+
{"version":3,"file":"test-types.d.mts","sourceRoot":"","sources":["../src/test-types.mts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,iCAAiC,CA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