@xanots/sdk 0.0.1 → 0.0.2

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.
Files changed (43) hide show
  1. package/dist/.build-fingerprint +1 -0
  2. package/dist/bin.js +4 -4
  3. package/dist/{chunk-3DUAGYGP.js → chunk-55VHDNW5.js} +2 -2
  4. package/dist/{chunk-EMCAWMHC.js → chunk-5L4X5LS6.js} +16 -2
  5. package/dist/{chunk-LH6Z6KFV.js → chunk-5XZ744TS.js} +1 -1
  6. package/dist/{chunk-MZUI3JNX.js → chunk-F6JCFRKO.js} +2 -2
  7. package/dist/{chunk-RVB7ITKN.js → chunk-LU7TRWMC.js} +2 -2
  8. package/dist/{chunk-TRU5OHQ5.js → chunk-MUDLJG2O.js} +32 -20
  9. package/dist/{chunk-WKP4D5MO.js → chunk-ODNMVJ6H.js} +2 -2
  10. package/dist/{chunk-26CNBZE2.js → chunk-P3TTMWUP.js} +13 -4
  11. package/dist/{chunk-YDZYMZBE.js → chunk-TQUO2OXY.js} +4 -4
  12. package/dist/{chunk-FJ6ZS5KB.js → chunk-U3G2UW65.js} +177 -60
  13. package/dist/{chunk-YGPIY3WT.js → chunk-UVLVQWWF.js} +13 -13
  14. package/dist/{chunk-33ND6LKO.js → chunk-XLD4BUTF.js} +2 -2
  15. package/dist/{chunk-NOO35BQ2.js → chunk-ZPEY5WE4.js} +2 -2
  16. package/dist/cli.js +4 -4
  17. package/dist/{codegen-command-OOKK6AZK.js → codegen-command-RY2GWDLX.js} +11 -11
  18. package/dist/codegen.js +2 -2
  19. package/dist/{deploy-command-4EQ7XX5G.js → deploy-command-DSISLUW5.js} +8 -8
  20. package/dist/{env-target-IFJ5QDHC.js → env-target-7C2GKBCY.js} +2 -2
  21. package/dist/{ephemeral-command-3X3I4ULC.js → ephemeral-command-5K573ZSG.js} +2 -2
  22. package/dist/index.d.ts +106 -84
  23. package/dist/index.js +6 -6
  24. package/dist/{init-command-R6H7ZXW5.js → init-command-4AWL6CLW.js} +6 -6
  25. package/dist/internal.d.ts +2 -2
  26. package/dist/internal.js +28 -10
  27. package/dist/{live-diff-Y3AKETHE.js → live-diff-RXSJCVJ7.js} +2 -2
  28. package/dist/{lock-commands-XTR2YKLY.js → lock-commands-7Q5LNZKL.js} +5 -5
  29. package/dist/{loop-OM3P2Z6O.js → loop-SAWAOUFO.js} +2 -2
  30. package/dist/node.d.ts +2 -2
  31. package/dist/node.js +7 -7
  32. package/dist/{release-command-VV5UVZKL.js → release-command-QXLRJMY7.js} +10 -10
  33. package/dist/{store-BQ97nKIF.d.ts → store-g45zwB33.d.ts} +91 -75
  34. package/dist/{test-command-TSPBQHBM.js → test-command-BOLIU57E.js} +2 -2
  35. package/dist/{validate-command-4ERHJSCO.js → validate-command-SYCFEYZN.js} +7 -7
  36. package/dist/{workspace-command-OF23DPNI.js → workspace-command-TOB2AJ6X.js} +11 -11
  37. package/llms/statements-calls.md +4 -4
  38. package/llms/statements-catalog.md +20 -20
  39. package/llms/statements-data.md +1 -1
  40. package/llms-full.txt +26 -26
  41. package/llms.txt +1 -1
  42. package/manifest.json +57 -84
  43. package/package.json +4 -1
@@ -0,0 +1 @@
1
+ c55e4f9d5b84cbeb62826b396d7824e3302e42e404c14866421d7e54d035853c
package/dist/bin.js CHANGED
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  readVersion,
4
4
  run
