@xanots/sdk 0.0.10 → 0.0.12
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 +33 -0
- package/README.md +48 -5
- package/dist/.build-fingerprint +1 -1
- package/dist/{agent-file-refresh-QNKN5RYD.js → agent-file-refresh-GQWAAOBV.js} +4 -4
- package/dist/bin.js +12 -11
- package/dist/{branch-commands-2BLOC2GR.js → branch-commands-5KMPAAZV.js} +7 -7
- package/dist/bundle.d.ts +218 -0
- package/dist/bundle.js +143 -0
- package/dist/{capture-4WVJY4DQ.js → capture-YLUVAITI.js} +2 -2
- package/dist/chunk-2VTJSI6X.js +192 -0
- package/dist/{chunk-5XZ744TS.js → chunk-2ZCUO2UG.js} +1 -1
- package/dist/{chunk-OYMR5AMJ.js → chunk-3LQGF2WS.js} +2 -2
- package/dist/{chunk-WP4OZZV4.js → chunk-3VFCKHOB.js} +2 -2
- package/dist/{chunk-XHEXOES3.js → chunk-5YDINUAP.js} +1 -1
- package/dist/{chunk-LU7TRWMC.js → chunk-6VNRMKFJ.js} +2 -2
- package/dist/{chunk-CTD5ZCV6.js → chunk-7WRJPKGK.js} +2 -2
- package/dist/{chunk-3INK4Y4E.js → chunk-AE3PDSDS.js} +1 -1
- package/dist/{chunk-5YCQ2QHH.js → chunk-AG5GCZDD.js} +2 -2
- package/dist/{chunk-DBFU47BJ.js → chunk-AOFFKSJC.js} +2 -2
- package/dist/{chunk-TCFIPDB3.js → chunk-AVGDL6RB.js} +1 -1
- package/dist/{chunk-4BXJGVZ3.js → chunk-DCMANKMX.js} +2 -69
- package/dist/{chunk-WHOJWOSV.js → chunk-EETVJZAZ.js} +1 -1
- package/dist/chunk-EHP3WPEG.js +21 -0
- package/dist/{chunk-W24FJHPD.js → chunk-ELK7UALJ.js} +3 -3
- package/dist/{chunk-VNQM3V2C.js → chunk-EXENFOWE.js} +2 -2
- package/dist/{chunk-P6TAVLOX.js → chunk-GSP2BY4F.js} +17 -10
- package/dist/{chunk-AIZKXUNP.js → chunk-IMLYGQK6.js} +2 -2
- package/dist/{chunk-LBYWGMOA.js → chunk-N74KDCBD.js} +176 -42
- package/dist/{chunk-3IGNIP6R.js → chunk-NDP7OUPS.js} +1 -1
- package/dist/chunk-OHX6MIUZ.js +184 -0
- package/dist/{chunk-EQW3YT5U.js → chunk-P6PVBQL6.js} +2 -2
- package/dist/{chunk-I7DQDJAM.js → chunk-PLE5QQOZ.js} +55 -56
- package/dist/chunk-PR7OXHGZ.js +70 -0
- package/dist/{chunk-VKSOTZK3.js → chunk-QYSQ3UDO.js} +160 -8
- package/dist/{chunk-ZQ2PKR6R.js → chunk-RQ3FXV4K.js} +2 -2
- package/dist/{chunk-Q77KNEUL.js → chunk-RQNMTDXD.js} +1703 -2
- package/dist/{chunk-QKM4U5UK.js → chunk-TJS2AF5Y.js} +2 -2
- package/dist/{chunk-DIA7CT7J.js → chunk-V5Y7D4LH.js} +11 -2
- package/dist/{chunk-KA6G2L7U.js → chunk-VK26K7AY.js} +3 -3
- package/dist/{chunk-YYFXVYPX.js → chunk-VPAWRBK5.js} +12 -16
- package/dist/{chunk-5R73LFWK.js → chunk-VRNZ2NVV.js} +7 -7
- package/dist/{chunk-ACCBOMCB.js → chunk-XT3XQ4PF.js} +32 -27
- package/dist/{chunk-7JDT4PBU.js → chunk-XWFRNJMQ.js} +5 -179
- package/dist/{chunk-7ZYW652H.js → chunk-YHS6VVLJ.js} +2 -2
- package/dist/{chunk-75Z74TA7.js → chunk-YX22LKQE.js} +2 -2
- package/dist/{chunk-F6CYJ7TN.js → chunk-Z2ZIE5CO.js} +2 -2
- package/dist/cli.d.ts +13 -6
- package/dist/cli.js +11 -10
- package/dist/codegen-command-Y2SPMAUW.js +47 -0
- package/dist/codegen.d.ts +5 -4
- package/dist/codegen.js +2 -2
- package/dist/{completion-WF46272M.js → completion-HJU5QEFB.js} +2 -2
- package/dist/{deploy-command-QTIVA22A.js → deploy-command-XHS5PKPV.js} +20 -19
- package/dist/{ephemeral-command-U4AQ3TXX.js → ephemeral-command-2NKPEXUU.js} +8 -8
- package/dist/index.d.ts +88 -102
- package/dist/index.js +13 -12
- package/dist/init-command-23FFNUFT.js +32 -0
- package/dist/internal.d.ts +10 -16
- package/dist/internal.js +76 -54
- package/dist/io-UBDMMDH6.js +12 -0
- package/dist/{live-diff-IXKBVG4K.js → live-diff-HCOTN5WC.js} +3 -3
- package/dist/{lock-GFXD6G2E.js → lock-HQ4KARU2.js} +3 -2
- package/dist/{lock-commands-DQ7CUMIV.js → lock-commands-WCRC56ME.js} +12 -11
- package/dist/{login-command-Z6CHTA57.js → login-command-P7LXD5TE.js} +6 -6
- package/dist/{loop-D5NPL4VH.js → loop-IC5ISSYB.js} +3 -3
- package/dist/{marketplace-command-P4IPLJ6J.js → marketplace-command-T6JCHW7J.js} +4 -4
- package/dist/{meta-client-K2J4XH64.js → meta-client-LKRKR3L2.js} +4 -4
- package/dist/node.d.ts +6 -5
- package/dist/node.js +18 -17
- package/dist/{preflight-command-GZ2GE5RN.js → preflight-command-TZWPHBXY.js} +17 -16
- package/dist/{profile-command-LJSBDV2L.js → profile-command-WBNSMQSI.js} +3 -3
- package/dist/{release-command-YUBTNHVX.js → release-command-WEFYRTCI.js} +27 -26
- package/dist/response-D6xGLEIn.d.ts +839 -0
- package/dist/{routes-manifest-PWZHDOI5.js → routes-manifest-5ZFKUQWA.js} +2 -2
- package/dist/{runtime-V4C3AC3A.js → runtime-LSLIDALK.js} +1 -1
- package/dist/scaffold.d.ts +16 -8
- package/dist/scaffold.js +7 -11
- package/dist/{static-host-3WMV7IZO.js → static-host-4JDQCHUW.js} +1 -1
- package/dist/{status-command-AL47VG7H.js → status-command-VARULAR5.js} +4 -4
- package/dist/{store-BG1UPZ3Z.d.ts → store-DAnUIi1T.d.ts} +95 -87
- package/dist/{test-command-YAZLKLGQ.js → test-command-YCAR4O35.js} +7 -7
- package/dist/{upgrade-command-FB5QJ363.js → upgrade-command-GYEIMJBG.js} +16 -16
- package/dist/{workspace-2COHDBM3.js → workspace-33KHFLX3.js} +2 -2
- package/dist/{workspace-command-43P42FBP.js → workspace-command-2ZTGT26W.js} +28 -27
- package/dist/{workspace-export-DURY5WYL.js → workspace-export-MLYTYZS5.js} +3 -3
- package/dist/{response-CVAE2kMj.d.ts → xdo-ODuJklk6.d.ts} +28 -860
- package/guides/authoring.md +11 -2
- package/guides/typed-frontend.md +5 -5
- package/llms/filters.md +11 -10
- package/llms/kinds-core.md +1 -1
- package/llms/statements-data.md +6 -3
- package/llms/values.md +1 -1
- package/llms-full.txt +53 -42
- package/llms.txt +34 -27
- package/manifest.json +6 -2
- package/package.json +7 -2
- package/dist/chunk-ANUDXFEX.js +0 -881
- package/dist/chunk-JGCWTCA7.js +0 -95
- package/dist/chunk-YBC3IKMF.js +0 -845
- package/dist/codegen-command-GB3H2KQ7.js +0 -46
- package/dist/init-command-MAXULNAD.js +0 -33
- package/dist/io-M7XZEMK7.js +0 -11
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
import {
|
|
2
|
+
AI_PRESETS,
|
|
3
|
+
CODEGEN_MARKER,
|
|
4
|
+
managedBlockVersion,
|
|
5
|
+
presetFilePath,
|
|
6
|
+
renderPreset,
|
|
7
|
+
upsertManagedBlock
|
|
8
|
+
} from "./chunk-VK26K7AY.js";
|
|
9
|
+
import {
|
|
10
|
+
DEFAULT_DARK_MODE,
|
|
11
|
+
allFrontendPresets,
|
|
12
|
+
allIconLibraries
|
|
13
|
+
} from "./chunk-RQNMTDXD.js";
|
|
14
|
+
import {
|
|
15
|
+
warn
|
|
16
|
+
} from "./chunk-EZG76F7R.js";
|
|
17
|
+
|
|
18
|
+
// src/emit/agent-file-refresh.ts
|
|
19
|
+
import { existsSync as existsSync2, readFileSync as readFileSync2, writeFileSync } from "fs";
|
|
20
|
+
import { basename, join as join2 } from "path";
|
|
21
|
+
|
|
22
|
+
// src/emit/project-detect.ts
|
|
23
|
+
import { existsSync, readFileSync } from "fs";
|
|
24
|
+
import { join } from "path";
|
|
25
|
+
function readJson(path) {
|
|
26
|
+
try {
|
|
27
|
+
const parsed = JSON.parse(readFileSync(path, "utf8"));
|
|
28
|
+
return typeof parsed === "object" && parsed !== null ? parsed : void 0;
|
|
29
|
+
} catch {
|
|
30
|
+
return void 0;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
function readText(path) {
|
|
34
|
+
try {
|
|
35
|
+
return readFileSync(path, "utf8");
|
|
36
|
+
} catch {
|
|
37
|
+
return void 0;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
function installedPackages(projectDir) {
|
|
41
|
+
const pkg = readJson(join(projectDir, "package.json"));
|
|
42
|
+
const names = /* @__PURE__ */ new Set();
|
|
43
|
+
for (const block of ["dependencies", "devDependencies"]) {
|
|
44
|
+
const deps = pkg?.[block];
|
|
45
|
+
if (typeof deps === "object" && deps !== null) {
|
|
46
|
+
for (const name of Object.keys(deps)) names.add(name);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
return names;
|
|
50
|
+
}
|
|
51
|
+
function detectFrontendPreset(projectDir) {
|
|
52
|
+
const installed = installedPackages(projectDir);
|
|
53
|
+
if (installed.size === 0) return void 0;
|
|
54
|
+
let best;
|
|
55
|
+
let bestScore = 0;
|
|
56
|
+
let tied = false;
|
|
57
|
+
for (const preset of allFrontendPresets()) {
|
|
58
|
+
const declared = Object.keys(preset.dependencies);
|
|
59
|
+
if (declared.length === 0) continue;
|
|
60
|
+
const score = declared.filter((name) => installed.has(name)).length / declared.length;
|
|
61
|
+
if (score > bestScore) {
|
|
62
|
+
best = preset;
|
|
63
|
+
bestScore = score;
|
|
64
|
+
tied = false;
|
|
65
|
+
} else if (score === bestScore && score > 0) {
|
|
66
|
+
tied = true;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
return bestScore > 0 && !tied ? best : void 0;
|
|
70
|
+
}
|
|
71
|
+
function detectIconLibrary(projectDir) {
|
|
72
|
+
const installed = installedPackages(projectDir);
|
|
73
|
+
for (const library of allIconLibraries()) {
|
|
74
|
+
for (const binding of [library.react, library.svelte]) {
|
|
75
|
+
if (Object.keys(binding.dependency).some((name) => installed.has(name))) return library.id;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
return void 0;
|
|
79
|
+
}
|
|
80
|
+
function detectThemeLabel(projectDir) {
|
|
81
|
+
const css = readText(join(projectDir, "frontend", "src", "index.css"));
|
|
82
|
+
const match = css?.match(/\/\*\s*Theme:\s*(.+?)\.\s*Rebrand here/);
|
|
83
|
+
const label = match?.[1]?.trim();
|
|
84
|
+
return label !== void 0 && label.length > 0 ? label : void 0;
|
|
85
|
+
}
|
|
86
|
+
function detectDarkMode(projectDir) {
|
|
87
|
+
if (existsSync(join(projectDir, "frontend", "src", "lib", "theme.ts"))) return "toggle";
|
|
88
|
+
const entries = [
|
|
89
|
+
join(projectDir, "frontend", "index.html"),
|
|
90
|
+
join(projectDir, "frontend", "src", "app.html")
|
|
91
|
+
];
|
|
92
|
+
for (const entry of entries) {
|
|
93
|
+
const html = readText(entry);
|
|
94
|
+
if (html === void 0) continue;
|
|
95
|
+
return html.includes("prefers-color-scheme") ? "system" : "off";
|
|
96
|
+
}
|
|
97
|
+
return void 0;
|
|
98
|
+
}
|
|
99
|
+
function detectFrontendGuidance(projectDir) {
|
|
100
|
+
const preset = detectFrontendPreset(projectDir);
|
|
101
|
+
if (preset === void 0) return void 0;
|
|
102
|
+
const label = detectThemeLabel(projectDir);
|
|
103
|
+
return {
|
|
104
|
+
label: preset.label,
|
|
105
|
+
section: preset.agentGuidanceSection(detectIconLibrary(projectDir)),
|
|
106
|
+
...label === void 0 ? {} : { theme: { theme: { label }, dark: detectDarkMode(projectDir) ?? DEFAULT_DARK_MODE } }
|
|
107
|
+
};
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
// src/emit/agent-file-refresh.ts
|
|
111
|
+
var AGENT_ENV_VARS = [
|
|
112
|
+
"CLAUDECODE",
|
|
113
|
+
"CLAUDE_CODE",
|
|
114
|
+
"CURSOR_TRACE_ID",
|
|
115
|
+
"CURSOR_AGENT",
|
|
116
|
+
"CODEX_SANDBOX",
|
|
117
|
+
"AIDER_MODEL",
|
|
118
|
+
"GITHUB_COPILOT_AGENT"
|
|
119
|
+
];
|
|
120
|
+
function codingAgentDetected(env = process.env) {
|
|
121
|
+
return AGENT_ENV_VARS.some((name) => (env[name] ?? "") !== "");
|
|
122
|
+
}
|
|
123
|
+
var CI_ENV_VARS = [
|
|
124
|
+
"CI",
|
|
125
|
+
"GITHUB_ACTIONS",
|
|
126
|
+
"GITLAB_CI",
|
|
127
|
+
"BUILDKITE",
|
|
128
|
+
"TEAMCITY_VERSION"
|
|
129
|
+
];
|
|
130
|
+
function isCI(env = process.env) {
|
|
131
|
+
return CI_ENV_VARS.some((name) => (env[name] ?? "") !== "");
|
|
132
|
+
}
|
|
133
|
+
function guidanceModeFor(projectDir) {
|
|
134
|
+
return existsSync2(join2(projectDir, CODEGEN_MARKER)) ? "generated" : "authored";
|
|
135
|
+
}
|
|
136
|
+
function appNameFor(projectDir) {
|
|
137
|
+
try {
|
|
138
|
+
const pkg = JSON.parse(readFileSync2(join2(projectDir, "package.json"), "utf8"));
|
|
139
|
+
if (typeof pkg.name === "string" && pkg.name.length > 0) return pkg.name;
|
|
140
|
+
} catch {
|
|
141
|
+
}
|
|
142
|
+
return basename(projectDir);
|
|
143
|
+
}
|
|
144
|
+
function refreshAgentFiles(opts) {
|
|
145
|
+
const env = opts.env ?? process.env;
|
|
146
|
+
if (opts.explicit !== true && (isCI(env) || !codingAgentDetected(env))) return [];
|
|
147
|
+
const mode = opts.mode ?? guidanceModeFor(opts.projectDir);
|
|
148
|
+
const appName = opts.appName ?? appNameFor(opts.projectDir);
|
|
149
|
+
const frontend = opts.frontend ?? detectFrontendGuidance(opts.projectDir);
|
|
150
|
+
const managed = [];
|
|
151
|
+
for (const preset of AI_PRESETS) {
|
|
152
|
+
const path = presetFilePath(preset);
|
|
153
|
+
const absolute = join2(opts.projectDir, path);
|
|
154
|
+
if (!existsSync2(absolute)) continue;
|
|
155
|
+
try {
|
|
156
|
+
const existing = readFileSync2(absolute, "utf8");
|
|
157
|
+
const version = managedBlockVersion(existing);
|
|
158
|
+
if (version === null) continue;
|
|
159
|
+
managed.push({ preset, path, existing, version });
|
|
160
|
+
} catch (err) {
|
|
161
|
+
warn(`could not read ${path}: ${err instanceof Error ? err.message : String(err)}`);
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
const selected = managed.map((m) => m.preset);
|
|
165
|
+
const refreshed = [];
|
|
166
|
+
for (const { preset, path, existing, version } of managed) {
|
|
167
|
+
const absolute = join2(opts.projectDir, path);
|
|
168
|
+
try {
|
|
169
|
+
if (version === opts.sdkVersion) continue;
|
|
170
|
+
const rendered = renderPreset(preset, appName, mode, {
|
|
171
|
+
selected,
|
|
172
|
+
version: opts.sdkVersion,
|
|
173
|
+
frontend
|
|
174
|
+
});
|
|
175
|
+
const updated = upsertManagedBlock(existing, rendered);
|
|
176
|
+
if (updated === existing) continue;
|
|
177
|
+
writeFileSync(absolute, updated);
|
|
178
|
+
refreshed.push(path);
|
|
179
|
+
} catch (err) {
|
|
180
|
+
warn(`could not refresh ${path}: ${err instanceof Error ? err.message : String(err)}`);
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
return refreshed;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
export {
|
|
187
|
+
codingAgentDetected,
|
|
188
|
+
CI_ENV_VARS,
|
|
189
|
+
isCI,
|
|
190
|
+
refreshAgentFiles
|
|
191
|
+
};
|
|
192
|
+
//# sourceMappingURL=chunk-2VTJSI6X.js.map
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
import {
|
|
5
5
|
parseLock,
|
|
6
6
|
serializeLock
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-XWFRNJMQ.js";
|
|
8
8
|
|
|
9
9
|
// src/lock/io.ts
|
|
10
10
|
import { readFileSync, existsSync } from "fs";
|
|
@@ -35,4 +35,4 @@ export {
|
|
|
35
35
|
readLockFile,
|
|
36
36
|
writeLockFile
|
|
37
37
|
};
|
|
38
|
-
//# sourceMappingURL=chunk-
|
|
38
|
+
//# sourceMappingURL=chunk-3LQGF2WS.js.map
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
describeTransportFailure,
|
|
3
3
|
httpFailure,
|
|
4
4
|
retryingFetch
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-NDP7OUPS.js";
|
|
6
6
|
|
|
7
7
|
// src/deploy/import.ts
|
|
8
8
|
var IMPORT_TIMEOUT_MS = 12e4;
|
|
@@ -173,4 +173,4 @@ export {
|
|
|
173
173
|
importWorkspaceArchive,
|
|
174
174
|
planWorkspaceImport
|
|
175
175
|
};
|
|
176
|
-
//# sourceMappingURL=chunk-
|
|
176
|
+
//# sourceMappingURL=chunk-3VFCKHOB.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
RAW_ENVELOPE
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-2ZCUO2UG.js";
|
|
4
4
|
|
|
5
5
|
// src/statements/special/raw.ts
|
|
6
6
|
var CANONICAL_KEYS = [
|
|
@@ -46,4 +46,4 @@ function raw(envelope) {
|
|
|
46
46
|
export {
|
|
47
47
|
raw
|
|
48
48
|
};
|
|
49
|
-
//# sourceMappingURL=chunk-
|
|
49
|
+
//# sourceMappingURL=chunk-6VNRMKFJ.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
UsageError
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-Z2ZIE5CO.js";
|
|
4
4
|
|
|
5
5
|
// src/emit/env-selector.ts
|
|
6
6
|
var ENV_SPELLINGS = "workspace, ephemeral, or ephemeral:<name>";
|
|
@@ -25,4 +25,4 @@ export {
|
|
|
25
25
|
parseEnvSelector,
|
|
26
26
|
unknownEnv
|
|
27
27
|
};
|
|
28
|
-
//# sourceMappingURL=chunk-
|
|
28
|
+
//# sourceMappingURL=chunk-7WRJPKGK.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
readVersion
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-XT3XQ4PF.js";
|
|
4
4
|
import {
|
|
5
5
|
atomicWrite
|
|
6
6
|
} from "./chunk-GNPVYOPB.js";
|
|
@@ -170,4 +170,4 @@ export {
|
|
|
170
170
|
upgradeCommand,
|
|
171
171
|
maybeNotifyUpdate
|
|
172
172
|
};
|
|
173
|
-
//# sourceMappingURL=chunk-
|
|
173
|
+
//# sourceMappingURL=chunk-AG5GCZDD.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
deepEqual,
|
|
3
3
|
normalize
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-AE3PDSDS.js";
|
|
5
5
|
|
|
6
6
|
// src/deploy/live-diff.ts
|
|
7
7
|
function rows(bundle, key) {
|
|
@@ -254,4 +254,4 @@ export {
|
|
|
254
254
|
sharedSchemaChanges,
|
|
255
255
|
compareToLive
|
|
256
256
|
};
|
|
257
|
-
//# sourceMappingURL=chunk-
|
|
257
|
+
//# sourceMappingURL=chunk-AOFFKSJC.js.map
|
|
@@ -1,49 +1,3 @@
|
|
|
1
|
-
// src/fields/generated/field-methods.generated.ts
|
|
2
|
-
var FIELD_METHODS = {
|
|
3
|
-
"decimal": {
|
|
4
|
-
"max": "int",
|
|
5
|
-
"min": "int"
|
|
6
|
-
},
|
|
7
|
-
"email": {
|
|
8
|
-
"lower": "bool",
|
|
9
|
-
"trim": "bool"
|
|
10
|
-
},
|
|
11
|
-
"int": {
|
|
12
|
-
"max": "int",
|
|
13
|
-
"min": "int"
|
|
14
|
-
},
|
|
15
|
-
"password": {
|
|
16
|
-
"max": "int",
|
|
17
|
-
"min": "int",
|
|
18
|
-
"minAlpha": "int",
|
|
19
|
-
"minDigit": "int",
|
|
20
|
-
"minLowerAlpha": "int",
|
|
21
|
-
"minSymbol": "int",
|
|
22
|
-
"minUpperAlpha": "int",
|
|
23
|
-
"salt": "text"
|
|
24
|
-
},
|
|
25
|
-
"tableRef": {
|
|
26
|
-
"max": "int",
|
|
27
|
-
"min": "int"
|
|
28
|
-
},
|
|
29
|
-
"text": {
|
|
30
|
-
"alphaOk": "bool",
|
|
31
|
-
"digitOk": "bool",
|
|
32
|
-
"lower": "bool",
|
|
33
|
-
"max": "int",
|
|
34
|
-
"min": "int",
|
|
35
|
-
"ok": "text",
|
|
36
|
-
"pattern": "text",
|
|
37
|
-
"startsWith": "text",
|
|
38
|
-
"trim": "bool",
|
|
39
|
-
"upper": "bool"
|
|
40
|
-
},
|
|
41
|
-
"vector": {
|
|
42
|
-
"max": "int",
|
|
43
|
-
"min": "int"
|
|
44
|
-
}
|
|
45
|
-
};
|
|
46
|
-
|
|
47
1
|
// src/statements/surfaces.ts
|
|
48
2
|
var STATEMENT_SURFACES = [
|
|
49
3
|
["action.call", "mvp:action"],
|
|
@@ -288,31 +242,10 @@ function sPathOf(surfaceKey) {
|
|
|
288
242
|
return SPATH_OVERRIDES[surfaceKey] ?? surfaceKey.replace(/^stack\|/, "");
|
|
289
243
|
}
|
|
290
244
|
|
|
291
|
-
// src/statements/superseded.ts
|
|
292
|
-
var SUPERSEDED_STATEMENTS = /* @__PURE__ */ new Map([
|
|
293
|
-
// Four crypto families, each phased forward with breaking changes between
|
|
294
|
-
// versions. The engine still registers a class for every one of them.
|
|
295
|
-
["mvp:crypto_jwe_decode", "mvp:crypto_jwe_decode2"],
|
|
296
|
-
["mvp:crypto_jwe_encode", "mvp:crypto_jwe_encode3"],
|
|
297
|
-
["mvp:crypto_jwe_encode2", "mvp:crypto_jwe_encode3"],
|
|
298
|
-
["mvp:crypto_jws_decode", "mvp:crypto_jws_decode2"],
|
|
299
|
-
["mvp:crypto_jws_encode", "mvp:crypto_jws_encode2"],
|
|
300
|
-
// Retired outright — an old third-party log connector with no successor.
|
|
301
|
-
["mvp:connect_ncscale_send_log", ""]
|
|
302
|
-
]);
|
|
303
|
-
function supersededBy(storedName, surfaceOf) {
|
|
304
|
-
const successor = SUPERSEDED_STATEMENTS.get(storedName);
|
|
305
|
-
if (successor === void 0 || successor === "") return null;
|
|
306
|
-
return surfaceOf(successor) ?? successor;
|
|
307
|
-
}
|
|
308
|
-
|
|
309
245
|
export {
|
|
310
|
-
FIELD_METHODS,
|
|
311
246
|
STATEMENT_SURFACES,
|
|
312
247
|
TOTAL_STATEMENTS,
|
|
313
248
|
IMPLEMENTED_STATEMENTS,
|
|
314
|
-
sPathOf
|
|
315
|
-
SUPERSEDED_STATEMENTS,
|
|
316
|
-
supersededBy
|
|
249
|
+
sPathOf
|
|
317
250
|
};
|
|
318
|
-
//# sourceMappingURL=chunk-
|
|
251
|
+
//# sourceMappingURL=chunk-DCMANKMX.js.map
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
// src/bundle/schema.ts
|
|
2
|
+
function tableRefOf(column) {
|
|
3
|
+
if (column.type !== "int" && column.type !== "uuid") return null;
|
|
4
|
+
const last = column.methods?.[column.methods.length - 1];
|
|
5
|
+
const arg = last?.name === "@" ? last.arg?.[0] : void 0;
|
|
6
|
+
if (typeof arg !== "string" || !arg.startsWith("dbo=")) return null;
|
|
7
|
+
const guid = arg.slice("dbo=".length);
|
|
8
|
+
return guid === "" ? null : guid;
|
|
9
|
+
}
|
|
10
|
+
function linkedTableOf(column) {
|
|
11
|
+
const suffix = "_mvpschema";
|
|
12
|
+
if (typeof column.type !== "string" || !column.type.endsWith(suffix)) return null;
|
|
13
|
+
const guid = column.type.slice(0, -suffix.length);
|
|
14
|
+
return guid === "" ? null : guid;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export {
|
|
18
|
+
tableRefOf,
|
|
19
|
+
linkedTableOf
|
|
20
|
+
};
|
|
21
|
+
//# sourceMappingURL=chunk-EHP3WPEG.js.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
compileBundle
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-XT3XQ4PF.js";
|
|
4
4
|
import {
|
|
5
5
|
missingArgument
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-Z2ZIE5CO.js";
|
|
7
7
|
|
|
8
8
|
// src/emit/bundle-input.ts
|
|
9
9
|
import { existsSync, readFileSync } from "fs";
|
|
@@ -34,4 +34,4 @@ export {
|
|
|
34
34
|
assertBundleInput,
|
|
35
35
|
loadBundleText
|
|
36
36
|
};
|
|
37
|
-
//# sourceMappingURL=chunk-
|
|
37
|
+
//# sourceMappingURL=chunk-ELK7UALJ.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
fetchOrExplain,
|
|
3
3
|
httpFailure
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-NDP7OUPS.js";
|
|
5
5
|
|
|
6
6
|
// src/deploy/ephemeral.ts
|
|
7
7
|
var TIMEOUT_MS = 3e4;
|
|
@@ -162,4 +162,4 @@ export {
|
|
|
162
162
|
impersonateEphemeral,
|
|
163
163
|
waitUntilReady
|
|
164
164
|
};
|
|
165
|
-
//# sourceMappingURL=chunk-
|
|
165
|
+
//# sourceMappingURL=chunk-EXENFOWE.js.map
|
|
@@ -33,26 +33,27 @@ import {
|
|
|
33
33
|
obj,
|
|
34
34
|
ref,
|
|
35
35
|
registerKind,
|
|
36
|
+
reversedOperandRefusal,
|
|
36
37
|
tableColumns,
|
|
37
38
|
withFilters
|
|
38
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-N74KDCBD.js";
|
|
39
40
|
import {
|
|
40
41
|
assertPathParamInputs,
|
|
41
42
|
fillPathParams,
|
|
42
43
|
parsePathParams
|
|
43
|
-
} from "./chunk-
|
|
44
|
-
import {
|
|
45
|
-
annotate,
|
|
46
|
-
encodeStatement,
|
|
47
|
-
isRegisteredStatement,
|
|
48
|
-
registerStatement
|
|
49
|
-
} from "./chunk-5XZ744TS.js";
|
|
44
|
+
} from "./chunk-EETVJZAZ.js";
|
|
50
45
|
import {
|
|
51
46
|
deriveGuid,
|
|
52
47
|
realtimeChannelSeedName,
|
|
53
48
|
resolveQueryRef,
|
|
54
49
|
resolveRef
|
|
55
|
-
} from "./chunk-
|
|
50
|
+
} from "./chunk-XWFRNJMQ.js";
|
|
51
|
+
import {
|
|
52
|
+
annotate,
|
|
53
|
+
encodeStatement,
|
|
54
|
+
isRegisteredStatement,
|
|
55
|
+
registerStatement
|
|
56
|
+
} from "./chunk-2ZCUO2UG.js";
|
|
56
57
|
|
|
57
58
|
// src/statements/set-var.ts
|
|
58
59
|
var SET_VAR = "mvp:set_var";
|
|
@@ -1838,6 +1839,12 @@ function expectToThrow(a) {
|
|
|
1838
1839
|
return annotate({ name: "mvp:test_expect_to_throw", context, input: [] }, a);
|
|
1839
1840
|
}
|
|
1840
1841
|
function expectToMatch(a = {}) {
|
|
1842
|
+
const reversed = reversedOperandRefusal(a.value, a.expr);
|
|
1843
|
+
if (reversed) {
|
|
1844
|
+
throw new Error(
|
|
1845
|
+
`s.expect.to_match: ${reversed} \u2014 \`expr\` is the value under test and \`value\` is the pattern. (issue #298)`
|
|
1846
|
+
);
|
|
1847
|
+
}
|
|
1841
1848
|
if (a.value) {
|
|
1842
1849
|
const refusal = barePatternRefusal(a.value);
|
|
1843
1850
|
if (refusal) throw new Error(`s.expect.to_match: ${refusal}. (issue #211)`);
|
|
@@ -3734,4 +3741,4 @@ export {
|
|
|
3734
3741
|
workspaceKind,
|
|
3735
3742
|
workspaceConfig
|
|
3736
3743
|
};
|
|
3737
|
-
//# sourceMappingURL=chunk-
|
|
3744
|
+
//# sourceMappingURL=chunk-GSP2BY4F.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
UsageError
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-Z2ZIE5CO.js";
|
|
4
4
|
import {
|
|
5
5
|
style
|
|
6
6
|
} from "./chunk-EZG76F7R.js";
|
|
@@ -56,4 +56,4 @@ export {
|
|
|
56
56
|
confirm,
|
|
57
57
|
promptLine
|
|
58
58
|
};
|
|
59
|
-
//# sourceMappingURL=chunk-
|
|
59
|
+
//# sourceMappingURL=chunk-IMLYGQK6.js.map
|