@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,153 @@
|
|
|
1
|
+
export type DirectSelector =
|
|
2
|
+
| { source: 'body'; segments: Array<string | number> }
|
|
3
|
+
| { source: 'path'; name: string }
|
|
4
|
+
| { source: 'query'; name: string }
|
|
5
|
+
|
|
6
|
+
export type ProfileKeySelector = {
|
|
7
|
+
source: 'profileKey'
|
|
8
|
+
namespace: string
|
|
9
|
+
keySelector: DirectSelector
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export type Selector = DirectSelector | ProfileKeySelector
|
|
13
|
+
|
|
14
|
+
export type BearerProfileIdSelector = {
|
|
15
|
+
source: 'bearer'
|
|
16
|
+
claim?: string
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export type ProfileIdSelector = Selector | BearerProfileIdSelector
|
|
20
|
+
|
|
21
|
+
export class SelectorParseError extends Error {}
|
|
22
|
+
|
|
23
|
+
export interface RequestContext {
|
|
24
|
+
body: unknown
|
|
25
|
+
pathParams: Record<string, string>
|
|
26
|
+
query: URLSearchParams
|
|
27
|
+
headers: Record<string, string>
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
const NAME_RE = /^[a-zA-Z_][a-zA-Z0-9_-]*$/
|
|
31
|
+
const PROFILE_KEY_NAMESPACE_RE = /^[a-z0-9][a-z0-9_-]*$/
|
|
32
|
+
const BODY_TOKEN_RE = /\.([a-zA-Z_][a-zA-Z0-9_]*)|\[(\d+)\]/g
|
|
33
|
+
const BEARER_TOKEN_RE = /^Bearer +([a-zA-Z0-9\-._~+/]+=*)$/i
|
|
34
|
+
|
|
35
|
+
export function parseProfileIdSelector(raw: string): ProfileIdSelector {
|
|
36
|
+
if (raw === 'bearer') return { source: 'bearer' }
|
|
37
|
+
if (raw.startsWith('bearer:')) {
|
|
38
|
+
const claim = raw.slice('bearer:'.length)
|
|
39
|
+
if (!NAME_RE.test(claim)) {
|
|
40
|
+
throw new SelectorParseError(`invalid bearer claim selector: ${raw}`)
|
|
41
|
+
}
|
|
42
|
+
return { source: 'bearer', claim }
|
|
43
|
+
}
|
|
44
|
+
return parseSelector(raw)
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export function parseSelector(raw: string): Selector {
|
|
48
|
+
if (raw.startsWith('profileKey:')) {
|
|
49
|
+
const rest = raw.slice('profileKey:'.length)
|
|
50
|
+
const sep = rest.indexOf(':')
|
|
51
|
+
if (sep <= 0) throw new SelectorParseError(`invalid profile key selector: ${raw}`)
|
|
52
|
+
const namespace = rest.slice(0, sep)
|
|
53
|
+
const nestedRaw = rest.slice(sep + 1)
|
|
54
|
+
if (!PROFILE_KEY_NAMESPACE_RE.test(namespace) || nestedRaw.length === 0) {
|
|
55
|
+
throw new SelectorParseError(`invalid profile key selector: ${raw}`)
|
|
56
|
+
}
|
|
57
|
+
const keySelector = parseSelector(nestedRaw)
|
|
58
|
+
if (keySelector.source === 'profileKey') {
|
|
59
|
+
throw new SelectorParseError(`invalid profile key selector: ${raw}`)
|
|
60
|
+
}
|
|
61
|
+
return { source: 'profileKey', namespace, keySelector }
|
|
62
|
+
}
|
|
63
|
+
if (raw.startsWith('path:')) {
|
|
64
|
+
const name = raw.slice('path:'.length)
|
|
65
|
+
if (!NAME_RE.test(name)) throw new SelectorParseError(`invalid path selector: ${raw}`)
|
|
66
|
+
return { source: 'path', name }
|
|
67
|
+
}
|
|
68
|
+
if (raw.startsWith('query:')) {
|
|
69
|
+
const name = raw.slice('query:'.length)
|
|
70
|
+
if (!NAME_RE.test(name)) throw new SelectorParseError(`invalid query selector: ${raw}`)
|
|
71
|
+
return { source: 'query', name }
|
|
72
|
+
}
|
|
73
|
+
if (raw.startsWith('$')) {
|
|
74
|
+
return { source: 'body', segments: parseBodyPath(raw) }
|
|
75
|
+
}
|
|
76
|
+
throw new SelectorParseError(
|
|
77
|
+
`selector must start with "$", "path:", or "query:": ${raw}`,
|
|
78
|
+
)
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
function parseBodyPath(raw: string): Array<string | number> {
|
|
82
|
+
const rest = raw.slice(1)
|
|
83
|
+
const segments: Array<string | number> = []
|
|
84
|
+
let consumed = 0
|
|
85
|
+
BODY_TOKEN_RE.lastIndex = 0
|
|
86
|
+
let m: RegExpExecArray | null
|
|
87
|
+
while ((m = BODY_TOKEN_RE.exec(rest)) !== null) {
|
|
88
|
+
if (m.index !== consumed) throw new SelectorParseError(`invalid body selector: ${raw}`)
|
|
89
|
+
segments.push(m[1] !== undefined ? m[1] : Number(m[2]))
|
|
90
|
+
consumed = BODY_TOKEN_RE.lastIndex
|
|
91
|
+
}
|
|
92
|
+
if (consumed !== rest.length || segments.length === 0) {
|
|
93
|
+
throw new SelectorParseError(`invalid body selector: ${raw}`)
|
|
94
|
+
}
|
|
95
|
+
return segments
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
export function extractValue(
|
|
99
|
+
selector: Selector,
|
|
100
|
+
ctx: RequestContext,
|
|
101
|
+
): string | number | null {
|
|
102
|
+
if (selector.source === 'profileKey') return extractValue(selector.keySelector, ctx)
|
|
103
|
+
if (selector.source === 'path') return ctx.pathParams[selector.name] ?? null
|
|
104
|
+
if (selector.source === 'query') return ctx.query.get(selector.name)
|
|
105
|
+
let current: unknown = ctx.body
|
|
106
|
+
for (const seg of selector.segments) {
|
|
107
|
+
if (typeof seg === 'number') {
|
|
108
|
+
if (!Array.isArray(current)) return null
|
|
109
|
+
current = current[seg]
|
|
110
|
+
} else {
|
|
111
|
+
if (current === null || typeof current !== 'object' || Array.isArray(current)) return null
|
|
112
|
+
current = (current as Record<string, unknown>)[seg]
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
return typeof current === 'string' || typeof current === 'number' ? current : null
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
export function extractProfileIdValue(
|
|
119
|
+
selector: ProfileIdSelector,
|
|
120
|
+
ctx: RequestContext,
|
|
121
|
+
): string | number | null {
|
|
122
|
+
if (selector.source !== 'bearer') return extractValue(selector, ctx)
|
|
123
|
+
|
|
124
|
+
const authorization = headerValue(ctx.headers, 'authorization')
|
|
125
|
+
const match = authorization?.trim().match(BEARER_TOKEN_RE)
|
|
126
|
+
const token = match?.[1]
|
|
127
|
+
if (!token) return null
|
|
128
|
+
if (!selector.claim) return token
|
|
129
|
+
|
|
130
|
+
return extractJwtClaim(token, selector.claim)
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
function headerValue(headers: Record<string, string>, name: string): string | null {
|
|
134
|
+
for (const [key, value] of Object.entries(headers)) {
|
|
135
|
+
if (key.toLowerCase() === name) return value
|
|
136
|
+
}
|
|
137
|
+
return null
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
// JWT claims are decoded only to select a mock profile. This is deliberately
|
|
141
|
+
// not authentication: signatures, issuer, audience, and expiry are not verified.
|
|
142
|
+
function extractJwtClaim(token: string, claim: string): string | number | null {
|
|
143
|
+
const parts = token.split('.')
|
|
144
|
+
if (parts.length !== 3 || parts[1].length === 0) return null
|
|
145
|
+
try {
|
|
146
|
+
const payload = JSON.parse(Buffer.from(parts[1], 'base64url').toString('utf8')) as unknown
|
|
147
|
+
if (payload === null || typeof payload !== 'object' || Array.isArray(payload)) return null
|
|
148
|
+
const value = (payload as Record<string, unknown>)[claim]
|
|
149
|
+
return typeof value === 'string' || typeof value === 'number' ? value : null
|
|
150
|
+
} catch {
|
|
151
|
+
return null
|
|
152
|
+
}
|
|
153
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
export interface ProfileKeyCaptureDef {
|
|
2
|
+
namespace: string
|
|
3
|
+
keySelector: string
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
export interface ScenarioMeta {
|
|
7
|
+
/** Friendly name shown for the scenario (a resolver's `description` export
|
|
8
|
+
* or a fixture's `description`, falling back to the slug). */
|
|
9
|
+
label: string
|
|
10
|
+
/** Optional secondary line shown under the label in the catalog detail view
|
|
11
|
+
* (a resolver's `summary` export or a fixture's `summary`); present only when
|
|
12
|
+
* the scenario declares a non-empty summary. */
|
|
13
|
+
summary?: string
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export interface EndpointDef {
|
|
17
|
+
name: string
|
|
18
|
+
displayName: string
|
|
19
|
+
method: string
|
|
20
|
+
path: string
|
|
21
|
+
mockType?: 'global' | 'profiled'
|
|
22
|
+
profileIdSelector?: string
|
|
23
|
+
captureProfileKeys?: ProfileKeyCaptureDef[]
|
|
24
|
+
scenarios: Record<string, ScenarioMeta>
|
|
25
|
+
/**
|
|
26
|
+
* Slugs in `scenarios` backed by a `<slug>.ts` resolver instead of a
|
|
27
|
+
* `<slug>.json` fixture. Always present; empty when the endpoint has none.
|
|
28
|
+
*/
|
|
29
|
+
resolverScenarios: string[]
|
|
30
|
+
/** Raw parsed _schema.json (OpenAPI 3.1 operation object), if present. */
|
|
31
|
+
schema?: Record<string, unknown>
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export interface SystemDef {
|
|
35
|
+
name: string
|
|
36
|
+
slug: string
|
|
37
|
+
baseUrlEnv: string
|
|
38
|
+
endpoints: EndpointDef[]
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export interface Catalog {
|
|
42
|
+
systems: SystemDef[]
|
|
43
|
+
}
|
|
@@ -0,0 +1,290 @@
|
|
|
1
|
+
import fs from 'node:fs'
|
|
2
|
+
import { fixtureFilePath, type Fixture } from '../mock-engine/fixtures'
|
|
3
|
+
import { listPlaceholders } from '../mock-engine/template'
|
|
4
|
+
import {
|
|
5
|
+
parsePathTemplate,
|
|
6
|
+
PathTemplate,
|
|
7
|
+
PathTemplateError,
|
|
8
|
+
templatesOverlap,
|
|
9
|
+
} from './path-template'
|
|
10
|
+
import {
|
|
11
|
+
parseProfileIdSelector,
|
|
12
|
+
parseSelector,
|
|
13
|
+
SelectorParseError,
|
|
14
|
+
type DirectSelector,
|
|
15
|
+
type ProfileIdSelector,
|
|
16
|
+
} from './selector'
|
|
17
|
+
import { buildSchemaRegistry, schemaKey, type SchemaRegistry } from './schema'
|
|
18
|
+
import type { Catalog } from './types'
|
|
19
|
+
|
|
20
|
+
const DEFAULT_SCENARIO = 'default'
|
|
21
|
+
const REAL_SCENARIO = 'real'
|
|
22
|
+
const PROFILE_KEY_NAMESPACE_RE = /^[a-z0-9][a-z0-9_-]*$/
|
|
23
|
+
|
|
24
|
+
export interface ValidationResult {
|
|
25
|
+
errors: string[]
|
|
26
|
+
fixtures: Map<string, Fixture>
|
|
27
|
+
schemas: SchemaRegistry
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export function validateCatalog(catalog: Catalog, catalogDir: string): ValidationResult {
|
|
31
|
+
const errors: string[] = []
|
|
32
|
+
const fixtures = new Map<string, Fixture>()
|
|
33
|
+
const { schemas, errors: schemaErrors } = buildSchemaRegistry(catalog)
|
|
34
|
+
errors.push(...schemaErrors)
|
|
35
|
+
const parsed: Array<{ method: string; template: PathTemplate; label: string }> = []
|
|
36
|
+
|
|
37
|
+
for (const system of catalog.systems) {
|
|
38
|
+
for (const endpoint of system.endpoints) {
|
|
39
|
+
const label = `${system.name}/${endpoint.name}`
|
|
40
|
+
|
|
41
|
+
let template: PathTemplate | null = null
|
|
42
|
+
try {
|
|
43
|
+
template = parsePathTemplate(endpoint.path)
|
|
44
|
+
parsed.push({ method: endpoint.method.toUpperCase(), template, label })
|
|
45
|
+
} catch (err) {
|
|
46
|
+
if (err instanceof PathTemplateError) errors.push(`${label}: ${err.message}`)
|
|
47
|
+
else throw err
|
|
48
|
+
}
|
|
49
|
+
const declaredParams = new Set(
|
|
50
|
+
template?.segments.flatMap((s) => (s.type === 'param' ? [s.name] : [])) ?? [],
|
|
51
|
+
)
|
|
52
|
+
const mockType = endpoint.mockType ?? 'profiled'
|
|
53
|
+
|
|
54
|
+
if (mockType === 'global') {
|
|
55
|
+
if (endpoint.profileIdSelector !== undefined) {
|
|
56
|
+
errors.push(`${label}: global endpoint must not declare profileIdSelector`)
|
|
57
|
+
}
|
|
58
|
+
if ((endpoint.captureProfileKeys ?? []).length > 0) {
|
|
59
|
+
errors.push(`${label}: global endpoint must not declare captureProfileKeys`)
|
|
60
|
+
}
|
|
61
|
+
} else {
|
|
62
|
+
if (!endpoint.profileIdSelector) {
|
|
63
|
+
errors.push(`${label}: profiled endpoint requires profileIdSelector`)
|
|
64
|
+
} else {
|
|
65
|
+
try {
|
|
66
|
+
const selector = parseProfileIdSelector(endpoint.profileIdSelector)
|
|
67
|
+
validateSelectorPath(label, 'selector', selector, declaredParams, errors)
|
|
68
|
+
if (selector.source === 'profileKey') {
|
|
69
|
+
validateNamespace(label, selector.namespace, 'profileIdSelector namespace', errors)
|
|
70
|
+
}
|
|
71
|
+
} catch (err) {
|
|
72
|
+
if (err instanceof SelectorParseError) errors.push(`${label}: ${err.message}`)
|
|
73
|
+
else throw err
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
const captures = endpoint.captureProfileKeys ?? []
|
|
78
|
+
if (captures.length > 0) {
|
|
79
|
+
const profileSelector = endpoint.profileIdSelector
|
|
80
|
+
? parseProfileIdSelectorForValidation(
|
|
81
|
+
endpoint.profileIdSelector,
|
|
82
|
+
label,
|
|
83
|
+
'profileIdSelector',
|
|
84
|
+
errors,
|
|
85
|
+
)
|
|
86
|
+
: null
|
|
87
|
+
if (profileSelector?.source === 'profileKey') {
|
|
88
|
+
errors.push(`${label}: captureProfileKeys require a direct profileIdSelector`)
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
captures.forEach((capture, index) => {
|
|
92
|
+
validateNamespace(label, capture.namespace, `captureProfileKeys[${index}].namespace`, errors)
|
|
93
|
+
const selector = parseSelectorForValidation(
|
|
94
|
+
capture.keySelector,
|
|
95
|
+
label,
|
|
96
|
+
`captureProfileKeys[${index}].keySelector`,
|
|
97
|
+
errors,
|
|
98
|
+
)
|
|
99
|
+
if (!selector) return
|
|
100
|
+
if (selector.source === 'profileKey') {
|
|
101
|
+
errors.push(`${label}: captureProfileKeys[${index}].keySelector must be a direct selector`)
|
|
102
|
+
return
|
|
103
|
+
}
|
|
104
|
+
validateSelectorPath(
|
|
105
|
+
label,
|
|
106
|
+
`captureProfileKeys[${index}].keySelector`,
|
|
107
|
+
selector,
|
|
108
|
+
declaredParams,
|
|
109
|
+
errors,
|
|
110
|
+
)
|
|
111
|
+
})
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
if (!(DEFAULT_SCENARIO in endpoint.scenarios)) {
|
|
115
|
+
errors.push(
|
|
116
|
+
`${label}: missing required "${DEFAULT_SCENARIO}" scenario ` +
|
|
117
|
+
`(no default.json or default.ts)`,
|
|
118
|
+
)
|
|
119
|
+
}
|
|
120
|
+
if (REAL_SCENARIO in endpoint.scenarios) {
|
|
121
|
+
errors.push(
|
|
122
|
+
`${label}: scenario "${REAL_SCENARIO}" must not exist (real.json or real.ts) — ` +
|
|
123
|
+
`passthrough is implicit`,
|
|
124
|
+
)
|
|
125
|
+
}
|
|
126
|
+
const fixtureBacked = Object.keys(endpoint.scenarios).filter(
|
|
127
|
+
(s) => !endpoint.resolverScenarios.includes(s),
|
|
128
|
+
)
|
|
129
|
+
if (Object.keys(endpoint.scenarios).length > 0 && fixtureBacked.length === 0) {
|
|
130
|
+
errors.push(
|
|
131
|
+
`${label}: every scenario is resolver-backed (.ts) — declare at least one ` +
|
|
132
|
+
`fixture-backed scenario for resolvers to return`,
|
|
133
|
+
)
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
for (const scenario of Object.keys(endpoint.scenarios)) {
|
|
137
|
+
if (scenario === REAL_SCENARIO) continue // already flagged above
|
|
138
|
+
if (endpoint.resolverScenarios.includes(scenario)) continue // backed by <slug>.ts, not a fixture
|
|
139
|
+
const file = fixtureFilePath(catalogDir, system.slug, endpoint.name, scenario)
|
|
140
|
+
if (!fs.existsSync(file)) {
|
|
141
|
+
errors.push(`${label}: missing fixture for scenario "${scenario}" (${file})`)
|
|
142
|
+
continue
|
|
143
|
+
}
|
|
144
|
+
let fixture: { status?: unknown; headers?: unknown; body?: unknown }
|
|
145
|
+
try {
|
|
146
|
+
fixture = JSON.parse(fs.readFileSync(file, 'utf8'))
|
|
147
|
+
} catch {
|
|
148
|
+
errors.push(`${label}: fixture ${file} is not valid JSON`)
|
|
149
|
+
continue
|
|
150
|
+
}
|
|
151
|
+
if (typeof fixture.status !== 'number' || !('body' in fixture)) {
|
|
152
|
+
errors.push(`${label}: fixture ${file} must have numeric "status" and a "body"`)
|
|
153
|
+
continue
|
|
154
|
+
}
|
|
155
|
+
fixtures.set(file, fixture as Fixture)
|
|
156
|
+
const compiled = schemas.get(schemaKey(system.slug, endpoint.name))
|
|
157
|
+
if (compiled) {
|
|
158
|
+
if (!compiled.hasResponseFor(fixture.status)) {
|
|
159
|
+
errors.push(
|
|
160
|
+
`${label}: fixture ${file} has status ${fixture.status} with no matching response ` +
|
|
161
|
+
`schema (declare "${fixture.status}", "${Math.floor(fixture.status / 100)}XX", ` +
|
|
162
|
+
`or "default" in _schema.json responses)`,
|
|
163
|
+
)
|
|
164
|
+
} else {
|
|
165
|
+
for (const issue of compiled.validateFixtureBody(fixture.status, fixture.body)) {
|
|
166
|
+
errors.push(
|
|
167
|
+
`${label}: fixture ${file} body does not match _schema.json: ${issue.path} ${issue.message}`,
|
|
168
|
+
)
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
const placeholders = [
|
|
173
|
+
...listPlaceholders(fixture.body),
|
|
174
|
+
...listPlaceholders(fixture.headers ?? {}),
|
|
175
|
+
]
|
|
176
|
+
for (const expr of placeholders) {
|
|
177
|
+
if (expr === 'now:iso' || expr === 'now:YYYYMMDD') continue
|
|
178
|
+
try {
|
|
179
|
+
const sel = parseSelector(expr)
|
|
180
|
+
if (sel.source === 'path' && !declaredParams.has(sel.name)) {
|
|
181
|
+
errors.push(
|
|
182
|
+
`${label}: fixture ${file} placeholder "{{${expr}}}" references undeclared path param`,
|
|
183
|
+
)
|
|
184
|
+
}
|
|
185
|
+
} catch {
|
|
186
|
+
errors.push(`${label}: fixture ${file} has invalid placeholder "{{${expr}}}"`)
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
for (let i = 0; i < parsed.length; i++) {
|
|
194
|
+
for (let j = i + 1; j < parsed.length; j++) {
|
|
195
|
+
if (
|
|
196
|
+
parsed[i].method === parsed[j].method &&
|
|
197
|
+
templatesOverlap(parsed[i].template, parsed[j].template)
|
|
198
|
+
) {
|
|
199
|
+
errors.push(
|
|
200
|
+
`ambiguous endpoints: ${parsed[i].label} and ${parsed[j].label} can match the same ${parsed[i].method} request`,
|
|
201
|
+
)
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
return { errors, fixtures, schemas }
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
function parseSelectorForValidation(
|
|
210
|
+
raw: string,
|
|
211
|
+
label: string,
|
|
212
|
+
field: string,
|
|
213
|
+
errors: string[],
|
|
214
|
+
) {
|
|
215
|
+
try {
|
|
216
|
+
return parseSelector(raw)
|
|
217
|
+
} catch (err) {
|
|
218
|
+
if (err instanceof SelectorParseError) {
|
|
219
|
+
errors.push(`${label}: invalid ${field}: ${err.message}`)
|
|
220
|
+
return null
|
|
221
|
+
}
|
|
222
|
+
throw err
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
function parseProfileIdSelectorForValidation(
|
|
227
|
+
raw: string,
|
|
228
|
+
label: string,
|
|
229
|
+
field: string,
|
|
230
|
+
errors: string[],
|
|
231
|
+
): ProfileIdSelector | null {
|
|
232
|
+
try {
|
|
233
|
+
return parseProfileIdSelector(raw)
|
|
234
|
+
} catch (err) {
|
|
235
|
+
if (err instanceof SelectorParseError) {
|
|
236
|
+
errors.push(`${label}: invalid ${field}: ${err.message}`)
|
|
237
|
+
return null
|
|
238
|
+
}
|
|
239
|
+
throw err
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
function validateNamespace(
|
|
244
|
+
label: string,
|
|
245
|
+
namespace: string,
|
|
246
|
+
field: string,
|
|
247
|
+
errors: string[],
|
|
248
|
+
): void {
|
|
249
|
+
if (!PROFILE_KEY_NAMESPACE_RE.test(namespace)) {
|
|
250
|
+
errors.push(`${label}: ${field} "${namespace}" must match [a-z0-9][a-z0-9_-]*`)
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
function validateSelectorPath(
|
|
255
|
+
label: string,
|
|
256
|
+
field: string,
|
|
257
|
+
selector: DirectSelector | ProfileIdSelector,
|
|
258
|
+
declaredParams: Set<string>,
|
|
259
|
+
errors: string[],
|
|
260
|
+
): void {
|
|
261
|
+
if (selector.source === 'bearer') return
|
|
262
|
+
const directSelector = selector.source === 'profileKey' ? selector.keySelector : selector
|
|
263
|
+
if (directSelector.source === 'path' && !declaredParams.has(directSelector.name)) {
|
|
264
|
+
errors.push(
|
|
265
|
+
`${label}: ${field} "path:${directSelector.name}" has no matching {${directSelector.name}} in path template`,
|
|
266
|
+
)
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
// App-wide config that only makes sense once the catalog is known. When
|
|
271
|
+
// passthrough is the implicit default, every system must be able to proxy at
|
|
272
|
+
// startup. Otherwise missing base URLs are reported only when a request or UI
|
|
273
|
+
// selection actually chooses passthrough.
|
|
274
|
+
export function validateAppConfig(
|
|
275
|
+
catalog: Catalog,
|
|
276
|
+
env: Record<string, string | undefined>,
|
|
277
|
+
passthroughAsDefault: boolean,
|
|
278
|
+
): string[] {
|
|
279
|
+
const errors: string[] = []
|
|
280
|
+
if (passthroughAsDefault) {
|
|
281
|
+
for (const system of catalog.systems) {
|
|
282
|
+
if (!env[system.baseUrlEnv]) {
|
|
283
|
+
errors.push(
|
|
284
|
+
`system "${system.name}": PASSTHROUGH_AS_DEFAULT=true requires ${system.baseUrlEnv} to be set`,
|
|
285
|
+
)
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
return errors
|
|
290
|
+
}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import path from 'node:path'
|
|
2
|
+
|
|
3
|
+
export type UnmockedUsers = 'ERROR' | 'DEFAULT_MOCK' | 'REAL'
|
|
4
|
+
export type ConsoleLogLevel = 'info' | 'warn' | 'error'
|
|
5
|
+
|
|
6
|
+
// UI label for the implicit "real" scenario — never declared in the catalog,
|
|
7
|
+
// so its display name lives here.
|
|
8
|
+
export const REAL_LABEL = 'Passthrough'
|
|
9
|
+
|
|
10
|
+
export class ConfigError extends Error {}
|
|
11
|
+
|
|
12
|
+
const UNMOCKED_USERS_VALUES: UnmockedUsers[] = ['ERROR', 'DEFAULT_MOCK', 'REAL']
|
|
13
|
+
const CONSOLE_LOG_LEVEL_VALUES: ConsoleLogLevel[] = ['info', 'warn', 'error']
|
|
14
|
+
|
|
15
|
+
export function parsePassthroughAsDefault(raw: string | undefined): boolean {
|
|
16
|
+
if (raw === undefined) return false
|
|
17
|
+
const upper = raw.toUpperCase()
|
|
18
|
+
if (upper === 'TRUE') return true
|
|
19
|
+
if (upper === 'FALSE') return false
|
|
20
|
+
throw new ConfigError(
|
|
21
|
+
`PASSTHROUGH_AS_DEFAULT must be either true or false, got "${raw}"`,
|
|
22
|
+
)
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export function parseUnmockedUsers(raw: string | undefined): UnmockedUsers {
|
|
26
|
+
if (raw === undefined) return 'ERROR'
|
|
27
|
+
const upper = raw.toUpperCase()
|
|
28
|
+
if (!UNMOCKED_USERS_VALUES.includes(upper as UnmockedUsers)) {
|
|
29
|
+
throw new ConfigError(
|
|
30
|
+
`UNMOCKED_USERS must be one of ${UNMOCKED_USERS_VALUES.join(', ')}, got "${raw}"`,
|
|
31
|
+
)
|
|
32
|
+
}
|
|
33
|
+
return upper as UnmockedUsers
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export function parseConsoleLogLevel(raw: string | undefined): ConsoleLogLevel {
|
|
37
|
+
if (raw === undefined) return 'info'
|
|
38
|
+
const lower = raw.toLowerCase()
|
|
39
|
+
if (!CONSOLE_LOG_LEVEL_VALUES.includes(lower as ConsoleLogLevel)) {
|
|
40
|
+
throw new ConfigError(
|
|
41
|
+
`MOCK_CONSOLE_LOG_LEVEL must be one of ${CONSOLE_LOG_LEVEL_VALUES.join(', ')}, got "${raw}"`,
|
|
42
|
+
)
|
|
43
|
+
}
|
|
44
|
+
return lower as ConsoleLogLevel
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export function parseResolverHistoryLimit(raw: string | undefined): number {
|
|
48
|
+
if (raw === undefined) return 10
|
|
49
|
+
const n = Number(raw)
|
|
50
|
+
if (!Number.isInteger(n) || n < 1) {
|
|
51
|
+
throw new ConfigError(`RESOLVER_HISTORY_LIMIT must be a positive integer, got "${raw}"`)
|
|
52
|
+
}
|
|
53
|
+
return n
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
const TTL_UNIT_SECONDS: Record<string, number> = { s: 1, m: 60, h: 3600, d: 86400 }
|
|
57
|
+
|
|
58
|
+
// Parse REQUEST_LOG_TTL_DURATION into seconds for the requestLogs TTL index.
|
|
59
|
+
// Format: <positive-integer><unit> where unit is s|m|h|d (e.g. "30m", "24h",
|
|
60
|
+
// "7d"). Unset/empty defaults to one day (86400s), matching the pre-config
|
|
61
|
+
// behavior. Anything else — missing unit, unsupported unit, zero, non-integer,
|
|
62
|
+
// or compound like "1d12h" — is a startup-fatal ConfigError.
|
|
63
|
+
export function parseRequestLogTtlSeconds(raw: string | undefined): number {
|
|
64
|
+
if (raw === undefined || raw === '') return 86400
|
|
65
|
+
const match = /^(\d+)(s|m|h|d)$/.exec(raw)
|
|
66
|
+
if (!match) {
|
|
67
|
+
throw new ConfigError(
|
|
68
|
+
`REQUEST_LOG_TTL_DURATION must be a positive duration like "24h", "30m", or "7d" (units s|m|h|d), got "${raw}"`,
|
|
69
|
+
)
|
|
70
|
+
}
|
|
71
|
+
const count = Number(match[1])
|
|
72
|
+
if (count < 1) {
|
|
73
|
+
throw new ConfigError(`REQUEST_LOG_TTL_DURATION must be greater than zero, got "${raw}"`)
|
|
74
|
+
}
|
|
75
|
+
return count * TTL_UNIT_SECONDS[match[2]]
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
// Resolve the catalog directory from CATALOG_PATH. A relative value is
|
|
79
|
+
// resolved against the current working directory; an absolute value is used
|
|
80
|
+
// as-is. Defaults to ./catalog. The npx launcher always passes an absolute
|
|
81
|
+
// path here (its own cwd differs from the user's), so this stays cwd-agnostic.
|
|
82
|
+
//
|
|
83
|
+
// The catalog directory lives outside this project entirely (it's supplied
|
|
84
|
+
// by the user at runtime), so its resolved path is never used to require or
|
|
85
|
+
// bundle repo-internal modules. Without the turbopackIgnore hint, Next's
|
|
86
|
+
// output-file-tracing sees a dynamic path.resolve() argument feeding into
|
|
87
|
+
// later fs reads and — unable to prove it's confined to a safe subfolder —
|
|
88
|
+
// falls back to sweeping the entire project into the standalone build
|
|
89
|
+
// (leaking src/, tests/, docs/, etc.). See the "Encountered unexpected file
|
|
90
|
+
// in NFT list" build warning this silences.
|
|
91
|
+
export function resolveCatalogDir(raw: string | undefined): string {
|
|
92
|
+
return path.resolve(/*turbopackIgnore: true*/ raw ?? 'catalog')
|
|
93
|
+
}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { Db } from 'mongodb'
|
|
2
|
+
|
|
3
|
+
export type DynamicOwnerType = 'profile' | 'global'
|
|
4
|
+
|
|
5
|
+
interface DynamicHistoryDoc {
|
|
6
|
+
ownerType: DynamicOwnerType
|
|
7
|
+
ownerKey: string
|
|
8
|
+
endpointName: string
|
|
9
|
+
/** The resolver-backed scenario slug this window belongs to. */
|
|
10
|
+
scenario: string
|
|
11
|
+
history: string[]
|
|
12
|
+
createdAt: Date
|
|
13
|
+
modifiedAt: Date
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
const COLLECTION = 'dynamicHistory'
|
|
17
|
+
|
|
18
|
+
export async function getDynamicHistory(
|
|
19
|
+
db: Db,
|
|
20
|
+
ownerType: DynamicOwnerType,
|
|
21
|
+
ownerKey: string,
|
|
22
|
+
endpointName: string,
|
|
23
|
+
scenario: string,
|
|
24
|
+
): Promise<string[]> {
|
|
25
|
+
const doc = await db
|
|
26
|
+
.collection<DynamicHistoryDoc>(COLLECTION)
|
|
27
|
+
.findOne({ ownerType, ownerKey, endpointName, scenario }, { projection: { _id: 0, history: 1 } })
|
|
28
|
+
return doc?.history ?? []
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export async function appendDynamicHistory(
|
|
32
|
+
db: Db,
|
|
33
|
+
ownerType: DynamicOwnerType,
|
|
34
|
+
ownerKey: string,
|
|
35
|
+
endpointName: string,
|
|
36
|
+
scenario: string,
|
|
37
|
+
slug: string,
|
|
38
|
+
limit: number,
|
|
39
|
+
): Promise<void> {
|
|
40
|
+
const now = new Date()
|
|
41
|
+
await db.collection<DynamicHistoryDoc>(COLLECTION).updateOne(
|
|
42
|
+
{ ownerType, ownerKey, endpointName, scenario },
|
|
43
|
+
{
|
|
44
|
+
$push: { history: { $each: [slug], $slice: -Math.max(1, limit) } },
|
|
45
|
+
$set: { modifiedAt: now },
|
|
46
|
+
$setOnInsert: { ownerType, ownerKey, endpointName, scenario, createdAt: now },
|
|
47
|
+
},
|
|
48
|
+
{ upsert: true },
|
|
49
|
+
)
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
// Reset clears every scenario's window for the owner (+endpoint): the UI
|
|
53
|
+
// exposes one reset button per endpoint, and pre-rename rows (no `scenario`
|
|
54
|
+
// field) simply never match get/append again — clean break, no migration.
|
|
55
|
+
export async function resetDynamicHistory(
|
|
56
|
+
db: Db,
|
|
57
|
+
ownerType: DynamicOwnerType,
|
|
58
|
+
ownerKey: string,
|
|
59
|
+
endpointName?: string,
|
|
60
|
+
): Promise<void> {
|
|
61
|
+
await db
|
|
62
|
+
.collection<DynamicHistoryDoc>(COLLECTION)
|
|
63
|
+
.deleteMany(
|
|
64
|
+
endpointName === undefined
|
|
65
|
+
? { ownerType, ownerKey }
|
|
66
|
+
: { ownerType, ownerKey, endpointName },
|
|
67
|
+
)
|
|
68
|
+
}
|