@ignix-social/editor 0.1.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/LICENSE +190 -0
- package/NOTICE +54 -0
- package/README.md +23 -0
- package/bin/ignix-editor.mjs +8 -0
- package/package.json +53 -0
- package/patches/index.mjs +53 -0
- package/scripts/build-ffmpeg-macos.sh +35 -0
- package/scripts/build-whisper-macos.sh +21 -0
- package/scripts/vendor.mjs +41 -0
- package/skills/ignix-editor/SKILL.md +132 -0
- package/src/audio.mjs +31 -0
- package/src/binaries.json +46 -0
- package/src/binaries.mjs +83 -0
- package/src/cli.mjs +254 -0
- package/src/prepare.mjs +74 -0
- package/src/runtime/ignix-frame.js +92 -0
- package/src/transcribe.mjs +71 -0
- package/src/validate.mjs +71 -0
- package/templates/blank/index.html +41 -0
- package/vendor/hyperframes/README.md +181 -0
- package/vendor/hyperframes/UPSTREAM.json +12 -0
- package/vendor/hyperframes/bin/hyperframes-localize-fonts.mjs +12 -0
- package/vendor/hyperframes/bin/hyperframes.mjs +11 -0
- package/vendor/hyperframes/dist/add-LR3ZR2A5.js +79 -0
- package/vendor/hyperframes/dist/agentPromptGenerator-VIIPZCJ3.js +143 -0
- package/vendor/hyperframes/dist/animatedGifPrep-P2T6YM7Z.js +34 -0
- package/vendor/hyperframes/dist/asset-BE2DOV72.js +26 -0
- package/vendor/hyperframes/dist/assetCataloger-VBLPHX24.js +340 -0
- package/vendor/hyperframes/dist/auth-RCQB2ZT7.js +60 -0
- package/vendor/hyperframes/dist/autoUpdate-RJAX3DAZ.js +268 -0
- package/vendor/hyperframes/dist/backgroundChecks-H2LCUIMJ.js +61 -0
- package/vendor/hyperframes/dist/backgroundChecksWorker.js +26 -0
- package/vendor/hyperframes/dist/batchRender-FT7AP7XH.js +355 -0
- package/vendor/hyperframes/dist/beat-analyzer.global.js +338 -0
- package/vendor/hyperframes/dist/beats-Y2EOP72P.js +309 -0
- package/vendor/hyperframes/dist/benchmark-MZ7GY3JW.js +231 -0
- package/vendor/hyperframes/dist/browser-HUTAMRQE.js +237 -0
- package/vendor/hyperframes/dist/bundleWithLocalizedFonts-5QOPOB5D.js +52 -0
- package/vendor/hyperframes/dist/capture-RLZA6EMR.js +4079 -0
- package/vendor/hyperframes/dist/capture-SZZ4IYJK.js +290 -0
- package/vendor/hyperframes/dist/captureFile-LYOJOUIE.js +15 -0
- package/vendor/hyperframes/dist/captureTimeout-PA4FYWT5.js +27 -0
- package/vendor/hyperframes/dist/catalog-KYU55EWR.js +1001 -0
- package/vendor/hyperframes/dist/check-TCG4PXLR.js +1697 -0
- package/vendor/hyperframes/dist/checkBrowser-RPMO4OW5.js +1032 -0
- package/vendor/hyperframes/dist/chunk-2EAXUCCE.js +88 -0
- package/vendor/hyperframes/dist/chunk-2EGFTPWD.js +1077 -0
- package/vendor/hyperframes/dist/chunk-2PSPARWP.js +6058 -0
- package/vendor/hyperframes/dist/chunk-2YN64IN5.js +5747 -0
- package/vendor/hyperframes/dist/chunk-3GXQPCJC.js +682 -0
- package/vendor/hyperframes/dist/chunk-3ZP5DXE7.js +15 -0
- package/vendor/hyperframes/dist/chunk-4NWOGZZS.js +1990 -0
- package/vendor/hyperframes/dist/chunk-4PFZPP2N.js +587 -0
- package/vendor/hyperframes/dist/chunk-4THIAPBL.js +128 -0
- package/vendor/hyperframes/dist/chunk-4YYJOFKS.js +28 -0
- package/vendor/hyperframes/dist/chunk-54HJ63Q2.js +29 -0
- package/vendor/hyperframes/dist/chunk-5ETJX6WM.js +89 -0
- package/vendor/hyperframes/dist/chunk-5IAKAQA7.js +389 -0
- package/vendor/hyperframes/dist/chunk-5Z63TBTX.js +37 -0
- package/vendor/hyperframes/dist/chunk-6BEFEWFB.js +25 -0
- package/vendor/hyperframes/dist/chunk-6CSYCFQV.js +68 -0
- package/vendor/hyperframes/dist/chunk-6CTIGJY7.js +154 -0
- package/vendor/hyperframes/dist/chunk-7HG4BFIN.js +93 -0
- package/vendor/hyperframes/dist/chunk-7JZ4FXP2.js +118 -0
- package/vendor/hyperframes/dist/chunk-A2Z4Z4VL.js +2961 -0
- package/vendor/hyperframes/dist/chunk-AMKC3AXA.js +25 -0
- package/vendor/hyperframes/dist/chunk-AVUUN2XD.js +4847 -0
- package/vendor/hyperframes/dist/chunk-AWDFDFI3.js +46 -0
- package/vendor/hyperframes/dist/chunk-AWNBM3MZ.js +94 -0
- package/vendor/hyperframes/dist/chunk-BXCMXMJQ.js +73 -0
- package/vendor/hyperframes/dist/chunk-BZ56MTDX.js +6 -0
- package/vendor/hyperframes/dist/chunk-CFKU7HTK.js +171 -0
- package/vendor/hyperframes/dist/chunk-CWPVM2QV.js +308 -0
- package/vendor/hyperframes/dist/chunk-DPVXBVLL.js +31292 -0
- package/vendor/hyperframes/dist/chunk-DQBY7FRR.js +397 -0
- package/vendor/hyperframes/dist/chunk-E6RPWJVC.js +213 -0
- package/vendor/hyperframes/dist/chunk-EISRN4E6.js +294 -0
- package/vendor/hyperframes/dist/chunk-EOVYQ3IG.js +143 -0
- package/vendor/hyperframes/dist/chunk-F3WZGU7C.js +479 -0
- package/vendor/hyperframes/dist/chunk-FCSIGXXP.js +366 -0
- package/vendor/hyperframes/dist/chunk-FI4I7CME.js +56 -0
- package/vendor/hyperframes/dist/chunk-FLWXXDNS.js +15 -0
- package/vendor/hyperframes/dist/chunk-GK4AIFIH.js +11171 -0
- package/vendor/hyperframes/dist/chunk-GMECXFAN.js +57 -0
- package/vendor/hyperframes/dist/chunk-GULOKZLI.js +155 -0
- package/vendor/hyperframes/dist/chunk-H4YZZ2VQ.js +68 -0
- package/vendor/hyperframes/dist/chunk-H6QMKUYA.js +477 -0
- package/vendor/hyperframes/dist/chunk-HBBJFK6I.js +273 -0
- package/vendor/hyperframes/dist/chunk-HRUGC23L.js +212 -0
- package/vendor/hyperframes/dist/chunk-HVW7ABXD.js +19 -0
- package/vendor/hyperframes/dist/chunk-HW6OYASV.js +344 -0
- package/vendor/hyperframes/dist/chunk-HWKCIWQT.js +3578 -0
- package/vendor/hyperframes/dist/chunk-I465DBM6.js +1214 -0
- package/vendor/hyperframes/dist/chunk-IGLEPPTN.js +24 -0
- package/vendor/hyperframes/dist/chunk-IGNAAHS3.js +433 -0
- package/vendor/hyperframes/dist/chunk-IHFUKJOR.js +85 -0
- package/vendor/hyperframes/dist/chunk-IQ3OUQ5Z.js +213 -0
- package/vendor/hyperframes/dist/chunk-ISN5GRYI.js +20 -0
- package/vendor/hyperframes/dist/chunk-IUZFXWSV.js +446 -0
- package/vendor/hyperframes/dist/chunk-JH556Q42.js +647 -0
- package/vendor/hyperframes/dist/chunk-JTHMTOMQ.js +601 -0
- package/vendor/hyperframes/dist/chunk-K2EQN4VU.js +405 -0
- package/vendor/hyperframes/dist/chunk-K2FTXJYH.js +16044 -0
- package/vendor/hyperframes/dist/chunk-K4WIOZFP.js +32 -0
- package/vendor/hyperframes/dist/chunk-K4WKGXRC.js +18 -0
- package/vendor/hyperframes/dist/chunk-KBJUXVOJ.js +172 -0
- package/vendor/hyperframes/dist/chunk-KC5XXX3X.js +590 -0
- package/vendor/hyperframes/dist/chunk-KNU5COPB.js +29 -0
- package/vendor/hyperframes/dist/chunk-KZI44OPA.js +185 -0
- package/vendor/hyperframes/dist/chunk-L3YOGIPG.js +48 -0
- package/vendor/hyperframes/dist/chunk-LAOCA3MQ.js +189 -0
- package/vendor/hyperframes/dist/chunk-LCSMOLGX.js +312 -0
- package/vendor/hyperframes/dist/chunk-LFGJWOVA.js +61 -0
- package/vendor/hyperframes/dist/chunk-LHSR3M4M.js +498 -0
- package/vendor/hyperframes/dist/chunk-LYNI3FOL.js +123 -0
- package/vendor/hyperframes/dist/chunk-M2WBOQ2Q.js +54 -0
- package/vendor/hyperframes/dist/chunk-MRF4AMKD.js +104 -0
- package/vendor/hyperframes/dist/chunk-MWB3ZIFM.js +852 -0
- package/vendor/hyperframes/dist/chunk-NGKM64BP.js +39 -0
- package/vendor/hyperframes/dist/chunk-NXMYHJAL.js +43 -0
- package/vendor/hyperframes/dist/chunk-OAF4XJOW.js +192 -0
- package/vendor/hyperframes/dist/chunk-OFQWTKPW.js +117 -0
- package/vendor/hyperframes/dist/chunk-P6LJ4Y32.js +4662 -0
- package/vendor/hyperframes/dist/chunk-PBN6GBJE.js +108 -0
- package/vendor/hyperframes/dist/chunk-PDAMK4Q5.js +28 -0
- package/vendor/hyperframes/dist/chunk-PFCFR3KZ.js +20 -0
- package/vendor/hyperframes/dist/chunk-PJ3HDUCY.js +108 -0
- package/vendor/hyperframes/dist/chunk-PMRBLBUP.js +152 -0
- package/vendor/hyperframes/dist/chunk-PPQUYWTW.js +240 -0
- package/vendor/hyperframes/dist/chunk-Q5X2B5WT.js +29 -0
- package/vendor/hyperframes/dist/chunk-Q7IU7MOR.js +351 -0
- package/vendor/hyperframes/dist/chunk-QC4FJVLM.js +371 -0
- package/vendor/hyperframes/dist/chunk-QNYYOUU3.js +1318 -0
- package/vendor/hyperframes/dist/chunk-RDNNAKEP.js +161 -0
- package/vendor/hyperframes/dist/chunk-RMHUQGRK.js +657 -0
- package/vendor/hyperframes/dist/chunk-RQVDTPGD.js +6 -0
- package/vendor/hyperframes/dist/chunk-RVCWIIZ7.js +68 -0
- package/vendor/hyperframes/dist/chunk-S3D6GE5W.js +72 -0
- package/vendor/hyperframes/dist/chunk-S3S4TGEH.js +424 -0
- package/vendor/hyperframes/dist/chunk-S7NPLFWV.js +11395 -0
- package/vendor/hyperframes/dist/chunk-SHB5VDMH.js +51 -0
- package/vendor/hyperframes/dist/chunk-TCLGPL65.js +860 -0
- package/vendor/hyperframes/dist/chunk-THXFSPLV.js +40 -0
- package/vendor/hyperframes/dist/chunk-TJSTGSAW.js +354 -0
- package/vendor/hyperframes/dist/chunk-TQFG7HTI.js +1024 -0
- package/vendor/hyperframes/dist/chunk-TVCRUG2S.js +265 -0
- package/vendor/hyperframes/dist/chunk-TWWSYAKJ.js +24 -0
- package/vendor/hyperframes/dist/chunk-U7CZBDMV.js +27 -0
- package/vendor/hyperframes/dist/chunk-UEZXMWG3.js +139 -0
- package/vendor/hyperframes/dist/chunk-UYEZTK4U.js +61 -0
- package/vendor/hyperframes/dist/chunk-VC76R6W2.js +27 -0
- package/vendor/hyperframes/dist/chunk-VFCKXTBB.js +159 -0
- package/vendor/hyperframes/dist/chunk-VWG7OQKU.js +22 -0
- package/vendor/hyperframes/dist/chunk-VXVRPIJA.js +105 -0
- package/vendor/hyperframes/dist/chunk-WBLXWOYK.js +15 -0
- package/vendor/hyperframes/dist/chunk-WERLJGIC.js +20 -0
- package/vendor/hyperframes/dist/chunk-WMQNIQDJ.js +2057 -0
- package/vendor/hyperframes/dist/chunk-WPHMNO44.js +4528 -0
- package/vendor/hyperframes/dist/chunk-X5HWXQPU.js +113 -0
- package/vendor/hyperframes/dist/chunk-X7MTZ4T2.js +6 -0
- package/vendor/hyperframes/dist/chunk-XH4DSOS5.js +59 -0
- package/vendor/hyperframes/dist/chunk-XS4EJSKU.js +23 -0
- package/vendor/hyperframes/dist/chunk-XT5P4QMO.js +181 -0
- package/vendor/hyperframes/dist/chunk-XT7X6QCP.js +6 -0
- package/vendor/hyperframes/dist/chunk-XUHOIDKG.js +6 -0
- package/vendor/hyperframes/dist/chunk-XUXGIA7H.js +485 -0
- package/vendor/hyperframes/dist/chunk-XZABUQTX.js +113 -0
- package/vendor/hyperframes/dist/chunk-Y6W4DVPS.js +356 -0
- package/vendor/hyperframes/dist/chunk-YEIFI443.js +44 -0
- package/vendor/hyperframes/dist/chunk-YQZNILVH.js +375 -0
- package/vendor/hyperframes/dist/chunk-Z27A7NUB.js +65 -0
- package/vendor/hyperframes/dist/chunk-Z6B37SNM.js +3081 -0
- package/vendor/hyperframes/dist/chunk-ZJUKFZ2P.js +10954 -0
- package/vendor/hyperframes/dist/chunk-ZKDMAOFU.js +32 -0
- package/vendor/hyperframes/dist/chunk-ZMXUQLI2.js +17219 -0
- package/vendor/hyperframes/dist/chunk-ZTZ7NCJT.js +58 -0
- package/vendor/hyperframes/dist/chunk-ZTZA4UWZ.js +108 -0
- package/vendor/hyperframes/dist/clean-W57E5YQ3.js +293 -0
- package/vendor/hyperframes/dist/cli.js +495 -0
- package/vendor/hyperframes/dist/cloud-FFTJGZ24.js +70 -0
- package/vendor/hyperframes/dist/cloudrun-AJUTHUEA.js +763 -0
- package/vendor/hyperframes/dist/colors-HKWSZCGK.js +15 -0
- package/vendor/hyperframes/dist/commands/contrast-audit.browser.js +459 -0
- package/vendor/hyperframes/dist/commands/layout-audit.browser.js +2102 -0
- package/vendor/hyperframes/dist/commands/motion-sample.browser.js +74 -0
- package/vendor/hyperframes/dist/commands/motion-signature.browser.js +374 -0
- package/vendor/hyperframes/dist/compare-AYCTT55F.js +421 -0
- package/vendor/hyperframes/dist/compiler-QO36EXLS.js +121 -0
- package/vendor/hyperframes/dist/component-VFFR2O7T.js +176 -0
- package/vendor/hyperframes/dist/compositions-QTVN3U2A.js +228 -0
- package/vendor/hyperframes/dist/contactSheet-27SRU7A4.js +22 -0
- package/vendor/hyperframes/dist/delete-ZAKYCB7I.js +114 -0
- package/vendor/hyperframes/dist/deploy-MX76RZ36.js +101 -0
- package/vendor/hyperframes/dist/destroy-H2TZBYHH.js +42 -0
- package/vendor/hyperframes/dist/deterministicFonts-HAEMV4TM.js +50 -0
- package/vendor/hyperframes/dist/dist-EWXJGN63.js +129 -0
- package/vendor/hyperframes/dist/dist-FNNGCKFS.js +29 -0
- package/vendor/hyperframes/dist/dist-S3PJNPXQ.js +392 -0
- package/vendor/hyperframes/dist/docker/Dockerfile.render +65 -0
- package/vendor/hyperframes/dist/docs/compositions.md +67 -0
- package/vendor/hyperframes/dist/docs/data-attributes.md +27 -0
- package/vendor/hyperframes/dist/docs/examples.md +19 -0
- package/vendor/hyperframes/dist/docs/gsap.md +26 -0
- package/vendor/hyperframes/dist/docs/rendering.md +35 -0
- package/vendor/hyperframes/dist/docs/troubleshooting.md +29 -0
- package/vendor/hyperframes/dist/docs-QAPJEGLS.js +131 -0
- package/vendor/hyperframes/dist/doctor-AI7C3FON.js +67 -0
- package/vendor/hyperframes/dist/dom-IROKGVJI.js +14 -0
- package/vendor/hyperframes/dist/dotEnv-AECLXQSO.js +14 -0
- package/vendor/hyperframes/dist/events-7LALYNKZ.js +92 -0
- package/vendor/hyperframes/dist/events-FQY3HGKZ.js +88 -0
- package/vendor/hyperframes/dist/feedback-WCMDMSTK.js +472 -0
- package/vendor/hyperframes/dist/ffmpeg-QIUFEFTY.js +35 -0
- package/vendor/hyperframes/dist/figma-64WY462P.js +63 -0
- package/vendor/hyperframes/dist/fontData.generated-NXAOI4GH.js +13 -0
- package/vendor/hyperframes/dist/fontLocalizeCli.js +132 -0
- package/vendor/hyperframes/dist/get-FPOMJMZB.js +103 -0
- package/vendor/hyperframes/dist/gpuPolicy-2ZUZE5D6.js +38 -0
- package/vendor/hyperframes/dist/grade-compare-E2CKPST4.js +647 -0
- package/vendor/hyperframes/dist/gsapParser-DIYYX6JT.js +2846 -0
- package/vendor/hyperframes/dist/gsapParserAcorn-E3GEIRZB.js +28 -0
- package/vendor/hyperframes/dist/help-YRQIDDML.js +197 -0
- package/vendor/hyperframes/dist/history-PP5NDRV3.js +571 -0
- package/vendor/hyperframes/dist/hyperframe-runtime.js +1081 -0
- package/vendor/hyperframes/dist/hyperframe.manifest.json +22 -0
- package/vendor/hyperframes/dist/hyperframe.runtime.iife.js +1081 -0
- package/vendor/hyperframes/dist/hyperframes-player.global.js +474 -0
- package/vendor/hyperframes/dist/hyperframes-slideshow.global.js +149 -0
- package/vendor/hyperframes/dist/info-SEX3B7JL.js +153 -0
- package/vendor/hyperframes/dist/init-U3AKHO5B.js +1147 -0
- package/vendor/hyperframes/dist/inspect-Q3K6EDEK.js +97 -0
- package/vendor/hyperframes/dist/installer-K6O5WF44.js +37 -0
- package/vendor/hyperframes/dist/keyframes-DC64JCI3.js +2602 -0
- package/vendor/hyperframes/dist/lambda-D7UMN4DJ.js +451 -0
- package/vendor/hyperframes/dist/layout-XSPPDHOO.js +86 -0
- package/vendor/hyperframes/dist/lib-TPG2ZMAX.js +128 -0
- package/vendor/hyperframes/dist/lint-7DQZE7L3.js +164 -0
- package/vendor/hyperframes/dist/lintProject-OHBBM3DJ.js +27 -0
- package/vendor/hyperframes/dist/list-4K5MVDQX.js +162 -0
- package/vendor/hyperframes/dist/login-NTX4OWXL.js +377 -0
- package/vendor/hyperframes/dist/logout-Q654A3SI.js +100 -0
- package/vendor/hyperframes/dist/manager-67P2XFXQ.js +34 -0
- package/vendor/hyperframes/dist/manager-CT3D67CG.js +38 -0
- package/vendor/hyperframes/dist/manager-GFN75DM4.js +30 -0
- package/vendor/hyperframes/dist/media-treatment-5FYAOPNL.js +972 -0
- package/vendor/hyperframes/dist/media-use-4XXGABIL.js +113 -0
- package/vendor/hyperframes/dist/models-C4E4IWJD.js +137 -0
- package/vendor/hyperframes/dist/motionShot-S4MIGMT5.js +614 -0
- package/vendor/hyperframes/dist/normalize-O76AC4HE.js +333 -0
- package/vendor/hyperframes/dist/normalize-audio-CSFTXLXD.js +276 -0
- package/vendor/hyperframes/dist/open-2ZD6BHZG.js +115 -0
- package/vendor/hyperframes/dist/pipeline-TNGWUZQC.js +54 -0
- package/vendor/hyperframes/dist/play-CTMUXX6E.js +349 -0
- package/vendor/hyperframes/dist/policies-FSDZVS2E.js +292 -0
- package/vendor/hyperframes/dist/preflight-SMNV6RW2.js +45 -0
- package/vendor/hyperframes/dist/present-WQVHV5CR.js +350 -0
- package/vendor/hyperframes/dist/preview-JOJXTH75.js +1820 -0
- package/vendor/hyperframes/dist/producer-ECLEN5RP.js +13 -0
- package/vendor/hyperframes/dist/progress-FBIEEB7Y.js +73 -0
- package/vendor/hyperframes/dist/projectConfig-HYJMJ5BY.js +56 -0
- package/vendor/hyperframes/dist/publication-HQ5Y3KBM.js +29 -0
- package/vendor/hyperframes/dist/publish-VHDYQASC.js +430 -0
- package/vendor/hyperframes/dist/refresh-K24ETHMA.js +53 -0
- package/vendor/hyperframes/dist/remove-background-W2YX2NVH.js +253 -0
- package/vendor/hyperframes/dist/render-AO5VX3YI.js +177 -0
- package/vendor/hyperframes/dist/render-LNO62LEL.js +2367 -0
- package/vendor/hyperframes/dist/render-TTQI7TGN.js +796 -0
- package/vendor/hyperframes/dist/render-batch-YH7CTWNY.js +284 -0
- package/vendor/hyperframes/dist/renderCancellation-JPIHE47X.js +35 -0
- package/vendor/hyperframes/dist/renderSetupWorker.js +79 -0
- package/vendor/hyperframes/dist/resolver-IZ647GBZ.js +38 -0
- package/vendor/hyperframes/dist/runtimeVersion.js +18 -0
- package/vendor/hyperframes/dist/screenshotCapture-ECBTLCU6.js +179 -0
- package/vendor/hyperframes/dist/shaderTransitionWorker.js +44 -0
- package/vendor/hyperframes/dist/sherpa-KKLNW6U2.js +314 -0
- package/vendor/hyperframes/dist/sherpaWorker.js +77 -0
- package/vendor/hyperframes/dist/sites-TNVKZS73.js +52 -0
- package/vendor/hyperframes/dist/skill-ZHVLH7KX.js +15 -0
- package/vendor/hyperframes/dist/skills/hyperframes/SKILL.md +152 -0
- package/vendor/hyperframes/dist/skills/hyperframes/references/brief-contract.md +108 -0
- package/vendor/hyperframes/dist/skills/hyperframes/references/brief-format.md +72 -0
- package/vendor/hyperframes/dist/skills/hyperframes/references/capability-menu.md +47 -0
- package/vendor/hyperframes/dist/skills/hyperframes/references/frame-worker-core.md +80 -0
- package/vendor/hyperframes/dist/skills/hyperframes/references/intent-interview.md +73 -0
- package/vendor/hyperframes/dist/skills/hyperframes/references/pitch-round.md +40 -0
- package/vendor/hyperframes/dist/skills/hyperframes/references/plugin-installation.md +43 -0
- package/vendor/hyperframes/dist/skills/hyperframes/references/production-loop.md +26 -0
- package/vendor/hyperframes/dist/skills/hyperframes/references/review-loop.md +37 -0
- package/vendor/hyperframes/dist/skills/hyperframes/references/route-briefs.md +11 -0
- package/vendor/hyperframes/dist/skills/hyperframes/references/routes/embedded-captions.md +11 -0
- package/vendor/hyperframes/dist/skills/hyperframes/references/routes/faceless-explainer.md +12 -0
- package/vendor/hyperframes/dist/skills/hyperframes/references/routes/general-video.md +12 -0
- package/vendor/hyperframes/dist/skills/hyperframes/references/routes/motion-graphics.md +11 -0
- package/vendor/hyperframes/dist/skills/hyperframes/references/routes/music-to-video.md +12 -0
- package/vendor/hyperframes/dist/skills/hyperframes/references/routes/pr-to-video.md +28 -0
- package/vendor/hyperframes/dist/skills/hyperframes/references/routes/product-launch-video.md +13 -0
- package/vendor/hyperframes/dist/skills/hyperframes/references/routes/remotion-to-hyperframes.md +9 -0
- package/vendor/hyperframes/dist/skills/hyperframes/references/routes/slideshow.md +11 -0
- package/vendor/hyperframes/dist/skills/hyperframes/references/routes/talking-head-recut.md +11 -0
- package/vendor/hyperframes/dist/skills/hyperframes/references/script-format.md +52 -0
- package/vendor/hyperframes/dist/skills/hyperframes/references/skill-lifecycle.md +35 -0
- package/vendor/hyperframes/dist/skills/hyperframes/references/storyboard-format.md +99 -0
- package/vendor/hyperframes/dist/skills/hyperframes/references/subagent-dispatch.md +35 -0
- package/vendor/hyperframes/dist/skills/hyperframes/references/workflow-catalog.md +10 -0
- package/vendor/hyperframes/dist/skills/hyperframes/scripts/lib/frame-packets-core.mjs +194 -0
- package/vendor/hyperframes/dist/skills/hyperframes/scripts/plugin-cli.mjs +88 -0
- package/vendor/hyperframes/dist/skills/hyperframes/scripts/plugin-cli.test.mjs +117 -0
- package/vendor/hyperframes/dist/skills/hyperframes-cli/SKILL.md +189 -0
- package/vendor/hyperframes/dist/skills/hyperframes-cli/references/beats.md +19 -0
- package/vendor/hyperframes/dist/skills/hyperframes-cli/references/cloud.md +163 -0
- package/vendor/hyperframes/dist/skills/hyperframes-cli/references/cloudrun.md +62 -0
- package/vendor/hyperframes/dist/skills/hyperframes-cli/references/compare-and-batch.md +105 -0
- package/vendor/hyperframes/dist/skills/hyperframes-cli/references/doctor-browser.md +57 -0
- package/vendor/hyperframes/dist/skills/hyperframes-cli/references/init-and-scaffold.md +74 -0
- package/vendor/hyperframes/dist/skills/hyperframes-cli/references/lambda.md +185 -0
- package/vendor/hyperframes/dist/skills/hyperframes-cli/references/lint-validate-inspect.md +132 -0
- package/vendor/hyperframes/dist/skills/hyperframes-cli/references/preview-render.md +193 -0
- package/vendor/hyperframes/dist/skills/hyperframes-cli/references/upgrade-info-misc.md +134 -0
- package/vendor/hyperframes/dist/skills/media-use/SKILL.md +100 -0
- package/vendor/hyperframes/dist/skills/media-use/audio/assets/sfx/CREDITS.md +35 -0
- package/vendor/hyperframes/dist/skills/media-use/audio/assets/sfx/chime.mp3 +0 -0
- package/vendor/hyperframes/dist/skills/media-use/audio/assets/sfx/click-soft.mp3 +0 -0
- package/vendor/hyperframes/dist/skills/media-use/audio/assets/sfx/click.mp3 +0 -0
- package/vendor/hyperframes/dist/skills/media-use/audio/assets/sfx/error.mp3 +0 -0
- package/vendor/hyperframes/dist/skills/media-use/audio/assets/sfx/glitch-1.mp3 +0 -0
- package/vendor/hyperframes/dist/skills/media-use/audio/assets/sfx/glitch-2.mp3 +0 -0
- package/vendor/hyperframes/dist/skills/media-use/audio/assets/sfx/glitch-3.mp3 +0 -0
- package/vendor/hyperframes/dist/skills/media-use/audio/assets/sfx/impact-bass-1.mp3 +0 -0
- package/vendor/hyperframes/dist/skills/media-use/audio/assets/sfx/impact-bass-2.mp3 +0 -0
- package/vendor/hyperframes/dist/skills/media-use/audio/assets/sfx/key-press.mp3 +0 -0
- package/vendor/hyperframes/dist/skills/media-use/audio/assets/sfx/manifest.json +97 -0
- package/vendor/hyperframes/dist/skills/media-use/audio/assets/sfx/notification.mp3 +0 -0
- package/vendor/hyperframes/dist/skills/media-use/audio/assets/sfx/ping.mp3 +0 -0
- package/vendor/hyperframes/dist/skills/media-use/audio/assets/sfx/pop.mp3 +0 -0
- package/vendor/hyperframes/dist/skills/media-use/audio/assets/sfx/riser.mp3 +0 -0
- package/vendor/hyperframes/dist/skills/media-use/audio/assets/sfx/sparkle.mp3 +0 -0
- package/vendor/hyperframes/dist/skills/media-use/audio/assets/sfx/typing.mp3 +0 -0
- package/vendor/hyperframes/dist/skills/media-use/audio/assets/sfx/whoosh-cinematic.mp3 +0 -0
- package/vendor/hyperframes/dist/skills/media-use/audio/assets/sfx/whoosh-short.mp3 +0 -0
- package/vendor/hyperframes/dist/skills/media-use/audio/assets/sfx/whoosh.mp3 +0 -0
- package/vendor/hyperframes/dist/skills/media-use/audio/references/bgm.md +76 -0
- package/vendor/hyperframes/dist/skills/media-use/audio/references/captions/authoring.md +163 -0
- package/vendor/hyperframes/dist/skills/media-use/audio/references/captions/motion.md +87 -0
- package/vendor/hyperframes/dist/skills/media-use/audio/references/captions/transcript-handling.md +97 -0
- package/vendor/hyperframes/dist/skills/media-use/audio/references/remove-background.md +143 -0
- package/vendor/hyperframes/dist/skills/media-use/audio/references/requirements.md +29 -0
- package/vendor/hyperframes/dist/skills/media-use/audio/references/sfx.md +42 -0
- package/vendor/hyperframes/dist/skills/media-use/audio/references/transcribe.md +52 -0
- package/vendor/hyperframes/dist/skills/media-use/audio/references/tts-to-captions.md +35 -0
- package/vendor/hyperframes/dist/skills/media-use/audio/references/tts.md +260 -0
- package/vendor/hyperframes/dist/skills/media-use/audio/scripts/audio.mjs +311 -0
- package/vendor/hyperframes/dist/skills/media-use/audio/scripts/audio.test.mjs +159 -0
- package/vendor/hyperframes/dist/skills/media-use/audio/scripts/gemini-pipeline.test.mjs +131 -0
- package/vendor/hyperframes/dist/skills/media-use/audio/scripts/heygen-tts.mjs +122 -0
- package/vendor/hyperframes/dist/skills/media-use/audio/scripts/heygen-tts.test.mjs +38 -0
- package/vendor/hyperframes/dist/skills/media-use/audio/scripts/heygen-voice.mjs +98 -0
- package/vendor/hyperframes/dist/skills/media-use/audio/scripts/heygen-voice.test.mjs +233 -0
- package/vendor/hyperframes/dist/skills/media-use/audio/scripts/lib/audio-meta.mjs +39 -0
- package/vendor/hyperframes/dist/skills/media-use/audio/scripts/lib/audio-meta.test.mjs +136 -0
- package/vendor/hyperframes/dist/skills/media-use/audio/scripts/lib/bgm-volume.mjs +4 -0
- package/vendor/hyperframes/dist/skills/media-use/audio/scripts/lib/bgm.mjs +257 -0
- package/vendor/hyperframes/dist/skills/media-use/audio/scripts/lib/bgm.test.mjs +74 -0
- package/vendor/hyperframes/dist/skills/media-use/audio/scripts/lib/concurrency.mjs +14 -0
- package/vendor/hyperframes/dist/skills/media-use/audio/scripts/lib/concurrency.test.mjs +41 -0
- package/vendor/hyperframes/dist/skills/media-use/audio/scripts/lib/gemini-auth.mjs +43 -0
- package/vendor/hyperframes/dist/skills/media-use/audio/scripts/lib/gemini-auth.py +52 -0
- package/vendor/hyperframes/dist/skills/media-use/audio/scripts/lib/gemini-auth.test.mjs +86 -0
- package/vendor/hyperframes/dist/skills/media-use/audio/scripts/lib/gemini-auth_test.py +90 -0
- package/vendor/hyperframes/dist/skills/media-use/audio/scripts/lib/gemini-tts.mjs +122 -0
- package/vendor/hyperframes/dist/skills/media-use/audio/scripts/lib/gemini-tts.test.mjs +243 -0
- package/vendor/hyperframes/dist/skills/media-use/audio/scripts/lib/heygen.mjs +197 -0
- package/vendor/hyperframes/dist/skills/media-use/audio/scripts/lib/heygen.test.mjs +185 -0
- package/vendor/hyperframes/dist/skills/media-use/audio/scripts/lib/media-record.mjs +114 -0
- package/vendor/hyperframes/dist/skills/media-use/audio/scripts/lib/media-record.test.mjs +205 -0
- package/vendor/hyperframes/dist/skills/media-use/audio/scripts/lib/python.mjs +77 -0
- package/vendor/hyperframes/dist/skills/media-use/audio/scripts/lib/python.test.mjs +136 -0
- package/vendor/hyperframes/dist/skills/media-use/audio/scripts/lib/sfx.mjs +165 -0
- package/vendor/hyperframes/dist/skills/media-use/audio/scripts/lib/sfx.test.mjs +121 -0
- package/vendor/hyperframes/dist/skills/media-use/audio/scripts/lib/tts.mjs +389 -0
- package/vendor/hyperframes/dist/skills/media-use/audio/scripts/lib/tts.spawn.test.mjs +158 -0
- package/vendor/hyperframes/dist/skills/media-use/audio/scripts/lib/tts.test.mjs +230 -0
- package/vendor/hyperframes/dist/skills/media-use/audio/scripts/lyria-recipe.py +136 -0
- package/vendor/hyperframes/dist/skills/media-use/audio/scripts/wait-bgm.mjs +175 -0
- package/vendor/hyperframes/dist/skills/media-use/audio/scripts/wait-bgm.test.mjs +108 -0
- package/vendor/hyperframes/dist/skills/media-use/luts/README.md +28 -0
- package/vendor/hyperframes/dist/skills/media-use/luts/index.json +57 -0
- package/vendor/hyperframes/dist/skills/media-use/references/audio.md +20 -0
- package/vendor/hyperframes/dist/skills/media-use/references/grading.md +160 -0
- package/vendor/hyperframes/dist/skills/media-use/references/media-treatment-recipes.md +929 -0
- package/vendor/hyperframes/dist/skills/media-use/references/media-treatments.md +202 -0
- package/vendor/hyperframes/dist/skills/media-use/references/memory.md +37 -0
- package/vendor/hyperframes/dist/skills/media-use/references/meta.md +61 -0
- package/vendor/hyperframes/dist/skills/media-use/references/operations.md +327 -0
- package/vendor/hyperframes/dist/skills/media-use/references/resolve.md +150 -0
- package/vendor/hyperframes/dist/skills/media-use/references/setup-providers.md +80 -0
- package/vendor/hyperframes/dist/skills/media-use/references/telemetry-dashboard.md +49 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/audio-duck.mjs +113 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/compatibility.test.mjs +96 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/dither.mjs +328 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/dither.test.mjs +176 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/eval.mjs +369 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/adopt.mjs +128 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/adopt.test.mjs +95 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/bgm-provider.mjs +20 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/brand-provider.mjs +59 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/bundled-sfx-provider.mjs +119 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/bundled-sfx-provider.test.mjs +139 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/cache.mjs +148 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/candidates.mjs +91 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/candidates.test.mjs +155 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/codex-provider.mjs +161 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/codex-provider.test.mjs +34 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/config-lock.d.mts +3 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/config-lock.mjs +45 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/config-lock.test.mjs +79 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/coverage.test.mjs +136 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/cube-build.mjs +181 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/cube-build.test.mjs +80 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/cube-validate.mjs +198 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/cube-validate.test.mjs +125 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/cutlist.mjs +184 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/cutlist.test.mjs +162 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/duck.mjs +95 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/duck.test.mjs +153 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/error-diffusion.mjs +230 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/error-diffusion.test.mjs +102 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/ff-binaries.mjs +37 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/freeze.mjs +72 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/freeze.test.mjs +138 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/grade-analyzer.mjs +265 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/grade-analyzer.test.mjs +285 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/heygen-cli.mjs +191 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/heygen-cli.test.mjs +301 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/heygen-search.mjs +45 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/heygen-search.test.mjs +49 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/heygen-video-provider.mjs +138 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/heygen-video-provider.test.mjs +435 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/image-provider.mjs +44 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/index-gen.mjs +63 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/local-media-search.mjs +32 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/local-models.mjs +318 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/local-models.test.mjs +220 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/local-run.mjs +78 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/local-run.test.mjs +121 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/logo-provider.mjs +244 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/logo-provider.test.mjs +298 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/ltx-video-provider.mjs +94 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/ltx-video-provider.test.mjs +316 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/lut-preset-provider.mjs +271 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/lut-preset-provider.test.mjs +199 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/manifest.d.mts +19 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/manifest.mjs +279 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/manifest.test.mjs +397 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/match.mjs +47 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/media-fetch.mjs +85 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/media-fetch.test.mjs +197 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/media-home.mjs +20 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/media-home.test.mjs +61 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/media-search.d.mts +9 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/media-search.mjs +107 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/mflux-provider.mjs +128 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/mflux-provider.test.mjs +174 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/misses.mjs +49 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/misses.test.mjs +89 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/npx-sync.mjs +31 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/npx-sync.test.mjs +50 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/parakeet-words.mjs +27 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/parakeet-words.test.mjs +44 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/prefs-store.mjs +180 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/prefs-store.test.mjs +189 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/probe.mjs +41 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/probe.test.mjs +148 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/providers.mjs +5 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/recipe-store.mjs +367 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/recipe-store.test.mjs +367 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/registry.mjs +212 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/registry.test.mjs +262 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/search.mjs +24 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/search.test.mjs +32 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/sfx-provider.mjs +23 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/specs.mjs +132 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/specs.test.mjs +157 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/stats.mjs +117 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/stats.test.mjs +165 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/svg-sanitize.mjs +21 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/telemetry.mjs +210 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/telemetry.test.mjs +437 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/test-home.test.mjs +10 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/transcriptCutFade.mjs +21 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/transcriptCutFade.test.mjs +33 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/tts-local-provider.mjs +94 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/tts-local-provider.test.mjs +72 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/usage.mjs +57 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/usage.test.mjs +54 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/voice-provider.mjs +57 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/voice-provider.test.mjs +46 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/words.mjs +18 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/prefs.mjs +70 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/recipe.mjs +103 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/resolve-plugin.test.mjs +62 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/resolve.mjs +1369 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/transcribe.mjs +194 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/transcribe.test.mjs +112 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/transcript-cut.mjs +270 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/transcript-cut.test.mjs +117 -0
- package/vendor/hyperframes/dist/skills-MJ2J4GEM.js +808 -0
- package/vendor/hyperframes/dist/skillsUpdateCheck-TKTYQN5R.js +26 -0
- package/vendor/hyperframes/dist/slideshow-EJ4IMY6P.js +24 -0
- package/vendor/hyperframes/dist/snapshot-KIVDUUMN.js +875 -0
- package/vendor/hyperframes/dist/src-6YQBJGWR.js +202 -0
- package/vendor/hyperframes/dist/src-PVYUYV3M.js +471 -0
- package/vendor/hyperframes/dist/state-KAXGHF77.js +26 -0
- package/vendor/hyperframes/dist/staticProjectServer-7EU666GS.js +49 -0
- package/vendor/hyperframes/dist/status-YM52BQ6S.js +311 -0
- package/vendor/hyperframes/dist/studio/assets/hyperframes-player-Cp8e_Zst.js +473 -0
- package/vendor/hyperframes/dist/studio/assets/index-BX3KHhGX.js +71 -0
- package/vendor/hyperframes/dist/studio/assets/index-CASEBNy2.js +1 -0
- package/vendor/hyperframes/dist/studio/assets/index-D11atkBt.css +1 -0
- package/vendor/hyperframes/dist/studio/assets/index-DMTt9nTf.js +531 -0
- package/vendor/hyperframes/dist/studio/assets/index-oE1pOdAy.js +399 -0
- package/vendor/hyperframes/dist/studio/chunk-5VSXRGIX.js +948 -0
- package/vendor/hyperframes/dist/studio/chunk-5VSXRGIX.js.map +1 -0
- package/vendor/hyperframes/dist/studio/chunk-7UQWVN52.js +938 -0
- package/vendor/hyperframes/dist/studio/chunk-7UQWVN52.js.map +1 -0
- package/vendor/hyperframes/dist/studio/chunk-EEXSYY5F.js +190 -0
- package/vendor/hyperframes/dist/studio/chunk-EEXSYY5F.js.map +1 -0
- package/vendor/hyperframes/dist/studio/chunk-FOEID72M.js +1441 -0
- package/vendor/hyperframes/dist/studio/chunk-FOEID72M.js.map +1 -0
- package/vendor/hyperframes/dist/studio/chunk-PZ5AY32C.js +10 -0
- package/vendor/hyperframes/dist/studio/chunk-PZ5AY32C.js.map +1 -0
- package/vendor/hyperframes/dist/studio/chunk-TDWGXBUT.js +1103 -0
- package/vendor/hyperframes/dist/studio/chunk-TDWGXBUT.js.map +1 -0
- package/vendor/hyperframes/dist/studio/domEditingLayers-IEVLO54Z.js +47 -0
- package/vendor/hyperframes/dist/studio/domEditingLayers-IEVLO54Z.js.map +1 -0
- package/vendor/hyperframes/dist/studio/favicon.svg +14 -0
- package/vendor/hyperframes/dist/studio/icons/timeline/audio.svg +7 -0
- package/vendor/hyperframes/dist/studio/icons/timeline/captions.svg +5 -0
- package/vendor/hyperframes/dist/studio/icons/timeline/composition.svg +12 -0
- package/vendor/hyperframes/dist/studio/icons/timeline/image.svg +18 -0
- package/vendor/hyperframes/dist/studio/icons/timeline/music.svg +10 -0
- package/vendor/hyperframes/dist/studio/icons/timeline/text.svg +3 -0
- package/vendor/hyperframes/dist/studio/index.css +165 -0
- package/vendor/hyperframes/dist/studio/index.css.map +1 -0
- package/vendor/hyperframes/dist/studio/index.d.ts +4296 -0
- package/vendor/hyperframes/dist/studio/index.html +23 -0
- package/vendor/hyperframes/dist/studio/index.js +99693 -0
- package/vendor/hyperframes/dist/studio/index.js.map +1 -0
- package/vendor/hyperframes/dist/studio/player.d.ts +30 -0
- package/vendor/hyperframes/dist/studio/player.js +10 -0
- package/vendor/hyperframes/dist/studio/player.js.map +1 -0
- package/vendor/hyperframes/dist/studio/styles/tailwind-preset.d.ts +39 -0
- package/vendor/hyperframes/dist/studio/styles/tailwind-preset.js +50 -0
- package/vendor/hyperframes/dist/studio/styles/tailwind-preset.js.map +1 -0
- package/vendor/hyperframes/dist/studio/styles.css +1 -0
- package/vendor/hyperframes/dist/studio/ui.d.ts +296 -0
- package/vendor/hyperframes/dist/studio/ui.js +66 -0
- package/vendor/hyperframes/dist/studio/ui.js.map +1 -0
- package/vendor/hyperframes/dist/studio-api-PNQZRPX5.js +136 -0
- package/vendor/hyperframes/dist/studioSelectionClient-IUUPKUHZ.js +25 -0
- package/vendor/hyperframes/dist/studioServer-UWRBPIOJ.js +1457 -0
- package/vendor/hyperframes/dist/synthesize-K62TIZWI.js +182 -0
- package/vendor/hyperframes/dist/system-EZYZNUFD.js +44 -0
- package/vendor/hyperframes/dist/telemetry-2YC4SGQU.js +144 -0
- package/vendor/hyperframes/dist/telemetry-QMYM4WME.js +95 -0
- package/vendor/hyperframes/dist/templates/_shared/AGENTS.md +107 -0
- package/vendor/hyperframes/dist/templates/_shared/CLAUDE.md +107 -0
- package/vendor/hyperframes/dist/templates/blank/index.html +55 -0
- package/vendor/hyperframes/dist/templates/from-file/index.html +75 -0
- package/vendor/hyperframes/dist/templates/warm-grain/compositions/captions.html +154 -0
- package/vendor/hyperframes/dist/templates/warm-grain/compositions/graphics.html +162 -0
- package/vendor/hyperframes/dist/templates/warm-grain/compositions/intro.html +87 -0
- package/vendor/hyperframes/dist/templates/warm-grain/index.html +264 -0
- package/vendor/hyperframes/dist/templates/warm-grain/registry-item.json +34 -0
- package/vendor/hyperframes/dist/timeline-77Z3BBQM.js +1377 -0
- package/vendor/hyperframes/dist/tokens-OBGTYE4Z.js +92 -0
- package/vendor/hyperframes/dist/transcribe-7NVFHCGA.js +387 -0
- package/vendor/hyperframes/dist/transcribe-BNSJRR4M.js +62 -0
- package/vendor/hyperframes/dist/tts-P3LIPIL5.js +234 -0
- package/vendor/hyperframes/dist/updateCheck-UDWIJ4ZQ.js +39 -0
- package/vendor/hyperframes/dist/upgrade-CT3CPO3E.js +231 -0
- package/vendor/hyperframes/dist/urlDownloader-H6WRI2UE.js +39 -0
- package/vendor/hyperframes/dist/usage-EC3KFUIJ.js +2139 -0
- package/vendor/hyperframes/dist/validate-65QDZJWZ.js +70 -0
- package/vendor/hyperframes/dist/video-FGSGKRSV.js +261 -0
- package/vendor/hyperframes/dist/workspaceBuildCheck-TOLGAI4T.js +133 -0
- package/vendor/hyperframes/package.json +80 -0
|
@@ -0,0 +1,2961 @@
|
|
|
1
|
+
import { createRequire as __hf_createRequire } from "node:module";
|
|
2
|
+
import { fileURLToPath as __hf_fileURLToPath } from "node:url";
|
|
3
|
+
import { dirname as __hf_dirname } from "node:path";
|
|
4
|
+
var require = __hf_createRequire(import.meta.url);
|
|
5
|
+
var __filename = __hf_fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = __hf_dirname(__filename);
|
|
7
|
+
import {
|
|
8
|
+
readBoundedResponse
|
|
9
|
+
} from "./chunk-AWDFDFI3.js";
|
|
10
|
+
import {
|
|
11
|
+
require_code,
|
|
12
|
+
require_codegen,
|
|
13
|
+
require_compile,
|
|
14
|
+
require_core,
|
|
15
|
+
require_dataType,
|
|
16
|
+
require_fast_deep_equal,
|
|
17
|
+
require_names,
|
|
18
|
+
require_ref,
|
|
19
|
+
require_ref_error,
|
|
20
|
+
require_types,
|
|
21
|
+
require_util,
|
|
22
|
+
require_validate,
|
|
23
|
+
require_validation_error
|
|
24
|
+
} from "./chunk-P6LJ4Y32.js";
|
|
25
|
+
import {
|
|
26
|
+
publishRegistryFile
|
|
27
|
+
} from "./chunk-GMECXFAN.js";
|
|
28
|
+
import {
|
|
29
|
+
ITEM_TYPE_DIRS
|
|
30
|
+
} from "./chunk-2YN64IN5.js";
|
|
31
|
+
import {
|
|
32
|
+
realProjectRoot
|
|
33
|
+
} from "./chunk-OFQWTKPW.js";
|
|
34
|
+
import {
|
|
35
|
+
__commonJS,
|
|
36
|
+
__toESM
|
|
37
|
+
} from "./chunk-M2WBOQ2Q.js";
|
|
38
|
+
|
|
39
|
+
// ../../node_modules/.bun/ajv@8.20.0/node_modules/ajv/dist/vocabularies/core/id.js
|
|
40
|
+
var require_id = __commonJS({
|
|
41
|
+
"../../node_modules/.bun/ajv@8.20.0/node_modules/ajv/dist/vocabularies/core/id.js"(exports) {
|
|
42
|
+
"use strict";
|
|
43
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
44
|
+
var def = {
|
|
45
|
+
keyword: "id",
|
|
46
|
+
code() {
|
|
47
|
+
throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID');
|
|
48
|
+
}
|
|
49
|
+
};
|
|
50
|
+
exports.default = def;
|
|
51
|
+
}
|
|
52
|
+
});
|
|
53
|
+
|
|
54
|
+
// ../../node_modules/.bun/ajv@8.20.0/node_modules/ajv/dist/vocabularies/core/index.js
|
|
55
|
+
var require_core2 = __commonJS({
|
|
56
|
+
"../../node_modules/.bun/ajv@8.20.0/node_modules/ajv/dist/vocabularies/core/index.js"(exports) {
|
|
57
|
+
"use strict";
|
|
58
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
59
|
+
var id_1 = require_id();
|
|
60
|
+
var ref_1 = require_ref();
|
|
61
|
+
var core = [
|
|
62
|
+
"$schema",
|
|
63
|
+
"$id",
|
|
64
|
+
"$defs",
|
|
65
|
+
"$vocabulary",
|
|
66
|
+
{ keyword: "$comment" },
|
|
67
|
+
"definitions",
|
|
68
|
+
id_1.default,
|
|
69
|
+
ref_1.default
|
|
70
|
+
];
|
|
71
|
+
exports.default = core;
|
|
72
|
+
}
|
|
73
|
+
});
|
|
74
|
+
|
|
75
|
+
// ../../node_modules/.bun/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/limitNumber.js
|
|
76
|
+
var require_limitNumber = __commonJS({
|
|
77
|
+
"../../node_modules/.bun/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/limitNumber.js"(exports) {
|
|
78
|
+
"use strict";
|
|
79
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
80
|
+
var codegen_1 = require_codegen();
|
|
81
|
+
var ops = codegen_1.operators;
|
|
82
|
+
var KWDs = {
|
|
83
|
+
maximum: { okStr: "<=", ok: ops.LTE, fail: ops.GT },
|
|
84
|
+
minimum: { okStr: ">=", ok: ops.GTE, fail: ops.LT },
|
|
85
|
+
exclusiveMaximum: { okStr: "<", ok: ops.LT, fail: ops.GTE },
|
|
86
|
+
exclusiveMinimum: { okStr: ">", ok: ops.GT, fail: ops.LTE }
|
|
87
|
+
};
|
|
88
|
+
var error = {
|
|
89
|
+
message: ({ keyword, schemaCode }) => (0, codegen_1.str)`must be ${KWDs[keyword].okStr} ${schemaCode}`,
|
|
90
|
+
params: ({ keyword, schemaCode }) => (0, codegen_1._)`{comparison: ${KWDs[keyword].okStr}, limit: ${schemaCode}}`
|
|
91
|
+
};
|
|
92
|
+
var def = {
|
|
93
|
+
keyword: Object.keys(KWDs),
|
|
94
|
+
type: "number",
|
|
95
|
+
schemaType: "number",
|
|
96
|
+
$data: true,
|
|
97
|
+
error,
|
|
98
|
+
code(cxt) {
|
|
99
|
+
const { keyword, data, schemaCode } = cxt;
|
|
100
|
+
cxt.fail$data((0, codegen_1._)`${data} ${KWDs[keyword].fail} ${schemaCode} || isNaN(${data})`);
|
|
101
|
+
}
|
|
102
|
+
};
|
|
103
|
+
exports.default = def;
|
|
104
|
+
}
|
|
105
|
+
});
|
|
106
|
+
|
|
107
|
+
// ../../node_modules/.bun/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/multipleOf.js
|
|
108
|
+
var require_multipleOf = __commonJS({
|
|
109
|
+
"../../node_modules/.bun/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/multipleOf.js"(exports) {
|
|
110
|
+
"use strict";
|
|
111
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
112
|
+
var codegen_1 = require_codegen();
|
|
113
|
+
var error = {
|
|
114
|
+
message: ({ schemaCode }) => (0, codegen_1.str)`must be multiple of ${schemaCode}`,
|
|
115
|
+
params: ({ schemaCode }) => (0, codegen_1._)`{multipleOf: ${schemaCode}}`
|
|
116
|
+
};
|
|
117
|
+
var def = {
|
|
118
|
+
keyword: "multipleOf",
|
|
119
|
+
type: "number",
|
|
120
|
+
schemaType: "number",
|
|
121
|
+
$data: true,
|
|
122
|
+
error,
|
|
123
|
+
code(cxt) {
|
|
124
|
+
const { gen, data, schemaCode, it } = cxt;
|
|
125
|
+
const prec = it.opts.multipleOfPrecision;
|
|
126
|
+
const res = gen.let("res");
|
|
127
|
+
const invalid = prec ? (0, codegen_1._)`Math.abs(Math.round(${res}) - ${res}) > 1e-${prec}` : (0, codegen_1._)`${res} !== parseInt(${res})`;
|
|
128
|
+
cxt.fail$data((0, codegen_1._)`(${schemaCode} === 0 || (${res} = ${data}/${schemaCode}, ${invalid}))`);
|
|
129
|
+
}
|
|
130
|
+
};
|
|
131
|
+
exports.default = def;
|
|
132
|
+
}
|
|
133
|
+
});
|
|
134
|
+
|
|
135
|
+
// ../../node_modules/.bun/ajv@8.20.0/node_modules/ajv/dist/runtime/ucs2length.js
|
|
136
|
+
var require_ucs2length = __commonJS({
|
|
137
|
+
"../../node_modules/.bun/ajv@8.20.0/node_modules/ajv/dist/runtime/ucs2length.js"(exports) {
|
|
138
|
+
"use strict";
|
|
139
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
140
|
+
function ucs2length(str) {
|
|
141
|
+
const len = str.length;
|
|
142
|
+
let length = 0;
|
|
143
|
+
let pos = 0;
|
|
144
|
+
let value;
|
|
145
|
+
while (pos < len) {
|
|
146
|
+
length++;
|
|
147
|
+
value = str.charCodeAt(pos++);
|
|
148
|
+
if (value >= 55296 && value <= 56319 && pos < len) {
|
|
149
|
+
value = str.charCodeAt(pos);
|
|
150
|
+
if ((value & 64512) === 56320)
|
|
151
|
+
pos++;
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
return length;
|
|
155
|
+
}
|
|
156
|
+
exports.default = ucs2length;
|
|
157
|
+
ucs2length.code = 'require("ajv/dist/runtime/ucs2length").default';
|
|
158
|
+
}
|
|
159
|
+
});
|
|
160
|
+
|
|
161
|
+
// ../../node_modules/.bun/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/limitLength.js
|
|
162
|
+
var require_limitLength = __commonJS({
|
|
163
|
+
"../../node_modules/.bun/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/limitLength.js"(exports) {
|
|
164
|
+
"use strict";
|
|
165
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
166
|
+
var codegen_1 = require_codegen();
|
|
167
|
+
var util_1 = require_util();
|
|
168
|
+
var ucs2length_1 = require_ucs2length();
|
|
169
|
+
var error = {
|
|
170
|
+
message({ keyword, schemaCode }) {
|
|
171
|
+
const comp = keyword === "maxLength" ? "more" : "fewer";
|
|
172
|
+
return (0, codegen_1.str)`must NOT have ${comp} than ${schemaCode} characters`;
|
|
173
|
+
},
|
|
174
|
+
params: ({ schemaCode }) => (0, codegen_1._)`{limit: ${schemaCode}}`
|
|
175
|
+
};
|
|
176
|
+
var def = {
|
|
177
|
+
keyword: ["maxLength", "minLength"],
|
|
178
|
+
type: "string",
|
|
179
|
+
schemaType: "number",
|
|
180
|
+
$data: true,
|
|
181
|
+
error,
|
|
182
|
+
code(cxt) {
|
|
183
|
+
const { keyword, data, schemaCode, it } = cxt;
|
|
184
|
+
const op = keyword === "maxLength" ? codegen_1.operators.GT : codegen_1.operators.LT;
|
|
185
|
+
const len = it.opts.unicode === false ? (0, codegen_1._)`${data}.length` : (0, codegen_1._)`${(0, util_1.useFunc)(cxt.gen, ucs2length_1.default)}(${data})`;
|
|
186
|
+
cxt.fail$data((0, codegen_1._)`${len} ${op} ${schemaCode}`);
|
|
187
|
+
}
|
|
188
|
+
};
|
|
189
|
+
exports.default = def;
|
|
190
|
+
}
|
|
191
|
+
});
|
|
192
|
+
|
|
193
|
+
// ../../node_modules/.bun/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/pattern.js
|
|
194
|
+
var require_pattern = __commonJS({
|
|
195
|
+
"../../node_modules/.bun/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/pattern.js"(exports) {
|
|
196
|
+
"use strict";
|
|
197
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
198
|
+
var code_1 = require_code();
|
|
199
|
+
var util_1 = require_util();
|
|
200
|
+
var codegen_1 = require_codegen();
|
|
201
|
+
var error = {
|
|
202
|
+
message: ({ schemaCode }) => (0, codegen_1.str)`must match pattern "${schemaCode}"`,
|
|
203
|
+
params: ({ schemaCode }) => (0, codegen_1._)`{pattern: ${schemaCode}}`
|
|
204
|
+
};
|
|
205
|
+
var def = {
|
|
206
|
+
keyword: "pattern",
|
|
207
|
+
type: "string",
|
|
208
|
+
schemaType: "string",
|
|
209
|
+
$data: true,
|
|
210
|
+
error,
|
|
211
|
+
code(cxt) {
|
|
212
|
+
const { gen, data, $data, schema, schemaCode, it } = cxt;
|
|
213
|
+
const u = it.opts.unicodeRegExp ? "u" : "";
|
|
214
|
+
if ($data) {
|
|
215
|
+
const { regExp } = it.opts.code;
|
|
216
|
+
const regExpCode = regExp.code === "new RegExp" ? (0, codegen_1._)`new RegExp` : (0, util_1.useFunc)(gen, regExp);
|
|
217
|
+
const valid = gen.let("valid");
|
|
218
|
+
gen.try(() => gen.assign(valid, (0, codegen_1._)`${regExpCode}(${schemaCode}, ${u}).test(${data})`), () => gen.assign(valid, false));
|
|
219
|
+
cxt.fail$data((0, codegen_1._)`!${valid}`);
|
|
220
|
+
} else {
|
|
221
|
+
const regExp = (0, code_1.usePattern)(cxt, schema);
|
|
222
|
+
cxt.fail$data((0, codegen_1._)`!${regExp}.test(${data})`);
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
};
|
|
226
|
+
exports.default = def;
|
|
227
|
+
}
|
|
228
|
+
});
|
|
229
|
+
|
|
230
|
+
// ../../node_modules/.bun/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/limitProperties.js
|
|
231
|
+
var require_limitProperties = __commonJS({
|
|
232
|
+
"../../node_modules/.bun/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/limitProperties.js"(exports) {
|
|
233
|
+
"use strict";
|
|
234
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
235
|
+
var codegen_1 = require_codegen();
|
|
236
|
+
var error = {
|
|
237
|
+
message({ keyword, schemaCode }) {
|
|
238
|
+
const comp = keyword === "maxProperties" ? "more" : "fewer";
|
|
239
|
+
return (0, codegen_1.str)`must NOT have ${comp} than ${schemaCode} properties`;
|
|
240
|
+
},
|
|
241
|
+
params: ({ schemaCode }) => (0, codegen_1._)`{limit: ${schemaCode}}`
|
|
242
|
+
};
|
|
243
|
+
var def = {
|
|
244
|
+
keyword: ["maxProperties", "minProperties"],
|
|
245
|
+
type: "object",
|
|
246
|
+
schemaType: "number",
|
|
247
|
+
$data: true,
|
|
248
|
+
error,
|
|
249
|
+
code(cxt) {
|
|
250
|
+
const { keyword, data, schemaCode } = cxt;
|
|
251
|
+
const op = keyword === "maxProperties" ? codegen_1.operators.GT : codegen_1.operators.LT;
|
|
252
|
+
cxt.fail$data((0, codegen_1._)`Object.keys(${data}).length ${op} ${schemaCode}`);
|
|
253
|
+
}
|
|
254
|
+
};
|
|
255
|
+
exports.default = def;
|
|
256
|
+
}
|
|
257
|
+
});
|
|
258
|
+
|
|
259
|
+
// ../../node_modules/.bun/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/required.js
|
|
260
|
+
var require_required = __commonJS({
|
|
261
|
+
"../../node_modules/.bun/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/required.js"(exports) {
|
|
262
|
+
"use strict";
|
|
263
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
264
|
+
var code_1 = require_code();
|
|
265
|
+
var codegen_1 = require_codegen();
|
|
266
|
+
var util_1 = require_util();
|
|
267
|
+
var error = {
|
|
268
|
+
message: ({ params: { missingProperty } }) => (0, codegen_1.str)`must have required property '${missingProperty}'`,
|
|
269
|
+
params: ({ params: { missingProperty } }) => (0, codegen_1._)`{missingProperty: ${missingProperty}}`
|
|
270
|
+
};
|
|
271
|
+
var def = {
|
|
272
|
+
keyword: "required",
|
|
273
|
+
type: "object",
|
|
274
|
+
schemaType: "array",
|
|
275
|
+
$data: true,
|
|
276
|
+
error,
|
|
277
|
+
code(cxt) {
|
|
278
|
+
const { gen, schema, schemaCode, data, $data, it } = cxt;
|
|
279
|
+
const { opts } = it;
|
|
280
|
+
if (!$data && schema.length === 0)
|
|
281
|
+
return;
|
|
282
|
+
const useLoop = schema.length >= opts.loopRequired;
|
|
283
|
+
if (it.allErrors)
|
|
284
|
+
allErrorsMode();
|
|
285
|
+
else
|
|
286
|
+
exitOnErrorMode();
|
|
287
|
+
if (opts.strictRequired) {
|
|
288
|
+
const props = cxt.parentSchema.properties;
|
|
289
|
+
const { definedProperties } = cxt.it;
|
|
290
|
+
for (const requiredKey of schema) {
|
|
291
|
+
if ((props === null || props === void 0 ? void 0 : props[requiredKey]) === void 0 && !definedProperties.has(requiredKey)) {
|
|
292
|
+
const schemaPath = it.schemaEnv.baseId + it.errSchemaPath;
|
|
293
|
+
const msg = `required property "${requiredKey}" is not defined at "${schemaPath}" (strictRequired)`;
|
|
294
|
+
(0, util_1.checkStrictMode)(it, msg, it.opts.strictRequired);
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
function allErrorsMode() {
|
|
299
|
+
if (useLoop || $data) {
|
|
300
|
+
cxt.block$data(codegen_1.nil, loopAllRequired);
|
|
301
|
+
} else {
|
|
302
|
+
for (const prop of schema) {
|
|
303
|
+
(0, code_1.checkReportMissingProp)(cxt, prop);
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
}
|
|
307
|
+
function exitOnErrorMode() {
|
|
308
|
+
const missing = gen.let("missing");
|
|
309
|
+
if (useLoop || $data) {
|
|
310
|
+
const valid = gen.let("valid", true);
|
|
311
|
+
cxt.block$data(valid, () => loopUntilMissing(missing, valid));
|
|
312
|
+
cxt.ok(valid);
|
|
313
|
+
} else {
|
|
314
|
+
gen.if((0, code_1.checkMissingProp)(cxt, schema, missing));
|
|
315
|
+
(0, code_1.reportMissingProp)(cxt, missing);
|
|
316
|
+
gen.else();
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
function loopAllRequired() {
|
|
320
|
+
gen.forOf("prop", schemaCode, (prop) => {
|
|
321
|
+
cxt.setParams({ missingProperty: prop });
|
|
322
|
+
gen.if((0, code_1.noPropertyInData)(gen, data, prop, opts.ownProperties), () => cxt.error());
|
|
323
|
+
});
|
|
324
|
+
}
|
|
325
|
+
function loopUntilMissing(missing, valid) {
|
|
326
|
+
cxt.setParams({ missingProperty: missing });
|
|
327
|
+
gen.forOf(missing, schemaCode, () => {
|
|
328
|
+
gen.assign(valid, (0, code_1.propertyInData)(gen, data, missing, opts.ownProperties));
|
|
329
|
+
gen.if((0, codegen_1.not)(valid), () => {
|
|
330
|
+
cxt.error();
|
|
331
|
+
gen.break();
|
|
332
|
+
});
|
|
333
|
+
}, codegen_1.nil);
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
};
|
|
337
|
+
exports.default = def;
|
|
338
|
+
}
|
|
339
|
+
});
|
|
340
|
+
|
|
341
|
+
// ../../node_modules/.bun/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/limitItems.js
|
|
342
|
+
var require_limitItems = __commonJS({
|
|
343
|
+
"../../node_modules/.bun/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/limitItems.js"(exports) {
|
|
344
|
+
"use strict";
|
|
345
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
346
|
+
var codegen_1 = require_codegen();
|
|
347
|
+
var error = {
|
|
348
|
+
message({ keyword, schemaCode }) {
|
|
349
|
+
const comp = keyword === "maxItems" ? "more" : "fewer";
|
|
350
|
+
return (0, codegen_1.str)`must NOT have ${comp} than ${schemaCode} items`;
|
|
351
|
+
},
|
|
352
|
+
params: ({ schemaCode }) => (0, codegen_1._)`{limit: ${schemaCode}}`
|
|
353
|
+
};
|
|
354
|
+
var def = {
|
|
355
|
+
keyword: ["maxItems", "minItems"],
|
|
356
|
+
type: "array",
|
|
357
|
+
schemaType: "number",
|
|
358
|
+
$data: true,
|
|
359
|
+
error,
|
|
360
|
+
code(cxt) {
|
|
361
|
+
const { keyword, data, schemaCode } = cxt;
|
|
362
|
+
const op = keyword === "maxItems" ? codegen_1.operators.GT : codegen_1.operators.LT;
|
|
363
|
+
cxt.fail$data((0, codegen_1._)`${data}.length ${op} ${schemaCode}`);
|
|
364
|
+
}
|
|
365
|
+
};
|
|
366
|
+
exports.default = def;
|
|
367
|
+
}
|
|
368
|
+
});
|
|
369
|
+
|
|
370
|
+
// ../../node_modules/.bun/ajv@8.20.0/node_modules/ajv/dist/runtime/equal.js
|
|
371
|
+
var require_equal = __commonJS({
|
|
372
|
+
"../../node_modules/.bun/ajv@8.20.0/node_modules/ajv/dist/runtime/equal.js"(exports) {
|
|
373
|
+
"use strict";
|
|
374
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
375
|
+
var equal = require_fast_deep_equal();
|
|
376
|
+
equal.code = 'require("ajv/dist/runtime/equal").default';
|
|
377
|
+
exports.default = equal;
|
|
378
|
+
}
|
|
379
|
+
});
|
|
380
|
+
|
|
381
|
+
// ../../node_modules/.bun/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/uniqueItems.js
|
|
382
|
+
var require_uniqueItems = __commonJS({
|
|
383
|
+
"../../node_modules/.bun/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/uniqueItems.js"(exports) {
|
|
384
|
+
"use strict";
|
|
385
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
386
|
+
var dataType_1 = require_dataType();
|
|
387
|
+
var codegen_1 = require_codegen();
|
|
388
|
+
var util_1 = require_util();
|
|
389
|
+
var equal_1 = require_equal();
|
|
390
|
+
var error = {
|
|
391
|
+
message: ({ params: { i, j } }) => (0, codegen_1.str)`must NOT have duplicate items (items ## ${j} and ${i} are identical)`,
|
|
392
|
+
params: ({ params: { i, j } }) => (0, codegen_1._)`{i: ${i}, j: ${j}}`
|
|
393
|
+
};
|
|
394
|
+
var def = {
|
|
395
|
+
keyword: "uniqueItems",
|
|
396
|
+
type: "array",
|
|
397
|
+
schemaType: "boolean",
|
|
398
|
+
$data: true,
|
|
399
|
+
error,
|
|
400
|
+
code(cxt) {
|
|
401
|
+
const { gen, data, $data, schema, parentSchema, schemaCode, it } = cxt;
|
|
402
|
+
if (!$data && !schema)
|
|
403
|
+
return;
|
|
404
|
+
const valid = gen.let("valid");
|
|
405
|
+
const itemTypes = parentSchema.items ? (0, dataType_1.getSchemaTypes)(parentSchema.items) : [];
|
|
406
|
+
cxt.block$data(valid, validateUniqueItems, (0, codegen_1._)`${schemaCode} === false`);
|
|
407
|
+
cxt.ok(valid);
|
|
408
|
+
function validateUniqueItems() {
|
|
409
|
+
const i = gen.let("i", (0, codegen_1._)`${data}.length`);
|
|
410
|
+
const j = gen.let("j");
|
|
411
|
+
cxt.setParams({ i, j });
|
|
412
|
+
gen.assign(valid, true);
|
|
413
|
+
gen.if((0, codegen_1._)`${i} > 1`, () => (canOptimize() ? loopN : loopN2)(i, j));
|
|
414
|
+
}
|
|
415
|
+
function canOptimize() {
|
|
416
|
+
return itemTypes.length > 0 && !itemTypes.some((t) => t === "object" || t === "array");
|
|
417
|
+
}
|
|
418
|
+
function loopN(i, j) {
|
|
419
|
+
const item = gen.name("item");
|
|
420
|
+
const wrongType = (0, dataType_1.checkDataTypes)(itemTypes, item, it.opts.strictNumbers, dataType_1.DataType.Wrong);
|
|
421
|
+
const indices = gen.const("indices", (0, codegen_1._)`{}`);
|
|
422
|
+
gen.for((0, codegen_1._)`;${i}--;`, () => {
|
|
423
|
+
gen.let(item, (0, codegen_1._)`${data}[${i}]`);
|
|
424
|
+
gen.if(wrongType, (0, codegen_1._)`continue`);
|
|
425
|
+
if (itemTypes.length > 1)
|
|
426
|
+
gen.if((0, codegen_1._)`typeof ${item} == "string"`, (0, codegen_1._)`${item} += "_"`);
|
|
427
|
+
gen.if((0, codegen_1._)`typeof ${indices}[${item}] == "number"`, () => {
|
|
428
|
+
gen.assign(j, (0, codegen_1._)`${indices}[${item}]`);
|
|
429
|
+
cxt.error();
|
|
430
|
+
gen.assign(valid, false).break();
|
|
431
|
+
}).code((0, codegen_1._)`${indices}[${item}] = ${i}`);
|
|
432
|
+
});
|
|
433
|
+
}
|
|
434
|
+
function loopN2(i, j) {
|
|
435
|
+
const eql = (0, util_1.useFunc)(gen, equal_1.default);
|
|
436
|
+
const outer = gen.name("outer");
|
|
437
|
+
gen.label(outer).for((0, codegen_1._)`;${i}--;`, () => gen.for((0, codegen_1._)`${j} = ${i}; ${j}--;`, () => gen.if((0, codegen_1._)`${eql}(${data}[${i}], ${data}[${j}])`, () => {
|
|
438
|
+
cxt.error();
|
|
439
|
+
gen.assign(valid, false).break(outer);
|
|
440
|
+
})));
|
|
441
|
+
}
|
|
442
|
+
}
|
|
443
|
+
};
|
|
444
|
+
exports.default = def;
|
|
445
|
+
}
|
|
446
|
+
});
|
|
447
|
+
|
|
448
|
+
// ../../node_modules/.bun/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/const.js
|
|
449
|
+
var require_const = __commonJS({
|
|
450
|
+
"../../node_modules/.bun/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/const.js"(exports) {
|
|
451
|
+
"use strict";
|
|
452
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
453
|
+
var codegen_1 = require_codegen();
|
|
454
|
+
var util_1 = require_util();
|
|
455
|
+
var equal_1 = require_equal();
|
|
456
|
+
var error = {
|
|
457
|
+
message: "must be equal to constant",
|
|
458
|
+
params: ({ schemaCode }) => (0, codegen_1._)`{allowedValue: ${schemaCode}}`
|
|
459
|
+
};
|
|
460
|
+
var def = {
|
|
461
|
+
keyword: "const",
|
|
462
|
+
$data: true,
|
|
463
|
+
error,
|
|
464
|
+
code(cxt) {
|
|
465
|
+
const { gen, data, $data, schemaCode, schema } = cxt;
|
|
466
|
+
if ($data || schema && typeof schema == "object") {
|
|
467
|
+
cxt.fail$data((0, codegen_1._)`!${(0, util_1.useFunc)(gen, equal_1.default)}(${data}, ${schemaCode})`);
|
|
468
|
+
} else {
|
|
469
|
+
cxt.fail((0, codegen_1._)`${schema} !== ${data}`);
|
|
470
|
+
}
|
|
471
|
+
}
|
|
472
|
+
};
|
|
473
|
+
exports.default = def;
|
|
474
|
+
}
|
|
475
|
+
});
|
|
476
|
+
|
|
477
|
+
// ../../node_modules/.bun/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/enum.js
|
|
478
|
+
var require_enum = __commonJS({
|
|
479
|
+
"../../node_modules/.bun/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/enum.js"(exports) {
|
|
480
|
+
"use strict";
|
|
481
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
482
|
+
var codegen_1 = require_codegen();
|
|
483
|
+
var util_1 = require_util();
|
|
484
|
+
var equal_1 = require_equal();
|
|
485
|
+
var error = {
|
|
486
|
+
message: "must be equal to one of the allowed values",
|
|
487
|
+
params: ({ schemaCode }) => (0, codegen_1._)`{allowedValues: ${schemaCode}}`
|
|
488
|
+
};
|
|
489
|
+
var def = {
|
|
490
|
+
keyword: "enum",
|
|
491
|
+
schemaType: "array",
|
|
492
|
+
$data: true,
|
|
493
|
+
error,
|
|
494
|
+
code(cxt) {
|
|
495
|
+
const { gen, data, $data, schema, schemaCode, it } = cxt;
|
|
496
|
+
if (!$data && schema.length === 0)
|
|
497
|
+
throw new Error("enum must have non-empty array");
|
|
498
|
+
const useLoop = schema.length >= it.opts.loopEnum;
|
|
499
|
+
let eql;
|
|
500
|
+
const getEql = () => eql !== null && eql !== void 0 ? eql : eql = (0, util_1.useFunc)(gen, equal_1.default);
|
|
501
|
+
let valid;
|
|
502
|
+
if (useLoop || $data) {
|
|
503
|
+
valid = gen.let("valid");
|
|
504
|
+
cxt.block$data(valid, loopEnum);
|
|
505
|
+
} else {
|
|
506
|
+
if (!Array.isArray(schema))
|
|
507
|
+
throw new Error("ajv implementation error");
|
|
508
|
+
const vSchema = gen.const("vSchema", schemaCode);
|
|
509
|
+
valid = (0, codegen_1.or)(...schema.map((_x, i) => equalCode(vSchema, i)));
|
|
510
|
+
}
|
|
511
|
+
cxt.pass(valid);
|
|
512
|
+
function loopEnum() {
|
|
513
|
+
gen.assign(valid, false);
|
|
514
|
+
gen.forOf("v", schemaCode, (v) => gen.if((0, codegen_1._)`${getEql()}(${data}, ${v})`, () => gen.assign(valid, true).break()));
|
|
515
|
+
}
|
|
516
|
+
function equalCode(vSchema, i) {
|
|
517
|
+
const sch = schema[i];
|
|
518
|
+
return typeof sch === "object" && sch !== null ? (0, codegen_1._)`${getEql()}(${data}, ${vSchema}[${i}])` : (0, codegen_1._)`${data} === ${sch}`;
|
|
519
|
+
}
|
|
520
|
+
}
|
|
521
|
+
};
|
|
522
|
+
exports.default = def;
|
|
523
|
+
}
|
|
524
|
+
});
|
|
525
|
+
|
|
526
|
+
// ../../node_modules/.bun/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/index.js
|
|
527
|
+
var require_validation = __commonJS({
|
|
528
|
+
"../../node_modules/.bun/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/index.js"(exports) {
|
|
529
|
+
"use strict";
|
|
530
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
531
|
+
var limitNumber_1 = require_limitNumber();
|
|
532
|
+
var multipleOf_1 = require_multipleOf();
|
|
533
|
+
var limitLength_1 = require_limitLength();
|
|
534
|
+
var pattern_1 = require_pattern();
|
|
535
|
+
var limitProperties_1 = require_limitProperties();
|
|
536
|
+
var required_1 = require_required();
|
|
537
|
+
var limitItems_1 = require_limitItems();
|
|
538
|
+
var uniqueItems_1 = require_uniqueItems();
|
|
539
|
+
var const_1 = require_const();
|
|
540
|
+
var enum_1 = require_enum();
|
|
541
|
+
var validation = [
|
|
542
|
+
// number
|
|
543
|
+
limitNumber_1.default,
|
|
544
|
+
multipleOf_1.default,
|
|
545
|
+
// string
|
|
546
|
+
limitLength_1.default,
|
|
547
|
+
pattern_1.default,
|
|
548
|
+
// object
|
|
549
|
+
limitProperties_1.default,
|
|
550
|
+
required_1.default,
|
|
551
|
+
// array
|
|
552
|
+
limitItems_1.default,
|
|
553
|
+
uniqueItems_1.default,
|
|
554
|
+
// any
|
|
555
|
+
{ keyword: "type", schemaType: ["string", "array"] },
|
|
556
|
+
{ keyword: "nullable", schemaType: "boolean" },
|
|
557
|
+
const_1.default,
|
|
558
|
+
enum_1.default
|
|
559
|
+
];
|
|
560
|
+
exports.default = validation;
|
|
561
|
+
}
|
|
562
|
+
});
|
|
563
|
+
|
|
564
|
+
// ../../node_modules/.bun/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/additionalItems.js
|
|
565
|
+
var require_additionalItems = __commonJS({
|
|
566
|
+
"../../node_modules/.bun/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/additionalItems.js"(exports) {
|
|
567
|
+
"use strict";
|
|
568
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
569
|
+
exports.validateAdditionalItems = void 0;
|
|
570
|
+
var codegen_1 = require_codegen();
|
|
571
|
+
var util_1 = require_util();
|
|
572
|
+
var error = {
|
|
573
|
+
message: ({ params: { len } }) => (0, codegen_1.str)`must NOT have more than ${len} items`,
|
|
574
|
+
params: ({ params: { len } }) => (0, codegen_1._)`{limit: ${len}}`
|
|
575
|
+
};
|
|
576
|
+
var def = {
|
|
577
|
+
keyword: "additionalItems",
|
|
578
|
+
type: "array",
|
|
579
|
+
schemaType: ["boolean", "object"],
|
|
580
|
+
before: "uniqueItems",
|
|
581
|
+
error,
|
|
582
|
+
code(cxt) {
|
|
583
|
+
const { parentSchema, it } = cxt;
|
|
584
|
+
const { items } = parentSchema;
|
|
585
|
+
if (!Array.isArray(items)) {
|
|
586
|
+
(0, util_1.checkStrictMode)(it, '"additionalItems" is ignored when "items" is not an array of schemas');
|
|
587
|
+
return;
|
|
588
|
+
}
|
|
589
|
+
validateAdditionalItems(cxt, items);
|
|
590
|
+
}
|
|
591
|
+
};
|
|
592
|
+
function validateAdditionalItems(cxt, items) {
|
|
593
|
+
const { gen, schema, data, keyword, it } = cxt;
|
|
594
|
+
it.items = true;
|
|
595
|
+
const len = gen.const("len", (0, codegen_1._)`${data}.length`);
|
|
596
|
+
if (schema === false) {
|
|
597
|
+
cxt.setParams({ len: items.length });
|
|
598
|
+
cxt.pass((0, codegen_1._)`${len} <= ${items.length}`);
|
|
599
|
+
} else if (typeof schema == "object" && !(0, util_1.alwaysValidSchema)(it, schema)) {
|
|
600
|
+
const valid = gen.var("valid", (0, codegen_1._)`${len} <= ${items.length}`);
|
|
601
|
+
gen.if((0, codegen_1.not)(valid), () => validateItems(valid));
|
|
602
|
+
cxt.ok(valid);
|
|
603
|
+
}
|
|
604
|
+
function validateItems(valid) {
|
|
605
|
+
gen.forRange("i", items.length, len, (i) => {
|
|
606
|
+
cxt.subschema({ keyword, dataProp: i, dataPropType: util_1.Type.Num }, valid);
|
|
607
|
+
if (!it.allErrors)
|
|
608
|
+
gen.if((0, codegen_1.not)(valid), () => gen.break());
|
|
609
|
+
});
|
|
610
|
+
}
|
|
611
|
+
}
|
|
612
|
+
exports.validateAdditionalItems = validateAdditionalItems;
|
|
613
|
+
exports.default = def;
|
|
614
|
+
}
|
|
615
|
+
});
|
|
616
|
+
|
|
617
|
+
// ../../node_modules/.bun/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/items.js
|
|
618
|
+
var require_items = __commonJS({
|
|
619
|
+
"../../node_modules/.bun/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/items.js"(exports) {
|
|
620
|
+
"use strict";
|
|
621
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
622
|
+
exports.validateTuple = void 0;
|
|
623
|
+
var codegen_1 = require_codegen();
|
|
624
|
+
var util_1 = require_util();
|
|
625
|
+
var code_1 = require_code();
|
|
626
|
+
var def = {
|
|
627
|
+
keyword: "items",
|
|
628
|
+
type: "array",
|
|
629
|
+
schemaType: ["object", "array", "boolean"],
|
|
630
|
+
before: "uniqueItems",
|
|
631
|
+
code(cxt) {
|
|
632
|
+
const { schema, it } = cxt;
|
|
633
|
+
if (Array.isArray(schema))
|
|
634
|
+
return validateTuple(cxt, "additionalItems", schema);
|
|
635
|
+
it.items = true;
|
|
636
|
+
if ((0, util_1.alwaysValidSchema)(it, schema))
|
|
637
|
+
return;
|
|
638
|
+
cxt.ok((0, code_1.validateArray)(cxt));
|
|
639
|
+
}
|
|
640
|
+
};
|
|
641
|
+
function validateTuple(cxt, extraItems, schArr = cxt.schema) {
|
|
642
|
+
const { gen, parentSchema, data, keyword, it } = cxt;
|
|
643
|
+
checkStrictTuple(parentSchema);
|
|
644
|
+
if (it.opts.unevaluated && schArr.length && it.items !== true) {
|
|
645
|
+
it.items = util_1.mergeEvaluated.items(gen, schArr.length, it.items);
|
|
646
|
+
}
|
|
647
|
+
const valid = gen.name("valid");
|
|
648
|
+
const len = gen.const("len", (0, codegen_1._)`${data}.length`);
|
|
649
|
+
schArr.forEach((sch, i) => {
|
|
650
|
+
if ((0, util_1.alwaysValidSchema)(it, sch))
|
|
651
|
+
return;
|
|
652
|
+
gen.if((0, codegen_1._)`${len} > ${i}`, () => cxt.subschema({
|
|
653
|
+
keyword,
|
|
654
|
+
schemaProp: i,
|
|
655
|
+
dataProp: i
|
|
656
|
+
}, valid));
|
|
657
|
+
cxt.ok(valid);
|
|
658
|
+
});
|
|
659
|
+
function checkStrictTuple(sch) {
|
|
660
|
+
const { opts, errSchemaPath } = it;
|
|
661
|
+
const l = schArr.length;
|
|
662
|
+
const fullTuple = l === sch.minItems && (l === sch.maxItems || sch[extraItems] === false);
|
|
663
|
+
if (opts.strictTuples && !fullTuple) {
|
|
664
|
+
const msg = `"${keyword}" is ${l}-tuple, but minItems or maxItems/${extraItems} are not specified or different at path "${errSchemaPath}"`;
|
|
665
|
+
(0, util_1.checkStrictMode)(it, msg, opts.strictTuples);
|
|
666
|
+
}
|
|
667
|
+
}
|
|
668
|
+
}
|
|
669
|
+
exports.validateTuple = validateTuple;
|
|
670
|
+
exports.default = def;
|
|
671
|
+
}
|
|
672
|
+
});
|
|
673
|
+
|
|
674
|
+
// ../../node_modules/.bun/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/prefixItems.js
|
|
675
|
+
var require_prefixItems = __commonJS({
|
|
676
|
+
"../../node_modules/.bun/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/prefixItems.js"(exports) {
|
|
677
|
+
"use strict";
|
|
678
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
679
|
+
var items_1 = require_items();
|
|
680
|
+
var def = {
|
|
681
|
+
keyword: "prefixItems",
|
|
682
|
+
type: "array",
|
|
683
|
+
schemaType: ["array"],
|
|
684
|
+
before: "uniqueItems",
|
|
685
|
+
code: (cxt) => (0, items_1.validateTuple)(cxt, "items")
|
|
686
|
+
};
|
|
687
|
+
exports.default = def;
|
|
688
|
+
}
|
|
689
|
+
});
|
|
690
|
+
|
|
691
|
+
// ../../node_modules/.bun/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/items2020.js
|
|
692
|
+
var require_items2020 = __commonJS({
|
|
693
|
+
"../../node_modules/.bun/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/items2020.js"(exports) {
|
|
694
|
+
"use strict";
|
|
695
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
696
|
+
var codegen_1 = require_codegen();
|
|
697
|
+
var util_1 = require_util();
|
|
698
|
+
var code_1 = require_code();
|
|
699
|
+
var additionalItems_1 = require_additionalItems();
|
|
700
|
+
var error = {
|
|
701
|
+
message: ({ params: { len } }) => (0, codegen_1.str)`must NOT have more than ${len} items`,
|
|
702
|
+
params: ({ params: { len } }) => (0, codegen_1._)`{limit: ${len}}`
|
|
703
|
+
};
|
|
704
|
+
var def = {
|
|
705
|
+
keyword: "items",
|
|
706
|
+
type: "array",
|
|
707
|
+
schemaType: ["object", "boolean"],
|
|
708
|
+
before: "uniqueItems",
|
|
709
|
+
error,
|
|
710
|
+
code(cxt) {
|
|
711
|
+
const { schema, parentSchema, it } = cxt;
|
|
712
|
+
const { prefixItems } = parentSchema;
|
|
713
|
+
it.items = true;
|
|
714
|
+
if ((0, util_1.alwaysValidSchema)(it, schema))
|
|
715
|
+
return;
|
|
716
|
+
if (prefixItems)
|
|
717
|
+
(0, additionalItems_1.validateAdditionalItems)(cxt, prefixItems);
|
|
718
|
+
else
|
|
719
|
+
cxt.ok((0, code_1.validateArray)(cxt));
|
|
720
|
+
}
|
|
721
|
+
};
|
|
722
|
+
exports.default = def;
|
|
723
|
+
}
|
|
724
|
+
});
|
|
725
|
+
|
|
726
|
+
// ../../node_modules/.bun/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/contains.js
|
|
727
|
+
var require_contains = __commonJS({
|
|
728
|
+
"../../node_modules/.bun/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/contains.js"(exports) {
|
|
729
|
+
"use strict";
|
|
730
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
731
|
+
var codegen_1 = require_codegen();
|
|
732
|
+
var util_1 = require_util();
|
|
733
|
+
var error = {
|
|
734
|
+
message: ({ params: { min, max } }) => max === void 0 ? (0, codegen_1.str)`must contain at least ${min} valid item(s)` : (0, codegen_1.str)`must contain at least ${min} and no more than ${max} valid item(s)`,
|
|
735
|
+
params: ({ params: { min, max } }) => max === void 0 ? (0, codegen_1._)`{minContains: ${min}}` : (0, codegen_1._)`{minContains: ${min}, maxContains: ${max}}`
|
|
736
|
+
};
|
|
737
|
+
var def = {
|
|
738
|
+
keyword: "contains",
|
|
739
|
+
type: "array",
|
|
740
|
+
schemaType: ["object", "boolean"],
|
|
741
|
+
before: "uniqueItems",
|
|
742
|
+
trackErrors: true,
|
|
743
|
+
error,
|
|
744
|
+
code(cxt) {
|
|
745
|
+
const { gen, schema, parentSchema, data, it } = cxt;
|
|
746
|
+
let min;
|
|
747
|
+
let max;
|
|
748
|
+
const { minContains, maxContains } = parentSchema;
|
|
749
|
+
if (it.opts.next) {
|
|
750
|
+
min = minContains === void 0 ? 1 : minContains;
|
|
751
|
+
max = maxContains;
|
|
752
|
+
} else {
|
|
753
|
+
min = 1;
|
|
754
|
+
}
|
|
755
|
+
const len = gen.const("len", (0, codegen_1._)`${data}.length`);
|
|
756
|
+
cxt.setParams({ min, max });
|
|
757
|
+
if (max === void 0 && min === 0) {
|
|
758
|
+
(0, util_1.checkStrictMode)(it, `"minContains" == 0 without "maxContains": "contains" keyword ignored`);
|
|
759
|
+
return;
|
|
760
|
+
}
|
|
761
|
+
if (max !== void 0 && min > max) {
|
|
762
|
+
(0, util_1.checkStrictMode)(it, `"minContains" > "maxContains" is always invalid`);
|
|
763
|
+
cxt.fail();
|
|
764
|
+
return;
|
|
765
|
+
}
|
|
766
|
+
if ((0, util_1.alwaysValidSchema)(it, schema)) {
|
|
767
|
+
let cond = (0, codegen_1._)`${len} >= ${min}`;
|
|
768
|
+
if (max !== void 0)
|
|
769
|
+
cond = (0, codegen_1._)`${cond} && ${len} <= ${max}`;
|
|
770
|
+
cxt.pass(cond);
|
|
771
|
+
return;
|
|
772
|
+
}
|
|
773
|
+
it.items = true;
|
|
774
|
+
const valid = gen.name("valid");
|
|
775
|
+
if (max === void 0 && min === 1) {
|
|
776
|
+
validateItems(valid, () => gen.if(valid, () => gen.break()));
|
|
777
|
+
} else if (min === 0) {
|
|
778
|
+
gen.let(valid, true);
|
|
779
|
+
if (max !== void 0)
|
|
780
|
+
gen.if((0, codegen_1._)`${data}.length > 0`, validateItemsWithCount);
|
|
781
|
+
} else {
|
|
782
|
+
gen.let(valid, false);
|
|
783
|
+
validateItemsWithCount();
|
|
784
|
+
}
|
|
785
|
+
cxt.result(valid, () => cxt.reset());
|
|
786
|
+
function validateItemsWithCount() {
|
|
787
|
+
const schValid = gen.name("_valid");
|
|
788
|
+
const count = gen.let("count", 0);
|
|
789
|
+
validateItems(schValid, () => gen.if(schValid, () => checkLimits(count)));
|
|
790
|
+
}
|
|
791
|
+
function validateItems(_valid, block) {
|
|
792
|
+
gen.forRange("i", 0, len, (i) => {
|
|
793
|
+
cxt.subschema({
|
|
794
|
+
keyword: "contains",
|
|
795
|
+
dataProp: i,
|
|
796
|
+
dataPropType: util_1.Type.Num,
|
|
797
|
+
compositeRule: true
|
|
798
|
+
}, _valid);
|
|
799
|
+
block();
|
|
800
|
+
});
|
|
801
|
+
}
|
|
802
|
+
function checkLimits(count) {
|
|
803
|
+
gen.code((0, codegen_1._)`${count}++`);
|
|
804
|
+
if (max === void 0) {
|
|
805
|
+
gen.if((0, codegen_1._)`${count} >= ${min}`, () => gen.assign(valid, true).break());
|
|
806
|
+
} else {
|
|
807
|
+
gen.if((0, codegen_1._)`${count} > ${max}`, () => gen.assign(valid, false).break());
|
|
808
|
+
if (min === 1)
|
|
809
|
+
gen.assign(valid, true);
|
|
810
|
+
else
|
|
811
|
+
gen.if((0, codegen_1._)`${count} >= ${min}`, () => gen.assign(valid, true));
|
|
812
|
+
}
|
|
813
|
+
}
|
|
814
|
+
}
|
|
815
|
+
};
|
|
816
|
+
exports.default = def;
|
|
817
|
+
}
|
|
818
|
+
});
|
|
819
|
+
|
|
820
|
+
// ../../node_modules/.bun/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/dependencies.js
|
|
821
|
+
var require_dependencies = __commonJS({
|
|
822
|
+
"../../node_modules/.bun/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/dependencies.js"(exports) {
|
|
823
|
+
"use strict";
|
|
824
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
825
|
+
exports.validateSchemaDeps = exports.validatePropertyDeps = exports.error = void 0;
|
|
826
|
+
var codegen_1 = require_codegen();
|
|
827
|
+
var util_1 = require_util();
|
|
828
|
+
var code_1 = require_code();
|
|
829
|
+
exports.error = {
|
|
830
|
+
message: ({ params: { property, depsCount, deps } }) => {
|
|
831
|
+
const property_ies = depsCount === 1 ? "property" : "properties";
|
|
832
|
+
return (0, codegen_1.str)`must have ${property_ies} ${deps} when property ${property} is present`;
|
|
833
|
+
},
|
|
834
|
+
params: ({ params: { property, depsCount, deps, missingProperty } }) => (0, codegen_1._)`{property: ${property},
|
|
835
|
+
missingProperty: ${missingProperty},
|
|
836
|
+
depsCount: ${depsCount},
|
|
837
|
+
deps: ${deps}}`
|
|
838
|
+
// TODO change to reference
|
|
839
|
+
};
|
|
840
|
+
var def = {
|
|
841
|
+
keyword: "dependencies",
|
|
842
|
+
type: "object",
|
|
843
|
+
schemaType: "object",
|
|
844
|
+
error: exports.error,
|
|
845
|
+
code(cxt) {
|
|
846
|
+
const [propDeps, schDeps] = splitDependencies(cxt);
|
|
847
|
+
validatePropertyDeps(cxt, propDeps);
|
|
848
|
+
validateSchemaDeps(cxt, schDeps);
|
|
849
|
+
}
|
|
850
|
+
};
|
|
851
|
+
function splitDependencies({ schema }) {
|
|
852
|
+
const propertyDeps = {};
|
|
853
|
+
const schemaDeps = {};
|
|
854
|
+
for (const key in schema) {
|
|
855
|
+
if (key === "__proto__")
|
|
856
|
+
continue;
|
|
857
|
+
const deps = Array.isArray(schema[key]) ? propertyDeps : schemaDeps;
|
|
858
|
+
deps[key] = schema[key];
|
|
859
|
+
}
|
|
860
|
+
return [propertyDeps, schemaDeps];
|
|
861
|
+
}
|
|
862
|
+
function validatePropertyDeps(cxt, propertyDeps = cxt.schema) {
|
|
863
|
+
const { gen, data, it } = cxt;
|
|
864
|
+
if (Object.keys(propertyDeps).length === 0)
|
|
865
|
+
return;
|
|
866
|
+
const missing = gen.let("missing");
|
|
867
|
+
for (const prop in propertyDeps) {
|
|
868
|
+
const deps = propertyDeps[prop];
|
|
869
|
+
if (deps.length === 0)
|
|
870
|
+
continue;
|
|
871
|
+
const hasProperty = (0, code_1.propertyInData)(gen, data, prop, it.opts.ownProperties);
|
|
872
|
+
cxt.setParams({
|
|
873
|
+
property: prop,
|
|
874
|
+
depsCount: deps.length,
|
|
875
|
+
deps: deps.join(", ")
|
|
876
|
+
});
|
|
877
|
+
if (it.allErrors) {
|
|
878
|
+
gen.if(hasProperty, () => {
|
|
879
|
+
for (const depProp of deps) {
|
|
880
|
+
(0, code_1.checkReportMissingProp)(cxt, depProp);
|
|
881
|
+
}
|
|
882
|
+
});
|
|
883
|
+
} else {
|
|
884
|
+
gen.if((0, codegen_1._)`${hasProperty} && (${(0, code_1.checkMissingProp)(cxt, deps, missing)})`);
|
|
885
|
+
(0, code_1.reportMissingProp)(cxt, missing);
|
|
886
|
+
gen.else();
|
|
887
|
+
}
|
|
888
|
+
}
|
|
889
|
+
}
|
|
890
|
+
exports.validatePropertyDeps = validatePropertyDeps;
|
|
891
|
+
function validateSchemaDeps(cxt, schemaDeps = cxt.schema) {
|
|
892
|
+
const { gen, data, keyword, it } = cxt;
|
|
893
|
+
const valid = gen.name("valid");
|
|
894
|
+
for (const prop in schemaDeps) {
|
|
895
|
+
if ((0, util_1.alwaysValidSchema)(it, schemaDeps[prop]))
|
|
896
|
+
continue;
|
|
897
|
+
gen.if(
|
|
898
|
+
(0, code_1.propertyInData)(gen, data, prop, it.opts.ownProperties),
|
|
899
|
+
() => {
|
|
900
|
+
const schCxt = cxt.subschema({ keyword, schemaProp: prop }, valid);
|
|
901
|
+
cxt.mergeValidEvaluated(schCxt, valid);
|
|
902
|
+
},
|
|
903
|
+
() => gen.var(valid, true)
|
|
904
|
+
// TODO var
|
|
905
|
+
);
|
|
906
|
+
cxt.ok(valid);
|
|
907
|
+
}
|
|
908
|
+
}
|
|
909
|
+
exports.validateSchemaDeps = validateSchemaDeps;
|
|
910
|
+
exports.default = def;
|
|
911
|
+
}
|
|
912
|
+
});
|
|
913
|
+
|
|
914
|
+
// ../../node_modules/.bun/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/propertyNames.js
|
|
915
|
+
var require_propertyNames = __commonJS({
|
|
916
|
+
"../../node_modules/.bun/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/propertyNames.js"(exports) {
|
|
917
|
+
"use strict";
|
|
918
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
919
|
+
var codegen_1 = require_codegen();
|
|
920
|
+
var util_1 = require_util();
|
|
921
|
+
var error = {
|
|
922
|
+
message: "property name must be valid",
|
|
923
|
+
params: ({ params }) => (0, codegen_1._)`{propertyName: ${params.propertyName}}`
|
|
924
|
+
};
|
|
925
|
+
var def = {
|
|
926
|
+
keyword: "propertyNames",
|
|
927
|
+
type: "object",
|
|
928
|
+
schemaType: ["object", "boolean"],
|
|
929
|
+
error,
|
|
930
|
+
code(cxt) {
|
|
931
|
+
const { gen, schema, data, it } = cxt;
|
|
932
|
+
if ((0, util_1.alwaysValidSchema)(it, schema))
|
|
933
|
+
return;
|
|
934
|
+
const valid = gen.name("valid");
|
|
935
|
+
gen.forIn("key", data, (key) => {
|
|
936
|
+
cxt.setParams({ propertyName: key });
|
|
937
|
+
cxt.subschema({
|
|
938
|
+
keyword: "propertyNames",
|
|
939
|
+
data: key,
|
|
940
|
+
dataTypes: ["string"],
|
|
941
|
+
propertyName: key,
|
|
942
|
+
compositeRule: true
|
|
943
|
+
}, valid);
|
|
944
|
+
gen.if((0, codegen_1.not)(valid), () => {
|
|
945
|
+
cxt.error(true);
|
|
946
|
+
if (!it.allErrors)
|
|
947
|
+
gen.break();
|
|
948
|
+
});
|
|
949
|
+
});
|
|
950
|
+
cxt.ok(valid);
|
|
951
|
+
}
|
|
952
|
+
};
|
|
953
|
+
exports.default = def;
|
|
954
|
+
}
|
|
955
|
+
});
|
|
956
|
+
|
|
957
|
+
// ../../node_modules/.bun/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/additionalProperties.js
|
|
958
|
+
var require_additionalProperties = __commonJS({
|
|
959
|
+
"../../node_modules/.bun/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/additionalProperties.js"(exports) {
|
|
960
|
+
"use strict";
|
|
961
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
962
|
+
var code_1 = require_code();
|
|
963
|
+
var codegen_1 = require_codegen();
|
|
964
|
+
var names_1 = require_names();
|
|
965
|
+
var util_1 = require_util();
|
|
966
|
+
var error = {
|
|
967
|
+
message: "must NOT have additional properties",
|
|
968
|
+
params: ({ params }) => (0, codegen_1._)`{additionalProperty: ${params.additionalProperty}}`
|
|
969
|
+
};
|
|
970
|
+
var def = {
|
|
971
|
+
keyword: "additionalProperties",
|
|
972
|
+
type: ["object"],
|
|
973
|
+
schemaType: ["boolean", "object"],
|
|
974
|
+
allowUndefined: true,
|
|
975
|
+
trackErrors: true,
|
|
976
|
+
error,
|
|
977
|
+
code(cxt) {
|
|
978
|
+
const { gen, schema, parentSchema, data, errsCount, it } = cxt;
|
|
979
|
+
if (!errsCount)
|
|
980
|
+
throw new Error("ajv implementation error");
|
|
981
|
+
const { allErrors, opts } = it;
|
|
982
|
+
it.props = true;
|
|
983
|
+
if (opts.removeAdditional !== "all" && (0, util_1.alwaysValidSchema)(it, schema))
|
|
984
|
+
return;
|
|
985
|
+
const props = (0, code_1.allSchemaProperties)(parentSchema.properties);
|
|
986
|
+
const patProps = (0, code_1.allSchemaProperties)(parentSchema.patternProperties);
|
|
987
|
+
checkAdditionalProperties();
|
|
988
|
+
cxt.ok((0, codegen_1._)`${errsCount} === ${names_1.default.errors}`);
|
|
989
|
+
function checkAdditionalProperties() {
|
|
990
|
+
gen.forIn("key", data, (key) => {
|
|
991
|
+
if (!props.length && !patProps.length)
|
|
992
|
+
additionalPropertyCode(key);
|
|
993
|
+
else
|
|
994
|
+
gen.if(isAdditional(key), () => additionalPropertyCode(key));
|
|
995
|
+
});
|
|
996
|
+
}
|
|
997
|
+
function isAdditional(key) {
|
|
998
|
+
let definedProp;
|
|
999
|
+
if (props.length > 8) {
|
|
1000
|
+
const propsSchema = (0, util_1.schemaRefOrVal)(it, parentSchema.properties, "properties");
|
|
1001
|
+
definedProp = (0, code_1.isOwnProperty)(gen, propsSchema, key);
|
|
1002
|
+
} else if (props.length) {
|
|
1003
|
+
definedProp = (0, codegen_1.or)(...props.map((p) => (0, codegen_1._)`${key} === ${p}`));
|
|
1004
|
+
} else {
|
|
1005
|
+
definedProp = codegen_1.nil;
|
|
1006
|
+
}
|
|
1007
|
+
if (patProps.length) {
|
|
1008
|
+
definedProp = (0, codegen_1.or)(definedProp, ...patProps.map((p) => (0, codegen_1._)`${(0, code_1.usePattern)(cxt, p)}.test(${key})`));
|
|
1009
|
+
}
|
|
1010
|
+
return (0, codegen_1.not)(definedProp);
|
|
1011
|
+
}
|
|
1012
|
+
function deleteAdditional(key) {
|
|
1013
|
+
gen.code((0, codegen_1._)`delete ${data}[${key}]`);
|
|
1014
|
+
}
|
|
1015
|
+
function additionalPropertyCode(key) {
|
|
1016
|
+
if (opts.removeAdditional === "all" || opts.removeAdditional && schema === false) {
|
|
1017
|
+
deleteAdditional(key);
|
|
1018
|
+
return;
|
|
1019
|
+
}
|
|
1020
|
+
if (schema === false) {
|
|
1021
|
+
cxt.setParams({ additionalProperty: key });
|
|
1022
|
+
cxt.error();
|
|
1023
|
+
if (!allErrors)
|
|
1024
|
+
gen.break();
|
|
1025
|
+
return;
|
|
1026
|
+
}
|
|
1027
|
+
if (typeof schema == "object" && !(0, util_1.alwaysValidSchema)(it, schema)) {
|
|
1028
|
+
const valid = gen.name("valid");
|
|
1029
|
+
if (opts.removeAdditional === "failing") {
|
|
1030
|
+
applyAdditionalSchema(key, valid, false);
|
|
1031
|
+
gen.if((0, codegen_1.not)(valid), () => {
|
|
1032
|
+
cxt.reset();
|
|
1033
|
+
deleteAdditional(key);
|
|
1034
|
+
});
|
|
1035
|
+
} else {
|
|
1036
|
+
applyAdditionalSchema(key, valid);
|
|
1037
|
+
if (!allErrors)
|
|
1038
|
+
gen.if((0, codegen_1.not)(valid), () => gen.break());
|
|
1039
|
+
}
|
|
1040
|
+
}
|
|
1041
|
+
}
|
|
1042
|
+
function applyAdditionalSchema(key, valid, errors) {
|
|
1043
|
+
const subschema = {
|
|
1044
|
+
keyword: "additionalProperties",
|
|
1045
|
+
dataProp: key,
|
|
1046
|
+
dataPropType: util_1.Type.Str
|
|
1047
|
+
};
|
|
1048
|
+
if (errors === false) {
|
|
1049
|
+
Object.assign(subschema, {
|
|
1050
|
+
compositeRule: true,
|
|
1051
|
+
createErrors: false,
|
|
1052
|
+
allErrors: false
|
|
1053
|
+
});
|
|
1054
|
+
}
|
|
1055
|
+
cxt.subschema(subschema, valid);
|
|
1056
|
+
}
|
|
1057
|
+
}
|
|
1058
|
+
};
|
|
1059
|
+
exports.default = def;
|
|
1060
|
+
}
|
|
1061
|
+
});
|
|
1062
|
+
|
|
1063
|
+
// ../../node_modules/.bun/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/properties.js
|
|
1064
|
+
var require_properties = __commonJS({
|
|
1065
|
+
"../../node_modules/.bun/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/properties.js"(exports) {
|
|
1066
|
+
"use strict";
|
|
1067
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1068
|
+
var validate_1 = require_validate();
|
|
1069
|
+
var code_1 = require_code();
|
|
1070
|
+
var util_1 = require_util();
|
|
1071
|
+
var additionalProperties_1 = require_additionalProperties();
|
|
1072
|
+
var def = {
|
|
1073
|
+
keyword: "properties",
|
|
1074
|
+
type: "object",
|
|
1075
|
+
schemaType: "object",
|
|
1076
|
+
code(cxt) {
|
|
1077
|
+
const { gen, schema, parentSchema, data, it } = cxt;
|
|
1078
|
+
if (it.opts.removeAdditional === "all" && parentSchema.additionalProperties === void 0) {
|
|
1079
|
+
additionalProperties_1.default.code(new validate_1.KeywordCxt(it, additionalProperties_1.default, "additionalProperties"));
|
|
1080
|
+
}
|
|
1081
|
+
const allProps = (0, code_1.allSchemaProperties)(schema);
|
|
1082
|
+
for (const prop of allProps) {
|
|
1083
|
+
it.definedProperties.add(prop);
|
|
1084
|
+
}
|
|
1085
|
+
if (it.opts.unevaluated && allProps.length && it.props !== true) {
|
|
1086
|
+
it.props = util_1.mergeEvaluated.props(gen, (0, util_1.toHash)(allProps), it.props);
|
|
1087
|
+
}
|
|
1088
|
+
const properties = allProps.filter((p) => !(0, util_1.alwaysValidSchema)(it, schema[p]));
|
|
1089
|
+
if (properties.length === 0)
|
|
1090
|
+
return;
|
|
1091
|
+
const valid = gen.name("valid");
|
|
1092
|
+
for (const prop of properties) {
|
|
1093
|
+
if (hasDefault(prop)) {
|
|
1094
|
+
applyPropertySchema(prop);
|
|
1095
|
+
} else {
|
|
1096
|
+
gen.if((0, code_1.propertyInData)(gen, data, prop, it.opts.ownProperties));
|
|
1097
|
+
applyPropertySchema(prop);
|
|
1098
|
+
if (!it.allErrors)
|
|
1099
|
+
gen.else().var(valid, true);
|
|
1100
|
+
gen.endIf();
|
|
1101
|
+
}
|
|
1102
|
+
cxt.it.definedProperties.add(prop);
|
|
1103
|
+
cxt.ok(valid);
|
|
1104
|
+
}
|
|
1105
|
+
function hasDefault(prop) {
|
|
1106
|
+
return it.opts.useDefaults && !it.compositeRule && schema[prop].default !== void 0;
|
|
1107
|
+
}
|
|
1108
|
+
function applyPropertySchema(prop) {
|
|
1109
|
+
cxt.subschema({
|
|
1110
|
+
keyword: "properties",
|
|
1111
|
+
schemaProp: prop,
|
|
1112
|
+
dataProp: prop
|
|
1113
|
+
}, valid);
|
|
1114
|
+
}
|
|
1115
|
+
}
|
|
1116
|
+
};
|
|
1117
|
+
exports.default = def;
|
|
1118
|
+
}
|
|
1119
|
+
});
|
|
1120
|
+
|
|
1121
|
+
// ../../node_modules/.bun/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/patternProperties.js
|
|
1122
|
+
var require_patternProperties = __commonJS({
|
|
1123
|
+
"../../node_modules/.bun/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/patternProperties.js"(exports) {
|
|
1124
|
+
"use strict";
|
|
1125
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1126
|
+
var code_1 = require_code();
|
|
1127
|
+
var codegen_1 = require_codegen();
|
|
1128
|
+
var util_1 = require_util();
|
|
1129
|
+
var util_2 = require_util();
|
|
1130
|
+
var def = {
|
|
1131
|
+
keyword: "patternProperties",
|
|
1132
|
+
type: "object",
|
|
1133
|
+
schemaType: "object",
|
|
1134
|
+
code(cxt) {
|
|
1135
|
+
const { gen, schema, data, parentSchema, it } = cxt;
|
|
1136
|
+
const { opts } = it;
|
|
1137
|
+
const patterns = (0, code_1.allSchemaProperties)(schema);
|
|
1138
|
+
const alwaysValidPatterns = patterns.filter((p) => (0, util_1.alwaysValidSchema)(it, schema[p]));
|
|
1139
|
+
if (patterns.length === 0 || alwaysValidPatterns.length === patterns.length && (!it.opts.unevaluated || it.props === true)) {
|
|
1140
|
+
return;
|
|
1141
|
+
}
|
|
1142
|
+
const checkProperties = opts.strictSchema && !opts.allowMatchingProperties && parentSchema.properties;
|
|
1143
|
+
const valid = gen.name("valid");
|
|
1144
|
+
if (it.props !== true && !(it.props instanceof codegen_1.Name)) {
|
|
1145
|
+
it.props = (0, util_2.evaluatedPropsToName)(gen, it.props);
|
|
1146
|
+
}
|
|
1147
|
+
const { props } = it;
|
|
1148
|
+
validatePatternProperties();
|
|
1149
|
+
function validatePatternProperties() {
|
|
1150
|
+
for (const pat of patterns) {
|
|
1151
|
+
if (checkProperties)
|
|
1152
|
+
checkMatchingProperties(pat);
|
|
1153
|
+
if (it.allErrors) {
|
|
1154
|
+
validateProperties(pat);
|
|
1155
|
+
} else {
|
|
1156
|
+
gen.var(valid, true);
|
|
1157
|
+
validateProperties(pat);
|
|
1158
|
+
gen.if(valid);
|
|
1159
|
+
}
|
|
1160
|
+
}
|
|
1161
|
+
}
|
|
1162
|
+
function checkMatchingProperties(pat) {
|
|
1163
|
+
for (const prop in checkProperties) {
|
|
1164
|
+
if (new RegExp(pat).test(prop)) {
|
|
1165
|
+
(0, util_1.checkStrictMode)(it, `property ${prop} matches pattern ${pat} (use allowMatchingProperties)`);
|
|
1166
|
+
}
|
|
1167
|
+
}
|
|
1168
|
+
}
|
|
1169
|
+
function validateProperties(pat) {
|
|
1170
|
+
gen.forIn("key", data, (key) => {
|
|
1171
|
+
gen.if((0, codegen_1._)`${(0, code_1.usePattern)(cxt, pat)}.test(${key})`, () => {
|
|
1172
|
+
const alwaysValid = alwaysValidPatterns.includes(pat);
|
|
1173
|
+
if (!alwaysValid) {
|
|
1174
|
+
cxt.subschema({
|
|
1175
|
+
keyword: "patternProperties",
|
|
1176
|
+
schemaProp: pat,
|
|
1177
|
+
dataProp: key,
|
|
1178
|
+
dataPropType: util_2.Type.Str
|
|
1179
|
+
}, valid);
|
|
1180
|
+
}
|
|
1181
|
+
if (it.opts.unevaluated && props !== true) {
|
|
1182
|
+
gen.assign((0, codegen_1._)`${props}[${key}]`, true);
|
|
1183
|
+
} else if (!alwaysValid && !it.allErrors) {
|
|
1184
|
+
gen.if((0, codegen_1.not)(valid), () => gen.break());
|
|
1185
|
+
}
|
|
1186
|
+
});
|
|
1187
|
+
});
|
|
1188
|
+
}
|
|
1189
|
+
}
|
|
1190
|
+
};
|
|
1191
|
+
exports.default = def;
|
|
1192
|
+
}
|
|
1193
|
+
});
|
|
1194
|
+
|
|
1195
|
+
// ../../node_modules/.bun/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/not.js
|
|
1196
|
+
var require_not = __commonJS({
|
|
1197
|
+
"../../node_modules/.bun/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/not.js"(exports) {
|
|
1198
|
+
"use strict";
|
|
1199
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1200
|
+
var util_1 = require_util();
|
|
1201
|
+
var def = {
|
|
1202
|
+
keyword: "not",
|
|
1203
|
+
schemaType: ["object", "boolean"],
|
|
1204
|
+
trackErrors: true,
|
|
1205
|
+
code(cxt) {
|
|
1206
|
+
const { gen, schema, it } = cxt;
|
|
1207
|
+
if ((0, util_1.alwaysValidSchema)(it, schema)) {
|
|
1208
|
+
cxt.fail();
|
|
1209
|
+
return;
|
|
1210
|
+
}
|
|
1211
|
+
const valid = gen.name("valid");
|
|
1212
|
+
cxt.subschema({
|
|
1213
|
+
keyword: "not",
|
|
1214
|
+
compositeRule: true,
|
|
1215
|
+
createErrors: false,
|
|
1216
|
+
allErrors: false
|
|
1217
|
+
}, valid);
|
|
1218
|
+
cxt.failResult(valid, () => cxt.reset(), () => cxt.error());
|
|
1219
|
+
},
|
|
1220
|
+
error: { message: "must NOT be valid" }
|
|
1221
|
+
};
|
|
1222
|
+
exports.default = def;
|
|
1223
|
+
}
|
|
1224
|
+
});
|
|
1225
|
+
|
|
1226
|
+
// ../../node_modules/.bun/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/anyOf.js
|
|
1227
|
+
var require_anyOf = __commonJS({
|
|
1228
|
+
"../../node_modules/.bun/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/anyOf.js"(exports) {
|
|
1229
|
+
"use strict";
|
|
1230
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1231
|
+
var code_1 = require_code();
|
|
1232
|
+
var def = {
|
|
1233
|
+
keyword: "anyOf",
|
|
1234
|
+
schemaType: "array",
|
|
1235
|
+
trackErrors: true,
|
|
1236
|
+
code: code_1.validateUnion,
|
|
1237
|
+
error: { message: "must match a schema in anyOf" }
|
|
1238
|
+
};
|
|
1239
|
+
exports.default = def;
|
|
1240
|
+
}
|
|
1241
|
+
});
|
|
1242
|
+
|
|
1243
|
+
// ../../node_modules/.bun/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/oneOf.js
|
|
1244
|
+
var require_oneOf = __commonJS({
|
|
1245
|
+
"../../node_modules/.bun/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/oneOf.js"(exports) {
|
|
1246
|
+
"use strict";
|
|
1247
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1248
|
+
var codegen_1 = require_codegen();
|
|
1249
|
+
var util_1 = require_util();
|
|
1250
|
+
var error = {
|
|
1251
|
+
message: "must match exactly one schema in oneOf",
|
|
1252
|
+
params: ({ params }) => (0, codegen_1._)`{passingSchemas: ${params.passing}}`
|
|
1253
|
+
};
|
|
1254
|
+
var def = {
|
|
1255
|
+
keyword: "oneOf",
|
|
1256
|
+
schemaType: "array",
|
|
1257
|
+
trackErrors: true,
|
|
1258
|
+
error,
|
|
1259
|
+
code(cxt) {
|
|
1260
|
+
const { gen, schema, parentSchema, it } = cxt;
|
|
1261
|
+
if (!Array.isArray(schema))
|
|
1262
|
+
throw new Error("ajv implementation error");
|
|
1263
|
+
if (it.opts.discriminator && parentSchema.discriminator)
|
|
1264
|
+
return;
|
|
1265
|
+
const schArr = schema;
|
|
1266
|
+
const valid = gen.let("valid", false);
|
|
1267
|
+
const passing = gen.let("passing", null);
|
|
1268
|
+
const schValid = gen.name("_valid");
|
|
1269
|
+
cxt.setParams({ passing });
|
|
1270
|
+
gen.block(validateOneOf);
|
|
1271
|
+
cxt.result(valid, () => cxt.reset(), () => cxt.error(true));
|
|
1272
|
+
function validateOneOf() {
|
|
1273
|
+
schArr.forEach((sch, i) => {
|
|
1274
|
+
let schCxt;
|
|
1275
|
+
if ((0, util_1.alwaysValidSchema)(it, sch)) {
|
|
1276
|
+
gen.var(schValid, true);
|
|
1277
|
+
} else {
|
|
1278
|
+
schCxt = cxt.subschema({
|
|
1279
|
+
keyword: "oneOf",
|
|
1280
|
+
schemaProp: i,
|
|
1281
|
+
compositeRule: true
|
|
1282
|
+
}, schValid);
|
|
1283
|
+
}
|
|
1284
|
+
if (i > 0) {
|
|
1285
|
+
gen.if((0, codegen_1._)`${schValid} && ${valid}`).assign(valid, false).assign(passing, (0, codegen_1._)`[${passing}, ${i}]`).else();
|
|
1286
|
+
}
|
|
1287
|
+
gen.if(schValid, () => {
|
|
1288
|
+
gen.assign(valid, true);
|
|
1289
|
+
gen.assign(passing, i);
|
|
1290
|
+
if (schCxt)
|
|
1291
|
+
cxt.mergeEvaluated(schCxt, codegen_1.Name);
|
|
1292
|
+
});
|
|
1293
|
+
});
|
|
1294
|
+
}
|
|
1295
|
+
}
|
|
1296
|
+
};
|
|
1297
|
+
exports.default = def;
|
|
1298
|
+
}
|
|
1299
|
+
});
|
|
1300
|
+
|
|
1301
|
+
// ../../node_modules/.bun/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/allOf.js
|
|
1302
|
+
var require_allOf = __commonJS({
|
|
1303
|
+
"../../node_modules/.bun/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/allOf.js"(exports) {
|
|
1304
|
+
"use strict";
|
|
1305
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1306
|
+
var util_1 = require_util();
|
|
1307
|
+
var def = {
|
|
1308
|
+
keyword: "allOf",
|
|
1309
|
+
schemaType: "array",
|
|
1310
|
+
code(cxt) {
|
|
1311
|
+
const { gen, schema, it } = cxt;
|
|
1312
|
+
if (!Array.isArray(schema))
|
|
1313
|
+
throw new Error("ajv implementation error");
|
|
1314
|
+
const valid = gen.name("valid");
|
|
1315
|
+
schema.forEach((sch, i) => {
|
|
1316
|
+
if ((0, util_1.alwaysValidSchema)(it, sch))
|
|
1317
|
+
return;
|
|
1318
|
+
const schCxt = cxt.subschema({ keyword: "allOf", schemaProp: i }, valid);
|
|
1319
|
+
cxt.ok(valid);
|
|
1320
|
+
cxt.mergeEvaluated(schCxt);
|
|
1321
|
+
});
|
|
1322
|
+
}
|
|
1323
|
+
};
|
|
1324
|
+
exports.default = def;
|
|
1325
|
+
}
|
|
1326
|
+
});
|
|
1327
|
+
|
|
1328
|
+
// ../../node_modules/.bun/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/if.js
|
|
1329
|
+
var require_if = __commonJS({
|
|
1330
|
+
"../../node_modules/.bun/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/if.js"(exports) {
|
|
1331
|
+
"use strict";
|
|
1332
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1333
|
+
var codegen_1 = require_codegen();
|
|
1334
|
+
var util_1 = require_util();
|
|
1335
|
+
var error = {
|
|
1336
|
+
message: ({ params }) => (0, codegen_1.str)`must match "${params.ifClause}" schema`,
|
|
1337
|
+
params: ({ params }) => (0, codegen_1._)`{failingKeyword: ${params.ifClause}}`
|
|
1338
|
+
};
|
|
1339
|
+
var def = {
|
|
1340
|
+
keyword: "if",
|
|
1341
|
+
schemaType: ["object", "boolean"],
|
|
1342
|
+
trackErrors: true,
|
|
1343
|
+
error,
|
|
1344
|
+
code(cxt) {
|
|
1345
|
+
const { gen, parentSchema, it } = cxt;
|
|
1346
|
+
if (parentSchema.then === void 0 && parentSchema.else === void 0) {
|
|
1347
|
+
(0, util_1.checkStrictMode)(it, '"if" without "then" and "else" is ignored');
|
|
1348
|
+
}
|
|
1349
|
+
const hasThen = hasSchema(it, "then");
|
|
1350
|
+
const hasElse = hasSchema(it, "else");
|
|
1351
|
+
if (!hasThen && !hasElse)
|
|
1352
|
+
return;
|
|
1353
|
+
const valid = gen.let("valid", true);
|
|
1354
|
+
const schValid = gen.name("_valid");
|
|
1355
|
+
validateIf();
|
|
1356
|
+
cxt.reset();
|
|
1357
|
+
if (hasThen && hasElse) {
|
|
1358
|
+
const ifClause = gen.let("ifClause");
|
|
1359
|
+
cxt.setParams({ ifClause });
|
|
1360
|
+
gen.if(schValid, validateClause("then", ifClause), validateClause("else", ifClause));
|
|
1361
|
+
} else if (hasThen) {
|
|
1362
|
+
gen.if(schValid, validateClause("then"));
|
|
1363
|
+
} else {
|
|
1364
|
+
gen.if((0, codegen_1.not)(schValid), validateClause("else"));
|
|
1365
|
+
}
|
|
1366
|
+
cxt.pass(valid, () => cxt.error(true));
|
|
1367
|
+
function validateIf() {
|
|
1368
|
+
const schCxt = cxt.subschema({
|
|
1369
|
+
keyword: "if",
|
|
1370
|
+
compositeRule: true,
|
|
1371
|
+
createErrors: false,
|
|
1372
|
+
allErrors: false
|
|
1373
|
+
}, schValid);
|
|
1374
|
+
cxt.mergeEvaluated(schCxt);
|
|
1375
|
+
}
|
|
1376
|
+
function validateClause(keyword, ifClause) {
|
|
1377
|
+
return () => {
|
|
1378
|
+
const schCxt = cxt.subschema({ keyword }, schValid);
|
|
1379
|
+
gen.assign(valid, schValid);
|
|
1380
|
+
cxt.mergeValidEvaluated(schCxt, valid);
|
|
1381
|
+
if (ifClause)
|
|
1382
|
+
gen.assign(ifClause, (0, codegen_1._)`${keyword}`);
|
|
1383
|
+
else
|
|
1384
|
+
cxt.setParams({ ifClause: keyword });
|
|
1385
|
+
};
|
|
1386
|
+
}
|
|
1387
|
+
}
|
|
1388
|
+
};
|
|
1389
|
+
function hasSchema(it, keyword) {
|
|
1390
|
+
const schema = it.schema[keyword];
|
|
1391
|
+
return schema !== void 0 && !(0, util_1.alwaysValidSchema)(it, schema);
|
|
1392
|
+
}
|
|
1393
|
+
exports.default = def;
|
|
1394
|
+
}
|
|
1395
|
+
});
|
|
1396
|
+
|
|
1397
|
+
// ../../node_modules/.bun/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/thenElse.js
|
|
1398
|
+
var require_thenElse = __commonJS({
|
|
1399
|
+
"../../node_modules/.bun/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/thenElse.js"(exports) {
|
|
1400
|
+
"use strict";
|
|
1401
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1402
|
+
var util_1 = require_util();
|
|
1403
|
+
var def = {
|
|
1404
|
+
keyword: ["then", "else"],
|
|
1405
|
+
schemaType: ["object", "boolean"],
|
|
1406
|
+
code({ keyword, parentSchema, it }) {
|
|
1407
|
+
if (parentSchema.if === void 0)
|
|
1408
|
+
(0, util_1.checkStrictMode)(it, `"${keyword}" without "if" is ignored`);
|
|
1409
|
+
}
|
|
1410
|
+
};
|
|
1411
|
+
exports.default = def;
|
|
1412
|
+
}
|
|
1413
|
+
});
|
|
1414
|
+
|
|
1415
|
+
// ../../node_modules/.bun/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/index.js
|
|
1416
|
+
var require_applicator = __commonJS({
|
|
1417
|
+
"../../node_modules/.bun/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/index.js"(exports) {
|
|
1418
|
+
"use strict";
|
|
1419
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1420
|
+
var additionalItems_1 = require_additionalItems();
|
|
1421
|
+
var prefixItems_1 = require_prefixItems();
|
|
1422
|
+
var items_1 = require_items();
|
|
1423
|
+
var items2020_1 = require_items2020();
|
|
1424
|
+
var contains_1 = require_contains();
|
|
1425
|
+
var dependencies_1 = require_dependencies();
|
|
1426
|
+
var propertyNames_1 = require_propertyNames();
|
|
1427
|
+
var additionalProperties_1 = require_additionalProperties();
|
|
1428
|
+
var properties_1 = require_properties();
|
|
1429
|
+
var patternProperties_1 = require_patternProperties();
|
|
1430
|
+
var not_1 = require_not();
|
|
1431
|
+
var anyOf_1 = require_anyOf();
|
|
1432
|
+
var oneOf_1 = require_oneOf();
|
|
1433
|
+
var allOf_1 = require_allOf();
|
|
1434
|
+
var if_1 = require_if();
|
|
1435
|
+
var thenElse_1 = require_thenElse();
|
|
1436
|
+
function getApplicator(draft2020 = false) {
|
|
1437
|
+
const applicator = [
|
|
1438
|
+
// any
|
|
1439
|
+
not_1.default,
|
|
1440
|
+
anyOf_1.default,
|
|
1441
|
+
oneOf_1.default,
|
|
1442
|
+
allOf_1.default,
|
|
1443
|
+
if_1.default,
|
|
1444
|
+
thenElse_1.default,
|
|
1445
|
+
// object
|
|
1446
|
+
propertyNames_1.default,
|
|
1447
|
+
additionalProperties_1.default,
|
|
1448
|
+
dependencies_1.default,
|
|
1449
|
+
properties_1.default,
|
|
1450
|
+
patternProperties_1.default
|
|
1451
|
+
];
|
|
1452
|
+
if (draft2020)
|
|
1453
|
+
applicator.push(prefixItems_1.default, items2020_1.default);
|
|
1454
|
+
else
|
|
1455
|
+
applicator.push(additionalItems_1.default, items_1.default);
|
|
1456
|
+
applicator.push(contains_1.default);
|
|
1457
|
+
return applicator;
|
|
1458
|
+
}
|
|
1459
|
+
exports.default = getApplicator;
|
|
1460
|
+
}
|
|
1461
|
+
});
|
|
1462
|
+
|
|
1463
|
+
// ../../node_modules/.bun/ajv@8.20.0/node_modules/ajv/dist/vocabularies/dynamic/dynamicAnchor.js
|
|
1464
|
+
var require_dynamicAnchor = __commonJS({
|
|
1465
|
+
"../../node_modules/.bun/ajv@8.20.0/node_modules/ajv/dist/vocabularies/dynamic/dynamicAnchor.js"(exports) {
|
|
1466
|
+
"use strict";
|
|
1467
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1468
|
+
exports.dynamicAnchor = void 0;
|
|
1469
|
+
var codegen_1 = require_codegen();
|
|
1470
|
+
var names_1 = require_names();
|
|
1471
|
+
var compile_1 = require_compile();
|
|
1472
|
+
var ref_1 = require_ref();
|
|
1473
|
+
var def = {
|
|
1474
|
+
keyword: "$dynamicAnchor",
|
|
1475
|
+
schemaType: "string",
|
|
1476
|
+
code: (cxt) => dynamicAnchor(cxt, cxt.schema)
|
|
1477
|
+
};
|
|
1478
|
+
function dynamicAnchor(cxt, anchor) {
|
|
1479
|
+
const { gen, it } = cxt;
|
|
1480
|
+
it.schemaEnv.root.dynamicAnchors[anchor] = true;
|
|
1481
|
+
const v = (0, codegen_1._)`${names_1.default.dynamicAnchors}${(0, codegen_1.getProperty)(anchor)}`;
|
|
1482
|
+
const validate = it.errSchemaPath === "#" ? it.validateName : _getValidate(cxt);
|
|
1483
|
+
gen.if((0, codegen_1._)`!${v}`, () => gen.assign(v, validate));
|
|
1484
|
+
}
|
|
1485
|
+
exports.dynamicAnchor = dynamicAnchor;
|
|
1486
|
+
function _getValidate(cxt) {
|
|
1487
|
+
const { schemaEnv, schema, self } = cxt.it;
|
|
1488
|
+
const { root, baseId, localRefs, meta } = schemaEnv.root;
|
|
1489
|
+
const { schemaId } = self.opts;
|
|
1490
|
+
const sch = new compile_1.SchemaEnv({ schema, schemaId, root, baseId, localRefs, meta });
|
|
1491
|
+
compile_1.compileSchema.call(self, sch);
|
|
1492
|
+
return (0, ref_1.getValidate)(cxt, sch);
|
|
1493
|
+
}
|
|
1494
|
+
exports.default = def;
|
|
1495
|
+
}
|
|
1496
|
+
});
|
|
1497
|
+
|
|
1498
|
+
// ../../node_modules/.bun/ajv@8.20.0/node_modules/ajv/dist/vocabularies/dynamic/dynamicRef.js
|
|
1499
|
+
var require_dynamicRef = __commonJS({
|
|
1500
|
+
"../../node_modules/.bun/ajv@8.20.0/node_modules/ajv/dist/vocabularies/dynamic/dynamicRef.js"(exports) {
|
|
1501
|
+
"use strict";
|
|
1502
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1503
|
+
exports.dynamicRef = void 0;
|
|
1504
|
+
var codegen_1 = require_codegen();
|
|
1505
|
+
var names_1 = require_names();
|
|
1506
|
+
var ref_1 = require_ref();
|
|
1507
|
+
var def = {
|
|
1508
|
+
keyword: "$dynamicRef",
|
|
1509
|
+
schemaType: "string",
|
|
1510
|
+
code: (cxt) => dynamicRef(cxt, cxt.schema)
|
|
1511
|
+
};
|
|
1512
|
+
function dynamicRef(cxt, ref) {
|
|
1513
|
+
const { gen, keyword, it } = cxt;
|
|
1514
|
+
if (ref[0] !== "#")
|
|
1515
|
+
throw new Error(`"${keyword}" only supports hash fragment reference`);
|
|
1516
|
+
const anchor = ref.slice(1);
|
|
1517
|
+
if (it.allErrors) {
|
|
1518
|
+
_dynamicRef();
|
|
1519
|
+
} else {
|
|
1520
|
+
const valid = gen.let("valid", false);
|
|
1521
|
+
_dynamicRef(valid);
|
|
1522
|
+
cxt.ok(valid);
|
|
1523
|
+
}
|
|
1524
|
+
function _dynamicRef(valid) {
|
|
1525
|
+
if (it.schemaEnv.root.dynamicAnchors[anchor]) {
|
|
1526
|
+
const v = gen.let("_v", (0, codegen_1._)`${names_1.default.dynamicAnchors}${(0, codegen_1.getProperty)(anchor)}`);
|
|
1527
|
+
gen.if(v, _callRef(v, valid), _callRef(it.validateName, valid));
|
|
1528
|
+
} else {
|
|
1529
|
+
_callRef(it.validateName, valid)();
|
|
1530
|
+
}
|
|
1531
|
+
}
|
|
1532
|
+
function _callRef(validate, valid) {
|
|
1533
|
+
return valid ? () => gen.block(() => {
|
|
1534
|
+
(0, ref_1.callRef)(cxt, validate);
|
|
1535
|
+
gen.let(valid, true);
|
|
1536
|
+
}) : () => (0, ref_1.callRef)(cxt, validate);
|
|
1537
|
+
}
|
|
1538
|
+
}
|
|
1539
|
+
exports.dynamicRef = dynamicRef;
|
|
1540
|
+
exports.default = def;
|
|
1541
|
+
}
|
|
1542
|
+
});
|
|
1543
|
+
|
|
1544
|
+
// ../../node_modules/.bun/ajv@8.20.0/node_modules/ajv/dist/vocabularies/dynamic/recursiveAnchor.js
|
|
1545
|
+
var require_recursiveAnchor = __commonJS({
|
|
1546
|
+
"../../node_modules/.bun/ajv@8.20.0/node_modules/ajv/dist/vocabularies/dynamic/recursiveAnchor.js"(exports) {
|
|
1547
|
+
"use strict";
|
|
1548
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1549
|
+
var dynamicAnchor_1 = require_dynamicAnchor();
|
|
1550
|
+
var util_1 = require_util();
|
|
1551
|
+
var def = {
|
|
1552
|
+
keyword: "$recursiveAnchor",
|
|
1553
|
+
schemaType: "boolean",
|
|
1554
|
+
code(cxt) {
|
|
1555
|
+
if (cxt.schema)
|
|
1556
|
+
(0, dynamicAnchor_1.dynamicAnchor)(cxt, "");
|
|
1557
|
+
else
|
|
1558
|
+
(0, util_1.checkStrictMode)(cxt.it, "$recursiveAnchor: false is ignored");
|
|
1559
|
+
}
|
|
1560
|
+
};
|
|
1561
|
+
exports.default = def;
|
|
1562
|
+
}
|
|
1563
|
+
});
|
|
1564
|
+
|
|
1565
|
+
// ../../node_modules/.bun/ajv@8.20.0/node_modules/ajv/dist/vocabularies/dynamic/recursiveRef.js
|
|
1566
|
+
var require_recursiveRef = __commonJS({
|
|
1567
|
+
"../../node_modules/.bun/ajv@8.20.0/node_modules/ajv/dist/vocabularies/dynamic/recursiveRef.js"(exports) {
|
|
1568
|
+
"use strict";
|
|
1569
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1570
|
+
var dynamicRef_1 = require_dynamicRef();
|
|
1571
|
+
var def = {
|
|
1572
|
+
keyword: "$recursiveRef",
|
|
1573
|
+
schemaType: "string",
|
|
1574
|
+
code: (cxt) => (0, dynamicRef_1.dynamicRef)(cxt, cxt.schema)
|
|
1575
|
+
};
|
|
1576
|
+
exports.default = def;
|
|
1577
|
+
}
|
|
1578
|
+
});
|
|
1579
|
+
|
|
1580
|
+
// ../../node_modules/.bun/ajv@8.20.0/node_modules/ajv/dist/vocabularies/dynamic/index.js
|
|
1581
|
+
var require_dynamic = __commonJS({
|
|
1582
|
+
"../../node_modules/.bun/ajv@8.20.0/node_modules/ajv/dist/vocabularies/dynamic/index.js"(exports) {
|
|
1583
|
+
"use strict";
|
|
1584
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1585
|
+
var dynamicAnchor_1 = require_dynamicAnchor();
|
|
1586
|
+
var dynamicRef_1 = require_dynamicRef();
|
|
1587
|
+
var recursiveAnchor_1 = require_recursiveAnchor();
|
|
1588
|
+
var recursiveRef_1 = require_recursiveRef();
|
|
1589
|
+
var dynamic = [dynamicAnchor_1.default, dynamicRef_1.default, recursiveAnchor_1.default, recursiveRef_1.default];
|
|
1590
|
+
exports.default = dynamic;
|
|
1591
|
+
}
|
|
1592
|
+
});
|
|
1593
|
+
|
|
1594
|
+
// ../../node_modules/.bun/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/dependentRequired.js
|
|
1595
|
+
var require_dependentRequired = __commonJS({
|
|
1596
|
+
"../../node_modules/.bun/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/dependentRequired.js"(exports) {
|
|
1597
|
+
"use strict";
|
|
1598
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1599
|
+
var dependencies_1 = require_dependencies();
|
|
1600
|
+
var def = {
|
|
1601
|
+
keyword: "dependentRequired",
|
|
1602
|
+
type: "object",
|
|
1603
|
+
schemaType: "object",
|
|
1604
|
+
error: dependencies_1.error,
|
|
1605
|
+
code: (cxt) => (0, dependencies_1.validatePropertyDeps)(cxt)
|
|
1606
|
+
};
|
|
1607
|
+
exports.default = def;
|
|
1608
|
+
}
|
|
1609
|
+
});
|
|
1610
|
+
|
|
1611
|
+
// ../../node_modules/.bun/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/dependentSchemas.js
|
|
1612
|
+
var require_dependentSchemas = __commonJS({
|
|
1613
|
+
"../../node_modules/.bun/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/dependentSchemas.js"(exports) {
|
|
1614
|
+
"use strict";
|
|
1615
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1616
|
+
var dependencies_1 = require_dependencies();
|
|
1617
|
+
var def = {
|
|
1618
|
+
keyword: "dependentSchemas",
|
|
1619
|
+
type: "object",
|
|
1620
|
+
schemaType: "object",
|
|
1621
|
+
code: (cxt) => (0, dependencies_1.validateSchemaDeps)(cxt)
|
|
1622
|
+
};
|
|
1623
|
+
exports.default = def;
|
|
1624
|
+
}
|
|
1625
|
+
});
|
|
1626
|
+
|
|
1627
|
+
// ../../node_modules/.bun/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/limitContains.js
|
|
1628
|
+
var require_limitContains = __commonJS({
|
|
1629
|
+
"../../node_modules/.bun/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/limitContains.js"(exports) {
|
|
1630
|
+
"use strict";
|
|
1631
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1632
|
+
var util_1 = require_util();
|
|
1633
|
+
var def = {
|
|
1634
|
+
keyword: ["maxContains", "minContains"],
|
|
1635
|
+
type: "array",
|
|
1636
|
+
schemaType: "number",
|
|
1637
|
+
code({ keyword, parentSchema, it }) {
|
|
1638
|
+
if (parentSchema.contains === void 0) {
|
|
1639
|
+
(0, util_1.checkStrictMode)(it, `"${keyword}" without "contains" is ignored`);
|
|
1640
|
+
}
|
|
1641
|
+
}
|
|
1642
|
+
};
|
|
1643
|
+
exports.default = def;
|
|
1644
|
+
}
|
|
1645
|
+
});
|
|
1646
|
+
|
|
1647
|
+
// ../../node_modules/.bun/ajv@8.20.0/node_modules/ajv/dist/vocabularies/next.js
|
|
1648
|
+
var require_next = __commonJS({
|
|
1649
|
+
"../../node_modules/.bun/ajv@8.20.0/node_modules/ajv/dist/vocabularies/next.js"(exports) {
|
|
1650
|
+
"use strict";
|
|
1651
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1652
|
+
var dependentRequired_1 = require_dependentRequired();
|
|
1653
|
+
var dependentSchemas_1 = require_dependentSchemas();
|
|
1654
|
+
var limitContains_1 = require_limitContains();
|
|
1655
|
+
var next = [dependentRequired_1.default, dependentSchemas_1.default, limitContains_1.default];
|
|
1656
|
+
exports.default = next;
|
|
1657
|
+
}
|
|
1658
|
+
});
|
|
1659
|
+
|
|
1660
|
+
// ../../node_modules/.bun/ajv@8.20.0/node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedProperties.js
|
|
1661
|
+
var require_unevaluatedProperties = __commonJS({
|
|
1662
|
+
"../../node_modules/.bun/ajv@8.20.0/node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedProperties.js"(exports) {
|
|
1663
|
+
"use strict";
|
|
1664
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1665
|
+
var codegen_1 = require_codegen();
|
|
1666
|
+
var util_1 = require_util();
|
|
1667
|
+
var names_1 = require_names();
|
|
1668
|
+
var error = {
|
|
1669
|
+
message: "must NOT have unevaluated properties",
|
|
1670
|
+
params: ({ params }) => (0, codegen_1._)`{unevaluatedProperty: ${params.unevaluatedProperty}}`
|
|
1671
|
+
};
|
|
1672
|
+
var def = {
|
|
1673
|
+
keyword: "unevaluatedProperties",
|
|
1674
|
+
type: "object",
|
|
1675
|
+
schemaType: ["boolean", "object"],
|
|
1676
|
+
trackErrors: true,
|
|
1677
|
+
error,
|
|
1678
|
+
code(cxt) {
|
|
1679
|
+
const { gen, schema, data, errsCount, it } = cxt;
|
|
1680
|
+
if (!errsCount)
|
|
1681
|
+
throw new Error("ajv implementation error");
|
|
1682
|
+
const { allErrors, props } = it;
|
|
1683
|
+
if (props instanceof codegen_1.Name) {
|
|
1684
|
+
gen.if((0, codegen_1._)`${props} !== true`, () => gen.forIn("key", data, (key) => gen.if(unevaluatedDynamic(props, key), () => unevaluatedPropCode(key))));
|
|
1685
|
+
} else if (props !== true) {
|
|
1686
|
+
gen.forIn("key", data, (key) => props === void 0 ? unevaluatedPropCode(key) : gen.if(unevaluatedStatic(props, key), () => unevaluatedPropCode(key)));
|
|
1687
|
+
}
|
|
1688
|
+
it.props = true;
|
|
1689
|
+
cxt.ok((0, codegen_1._)`${errsCount} === ${names_1.default.errors}`);
|
|
1690
|
+
function unevaluatedPropCode(key) {
|
|
1691
|
+
if (schema === false) {
|
|
1692
|
+
cxt.setParams({ unevaluatedProperty: key });
|
|
1693
|
+
cxt.error();
|
|
1694
|
+
if (!allErrors)
|
|
1695
|
+
gen.break();
|
|
1696
|
+
return;
|
|
1697
|
+
}
|
|
1698
|
+
if (!(0, util_1.alwaysValidSchema)(it, schema)) {
|
|
1699
|
+
const valid = gen.name("valid");
|
|
1700
|
+
cxt.subschema({
|
|
1701
|
+
keyword: "unevaluatedProperties",
|
|
1702
|
+
dataProp: key,
|
|
1703
|
+
dataPropType: util_1.Type.Str
|
|
1704
|
+
}, valid);
|
|
1705
|
+
if (!allErrors)
|
|
1706
|
+
gen.if((0, codegen_1.not)(valid), () => gen.break());
|
|
1707
|
+
}
|
|
1708
|
+
}
|
|
1709
|
+
function unevaluatedDynamic(evaluatedProps, key) {
|
|
1710
|
+
return (0, codegen_1._)`!${evaluatedProps} || !${evaluatedProps}[${key}]`;
|
|
1711
|
+
}
|
|
1712
|
+
function unevaluatedStatic(evaluatedProps, key) {
|
|
1713
|
+
const ps = [];
|
|
1714
|
+
for (const p in evaluatedProps) {
|
|
1715
|
+
if (evaluatedProps[p] === true)
|
|
1716
|
+
ps.push((0, codegen_1._)`${key} !== ${p}`);
|
|
1717
|
+
}
|
|
1718
|
+
return (0, codegen_1.and)(...ps);
|
|
1719
|
+
}
|
|
1720
|
+
}
|
|
1721
|
+
};
|
|
1722
|
+
exports.default = def;
|
|
1723
|
+
}
|
|
1724
|
+
});
|
|
1725
|
+
|
|
1726
|
+
// ../../node_modules/.bun/ajv@8.20.0/node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedItems.js
|
|
1727
|
+
var require_unevaluatedItems = __commonJS({
|
|
1728
|
+
"../../node_modules/.bun/ajv@8.20.0/node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedItems.js"(exports) {
|
|
1729
|
+
"use strict";
|
|
1730
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1731
|
+
var codegen_1 = require_codegen();
|
|
1732
|
+
var util_1 = require_util();
|
|
1733
|
+
var error = {
|
|
1734
|
+
message: ({ params: { len } }) => (0, codegen_1.str)`must NOT have more than ${len} items`,
|
|
1735
|
+
params: ({ params: { len } }) => (0, codegen_1._)`{limit: ${len}}`
|
|
1736
|
+
};
|
|
1737
|
+
var def = {
|
|
1738
|
+
keyword: "unevaluatedItems",
|
|
1739
|
+
type: "array",
|
|
1740
|
+
schemaType: ["boolean", "object"],
|
|
1741
|
+
error,
|
|
1742
|
+
code(cxt) {
|
|
1743
|
+
const { gen, schema, data, it } = cxt;
|
|
1744
|
+
const items = it.items || 0;
|
|
1745
|
+
if (items === true)
|
|
1746
|
+
return;
|
|
1747
|
+
const len = gen.const("len", (0, codegen_1._)`${data}.length`);
|
|
1748
|
+
if (schema === false) {
|
|
1749
|
+
cxt.setParams({ len: items });
|
|
1750
|
+
cxt.fail((0, codegen_1._)`${len} > ${items}`);
|
|
1751
|
+
} else if (typeof schema == "object" && !(0, util_1.alwaysValidSchema)(it, schema)) {
|
|
1752
|
+
const valid = gen.var("valid", (0, codegen_1._)`${len} <= ${items}`);
|
|
1753
|
+
gen.if((0, codegen_1.not)(valid), () => validateItems(valid, items));
|
|
1754
|
+
cxt.ok(valid);
|
|
1755
|
+
}
|
|
1756
|
+
it.items = true;
|
|
1757
|
+
function validateItems(valid, from) {
|
|
1758
|
+
gen.forRange("i", from, len, (i) => {
|
|
1759
|
+
cxt.subschema({ keyword: "unevaluatedItems", dataProp: i, dataPropType: util_1.Type.Num }, valid);
|
|
1760
|
+
if (!it.allErrors)
|
|
1761
|
+
gen.if((0, codegen_1.not)(valid), () => gen.break());
|
|
1762
|
+
});
|
|
1763
|
+
}
|
|
1764
|
+
}
|
|
1765
|
+
};
|
|
1766
|
+
exports.default = def;
|
|
1767
|
+
}
|
|
1768
|
+
});
|
|
1769
|
+
|
|
1770
|
+
// ../../node_modules/.bun/ajv@8.20.0/node_modules/ajv/dist/vocabularies/unevaluated/index.js
|
|
1771
|
+
var require_unevaluated = __commonJS({
|
|
1772
|
+
"../../node_modules/.bun/ajv@8.20.0/node_modules/ajv/dist/vocabularies/unevaluated/index.js"(exports) {
|
|
1773
|
+
"use strict";
|
|
1774
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1775
|
+
var unevaluatedProperties_1 = require_unevaluatedProperties();
|
|
1776
|
+
var unevaluatedItems_1 = require_unevaluatedItems();
|
|
1777
|
+
var unevaluated = [unevaluatedProperties_1.default, unevaluatedItems_1.default];
|
|
1778
|
+
exports.default = unevaluated;
|
|
1779
|
+
}
|
|
1780
|
+
});
|
|
1781
|
+
|
|
1782
|
+
// ../../node_modules/.bun/ajv@8.20.0/node_modules/ajv/dist/vocabularies/format/format.js
|
|
1783
|
+
var require_format = __commonJS({
|
|
1784
|
+
"../../node_modules/.bun/ajv@8.20.0/node_modules/ajv/dist/vocabularies/format/format.js"(exports) {
|
|
1785
|
+
"use strict";
|
|
1786
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1787
|
+
var codegen_1 = require_codegen();
|
|
1788
|
+
var error = {
|
|
1789
|
+
message: ({ schemaCode }) => (0, codegen_1.str)`must match format "${schemaCode}"`,
|
|
1790
|
+
params: ({ schemaCode }) => (0, codegen_1._)`{format: ${schemaCode}}`
|
|
1791
|
+
};
|
|
1792
|
+
var def = {
|
|
1793
|
+
keyword: "format",
|
|
1794
|
+
type: ["number", "string"],
|
|
1795
|
+
schemaType: "string",
|
|
1796
|
+
$data: true,
|
|
1797
|
+
error,
|
|
1798
|
+
code(cxt, ruleType) {
|
|
1799
|
+
const { gen, data, $data, schema, schemaCode, it } = cxt;
|
|
1800
|
+
const { opts, errSchemaPath, schemaEnv, self } = it;
|
|
1801
|
+
if (!opts.validateFormats)
|
|
1802
|
+
return;
|
|
1803
|
+
if ($data)
|
|
1804
|
+
validate$DataFormat();
|
|
1805
|
+
else
|
|
1806
|
+
validateFormat();
|
|
1807
|
+
function validate$DataFormat() {
|
|
1808
|
+
const fmts = gen.scopeValue("formats", {
|
|
1809
|
+
ref: self.formats,
|
|
1810
|
+
code: opts.code.formats
|
|
1811
|
+
});
|
|
1812
|
+
const fDef = gen.const("fDef", (0, codegen_1._)`${fmts}[${schemaCode}]`);
|
|
1813
|
+
const fType = gen.let("fType");
|
|
1814
|
+
const format = gen.let("format");
|
|
1815
|
+
gen.if((0, codegen_1._)`typeof ${fDef} == "object" && !(${fDef} instanceof RegExp)`, () => gen.assign(fType, (0, codegen_1._)`${fDef}.type || "string"`).assign(format, (0, codegen_1._)`${fDef}.validate`), () => gen.assign(fType, (0, codegen_1._)`"string"`).assign(format, fDef));
|
|
1816
|
+
cxt.fail$data((0, codegen_1.or)(unknownFmt(), invalidFmt()));
|
|
1817
|
+
function unknownFmt() {
|
|
1818
|
+
if (opts.strictSchema === false)
|
|
1819
|
+
return codegen_1.nil;
|
|
1820
|
+
return (0, codegen_1._)`${schemaCode} && !${format}`;
|
|
1821
|
+
}
|
|
1822
|
+
function invalidFmt() {
|
|
1823
|
+
const callFormat = schemaEnv.$async ? (0, codegen_1._)`(${fDef}.async ? await ${format}(${data}) : ${format}(${data}))` : (0, codegen_1._)`${format}(${data})`;
|
|
1824
|
+
const validData = (0, codegen_1._)`(typeof ${format} == "function" ? ${callFormat} : ${format}.test(${data}))`;
|
|
1825
|
+
return (0, codegen_1._)`${format} && ${format} !== true && ${fType} === ${ruleType} && !${validData}`;
|
|
1826
|
+
}
|
|
1827
|
+
}
|
|
1828
|
+
function validateFormat() {
|
|
1829
|
+
const formatDef = self.formats[schema];
|
|
1830
|
+
if (!formatDef) {
|
|
1831
|
+
unknownFormat();
|
|
1832
|
+
return;
|
|
1833
|
+
}
|
|
1834
|
+
if (formatDef === true)
|
|
1835
|
+
return;
|
|
1836
|
+
const [fmtType, format, fmtRef] = getFormat(formatDef);
|
|
1837
|
+
if (fmtType === ruleType)
|
|
1838
|
+
cxt.pass(validCondition());
|
|
1839
|
+
function unknownFormat() {
|
|
1840
|
+
if (opts.strictSchema === false) {
|
|
1841
|
+
self.logger.warn(unknownMsg());
|
|
1842
|
+
return;
|
|
1843
|
+
}
|
|
1844
|
+
throw new Error(unknownMsg());
|
|
1845
|
+
function unknownMsg() {
|
|
1846
|
+
return `unknown format "${schema}" ignored in schema at path "${errSchemaPath}"`;
|
|
1847
|
+
}
|
|
1848
|
+
}
|
|
1849
|
+
function getFormat(fmtDef) {
|
|
1850
|
+
const code = fmtDef instanceof RegExp ? (0, codegen_1.regexpCode)(fmtDef) : opts.code.formats ? (0, codegen_1._)`${opts.code.formats}${(0, codegen_1.getProperty)(schema)}` : void 0;
|
|
1851
|
+
const fmt = gen.scopeValue("formats", { key: schema, ref: fmtDef, code });
|
|
1852
|
+
if (typeof fmtDef == "object" && !(fmtDef instanceof RegExp)) {
|
|
1853
|
+
return [fmtDef.type || "string", fmtDef.validate, (0, codegen_1._)`${fmt}.validate`];
|
|
1854
|
+
}
|
|
1855
|
+
return ["string", fmtDef, fmt];
|
|
1856
|
+
}
|
|
1857
|
+
function validCondition() {
|
|
1858
|
+
if (typeof formatDef == "object" && !(formatDef instanceof RegExp) && formatDef.async) {
|
|
1859
|
+
if (!schemaEnv.$async)
|
|
1860
|
+
throw new Error("async format in sync schema");
|
|
1861
|
+
return (0, codegen_1._)`await ${fmtRef}(${data})`;
|
|
1862
|
+
}
|
|
1863
|
+
return typeof format == "function" ? (0, codegen_1._)`${fmtRef}(${data})` : (0, codegen_1._)`${fmtRef}.test(${data})`;
|
|
1864
|
+
}
|
|
1865
|
+
}
|
|
1866
|
+
}
|
|
1867
|
+
};
|
|
1868
|
+
exports.default = def;
|
|
1869
|
+
}
|
|
1870
|
+
});
|
|
1871
|
+
|
|
1872
|
+
// ../../node_modules/.bun/ajv@8.20.0/node_modules/ajv/dist/vocabularies/format/index.js
|
|
1873
|
+
var require_format2 = __commonJS({
|
|
1874
|
+
"../../node_modules/.bun/ajv@8.20.0/node_modules/ajv/dist/vocabularies/format/index.js"(exports) {
|
|
1875
|
+
"use strict";
|
|
1876
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1877
|
+
var format_1 = require_format();
|
|
1878
|
+
var format = [format_1.default];
|
|
1879
|
+
exports.default = format;
|
|
1880
|
+
}
|
|
1881
|
+
});
|
|
1882
|
+
|
|
1883
|
+
// ../../node_modules/.bun/ajv@8.20.0/node_modules/ajv/dist/vocabularies/metadata.js
|
|
1884
|
+
var require_metadata = __commonJS({
|
|
1885
|
+
"../../node_modules/.bun/ajv@8.20.0/node_modules/ajv/dist/vocabularies/metadata.js"(exports) {
|
|
1886
|
+
"use strict";
|
|
1887
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1888
|
+
exports.contentVocabulary = exports.metadataVocabulary = void 0;
|
|
1889
|
+
exports.metadataVocabulary = [
|
|
1890
|
+
"title",
|
|
1891
|
+
"description",
|
|
1892
|
+
"default",
|
|
1893
|
+
"deprecated",
|
|
1894
|
+
"readOnly",
|
|
1895
|
+
"writeOnly",
|
|
1896
|
+
"examples"
|
|
1897
|
+
];
|
|
1898
|
+
exports.contentVocabulary = [
|
|
1899
|
+
"contentMediaType",
|
|
1900
|
+
"contentEncoding",
|
|
1901
|
+
"contentSchema"
|
|
1902
|
+
];
|
|
1903
|
+
}
|
|
1904
|
+
});
|
|
1905
|
+
|
|
1906
|
+
// ../../node_modules/.bun/ajv@8.20.0/node_modules/ajv/dist/vocabularies/draft2020.js
|
|
1907
|
+
var require_draft2020 = __commonJS({
|
|
1908
|
+
"../../node_modules/.bun/ajv@8.20.0/node_modules/ajv/dist/vocabularies/draft2020.js"(exports) {
|
|
1909
|
+
"use strict";
|
|
1910
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1911
|
+
var core_1 = require_core2();
|
|
1912
|
+
var validation_1 = require_validation();
|
|
1913
|
+
var applicator_1 = require_applicator();
|
|
1914
|
+
var dynamic_1 = require_dynamic();
|
|
1915
|
+
var next_1 = require_next();
|
|
1916
|
+
var unevaluated_1 = require_unevaluated();
|
|
1917
|
+
var format_1 = require_format2();
|
|
1918
|
+
var metadata_1 = require_metadata();
|
|
1919
|
+
var draft2020Vocabularies = [
|
|
1920
|
+
dynamic_1.default,
|
|
1921
|
+
core_1.default,
|
|
1922
|
+
validation_1.default,
|
|
1923
|
+
(0, applicator_1.default)(true),
|
|
1924
|
+
format_1.default,
|
|
1925
|
+
metadata_1.metadataVocabulary,
|
|
1926
|
+
metadata_1.contentVocabulary,
|
|
1927
|
+
next_1.default,
|
|
1928
|
+
unevaluated_1.default
|
|
1929
|
+
];
|
|
1930
|
+
exports.default = draft2020Vocabularies;
|
|
1931
|
+
}
|
|
1932
|
+
});
|
|
1933
|
+
|
|
1934
|
+
// ../../node_modules/.bun/ajv@8.20.0/node_modules/ajv/dist/vocabularies/discriminator/index.js
|
|
1935
|
+
var require_discriminator = __commonJS({
|
|
1936
|
+
"../../node_modules/.bun/ajv@8.20.0/node_modules/ajv/dist/vocabularies/discriminator/index.js"(exports) {
|
|
1937
|
+
"use strict";
|
|
1938
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1939
|
+
var codegen_1 = require_codegen();
|
|
1940
|
+
var types_1 = require_types();
|
|
1941
|
+
var compile_1 = require_compile();
|
|
1942
|
+
var ref_error_1 = require_ref_error();
|
|
1943
|
+
var util_1 = require_util();
|
|
1944
|
+
var error = {
|
|
1945
|
+
message: ({ params: { discrError, tagName } }) => discrError === types_1.DiscrError.Tag ? `tag "${tagName}" must be string` : `value of tag "${tagName}" must be in oneOf`,
|
|
1946
|
+
params: ({ params: { discrError, tag, tagName } }) => (0, codegen_1._)`{error: ${discrError}, tag: ${tagName}, tagValue: ${tag}}`
|
|
1947
|
+
};
|
|
1948
|
+
var def = {
|
|
1949
|
+
keyword: "discriminator",
|
|
1950
|
+
type: "object",
|
|
1951
|
+
schemaType: "object",
|
|
1952
|
+
error,
|
|
1953
|
+
code(cxt) {
|
|
1954
|
+
const { gen, data, schema, parentSchema, it } = cxt;
|
|
1955
|
+
const { oneOf } = parentSchema;
|
|
1956
|
+
if (!it.opts.discriminator) {
|
|
1957
|
+
throw new Error("discriminator: requires discriminator option");
|
|
1958
|
+
}
|
|
1959
|
+
const tagName = schema.propertyName;
|
|
1960
|
+
if (typeof tagName != "string")
|
|
1961
|
+
throw new Error("discriminator: requires propertyName");
|
|
1962
|
+
if (schema.mapping)
|
|
1963
|
+
throw new Error("discriminator: mapping is not supported");
|
|
1964
|
+
if (!oneOf)
|
|
1965
|
+
throw new Error("discriminator: requires oneOf keyword");
|
|
1966
|
+
const valid = gen.let("valid", false);
|
|
1967
|
+
const tag = gen.const("tag", (0, codegen_1._)`${data}${(0, codegen_1.getProperty)(tagName)}`);
|
|
1968
|
+
gen.if((0, codegen_1._)`typeof ${tag} == "string"`, () => validateMapping(), () => cxt.error(false, { discrError: types_1.DiscrError.Tag, tag, tagName }));
|
|
1969
|
+
cxt.ok(valid);
|
|
1970
|
+
function validateMapping() {
|
|
1971
|
+
const mapping = getMapping();
|
|
1972
|
+
gen.if(false);
|
|
1973
|
+
for (const tagValue in mapping) {
|
|
1974
|
+
gen.elseIf((0, codegen_1._)`${tag} === ${tagValue}`);
|
|
1975
|
+
gen.assign(valid, applyTagSchema(mapping[tagValue]));
|
|
1976
|
+
}
|
|
1977
|
+
gen.else();
|
|
1978
|
+
cxt.error(false, { discrError: types_1.DiscrError.Mapping, tag, tagName });
|
|
1979
|
+
gen.endIf();
|
|
1980
|
+
}
|
|
1981
|
+
function applyTagSchema(schemaProp) {
|
|
1982
|
+
const _valid = gen.name("valid");
|
|
1983
|
+
const schCxt = cxt.subschema({ keyword: "oneOf", schemaProp }, _valid);
|
|
1984
|
+
cxt.mergeEvaluated(schCxt, codegen_1.Name);
|
|
1985
|
+
return _valid;
|
|
1986
|
+
}
|
|
1987
|
+
function getMapping() {
|
|
1988
|
+
var _a;
|
|
1989
|
+
const oneOfMapping = {};
|
|
1990
|
+
const topRequired = hasRequired(parentSchema);
|
|
1991
|
+
let tagRequired = true;
|
|
1992
|
+
for (let i = 0; i < oneOf.length; i++) {
|
|
1993
|
+
let sch = oneOf[i];
|
|
1994
|
+
if ((sch === null || sch === void 0 ? void 0 : sch.$ref) && !(0, util_1.schemaHasRulesButRef)(sch, it.self.RULES)) {
|
|
1995
|
+
const ref = sch.$ref;
|
|
1996
|
+
sch = compile_1.resolveRef.call(it.self, it.schemaEnv.root, it.baseId, ref);
|
|
1997
|
+
if (sch instanceof compile_1.SchemaEnv)
|
|
1998
|
+
sch = sch.schema;
|
|
1999
|
+
if (sch === void 0)
|
|
2000
|
+
throw new ref_error_1.default(it.opts.uriResolver, it.baseId, ref);
|
|
2001
|
+
}
|
|
2002
|
+
const propSch = (_a = sch === null || sch === void 0 ? void 0 : sch.properties) === null || _a === void 0 ? void 0 : _a[tagName];
|
|
2003
|
+
if (typeof propSch != "object") {
|
|
2004
|
+
throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${tagName}"`);
|
|
2005
|
+
}
|
|
2006
|
+
tagRequired = tagRequired && (topRequired || hasRequired(sch));
|
|
2007
|
+
addMappings(propSch, i);
|
|
2008
|
+
}
|
|
2009
|
+
if (!tagRequired)
|
|
2010
|
+
throw new Error(`discriminator: "${tagName}" must be required`);
|
|
2011
|
+
return oneOfMapping;
|
|
2012
|
+
function hasRequired({ required }) {
|
|
2013
|
+
return Array.isArray(required) && required.includes(tagName);
|
|
2014
|
+
}
|
|
2015
|
+
function addMappings(sch, i) {
|
|
2016
|
+
if (sch.const) {
|
|
2017
|
+
addMapping(sch.const, i);
|
|
2018
|
+
} else if (sch.enum) {
|
|
2019
|
+
for (const tagValue of sch.enum) {
|
|
2020
|
+
addMapping(tagValue, i);
|
|
2021
|
+
}
|
|
2022
|
+
} else {
|
|
2023
|
+
throw new Error(`discriminator: "properties/${tagName}" must have "const" or "enum"`);
|
|
2024
|
+
}
|
|
2025
|
+
}
|
|
2026
|
+
function addMapping(tagValue, i) {
|
|
2027
|
+
if (typeof tagValue != "string" || tagValue in oneOfMapping) {
|
|
2028
|
+
throw new Error(`discriminator: "${tagName}" values must be unique strings`);
|
|
2029
|
+
}
|
|
2030
|
+
oneOfMapping[tagValue] = i;
|
|
2031
|
+
}
|
|
2032
|
+
}
|
|
2033
|
+
}
|
|
2034
|
+
};
|
|
2035
|
+
exports.default = def;
|
|
2036
|
+
}
|
|
2037
|
+
});
|
|
2038
|
+
|
|
2039
|
+
// ../../node_modules/.bun/ajv@8.20.0/node_modules/ajv/dist/refs/json-schema-2020-12/schema.json
|
|
2040
|
+
var require_schema = __commonJS({
|
|
2041
|
+
"../../node_modules/.bun/ajv@8.20.0/node_modules/ajv/dist/refs/json-schema-2020-12/schema.json"(exports, module) {
|
|
2042
|
+
module.exports = {
|
|
2043
|
+
$schema: "https://json-schema.org/draft/2020-12/schema",
|
|
2044
|
+
$id: "https://json-schema.org/draft/2020-12/schema",
|
|
2045
|
+
$vocabulary: {
|
|
2046
|
+
"https://json-schema.org/draft/2020-12/vocab/core": true,
|
|
2047
|
+
"https://json-schema.org/draft/2020-12/vocab/applicator": true,
|
|
2048
|
+
"https://json-schema.org/draft/2020-12/vocab/unevaluated": true,
|
|
2049
|
+
"https://json-schema.org/draft/2020-12/vocab/validation": true,
|
|
2050
|
+
"https://json-schema.org/draft/2020-12/vocab/meta-data": true,
|
|
2051
|
+
"https://json-schema.org/draft/2020-12/vocab/format-annotation": true,
|
|
2052
|
+
"https://json-schema.org/draft/2020-12/vocab/content": true
|
|
2053
|
+
},
|
|
2054
|
+
$dynamicAnchor: "meta",
|
|
2055
|
+
title: "Core and Validation specifications meta-schema",
|
|
2056
|
+
allOf: [
|
|
2057
|
+
{ $ref: "meta/core" },
|
|
2058
|
+
{ $ref: "meta/applicator" },
|
|
2059
|
+
{ $ref: "meta/unevaluated" },
|
|
2060
|
+
{ $ref: "meta/validation" },
|
|
2061
|
+
{ $ref: "meta/meta-data" },
|
|
2062
|
+
{ $ref: "meta/format-annotation" },
|
|
2063
|
+
{ $ref: "meta/content" }
|
|
2064
|
+
],
|
|
2065
|
+
type: ["object", "boolean"],
|
|
2066
|
+
$comment: "This meta-schema also defines keywords that have appeared in previous drafts in order to prevent incompatible extensions as they remain in common use.",
|
|
2067
|
+
properties: {
|
|
2068
|
+
definitions: {
|
|
2069
|
+
$comment: '"definitions" has been replaced by "$defs".',
|
|
2070
|
+
type: "object",
|
|
2071
|
+
additionalProperties: { $dynamicRef: "#meta" },
|
|
2072
|
+
deprecated: true,
|
|
2073
|
+
default: {}
|
|
2074
|
+
},
|
|
2075
|
+
dependencies: {
|
|
2076
|
+
$comment: '"dependencies" has been split and replaced by "dependentSchemas" and "dependentRequired" in order to serve their differing semantics.',
|
|
2077
|
+
type: "object",
|
|
2078
|
+
additionalProperties: {
|
|
2079
|
+
anyOf: [{ $dynamicRef: "#meta" }, { $ref: "meta/validation#/$defs/stringArray" }]
|
|
2080
|
+
},
|
|
2081
|
+
deprecated: true,
|
|
2082
|
+
default: {}
|
|
2083
|
+
},
|
|
2084
|
+
$recursiveAnchor: {
|
|
2085
|
+
$comment: '"$recursiveAnchor" has been replaced by "$dynamicAnchor".',
|
|
2086
|
+
$ref: "meta/core#/$defs/anchorString",
|
|
2087
|
+
deprecated: true
|
|
2088
|
+
},
|
|
2089
|
+
$recursiveRef: {
|
|
2090
|
+
$comment: '"$recursiveRef" has been replaced by "$dynamicRef".',
|
|
2091
|
+
$ref: "meta/core#/$defs/uriReferenceString",
|
|
2092
|
+
deprecated: true
|
|
2093
|
+
}
|
|
2094
|
+
}
|
|
2095
|
+
};
|
|
2096
|
+
}
|
|
2097
|
+
});
|
|
2098
|
+
|
|
2099
|
+
// ../../node_modules/.bun/ajv@8.20.0/node_modules/ajv/dist/refs/json-schema-2020-12/meta/applicator.json
|
|
2100
|
+
var require_applicator2 = __commonJS({
|
|
2101
|
+
"../../node_modules/.bun/ajv@8.20.0/node_modules/ajv/dist/refs/json-schema-2020-12/meta/applicator.json"(exports, module) {
|
|
2102
|
+
module.exports = {
|
|
2103
|
+
$schema: "https://json-schema.org/draft/2020-12/schema",
|
|
2104
|
+
$id: "https://json-schema.org/draft/2020-12/meta/applicator",
|
|
2105
|
+
$vocabulary: {
|
|
2106
|
+
"https://json-schema.org/draft/2020-12/vocab/applicator": true
|
|
2107
|
+
},
|
|
2108
|
+
$dynamicAnchor: "meta",
|
|
2109
|
+
title: "Applicator vocabulary meta-schema",
|
|
2110
|
+
type: ["object", "boolean"],
|
|
2111
|
+
properties: {
|
|
2112
|
+
prefixItems: { $ref: "#/$defs/schemaArray" },
|
|
2113
|
+
items: { $dynamicRef: "#meta" },
|
|
2114
|
+
contains: { $dynamicRef: "#meta" },
|
|
2115
|
+
additionalProperties: { $dynamicRef: "#meta" },
|
|
2116
|
+
properties: {
|
|
2117
|
+
type: "object",
|
|
2118
|
+
additionalProperties: { $dynamicRef: "#meta" },
|
|
2119
|
+
default: {}
|
|
2120
|
+
},
|
|
2121
|
+
patternProperties: {
|
|
2122
|
+
type: "object",
|
|
2123
|
+
additionalProperties: { $dynamicRef: "#meta" },
|
|
2124
|
+
propertyNames: { format: "regex" },
|
|
2125
|
+
default: {}
|
|
2126
|
+
},
|
|
2127
|
+
dependentSchemas: {
|
|
2128
|
+
type: "object",
|
|
2129
|
+
additionalProperties: { $dynamicRef: "#meta" },
|
|
2130
|
+
default: {}
|
|
2131
|
+
},
|
|
2132
|
+
propertyNames: { $dynamicRef: "#meta" },
|
|
2133
|
+
if: { $dynamicRef: "#meta" },
|
|
2134
|
+
then: { $dynamicRef: "#meta" },
|
|
2135
|
+
else: { $dynamicRef: "#meta" },
|
|
2136
|
+
allOf: { $ref: "#/$defs/schemaArray" },
|
|
2137
|
+
anyOf: { $ref: "#/$defs/schemaArray" },
|
|
2138
|
+
oneOf: { $ref: "#/$defs/schemaArray" },
|
|
2139
|
+
not: { $dynamicRef: "#meta" }
|
|
2140
|
+
},
|
|
2141
|
+
$defs: {
|
|
2142
|
+
schemaArray: {
|
|
2143
|
+
type: "array",
|
|
2144
|
+
minItems: 1,
|
|
2145
|
+
items: { $dynamicRef: "#meta" }
|
|
2146
|
+
}
|
|
2147
|
+
}
|
|
2148
|
+
};
|
|
2149
|
+
}
|
|
2150
|
+
});
|
|
2151
|
+
|
|
2152
|
+
// ../../node_modules/.bun/ajv@8.20.0/node_modules/ajv/dist/refs/json-schema-2020-12/meta/unevaluated.json
|
|
2153
|
+
var require_unevaluated2 = __commonJS({
|
|
2154
|
+
"../../node_modules/.bun/ajv@8.20.0/node_modules/ajv/dist/refs/json-schema-2020-12/meta/unevaluated.json"(exports, module) {
|
|
2155
|
+
module.exports = {
|
|
2156
|
+
$schema: "https://json-schema.org/draft/2020-12/schema",
|
|
2157
|
+
$id: "https://json-schema.org/draft/2020-12/meta/unevaluated",
|
|
2158
|
+
$vocabulary: {
|
|
2159
|
+
"https://json-schema.org/draft/2020-12/vocab/unevaluated": true
|
|
2160
|
+
},
|
|
2161
|
+
$dynamicAnchor: "meta",
|
|
2162
|
+
title: "Unevaluated applicator vocabulary meta-schema",
|
|
2163
|
+
type: ["object", "boolean"],
|
|
2164
|
+
properties: {
|
|
2165
|
+
unevaluatedItems: { $dynamicRef: "#meta" },
|
|
2166
|
+
unevaluatedProperties: { $dynamicRef: "#meta" }
|
|
2167
|
+
}
|
|
2168
|
+
};
|
|
2169
|
+
}
|
|
2170
|
+
});
|
|
2171
|
+
|
|
2172
|
+
// ../../node_modules/.bun/ajv@8.20.0/node_modules/ajv/dist/refs/json-schema-2020-12/meta/content.json
|
|
2173
|
+
var require_content = __commonJS({
|
|
2174
|
+
"../../node_modules/.bun/ajv@8.20.0/node_modules/ajv/dist/refs/json-schema-2020-12/meta/content.json"(exports, module) {
|
|
2175
|
+
module.exports = {
|
|
2176
|
+
$schema: "https://json-schema.org/draft/2020-12/schema",
|
|
2177
|
+
$id: "https://json-schema.org/draft/2020-12/meta/content",
|
|
2178
|
+
$vocabulary: {
|
|
2179
|
+
"https://json-schema.org/draft/2020-12/vocab/content": true
|
|
2180
|
+
},
|
|
2181
|
+
$dynamicAnchor: "meta",
|
|
2182
|
+
title: "Content vocabulary meta-schema",
|
|
2183
|
+
type: ["object", "boolean"],
|
|
2184
|
+
properties: {
|
|
2185
|
+
contentEncoding: { type: "string" },
|
|
2186
|
+
contentMediaType: { type: "string" },
|
|
2187
|
+
contentSchema: { $dynamicRef: "#meta" }
|
|
2188
|
+
}
|
|
2189
|
+
};
|
|
2190
|
+
}
|
|
2191
|
+
});
|
|
2192
|
+
|
|
2193
|
+
// ../../node_modules/.bun/ajv@8.20.0/node_modules/ajv/dist/refs/json-schema-2020-12/meta/core.json
|
|
2194
|
+
var require_core3 = __commonJS({
|
|
2195
|
+
"../../node_modules/.bun/ajv@8.20.0/node_modules/ajv/dist/refs/json-schema-2020-12/meta/core.json"(exports, module) {
|
|
2196
|
+
module.exports = {
|
|
2197
|
+
$schema: "https://json-schema.org/draft/2020-12/schema",
|
|
2198
|
+
$id: "https://json-schema.org/draft/2020-12/meta/core",
|
|
2199
|
+
$vocabulary: {
|
|
2200
|
+
"https://json-schema.org/draft/2020-12/vocab/core": true
|
|
2201
|
+
},
|
|
2202
|
+
$dynamicAnchor: "meta",
|
|
2203
|
+
title: "Core vocabulary meta-schema",
|
|
2204
|
+
type: ["object", "boolean"],
|
|
2205
|
+
properties: {
|
|
2206
|
+
$id: {
|
|
2207
|
+
$ref: "#/$defs/uriReferenceString",
|
|
2208
|
+
$comment: "Non-empty fragments not allowed.",
|
|
2209
|
+
pattern: "^[^#]*#?$"
|
|
2210
|
+
},
|
|
2211
|
+
$schema: { $ref: "#/$defs/uriString" },
|
|
2212
|
+
$ref: { $ref: "#/$defs/uriReferenceString" },
|
|
2213
|
+
$anchor: { $ref: "#/$defs/anchorString" },
|
|
2214
|
+
$dynamicRef: { $ref: "#/$defs/uriReferenceString" },
|
|
2215
|
+
$dynamicAnchor: { $ref: "#/$defs/anchorString" },
|
|
2216
|
+
$vocabulary: {
|
|
2217
|
+
type: "object",
|
|
2218
|
+
propertyNames: { $ref: "#/$defs/uriString" },
|
|
2219
|
+
additionalProperties: {
|
|
2220
|
+
type: "boolean"
|
|
2221
|
+
}
|
|
2222
|
+
},
|
|
2223
|
+
$comment: {
|
|
2224
|
+
type: "string"
|
|
2225
|
+
},
|
|
2226
|
+
$defs: {
|
|
2227
|
+
type: "object",
|
|
2228
|
+
additionalProperties: { $dynamicRef: "#meta" }
|
|
2229
|
+
}
|
|
2230
|
+
},
|
|
2231
|
+
$defs: {
|
|
2232
|
+
anchorString: {
|
|
2233
|
+
type: "string",
|
|
2234
|
+
pattern: "^[A-Za-z_][-A-Za-z0-9._]*$"
|
|
2235
|
+
},
|
|
2236
|
+
uriString: {
|
|
2237
|
+
type: "string",
|
|
2238
|
+
format: "uri"
|
|
2239
|
+
},
|
|
2240
|
+
uriReferenceString: {
|
|
2241
|
+
type: "string",
|
|
2242
|
+
format: "uri-reference"
|
|
2243
|
+
}
|
|
2244
|
+
}
|
|
2245
|
+
};
|
|
2246
|
+
}
|
|
2247
|
+
});
|
|
2248
|
+
|
|
2249
|
+
// ../../node_modules/.bun/ajv@8.20.0/node_modules/ajv/dist/refs/json-schema-2020-12/meta/format-annotation.json
|
|
2250
|
+
var require_format_annotation = __commonJS({
|
|
2251
|
+
"../../node_modules/.bun/ajv@8.20.0/node_modules/ajv/dist/refs/json-schema-2020-12/meta/format-annotation.json"(exports, module) {
|
|
2252
|
+
module.exports = {
|
|
2253
|
+
$schema: "https://json-schema.org/draft/2020-12/schema",
|
|
2254
|
+
$id: "https://json-schema.org/draft/2020-12/meta/format-annotation",
|
|
2255
|
+
$vocabulary: {
|
|
2256
|
+
"https://json-schema.org/draft/2020-12/vocab/format-annotation": true
|
|
2257
|
+
},
|
|
2258
|
+
$dynamicAnchor: "meta",
|
|
2259
|
+
title: "Format vocabulary meta-schema for annotation results",
|
|
2260
|
+
type: ["object", "boolean"],
|
|
2261
|
+
properties: {
|
|
2262
|
+
format: { type: "string" }
|
|
2263
|
+
}
|
|
2264
|
+
};
|
|
2265
|
+
}
|
|
2266
|
+
});
|
|
2267
|
+
|
|
2268
|
+
// ../../node_modules/.bun/ajv@8.20.0/node_modules/ajv/dist/refs/json-schema-2020-12/meta/meta-data.json
|
|
2269
|
+
var require_meta_data = __commonJS({
|
|
2270
|
+
"../../node_modules/.bun/ajv@8.20.0/node_modules/ajv/dist/refs/json-schema-2020-12/meta/meta-data.json"(exports, module) {
|
|
2271
|
+
module.exports = {
|
|
2272
|
+
$schema: "https://json-schema.org/draft/2020-12/schema",
|
|
2273
|
+
$id: "https://json-schema.org/draft/2020-12/meta/meta-data",
|
|
2274
|
+
$vocabulary: {
|
|
2275
|
+
"https://json-schema.org/draft/2020-12/vocab/meta-data": true
|
|
2276
|
+
},
|
|
2277
|
+
$dynamicAnchor: "meta",
|
|
2278
|
+
title: "Meta-data vocabulary meta-schema",
|
|
2279
|
+
type: ["object", "boolean"],
|
|
2280
|
+
properties: {
|
|
2281
|
+
title: {
|
|
2282
|
+
type: "string"
|
|
2283
|
+
},
|
|
2284
|
+
description: {
|
|
2285
|
+
type: "string"
|
|
2286
|
+
},
|
|
2287
|
+
default: true,
|
|
2288
|
+
deprecated: {
|
|
2289
|
+
type: "boolean",
|
|
2290
|
+
default: false
|
|
2291
|
+
},
|
|
2292
|
+
readOnly: {
|
|
2293
|
+
type: "boolean",
|
|
2294
|
+
default: false
|
|
2295
|
+
},
|
|
2296
|
+
writeOnly: {
|
|
2297
|
+
type: "boolean",
|
|
2298
|
+
default: false
|
|
2299
|
+
},
|
|
2300
|
+
examples: {
|
|
2301
|
+
type: "array",
|
|
2302
|
+
items: true
|
|
2303
|
+
}
|
|
2304
|
+
}
|
|
2305
|
+
};
|
|
2306
|
+
}
|
|
2307
|
+
});
|
|
2308
|
+
|
|
2309
|
+
// ../../node_modules/.bun/ajv@8.20.0/node_modules/ajv/dist/refs/json-schema-2020-12/meta/validation.json
|
|
2310
|
+
var require_validation2 = __commonJS({
|
|
2311
|
+
"../../node_modules/.bun/ajv@8.20.0/node_modules/ajv/dist/refs/json-schema-2020-12/meta/validation.json"(exports, module) {
|
|
2312
|
+
module.exports = {
|
|
2313
|
+
$schema: "https://json-schema.org/draft/2020-12/schema",
|
|
2314
|
+
$id: "https://json-schema.org/draft/2020-12/meta/validation",
|
|
2315
|
+
$vocabulary: {
|
|
2316
|
+
"https://json-schema.org/draft/2020-12/vocab/validation": true
|
|
2317
|
+
},
|
|
2318
|
+
$dynamicAnchor: "meta",
|
|
2319
|
+
title: "Validation vocabulary meta-schema",
|
|
2320
|
+
type: ["object", "boolean"],
|
|
2321
|
+
properties: {
|
|
2322
|
+
type: {
|
|
2323
|
+
anyOf: [
|
|
2324
|
+
{ $ref: "#/$defs/simpleTypes" },
|
|
2325
|
+
{
|
|
2326
|
+
type: "array",
|
|
2327
|
+
items: { $ref: "#/$defs/simpleTypes" },
|
|
2328
|
+
minItems: 1,
|
|
2329
|
+
uniqueItems: true
|
|
2330
|
+
}
|
|
2331
|
+
]
|
|
2332
|
+
},
|
|
2333
|
+
const: true,
|
|
2334
|
+
enum: {
|
|
2335
|
+
type: "array",
|
|
2336
|
+
items: true
|
|
2337
|
+
},
|
|
2338
|
+
multipleOf: {
|
|
2339
|
+
type: "number",
|
|
2340
|
+
exclusiveMinimum: 0
|
|
2341
|
+
},
|
|
2342
|
+
maximum: {
|
|
2343
|
+
type: "number"
|
|
2344
|
+
},
|
|
2345
|
+
exclusiveMaximum: {
|
|
2346
|
+
type: "number"
|
|
2347
|
+
},
|
|
2348
|
+
minimum: {
|
|
2349
|
+
type: "number"
|
|
2350
|
+
},
|
|
2351
|
+
exclusiveMinimum: {
|
|
2352
|
+
type: "number"
|
|
2353
|
+
},
|
|
2354
|
+
maxLength: { $ref: "#/$defs/nonNegativeInteger" },
|
|
2355
|
+
minLength: { $ref: "#/$defs/nonNegativeIntegerDefault0" },
|
|
2356
|
+
pattern: {
|
|
2357
|
+
type: "string",
|
|
2358
|
+
format: "regex"
|
|
2359
|
+
},
|
|
2360
|
+
maxItems: { $ref: "#/$defs/nonNegativeInteger" },
|
|
2361
|
+
minItems: { $ref: "#/$defs/nonNegativeIntegerDefault0" },
|
|
2362
|
+
uniqueItems: {
|
|
2363
|
+
type: "boolean",
|
|
2364
|
+
default: false
|
|
2365
|
+
},
|
|
2366
|
+
maxContains: { $ref: "#/$defs/nonNegativeInteger" },
|
|
2367
|
+
minContains: {
|
|
2368
|
+
$ref: "#/$defs/nonNegativeInteger",
|
|
2369
|
+
default: 1
|
|
2370
|
+
},
|
|
2371
|
+
maxProperties: { $ref: "#/$defs/nonNegativeInteger" },
|
|
2372
|
+
minProperties: { $ref: "#/$defs/nonNegativeIntegerDefault0" },
|
|
2373
|
+
required: { $ref: "#/$defs/stringArray" },
|
|
2374
|
+
dependentRequired: {
|
|
2375
|
+
type: "object",
|
|
2376
|
+
additionalProperties: {
|
|
2377
|
+
$ref: "#/$defs/stringArray"
|
|
2378
|
+
}
|
|
2379
|
+
}
|
|
2380
|
+
},
|
|
2381
|
+
$defs: {
|
|
2382
|
+
nonNegativeInteger: {
|
|
2383
|
+
type: "integer",
|
|
2384
|
+
minimum: 0
|
|
2385
|
+
},
|
|
2386
|
+
nonNegativeIntegerDefault0: {
|
|
2387
|
+
$ref: "#/$defs/nonNegativeInteger",
|
|
2388
|
+
default: 0
|
|
2389
|
+
},
|
|
2390
|
+
simpleTypes: {
|
|
2391
|
+
enum: ["array", "boolean", "integer", "null", "number", "object", "string"]
|
|
2392
|
+
},
|
|
2393
|
+
stringArray: {
|
|
2394
|
+
type: "array",
|
|
2395
|
+
items: { type: "string" },
|
|
2396
|
+
uniqueItems: true,
|
|
2397
|
+
default: []
|
|
2398
|
+
}
|
|
2399
|
+
}
|
|
2400
|
+
};
|
|
2401
|
+
}
|
|
2402
|
+
});
|
|
2403
|
+
|
|
2404
|
+
// ../../node_modules/.bun/ajv@8.20.0/node_modules/ajv/dist/refs/json-schema-2020-12/index.js
|
|
2405
|
+
var require_json_schema_2020_12 = __commonJS({
|
|
2406
|
+
"../../node_modules/.bun/ajv@8.20.0/node_modules/ajv/dist/refs/json-schema-2020-12/index.js"(exports) {
|
|
2407
|
+
"use strict";
|
|
2408
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2409
|
+
var metaSchema = require_schema();
|
|
2410
|
+
var applicator = require_applicator2();
|
|
2411
|
+
var unevaluated = require_unevaluated2();
|
|
2412
|
+
var content = require_content();
|
|
2413
|
+
var core = require_core3();
|
|
2414
|
+
var format = require_format_annotation();
|
|
2415
|
+
var metadata = require_meta_data();
|
|
2416
|
+
var validation = require_validation2();
|
|
2417
|
+
var META_SUPPORT_DATA = ["/properties"];
|
|
2418
|
+
function addMetaSchema2020($data) {
|
|
2419
|
+
;
|
|
2420
|
+
[
|
|
2421
|
+
metaSchema,
|
|
2422
|
+
applicator,
|
|
2423
|
+
unevaluated,
|
|
2424
|
+
content,
|
|
2425
|
+
core,
|
|
2426
|
+
with$data(this, format),
|
|
2427
|
+
metadata,
|
|
2428
|
+
with$data(this, validation)
|
|
2429
|
+
].forEach((sch) => this.addMetaSchema(sch, void 0, false));
|
|
2430
|
+
return this;
|
|
2431
|
+
function with$data(ajv2, sch) {
|
|
2432
|
+
return $data ? ajv2.$dataMetaSchema(sch, META_SUPPORT_DATA) : sch;
|
|
2433
|
+
}
|
|
2434
|
+
}
|
|
2435
|
+
exports.default = addMetaSchema2020;
|
|
2436
|
+
}
|
|
2437
|
+
});
|
|
2438
|
+
|
|
2439
|
+
// ../../node_modules/.bun/ajv@8.20.0/node_modules/ajv/dist/2020.js
|
|
2440
|
+
var require__ = __commonJS({
|
|
2441
|
+
"../../node_modules/.bun/ajv@8.20.0/node_modules/ajv/dist/2020.js"(exports, module) {
|
|
2442
|
+
"use strict";
|
|
2443
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2444
|
+
exports.MissingRefError = exports.ValidationError = exports.CodeGen = exports.Name = exports.nil = exports.stringify = exports.str = exports._ = exports.KeywordCxt = exports.Ajv2020 = void 0;
|
|
2445
|
+
var core_1 = require_core();
|
|
2446
|
+
var draft2020_1 = require_draft2020();
|
|
2447
|
+
var discriminator_1 = require_discriminator();
|
|
2448
|
+
var json_schema_2020_12_1 = require_json_schema_2020_12();
|
|
2449
|
+
var META_SCHEMA_ID = "https://json-schema.org/draft/2020-12/schema";
|
|
2450
|
+
var Ajv20202 = class extends core_1.default {
|
|
2451
|
+
constructor(opts = {}) {
|
|
2452
|
+
super({
|
|
2453
|
+
...opts,
|
|
2454
|
+
dynamicRef: true,
|
|
2455
|
+
next: true,
|
|
2456
|
+
unevaluated: true
|
|
2457
|
+
});
|
|
2458
|
+
}
|
|
2459
|
+
_addVocabularies() {
|
|
2460
|
+
super._addVocabularies();
|
|
2461
|
+
draft2020_1.default.forEach((v) => this.addVocabulary(v));
|
|
2462
|
+
if (this.opts.discriminator)
|
|
2463
|
+
this.addKeyword(discriminator_1.default);
|
|
2464
|
+
}
|
|
2465
|
+
_addDefaultMetaSchema() {
|
|
2466
|
+
super._addDefaultMetaSchema();
|
|
2467
|
+
const { $data, meta } = this.opts;
|
|
2468
|
+
if (!meta)
|
|
2469
|
+
return;
|
|
2470
|
+
json_schema_2020_12_1.default.call(this, $data);
|
|
2471
|
+
this.refs["http://json-schema.org/schema"] = META_SCHEMA_ID;
|
|
2472
|
+
}
|
|
2473
|
+
defaultMeta() {
|
|
2474
|
+
return this.opts.defaultMeta = super.defaultMeta() || (this.getSchema(META_SCHEMA_ID) ? META_SCHEMA_ID : void 0);
|
|
2475
|
+
}
|
|
2476
|
+
};
|
|
2477
|
+
exports.Ajv2020 = Ajv20202;
|
|
2478
|
+
module.exports = exports = Ajv20202;
|
|
2479
|
+
module.exports.Ajv2020 = Ajv20202;
|
|
2480
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2481
|
+
exports.default = Ajv20202;
|
|
2482
|
+
var validate_1 = require_validate();
|
|
2483
|
+
Object.defineProperty(exports, "KeywordCxt", { enumerable: true, get: function() {
|
|
2484
|
+
return validate_1.KeywordCxt;
|
|
2485
|
+
} });
|
|
2486
|
+
var codegen_1 = require_codegen();
|
|
2487
|
+
Object.defineProperty(exports, "_", { enumerable: true, get: function() {
|
|
2488
|
+
return codegen_1._;
|
|
2489
|
+
} });
|
|
2490
|
+
Object.defineProperty(exports, "str", { enumerable: true, get: function() {
|
|
2491
|
+
return codegen_1.str;
|
|
2492
|
+
} });
|
|
2493
|
+
Object.defineProperty(exports, "stringify", { enumerable: true, get: function() {
|
|
2494
|
+
return codegen_1.stringify;
|
|
2495
|
+
} });
|
|
2496
|
+
Object.defineProperty(exports, "nil", { enumerable: true, get: function() {
|
|
2497
|
+
return codegen_1.nil;
|
|
2498
|
+
} });
|
|
2499
|
+
Object.defineProperty(exports, "Name", { enumerable: true, get: function() {
|
|
2500
|
+
return codegen_1.Name;
|
|
2501
|
+
} });
|
|
2502
|
+
Object.defineProperty(exports, "CodeGen", { enumerable: true, get: function() {
|
|
2503
|
+
return codegen_1.CodeGen;
|
|
2504
|
+
} });
|
|
2505
|
+
var validation_error_1 = require_validation_error();
|
|
2506
|
+
Object.defineProperty(exports, "ValidationError", { enumerable: true, get: function() {
|
|
2507
|
+
return validation_error_1.default;
|
|
2508
|
+
} });
|
|
2509
|
+
var ref_error_1 = require_ref_error();
|
|
2510
|
+
Object.defineProperty(exports, "MissingRefError", { enumerable: true, get: function() {
|
|
2511
|
+
return ref_error_1.default;
|
|
2512
|
+
} });
|
|
2513
|
+
}
|
|
2514
|
+
});
|
|
2515
|
+
|
|
2516
|
+
// src/registry/validation.ts
|
|
2517
|
+
var import__ = __toESM(require__(), 1);
|
|
2518
|
+
|
|
2519
|
+
// ../core/schemas/registry.json
|
|
2520
|
+
var registry_default = {
|
|
2521
|
+
$schema: "https://json-schema.org/draft/2020-12/schema",
|
|
2522
|
+
$id: "https://hyperframes.heygen.com/schema/registry.json",
|
|
2523
|
+
title: "Hyperframes Registry Manifest",
|
|
2524
|
+
description: "Top-level manifest describing all items in a Hyperframes registry.",
|
|
2525
|
+
type: "object",
|
|
2526
|
+
required: ["name", "homepage", "items"],
|
|
2527
|
+
additionalProperties: false,
|
|
2528
|
+
properties: {
|
|
2529
|
+
$schema: {
|
|
2530
|
+
type: "string",
|
|
2531
|
+
format: "uri"
|
|
2532
|
+
},
|
|
2533
|
+
name: {
|
|
2534
|
+
type: "string",
|
|
2535
|
+
minLength: 1,
|
|
2536
|
+
description: 'Registry name (e.g. "hyperframes").'
|
|
2537
|
+
},
|
|
2538
|
+
homepage: {
|
|
2539
|
+
type: "string",
|
|
2540
|
+
format: "uri",
|
|
2541
|
+
description: "Registry homepage URL."
|
|
2542
|
+
},
|
|
2543
|
+
catalogArtifact: {
|
|
2544
|
+
type: "object",
|
|
2545
|
+
description: "Published on-device vector artifact for this registry.",
|
|
2546
|
+
required: ["revision"],
|
|
2547
|
+
additionalProperties: false,
|
|
2548
|
+
properties: {
|
|
2549
|
+
revision: {
|
|
2550
|
+
type: "string",
|
|
2551
|
+
pattern: "^[a-f0-9]{64}$",
|
|
2552
|
+
description: "SHA-256 identity of the searchable corpus and embedding contract."
|
|
2553
|
+
}
|
|
2554
|
+
}
|
|
2555
|
+
},
|
|
2556
|
+
items: {
|
|
2557
|
+
type: "array",
|
|
2558
|
+
description: "Items in this registry. Each entry is a shorthand reference; the full item manifest lives at <type-dir>/<name>/registry-item.json.",
|
|
2559
|
+
items: {
|
|
2560
|
+
type: "object",
|
|
2561
|
+
required: ["name", "type"],
|
|
2562
|
+
additionalProperties: false,
|
|
2563
|
+
properties: {
|
|
2564
|
+
name: {
|
|
2565
|
+
type: "string",
|
|
2566
|
+
pattern: "^[a-z0-9]([a-z0-9-]*[a-z0-9])?$",
|
|
2567
|
+
description: "Item name in kebab-case, must start and end with alphanumeric."
|
|
2568
|
+
},
|
|
2569
|
+
type: {
|
|
2570
|
+
type: "string",
|
|
2571
|
+
enum: ["hyperframes:example", "hyperframes:block", "hyperframes:component"]
|
|
2572
|
+
}
|
|
2573
|
+
}
|
|
2574
|
+
}
|
|
2575
|
+
}
|
|
2576
|
+
}
|
|
2577
|
+
};
|
|
2578
|
+
|
|
2579
|
+
// ../core/schemas/registry-item.json
|
|
2580
|
+
var registry_item_default = {
|
|
2581
|
+
$schema: "https://json-schema.org/draft/2020-12/schema",
|
|
2582
|
+
$id: "https://hyperframes.heygen.com/schema/registry-item.json",
|
|
2583
|
+
title: "Hyperframes Registry Item",
|
|
2584
|
+
description: "Manifest for a single distributable item (example, block, or component).",
|
|
2585
|
+
type: "object",
|
|
2586
|
+
required: ["name", "type", "title", "description", "files"],
|
|
2587
|
+
properties: {
|
|
2588
|
+
$schema: {
|
|
2589
|
+
type: "string",
|
|
2590
|
+
format: "uri"
|
|
2591
|
+
},
|
|
2592
|
+
name: {
|
|
2593
|
+
type: "string",
|
|
2594
|
+
pattern: "^[a-z0-9]([a-z0-9-]*[a-z0-9])?$",
|
|
2595
|
+
description: "Item name in kebab-case, must start and end with alphanumeric."
|
|
2596
|
+
},
|
|
2597
|
+
type: {
|
|
2598
|
+
type: "string",
|
|
2599
|
+
enum: ["hyperframes:example", "hyperframes:block", "hyperframes:component"]
|
|
2600
|
+
},
|
|
2601
|
+
title: {
|
|
2602
|
+
type: "string",
|
|
2603
|
+
minLength: 1
|
|
2604
|
+
},
|
|
2605
|
+
description: {
|
|
2606
|
+
type: "string",
|
|
2607
|
+
minLength: 1
|
|
2608
|
+
},
|
|
2609
|
+
tags: {
|
|
2610
|
+
type: "array",
|
|
2611
|
+
items: { type: "string", minLength: 1 }
|
|
2612
|
+
},
|
|
2613
|
+
author: {
|
|
2614
|
+
type: "string",
|
|
2615
|
+
minLength: 1
|
|
2616
|
+
},
|
|
2617
|
+
authorUrl: {
|
|
2618
|
+
type: "string",
|
|
2619
|
+
format: "uri"
|
|
2620
|
+
},
|
|
2621
|
+
sourcePrompt: {
|
|
2622
|
+
type: "string",
|
|
2623
|
+
minLength: 1
|
|
2624
|
+
},
|
|
2625
|
+
license: {
|
|
2626
|
+
type: "string",
|
|
2627
|
+
minLength: 1,
|
|
2628
|
+
description: 'SPDX license identifier (e.g. "Apache-2.0", "MIT").'
|
|
2629
|
+
},
|
|
2630
|
+
minCliVersion: {
|
|
2631
|
+
type: "string",
|
|
2632
|
+
pattern: "^\\d+\\.\\d+\\.\\d+(?:-[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?$",
|
|
2633
|
+
description: "Minimum `hyperframes` CLI version required to install this item."
|
|
2634
|
+
},
|
|
2635
|
+
deprecated: {
|
|
2636
|
+
type: "string",
|
|
2637
|
+
minLength: 1,
|
|
2638
|
+
description: "If set, the item is deprecated; the value is the reason or migration note."
|
|
2639
|
+
},
|
|
2640
|
+
dimensions: {
|
|
2641
|
+
type: "object",
|
|
2642
|
+
required: ["width", "height"],
|
|
2643
|
+
additionalProperties: false,
|
|
2644
|
+
properties: {
|
|
2645
|
+
width: { type: "integer", minimum: 1 },
|
|
2646
|
+
height: { type: "integer", minimum: 1 }
|
|
2647
|
+
}
|
|
2648
|
+
},
|
|
2649
|
+
duration: {
|
|
2650
|
+
type: "number",
|
|
2651
|
+
exclusiveMinimum: 0,
|
|
2652
|
+
description: "Duration in seconds. Must be > 0."
|
|
2653
|
+
},
|
|
2654
|
+
registryDependencies: {
|
|
2655
|
+
type: "array",
|
|
2656
|
+
items: {
|
|
2657
|
+
type: "string",
|
|
2658
|
+
pattern: "^[a-z0-9]([a-z0-9-]*[a-z0-9])?$"
|
|
2659
|
+
}
|
|
2660
|
+
},
|
|
2661
|
+
files: {
|
|
2662
|
+
type: "array",
|
|
2663
|
+
minItems: 1,
|
|
2664
|
+
items: {
|
|
2665
|
+
type: "object",
|
|
2666
|
+
required: ["path", "target", "type"],
|
|
2667
|
+
additionalProperties: false,
|
|
2668
|
+
properties: {
|
|
2669
|
+
path: {
|
|
2670
|
+
type: "string",
|
|
2671
|
+
minLength: 1,
|
|
2672
|
+
description: "Source path, relative to registry-item.json."
|
|
2673
|
+
},
|
|
2674
|
+
url: {
|
|
2675
|
+
type: "string",
|
|
2676
|
+
format: "uri",
|
|
2677
|
+
pattern: "^https://",
|
|
2678
|
+
description: "Absolute https:// URL the bytes are fetched from, instead of <registry base>/<type dir>/<item>/<path>. Used for CDN-hosted binary assets so the registry stays text-only; `path` still says where the file lands relative to the item."
|
|
2679
|
+
},
|
|
2680
|
+
target: {
|
|
2681
|
+
type: "string",
|
|
2682
|
+
minLength: 1,
|
|
2683
|
+
description: "Destination path in the user's project, relative to project root. Must not traverse outside the project (no `..` segments, no absolute paths).",
|
|
2684
|
+
not: {
|
|
2685
|
+
anyOf: [
|
|
2686
|
+
{ pattern: "(^|[/\\\\])\\.\\.([/\\\\]|$)" },
|
|
2687
|
+
{ pattern: "^[/\\\\]" },
|
|
2688
|
+
{ pattern: "^[A-Za-z]:[/\\\\]" }
|
|
2689
|
+
]
|
|
2690
|
+
}
|
|
2691
|
+
},
|
|
2692
|
+
type: {
|
|
2693
|
+
type: "string",
|
|
2694
|
+
enum: [
|
|
2695
|
+
"hyperframes:composition",
|
|
2696
|
+
"hyperframes:asset",
|
|
2697
|
+
"hyperframes:snippet",
|
|
2698
|
+
"hyperframes:style",
|
|
2699
|
+
"hyperframes:timeline"
|
|
2700
|
+
]
|
|
2701
|
+
}
|
|
2702
|
+
}
|
|
2703
|
+
}
|
|
2704
|
+
},
|
|
2705
|
+
preview: {
|
|
2706
|
+
type: "object",
|
|
2707
|
+
additionalProperties: false,
|
|
2708
|
+
properties: {
|
|
2709
|
+
video: { type: "string" },
|
|
2710
|
+
poster: { type: "string" }
|
|
2711
|
+
}
|
|
2712
|
+
},
|
|
2713
|
+
relatedSkill: {
|
|
2714
|
+
type: "string",
|
|
2715
|
+
minLength: 1
|
|
2716
|
+
}
|
|
2717
|
+
},
|
|
2718
|
+
allOf: [
|
|
2719
|
+
{
|
|
2720
|
+
if: {
|
|
2721
|
+
required: ["type"],
|
|
2722
|
+
properties: { type: { const: "hyperframes:component" } }
|
|
2723
|
+
},
|
|
2724
|
+
then: {
|
|
2725
|
+
not: {
|
|
2726
|
+
anyOf: [{ required: ["dimensions"] }, { required: ["duration"] }]
|
|
2727
|
+
}
|
|
2728
|
+
},
|
|
2729
|
+
else: {
|
|
2730
|
+
required: ["dimensions", "duration"]
|
|
2731
|
+
}
|
|
2732
|
+
}
|
|
2733
|
+
]
|
|
2734
|
+
};
|
|
2735
|
+
|
|
2736
|
+
// src/registry/validation.ts
|
|
2737
|
+
var ajv = new import__.Ajv2020({ strict: false, validateFormats: false });
|
|
2738
|
+
var manifestShape = ajv.compile(registry_default);
|
|
2739
|
+
var itemShape = ajv.compile(registry_item_default);
|
|
2740
|
+
function validRegistryName(name) {
|
|
2741
|
+
return name.length <= 128 && /^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/.test(name);
|
|
2742
|
+
}
|
|
2743
|
+
function validRegistryManifest(value) {
|
|
2744
|
+
return manifestShape(value) && value.items.length <= 1e4 && value.items.every((item) => validRegistryName(item.name));
|
|
2745
|
+
}
|
|
2746
|
+
function validRegistryItem(value, name, type) {
|
|
2747
|
+
return itemShape(value) && value.name === name && value.type === type && validRegistryName(value.name) && value.files.length <= 1e3;
|
|
2748
|
+
}
|
|
2749
|
+
|
|
2750
|
+
// src/registry/boundedFile.ts
|
|
2751
|
+
import { closeSync, fstatSync, openSync, readSync } from "fs";
|
|
2752
|
+
function readBoundedRegistryFile(path, maxBytes) {
|
|
2753
|
+
const fd = openSync(path, "r");
|
|
2754
|
+
try {
|
|
2755
|
+
const stat = fstatSync(fd);
|
|
2756
|
+
if (!stat.isFile() || stat.size > maxBytes) throw new Error("Registry file exceeds read limit");
|
|
2757
|
+
const chunks = [];
|
|
2758
|
+
let total = 0;
|
|
2759
|
+
while (total <= maxBytes) {
|
|
2760
|
+
const chunk = Buffer.allocUnsafe(Math.min(64 * 1024, maxBytes + 1 - total));
|
|
2761
|
+
const count = readSync(fd, chunk);
|
|
2762
|
+
if (count === 0) return Buffer.concat(chunks, total);
|
|
2763
|
+
total += count;
|
|
2764
|
+
chunks.push(chunk.subarray(0, count));
|
|
2765
|
+
}
|
|
2766
|
+
throw new Error("Registry file exceeds read limit");
|
|
2767
|
+
} finally {
|
|
2768
|
+
closeSync(fd);
|
|
2769
|
+
}
|
|
2770
|
+
}
|
|
2771
|
+
|
|
2772
|
+
// src/registry/transport.ts
|
|
2773
|
+
function registryHttpsUrl(value) {
|
|
2774
|
+
const url = new URL(value);
|
|
2775
|
+
if (url.protocol !== "https:" || url.username || url.password || url.hash) {
|
|
2776
|
+
throw new Error(
|
|
2777
|
+
"Registry URLs must be an absolute https:// URL without credentials or fragments"
|
|
2778
|
+
);
|
|
2779
|
+
}
|
|
2780
|
+
return url;
|
|
2781
|
+
}
|
|
2782
|
+
function registryPathUrl(base, ...parts) {
|
|
2783
|
+
const url = registryHttpsUrl(base);
|
|
2784
|
+
if (url.search) throw new Error("Registry base URL must not contain a query");
|
|
2785
|
+
const segments = parts.flatMap((part) => part.split("/"));
|
|
2786
|
+
if (segments.some(
|
|
2787
|
+
(part) => !part || part === "." || part === ".." || part.includes("\\") || Array.from(part).some((char) => char.charCodeAt(0) < 32)
|
|
2788
|
+
)) {
|
|
2789
|
+
throw new Error("Unsafe registry source path");
|
|
2790
|
+
}
|
|
2791
|
+
url.pathname = url.pathname.replace(/\/$/, "") + "/" + segments.map(encodeURIComponent).join("/");
|
|
2792
|
+
return url.href;
|
|
2793
|
+
}
|
|
2794
|
+
async function fetchRegistryHttps(value, signal) {
|
|
2795
|
+
let url = registryHttpsUrl(value);
|
|
2796
|
+
for (let redirects = 0; redirects <= 5; redirects++) {
|
|
2797
|
+
const response = await fetch(url.href, { signal, redirect: "manual" });
|
|
2798
|
+
if (![301, 302, 303, 307, 308].includes(response.status)) return response;
|
|
2799
|
+
const location = response.headers.get("location");
|
|
2800
|
+
await response.body?.cancel();
|
|
2801
|
+
if (!location) throw new Error("Registry redirect has no location");
|
|
2802
|
+
url = registryHttpsUrl(new URL(location, url).href);
|
|
2803
|
+
}
|
|
2804
|
+
throw new Error("Too many registry redirects");
|
|
2805
|
+
}
|
|
2806
|
+
|
|
2807
|
+
// src/registry/remote.ts
|
|
2808
|
+
import { join, basename } from "path";
|
|
2809
|
+
import { mkdirSync } from "fs";
|
|
2810
|
+
import { homedir } from "os";
|
|
2811
|
+
var DEFAULT_REGISTRY_URL = "https://raw.githubusercontent.com/heygen-com/hyperframes/main/registry";
|
|
2812
|
+
var FETCH_TIMEOUT_MS = 1e4;
|
|
2813
|
+
var MAX_MANIFEST_BYTES = 10 * 1024 * 1024;
|
|
2814
|
+
var CACHE_DIR = join(homedir(), ".hyperframes", "cache");
|
|
2815
|
+
var CACHE_TTL_MS = 24 * 60 * 60 * 1e3;
|
|
2816
|
+
function cachePath(baseUrl, key) {
|
|
2817
|
+
const slug = baseUrl.replace(/[^a-zA-Z0-9]/g, "_");
|
|
2818
|
+
return join(CACHE_DIR, `${slug}__${key}.json`);
|
|
2819
|
+
}
|
|
2820
|
+
function readCacheEntry(path, validate) {
|
|
2821
|
+
try {
|
|
2822
|
+
const entry = JSON.parse(
|
|
2823
|
+
readBoundedRegistryFile(path, MAX_MANIFEST_BYTES).toString("utf8")
|
|
2824
|
+
);
|
|
2825
|
+
if (!entry || typeof entry.fetchedAt !== "number" || !Number.isFinite(entry.fetchedAt))
|
|
2826
|
+
return void 0;
|
|
2827
|
+
if (!validate(entry.data)) return void 0;
|
|
2828
|
+
return { fetchedAt: entry.fetchedAt, data: entry.data };
|
|
2829
|
+
} catch {
|
|
2830
|
+
return void 0;
|
|
2831
|
+
}
|
|
2832
|
+
}
|
|
2833
|
+
function isFresh(entry) {
|
|
2834
|
+
return Date.now() - entry.fetchedAt <= CACHE_TTL_MS;
|
|
2835
|
+
}
|
|
2836
|
+
function writeCache(path, data) {
|
|
2837
|
+
try {
|
|
2838
|
+
mkdirSync(CACHE_DIR, { recursive: true });
|
|
2839
|
+
const root = realProjectRoot(CACHE_DIR);
|
|
2840
|
+
const entry = { fetchedAt: Date.now(), data };
|
|
2841
|
+
publishRegistryFile(root, basename(path), JSON.stringify(entry));
|
|
2842
|
+
} catch {
|
|
2843
|
+
}
|
|
2844
|
+
}
|
|
2845
|
+
async function fetchJson(url, validate) {
|
|
2846
|
+
const res = await fetchRegistryHttps(url, AbortSignal.timeout(FETCH_TIMEOUT_MS));
|
|
2847
|
+
if (!res.ok) {
|
|
2848
|
+
throw new Error(`Registry fetch failed: ${url} \u2014 HTTP ${res.status}`);
|
|
2849
|
+
}
|
|
2850
|
+
const bytes = await readBoundedResponse(res, MAX_MANIFEST_BYTES);
|
|
2851
|
+
if (!bytes) throw new Error("Registry manifest exceeds download limit");
|
|
2852
|
+
const data = JSON.parse(bytes.toString("utf8"));
|
|
2853
|
+
if (!validate(data)) throw new Error("Invalid registry manifest");
|
|
2854
|
+
return data;
|
|
2855
|
+
}
|
|
2856
|
+
async function fetchRegistryManifest(baseUrl = DEFAULT_REGISTRY_URL, options) {
|
|
2857
|
+
const url = registryPathUrl(baseUrl, "registry.json");
|
|
2858
|
+
const cacheFile = cachePath(baseUrl, "registry");
|
|
2859
|
+
const cached = readCacheEntry(cacheFile, validRegistryManifest);
|
|
2860
|
+
if (!options?.skipCache && cached && isFresh(cached)) return cached.data;
|
|
2861
|
+
try {
|
|
2862
|
+
const manifest = await fetchJson(url, validRegistryManifest);
|
|
2863
|
+
writeCache(cacheFile, manifest);
|
|
2864
|
+
return manifest;
|
|
2865
|
+
} catch {
|
|
2866
|
+
return cached?.data;
|
|
2867
|
+
}
|
|
2868
|
+
}
|
|
2869
|
+
async function fetchItemManifest(name, type, baseUrl = DEFAULT_REGISTRY_URL) {
|
|
2870
|
+
if (!validRegistryName(name) || !Object.hasOwn(ITEM_TYPE_DIRS, type))
|
|
2871
|
+
throw new Error("Invalid registry item name or type");
|
|
2872
|
+
const dir = ITEM_TYPE_DIRS[type];
|
|
2873
|
+
const validate = (value) => validRegistryItem(value, name, type);
|
|
2874
|
+
const url = registryPathUrl(baseUrl, dir, name, "registry-item.json");
|
|
2875
|
+
const cacheFile = cachePath(baseUrl, `${dir}__${name}`);
|
|
2876
|
+
const cached = readCacheEntry(cacheFile, validate);
|
|
2877
|
+
if (cached && isFresh(cached)) return cached.data;
|
|
2878
|
+
try {
|
|
2879
|
+
const item = await fetchJson(url, validate);
|
|
2880
|
+
writeCache(cacheFile, item);
|
|
2881
|
+
return item;
|
|
2882
|
+
} catch (err) {
|
|
2883
|
+
if (cached) return cached.data;
|
|
2884
|
+
throw err;
|
|
2885
|
+
}
|
|
2886
|
+
}
|
|
2887
|
+
function describeCauseChain(err) {
|
|
2888
|
+
const parts = [];
|
|
2889
|
+
let current = err;
|
|
2890
|
+
const seen = /* @__PURE__ */ new Set();
|
|
2891
|
+
while (current instanceof Error && !seen.has(current)) {
|
|
2892
|
+
seen.add(current);
|
|
2893
|
+
const code = current.code;
|
|
2894
|
+
const text = code && !current.message.includes(String(code)) ? `${current.message} [${String(code)}]` : current.message;
|
|
2895
|
+
if (text && !parts.includes(text)) parts.push(text);
|
|
2896
|
+
current = current.cause;
|
|
2897
|
+
}
|
|
2898
|
+
if (parts.length === 0) return String(err);
|
|
2899
|
+
const [head, ...rest] = parts;
|
|
2900
|
+
return rest.length ? `${head} (${rest.join("; ")})` : head;
|
|
2901
|
+
}
|
|
2902
|
+
function isRetryableTransport(err) {
|
|
2903
|
+
const text = describeCauseChain(err).toLowerCase();
|
|
2904
|
+
if (/certificate|self-signed|self signed|unable to verify|altname|ssl|tls/.test(text)) {
|
|
2905
|
+
return false;
|
|
2906
|
+
}
|
|
2907
|
+
return /fetch failed|econnreset|econnrefused|etimedout|eai_again|socket hang up|timeouterror|aborted|network/.test(
|
|
2908
|
+
text
|
|
2909
|
+
);
|
|
2910
|
+
}
|
|
2911
|
+
async function fetchWithRetry(url, attempts = 3) {
|
|
2912
|
+
let lastErr;
|
|
2913
|
+
const signal = AbortSignal.timeout(FETCH_TIMEOUT_MS);
|
|
2914
|
+
for (let attempt = 1; attempt <= attempts; attempt++) {
|
|
2915
|
+
try {
|
|
2916
|
+
return await fetchRegistryHttps(url, signal);
|
|
2917
|
+
} catch (err) {
|
|
2918
|
+
lastErr = err;
|
|
2919
|
+
if (attempt === attempts || !isRetryableTransport(err)) break;
|
|
2920
|
+
await new Promise((resolve) => setTimeout(resolve, 150 * attempt));
|
|
2921
|
+
}
|
|
2922
|
+
}
|
|
2923
|
+
throw lastErr;
|
|
2924
|
+
}
|
|
2925
|
+
function assetSourceUrl(item, file, baseUrl = DEFAULT_REGISTRY_URL) {
|
|
2926
|
+
if (file.url === void 0) {
|
|
2927
|
+
return registryPathUrl(baseUrl, ITEM_TYPE_DIRS[item.type], item.name, file.path);
|
|
2928
|
+
}
|
|
2929
|
+
if (!file.url.startsWith("https://")) {
|
|
2930
|
+
throw new Error(
|
|
2931
|
+
`Unsafe file.url "${file.url}" for "${item.name}/${file.path}": must be an absolute https:// URL.`
|
|
2932
|
+
);
|
|
2933
|
+
}
|
|
2934
|
+
return registryHttpsUrl(file.url).href;
|
|
2935
|
+
}
|
|
2936
|
+
async function fetchItemFile(item, file, baseUrl = DEFAULT_REGISTRY_URL, budget = { remainingBytes: 512 * 1024 * 1024 }) {
|
|
2937
|
+
if (/(^|[/\\])\.\.([/\\]|$)/.test(file.path)) {
|
|
2938
|
+
throw new Error(`Unsafe file.path "${file.path}": path segments may not contain "..".`);
|
|
2939
|
+
}
|
|
2940
|
+
const url = assetSourceUrl(item, file, baseUrl);
|
|
2941
|
+
let res;
|
|
2942
|
+
try {
|
|
2943
|
+
res = await fetchWithRetry(url);
|
|
2944
|
+
} catch (err) {
|
|
2945
|
+
throw new Error(`File fetch failed: ${url} \u2014 ${describeCauseChain(err)}`, { cause: err });
|
|
2946
|
+
}
|
|
2947
|
+
if (!res.ok) {
|
|
2948
|
+
throw new Error(`File fetch failed: ${url} \u2014 HTTP ${res.status}`);
|
|
2949
|
+
}
|
|
2950
|
+
const bytes = await readBoundedResponse(res, 128 * 1024 * 1024, budget);
|
|
2951
|
+
if (!bytes) throw new Error("Registry file exceeds download budget");
|
|
2952
|
+
return bytes;
|
|
2953
|
+
}
|
|
2954
|
+
|
|
2955
|
+
export {
|
|
2956
|
+
validRegistryItem,
|
|
2957
|
+
DEFAULT_REGISTRY_URL,
|
|
2958
|
+
fetchRegistryManifest,
|
|
2959
|
+
fetchItemManifest,
|
|
2960
|
+
fetchItemFile
|
|
2961
|
+
};
|