@xanots/sdk 0.0.10 → 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 +17 -0
- package/README.md +38 -0
- package/dist/.build-fingerprint +1 -1
- package/dist/bin.js +7 -6
- package/dist/bundle.d.ts +218 -0
- package/dist/bundle.js +143 -0
- package/dist/{chunk-5YCQ2QHH.js → chunk-22TKBSDV.js} +2 -2
- package/dist/{chunk-YYFXVYPX.js → chunk-4IF54NU5.js} +3 -3
- package/dist/{chunk-W24FJHPD.js → chunk-4Q7ZOHH7.js} +2 -2
- package/dist/{chunk-4BXJGVZ3.js → chunk-BC2C5GVI.js} +2 -69
- package/dist/chunk-BSK7ELHU.js +70 -0
- package/dist/chunk-EHP3WPEG.js +21 -0
- package/dist/{chunk-75Z74TA7.js → chunk-G4EJMQLD.js} +2 -2
- package/dist/{chunk-I7DQDJAM.js → chunk-HYBN4H3F.js} +38 -46
- package/dist/chunk-OHX6MIUZ.js +184 -0
- package/dist/{chunk-VKSOTZK3.js → chunk-OWGCOGKK.js} +155 -3
- package/dist/{chunk-LBYWGMOA.js → chunk-QK7ZQJLP.js} +140 -20
- package/dist/{chunk-5R73LFWK.js → chunk-QYMAZRAU.js} +7 -7
- package/dist/{chunk-ACCBOMCB.js → chunk-RCT7UX7B.js} +12 -12
- package/dist/{chunk-P6TAVLOX.js → chunk-UOZMSF4C.js} +15 -8
- package/dist/{chunk-7JDT4PBU.js → chunk-VAF6A3YD.js} +5 -179
- package/dist/{chunk-OYMR5AMJ.js → chunk-XEOX6AM7.js} +2 -2
- package/dist/cli.js +6 -5
- package/dist/{codegen-command-GB3H2KQ7.js → codegen-command-FUT2KJB6.js} +15 -12
- package/dist/codegen.d.ts +2 -1
- package/dist/{deploy-command-QTIVA22A.js → deploy-command-IP7V7GT4.js} +8 -7
- package/dist/index.d.ts +6 -4
- package/dist/index.js +10 -9
- package/dist/{init-command-MAXULNAD.js → init-command-NPVL32L6.js} +8 -7
- package/dist/internal.d.ts +4 -4
- package/dist/internal.js +62 -40
- package/dist/io-P2H75UV2.js +12 -0
- package/dist/{lock-GFXD6G2E.js → lock-46FWYE4D.js} +3 -2
- package/dist/{lock-commands-DQ7CUMIV.js → lock-commands-ZZKZ4LZJ.js} +8 -7
- package/dist/node.d.ts +5 -4
- package/dist/node.js +12 -11
- package/dist/{preflight-command-GZ2GE5RN.js → preflight-command-K346GPTY.js} +8 -7
- package/dist/{release-command-YUBTNHVX.js → release-command-IMNTIVWK.js} +14 -13
- package/dist/response-BQVQ24l1.d.ts +844 -0
- package/dist/{store-BG1UPZ3Z.d.ts → store-BLyNeQ8S.d.ts} +16 -3
- package/dist/{upgrade-command-FB5QJ363.js → upgrade-command-BN3EHAOI.js} +8 -7
- package/dist/{workspace-command-43P42FBP.js → workspace-command-MNK7Y7MQ.js} +15 -12
- package/dist/{response-CVAE2kMj.d.ts → xdo-BjJj5W_E.d.ts} +1 -837
- package/guides/typed-frontend.md +1 -1
- package/llms/filters.md +11 -10
- package/llms/kinds-core.md +1 -1
- package/llms/statements-data.md +3 -1
- package/llms/values.md +1 -1
- package/llms-full.txt +41 -30
- package/llms.txt +25 -17
- package/manifest.json +2 -2
- package/package.json +7 -2
- package/dist/io-M7XZEMK7.js +0 -11
|
@@ -3,6 +3,16 @@ import {
|
|
|
3
3
|
fillPathParams,
|
|
4
4
|
parsePathParams
|
|
5
5
|
} from "./chunk-WHOJWOSV.js";
|
|
6
|
+
import {
|
|
7
|
+
appNamesByGuid,
|
|
8
|
+
deriveGuid,
|
|
9
|
+
deriveQueryGuid,
|
|
10
|
+
getLockedCanonical,
|
|
11
|
+
lockKey,
|
|
12
|
+
lockNameForObject,
|
|
13
|
+
queryGroupComponent,
|
|
14
|
+
resolveRef
|
|
15
|
+
} from "./chunk-VAF6A3YD.js";
|
|
6
16
|
import {
|
|
7
17
|
COLUMN_CONTEXT,
|
|
8
18
|
INPUT_CONTEXT,
|
|
@@ -14,16 +24,8 @@ import {
|
|
|
14
24
|
registerStatement
|
|
15
25
|
} from "./chunk-5XZ744TS.js";
|
|
16
26
|
import {
|
|
17
|
-
appNamesByGuid,
|
|
18
|
-
deriveGuid,
|
|
19
|
-
deriveQueryGuid,
|
|
20
|
-
getLockedCanonical,
|
|
21
|
-
lockKey,
|
|
22
|
-
lockNameForObject,
|
|
23
|
-
queryGroupComponent,
|
|
24
|
-
resolveRef,
|
|
25
27
|
sha1Bytes
|
|
26
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-OHX6MIUZ.js";
|
|
27
29
|
|
|
28
30
|
// src/types/xdo.ts
|
|
29
31
|
var TAGS = [
|
|
@@ -287,15 +289,41 @@ function barePatternRefusal(value) {
|
|
|
287
289
|
if (isValidPcreLiteral(value.value)) return null;
|
|
288
290
|
return `${JSON.stringify(value.value)} is a BARE regex pattern. PHP \`preg_*\` reads the first character as the delimiter, so the engine matches nothing for every input \u2014 the assertion or precondition built on it fails (or passes) against text that plainly should not. Build it with c.regex(${JSON.stringify(value.value)}) instead of c.text(...), which wraps and escapes it into a valid PCRE literal`;
|
|
289
291
|
}
|
|
290
|
-
var
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
292
|
+
var REGEX_SUBJECT_SLOT = {
|
|
293
|
+
regex_test: 0,
|
|
294
|
+
regex_match: 0,
|
|
295
|
+
regex_match_all: 0,
|
|
296
|
+
regex_matches: 0,
|
|
297
|
+
regex_replace: 1,
|
|
298
|
+
regex_get_all_matches: 0,
|
|
299
|
+
regex_get_first_match: 0
|
|
300
|
+
};
|
|
301
|
+
var REGEX_PATTERN_FILTERS = new Set(Object.keys(REGEX_SUBJECT_SLOT));
|
|
302
|
+
var REGEX_METACHARACTERS = /[\\^$.|?*+()[\]{}]/;
|
|
303
|
+
function readablePattern(value) {
|
|
304
|
+
if (!value || value.tag !== "const") return null;
|
|
305
|
+
if (Array.isArray(value.filters) && value.filters.length > 0) return null;
|
|
306
|
+
return isValidPcreLiteral(value.value) ? value.value : null;
|
|
307
|
+
}
|
|
308
|
+
function reversedOperandRefusal(pattern, subject) {
|
|
309
|
+
const misplaced = readablePattern(subject);
|
|
310
|
+
if (misplaced === null || !REGEX_METACHARACTERS.test(misplaced)) return null;
|
|
311
|
+
if (readablePattern(pattern) !== null) return null;
|
|
312
|
+
return `the OPERANDS are reversed. ${JSON.stringify(misplaced)} is a delimiter-wrapped regex pattern sitting in the SUBJECT slot, which means the pattern and the text it tests were written the other way round. The regex family is pattern-piped \u2014 the piped value is the PATTERN and the argument is the text matched against it, the reverse of every other filter \u2014 so this runs the subject as a pattern and answers false for every input, with HTTP 200 and no error. Swap them: pipe the c.regex(...) pattern and pass the subject as the argument`;
|
|
313
|
+
}
|
|
314
|
+
function reversedRegexOperands(v2) {
|
|
315
|
+
const chain = Array.isArray(v2.filters) ? v2.filters : [];
|
|
316
|
+
for (const [i, applied] of chain.entries()) {
|
|
317
|
+
const slot = REGEX_SUBJECT_SLOT[applied.name];
|
|
318
|
+
if (slot === void 0) continue;
|
|
319
|
+
const pattern = { value: v2.value, tag: v2.tag, filters: chain.slice(0, i) };
|
|
320
|
+
const message = reversedOperandRefusal(pattern, applied.arg?.[slot]);
|
|
321
|
+
if (message !== null) {
|
|
322
|
+
return { filter: applied.name, slot, subject: applied.arg?.[slot]?.value ?? "", message };
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
return null;
|
|
326
|
+
}
|
|
299
327
|
function intLiteral(n) {
|
|
300
328
|
if (typeof n === "bigint") return String(n);
|
|
301
329
|
if (typeof n === "string") {
|
|
@@ -665,6 +693,16 @@ function withFilters(value, ...filters) {
|
|
|
665
693
|
`withFilters: argument ${malformed} of the filter chain is not a filter \u2014 got ${JSON.stringify(got) ?? String(got)}. Each entry must come from an \`fl.*\` factory (or \`filter(name, ...)\`), which returns \`{name, arg, disabled}\`. A tagged value is not a filter: to pipe one value through another, pass it as a filter ARGUMENT (\`fl.concat(other)\`), not as a chain member.`
|
|
666
694
|
);
|
|
667
695
|
}
|
|
696
|
+
const reversed = reversedRegexOperands({
|
|
697
|
+
value: value.value,
|
|
698
|
+
tag: value.tag,
|
|
699
|
+
filters: [...value.filters, ...added]
|
|
700
|
+
});
|
|
701
|
+
if (reversed) {
|
|
702
|
+
throw new Error(
|
|
703
|
+
`Regex filter \`${reversed.filter}\`: ${reversed.message} \u2014 \`withFilters(c.regex(\u2026), fl.${reversed.filter}(${reversed.slot === 0 ? "" : "\u2026, "}subject))\`. Naming the argument says which slot is which: \`fl.${reversed.filter}({ subject: \u2026 })\`. (issue #298)`
|
|
704
|
+
);
|
|
705
|
+
}
|
|
668
706
|
const pipedIsBarePattern = barePatternRefusal(value) !== null;
|
|
669
707
|
const offending = pipedIsBarePattern ? added.find((filter2) => REGEX_PATTERN_FILTERS.has(filter2.name)) : void 0;
|
|
670
708
|
if (offending) {
|
|
@@ -1559,8 +1597,79 @@ function encodeInput(name, descriptor2) {
|
|
|
1559
1597
|
// src/values/obj.ts
|
|
1560
1598
|
var IDENT = /^[A-Za-z_$][A-Za-z0-9_$]*$/;
|
|
1561
1599
|
function serializeValue(v2, path) {
|
|
1600
|
+
const record = objSetRecord(v2, path);
|
|
1601
|
+
if (record) return record;
|
|
1562
1602
|
return serializeAtom(v2, path) + serializeFilters(v2, path);
|
|
1563
1603
|
}
|
|
1604
|
+
function objSetRecord(v2, path) {
|
|
1605
|
+
if (v2.tag !== "const:obj") return null;
|
|
1606
|
+
if (v2.value === "") {
|
|
1607
|
+
throw new Error(
|
|
1608
|
+
`obj(): \`${path}\` is \`c.obj(null)\`, the legacy BLANK object form \u2014 the engine evaluates it to null, not to {}. Write \`c.null()\` for the null, or \`c.obj()\` for an empty object.`
|
|
1609
|
+
);
|
|
1610
|
+
}
|
|
1611
|
+
if (v2.value !== "{}") {
|
|
1612
|
+
const parsed = parseJson(v2.value);
|
|
1613
|
+
if (parsed === NOT_JSON) return null;
|
|
1614
|
+
return serializeJson(parsed, path) + serializeFilters(v2, path);
|
|
1615
|
+
}
|
|
1616
|
+
const parts = [];
|
|
1617
|
+
const keys = /* @__PURE__ */ new Set();
|
|
1618
|
+
let i = 0;
|
|
1619
|
+
for (; i < v2.filters.length; i++) {
|
|
1620
|
+
const f2 = v2.filters[i];
|
|
1621
|
+
if (f2.name !== "set" || f2.disabled || f2.arg.length !== 2) break;
|
|
1622
|
+
const [pathArg, member] = f2.arg;
|
|
1623
|
+
if (pathArg.tag !== "const" || pathArg.filters.length > 0) break;
|
|
1624
|
+
const bracketed = pathArg.value.startsWith("[");
|
|
1625
|
+
const key = parseSetPath(pathArg.value);
|
|
1626
|
+
if (!IDENT.test(key)) {
|
|
1627
|
+
if (!bracketed) break;
|
|
1628
|
+
throw new Error(
|
|
1629
|
+
`obj(): key "${key}" inside the \`c.obj\` at \`${path}\` must be a bare identifier ([A-Za-z_][A-Za-z0-9_]*) \u2014 XanoScript object keys aren't quoted.`
|
|
1630
|
+
);
|
|
1631
|
+
}
|
|
1632
|
+
if (keys.has(key)) break;
|
|
1633
|
+
keys.add(key);
|
|
1634
|
+
parts.push(`${key}: ${serializeValue(member, `${path}.${key}`)}`);
|
|
1635
|
+
}
|
|
1636
|
+
const rendered = parts.length === 0 ? "{}" : `{ ${parts.join(", ")} }`;
|
|
1637
|
+
const rest = { ...v2, filters: v2.filters.slice(i) };
|
|
1638
|
+
return rendered + serializeFilters(rest, path);
|
|
1639
|
+
}
|
|
1640
|
+
function parseSetPath(stored) {
|
|
1641
|
+
const bracketed = /^\["(.*)"\]$/s.exec(stored);
|
|
1642
|
+
return bracketed ? bracketed[1].replace(/\\(["\\])/g, "$1") : stored;
|
|
1643
|
+
}
|
|
1644
|
+
var NOT_JSON = /* @__PURE__ */ Symbol("not-json");
|
|
1645
|
+
function parseJson(text) {
|
|
1646
|
+
try {
|
|
1647
|
+
return JSON.parse(text);
|
|
1648
|
+
} catch {
|
|
1649
|
+
return NOT_JSON;
|
|
1650
|
+
}
|
|
1651
|
+
}
|
|
1652
|
+
function serializeJson(value, path) {
|
|
1653
|
+
if (value === null) return "null";
|
|
1654
|
+
if (typeof value === "string") return JSON.stringify(value);
|
|
1655
|
+
if (typeof value === "boolean") return value ? "true" : "false";
|
|
1656
|
+
if (typeof value === "number") return Number.isFinite(value) ? String(value) : "null";
|
|
1657
|
+
if (Array.isArray(value)) {
|
|
1658
|
+
return `[${value.map((el, i) => serializeJson(el, `${path}[${i}]`)).join(", ")}]`;
|
|
1659
|
+
}
|
|
1660
|
+
if (typeof value === "object") {
|
|
1661
|
+
const parts = Object.entries(value).map(([key, member]) => {
|
|
1662
|
+
if (!IDENT.test(key)) {
|
|
1663
|
+
throw new Error(
|
|
1664
|
+
`obj(): key "${key}" at \`${path}\` must be a bare identifier ([A-Za-z_][A-Za-z0-9_]*) \u2014 XanoScript object keys aren't quoted.`
|
|
1665
|
+
);
|
|
1666
|
+
}
|
|
1667
|
+
return `${key}: ${serializeJson(member, `${path}.${key}`)}`;
|
|
1668
|
+
});
|
|
1669
|
+
return parts.length === 0 ? "{}" : `{ ${parts.join(", ")} }`;
|
|
1670
|
+
}
|
|
1671
|
+
return "null";
|
|
1672
|
+
}
|
|
1564
1673
|
function serializeFilters(v2, path) {
|
|
1565
1674
|
let out2 = "";
|
|
1566
1675
|
for (const f2 of v2.filters) {
|
|
@@ -1614,9 +1723,18 @@ function serializeAtom(v2, path) {
|
|
|
1614
1723
|
case "const:epochms":
|
|
1615
1724
|
if (v2.value === "now") return "now";
|
|
1616
1725
|
break;
|
|
1726
|
+
// `c.array([…])` stores plain JSON, and the literal grammar spells the same
|
|
1727
|
+
// list — so it renders to the identical bytes a bare `[…]` member does. The
|
|
1728
|
+
// bare form always worked and this one used to throw, which made the empty
|
|
1729
|
+
// list (`c.array([])`) an export failure with no named way through (#295).
|
|
1730
|
+
case "const:array": {
|
|
1731
|
+
const parsed = parseJson(v2.value);
|
|
1732
|
+
if (parsed !== NOT_JSON) return serializeJson(parsed, path);
|
|
1733
|
+
break;
|
|
1734
|
+
}
|
|
1617
1735
|
}
|
|
1618
1736
|
throw new Error(
|
|
1619
|
-
`obj(): value tag "${v2.tag}" at \`${path}\` isn't supported in a dynamic object literal yet. Supported: inp(), ref(), auth(), col(), env()/setting()/sys.*, c.now(),
|
|
1737
|
+
`obj(): value tag "${v2.tag}" at \`${path}\` isn't supported in a dynamic object literal yet. Supported: inp(), ref(), auth(), col(), env()/setting()/sys.*, c.now(), c.text/int/decimal/bool/null, and c.obj()/c.array() \u2014 each optionally carrying a filter chain. A constant record or list can also be written bare: \`{ a: 1 }\`, \`[]\`.`
|
|
1620
1738
|
);
|
|
1621
1739
|
}
|
|
1622
1740
|
function serializeMember(m, path) {
|
|
@@ -4006,6 +4124,8 @@ export {
|
|
|
4006
4124
|
DiagnosticBag,
|
|
4007
4125
|
isTaggedValue,
|
|
4008
4126
|
barePatternRefusal,
|
|
4127
|
+
reversedOperandRefusal,
|
|
4128
|
+
reversedRegexOperands,
|
|
4009
4129
|
c,
|
|
4010
4130
|
ref,
|
|
4011
4131
|
inp,
|
|
@@ -4117,4 +4237,4 @@ export {
|
|
|
4117
4237
|
serializeBundle,
|
|
4118
4238
|
emitBundle
|
|
4119
4239
|
};
|
|
4120
|
-
//# sourceMappingURL=chunk-
|
|
4240
|
+
//# sourceMappingURL=chunk-QK7ZQJLP.js.map
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
realtimeChannelGuid,
|
|
7
7
|
realtimeServerRefName,
|
|
8
8
|
resolveRealtimeServerRef
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-UOZMSF4C.js";
|
|
10
10
|
import {
|
|
11
11
|
assertCanonical,
|
|
12
12
|
assertOneOf,
|
|
@@ -25,17 +25,17 @@ import {
|
|
|
25
25
|
resolveAuthRef,
|
|
26
26
|
resolveMockKeys,
|
|
27
27
|
warnLiveDatasource
|
|
28
|
-
} from "./chunk-
|
|
29
|
-
import {
|
|
30
|
-
encodeStatement
|
|
31
|
-
} from "./chunk-5XZ744TS.js";
|
|
28
|
+
} from "./chunk-QK7ZQJLP.js";
|
|
32
29
|
import {
|
|
33
30
|
deriveGuid,
|
|
34
31
|
getLockedCanonical,
|
|
35
32
|
lockKey,
|
|
36
33
|
realtimeMessageSeedName,
|
|
37
34
|
resolveRef
|
|
38
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-VAF6A3YD.js";
|
|
36
|
+
import {
|
|
37
|
+
encodeStatement
|
|
38
|
+
} from "./chunk-5XZ744TS.js";
|
|
39
39
|
|
|
40
40
|
// src/kinds/canonical.ts
|
|
41
41
|
function resolveCanonicalToken(label, payloadKey, accessor, def, override) {
|
|
@@ -667,4 +667,4 @@ export {
|
|
|
667
667
|
addonKind,
|
|
668
668
|
addon
|
|
669
669
|
};
|
|
670
|
-
//# sourceMappingURL=chunk-
|
|
670
|
+
//# sourceMappingURL=chunk-QYMAZRAU.js.map
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
import {
|
|
5
5
|
readLockFile,
|
|
6
6
|
writeLockFile
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-XEOX6AM7.js";
|
|
8
8
|
import {
|
|
9
9
|
UsageError,
|
|
10
10
|
extraArguments,
|
|
@@ -26,7 +26,7 @@ import {
|
|
|
26
26
|
Xano,
|
|
27
27
|
assertSeedIds,
|
|
28
28
|
coerceSeedRowValues
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-OWGCOGKK.js";
|
|
30
30
|
import {
|
|
31
31
|
getCommand,
|
|
32
32
|
getSubcommand,
|
|
@@ -46,7 +46,7 @@ import {
|
|
|
46
46
|
pathSegment,
|
|
47
47
|
serializeBundle,
|
|
48
48
|
tableColumns
|
|
49
|
-
} from "./chunk-
|
|
49
|
+
} from "./chunk-QK7ZQJLP.js";
|
|
50
50
|
import {
|
|
51
51
|
WORKSPACE_KEY,
|
|
52
52
|
createLockContext,
|
|
@@ -58,7 +58,7 @@ import {
|
|
|
58
58
|
seedLockOverrides,
|
|
59
59
|
serializeLock,
|
|
60
60
|
validateLockModel
|
|
61
|
-
} from "./chunk-
|
|
61
|
+
} from "./chunk-VAF6A3YD.js";
|
|
62
62
|
|
|
63
63
|
// src/emit/cli.ts
|
|
64
64
|
import { pathToFileURL as pathToFileURL3, fileURLToPath as fileURLToPath3 } from "url";
|
|
@@ -1004,7 +1004,7 @@ async function run(argv) {
|
|
|
1004
1004
|
return;
|
|
1005
1005
|
}
|
|
1006
1006
|
if (command === "init") {
|
|
1007
|
-
const { runInitCommand } = await import("./init-command-
|
|
1007
|
+
const { runInitCommand } = await import("./init-command-NPVL32L6.js");
|
|
1008
1008
|
return runInitCommand(args);
|
|
1009
1009
|
}
|
|
1010
1010
|
if (command === "completion") {
|
|
@@ -1019,11 +1019,11 @@ async function run(argv) {
|
|
|
1019
1019
|
return runCompletionCommand(shell);
|
|
1020
1020
|
}
|
|
1021
1021
|
if (command === "upgrade") {
|
|
1022
|
-
const { runUpgradeCommand } = await import("./upgrade-command-
|
|
1022
|
+
const { runUpgradeCommand } = await import("./upgrade-command-BN3EHAOI.js");
|
|
1023
1023
|
return runUpgradeCommand(args);
|
|
1024
1024
|
}
|
|
1025
1025
|
if (command === "lock") {
|
|
1026
|
-
const { runLockCommand } = await import("./lock-commands-
|
|
1026
|
+
const { runLockCommand } = await import("./lock-commands-ZZKZ4LZJ.js");
|
|
1027
1027
|
return runLockCommand(args);
|
|
1028
1028
|
}
|
|
1029
1029
|
if (command === "login") {
|
|
@@ -1035,7 +1035,7 @@ async function run(argv) {
|
|
|
1035
1035
|
return runLogoutCommand(args);
|
|
1036
1036
|
}
|
|
1037
1037
|
if (command === "deploy") {
|
|
1038
|
-
const { runDeployCommand } = await import("./deploy-command-
|
|
1038
|
+
const { runDeployCommand } = await import("./deploy-command-IP7V7GT4.js");
|
|
1039
1039
|
return runDeployCommand(args);
|
|
1040
1040
|
}
|
|
1041
1041
|
if (command === "ephemeral") {
|
|
@@ -1043,7 +1043,7 @@ async function run(argv) {
|
|
|
1043
1043
|
return runEphemeralCommand(args);
|
|
1044
1044
|
}
|
|
1045
1045
|
if (command === "release") {
|
|
1046
|
-
const { runReleaseCommand } = await import("./release-command-
|
|
1046
|
+
const { runReleaseCommand } = await import("./release-command-IMNTIVWK.js");
|
|
1047
1047
|
return runReleaseCommand(args);
|
|
1048
1048
|
}
|
|
1049
1049
|
if (command === "test") {
|
|
@@ -1051,7 +1051,7 @@ async function run(argv) {
|
|
|
1051
1051
|
return runTestCommand(args);
|
|
1052
1052
|
}
|
|
1053
1053
|
if (command === "workspace") {
|
|
1054
|
-
const { runWorkspaceCommand } = await import("./workspace-command-
|
|
1054
|
+
const { runWorkspaceCommand } = await import("./workspace-command-MNK7Y7MQ.js");
|
|
1055
1055
|
return runWorkspaceCommand(args);
|
|
1056
1056
|
}
|
|
1057
1057
|
if (command === "status") {
|
|
@@ -1083,7 +1083,7 @@ async function run(argv) {
|
|
|
1083
1083
|
throw unknownCommand("push");
|
|
1084
1084
|
}
|
|
1085
1085
|
if (command === "preflight") {
|
|
1086
|
-
const { runPreflightCommand } = await import("./preflight-command-
|
|
1086
|
+
const { runPreflightCommand } = await import("./preflight-command-K346GPTY.js");
|
|
1087
1087
|
return runPreflightCommand(args);
|
|
1088
1088
|
}
|
|
1089
1089
|
if (command !== "compile" && command !== "export" && command !== "paths" && command !== "routes") {
|
|
@@ -1348,4 +1348,4 @@ export {
|
|
|
1348
1348
|
exportBundleJson,
|
|
1349
1349
|
compileBundle
|
|
1350
1350
|
};
|
|
1351
|
-
//# sourceMappingURL=chunk-
|
|
1351
|
+
//# sourceMappingURL=chunk-RCT7UX7B.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-QK7ZQJLP.js";
|
|
39
40
|
import {
|
|
40
41
|
assertPathParamInputs,
|
|
41
42
|
fillPathParams,
|
|
42
43
|
parsePathParams
|
|
43
44
|
} from "./chunk-WHOJWOSV.js";
|
|
45
|
+
import {
|
|
46
|
+
deriveGuid,
|
|
47
|
+
realtimeChannelSeedName,
|
|
48
|
+
resolveQueryRef,
|
|
49
|
+
resolveRef
|
|
50
|
+
} from "./chunk-VAF6A3YD.js";
|
|
44
51
|
import {
|
|
45
52
|
annotate,
|
|
46
53
|
encodeStatement,
|
|
47
54
|
isRegisteredStatement,
|
|
48
55
|
registerStatement
|
|
49
56
|
} from "./chunk-5XZ744TS.js";
|
|
50
|
-
import {
|
|
51
|
-
deriveGuid,
|
|
52
|
-
realtimeChannelSeedName,
|
|
53
|
-
resolveQueryRef,
|
|
54
|
-
resolveRef
|
|
55
|
-
} from "./chunk-7JDT4PBU.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-UOZMSF4C.js.map
|
|
@@ -1,180 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
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
|
-
}
|
|
1
|
+
import {
|
|
2
|
+
md5Hex,
|
|
3
|
+
randomBytes
|
|
4
|
+
} from "./chunk-OHX6MIUZ.js";
|
|
178
5
|
|
|
179
6
|
// src/lock/store.ts
|
|
180
7
|
var STORE_KEY = /* @__PURE__ */ Symbol.for("xanots.lock.overrides");
|
|
@@ -712,7 +539,6 @@ function mergeObserved(lock, observed) {
|
|
|
712
539
|
}
|
|
713
540
|
|
|
714
541
|
export {
|
|
715
|
-
sha1Bytes,
|
|
716
542
|
seedLockOverrides,
|
|
717
543
|
resetLockOverrides,
|
|
718
544
|
isLockSeeded,
|
|
@@ -747,4 +573,4 @@ export {
|
|
|
747
573
|
adoptFromBundle,
|
|
748
574
|
mergeObserved
|
|
749
575
|
};
|
|
750
|
-
//# sourceMappingURL=chunk-
|
|
576
|
+
//# sourceMappingURL=chunk-VAF6A3YD.js.map
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
import {
|
|
5
5
|
parseLock,
|
|
6
6
|
serializeLock
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-VAF6A3YD.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-XEOX6AM7.js.map
|
package/dist/cli.js
CHANGED
|
@@ -8,18 +8,19 @@ import {
|
|
|
8
8
|
resolveHelpRequest,
|
|
9
9
|
resolveLockPath,
|
|
10
10
|
run
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-RCT7UX7B.js";
|
|
12
12
|
import "./chunk-CTD5ZCV6.js";
|
|
13
|
-
import "./chunk-
|
|
13
|
+
import "./chunk-XEOX6AM7.js";
|
|
14
14
|
import "./chunk-F6CYJ7TN.js";
|
|
15
15
|
import "./chunk-GNPVYOPB.js";
|
|
16
16
|
import "./chunk-EZG76F7R.js";
|
|
17
|
-
import "./chunk-
|
|
17
|
+
import "./chunk-OWGCOGKK.js";
|
|
18
18
|
import "./chunk-DIA7CT7J.js";
|
|
19
|
-
import "./chunk-
|
|
19
|
+
import "./chunk-QK7ZQJLP.js";
|
|
20
20
|
import "./chunk-WHOJWOSV.js";
|
|
21
|
+
import "./chunk-VAF6A3YD.js";
|
|
21
22
|
import "./chunk-5XZ744TS.js";
|
|
22
|
-
import "./chunk-
|
|
23
|
+
import "./chunk-OHX6MIUZ.js";
|
|
23
24
|
export {
|
|
24
25
|
compileBundle,
|
|
25
26
|
exportBundleJson,
|