@inerrata-corporation/errata 2.0.22-dev.4186 → 2.0.22-dev.4293
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/THIRD-PARTY-NOTICES.md +1080 -0
- package/consolidate-worker.mjs +13 -7
- package/errata.mjs +716 -484
- package/generalize-worker.mjs +13 -7
- package/package.json +3 -2
- package/pass-worker.mjs +13 -7
- package/resources/context-plugin/.codex-plugin/plugin.json +1 -1
- package/resources/context-plugin/SHA256SUMS +1 -1
package/consolidate-worker.mjs
CHANGED
|
@@ -17052,7 +17052,7 @@ function installHistoryAttrSlim(db) {
|
|
|
17052
17052
|
}
|
|
17053
17053
|
|
|
17054
17054
|
// ../../packages/local-graph/src/text-index.ts
|
|
17055
|
-
var TEXT_INDEX_KEY = "text-index-trigram-
|
|
17055
|
+
var TEXT_INDEX_KEY = "text-index-trigram-2";
|
|
17056
17056
|
var TEXT_INDEX_MIN_TERM = 3;
|
|
17057
17057
|
function installTextIndex(db) {
|
|
17058
17058
|
if (db.prepare("SELECT value FROM store_meta WHERE key = ?").get(TEXT_INDEX_KEY)) return;
|
|
@@ -17065,17 +17065,23 @@ function installTextIndex(db) {
|
|
|
17065
17065
|
db.transaction(() => {
|
|
17066
17066
|
db.exec(`CREATE VIRTUAL TABLE IF NOT EXISTS nodes_text
|
|
17067
17067
|
USING fts5(description, content='nodes', content_rowid='rowid', tokenize='trigram')`);
|
|
17068
|
+
db.exec(`DROP TRIGGER IF EXISTS nodes_text_update_out; DROP TRIGGER IF EXISTS nodes_text_update_in;
|
|
17069
|
+
DROP TRIGGER IF EXISTS nodes_text_update`);
|
|
17068
17070
|
db.exec(`CREATE TRIGGER IF NOT EXISTS nodes_text_insert AFTER INSERT ON nodes WHEN NEW.valid_to IS NULL
|
|
17069
17071
|
BEGIN INSERT INTO nodes_text(rowid, description) VALUES (NEW.rowid, NEW.description); END;`);
|
|
17070
|
-
db.exec(`CREATE TRIGGER
|
|
17071
|
-
WHEN OLD.valid_to IS
|
|
17072
|
-
BEGIN
|
|
17073
|
-
|
|
17074
|
-
|
|
17075
|
-
|
|
17072
|
+
db.exec(`CREATE TRIGGER nodes_text_update AFTER UPDATE OF description, valid_to ON nodes
|
|
17073
|
+
WHEN OLD.description IS NOT NEW.description OR OLD.valid_to IS NOT NEW.valid_to
|
|
17074
|
+
BEGIN
|
|
17075
|
+
INSERT INTO nodes_text(nodes_text, rowid, description)
|
|
17076
|
+
SELECT 'delete', OLD.rowid, OLD.description WHERE OLD.valid_to IS NULL;
|
|
17077
|
+
INSERT INTO nodes_text(rowid, description)
|
|
17078
|
+
SELECT NEW.rowid, NEW.description WHERE NEW.valid_to IS NULL;
|
|
17079
|
+
END;`);
|
|
17076
17080
|
db.exec(`CREATE TRIGGER IF NOT EXISTS nodes_text_delete AFTER DELETE ON nodes WHEN OLD.valid_to IS NULL
|
|
17077
17081
|
BEGIN INSERT INTO nodes_text(nodes_text, rowid, description) VALUES ('delete', OLD.rowid, OLD.description); END;`);
|
|
17082
|
+
db.exec(`INSERT INTO nodes_text(nodes_text) VALUES ('delete-all')`);
|
|
17078
17083
|
db.exec(`INSERT INTO nodes_text(rowid, description) SELECT rowid, description FROM nodes WHERE valid_to IS NULL`);
|
|
17084
|
+
db.prepare("INSERT OR REPLACE INTO store_meta(key,value) VALUES (?,?)").run("text-index-trigram-1", "installed");
|
|
17079
17085
|
db.prepare("INSERT INTO store_meta(key,value) VALUES (?,?)").run(TEXT_INDEX_KEY, "installed");
|
|
17080
17086
|
});
|
|
17081
17087
|
}
|