5
- } from "./chunk-YGPIY3WT.js";
5
+ } from "./chunk-UVLVQWWF.js";
6
6
  import {
7
7
  exitCodeOf,
8
8
  reportFailure
@@ -15,11 +15,11 @@ import {
15
15
  style,
16
16
  warn
17
17
  } from "./chunk-EZG76F7R.js";
18
- import "./chunk-3DUAGYGP.js";
18
+ import "./chunk-55VHDNW5.js";
19
19
  import "./chunk-YYRDLFSJ.js";
20
- import "./chunk-EMCAWMHC.js";
20
+ import "./chunk-5L4X5LS6.js";
21
21
  import "./chunk-WHOJWOSV.js";
22
- import "./chunk-LH6Z6KFV.js";
22
+ import "./chunk-5XZ744TS.js";
23
23
  import "./chunk-HJPTWBLH.js";
24
24
  import {
25
25
  atomicWrite
@@ -12,7 +12,7 @@ import {
12
12
  middlewareEntryGuid,
13
13
  stackReferencesAuth,
14
14
  tableColumns
15
- } from "./chunk-EMCAWMHC.js";
15
+ } from "./chunk-5L4X5LS6.js";
16
16
  import {
17
17
  CANONICAL_PAYLOAD_KEYS,
18
18
  REFERENCEABLE_KINDS,
@@ -1547,4 +1547,4 @@ export {
1547
1547
  Xano,
1548
1548
  workspace
1549
1549
  };
1550
- //# sourceMappingURL=chunk-3DUAGYGP.js.map
1550
+ //# sourceMappingURL=chunk-55VHDNW5.js.map
@@ -12,7 +12,7 @@ import {
12
12
  encodeStatement,
13
13
  rawResponseItems,
14
14
  registerStatement
15
- } from "./chunk-LH6Z6KFV.js";
15
+ } from "./chunk-5XZ744TS.js";
16
16
  import {
17
17
  deriveGuid,
18
18
  getLockedCanonical,
@@ -2777,6 +2777,15 @@ function encodeComparison(when) {
2777
2777
  return encodeExpression(when);
2778
2778
  }
2779
2779
 
2780
+ // src/statements/args.ts
2781
+ function argsOrEmpty(a) {
2782
+ return a ?? {};
2783
+ }
2784
+ function assertArg(statement, name, v2) {
2785
+ if (v2 === void 0)
2786
+ throw new Error(`Statement "${statement}": required argument "${name}" is missing.`);
2787
+ }
2788
+
2780
2789
  // src/statements/conditional.ts
2781
2790
  var CONDITIONAL = "mvp:conditional";
2782
2791
  var CONDITIONAL_ELIF = "mvp:conditional_elif";
@@ -2788,6 +2797,9 @@ function conditionalElif(args) {
2788
2797
  return annotate({ name: CONDITIONAL_ELIF, context, input: [] }, args);
2789
2798
  }
2790
2799
  function conditional(args) {
2800
+ args = argsOrEmpty(args);
2801
+ assertArg(CONDITIONAL, "when", args.when);
2802
+ assertArg(CONDITIONAL, "then", args.then);
2791
2803
  const context = {
2792
2804
  expr: encodeRuntimeCondition(args.when, "s.conditional `when`"),
2793
2805
  if: { run: args.then.map(encodeStatement) },
@@ -3903,6 +3915,8 @@ export {
3903
3915
  FILTER_SPECS,
3904
3916
  FILTER_REQUIRED_ARGS,
3905
3917
  fl,
3918
+ argsOrEmpty,
3919
+ assertArg,
3906
3920
  expr,
3907
3921
  isSearchOp,
3908
3922
  cmp,
@@ -3979,4 +3993,4 @@ export {
3979
3993
  serializeBundle,
3980
3994
  emitBundle
3981
3995
  };
3982
- //# sourceMappingURL=chunk-EMCAWMHC.js.map
3996
+ //# sourceMappingURL=chunk-5L4X5LS6.js.map
@@ -244,4 +244,4 @@ export {
244
244
  rawResponse,
245
245
  rawResponseItems
246
246
  };
247
- //# sourceMappingURL=chunk-LH6Z6KFV.js.map
247
+ //# sourceMappingURL=chunk-5XZ744TS.js.map
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  c,
3
3
  resp
4
- } from "./chunk-EMCAWMHC.js";
4
+ } from "./chunk-5L4X5LS6.js";
5
5
 
6
6
  // src/values/expect.ts
7
7
  var TEST_EXPECT_TYPES = [
@@ -90,4 +90,4 @@ export {
90
90
  TEST_EXPECT_TYPES,
91
91
  expect
92
92
  };
93
- //# sourceMappingURL=chunk-MZUI3JNX.js.map
93
+ //# sourceMappingURL=chunk-F6JCFRKO.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  RAW_ENVELOPE
3
- } from "./chunk-LH6Z6KFV.js";
3
+ } from "./chunk-5XZ744TS.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-RVB7ITKN.js.map
49
+ //# sourceMappingURL=chunk-LU7TRWMC.js.map
@@ -13,8 +13,9 @@ import {
13
13
  isEmptyOutput,
14
14
  liveArrayMapContext,
15
15
  normalize,
16
+ retiredInputSuccessor,
16
17
  retiredInputs
17
- } from "./chunk-26CNBZE2.js";
18
+ } from "./chunk-P3TTMWUP.js";
18
19
  import {
19
20
  exportWorkspaceBundle
20
21
  } from "./chunk-QTNO2WD6.js";
@@ -26,7 +27,7 @@ import {
26
27
  renderCodegenReadme,
27
28
  resolveFrontendPreset,
28
29
  sanitizeAppName
29
- } from "./chunk-WKP4D5MO.js";
30
+ } from "./chunk-ODNMVJ6H.js";
30
31
  import {
31
32
  XANO_DIR,
32
33
  resolveAiPresets,
@@ -37,10 +38,10 @@ import {
37
38
  } from "./chunk-C56BC2FY.js";
38
39
  import {
39
40
  TEST_EXPECT_TYPES
40
- } from "./chunk-MZUI3JNX.js";
41
+ } from "./chunk-F6JCFRKO.js";
41
42
  import {
42
43
  raw
43
- } from "./chunk-RVB7ITKN.js";
44
+ } from "./chunk-LU7TRWMC.js";
44
45
  import {
45
46
  FIELD_METHODS,
46
47
  STATEMENT_SURFACES,
@@ -63,11 +64,11 @@ import {
63
64
  searchConstrainsRows,
64
65
  tableTrigger,
65
66
  workspaceTrigger
66
- } from "./chunk-FJ6ZS5KB.js";
67
+ } from "./chunk-U3G2UW65.js";
67
68
  import {
68
69
  loadDefault,
69
70
  readVersion
70
- } from "./chunk-YGPIY3WT.js";
71
+ } from "./chunk-UVLVQWWF.js";
71
72
  import {
72
73
  UsageError
73
74
  } from "./chunk-IZW6MK3U.js";
