@automagik/omni 2.260520.17 → 2.260520.19
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/index.js
CHANGED
|
@@ -4783,11 +4783,17 @@ function psqlCapture(args) {
|
|
|
4783
4783
|
return result.stdout ?? "";
|
|
4784
4784
|
}
|
|
4785
4785
|
async function copyTable(table, srcArgs, dstArgs, log) {
|
|
4786
|
-
const src = spawn("psql", [...srcArgs, "-c", `\\copy public.${table} TO STDOUT`], {
|
|
4786
|
+
const src = spawn("psql", [...srcArgs, "-c", `\\copy public.${table} TO STDOUT WITH (FORMAT binary)`], {
|
|
4787
4787
|
stdio: ["ignore", "pipe", "pipe"],
|
|
4788
4788
|
env: { ...process.env, PGPASSWORD: "postgres" }
|
|
4789
4789
|
});
|
|
4790
|
-
const dst = spawn("psql", [
|
|
4790
|
+
const dst = spawn("psql", [
|
|
4791
|
+
...dstArgs,
|
|
4792
|
+
"-c",
|
|
4793
|
+
`SET session_replication_role='replica';`,
|
|
4794
|
+
"-c",
|
|
4795
|
+
`\\copy public.${table} FROM STDIN WITH (FORMAT binary)`
|
|
4796
|
+
], {
|
|
4791
4797
|
stdio: ["pipe", "pipe", "pipe"],
|
|
4792
4798
|
env: { ...process.env, PGPASSWORD: "postgres" }
|
|
4793
4799
|
});
|
|
@@ -4905,19 +4911,24 @@ async function migrateUnmountedEmbeddedToCanonical(opts = {}) {
|
|
|
4905
4911
|
if (tables.length === 0) {
|
|
4906
4912
|
return { status: "skipped", reason: "embedded omni has no public tables" };
|
|
4907
4913
|
}
|
|
4908
|
-
|
|
4909
|
-
const
|
|
4914
|
+
const SKIP_TABLES = new Set(["media_content"]);
|
|
4915
|
+
const filteredTables = tables.filter((t) => !SKIP_TABLES.has(t));
|
|
4916
|
+
const skipped = tables.filter((t) => SKIP_TABLES.has(t));
|
|
4917
|
+
if (skipped.length > 0)
|
|
4918
|
+
log(` skipping ${skipped.length} table(s) (rebuilt at runtime): ${skipped.join(", ")}`);
|
|
4919
|
+
log(` ${filteredTables.length} tables to migrate`);
|
|
4920
|
+
const truncateList = filteredTables.map((t) => `public.${t}`).join(",");
|
|
4910
4921
|
psqlCapture([
|
|
4911
4922
|
...dstBaseArgs,
|
|
4912
4923
|
"-c",
|
|
4913
4924
|
`SET session_replication_role='replica'; TRUNCATE ${truncateList} RESTART IDENTITY CASCADE;`
|
|
4914
4925
|
]);
|
|
4915
4926
|
log(" truncated canonical (CASCADE)");
|
|
4916
|
-
for (const t of
|
|
4927
|
+
for (const t of filteredTables) {
|
|
4917
4928
|
await copyTable(t, srcBaseArgs, dstBaseArgs, log);
|
|
4918
4929
|
}
|
|
4919
4930
|
resetSequences(dstBaseArgs, log);
|
|
4920
|
-
return { status: "migrated", tables:
|
|
4931
|
+
return { status: "migrated", tables: filteredTables.length, durationMs: Date.now() - t0 };
|
|
4921
4932
|
} finally {
|
|
4922
4933
|
await temp.stop();
|
|
4923
4934
|
log(" restarting omni-api");
|
|
@@ -124338,7 +124349,7 @@ import { fileURLToPath } from "url";
|
|
|
124338
124349
|
// package.json
|
|
124339
124350
|
var package_default = {
|
|
124340
124351
|
name: "@automagik/omni",
|
|
124341
|
-
version: "2.260520.
|
|
124352
|
+
version: "2.260520.19",
|
|
124342
124353
|
description: "LLM-optimized CLI for Omni",
|
|
124343
124354
|
type: "module",
|
|
124344
124355
|
bin: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"embedded-canonical-migration.d.ts","sourceRoot":"","sources":["../../src/lib/embedded-canonical-migration.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgDG;AAWH,MAAM,MAAM,eAAe,GACvB;IAAE,MAAM,EAAE,UAAU,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,MAAM,CAAA;CAAE,GAC1D;IAAE,MAAM,EAAE,SAAS,CAAC;IAAC,MAAM,EAAE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AE,cAAmB,GAAG,OAAO,CAAC,eAAe,CAAC,CAuF7G;AAED,yEAAyE;AACzE,eAAO,MAAM,yBAAyB,QAAe,CAAC"}
|
package/dist/server/index.js
CHANGED
|
@@ -230137,7 +230137,7 @@ var init_sentry_scrub = __esm(() => {
|
|
|
230137
230137
|
var require_package8 = __commonJS((exports, module) => {
|
|
230138
230138
|
module.exports = {
|
|
230139
230139
|
name: "@omni/api",
|
|
230140
|
-
version: "2.260520.
|
|
230140
|
+
version: "2.260520.19",
|
|
230141
230141
|
type: "module",
|
|
230142
230142
|
exports: {
|
|
230143
230143
|
".": {
|