sensemaking 0.20.0 → 0.21.0
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 +0 -1
- package/dist/cjs/config/access.d.cts +0 -1
- package/dist/cjs/config/access.d.ts +0 -1
- package/dist/cjs/config/access.js +10 -17
- package/dist/cjs/config/access.js.map +1 -1
- package/dist/cjs/config/index.d.cts +1 -1
- package/dist/cjs/config/index.d.ts +1 -1
- package/dist/cjs/config/index.js +0 -3
- package/dist/cjs/config/index.js.map +1 -1
- package/dist/cjs/config/types.d.cts +0 -3
- package/dist/cjs/config/types.d.ts +0 -3
- package/dist/cjs/config/types.js.map +1 -1
- package/dist/cjs/config/validate.js +6 -24
- package/dist/cjs/config/validate.js.map +1 -1
- package/dist/cjs/errors.d.cts +1 -1
- package/dist/cjs/errors.d.ts +1 -1
- package/dist/cjs/errors.js.map +1 -1
- package/dist/cjs/features/links.js +4 -5
- package/dist/cjs/features/links.js.map +1 -1
- package/dist/cjs/features/sections.js +4 -1
- package/dist/cjs/features/sections.js.map +1 -1
- package/dist/cjs/store/builder.d.cts +9 -1
- package/dist/cjs/store/builder.d.ts +9 -1
- package/dist/cjs/store/builder.js +593 -2
- package/dist/cjs/store/builder.js.map +1 -1
- package/dist/cjs/store/duckdb/open.js +7 -1
- package/dist/cjs/store/duckdb/open.js.map +1 -1
- package/dist/cjs/store/duckdb/reconcile.js +30 -5
- package/dist/cjs/store/duckdb/reconcile.js.map +1 -1
- package/dist/cjs/store/embed-scope.d.cts +2 -0
- package/dist/cjs/store/embed-scope.d.ts +2 -0
- package/dist/cjs/store/embed-scope.js +85 -0
- package/dist/cjs/store/embed-scope.js.map +1 -0
- package/dist/cjs/store/feature-scope.d.cts +8 -0
- package/dist/cjs/store/feature-scope.d.ts +8 -0
- package/dist/cjs/store/feature-scope.js +107 -0
- package/dist/cjs/store/feature-scope.js.map +1 -0
- package/dist/cjs/store/open.js +193 -101
- package/dist/cjs/store/open.js.map +1 -1
- package/dist/cjs/store/preset-scope.d.cts +3 -0
- package/dist/cjs/store/preset-scope.d.ts +3 -0
- package/dist/cjs/store/preset-scope.js +293 -0
- package/dist/cjs/store/preset-scope.js.map +1 -0
- package/dist/cjs/store/reconcile.d.cts +1 -1
- package/dist/cjs/store/reconcile.d.ts +1 -1
- package/dist/cjs/store/reconcile.js +172 -178
- package/dist/cjs/store/reconcile.js.map +1 -1
- package/dist/cjs/store/signature.js +7 -5
- package/dist/cjs/store/signature.js.map +1 -1
- package/dist/cjs/store/sqlite/lexical.d.cts +1 -1
- package/dist/cjs/store/sqlite/lexical.d.ts +1 -1
- package/dist/cjs/store/sqlite/lexical.js +2 -2
- package/dist/cjs/store/sqlite/lexical.js.map +1 -1
- package/dist/cjs/store/sqlite/open.d.cts +0 -1
- package/dist/cjs/store/sqlite/open.d.ts +0 -1
- package/dist/cjs/store/sqlite/open.js +14 -231
- package/dist/cjs/store/sqlite/open.js.map +1 -1
- package/dist/cjs/store/sqlite/reconcile.d.cts +1 -1
- package/dist/cjs/store/sqlite/reconcile.d.ts +1 -1
- package/dist/cjs/store/sqlite/reconcile.js +78 -16
- package/dist/cjs/store/sqlite/reconcile.js.map +1 -1
- package/dist/cjs/store/sqlite/sql-functions.d.cts +1 -1
- package/dist/cjs/store/sqlite/sql-functions.d.ts +1 -1
- package/dist/cjs/store/sqlite/sql-functions.js +3 -3
- package/dist/cjs/store/sqlite/sql-functions.js.map +1 -1
- package/dist/cjs/store/sqlite/store.d.cts +1 -2
- package/dist/cjs/store/sqlite/store.d.ts +1 -2
- package/dist/cjs/store/sqlite/store.js +2 -3
- package/dist/cjs/store/sqlite/store.js.map +1 -1
- package/dist/cjs/store/turso/open.js +6 -0
- package/dist/cjs/store/turso/open.js.map +1 -1
- package/dist/cjs/store/turso/reconcile.js +72 -3
- package/dist/cjs/store/turso/reconcile.js.map +1 -1
- package/dist/cjs/store/types.d.cts +2 -4
- package/dist/cjs/store/types.d.ts +2 -4
- package/dist/cjs/store/types.js.map +1 -1
- package/dist/esm/config/access.d.ts +0 -1
- package/dist/esm/config/access.js +12 -17
- package/dist/esm/config/access.js.map +1 -1
- package/dist/esm/config/index.d.ts +1 -1
- package/dist/esm/config/index.js +1 -1
- package/dist/esm/config/index.js.map +1 -1
- package/dist/esm/config/types.d.ts +0 -3
- package/dist/esm/config/types.js.map +1 -1
- package/dist/esm/config/validate.js +6 -22
- package/dist/esm/config/validate.js.map +1 -1
- package/dist/esm/errors.d.ts +1 -1
- package/dist/esm/errors.js.map +1 -1
- package/dist/esm/features/links.js +3 -4
- package/dist/esm/features/links.js.map +1 -1
- package/dist/esm/features/sections.js +4 -1
- package/dist/esm/features/sections.js.map +1 -1
- package/dist/esm/store/builder.d.ts +9 -1
- package/dist/esm/store/builder.js +152 -3
- package/dist/esm/store/builder.js.map +1 -1
- package/dist/esm/store/duckdb/open.js +5 -1
- package/dist/esm/store/duckdb/open.js.map +1 -1
- package/dist/esm/store/duckdb/reconcile.js +11 -3
- package/dist/esm/store/duckdb/reconcile.js.map +1 -1
- package/dist/esm/store/embed-scope.d.ts +2 -0
- package/dist/esm/store/embed-scope.js +28 -0
- package/dist/esm/store/embed-scope.js.map +1 -0
- package/dist/esm/store/feature-scope.d.ts +8 -0
- package/dist/esm/store/feature-scope.js +49 -0
- package/dist/esm/store/feature-scope.js.map +1 -0
- package/dist/esm/store/open.js +78 -28
- package/dist/esm/store/open.js.map +1 -1
- package/dist/esm/store/preset-scope.d.ts +3 -0
- package/dist/esm/store/preset-scope.js +77 -0
- package/dist/esm/store/preset-scope.js.map +1 -0
- package/dist/esm/store/reconcile.d.ts +1 -1
- package/dist/esm/store/reconcile.js +30 -5
- package/dist/esm/store/reconcile.js.map +1 -1
- package/dist/esm/store/signature.js +7 -5
- package/dist/esm/store/signature.js.map +1 -1
- package/dist/esm/store/sqlite/lexical.d.ts +1 -1
- package/dist/esm/store/sqlite/lexical.js +4 -4
- package/dist/esm/store/sqlite/lexical.js.map +1 -1
- package/dist/esm/store/sqlite/open.d.ts +0 -1
- package/dist/esm/store/sqlite/open.js +14 -88
- package/dist/esm/store/sqlite/open.js.map +1 -1
- package/dist/esm/store/sqlite/reconcile.d.ts +1 -1
- package/dist/esm/store/sqlite/reconcile.js +14 -14
- package/dist/esm/store/sqlite/reconcile.js.map +1 -1
- package/dist/esm/store/sqlite/sql-functions.d.ts +1 -1
- package/dist/esm/store/sqlite/sql-functions.js +3 -3
- package/dist/esm/store/sqlite/sql-functions.js.map +1 -1
- package/dist/esm/store/sqlite/store.d.ts +1 -2
- package/dist/esm/store/sqlite/store.js +2 -3
- package/dist/esm/store/sqlite/store.js.map +1 -1
- package/dist/esm/store/turso/open.js +4 -0
- package/dist/esm/store/turso/open.js.map +1 -1
- package/dist/esm/store/turso/reconcile.js +6 -2
- package/dist/esm/store/turso/reconcile.js.map +1 -1
- package/dist/esm/store/types.d.ts +2 -4
- package/dist/esm/store/types.js.map +1 -1
- package/package.json +3 -2
- package/schema.json +0 -11
|
@@ -200,7 +200,7 @@ var CORE_FRONTMATTER_COLUMNS = new Set([
|
|
|
200
200
|
'_size',
|
|
201
201
|
'_parse_error'
|
|
202
202
|
]);
|
|
203
|
-
function reconcile(conn, cfg, baseDir, dialect, pool) {
|
|
203
|
+
function reconcile(conn, cfg, baseDir, dialect, pool, forcedPaths) {
|
|
204
204
|
return _async_to_generator(function() {
|
|
205
205
|
var files, currentSet, existingStmt, existingRows, existing, vanished, toReparse, features, seenColumns, report, _ref, parsedDocs, warnings, newColumns, _iteratorNormalCompletion, _didIteratorError, _iteratorError, _iterator, _step, col, allColumns, writableColumns, insertSql, added, delta, addedSet, reparsedExisting, touched, txStart, durationMs;
|
|
206
206
|
return _ts_generator(this, function(_state) {
|
|
@@ -228,14 +228,20 @@ function reconcile(conn, cfg, baseDir, dialect, pool) {
|
|
|
228
228
|
r
|
|
229
229
|
];
|
|
230
230
|
}));
|
|
231
|
+
// A path whose coverage moved between presets (forcedPaths) but is no longer covered at all is
|
|
232
|
+
// already caught below by !currentSet.has, since it can only be forced by having existed under
|
|
233
|
+
// an old preset's match, which means it was reconciled into `existing` already.
|
|
231
234
|
vanished = existingRows.filter(function(r) {
|
|
232
235
|
return !currentSet.has(r.path);
|
|
233
236
|
}).map(function(r) {
|
|
234
237
|
return r.path;
|
|
235
238
|
});
|
|
239
|
+
// forcedPaths treats an unchanged file as touched because its preset coverage moved, not its
|
|
240
|
+
// stamp -- reconcile still owns add/update/remove and every cross-feature cascade for it.
|
|
236
241
|
toReparse = files.filter(function(f) {
|
|
242
|
+
var _ref;
|
|
237
243
|
var row = existing.get(f.relPath);
|
|
238
|
-
return !row || row._mtime !== f.mtimeMs || row._size !== f.size;
|
|
244
|
+
return !row || row._mtime !== f.mtimeMs || row._size !== f.size || ((_ref = forcedPaths === null || forcedPaths === void 0 ? void 0 : forcedPaths.has(f.relPath)) !== null && _ref !== void 0 ? _ref : false);
|
|
239
245
|
});
|
|
240
246
|
if (vanished.length === 0 && toReparse.length === 0) return [
|
|
241
247
|
2,
|
|
@@ -328,7 +334,7 @@ function reconcile(conn, cfg, baseDir, dialect, pool) {
|
|
|
328
334
|
4,
|
|
329
335
|
(0, _transactionts.withTransaction)(conn, function() {
|
|
330
336
|
return _async_to_generator(function() {
|
|
331
|
-
var _feature_remove, _feature_afterReconcile, present,
|
|
337
|
+
var _feature_remove, _feature_afterReconcile, present, missingColumns, contentTouched, currentPathsStmt, currentPaths, _, staleAdded, rows, presetRows, _iteratorNormalCompletion, _didIteratorError, _iteratorError, _iteratorNormalCompletion1, _didIteratorError1, _iteratorError1, _iterator, _step, doc, _iterator1, _step1, presetName, _iteratorNormalCompletion2, _didIteratorError2, _iteratorError2, _iterator2, _step2, feature, err, _iteratorNormalCompletion3, _didIteratorError3, _iteratorError3, _loop, _iterator3, _step3, err, _iteratorNormalCompletion4, _didIteratorError4, _iteratorError4, _iterator4, _step4, feature1, err;
|
|
332
338
|
return _ts_generator(this, function(_state) {
|
|
333
339
|
switch(_state.label){
|
|
334
340
|
case 0:
|
|
@@ -338,70 +344,58 @@ function reconcile(conn, cfg, baseDir, dialect, pool) {
|
|
|
338
344
|
];
|
|
339
345
|
case 1:
|
|
340
346
|
present = _state.sent();
|
|
341
|
-
|
|
342
|
-
|
|
347
|
+
missingColumns = newColumns.filter(function(col) {
|
|
348
|
+
return !present.has(col);
|
|
349
|
+
});
|
|
350
|
+
if (!(missingColumns.length > 0)) return [
|
|
351
|
+
3,
|
|
352
|
+
3
|
|
353
|
+
];
|
|
354
|
+
return [
|
|
355
|
+
4,
|
|
356
|
+
dialect.addColumns(conn, missingColumns)
|
|
357
|
+
];
|
|
343
358
|
case 2:
|
|
344
|
-
_state.
|
|
345
|
-
2,
|
|
346
|
-
7,
|
|
347
|
-
8,
|
|
348
|
-
9
|
|
349
|
-
]);
|
|
350
|
-
_iterator = newColumns[Symbol.iterator]();
|
|
359
|
+
_state.sent();
|
|
351
360
|
_state.label = 3;
|
|
352
361
|
case 3:
|
|
353
|
-
|
|
362
|
+
// Revalidated once the lock is held, before this process's own frontmatter upsert below:
|
|
363
|
+
// `added` came from a path read taken before this transaction's lock, so a path still
|
|
364
|
+
// called "added" here may already have a content row from a concurrent reconcile that
|
|
365
|
+
// committed while this one waited. One SELECT, not a DELETE per added file -- with no
|
|
366
|
+
// contention it returns the same set `existing` already ruled out, so nothing extra clears.
|
|
367
|
+
contentTouched = touched;
|
|
368
|
+
if (!(added.length > 0)) return [
|
|
354
369
|
3,
|
|
355
370
|
6
|
|
356
371
|
];
|
|
357
|
-
col = _step.value;
|
|
358
|
-
if (!!present.has(col)) return [
|
|
359
|
-
3,
|
|
360
|
-
5
|
|
361
|
-
];
|
|
362
372
|
return [
|
|
363
373
|
4,
|
|
364
|
-
conn.
|
|
374
|
+
conn.prepare('SELECT "path" FROM frontmatter')
|
|
365
375
|
];
|
|
366
376
|
case 4:
|
|
367
|
-
_state.sent();
|
|
368
|
-
|
|
369
|
-
case 5:
|
|
370
|
-
_iteratorNormalCompletion = true;
|
|
377
|
+
currentPathsStmt = _state.sent();
|
|
378
|
+
_ = Set.bind;
|
|
371
379
|
return [
|
|
372
|
-
|
|
373
|
-
|
|
380
|
+
4,
|
|
381
|
+
currentPathsStmt.all()
|
|
374
382
|
];
|
|
383
|
+
case 5:
|
|
384
|
+
currentPaths = new (_.apply(Set, [
|
|
385
|
+
void 0,
|
|
386
|
+
_state.sent().map(function(r) {
|
|
387
|
+
return r.path;
|
|
388
|
+
})
|
|
389
|
+
]));
|
|
390
|
+
staleAdded = added.filter(function(p) {
|
|
391
|
+
return currentPaths.has(p);
|
|
392
|
+
});
|
|
393
|
+
if (staleAdded.length > 0) contentTouched = _to_consumable_array(touched).concat(_to_consumable_array(staleAdded));
|
|
394
|
+
_state.label = 6;
|
|
375
395
|
case 6:
|
|
376
|
-
return [
|
|
377
|
-
3,
|
|
378
|
-
9
|
|
379
|
-
];
|
|
380
|
-
case 7:
|
|
381
|
-
err = _state.sent();
|
|
382
|
-
_didIteratorError = true;
|
|
383
|
-
_iteratorError = err;
|
|
384
|
-
return [
|
|
385
|
-
3,
|
|
386
|
-
9
|
|
387
|
-
];
|
|
388
|
-
case 8:
|
|
389
|
-
try {
|
|
390
|
-
if (!_iteratorNormalCompletion && _iterator.return != null) {
|
|
391
|
-
_iterator.return();
|
|
392
|
-
}
|
|
393
|
-
} finally{
|
|
394
|
-
if (_didIteratorError) {
|
|
395
|
-
throw _iteratorError;
|
|
396
|
-
}
|
|
397
|
-
}
|
|
398
|
-
return [
|
|
399
|
-
7
|
|
400
|
-
];
|
|
401
|
-
case 9:
|
|
402
396
|
if (!(parsedDocs.length > 0)) return [
|
|
403
397
|
3,
|
|
404
|
-
|
|
398
|
+
8
|
|
405
399
|
];
|
|
406
400
|
rows = parsedDocs.map(function(doc) {
|
|
407
401
|
return writableColumns.map(function(col) {
|
|
@@ -419,21 +413,21 @@ function reconcile(conn, cfg, baseDir, dialect, pool) {
|
|
|
419
413
|
4,
|
|
420
414
|
conn.runBatch(insertSql, rows)
|
|
421
415
|
];
|
|
422
|
-
case
|
|
416
|
+
case 7:
|
|
423
417
|
_state.sent();
|
|
424
|
-
_state.label =
|
|
425
|
-
case
|
|
418
|
+
_state.label = 8;
|
|
419
|
+
case 8:
|
|
426
420
|
// After the upsert, so every doc already has the frontmatter row sqlite's content rowid
|
|
427
421
|
// couples to. ON CONFLICT DO UPDATE preserves that rowid, so a reparse keeps its identity.
|
|
428
422
|
return [
|
|
429
423
|
4,
|
|
430
|
-
dialect.reconcileContent(conn,
|
|
424
|
+
dialect.reconcileContent(conn, contentTouched, parsedDocs, delta, cfg)
|
|
431
425
|
];
|
|
432
|
-
case
|
|
426
|
+
case 9:
|
|
433
427
|
_state.sent();
|
|
434
428
|
if (!(touched.length > 0)) return [
|
|
435
429
|
3,
|
|
436
|
-
|
|
430
|
+
11
|
|
437
431
|
];
|
|
438
432
|
return [
|
|
439
433
|
4,
|
|
@@ -443,67 +437,67 @@ function reconcile(conn, cfg, baseDir, dialect, pool) {
|
|
|
443
437
|
];
|
|
444
438
|
}))
|
|
445
439
|
];
|
|
446
|
-
case
|
|
440
|
+
case 10:
|
|
447
441
|
_state.sent();
|
|
448
|
-
_state.label =
|
|
449
|
-
case
|
|
442
|
+
_state.label = 11;
|
|
443
|
+
case 11:
|
|
450
444
|
presetRows = [];
|
|
451
|
-
|
|
445
|
+
_iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined, _iteratorNormalCompletion1 = true, _didIteratorError1 = false, _iteratorError1 = undefined;
|
|
452
446
|
try {
|
|
453
|
-
for(
|
|
454
|
-
doc =
|
|
447
|
+
for(_iterator = parsedDocs[Symbol.iterator](); !(_iteratorNormalCompletion1 = (_step = _iterator.next()).done); _iteratorNormalCompletion1 = true){
|
|
448
|
+
doc = _step.value;
|
|
455
449
|
try {
|
|
456
|
-
for(
|
|
457
|
-
presetName =
|
|
450
|
+
for(_iterator1 = doc.presets[Symbol.iterator](); !(_iteratorNormalCompletion = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion = true){
|
|
451
|
+
presetName = _step1.value;
|
|
458
452
|
presetRows.push([
|
|
459
453
|
doc.relPath,
|
|
460
454
|
presetName
|
|
461
455
|
]);
|
|
462
456
|
}
|
|
463
457
|
} catch (err) {
|
|
464
|
-
|
|
465
|
-
|
|
458
|
+
_didIteratorError = true;
|
|
459
|
+
_iteratorError = err;
|
|
466
460
|
} finally{
|
|
467
461
|
try {
|
|
468
|
-
if (!
|
|
469
|
-
|
|
462
|
+
if (!_iteratorNormalCompletion && _iterator1.return != null) {
|
|
463
|
+
_iterator1.return();
|
|
470
464
|
}
|
|
471
465
|
} finally{
|
|
472
|
-
if (
|
|
473
|
-
throw
|
|
466
|
+
if (_didIteratorError) {
|
|
467
|
+
throw _iteratorError;
|
|
474
468
|
}
|
|
475
469
|
}
|
|
476
470
|
}
|
|
477
471
|
}
|
|
478
472
|
} catch (err) {
|
|
479
|
-
|
|
480
|
-
|
|
473
|
+
_didIteratorError1 = true;
|
|
474
|
+
_iteratorError1 = err;
|
|
481
475
|
} finally{
|
|
482
476
|
try {
|
|
483
|
-
if (!
|
|
484
|
-
|
|
477
|
+
if (!_iteratorNormalCompletion1 && _iterator.return != null) {
|
|
478
|
+
_iterator.return();
|
|
485
479
|
}
|
|
486
480
|
} finally{
|
|
487
|
-
if (
|
|
488
|
-
throw
|
|
481
|
+
if (_didIteratorError1) {
|
|
482
|
+
throw _iteratorError1;
|
|
489
483
|
}
|
|
490
484
|
}
|
|
491
485
|
}
|
|
492
486
|
if (!(presetRows.length > 0)) return [
|
|
493
487
|
3,
|
|
494
|
-
|
|
488
|
+
13
|
|
495
489
|
];
|
|
496
490
|
return [
|
|
497
491
|
4,
|
|
498
|
-
conn.runBatch('INSERT INTO preset_files ("path", preset) VALUES (?, ?)', presetRows)
|
|
492
|
+
conn.runBatch('INSERT INTO preset_files ("path", preset) VALUES (?, ?) ON CONFLICT("path", preset) DO NOTHING', presetRows)
|
|
499
493
|
];
|
|
500
|
-
case
|
|
494
|
+
case 12:
|
|
501
495
|
_state.sent();
|
|
502
|
-
_state.label =
|
|
503
|
-
case
|
|
496
|
+
_state.label = 13;
|
|
497
|
+
case 13:
|
|
504
498
|
if (!(vanished.length > 0)) return [
|
|
505
499
|
3,
|
|
506
|
-
|
|
500
|
+
15
|
|
507
501
|
];
|
|
508
502
|
return [
|
|
509
503
|
4,
|
|
@@ -513,86 +507,86 @@ function reconcile(conn, cfg, baseDir, dialect, pool) {
|
|
|
513
507
|
];
|
|
514
508
|
}))
|
|
515
509
|
];
|
|
516
|
-
case
|
|
510
|
+
case 14:
|
|
517
511
|
_state.sent();
|
|
518
|
-
_state.label =
|
|
519
|
-
case
|
|
520
|
-
|
|
512
|
+
_state.label = 15;
|
|
513
|
+
case 15:
|
|
514
|
+
_iteratorNormalCompletion2 = true, _didIteratorError2 = false, _iteratorError2 = undefined;
|
|
521
515
|
if (!(touched.length > 0)) return [
|
|
522
516
|
3,
|
|
523
|
-
|
|
517
|
+
23
|
|
524
518
|
];
|
|
525
|
-
_state.label =
|
|
526
|
-
case
|
|
519
|
+
_state.label = 16;
|
|
520
|
+
case 16:
|
|
527
521
|
_state.trys.push([
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
522
|
+
16,
|
|
523
|
+
21,
|
|
524
|
+
22,
|
|
525
|
+
23
|
|
532
526
|
]);
|
|
533
|
-
|
|
534
|
-
_state.label =
|
|
535
|
-
case
|
|
536
|
-
if (!!(
|
|
527
|
+
_iterator2 = features[Symbol.iterator]();
|
|
528
|
+
_state.label = 17;
|
|
529
|
+
case 17:
|
|
530
|
+
if (!!(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done)) return [
|
|
537
531
|
3,
|
|
538
|
-
|
|
532
|
+
20
|
|
539
533
|
];
|
|
540
|
-
feature =
|
|
534
|
+
feature = _step2.value;
|
|
541
535
|
return [
|
|
542
536
|
4,
|
|
543
537
|
(_feature_remove = feature.remove) === null || _feature_remove === void 0 ? void 0 : _feature_remove.call(feature, conn, touched, delta)
|
|
544
538
|
];
|
|
545
|
-
case
|
|
539
|
+
case 18:
|
|
546
540
|
_state.sent();
|
|
547
|
-
_state.label =
|
|
548
|
-
case
|
|
549
|
-
|
|
541
|
+
_state.label = 19;
|
|
542
|
+
case 19:
|
|
543
|
+
_iteratorNormalCompletion2 = true;
|
|
550
544
|
return [
|
|
551
545
|
3,
|
|
552
|
-
|
|
546
|
+
17
|
|
553
547
|
];
|
|
554
|
-
case
|
|
548
|
+
case 20:
|
|
555
549
|
return [
|
|
556
550
|
3,
|
|
557
|
-
|
|
551
|
+
23
|
|
558
552
|
];
|
|
559
|
-
case
|
|
553
|
+
case 21:
|
|
560
554
|
err = _state.sent();
|
|
561
|
-
|
|
562
|
-
|
|
555
|
+
_didIteratorError2 = true;
|
|
556
|
+
_iteratorError2 = err;
|
|
563
557
|
return [
|
|
564
558
|
3,
|
|
565
|
-
|
|
559
|
+
23
|
|
566
560
|
];
|
|
567
|
-
case
|
|
561
|
+
case 22:
|
|
568
562
|
try {
|
|
569
|
-
if (!
|
|
570
|
-
|
|
563
|
+
if (!_iteratorNormalCompletion2 && _iterator2.return != null) {
|
|
564
|
+
_iterator2.return();
|
|
571
565
|
}
|
|
572
566
|
} finally{
|
|
573
|
-
if (
|
|
574
|
-
throw
|
|
567
|
+
if (_didIteratorError2) {
|
|
568
|
+
throw _iteratorError2;
|
|
575
569
|
}
|
|
576
570
|
}
|
|
577
571
|
return [
|
|
578
572
|
7
|
|
579
573
|
];
|
|
580
|
-
case
|
|
581
|
-
|
|
582
|
-
_state.label =
|
|
583
|
-
case
|
|
574
|
+
case 23:
|
|
575
|
+
_iteratorNormalCompletion3 = true, _didIteratorError3 = false, _iteratorError3 = undefined;
|
|
576
|
+
_state.label = 24;
|
|
577
|
+
case 24:
|
|
584
578
|
_state.trys.push([
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
579
|
+
24,
|
|
580
|
+
29,
|
|
581
|
+
30,
|
|
582
|
+
31
|
|
589
583
|
]);
|
|
590
584
|
_loop = function() {
|
|
591
585
|
var feature, _feature_store, docsForFeature;
|
|
592
586
|
return _ts_generator(this, function(_state) {
|
|
593
587
|
switch(_state.label){
|
|
594
588
|
case 0:
|
|
595
|
-
feature =
|
|
589
|
+
feature = _step3.value;
|
|
596
590
|
docsForFeature = parsedDocs.map(function(doc) {
|
|
597
591
|
return {
|
|
598
592
|
path: doc.relPath,
|
|
@@ -611,110 +605,110 @@ function reconcile(conn, cfg, baseDir, dialect, pool) {
|
|
|
611
605
|
}
|
|
612
606
|
});
|
|
613
607
|
};
|
|
614
|
-
|
|
615
|
-
_state.label =
|
|
616
|
-
case
|
|
617
|
-
if (!!(
|
|
608
|
+
_iterator3 = features[Symbol.iterator]();
|
|
609
|
+
_state.label = 25;
|
|
610
|
+
case 25:
|
|
611
|
+
if (!!(_iteratorNormalCompletion3 = (_step3 = _iterator3.next()).done)) return [
|
|
618
612
|
3,
|
|
619
|
-
|
|
613
|
+
28
|
|
620
614
|
];
|
|
621
615
|
return [
|
|
622
616
|
5,
|
|
623
617
|
_ts_values(_loop())
|
|
624
618
|
];
|
|
625
|
-
case
|
|
619
|
+
case 26:
|
|
626
620
|
_state.sent();
|
|
627
|
-
_state.label =
|
|
628
|
-
case
|
|
629
|
-
|
|
621
|
+
_state.label = 27;
|
|
622
|
+
case 27:
|
|
623
|
+
_iteratorNormalCompletion3 = true;
|
|
630
624
|
return [
|
|
631
625
|
3,
|
|
632
|
-
|
|
626
|
+
25
|
|
633
627
|
];
|
|
634
|
-
case
|
|
628
|
+
case 28:
|
|
635
629
|
return [
|
|
636
630
|
3,
|
|
637
|
-
|
|
631
|
+
31
|
|
638
632
|
];
|
|
639
|
-
case
|
|
633
|
+
case 29:
|
|
640
634
|
err = _state.sent();
|
|
641
|
-
|
|
642
|
-
|
|
635
|
+
_didIteratorError3 = true;
|
|
636
|
+
_iteratorError3 = err;
|
|
643
637
|
return [
|
|
644
638
|
3,
|
|
645
|
-
|
|
639
|
+
31
|
|
646
640
|
];
|
|
647
|
-
case
|
|
641
|
+
case 30:
|
|
648
642
|
try {
|
|
649
|
-
if (!
|
|
650
|
-
|
|
643
|
+
if (!_iteratorNormalCompletion3 && _iterator3.return != null) {
|
|
644
|
+
_iterator3.return();
|
|
651
645
|
}
|
|
652
646
|
} finally{
|
|
653
|
-
if (
|
|
654
|
-
throw
|
|
647
|
+
if (_didIteratorError3) {
|
|
648
|
+
throw _iteratorError3;
|
|
655
649
|
}
|
|
656
650
|
}
|
|
657
651
|
return [
|
|
658
652
|
7
|
|
659
653
|
];
|
|
660
|
-
case
|
|
661
|
-
|
|
662
|
-
_state.label =
|
|
663
|
-
case
|
|
654
|
+
case 31:
|
|
655
|
+
_iteratorNormalCompletion4 = true, _didIteratorError4 = false, _iteratorError4 = undefined;
|
|
656
|
+
_state.label = 32;
|
|
657
|
+
case 32:
|
|
664
658
|
_state.trys.push([
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
659
|
+
32,
|
|
660
|
+
37,
|
|
661
|
+
38,
|
|
662
|
+
39
|
|
669
663
|
]);
|
|
670
|
-
|
|
671
|
-
_state.label =
|
|
672
|
-
case
|
|
673
|
-
if (!!(
|
|
664
|
+
_iterator4 = features[Symbol.iterator]();
|
|
665
|
+
_state.label = 33;
|
|
666
|
+
case 33:
|
|
667
|
+
if (!!(_iteratorNormalCompletion4 = (_step4 = _iterator4.next()).done)) return [
|
|
674
668
|
3,
|
|
675
|
-
|
|
669
|
+
36
|
|
676
670
|
];
|
|
677
|
-
feature1 =
|
|
671
|
+
feature1 = _step4.value;
|
|
678
672
|
return [
|
|
679
673
|
4,
|
|
680
674
|
(_feature_afterReconcile = feature1.afterReconcile) === null || _feature_afterReconcile === void 0 ? void 0 : _feature_afterReconcile.call(feature1, conn, delta)
|
|
681
675
|
];
|
|
682
|
-
case
|
|
676
|
+
case 34:
|
|
683
677
|
_state.sent();
|
|
684
|
-
_state.label =
|
|
685
|
-
case
|
|
686
|
-
|
|
678
|
+
_state.label = 35;
|
|
679
|
+
case 35:
|
|
680
|
+
_iteratorNormalCompletion4 = true;
|
|
687
681
|
return [
|
|
688
682
|
3,
|
|
689
|
-
|
|
683
|
+
33
|
|
690
684
|
];
|
|
691
|
-
case
|
|
685
|
+
case 36:
|
|
692
686
|
return [
|
|
693
687
|
3,
|
|
694
|
-
|
|
688
|
+
39
|
|
695
689
|
];
|
|
696
|
-
case
|
|
690
|
+
case 37:
|
|
697
691
|
err = _state.sent();
|
|
698
|
-
|
|
699
|
-
|
|
692
|
+
_didIteratorError4 = true;
|
|
693
|
+
_iteratorError4 = err;
|
|
700
694
|
return [
|
|
701
695
|
3,
|
|
702
|
-
|
|
696
|
+
39
|
|
703
697
|
];
|
|
704
|
-
case
|
|
698
|
+
case 38:
|
|
705
699
|
try {
|
|
706
|
-
if (!
|
|
707
|
-
|
|
700
|
+
if (!_iteratorNormalCompletion4 && _iterator4.return != null) {
|
|
701
|
+
_iterator4.return();
|
|
708
702
|
}
|
|
709
703
|
} finally{
|
|
710
|
-
if (
|
|
711
|
-
throw
|
|
704
|
+
if (_didIteratorError4) {
|
|
705
|
+
throw _iteratorError4;
|
|
712
706
|
}
|
|
713
707
|
}
|
|
714
708
|
return [
|
|
715
709
|
7
|
|
716
710
|
];
|
|
717
|
-
case
|
|
711
|
+
case 39:
|
|
718
712
|
return [
|
|
719
713
|
2
|
|
720
714
|
];
|