@@ -111,7 +112,7 @@ import {
111
112
  sys,
112
113
  toolset,
113
114
  withFilters
114
- } from "./chunk-EMCAWMHC.js";
115
+ } from "./chunk-5L4X5LS6.js";
115
116
  import {
116
117
  parsePathParams,
117
118
  unboundPathParams
@@ -123,7 +124,7 @@ import {
123
124
  encodeField,
124
125
  encodeMockMap,
125
126
  encodeStatement
126
- } from "./chunk-LH6Z6KFV.js";
127
+ } from "./chunk-5XZ744TS.js";
127
128
  import {
128
129
  REFERENCEABLE_KIND_PAYLOAD_KEYS
129
130
  } from "./chunk-4HT3BNZ7.js";
@@ -2301,7 +2302,7 @@ function decodeFromSpec(ctx, stored) {
2301
2302
  if (field !== null) recovered.push(field);
2302
2303
  else if (!rule.optional && rule.default === void 0) {
2303
2304
  return declineHere(
2304
- storedCarries(stored, rule) ? `spec: "${rule.field}" IS stored, but nothing reads it back from its ${rule.route.kind} route \u2014 the inverse route is missing` : `spec: "${rule.field}" is required by the spec and the engine did not store it, so there is nothing to recover \u2014 the spec is stricter than the engine`
2305
+ storedCarries(stored, rule) ? `spec: "${rule.field}" IS stored, but nothing reads it back from its ${rule.route.kind} route \u2014 the inverse route is missing` : `spec: "${rule.field}" is required and the stored statement does not carry it, so there is nothing to recover. The statement is kept verbatim and re-exports byte-for-byte; nothing is lost. It cannot be re-authored as a typed call because the engine has no default for "${rule.field}" \u2014 supply one to author this statement fresh.`
2305
2306
  );
2306
2307
  }
2307
2308
  }
