sensemaking 0.19.2 → 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/chunk/extract.d.cts +1 -0
- package/dist/cjs/chunk/extract.d.ts +1 -0
- package/dist/cjs/chunk/extract.js +23 -5
- package/dist/cjs/chunk/extract.js.map +1 -1
- package/dist/cjs/chunk/index.d.cts +1 -1
- package/dist/cjs/chunk/index.d.ts +1 -1
- package/dist/cjs/chunk/index.js +3 -0
- package/dist/cjs/chunk/index.js.map +1 -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/scan/pool.d.cts +15 -0
- package/dist/cjs/scan/pool.d.ts +15 -0
- package/dist/cjs/scan/pool.js +263 -0
- package/dist/cjs/scan/pool.js.map +1 -0
- package/dist/cjs/scan/reparse.d.cts +2 -0
- package/dist/cjs/scan/reparse.d.ts +2 -0
- package/dist/cjs/scan/reparse.js +15 -76
- package/dist/cjs/scan/reparse.js.map +1 -1
- package/dist/cjs/store/builder.d.cts +19 -0
- package/dist/cjs/store/builder.d.ts +19 -0
- package/dist/cjs/store/builder.js +618 -0
- package/dist/cjs/store/builder.js.map +1 -0
- package/dist/cjs/store/duckdb/lexical.d.cts +1 -0
- package/dist/cjs/store/duckdb/lexical.d.ts +1 -0
- package/dist/cjs/store/duckdb/lexical.js +21 -5
- package/dist/cjs/store/duckdb/lexical.js.map +1 -1
- package/dist/cjs/store/duckdb/open.d.cts +9 -8
- package/dist/cjs/store/duckdb/open.d.ts +9 -8
- package/dist/cjs/store/duckdb/open.js +77 -123
- package/dist/cjs/store/duckdb/open.js.map +1 -1
- package/dist/cjs/store/duckdb/reconcile.js +34 -5
- package/dist/cjs/store/duckdb/reconcile.js.map +1 -1
- package/dist/cjs/store/duckdb/store.d.cts +1 -2
- package/dist/cjs/store/duckdb/store.d.ts +1 -2
- package/dist/cjs/store/duckdb/store.js +1 -26
- package/dist/cjs/store/duckdb/store.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/index.d.cts +8 -3
- package/dist/cjs/store/index.d.ts +8 -3
- package/dist/cjs/store/index.js +36 -7
- package/dist/cjs/store/index.js.map +1 -1
- package/dist/cjs/store/open.d.cts +15 -0
- package/dist/cjs/store/open.d.ts +15 -0
- package/dist/cjs/store/open.js +608 -0
- package/dist/cjs/store/open.js.map +1 -0
- 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 +2 -1
- package/dist/cjs/store/reconcile.d.ts +2 -1
- package/dist/cjs/store/reconcile.js +175 -179
- package/dist/cjs/store/reconcile.js.map +1 -1
- package/dist/cjs/store/{sqlite/signature.d.cts → signature.d.cts} +0 -3
- package/dist/cjs/store/{sqlite/signature.d.ts → signature.d.ts} +0 -3
- package/dist/cjs/store/signature.js +164 -0
- package/dist/cjs/store/signature.js.map +1 -0
- 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 +8 -9
- package/dist/cjs/store/sqlite/open.d.ts +8 -9
- package/dist/cjs/store/sqlite/open.js +82 -311
- 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 -15
- package/dist/cjs/store/sqlite/store.js.map +1 -1
- package/dist/cjs/store/turso/open.d.cts +6 -11
- package/dist/cjs/store/turso/open.d.ts +6 -11
- package/dist/cjs/store/turso/open.js +85 -171
- package/dist/cjs/store/turso/open.js.map +1 -1
- package/dist/cjs/store/turso/reconcile.d.cts +2 -0
- package/dist/cjs/store/turso/reconcile.d.ts +2 -0
- package/dist/cjs/store/turso/reconcile.js +88 -8
- package/dist/cjs/store/turso/reconcile.js.map +1 -1
- package/dist/cjs/store/turso/store.d.cts +1 -2
- package/dist/cjs/store/turso/store.d.ts +1 -2
- package/dist/cjs/store/turso/store.js +1 -13
- package/dist/cjs/store/turso/store.js.map +1 -1
- package/dist/cjs/store/types.d.cts +16 -6
- package/dist/cjs/store/types.d.ts +16 -6
- package/dist/cjs/store/types.js.map +1 -1
- package/dist/cjs/text/strip.js +3 -6
- package/dist/cjs/text/strip.js.map +1 -1
- package/dist/cjs/watch.js +28 -16
- package/dist/cjs/watch.js.map +1 -1
- package/dist/esm/chunk/extract.d.ts +1 -0
- package/dist/esm/chunk/extract.js +10 -2
- package/dist/esm/chunk/extract.js.map +1 -1
- package/dist/esm/chunk/index.d.ts +1 -1
- package/dist/esm/chunk/index.js +1 -1
- package/dist/esm/chunk/index.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/scan/pool.d.ts +15 -0
- package/dist/esm/scan/pool.js +77 -0
- package/dist/esm/scan/pool.js.map +1 -0
- package/dist/esm/scan/reparse.d.ts +2 -0
- package/dist/esm/scan/reparse.js +11 -58
- package/dist/esm/scan/reparse.js.map +1 -1
- package/dist/esm/store/builder.d.ts +19 -0
- package/dist/esm/store/builder.js +163 -0
- package/dist/esm/store/builder.js.map +1 -0
- package/dist/esm/store/duckdb/lexical.d.ts +1 -0
- package/dist/esm/store/duckdb/lexical.js +22 -9
- package/dist/esm/store/duckdb/lexical.js.map +1 -1
- package/dist/esm/store/duckdb/open.d.ts +9 -8
- package/dist/esm/store/duckdb/open.js +36 -58
- package/dist/esm/store/duckdb/open.js.map +1 -1
- package/dist/esm/store/duckdb/reconcile.js +15 -3
- package/dist/esm/store/duckdb/reconcile.js.map +1 -1
- package/dist/esm/store/duckdb/store.d.ts +1 -2
- package/dist/esm/store/duckdb/store.js +2 -11
- package/dist/esm/store/duckdb/store.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/index.d.ts +8 -3
- package/dist/esm/store/index.js +22 -7
- package/dist/esm/store/index.js.map +1 -1
- package/dist/esm/store/open.d.ts +15 -0
- package/dist/esm/store/open.js +187 -0
- package/dist/esm/store/open.js.map +1 -0
- 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 +2 -1
- package/dist/esm/store/reconcile.js +33 -6
- package/dist/esm/store/reconcile.js.map +1 -1
- package/dist/esm/store/{sqlite/signature.d.ts → signature.d.ts} +0 -3
- package/dist/esm/store/signature.js +37 -0
- package/dist/esm/store/signature.js.map +1 -0
- 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 +8 -9
- package/dist/esm/store/sqlite/open.js +41 -147
- 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 +3 -9
- package/dist/esm/store/sqlite/store.js.map +1 -1
- package/dist/esm/store/turso/open.d.ts +6 -11
- package/dist/esm/store/turso/open.js +34 -78
- package/dist/esm/store/turso/open.js.map +1 -1
- package/dist/esm/store/turso/reconcile.d.ts +2 -0
- package/dist/esm/store/turso/reconcile.js +18 -3
- package/dist/esm/store/turso/reconcile.js.map +1 -1
- package/dist/esm/store/turso/store.d.ts +1 -2
- package/dist/esm/store/turso/store.js +2 -7
- package/dist/esm/store/turso/store.js.map +1 -1
- package/dist/esm/store/types.d.ts +16 -6
- package/dist/esm/store/types.js.map +1 -1
- package/dist/esm/text/strip.js +3 -4
- package/dist/esm/text/strip.js.map +1 -1
- package/dist/esm/watch.js +5 -3
- package/dist/esm/watch.js.map +1 -1
- package/package.json +4 -3
- package/schema.json +0 -11
- package/dist/cjs/store/sqlite/signature.js +0 -380
- package/dist/cjs/store/sqlite/signature.js.map +0 -1
- package/dist/esm/store/sqlite/signature.js +0 -58
- package/dist/esm/store/sqlite/signature.js.map +0 -1
|
@@ -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) {
|
|
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) {
|
|
|
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,
|
|
@@ -256,7 +262,9 @@ function reconcile(conn, cfg, baseDir, dialect) {
|
|
|
256
262
|
report = (0, _progressts.progress)('reparsing files', toReparse.length);
|
|
257
263
|
return [
|
|
258
264
|
4,
|
|
259
|
-
(0, _reparsets.reparseFiles)(toReparse, features, cfg, seenColumns, report.tick
|
|
265
|
+
(0, _reparsets.reparseFiles)(toReparse, features, cfg, seenColumns, report.tick, {
|
|
266
|
+
pool: pool
|
|
267
|
+
})
|
|
260
268
|
];
|
|
261
269
|
case 4:
|
|
262
270
|
_ref = _state.sent(), parsedDocs = _ref.docs, warnings = _ref.warnings, newColumns = _ref.newColumns;
|
|
@@ -326,7 +334,7 @@ function reconcile(conn, cfg, baseDir, dialect) {
|
|
|
326
334
|
4,
|
|
327
335
|
(0, _transactionts.withTransaction)(conn, function() {
|
|
328
336
|
return _async_to_generator(function() {
|
|
329
|
-
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;
|
|
330
338
|
return _ts_generator(this, function(_state) {
|
|
331
339
|
switch(_state.label){
|
|
332
340
|
case 0:
|
|
@@ -336,70 +344,58 @@ function reconcile(conn, cfg, baseDir, dialect) {
|
|
|
336
344
|
];
|
|
337
345
|
case 1:
|
|
338
346
|
present = _state.sent();
|
|
339
|
-
|
|
340
|
-
|
|
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
|
+
];
|
|
341
358
|
case 2:
|
|
342
|
-
_state.
|
|
343
|
-
2,
|
|
344
|
-
7,
|
|
345
|
-
8,
|
|
346
|
-
9
|
|
347
|
-
]);
|
|
348
|
-
_iterator = newColumns[Symbol.iterator]();
|
|
359
|
+
_state.sent();
|
|
349
360
|
_state.label = 3;
|
|
350
361
|
case 3:
|
|
351
|
-
|
|
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 [
|
|
352
369
|
3,
|
|
353
370
|
6
|
|
354
371
|
];
|
|
355
|
-
col = _step.value;
|
|
356
|
-
if (!!present.has(col)) return [
|
|
357
|
-
3,
|
|
358
|
-
5
|
|
359
|
-
];
|
|
360
372
|
return [
|
|
361
373
|
4,
|
|
362
|
-
conn.
|
|
374
|
+
conn.prepare('SELECT "path" FROM frontmatter')
|
|
363
375
|
];
|
|
364
376
|
case 4:
|
|
365
|
-
_state.sent();
|
|
366
|
-
|
|
367
|
-
case 5:
|
|
368
|
-
_iteratorNormalCompletion = true;
|
|
377
|
+
currentPathsStmt = _state.sent();
|
|
378
|
+
_ = Set.bind;
|
|
369
379
|
return [
|
|
370
|
-
|
|
371
|
-
|
|
380
|
+
4,
|
|
381
|
+
currentPathsStmt.all()
|
|
372
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;
|
|
373
395
|
case 6:
|
|
374
|
-
return [
|
|
375
|
-
3,
|
|
376
|
-
9
|
|
377
|
-
];
|
|
378
|
-
case 7:
|
|
379
|
-
err = _state.sent();
|
|
380
|
-
_didIteratorError = true;
|
|
381
|
-
_iteratorError = err;
|
|
382
|
-
return [
|
|
383
|
-
3,
|
|
384
|
-
9
|
|
385
|
-
];
|
|
386
|
-
case 8:
|
|
387
|
-
try {
|
|
388
|
-
if (!_iteratorNormalCompletion && _iterator.return != null) {
|
|
389
|
-
_iterator.return();
|
|
390
|
-
}
|
|
391
|
-
} finally{
|
|
392
|
-
if (_didIteratorError) {
|
|
393
|
-
throw _iteratorError;
|
|
394
|
-
}
|
|
395
|
-
}
|
|
396
|
-
return [
|
|
397
|
-
7
|
|
398
|
-
];
|
|
399
|
-
case 9:
|
|
400
396
|
if (!(parsedDocs.length > 0)) return [
|
|
401
397
|
3,
|
|
402
|
-
|
|
398
|
+
8
|
|
403
399
|
];
|
|
404
400
|
rows = parsedDocs.map(function(doc) {
|
|
405
401
|
return writableColumns.map(function(col) {
|
|
@@ -417,21 +413,21 @@ function reconcile(conn, cfg, baseDir, dialect) {
|
|
|
417
413
|
4,
|
|
418
414
|
conn.runBatch(insertSql, rows)
|
|
419
415
|
];
|
|
420
|
-
case
|
|
416
|
+
case 7:
|
|
421
417
|
_state.sent();
|
|
422
|
-
_state.label =
|
|
423
|
-
case
|
|
418
|
+
_state.label = 8;
|
|
419
|
+
case 8:
|
|
424
420
|
// After the upsert, so every doc already has the frontmatter row sqlite's content rowid
|
|
425
421
|
// couples to. ON CONFLICT DO UPDATE preserves that rowid, so a reparse keeps its identity.
|
|
426
422
|
return [
|
|
427
423
|
4,
|
|
428
|
-
dialect.reconcileContent(conn,
|
|
424
|
+
dialect.reconcileContent(conn, contentTouched, parsedDocs, delta, cfg)
|
|
429
425
|
];
|
|
430
|
-
case
|
|
426
|
+
case 9:
|
|
431
427
|
_state.sent();
|
|
432
428
|
if (!(touched.length > 0)) return [
|
|
433
429
|
3,
|
|
434
|
-
|
|
430
|
+
11
|
|
435
431
|
];
|
|
436
432
|
return [
|
|
437
433
|
4,
|
|
@@ -441,67 +437,67 @@ function reconcile(conn, cfg, baseDir, dialect) {
|
|
|
441
437
|
];
|
|
442
438
|
}))
|
|
443
439
|
];
|
|
444
|
-
case
|
|
440
|
+
case 10:
|
|
445
441
|
_state.sent();
|
|
446
|
-
_state.label =
|
|
447
|
-
case
|
|
442
|
+
_state.label = 11;
|
|
443
|
+
case 11:
|
|
448
444
|
presetRows = [];
|
|
449
|
-
|
|
445
|
+
_iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined, _iteratorNormalCompletion1 = true, _didIteratorError1 = false, _iteratorError1 = undefined;
|
|
450
446
|
try {
|
|
451
|
-
for(
|
|
452
|
-
doc =
|
|
447
|
+
for(_iterator = parsedDocs[Symbol.iterator](); !(_iteratorNormalCompletion1 = (_step = _iterator.next()).done); _iteratorNormalCompletion1 = true){
|
|
448
|
+
doc = _step.value;
|
|
453
449
|
try {
|
|
454
|
-
for(
|
|
455
|
-
presetName =
|
|
450
|
+
for(_iterator1 = doc.presets[Symbol.iterator](); !(_iteratorNormalCompletion = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion = true){
|
|
451
|
+
presetName = _step1.value;
|
|
456
452
|
presetRows.push([
|
|
457
453
|
doc.relPath,
|
|
458
454
|
presetName
|
|
459
455
|
]);
|
|
460
456
|
}
|
|
461
457
|
} catch (err) {
|
|
462
|
-
|
|
463
|
-
|
|
458
|
+
_didIteratorError = true;
|
|
459
|
+
_iteratorError = err;
|
|
464
460
|
} finally{
|
|
465
461
|
try {
|
|
466
|
-
if (!
|
|
467
|
-
|
|
462
|
+
if (!_iteratorNormalCompletion && _iterator1.return != null) {
|
|
463
|
+
_iterator1.return();
|
|
468
464
|
}
|
|
469
465
|
} finally{
|
|
470
|
-
if (
|
|
471
|
-
throw
|
|
466
|
+
if (_didIteratorError) {
|
|
467
|
+
throw _iteratorError;
|
|
472
468
|
}
|
|
473
469
|
}
|
|
474
470
|
}
|
|
475
471
|
}
|
|
476
472
|
} catch (err) {
|
|
477
|
-
|
|
478
|
-
|
|
473
|
+
_didIteratorError1 = true;
|
|
474
|
+
_iteratorError1 = err;
|
|
479
475
|
} finally{
|
|
480
476
|
try {
|
|
481
|
-
if (!
|
|
482
|
-
|
|
477
|
+
if (!_iteratorNormalCompletion1 && _iterator.return != null) {
|
|
478
|
+
_iterator.return();
|
|
483
479
|
}
|
|
484
480
|
} finally{
|
|
485
|
-
if (
|
|
486
|
-
throw
|
|
481
|
+
if (_didIteratorError1) {
|
|
482
|
+
throw _iteratorError1;
|
|
487
483
|
}
|
|
488
484
|
}
|
|
489
485
|
}
|
|
490
486
|
if (!(presetRows.length > 0)) return [
|
|
491
487
|
3,
|
|
492
|
-
|
|
488
|
+
13
|
|
493
489
|
];
|
|
494
490
|
return [
|
|
495
491
|
4,
|
|
496
|
-
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)
|
|
497
493
|
];
|
|
498
|
-
case
|
|
494
|
+
case 12:
|
|
499
495
|
_state.sent();
|
|
500
|
-
_state.label =
|
|
501
|
-
case
|
|
496
|
+
_state.label = 13;
|
|
497
|
+
case 13:
|
|
502
498
|
if (!(vanished.length > 0)) return [
|
|
503
499
|
3,
|
|
504
|
-
|
|
500
|
+
15
|
|
505
501
|
];
|
|
506
502
|
return [
|
|
507
503
|
4,
|
|
@@ -511,86 +507,86 @@ function reconcile(conn, cfg, baseDir, dialect) {
|
|
|
511
507
|
];
|
|
512
508
|
}))
|
|
513
509
|
];
|
|
514
|
-
case
|
|
510
|
+
case 14:
|
|
515
511
|
_state.sent();
|
|
516
|
-
_state.label =
|
|
517
|
-
case
|
|
518
|
-
|
|
512
|
+
_state.label = 15;
|
|
513
|
+
case 15:
|
|
514
|
+
_iteratorNormalCompletion2 = true, _didIteratorError2 = false, _iteratorError2 = undefined;
|
|
519
515
|
if (!(touched.length > 0)) return [
|
|
520
516
|
3,
|
|
521
|
-
|
|
517
|
+
23
|
|
522
518
|
];
|
|
523
|
-
_state.label =
|
|
524
|
-
case
|
|
519
|
+
_state.label = 16;
|
|
520
|
+
case 16:
|
|
525
521
|
_state.trys.push([
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
522
|
+
16,
|
|
523
|
+
21,
|
|
524
|
+
22,
|
|
525
|
+
23
|
|
530
526
|
]);
|
|
531
|
-
|
|
532
|
-
_state.label =
|
|
533
|
-
case
|
|
534
|
-
if (!!(
|
|
527
|
+
_iterator2 = features[Symbol.iterator]();
|
|
528
|
+
_state.label = 17;
|
|
529
|
+
case 17:
|
|
530
|
+
if (!!(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done)) return [
|
|
535
531
|
3,
|
|
536
|
-
|
|
532
|
+
20
|
|
537
533
|
];
|
|
538
|
-
feature =
|
|
534
|
+
feature = _step2.value;
|
|
539
535
|
return [
|
|
540
536
|
4,
|
|
541
537
|
(_feature_remove = feature.remove) === null || _feature_remove === void 0 ? void 0 : _feature_remove.call(feature, conn, touched, delta)
|
|
542
538
|
];
|
|
543
|
-
case
|
|
539
|
+
case 18:
|
|
544
540
|
_state.sent();
|
|
545
|
-
_state.label =
|
|
546
|
-
case
|
|
547
|
-
|
|
541
|
+
_state.label = 19;
|
|
542
|
+
case 19:
|
|
543
|
+
_iteratorNormalCompletion2 = true;
|
|
548
544
|
return [
|
|
549
545
|
3,
|
|
550
|
-
|
|
546
|
+
17
|
|
551
547
|
];
|
|
552
|
-
case
|
|
548
|
+
case 20:
|
|
553
549
|
return [
|
|
554
550
|
3,
|
|
555
|
-
|
|
551
|
+
23
|
|
556
552
|
];
|
|
557
|
-
case
|
|
553
|
+
case 21:
|
|
558
554
|
err = _state.sent();
|
|
559
|
-
|
|
560
|
-
|
|
555
|
+
_didIteratorError2 = true;
|
|
556
|
+
_iteratorError2 = err;
|
|
561
557
|
return [
|
|
562
558
|
3,
|
|
563
|
-
|
|
559
|
+
23
|
|
564
560
|
];
|
|
565
|
-
case
|
|
561
|
+
case 22:
|
|
566
562
|
try {
|
|
567
|
-
if (!
|
|
568
|
-
|
|
563
|
+
if (!_iteratorNormalCompletion2 && _iterator2.return != null) {
|
|
564
|
+
_iterator2.return();
|
|
569
565
|
}
|
|
570
566
|
} finally{
|
|
571
|
-
if (
|
|
572
|
-
throw
|
|
567
|
+
if (_didIteratorError2) {
|
|
568
|
+
throw _iteratorError2;
|
|
573
569
|
}
|
|
574
570
|
}
|
|
575
571
|
return [
|
|
576
572
|
7
|
|
577
573
|
];
|
|
578
|
-
case
|
|
579
|
-
|
|
580
|
-
_state.label =
|
|
581
|
-
case
|
|
574
|
+
case 23:
|
|
575
|
+
_iteratorNormalCompletion3 = true, _didIteratorError3 = false, _iteratorError3 = undefined;
|
|
576
|
+
_state.label = 24;
|
|
577
|
+
case 24:
|
|
582
578
|
_state.trys.push([
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
579
|
+
24,
|
|
580
|
+
29,
|
|
581
|
+
30,
|
|
582
|
+
31
|
|
587
583
|
]);
|
|
588
584
|
_loop = function() {
|
|
589
585
|
var feature, _feature_store, docsForFeature;
|
|
590
586
|
return _ts_generator(this, function(_state) {
|
|
591
587
|
switch(_state.label){
|
|
592
588
|
case 0:
|
|
593
|
-
feature =
|
|
589
|
+
feature = _step3.value;
|
|
594
590
|
docsForFeature = parsedDocs.map(function(doc) {
|
|
595
591
|
return {
|
|
596
592
|
path: doc.relPath,
|
|
@@ -609,110 +605,110 @@ function reconcile(conn, cfg, baseDir, dialect) {
|
|
|
609
605
|
}
|
|
610
606
|
});
|
|
611
607
|
};
|
|
612
|
-
|
|
613
|
-
_state.label =
|
|
614
|
-
case
|
|
615
|
-
if (!!(
|
|
608
|
+
_iterator3 = features[Symbol.iterator]();
|
|
609
|
+
_state.label = 25;
|
|
610
|
+
case 25:
|
|
611
|
+
if (!!(_iteratorNormalCompletion3 = (_step3 = _iterator3.next()).done)) return [
|
|
616
612
|
3,
|
|
617
|
-
|
|
613
|
+
28
|
|
618
614
|
];
|
|
619
615
|
return [
|
|
620
616
|
5,
|
|
621
617
|
_ts_values(_loop())
|
|
622
618
|
];
|
|
623
|
-
case
|
|
619
|
+
case 26:
|
|
624
620
|
_state.sent();
|
|
625
|
-
_state.label =
|
|
626
|
-
case
|
|
627
|
-
|
|
621
|
+
_state.label = 27;
|
|
622
|
+
case 27:
|
|
623
|
+
_iteratorNormalCompletion3 = true;
|
|
628
624
|
return [
|
|
629
625
|
3,
|
|
630
|
-
|
|
626
|
+
25
|
|
631
627
|
];
|
|
632
|
-
case
|
|
628
|
+
case 28:
|
|
633
629
|
return [
|
|
634
630
|
3,
|
|
635
|
-
|
|
631
|
+
31
|
|
636
632
|
];
|
|
637
|
-
case
|
|
633
|
+
case 29:
|
|
638
634
|
err = _state.sent();
|
|
639
|
-
|
|
640
|
-
|
|
635
|
+
_didIteratorError3 = true;
|
|
636
|
+
_iteratorError3 = err;
|
|
641
637
|
return [
|
|
642
638
|
3,
|
|
643
|
-
|
|
639
|
+
31
|
|
644
640
|
];
|
|
645
|
-
case
|
|
641
|
+
case 30:
|
|
646
642
|
try {
|
|
647
|
-
if (!
|
|
648
|
-
|
|
643
|
+
if (!_iteratorNormalCompletion3 && _iterator3.return != null) {
|
|
644
|
+
_iterator3.return();
|
|
649
645
|
}
|
|
650
646
|
} finally{
|
|
651
|
-
if (
|
|
652
|
-
throw
|
|
647
|
+
if (_didIteratorError3) {
|
|
648
|
+
throw _iteratorError3;
|
|
653
649
|
}
|
|
654
650
|
}
|
|
655
651
|
return [
|
|
656
652
|
7
|
|
657
653
|
];
|
|
658
|
-
case
|
|
659
|
-
|
|
660
|
-
_state.label =
|
|
661
|
-
case
|
|
654
|
+
case 31:
|
|
655
|
+
_iteratorNormalCompletion4 = true, _didIteratorError4 = false, _iteratorError4 = undefined;
|
|
656
|
+
_state.label = 32;
|
|
657
|
+
case 32:
|
|
662
658
|
_state.trys.push([
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
659
|
+
32,
|
|
660
|
+
37,
|
|
661
|
+
38,
|
|
662
|
+
39
|
|
667
663
|
]);
|
|
668
|
-
|
|
669
|
-
_state.label =
|
|
670
|
-
case
|
|
671
|
-
if (!!(
|
|
664
|
+
_iterator4 = features[Symbol.iterator]();
|
|
665
|
+
_state.label = 33;
|
|
666
|
+
case 33:
|
|
667
|
+
if (!!(_iteratorNormalCompletion4 = (_step4 = _iterator4.next()).done)) return [
|
|
672
668
|
3,
|
|
673
|
-
|
|
669
|
+
36
|
|
674
670
|
];
|
|
675
|
-
feature1 =
|
|
671
|
+
feature1 = _step4.value;
|
|
676
672
|
return [
|
|
677
673
|
4,
|
|
678
674
|
(_feature_afterReconcile = feature1.afterReconcile) === null || _feature_afterReconcile === void 0 ? void 0 : _feature_afterReconcile.call(feature1, conn, delta)
|
|
679
675
|
];
|
|
680
|
-
case
|
|
676
|
+
case 34:
|
|
681
677
|
_state.sent();
|
|
682
|
-
_state.label =
|
|
683
|
-
case
|
|
684
|
-
|
|
678
|
+
_state.label = 35;
|
|
679
|
+
case 35:
|
|
680
|
+
_iteratorNormalCompletion4 = true;
|
|
685
681
|
return [
|
|
686
682
|
3,
|
|
687
|
-
|
|
683
|
+
33
|
|
688
684
|
];
|
|
689
|
-
case
|
|
685
|
+
case 36:
|
|
690
686
|
return [
|
|
691
687
|
3,
|
|
692
|
-
|
|
688
|
+
39
|
|
693
689
|
];
|
|
694
|
-
case
|
|
690
|
+
case 37:
|
|
695
691
|
err = _state.sent();
|
|
696
|
-
|
|
697
|
-
|
|
692
|
+
_didIteratorError4 = true;
|
|
693
|
+
_iteratorError4 = err;
|
|
698
694
|
return [
|
|
699
695
|
3,
|
|
700
|
-
|
|
696
|
+
39
|
|
701
697
|
];
|
|
702
|
-
case
|
|
698
|
+
case 38:
|
|
703
699
|
try {
|
|
704
|
-
if (!
|
|
705
|
-
|
|
700
|
+
if (!_iteratorNormalCompletion4 && _iterator4.return != null) {
|
|
701
|
+
_iterator4.return();
|
|
706
702
|
}
|
|
707
703
|
} finally{
|
|
708
|
-
if (
|
|
709
|
-
throw
|
|
704
|
+
if (_didIteratorError4) {
|
|
705
|
+
throw _iteratorError4;
|
|
710
706
|
}
|
|
711
707
|
}
|
|
712
708
|
return [
|
|
713
709
|
7
|
|
714
710
|
];
|
|
715
|
-
case
|
|
711
|
+
case 39:
|
|
716
712
|
return [
|
|
717
713
|
2
|
|
718
714
|
];
|