@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.
- package/CHANGELOG.md +788 -0
- package/LICENSE +21 -0
- package/README.md +541 -0
- package/dist/.build-fingerprint +1 -0
- package/dist/agent-file-refresh-ZEMK33AX.js +38 -0
- package/dist/answer-shape-K67TAAPY.js +33 -0
- package/dist/backend-dir-2U53CIAL.js +39 -0
- package/dist/backend-slot-7QXW2QYC.js +28 -0
- package/dist/bin.d.ts +1 -0
- package/dist/bin.js +255 -0
- package/dist/branch-NCRNWQBQ.js +61 -0
- package/dist/branch-commands-ACIRCEQJ.js +79 -0
- package/dist/bundle.d.ts +223 -0
- package/dist/bundle.js +153 -0
- package/dist/capture-WAXPD7DR.js +41 -0
- package/dist/chunk-27GWNP2I.js +23 -0
- package/dist/chunk-2CMJZDCL.js +177 -0
- package/dist/chunk-2EZ3ZJZZ.js +302 -0
- package/dist/chunk-2GNFDZA2.js +390 -0
- package/dist/chunk-2MNLRIOX.js +11 -0
- package/dist/chunk-2TFRR6JV.js +104 -0
- package/dist/chunk-2ZUEE4EK.js +408 -0
- package/dist/chunk-36JUQZVQ.js +22 -0
- package/dist/chunk-3DRXWLJ5.js +83 -0
- package/dist/chunk-3JDU4VRL.js +137 -0
- package/dist/chunk-3KZCLN4Z.js +241 -0
- package/dist/chunk-3LDULPRE.js +168 -0
- package/dist/chunk-3M4LFYNQ.js +111 -0
- package/dist/chunk-3XI5CTUE.js +22 -0
- package/dist/chunk-3YW23UFH.js +50 -0
- package/dist/chunk-45UIT5T2.js +862 -0
- package/dist/chunk-4BW2SG2N.js +46 -0
- package/dist/chunk-4KHEMC32.js +79 -0
- package/dist/chunk-4POWHT2K.js +321 -0
- package/dist/chunk-4Q2GN7NW.js +192 -0
- package/dist/chunk-5A2PLKZB.js +70 -0
- package/dist/chunk-5FBYXK5P.js +159 -0
- package/dist/chunk-5HVXPTU4.js +323 -0
- package/dist/chunk-5QU2P5CA.js +304 -0
- package/dist/chunk-5V5XU32D.js +191 -0
- package/dist/chunk-5ZSO4T2G.js +10 -0
- package/dist/chunk-622HUCZT.js +10 -0
- package/dist/chunk-65HWOMGV.js +177 -0
- package/dist/chunk-6ELFRN3P.js +365 -0
- package/dist/chunk-6HO3NCSJ.js +1055 -0
- package/dist/chunk-6IUMKYWI.js +457 -0
- package/dist/chunk-6KEB3C3U.js +65 -0
- package/dist/chunk-6MR5TI5V.js +987 -0
- package/dist/chunk-6NNTNXN7.js +157 -0
- package/dist/chunk-6PBR37LN.js +97 -0
- package/dist/chunk-6QXLMMT3.js +155 -0
- package/dist/chunk-6ZGJCBZS.js +224 -0
- package/dist/chunk-73IVBKMA.js +250 -0
- package/dist/chunk-7G3CTU7I.js +286 -0
- package/dist/chunk-A3UDOZB6.js +222 -0
- package/dist/chunk-A6E77GDW.js +85 -0
- package/dist/chunk-AHJWCYQO.js +660 -0
- package/dist/chunk-AKNCFVKZ.js +36 -0
- package/dist/chunk-AM4FKL4J.js +237 -0
- package/dist/chunk-AN6BL47T.js +26 -0
- package/dist/chunk-AOSYVMUS.js +147 -0
- package/dist/chunk-APWXY5SL.js +182 -0
- package/dist/chunk-AWEIIR2U.js +218 -0
- package/dist/chunk-AWQ7BQTQ.js +73 -0
- package/dist/chunk-BAUZOWGX.js +393 -0
- package/dist/chunk-BHACRS6R.js +940 -0
- package/dist/chunk-BWPNT55T.js +680 -0
- package/dist/chunk-C6RIMRU4.js +187 -0
- package/dist/chunk-CGVQZXYG.js +263 -0
- package/dist/chunk-CIMQZRRE.js +162 -0
- package/dist/chunk-CJHQKJU4.js +113 -0
- package/dist/chunk-CTMO46PK.js +1897 -0
- package/dist/chunk-D53J55C5.js +106 -0
- package/dist/chunk-D7VGG3WS.js +90 -0
- package/dist/chunk-DAD3ONIS.js +245 -0
- package/dist/chunk-DGWHAVRG.js +162 -0
- package/dist/chunk-DX4QR4B2.js +483 -0
- package/dist/chunk-EHP3WPEG.js +21 -0
- package/dist/chunk-ELP2HMXC.js +432 -0
- package/dist/chunk-ERVIASGL.js +21 -0
- package/dist/chunk-ET4Y4XCB.js +865 -0
- package/dist/chunk-ETO6LGLD.js +4750 -0
- package/dist/chunk-EUUUMY7J.js +24 -0
- package/dist/chunk-FQJ2TTHP.js +218 -0
- package/dist/chunk-FQOF7E2E.js +133 -0
- package/dist/chunk-FWD7AL6N.js +21 -0
- package/dist/chunk-FXFV3KU6.js +138 -0
- package/dist/chunk-FXRQOWTE.js +171 -0
- package/dist/chunk-G554NZNI.js +210 -0
- package/dist/chunk-GSGDWJB5.js +13 -0
- package/dist/chunk-H2V3N23D.js +66 -0
- package/dist/chunk-H5C7MBCR.js +159 -0
- package/dist/chunk-HHN734BU.js +371 -0
- package/dist/chunk-HRVBLCVJ.js +243 -0
- package/dist/chunk-HVRUQXGD.js +1264 -0
- package/dist/chunk-I4F5TCJH.js +130 -0
- package/dist/chunk-IDOTCMDV.js +57 -0
- package/dist/chunk-IGOLHKWF.js +427 -0
- package/dist/chunk-JGE7CAWB.js +148 -0
- package/dist/chunk-JTUKLCXS.js +92 -0
- package/dist/chunk-JZGVVJSI.js +66 -0
- package/dist/chunk-K4WX6UUU.js +923 -0
- package/dist/chunk-K5BBGTYZ.js +217 -0
- package/dist/chunk-K6RXBGUB.js +427 -0
- package/dist/chunk-KTSDSD36.js +165 -0
- package/dist/chunk-L5JYN3NM.js +1038 -0
- package/dist/chunk-LIEOKXKD.js +354 -0
- package/dist/chunk-LLNZGEFK.js +51 -0
- package/dist/chunk-LPECSJ2J.js +55 -0
- package/dist/chunk-LQCMKAJ7.js +413 -0
- package/dist/chunk-LRN4ZJCQ.js +1145 -0
- package/dist/chunk-MJ4ZVHKN.js +17 -0
- package/dist/chunk-MXHSQOC4.js +3061 -0
- package/dist/chunk-N5GKCWE5.js +367 -0
- package/dist/chunk-NA3PXMEF.js +10 -0
- package/dist/chunk-NAQDMEHV.js +76 -0
- package/dist/chunk-NWKXM5RD.js +109 -0
- package/dist/chunk-NZOWWHU5.js +196 -0
- package/dist/chunk-OHX6MIUZ.js +184 -0
- package/dist/chunk-OOXWYAA4.js +15 -0
- package/dist/chunk-OPHB5ORL.js +1990 -0
- package/dist/chunk-OXA6PSZT.js +1725 -0
- package/dist/chunk-P2HAGF6H.js +73 -0
- package/dist/chunk-PTHVMXZI.js +3036 -0
- package/dist/chunk-PZ5AY32C.js +10 -0
- package/dist/chunk-Q325JKYB.js +189 -0
- package/dist/chunk-Q7DGTQ5G.js +255 -0
- package/dist/chunk-QCNYHBL7.js +601 -0
- package/dist/chunk-QO6BVGS5.js +145 -0
- package/dist/chunk-QXTKSOFI.js +76 -0
- package/dist/chunk-ROY4YAEQ.js +66 -0
- package/dist/chunk-RTJRZFFY.js +447 -0
- package/dist/chunk-SAVJUS2X.js +128 -0
- package/dist/chunk-SFLHVCKX.js +173 -0
- package/dist/chunk-STSFNCY4.js +127 -0
- package/dist/chunk-SWBF2LTK.js +170 -0
- package/dist/chunk-T5KELPAR.js +109 -0
- package/dist/chunk-TFFGOFVZ.js +1481 -0
- package/dist/chunk-TLHIFK4M.js +256 -0
- package/dist/chunk-TLQE7ZN3.js +156 -0
- package/dist/chunk-TPHWJ7UG.js +1981 -0
- package/dist/chunk-TRJCALW3.js +291 -0
- package/dist/chunk-TTEIYD5P.js +133 -0
- package/dist/chunk-U64O2MXY.js +407 -0
- package/dist/chunk-UCQ2VUTG.js +630 -0
- package/dist/chunk-UTI5G6OJ.js +44 -0
- package/dist/chunk-UVHDMMIP.js +188 -0
- package/dist/chunk-UZ6QQWJT.js +120 -0
- package/dist/chunk-VAX3UZOY.js +686 -0
- package/dist/chunk-W3HBUKFO.js +57 -0
- package/dist/chunk-WKQLGKCL.js +2823 -0
- package/dist/chunk-WQFNASK4.js +560 -0
- package/dist/chunk-WRBKLYSJ.js +224 -0
- package/dist/chunk-WTPZRR4I.js +17 -0
- package/dist/chunk-WZDJ2LLX.js +2385 -0
- package/dist/chunk-X2NL4KUO.js +14 -0
- package/dist/chunk-X4DVXBFY.js +38 -0
- package/dist/chunk-X677DMZM.js +7050 -0
- package/dist/chunk-XBKMWY7F.js +612 -0
- package/dist/chunk-XNCP4KYO.js +78 -0
- package/dist/chunk-XVBGLISP.js +35 -0
- package/dist/chunk-XW6KISBB.js +1192 -0
- package/dist/chunk-YGZHHAAB.js +8156 -0
- package/dist/chunk-YHEFQUQB.js +186 -0
- package/dist/chunk-YLDALTWZ.js +653 -0
- package/dist/chunk-YU4HSQW7.js +229 -0
- package/dist/chunk-ZDPP6RKB.js +27 -0
- package/dist/chunk-ZFDZKNGG.js +194 -0
- package/dist/chunk-ZIY7RNUT.js +49 -0
- package/dist/chunk-ZYJP6BOO.js +30 -0
- package/dist/cli.d.ts +1111 -0
- package/dist/cli.js +165 -0
- package/dist/codegen-command-VR2GWR6C.js +173 -0
- package/dist/codegen.d.ts +115 -0
- package/dist/codegen.js +19 -0
- package/dist/commands-GJMJ4XYZ.js +76 -0
- package/dist/completion-ZQLO6PB6.js +738 -0
- package/dist/config-MBYGCAFK.js +136 -0
- package/dist/deploy-command-JVZPWHMK.js +180 -0
- package/dist/deploy-source-3W45CXMP.js +81 -0
- package/dist/dev-env-sync-HN44K4D5.js +188 -0
- package/dist/diagnostics-UEAAHWVF.js +30 -0
- package/dist/display-name-hint-ABBPVQIR.js +46 -0
- package/dist/emit-CyhBDxli.d.ts +7007 -0
- package/dist/env-example-refresh-ET5HMMDW.js +126 -0
- package/dist/env-pull-command-TNMNB3CV.js +323 -0
- package/dist/env-target-O4HRKTGZ.js +40 -0
- package/dist/env-var-command-ZIRDCAZA.js +427 -0
- package/dist/ephemeral-P7F3PMAD.js +54 -0
- package/dist/ephemeral-command-CLJJKOFT.js +592 -0
- package/dist/ephemeral-state-PYCBSOGX.js +61 -0
- package/dist/file-lock-PT74GWYW.js +10 -0
- package/dist/generate-command-AYEOLA26.js +510 -0
- package/dist/gitignore-3SJ3WNRG.js +51 -0
- package/dist/guards-4EBNCZDC.js +162 -0
- package/dist/hosted-file-PSHJB3HX.js +28 -0
- package/dist/impersonate-command-5JAS3WSV.js +152 -0
- package/dist/import-EQSFU6JC.js +19 -0
- package/dist/index.d.ts +5470 -0
- package/dist/index.js +371 -0
- package/dist/init-command-X2FR4UAK.js +125 -0
- package/dist/init-modules-RY7UHAOL.js +50 -0
- package/dist/init-web-M4YZSZK6.js +42 -0
- package/dist/internal.d.ts +179 -0
- package/dist/internal.js +2634 -0
- package/dist/io-RC56QSN5.js +26 -0
- package/dist/keep-data-merge-7MPLVAVI.js +1119 -0
- package/dist/lambda-config-reconcile-OUZ4OYAB.js +116 -0
- package/dist/landed-753YLJ5H.js +40 -0
- package/dist/landing-record-SU52SKXU.js +61 -0
- package/dist/live-diff-YONW2VI3.js +65 -0
- package/dist/local-engine-choice-CH5X3W7E.js +79 -0
- package/dist/local-engine-command-Z3OL7VOD.js +766 -0
- package/dist/local-engine-config-5U3SC434.js +39 -0
- package/dist/local-engine-deploy-PCQ4SNPB.js +39 -0
- package/dist/local-engine-process-EHTE5LLU.js +63 -0
- package/dist/local-engine-state-A4FTRFAF.js +32 -0
- package/dist/local-engine-update-check-6L645VBL.js +162 -0
- package/dist/lock-MRRHW5GS.js +87 -0
- package/dist/lock-commands-2QG25HL7.js +963 -0
- package/dist/login-command-QPYRWOXZ.js +538 -0
- package/dist/logout-command-WOIQLDP6.js +56 -0
- package/dist/loop-ALIZLOSX.js +191 -0
- package/dist/marketplace-command-K5YL42NO.js +977 -0
- package/dist/marketplace-resolve-LY32JES5.js +40 -0
- package/dist/meta-client-YXGPW53C.js +244 -0
- package/dist/module-manifest-JFGHU2TC.js +38 -0
- package/dist/near-key.d.ts +13 -0
- package/dist/near-key.js +8 -0
- package/dist/node.d.ts +95 -0
- package/dist/node.js +969 -0
- package/dist/operation-outcome-TZSESNC7.js +51 -0
- package/dist/output-target-AL3I44GG.js +47 -0
- package/dist/package-manager-PRAHUSCN.js +34 -0
- package/dist/plan-disclosure-6G4MLZKD.js +114 -0
- package/dist/plugin-contributions-WRNY5ABG.js +28 -0
- package/dist/plugin-prompt-4VA3B4FF.js +20 -0
- package/dist/plugin-questions-JTSYA74Q.js +24 -0
- package/dist/plugin.d.ts +396 -0
- package/dist/plugin.js +1 -0
- package/dist/preflight-command-2T5Z36MI.js +321 -0
- package/dist/profile-command-AH3PIM4X.js +800 -0
- package/dist/profile-pointer-GRWJU3YD.js +31 -0
- package/dist/profile-select-74TRDEPD.js +23 -0
- package/dist/project-dependency-KSH63ODT.js +35 -0
- package/dist/project-sdk-REPPOIBD.js +24 -0
- package/dist/promote-command-PCWT5N6S.js +140 -0
- package/dist/prompt-II3F3LND.js +27 -0
- package/dist/publish-command-TTDUUJI5.js +414 -0
- package/dist/pull-command-VBO7C4S3.js +161 -0
- package/dist/pull-superseded-GJWLG7XO.js +20 -0
- package/dist/release-command-N4ZPKMHR.js +146 -0
- package/dist/release-ns-command-3KFDMZ6G.js +1745 -0
- package/dist/response-HlXahv4K.d.ts +925 -0
- package/dist/retry-command-AS5EVREX.js +34 -0
- package/dist/routes-manifest-SNWUVBT6.js +43 -0
- package/dist/runtime-XETHVF33.js +14 -0
- package/dist/scaffold.d.ts +1911 -0
- package/dist/scaffold.js +107 -0
- package/dist/secrets-file-LVZD6IIM.js +56 -0
- package/dist/secrets-fill-command-TTCPSVXN.js +218 -0
- package/dist/seed-VU7C3QYS.js +46 -0
- package/dist/sent-writes-N7X4OVXT.js +22 -0
- package/dist/source-resolve-S2XA3XZF.js +83 -0
- package/dist/static-host-B2Y6AG3W.js +352 -0
- package/dist/status-command-RUDXTF7I.js +554 -0
- package/dist/store-6VNCD4D7.js +20 -0
- package/dist/store-ARM6VMO5.js +98 -0
- package/dist/store-DuYfzKlW.d.ts +3144 -0
- package/dist/suggest-6FOOYKHG.js +12 -0
- package/dist/sveltekit.d.ts +154 -0
- package/dist/sveltekit.js +109 -0
- package/dist/sync-contributions-UCEROO26.js +415 -0
- package/dist/table-ENAVMITR.js +42 -0
- package/dist/tables-command-GUPXXSB5.js +156 -0
- package/dist/tenant-IIHPOHGP.js +42 -0
- package/dist/tenant-command-D5HGI2X4.js +965 -0
- package/dist/test-command-TIKZMDPZ.js +476 -0
- package/dist/tests-BGGIOK3L.js +26 -0
- package/dist/token-NICJUTMT.js +72 -0
- package/dist/toolchain-hooks-GHKLUJOH.js +96 -0
- package/dist/toolchain-modules-5EAZUONB.js +24 -0
- package/dist/tracked-backend-EIBUMDZA.js +80 -0
- package/dist/update-check-2W2NLDTC.js +136 -0
- package/dist/upgrade-command-QHNFWM7O.js +531 -0
- package/dist/verify-rollout-DRCK5TDD.js +61 -0
- package/dist/whoami-command-STGINTXH.js +51 -0
- package/dist/workspace-2CLHU2LK.js +93 -0
- package/dist/workspace-binding-56PIIPCP.js +54 -0
- package/dist/workspace-command-JEXQETJD.js +535 -0
- package/dist/workspace-env-F2RFMSC5.js +70 -0
- package/dist/workspace-export-OJSH2HIW.js +21 -0
- package/dist/writable-VA7OISSK.js +25 -0
- package/dist/xano-ICFUSPFR.js +42 -0
- package/dist/xanosdk-import-GN42TO2B.js +56 -0
- package/dist/xanosdk-project-S6DXJONQ.js +41 -0
- package/dist/xdo-CxDr2Q1C.d.ts +1371 -0
- package/guides/README.md +33 -0
- package/guides/authoring.md +921 -0
- package/guides/cli.md +401 -0
- package/guides/codegen.md +177 -0
- package/guides/codes.md +404 -0
- package/guides/coverage.md +74 -0
- package/guides/deploying.md +1525 -0
- package/guides/environment.md +400 -0
- package/guides/marketplace.md +415 -0
- package/guides/module-contract.md +558 -0
- package/guides/object-kinds.md +433 -0
- package/guides/project-structure.md +43 -0
- package/guides/scaffold.md +351 -0
- package/guides/typed-frontend.md +242 -0
- package/llms/client.md +63 -0
- package/llms/errors.md +56 -0
- package/llms/fields.md +176 -0
- package/llms/filters.md +183 -0
- package/llms/kinds-agent-mcp.md +30 -0
- package/llms/kinds-core.md +100 -0
- package/llms/kinds-knowledge.md +20 -0
- package/llms/kinds-realtime.md +76 -0
- package/llms/lambda.md +94 -0
- package/llms/legacy.md +44 -0
- package/llms/lock.md +40 -0
- package/llms/object-kinds.md +34 -0
- package/llms/statements-calls.md +62 -0
- package/llms/statements-catalog.md +320 -0
- package/llms/statements-data.md +66 -0
- package/llms/statements-runtime.md +68 -0
- package/llms/tests.md +59 -0
- package/llms/toolchain.md +16 -0
- package/llms/triggers.md +36 -0
- package/llms/values.md +29 -0
- package/llms-full.txt +2085 -0
- package/llms.txt +493 -0
- package/manifest.json +11224 -0
- package/package.json +162 -0
- package/types/lambda-globals.d.ts +129 -0
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
import {
|
|
2
|
+
getLockedGuid
|
|
3
|
+
} from "./chunk-4BW2SG2N.js";
|
|
4
|
+
import {
|
|
5
|
+
describeEntry
|
|
6
|
+
} from "./chunk-CIMQZRRE.js";
|
|
7
|
+
import {
|
|
8
|
+
md5Hex
|
|
9
|
+
} from "./chunk-OHX6MIUZ.js";
|
|
10
|
+
|
|
11
|
+
// src/refs/guid.ts
|
|
12
|
+
var REFERENCEABLE_KIND_PAYLOAD_KEYS = {
|
|
13
|
+
function: "function",
|
|
14
|
+
query: "query",
|
|
15
|
+
tool: "tool",
|
|
16
|
+
// The two other primitives an MCP server exposes. An `mcpServer()`'s
|
|
17
|
+
// `prompts`/`resources` entries resolve them by this guid, exactly as its
|
|
18
|
+
// `tools` entries resolve a tool.
|
|
19
|
+
prompt: "prompt",
|
|
20
|
+
resource: "resource",
|
|
21
|
+
// MCP servers and agents are distinct kinds that both persist as
|
|
22
|
+
// obj_type=toolset — they share the "toolset" migrate type, so both derive
|
|
23
|
+
// md5("toolset:"+name) and a same-name pair correctly collides. A trigger
|
|
24
|
+
// binds either by resolving against this same "toolset" migrate type.
|
|
25
|
+
mcp_server: "toolset",
|
|
26
|
+
agent: "toolset",
|
|
27
|
+
task: "task",
|
|
28
|
+
trigger: "trigger",
|
|
29
|
+
middleware: "middleware",
|
|
30
|
+
addon: "addon",
|
|
31
|
+
table: "dbo",
|
|
32
|
+
api_group: "app",
|
|
33
|
+
// Realtime: `realtime_server` -> `channel` -> `message`. Kind names match the
|
|
34
|
+
// engine's object types (the authoring factories carry the `realtime` prefix
|
|
35
|
+
// instead). Channel and message names are NOT workspace-unique, so their
|
|
36
|
+
// seeds are composed — see {@link realtimeChannelSeedName}.
|
|
37
|
+
realtime_server: "realtime_server",
|
|
38
|
+
channel: "channel",
|
|
39
|
+
message: "message",
|
|
40
|
+
// A container workload. Nothing in a stack resolves it by guid — `s.microservice.request`
|
|
41
|
+
// addresses one by NAME — but it is listed here because it is a top-level
|
|
42
|
+
// guid-tracked object, and the codegen index only places objects it recognises.
|
|
43
|
+
microservice: "microservice",
|
|
44
|
+
// An end-to-end test: a named stack of runs plus `expect` assertions. Kind
|
|
45
|
+
// name and migrate type are the same string, so the mapping is identity.
|
|
46
|
+
// Membership here is load-bearing twice over: `s.workflow_test.call` already
|
|
47
|
+
// resolves its target through this map, and `Xano#encodeOne` stamps a guid
|
|
48
|
+
// only for kinds in `REFERENCEABLE_KINDS` — and the engine REFUSES to export a
|
|
49
|
+
// workflow test that has none ("Missing workflow test guid."), a failure that
|
|
50
|
+
// surfaces only against a live instance.
|
|
51
|
+
workflow_test: "workflow_test",
|
|
52
|
+
// Knowledge is listed here for IDENTITY, not for referencing — nothing in a
|
|
53
|
+
// stack resolves a knowledge item. Membership is what stamps its guid in
|
|
54
|
+
// `Xano#encodeOne` and what makes `knowledge:<name>` a valid lock key, and
|
|
55
|
+
// BOTH are load-bearing: the engine re-mints guids on every replace import
|
|
56
|
+
// while a merge import upserts BY guid, so without a locked identity the
|
|
57
|
+
// second promote inserts `<name>_01` beside the item it should have
|
|
58
|
+
// updated. Measured, not theorised.
|
|
59
|
+
knowledge: "knowledge"
|
|
60
|
+
};
|
|
61
|
+
var REFERENCEABLE_KINDS = new Set(Object.keys(REFERENCEABLE_KIND_PAYLOAD_KEYS));
|
|
62
|
+
var SEED_SEP = "|";
|
|
63
|
+
function seedPart(kind, label, value) {
|
|
64
|
+
if (!value) {
|
|
65
|
+
throw new Error(`realtime ${kind} identity: \`${label}\` is required to derive a stable guid.`);
|
|
66
|
+
}
|
|
67
|
+
if (value.includes(SEED_SEP)) {
|
|
68
|
+
throw new Error(
|
|
69
|
+
`realtime ${kind} identity: \`${label}\` must not contain "${SEED_SEP}" (got "${value}") \u2014 it separates the components of the guid seed, so a name carrying it could collide with a different object.`
|
|
70
|
+
);
|
|
71
|
+
}
|
|
72
|
+
return value;
|
|
73
|
+
}
|
|
74
|
+
function realtimeChannelSeedName(server, path) {
|
|
75
|
+
return [seedPart("channel", "server", server), seedPart("channel", "path", path)].join(SEED_SEP);
|
|
76
|
+
}
|
|
77
|
+
function realtimeMessageSeedName(server, channelPath, name) {
|
|
78
|
+
return [
|
|
79
|
+
seedPart("message", "server", server),
|
|
80
|
+
seedPart("message", "channel", channelPath),
|
|
81
|
+
seedPart("message", "name", name)
|
|
82
|
+
].join(SEED_SEP);
|
|
83
|
+
}
|
|
84
|
+
function querySeedName(group, verb, name) {
|
|
85
|
+
return [
|
|
86
|
+
group === "" ? "" : seedPart("query", "apiGroup", group),
|
|
87
|
+
seedPart("query", "verb", verb),
|
|
88
|
+
seedPart("query", "name", name)
|
|
89
|
+
].join(SEED_SEP);
|
|
90
|
+
}
|
|
91
|
+
function deriveQueryGuid(group, verb, name) {
|
|
92
|
+
const seed = `query:${querySeedName(group, verb, name)}`;
|
|
93
|
+
const guid = getLockedGuid(seed) ?? getLockedGuid(`query:${name}`) ?? rawDeriveGuid(seed);
|
|
94
|
+
SEEN_SEEDS.set(guid, seed);
|
|
95
|
+
return guid;
|
|
96
|
+
}
|
|
97
|
+
function queryGroupComponent(ref) {
|
|
98
|
+
if (ref.apiGroupId !== void 0) return `#${ref.apiGroupId}`;
|
|
99
|
+
const group = ref.apiGroup;
|
|
100
|
+
if (group === void 0) return "";
|
|
101
|
+
return typeof group === "string" ? group : group.name;
|
|
102
|
+
}
|
|
103
|
+
function resolveQueryRef(target, where) {
|
|
104
|
+
const t = target;
|
|
105
|
+
const named = typeof t === "string" || typeof t === "object" && t !== null && !Array.isArray(t) && (typeof t.name === "string" || typeof t.guid === "string");
|
|
106
|
+
if (!named) {
|
|
107
|
+
throw new Error(
|
|
108
|
+
`${where ?? "Cannot resolve query reference"}${where ? " must be" : ": pass"} the query() def handle, or a { name, guid } pair for an object addressed by explicit identity \u2014 got ${describeEntry(t)}.`
|
|
109
|
+
);
|
|
110
|
+
}
|
|
111
|
+
if (typeof target !== "string" && target.guid) {
|
|
112
|
+
if (target.name) SEEN_SEEDS.set(target.guid, `query:${target.name}`);
|
|
113
|
+
return target.guid;
|
|
114
|
+
}
|
|
115
|
+
const handle = typeof target === "string" ? void 0 : target;
|
|
116
|
+
if (handle?.verb !== void 0 && handle.name) {
|
|
117
|
+
return deriveQueryGuid(queryGroupComponent(handle), handle.verb, handle.name);
|
|
118
|
+
}
|
|
119
|
+
const label = typeof target === "string" ? `"${target}"` : `"${handle?.name ?? "?"}"`;
|
|
120
|
+
throw new Error(
|
|
121
|
+
`${where ? `${where}: cannot resolve` : "Cannot resolve"} query reference ${label}: a query's identity is composed from its api group, verb, and name, so a bare name cannot identify one. Pass the query() def handle (it carries all three), or a { name, guid } pair to address an object by explicit identity.`
|
|
122
|
+
);
|
|
123
|
+
}
|
|
124
|
+
function rawDeriveGuid(seed) {
|
|
125
|
+
return md5Hex(seed);
|
|
126
|
+
}
|
|
127
|
+
function deriveGuid(type, name) {
|
|
128
|
+
const seed = `${type}:${name}`;
|
|
129
|
+
const guid = getLockedGuid(seed) ?? rawDeriveGuid(seed);
|
|
130
|
+
SEEN_SEEDS.set(guid, seed);
|
|
131
|
+
return guid;
|
|
132
|
+
}
|
|
133
|
+
var SEEN_SEEDS = /* @__PURE__ */ new Map();
|
|
134
|
+
function guidSeedHint(guid) {
|
|
135
|
+
return SEEN_SEEDS.get(guid);
|
|
136
|
+
}
|
|
137
|
+
var BARE_NAME_GUIDS = /* @__PURE__ */ new Set();
|
|
138
|
+
var HANDLE_GUIDS = /* @__PURE__ */ new Set();
|
|
139
|
+
function refSpelling(guid) {
|
|
140
|
+
if (BARE_NAME_GUIDS.has(guid)) return "name";
|
|
141
|
+
if (HANDLE_GUIDS.has(guid)) return "handle";
|
|
142
|
+
return void 0;
|
|
143
|
+
}
|
|
144
|
+
function noteHandleRef(guid) {
|
|
145
|
+
HANDLE_GUIDS.add(guid);
|
|
146
|
+
}
|
|
147
|
+
var REF_KIND = {
|
|
148
|
+
dbo: "table",
|
|
149
|
+
query: "API endpoint",
|
|
150
|
+
function: "function",
|
|
151
|
+
addon: "addon",
|
|
152
|
+
task: "task",
|
|
153
|
+
tool: "tool",
|
|
154
|
+
prompt: "prompt",
|
|
155
|
+
resource: "resource",
|
|
156
|
+
trigger: "trigger",
|
|
157
|
+
middleware: "middleware",
|
|
158
|
+
workflow_test: "workflowTest"
|
|
159
|
+
};
|
|
160
|
+
function resolveRef(type, target, where, kindLabel) {
|
|
161
|
+
const t = target;
|
|
162
|
+
if (typeof t === "object" && t !== null && typeof t.guid === "string" && t.guid) {
|
|
163
|
+
const handle = t;
|
|
164
|
+
if (handle.name) SEEN_SEEDS.set(handle.guid, `${type}:${handle.name}`);
|
|
165
|
+
HANDLE_GUIDS.add(handle.guid);
|
|
166
|
+
return handle.guid;
|
|
167
|
+
}
|
|
168
|
+
const name = typeof t === "string" ? t : typeof t === "object" && t !== null ? t.name : void 0;
|
|
169
|
+
if (typeof name === "string" && name !== "") {
|
|
170
|
+
const guid = deriveGuid(type, name);
|
|
171
|
+
(typeof t === "string" ? BARE_NAME_GUIDS : HANDLE_GUIDS).add(guid);
|
|
172
|
+
return guid;
|
|
173
|
+
}
|
|
174
|
+
const kind = kindLabel ?? REF_KIND[type] ?? type;
|
|
175
|
+
const got = t === null ? "null" : Array.isArray(t) ? `an array (${t.length} item${t.length === 1 ? "" : "s"})` : typeof t === "object" ? "an object with neither a name nor a guid" : typeof t === "string" ? "an empty name" : `${typeof t} ${String(t)}`;
|
|
176
|
+
throw new Error(
|
|
177
|
+
`${where === void 0 ? "Cannot resolve a" : `${where}: cannot resolve the`} ${kind} reference \u2014 pass the ${kind}'s def handle or its name; got ${got}.`
|
|
178
|
+
);
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
export {
|
|
182
|
+
REFERENCEABLE_KIND_PAYLOAD_KEYS,
|
|
183
|
+
REFERENCEABLE_KINDS,
|
|
184
|
+
realtimeChannelSeedName,
|
|
185
|
+
realtimeMessageSeedName,
|
|
186
|
+
deriveQueryGuid,
|
|
187
|
+
queryGroupComponent,
|
|
188
|
+
resolveQueryRef,
|
|
189
|
+
rawDeriveGuid,
|
|
190
|
+
deriveGuid,
|
|
191
|
+
guidSeedHint,
|
|
192
|
+
refSpelling,
|
|
193
|
+
noteHandleRef,
|
|
194
|
+
resolveRef
|
|
195
|
+
};
|
|
196
|
+
//# sourceMappingURL=chunk-NZOWWHU5.js.map
|
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
// src/util/hash.ts
|
|
2
|
+
var utf8 = new TextEncoder();
|
|
3
|
+
function toBytes(input) {
|
|
4
|
+
return typeof input === "string" ? utf8.encode(input) : input;
|
|
5
|
+
}
|
|
6
|
+
function md5Bytes(input) {
|
|
7
|
+
const msg = toBytes(input);
|
|
8
|
+
const len = msg.length;
|
|
9
|
+
const withPad = (len + 8 >>> 6) + 1;
|
|
10
|
+
const words = new Int32Array(withPad * 16);
|
|
11
|
+
for (let i = 0; i < len; i++) {
|
|
12
|
+
const idx = i >> 2;
|
|
13
|
+
words[idx] = words[idx] | msg[i] << i % 4 * 8;
|
|
14
|
+
}
|
|
15
|
+
const padIdx = len >> 2;
|
|
16
|
+
words[padIdx] = words[padIdx] | 128 << len % 4 * 8;
|
|
17
|
+
words[words.length - 2] = len * 8;
|
|
18
|
+
let a = 1732584193, b = -271733879, c = -1732584194, d = 271733878;
|
|
19
|
+
const add = (x, y) => x + y | 0;
|
|
20
|
+
const rol = (n, s) => n << s | n >>> 32 - s;
|
|
21
|
+
const cmn = (q, a0, b0, x, s, t) => add(rol(add(add(a0, q), add(x, t)), s), b0);
|
|
22
|
+
const ff = (a0, b0, c0, d0, x, s, t) => cmn(b0 & c0 | ~b0 & d0, a0, b0, x, s, t);
|
|
23
|
+
const gg = (a0, b0, c0, d0, x, s, t) => cmn(b0 & d0 | c0 & ~d0, a0, b0, x, s, t);
|
|
24
|
+
const hh = (a0, b0, c0, d0, x, s, t) => cmn(b0 ^ c0 ^ d0, a0, b0, x, s, t);
|
|
25
|
+
const ii = (a0, b0, c0, d0, x, s, t) => cmn(c0 ^ (b0 | ~d0), a0, b0, x, s, t);
|
|
26
|
+
for (let i = 0; i < words.length; i += 16) {
|
|
27
|
+
const oa = a, ob = b, oc = c, od = d;
|
|
28
|
+
const w = (j) => words[i + j];
|
|
29
|
+
a = ff(a, b, c, d, w(0), 7, -680876936);
|
|
30
|
+
d = ff(d, a, b, c, w(1), 12, -389564586);
|
|
31
|
+
c = ff(c, d, a, b, w(2), 17, 606105819);
|
|
32
|
+
b = ff(b, c, d, a, w(3), 22, -1044525330);
|
|
33
|
+
a = ff(a, b, c, d, w(4), 7, -176418897);
|
|
34
|
+
d = ff(d, a, b, c, w(5), 12, 1200080426);
|
|
35
|
+
c = ff(c, d, a, b, w(6), 17, -1473231341);
|
|
36
|
+
b = ff(b, c, d, a, w(7), 22, -45705983);
|
|
37
|
+
a = ff(a, b, c, d, w(8), 7, 1770035416);
|
|
38
|
+
d = ff(d, a, b, c, w(9), 12, -1958414417);
|
|
39
|
+
c = ff(c, d, a, b, w(10), 17, -42063);
|
|
40
|
+
b = ff(b, c, d, a, w(11), 22, -1990404162);
|
|
41
|
+
a = ff(a, b, c, d, w(12), 7, 1804603682);
|
|
42
|
+
d = ff(d, a, b, c, w(13), 12, -40341101);
|
|
43
|
+
c = ff(c, d, a, b, w(14), 17, -1502002290);
|
|
44
|
+
b = ff(b, c, d, a, w(15), 22, 1236535329);
|
|
45
|
+
a = gg(a, b, c, d, w(1), 5, -165796510);
|
|
46
|
+
d = gg(d, a, b, c, w(6), 9, -1069501632);
|
|
47
|
+
c = gg(c, d, a, b, w(11), 14, 643717713);
|
|
48
|
+
b = gg(b, c, d, a, w(0), 20, -373897302);
|
|
49
|
+
a = gg(a, b, c, d, w(5), 5, -701558691);
|
|
50
|
+
d = gg(d, a, b, c, w(10), 9, 38016083);
|
|
51
|
+
c = gg(c, d, a, b, w(15), 14, -660478335);
|
|
52
|
+
b = gg(b, c, d, a, w(4), 20, -405537848);
|
|
53
|
+
a = gg(a, b, c, d, w(9), 5, 568446438);
|
|
54
|
+
d = gg(d, a, b, c, w(14), 9, -1019803690);
|
|
55
|
+
c = gg(c, d, a, b, w(3), 14, -187363961);
|
|
56
|
+
b = gg(b, c, d, a, w(8), 20, 1163531501);
|
|
57
|
+
a = gg(a, b, c, d, w(13), 5, -1444681467);
|
|
58
|
+
d = gg(d, a, b, c, w(2), 9, -51403784);
|
|
59
|
+
c = gg(c, d, a, b, w(7), 14, 1735328473);
|
|
60
|
+
b = gg(b, c, d, a, w(12), 20, -1926607734);
|
|
61
|
+
a = hh(a, b, c, d, w(5), 4, -378558);
|
|
62
|
+
d = hh(d, a, b, c, w(8), 11, -2022574463);
|
|
63
|
+
c = hh(c, d, a, b, w(11), 16, 1839030562);
|
|
64
|
+
b = hh(b, c, d, a, w(14), 23, -35309556);
|
|
65
|
+
a = hh(a, b, c, d, w(1), 4, -1530992060);
|
|
66
|
+
d = hh(d, a, b, c, w(4), 11, 1272893353);
|
|
67
|
+
c = hh(c, d, a, b, w(7), 16, -155497632);
|
|
68
|
+
b = hh(b, c, d, a, w(10), 23, -1094730640);
|
|
69
|
+
a = hh(a, b, c, d, w(13), 4, 681279174);
|
|
70
|
+
d = hh(d, a, b, c, w(0), 11, -358537222);
|
|
71
|
+
c = hh(c, d, a, b, w(3), 16, -722521979);
|
|
72
|
+
b = hh(b, c, d, a, w(6), 23, 76029189);
|
|
73
|
+
a = hh(a, b, c, d, w(9), 4, -640364487);
|
|
74
|
+
d = hh(d, a, b, c, w(12), 11, -421815835);
|
|
75
|
+
c = hh(c, d, a, b, w(15), 16, 530742520);
|
|
76
|
+
b = hh(b, c, d, a, w(2), 23, -995338651);
|
|
77
|
+
a = ii(a, b, c, d, w(0), 6, -198630844);
|
|
78
|
+
d = ii(d, a, b, c, w(7), 10, 1126891415);
|
|
79
|
+
c = ii(c, d, a, b, w(14), 15, -1416354905);
|
|
80
|
+
b = ii(b, c, d, a, w(5), 21, -57434055);
|
|
81
|
+
a = ii(a, b, c, d, w(12), 6, 1700485571);
|
|
82
|
+
d = ii(d, a, b, c, w(3), 10, -1894986606);
|
|
83
|
+
c = ii(c, d, a, b, w(10), 15, -1051523);
|
|
84
|
+
b = ii(b, c, d, a, w(1), 21, -2054922799);
|
|
85
|
+
a = ii(a, b, c, d, w(8), 6, 1873313359);
|
|
86
|
+
d = ii(d, a, b, c, w(15), 10, -30611744);
|
|
87
|
+
c = ii(c, d, a, b, w(6), 15, -1560198380);
|
|
88
|
+
b = ii(b, c, d, a, w(13), 21, 1309151649);
|
|
89
|
+
a = ii(a, b, c, d, w(4), 6, -145523070);
|
|
90
|
+
d = ii(d, a, b, c, w(11), 10, -1120210379);
|
|
91
|
+
c = ii(c, d, a, b, w(2), 15, 718787259);
|
|
92
|
+
b = ii(b, c, d, a, w(9), 21, -343485551);
|
|
93
|
+
a = add(a, oa);
|
|
94
|
+
b = add(b, ob);
|
|
95
|
+
c = add(c, oc);
|
|
96
|
+
d = add(d, od);
|
|
97
|
+
}
|
|
98
|
+
const out = new Uint8Array(16);
|
|
99
|
+
[a, b, c, d].forEach((word, wi) => {
|
|
100
|
+
for (let j = 0; j < 4; j++) out[wi * 4 + j] = word >>> j * 8 & 255;
|
|
101
|
+
});
|
|
102
|
+
return out;
|
|
103
|
+
}
|
|
104
|
+
function md5Hex(input) {
|
|
105
|
+
return toHex(md5Bytes(input));
|
|
106
|
+
}
|
|
107
|
+
function sha1Bytes(input) {
|
|
108
|
+
const msg = toBytes(input);
|
|
109
|
+
const len = msg.length;
|
|
110
|
+
const withLen = len + 9;
|
|
111
|
+
const blocks = Math.ceil(withLen / 64);
|
|
112
|
+
const total = blocks * 64;
|
|
113
|
+
const buf = new Uint8Array(total);
|
|
114
|
+
buf.set(msg);
|
|
115
|
+
buf[len] = 128;
|
|
116
|
+
const bitLen = len * 8;
|
|
117
|
+
buf[total - 4] = bitLen >>> 24 & 255;
|
|
118
|
+
buf[total - 3] = bitLen >>> 16 & 255;
|
|
119
|
+
buf[total - 2] = bitLen >>> 8 & 255;
|
|
120
|
+
buf[total - 1] = bitLen & 255;
|
|
121
|
+
let h0 = 1732584193, h1 = -271733879, h2 = -1732584194, h3 = 271733878, h4 = -1009589776;
|
|
122
|
+
const w = new Int32Array(80);
|
|
123
|
+
const rol = (n, s) => n << s | n >>> 32 - s;
|
|
124
|
+
for (let i = 0; i < total; i += 64) {
|
|
125
|
+
for (let j = 0; j < 16; j++) {
|
|
126
|
+
const k = i + j * 4;
|
|
127
|
+
w[j] = buf[k] << 24 | buf[k + 1] << 16 | buf[k + 2] << 8 | buf[k + 3];
|
|
128
|
+
}
|
|
129
|
+
for (let j = 16; j < 80; j++) w[j] = rol(w[j - 3] ^ w[j - 8] ^ w[j - 14] ^ w[j - 16], 1);
|
|
130
|
+
let a = h0, b = h1, c = h2, d = h3, e = h4;
|
|
131
|
+
for (let j = 0; j < 80; j++) {
|
|
132
|
+
let f, k;
|
|
133
|
+
if (j < 20) {
|
|
134
|
+
f = b & c | ~b & d;
|
|
135
|
+
k = 1518500249;
|
|
136
|
+
} else if (j < 40) {
|
|
137
|
+
f = b ^ c ^ d;
|
|
138
|
+
k = 1859775393;
|
|
139
|
+
} else if (j < 60) {
|
|
140
|
+
f = b & c | b & d | c & d;
|
|
141
|
+
k = -1894007588;
|
|
142
|
+
} else {
|
|
143
|
+
f = b ^ c ^ d;
|
|
144
|
+
k = -899497514;
|
|
145
|
+
}
|
|
146
|
+
const t = rol(a, 5) + f + e + k + w[j] | 0;
|
|
147
|
+
e = d;
|
|
148
|
+
d = c;
|
|
149
|
+
c = rol(b, 30);
|
|
150
|
+
b = a;
|
|
151
|
+
a = t;
|
|
152
|
+
}
|
|
153
|
+
h0 = h0 + a | 0;
|
|
154
|
+
h1 = h1 + b | 0;
|
|
155
|
+
h2 = h2 + c | 0;
|
|
156
|
+
h3 = h3 + d | 0;
|
|
157
|
+
h4 = h4 + e | 0;
|
|
158
|
+
}
|
|
159
|
+
const out = new Uint8Array(20);
|
|
160
|
+
[h0, h1, h2, h3, h4].forEach((h, hi) => {
|
|
161
|
+
out[hi * 4] = h >>> 24 & 255;
|
|
162
|
+
out[hi * 4 + 1] = h >>> 16 & 255;
|
|
163
|
+
out[hi * 4 + 2] = h >>> 8 & 255;
|
|
164
|
+
out[hi * 4 + 3] = h & 255;
|
|
165
|
+
});
|
|
166
|
+
return out;
|
|
167
|
+
}
|
|
168
|
+
function toHex(bytes) {
|
|
169
|
+
let s = "";
|
|
170
|
+
for (const b of bytes) s += b.toString(16).padStart(2, "0");
|
|
171
|
+
return s;
|
|
172
|
+
}
|
|
173
|
+
function randomBytes(n) {
|
|
174
|
+
const out = new Uint8Array(n);
|
|
175
|
+
globalThis.crypto.getRandomValues(out);
|
|
176
|
+
return out;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
export {
|
|
180
|
+
md5Hex,
|
|
181
|
+
sha1Bytes,
|
|
182
|
+
randomBytes
|
|
183
|
+
};
|
|
184
|
+
//# sourceMappingURL=chunk-OHX6MIUZ.js.map
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
// src/deploy/server-bundle.ts
|
|
2
|
+
var SERVER_DIR = ".xano-ssr";
|
|
3
|
+
var SERVER_BUNDLE = `${SERVER_DIR}/server.js`;
|
|
4
|
+
var SERVER_ENV = `${SERVER_DIR}/env.json`;
|
|
5
|
+
function isServerPath(path) {
|
|
6
|
+
return path === SERVER_DIR || path.startsWith(`${SERVER_DIR}/`);
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export {
|
|
10
|
+
SERVER_DIR,
|
|
11
|
+
SERVER_BUNDLE,
|
|
12
|
+
SERVER_ENV,
|
|
13
|
+
isServerPath
|
|
14
|
+
};
|
|
15
|
+
//# sourceMappingURL=chunk-OOXWYAA4.js.map
|