@xano/sdk 1.0.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/CHANGELOG.md +788 -0
- package/LICENSE +21 -0
- package/README.md +541 -0
- package/dist/.build-fingerprint +1 -0
- package/dist/agent-file-refresh-ZEMK33AX.js +38 -0
- package/dist/answer-shape-K67TAAPY.js +33 -0
- package/dist/backend-dir-2U53CIAL.js +39 -0
- package/dist/backend-slot-7QXW2QYC.js +28 -0
- package/dist/bin.d.ts +1 -0
- package/dist/bin.js +255 -0
- package/dist/branch-NCRNWQBQ.js +61 -0
- package/dist/branch-commands-ACIRCEQJ.js +79 -0
- package/dist/bundle.d.ts +223 -0
- package/dist/bundle.js +153 -0
- package/dist/capture-WAXPD7DR.js +41 -0
- package/dist/chunk-27GWNP2I.js +23 -0
- package/dist/chunk-2CMJZDCL.js +177 -0
- package/dist/chunk-2EZ3ZJZZ.js +302 -0
- package/dist/chunk-2GNFDZA2.js +390 -0
- package/dist/chunk-2MNLRIOX.js +11 -0
- package/dist/chunk-2TFRR6JV.js +104 -0
- package/dist/chunk-2ZUEE4EK.js +408 -0
- package/dist/chunk-36JUQZVQ.js +22 -0
- package/dist/chunk-3DRXWLJ5.js +83 -0
- package/dist/chunk-3JDU4VRL.js +137 -0
- package/dist/chunk-3KZCLN4Z.js +241 -0
- package/dist/chunk-3LDULPRE.js +168 -0
- package/dist/chunk-3M4LFYNQ.js +111 -0
- package/dist/chunk-3XI5CTUE.js +22 -0
- package/dist/chunk-3YW23UFH.js +50 -0
- package/dist/chunk-45UIT5T2.js +862 -0
- package/dist/chunk-4BW2SG2N.js +46 -0
- package/dist/chunk-4KHEMC32.js +79 -0
- package/dist/chunk-4POWHT2K.js +321 -0
- package/dist/chunk-4Q2GN7NW.js +192 -0
- package/dist/chunk-5A2PLKZB.js +70 -0
- package/dist/chunk-5FBYXK5P.js +159 -0
- package/dist/chunk-5HVXPTU4.js +323 -0
- package/dist/chunk-5QU2P5CA.js +304 -0
- package/dist/chunk-5V5XU32D.js +191 -0
- package/dist/chunk-5ZSO4T2G.js +10 -0
- package/dist/chunk-622HUCZT.js +10 -0
- package/dist/chunk-65HWOMGV.js +177 -0
- package/dist/chunk-6ELFRN3P.js +365 -0
- package/dist/chunk-6HO3NCSJ.js +1055 -0
- package/dist/chunk-6IUMKYWI.js +457 -0
- package/dist/chunk-6KEB3C3U.js +65 -0
- package/dist/chunk-6MR5TI5V.js +987 -0
- package/dist/chunk-6NNTNXN7.js +157 -0
- package/dist/chunk-6PBR37LN.js +97 -0
- package/dist/chunk-6QXLMMT3.js +155 -0
- package/dist/chunk-6ZGJCBZS.js +224 -0
- package/dist/chunk-73IVBKMA.js +250 -0
- package/dist/chunk-7G3CTU7I.js +286 -0
- package/dist/chunk-A3UDOZB6.js +222 -0
- package/dist/chunk-A6E77GDW.js +85 -0
- package/dist/chunk-AHJWCYQO.js +660 -0
- package/dist/chunk-AKNCFVKZ.js +36 -0
- package/dist/chunk-AM4FKL4J.js +237 -0
- package/dist/chunk-AN6BL47T.js +26 -0
- package/dist/chunk-AOSYVMUS.js +147 -0
- package/dist/chunk-APWXY5SL.js +182 -0
- package/dist/chunk-AWEIIR2U.js +218 -0
- package/dist/chunk-AWQ7BQTQ.js +73 -0
- package/dist/chunk-BAUZOWGX.js +393 -0
- package/dist/chunk-BHACRS6R.js +940 -0
- package/dist/chunk-BWPNT55T.js +680 -0
- package/dist/chunk-C6RIMRU4.js +187 -0
- package/dist/chunk-CGVQZXYG.js +263 -0
- package/dist/chunk-CIMQZRRE.js +162 -0
- package/dist/chunk-CJHQKJU4.js +113 -0
- package/dist/chunk-CTMO46PK.js +1897 -0
- package/dist/chunk-D53J55C5.js +106 -0
- package/dist/chunk-D7VGG3WS.js +90 -0
- package/dist/chunk-DAD3ONIS.js +245 -0
- package/dist/chunk-DGWHAVRG.js +162 -0
- package/dist/chunk-DX4QR4B2.js +483 -0
- package/dist/chunk-EHP3WPEG.js +21 -0
- package/dist/chunk-ELP2HMXC.js +432 -0
- package/dist/chunk-ERVIASGL.js +21 -0
- package/dist/chunk-ET4Y4XCB.js +865 -0
- package/dist/chunk-ETO6LGLD.js +4750 -0
- package/dist/chunk-EUUUMY7J.js +24 -0
- package/dist/chunk-FQJ2TTHP.js +218 -0
- package/dist/chunk-FQOF7E2E.js +133 -0
- package/dist/chunk-FWD7AL6N.js +21 -0
- package/dist/chunk-FXFV3KU6.js +138 -0
- package/dist/chunk-FXRQOWTE.js +171 -0
- package/dist/chunk-G554NZNI.js +210 -0
- package/dist/chunk-GSGDWJB5.js +13 -0
- package/dist/chunk-H2V3N23D.js +66 -0
- package/dist/chunk-H5C7MBCR.js +159 -0
- package/dist/chunk-HHN734BU.js +371 -0
- package/dist/chunk-HRVBLCVJ.js +243 -0
- package/dist/chunk-HVRUQXGD.js +1264 -0
- package/dist/chunk-I4F5TCJH.js +130 -0
- package/dist/chunk-IDOTCMDV.js +57 -0
- package/dist/chunk-IGOLHKWF.js +427 -0
- package/dist/chunk-JGE7CAWB.js +148 -0
- package/dist/chunk-JTUKLCXS.js +92 -0
- package/dist/chunk-JZGVVJSI.js +66 -0
- package/dist/chunk-K4WX6UUU.js +923 -0
- package/dist/chunk-K5BBGTYZ.js +217 -0
- package/dist/chunk-K6RXBGUB.js +427 -0
- package/dist/chunk-KTSDSD36.js +165 -0
- package/dist/chunk-L5JYN3NM.js +1038 -0
- package/dist/chunk-LIEOKXKD.js +354 -0
- package/dist/chunk-LLNZGEFK.js +51 -0
- package/dist/chunk-LPECSJ2J.js +55 -0
- package/dist/chunk-LQCMKAJ7.js +413 -0
- package/dist/chunk-LRN4ZJCQ.js +1145 -0
- package/dist/chunk-MJ4ZVHKN.js +17 -0
- package/dist/chunk-MXHSQOC4.js +3061 -0
- package/dist/chunk-N5GKCWE5.js +367 -0
- package/dist/chunk-NA3PXMEF.js +10 -0
- package/dist/chunk-NAQDMEHV.js +76 -0
- package/dist/chunk-NWKXM5RD.js +109 -0
- package/dist/chunk-NZOWWHU5.js +196 -0
- package/dist/chunk-OHX6MIUZ.js +184 -0
- package/dist/chunk-OOXWYAA4.js +15 -0
- package/dist/chunk-OPHB5ORL.js +1990 -0
- package/dist/chunk-OXA6PSZT.js +1725 -0
- package/dist/chunk-P2HAGF6H.js +73 -0
- package/dist/chunk-PTHVMXZI.js +3036 -0
- package/dist/chunk-PZ5AY32C.js +10 -0
- package/dist/chunk-Q325JKYB.js +189 -0
- package/dist/chunk-Q7DGTQ5G.js +255 -0
- package/dist/chunk-QCNYHBL7.js +601 -0
- package/dist/chunk-QO6BVGS5.js +145 -0
- package/dist/chunk-QXTKSOFI.js +76 -0
- package/dist/chunk-ROY4YAEQ.js +66 -0
- package/dist/chunk-RTJRZFFY.js +447 -0
- package/dist/chunk-SAVJUS2X.js +128 -0
- package/dist/chunk-SFLHVCKX.js +173 -0
- package/dist/chunk-STSFNCY4.js +127 -0
- package/dist/chunk-SWBF2LTK.js +170 -0
- package/dist/chunk-T5KELPAR.js +109 -0
- package/dist/chunk-TFFGOFVZ.js +1481 -0
- package/dist/chunk-TLHIFK4M.js +256 -0
- package/dist/chunk-TLQE7ZN3.js +156 -0
- package/dist/chunk-TPHWJ7UG.js +1981 -0
- package/dist/chunk-TRJCALW3.js +291 -0
- package/dist/chunk-TTEIYD5P.js +133 -0
- package/dist/chunk-U64O2MXY.js +407 -0
- package/dist/chunk-UCQ2VUTG.js +630 -0
- package/dist/chunk-UTI5G6OJ.js +44 -0
- package/dist/chunk-UVHDMMIP.js +188 -0
- package/dist/chunk-UZ6QQWJT.js +120 -0
- package/dist/chunk-VAX3UZOY.js +686 -0
- package/dist/chunk-W3HBUKFO.js +57 -0
- package/dist/chunk-WKQLGKCL.js +2823 -0
- package/dist/chunk-WQFNASK4.js +560 -0
- package/dist/chunk-WRBKLYSJ.js +224 -0
- package/dist/chunk-WTPZRR4I.js +17 -0
- package/dist/chunk-WZDJ2LLX.js +2385 -0
- package/dist/chunk-X2NL4KUO.js +14 -0
- package/dist/chunk-X4DVXBFY.js +38 -0
- package/dist/chunk-X677DMZM.js +7050 -0
- package/dist/chunk-XBKMWY7F.js +612 -0
- package/dist/chunk-XNCP4KYO.js +78 -0
- package/dist/chunk-XVBGLISP.js +35 -0
- package/dist/chunk-XW6KISBB.js +1192 -0
- package/dist/chunk-YGZHHAAB.js +8156 -0
- package/dist/chunk-YHEFQUQB.js +186 -0
- package/dist/chunk-YLDALTWZ.js +653 -0
- package/dist/chunk-YU4HSQW7.js +229 -0
- package/dist/chunk-ZDPP6RKB.js +27 -0
- package/dist/chunk-ZFDZKNGG.js +194 -0
- package/dist/chunk-ZIY7RNUT.js +49 -0
- package/dist/chunk-ZYJP6BOO.js +30 -0
- package/dist/cli.d.ts +1111 -0
- package/dist/cli.js +165 -0
- package/dist/codegen-command-VR2GWR6C.js +173 -0
- package/dist/codegen.d.ts +115 -0
- package/dist/codegen.js +19 -0
- package/dist/commands-GJMJ4XYZ.js +76 -0
- package/dist/completion-ZQLO6PB6.js +738 -0
- package/dist/config-MBYGCAFK.js +136 -0
- package/dist/deploy-command-JVZPWHMK.js +180 -0
- package/dist/deploy-source-3W45CXMP.js +81 -0
- package/dist/dev-env-sync-HN44K4D5.js +188 -0
- package/dist/diagnostics-UEAAHWVF.js +30 -0
- package/dist/display-name-hint-ABBPVQIR.js +46 -0
- package/dist/emit-CyhBDxli.d.ts +7007 -0
- package/dist/env-example-refresh-ET5HMMDW.js +126 -0
- package/dist/env-pull-command-TNMNB3CV.js +323 -0
- package/dist/env-target-O4HRKTGZ.js +40 -0
- package/dist/env-var-command-ZIRDCAZA.js +427 -0
- package/dist/ephemeral-P7F3PMAD.js +54 -0
- package/dist/ephemeral-command-CLJJKOFT.js +592 -0
- package/dist/ephemeral-state-PYCBSOGX.js +61 -0
- package/dist/file-lock-PT74GWYW.js +10 -0
- package/dist/generate-command-AYEOLA26.js +510 -0
- package/dist/gitignore-3SJ3WNRG.js +51 -0
- package/dist/guards-4EBNCZDC.js +162 -0
- package/dist/hosted-file-PSHJB3HX.js +28 -0
- package/dist/impersonate-command-5JAS3WSV.js +152 -0
- package/dist/import-EQSFU6JC.js +19 -0
- package/dist/index.d.ts +5470 -0
- package/dist/index.js +371 -0
- package/dist/init-command-X2FR4UAK.js +125 -0
- package/dist/init-modules-RY7UHAOL.js +50 -0
- package/dist/init-web-M4YZSZK6.js +42 -0
- package/dist/internal.d.ts +179 -0
- package/dist/internal.js +2634 -0
- package/dist/io-RC56QSN5.js +26 -0
- package/dist/keep-data-merge-7MPLVAVI.js +1119 -0
- package/dist/lambda-config-reconcile-OUZ4OYAB.js +116 -0
- package/dist/landed-753YLJ5H.js +40 -0
- package/dist/landing-record-SU52SKXU.js +61 -0
- package/dist/live-diff-YONW2VI3.js +65 -0
- package/dist/local-engine-choice-CH5X3W7E.js +79 -0
- package/dist/local-engine-command-Z3OL7VOD.js +766 -0
- package/dist/local-engine-config-5U3SC434.js +39 -0
- package/dist/local-engine-deploy-PCQ4SNPB.js +39 -0
- package/dist/local-engine-process-EHTE5LLU.js +63 -0
- package/dist/local-engine-state-A4FTRFAF.js +32 -0
- package/dist/local-engine-update-check-6L645VBL.js +162 -0
- package/dist/lock-MRRHW5GS.js +87 -0
- package/dist/lock-commands-2QG25HL7.js +963 -0
- package/dist/login-command-QPYRWOXZ.js +538 -0
- package/dist/logout-command-WOIQLDP6.js +56 -0
- package/dist/loop-ALIZLOSX.js +191 -0
- package/dist/marketplace-command-K5YL42NO.js +977 -0
- package/dist/marketplace-resolve-LY32JES5.js +40 -0
- package/dist/meta-client-YXGPW53C.js +244 -0
- package/dist/module-manifest-JFGHU2TC.js +38 -0
- package/dist/near-key.d.ts +13 -0
- package/dist/near-key.js +8 -0
- package/dist/node.d.ts +95 -0
- package/dist/node.js +969 -0
- package/dist/operation-outcome-TZSESNC7.js +51 -0
- package/dist/output-target-AL3I44GG.js +47 -0
- package/dist/package-manager-PRAHUSCN.js +34 -0
- package/dist/plan-disclosure-6G4MLZKD.js +114 -0
- package/dist/plugin-contributions-WRNY5ABG.js +28 -0
- package/dist/plugin-prompt-4VA3B4FF.js +20 -0
- package/dist/plugin-questions-JTSYA74Q.js +24 -0
- package/dist/plugin.d.ts +396 -0
- package/dist/plugin.js +1 -0
- package/dist/preflight-command-2T5Z36MI.js +321 -0
- package/dist/profile-command-AH3PIM4X.js +800 -0
- package/dist/profile-pointer-GRWJU3YD.js +31 -0
- package/dist/profile-select-74TRDEPD.js +23 -0
- package/dist/project-dependency-KSH63ODT.js +35 -0
- package/dist/project-sdk-REPPOIBD.js +24 -0
- package/dist/promote-command-PCWT5N6S.js +140 -0
- package/dist/prompt-II3F3LND.js +27 -0
- package/dist/publish-command-TTDUUJI5.js +414 -0
- package/dist/pull-command-VBO7C4S3.js +161 -0
- package/dist/pull-superseded-GJWLG7XO.js +20 -0
- package/dist/release-command-N4ZPKMHR.js +146 -0
- package/dist/release-ns-command-3KFDMZ6G.js +1745 -0
- package/dist/response-HlXahv4K.d.ts +925 -0
- package/dist/retry-command-AS5EVREX.js +34 -0
- package/dist/routes-manifest-SNWUVBT6.js +43 -0
- package/dist/runtime-XETHVF33.js +14 -0
- package/dist/scaffold.d.ts +1911 -0
- package/dist/scaffold.js +107 -0
- package/dist/secrets-file-LVZD6IIM.js +56 -0
- package/dist/secrets-fill-command-TTCPSVXN.js +218 -0
- package/dist/seed-VU7C3QYS.js +46 -0
- package/dist/sent-writes-N7X4OVXT.js +22 -0
- package/dist/source-resolve-S2XA3XZF.js +83 -0
- package/dist/static-host-B2Y6AG3W.js +352 -0
- package/dist/status-command-RUDXTF7I.js +554 -0
- package/dist/store-6VNCD4D7.js +20 -0
- package/dist/store-ARM6VMO5.js +98 -0
- package/dist/store-DuYfzKlW.d.ts +3144 -0
- package/dist/suggest-6FOOYKHG.js +12 -0
- package/dist/sveltekit.d.ts +154 -0
- package/dist/sveltekit.js +109 -0
- package/dist/sync-contributions-UCEROO26.js +415 -0
- package/dist/table-ENAVMITR.js +42 -0
- package/dist/tables-command-GUPXXSB5.js +156 -0
- package/dist/tenant-IIHPOHGP.js +42 -0
- package/dist/tenant-command-D5HGI2X4.js +965 -0
- package/dist/test-command-TIKZMDPZ.js +476 -0
- package/dist/tests-BGGIOK3L.js +26 -0
- package/dist/token-NICJUTMT.js +72 -0
- package/dist/toolchain-hooks-GHKLUJOH.js +96 -0
- package/dist/toolchain-modules-5EAZUONB.js +24 -0
- package/dist/tracked-backend-EIBUMDZA.js +80 -0
- package/dist/update-check-2W2NLDTC.js +136 -0
- package/dist/upgrade-command-QHNFWM7O.js +531 -0
- package/dist/verify-rollout-DRCK5TDD.js +61 -0
- package/dist/whoami-command-STGINTXH.js +51 -0
- package/dist/workspace-2CLHU2LK.js +93 -0
- package/dist/workspace-binding-56PIIPCP.js +54 -0
- package/dist/workspace-command-JEXQETJD.js +535 -0
- package/dist/workspace-env-F2RFMSC5.js +70 -0
- package/dist/workspace-export-OJSH2HIW.js +21 -0
- package/dist/writable-VA7OISSK.js +25 -0
- package/dist/xano-ICFUSPFR.js +42 -0
- package/dist/xanosdk-import-GN42TO2B.js +56 -0
- package/dist/xanosdk-project-S6DXJONQ.js +41 -0
- package/dist/xdo-CxDr2Q1C.d.ts +1371 -0
- package/guides/README.md +33 -0
- package/guides/authoring.md +921 -0
- package/guides/cli.md +401 -0
- package/guides/codegen.md +177 -0
- package/guides/codes.md +404 -0
- package/guides/coverage.md +74 -0
- package/guides/deploying.md +1525 -0
- package/guides/environment.md +400 -0
- package/guides/marketplace.md +415 -0
- package/guides/module-contract.md +558 -0
- package/guides/object-kinds.md +433 -0
- package/guides/project-structure.md +43 -0
- package/guides/scaffold.md +351 -0
- package/guides/typed-frontend.md +242 -0
- package/llms/client.md +63 -0
- package/llms/errors.md +56 -0
- package/llms/fields.md +176 -0
- package/llms/filters.md +183 -0
- package/llms/kinds-agent-mcp.md +30 -0
- package/llms/kinds-core.md +100 -0
- package/llms/kinds-knowledge.md +20 -0
- package/llms/kinds-realtime.md +76 -0
- package/llms/lambda.md +94 -0
- package/llms/legacy.md +44 -0
- package/llms/lock.md +40 -0
- package/llms/object-kinds.md +34 -0
- package/llms/statements-calls.md +62 -0
- package/llms/statements-catalog.md +320 -0
- package/llms/statements-data.md +66 -0
- package/llms/statements-runtime.md +68 -0
- package/llms/tests.md +59 -0
- package/llms/toolchain.md +16 -0
- package/llms/triggers.md +36 -0
- package/llms/values.md +29 -0
- package/llms-full.txt +2085 -0
- package/llms.txt +493 -0
- package/manifest.json +11224 -0
- package/package.json +162 -0
- package/types/lambda-globals.d.ts +129 -0
|
@@ -0,0 +1,862 @@
|
|
|
1
|
+
import {
|
|
2
|
+
identityName,
|
|
3
|
+
isWorkspaceKeyAtDefault
|
|
4
|
+
} from "./chunk-HRVBLCVJ.js";
|
|
5
|
+
import {
|
|
6
|
+
DEFAULT_PREFERENCES,
|
|
7
|
+
DEFAULT_SETTINGS
|
|
8
|
+
} from "./chunk-2CMJZDCL.js";
|
|
9
|
+
import {
|
|
10
|
+
HOSTED_ICON_KINDS,
|
|
11
|
+
isPrivateLibraryRow
|
|
12
|
+
} from "./chunk-XNCP4KYO.js";
|
|
13
|
+
import {
|
|
14
|
+
deepEqual,
|
|
15
|
+
normalize
|
|
16
|
+
} from "./chunk-L5JYN3NM.js";
|
|
17
|
+
|
|
18
|
+
// src/deploy/live-diff.ts
|
|
19
|
+
function storedColumnsAfter(outgoing, live, prior, mode) {
|
|
20
|
+
const liveTables = new Map(rows(live, "dbo").map((t) => [identify(t), t]));
|
|
21
|
+
const out = /* @__PURE__ */ new Map();
|
|
22
|
+
for (const table of rows(outgoing, "dbo")) {
|
|
23
|
+
if (typeof table.guid !== "string" || table.guid === "") continue;
|
|
24
|
+
const current = mode === "rebuild" ? void 0 : liveTables.get(identify(table));
|
|
25
|
+
const liveColumns = current === void 0 ? /* @__PURE__ */ new Map() : typedColumnsOf(current);
|
|
26
|
+
const blind = mode === "merge" && live === void 0;
|
|
27
|
+
const known = prior.get(table.guid) ?? {};
|
|
28
|
+
const stored = {};
|
|
29
|
+
for (const [column, type] of typedColumnsOf(table)) {
|
|
30
|
+
if (type === "") continue;
|
|
31
|
+
if (!blind && !liveColumns.has(column)) stored[column] = type;
|
|
32
|
+
else if (known[column] !== void 0) stored[column] = known[column];
|
|
33
|
+
}
|
|
34
|
+
if (Object.keys(stored).length > 0) out.set(table.guid, stored);
|
|
35
|
+
}
|
|
36
|
+
return out;
|
|
37
|
+
}
|
|
38
|
+
function usesXdo(table) {
|
|
39
|
+
if (typeof table.use_xdo === "boolean") return table.use_xdo;
|
|
40
|
+
return Array.isArray(table.index) && table.index.some((entry) => {
|
|
41
|
+
const { type, fields } = entry ?? {};
|
|
42
|
+
return type === "gin" && Array.isArray(fields) && fields.some((f) => f?.name === "xdo");
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
function indexesOf(table) {
|
|
46
|
+
const out = /* @__PURE__ */ new Map();
|
|
47
|
+
if (!Array.isArray(table.index)) return out;
|
|
48
|
+
for (const entry of table.index) {
|
|
49
|
+
if (entry === null || typeof entry !== "object") continue;
|
|
50
|
+
const { type, fields } = entry;
|
|
51
|
+
if (typeof type !== "string" || type === "primary" || !Array.isArray(fields)) continue;
|
|
52
|
+
const parts = type.split("|");
|
|
53
|
+
const unique = parts.includes("unique");
|
|
54
|
+
const kind = unique ? "unique" : parts[0] ?? type;
|
|
55
|
+
const cols = fields.map((f) => {
|
|
56
|
+
const { name, op } = f ?? {};
|
|
57
|
+
return typeof name !== "string" ? "" : typeof op === "string" && op !== "" ? `${name} ${op}` : name;
|
|
58
|
+
}).filter((c) => c !== "");
|
|
59
|
+
out.set(`${kind}(${cols.join(", ")})`, unique);
|
|
60
|
+
}
|
|
61
|
+
return out;
|
|
62
|
+
}
|
|
63
|
+
function uniqueIndexLabels(table) {
|
|
64
|
+
return [...indexesOf(table)].filter(([, unique]) => unique).map(([label]) => label);
|
|
65
|
+
}
|
|
66
|
+
function indexKeysOf(table) {
|
|
67
|
+
const asc = { ...table, index: Array.isArray(table.index) ? table.index.map(withoutAsc) : table.index };
|
|
68
|
+
return [...indexesOf(asc).keys()].sort();
|
|
69
|
+
}
|
|
70
|
+
function withoutAsc(entry) {
|
|
71
|
+
if (entry === null || typeof entry !== "object" || !Array.isArray(entry.fields)) return entry;
|
|
72
|
+
const fields = entry.fields.map(
|
|
73
|
+
(f) => f !== null && typeof f === "object" && f.op === "asc" ? { ...f, op: "" } : f
|
|
74
|
+
);
|
|
75
|
+
return { ...entry, fields };
|
|
76
|
+
}
|
|
77
|
+
function rows(bundle, key) {
|
|
78
|
+
const payload = bundle?.payload;
|
|
79
|
+
if (payload === null || typeof payload !== "object") return [];
|
|
80
|
+
const value = payload[key];
|
|
81
|
+
return Array.isArray(value) ? value.filter((r) => r !== null && typeof r === "object") : [];
|
|
82
|
+
}
|
|
83
|
+
function typedColumnsOf(table) {
|
|
84
|
+
const out = columnsOf(table, "type", (v) => typeof v === "string" ? v : "");
|
|
85
|
+
for (const [column, size] of columnsOf(table, "vector", (v) => v?.size)) {
|
|
86
|
+
if (out.get(column) === "vector") out.set(column, sizedVector(size));
|
|
87
|
+
}
|
|
88
|
+
return out;
|
|
89
|
+
}
|
|
90
|
+
function sizedVector(size) {
|
|
91
|
+
return `vector(${typeof size === "number" && Number.isInteger(size) ? size : 3})`;
|
|
92
|
+
}
|
|
93
|
+
function vectorSize(type) {
|
|
94
|
+
const m = /^vector\((\d+)\)$/.exec(type);
|
|
95
|
+
return m === null ? void 0 : Number(m[1]);
|
|
96
|
+
}
|
|
97
|
+
function enumColumnsOf(table) {
|
|
98
|
+
return columnsOf(table, "values", (v) => Array.isArray(v) ? v.filter((x) => typeof x === "string") : void 0);
|
|
99
|
+
}
|
|
100
|
+
function refColumnsOf(table) {
|
|
101
|
+
return columnsOf(table, "methods", (v) => {
|
|
102
|
+
if (!Array.isArray(v)) return void 0;
|
|
103
|
+
for (const m of v) {
|
|
104
|
+
if (m?.name !== "@" || !Array.isArray(m.arg)) continue;
|
|
105
|
+
const ref = m.arg.find((a) => typeof a === "string" && a.startsWith("dbo="));
|
|
106
|
+
if (ref !== void 0) return ref.slice("dbo=".length);
|
|
107
|
+
}
|
|
108
|
+
return void 0;
|
|
109
|
+
});
|
|
110
|
+
}
|
|
111
|
+
function nullableColumnsOf(table) {
|
|
112
|
+
return columnsOf(table, "nullable", (v) => typeof v === "boolean" ? v : void 0);
|
|
113
|
+
}
|
|
114
|
+
function columnsOf(table, key, read) {
|
|
115
|
+
const out = /* @__PURE__ */ new Map();
|
|
116
|
+
const schema = table.schema;
|
|
117
|
+
if (!Array.isArray(schema)) return out;
|
|
118
|
+
for (const entry of schema) {
|
|
119
|
+
if (entry === null || typeof entry !== "object") continue;
|
|
120
|
+
const { name } = entry;
|
|
121
|
+
if (typeof name !== "string" || name === "") continue;
|
|
122
|
+
out.set(name, read(entry[key]));
|
|
123
|
+
}
|
|
124
|
+
return out;
|
|
125
|
+
}
|
|
126
|
+
function identify(table) {
|
|
127
|
+
const guid = table.guid;
|
|
128
|
+
if (typeof guid === "string" && guid !== "") return `guid:${guid}`;
|
|
129
|
+
const name = table.name;
|
|
130
|
+
return typeof name === "string" ? `name:${name}` : "";
|
|
131
|
+
}
|
|
132
|
+
function envValuesOf(bundle) {
|
|
133
|
+
const payload = bundle?.payload;
|
|
134
|
+
const out = /* @__PURE__ */ new Map();
|
|
135
|
+
if (payload === null || typeof payload !== "object") return out;
|
|
136
|
+
const workspace = payload.workspace;
|
|
137
|
+
const candidates = [
|
|
138
|
+
payload.env,
|
|
139
|
+
workspace !== null && typeof workspace === "object" && !Array.isArray(workspace) ? workspace.env : void 0,
|
|
140
|
+
Array.isArray(workspace) && workspace[0] !== null && typeof workspace[0] === "object" ? workspace[0].env : void 0
|
|
141
|
+
];
|
|
142
|
+
for (const candidate of candidates) {
|
|
143
|
+
if (!Array.isArray(candidate)) continue;
|
|
144
|
+
for (const entry of candidate) {
|
|
145
|
+
if (typeof entry === "string") {
|
|
146
|
+
const at = entry.indexOf("=");
|
|
147
|
+
if (at > 0) out.set(entry.slice(0, at), entry.slice(at + 1));
|
|
148
|
+
continue;
|
|
149
|
+
}
|
|
150
|
+
if (entry === null || typeof entry !== "object") continue;
|
|
151
|
+
const { name, value } = entry;
|
|
152
|
+
if (typeof name === "string" && name !== "") out.set(name, typeof value === "string" ? value : "");
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
return out;
|
|
156
|
+
}
|
|
157
|
+
function diffAgainstLive(outgoing, live, opts) {
|
|
158
|
+
const outgoingTables = new Map(rows(outgoing, "dbo").map((t) => [identify(t), t]));
|
|
159
|
+
const guidlessNames = new Set(
|
|
160
|
+
rows(outgoing, "dbo").filter((t) => typeof t.guid !== "string" || t.guid === "").map(nameOf)
|
|
161
|
+
);
|
|
162
|
+
const outgoingNames = new Set(rows(outgoing, "dbo").map(nameOf));
|
|
163
|
+
const uncarriedTables = [];
|
|
164
|
+
const replacedTables = [];
|
|
165
|
+
const droppedColumns = [];
|
|
166
|
+
const retypedColumns = [];
|
|
167
|
+
const unrelaxedColumns = [];
|
|
168
|
+
const tightenedColumns = [];
|
|
169
|
+
const indexChanges = [];
|
|
170
|
+
const narrowedEnums = [];
|
|
171
|
+
const retargetedRefs = [];
|
|
172
|
+
const storageChanges = [];
|
|
173
|
+
const tableNames = /* @__PURE__ */ new Map();
|
|
174
|
+
for (const t of [...rows(live, "dbo"), ...rows(outgoing, "dbo")]) {
|
|
175
|
+
if (typeof t.guid === "string" && typeof t.name === "string") tableNames.set(t.guid, t.name);
|
|
176
|
+
}
|
|
177
|
+
for (const liveTable of rows(live, "dbo")) {
|
|
178
|
+
const outgoingTable = outgoingTables.get(identify(liveTable));
|
|
179
|
+
if (outgoingTable === void 0) {
|
|
180
|
+
const liveName = nameOf(liveTable);
|
|
181
|
+
const ownIdentity = typeof liveTable.guid === "string" && liveTable.guid !== "";
|
|
182
|
+
if (!outgoingNames.has(liveName) || ownIdentity && !guidlessNames.has(liveName)) {
|
|
183
|
+
uncarriedTables.push(liveName);
|
|
184
|
+
if (outgoingNames.has(liveName)) replacedTables.push(liveName);
|
|
185
|
+
}
|
|
186
|
+
continue;
|
|
187
|
+
}
|
|
188
|
+
const kept = typedColumnsOf(outgoingTable);
|
|
189
|
+
const defaults = columnsOf(outgoingTable, "default", (v) => typeof v === "string" ? v : "");
|
|
190
|
+
const nullable = columnsOf(outgoingTable, "nullable", (v) => v === true);
|
|
191
|
+
const name = typeof outgoingTable.name === "string" ? outgoingTable.name : typeof liveTable.name === "string" ? liveTable.name : "(unnamed)";
|
|
192
|
+
const storedHere = typeof liveTable.guid === "string" ? opts.stored?.get(liveTable.guid) : void 0;
|
|
193
|
+
for (const [column, type] of typedColumnsOf(liveTable)) {
|
|
194
|
+
const next = kept.get(column);
|
|
195
|
+
if (next === void 0) droppedColumns.push({ table: name, column });
|
|
196
|
+
else if (next !== type) {
|
|
197
|
+
const declared = defaults.get(column) ?? "";
|
|
198
|
+
const recorded = storedHere?.[column];
|
|
199
|
+
const stored = recorded === "vector" ? void 0 : recorded;
|
|
200
|
+
retypedColumns.push({
|
|
201
|
+
table: name,
|
|
202
|
+
column,
|
|
203
|
+
from: type,
|
|
204
|
+
to: next,
|
|
205
|
+
...declared === "" ? {} : { default: declared },
|
|
206
|
+
...nullable.get(column) === true ? { nullable: true } : {},
|
|
207
|
+
...stored === void 0 ? {} : { stored },
|
|
208
|
+
...usesXdo(liveTable) && usesXdo(outgoingTable) ? { useXdo: true } : {}
|
|
209
|
+
});
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
if (opts.mode !== "merge") continue;
|
|
213
|
+
const [from2, to2] = [usesXdo(liveTable), usesXdo(outgoingTable)];
|
|
214
|
+
if (from2 !== to2) {
|
|
215
|
+
storageChanges.push({
|
|
216
|
+
table: name,
|
|
217
|
+
liveName: nameOf(liveTable),
|
|
218
|
+
...typeof liveTable.guid === "string" && liveTable.guid !== "" ? { guid: liveTable.guid } : {},
|
|
219
|
+
from: from2,
|
|
220
|
+
to: to2
|
|
221
|
+
});
|
|
222
|
+
}
|
|
223
|
+
const liveIndexes = indexesOf(liveTable);
|
|
224
|
+
const nextIndexes = indexesOf(outgoingTable);
|
|
225
|
+
for (const [index, unique] of nextIndexes) {
|
|
226
|
+
if (!liveIndexes.has(index)) indexChanges.push({ table: name, index, action: "add", unique });
|
|
227
|
+
}
|
|
228
|
+
for (const [index, unique] of liveIndexes) {
|
|
229
|
+
if (!nextIndexes.has(index)) indexChanges.push({ table: name, index, action: "drop", unique });
|
|
230
|
+
}
|
|
231
|
+
const types = typedColumnsOf(liveTable);
|
|
232
|
+
const nextEnums = enumColumnsOf(outgoingTable);
|
|
233
|
+
for (const [column, values] of enumColumnsOf(liveTable)) {
|
|
234
|
+
if (types.get(column) !== "enum" || kept.get(column) !== "enum" || values === void 0) continue;
|
|
235
|
+
const next = nextEnums.get(column) ?? [];
|
|
236
|
+
const removed = values.filter((v) => !next.includes(v));
|
|
237
|
+
if (removed.length > 0) narrowedEnums.push({ table: name, column, removed });
|
|
238
|
+
}
|
|
239
|
+
const nextRefs = refColumnsOf(outgoingTable);
|
|
240
|
+
for (const [column, ref] of refColumnsOf(liveTable)) {
|
|
241
|
+
const next = nextRefs.get(column);
|
|
242
|
+
if (ref === void 0 || next === void 0 || next === ref || types.get(column) !== kept.get(column)) continue;
|
|
243
|
+
retargetedRefs.push({ table: name, column, from: tableNames.get(ref) ?? ref, to: tableNames.get(next) ?? next });
|
|
244
|
+
}
|
|
245
|
+
const nextNullable = nullableColumnsOf(outgoingTable);
|
|
246
|
+
for (const [column, nullable2] of nullableColumnsOf(liveTable)) {
|
|
247
|
+
if (nullable2 === false && nextNullable.get(column) === true) unrelaxedColumns.push({ table: name, column });
|
|
248
|
+
if (nullable2 === true && nextNullable.get(column) === false) {
|
|
249
|
+
tightenedColumns.push({ table: name, column, type: kept.get(column) ?? "" });
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
const unchangedEnv = [];
|
|
254
|
+
const droppedEnv = [];
|
|
255
|
+
const liveEnv = envValuesOf(live);
|
|
256
|
+
if (opts.mode === "merge") {
|
|
257
|
+
for (const [name, value] of envValuesOf(outgoing)) {
|
|
258
|
+
const current = liveEnv.get(name);
|
|
259
|
+
if (current !== void 0 && current !== value) unchangedEnv.push({ name, empty: value === "" });
|
|
260
|
+
}
|
|
261
|
+
} else {
|
|
262
|
+
const declared = envValuesOf(outgoing);
|
|
263
|
+
for (const name of liveEnv.keys()) {
|
|
264
|
+
if (!declared.has(name)) droppedEnv.push({ name });
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
const unappliedDocumentation = [];
|
|
268
|
+
if (opts.mode === "merge") {
|
|
269
|
+
const ours = documentationOf(outgoing);
|
|
270
|
+
const theirs = documentationOf(live);
|
|
271
|
+
if (ours !== void 0) {
|
|
272
|
+
if (Object.hasOwn(ours, "require_token") && !deepEqual(ours.require_token, theirs?.require_token)) {
|
|
273
|
+
unappliedDocumentation.push("require_token");
|
|
274
|
+
}
|
|
275
|
+
const gated = ours.require_token === true || theirs?.require_token === true;
|
|
276
|
+
if (gated && typeof ours.token === "string" && ours.token !== "" && ours.token !== theirs?.token) {
|
|
277
|
+
unappliedDocumentation.push("token");
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
const from = workspaceNameOf(live);
|
|
282
|
+
const to = workspaceNameOf(outgoing);
|
|
283
|
+
const workspaceRename = from !== "" && to !== "" && from !== to ? { from, to } : void 0;
|
|
284
|
+
return {
|
|
285
|
+
uncarriedTables,
|
|
286
|
+
replacedTables,
|
|
287
|
+
droppedColumns,
|
|
288
|
+
retypedColumns,
|
|
289
|
+
unrelaxedColumns,
|
|
290
|
+
tightenedColumns,
|
|
291
|
+
indexChanges,
|
|
292
|
+
narrowedEnums,
|
|
293
|
+
retargetedRefs,
|
|
294
|
+
storageChanges,
|
|
295
|
+
unchangedEnv,
|
|
296
|
+
droppedEnv,
|
|
297
|
+
unappliedDocumentation,
|
|
298
|
+
...workspaceRename !== void 0 ? { workspaceRename } : {}
|
|
299
|
+
};
|
|
300
|
+
}
|
|
301
|
+
function secretsCarriedBy(bundle) {
|
|
302
|
+
const out = [];
|
|
303
|
+
if ([...envValuesOf(bundle).values()].some((v) => v !== "")) out.push("env values");
|
|
304
|
+
const set = (block) => {
|
|
305
|
+
const token = block?.token;
|
|
306
|
+
return typeof token === "string" && token !== "";
|
|
307
|
+
};
|
|
308
|
+
const groups = payloadOf(bundle).app;
|
|
309
|
+
const groupTokens = Array.isArray(groups) ? groups.some((g) => set(g?.documentation)) : false;
|
|
310
|
+
if (set(documentationOf(bundle)) || groupTokens) out.push("documentation token");
|
|
311
|
+
const payload = payloadOf(bundle);
|
|
312
|
+
const workspace = asRecord(payload.workspace);
|
|
313
|
+
if (workspace !== void 0) {
|
|
314
|
+
const crypto = asRecord(workspace.crypto);
|
|
315
|
+
if (filled(workspace.secret) || filled(crypto?.secret)) out.push("workspace secrets");
|
|
316
|
+
const repo = asRecord(workspace["git"]);
|
|
317
|
+
if (filled(repo?.private_key)) out.push("a repository private key");
|
|
318
|
+
const providers = asRecord(asRecord(asRecord(workspace.settings)?.ai_settings)?.providers);
|
|
319
|
+
if (providers !== void 0 && Object.values(providers).some((p) => filled(asRecord(p)?.api_key))) {
|
|
320
|
+
out.push("AI provider API keys");
|
|
321
|
+
}
|
|
322
|
+
}
|
|
323
|
+
if (Array.isArray(payload.vault) && payload.vault.some(isPrivateLibraryRow)) {
|
|
324
|
+
out.push("vault entries");
|
|
325
|
+
}
|
|
326
|
+
return out;
|
|
327
|
+
}
|
|
328
|
+
function filled(value) {
|
|
329
|
+
return typeof value === "string" && value !== "";
|
|
330
|
+
}
|
|
331
|
+
function asRecord(value) {
|
|
332
|
+
return value !== null && typeof value === "object" && !Array.isArray(value) ? value : void 0;
|
|
333
|
+
}
|
|
334
|
+
function secretsInMultidoc(text) {
|
|
335
|
+
const out = [];
|
|
336
|
+
const nonEmptyString = /"(?:[^"\\]|\\.)+"/;
|
|
337
|
+
if (assignedBlocks(text, "env").some((b) => nonEmptyString.test(b))) out.push("env values");
|
|
338
|
+
if (assignedBlocks(text, "swagger").some((b) => /\btoken\s*:\s*"(?:[^"\\]|\\.)+"/.test(b))) {
|
|
339
|
+
out.push("documentation token");
|
|
340
|
+
}
|
|
341
|
+
if (passwordHashesInMultidoc(text).length > 0) out.push("password hashes");
|
|
342
|
+
return out;
|
|
343
|
+
}
|
|
344
|
+
function passwordHashesInMultidoc(text) {
|
|
345
|
+
const out = [];
|
|
346
|
+
for (const doc of text.split(/^(?=table[ \t]+)/m)) {
|
|
347
|
+
const name = /^table[ \t]+("?)([^\s"{]+)\1/.exec(doc)?.[2];
|
|
348
|
+
if (name === void 0) continue;
|
|
349
|
+
const columns = [...doc.matchAll(/^[ \t]*password\??[ \t]+("?)([A-Za-z_]\w*)\1/gm)].map((m) => m[2]);
|
|
350
|
+
if (columns.length === 0) continue;
|
|
351
|
+
const items = assignedBlocks(doc, "items", "[").join("\n");
|
|
352
|
+
for (const column of columns) {
|
|
353
|
+
if (new RegExp(`(?:^|[{,\\s])"?${column}"?\\s*:\\s*"(?:[^"\\\\]|\\\\.)+"`).test(items)) out.push(`${name}.${column}`);
|
|
354
|
+
}
|
|
355
|
+
}
|
|
356
|
+
return out;
|
|
357
|
+
}
|
|
358
|
+
function assignedBlocks(text, key, open = "{") {
|
|
359
|
+
const out = [];
|
|
360
|
+
const close = open === "{" ? "}" : "]";
|
|
361
|
+
const start = new RegExp(`^[ \\t]*${key}[ \\t]*=[ \\t]*\\${open}`, "gm");
|
|
362
|
+
for (let m = start.exec(text); m !== null; m = start.exec(text)) {
|
|
363
|
+
let depth = 1;
|
|
364
|
+
let i = m.index + m[0].length;
|
|
365
|
+
const from = i;
|
|
366
|
+
for (; i < text.length && depth > 0; i++) {
|
|
367
|
+
const ch = text[i];
|
|
368
|
+
if (ch === '"') {
|
|
369
|
+
for (i++; i < text.length && text[i] !== '"'; i++) if (text[i] === "\\") i++;
|
|
370
|
+
} else if (ch === open) depth++;
|
|
371
|
+
else if (ch === close) depth--;
|
|
372
|
+
}
|
|
373
|
+
out.push(text.slice(from, i - 1));
|
|
374
|
+
}
|
|
375
|
+
return out;
|
|
376
|
+
}
|
|
377
|
+
function documentationOf(bundle) {
|
|
378
|
+
const ws = payloadOf(bundle)[WORKSPACE_KEY];
|
|
379
|
+
if (ws === null || typeof ws !== "object" || Array.isArray(ws)) return void 0;
|
|
380
|
+
const block = ws.documentation;
|
|
381
|
+
return block !== null && typeof block === "object" && !Array.isArray(block) ? block : void 0;
|
|
382
|
+
}
|
|
383
|
+
function workspaceNameOf(bundle) {
|
|
384
|
+
const ws = payloadOf(bundle)[WORKSPACE_KEY];
|
|
385
|
+
if (ws === null || typeof ws !== "object" || Array.isArray(ws)) return "";
|
|
386
|
+
const name = ws.name;
|
|
387
|
+
return typeof name === "string" ? name : "";
|
|
388
|
+
}
|
|
389
|
+
function sharedSchemaChanges(outgoing, live, opts = {}) {
|
|
390
|
+
if (live === void 0) return void 0;
|
|
391
|
+
const changes = [];
|
|
392
|
+
for (const kind of ["dbo", "microservice"]) {
|
|
393
|
+
const liveRows = new Map(rows(live, kind).map((r) => [identify(r), r]));
|
|
394
|
+
const outgoingRows = new Map(rows(outgoing, kind).map((r) => [identify(r), r]));
|
|
395
|
+
for (const [key, out] of outgoingRows) {
|
|
396
|
+
const current = liveRows.get(key);
|
|
397
|
+
const name = nameOf(out);
|
|
398
|
+
if (current === void 0) {
|
|
399
|
+
changes.push({ kind, name, action: "create" });
|
|
400
|
+
continue;
|
|
401
|
+
}
|
|
402
|
+
const details = kind === "dbo" ? tableDelta(current, out) : objectDelta(current, out);
|
|
403
|
+
if (details.length > 0) changes.push({ kind, name, action: "alter", details });
|
|
404
|
+
}
|
|
405
|
+
if (opts.prune === true) {
|
|
406
|
+
for (const [key, current] of liveRows) {
|
|
407
|
+
if (!outgoingRows.has(key)) changes.push({ kind, name: nameOf(current), action: "remove" });
|
|
408
|
+
}
|
|
409
|
+
}
|
|
410
|
+
}
|
|
411
|
+
return changes;
|
|
412
|
+
}
|
|
413
|
+
function tableDelta(live, outgoing) {
|
|
414
|
+
const details = [];
|
|
415
|
+
const before = typedColumnsOf(live);
|
|
416
|
+
const after = typedColumnsOf(outgoing);
|
|
417
|
+
const liveName = nameOf(live);
|
|
418
|
+
const outgoingName = nameOf(outgoing);
|
|
419
|
+
if (liveName !== outgoingName) details.push(`renamed from "${liveName}" to "${outgoingName}"`);
|
|
420
|
+
for (const [column, type] of after) {
|
|
421
|
+
const current = before.get(column);
|
|
422
|
+
if (current === void 0) {
|
|
423
|
+
details.push(`add column "${column}"`);
|
|
424
|
+
} else if (current !== type) {
|
|
425
|
+
details.push(`retype column "${column}" (${current} \u2192 ${type})`);
|
|
426
|
+
}
|
|
427
|
+
}
|
|
428
|
+
for (const column of before.keys()) {
|
|
429
|
+
if (!after.has(column)) details.push(`drop column "${column}"`);
|
|
430
|
+
}
|
|
431
|
+
const liveIndexes = indexKeysOf(live);
|
|
432
|
+
const nextIndexes = indexKeysOf(outgoing);
|
|
433
|
+
for (const index of nextIndexes) if (!liveIndexes.includes(index)) details.push(`add index ${index}`);
|
|
434
|
+
for (const index of liveIndexes) if (!nextIndexes.includes(index)) details.push(`drop index ${index}`);
|
|
435
|
+
return details;
|
|
436
|
+
}
|
|
437
|
+
function tableAdditions(outgoing, live) {
|
|
438
|
+
const liveTables = new Map(rows(live, "dbo").map((t) => [identify(t), t]));
|
|
439
|
+
const createdTables = [];
|
|
440
|
+
const addedColumns = [];
|
|
441
|
+
const renamedTables = [];
|
|
442
|
+
const addedDefaults = {};
|
|
443
|
+
for (const table of rows(outgoing, "dbo")) {
|
|
444
|
+
const current = liveTables.get(identify(table));
|
|
445
|
+
const name = nameOf(table);
|
|
446
|
+
if (current === void 0) {
|
|
447
|
+
createdTables.push(name);
|
|
448
|
+
continue;
|
|
449
|
+
}
|
|
450
|
+
if (nameOf(current) !== name) renamedTables.push({ from: nameOf(current), to: name });
|
|
451
|
+
const before = typedColumnsOf(current);
|
|
452
|
+
const defaults = columnsOf(table, "default", (v) => typeof v === "string" ? v : "");
|
|
453
|
+
for (const column of typedColumnsOf(table).keys()) {
|
|
454
|
+
if (before.has(column)) continue;
|
|
455
|
+
addedColumns.push(`${name}.${column}`);
|
|
456
|
+
const value = defaults.get(column) ?? "";
|
|
457
|
+
if (value !== "") addedDefaults[`${name}.${column}`] = value;
|
|
458
|
+
}
|
|
459
|
+
}
|
|
460
|
+
return { createdTables, addedColumns, addedDefaults, renamedTables };
|
|
461
|
+
}
|
|
462
|
+
function objectDelta(live, outgoing) {
|
|
463
|
+
const liveName = nameOf(live);
|
|
464
|
+
const outgoingName = nameOf(outgoing);
|
|
465
|
+
if (liveName !== outgoingName) return [`renamed from "${liveName}" to "${outgoingName}"`];
|
|
466
|
+
return deepEqual(normalize(live), normalize(outgoing)) ? [] : ["configuration differs"];
|
|
467
|
+
}
|
|
468
|
+
var WORKSPACE_KEY = "workspace";
|
|
469
|
+
var ENV_KEY = "env";
|
|
470
|
+
var VAULT_KEY = "vault";
|
|
471
|
+
var ARCHIVE_KEYS = /* @__PURE__ */ new Set(["metadata", "partial"]);
|
|
472
|
+
var SETTINGS_KEYS_COMPARED_ELSEWHERE = /* @__PURE__ */ new Set([
|
|
473
|
+
WORKSPACE_KEY,
|
|
474
|
+
ENV_KEY,
|
|
475
|
+
"canonical",
|
|
476
|
+
"guid",
|
|
477
|
+
"documentation",
|
|
478
|
+
"checksum",
|
|
479
|
+
"iv",
|
|
480
|
+
"salt",
|
|
481
|
+
"secret",
|
|
482
|
+
"crypto"
|
|
483
|
+
]);
|
|
484
|
+
var WORKSPACE_VALUE_DEFAULTS = {
|
|
485
|
+
settings: DEFAULT_SETTINGS,
|
|
486
|
+
preferences: DEFAULT_PREFERENCES,
|
|
487
|
+
swagger: false,
|
|
488
|
+
description: ""
|
|
489
|
+
};
|
|
490
|
+
function isPlainObject(value) {
|
|
491
|
+
return value !== null && typeof value === "object" && !Array.isArray(value);
|
|
492
|
+
}
|
|
493
|
+
function fillAbsentDefaults(live, fallback) {
|
|
494
|
+
if (live === void 0) return fallback;
|
|
495
|
+
if (!isPlainObject(live) || !isPlainObject(fallback)) return live;
|
|
496
|
+
const out = { ...live };
|
|
497
|
+
for (const [key, member] of Object.entries(fallback)) out[key] = fillAbsentDefaults(live[key], member);
|
|
498
|
+
return out;
|
|
499
|
+
}
|
|
500
|
+
function settingsSides(row, theirs, rawOurs, rawTheirs) {
|
|
501
|
+
if (!isPlainObject(theirs)) return { ours: omitComparedElsewhere(row), live: theirs };
|
|
502
|
+
const rawLive = isPlainObject(rawTheirs) ? rawTheirs : theirs;
|
|
503
|
+
const live = { ...theirs };
|
|
504
|
+
const ours = {};
|
|
505
|
+
for (const [key, fallback] of Object.entries(WORKSPACE_VALUE_DEFAULTS)) {
|
|
506
|
+
live[key] = fillAbsentDefaults(rawLive[key], fallback);
|
|
507
|
+
if (Object.hasOwn(rawOurs, key)) ours[key] = rawOurs[key];
|
|
508
|
+
}
|
|
509
|
+
for (const [key, value] of Object.entries(omitComparedElsewhere(row))) {
|
|
510
|
+
if (Object.hasOwn(WORKSPACE_VALUE_DEFAULTS, key)) continue;
|
|
511
|
+
if (isWorkspaceKeyAtDefault(key, value) && (theirs[key] === void 0 || isWorkspaceKeyAtDefault(key, theirs[key]))) {
|
|
512
|
+
continue;
|
|
513
|
+
}
|
|
514
|
+
ours[key] = value;
|
|
515
|
+
}
|
|
516
|
+
return { ours, live };
|
|
517
|
+
}
|
|
518
|
+
function omitComparedElsewhere(row) {
|
|
519
|
+
return Object.fromEntries(Object.entries(row).filter(([key]) => !SETTINGS_KEYS_COMPARED_ELSEWHERE.has(key)));
|
|
520
|
+
}
|
|
521
|
+
function subsetDifferences(ours, theirs, path = "") {
|
|
522
|
+
const here = [path === "" ? "(row)" : path];
|
|
523
|
+
if (ours === null || typeof ours !== "object") return deepEqual(ours, theirs) ? [] : here;
|
|
524
|
+
if (Array.isArray(ours) || Array.isArray(theirs)) return deepEqual(ours, theirs) ? [] : here;
|
|
525
|
+
if (theirs === null || typeof theirs !== "object") return here;
|
|
526
|
+
const live = theirs;
|
|
527
|
+
return Object.entries(ours).flatMap(
|
|
528
|
+
([key, value]) => subsetDifferences(value, live[key], path === "" ? key : `${path}.${key}`)
|
|
529
|
+
);
|
|
530
|
+
}
|
|
531
|
+
function workspaceSettingsDifferences(ours, theirs, outgoing, live, documentation) {
|
|
532
|
+
if (ours === null || typeof ours !== "object" || Array.isArray(ours)) {
|
|
533
|
+
return deepEqual(normalize(ours), normalize(theirs)) ? [] : ["(row)"];
|
|
534
|
+
}
|
|
535
|
+
const sides = settingsSides(
|
|
536
|
+
normalize(ours),
|
|
537
|
+
normalize(theirs),
|
|
538
|
+
ours,
|
|
539
|
+
theirs
|
|
540
|
+
);
|
|
541
|
+
const fields = subsetDifferences(sides.ours, sides.live);
|
|
542
|
+
if (documentation !== "skip") fields.push(...documentationDifferences(ours, theirs, documentation));
|
|
543
|
+
const liveEnv = envValuesOf(live);
|
|
544
|
+
for (const name of envValuesOf(outgoing).keys()) {
|
|
545
|
+
if (!liveEnv.has(name)) fields.push(`env.${name}`);
|
|
546
|
+
}
|
|
547
|
+
return fields;
|
|
548
|
+
}
|
|
549
|
+
function documentationDifferences(ours, theirs, mode) {
|
|
550
|
+
const authored = ours.documentation;
|
|
551
|
+
if (authored === null || typeof authored !== "object" || Array.isArray(authored)) return [];
|
|
552
|
+
const block = authored;
|
|
553
|
+
const live = theirs !== null && typeof theirs === "object" && !Array.isArray(theirs) ? theirs.documentation : void 0;
|
|
554
|
+
const fields = [];
|
|
555
|
+
if (typeof block.token === "string" && block.token !== "") {
|
|
556
|
+
if (mode === "request" || block.token !== live?.token) fields.push("documentation.token");
|
|
557
|
+
}
|
|
558
|
+
if (Object.hasOwn(block, "require_token") && !deepEqual(block.require_token, live?.require_token)) {
|
|
559
|
+
fields.push("documentation.require_token");
|
|
560
|
+
}
|
|
561
|
+
return fields;
|
|
562
|
+
}
|
|
563
|
+
var SAMPLE = 5;
|
|
564
|
+
function payloadOf(bundle) {
|
|
565
|
+
const payload = bundle?.payload;
|
|
566
|
+
return payload !== null && typeof payload === "object" ? payload : {};
|
|
567
|
+
}
|
|
568
|
+
function guidOf(row) {
|
|
569
|
+
const guid = row.guid;
|
|
570
|
+
return typeof guid === "string" && guid !== "" ? guid : void 0;
|
|
571
|
+
}
|
|
572
|
+
function indexSection(rows2) {
|
|
573
|
+
const byGuid = /* @__PURE__ */ new Map();
|
|
574
|
+
const byName = /* @__PURE__ */ new Map();
|
|
575
|
+
const repeated = /* @__PURE__ */ new Set();
|
|
576
|
+
const all = [];
|
|
577
|
+
for (const row of rows2) {
|
|
578
|
+
if (row === null || typeof row !== "object") continue;
|
|
579
|
+
const record = row;
|
|
580
|
+
all.push(record);
|
|
581
|
+
const guid = guidOf(record);
|
|
582
|
+
if (guid !== void 0) byGuid.set(guid, record);
|
|
583
|
+
const name = record.name;
|
|
584
|
+
if (typeof name !== "string" || name === "") continue;
|
|
585
|
+
if (byName.has(name) || repeated.has(name)) {
|
|
586
|
+
byName.delete(name);
|
|
587
|
+
repeated.add(name);
|
|
588
|
+
continue;
|
|
589
|
+
}
|
|
590
|
+
byName.set(name, record);
|
|
591
|
+
}
|
|
592
|
+
return { byGuid, byName, all };
|
|
593
|
+
}
|
|
594
|
+
function byNameWithoutGuid(index, name, ourGuid) {
|
|
595
|
+
const candidate = index.byName.get(name);
|
|
596
|
+
if (candidate === void 0) return void 0;
|
|
597
|
+
return guidOf(candidate) === void 0 || ourGuid === void 0 ? candidate : void 0;
|
|
598
|
+
}
|
|
599
|
+
function nameOf(row) {
|
|
600
|
+
if (typeof row.name === "string" && row.name !== "") return row.name;
|
|
601
|
+
return typeof row.path === "string" && row.path !== "" ? row.path.replace(/^knowledge-refs\/[^/]+\//, "") : "(unnamed)";
|
|
602
|
+
}
|
|
603
|
+
var SDK_KIND_BY_SECTION = {
|
|
604
|
+
dbo: "table",
|
|
605
|
+
app: "apiGroup",
|
|
606
|
+
workflow_test: "workflowTest",
|
|
607
|
+
realtime_server: "realtimeServer",
|
|
608
|
+
channel: "realtimeChannel",
|
|
609
|
+
message: "realtimeMessage"
|
|
610
|
+
};
|
|
611
|
+
function sectionKind(key, row) {
|
|
612
|
+
if (key === "toolset") return row?.type === "agent" ? "agent" : "mcpServer";
|
|
613
|
+
return (Object.hasOwn(SDK_KIND_BY_SECTION, key) ? SDK_KIND_BY_SECTION[key] : void 0) ?? key;
|
|
614
|
+
}
|
|
615
|
+
function planTypeSection(type) {
|
|
616
|
+
return (Object.hasOwn(PLAN_TYPE_SECTIONS, type) ? PLAN_TYPE_SECTIONS[type] : void 0) ?? type;
|
|
617
|
+
}
|
|
618
|
+
var PLAN_TYPE_SECTIONS = { table: "dbo", api_group: "app" };
|
|
619
|
+
var SETTINGS_LABEL = `${sectionKind(WORKSPACE_KEY)}:(settings)`;
|
|
620
|
+
function rowLabeler(payload) {
|
|
621
|
+
const groups = /* @__PURE__ */ new Map();
|
|
622
|
+
for (const group of Array.isArray(payload.app) ? payload.app : []) {
|
|
623
|
+
if (group === null || typeof group !== "object") continue;
|
|
624
|
+
const g = group;
|
|
625
|
+
if (typeof g.name !== "string") continue;
|
|
626
|
+
if (typeof g.guid === "string" && g.guid !== "") groups.set(g.guid, g.name);
|
|
627
|
+
if (typeof g.id === "number" && g.id !== 0) groups.set(g.id, g.name);
|
|
628
|
+
}
|
|
629
|
+
return (key, row) => {
|
|
630
|
+
const kind = sectionKind(key, row);
|
|
631
|
+
if (key === "knowledge_file") return `${kind}:${identityName(payload, key, row)}`;
|
|
632
|
+
if ((key === "channel" || key === "message") && typeof row.name === "string" && row.name !== "") {
|
|
633
|
+
return `${kind}:${identityName(payload, key, row)}`;
|
|
634
|
+
}
|
|
635
|
+
if (key !== "query") return `${kind}:${nameOf(row)}`;
|
|
636
|
+
const verb = typeof row.verb === "string" && row.verb !== "" ? `${row.verb} ` : "";
|
|
637
|
+
const ref = row.app?.id;
|
|
638
|
+
const group = ref === void 0 || ref === 0 || ref === "" ? void 0 : groups.get(ref) ?? (typeof ref === "number" ? `#${ref}` : String(ref));
|
|
639
|
+
return `${kind}:${verb}${nameOf(row)}${group === void 0 ? "" : ` (apiGroup ${group})`}`;
|
|
640
|
+
};
|
|
641
|
+
}
|
|
642
|
+
function declaredLabels(bundle) {
|
|
643
|
+
const payload = payloadOf(bundle);
|
|
644
|
+
const label = rowLabeler(payload);
|
|
645
|
+
return Object.entries(payload).flatMap(
|
|
646
|
+
([key, section]) => Array.isArray(section) ? section.flatMap(
|
|
647
|
+
(row) => row !== null && typeof row === "object" && typeof row.name === "string" ? [label(key, row)] : []
|
|
648
|
+
) : []
|
|
649
|
+
);
|
|
650
|
+
}
|
|
651
|
+
var isEmptyList = (v) => Array.isArray(v) && v.length === 0;
|
|
652
|
+
var isEmptyText = (v) => v === "";
|
|
653
|
+
var isFalse = (v) => v === false;
|
|
654
|
+
var isNull = (v) => v === null;
|
|
655
|
+
var isNoTests = (v) => v === null || isEmptyList(v);
|
|
656
|
+
var allNull = (v) => isPlainObject(v) && Object.values(v).every((m) => m === null);
|
|
657
|
+
var telemetryOff = (v) => deepEqual(v, {
|
|
658
|
+
enabled: false,
|
|
659
|
+
langfuse: { base_url: "", public_key: "", secret_key: "" },
|
|
660
|
+
langsmith: { api_key: "" },
|
|
661
|
+
braintrust: { api_key: "", project_name: "" },
|
|
662
|
+
destination: ""
|
|
663
|
+
});
|
|
664
|
+
var ENGINE_FILLED_DEFAULTS = {
|
|
665
|
+
tool: {
|
|
666
|
+
auth: isFalse,
|
|
667
|
+
icons: isEmptyList,
|
|
668
|
+
title: isEmptyText,
|
|
669
|
+
annotations: allNull,
|
|
670
|
+
output_schema: isEmptyList,
|
|
671
|
+
test: isNoTests
|
|
672
|
+
},
|
|
673
|
+
// Agents and MCP servers share the section; an MCP server stores no settings.
|
|
674
|
+
toolset: {
|
|
675
|
+
prompt: isEmptyList,
|
|
676
|
+
resource: isEmptyList,
|
|
677
|
+
agent_settings: isNull
|
|
678
|
+
}
|
|
679
|
+
};
|
|
680
|
+
var AGENT_SETTINGS_DEFAULTS = {
|
|
681
|
+
model: isEmptyText,
|
|
682
|
+
telemetry: telemetryOff
|
|
683
|
+
};
|
|
684
|
+
function withoutEngineDefaults(defaults, ours, theirs) {
|
|
685
|
+
if (defaults === void 0) return [ours, theirs];
|
|
686
|
+
const a = { ...ours };
|
|
687
|
+
const b = { ...theirs };
|
|
688
|
+
for (const [key, isDefault] of Object.entries(defaults)) {
|
|
689
|
+
const atDefault = (row) => !Object.hasOwn(row, key) || isDefault(row[key]);
|
|
690
|
+
if (atDefault(a) && atDefault(b)) {
|
|
691
|
+
delete a[key];
|
|
692
|
+
delete b[key];
|
|
693
|
+
}
|
|
694
|
+
}
|
|
695
|
+
if (defaults === ENGINE_FILLED_DEFAULTS.toolset && isPlainObject(a.agent_settings) && isPlainObject(b.agent_settings)) {
|
|
696
|
+
[a.agent_settings, b.agent_settings] = withoutEngineDefaults(AGENT_SETTINGS_DEFAULTS, a.agent_settings, b.agent_settings);
|
|
697
|
+
}
|
|
698
|
+
return [a, b];
|
|
699
|
+
}
|
|
700
|
+
function withoutNullColumnDefaults(table) {
|
|
701
|
+
const strip = (columns) => Array.isArray(columns) ? columns.map((col) => {
|
|
702
|
+
if (!isPlainObject(col)) return col;
|
|
703
|
+
const { default: d, ...rest } = col;
|
|
704
|
+
const out = d === null ? rest : col;
|
|
705
|
+
return Array.isArray(out.children) ? { ...out, children: strip(out.children) } : out;
|
|
706
|
+
}) : columns;
|
|
707
|
+
return Array.isArray(table.schema) ? { ...table, schema: strip(table.schema) } : table;
|
|
708
|
+
}
|
|
709
|
+
function hostedIconIdentity(src) {
|
|
710
|
+
if (typeof src !== "string") return void 0;
|
|
711
|
+
const decode = (name) => {
|
|
712
|
+
try {
|
|
713
|
+
return decodeURIComponent(name);
|
|
714
|
+
} catch {
|
|
715
|
+
return name;
|
|
716
|
+
}
|
|
717
|
+
};
|
|
718
|
+
const placeholder = /^xanosdk-file:\/\/([^/\s]+)\/([^/\s]+)$/.exec(src);
|
|
719
|
+
if (placeholder) return `${placeholder[1]}/${decode(placeholder[2])}`;
|
|
720
|
+
const library = /^\/vault\/[^/\s]+\/([^/\s]+)\/[^/\s]+\/([^/\s]+)$/.exec(src);
|
|
721
|
+
if (library) return `${library[1]}/${decode(library[2])}`;
|
|
722
|
+
return void 0;
|
|
723
|
+
}
|
|
724
|
+
function withHostedIconIdentity(row) {
|
|
725
|
+
if (!Array.isArray(row.icons)) return row;
|
|
726
|
+
return {
|
|
727
|
+
...row,
|
|
728
|
+
icons: row.icons.map((icon) => {
|
|
729
|
+
if (!isPlainObject(icon)) return icon;
|
|
730
|
+
const id = hostedIconIdentity(icon.src);
|
|
731
|
+
return id === void 0 ? icon : { ...icon, src: `hosted:${id}` };
|
|
732
|
+
})
|
|
733
|
+
};
|
|
734
|
+
}
|
|
735
|
+
var INDEX_SET_KEY = "(indexes)";
|
|
736
|
+
function comparable(section, oursIn, theirsIn, pinned) {
|
|
737
|
+
let [ours, theirs] = withoutEngineDefaults(Object.hasOwn(ENGINE_FILLED_DEFAULTS, section) ? ENGINE_FILLED_DEFAULTS[section] : void 0, oursIn, theirsIn);
|
|
738
|
+
if (section === "dbo") {
|
|
739
|
+
[ours, theirs] = [withoutNullColumnDefaults(ours), withoutNullColumnDefaults(theirs)];
|
|
740
|
+
[ours, theirs] = [{ ...ours, [INDEX_SET_KEY]: indexKeysOf(oursIn) }, { ...theirs, [INDEX_SET_KEY]: indexKeysOf(theirsIn) }];
|
|
741
|
+
}
|
|
742
|
+
if (HOSTED_ICON_KINDS.includes(section)) [ours, theirs] = [withHostedIconIdentity(ours), withHostedIconIdentity(theirs)];
|
|
743
|
+
if (pinned || !("canonical" in ours || "canonical" in theirs)) {
|
|
744
|
+
return [normalize(ours), normalize(theirs)];
|
|
745
|
+
}
|
|
746
|
+
const { canonical: _a, ...oursRest } = ours;
|
|
747
|
+
const { canonical: _b, ...theirsRest } = theirs;
|
|
748
|
+
return [normalize(oursRest), normalize(theirsRest)];
|
|
749
|
+
}
|
|
750
|
+
function pinsCanonical(key, record, pinnedKeys) {
|
|
751
|
+
const name = typeof record.name === "string" ? record.name : void 0;
|
|
752
|
+
if (pinnedKeys !== void 0) {
|
|
753
|
+
return name !== void 0 && pinnedKeys.has(`${key}:${name}`);
|
|
754
|
+
}
|
|
755
|
+
return typeof record.canonical === "string" && record.canonical !== "";
|
|
756
|
+
}
|
|
757
|
+
function compareToLive(outgoing, live, pinnedKeys, opts = {}) {
|
|
758
|
+
const ours = payloadOf(outgoing);
|
|
759
|
+
const theirs = payloadOf(live);
|
|
760
|
+
const ourLabel = rowLabeler(ours);
|
|
761
|
+
const theirLabel = rowLabeler(theirs);
|
|
762
|
+
const cap = opts.sample === "all" ? Number.POSITIVE_INFINITY : opts.sample ?? SAMPLE;
|
|
763
|
+
const differing = [];
|
|
764
|
+
const missing = [];
|
|
765
|
+
const liveOnly = [];
|
|
766
|
+
let settingsFields = [];
|
|
767
|
+
let differingCount = 0;
|
|
768
|
+
let missingCount = 0;
|
|
769
|
+
let compared = 0;
|
|
770
|
+
const note = (label) => {
|
|
771
|
+
differingCount++;
|
|
772
|
+
if (differing.length < cap) differing.push(label);
|
|
773
|
+
};
|
|
774
|
+
const absent = (label) => {
|
|
775
|
+
missingCount++;
|
|
776
|
+
if (missing.length < cap) missing.push(label);
|
|
777
|
+
};
|
|
778
|
+
for (const [key, value] of Object.entries(ours)) {
|
|
779
|
+
if (key === ENV_KEY || ARCHIVE_KEYS.has(key)) continue;
|
|
780
|
+
if (key === WORKSPACE_KEY) {
|
|
781
|
+
compared++;
|
|
782
|
+
settingsFields = workspaceSettingsDifferences(value, theirs[key], outgoing, live, opts.documentation ?? "request");
|
|
783
|
+
if (settingsFields.length > 0) note(SETTINGS_LABEL);
|
|
784
|
+
continue;
|
|
785
|
+
}
|
|
786
|
+
if (!Array.isArray(value)) {
|
|
787
|
+
compared++;
|
|
788
|
+
if (!deepEqual(normalize(value), normalize(theirs[key]))) note(`${sectionKind(key)}:(settings)`);
|
|
789
|
+
continue;
|
|
790
|
+
}
|
|
791
|
+
const liveSection = theirs[key];
|
|
792
|
+
const index = indexSection(Array.isArray(liveSection) ? liveSection : []);
|
|
793
|
+
const matched = /* @__PURE__ */ new Set();
|
|
794
|
+
for (const row of value) {
|
|
795
|
+
compared++;
|
|
796
|
+
if (row === null || typeof row !== "object") {
|
|
797
|
+
note(`${sectionKind(key)}:(unreadable)`);
|
|
798
|
+
continue;
|
|
799
|
+
}
|
|
800
|
+
const record = row;
|
|
801
|
+
const guid = guidOf(record);
|
|
802
|
+
const name = typeof record.name === "string" ? record.name : void 0;
|
|
803
|
+
const counterpart = (guid !== void 0 ? index.byGuid.get(guid) : void 0) ?? // Name only answers what guid cannot. A live row that HAS a guid and
|
|
804
|
+
// does not have ours is a different object — the import would create
|
|
805
|
+
// ours alongside it — so the fallback is refused there and taken only
|
|
806
|
+
// when one side carries no guid at all.
|
|
807
|
+
(name !== void 0 ? byNameWithoutGuid(index, name, guid) : void 0);
|
|
808
|
+
if (counterpart === void 0) {
|
|
809
|
+
absent(ourLabel(key, record));
|
|
810
|
+
continue;
|
|
811
|
+
}
|
|
812
|
+
matched.add(counterpart);
|
|
813
|
+
if (!deepEqual(...comparable(key, record, counterpart, pinsCanonical(key, record, pinnedKeys)))) {
|
|
814
|
+
note(ourLabel(key, record));
|
|
815
|
+
}
|
|
816
|
+
}
|
|
817
|
+
if (key === VAULT_KEY) continue;
|
|
818
|
+
for (const row of index.all) {
|
|
819
|
+
if (!matched.has(row)) liveOnly.push(theirLabel(key, row));
|
|
820
|
+
}
|
|
821
|
+
}
|
|
822
|
+
for (const [key, value] of Object.entries(theirs)) {
|
|
823
|
+
if (key in ours || key === ENV_KEY || key === WORKSPACE_KEY || key === VAULT_KEY || ARCHIVE_KEYS.has(key)) continue;
|
|
824
|
+
if (!Array.isArray(value)) continue;
|
|
825
|
+
for (const row of value) {
|
|
826
|
+
if (row !== null && typeof row === "object") liveOnly.push(theirLabel(key, row));
|
|
827
|
+
}
|
|
828
|
+
}
|
|
829
|
+
return {
|
|
830
|
+
converged: compared > 0 && differingCount === 0 && missingCount === 0,
|
|
831
|
+
compared,
|
|
832
|
+
differing,
|
|
833
|
+
differingCount,
|
|
834
|
+
missing,
|
|
835
|
+
missingCount,
|
|
836
|
+
liveOnly,
|
|
837
|
+
settingsFields
|
|
838
|
+
};
|
|
839
|
+
}
|
|
840
|
+
|
|
841
|
+
export {
|
|
842
|
+
storedColumnsAfter,
|
|
843
|
+
uniqueIndexLabels,
|
|
844
|
+
indexKeysOf,
|
|
845
|
+
vectorSize,
|
|
846
|
+
envValuesOf,
|
|
847
|
+
diffAgainstLive,
|
|
848
|
+
secretsCarriedBy,
|
|
849
|
+
secretsInMultidoc,
|
|
850
|
+
passwordHashesInMultidoc,
|
|
851
|
+
sharedSchemaChanges,
|
|
852
|
+
tableAdditions,
|
|
853
|
+
payloadOf,
|
|
854
|
+
sectionKind,
|
|
855
|
+
planTypeSection,
|
|
856
|
+
SETTINGS_LABEL,
|
|
857
|
+
rowLabeler,
|
|
858
|
+
declaredLabels,
|
|
859
|
+
hostedIconIdentity,
|
|
860
|
+
compareToLive
|
|
861
|
+
};
|
|
862
|
+
//# sourceMappingURL=chunk-45UIT5T2.js.map
|