@@ -4152,15 +4153,7 @@ function decodeStatement(ctx, refs, stored, resolve2 = {}) {
4152
4153
  `${stored.name} carries ${droppedInput.length} stored \`input[]\` ${droppedInput.length === 1 ? "entry" : "entries"}, which this statement has no way to read \u2014 it declares no input schema, the engine hands it none, and its editor panel offers no control that could set one. Not carried into the tree`
4153
4154
  );
4154
4155
  }
4155
- const retired = retiredInputs(stored.name);
4156
- const carried = Array.isArray(droppedInput) ? droppedInput.filter((e) => retired.includes(String(e?.name ?? ""))) : [];
4157
- if (carried.length > 0) {
4158
- ctx.problem(
4159
- "expected-omission",
4160
- `${stored.name} carries a stored \`${carried.map((e) => String(e.name)).join("`, `")}\` input, which this statement no longer declares \u2014 the engine removed it and reads \`tags\` instead. Nothing reads the stored entry, so it is not carried into the tree, and a deploy from this tree will not write it back`
4161
- );
4162
- }
4163
- return withDeclineContext(
4156
+ const decoded = withDeclineContext(
4164
4157
  stored.name,
4165
4158
  () => collectLambdaBodyProblems(
4166
4159
  (problem) => ctx.problem(
@@ -4171,6 +4164,25 @@ function decodeStatement(ctx, refs, stored, resolve2 = {}) {
4171
4164
  () => dispatch(ctx, refs, stored, resolve2)
4172
4165
  )
4173
4166
  );
4167
+ if (!isRawFallback(decoded)) {
4168
+ const retired = retiredInputs(stored.name);
4169
+ const carried = Array.isArray(droppedInput) ? droppedInput.filter((e) => retired.includes(String(e?.name ?? ""))) : [];
4170
+ if (carried.length > 0) {
4171
+ const named = carried.map((e) => {
4172
+ const input2 = String(e.name ?? "");
4173
+ const successor = retiredInputSuccessor(stored.name, input2);
4174
+ return successor ? `\`${input2}\` (replaced by \`${successor}\`)` : `\`${input2}\``;
4175
+ });
4176
+ ctx.problem(
4177
+ "expected-omission",
4178
+ `${stored.name} carries a stored ${named.join(", ")} input, which this statement no longer declares \u2014 the engine removed it. Nothing reads the stored entry, so it is not carried into the tree, and a deploy from this tree will not write it back`
4179
+ );
4180
+ }
4181
+ }
4182
+ return decoded;
4183
+ }
4184
+ function isRawFallback(expr) {
4185
+ return expr.kind === "call" && expr.callee === "raw";
4174
4186
  }
4175
4187
  function dispatch(ctx, refs, stored, resolve2) {
4176
4188
  if (SUPERSEDED_STATEMENTS.has(stored.name)) {
@@ -6639,7 +6651,7 @@ async function fetchBundle(args, source) {
6639
6651
  );
6640
6652
  }
6641
6653
  const auth3 = await getAccessToken(args);
6642
- const { resolveLive, fetchEphemeralBundle } = await import("./ephemeral-command-3X3I4ULC.js");
6654
+ const { resolveLive, fetchEphemeralBundle } = await import("./ephemeral-command-5K573ZSG.js");
6643
6655
  const summary = await resolveLive(auth3, auth3.workspaceId, name);
6644
6656
  step(`Reading ephemeral "${name}"`);
6645
6657
  return {
@@ -6901,4 +6913,4 @@ export {
6901
6913
  verifyCrashEntry,
6902
6914
  blameGeneratedFile
6903
6915
  };
6904
- //# sourceMappingURL=chunk-TRU5OHQ5.js.map
6916
+ //# sourceMappingURL=chunk-MUDLJG2O.js.map
@@ -6,7 +6,7 @@ import {
6
6
  } from "./chunk-VKFQJEMW.js";
7
7
  import {
8
8
  readVersion
9
- } from "./chunk-YGPIY3WT.js";
9
+ } from "./chunk-UVLVQWWF.js";
10
10
  import {
11
11
  blank,
12
12
  detail,
@@ -1689,4 +1689,4 @@ export {
1689
1689
  projectShellFiles,
1690
1690
  runInitCommand
1691
1691
  };
1692
- //# sourceMappingURL=chunk-WKP4D5MO.js.map
1692
+ //# sourceMappingURL=chunk-ODNMVJ6H.js.map
@@ -126,11 +126,19 @@ function hasUnreadableInput(name) {
126
126
  return typeof name === "string" && UNREADABLE_INPUT.has(name);
127
127
  }
128
128
  var RETIRED_INPUT = {
129
- "mvp:datadog_log": ["ddtags"],
130
- "mvp:datadog_metric": ["ddtags"]
129
+ "mvp:datadog_log": { ddtags: "tags" },
130
+ "mvp:datadog_metric": { ddtags: "tags" },
131
+ "mvp:amazon_opensearch_query": { hidden_cols: "included_fields" },
132
+ "mvp:elasticsearch_query": { hidden_cols: "included_fields" }
131
133
  };
134
+ var NO_RETIRED_INPUTS = [];
132
135
  function retiredInputs(name) {
133
- return (typeof name === "string" ? RETIRED_INPUT[name] : void 0) ?? [];
136
+ const row = typeof name === "string" ? RETIRED_INPUT[name] : void 0;
137
+ return row ? Object.keys(row) : NO_RETIRED_INPUTS;
138
+ }
139
+ function retiredInputSuccessor(name, input) {
140
+ const row = typeof name === "string" ? RETIRED_INPUT[name] : void 0;
141
+ return row?.[input] ?? null;
134
142
  }
135
143
  var NAME_KEYED_INPUT = /* @__PURE__ */ new Set([
136
144
  "mvp:create_auth",
@@ -948,6 +956,7 @@ export {
948
956
  hasNoListBounds,
949
957
  hasUnreadableInput,
950
958
  retiredInputs,
959
+ retiredInputSuccessor,
951
960
  isBlankGroupStatement,
952
961
  isDeadResultItem,
953
962
  isBlankAgentSettings,
@@ -960,4 +969,4 @@ export {
960
969
  filledContext,
961
970
  normalize
962
971
  };
963
- //# sourceMappingURL=chunk-26CNBZE2.js.map
972
+ //# sourceMappingURL=chunk-P3TTMWUP.js.map
@@ -6,7 +6,7 @@ import {
6
6
  realtimeChannelGuid,
7
7
  realtimeServerRefName,
8
8
  resolveRealtimeServerRef
9
- } from "./chunk-FJ6ZS5KB.js";
9
+ } from "./chunk-U3G2UW65.js";
10
10
  import {
11
11
  assertCanonical,
12
12
  assertOneOf,
@@ -25,10 +25,10 @@ import {
25
25
  resolveAuthRef,
26
26
  resolveMockKeys,
27
27
  warnLiveDatasource
28
- } from "./chunk-EMCAWMHC.js";
28
+ } from "./chunk-5L4X5LS6.js";
29
29
  import {
30
30
  encodeStatement
31
- } from "./chunk-LH6Z6KFV.js";
31
+ } from "./chunk-5XZ744TS.js";
32
32
  import {
33
33
  deriveGuid,
34
34
  getLockedCanonical,
@@ -667,4 +667,4 @@ export {
667
667
  addonKind,
668
668
  addon
669
669
  };
670
- //# sourceMappingURL=chunk-YDZYMZBE.js.map
670
+ //# sourceMappingURL=chunk-TQUO2OXY.js.map