@x-tech-laboratories/x-app 0.132.0 → 0.132.1
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/app/define.js +12 -7
- package/package.json +1 -1
package/dist/app/define.js
CHANGED
|
@@ -12,7 +12,7 @@ import { define_bridge } from "../electron/bridge.js";
|
|
|
12
12
|
import { define_events } from "../electron/events.js";
|
|
13
13
|
import { local_mcp_method_names } from "../local_mcp_protocol.js";
|
|
14
14
|
import { create_settings_store, read_setting, settings_of, write_setting } from "../settings.js";
|
|
15
|
-
import { migrate } from "../sql.js";
|
|
15
|
+
import { in_transaction, migrate } from "../sql.js";
|
|
16
16
|
import { create_sync_engine } from "../sync_engine.js";
|
|
17
17
|
import { backup_method_names } from "../backups.js";
|
|
18
18
|
import { peer_listening_method_names, sync_device_method_names } from "../sync_protocol.js";
|
|
@@ -113,15 +113,20 @@ export function define_app(options) {
|
|
|
113
113
|
if (options.upgrade_layout?.needed(database))
|
|
114
114
|
options.upgrade_layout.run(database);
|
|
115
115
|
// Sync's and history's triggers name columns, so they come off while a step reshapes a table; install puts them back.
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
116
|
+
// Each group is one transaction: a commit per trigger made opening take seconds where every commit waits on the disk.
|
|
117
|
+
in_transaction(database, () => {
|
|
118
|
+
sync_engine.drop_triggers(database);
|
|
119
|
+
for (const history of histories)
|
|
120
|
+
history.drop_triggers?.(database);
|
|
121
|
+
});
|
|
119
122
|
// Each feature keeps its own schema version, so features grow apart without renumbering each other's steps.
|
|
120
123
|
for (const feature of features)
|
|
121
124
|
migrate(database, feature.migrations, { owner: feature.id });
|
|
122
|
-
|
|
123
|
-
history
|
|
124
|
-
|
|
125
|
+
in_transaction(database, () => {
|
|
126
|
+
for (const history of histories)
|
|
127
|
+
history.install(database);
|
|
128
|
+
sync_engine.install(database);
|
|
129
|
+
});
|
|
125
130
|
for (const feature of features)
|
|
126
131
|
feature.on_open?.(database);
|
|
127
132
|
// What opening changed, such as rows an upgrade moved, is kept as a change made on this device.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@x-tech-laboratories/x-app",
|
|
3
|
-
"version": "0.132.
|
|
3
|
+
"version": "0.132.1",
|
|
4
4
|
"description": "Code the X-apps share: agents and their long runs, passwords and sign-in, the Fastify server pieces, durations, and the web page's helpers and widgets",
|
|
5
5
|
"license": "GPL-3.0-or-later",
|
|
6
6
|
"repository": {
|