@askexenow/exe-os 0.8.46 → 0.8.47
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/bin/exe-boot.js +7 -29
- package/dist/bin/exe-cloud.js +3 -17
- package/dist/bin/exe-link.js +14 -922
- package/dist/bin/exe-settings.js +3 -22
- package/dist/hooks/summary-worker.js +6 -9
- package/dist/lib/cloud-sync.js +19 -952
- package/package.json +1 -1
package/dist/bin/exe-boot.js
CHANGED
|
@@ -417,17 +417,6 @@ var init_db_retry = __esm({
|
|
|
417
417
|
});
|
|
418
418
|
|
|
419
419
|
// src/lib/database.ts
|
|
420
|
-
var database_exports = {};
|
|
421
|
-
__export(database_exports, {
|
|
422
|
-
disposeDatabase: () => disposeDatabase,
|
|
423
|
-
disposeTurso: () => disposeTurso,
|
|
424
|
-
ensureSchema: () => ensureSchema,
|
|
425
|
-
getClient: () => getClient,
|
|
426
|
-
getRawClient: () => getRawClient,
|
|
427
|
-
initDatabase: () => initDatabase,
|
|
428
|
-
initTurso: () => initTurso,
|
|
429
|
-
isInitialized: () => isInitialized
|
|
430
|
-
});
|
|
431
420
|
import { createClient } from "@libsql/client";
|
|
432
421
|
async function initDatabase(config) {
|
|
433
422
|
if (_client) {
|
|
@@ -1271,14 +1260,7 @@ async function ensureSchema() {
|
|
|
1271
1260
|
}
|
|
1272
1261
|
}
|
|
1273
1262
|
}
|
|
1274
|
-
|
|
1275
|
-
if (_client) {
|
|
1276
|
-
_client.close();
|
|
1277
|
-
_client = null;
|
|
1278
|
-
_resilientClient = null;
|
|
1279
|
-
}
|
|
1280
|
-
}
|
|
1281
|
-
var _client, _resilientClient, initTurso, disposeTurso;
|
|
1263
|
+
var _client, _resilientClient, initTurso;
|
|
1282
1264
|
var init_database = __esm({
|
|
1283
1265
|
"src/lib/database.ts"() {
|
|
1284
1266
|
"use strict";
|
|
@@ -1286,7 +1268,6 @@ var init_database = __esm({
|
|
|
1286
1268
|
_client = null;
|
|
1287
1269
|
_resilientClient = null;
|
|
1288
1270
|
initTurso = initDatabase;
|
|
1289
|
-
disposeTurso = disposeDatabase;
|
|
1290
1271
|
}
|
|
1291
1272
|
});
|
|
1292
1273
|
|
|
@@ -5592,19 +5573,16 @@ async function cloudSync(config) {
|
|
|
5592
5573
|
} catch {
|
|
5593
5574
|
throw new Error("[cloud-sync] Database not initialized. Call initStore() before cloudSync().");
|
|
5594
5575
|
}
|
|
5595
|
-
let pullMeta;
|
|
5596
5576
|
try {
|
|
5597
|
-
|
|
5598
|
-
"
|
|
5577
|
+
await client.execute(
|
|
5578
|
+
"CREATE TABLE IF NOT EXISTS sync_meta (key TEXT PRIMARY KEY, value TEXT NOT NULL)"
|
|
5599
5579
|
);
|
|
5600
5580
|
} catch (e) {
|
|
5601
|
-
logError(`[cloud-sync] sync_meta
|
|
5602
|
-
const { ensureSchema: ensureSchema2 } = await Promise.resolve().then(() => (init_database(), database_exports));
|
|
5603
|
-
await ensureSchema2();
|
|
5604
|
-
pullMeta = await client.execute(
|
|
5605
|
-
"SELECT value FROM sync_meta WHERE key = 'last_cloud_pull_version'"
|
|
5606
|
-
);
|
|
5581
|
+
logError(`[cloud-sync] sync_meta CREATE failed: ${e instanceof Error ? e.message : String(e)}`);
|
|
5607
5582
|
}
|
|
5583
|
+
const pullMeta = await client.execute(
|
|
5584
|
+
"SELECT value FROM sync_meta WHERE key = 'last_cloud_pull_version'"
|
|
5585
|
+
);
|
|
5608
5586
|
const lastPullVersion = pullMeta.rows.length > 0 ? Number(pullMeta.rows[0].value) : 0;
|
|
5609
5587
|
const pullResult = await cloudPull(lastPullVersion, config);
|
|
5610
5588
|
let pulled = 0;
|
package/dist/bin/exe-cloud.js
CHANGED
|
@@ -213,22 +213,6 @@ var init_config = __esm({
|
|
|
213
213
|
}
|
|
214
214
|
});
|
|
215
215
|
|
|
216
|
-
// src/lib/db-retry.ts
|
|
217
|
-
var init_db_retry = __esm({
|
|
218
|
-
"src/lib/db-retry.ts"() {
|
|
219
|
-
"use strict";
|
|
220
|
-
}
|
|
221
|
-
});
|
|
222
|
-
|
|
223
|
-
// src/lib/database.ts
|
|
224
|
-
import { createClient } from "@libsql/client";
|
|
225
|
-
var init_database = __esm({
|
|
226
|
-
"src/lib/database.ts"() {
|
|
227
|
-
"use strict";
|
|
228
|
-
init_db_retry();
|
|
229
|
-
}
|
|
230
|
-
});
|
|
231
|
-
|
|
232
216
|
// src/lib/license.ts
|
|
233
217
|
var license_exports = {};
|
|
234
218
|
__export(license_exports, {
|
|
@@ -740,12 +724,14 @@ function isMainModule(importMetaUrl) {
|
|
|
740
724
|
}
|
|
741
725
|
|
|
742
726
|
// src/lib/cloud-sync.ts
|
|
743
|
-
init_database();
|
|
744
727
|
import { readFileSync as readFileSync4, writeFileSync as writeFileSync2, existsSync as existsSync5, readdirSync, mkdirSync as mkdirSync2, appendFileSync, unlinkSync, openSync, closeSync } from "fs";
|
|
745
728
|
import crypto4 from "crypto";
|
|
746
729
|
import path5 from "path";
|
|
747
730
|
import { homedir } from "os";
|
|
748
731
|
|
|
732
|
+
// src/lib/database.ts
|
|
733
|
+
import { createClient } from "@libsql/client";
|
|
734
|
+
|
|
749
735
|
// src/lib/crypto.ts
|
|
750
736
|
import crypto3 from "crypto";
|
|
751
737
|
|