@xano/sdk 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (336) hide show
  1. package/CHANGELOG.md +788 -0
  2. package/LICENSE +21 -0
  3. package/README.md +541 -0
  4. package/dist/.build-fingerprint +1 -0
  5. package/dist/agent-file-refresh-ZEMK33AX.js +38 -0
  6. package/dist/answer-shape-K67TAAPY.js +33 -0
  7. package/dist/backend-dir-2U53CIAL.js +39 -0
  8. package/dist/backend-slot-7QXW2QYC.js +28 -0
  9. package/dist/bin.d.ts +1 -0
  10. package/dist/bin.js +255 -0
  11. package/dist/branch-NCRNWQBQ.js +61 -0
  12. package/dist/branch-commands-ACIRCEQJ.js +79 -0
  13. package/dist/bundle.d.ts +223 -0
  14. package/dist/bundle.js +153 -0
  15. package/dist/capture-WAXPD7DR.js +41 -0
  16. package/dist/chunk-27GWNP2I.js +23 -0
  17. package/dist/chunk-2CMJZDCL.js +177 -0
  18. package/dist/chunk-2EZ3ZJZZ.js +302 -0
  19. package/dist/chunk-2GNFDZA2.js +390 -0
  20. package/dist/chunk-2MNLRIOX.js +11 -0
  21. package/dist/chunk-2TFRR6JV.js +104 -0
  22. package/dist/chunk-2ZUEE4EK.js +408 -0
  23. package/dist/chunk-36JUQZVQ.js +22 -0
  24. package/dist/chunk-3DRXWLJ5.js +83 -0
  25. package/dist/chunk-3JDU4VRL.js +137 -0
  26. package/dist/chunk-3KZCLN4Z.js +241 -0
  27. package/dist/chunk-3LDULPRE.js +168 -0
  28. package/dist/chunk-3M4LFYNQ.js +111 -0
  29. package/dist/chunk-3XI5CTUE.js +22 -0
  30. package/dist/chunk-3YW23UFH.js +50 -0
  31. package/dist/chunk-45UIT5T2.js +862 -0
  32. package/dist/chunk-4BW2SG2N.js +46 -0
  33. package/dist/chunk-4KHEMC32.js +79 -0
  34. package/dist/chunk-4POWHT2K.js +321 -0
  35. package/dist/chunk-4Q2GN7NW.js +192 -0
  36. package/dist/chunk-5A2PLKZB.js +70 -0
  37. package/dist/chunk-5FBYXK5P.js +159 -0
  38. package/dist/chunk-5HVXPTU4.js +323 -0
  39. package/dist/chunk-5QU2P5CA.js +304 -0
  40. package/dist/chunk-5V5XU32D.js +191 -0
  41. package/dist/chunk-5ZSO4T2G.js +10 -0
  42. package/dist/chunk-622HUCZT.js +10 -0
  43. package/dist/chunk-65HWOMGV.js +177 -0
  44. package/dist/chunk-6ELFRN3P.js +365 -0
  45. package/dist/chunk-6HO3NCSJ.js +1055 -0
  46. package/dist/chunk-6IUMKYWI.js +457 -0
  47. package/dist/chunk-6KEB3C3U.js +65 -0
  48. package/dist/chunk-6MR5TI5V.js +987 -0
  49. package/dist/chunk-6NNTNXN7.js +157 -0
  50. package/dist/chunk-6PBR37LN.js +97 -0
  51. package/dist/chunk-6QXLMMT3.js +155 -0
  52. package/dist/chunk-6ZGJCBZS.js +224 -0
  53. package/dist/chunk-73IVBKMA.js +250 -0
  54. package/dist/chunk-7G3CTU7I.js +286 -0
  55. package/dist/chunk-A3UDOZB6.js +222 -0
  56. package/dist/chunk-A6E77GDW.js +85 -0
  57. package/dist/chunk-AHJWCYQO.js +660 -0
  58. package/dist/chunk-AKNCFVKZ.js +36 -0
  59. package/dist/chunk-AM4FKL4J.js +237 -0
  60. package/dist/chunk-AN6BL47T.js +26 -0
  61. package/dist/chunk-AOSYVMUS.js +147 -0
  62. package/dist/chunk-APWXY5SL.js +182 -0
  63. package/dist/chunk-AWEIIR2U.js +218 -0
  64. package/dist/chunk-AWQ7BQTQ.js +73 -0
  65. package/dist/chunk-BAUZOWGX.js +393 -0
  66. package/dist/chunk-BHACRS6R.js +940 -0
  67. package/dist/chunk-BWPNT55T.js +680 -0
  68. package/dist/chunk-C6RIMRU4.js +187 -0
  69. package/dist/chunk-CGVQZXYG.js +263 -0
  70. package/dist/chunk-CIMQZRRE.js +162 -0
  71. package/dist/chunk-CJHQKJU4.js +113 -0
  72. package/dist/chunk-CTMO46PK.js +1897 -0
  73. package/dist/chunk-D53J55C5.js +106 -0
  74. package/dist/chunk-D7VGG3WS.js +90 -0
  75. package/dist/chunk-DAD3ONIS.js +245 -0
  76. package/dist/chunk-DGWHAVRG.js +162 -0
  77. package/dist/chunk-DX4QR4B2.js +483 -0
  78. package/dist/chunk-EHP3WPEG.js +21 -0
  79. package/dist/chunk-ELP2HMXC.js +432 -0
  80. package/dist/chunk-ERVIASGL.js +21 -0
  81. package/dist/chunk-ET4Y4XCB.js +865 -0
  82. package/dist/chunk-ETO6LGLD.js +4750 -0
  83. package/dist/chunk-EUUUMY7J.js +24 -0
  84. package/dist/chunk-FQJ2TTHP.js +218 -0
  85. package/dist/chunk-FQOF7E2E.js +133 -0
  86. package/dist/chunk-FWD7AL6N.js +21 -0
  87. package/dist/chunk-FXFV3KU6.js +138 -0
  88. package/dist/chunk-FXRQOWTE.js +171 -0
  89. package/dist/chunk-G554NZNI.js +210 -0
  90. package/dist/chunk-GSGDWJB5.js +13 -0
  91. package/dist/chunk-H2V3N23D.js +66 -0
  92. package/dist/chunk-H5C7MBCR.js +159 -0
  93. package/dist/chunk-HHN734BU.js +371 -0
  94. package/dist/chunk-HRVBLCVJ.js +243 -0
  95. package/dist/chunk-HVRUQXGD.js +1264 -0
  96. package/dist/chunk-I4F5TCJH.js +130 -0
  97. package/dist/chunk-IDOTCMDV.js +57 -0
  98. package/dist/chunk-IGOLHKWF.js +427 -0
  99. package/dist/chunk-JGE7CAWB.js +148 -0
  100. package/dist/chunk-JTUKLCXS.js +92 -0
  101. package/dist/chunk-JZGVVJSI.js +66 -0
  102. package/dist/chunk-K4WX6UUU.js +923 -0
  103. package/dist/chunk-K5BBGTYZ.js +217 -0
  104. package/dist/chunk-K6RXBGUB.js +427 -0
  105. package/dist/chunk-KTSDSD36.js +165 -0
  106. package/dist/chunk-L5JYN3NM.js +1038 -0
  107. package/dist/chunk-LIEOKXKD.js +354 -0
  108. package/dist/chunk-LLNZGEFK.js +51 -0
  109. package/dist/chunk-LPECSJ2J.js +55 -0
  110. package/dist/chunk-LQCMKAJ7.js +413 -0
  111. package/dist/chunk-LRN4ZJCQ.js +1145 -0
  112. package/dist/chunk-MJ4ZVHKN.js +17 -0
  113. package/dist/chunk-MXHSQOC4.js +3061 -0
  114. package/dist/chunk-N5GKCWE5.js +367 -0
  115. package/dist/chunk-NA3PXMEF.js +10 -0
  116. package/dist/chunk-NAQDMEHV.js +76 -0
  117. package/dist/chunk-NWKXM5RD.js +109 -0
  118. package/dist/chunk-NZOWWHU5.js +196 -0
  119. package/dist/chunk-OHX6MIUZ.js +184 -0
  120. package/dist/chunk-OOXWYAA4.js +15 -0
  121. package/dist/chunk-OPHB5ORL.js +1990 -0
  122. package/dist/chunk-OXA6PSZT.js +1725 -0
  123. package/dist/chunk-P2HAGF6H.js +73 -0
  124. package/dist/chunk-PTHVMXZI.js +3036 -0
  125. package/dist/chunk-PZ5AY32C.js +10 -0
  126. package/dist/chunk-Q325JKYB.js +189 -0
  127. package/dist/chunk-Q7DGTQ5G.js +255 -0
  128. package/dist/chunk-QCNYHBL7.js +601 -0
  129. package/dist/chunk-QO6BVGS5.js +145 -0
  130. package/dist/chunk-QXTKSOFI.js +76 -0
  131. package/dist/chunk-ROY4YAEQ.js +66 -0
  132. package/dist/chunk-RTJRZFFY.js +447 -0
  133. package/dist/chunk-SAVJUS2X.js +128 -0
  134. package/dist/chunk-SFLHVCKX.js +173 -0
  135. package/dist/chunk-STSFNCY4.js +127 -0
  136. package/dist/chunk-SWBF2LTK.js +170 -0
  137. package/dist/chunk-T5KELPAR.js +109 -0
  138. package/dist/chunk-TFFGOFVZ.js +1481 -0
  139. package/dist/chunk-TLHIFK4M.js +256 -0
  140. package/dist/chunk-TLQE7ZN3.js +156 -0
  141. package/dist/chunk-TPHWJ7UG.js +1981 -0
  142. package/dist/chunk-TRJCALW3.js +291 -0
  143. package/dist/chunk-TTEIYD5P.js +133 -0
  144. package/dist/chunk-U64O2MXY.js +407 -0
  145. package/dist/chunk-UCQ2VUTG.js +630 -0
  146. package/dist/chunk-UTI5G6OJ.js +44 -0
  147. package/dist/chunk-UVHDMMIP.js +188 -0
  148. package/dist/chunk-UZ6QQWJT.js +120 -0
  149. package/dist/chunk-VAX3UZOY.js +686 -0
  150. package/dist/chunk-W3HBUKFO.js +57 -0
  151. package/dist/chunk-WKQLGKCL.js +2823 -0
  152. package/dist/chunk-WQFNASK4.js +560 -0
  153. package/dist/chunk-WRBKLYSJ.js +224 -0
  154. package/dist/chunk-WTPZRR4I.js +17 -0
  155. package/dist/chunk-WZDJ2LLX.js +2385 -0
  156. package/dist/chunk-X2NL4KUO.js +14 -0
  157. package/dist/chunk-X4DVXBFY.js +38 -0
  158. package/dist/chunk-X677DMZM.js +7050 -0
  159. package/dist/chunk-XBKMWY7F.js +612 -0
  160. package/dist/chunk-XNCP4KYO.js +78 -0
  161. package/dist/chunk-XVBGLISP.js +35 -0
  162. package/dist/chunk-XW6KISBB.js +1192 -0
  163. package/dist/chunk-YGZHHAAB.js +8156 -0
  164. package/dist/chunk-YHEFQUQB.js +186 -0
  165. package/dist/chunk-YLDALTWZ.js +653 -0
  166. package/dist/chunk-YU4HSQW7.js +229 -0
  167. package/dist/chunk-ZDPP6RKB.js +27 -0
  168. package/dist/chunk-ZFDZKNGG.js +194 -0
  169. package/dist/chunk-ZIY7RNUT.js +49 -0
  170. package/dist/chunk-ZYJP6BOO.js +30 -0
  171. package/dist/cli.d.ts +1111 -0
  172. package/dist/cli.js +165 -0
  173. package/dist/codegen-command-VR2GWR6C.js +173 -0
  174. package/dist/codegen.d.ts +115 -0
  175. package/dist/codegen.js +19 -0
  176. package/dist/commands-GJMJ4XYZ.js +76 -0
  177. package/dist/completion-ZQLO6PB6.js +738 -0
  178. package/dist/config-MBYGCAFK.js +136 -0
  179. package/dist/deploy-command-JVZPWHMK.js +180 -0
  180. package/dist/deploy-source-3W45CXMP.js +81 -0
  181. package/dist/dev-env-sync-HN44K4D5.js +188 -0
  182. package/dist/diagnostics-UEAAHWVF.js +30 -0
  183. package/dist/display-name-hint-ABBPVQIR.js +46 -0
  184. package/dist/emit-CyhBDxli.d.ts +7007 -0
  185. package/dist/env-example-refresh-ET5HMMDW.js +126 -0
  186. package/dist/env-pull-command-TNMNB3CV.js +323 -0
  187. package/dist/env-target-O4HRKTGZ.js +40 -0
  188. package/dist/env-var-command-ZIRDCAZA.js +427 -0
  189. package/dist/ephemeral-P7F3PMAD.js +54 -0
  190. package/dist/ephemeral-command-CLJJKOFT.js +592 -0
  191. package/dist/ephemeral-state-PYCBSOGX.js +61 -0
  192. package/dist/file-lock-PT74GWYW.js +10 -0
  193. package/dist/generate-command-AYEOLA26.js +510 -0
  194. package/dist/gitignore-3SJ3WNRG.js +51 -0
  195. package/dist/guards-4EBNCZDC.js +162 -0
  196. package/dist/hosted-file-PSHJB3HX.js +28 -0
  197. package/dist/impersonate-command-5JAS3WSV.js +152 -0
  198. package/dist/import-EQSFU6JC.js +19 -0
  199. package/dist/index.d.ts +5470 -0
  200. package/dist/index.js +371 -0
  201. package/dist/init-command-X2FR4UAK.js +125 -0
  202. package/dist/init-modules-RY7UHAOL.js +50 -0
  203. package/dist/init-web-M4YZSZK6.js +42 -0
  204. package/dist/internal.d.ts +179 -0
  205. package/dist/internal.js +2634 -0
  206. package/dist/io-RC56QSN5.js +26 -0
  207. package/dist/keep-data-merge-7MPLVAVI.js +1119 -0
  208. package/dist/lambda-config-reconcile-OUZ4OYAB.js +116 -0
  209. package/dist/landed-753YLJ5H.js +40 -0
  210. package/dist/landing-record-SU52SKXU.js +61 -0
  211. package/dist/live-diff-YONW2VI3.js +65 -0
  212. package/dist/local-engine-choice-CH5X3W7E.js +79 -0
  213. package/dist/local-engine-command-Z3OL7VOD.js +766 -0
  214. package/dist/local-engine-config-5U3SC434.js +39 -0
  215. package/dist/local-engine-deploy-PCQ4SNPB.js +39 -0
  216. package/dist/local-engine-process-EHTE5LLU.js +63 -0
  217. package/dist/local-engine-state-A4FTRFAF.js +32 -0
  218. package/dist/local-engine-update-check-6L645VBL.js +162 -0
  219. package/dist/lock-MRRHW5GS.js +87 -0
  220. package/dist/lock-commands-2QG25HL7.js +963 -0
  221. package/dist/login-command-QPYRWOXZ.js +538 -0
  222. package/dist/logout-command-WOIQLDP6.js +56 -0
  223. package/dist/loop-ALIZLOSX.js +191 -0
  224. package/dist/marketplace-command-K5YL42NO.js +977 -0
  225. package/dist/marketplace-resolve-LY32JES5.js +40 -0
  226. package/dist/meta-client-YXGPW53C.js +244 -0
  227. package/dist/module-manifest-JFGHU2TC.js +38 -0
  228. package/dist/near-key.d.ts +13 -0
  229. package/dist/near-key.js +8 -0
  230. package/dist/node.d.ts +95 -0
  231. package/dist/node.js +969 -0
  232. package/dist/operation-outcome-TZSESNC7.js +51 -0
  233. package/dist/output-target-AL3I44GG.js +47 -0
  234. package/dist/package-manager-PRAHUSCN.js +34 -0
  235. package/dist/plan-disclosure-6G4MLZKD.js +114 -0
  236. package/dist/plugin-contributions-WRNY5ABG.js +28 -0
  237. package/dist/plugin-prompt-4VA3B4FF.js +20 -0
  238. package/dist/plugin-questions-JTSYA74Q.js +24 -0
  239. package/dist/plugin.d.ts +396 -0
  240. package/dist/plugin.js +1 -0
  241. package/dist/preflight-command-2T5Z36MI.js +321 -0
  242. package/dist/profile-command-AH3PIM4X.js +800 -0
  243. package/dist/profile-pointer-GRWJU3YD.js +31 -0
  244. package/dist/profile-select-74TRDEPD.js +23 -0
  245. package/dist/project-dependency-KSH63ODT.js +35 -0
  246. package/dist/project-sdk-REPPOIBD.js +24 -0
  247. package/dist/promote-command-PCWT5N6S.js +140 -0
  248. package/dist/prompt-II3F3LND.js +27 -0
  249. package/dist/publish-command-TTDUUJI5.js +414 -0
  250. package/dist/pull-command-VBO7C4S3.js +161 -0
  251. package/dist/pull-superseded-GJWLG7XO.js +20 -0
  252. package/dist/release-command-N4ZPKMHR.js +146 -0
  253. package/dist/release-ns-command-3KFDMZ6G.js +1745 -0
  254. package/dist/response-HlXahv4K.d.ts +925 -0
  255. package/dist/retry-command-AS5EVREX.js +34 -0
  256. package/dist/routes-manifest-SNWUVBT6.js +43 -0
  257. package/dist/runtime-XETHVF33.js +14 -0
  258. package/dist/scaffold.d.ts +1911 -0
  259. package/dist/scaffold.js +107 -0
  260. package/dist/secrets-file-LVZD6IIM.js +56 -0
  261. package/dist/secrets-fill-command-TTCPSVXN.js +218 -0
  262. package/dist/seed-VU7C3QYS.js +46 -0
  263. package/dist/sent-writes-N7X4OVXT.js +22 -0
  264. package/dist/source-resolve-S2XA3XZF.js +83 -0
  265. package/dist/static-host-B2Y6AG3W.js +352 -0
  266. package/dist/status-command-RUDXTF7I.js +554 -0
  267. package/dist/store-6VNCD4D7.js +20 -0
  268. package/dist/store-ARM6VMO5.js +98 -0
  269. package/dist/store-DuYfzKlW.d.ts +3144 -0
  270. package/dist/suggest-6FOOYKHG.js +12 -0
  271. package/dist/sveltekit.d.ts +154 -0
  272. package/dist/sveltekit.js +109 -0
  273. package/dist/sync-contributions-UCEROO26.js +415 -0
  274. package/dist/table-ENAVMITR.js +42 -0
  275. package/dist/tables-command-GUPXXSB5.js +156 -0
  276. package/dist/tenant-IIHPOHGP.js +42 -0
  277. package/dist/tenant-command-D5HGI2X4.js +965 -0
  278. package/dist/test-command-TIKZMDPZ.js +476 -0
  279. package/dist/tests-BGGIOK3L.js +26 -0
  280. package/dist/token-NICJUTMT.js +72 -0
  281. package/dist/toolchain-hooks-GHKLUJOH.js +96 -0
  282. package/dist/toolchain-modules-5EAZUONB.js +24 -0
  283. package/dist/tracked-backend-EIBUMDZA.js +80 -0
  284. package/dist/update-check-2W2NLDTC.js +136 -0
  285. package/dist/upgrade-command-QHNFWM7O.js +531 -0
  286. package/dist/verify-rollout-DRCK5TDD.js +61 -0
  287. package/dist/whoami-command-STGINTXH.js +51 -0
  288. package/dist/workspace-2CLHU2LK.js +93 -0
  289. package/dist/workspace-binding-56PIIPCP.js +54 -0
  290. package/dist/workspace-command-JEXQETJD.js +535 -0
  291. package/dist/workspace-env-F2RFMSC5.js +70 -0
  292. package/dist/workspace-export-OJSH2HIW.js +21 -0
  293. package/dist/writable-VA7OISSK.js +25 -0
  294. package/dist/xano-ICFUSPFR.js +42 -0
  295. package/dist/xanosdk-import-GN42TO2B.js +56 -0
  296. package/dist/xanosdk-project-S6DXJONQ.js +41 -0
  297. package/dist/xdo-CxDr2Q1C.d.ts +1371 -0
  298. package/guides/README.md +33 -0
  299. package/guides/authoring.md +921 -0
  300. package/guides/cli.md +401 -0
  301. package/guides/codegen.md +177 -0
  302. package/guides/codes.md +404 -0
  303. package/guides/coverage.md +74 -0
  304. package/guides/deploying.md +1525 -0
  305. package/guides/environment.md +400 -0
  306. package/guides/marketplace.md +415 -0
  307. package/guides/module-contract.md +558 -0
  308. package/guides/object-kinds.md +433 -0
  309. package/guides/project-structure.md +43 -0
  310. package/guides/scaffold.md +351 -0
  311. package/guides/typed-frontend.md +242 -0
  312. package/llms/client.md +63 -0
  313. package/llms/errors.md +56 -0
  314. package/llms/fields.md +176 -0
  315. package/llms/filters.md +183 -0
  316. package/llms/kinds-agent-mcp.md +30 -0
  317. package/llms/kinds-core.md +100 -0
  318. package/llms/kinds-knowledge.md +20 -0
  319. package/llms/kinds-realtime.md +76 -0
  320. package/llms/lambda.md +94 -0
  321. package/llms/legacy.md +44 -0
  322. package/llms/lock.md +40 -0
  323. package/llms/object-kinds.md +34 -0
  324. package/llms/statements-calls.md +62 -0
  325. package/llms/statements-catalog.md +320 -0
  326. package/llms/statements-data.md +66 -0
  327. package/llms/statements-runtime.md +68 -0
  328. package/llms/tests.md +59 -0
  329. package/llms/toolchain.md +16 -0
  330. package/llms/triggers.md +36 -0
  331. package/llms/values.md +29 -0
  332. package/llms-full.txt +2085 -0
  333. package/llms.txt +493 -0
  334. package/manifest.json +11224 -0
  335. package/package.json +162 -0
  336. package/types/lambda-globals.d.ts +129 -0
