@xanots/sdk 0.0.9 → 0.0.11
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 +34 -0
- package/README.md +66 -21
- package/dist/.build-fingerprint +1 -1
- package/dist/{agent-file-refresh-4W37DGXS.js → agent-file-refresh-QNKN5RYD.js} +3 -3
- package/dist/bin.js +10 -8
- package/dist/{branch-commands-PBQ36L4A.js → branch-commands-2BLOC2GR.js} +13 -11
- package/dist/bundle.d.ts +218 -0
- package/dist/bundle.js +143 -0
- package/dist/{capture-7PO6SGB4.js → capture-4WVJY4DQ.js} +2 -2
- package/dist/{chunk-OW2QZEWL.js → chunk-22TKBSDV.js} +2 -2
- package/dist/{chunk-ZOYMZZ3S.js → chunk-3INK4Y4E.js} +1 -1
- package/dist/{chunk-NDZFBZHC.js → chunk-3UABJA4X.js} +1 -1
- package/dist/{chunk-6Z5CNWFC.js → chunk-4IF54NU5.js} +37 -6
- package/dist/{chunk-KSV7VOEX.js → chunk-4Q7ZOHH7.js} +3 -3
- package/dist/{chunk-QTNO2WD6.js → chunk-7ZYW652H.js} +1 -1
- package/dist/{chunk-4PTSTDIG.js → chunk-AIZKXUNP.js} +2 -2
- package/dist/{chunk-P5C2YKAM.js → chunk-ANUDXFEX.js} +18 -27
- package/dist/{chunk-4BXJGVZ3.js → chunk-BC2C5GVI.js} +2 -69
- package/dist/chunk-BSK7ELHU.js +70 -0
- package/dist/chunk-CTD5ZCV6.js +28 -0
- package/dist/{chunk-5HCDZ2XN.js → chunk-DBFU47BJ.js} +2 -2
- package/dist/{chunk-OKNSR7MT.js → chunk-DIA7CT7J.js} +129 -150
- package/dist/chunk-EHP3WPEG.js +21 -0
- package/dist/{chunk-JQLR64UC.js → chunk-F6CYJ7TN.js} +21 -6
- package/dist/{chunk-BKDJN76G.js → chunk-FE5I6S6N.js} +1 -1
- package/dist/{chunk-5YQOIFT4.js → chunk-G4EJMQLD.js} +2 -2
- package/dist/{chunk-L6TPHWAU.js → chunk-HYBN4H3F.js} +60 -86
- package/dist/{chunk-QIWBCS7N.js → chunk-JGCWTCA7.js} +2 -2
- package/dist/{chunk-MDXR5E5Q.js → chunk-K5IOND4K.js} +2 -2
- package/dist/{chunk-4PE4ZAB7.js → chunk-KA6G2L7U.js} +5 -5
- package/dist/chunk-OHX6MIUZ.js +184 -0
- package/dist/{chunk-UDL46O35.js → chunk-OWGCOGKK.js} +155 -3
- package/dist/{chunk-QONOJO45.js → chunk-QK7ZQJLP.js} +140 -20
- package/dist/{chunk-3QW5NFZJ.js → chunk-QKM4U5UK.js} +3 -3
- package/dist/{chunk-7OXFMCTX.js → chunk-QYMAZRAU.js} +7 -7
- package/dist/{chunk-K3YSQDXJ.js → chunk-RCT7UX7B.js} +92 -75
- package/dist/{chunk-T4XPCJRF.js → chunk-TCFIPDB3.js} +1 -1
- package/dist/{chunk-ZZLPTHT5.js → chunk-UOZMSF4C.js} +15 -8
- package/dist/{chunk-7JDT4PBU.js → chunk-VAF6A3YD.js} +5 -179
- package/dist/{chunk-6DHBYBTO.js → chunk-VNQM3V2C.js} +1 -2
- package/dist/chunk-WGPXT2G2.js +22 -0
- package/dist/{chunk-6AAT2AYQ.js → chunk-WP4OZZV4.js} +2 -2
- package/dist/{chunk-OYMR5AMJ.js → chunk-XEOX6AM7.js} +2 -2
- package/dist/{chunk-MU3O43L2.js → chunk-YBC3IKMF.js} +2 -2
- package/dist/chunk-ZQ2PKR6R.js +40 -0
- package/dist/cli.d.ts +57 -31
- package/dist/cli.js +9 -7
- package/dist/codegen-command-FUT2KJB6.js +49 -0
- package/dist/codegen.d.ts +2 -1
- package/dist/{completion-A6BZ3XGU.js → completion-WF46272M.js} +2 -2
- package/dist/{config-NL33PN4D.js → config-476F3PT5.js} +1 -1
- package/dist/{deploy-command-5TTI4TUP.js → deploy-command-IP7V7GT4.js} +69 -100
- package/dist/{ephemeral-command-7TK52YQM.js → ephemeral-command-U4AQ3TXX.js} +25 -28
- package/dist/index.d.ts +6 -4
- package/dist/index.js +10 -9
- package/dist/init-command-NPVL32L6.js +34 -0
- package/dist/{onboard-command-EHOHKQQU.js → init-web-3JNFG6GI.js} +10 -10
- package/dist/internal.d.ts +4 -4
- package/dist/internal.js +86 -73
- package/dist/io-P2H75UV2.js +12 -0
- package/dist/{live-diff-QK4KC2FJ.js → live-diff-IXKBVG4K.js} +3 -3
- package/dist/{lock-GFXD6G2E.js → lock-46FWYE4D.js} +3 -2
- package/dist/{lock-commands-ET7NIOLH.js → lock-commands-ZZKZ4LZJ.js} +23 -21
- package/dist/{login-command-DFCURZLC.js → login-command-Z6CHTA57.js} +7 -7
- package/dist/{logout-command-WXVZQCAV.js → logout-command-ER6IKAYJ.js} +2 -2
- package/dist/{loop-7SAIGRCZ.js → loop-D5NPL4VH.js} +3 -3
- package/dist/{marketplace-command-BCOAAN2I.js → marketplace-command-P4IPLJ6J.js} +6 -6
- package/dist/{meta-client-57ZWVHST.js → meta-client-K2J4XH64.js} +6 -6
- package/dist/node.d.ts +5 -4
- package/dist/node.js +15 -13
- package/dist/{validate-command-SK5FPCV7.js → preflight-command-K346GPTY.js} +20 -18
- package/dist/{profile-command-QJAAUZIV.js → profile-command-LJSBDV2L.js} +5 -5
- package/dist/{release-command-4EXVLYV2.js → release-command-IMNTIVWK.js} +42 -38
- package/dist/response-BQVQ24l1.d.ts +844 -0
- package/dist/{routes-manifest-SP3ZXLMR.js → routes-manifest-PWZHDOI5.js} +2 -2
- package/dist/scaffold.js +2 -2
- package/dist/{static-host-D6KS7X45.js → static-host-3WMV7IZO.js} +1 -1
- package/dist/status-command-AL47VG7H.js +162 -0
- package/dist/{store-CUCBSYLj.d.ts → store-BLyNeQ8S.d.ts} +21 -8
- package/dist/{test-command-2F5LKMI6.js → test-command-YAZLKLGQ.js} +45 -28
- package/dist/{upgrade-command-QL523I62.js → upgrade-command-BN3EHAOI.js} +16 -14
- package/dist/{workspace-K72NP7SX.js → workspace-2COHDBM3.js} +1 -1
- package/dist/{workspace-command-HYA6JEKK.js → workspace-command-MNK7Y7MQ.js} +36 -34
- package/dist/{workspace-export-AJMGN3CQ.js → workspace-export-DURY5WYL.js} +2 -2
- package/dist/{response-CVAE2kMj.d.ts → xdo-BjJj5W_E.d.ts} +1 -837
- package/guides/README.md +2 -2
- package/guides/cli.md +17 -19
- package/guides/codegen.md +21 -5
- package/guides/coverage.md +1 -1
- package/guides/deploying.md +31 -34
- package/guides/environment.md +4 -4
- package/guides/object-kinds.md +3 -3
- package/guides/project-structure.md +1 -1
- package/guides/scaffold.md +25 -2
- package/guides/typed-frontend.md +2 -2
- package/llms/filters.md +11 -10
- package/llms/kinds-agent-mcp.md +1 -1
- package/llms/kinds-core.md +2 -2
- package/llms/kinds-realtime.md +1 -1
- package/llms/lock.md +5 -5
- package/llms/statements-data.md +3 -1
- package/llms/tests.md +1 -1
- package/llms/values.md +1 -1
- package/llms-full.txt +65 -63
- package/llms.txt +40 -41
- package/manifest.json +96 -427
- package/package.json +7 -2
- package/dist/chunk-3EYUR3TX.js +0 -100
- package/dist/chunk-JQJPFUZI.js +0 -118
- package/dist/chunk-YNZFIY4J.js +0 -78
- package/dist/codegen-command-YSCSCVT5.js +0 -43
- package/dist/env-target-4T7AT347.js +0 -16
- package/dist/init-command-OVFFW4QS.js +0 -30
- package/dist/io-M7XZEMK7.js +0 -11
- package/dist/sandbox-details-command-EDO56IY3.js +0 -18
- package/dist/sandbox-export-command-MO6DEZ7Z.js +0 -24
|
@@ -1,41 +1,26 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
configuredDeadReturnBlocks,
|
|
5
|
-
filledContext,
|
|
6
|
-
hasNoListBounds,
|
|
7
|
-
hasUnreadableInput,
|
|
8
|
-
isBlankAgentSettings,
|
|
9
|
-
isBlankGroupStatement,
|
|
10
|
-
isDeadResultItem,
|
|
11
|
-
isDefaultEnvelopeMember,
|
|
12
|
-
isEmptyCustomize,
|
|
13
|
-
isEmptyOutput,
|
|
14
|
-
liveArrayMapContext,
|
|
15
|
-
normalize,
|
|
16
|
-
retiredInputSuccessor,
|
|
17
|
-
retiredInputs
|
|
18
|
-
} from "./chunk-ZOYMZZ3S.js";
|
|
2
|
+
resolveEphemeralName
|
|
3
|
+
} from "./chunk-ZQ2PKR6R.js";
|
|
19
4
|
import {
|
|
20
5
|
getAccessToken
|
|
21
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-QKM4U5UK.js";
|
|
22
7
|
import {
|
|
23
8
|
exportWorkspaceBundle
|
|
24
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-7ZYW652H.js";
|
|
25
10
|
import {
|
|
26
11
|
projectShellFiles,
|
|
27
12
|
resolveFrontendPreset,
|
|
28
13
|
resolveThemeChoice,
|
|
29
14
|
sanitizeAppName
|
|
30
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-4IF54NU5.js";
|
|
31
16
|
import {
|
|
32
17
|
XANO_DIR,
|
|
33
18
|
resolveAiPresets,
|
|
34
19
|
scaffoldProject
|
|
35
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-KA6G2L7U.js";
|
|
36
21
|
import {
|
|
37
22
|
TEST_EXPECT_TYPES
|
|
38
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-G4EJMQLD.js";
|
|
39
24
|
import {
|
|
40
25
|
raw
|
|
41
26
|
} from "./chunk-LU7TRWMC.js";
|
|
@@ -44,14 +29,12 @@ import {
|
|
|
44
29
|
describeOrigin,
|
|
45
30
|
renderCodegenMarker,
|
|
46
31
|
renderCodegenReadme
|
|
47
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-ANUDXFEX.js";
|
|
48
33
|
import {
|
|
49
34
|
FIELD_METHODS,
|
|
50
|
-
STATEMENT_SURFACES,
|
|
51
35
|
SUPERSEDED_STATEMENTS,
|
|
52
|
-
sPathOf,
|
|
53
36
|
supersededBy
|
|
54
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-BSK7ELHU.js";
|
|
55
38
|
import {
|
|
56
39
|
DEFAULT_PREFERENCES,
|
|
57
40
|
DEFAULT_SETTINGS,
|
|
@@ -67,14 +50,40 @@ import {
|
|
|
67
50
|
searchConstrainsRows,
|
|
68
51
|
tableTrigger,
|
|
69
52
|
workspaceTrigger
|
|
70
|
-
} from "./chunk-
|
|
53
|
+
} from "./chunk-UOZMSF4C.js";
|
|
54
|
+
import {
|
|
55
|
+
linkedTableOf,
|
|
56
|
+
tableRefOf
|
|
57
|
+
} from "./chunk-EHP3WPEG.js";
|
|
58
|
+
import {
|
|
59
|
+
ENGINE_HISTORY_LIMIT,
|
|
60
|
+
clearLocalDboRefs,
|
|
61
|
+
configuredDeadReturnBlocks,
|
|
62
|
+
filledContext,
|
|
63
|
+
hasNoListBounds,
|
|
64
|
+
hasUnreadableInput,
|
|
65
|
+
isBlankAgentSettings,
|
|
66
|
+
isBlankGroupStatement,
|
|
67
|
+
isDeadResultItem,
|
|
68
|
+
isDefaultEnvelopeMember,
|
|
69
|
+
isEmptyCustomize,
|
|
70
|
+
isEmptyOutput,
|
|
71
|
+
liveArrayMapContext,
|
|
72
|
+
normalize,
|
|
73
|
+
retiredInputSuccessor,
|
|
74
|
+
retiredInputs
|
|
75
|
+
} from "./chunk-3INK4Y4E.js";
|
|
76
|
+
import {
|
|
77
|
+
STATEMENT_SURFACES,
|
|
78
|
+
sPathOf
|
|
79
|
+
} from "./chunk-BC2C5GVI.js";
|
|
71
80
|
import {
|
|
72
81
|
loadDefault,
|
|
73
82
|
readVersion
|
|
74
|
-
} from "./chunk-
|
|
83
|
+
} from "./chunk-RCT7UX7B.js";
|
|
75
84
|
import {
|
|
76
85
|
UsageError
|
|
77
|
-
} from "./chunk-
|
|
86
|
+
} from "./chunk-F6CYJ7TN.js";
|
|
78
87
|
import {
|
|
79
88
|
blank,
|
|
80
89
|
detail,
|
|
@@ -115,11 +124,14 @@ import {
|
|
|
115
124
|
sys,
|
|
116
125
|
toolset,
|
|
117
126
|
withFilters
|
|
118
|
-
} from "./chunk-
|
|
127
|
+
} from "./chunk-QK7ZQJLP.js";
|
|
119
128
|
import {
|
|
120
129
|
parsePathParams,
|
|
121
130
|
unboundPathParams
|
|
122
131
|
} from "./chunk-WHOJWOSV.js";
|
|
132
|
+
import {
|
|
133
|
+
REFERENCEABLE_KIND_PAYLOAD_KEYS
|
|
134
|
+
} from "./chunk-VAF6A3YD.js";
|
|
123
135
|
import {
|
|
124
136
|
COLUMN_CONTEXT,
|
|
125
137
|
INPUT_CONTEXT,
|
|
@@ -128,9 +140,6 @@ import {
|
|
|
128
140
|
encodeMockMap,
|
|
129
141
|
encodeStatement
|
|
130
142
|
} from "./chunk-5XZ744TS.js";
|
|
131
|
-
import {
|
|
132
|
-
REFERENCEABLE_KIND_PAYLOAD_KEYS
|
|
133
|
-
} from "./chunk-7JDT4PBU.js";
|
|
134
143
|
|
|
135
144
|
// src/emit/codegen-command.ts
|
|
136
145
|
import { existsSync, readFileSync, writeFileSync } from "fs";
|
|
@@ -1678,20 +1687,6 @@ function recoverOptions(stored, includeDescription, elide = true) {
|
|
|
1678
1687
|
function storedChildren(stored) {
|
|
1679
1688
|
return stored.children ?? [];
|
|
1680
1689
|
}
|
|
1681
|
-
function dbLinkTableGuid(stored) {
|
|
1682
|
-
const suffix = "_mvpschema";
|
|
1683
|
-
if (typeof stored.type !== "string" || !stored.type.endsWith(suffix)) return null;
|
|
1684
|
-
const guid = stored.type.slice(0, -suffix.length);
|
|
1685
|
-
return guid === "" ? null : guid;
|
|
1686
|
-
}
|
|
1687
|
-
function tableRefGuid(stored) {
|
|
1688
|
-
if (stored.type !== "int" && stored.type !== "uuid") return null;
|
|
1689
|
-
const last = stored.methods?.[stored.methods.length - 1];
|
|
1690
|
-
const arg = last?.name === "@" ? last.arg?.[0] : void 0;
|
|
1691
|
-
if (typeof arg !== "string" || !arg.startsWith("dbo=")) return null;
|
|
1692
|
-
const guid = arg.slice("dbo=".length);
|
|
1693
|
-
return guid === "" ? null : guid;
|
|
1694
|
-
}
|
|
1695
1690
|
function unbindLocalCustomizeRefs(stored) {
|
|
1696
1691
|
const customize = stored.customize;
|
|
1697
1692
|
if (customize === null || typeof customize !== "object") return { field: stored, unbound: [] };
|
|
@@ -1779,7 +1774,7 @@ function decodeField(ctx, refs, stored, surface, resolve2 = {}) {
|
|
|
1779
1774
|
return null;
|
|
1780
1775
|
};
|
|
1781
1776
|
const catalog = surface === "input" ? input : f;
|
|
1782
|
-
const dbLinkGuid =
|
|
1777
|
+
const dbLinkGuid = linkedTableOf(stored);
|
|
1783
1778
|
if (dbLinkGuid !== null && surface === "input") {
|
|
1784
1779
|
const rest = { ...opts };
|
|
1785
1780
|
delete rest.merge;
|
|
@@ -1794,7 +1789,7 @@ function decodeField(ctx, refs, stored, surface, resolve2 = {}) {
|
|
|
1794
1789
|
);
|
|
1795
1790
|
if (decoded) return decoded;
|
|
1796
1791
|
}
|
|
1797
|
-
const refGuid =
|
|
1792
|
+
const refGuid = tableRefOf(stored);
|
|
1798
1793
|
if (refGuid !== null) {
|
|
1799
1794
|
const withoutRef = { ...opts, methods: opts.methods.slice(0, -1) };
|
|
1800
1795
|
if (withoutRef.methods.length === 0) delete withoutRef.methods;
|
|
@@ -6748,24 +6743,10 @@ function reportMismatches(report, result) {
|
|
|
6748
6743
|
|
|
6749
6744
|
// src/emit/codegen-command.ts
|
|
6750
6745
|
async function fetchBundle(args, source) {
|
|
6751
|
-
if (source.kind === "sandbox") {
|
|
6752
|
-
const auth3 = await getAccessToken(args);
|
|
6753
|
-
step("Reading the sandbox workspace");
|
|
6754
|
-
const { fetchSandboxBundle } = await import("./sandbox-export-command-MO6DEZ7Z.js");
|
|
6755
|
-
return {
|
|
6756
|
-
bundle: await fetchSandboxBundle(auth3),
|
|
6757
|
-
origin: { source: "sandbox", origin: auth3.instance }
|
|
6758
|
-
};
|
|
6759
|
-
}
|
|
6760
6746
|
if (source.kind === "ephemeral") {
|
|
6761
|
-
const name = args.positionals[0];
|
|
6762
|
-
if (name === void 0 || name === "") {
|
|
6763
|
-
throw new Error(
|
|
6764
|
-
"`xanots ephemeral codegen` needs a tenant name and an output path: `xanots ephemeral codegen <tenant> <path>`. Run `xanots ephemeral list` to see them."
|
|
6765
|
-
);
|
|
6766
|
-
}
|
|
6767
6747
|
const auth3 = await getAccessToken(args);
|
|
6768
|
-
const
|
|
6748
|
+
const name = resolveEphemeralName(auth3, source.name);
|
|
6749
|
+
const { resolveLive, fetchEphemeralBundle } = await import("./ephemeral-command-U4AQ3TXX.js");
|
|
6769
6750
|
const summary = await resolveLive(auth3, auth3.workspaceId, name);
|
|
6770
6751
|
step(`Reading ephemeral "${name}"`);
|
|
6771
6752
|
return {
|
|
@@ -6853,19 +6834,12 @@ function isMissingDependencyError(err) {
|
|
|
6853
6834
|
}
|
|
6854
6835
|
return false;
|
|
6855
6836
|
}
|
|
6856
|
-
async function
|
|
6857
|
-
const
|
|
6858
|
-
const
|
|
6859
|
-
|
|
6860
|
-
|
|
6861
|
-
|
|
6862
|
-
}
|
|
6863
|
-
if (pathArg === void 0 || pathArg === "") {
|
|
6864
|
-
throw new Error(
|
|
6865
|
-
source.kind === "ephemeral" ? "`xanots ephemeral codegen` needs an output path: `xanots ephemeral codegen <tenant> <path>`." : `\`xanots ${source.kind === "file" ? "codegen <bundle.json>" : `${source.kind} codegen`}\` needs an output path.`
|
|
6866
|
-
);
|
|
6867
|
-
}
|
|
6868
|
-
const { bundle, origin } = source.kind === "file" ? { bundle: readBundleFile(fileArg), origin: { source: "file", origin: fileArg } } : await fetchBundle(args, source);
|
|
6837
|
+
async function runInitFromCommand(args, source) {
|
|
6838
|
+
const pathArg = args.positionals[0] ?? ".";
|
|
6839
|
+
const { bundle, origin } = source.kind === "file" ? {
|
|
6840
|
+
bundle: readBundleFile(source.path),
|
|
6841
|
+
origin: { source: "file", origin: source.path }
|
|
6842
|
+
} : await fetchBundle(args, source);
|
|
6869
6843
|
const mode = reportMode(args.report);
|
|
6870
6844
|
const out2 = resolve(pathArg);
|
|
6871
6845
|
const appName = sanitizeAppName(args.name ?? basename(out2));
|
|
@@ -6904,7 +6878,7 @@ async function runCodegenCommand(args, source) {
|
|
|
6904
6878
|
theme: choice
|
|
6905
6879
|
});
|
|
6906
6880
|
let verified = null;
|
|
6907
|
-
if (!args.
|
|
6881
|
+
if (!args.skipRoundtrip) {
|
|
6908
6882
|
step("Verifying the generated tree round-trips");
|
|
6909
6883
|
try {
|
|
6910
6884
|
const result = verifyBundles(bundle, await reexport(out2));
|
|
@@ -6950,7 +6924,7 @@ function reportMode(value) {
|
|
|
6950
6924
|
if (value === "full" || value === "json") return value;
|
|
6951
6925
|
throw new UsageError(
|
|
6952
6926
|
`--report takes grouped, full or json, not "${value}". grouped (the default) collapses repeated findings to one line per root cause, full prints every site, and json prints the findings as data.`,
|
|
6953
|
-
{ helpFor: { command: "
|
|
6927
|
+
{ helpFor: { command: "init" } }
|
|
6954
6928
|
);
|
|
6955
6929
|
}
|
|
6956
6930
|
var EXIT_VERIFY_FAILED = 2;
|
|
@@ -6977,7 +6951,7 @@ function blameGeneratedFile(err, out2) {
|
|
|
6977
6951
|
return void 0;
|
|
6978
6952
|
}
|
|
6979
6953
|
function unverifiedReason(install) {
|
|
6980
|
-
const fix = `run \`npm install\` in the project and re-run
|
|
6954
|
+
const fix = `run \`npm install\` in the project and re-run \`init --from\` to check the round trip`;
|
|
6981
6955
|
return install === "skipped" ? `Could not verify the round trip: dependencies are not installed (--no-install) \u2014 ${fix}.` : `Could not verify the round trip: \`npm install\` did not complete, so the tree could not be loaded \u2014 ${fix}.`;
|
|
6982
6956
|
}
|
|
6983
6957
|
function countBySection(payload) {
|
|
@@ -7004,7 +6978,7 @@ function summarize(args, project, bundle, verified, out2, origin, install, mode)
|
|
|
7004
6978
|
`);
|
|
7005
6979
|
}
|
|
7006
6980
|
if (verified === null) {
|
|
7007
|
-
if (args.
|
|
6981
|
+
if (args.skipRoundtrip) warn("Skipped the round-trip check (--skip-roundtrip) \u2014 the tree is unchecked.");
|
|
7008
6982
|
} else if (verified) {
|
|
7009
6983
|
success(
|
|
7010
6984
|
omitted > 0 ? `Verified: re-exporting ${out2} reproduces the source bundle, apart from ${omitted} deliberately omitted value${omitted === 1 ? "" : "s"} listed above` : `Verified: re-exporting ${out2} reproduces the source bundle`
|
|
@@ -7014,7 +6988,7 @@ function summarize(args, project, bundle, verified, out2, origin, install, mode)
|
|
|
7014
6988
|
}
|
|
7015
6989
|
blank();
|
|
7016
6990
|
success("Project ready.");
|
|
7017
|
-
const cdHint = out2 === process.cwd() ? "" : ` cd ${args.positionals.
|
|
6991
|
+
const cdHint = out2 === process.cwd() ? "" : ` cd ${args.positionals[0] ?? "."}
|
|
7018
6992
|
`;
|
|
7019
6993
|
detail(
|
|
7020
6994
|
`Next steps:
|
|
@@ -7023,15 +6997,15 @@ function summarize(args, project, bundle, verified, out2, origin, install, mode)
|
|
|
7023
6997
|
npm run xano:deploy # build the frontend, then deploy \u2192 live ephemeral URL`
|
|
7024
6998
|
);
|
|
7025
6999
|
detail(
|
|
7026
|
-
`${s2.bold(`${XANO_DIR}/`)} is disposable and schema-only \u2014 re-running
|
|
7000
|
+
`${s2.bold(`${XANO_DIR}/`)} is disposable and schema-only \u2014 re-running \`init --from\` rewrites it. Deploying is a FULL REPLACE, so send it only to an ephemeral environment.`
|
|
7027
7001
|
);
|
|
7028
7002
|
}
|
|
7029
7003
|
|
|
7030
7004
|
export {
|
|
7031
7005
|
fetchWorkspaceBundle,
|
|
7032
7006
|
isMissingDependencyError,
|
|
7033
|
-
|
|
7007
|
+
runInitFromCommand,
|
|
7034
7008
|
verifyCrashEntry,
|
|
7035
7009
|
blameGeneratedFile
|
|
7036
7010
|
};
|
|
7037
|
-
//# sourceMappingURL=chunk-
|
|
7011
|
+
//# sourceMappingURL=chunk-HYBN4H3F.js.map
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
presetFilePath,
|
|
6
6
|
renderPreset,
|
|
7
7
|
upsertManagedBlock
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-KA6G2L7U.js";
|
|
9
9
|
import {
|
|
10
10
|
warn
|
|
11
11
|
} from "./chunk-EZG76F7R.js";
|
|
@@ -92,4 +92,4 @@ export {
|
|
|
92
92
|
isCI,
|
|
93
93
|
refreshAgentFiles
|
|
94
94
|
};
|
|
95
|
-
//# sourceMappingURL=chunk-
|
|
95
|
+
//# sourceMappingURL=chunk-JGCWTCA7.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ensureGitignored
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-FE5I6S6N.js";
|
|
4
4
|
import {
|
|
5
5
|
atomicWrite
|
|
6
6
|
} from "./chunk-GNPVYOPB.js";
|
|
@@ -57,4 +57,4 @@ export {
|
|
|
57
57
|
setEnvironment,
|
|
58
58
|
clearEnvironment
|
|
59
59
|
};
|
|
60
|
-
//# sourceMappingURL=chunk-
|
|
60
|
+
//# sourceMappingURL=chunk-K5IOND4K.js.map
|
|
@@ -46,7 +46,7 @@ canonical slug. It is written by \`npm run xano:export\`/\`xano:deploy\` and is
|
|
|
46
46
|
|
|
47
47
|
To rename an object: rename it in code, run \`npm run xano:export\` (stderr prints
|
|
48
48
|
the fix-up), run \`npx xanots lock rename <kind> <old> <new> --lock=xano/xano.lock\`,
|
|
49
|
-
then export again. \`lock rename\`/\`lock
|
|
49
|
+
then export again. \`lock rename\`/\`lock import\` need that flag from the project root \u2014
|
|
50
50
|
they take no entry file, so they look for the lock in the current directory, while
|
|
51
51
|
\`lock prune <entry-file>\` (like \`export\`) derives it from the entry.
|
|
52
52
|
\`npm run xano:check\` fails if an export would change the lock \u2014 run it before
|
|
@@ -150,13 +150,13 @@ function generatedGuidanceBody(frontend) {
|
|
|
150
150
|
|
|
151
151
|
This is a [XanoTS](https://www.npmjs.com/package/@xanots/sdk) project whose
|
|
152
152
|
Xano backend under \`xano/\` was **pulled from a live workspace** and written as
|
|
153
|
-
TypeScript by \`xanots
|
|
153
|
+
TypeScript by \`xanots init --from\`. The ${frontend.label} frontend under \`frontend/\`
|
|
154
154
|
is a starter. XanoTS is Xano's official TypeScript SDK \u2014 the supported way to
|
|
155
155
|
drive a Xano workspace from code.
|
|
156
156
|
|
|
157
157
|
### Two rules before you edit anything
|
|
158
158
|
|
|
159
|
-
- **\`xano/\` is machine-written and disposable.** Re-running \`xanots
|
|
159
|
+
- **\`xano/\` is machine-written and disposable.** Re-running \`xanots init --from\`
|
|
160
160
|
on this project rewrites that directory wholesale \u2014 no merge, no diff, no
|
|
161
161
|
preservation of hand edits. Work you want to keep goes outside \`xano/\`, or
|
|
162
162
|
gets re-applied after each pull. Everything else in the project is yours.
|
|
@@ -173,7 +173,7 @@ ${LEARN_FROM_THE_LIBRARY}
|
|
|
173
173
|
|
|
174
174
|
\`frontend/src/lib/api.ts\` derives request paths (\`getPath()\`) and request/response
|
|
175
175
|
types (\`InferInput\` / \`InferResponse\`) from the query defs in \`xano/\`. Never
|
|
176
|
-
hand-type a URL or a request body. \`npx xanots
|
|
176
|
+
hand-type a URL or a request body. \`npx xanots routes xano/index.ts\` lists every
|
|
177
177
|
endpoint's verb and resolved path.
|
|
178
178
|
|
|
179
179
|
### Layout
|
|
@@ -442,4 +442,4 @@ export {
|
|
|
442
442
|
resolveAiPresets,
|
|
443
443
|
scaffoldProject
|
|
444
444
|
};
|
|
445
|
-
//# sourceMappingURL=chunk-
|
|
445
|
+
//# sourceMappingURL=chunk-KA6G2L7U.js.map
|
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
// src/util/hash.ts
|
|
2
|
+
var utf8 = new TextEncoder();
|
|
3
|
+
function toBytes(input) {
|
|
4
|
+
return typeof input === "string" ? utf8.encode(input) : input;
|
|
5
|
+
}
|
|
6
|
+
function md5Bytes(input) {
|
|
7
|
+
const msg = toBytes(input);
|
|
8
|
+
const len = msg.length;
|
|
9
|
+
const withPad = (len + 8 >>> 6) + 1;
|
|
10
|
+
const words = new Int32Array(withPad * 16);
|
|
11
|
+
for (let i = 0; i < len; i++) {
|
|
12
|
+
const idx = i >> 2;
|
|
13
|
+
words[idx] = words[idx] | msg[i] << i % 4 * 8;
|
|
14
|
+
}
|
|
15
|
+
const padIdx = len >> 2;
|
|
16
|
+
words[padIdx] = words[padIdx] | 128 << len % 4 * 8;
|
|
17
|
+
words[words.length - 2] = len * 8;
|
|
18
|
+
let a = 1732584193, b = -271733879, c = -1732584194, d = 271733878;
|
|
19
|
+
const add = (x, y) => x + y | 0;
|
|
20
|
+
const rol = (n, s) => n << s | n >>> 32 - s;
|
|
21
|
+
const cmn = (q, a0, b0, x, s, t) => add(rol(add(add(a0, q), add(x, t)), s), b0);
|
|
22
|
+
const ff = (a0, b0, c0, d0, x, s, t) => cmn(b0 & c0 | ~b0 & d0, a0, b0, x, s, t);
|
|
23
|
+
const gg = (a0, b0, c0, d0, x, s, t) => cmn(b0 & d0 | c0 & ~d0, a0, b0, x, s, t);
|
|
24
|
+
const hh = (a0, b0, c0, d0, x, s, t) => cmn(b0 ^ c0 ^ d0, a0, b0, x, s, t);
|
|
25
|
+
const ii = (a0, b0, c0, d0, x, s, t) => cmn(c0 ^ (b0 | ~d0), a0, b0, x, s, t);
|
|
26
|
+
for (let i = 0; i < words.length; i += 16) {
|
|
27
|
+
const oa = a, ob = b, oc = c, od = d;
|
|
28
|
+
const w = (j) => words[i + j];
|
|
29
|
+
a = ff(a, b, c, d, w(0), 7, -680876936);
|
|
30
|
+
d = ff(d, a, b, c, w(1), 12, -389564586);
|
|
31
|
+
c = ff(c, d, a, b, w(2), 17, 606105819);
|
|
32
|
+
b = ff(b, c, d, a, w(3), 22, -1044525330);
|
|
33
|
+
a = ff(a, b, c, d, w(4), 7, -176418897);
|
|
34
|
+
d = ff(d, a, b, c, w(5), 12, 1200080426);
|
|
35
|
+
c = ff(c, d, a, b, w(6), 17, -1473231341);
|
|
36
|
+
b = ff(b, c, d, a, w(7), 22, -45705983);
|
|
37
|
+
a = ff(a, b, c, d, w(8), 7, 1770035416);
|
|
38
|
+
d = ff(d, a, b, c, w(9), 12, -1958414417);
|
|
39
|
+
c = ff(c, d, a, b, w(10), 17, -42063);
|
|
40
|
+
b = ff(b, c, d, a, w(11), 22, -1990404162);
|
|
41
|
+
a = ff(a, b, c, d, w(12), 7, 1804603682);
|
|
42
|
+
d = ff(d, a, b, c, w(13), 12, -40341101);
|
|
43
|
+
c = ff(c, d, a, b, w(14), 17, -1502002290);
|
|
44
|
+
b = ff(b, c, d, a, w(15), 22, 1236535329);
|
|
45
|
+
a = gg(a, b, c, d, w(1), 5, -165796510);
|
|
46
|
+
d = gg(d, a, b, c, w(6), 9, -1069501632);
|
|
47
|
+
c = gg(c, d, a, b, w(11), 14, 643717713);
|
|
48
|
+
b = gg(b, c, d, a, w(0), 20, -373897302);
|
|
49
|
+
a = gg(a, b, c, d, w(5), 5, -701558691);
|
|
50
|
+
d = gg(d, a, b, c, w(10), 9, 38016083);
|
|
51
|
+
c = gg(c, d, a, b, w(15), 14, -660478335);
|
|
52
|
+
b = gg(b, c, d, a, w(4), 20, -405537848);
|
|
53
|
+
a = gg(a, b, c, d, w(9), 5, 568446438);
|
|
54
|
+
d = gg(d, a, b, c, w(14), 9, -1019803690);
|
|
55
|
+
c = gg(c, d, a, b, w(3), 14, -187363961);
|
|
56
|
+
b = gg(b, c, d, a, w(8), 20, 1163531501);
|
|
57
|
+
a = gg(a, b, c, d, w(13), 5, -1444681467);
|
|
58
|
+
d = gg(d, a, b, c, w(2), 9, -51403784);
|
|
59
|
+
c = gg(c, d, a, b, w(7), 14, 1735328473);
|
|
60
|
+
b = gg(b, c, d, a, w(12), 20, -1926607734);
|
|
61
|
+
a = hh(a, b, c, d, w(5), 4, -378558);
|
|
62
|
+
d = hh(d, a, b, c, w(8), 11, -2022574463);
|
|
63
|
+
c = hh(c, d, a, b, w(11), 16, 1839030562);
|
|
64
|
+
b = hh(b, c, d, a, w(14), 23, -35309556);
|
|
65
|
+
a = hh(a, b, c, d, w(1), 4, -1530992060);
|
|
66
|
+
d = hh(d, a, b, c, w(4), 11, 1272893353);
|
|
67
|
+
c = hh(c, d, a, b, w(7), 16, -155497632);
|
|
68
|
+
b = hh(b, c, d, a, w(10), 23, -1094730640);
|
|
69
|
+
a = hh(a, b, c, d, w(13), 4, 681279174);
|
|
70
|
+
d = hh(d, a, b, c, w(0), 11, -358537222);
|
|
71
|
+
c = hh(c, d, a, b, w(3), 16, -722521979);
|
|
72
|
+
b = hh(b, c, d, a, w(6), 23, 76029189);
|
|
73
|
+
a = hh(a, b, c, d, w(9), 4, -640364487);
|
|
74
|
+
d = hh(d, a, b, c, w(12), 11, -421815835);
|
|
75
|
+
c = hh(c, d, a, b, w(15), 16, 530742520);
|
|
76
|
+
b = hh(b, c, d, a, w(2), 23, -995338651);
|
|
77
|
+
a = ii(a, b, c, d, w(0), 6, -198630844);
|
|
78
|
+
d = ii(d, a, b, c, w(7), 10, 1126891415);
|
|
79
|
+
c = ii(c, d, a, b, w(14), 15, -1416354905);
|
|
80
|
+
b = ii(b, c, d, a, w(5), 21, -57434055);
|
|
81
|
+
a = ii(a, b, c, d, w(12), 6, 1700485571);
|
|
82
|
+
d = ii(d, a, b, c, w(3), 10, -1894986606);
|
|
83
|
+
c = ii(c, d, a, b, w(10), 15, -1051523);
|
|
84
|
+
b = ii(b, c, d, a, w(1), 21, -2054922799);
|
|
85
|
+
a = ii(a, b, c, d, w(8), 6, 1873313359);
|
|
86
|
+
d = ii(d, a, b, c, w(15), 10, -30611744);
|
|
87
|
+
c = ii(c, d, a, b, w(6), 15, -1560198380);
|
|
88
|
+
b = ii(b, c, d, a, w(13), 21, 1309151649);
|
|
89
|
+
a = ii(a, b, c, d, w(4), 6, -145523070);
|
|
90
|
+
d = ii(d, a, b, c, w(11), 10, -1120210379);
|
|
91
|
+
c = ii(c, d, a, b, w(2), 15, 718787259);
|
|
92
|
+
b = ii(b, c, d, a, w(9), 21, -343485551);
|
|
93
|
+
a = add(a, oa);
|
|
94
|
+
b = add(b, ob);
|
|
95
|
+
c = add(c, oc);
|
|
96
|
+
d = add(d, od);
|
|
97
|
+
}
|
|
98
|
+
const out = new Uint8Array(16);
|
|
99
|
+
[a, b, c, d].forEach((word, wi) => {
|
|
100
|
+
for (let j = 0; j < 4; j++) out[wi * 4 + j] = word >>> j * 8 & 255;
|
|
101
|
+
});
|
|
102
|
+
return out;
|
|
103
|
+
}
|
|
104
|
+
function md5Hex(input) {
|
|
105
|
+
return toHex(md5Bytes(input));
|
|
106
|
+
}
|
|
107
|
+
function sha1Bytes(input) {
|
|
108
|
+
const msg = toBytes(input);
|
|
109
|
+
const len = msg.length;
|
|
110
|
+
const withLen = len + 9;
|
|
111
|
+
const blocks = Math.ceil(withLen / 64);
|
|
112
|
+
const total = blocks * 64;
|
|
113
|
+
const buf = new Uint8Array(total);
|
|
114
|
+
buf.set(msg);
|
|
115
|
+
buf[len] = 128;
|
|
116
|
+
const bitLen = len * 8;
|
|
117
|
+
buf[total - 4] = bitLen >>> 24 & 255;
|
|
118
|
+
buf[total - 3] = bitLen >>> 16 & 255;
|
|
119
|
+
buf[total - 2] = bitLen >>> 8 & 255;
|
|
120
|
+
buf[total - 1] = bitLen & 255;
|
|
121
|
+
let h0 = 1732584193, h1 = -271733879, h2 = -1732584194, h3 = 271733878, h4 = -1009589776;
|
|
122
|
+
const w = new Int32Array(80);
|
|
123
|
+
const rol = (n, s) => n << s | n >>> 32 - s;
|
|
124
|
+
for (let i = 0; i < total; i += 64) {
|
|
125
|
+
for (let j = 0; j < 16; j++) {
|
|
126
|
+
const k = i + j * 4;
|
|
127
|
+
w[j] = buf[k] << 24 | buf[k + 1] << 16 | buf[k + 2] << 8 | buf[k + 3];
|
|
128
|
+
}
|
|
129
|
+
for (let j = 16; j < 80; j++) w[j] = rol(w[j - 3] ^ w[j - 8] ^ w[j - 14] ^ w[j - 16], 1);
|
|
130
|
+
let a = h0, b = h1, c = h2, d = h3, e = h4;
|
|
131
|
+
for (let j = 0; j < 80; j++) {
|
|
132
|
+
let f, k;
|
|
133
|
+
if (j < 20) {
|
|
134
|
+
f = b & c | ~b & d;
|
|
135
|
+
k = 1518500249;
|
|
136
|
+
} else if (j < 40) {
|
|
137
|
+
f = b ^ c ^ d;
|
|
138
|
+
k = 1859775393;
|
|
139
|
+
} else if (j < 60) {
|
|
140
|
+
f = b & c | b & d | c & d;
|
|
141
|
+
k = -1894007588;
|
|
142
|
+
} else {
|
|
143
|
+
f = b ^ c ^ d;
|
|
144
|
+
k = -899497514;
|
|
145
|
+
}
|
|
146
|
+
const t = rol(a, 5) + f + e + k + w[j] | 0;
|
|
147
|
+
e = d;
|
|
148
|
+
d = c;
|
|
149
|
+
c = rol(b, 30);
|
|
150
|
+
b = a;
|
|
151
|
+
a = t;
|
|
152
|
+
}
|
|
153
|
+
h0 = h0 + a | 0;
|
|
154
|
+
h1 = h1 + b | 0;
|
|
155
|
+
h2 = h2 + c | 0;
|
|
156
|
+
h3 = h3 + d | 0;
|
|
157
|
+
h4 = h4 + e | 0;
|
|
158
|
+
}
|
|
159
|
+
const out = new Uint8Array(20);
|
|
160
|
+
[h0, h1, h2, h3, h4].forEach((h, hi) => {
|
|
161
|
+
out[hi * 4] = h >>> 24 & 255;
|
|
162
|
+
out[hi * 4 + 1] = h >>> 16 & 255;
|
|
163
|
+
out[hi * 4 + 2] = h >>> 8 & 255;
|
|
164
|
+
out[hi * 4 + 3] = h & 255;
|
|
165
|
+
});
|
|
166
|
+
return out;
|
|
167
|
+
}
|
|
168
|
+
function toHex(bytes) {
|
|
169
|
+
let s = "";
|
|
170
|
+
for (const b of bytes) s += b.toString(16).padStart(2, "0");
|
|
171
|
+
return s;
|
|
172
|
+
}
|
|
173
|
+
function randomBytes(n) {
|
|
174
|
+
const out = new Uint8Array(n);
|
|
175
|
+
globalThis.crypto.getRandomValues(out);
|
|
176
|
+
return out;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
export {
|
|
180
|
+
md5Hex,
|
|
181
|
+
sha1Bytes,
|
|
182
|
+
randomBytes
|
|
183
|
+
};
|
|
184
|
+
//# sourceMappingURL=chunk-OHX6MIUZ.js.map
|