@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,476 @@
|
|
|
1
|
+
import {
|
|
2
|
+
listTests,
|
|
3
|
+
objectQualifiedName,
|
|
4
|
+
qualifiedName,
|
|
5
|
+
runTest
|
|
6
|
+
} from "./chunk-73IVBKMA.js";
|
|
7
|
+
import {
|
|
8
|
+
memoCredential,
|
|
9
|
+
resolveBackend
|
|
10
|
+
} from "./chunk-HHN734BU.js";
|
|
11
|
+
import "./chunk-LPECSJ2J.js";
|
|
12
|
+
import "./chunk-6NNTNXN7.js";
|
|
13
|
+
import {
|
|
14
|
+
actualKind,
|
|
15
|
+
describeBackend,
|
|
16
|
+
isRateLimited,
|
|
17
|
+
rateLimitedCause
|
|
18
|
+
} from "./chunk-QCNYHBL7.js";
|
|
19
|
+
import "./chunk-2ZUEE4EK.js";
|
|
20
|
+
import "./chunk-AN6BL47T.js";
|
|
21
|
+
import {
|
|
22
|
+
getAccessToken
|
|
23
|
+
} from "./chunk-ET4Y4XCB.js";
|
|
24
|
+
import "./chunk-SWBF2LTK.js";
|
|
25
|
+
import "./chunk-UZ6QQWJT.js";
|
|
26
|
+
import "./chunk-A3UDOZB6.js";
|
|
27
|
+
import "./chunk-2MNLRIOX.js";
|
|
28
|
+
import "./chunk-3M4LFYNQ.js";
|
|
29
|
+
import "./chunk-AM4FKL4J.js";
|
|
30
|
+
import {
|
|
31
|
+
requireBackendSlot
|
|
32
|
+
} from "./chunk-STSFNCY4.js";
|
|
33
|
+
import "./chunk-5QU2P5CA.js";
|
|
34
|
+
import "./chunk-ZYJP6BOO.js";
|
|
35
|
+
import "./chunk-QO6BVGS5.js";
|
|
36
|
+
import "./chunk-JZGVVJSI.js";
|
|
37
|
+
import "./chunk-7G3CTU7I.js";
|
|
38
|
+
import "./chunk-6PBR37LN.js";
|
|
39
|
+
import "./chunk-T5KELPAR.js";
|
|
40
|
+
import "./chunk-622HUCZT.js";
|
|
41
|
+
import {
|
|
42
|
+
contextFlags
|
|
43
|
+
} from "./chunk-NAQDMEHV.js";
|
|
44
|
+
import "./chunk-5A2PLKZB.js";
|
|
45
|
+
import "./chunk-AHJWCYQO.js";
|
|
46
|
+
import "./chunk-DX4QR4B2.js";
|
|
47
|
+
import "./chunk-6QXLMMT3.js";
|
|
48
|
+
import "./chunk-ZFDZKNGG.js";
|
|
49
|
+
import "./chunk-FWD7AL6N.js";
|
|
50
|
+
import "./chunk-2GNFDZA2.js";
|
|
51
|
+
import "./chunk-JTUKLCXS.js";
|
|
52
|
+
import "./chunk-4KHEMC32.js";
|
|
53
|
+
import "./chunk-ROY4YAEQ.js";
|
|
54
|
+
import "./chunk-TLQE7ZN3.js";
|
|
55
|
+
import "./chunk-WRBKLYSJ.js";
|
|
56
|
+
import "./chunk-3LDULPRE.js";
|
|
57
|
+
import "./chunk-XW6KISBB.js";
|
|
58
|
+
import "./chunk-AWQ7BQTQ.js";
|
|
59
|
+
import "./chunk-EUUUMY7J.js";
|
|
60
|
+
import {
|
|
61
|
+
TransportError,
|
|
62
|
+
lastRateLimitRetryAfter
|
|
63
|
+
} from "./chunk-YLDALTWZ.js";
|
|
64
|
+
import "./chunk-5FBYXK5P.js";
|
|
65
|
+
import "./chunk-LLNZGEFK.js";
|
|
66
|
+
import "./chunk-QXTKSOFI.js";
|
|
67
|
+
import "./chunk-X2NL4KUO.js";
|
|
68
|
+
import "./chunk-UCQ2VUTG.js";
|
|
69
|
+
import "./chunk-DGWHAVRG.js";
|
|
70
|
+
import {
|
|
71
|
+
UsageError,
|
|
72
|
+
blank,
|
|
73
|
+
detail,
|
|
74
|
+
isMachineOutput,
|
|
75
|
+
stderrStyle,
|
|
76
|
+
step,
|
|
77
|
+
success,
|
|
78
|
+
terminalText,
|
|
79
|
+
unknownSubcommand,
|
|
80
|
+
warn,
|
|
81
|
+
writeJson
|
|
82
|
+
} from "./chunk-PTHVMXZI.js";
|
|
83
|
+
import "./chunk-UTI5G6OJ.js";
|
|
84
|
+
import "./chunk-2EZ3ZJZZ.js";
|
|
85
|
+
import "./chunk-6MR5TI5V.js";
|
|
86
|
+
import {
|
|
87
|
+
shellQuote
|
|
88
|
+
} from "./chunk-5ZSO4T2G.js";
|
|
89
|
+
import "./chunk-XNCP4KYO.js";
|
|
90
|
+
import "./chunk-TFFGOFVZ.js";
|
|
91
|
+
import "./chunk-NZOWWHU5.js";
|
|
92
|
+
import "./chunk-4BW2SG2N.js";
|
|
93
|
+
import "./chunk-CIMQZRRE.js";
|
|
94
|
+
import "./chunk-OHX6MIUZ.js";
|
|
95
|
+
import "./chunk-36JUQZVQ.js";
|
|
96
|
+
import "./chunk-PZ5AY32C.js";
|
|
97
|
+
|
|
98
|
+
// src/emit/test-command.ts
|
|
99
|
+
var EXIT_TESTS_FAILED = 5;
|
|
100
|
+
async function mapWithConcurrency(items, limit, work) {
|
|
101
|
+
const results = new Array(items.length);
|
|
102
|
+
let next = 0;
|
|
103
|
+
const worker = async () => {
|
|
104
|
+
for (; ; ) {
|
|
105
|
+
const index = next++;
|
|
106
|
+
if (index >= items.length) return;
|
|
107
|
+
results[index] = await work(items[index], index);
|
|
108
|
+
}
|
|
109
|
+
};
|
|
110
|
+
await Promise.all(Array.from({ length: Math.min(Math.max(1, limit), items.length) }, worker));
|
|
111
|
+
return results;
|
|
112
|
+
}
|
|
113
|
+
function sameBackend(args) {
|
|
114
|
+
const on = args.on ? ` --on ${shellQuote(args.on)}` : "";
|
|
115
|
+
return args.on !== void 0 && /^local-engine\b/.test(args.on) ? on : `${on}${contextFlags(args)}`;
|
|
116
|
+
}
|
|
117
|
+
function describe(handle) {
|
|
118
|
+
const object = handle.object;
|
|
119
|
+
if (object === void 0) return "[workflow]";
|
|
120
|
+
return object.verb === void 0 ? `[unit: ${object.type} ${object.name}]` : `[unit: ${object.type} ${object.verb} ${object.name}${object.group === void 0 ? "" : ` in ${object.group}`}]`;
|
|
121
|
+
}
|
|
122
|
+
function renderOutcome(outcome, width) {
|
|
123
|
+
const s = stderrStyle();
|
|
124
|
+
const verdict = outcome.status === "pass" ? s.green("PASS") : s.red("FAIL");
|
|
125
|
+
const timing = outcome.timing === void 0 ? "" : s.dim(` ${outcome.timing.toFixed(3)}s`);
|
|
126
|
+
process.stderr.write(terminalText(` ${verdict} ${outcome.name.padEnd(width)} ${s.dim(describe(outcome))}${timing}
|
|
127
|
+
`));
|
|
128
|
+
if (outcome.status !== "fail") return;
|
|
129
|
+
const failures = (outcome.expectations ?? []).filter((e) => e.status === "fail" && e.message !== void 0);
|
|
130
|
+
if (failures.length > 1) {
|
|
131
|
+
const total = outcome.expectations.length;
|
|
132
|
+
for (const e of failures) process.stderr.write(terminalText(` ${s.dim(`expectation ${e.index + 1} of ${total}: ${e.message}`)}
|
|
133
|
+
`));
|
|
134
|
+
} else if (outcome.message !== void 0) {
|
|
135
|
+
process.stderr.write(terminalText(` ${s.dim(outcome.message)}
|
|
136
|
+
`));
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
function summarize(ran, outcomes, unreachable = []) {
|
|
140
|
+
return {
|
|
141
|
+
kind: ran.kind,
|
|
142
|
+
env: ran.env,
|
|
143
|
+
name: ran.name,
|
|
144
|
+
display: ran.display,
|
|
145
|
+
...suiteCounts(outcomes, unreachable),
|
|
146
|
+
tests: outcomes.map(testRow)
|
|
147
|
+
};
|
|
148
|
+
}
|
|
149
|
+
function testRow(o) {
|
|
150
|
+
return {
|
|
151
|
+
kind: o.kind,
|
|
152
|
+
name: o.name,
|
|
153
|
+
// The same key `test list` carries, so a name read from a run feeds `test run`.
|
|
154
|
+
qualified: qualifiedName(o),
|
|
155
|
+
object: o.object,
|
|
156
|
+
status: o.status,
|
|
157
|
+
message: o.message,
|
|
158
|
+
expectations: o.expectations,
|
|
159
|
+
timing: o.timing
|
|
160
|
+
};
|
|
161
|
+
}
|
|
162
|
+
function suiteCounts(outcomes, unreachable = []) {
|
|
163
|
+
const passed = outcomes.filter((o) => o.status === "pass").length;
|
|
164
|
+
const failed = outcomes.length - passed;
|
|
165
|
+
return {
|
|
166
|
+
total: outcomes.length + unreachable.length,
|
|
167
|
+
passed,
|
|
168
|
+
failed,
|
|
169
|
+
notRun: unreachable.length,
|
|
170
|
+
...unreachable.length > 0 ? { unreachable: [...unreachable] } : {}
|
|
171
|
+
};
|
|
172
|
+
}
|
|
173
|
+
function report(args, ran, outcomes, empty = "No tests found.") {
|
|
174
|
+
const summary = summarize(ran, outcomes);
|
|
175
|
+
if (isMachineOutput(args)) writeJson(summary);
|
|
176
|
+
if (outcomes.length === 0) {
|
|
177
|
+
detail(empty);
|
|
178
|
+
} else {
|
|
179
|
+
blank();
|
|
180
|
+
printTally(summary.passed, summary.failed);
|
|
181
|
+
}
|
|
182
|
+
if (summary.failed > 0) process.exitCode = EXIT_TESTS_FAILED;
|
|
183
|
+
}
|
|
184
|
+
function printTally(passed, failed, notRun = 0) {
|
|
185
|
+
const line = `${passed} passed, ${failed} failed${notRun > 0 ? `, ${notRun} not run` : ""}`;
|
|
186
|
+
if (failed > 0) process.stderr.write(terminalText(` ${stderrStyle().red(line)}
|
|
187
|
+
`));
|
|
188
|
+
else if (notRun > 0) process.stderr.write(terminalText(` ${line}
|
|
189
|
+
`));
|
|
190
|
+
else success(line);
|
|
191
|
+
}
|
|
192
|
+
async function resolveOn(args, subcommand) {
|
|
193
|
+
const slot = requireBackendSlot("test", subcommand, "on");
|
|
194
|
+
const resolved = await resolveBackend(slot, args.on, {
|
|
195
|
+
credential: memoCredential(() => getAccessToken(args)),
|
|
196
|
+
profile: args.profile
|
|
197
|
+
});
|
|
198
|
+
return {
|
|
199
|
+
ran: {
|
|
200
|
+
// The target's ACTUAL kind: `--on tenant:<name>` can name an ephemeral.
|
|
201
|
+
kind: actualKind(resolved),
|
|
202
|
+
// The resolver reports the env name as its own field; `label` is
|
|
203
|
+
// human-facing prose and is not a machine value to parse back out of.
|
|
204
|
+
env: resolved.target.env ?? null,
|
|
205
|
+
// The backend's own name whatever its kind, and its display name — the
|
|
206
|
+
// same pair `tables --json` reports, so the two documents agree.
|
|
207
|
+
name: resolved.backend.kind === "local" ? resolved.backend.engine.name : resolved.target.env ?? null,
|
|
208
|
+
display: resolved.target.display ?? null
|
|
209
|
+
},
|
|
210
|
+
bearer: resolved.bearer,
|
|
211
|
+
// The human lines name the backend with its kind and display name — an
|
|
212
|
+
// ephemeral's bare server name is a handle nobody recognises.
|
|
213
|
+
target: { ...resolved.target, label: describeBackend(resolved) }
|
|
214
|
+
};
|
|
215
|
+
}
|
|
216
|
+
async function collect(auth, target, kind) {
|
|
217
|
+
return listTests(auth, target, {
|
|
218
|
+
kind,
|
|
219
|
+
onTruncate: (collected) => warn(`Stopped after ${collected} tests \u2014 the list did not terminate, so some may not have run.`, "test.list-truncated")
|
|
220
|
+
});
|
|
221
|
+
}
|
|
222
|
+
function nameWidth(handles) {
|
|
223
|
+
return Math.max(0, ...handles.map((h) => h.name.length));
|
|
224
|
+
}
|
|
225
|
+
async function runList(args) {
|
|
226
|
+
const { ran, bearer, target } = await resolveOn(args, "list");
|
|
227
|
+
const handles = await collect(bearer, target, args.kind).catch(async (err) => {
|
|
228
|
+
const { unansweredRead } = await import("./source-resolve-S2XA3XZF.js");
|
|
229
|
+
throw unansweredRead(err, `list the tests on ${target.label}`, ran.kind);
|
|
230
|
+
});
|
|
231
|
+
if (isMachineOutput(args)) {
|
|
232
|
+
writeJson({
|
|
233
|
+
kind: ran.kind,
|
|
234
|
+
env: ran.env,
|
|
235
|
+
name: ran.name,
|
|
236
|
+
display: ran.display,
|
|
237
|
+
total: handles.length,
|
|
238
|
+
tests: handles.map((h) => ({
|
|
239
|
+
kind: h.kind,
|
|
240
|
+
name: h.name,
|
|
241
|
+
qualified: qualifiedName(h),
|
|
242
|
+
object: h.object,
|
|
243
|
+
// Only a named one: `""` is the empty (recommended) datasource, which
|
|
244
|
+
// printed as `"datasource": ""` on every workflow test — a key whose
|
|
245
|
+
// value says there is nothing. Absent means the same.
|
|
246
|
+
...h.datasource === void 0 || h.datasource === "" ? {} : { datasource: h.datasource }
|
|
247
|
+
}))
|
|
248
|
+
});
|
|
249
|
+
return;
|
|
250
|
+
}
|
|
251
|
+
if (handles.length === 0) {
|
|
252
|
+
detail(await noTestsFound(bearer, target, args.kind));
|
|
253
|
+
return;
|
|
254
|
+
}
|
|
255
|
+
const s = stderrStyle();
|
|
256
|
+
step(`${handles.length} test${handles.length === 1 ? "" : "s"} in ${target.label}`);
|
|
257
|
+
const width = nameWidth(handles);
|
|
258
|
+
for (const handle of handles) {
|
|
259
|
+
const ds = handle.datasource === void 0 || handle.datasource === "" ? "" : s.yellow(` datasource: ${handle.datasource}`);
|
|
260
|
+
process.stderr.write(terminalText(` ${handle.name.padEnd(width)} ${s.dim(describe(handle))}${ds}
|
|
261
|
+
`));
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
function match(handles, needle) {
|
|
265
|
+
const qualified = handles.filter((h) => qualifiedName(h) === needle);
|
|
266
|
+
if (qualified.length > 0) return qualified;
|
|
267
|
+
const byObject = handles.filter((h) => objectQualifiedName(h) === needle);
|
|
268
|
+
if (byObject.length > 0) return byObject;
|
|
269
|
+
return handles.filter((h) => h.name === needle);
|
|
270
|
+
}
|
|
271
|
+
var TestNotFoundError = class extends Error {
|
|
272
|
+
constructor(message, suggestion, suggestions) {
|
|
273
|
+
super(message);
|
|
274
|
+
this.suggestion = suggestion;
|
|
275
|
+
this.suggestions = suggestions;
|
|
276
|
+
}
|
|
277
|
+
suggestion;
|
|
278
|
+
suggestions;
|
|
279
|
+
name = "TestNotFoundError";
|
|
280
|
+
exitCode = 8;
|
|
281
|
+
code = "SDK_ERROR";
|
|
282
|
+
};
|
|
283
|
+
async function runOne(args, name) {
|
|
284
|
+
const { ran, bearer, target } = await resolveOn(args, "run");
|
|
285
|
+
const handles = await reaching(ran, target, args, "run", () => collect(bearer, target, args.kind));
|
|
286
|
+
const found = match(handles, name);
|
|
287
|
+
if (found.length === 0) {
|
|
288
|
+
const { suggestAll, orNames } = await import("./suggest-6FOOYKHG.js");
|
|
289
|
+
const near = suggestAll(name, [...new Set(handles.map((h) => h.name))]);
|
|
290
|
+
const nearest = near[0];
|
|
291
|
+
const offer = nearest === void 0 ? "" : near.length === 1 ? ` Did you mean "${nearest}"? \`xanosdk test run ${shellQuote(nearest)}${sameBackend(args)}\` runs it.` : ` Did you mean ${orNames(near)}?`;
|
|
292
|
+
throw new TestNotFoundError(
|
|
293
|
+
`No test named "${name}" in ${target.label}.${offer} \`xanosdk test list${sameBackend(args)}\` shows the ones that exist.`,
|
|
294
|
+
nearest,
|
|
295
|
+
near.length > 1 ? near : void 0
|
|
296
|
+
);
|
|
297
|
+
}
|
|
298
|
+
if (found.length > 1) {
|
|
299
|
+
const forms = found.map((h) => qualifiedName(h));
|
|
300
|
+
const distinct = [...new Set(forms)];
|
|
301
|
+
if (distinct.length < forms.length || distinct.includes(name)) {
|
|
302
|
+
throw new Error(
|
|
303
|
+
`"${name}" names ${found.length} tests in ${target.label} that no qualified form tells apart (${distinct.map((f) => `"${f}"`).join(", ")}). Rename one of them, then run it by its new name.`
|
|
304
|
+
);
|
|
305
|
+
}
|
|
306
|
+
throw new Error(
|
|
307
|
+
`"${name}" names ${found.length} tests in ${target.label}. Use the qualified form:
|
|
308
|
+
` + forms.map((f) => ` xanosdk test run ${shellQuote(f)}${sameBackend(args)}`).join("\n")
|
|
309
|
+
);
|
|
310
|
+
}
|
|
311
|
+
const handle = found[0];
|
|
312
|
+
step(`Running ${handle.name} in ${target.label}`);
|
|
313
|
+
const outcome = await reaching(ran, target, args, "run", () => runTest(bearer, target, handle));
|
|
314
|
+
renderOutcome(outcome, handle.name.length);
|
|
315
|
+
report(args, ran, [outcome]);
|
|
316
|
+
}
|
|
317
|
+
async function runSuite(auth, target, opts = {}) {
|
|
318
|
+
const handles = await collect(auth, target, opts.kind);
|
|
319
|
+
if (handles.length === 0) return [];
|
|
320
|
+
const units = handles.filter((h) => h.kind === "unit").length;
|
|
321
|
+
const flows = handles.length - units;
|
|
322
|
+
step(
|
|
323
|
+
`Running ${handles.length} test${handles.length === 1 ? "" : "s"} against ${target.label} (${units} unit, ${flows} workflow)`
|
|
324
|
+
);
|
|
325
|
+
blank();
|
|
326
|
+
const width = nameWidth(handles);
|
|
327
|
+
let emitted = 0;
|
|
328
|
+
const settled = new Array(handles.length);
|
|
329
|
+
const flush = () => {
|
|
330
|
+
while (emitted < settled.length && settled[emitted] !== void 0) {
|
|
331
|
+
const outcome = settled[emitted];
|
|
332
|
+
if (outcome !== null && outcome !== void 0) renderOutcome(outcome, width);
|
|
333
|
+
emitted++;
|
|
334
|
+
}
|
|
335
|
+
};
|
|
336
|
+
let stopped;
|
|
337
|
+
const outcomes = await mapWithConcurrency(handles, opts.concurrency ?? 1, async (handle, index) => {
|
|
338
|
+
let outcome;
|
|
339
|
+
if (stopped !== void 0 && opts.onUnreachable !== void 0) {
|
|
340
|
+
opts.onUnreachable(handle, stopped);
|
|
341
|
+
outcome = null;
|
|
342
|
+
} else {
|
|
343
|
+
try {
|
|
344
|
+
outcome = await runTest(auth, target, handle);
|
|
345
|
+
} catch (err) {
|
|
346
|
+
if (opts.onUnreachable === void 0 || !isSuiteUnreachable(err)) throw err;
|
|
347
|
+
stopped ??= err;
|
|
348
|
+
opts.onUnreachable(handle, err);
|
|
349
|
+
outcome = null;
|
|
350
|
+
}
|
|
351
|
+
}
|
|
352
|
+
settled[index] = outcome;
|
|
353
|
+
if (outcome !== null) opts.onOutcome?.(outcome);
|
|
354
|
+
flush();
|
|
355
|
+
return outcome;
|
|
356
|
+
});
|
|
357
|
+
return outcomes.filter((o) => o !== null);
|
|
358
|
+
}
|
|
359
|
+
async function runAll(args) {
|
|
360
|
+
const { ran, bearer, target } = await resolveOn(args, "run-all");
|
|
361
|
+
const unreachable = [];
|
|
362
|
+
const outcomes = await reaching(
|
|
363
|
+
ran,
|
|
364
|
+
target,
|
|
365
|
+
args,
|
|
366
|
+
"run-all",
|
|
367
|
+
() => runSuite(bearer, target, {
|
|
368
|
+
kind: args.kind,
|
|
369
|
+
concurrency: args.concurrency,
|
|
370
|
+
onUnreachable: (handle, err) => void unreachable.push({ handle, err })
|
|
371
|
+
})
|
|
372
|
+
);
|
|
373
|
+
if (unreachable.length > 0) throw partialRunError(ran, target, args, outcomes, unreachable);
|
|
374
|
+
report(args, ran, outcomes, outcomes.length === 0 ? await noTestsFound(bearer, target, args.kind) : void 0);
|
|
375
|
+
}
|
|
376
|
+
function partialRunError(ran, target, args, outcomes, unreachable) {
|
|
377
|
+
const names = unreachable.map((u) => qualifiedName(u.handle));
|
|
378
|
+
const results = summarize(ran, outcomes, names);
|
|
379
|
+
if (outcomes.length > 0) {
|
|
380
|
+
blank();
|
|
381
|
+
printTally(results.passed, results.failed, unreachable.length);
|
|
382
|
+
}
|
|
383
|
+
const first = unreachable[0].err;
|
|
384
|
+
const head = first.message.split("\n")[0] ?? first.message;
|
|
385
|
+
const n = names.length;
|
|
386
|
+
const read = outcomes.length === 0 ? "no result was read" : `${outcomes.length} ${outcomes.length === 1 ? "result was" : "results were"} read (${results.passed} passed, ${results.failed} failed)`;
|
|
387
|
+
const again = `xanosdk test run-all${args.kind !== void 0 ? ` --kind ${args.kind}` : ""}${sameBackend(args)}`;
|
|
388
|
+
return new TestsUnreachableError(
|
|
389
|
+
`${head}
|
|
390
|
+
The tests on ${target.label} stopped answering: ${n} ${n === 1 ? "test" : "tests"} could not be run (${names.join(", ")}), and ${read}. ${unreachableCheck(first, ran, args)}, then run \`${again}\` again.`,
|
|
391
|
+
{ cause: first, details: { results, unreachable: names } }
|
|
392
|
+
);
|
|
393
|
+
}
|
|
394
|
+
async function noTestsFound(auth, target, kind, where = "") {
|
|
395
|
+
if (kind === void 0) return `No tests found${where}.`;
|
|
396
|
+
const other = kind === "unit" ? "workflow" : "unit";
|
|
397
|
+
const n = await listTests(auth, target, { kind: other }).then(
|
|
398
|
+
(h) => h.length,
|
|
399
|
+
() => void 0
|
|
400
|
+
);
|
|
401
|
+
if (n === 0) return `No tests found${where}.`;
|
|
402
|
+
if (n === void 0) return `No ${kind} tests found${where}.`;
|
|
403
|
+
return `No ${kind} tests found${where} (${n} ${other} test${n === 1 ? " exists" : "s exist"}; drop --kind or use --kind ${other}).`;
|
|
404
|
+
}
|
|
405
|
+
var EXIT_TESTS_UNREACHABLE = 6;
|
|
406
|
+
var TestsUnreachableError = class extends Error {
|
|
407
|
+
name = "TestsUnreachableError";
|
|
408
|
+
exitCode = EXIT_TESTS_UNREACHABLE;
|
|
409
|
+
/** The failure document's code — `SDK_ERROR`, as before, so `details` travels with it. */
|
|
410
|
+
code = "SDK_ERROR";
|
|
411
|
+
/** A run stopped part-way: `{ results, unreachable }` (see `partialRunError`). */
|
|
412
|
+
details;
|
|
413
|
+
constructor(message, opts = {}) {
|
|
414
|
+
super(message, opts.cause === void 0 ? void 0 : { cause: opts.cause });
|
|
415
|
+
this.details = opts.details;
|
|
416
|
+
}
|
|
417
|
+
};
|
|
418
|
+
function isSuiteUnreachable(err) {
|
|
419
|
+
return err instanceof TransportError || err instanceof Error && err.name === "TestRunUnansweredError";
|
|
420
|
+
}
|
|
421
|
+
function suiteUnreachableCheck(ran, args) {
|
|
422
|
+
return ran.kind === "local-engine" ? "Check that the local engine is still running (`xanosdk local-engine list`)" : ran.kind === "ephemeral" && ran.env !== null ? `Check that it is still up with \`xanosdk ephemeral get ${shellQuote(ran.env)}${contextFlags(args)}\` \u2014 an ephemeral expires \u2014 and that this machine reaches the instance` : "Check that this machine reaches the instance (network, VPN or proxy)";
|
|
423
|
+
}
|
|
424
|
+
function unreachableCheck(err, ran, args) {
|
|
425
|
+
if (!isRateLimited(err)) return suiteUnreachableCheck(ran, args);
|
|
426
|
+
const wait = lastRateLimitRetryAfter() === void 0 ? "Wait a moment" : "Wait that long";
|
|
427
|
+
return `${rateLimitedCause()}: the instance turned the request away before acting on it. ${wait}`;
|
|
428
|
+
}
|
|
429
|
+
async function reaching(ran, target, args, verb, work) {
|
|
430
|
+
try {
|
|
431
|
+
return await work();
|
|
432
|
+
} catch (err) {
|
|
433
|
+
if (!isSuiteUnreachable(err)) throw err;
|
|
434
|
+
const head = err.message.split("\n")[0] ?? err.message;
|
|
435
|
+
const again = `xanosdk test ${verb}${verb === "run" && args.positionals[0] !== void 0 ? ` ${shellQuote(args.positionals[0])}` : ""}${args.kind !== void 0 ? ` --kind ${args.kind}` : ""}${sameBackend(args)}`;
|
|
436
|
+
throw new TestsUnreachableError(
|
|
437
|
+
`${head}
|
|
438
|
+
The tests on ${target.label} could not be reached, so no result was read. ${unreachableCheck(err, ran, args)}, then run \`${again}\` again.`,
|
|
439
|
+
{ cause: err }
|
|
440
|
+
);
|
|
441
|
+
}
|
|
442
|
+
}
|
|
443
|
+
async function runTestCommand(args) {
|
|
444
|
+
switch (args.subcommand) {
|
|
445
|
+
case "list":
|
|
446
|
+
return runList(args);
|
|
447
|
+
case "run": {
|
|
448
|
+
const name = args.positionals[0];
|
|
449
|
+
if (name === void 0 || name === "") {
|
|
450
|
+
throw new UsageError(`\`xanosdk test run\` needs a test name: \`xanosdk test run "<name>"${sameBackend(args)}\`.`, {
|
|
451
|
+
hintFor: { command: "test", subcommand: "run" }
|
|
452
|
+
});
|
|
453
|
+
}
|
|
454
|
+
return runOne(args, name);
|
|
455
|
+
}
|
|
456
|
+
case "run-all":
|
|
457
|
+
return runAll(args);
|
|
458
|
+
default:
|
|
459
|
+
throw unknownSubcommand("test", args.subcommand);
|
|
460
|
+
}
|
|
461
|
+
}
|
|
462
|
+
export {
|
|
463
|
+
EXIT_TESTS_FAILED,
|
|
464
|
+
EXIT_TESTS_UNREACHABLE,
|
|
465
|
+
TestNotFoundError,
|
|
466
|
+
TestsUnreachableError,
|
|
467
|
+
isSuiteUnreachable,
|
|
468
|
+
noTestsFound,
|
|
469
|
+
printTally,
|
|
470
|
+
runSuite,
|
|
471
|
+
runTestCommand,
|
|
472
|
+
suiteCounts,
|
|
473
|
+
suiteUnreachableCheck,
|
|
474
|
+
testRow
|
|
475
|
+
};
|
|
476
|
+
//# sourceMappingURL=test-command-TIKZMDPZ.js.map
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import {
|
|
2
|
+
TestRunUnansweredError,
|
|
3
|
+
listTests,
|
|
4
|
+
objectQualifiedName,
|
|
5
|
+
qualifiedName,
|
|
6
|
+
runTest
|
|
7
|
+
} from "./chunk-73IVBKMA.js";
|
|
8
|
+
import "./chunk-6PBR37LN.js";
|
|
9
|
+
import "./chunk-YLDALTWZ.js";
|
|
10
|
+
import "./chunk-QXTKSOFI.js";
|
|
11
|
+
import "./chunk-X2NL4KUO.js";
|
|
12
|
+
import "./chunk-PTHVMXZI.js";
|
|
13
|
+
import "./chunk-UTI5G6OJ.js";
|
|
14
|
+
import "./chunk-2EZ3ZJZZ.js";
|
|
15
|
+
import "./chunk-5ZSO4T2G.js";
|
|
16
|
+
import "./chunk-TFFGOFVZ.js";
|
|
17
|
+
import "./chunk-36JUQZVQ.js";
|
|
18
|
+
import "./chunk-PZ5AY32C.js";
|
|
19
|
+
export {
|
|
20
|
+
TestRunUnansweredError,
|
|
21
|
+
listTests,
|
|
22
|
+
objectQualifiedName,
|
|
23
|
+
qualifiedName,
|
|
24
|
+
runTest
|
|
25
|
+
};
|
|
26
|
+
//# sourceMappingURL=tests-BGGIOK3L.js.map
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ENV_INSTANCE,
|
|
3
|
+
ENV_META_TOKEN,
|
|
4
|
+
ENV_WORKSPACE,
|
|
5
|
+
NotSignedInError,
|
|
6
|
+
ProfileNotFoundError,
|
|
7
|
+
StoredCredentialError,
|
|
8
|
+
assertStoredAuthHost,
|
|
9
|
+
credentialRejected,
|
|
10
|
+
credentialWarning,
|
|
11
|
+
describeRefreshAnswer,
|
|
12
|
+
describeRefreshFailure,
|
|
13
|
+
envMetaCredentialVarsSet,
|
|
14
|
+
environmentCredentialVars,
|
|
15
|
+
getAccessToken,
|
|
16
|
+
isTransientRefreshError,
|
|
17
|
+
notSignedIn,
|
|
18
|
+
readEnvMetaCredential,
|
|
19
|
+
refusedRefreshCredential,
|
|
20
|
+
resolveNamedProfile,
|
|
21
|
+
warnIfReadableByOthers
|
|
22
|
+
} from "./chunk-ET4Y4XCB.js";
|
|
23
|
+
import "./chunk-5QU2P5CA.js";
|
|
24
|
+
import "./chunk-ZYJP6BOO.js";
|
|
25
|
+
import "./chunk-QO6BVGS5.js";
|
|
26
|
+
import "./chunk-JZGVVJSI.js";
|
|
27
|
+
import "./chunk-FWD7AL6N.js";
|
|
28
|
+
import "./chunk-TLQE7ZN3.js";
|
|
29
|
+
import "./chunk-XW6KISBB.js";
|
|
30
|
+
import "./chunk-AWQ7BQTQ.js";
|
|
31
|
+
import "./chunk-EUUUMY7J.js";
|
|
32
|
+
import "./chunk-YLDALTWZ.js";
|
|
33
|
+
import "./chunk-5FBYXK5P.js";
|
|
34
|
+
import "./chunk-LLNZGEFK.js";
|
|
35
|
+
import "./chunk-QXTKSOFI.js";
|
|
36
|
+
import "./chunk-X2NL4KUO.js";
|
|
37
|
+
import "./chunk-PTHVMXZI.js";
|
|
38
|
+
import "./chunk-UTI5G6OJ.js";
|
|
39
|
+
import "./chunk-2EZ3ZJZZ.js";
|
|
40
|
+
import "./chunk-6MR5TI5V.js";
|
|
41
|
+
import "./chunk-5ZSO4T2G.js";
|
|
42
|
+
import "./chunk-XNCP4KYO.js";
|
|
43
|
+
import "./chunk-TFFGOFVZ.js";
|
|
44
|
+
import "./chunk-NZOWWHU5.js";
|
|
45
|
+
import "./chunk-4BW2SG2N.js";
|
|
46
|
+
import "./chunk-CIMQZRRE.js";
|
|
47
|
+
import "./chunk-OHX6MIUZ.js";
|
|
48
|
+
import "./chunk-36JUQZVQ.js";
|
|
49
|
+
import "./chunk-PZ5AY32C.js";
|
|
50
|
+
export {
|
|
51
|
+
ENV_INSTANCE,
|
|
52
|
+
ENV_META_TOKEN,
|
|
53
|
+
ENV_WORKSPACE,
|
|
54
|
+
NotSignedInError,
|
|
55
|
+
ProfileNotFoundError,
|
|
56
|
+
StoredCredentialError,
|
|
57
|
+
assertStoredAuthHost,
|
|
58
|
+
credentialRejected,
|
|
59
|
+
credentialWarning,
|
|
60
|
+
describeRefreshAnswer,
|
|
61
|
+
describeRefreshFailure,
|
|
62
|
+
envMetaCredentialVarsSet,
|
|
63
|
+
environmentCredentialVars,
|
|
64
|
+
getAccessToken,
|
|
65
|
+
isTransientRefreshError,
|
|
66
|
+
notSignedIn,
|
|
67
|
+
readEnvMetaCredential,
|
|
68
|
+
refusedRefreshCredential,
|
|
69
|
+
resolveNamedProfile,
|
|
70
|
+
warnIfReadableByOthers
|
|
71
|
+
};
|
|
72
|
+
//# sourceMappingURL=token-NICJUTMT.js.map
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import {
|
|
2
|
+
UsageError,
|
|
3
|
+
detail,
|
|
4
|
+
info,
|
|
5
|
+
warn
|
|
6
|
+
} from "./chunk-PTHVMXZI.js";
|
|
7
|
+
import "./chunk-UTI5G6OJ.js";
|
|
8
|
+
import "./chunk-2EZ3ZJZZ.js";
|
|
9
|
+
import "./chunk-5ZSO4T2G.js";
|
|
10
|
+
import "./chunk-TFFGOFVZ.js";
|
|
11
|
+
import "./chunk-36JUQZVQ.js";
|
|
12
|
+
import "./chunk-PZ5AY32C.js";
|
|
13
|
+
|
|
14
|
+
// src/emit/toolchain-hooks.ts
|
|
15
|
+
function redactEnvValues(payload) {
|
|
16
|
+
const env = payload["env"];
|
|
17
|
+
if (!Array.isArray(env)) return payload;
|
|
18
|
+
return {
|
|
19
|
+
...payload,
|
|
20
|
+
env: env.map(
|
|
21
|
+
(entry) => typeof entry === "object" && entry !== null && "value" in entry ? { ...entry, value: "" } : entry
|
|
22
|
+
)
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
function report(pkg, result) {
|
|
26
|
+
if (result.message !== void 0 && result.message !== "") {
|
|
27
|
+
if (result.failed === true) warn(`${pkg} \u2014 ${result.message}`, "toolchain.failed");
|
|
28
|
+
else info(result.message);
|
|
29
|
+
}
|
|
30
|
+
for (const line of result.warnings ?? []) detail(line);
|
|
31
|
+
}
|
|
32
|
+
function handleThrow(pkg, error, frozen) {
|
|
33
|
+
const why = error instanceof Error ? error.message : String(error);
|
|
34
|
+
if (frozen) {
|
|
35
|
+
throw new UsageError(
|
|
36
|
+
`${pkg} failed while checking this bundle, so whatever it verifies was not verified \u2014 and this run was asked to verify, not to write:
|
|
37
|
+
${why}`
|
|
38
|
+
);
|
|
39
|
+
}
|
|
40
|
+
warn(`${pkg} failed and was skipped.`, "toolchain.failed", [why]);
|
|
41
|
+
}
|
|
42
|
+
async function fireOnBundle(plugins, ctx) {
|
|
43
|
+
let failed = false;
|
|
44
|
+
const bundle = { ...ctx.bundle, payload: redactEnvValues(ctx.bundle.payload) };
|
|
45
|
+
for (const { pkg, plugin, config } of plugins) {
|
|
46
|
+
if (plugin.onBundle === void 0) continue;
|
|
47
|
+
try {
|
|
48
|
+
const result = await plugin.onBundle({ ...ctx, bundle, config });
|
|
49
|
+
report(pkg, result);
|
|
50
|
+
if (result.failed === true) failed = true;
|
|
51
|
+
} catch (error) {
|
|
52
|
+
handleThrow(pkg, error, ctx.frozen);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
return { failed };
|
|
56
|
+
}
|
|
57
|
+
async function fireOnPreflight(plugins, ctx) {
|
|
58
|
+
let failed = false;
|
|
59
|
+
const payloads = {
|
|
60
|
+
exportedPayload: redactEnvValues(ctx.exportedPayload),
|
|
61
|
+
remappedPayload: redactEnvValues(ctx.remappedPayload)
|
|
62
|
+
};
|
|
63
|
+
for (const { pkg, plugin, config } of plugins) {
|
|
64
|
+
if (plugin.onPreflight === void 0) continue;
|
|
65
|
+
try {
|
|
66
|
+
const result = await plugin.onPreflight({ ...ctx, ...payloads, config });
|
|
67
|
+
report(pkg, result);
|
|
68
|
+
if (result.failed === true) failed = true;
|
|
69
|
+
} catch (error) {
|
|
70
|
+
const why = error instanceof Error ? error.message : String(error);
|
|
71
|
+
warn(`${pkg} could not complete its check.`, "toolchain.failed", [why]);
|
|
72
|
+
failed = true;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
return { failed };
|
|
76
|
+
}
|
|
77
|
+
async function runBundleHooks(plugins, ctx, consequence) {
|
|
78
|
+
if (plugins.length === 0) return;
|
|
79
|
+
const outcome = await fireOnBundle(plugins, ctx);
|
|
80
|
+
if (outcome.failed) {
|
|
81
|
+
throw new UsageError(
|
|
82
|
+
`A toolchain module reported that its check did not pass${consequence}. See the report above.`
|
|
83
|
+
);
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
function anyDeclares(plugins, hook) {
|
|
87
|
+
return plugins.some((p) => p.plugin[hook] !== void 0);
|
|
88
|
+
}
|
|
89
|
+
export {
|
|
90
|
+
anyDeclares,
|
|
91
|
+
fireOnBundle,
|
|
92
|
+
fireOnPreflight,
|
|
93
|
+
redactEnvValues,
|
|
94
|
+
runBundleHooks
|
|
95
|
+
};
|
|
96
|
+
//# sourceMappingURL=toolchain-hooks-GHKLUJOH.js.map
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import {
|
|
2
|
+
UNKNOWN_MODULE_VERSION,
|
|
3
|
+
declaredToolchainPlugins,
|
|
4
|
+
discoverToolchainPlugins,
|
|
5
|
+
sdkPeerSkew
|
|
6
|
+
} from "./chunk-4Q2GN7NW.js";
|
|
7
|
+
import "./chunk-2TFRR6JV.js";
|
|
8
|
+
import "./chunk-JTUKLCXS.js";
|
|
9
|
+
import "./chunk-3LDULPRE.js";
|
|
10
|
+
import "./chunk-LLNZGEFK.js";
|
|
11
|
+
import "./chunk-PTHVMXZI.js";
|
|
12
|
+
import "./chunk-UTI5G6OJ.js";
|
|
13
|
+
import "./chunk-2EZ3ZJZZ.js";
|
|
14
|
+
import "./chunk-5ZSO4T2G.js";
|
|
15
|
+
import "./chunk-TFFGOFVZ.js";
|
|
16
|
+
import "./chunk-36JUQZVQ.js";
|
|
17
|
+
import "./chunk-PZ5AY32C.js";
|
|
18
|
+
export {
|
|
19
|
+
UNKNOWN_MODULE_VERSION,
|
|
20
|
+
declaredToolchainPlugins,
|
|
21
|
+
discoverToolchainPlugins,
|
|
22
|
+
sdkPeerSkew
|
|
23
|
+
};
|
|
24
|
+
//# sourceMappingURL=toolchain-modules-5EAZUONB.js.map
|