@@ -0,0 +1,367 @@
1
+ import {
2
+ isTaggedValue
3
+ } from "./chunk-OXA6PSZT.js";
4
+ import {
5
+ resolveRef
6
+ } from "./chunk-NZOWWHU5.js";
7
+ import {
8
+ INPUT_CONTEXT,
9
+ encodeField
10
+ } from "./chunk-TTEIYD5P.js";
11
+
12
+ // src/fields/catalog.ts
13
+ var DEFAULTABLE_TYPES = /* @__PURE__ */ new Set([
14
+ "text",
15
+ "int",
16
+ "decimal",
17
+ "enum",
18
+ "bool",
19
+ "email",
20
+ "json",
21
+ "date",
22
+ "epochms"
23
+ ]);
24
+ var ACCESS_VALUES = /* @__PURE__ */ new Set(["public", "private", "internal"]);
25
+ var FORMAT_VALUES = /* @__PURE__ */ new Set(["", "plaintext", "yaml", "html", "xml", "markdown"]);
26
+ function assertEnumValues(values) {
27
+ if (Array.isArray(values) && values.every((v) => typeof v === "string" || typeof v === "number")) return;
28
+ throw new Error(`f.enum takes its values as a list of strings or numbers, FIRST: f.enum(["a", "b"], { default: "a" }) \u2014 got ${JSON.stringify(values)}.`);
29
+ }
30
+ function descriptor(type, options) {
31
+ if (options.format && type !== "text") {
32
+ throw new Error(`f: \`format\` is only valid on text fields, not "${type}".`);
33
+ }
34
+ if (options.format !== void 0 && !FORMAT_VALUES.has(options.format)) {
35
+ throw new Error(
36
+ `f: invalid text \`format\` "${options.format}"; valid: plaintext/yaml/html/xml/markdown.`
37
+ );
38
+ }
39
+ if (options.access !== void 0 && !ACCESS_VALUES.has(options.access)) {
40
+ throw new Error(
41
+ `f: invalid \`access\` "${options.access}"; valid: public/private/internal.`
42
+ );
43
+ }
44
+ if (options.default !== void 0 && options.default !== "" && !DEFAULTABLE_TYPES.has(type)) {
45
+ throw new Error(
46
+ `f: \`default\` is not supported on "${type}" fields (the engine drops it); valid on text/int/decimal/enum/bool/email/json/date/timestamp.`
47
+ );
48
+ }
49
+ if (options.noDefault === true && options.default !== void 0) {
50
+ throw new Error(
51
+ `f: \`noDefault\` and \`default\` are mutually exclusive on "${type}" fields \u2014 \`noDefault\` omits the key entirely, so there is no value to set.`
52
+ );
53
+ }
54
+ return { type, options };
55
+ }
56
+ function make(type, defaults) {
57
+ return (options = {}) => descriptor(type, { ...defaults, ...options });
58
+ }
59
+ function targetKeyType(table) {
60
+ if (typeof table === "string") return void 0;
61
+ const def = table;
62
+ if (def.idType === "int" || def.idType === "uuid") return def.idType;
63
+ if (def.schema === void 0 || def.schema === null) return void 0;
64
+ const idType = Array.isArray(def.schema) ? def.schema.find((col) => col?.name === "id")?.type : def.schema.id?.type;
65
+ if (idType === "uuid") return "uuid";
66
+ return idType === void 0 || idType === "int" ? "int" : void 0;
67
+ }
68
+ function toNestedFields(map) {
69
+ return Object.entries(map).map(([name, d]) => ({ name, type: d.type, ...d.options }));
70
+ }
71
+ var f = {
72
+ // --- scalars ---
73
+ text: make("text"),
74
+ int: make("int"),
75
+ decimal: make("decimal"),
76
+ bool: make("bool"),
77
+ uuid: make("uuid"),
78
+ date: make("date"),
79
+ email: make("email"),
80
+ /** Password field; defaults to `access:"internal"` (the engine's stored default). */
81
+ password: make("password", { access: "internal" }),
82
+ /**
83
+ * JSON column. Accepts an optional nested `children` schema — the structure the
84
+ * editor shows when a `json` field is expanded, and what a pulled workspace
85
+ * carries.
86
+ *
87
+ * `children` is spelled as an ARRAY of named, typed fields rather than the
88
+ * `FieldMap` {@link FieldCatalog.object} takes positionally. The two are not
89
+ * interchangeable: an object column's children are the column's own schema,
90
+ * while a json column's are a description of the shape stored inside it, which
91
+ * the engine persists in the order given. That order is part of the stored
92
+ * bytes, and a map does not preserve it.
93
+ *
94
+ * Without this there is no way to author a structured JSON column at all.
95
+ */
96
+ json(options = {}) {
97
+ return descriptor("json", { ...options });
98
+ },
99
+ /** Epoch-millisecond timestamp (authored as `timestamp`). */
100
+ timestamp: make("epochms"),
101
+ // --- file resources (authoring name → blob_* stored name) ---
102
+ /** Image file resource (stored `blob_img`). */
103
+ image: make("blob_img"),
104
+ /** Video file resource (stored `blob_video`). */
105
+ video: make("blob_video"),
106
+ /** Audio file resource (stored `blob_audio`). */
107
+ audio: make("blob_audio"),
108
+ /** Generic file attachment (stored `blob`). */
109
+ attachment: make("blob"),
110
+ // --- geo ---
111
+ geo: {
112
+ /** Value `{ type: "point", data: { lng, lat } }`. */
113
+ point: make("geo_point"),
114
+ /** Value `{ type: "points", data: [{ lng, lat }, …] }`. */
115
+ multipoint: make("geo_multipoint"),
116
+ /** Value `{ type: "path", data: [{ lng, lat }, …] }`. */
117
+ linestring: make("geo_linestring"),
118
+ /** Value `{ type: "paths", data: [[{ lng, lat }, …], …] }`. */
119
+ multilinestring: make("geo_multilinestring"),
120
+ /** Value `{ type: "poly", data: [{ lng, lat }, …] }` — the ring is closed for you. */
121
+ polygon: make("geo_polygon"),
122
+ /** Value `{ type: "polys", data: [[{ lng, lat }, …], …] }`. */
123
+ multipolygon: make("geo_multipolygon")
124
+ },
125
+ // --- composite (positional payload + options) ---
126
+ /**
127
+ * Enum field. `values` may be empty — that is an enum column added in the
128
+ * editor and not yet given its options, which the engine stores and which
129
+ * appears in the survey corpus. Refusing it made the SDK stricter than the
130
+ * engine and cost a real table its readable form.
131
+ *
132
+ * An empty `values` brands the column `never` — an enum permitting nothing can
133
+ * hold nothing. Note what that becomes downstream: `InferRow` surfaces the
134
+ * column as `undefined`, not `never`, so a read-time narrow written against
135
+ * `never` (`if (row.e === "x")`) is dead differently than it looks.
136
+ */
137
+ enum(values, options = {}) {
138
+ assertEnumValues(values);
139
+ return descriptor("enum", { ...options, values: [...values] });
140
+ },
141
+ /** Vector field; `size` (>= 1) is the embedding dimensionality. */
142
+ vector(size, options = {}) {
143
+ if (!Number.isInteger(size) || size < 1) {
144
+ throw new Error(`f.vector: size must be an integer >= 1, got ${size}.`);
145
+ }
146
+ return descriptor("vector", { ...options, vector: { size } });
147
+ },
148
+ /** Nested object field (stored `obj`); `children` is a named field map. */
149
+ object(children, options = {}) {
150
+ return descriptor("obj", { ...options, children: toNestedFields(children) });
151
+ },
152
+ /**
153
+ * Table-reference (foreign-key) field — the column holds the referenced
154
+ * table's primary key. The engine persists the link as a trailing `@` method
155
+ * carrying the target table's id (`{name:"@", arg:["dbo=<guid>"]}`); on import
156
+ * it parses that back into the column's `tableref_id`. The reference resolves to the
157
+ * table's deterministic guid via the shared cross-object resolver, so it
158
+ * agrees with the target table's payload `guid` with no shared registry.
159
+ *
160
+ * The column takes the target handle's key type (`idType`), else `int`; pass
161
+ * `{ type: "uuid" }` for a uuid-keyed table named by bare string. A reference
162
+ * column may only be `int` or `uuid` — the two valid primary-key types.
163
+ *
164
+ * @param table The referenced table (a `table()` def handle or its bare name).
165
+ * For a **self-reference** (e.g. `tweets.reply_to → tweets`), the table's
166
+ * `const` binding isn't assigned yet inside its own initializer — using the
167
+ * handle throws a "used before declaration" error. Pass the **bare name**
168
+ * instead: `f.tableRef("tweets", { type: "int" })`. Identity guids derive
169
+ * from `(type, name)`, so the name form resolves to the same guid.
170
+ *
171
+ * Byte-verified whole-object against a persisted table readback: the `@`
172
+ * method carries
173
+ * `disabled:false`, sits last in `methods`, and its `dbo=` arg is the target
174
+ * table's payload guid.
175
+ *
176
+ * The engine asserts the referenced table's primary-key type matches
177
+ * (int↔int, uuid↔uuid). When the target is passed as a **def handle** its
178
+ * `idType` is in hand, so a mismatch throws here instead of surfacing as an
179
+ * import failure. The bare-name form (self-references) carries no schema —
180
+ * there is nothing to check against, and it is not guessed at.
181
+ */
182
+ tableRef(table, options = {}) {
183
+ const { type: given, methods = [], ...rest } = options;
184
+ const idType = targetKeyType(table);
185
+ const type = given ?? idType ?? "int";
186
+ if (idType !== void 0 && idType !== type) {
187
+ const name = typeof table === "string" ? `"${table}"` : table.name || "<unnamed>";
188
+ throw new Error(
189
+ `f.tableRef(${name}, { type: "${type}" }): that table's primary key is "${idType}". The engine requires a reference column to match the target's key type, so this fails at import. Drop \`type\` to take the key type from the handle.`
190
+ );
191
+ }
192
+ const guid = resolveRef("dbo", table);
193
+ return descriptor(type, {
194
+ ...rest,
195
+ methods: [...methods ?? [], { name: "@", arg: [`dbo=${guid}`] }]
196
+ });
197
+ }
198
+ };
199
+
200
+ // src/inputs/input.ts
201
+ function makeInput(type) {
202
+ return (options = {}) => ({ type, options });
203
+ }
204
+ var input = {
205
+ // --- scalars ---
206
+ text: makeInput("text"),
207
+ int: makeInput("int"),
208
+ decimal: makeInput("decimal"),
209
+ bool: makeInput("bool"),
210
+ email: makeInput("email"),
211
+ /**
212
+ * Password input — hashes its value **when the input binds**, before your stack
213
+ * runs. This breaks the natural signup/login shape and is the single most common
214
+ * way to ship silently-broken auth:
215
+ * - **Login:** `s.security.check_password` receives the *already-hashed* submission
216
+ * (a fresh random salt each request), compares it against the stored hash, and
217
+ * never matches — so login always fails with a false "invalid password".
218
+ * - **Signup:** the value is hashed here at bind, so the `f.password` column then sees
219
+ * an already-hashed `salt.hash` value and stores it as-is (the column's hash-on-write
220
+ * skips a value already in that shape) — the plaintext never lands in the column.
221
+ *
222
+ * Recipe: use {@link input.text} (e.g. `input.text({ methods: ["min:6"] })`) for the
223
+ * password on **both** signup and login, let the `f.password` *column* hash on write,
224
+ * and pass the plaintext straight to `check_password`. See the auth recipe in the
225
+ * README. Reach for `input.password` only when you specifically want bind-time hashing
226
+ * and are not also comparing it with `check_password`.
227
+ */
228
+ password: makeInput("password"),
229
+ /**
230
+ * URL input — a `text` field that names the intent "this holds a URL". There
231
+ * is no native engine `url` type, and this does **not** by itself enforce an
232
+ * http(s) scheme: a `javascript:`/`data:` URL still type-checks and imports.
233
+ * When the value is security-relevant (e.g. a link that gets navigated to),
234
+ * reject bad input at the boundary in the stack with `s.precondition` — see
235
+ * the "validate input at the boundary" recipe in the README. Carries the same
236
+ * `TextMethod` options as {@link input.text}.
237
+ */
238
+ url: makeInput("text"),
239
+ uuid: makeInput("uuid"),
240
+ date: makeInput("date"),
241
+ /**
242
+ * Epoch-millisecond timestamp (stored `epochms`). A number binds as ms as-is —
243
+ * epoch SECONDS land in 1970 with no error — and an ISO-8601 string keeps its
244
+ * offset but drops fractional seconds. Send epoch ms for sub-second precision.
245
+ */
246
+ timestamp: makeInput("epochms"),
247
+ json: makeInput("json"),
248
+ /**
249
+ * Raw file **upload** (stored `file`) — the bytes as they arrive on the
250
+ * request (multipart, base64, or a fetched URI). Input-only: there is no
251
+ * `f.file` column, because an upload is not something a table holds.
252
+ *
253
+ * It is NOT a stored file resource and cannot be written to a file column
254
+ * directly. Store it first and write what you get back:
255
+ * `s.storage.create_image({ as: "img", value: inp("avatar") })`, then write
256
+ * `ref("img")` to an `f.image()` column. Use {@link input.image} and friends
257
+ * only when the caller already sends a stored file resource.
258
+ *
259
+ * Read the upload with `inp`, NOT `ref("input.avatar")`: `ref` is the `var`
260
+ * tag, so that spelling makes the engine look for a stack variable named
261
+ * `input` and fail the request with `Missing var entry: input`.
262
+ */
263
+ file: makeInput("file"),
264
+ /**
265
+ * **Database link** — one input that EXPANDS into one input per column of the
266
+ * linked table (stored `<tableGuid>_mvpschema`; XanoScript `dblink`). A table
267
+ * with three columns turns this single entry into three request inputs, so
268
+ * read them by their own column names: `inp("email")`, not `inp("user__")`.
269
+ * The expansion is live — adding a column to the table adds an input here.
270
+ *
271
+ * `hidden` is how you drop columns from that expansion (`["created_at", "id"]`)
272
+ * and is the common case in the wild, not an edge case. `merge: true` is what
273
+ * makes the engine expand rather than nest, so it is forced and cannot be
274
+ * unset — a dblink that does not merge is not a dblink.
275
+ *
276
+ * `customize` overrides individual expanded columns — `{ email: { required:
277
+ * true, methods: ["lower"] } }` — where `hidden` drops them wholesale. Both
278
+ * are read per column by the engine's expansion, and a column named in
279
+ * `customize` with `hidden: true` is dropped exactly as the outer list does it.
280
+ *
281
+ * Input-only: the engine refuses it as a column type, and a column linking a
282
+ * whole table would be a foreign key — use
283
+ * {@link f.tableRef} for that.
284
+ *
285
+ * By convention the editor names the entry after the table with a trailing
286
+ * `__` (`user__`), but the name is just the key in your `input:` map and any
287
+ * name round-trips.
288
+ */
289
+ dbLink(table, options = {}) {
290
+ return {
291
+ type: `${resolveRef("dbo", table)}_mvpschema`,
292
+ options: { ...options, merge: true }
293
+ };
294
+ },
295
+ // --- file resources / geo / vector / table refs (shared with the `f.*` catalog) ---
296
+ /** Image file input (stored `blob_img`). */
297
+ image: f.image,
298
+ /** Video file input (stored `blob_video`). */
299
+ video: f.video,
300
+ /** Audio file input (stored `blob_audio`). */
301
+ audio: f.audio,
302
+ /** Generic file-attachment input (stored `blob`). */
303
+ attachment: f.attachment,
304
+ /** Geo inputs: `input.geo.point()`, `.polygon()`, … (six geometry types). */
305
+ geo: f.geo,
306
+ /** Vector input; `size` (>= 1) is the embedding dimensionality. */
307
+ vector: f.vector,
308
+ /** Table-reference input — see {@link f.tableRef}; pass the table handle or bare name. */
309
+ tableRef: f.tableRef,
310
+ /**
311
+ * Enum input. `values` may be empty, mirroring {@link f.enum} — the two
312
+ * surfaces describe the same engine type, and one accepting what the other
313
+ * rejects is how they start disagreeing about what a workspace can hold.
314
+ */
315
+ enum(values, options = {}) {
316
+ return { type: "enum", options: { ...options, values: [...values] } };
317
+ },
318
+ /**
319
+ * Object input (stored `obj`) with typed, named children. `children` is a
320
+ * field map built from the same `f.*` catalog used for columns, e.g.
321
+ * `input.object({ name: f.text(), age: f.int() })`.
322
+ */
323
+ object(children, options = {}) {
324
+ return {
325
+ type: "obj",
326
+ options: { ...options, children: toNestedFields(children) }
327
+ };
328
+ },
329
+ /**
330
+ * List (array) input — wraps an element constructor, mirroring `Array<T>`:
331
+ * `input.list(input.text())`, `input.list(input.object({ id: f.int() }))`.
332
+ * The element's own options (e.g. its `methods`) are kept; list-level `options`
333
+ * (`required`, `nullable`, `description`, …) apply to the list field and win
334
+ * on conflict. The element's value type is preserved as the array element.
335
+ *
336
+ * A non-array value is NOT rejected: it binds as a one-item list, and a
337
+ * non-JSON string for an `input.object` element binds its children's defaults.
338
+ * A string starting with `[` is parsed as JSON without an element check. Mark
339
+ * an object child `required` or guard with `s.precondition` when the shape
340
+ * must hold.
341
+ */
342
+ list(element, options = {}) {
343
+ if (!element?.type) {
344
+ throw new Error("input.list: pass an element constructor, e.g. input.list(input.text()).");
345
+ }
346
+ return {
347
+ type: element.type,
348
+ options: { ...element.options, ...options, array: true }
349
+ };
350
+ }
351
+ };
352
+ function encodeInput(name, descriptor2) {
353
+ if (isTaggedValue(descriptor2)) {
354
+ throw new Error(
355
+ `input "${name}": got a value ref (inp("${descriptor2.value}"), tag "${descriptor2.tag}") where an input descriptor is required. An "input:" map wants a descriptor factory like input.text()/input.int()/input.enum([...]) \u2014 not the value ref inp(...). Reach for inp("${name}") only to READ this input inside a where/stack/value slot.`
356
+ );
357
+ }
358
+ return encodeField(name, descriptor2.type, descriptor2.options, INPUT_CONTEXT);
359
+ }
360
+
361
+ export {
362
+ toNestedFields,
363
+ f,
364
+ input,
365
+ encodeInput
366
+ };
367
+ //# sourceMappingURL=chunk-N5GKCWE5.js.map
@@ -0,0 +1,10 @@
1
+ // src/util/sha256.ts
2
+ import { createHash } from "crypto";
3
+ function sha256Hex(bytes) {
4
+ return createHash("sha256").update(bytes).digest("hex");
5
+ }
6
+
7
+ export {
8
+ sha256Hex
9
+ };
10
+ //# sourceMappingURL=chunk-NA3PXMEF.js.map
@@ -0,0 +1,76 @@
1
+ import {
2
+ credentialFileFlag,
3
+ recordedCredentialFile,
4
+ recordedCredentialPath,
5
+ resolveAuthFilePath
6
+ } from "./chunk-XW6KISBB.js";
7
+ import {
8
+ readEnvVar
9
+ } from "./chunk-X2NL4KUO.js";
10
+ import {
11
+ shellQuote
12
+ } from "./chunk-5ZSO4T2G.js";
13
+
14
+ // src/emit/context-flags.ts
15
+ var ORIGIN_READ_ONLY_BY_REFRESH = "Drop `--origin` \u2014 only a XANO_REFRESH_TOKEN exchange reads it; a stored profile refreshes at the server recorded with it, and a meta API token never refreshes.";
16
+ var ambient;
17
+ function setHintContext(args) {
18
+ ambient = args === void 0 ? void 0 : { authFile: args.authFile, local: args.local, profile: args.profile, authHost: args.authHost };
19
+ }
20
+ function typedCredentialFlags() {
21
+ if (ambient === void 0) return {};
22
+ return {
23
+ ...ambient.authFile !== void 0 ? { authFile: ambient.authFile } : {},
24
+ ...ambient.local ? { local: true } : {},
25
+ ...ambient.authHost !== void 0 ? { authHost: ambient.authHost } : {},
26
+ ...ambient.profile !== void 0 ? { profile: ambient.profile } : {}
27
+ };
28
+ }
29
+ function credentialFileOf(args = ambient) {
30
+ if (args === void 0 || envCredentialResolves()) return void 0;
31
+ try {
32
+ return recordedCredentialFile(resolveAuthFilePath(args));
33
+ } catch {
34
+ return void 0;
35
+ }
36
+ }
37
+ function credentialFileFlagFor(recorded) {
38
+ return credentialFileFlag(recordedCredentialPath(recorded) ?? void 0);
39
+ }
40
+ function contextFlags(args = ambient, opts = {}) {
41
+ if (args === void 0 || opts.credentialStore !== true && envCredentialResolves()) return "";
42
+ let file;
43
+ try {
44
+ file = credentialFileFlag(resolveAuthFilePath(args));
45
+ } catch {
46
+ file = args.local ? " --local" : args.authFile !== void 0 ? ` --config ${shellQuote(args.authFile)}` : "";
47
+ }
48
+ const profile = args.profile !== void 0 && args.profile !== "" ? ` --profile ${shellQuote(args.profile)}` : "";
49
+ return `${profile}${file}`;
50
+ }
51
+ var CREDENTIAL_STORE_COMMANDS = /* @__PURE__ */ new Set(["login", "logout", "profile"]);
52
+ function isCredentialStoreCommand(args) {
53
+ return args.command !== void 0 && CREDENTIAL_STORE_COMMANDS.has(args.command);
54
+ }
55
+ function envCredentialResolves() {
56
+ const meta = ["XANO_INSTANCE_URL", "XANO_WORKSPACE_ID", "XANO_META_TOKEN"].filter((v) => readEnvVar(v) !== void 0);
57
+ if (meta.length === 3) return true;
58
+ return meta.length === 0 && readEnvVar("XANO_REFRESH_TOKEN") !== void 0 && readEnvVar("XANO_CLIENT_ID") !== void 0;
59
+ }
60
+ var ENV_CREDENTIAL_VARS = "XANO_INSTANCE_URL, XANO_WORKSPACE_ID and XANO_META_TOKEN (or XANO_REFRESH_TOKEN)";
61
+ function recordedByEnvCredential(record) {
62
+ return record?.credential === "environment";
63
+ }
64
+
65
+ export {
66
+ ORIGIN_READ_ONLY_BY_REFRESH,
67
+ setHintContext,
68
+ typedCredentialFlags,
69
+ credentialFileOf,
70
+ credentialFileFlagFor,
71
+ contextFlags,
72
+ isCredentialStoreCommand,
73
+ ENV_CREDENTIAL_VARS,
74
+ recordedByEnvCredential
75
+ };
76
+ //# sourceMappingURL=chunk-NAQDMEHV.js.map
@@ -0,0 +1,109 @@
1
+ import {
2
+ appNamesByGuid,
3
+ lockNameForObject
4
+ } from "./chunk-6MR5TI5V.js";
5
+
6
+ // src/validate/kinds.ts
7
+ var ROUND_TRIP_KINDS = [
8
+ { key: "dbo", fixtureDir: "tables" },
9
+ { key: "function", fixtureDir: "statements", runnable: true },
10
+ { key: "query", fixtureDir: "query" },
11
+ { key: "trigger", fixtureDir: "triggers" },
12
+ { key: "task", fixtureDir: "task" },
13
+ { key: "toolset", fixtureDir: "toolset" },
14
+ { key: "tool", fixtureDir: "toolset" },
15
+ // The other two MCP primitives an MCP server lists; their goldens share `mcp/`.
16
+ { key: "prompt", fixtureDir: "mcp" },
17
+ { key: "resource", fixtureDir: "mcp" },
18
+ { key: "middleware", fixtureDir: "middleware" },
19
+ { key: "addon", fixtureDir: "addon" },
20
+ { key: "workflow_test", fixtureDir: "workflow-test" },
21
+ { key: "knowledge", fixtureDir: "knowledge" },
22
+ // The realtime family: a server parents channels, a channel parents messages.
23
+ // All three are authored kinds carrying their own goldens under `realtime/`.
24
+ { key: "realtime_server", fixtureDir: "realtime" },
25
+ { key: "channel", fixtureDir: "realtime" },
26
+ { key: "message", fixtureDir: "realtime" },
27
+ { key: "microservice", fixtureDir: "microservice" },
28
+ // `app` is the API GROUP payload key — an authored container, not a deploy
29
+ // target. Its corpus dir does not exist yet; capture creates it on first
30
+ // promotion.
31
+ { key: "app", fixtureDir: "api-group" }
32
+ ];
33
+ var FIXTURE_DIR_BY_KIND = new Map(ROUND_TRIP_KINDS.map((k) => [k.key, k.fixtureDir]));
34
+ var RUNNABLE_KINDS = new Set(ROUND_TRIP_KINDS.filter((k) => k.runnable).map((k) => k.key));
35
+ function fixtureDirForKind(key) {
36
+ return FIXTURE_DIR_BY_KIND.get(key);
37
+ }
38
+ function kindIsRunnable(key) {
39
+ return RUNNABLE_KINDS.has(key);
40
+ }
41
+ function strField(obj, key) {
42
+ const v = obj[key];
43
+ return typeof v === "string" && v !== "" ? v : void 0;
44
+ }
45
+ var nameKey = (obj) => strField(obj, "name");
46
+ function identityKeyFor(kind, payload) {
47
+ if (kind !== "query") return nameKey;
48
+ const groupNames = appNamesByGuid(payload.app);
49
+ const guidById = /* @__PURE__ */ new Map();
50
+ for (const group of Array.isArray(payload.app) ? payload.app : []) {
51
+ if (group === null || typeof group !== "object") continue;
52
+ const guid = strField(group, "guid");
53
+ const id = group.id;
54
+ if (guid !== void 0 && id !== void 0) guidById.set(id, guid);
55
+ }
56
+ return (obj) => {
57
+ const name = nameKey(obj);
58
+ if (name === void 0) return void 0;
59
+ const ref = obj.app?.id;
60
+ const guid = guidById.get(ref);
61
+ const app = guid !== void 0 ? { id: guid } : obj.app;
62
+ return lockNameForObject("query", { name, verb: obj.verb, app }, groupNames);
63
+ };
64
+ }
65
+ function indexByIdentity(objects, keyOf = nameKey) {
66
+ const byGuid = /* @__PURE__ */ new Map();
67
+ const byKey = /* @__PURE__ */ new Map();
68
+ const duplicateGuids = /* @__PURE__ */ new Set();
69
+ const duplicateKeys = /* @__PURE__ */ new Set();
70
+ for (const obj of objects) {
71
+ const guid = strField(obj, "guid");
72
+ if (guid !== void 0) {
73
+ if (byGuid.has(guid)) duplicateGuids.add(guid);
74
+ else byGuid.set(guid, obj);
75
+ }
76
+ const key = keyOf(obj);
77
+ if (key !== void 0) {
78
+ if (byKey.has(key)) duplicateKeys.add(key);
79
+ else byKey.set(key, obj);
80
+ }
81
+ }
82
+ return { byGuid, byKey, duplicateGuids, duplicateKeys };
83
+ }
84
+ function resolveMatch(compiled, index, keyOf = nameKey) {
85
+ const guid = strField(compiled, "guid");
86
+ if (guid !== void 0 && index.byGuid.has(guid)) {
87
+ if (index.duplicateGuids.has(guid)) return { outcome: "ambiguous" };
88
+ return { outcome: "found", fetched: index.byGuid.get(guid) };
89
+ }
90
+ const key = keyOf(compiled);
91
+ if (key !== void 0 && index.byKey.has(key)) {
92
+ if (index.duplicateKeys.has(key)) return { outcome: "ambiguous" };
93
+ return { outcome: "found", fetched: index.byKey.get(key) };
94
+ }
95
+ return { outcome: "missing" };
96
+ }
97
+ function identityMatcher(kind, fetched, exportedPayload, compiledPayload) {
98
+ const index = indexByIdentity(fetched, identityKeyFor(kind, exportedPayload));
99
+ const compiledKey = identityKeyFor(kind, compiledPayload);
100
+ return (compiled) => resolveMatch(compiled, index, compiledKey);
101
+ }
102
+
103
+ export {
104
+ ROUND_TRIP_KINDS,
105
+ fixtureDirForKind,
106
+ kindIsRunnable,
107
+ identityMatcher
108
+ };
109
+ //# sourceMappingURL=chunk-NWKXM5RD.js.map