@bilal-fazlani/mock-server 0.2.1 → 0.3.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/.next/standalone/.next/BUILD_ID +1 -1
- package/.next/standalone/.next/build-manifest.json +3 -3
- package/.next/standalone/.next/node_modules/shiki-43d062b67f27bbdc/dist/bundle-full.mjs +41 -0
- package/.next/standalone/.next/node_modules/shiki-43d062b67f27bbdc/dist/engine-oniguruma.mjs +8 -0
- package/.next/standalone/.next/node_modules/shiki-43d062b67f27bbdc/dist/index.mjs +29 -0
- package/.next/standalone/.next/node_modules/shiki-43d062b67f27bbdc/dist/langs-bundle-full-4noeO3oH.mjs +1283 -0
- package/.next/standalone/.next/node_modules/shiki-43d062b67f27bbdc/dist/rolldown-runtime-BBjsoOtd.mjs +27 -0
- package/.next/standalone/.next/node_modules/shiki-43d062b67f27bbdc/dist/themes.mjs +396 -0
- package/.next/standalone/.next/node_modules/shiki-43d062b67f27bbdc/dist/wasm.mjs +3 -0
- package/.next/standalone/.next/node_modules/shiki-43d062b67f27bbdc/package.json +73 -0
- package/.next/standalone/.next/prerender-manifest.json +3 -3
- package/.next/standalone/.next/required-server-files.json +4 -1
- package/.next/standalone/.next/server/app/[...path]/route.js +2 -2
- package/.next/standalone/.next/server/app/[...path]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/_global-error.html +1 -1
- package/.next/standalone/.next/server/app/_global-error.rsc +1 -1
- package/.next/standalone/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/_not-found.html +1 -1
- package/.next/standalone/.next/server/app/_not-found.rsc +2 -2
- package/.next/standalone/.next/server/app/_not-found.segments/_full.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_not-found.segments/_index.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/index.html +1 -1
- package/.next/standalone/.next/server/app/index.rsc +2 -2
- package/.next/standalone/.next/server/app/index.segments/__PAGE__.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/index.segments/_full.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/index.segments/_head.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/index.segments/_index.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/index.segments/_tree.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/ui/[...notFound]/page.js +1 -1
- package/.next/standalone/.next/server/app/ui/[...notFound]/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/ui/[...notFound]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/ui/api/catalog/route.js +2 -2
- package/.next/standalone/.next/server/app/ui/api/catalog/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/ui/api/global-mocks/[system]/[endpoint]/route.js +2 -2
- package/.next/standalone/.next/server/app/ui/api/global-mocks/[system]/[endpoint]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/ui/api/global-mocks/route.js +1 -1
- package/.next/standalone/.next/server/app/ui/api/global-mocks/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/ui/api/health/route.js +1 -1
- package/.next/standalone/.next/server/app/ui/api/health/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/ui/api/logs/[logId]/route.js +1 -1
- package/.next/standalone/.next/server/app/ui/api/logs/[logId]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/ui/api/logs/route.js +1 -1
- package/.next/standalone/.next/server/app/ui/api/logs/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/ui/api/profiles/[profileId]/reset/route.js +1 -1
- package/.next/standalone/.next/server/app/ui/api/profiles/[profileId]/reset/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/ui/api/profiles/[profileId]/route.js +2 -2
- package/.next/standalone/.next/server/app/ui/api/profiles/[profileId]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/ui/catalog/[system]/[endpoint]/page.js +8 -7
- package/.next/standalone/.next/server/app/ui/catalog/[system]/[endpoint]/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/ui/catalog/[system]/[endpoint]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/ui/catalog/page.js +5 -5
- package/.next/standalone/.next/server/app/ui/catalog/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/ui/catalog/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/ui/environment/page.js +4 -4
- package/.next/standalone/.next/server/app/ui/environment/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/ui/environment/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/ui/global-mocks/page/server-reference-manifest.json +2 -2
- package/.next/standalone/.next/server/app/ui/global-mocks/page.js +4 -4
- package/.next/standalone/.next/server/app/ui/global-mocks/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/ui/global-mocks/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/ui/logs/page/server-reference-manifest.json +1 -1
- package/.next/standalone/.next/server/app/ui/logs/page.js +5 -5
- package/.next/standalone/.next/server/app/ui/logs/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/ui/logs/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/ui/page.js +4 -4
- package/.next/standalone/.next/server/app/ui/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/ui/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/ui/profiles/[profileId]/page/server-reference-manifest.json +4 -4
- package/.next/standalone/.next/server/app/ui/profiles/[profileId]/page.js +6 -6
- package/.next/standalone/.next/server/app/ui/profiles/[profileId]/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/ui/profiles/[profileId]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/ui/profiles/new/page/server-reference-manifest.json +4 -4
- package/.next/standalone/.next/server/app/ui/profiles/new/page.js +5 -5
- package/.next/standalone/.next/server/app/ui/profiles/new/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/ui/profiles/new/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/ui/profiles/new.html +1 -1
- package/.next/standalone/.next/server/app/ui/profiles/new.rsc +31 -31
- package/.next/standalone/.next/server/app/ui/profiles/new.segments/_full.segment.rsc +31 -31
- package/.next/standalone/.next/server/app/ui/profiles/new.segments/_head.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/ui/profiles/new.segments/_index.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/ui/profiles/new.segments/_tree.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/ui/profiles/new.segments/ui/profiles/new/__PAGE__.segment.rsc +18 -17
- package/.next/standalone/.next/server/app/ui/profiles/new.segments/ui/profiles/new.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/ui/profiles/new.segments/ui/profiles.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/ui/profiles/new.segments/ui.segment.rsc +3 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0_w4w88._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0eo49or._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0om7kg8._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0s6drot._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0t8o5f7._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__14hrty_._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__1d3vxpt._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__1e407ve._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__1islaxo._.js +3 -0
- package/.next/standalone/.next/server/chunks/{_01xbyam._.js → _0qbx9v1._.js} +6 -6
- package/.next/standalone/.next/server/chunks/{_0022gwg._.js → _16q11je._.js} +6 -6
- package/.next/standalone/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_1hi1g43.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__095ld3v._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0c_8sxb._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__131d-3a._.js → [root-of-the-server]__0ok8mg5._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0uln_1r._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0xmt17v._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__16y93ju._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__18_kqdp._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__18z_8pt._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__1ac328a._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__1ffkjjl._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__1gmmta4._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__1k-7k5k._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__1po4if1._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__1r99_25._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__1xkfxwl._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__20xpe3a._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/_0ceyznt._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/{_1s8xzfs._.js → _0dcewjo._.js} +5 -5
- package/.next/standalone/.next/server/chunks/ssr/_0dp2bez._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/_0hv6b4i._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/_0txvxmw._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/_13ez5qw._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/_142--49._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/_1nyvjoj._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/src_1s6weq_._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/src_app_ui_logs_LogRow_tsx_1mzipt8._.js +1 -1
- package/.next/standalone/.next/server/middleware-build-manifest.js +3 -3
- package/.next/standalone/.next/server/pages/404.html +1 -1
- package/.next/standalone/.next/server/pages/500.html +1 -1
- package/.next/standalone/.next/server/server-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/server-reference-manifest.json +8 -8
- package/.next/standalone/.next/static/chunks/12ny879muwkxw.js +1 -0
- package/.next/standalone/.next/static/chunks/18hh57jv94a5e.js +1 -0
- package/.next/standalone/.next/static/chunks/1rml3lmlc_-1c.js +1 -0
- package/.next/standalone/.next/static/chunks/1zxhmuljxo270.js +1 -0
- package/.next/standalone/.next/static/chunks/2bqfpygv3x9-k.js +1 -0
- package/.next/standalone/.next/static/chunks/3fpjbzbf26aey.js +1 -0
- package/.next/standalone/.next/static/chunks/3ivfq435-2tni.css +3 -0
- package/.next/standalone/next.config.ts +32 -0
- package/.next/standalone/node_modules/@shikijs/core/dist/index.mjs +1406 -0
- package/.next/standalone/node_modules/@shikijs/core/package.json +60 -0
- package/.next/standalone/node_modules/@shikijs/engine-javascript/dist/engine-compile.mjs +47 -0
- package/.next/standalone/node_modules/@shikijs/engine-javascript/dist/engine-raw.mjs +27 -0
- package/.next/standalone/node_modules/@shikijs/engine-javascript/dist/index.mjs +4 -0
- package/.next/standalone/node_modules/@shikijs/engine-javascript/dist/scanner-DX8LRFGE.mjs +77 -0
- package/.next/standalone/node_modules/@shikijs/engine-javascript/package.json +42 -0
- package/.next/standalone/node_modules/@shikijs/engine-oniguruma/dist/index.mjs +449 -0
- package/.next/standalone/node_modules/@shikijs/engine-oniguruma/dist/wasm-inlined.mjs +8 -0
- package/.next/standalone/node_modules/@shikijs/engine-oniguruma/package.json +45 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/abap.mjs +5 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/actionscript-3.mjs +5 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/ada.mjs +5 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/angular-expression.mjs +5 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/angular-html.mjs +16 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/angular-inline-style.mjs +8 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/angular-inline-template.mjs +10 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/angular-let-declaration.mjs +8 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/angular-template-blocks.mjs +10 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/angular-template.mjs +8 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/angular-ts.mjs +18 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/apache.mjs +5 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/apex.mjs +5 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/apl.mjs +16 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/applescript.mjs +5 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/ara.mjs +5 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/asciidoc.mjs +5 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/asm.mjs +5 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/astro.mjs +18 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/awk.mjs +5 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/ballerina.mjs +5 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/bat.mjs +5 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/beancount.mjs +5 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/berry.mjs +5 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/bibtex.mjs +5 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/bicep.mjs +5 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/bird2.mjs +5 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/blade.mjs +20 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/bsl.mjs +8 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/c.mjs +5 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/c3.mjs +5 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/cadence.mjs +5 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/cairo.mjs +8 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/clarity.mjs +5 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/clojure.mjs +5 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/cmake.mjs +5 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/cobol.mjs +10 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/codeowners.mjs +5 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/codeql.mjs +5 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/coffee.mjs +8 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/common-lisp.mjs +5 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/coq.mjs +5 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/cpp-macro.mjs +12 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/cpp.mjs +14 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/crystal.mjs +18 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/csharp.mjs +5 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/css.mjs +5 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/csv.mjs +5 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/cue.mjs +5 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/cypher.mjs +5 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/d.mjs +5 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/dart.mjs +5 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/dax.mjs +5 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/desktop.mjs +5 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/diff.mjs +5 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/docker.mjs +5 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/dotenv.mjs +5 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/dream-maker.mjs +5 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/edge.mjs +12 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/elixir.mjs +8 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/elm.mjs +8 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/emacs-lisp.mjs +5 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/erb.mjs +10 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/erlang.mjs +8 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/es-tag-css.mjs +12 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/es-tag-glsl.mjs +12 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/es-tag-html.mjs +12 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/es-tag-sql.mjs +10 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/es-tag-xml.mjs +8 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/fennel.mjs +5 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/fish.mjs +5 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/fluent.mjs +5 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/fortran-fixed-form.mjs +8 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/fortran-free-form.mjs +5 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/fsharp.mjs +8 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/gdresource.mjs +10 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/gdscript.mjs +5 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/gdshader.mjs +5 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/genie.mjs +5 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/gherkin.mjs +5 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/git-commit.mjs +8 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/git-rebase.mjs +8 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/gleam.mjs +5 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/glimmer-js.mjs +14 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/glimmer-ts.mjs +14 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/glsl.mjs +8 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/gn.mjs +5 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/gnuplot.mjs +5 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/go.mjs +5 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/graphql.mjs +14 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/groovy.mjs +5 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/hack.mjs +10 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/haml.mjs +10 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/handlebars.mjs +14 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/haskell.mjs +5 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/haxe.mjs +5 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/hcl.mjs +5 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/hjson.mjs +5 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/hlsl.mjs +5 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/html-derivative.mjs +8 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/html.mjs +10 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/http.mjs +14 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/hurl.mjs +12 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/hxml.mjs +8 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/hy.mjs +5 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/imba.mjs +5 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/ini.mjs +5 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/java.mjs +5 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/javascript.mjs +5 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/jinja-html.mjs +8 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/jinja.mjs +8 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/jison.mjs +8 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/json.mjs +5 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/json5.mjs +5 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/jsonc.mjs +5 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/jsonl.mjs +5 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/jsonnet.mjs +5 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/jssm.mjs +5 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/jsx.mjs +5 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/julia.mjs +16 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/just.mjs +18 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/kdl.mjs +5 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/kotlin.mjs +5 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/kusto.mjs +5 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/latex.mjs +8 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/lean.mjs +5 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/less.mjs +5 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/liquid.mjs +14 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/llvm.mjs +5 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/log.mjs +5 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/logo.mjs +5 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/lua.mjs +8 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/luau.mjs +5 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/make.mjs +5 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/markdown-nix.mjs +5 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/markdown-vue.mjs +5 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/markdown.mjs +5 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/marko.mjs +14 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/matlab.mjs +5 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/mdc.mjs +12 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/mdx.mjs +5 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/mermaid.mjs +5 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/mipsasm.mjs +5 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/mojo.mjs +5 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/moonbit.mjs +5 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/move.mjs +5 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/narrat.mjs +5 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/nextflow-groovy.mjs +5 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/nextflow.mjs +8 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/nginx.mjs +8 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/nim.mjs +20 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/nix.mjs +8 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/nushell.mjs +5 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/objective-c.mjs +5 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/objective-cpp.mjs +5 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/ocaml.mjs +5 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/odin.mjs +5 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/openscad.mjs +5 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/pascal.mjs +5 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/perl.mjs +16 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/php.mjs +18 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/pkl.mjs +5 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/plsql.mjs +5 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/po.mjs +5 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/polar.mjs +5 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/postcss.mjs +5 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/powerquery.mjs +5 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/powershell.mjs +5 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/prisma.mjs +5 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/prolog.mjs +5 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/proto.mjs +5 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/pug.mjs +12 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/puppet.mjs +5 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/purescript.mjs +5 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/python.mjs +5 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/qml.mjs +8 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/qmldir.mjs +5 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/qss.mjs +5 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/r.mjs +5 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/racket.mjs +5 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/raku.mjs +5 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/razor.mjs +10 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/reg.mjs +5 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/regexp.mjs +5 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/rel.mjs +5 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/riscv.mjs +5 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/ron.mjs +5 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/rosmsg.mjs +5 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/rst.mjs +22 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/ruby.mjs +30 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/rust.mjs +5 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/sas.mjs +8 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/sass.mjs +5 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/scala.mjs +5 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/scheme.mjs +5 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/scss.mjs +8 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/sdbl.mjs +5 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/shaderlab.mjs +8 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/shellscript.mjs +5 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/shellsession.mjs +8 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/smalltalk.mjs +5 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/solidity.mjs +5 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/soy.mjs +8 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/sparql.mjs +8 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/splunk.mjs +5 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/sql.mjs +5 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/ssh-config.mjs +5 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/stata.mjs +8 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/stylus.mjs +5 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/surrealql.mjs +8 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/svelte.mjs +14 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/swift.mjs +5 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/system-verilog.mjs +5 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/systemd.mjs +5 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/talonscript.mjs +5 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/tasl.mjs +5 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/tcl.mjs +5 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/templ.mjs +12 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/terraform.mjs +5 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/tex.mjs +8 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/toml.mjs +5 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/ts-tags.mjs +18 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/tsv.mjs +5 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/tsx.mjs +5 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/turtle.mjs +5 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/twig.mjs +18 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/typescript.mjs +5 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/typespec.mjs +5 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/typst.mjs +5 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/v.mjs +5 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/vala.mjs +5 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/vb.mjs +5 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/verilog.mjs +5 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/vhdl.mjs +5 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/viml.mjs +5 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/vue-directives.mjs +5 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/vue-html.mjs +8 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/vue-interpolations.mjs +5 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/vue-sfc-style-variable-injection.mjs +8 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/vue-vine.mjs +18 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/vue.mjs +26 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/vyper.mjs +5 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/wasm.mjs +5 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/wenyan.mjs +5 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/wgsl.mjs +5 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/wikitext.mjs +5 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/wit.mjs +5 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/wolfram.mjs +5 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/xml.mjs +8 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/xsl.mjs +8 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/yaml.mjs +5 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/zenscript.mjs +5 -0
- package/.next/standalone/node_modules/@shikijs/langs/dist/zig.mjs +5 -0
- package/.next/standalone/node_modules/@shikijs/langs/package.json +387 -0
- package/.next/standalone/node_modules/@shikijs/primitive/dist/index.mjs +834 -0
- package/.next/standalone/node_modules/@shikijs/primitive/package.json +56 -0
- package/.next/standalone/node_modules/@shikijs/themes/dist/andromeeda.mjs +2 -0
- package/.next/standalone/node_modules/@shikijs/themes/dist/aurora-x.mjs +2 -0
- package/.next/standalone/node_modules/@shikijs/themes/dist/ayu-dark.mjs +2 -0
- package/.next/standalone/node_modules/@shikijs/themes/dist/ayu-light.mjs +2 -0
- package/.next/standalone/node_modules/@shikijs/themes/dist/ayu-mirage.mjs +2 -0
- package/.next/standalone/node_modules/@shikijs/themes/dist/catppuccin-frappe.mjs +2 -0
- package/.next/standalone/node_modules/@shikijs/themes/dist/catppuccin-latte.mjs +2 -0
- package/.next/standalone/node_modules/@shikijs/themes/dist/catppuccin-macchiato.mjs +2 -0
- package/.next/standalone/node_modules/@shikijs/themes/dist/catppuccin-mocha.mjs +2 -0
- package/.next/standalone/node_modules/@shikijs/themes/dist/dark-plus.mjs +2 -0
- package/.next/standalone/node_modules/@shikijs/themes/dist/dracula-soft.mjs +2 -0
- package/.next/standalone/node_modules/@shikijs/themes/dist/dracula.mjs +2 -0
- package/.next/standalone/node_modules/@shikijs/themes/dist/everforest-dark.mjs +2 -0
- package/.next/standalone/node_modules/@shikijs/themes/dist/everforest-light.mjs +2 -0
- package/.next/standalone/node_modules/@shikijs/themes/dist/github-dark-default.mjs +2 -0
- package/.next/standalone/node_modules/@shikijs/themes/dist/github-dark-dimmed.mjs +2 -0
- package/.next/standalone/node_modules/@shikijs/themes/dist/github-dark-high-contrast.mjs +2 -0
- package/.next/standalone/node_modules/@shikijs/themes/dist/github-dark.mjs +2 -0
- package/.next/standalone/node_modules/@shikijs/themes/dist/github-light-default.mjs +2 -0
- package/.next/standalone/node_modules/@shikijs/themes/dist/github-light-high-contrast.mjs +2 -0
- package/.next/standalone/node_modules/@shikijs/themes/dist/github-light.mjs +2 -0
- package/.next/standalone/node_modules/@shikijs/themes/dist/gruvbox-dark-hard.mjs +2 -0
- package/.next/standalone/node_modules/@shikijs/themes/dist/gruvbox-dark-medium.mjs +2 -0
- package/.next/standalone/node_modules/@shikijs/themes/dist/gruvbox-dark-soft.mjs +2 -0
- package/.next/standalone/node_modules/@shikijs/themes/dist/gruvbox-light-hard.mjs +2 -0
- package/.next/standalone/node_modules/@shikijs/themes/dist/gruvbox-light-medium.mjs +2 -0
- package/.next/standalone/node_modules/@shikijs/themes/dist/gruvbox-light-soft.mjs +2 -0
- package/.next/standalone/node_modules/@shikijs/themes/dist/horizon-bright.mjs +2 -0
- package/.next/standalone/node_modules/@shikijs/themes/dist/horizon.mjs +2 -0
- package/.next/standalone/node_modules/@shikijs/themes/dist/houston.mjs +2 -0
- package/.next/standalone/node_modules/@shikijs/themes/dist/kanagawa-dragon.mjs +2 -0
- package/.next/standalone/node_modules/@shikijs/themes/dist/kanagawa-lotus.mjs +2 -0
- package/.next/standalone/node_modules/@shikijs/themes/dist/kanagawa-wave.mjs +2 -0
- package/.next/standalone/node_modules/@shikijs/themes/dist/laserwave.mjs +2 -0
- package/.next/standalone/node_modules/@shikijs/themes/dist/light-plus.mjs +2 -0
- package/.next/standalone/node_modules/@shikijs/themes/dist/material-theme-darker.mjs +2 -0
- package/.next/standalone/node_modules/@shikijs/themes/dist/material-theme-lighter.mjs +2 -0
- package/.next/standalone/node_modules/@shikijs/themes/dist/material-theme-ocean.mjs +2 -0
- package/.next/standalone/node_modules/@shikijs/themes/dist/material-theme-palenight.mjs +2 -0
- package/.next/standalone/node_modules/@shikijs/themes/dist/material-theme.mjs +2 -0
- package/.next/standalone/node_modules/@shikijs/themes/dist/min-dark.mjs +2 -0
- package/.next/standalone/node_modules/@shikijs/themes/dist/min-light.mjs +2 -0
- package/.next/standalone/node_modules/@shikijs/themes/dist/monokai.mjs +2 -0
- package/.next/standalone/node_modules/@shikijs/themes/dist/night-owl-light.mjs +2 -0
- package/.next/standalone/node_modules/@shikijs/themes/dist/night-owl.mjs +2 -0
- package/.next/standalone/node_modules/@shikijs/themes/dist/nord.mjs +2 -0
- package/.next/standalone/node_modules/@shikijs/themes/dist/one-dark-pro.mjs +2 -0
- package/.next/standalone/node_modules/@shikijs/themes/dist/one-light.mjs +2 -0
- package/.next/standalone/node_modules/@shikijs/themes/dist/plastic.mjs +2 -0
- package/.next/standalone/node_modules/@shikijs/themes/dist/poimandres.mjs +2 -0
- package/.next/standalone/node_modules/@shikijs/themes/dist/red.mjs +2 -0
- package/.next/standalone/node_modules/@shikijs/themes/dist/rose-pine-dawn.mjs +2 -0
- package/.next/standalone/node_modules/@shikijs/themes/dist/rose-pine-moon.mjs +2 -0
- package/.next/standalone/node_modules/@shikijs/themes/dist/rose-pine.mjs +2 -0
- package/.next/standalone/node_modules/@shikijs/themes/dist/slack-dark.mjs +2 -0
- package/.next/standalone/node_modules/@shikijs/themes/dist/slack-ochin.mjs +2 -0
- package/.next/standalone/node_modules/@shikijs/themes/dist/snazzy-light.mjs +2 -0
- package/.next/standalone/node_modules/@shikijs/themes/dist/solarized-dark.mjs +2 -0
- package/.next/standalone/node_modules/@shikijs/themes/dist/solarized-light.mjs +2 -0
- package/.next/standalone/node_modules/@shikijs/themes/dist/synthwave-84.mjs +2 -0
- package/.next/standalone/node_modules/@shikijs/themes/dist/tokyo-night.mjs +2 -0
- package/.next/standalone/node_modules/@shikijs/themes/dist/vesper.mjs +2 -0
- package/.next/standalone/node_modules/@shikijs/themes/dist/vitesse-black.mjs +2 -0
- package/.next/standalone/node_modules/@shikijs/themes/dist/vitesse-dark.mjs +2 -0
- package/.next/standalone/node_modules/@shikijs/themes/dist/vitesse-light.mjs +2 -0
- package/.next/standalone/node_modules/@shikijs/themes/package.json +106 -0
- package/.next/standalone/node_modules/@shikijs/types/dist/index.mjs +9 -0
- package/.next/standalone/node_modules/@shikijs/types/package.json +39 -0
- package/.next/standalone/node_modules/@shikijs/vscode-textmate/dist/index.js +3216 -0
- package/.next/standalone/node_modules/@shikijs/vscode-textmate/package.json +46 -0
- package/.next/standalone/node_modules/ccount/index.js +27 -0
- package/.next/standalone/node_modules/ccount/package.json +71 -0
- package/.next/standalone/node_modules/character-entities-html4/index.js +259 -0
- package/.next/standalone/node_modules/character-entities-html4/package.json +79 -0
- package/.next/standalone/node_modules/character-entities-legacy/index.js +113 -0
- package/.next/standalone/node_modules/character-entities-legacy/package.json +77 -0
- package/.next/standalone/node_modules/comma-separated-tokens/index.js +74 -0
- package/.next/standalone/node_modules/comma-separated-tokens/package.json +72 -0
- package/.next/standalone/node_modules/hast-util-to-html/index.js +8 -0
- package/.next/standalone/node_modules/hast-util-to-html/lib/handle/comment.js +52 -0
- package/.next/standalone/node_modules/hast-util-to-html/lib/handle/doctype.js +27 -0
- package/.next/standalone/node_modules/hast-util-to-html/lib/handle/element.js +265 -0
- package/.next/standalone/node_modules/hast-util-to-html/lib/handle/index.js +47 -0
- package/.next/standalone/node_modules/hast-util-to-html/lib/handle/raw.js +27 -0
- package/.next/standalone/node_modules/hast-util-to-html/lib/handle/root.js +22 -0
- package/.next/standalone/node_modules/hast-util-to-html/lib/handle/text.js +38 -0
- package/.next/standalone/node_modules/hast-util-to-html/lib/index.js +257 -0
- package/.next/standalone/node_modules/hast-util-to-html/lib/omission/closing.js +358 -0
- package/.next/standalone/node_modules/hast-util-to-html/lib/omission/omission.js +44 -0
- package/.next/standalone/node_modules/hast-util-to-html/lib/omission/opening.js +148 -0
- package/.next/standalone/node_modules/hast-util-to-html/lib/omission/util/siblings.js +50 -0
- package/.next/standalone/node_modules/hast-util-to-html/package.json +106 -0
- package/.next/standalone/node_modules/hast-util-whitespace/index.js +1 -0
- package/.next/standalone/node_modules/hast-util-whitespace/lib/index.js +34 -0
- package/.next/standalone/node_modules/hast-util-whitespace/package.json +83 -0
- package/.next/standalone/node_modules/html-void-elements/index.js +27 -0
- package/.next/standalone/node_modules/html-void-elements/package.json +79 -0
- package/.next/standalone/node_modules/oniguruma-parser/dist/parser/node-utils.js +2 -0
- package/.next/standalone/node_modules/oniguruma-parser/dist/parser/parse.js +2 -0
- package/.next/standalone/node_modules/oniguruma-parser/dist/tokenizer/tokenize.js +34 -0
- package/.next/standalone/node_modules/oniguruma-parser/dist/traverser/traverse.js +2 -0
- package/.next/standalone/node_modules/oniguruma-parser/dist/utils.js +2 -0
- package/.next/standalone/node_modules/oniguruma-parser/package.json +64 -0
- package/.next/standalone/node_modules/oniguruma-to-es/dist/esm/index.js +1878 -0
- package/.next/standalone/node_modules/oniguruma-to-es/dist/esm/package.json +1 -0
- package/.next/standalone/node_modules/oniguruma-to-es/package.json +61 -0
- package/.next/standalone/node_modules/property-information/index.js +17 -0
- package/.next/standalone/node_modules/property-information/lib/aria.js +61 -0
- package/.next/standalone/node_modules/property-information/lib/find.js +97 -0
- package/.next/standalone/node_modules/property-information/lib/hast-to-react.js +30 -0
- package/.next/standalone/node_modules/property-information/lib/html.js +332 -0
- package/.next/standalone/node_modules/property-information/lib/normalize.js +12 -0
- package/.next/standalone/node_modules/property-information/lib/svg.js +569 -0
- package/.next/standalone/node_modules/property-information/lib/util/case-insensitive-transform.js +13 -0
- package/.next/standalone/node_modules/property-information/lib/util/case-sensitive-transform.js +11 -0
- package/.next/standalone/node_modules/property-information/lib/util/create.js +69 -0
- package/.next/standalone/node_modules/property-information/lib/util/defined-info.js +60 -0
- package/.next/standalone/node_modules/property-information/lib/util/info.js +32 -0
- package/.next/standalone/node_modules/property-information/lib/util/merge.js +27 -0
- package/.next/standalone/node_modules/property-information/lib/util/schema.js +29 -0
- package/.next/standalone/node_modules/property-information/lib/util/types.js +13 -0
- package/.next/standalone/node_modules/property-information/lib/xlink.js +17 -0
- package/.next/standalone/node_modules/property-information/lib/xml.js +9 -0
- package/.next/standalone/node_modules/property-information/lib/xmlns.js +9 -0
- package/.next/standalone/node_modules/property-information/package.json +84 -0
- package/.next/standalone/node_modules/regex/package.json +60 -0
- package/.next/standalone/node_modules/regex/src/atomic.js +224 -0
- package/.next/standalone/node_modules/regex/src/internals.js +2 -0
- package/.next/standalone/node_modules/regex/src/subclass.js +98 -0
- package/.next/standalone/node_modules/regex/src/utils-internals.js +33 -0
- package/.next/standalone/node_modules/regex-recursion/package.json +47 -0
- package/.next/standalone/node_modules/regex-recursion/src/index.js +365 -0
- package/.next/standalone/node_modules/regex-utilities/package.json +35 -0
- package/.next/standalone/node_modules/regex-utilities/src/index.js +170 -0
- package/.next/standalone/node_modules/shiki/dist/bundle-full.mjs +41 -0
- package/.next/standalone/node_modules/shiki/dist/engine-oniguruma.mjs +8 -0
- package/.next/standalone/node_modules/shiki/dist/index.mjs +29 -0
- package/.next/standalone/node_modules/shiki/dist/langs-bundle-full-4noeO3oH.mjs +1283 -0
- package/.next/standalone/node_modules/shiki/dist/rolldown-runtime-BBjsoOtd.mjs +27 -0
- package/.next/standalone/node_modules/shiki/dist/themes.mjs +396 -0
- package/.next/standalone/node_modules/shiki/dist/wasm.mjs +3 -0
- package/.next/standalone/node_modules/shiki/package.json +73 -0
- package/.next/standalone/node_modules/space-separated-tokens/index.js +24 -0
- package/.next/standalone/node_modules/space-separated-tokens/package.json +67 -0
- package/.next/standalone/node_modules/stringify-entities/index.js +6 -0
- package/.next/standalone/node_modules/stringify-entities/lib/constant/dangerous.js +16 -0
- package/.next/standalone/node_modules/stringify-entities/lib/core.js +117 -0
- package/.next/standalone/node_modules/stringify-entities/lib/index.js +36 -0
- package/.next/standalone/node_modules/stringify-entities/lib/util/format-basic.js +9 -0
- package/.next/standalone/node_modules/stringify-entities/lib/util/format-smart.js +69 -0
- package/.next/standalone/node_modules/stringify-entities/lib/util/to-decimal.js +16 -0
- package/.next/standalone/node_modules/stringify-entities/lib/util/to-hexadecimal.js +16 -0
- package/.next/standalone/node_modules/stringify-entities/lib/util/to-named.js +57 -0
- package/.next/standalone/node_modules/stringify-entities/package.json +86 -0
- package/.next/standalone/node_modules/zwitch/index.js +118 -0
- package/.next/standalone/node_modules/zwitch/package.json +72 -0
- package/.next/standalone/package-lock.json +719 -672
- package/.next/standalone/package.json +2 -1
- package/.next/standalone/release-please-config.json +1 -0
- package/.next/standalone/scripts/validate-catalog.ts +38 -0
- package/.next/standalone/server.js +1 -1
- package/.next/standalone/src/app/[...path]/route.ts +41 -0
- package/.next/standalone/src/app/ui/api/catalog/route.ts +32 -0
- package/.next/standalone/src/app/ui/api/global-mocks/[system]/[endpoint]/route.ts +53 -0
- package/.next/standalone/src/app/ui/api/global-mocks/route.ts +8 -0
- package/.next/standalone/src/app/ui/api/health/route.ts +47 -0
- package/.next/standalone/src/app/ui/api/logs/[logId]/route.ts +15 -0
- package/.next/standalone/src/app/ui/api/logs/route.ts +24 -0
- package/.next/standalone/src/app/ui/api/profiles/[profileId]/reset/route.ts +25 -0
- package/.next/standalone/src/app/ui/api/profiles/[profileId]/route.ts +64 -0
- package/.next/standalone/src/app/ui/catalog/highlight.ts +12 -0
- package/.next/standalone/src/app/ui/catalog/scenario-view.ts +68 -0
- package/.next/standalone/src/app/ui/global-mocks/actions.ts +50 -0
- package/.next/standalone/src/app/ui/logs/actions.ts +11 -0
- package/.next/standalone/src/app/ui/logs/list-state.ts +64 -0
- package/.next/standalone/src/app/ui/logs/types.ts +17 -0
- package/.next/standalone/src/app/ui/profiles/actions.ts +60 -0
- package/.next/standalone/src/lib/build-info.ts +13 -0
- package/.next/standalone/src/lib/catalog/find.ts +17 -0
- package/.next/standalone/src/lib/catalog/load.ts +226 -0
- package/.next/standalone/src/lib/catalog/path-template.ts +63 -0
- package/.next/standalone/src/lib/catalog/request-example.ts +96 -0
- package/.next/standalone/src/lib/catalog/schema.ts +154 -0
- package/.next/standalone/src/lib/catalog/selector.ts +153 -0
- package/.next/standalone/src/lib/catalog/types.ts +43 -0
- package/.next/standalone/src/lib/catalog/validate.ts +290 -0
- package/.next/standalone/src/lib/config.ts +93 -0
- package/.next/standalone/src/lib/dynamic/history-store.ts +68 -0
- package/.next/standalone/src/lib/environment.ts +155 -0
- package/.next/standalone/src/lib/format.ts +3 -0
- package/.next/standalone/src/lib/logs/admin-log.ts +27 -0
- package/.next/standalone/src/lib/logs/store.ts +153 -0
- package/.next/standalone/src/lib/mock-engine/fixtures.ts +38 -0
- package/.next/standalone/src/lib/mock-engine/resolver.ts +110 -0
- package/.next/standalone/src/lib/mock-engine/template.ts +71 -0
- package/.next/standalone/src/lib/mongo/embedded.ts +40 -0
- package/.next/standalone/src/lib/profiles/api-scenarios.ts +69 -0
- package/.next/standalone/src/lib/profiles/form.ts +64 -0
- package/.next/standalone/src/lib/profiles/stale.ts +56 -0
- package/.next/standalone/src/lib/profiles/store.ts +420 -0
- package/.next/standalone/src/lib/router/handler.ts +187 -0
- package/.next/standalone/src/lib/router/passthrough.ts +86 -0
- package/.next/standalone/src/lib/router/route-request.ts +645 -0
- package/.next/standalone/src/lib/runtime.ts +150 -0
- package/.next/standalone/src/lib/scenarios.ts +52 -0
- package/.next/standalone/src/lib/utils.ts +6 -0
- package/.next/standalone/tests/api/catalog-route.test.ts +72 -0
- package/.next/standalone/tests/api/global-mocks-route.test.ts +171 -0
- package/.next/standalone/tests/api/profiles-reset-route.test.ts +50 -0
- package/.next/standalone/tests/api/profiles-route.test.ts +132 -0
- package/.next/standalone/tests/bin/args.test.ts +42 -0
- package/.next/standalone/tests/catalog/find.test.ts +40 -0
- package/.next/standalone/tests/catalog/load.test.ts +258 -0
- package/.next/standalone/tests/catalog/path-template.test.ts +79 -0
- package/.next/standalone/tests/catalog/request-example.test.ts +86 -0
- package/.next/standalone/tests/catalog/schema.test.ts +249 -0
- package/.next/standalone/tests/catalog/selector.test.ts +175 -0
- package/.next/standalone/tests/catalog/validate.test.ts +462 -0
- package/.next/standalone/tests/dynamic/history-store.test.ts +82 -0
- package/.next/standalone/tests/global-mocks/actions.test.ts +192 -0
- package/.next/standalone/tests/lib/config-catalog-dir.test.ts +17 -0
- package/.next/standalone/tests/lib/config.test.ts +99 -0
- package/.next/standalone/tests/lib/environment.test.ts +115 -0
- package/.next/standalone/tests/lib/format.test.ts +8 -0
- package/.next/standalone/tests/lib/runtime.test.ts +153 -0
- package/.next/standalone/tests/lib/scenarios.test.ts +88 -0
- package/.next/standalone/tests/logs/admin-log.test.ts +51 -0
- package/.next/standalone/tests/logs/store.test.ts +233 -0
- package/.next/standalone/tests/mock-engine/fixtures.test.ts +33 -0
- package/.next/standalone/tests/mock-engine/resolver.test.ts +117 -0
- package/.next/standalone/tests/mock-engine/template.test.ts +74 -0
- package/.next/standalone/tests/mongo/embedded.test.ts +78 -0
- package/.next/standalone/tests/profiles/actions.test.ts +183 -0
- package/.next/standalone/tests/profiles/api-scenarios.test.ts +105 -0
- package/.next/standalone/tests/profiles/form.test.ts +181 -0
- package/.next/standalone/tests/profiles/request-log-ttl-index.test.ts +62 -0
- package/.next/standalone/tests/profiles/stale.test.ts +174 -0
- package/.next/standalone/tests/profiles/store.test.ts +470 -0
- package/.next/standalone/tests/router/dynamic.e2e.test.ts +147 -0
- package/.next/standalone/tests/router/handler.e2e.test.ts +97 -0
- package/.next/standalone/tests/router/handler.test.ts +344 -0
- package/.next/standalone/tests/router/passthrough.test.ts +100 -0
- package/.next/standalone/tests/router/route-request.test.ts +1147 -0
- package/.next/standalone/tests/testdata/fixtures/test-system/hello_world/by_amount.ts +3 -0
- package/.next/standalone/tests/testdata/fixtures/test-system/resolver_default/hold.json +1 -0
- package/.next/standalone/tests/testdata/fixtures/test-system/resolver_default/success.json +1 -0
- package/.next/standalone/tests/ui/list-state.test.ts +84 -0
- package/.next/standalone/tests/ui/log-summary-view.test.ts +24 -0
- package/.next/standalone/tests/ui/scenario-view.test.ts +138 -0
- package/.next/standalone/vitest.config.ts +19 -0
- package/package.json +2 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0668hgm._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__078olc9._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0f-_c79._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0geqpjb._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0uudiqz._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0wg041t._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__19qak1g._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__1eiw7ks._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__1qb7sih._.js +0 -3
- package/.next/standalone/.next/server/chunks/_095ilyi._.js +0 -11
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__05255v2._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0dmadib._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0jey74_._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0nj8b73._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__12oahit._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__14u5l1_._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__1bbz1wr._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__1eoh3gn._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__1kd5kn_._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__1kie6ah._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__1u6i1bm._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__1ypwv93._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/_0a347_9._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/_0btcklf._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/_0exg_3l._.js +0 -11
- package/.next/standalone/.next/server/chunks/ssr/_1_7ssjl._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/_1hdkp-g._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/_1jfkfx-._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/node_modules_10liiot._.js +0 -3
- package/.next/standalone/.next/static/chunks/08ghjqetuoc_b.js +0 -1
- package/.next/standalone/.next/static/chunks/19w2nv_pvssix.js +0 -1
- package/.next/standalone/.next/static/chunks/1ljc320o2yhky.js +0 -1
- package/.next/standalone/.next/static/chunks/2akx4rvdzbimg.css +0 -3
- package/.next/standalone/.next/static/chunks/2kg3qe34tmgob.js +0 -1
- package/.next/standalone/.next/static/chunks/2nlgh2oq4eg96.js +0 -1
- package/.next/standalone/.next/static/chunks/30olthhuj56a1.js +0 -1
- /package/.next/standalone/.next/static/{SV1UWx8kQm3m26f1jMoBU → 8CkjRpETX_8CM0X2xtdJ7}/_buildManifest.js +0 -0
- /package/.next/standalone/.next/static/{SV1UWx8kQm3m26f1jMoBU → 8CkjRpETX_8CM0X2xtdJ7}/_clientMiddlewareManifest.js +0 -0
- /package/.next/standalone/.next/static/{SV1UWx8kQm3m26f1jMoBU → 8CkjRpETX_8CM0X2xtdJ7}/_ssgManifest.js +0 -0
- /package/.next/standalone/catalog/hello-system/account_balance/{_dynamic.ts → dynamic.ts} +0 -0
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
import type { Catalog } from './catalog/types'
|
|
2
|
+
|
|
3
|
+
export type EnvironmentStatus = 'set' | 'default' | 'unset'
|
|
4
|
+
|
|
5
|
+
export interface EnvironmentDefinition {
|
|
6
|
+
name: string
|
|
7
|
+
category: string
|
|
8
|
+
description: string
|
|
9
|
+
defaultValue?: string
|
|
10
|
+
possibleValues?: string[]
|
|
11
|
+
hideValue?: boolean
|
|
12
|
+
display: boolean
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export interface EnvironmentRow {
|
|
16
|
+
name: string
|
|
17
|
+
value: string
|
|
18
|
+
status: EnvironmentStatus
|
|
19
|
+
category: string
|
|
20
|
+
description: string
|
|
21
|
+
possibleValues?: string[]
|
|
22
|
+
valueHidden?: boolean
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export const APP_ENVIRONMENT: EnvironmentDefinition[] = [
|
|
26
|
+
{
|
|
27
|
+
name: 'CATALOG_PATH',
|
|
28
|
+
category: 'System',
|
|
29
|
+
description:
|
|
30
|
+
'Path to the catalog directory. Relative paths resolve against the server working directory; absolute paths are used as-is.',
|
|
31
|
+
defaultValue: './catalog',
|
|
32
|
+
display: true,
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
name: 'MONGODB_CONNECTION_STRING',
|
|
36
|
+
category: 'System',
|
|
37
|
+
description: 'MongoDB connection URI for profiles, global mocks, mappings, and logs.',
|
|
38
|
+
hideValue: true,
|
|
39
|
+
display: true,
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
name: 'MONGODB_DB',
|
|
43
|
+
category: 'System',
|
|
44
|
+
description: 'MongoDB database name for mock data.',
|
|
45
|
+
defaultValue: 'mockDB',
|
|
46
|
+
display: true,
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
name: 'PASSTHROUGH_AS_DEFAULT',
|
|
50
|
+
category: 'Routing',
|
|
51
|
+
description: 'Selects passthrough as the implicit scenario when true.',
|
|
52
|
+
defaultValue: 'false',
|
|
53
|
+
possibleValues: ['true', 'false'],
|
|
54
|
+
display: true,
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
name: 'UNMOCKED_USERS',
|
|
58
|
+
category: 'Routing',
|
|
59
|
+
description: 'Controls fallback behavior for unknown profile IDs.',
|
|
60
|
+
defaultValue: 'ERROR',
|
|
61
|
+
possibleValues: ['ERROR', 'DEFAULT_MOCK', 'REAL'],
|
|
62
|
+
display: true,
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
name: 'MOCK_CONSOLE_LOG_LEVEL',
|
|
66
|
+
category: 'System',
|
|
67
|
+
description: 'Console request log threshold.',
|
|
68
|
+
defaultValue: 'info',
|
|
69
|
+
possibleValues: ['info', 'warn', 'error'],
|
|
70
|
+
display: true,
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
name: 'PASSTHROUGH_TIMEOUT_MS',
|
|
74
|
+
category: 'Routing',
|
|
75
|
+
description: 'Timeout for real upstream passthrough requests.',
|
|
76
|
+
defaultValue: '30000',
|
|
77
|
+
display: true,
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
name: 'RESOLVER_HISTORY_LIMIT',
|
|
81
|
+
category: 'Routing',
|
|
82
|
+
description: 'Number of past returned slugs passed to scenario resolvers (<slug>.ts) as history.',
|
|
83
|
+
defaultValue: '10',
|
|
84
|
+
display: true,
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
name: 'NODE_ENV',
|
|
88
|
+
category: 'Runtime',
|
|
89
|
+
description: 'Runtime mode reported by Next.js and Node.',
|
|
90
|
+
display: false,
|
|
91
|
+
},
|
|
92
|
+
]
|
|
93
|
+
|
|
94
|
+
export function buildEnvironmentRows(
|
|
95
|
+
catalog: Catalog,
|
|
96
|
+
env: Record<string, string | undefined>,
|
|
97
|
+
): EnvironmentRow[] {
|
|
98
|
+
return [
|
|
99
|
+
...APP_ENVIRONMENT.filter((definition) => definition.display).map((definition) =>
|
|
100
|
+
rowForDefinition(definition, env),
|
|
101
|
+
),
|
|
102
|
+
...catalogBaseUrlRows(catalog, env),
|
|
103
|
+
]
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
function catalogBaseUrlRows(
|
|
107
|
+
catalog: Catalog,
|
|
108
|
+
env: Record<string, string | undefined>,
|
|
109
|
+
): EnvironmentRow[] {
|
|
110
|
+
const systemsByEnv = new Map<string, string[]>()
|
|
111
|
+
for (const system of catalog.systems) {
|
|
112
|
+
const systems = systemsByEnv.get(system.baseUrlEnv) ?? []
|
|
113
|
+
systems.push(system.name)
|
|
114
|
+
systemsByEnv.set(system.baseUrlEnv, systems)
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
return [...systemsByEnv.entries()].map(([name, systems]) =>
|
|
118
|
+
rowForDefinition(
|
|
119
|
+
{
|
|
120
|
+
name,
|
|
121
|
+
category: 'Upstream',
|
|
122
|
+
description: `Base URL for ${systems.join(', ')} passthrough.`,
|
|
123
|
+
display: true,
|
|
124
|
+
},
|
|
125
|
+
env,
|
|
126
|
+
),
|
|
127
|
+
)
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
function rowForDefinition(
|
|
131
|
+
definition: EnvironmentDefinition,
|
|
132
|
+
env: Record<string, string | undefined>,
|
|
133
|
+
): EnvironmentRow {
|
|
134
|
+
const raw = env[definition.name]
|
|
135
|
+
const value =
|
|
136
|
+
definition.hideValue && raw !== undefined
|
|
137
|
+
? 'Hidden'
|
|
138
|
+
: raw === undefined
|
|
139
|
+
? definition.defaultValue === undefined
|
|
140
|
+
? '(not set)'
|
|
141
|
+
: `(default: ${definition.defaultValue})`
|
|
142
|
+
: raw === ''
|
|
143
|
+
? '(empty string)'
|
|
144
|
+
: raw
|
|
145
|
+
|
|
146
|
+
return {
|
|
147
|
+
name: definition.name,
|
|
148
|
+
value,
|
|
149
|
+
status: raw === undefined ? (definition.defaultValue === undefined ? 'unset' : 'default') : 'set',
|
|
150
|
+
category: definition.category,
|
|
151
|
+
description: definition.description,
|
|
152
|
+
...(definition.possibleValues ? { possibleValues: definition.possibleValues } : {}),
|
|
153
|
+
...(definition.hideValue && raw !== undefined ? { valueHidden: true } : {}),
|
|
154
|
+
}
|
|
155
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { Db } from 'mongodb'
|
|
2
|
+
import { insertLogEntry, newLogId } from './store'
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Records an admin action (profile save / progress reset) as a log entry so it
|
|
6
|
+
* shows in the logs view, regardless of whether the UI or the /ui/api routes
|
|
7
|
+
* drove the change. Failures are swallowed — an admin action must not fail
|
|
8
|
+
* because logging failed.
|
|
9
|
+
*/
|
|
10
|
+
export async function writeAdminLog(
|
|
11
|
+
db: Db,
|
|
12
|
+
profileId: string,
|
|
13
|
+
adminAction: 'profile_saved' | 'progress_reset',
|
|
14
|
+
adminEndpoint?: string,
|
|
15
|
+
): Promise<void> {
|
|
16
|
+
try {
|
|
17
|
+
await insertLogEntry(db, {
|
|
18
|
+
logId: newLogId(),
|
|
19
|
+
ts: new Date(),
|
|
20
|
+
kind: 'admin',
|
|
21
|
+
profileId,
|
|
22
|
+
trace: { adminAction, ...(adminEndpoint && { adminEndpoint }) },
|
|
23
|
+
})
|
|
24
|
+
} catch (err) {
|
|
25
|
+
console.warn('[mock-log] failed to write admin log entry:', err)
|
|
26
|
+
}
|
|
27
|
+
}
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
import type { Db } from 'mongodb'
|
|
2
|
+
|
|
3
|
+
export type LogOutcome = 'fixture' | 'passthrough' | 'error'
|
|
4
|
+
|
|
5
|
+
export type ScenarioSource = 'pin' | 'sequence' | 'implicit' | 'global' | 'unmocked_policy'
|
|
6
|
+
|
|
7
|
+
export interface LogPayload {
|
|
8
|
+
headers: Record<string, string>
|
|
9
|
+
body: unknown
|
|
10
|
+
truncated: boolean
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export interface LogResponsePayload extends LogPayload {
|
|
14
|
+
status: number
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export interface ProfileResolutionTrace {
|
|
18
|
+
selector: string
|
|
19
|
+
value: string
|
|
20
|
+
via: 'direct' | { namespace: string; key: string }
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export interface LogTraceData {
|
|
24
|
+
profileResolution?: ProfileResolutionTrace
|
|
25
|
+
scenario?: string
|
|
26
|
+
scenarioSource?: ScenarioSource
|
|
27
|
+
sequence?: { step: number; of: number; served: number }
|
|
28
|
+
/** Present when a resolver-backed scenario ran: the picked slug and what it returned. */
|
|
29
|
+
resolver?: { slug: string; returned: string }
|
|
30
|
+
captures?: Array<{ namespace: string; key: string }>
|
|
31
|
+
placeholders?: Record<string, string>
|
|
32
|
+
validation?: { request?: 'ok' | 'failed'; response?: 'ok' | 'failed' | 'drift_warning' }
|
|
33
|
+
upstream?: { url: string; status: number; durationMs: number }
|
|
34
|
+
adminAction?: 'profile_saved' | 'progress_reset'
|
|
35
|
+
adminEndpoint?: string
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export interface LogEntry {
|
|
39
|
+
logId: string
|
|
40
|
+
ts: Date
|
|
41
|
+
durationMs?: number
|
|
42
|
+
kind: 'request' | 'admin'
|
|
43
|
+
profileId?: string
|
|
44
|
+
system?: string
|
|
45
|
+
endpoint?: string
|
|
46
|
+
method?: string
|
|
47
|
+
path?: string
|
|
48
|
+
query?: string
|
|
49
|
+
request?: LogPayload
|
|
50
|
+
response?: LogResponsePayload
|
|
51
|
+
outcome?: LogOutcome
|
|
52
|
+
error?: { code: string; message: string }
|
|
53
|
+
trace: LogTraceData
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export interface ListLogsOptions {
|
|
57
|
+
profileId?: string
|
|
58
|
+
endpoint?: string
|
|
59
|
+
errorsOnly?: boolean
|
|
60
|
+
/** Case-insensitive prefix match on logId (paste from x-mock-log-id). */
|
|
61
|
+
logIdQuery?: string
|
|
62
|
+
sinceId?: string
|
|
63
|
+
beforeId?: string
|
|
64
|
+
limit?: number
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export type LogSummary = Omit<LogEntry, 'request' | 'response'> & {
|
|
68
|
+
response?: { status: number }
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
const DEFAULT_LIMIT = 100
|
|
72
|
+
|
|
73
|
+
const SUMMARY_PROJECTION = {
|
|
74
|
+
_id: 0,
|
|
75
|
+
request: 0,
|
|
76
|
+
'response.headers': 0,
|
|
77
|
+
'response.body': 0,
|
|
78
|
+
'response.truncated': 0,
|
|
79
|
+
} as const
|
|
80
|
+
|
|
81
|
+
async function buildLogFilter(
|
|
82
|
+
collection: import('mongodb').Collection<LogEntry>,
|
|
83
|
+
options: ListLogsOptions,
|
|
84
|
+
): Promise<Record<string, unknown>> {
|
|
85
|
+
const filter: Record<string, unknown> = {}
|
|
86
|
+
if (options.profileId) filter.profileId = options.profileId
|
|
87
|
+
if (options.endpoint) filter.endpoint = options.endpoint
|
|
88
|
+
if (options.errorsOnly) filter.outcome = 'error'
|
|
89
|
+
if (options.logIdQuery) {
|
|
90
|
+
filter.logId = { $regex: `^${escapeRegex(options.logIdQuery)}`, $options: 'i' }
|
|
91
|
+
}
|
|
92
|
+
// Keyset cursors respect the { ts: -1, logId: -1 } sort so entries sharing a
|
|
93
|
+
// millisecond are never skipped. `before` (older) takes precedence over
|
|
94
|
+
// `since` (newer) if both are somehow supplied; the UI only sends one.
|
|
95
|
+
const cursorId = options.beforeId ?? options.sinceId
|
|
96
|
+
if (cursorId) {
|
|
97
|
+
const cursor = await collection.findOne(
|
|
98
|
+
{ logId: cursorId },
|
|
99
|
+
{ projection: { _id: 0, ts: 1, logId: 1 } },
|
|
100
|
+
)
|
|
101
|
+
if (cursor) {
|
|
102
|
+
const op = options.beforeId ? '$lt' : '$gt'
|
|
103
|
+
filter.$or = [{ ts: { [op]: cursor.ts } }, { ts: cursor.ts, logId: { [op]: cursor.logId } }]
|
|
104
|
+
} else if (options.beforeId) {
|
|
105
|
+
// Unknown/expired `before` cursor → "no older entries". `$and` with an
|
|
106
|
+
// impossible clause guarantees empty without clobbering a logId regex.
|
|
107
|
+
filter.$and = [{ logId: { $in: [] } }]
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
return filter
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
export async function insertLogEntry(db: Db, entry: LogEntry): Promise<void> {
|
|
114
|
+
await db.collection<LogEntry>('requestLogs').insertOne({ ...entry })
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
export async function listLogEntries(db: Db, options: ListLogsOptions): Promise<LogEntry[]> {
|
|
118
|
+
const collection = db.collection<LogEntry>('requestLogs')
|
|
119
|
+
const filter = await buildLogFilter(collection, options)
|
|
120
|
+
return collection
|
|
121
|
+
.find(filter, { projection: { _id: 0 } })
|
|
122
|
+
.sort({ ts: -1, logId: -1 })
|
|
123
|
+
.limit(options.limit ?? DEFAULT_LIMIT)
|
|
124
|
+
.toArray()
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
export async function listLogSummaries(db: Db, options: ListLogsOptions): Promise<LogSummary[]> {
|
|
128
|
+
const collection = db.collection<LogEntry>('requestLogs')
|
|
129
|
+
const filter = await buildLogFilter(collection, options)
|
|
130
|
+
return collection
|
|
131
|
+
.find<LogSummary>(filter, { projection: SUMMARY_PROJECTION })
|
|
132
|
+
.sort({ ts: -1, logId: -1 })
|
|
133
|
+
.limit(options.limit ?? DEFAULT_LIMIT)
|
|
134
|
+
.toArray()
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
export async function getLogEntry(db: Db, logId: string): Promise<LogEntry | null> {
|
|
138
|
+
return db.collection<LogEntry>('requestLogs').findOne({ logId }, { projection: { _id: 0 } })
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
export async function clearLogs(db: Db, profileId?: string): Promise<void> {
|
|
142
|
+
await db
|
|
143
|
+
.collection<LogEntry>('requestLogs')
|
|
144
|
+
.deleteMany(profileId === undefined ? {} : { profileId })
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
export function newLogId(): string {
|
|
148
|
+
return `lg_${crypto.randomUUID().replaceAll('-', '').slice(0, 12)}`
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
function escapeRegex(raw: string): string {
|
|
152
|
+
return raw.replace(/[.*+?^${}()|[\]\\]/g, '\\$&')
|
|
153
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import fs from 'node:fs'
|
|
2
|
+
import path from 'node:path'
|
|
3
|
+
|
|
4
|
+
export interface Fixture {
|
|
5
|
+
description?: string
|
|
6
|
+
summary?: string
|
|
7
|
+
status: number
|
|
8
|
+
headers?: Record<string, string>
|
|
9
|
+
body: unknown
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export class FixtureError extends Error {}
|
|
13
|
+
|
|
14
|
+
export function fixtureFilePath(
|
|
15
|
+
catalogDir: string,
|
|
16
|
+
systemSlug: string,
|
|
17
|
+
endpointName: string,
|
|
18
|
+
scenario: string,
|
|
19
|
+
): string {
|
|
20
|
+
return path.join(catalogDir, systemSlug, endpointName, `${scenario}.json`)
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export function loadFixture(
|
|
24
|
+
catalogDir: string,
|
|
25
|
+
systemSlug: string,
|
|
26
|
+
endpointName: string,
|
|
27
|
+
scenario: string,
|
|
28
|
+
): Fixture {
|
|
29
|
+
const file = fixtureFilePath(catalogDir, systemSlug, endpointName, scenario)
|
|
30
|
+
if (!fs.existsSync(file)) {
|
|
31
|
+
throw new FixtureError(`fixture not found: ${file}`)
|
|
32
|
+
}
|
|
33
|
+
const parsed = JSON.parse(fs.readFileSync(file, 'utf8')) as Fixture
|
|
34
|
+
if (typeof parsed.status !== 'number' || !('body' in parsed)) {
|
|
35
|
+
throw new FixtureError(`invalid fixture (requires numeric "status" and "body"): ${file}`)
|
|
36
|
+
}
|
|
37
|
+
return parsed
|
|
38
|
+
}
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import path from 'node:path'
|
|
2
|
+
import vm from 'node:vm'
|
|
3
|
+
import { transformSync } from 'esbuild'
|
|
4
|
+
|
|
5
|
+
export const DEFAULT_DYNAMIC_TIMEOUT_MS = 100
|
|
6
|
+
|
|
7
|
+
export interface ResolverInput {
|
|
8
|
+
request: {
|
|
9
|
+
method: string
|
|
10
|
+
path: string
|
|
11
|
+
pathParams: Record<string, string>
|
|
12
|
+
query: Record<string, string[]>
|
|
13
|
+
headers: Record<string, string>
|
|
14
|
+
body: unknown
|
|
15
|
+
}
|
|
16
|
+
history: string[]
|
|
17
|
+
profileId: string | null
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export interface CompiledResolver {
|
|
21
|
+
/** Optional `export const description = '…'` from the resolver source — its UI label. */
|
|
22
|
+
description?: string
|
|
23
|
+
/** Optional `export const summary = '…'` — secondary line shown under the label. */
|
|
24
|
+
summary?: string
|
|
25
|
+
invoke(input: ResolverInput, timeoutMs: number): unknown
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export class ResolverCompileError extends Error {}
|
|
29
|
+
export class ResolverRuntimeError extends Error {}
|
|
30
|
+
export class ResolverTimeoutError extends Error {}
|
|
31
|
+
|
|
32
|
+
export function resolverFilePath(
|
|
33
|
+
catalogDir: string,
|
|
34
|
+
systemSlug: string,
|
|
35
|
+
endpointName: string,
|
|
36
|
+
slug: string,
|
|
37
|
+
): string {
|
|
38
|
+
return path.join(catalogDir, systemSlug, endpointName, `${slug}.ts`)
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export function compileResolver(source: string, label: string): CompiledResolver {
|
|
42
|
+
let code: string
|
|
43
|
+
try {
|
|
44
|
+
code = transformSync(source, { loader: 'ts', format: 'cjs', target: 'node18' }).code
|
|
45
|
+
} catch (err) {
|
|
46
|
+
throw new ResolverCompileError(`${label}: failed to transpile resolver: ${message(err)}`)
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
// Empty context: no require / process / fetch / console leak from the host.
|
|
50
|
+
const sandbox: Record<string, unknown> = { module: { exports: {} } }
|
|
51
|
+
sandbox.exports = (sandbox.module as { exports: unknown }).exports
|
|
52
|
+
const context = vm.createContext(sandbox)
|
|
53
|
+
try {
|
|
54
|
+
new vm.Script(code, { filename: label }).runInContext(context, { timeout: 1000 })
|
|
55
|
+
} catch (err) {
|
|
56
|
+
throw new ResolverCompileError(`${label}: failed to evaluate resolver: ${message(err)}`)
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
const mod = (sandbox.module as { exports: Record<string, unknown> }).exports
|
|
60
|
+
const fn = typeof mod === 'function' ? mod : (mod?.default as unknown)
|
|
61
|
+
if (typeof fn !== 'function') {
|
|
62
|
+
throw new ResolverCompileError(`${label}: resolver must default-export a function`)
|
|
63
|
+
}
|
|
64
|
+
const rawDescription = (mod as Record<string, unknown> | undefined)?.description
|
|
65
|
+
const description = typeof rawDescription === 'string' ? rawDescription : undefined
|
|
66
|
+
const rawSummary = (mod as Record<string, unknown> | undefined)?.summary
|
|
67
|
+
const summary = typeof rawSummary === 'string' ? rawSummary : undefined
|
|
68
|
+
sandbox.__resolver = fn
|
|
69
|
+
const invokeScript = new vm.Script('__resolver(__input)', { filename: `${label}#invoke` })
|
|
70
|
+
|
|
71
|
+
return {
|
|
72
|
+
...(description !== undefined ? { description } : {}),
|
|
73
|
+
...(summary !== undefined ? { summary } : {}),
|
|
74
|
+
invoke(input: ResolverInput, timeoutMs: number): unknown {
|
|
75
|
+
sandbox.__input = input
|
|
76
|
+
try {
|
|
77
|
+
return invokeScript.runInContext(context, { timeout: timeoutMs })
|
|
78
|
+
} catch (err) {
|
|
79
|
+
if (isTimeout(err)) {
|
|
80
|
+
throw new ResolverTimeoutError(`${label}: resolver exceeded ${timeoutMs}ms`)
|
|
81
|
+
}
|
|
82
|
+
throw new ResolverRuntimeError(`${label}: resolver threw: ${message(err)}`)
|
|
83
|
+
}
|
|
84
|
+
},
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
// Real vm timeouts carry Node's documented, stable error code
|
|
89
|
+
// `ERR_SCRIPT_EXECUTION_TIMEOUT`. Detect them by code rather than by matching
|
|
90
|
+
// the message text, so a resolver that legitimately throws an error whose
|
|
91
|
+
// message merely contains "timed out" is still surfaced as a runtime error
|
|
92
|
+
// with its original message intact. Like `.message`, this own-property `code`
|
|
93
|
+
// survives the vm realm crossing, and regular thrown errors do not have it.
|
|
94
|
+
function isTimeout(err: unknown): boolean {
|
|
95
|
+
return (
|
|
96
|
+
err !== null &&
|
|
97
|
+
typeof err === 'object' &&
|
|
98
|
+
(err as { code?: unknown }).code === 'ERR_SCRIPT_EXECUTION_TIMEOUT'
|
|
99
|
+
)
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
// Errors thrown by vm timeouts are constructed in the sandbox's realm, so
|
|
103
|
+
// `err instanceof Error` is false even though `err.message` is a normal
|
|
104
|
+
// string. Check for a `message` property instead of relying on `instanceof`.
|
|
105
|
+
function message(err: unknown): string {
|
|
106
|
+
if (err && typeof err === 'object' && typeof (err as { message?: unknown }).message === 'string') {
|
|
107
|
+
return (err as { message: string }).message
|
|
108
|
+
}
|
|
109
|
+
return String(err)
|
|
110
|
+
}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import {
|
|
2
|
+
extractValue,
|
|
3
|
+
parseSelector,
|
|
4
|
+
RequestContext,
|
|
5
|
+
SelectorParseError,
|
|
6
|
+
} from '../catalog/selector'
|
|
7
|
+
|
|
8
|
+
export class PlaceholderError extends Error {}
|
|
9
|
+
|
|
10
|
+
const PLACEHOLDER_RE = /\{\{(.+?)\}\}/g
|
|
11
|
+
|
|
12
|
+
function resolvePlaceholder(expr: string, ctx: RequestContext, now: Date): string {
|
|
13
|
+
if (expr === 'now:iso') return now.toISOString()
|
|
14
|
+
if (expr === 'now:YYYYMMDD') return now.toISOString().slice(0, 10).replace(/-/g, '')
|
|
15
|
+
if (expr.startsWith('now:')) {
|
|
16
|
+
throw new PlaceholderError(`unknown now formatter in "{{${expr}}}" (use now:iso or now:YYYYMMDD)`)
|
|
17
|
+
}
|
|
18
|
+
let selector: ReturnType<typeof parseSelector>
|
|
19
|
+
try {
|
|
20
|
+
selector = parseSelector(expr)
|
|
21
|
+
} catch (err) {
|
|
22
|
+
if (err instanceof SelectorParseError) {
|
|
23
|
+
throw new PlaceholderError(`invalid placeholder "{{${expr}}}": ${err.message}`)
|
|
24
|
+
}
|
|
25
|
+
throw err
|
|
26
|
+
}
|
|
27
|
+
const value = extractValue(selector, ctx)
|
|
28
|
+
if (value === null) {
|
|
29
|
+
throw new PlaceholderError(`placeholder "{{${expr}}}" did not resolve against the request`)
|
|
30
|
+
}
|
|
31
|
+
return String(value)
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export function resolveTemplate(
|
|
35
|
+
node: unknown,
|
|
36
|
+
ctx: RequestContext,
|
|
37
|
+
now: Date,
|
|
38
|
+
resolutions?: Record<string, string>,
|
|
39
|
+
): unknown {
|
|
40
|
+
if (typeof node === 'string') {
|
|
41
|
+
return node.replace(PLACEHOLDER_RE, (_, expr: string) => {
|
|
42
|
+
const value = resolvePlaceholder(expr, ctx, now)
|
|
43
|
+
if (resolutions) resolutions[`{{${expr}}}`] = value
|
|
44
|
+
return value
|
|
45
|
+
})
|
|
46
|
+
}
|
|
47
|
+
if (Array.isArray(node)) {
|
|
48
|
+
return node.map((item) => resolveTemplate(item, ctx, now, resolutions))
|
|
49
|
+
}
|
|
50
|
+
if (node !== null && typeof node === 'object') {
|
|
51
|
+
return Object.fromEntries(
|
|
52
|
+
Object.entries(node).map(([k, v]) => [k, resolveTemplate(v, ctx, now, resolutions)]),
|
|
53
|
+
)
|
|
54
|
+
}
|
|
55
|
+
return node
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export function listPlaceholders(node: unknown): string[] {
|
|
59
|
+
const found: string[] = []
|
|
60
|
+
const walk = (n: unknown): void => {
|
|
61
|
+
if (typeof n === 'string') {
|
|
62
|
+
for (const m of n.matchAll(PLACEHOLDER_RE)) found.push(m[1])
|
|
63
|
+
} else if (Array.isArray(n)) {
|
|
64
|
+
n.forEach(walk)
|
|
65
|
+
} else if (n !== null && typeof n === 'object') {
|
|
66
|
+
Object.values(n).forEach(walk)
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
walk(node)
|
|
70
|
+
return found
|
|
71
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import type { MongoMemoryServer } from 'mongodb-memory-server'
|
|
2
|
+
|
|
3
|
+
// A single embedded mongod, booted lazily and shared process-wide. The boot is
|
|
4
|
+
// memoized as a promise so concurrent callers await the same instance rather
|
|
5
|
+
// than racing to start two servers. Data is ephemeral by design: this path is
|
|
6
|
+
// only taken when no external MONGODB_CONNECTION_STRING is configured.
|
|
7
|
+
let embeddedPromise: Promise<string> | null = null
|
|
8
|
+
let server: MongoMemoryServer | null = null
|
|
9
|
+
|
|
10
|
+
async function bootEmbedded(): Promise<string> {
|
|
11
|
+
// Dynamic import keeps mongodb-memory-server out of the hot path when an
|
|
12
|
+
// external connection string is configured.
|
|
13
|
+
const { MongoMemoryServer } = await import('mongodb-memory-server')
|
|
14
|
+
console.log(
|
|
15
|
+
'[mock-server] MONGODB_CONNECTION_STRING not set; starting embedded in-memory MongoDB (data is ephemeral)…',
|
|
16
|
+
)
|
|
17
|
+
server = await MongoMemoryServer.create()
|
|
18
|
+
return server.getUri()
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export async function resolveMongoUri(): Promise<string> {
|
|
22
|
+
const configured = process.env.MONGODB_CONNECTION_STRING
|
|
23
|
+
if (configured) return configured
|
|
24
|
+
if (!embeddedPromise) {
|
|
25
|
+
embeddedPromise = bootEmbedded().catch((err) => {
|
|
26
|
+
// A failed boot must not poison the singleton — clear it so the next
|
|
27
|
+
// call retries a fresh start rather than returning the dead rejection.
|
|
28
|
+
embeddedPromise = null
|
|
29
|
+
throw err
|
|
30
|
+
})
|
|
31
|
+
}
|
|
32
|
+
return embeddedPromise
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export async function stopEmbeddedMongo(): Promise<void> {
|
|
36
|
+
const running = server
|
|
37
|
+
server = null
|
|
38
|
+
embeddedPromise = null
|
|
39
|
+
if (running) await running.stop()
|
|
40
|
+
}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import type { Catalog, EndpointDef } from '../catalog/types'
|
|
2
|
+
import { isScenarioDeclared } from '../scenarios'
|
|
3
|
+
import type { ScenarioSelection } from './store'
|
|
4
|
+
|
|
5
|
+
export class InvalidScenarioSelectionError extends Error {}
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* JSON-body counterpart to parseEndpointScenarios (form.ts). Validates every
|
|
9
|
+
* endpoint name and scenario key against the catalog and applies the same
|
|
10
|
+
* delta-save normalization: selections equal to the implicit scenario are
|
|
11
|
+
* dropped, and a one-step sequence collapses to a single selection.
|
|
12
|
+
*/
|
|
13
|
+
export function parseEndpointScenariosFromJson(
|
|
14
|
+
input: unknown,
|
|
15
|
+
catalog: Catalog,
|
|
16
|
+
implicit: string,
|
|
17
|
+
): Record<string, ScenarioSelection> {
|
|
18
|
+
if (input === null || typeof input !== 'object' || Array.isArray(input)) {
|
|
19
|
+
throw new InvalidScenarioSelectionError('endpointScenarios must be an object')
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
const byName = new Map<string, EndpointDef>()
|
|
23
|
+
for (const system of catalog.systems) {
|
|
24
|
+
for (const endpoint of system.endpoints) byName.set(endpoint.name, endpoint)
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
const result: Record<string, ScenarioSelection> = {}
|
|
28
|
+
for (const [name, raw] of Object.entries(input as Record<string, unknown>)) {
|
|
29
|
+
const endpoint = byName.get(name)
|
|
30
|
+
if (!endpoint) throw new InvalidScenarioSelectionError(`unknown endpoint "${name}"`)
|
|
31
|
+
const selection = normalizeSelection(endpoint, raw, implicit)
|
|
32
|
+
if (selection !== undefined) result[name] = selection
|
|
33
|
+
}
|
|
34
|
+
return result
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
function normalizeSelection(
|
|
38
|
+
endpoint: EndpointDef,
|
|
39
|
+
raw: unknown,
|
|
40
|
+
implicit: string,
|
|
41
|
+
): ScenarioSelection | undefined {
|
|
42
|
+
if (Array.isArray(raw)) {
|
|
43
|
+
if (!raw.every((step) => typeof step === 'string')) {
|
|
44
|
+
throw new InvalidScenarioSelectionError(
|
|
45
|
+
`endpoint "${endpoint.name}": scenario sequence must be an array of strings`,
|
|
46
|
+
)
|
|
47
|
+
}
|
|
48
|
+
for (const step of raw) assertDeclared(endpoint, step)
|
|
49
|
+
if (raw.length === 0) return undefined
|
|
50
|
+
if (raw.length > 1) return raw
|
|
51
|
+
return raw[0] === implicit ? undefined : raw[0]
|
|
52
|
+
}
|
|
53
|
+
if (typeof raw !== 'string') {
|
|
54
|
+
throw new InvalidScenarioSelectionError(
|
|
55
|
+
`endpoint "${endpoint.name}": scenario must be a string or array of strings`,
|
|
56
|
+
)
|
|
57
|
+
}
|
|
58
|
+
if (raw === '' || raw === implicit) return undefined
|
|
59
|
+
assertDeclared(endpoint, raw)
|
|
60
|
+
return raw
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
function assertDeclared(endpoint: EndpointDef, scenario: string): void {
|
|
64
|
+
if (!isScenarioDeclared(endpoint, scenario)) {
|
|
65
|
+
throw new InvalidScenarioSelectionError(
|
|
66
|
+
`endpoint "${endpoint.name}": scenario "${scenario}" is not declared`,
|
|
67
|
+
)
|
|
68
|
+
}
|
|
69
|
+
}
|