@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 @@
|
|
|
1
|
+
{ "status": 200, "body": { "state": "hold" } }
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{ "status": 200, "body": { "state": "success" } }
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { describe, expect, it } from 'vitest'
|
|
2
|
+
import {
|
|
3
|
+
appendOlder,
|
|
4
|
+
atTop,
|
|
5
|
+
bufferPending,
|
|
6
|
+
DOM_CAP,
|
|
7
|
+
flushToTail,
|
|
8
|
+
mergeTail,
|
|
9
|
+
PENDING_CAP,
|
|
10
|
+
TAIL_CAP,
|
|
11
|
+
} from '../../src/app/ui/logs/list-state'
|
|
12
|
+
import type { LogSummaryView } from '../../src/app/ui/logs/types'
|
|
13
|
+
|
|
14
|
+
function row(logId: string): LogSummaryView {
|
|
15
|
+
return {
|
|
16
|
+
logId,
|
|
17
|
+
ts: '2026-07-07T09:00:00.000Z',
|
|
18
|
+
kind: 'request',
|
|
19
|
+
trace: {},
|
|
20
|
+
} as LogSummaryView
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
function rows(...ids: string[]): LogSummaryView[] {
|
|
24
|
+
return ids.map(row)
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
describe('list-state', () => {
|
|
28
|
+
it('mergeTail prepends fresh, dedupes by logId, and trims to TAIL_CAP', () => {
|
|
29
|
+
const current = rows('b', 'a')
|
|
30
|
+
const merged = mergeTail(current, rows('c', 'b'))
|
|
31
|
+
expect(merged.map((r) => r.logId)).toEqual(['c', 'b', 'a'])
|
|
32
|
+
})
|
|
33
|
+
|
|
34
|
+
it('mergeTail caps at TAIL_CAP keeping the newest', () => {
|
|
35
|
+
const fresh = rows(...Array.from({ length: TAIL_CAP + 20 }, (_, i) => `n${i}`))
|
|
36
|
+
const merged = mergeTail([row('old')], fresh)
|
|
37
|
+
expect(merged).toHaveLength(TAIL_CAP)
|
|
38
|
+
expect(merged[0].logId).toBe('n0')
|
|
39
|
+
expect(merged.some((r) => r.logId === 'old')).toBe(false)
|
|
40
|
+
})
|
|
41
|
+
|
|
42
|
+
it('appendOlder appends, dedupes, and reports not-capped under the limit', () => {
|
|
43
|
+
const { rows: out, capped } = appendOlder(rows('c', 'b'), rows('b', 'a'))
|
|
44
|
+
expect(out.map((r) => r.logId)).toEqual(['c', 'b', 'a'])
|
|
45
|
+
expect(capped).toBe(false)
|
|
46
|
+
})
|
|
47
|
+
|
|
48
|
+
it('appendOlder trims to DOM_CAP and reports capped', () => {
|
|
49
|
+
const current = rows(...Array.from({ length: DOM_CAP - 10 }, (_, i) => `c${i}`))
|
|
50
|
+
const older = rows(...Array.from({ length: 40 }, (_, i) => `o${i}`))
|
|
51
|
+
const { rows: out, capped } = appendOlder(current, older)
|
|
52
|
+
expect(out).toHaveLength(DOM_CAP)
|
|
53
|
+
expect(capped).toBe(true)
|
|
54
|
+
expect(out[0].logId).toBe('c0')
|
|
55
|
+
})
|
|
56
|
+
|
|
57
|
+
it('bufferPending accumulates only entries not already known or buffered', () => {
|
|
58
|
+
const known = new Set(['a', 'b'])
|
|
59
|
+
const pending = bufferPending(rows('c'), rows('d', 'c', 'a'), known)
|
|
60
|
+
expect(pending.map((r) => r.logId)).toEqual(['d', 'c'])
|
|
61
|
+
})
|
|
62
|
+
|
|
63
|
+
it('bufferPending caps the buffer at PENDING_CAP, keeping newest', () => {
|
|
64
|
+
const fresh = rows(...Array.from({ length: PENDING_CAP + 30 }, (_, i) => `f${i}`))
|
|
65
|
+
const pending = bufferPending([], fresh, new Set<string>())
|
|
66
|
+
expect(pending).toHaveLength(PENDING_CAP)
|
|
67
|
+
expect(pending[0].logId).toBe('f0')
|
|
68
|
+
})
|
|
69
|
+
|
|
70
|
+
it('flushToTail prepends pending, drops older rows, trims to TAIL_CAP', () => {
|
|
71
|
+
const rendered = rows(...Array.from({ length: 200 }, (_, i) => `r${i}`))
|
|
72
|
+
const pending = rows('p1', 'p0')
|
|
73
|
+
const flushed = flushToTail(rendered, pending)
|
|
74
|
+
expect(flushed).toHaveLength(TAIL_CAP)
|
|
75
|
+
expect(flushed.slice(0, 2).map((r) => r.logId)).toEqual(['p1', 'p0'])
|
|
76
|
+
expect(flushed.some((r) => r.logId === 'r199')).toBe(false)
|
|
77
|
+
})
|
|
78
|
+
|
|
79
|
+
it('atTop is true near zero and false when scrolled', () => {
|
|
80
|
+
expect(atTop(0)).toBe(true)
|
|
81
|
+
expect(atTop(4)).toBe(true)
|
|
82
|
+
expect(atTop(120)).toBe(false)
|
|
83
|
+
})
|
|
84
|
+
})
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { describe, expect, it } from 'vitest'
|
|
2
|
+
import type { LogSummary } from '../../src/lib/logs/store'
|
|
3
|
+
import { toLogSummaryView } from '../../src/app/ui/logs/types'
|
|
4
|
+
|
|
5
|
+
describe('toLogSummaryView', () => {
|
|
6
|
+
it('serializes ts to ISO and keeps summary-safe fields', () => {
|
|
7
|
+
const summary = {
|
|
8
|
+
logId: 'lg_x',
|
|
9
|
+
ts: new Date('2026-07-07T09:14:03.120Z'),
|
|
10
|
+
kind: 'request',
|
|
11
|
+
method: 'POST',
|
|
12
|
+
path: '/x',
|
|
13
|
+
query: '',
|
|
14
|
+
outcome: 'fixture',
|
|
15
|
+
response: { status: 201 },
|
|
16
|
+
trace: { scenario: 'default' },
|
|
17
|
+
} as LogSummary
|
|
18
|
+
|
|
19
|
+
const view = toLogSummaryView(summary)
|
|
20
|
+
expect(view.ts).toBe('2026-07-07T09:14:03.120Z')
|
|
21
|
+
expect(view.response).toEqual({ status: 201 })
|
|
22
|
+
expect('request' in view).toBe(false)
|
|
23
|
+
})
|
|
24
|
+
})
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
import fs from 'node:fs'
|
|
2
|
+
import os from 'node:os'
|
|
3
|
+
import path from 'node:path'
|
|
4
|
+
import { afterAll, beforeAll, describe, expect, it } from 'vitest'
|
|
5
|
+
import type { EndpointDef, SystemDef } from '../../src/lib/catalog/types'
|
|
6
|
+
import { buildScenarioViews, type ScenarioView } from '../../src/app/ui/catalog/scenario-view'
|
|
7
|
+
|
|
8
|
+
const fixturesDir = path.join(__dirname, '../testdata/fixtures')
|
|
9
|
+
|
|
10
|
+
const system: SystemDef = {
|
|
11
|
+
name: 'Test System',
|
|
12
|
+
slug: 'test-system',
|
|
13
|
+
baseUrlEnv: 'TEST_SYSTEM_URL',
|
|
14
|
+
endpoints: [],
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
const endpoint: EndpointDef = {
|
|
18
|
+
name: 'hello_world',
|
|
19
|
+
displayName: 'Hello World',
|
|
20
|
+
method: 'POST',
|
|
21
|
+
path: '/hello/world',
|
|
22
|
+
profileIdSelector: '$.customerId',
|
|
23
|
+
scenarios: { default: { label: 'Success' } },
|
|
24
|
+
resolverScenarios: [],
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
describe('buildScenarioViews', () => {
|
|
28
|
+
it('loads the raw fixture json for the default scenario', async () => {
|
|
29
|
+
const views = await buildScenarioViews(system, endpoint, fixturesDir, {}, false)
|
|
30
|
+
const fixture = views.find((v) => v.key === 'default')
|
|
31
|
+
expect(fixture).toMatchObject({ key: 'default', isDefault: true, kind: 'fixture' })
|
|
32
|
+
if (fixture?.kind === 'fixture') expect(fixture.json).toContain('"status"')
|
|
33
|
+
})
|
|
34
|
+
|
|
35
|
+
it('carries a scenario summary onto the matching view', async () => {
|
|
36
|
+
const withSummary: EndpointDef = {
|
|
37
|
+
...endpoint,
|
|
38
|
+
scenarios: { default: { label: 'Success', summary: 'Returns a 200 body' } },
|
|
39
|
+
}
|
|
40
|
+
const views = await buildScenarioViews(system, withSummary, fixturesDir, {}, false)
|
|
41
|
+
expect(views.find((v) => v.key === 'default')?.summary).toBe('Returns a 200 body')
|
|
42
|
+
})
|
|
43
|
+
|
|
44
|
+
it('reports an error view when a fixture is missing', async () => {
|
|
45
|
+
const missing: EndpointDef = { ...endpoint, scenarios: { nope: { label: 'Missing' } } }
|
|
46
|
+
const views = await buildScenarioViews(system, missing, fixturesDir, {}, false)
|
|
47
|
+
expect(views[0].kind).toBe('error')
|
|
48
|
+
})
|
|
49
|
+
|
|
50
|
+
it('appends a synthetic passthrough entry last when passthrough is not the default', async () => {
|
|
51
|
+
const views = await buildScenarioViews(system, endpoint, fixturesDir, { TEST_SYSTEM_URL: 'http://upstream.test' }, false)
|
|
52
|
+
expect(views).toHaveLength(2)
|
|
53
|
+
const real = views[1]
|
|
54
|
+
expect(real).toMatchObject({
|
|
55
|
+
key: 'real',
|
|
56
|
+
isDefault: false,
|
|
57
|
+
kind: 'passthrough',
|
|
58
|
+
baseUrlEnv: 'TEST_SYSTEM_URL',
|
|
59
|
+
url: 'http://upstream.test',
|
|
60
|
+
})
|
|
61
|
+
})
|
|
62
|
+
|
|
63
|
+
it('prepends the synthetic passthrough entry first when passthrough is the default', async () => {
|
|
64
|
+
const views = await buildScenarioViews(system, endpoint, fixturesDir, {}, true)
|
|
65
|
+
expect(views).toHaveLength(2)
|
|
66
|
+
expect(views[0]).toMatchObject({ key: 'real', kind: 'passthrough', url: null })
|
|
67
|
+
expect(views[1]).toMatchObject({ key: 'default' })
|
|
68
|
+
})
|
|
69
|
+
|
|
70
|
+
it('marks a resolver-backed scenario slug with the resolver kind', async () => {
|
|
71
|
+
const views = await buildScenarioViews(
|
|
72
|
+
system,
|
|
73
|
+
{
|
|
74
|
+
...endpoint,
|
|
75
|
+
scenarios: { default: { label: 'Success' }, by_amount: { label: 'Routes by amount' } },
|
|
76
|
+
resolverScenarios: ['by_amount'],
|
|
77
|
+
},
|
|
78
|
+
fixturesDir,
|
|
79
|
+
{},
|
|
80
|
+
false,
|
|
81
|
+
)
|
|
82
|
+
const resolver = views.find((v) => v.key === 'by_amount')
|
|
83
|
+
expect(resolver?.kind).toBe('resolver')
|
|
84
|
+
})
|
|
85
|
+
})
|
|
86
|
+
|
|
87
|
+
describe('buildScenarioViews - resolver source and syntax highlighting', () => {
|
|
88
|
+
let dir: string
|
|
89
|
+
let views: ScenarioView[]
|
|
90
|
+
|
|
91
|
+
beforeAll(async () => {
|
|
92
|
+
dir = fs.mkdtempSync(path.join(os.tmpdir(), 'mock-scenario-view-'))
|
|
93
|
+
fs.mkdirSync(path.join(dir, 'test-system', 'hello_world'), { recursive: true })
|
|
94
|
+
fs.writeFileSync(
|
|
95
|
+
path.join(dir, 'test-system', 'hello_world', 'by-amount.ts'),
|
|
96
|
+
"export default function resolve() {\n return 'default'\n}\n",
|
|
97
|
+
)
|
|
98
|
+
fs.writeFileSync(
|
|
99
|
+
path.join(dir, 'test-system', 'hello_world', 'default.json'),
|
|
100
|
+
JSON.stringify({
|
|
101
|
+
description: 'Success',
|
|
102
|
+
status: 200,
|
|
103
|
+
body: { greeting: 'hello' },
|
|
104
|
+
}),
|
|
105
|
+
)
|
|
106
|
+
|
|
107
|
+
const resolverEndpoint: EndpointDef = {
|
|
108
|
+
...endpoint,
|
|
109
|
+
scenarios: { default: { label: 'Success' }, 'by-amount': { label: 'Routes by amount' } },
|
|
110
|
+
resolverScenarios: ['by-amount'],
|
|
111
|
+
}
|
|
112
|
+
views = await buildScenarioViews(system, resolverEndpoint, dir, {}, false)
|
|
113
|
+
})
|
|
114
|
+
|
|
115
|
+
afterAll(() => {
|
|
116
|
+
fs.rmSync(dir, { recursive: true, force: true })
|
|
117
|
+
})
|
|
118
|
+
|
|
119
|
+
it('includes resolver source and highlighted html for resolver-backed scenarios', () => {
|
|
120
|
+
const resolver = views.find((v) => v.key === 'by-amount')
|
|
121
|
+
expect(resolver).toMatchObject({ kind: 'resolver' })
|
|
122
|
+
expect((resolver as { code: string }).code).toContain('export default')
|
|
123
|
+
expect((resolver as { html: string }).html).toContain('<pre')
|
|
124
|
+
})
|
|
125
|
+
|
|
126
|
+
it('highlights only the fixture body, not the full fixture object', () => {
|
|
127
|
+
const fixture = views.find((v) => v.kind === 'fixture')
|
|
128
|
+
const html = (fixture as { html: string }).html
|
|
129
|
+
// Highlighted markup for the body only...
|
|
130
|
+
expect(html).toContain('<pre')
|
|
131
|
+
expect(html).toContain('greeting')
|
|
132
|
+
// ...so the top-level fixture keys are absent from the highlighted body.
|
|
133
|
+
expect(html).not.toContain('status')
|
|
134
|
+
expect(html).not.toContain('description')
|
|
135
|
+
// The full fixture is still available as `json` for the status chip.
|
|
136
|
+
expect((fixture as { json: string }).json).toContain('status')
|
|
137
|
+
})
|
|
138
|
+
})
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { defineConfig } from 'vitest/config'
|
|
2
|
+
import { fileURLToPath } from 'node:url'
|
|
3
|
+
|
|
4
|
+
export default defineConfig({
|
|
5
|
+
// The UI now uses shadcn-style `@/…` imports (e.g. `@/app/components/ui/badge`,
|
|
6
|
+
// `@/lib/utils`). Vitest does not read tsconfig `paths`, so mirror the `@ → ./src`
|
|
7
|
+
// alias here so the component/UI tests can resolve those imports.
|
|
8
|
+
resolve: {
|
|
9
|
+
alias: {
|
|
10
|
+
'@': fileURLToPath(new URL('./src', import.meta.url)),
|
|
11
|
+
},
|
|
12
|
+
},
|
|
13
|
+
test: {
|
|
14
|
+
environment: 'node',
|
|
15
|
+
include: ['tests/**/*.test.{ts,tsx}'],
|
|
16
|
+
testTimeout: 30000,
|
|
17
|
+
hookTimeout: 120000, // mongodb-memory-server downloads a binary on first run
|
|
18
|
+
},
|
|
19
|
+
})
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bilal-fazlani/mock-server",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "A generic, catalog-driven HTTP API mock server — run via npx or Docker, no request-handling code required.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -50,6 +50,7 @@
|
|
|
50
50
|
"radix-ui": "^1.6.2",
|
|
51
51
|
"react": "19.2.4",
|
|
52
52
|
"react-dom": "19.2.4",
|
|
53
|
+
"shiki": "^4.3.1",
|
|
53
54
|
"tailwind-merge": "^3.6.0",
|
|
54
55
|
"tailwindcss": "^4.3.2",
|
|
55
56
|
"tw-animate-css": "^1.4.0"
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
module.exports=[93695,(e,t,n)=>{t.exports=e.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},18622,(e,t,n)=>{t.exports=e.x("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js",()=>require("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js"))},56704,(e,t,n)=>{t.exports=e.x("next/dist/server/app-render/work-async-storage.external.js",()=>require("next/dist/server/app-render/work-async-storage.external.js"))},32319,(e,t,n)=>{t.exports=e.x("next/dist/server/app-render/work-unit-async-storage.external.js",()=>require("next/dist/server/app-render/work-unit-async-storage.external.js"))},70406,(e,t,n)=>{t.exports=e.x("next/dist/compiled/@opentelemetry/api",()=>require("next/dist/compiled/@opentelemetry/api"))},66486,(e,t,n)=>{t.exports=e.x("mongodb-438b504308ffa4be",()=>require("mongodb-438b504308ffa4be"))},53952,e=>{"use strict";var t=e.i(66486);let n=null;async function r(){let{MongoMemoryServer:t}=await e.A(82647);return console.log("[mock-server] MONGODB_CONNECTION_STRING not set; starting embedded in-memory MongoDB (data is ephemeral)…"),(await t.create()).getUri()}async function o(){let e=process.env.MONGODB_CONNECTION_STRING;return e||(n||(n=r().catch(e=>{throw n=null,e})),n)}class a extends Error{namespace;key;existingProfileId;newProfileId;constructor(e,t,n,r){super(`profile key mapping conflict for ${e}/${t}: ${n} already exists, got ${r}`),this.namespace=e,this.key=t,this.existingProfileId=n,this.newProfileId=r}}let i=null;async function s(){if(!i){let e=await o();i=new t.MongoClient(e),await i.connect(),await c(i.db(l()))}return i.db(l())}function l(){return process.env.MONGODB_DB??"mockDB"}async function c(e){await e.collection("mockProfiles").createIndex({profileId:1},{unique:!0}),await e.collection("profileKeyMappings").createIndex({namespace:1,key:1},{unique:!0}),await e.collection("profileKeyMappings").createIndex({profileId:1}),await e.collection("globalMockScenarios").createIndex({system:1,endpoint:1},{unique:!0}),await e.collection("scenarioProgress").createIndex({profileId:1,endpointName:1},{unique:!0}),await e.collection("dynamicHistory").createIndex({ownerType:1,ownerKey:1,endpointName:1},{unique:!0}),await e.collection("requestLogs").createIndex({ts:1},{expireAfterSeconds:86400}),await e.collection("requestLogs").createIndex({logId:1},{unique:!0}),await e.collection("requestLogs").createIndex({profileId:1,ts:-1}),await e.collection("requestLogs").createIndex({endpoint:1,ts:-1})}async function d(e,t){return e.collection("mockProfiles").findOne({profileId:t},{projection:{_id:0}})}async function p(e,t){let n=new Date,r={endpointScenarios:t.endpointScenarios,modifiedAt:n};void 0!==t.displayName&&(r.displayName=t.displayName),await e.collection("mockProfiles").updateOne({profileId:t.profileId},{$set:r,$setOnInsert:{profileId:t.profileId,createdAt:n}},{upsert:!0})}async function u(e,t){await e.collection("mockProfiles").deleteOne({profileId:t}),await e.collection("profileKeyMappings").deleteMany({profileId:t}),await e.collection("scenarioProgress").deleteMany({profileId:t}),await e.collection("requestLogs").deleteMany({profileId:t}),await e.collection("dynamicHistory").deleteMany({ownerType:"profile",ownerKey:t})}async function f(e,n,r,o){try{return await y(e,n,r,o)}catch(a){if(!(a instanceof t.MongoServerError)||11e3!==a.code)throw a;return y(e,n,r,o)}}async function y(e,t,n,r){let o=new Date,a=await e.collection("scenarioProgress").findOneAndUpdate({profileId:t,endpointName:n},[{$set:{served:{$cond:[{$eq:["$steps",{$literal:r}]},{$add:[{$ifNull:["$served",0]},1]},1]},steps:{$literal:r},createdAt:{$ifNull:["$createdAt",o]},modifiedAt:o}}],{upsert:!0,returnDocument:"after"});if(!a)throw Error("scenario progress upsert returned no document");return a.served}async function g(e,t,n){await e.collection("scenarioProgress").deleteMany(void 0===n?{profileId:t}:{profileId:t,endpointName:n})}async function m(e,t,n){return e.collection("profileKeyMappings").findOne({namespace:t,key:n},{projection:{_id:0}})}async function w(e,n){let r=e.collection("profileKeyMappings"),o=new Date,i=await r.findOne({namespace:n.namespace,key:n.key},{projection:{_id:0}});if(i){if(i.profileId!==n.profileId)throw new a(n.namespace,n.key,i.profileId,n.profileId);await r.updateOne({namespace:n.namespace,key:n.key,profileId:n.profileId},{$set:{capturedBy:n.capturedBy,modifiedAt:o}});return}try{await r.insertOne({namespace:n.namespace,key:n.key,profileId:n.profileId,capturedBy:n.capturedBy,createdAt:o,modifiedAt:o})}catch(i){if(!(i instanceof t.MongoServerError)||11e3!==i.code)throw i;let e=await r.findOne({namespace:n.namespace,key:n.key},{projection:{_id:0}});if(!e)throw i;if(e.profileId!==n.profileId)throw new a(n.namespace,n.key,e.profileId,n.profileId);await r.updateOne({namespace:n.namespace,key:n.key,profileId:n.profileId},{$set:{capturedBy:n.capturedBy,modifiedAt:o}})}}async function h(e,t,n){return e.collection("globalMockScenarios").findOne({system:t,endpoint:n},{projection:{_id:0}})}async function I(e){return e.collection("globalMockScenarios").find({},{projection:{_id:0}}).sort({modifiedAt:-1}).toArray()}async function x(e,t){let n=new Date;await e.collection("globalMockScenarios").updateOne({system:t.system,endpoint:t.endpoint},{$set:{scenario:t.scenario,modifiedAt:n},$setOnInsert:{system:t.system,endpoint:t.endpoint,createdAt:n}},{upsert:!0})}async function v(e,t,n){await e.collection("globalMockScenarios").deleteOne({system:t,endpoint:n}),await e.collection("dynamicHistory").deleteMany({ownerType:"global",ownerKey:t,endpointName:n})}e.s(["ProfileKeyMappingConflictError",0,a,"advanceScenarioProgress",0,f,"captureProfileKeyMapping",0,w,"clearGlobalMockScenario",0,v,"deleteProfile",0,u,"getDb",0,s,"getGlobalMockScenario",0,h,"getProfile",0,d,"getProfileKeyMapping",0,m,"listGlobalMockScenarios",0,I,"resetScenarioProgress",0,g,"upsertGlobalMockScenario",0,x,"upsertProfile",0,p],53952)},60932,e=>{"use strict";let t={_id:0,request:0,"response.headers":0,"response.body":0,"response.truncated":0};async function n(e,t){let n={};t.profileId&&(n.profileId=t.profileId),t.endpoint&&(n.endpoint=t.endpoint),t.errorsOnly&&(n.outcome="error"),t.logIdQuery&&(n.logId={$regex:`^${t.logIdQuery.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}`,$options:"i"});let r=t.beforeId??t.sinceId;if(r){let o=await e.findOne({logId:r},{projection:{_id:0,ts:1,logId:1}});if(o){let e=t.beforeId?"$lt":"$gt";n.$or=[{ts:{[e]:o.ts}},{ts:o.ts,logId:{[e]:o.logId}}]}else t.beforeId&&(n.$and=[{logId:{$in:[]}}])}return n}async function r(e,t){await e.collection("requestLogs").insertOne({...t})}async function o(e,r){let o=e.collection("requestLogs"),a=await n(o,r);return o.find(a,{projection:t}).sort({ts:-1,logId:-1}).limit(r.limit??100).toArray()}async function a(e,t){return e.collection("requestLogs").findOne({logId:t},{projection:{_id:0}})}e.s(["getLogEntry",0,a,"insertLogEntry",0,r,"listLogSummaries",0,o,"newLogId",0,function(){return`lg_${crypto.randomUUID().replaceAll("-","").slice(0,12)}`}])},38954,e=>{"use strict";e.s(["toLogEntryView",0,function(e){return{...e,ts:new Date(e.ts).toISOString()}},"toLogSummaryView",0,function(e){return{...e,ts:new Date(e.ts).toISOString()}}])},99880,e=>{"use strict";var t=e.i(47909),n=e.i(74017),r=e.i(96250),o=e.i(59756),a=e.i(61916),i=e.i(74677),s=e.i(69741),l=e.i(16795),c=e.i(87718),d=e.i(95169),p=e.i(47587),u=e.i(66012),f=e.i(70101),y=e.i(26937),g=e.i(10372),m=e.i(93695);e.i(52474);var w=e.i(220),h=e.i(60932),I=e.i(53952),x=e.i(38954);async function v(e,{params:t}){let{logId:n}=await t,r=await (0,h.getLogEntry)(await (0,I.getDb)(),n);return r?Response.json({entry:(0,x.toLogEntryView)(r)}):Response.json({error:"not_found"},{status:404})}e.s(["GET",0,v,"dynamic",0,"force-dynamic"],28059);var R=e.i(28059);let b=new t.AppRouteRouteModule({definition:{kind:n.RouteKind.APP_ROUTE,page:"/ui/api/logs/[logId]/route",pathname:"/ui/api/logs/[logId]",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/src/app/ui/api/logs/[logId]/route.ts",nextConfigOutput:"standalone",userland:R,...{}}),{workAsyncStorage:E,workUnitAsyncStorage:O,serverHooks:k}=b;async function A(e,t,r){r.requestMeta&&(0,o.setRequestMeta)(e,r.requestMeta),b.isDev&&(0,o.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let h="/ui/api/logs/[logId]/route";h=h.replace(/\/index$/,"")||"/";let I=await b.prepare(e,t,{srcPage:h,multiZoneDraftMode:!1});if(!I)return t.statusCode=400,t.end("Bad Request"),null==r.waitUntil||r.waitUntil.call(r,Promise.resolve()),null;let{buildId:x,deploymentId:v,params:R,nextConfig:E,parsedUrl:O,isDraftMode:k,prerenderManifest:A,routerServerContext:S,isOnDemandRevalidate:M,revalidateOnlyGenerated:P,resolvedPathname:N,clientReferenceManifest:C,serverActionsManifest:$}=I,_=(0,s.normalizeAppPath)(h),q=!!(A.dynamicRoutes[_]||A.routes[N]),T=async()=>((null==S?void 0:S.render404)?await S.render404(e,t,O,!1):t.end("This page could not be found"),null);if(q&&!k){let e=!!A.routes[N],t=A.dynamicRoutes[_];if(t&&!1===t.fallback&&!e){if(E.adapterPath)return await T();throw new m.NoFallbackError}}let D=null;!q||b.isDev||k||(D="/index"===(D=N)?"/":D);let j=!0===b.isDev||!q,L=q&&!j;$&&C&&(0,i.setManifestsSingleton)({page:h,clientReferenceManifest:C,serverActionsManifest:$});let H=e.method||"GET",U=(0,a.getTracer)(),K=U.getActiveScopeSpan(),B=!!(null==S?void 0:S.isWrappedByNextServer),G=!!(0,o.getRequestMeta)(e,"minimalMode"),F=(0,o.getRequestMeta)(e,"incrementalCache")||await b.getIncrementalCache(e,E,A,G);null==F||F.resetRequestCache(),globalThis.__incrementalCache=F;let V={params:R,previewProps:A.preview,renderOpts:{experimental:{authInterrupts:!!E.experimental.authInterrupts},cacheComponents:!!E.cacheComponents,supportsDynamicResponse:j,incrementalCache:F,cacheLifeProfiles:E.cacheLife,waitUntil:r.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,n,r,o)=>b.onRequestError(e,t,r,o,S)},sharedContext:{buildId:x,deploymentId:v}},W=new l.NodeNextRequest(e),X=new l.NodeNextResponse(t),Q=c.NextRequestAdapter.fromNodeNextRequest(W,(0,c.signalFromNodeResponse)(t));try{let o,i=async e=>b.handle(Q,V).finally(()=>{if(!e)return;e.setAttributes({"http.status_code":t.statusCode,"next.rsc":!1});let n=U.getRootSpanAttributes();if(!n)return;if(n.get("next.span_type")!==d.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${n.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let r=n.get("next.route");if(r){let t=`${H} ${r}`;e.setAttributes({"next.route":r,"http.route":r,"next.span_name":t}),e.updateName(t),o&&o!==e&&(o.setAttribute("http.route",r),o.updateName(t))}else e.updateName(`${H} ${h}`)}),s=async o=>{var a,s;let l=async({previousCacheEntry:n})=>{try{if(!G&&M&&P&&!n)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let a=await i(o);e.fetchMetrics=V.renderOpts.fetchMetrics;let s=V.renderOpts.pendingWaitUntil;s&&r.waitUntil&&(r.waitUntil(s),s=void 0);let l=V.renderOpts.collectedTags;if(!q)return await (0,u.sendResponse)(W,X,a,V.renderOpts.pendingWaitUntil),null;{let e=await a.blob(),t=(0,f.toNodeOutgoingHttpHeaders)(a.headers);l&&(t[g.NEXT_CACHE_TAGS_HEADER]=l),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let n=void 0!==V.renderOpts.collectedRevalidate&&!(V.renderOpts.collectedRevalidate>=g.INFINITE_CACHE)&&V.renderOpts.collectedRevalidate,r=void 0===V.renderOpts.collectedExpire||V.renderOpts.collectedExpire>=g.INFINITE_CACHE?void 0:V.renderOpts.collectedExpire;return{value:{kind:w.CachedRouteKind.APP_ROUTE,status:a.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:n,expire:r}}}}catch(t){throw(null==n?void 0:n.isStale)&&await b.onRequestError(e,t,{routerKind:"App Router",routePath:h,routeType:"route",revalidateReason:(0,p.getRevalidateReason)({isStaticGeneration:L,isOnDemandRevalidate:M})},!1,S),t}},c=await b.handleResponse({req:e,nextConfig:E,cacheKey:D,routeKind:n.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:A,isRoutePPREnabled:!1,isOnDemandRevalidate:M,revalidateOnlyGenerated:P,responseGenerator:l,waitUntil:r.waitUntil,isMinimalMode:G});if(!q)return null;if((null==c||null==(a=c.value)?void 0:a.kind)!==w.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==c||null==(s=c.value)?void 0:s.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});G||t.setHeader("x-nextjs-cache",M?"REVALIDATED":c.isMiss?"MISS":c.isStale?"STALE":"HIT"),k&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let d=(0,f.fromNodeOutgoingHttpHeaders)(c.value.headers);return G&&q||d.delete(g.NEXT_CACHE_TAGS_HEADER),!c.cacheControl||t.getHeader("Cache-Control")||d.get("Cache-Control")||d.set("Cache-Control",(0,y.getCacheControlHeader)(c.cacheControl)),await (0,u.sendResponse)(W,X,new Response(c.value.body,{headers:d,status:c.value.status||200})),null};B&&K?await s(K):(o=U.getActiveScopeSpan(),await U.withPropagatedContext(e.headers,()=>U.trace(d.BaseServerSpan.handleRequest,{spanName:`${H} ${h}`,kind:a.SpanKind.SERVER,attributes:{"http.method":H,"http.target":e.url}},s),void 0,!B))}catch(t){if(t instanceof m.NoFallbackError||await b.onRequestError(e,t,{routerKind:"App Router",routePath:_,routeType:"route",revalidateReason:(0,p.getRevalidateReason)({isStaticGeneration:L,isOnDemandRevalidate:M})},!1,S),q)throw t;return await (0,u.sendResponse)(W,X,new Response(null,{status:500})),null}}e.s(["handler",0,A,"patchFetch",0,function(){return(0,r.patchFetch)({workAsyncStorage:E,workUnitAsyncStorage:O})},"routeModule",0,b,"serverHooks",0,k,"workAsyncStorage",0,E,"workUnitAsyncStorage",0,O],99880)},82647,e=>{e.v(t=>Promise.all(["server/chunks/[externals]_mongodb-memory-server_1ofgmwu._.js"].map(t=>e.l(t))).then(()=>t(87818)))}];
|
|
2
|
-
|
|
3
|
-
//# sourceMappingURL=%5Broot-of-the-server%5D__0668hgm._.js.map
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
module.exports=[18622,(e,t,r)=>{t.exports=e.x("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js",()=>require("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js"))},56704,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-async-storage.external.js",()=>require("next/dist/server/app-render/work-async-storage.external.js"))},32319,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-unit-async-storage.external.js",()=>require("next/dist/server/app-render/work-unit-async-storage.external.js"))},70406,(e,t,r)=>{t.exports=e.x("next/dist/compiled/@opentelemetry/api",()=>require("next/dist/compiled/@opentelemetry/api"))},93695,(e,t,r)=>{t.exports=e.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},50227,(e,t,r)=>{t.exports=e.x("node:path",()=>require("node:path"))},2157,(e,t,r)=>{t.exports=e.x("node:fs",()=>require("node:fs"))},81543,(e,t,r)=>{t.exports=e.x("node:vm",()=>require("node:vm"))},73352,(e,t,r)=>{t.exports=e.x("esbuild-fd20e3d002e1b402",()=>require("esbuild-fd20e3d002e1b402"))},64249,e=>{"use strict";var t=e.i(47909),r=e.i(74017),a=e.i(96250),n=e.i(59756),s=e.i(61916),o=e.i(74677),i=e.i(69741),l=e.i(16795),d=e.i(87718),u=e.i(95169),p=e.i(47587),c=e.i(66012),h=e.i(70101),x=e.i(26937),v=e.i(10372),R=e.i(93695);e.i(52474);var m=e.i(220),g=e.i(27972);async function f(){let{catalog:e}=(0,g.getRuntime)();return Response.json({systems:e.systems.map(e=>({slug:e.slug,name:e.name,baseUrlEnv:e.baseUrlEnv,endpoints:e.endpoints.map(e=>({name:e.name,displayName:e.displayName,method:e.method,path:e.path,mockType:e.mockType??"profiled",hasResolver:e.hasResolver??!1,scenarios:e.scenarios}))}))})}e.s(["GET",0,f,"dynamic",0,"force-dynamic"],74134);var E=e.i(74134);let w=new t.AppRouteRouteModule({definition:{kind:r.RouteKind.APP_ROUTE,page:"/ui/api/catalog/route",pathname:"/ui/api/catalog",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/src/app/ui/api/catalog/route.ts",nextConfigOutput:"standalone",userland:E,...{}}),{workAsyncStorage:y,workUnitAsyncStorage:C,serverHooks:b}=w;async function A(e,t,a){a.requestMeta&&(0,n.setRequestMeta)(e,a.requestMeta),w.isDev&&(0,n.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let g="/ui/api/catalog/route";g=g.replace(/\/index$/,"")||"/";let f=await w.prepare(e,t,{srcPage:g,multiZoneDraftMode:!1});if(!f)return t.statusCode=400,t.end("Bad Request"),null==a.waitUntil||a.waitUntil.call(a,Promise.resolve()),null;let{buildId:E,deploymentId:y,params:C,nextConfig:b,parsedUrl:A,isDraftMode:T,prerenderManifest:q,routerServerContext:N,isOnDemandRevalidate:P,revalidateOnlyGenerated:S,resolvedPathname:_,clientReferenceManifest:k,serverActionsManifest:O}=f,U=(0,i.normalizeAppPath)(g),H=!!(q.dynamicRoutes[U]||q.routes[_]),j=async()=>((null==N?void 0:N.render404)?await N.render404(e,t,A,!1):t.end("This page could not be found"),null);if(H&&!T){let e=!!q.routes[_],t=q.dynamicRoutes[U];if(t&&!1===t.fallback&&!e){if(b.adapterPath)return await j();throw new R.NoFallbackError}}let I=null;!H||w.isDev||T||(I="/index"===(I=_)?"/":I);let M=!0===w.isDev||!H,D=H&&!M;O&&k&&(0,o.setManifestsSingleton)({page:g,clientReferenceManifest:k,serverActionsManifest:O});let $=e.method||"GET",F=(0,s.getTracer)(),K=F.getActiveScopeSpan(),B=!!(null==N?void 0:N.isWrappedByNextServer),L=!!(0,n.getRequestMeta)(e,"minimalMode"),G=(0,n.getRequestMeta)(e,"incrementalCache")||await w.getIncrementalCache(e,b,q,L);null==G||G.resetRequestCache(),globalThis.__incrementalCache=G;let V={params:C,previewProps:q.preview,renderOpts:{experimental:{authInterrupts:!!b.experimental.authInterrupts},cacheComponents:!!b.cacheComponents,supportsDynamicResponse:M,incrementalCache:G,cacheLifeProfiles:b.cacheLife,waitUntil:a.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,r,a,n)=>w.onRequestError(e,t,a,n,N)},sharedContext:{buildId:E,deploymentId:y}},W=new l.NodeNextRequest(e),X=new l.NodeNextResponse(t),z=d.NextRequestAdapter.fromNodeNextRequest(W,(0,d.signalFromNodeResponse)(t));try{let n,o=async e=>w.handle(z,V).finally(()=>{if(!e)return;e.setAttributes({"http.status_code":t.statusCode,"next.rsc":!1});let r=F.getRootSpanAttributes();if(!r)return;if(r.get("next.span_type")!==u.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${r.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let a=r.get("next.route");if(a){let t=`${$} ${a}`;e.setAttributes({"next.route":a,"http.route":a,"next.span_name":t}),e.updateName(t),n&&n!==e&&(n.setAttribute("http.route",a),n.updateName(t))}else e.updateName(`${$} ${g}`)}),i=async n=>{var s,i;let l=async({previousCacheEntry:r})=>{try{if(!L&&P&&S&&!r)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let s=await o(n);e.fetchMetrics=V.renderOpts.fetchMetrics;let i=V.renderOpts.pendingWaitUntil;i&&a.waitUntil&&(a.waitUntil(i),i=void 0);let l=V.renderOpts.collectedTags;if(!H)return await (0,c.sendResponse)(W,X,s,V.renderOpts.pendingWaitUntil),null;{let e=await s.blob(),t=(0,h.toNodeOutgoingHttpHeaders)(s.headers);l&&(t[v.NEXT_CACHE_TAGS_HEADER]=l),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let r=void 0!==V.renderOpts.collectedRevalidate&&!(V.renderOpts.collectedRevalidate>=v.INFINITE_CACHE)&&V.renderOpts.collectedRevalidate,a=void 0===V.renderOpts.collectedExpire||V.renderOpts.collectedExpire>=v.INFINITE_CACHE?void 0:V.renderOpts.collectedExpire;return{value:{kind:m.CachedRouteKind.APP_ROUTE,status:s.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:r,expire:a}}}}catch(t){throw(null==r?void 0:r.isStale)&&await w.onRequestError(e,t,{routerKind:"App Router",routePath:g,routeType:"route",revalidateReason:(0,p.getRevalidateReason)({isStaticGeneration:D,isOnDemandRevalidate:P})},!1,N),t}},d=await w.handleResponse({req:e,nextConfig:b,cacheKey:I,routeKind:r.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:q,isRoutePPREnabled:!1,isOnDemandRevalidate:P,revalidateOnlyGenerated:S,responseGenerator:l,waitUntil:a.waitUntil,isMinimalMode:L});if(!H)return null;if((null==d||null==(s=d.value)?void 0:s.kind)!==m.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==d||null==(i=d.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});L||t.setHeader("x-nextjs-cache",P?"REVALIDATED":d.isMiss?"MISS":d.isStale?"STALE":"HIT"),T&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let u=(0,h.fromNodeOutgoingHttpHeaders)(d.value.headers);return L&&H||u.delete(v.NEXT_CACHE_TAGS_HEADER),!d.cacheControl||t.getHeader("Cache-Control")||u.get("Cache-Control")||u.set("Cache-Control",(0,x.getCacheControlHeader)(d.cacheControl)),await (0,c.sendResponse)(W,X,new Response(d.value.body,{headers:u,status:d.value.status||200})),null};B&&K?await i(K):(n=F.getActiveScopeSpan(),await F.withPropagatedContext(e.headers,()=>F.trace(u.BaseServerSpan.handleRequest,{spanName:`${$} ${g}`,kind:s.SpanKind.SERVER,attributes:{"http.method":$,"http.target":e.url}},i),void 0,!B))}catch(t){if(t instanceof R.NoFallbackError||await w.onRequestError(e,t,{routerKind:"App Router",routePath:U,routeType:"route",revalidateReason:(0,p.getRevalidateReason)({isStaticGeneration:D,isOnDemandRevalidate:P})},!1,N),H)throw t;return await (0,c.sendResponse)(W,X,new Response(null,{status:500})),null}}e.s(["handler",0,A,"patchFetch",0,function(){return(0,a.patchFetch)({workAsyncStorage:y,workUnitAsyncStorage:C})},"routeModule",0,w,"serverHooks",0,b,"workAsyncStorage",0,y,"workUnitAsyncStorage",0,C],64249)}];
|
|
2
|
-
|
|
3
|
-
//# sourceMappingURL=%5Broot-of-the-server%5D__078olc9._.js.map
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
module.exports=[93695,(e,t,n)=>{t.exports=e.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},18622,(e,t,n)=>{t.exports=e.x("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js",()=>require("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js"))},56704,(e,t,n)=>{t.exports=e.x("next/dist/server/app-render/work-async-storage.external.js",()=>require("next/dist/server/app-render/work-async-storage.external.js"))},32319,(e,t,n)=>{t.exports=e.x("next/dist/server/app-render/work-unit-async-storage.external.js",()=>require("next/dist/server/app-render/work-unit-async-storage.external.js"))},70406,(e,t,n)=>{t.exports=e.x("next/dist/compiled/@opentelemetry/api",()=>require("next/dist/compiled/@opentelemetry/api"))},66486,(e,t,n)=>{t.exports=e.x("mongodb-438b504308ffa4be",()=>require("mongodb-438b504308ffa4be"))},53952,e=>{"use strict";var t=e.i(66486);let n=null;async function r(){let{MongoMemoryServer:t}=await e.A(82647);return console.log("[mock-server] MONGODB_CONNECTION_STRING not set; starting embedded in-memory MongoDB (data is ephemeral)…"),(await t.create()).getUri()}async function o(){let e=process.env.MONGODB_CONNECTION_STRING;return e||(n||(n=r().catch(e=>{throw n=null,e})),n)}class i extends Error{namespace;key;existingProfileId;newProfileId;constructor(e,t,n,r){super(`profile key mapping conflict for ${e}/${t}: ${n} already exists, got ${r}`),this.namespace=e,this.key=t,this.existingProfileId=n,this.newProfileId=r}}let a=null;async function s(){if(!a){let e=await o();a=new t.MongoClient(e),await a.connect(),await c(a.db(l()))}return a.db(l())}function l(){return process.env.MONGODB_DB??"mockDB"}async function c(e){await e.collection("mockProfiles").createIndex({profileId:1},{unique:!0}),await e.collection("profileKeyMappings").createIndex({namespace:1,key:1},{unique:!0}),await e.collection("profileKeyMappings").createIndex({profileId:1}),await e.collection("globalMockScenarios").createIndex({system:1,endpoint:1},{unique:!0}),await e.collection("scenarioProgress").createIndex({profileId:1,endpointName:1},{unique:!0}),await e.collection("dynamicHistory").createIndex({ownerType:1,ownerKey:1,endpointName:1},{unique:!0}),await e.collection("requestLogs").createIndex({ts:1},{expireAfterSeconds:86400}),await e.collection("requestLogs").createIndex({logId:1},{unique:!0}),await e.collection("requestLogs").createIndex({profileId:1,ts:-1}),await e.collection("requestLogs").createIndex({endpoint:1,ts:-1})}async function d(e,t){return e.collection("mockProfiles").findOne({profileId:t},{projection:{_id:0}})}async function p(e,t){let n=new Date,r={endpointScenarios:t.endpointScenarios,modifiedAt:n};void 0!==t.displayName&&(r.displayName=t.displayName),await e.collection("mockProfiles").updateOne({profileId:t.profileId},{$set:r,$setOnInsert:{profileId:t.profileId,createdAt:n}},{upsert:!0})}async function u(e,t){await e.collection("mockProfiles").deleteOne({profileId:t}),await e.collection("profileKeyMappings").deleteMany({profileId:t}),await e.collection("scenarioProgress").deleteMany({profileId:t}),await e.collection("requestLogs").deleteMany({profileId:t}),await e.collection("dynamicHistory").deleteMany({ownerType:"profile",ownerKey:t})}async function f(e,n,r,o){try{return await y(e,n,r,o)}catch(i){if(!(i instanceof t.MongoServerError)||11e3!==i.code)throw i;return y(e,n,r,o)}}async function y(e,t,n,r){let o=new Date,i=await e.collection("scenarioProgress").findOneAndUpdate({profileId:t,endpointName:n},[{$set:{served:{$cond:[{$eq:["$steps",{$literal:r}]},{$add:[{$ifNull:["$served",0]},1]},1]},steps:{$literal:r},createdAt:{$ifNull:["$createdAt",o]},modifiedAt:o}}],{upsert:!0,returnDocument:"after"});if(!i)throw Error("scenario progress upsert returned no document");return i.served}async function g(e,t,n){await e.collection("scenarioProgress").deleteMany(void 0===n?{profileId:t}:{profileId:t,endpointName:n})}async function m(e,t,n){return e.collection("profileKeyMappings").findOne({namespace:t,key:n},{projection:{_id:0}})}async function w(e,n){let r=e.collection("profileKeyMappings"),o=new Date,a=await r.findOne({namespace:n.namespace,key:n.key},{projection:{_id:0}});if(a){if(a.profileId!==n.profileId)throw new i(n.namespace,n.key,a.profileId,n.profileId);await r.updateOne({namespace:n.namespace,key:n.key,profileId:n.profileId},{$set:{capturedBy:n.capturedBy,modifiedAt:o}});return}try{await r.insertOne({namespace:n.namespace,key:n.key,profileId:n.profileId,capturedBy:n.capturedBy,createdAt:o,modifiedAt:o})}catch(a){if(!(a instanceof t.MongoServerError)||11e3!==a.code)throw a;let e=await r.findOne({namespace:n.namespace,key:n.key},{projection:{_id:0}});if(!e)throw a;if(e.profileId!==n.profileId)throw new i(n.namespace,n.key,e.profileId,n.profileId);await r.updateOne({namespace:n.namespace,key:n.key,profileId:n.profileId},{$set:{capturedBy:n.capturedBy,modifiedAt:o}})}}async function h(e,t,n){return e.collection("globalMockScenarios").findOne({system:t,endpoint:n},{projection:{_id:0}})}async function I(e){return e.collection("globalMockScenarios").find({},{projection:{_id:0}}).sort({modifiedAt:-1}).toArray()}async function x(e,t){let n=new Date;await e.collection("globalMockScenarios").updateOne({system:t.system,endpoint:t.endpoint},{$set:{scenario:t.scenario,modifiedAt:n},$setOnInsert:{system:t.system,endpoint:t.endpoint,createdAt:n}},{upsert:!0})}async function v(e,t,n){await e.collection("globalMockScenarios").deleteOne({system:t,endpoint:n}),await e.collection("dynamicHistory").deleteMany({ownerType:"global",ownerKey:t,endpointName:n})}e.s(["ProfileKeyMappingConflictError",0,i,"advanceScenarioProgress",0,f,"captureProfileKeyMapping",0,w,"clearGlobalMockScenario",0,v,"deleteProfile",0,u,"getDb",0,s,"getGlobalMockScenario",0,h,"getProfile",0,d,"getProfileKeyMapping",0,m,"listGlobalMockScenarios",0,I,"resetScenarioProgress",0,g,"upsertGlobalMockScenario",0,x,"upsertProfile",0,p],53952)},60932,e=>{"use strict";let t={_id:0,request:0,"response.headers":0,"response.body":0,"response.truncated":0};async function n(e,t){let n={};t.profileId&&(n.profileId=t.profileId),t.endpoint&&(n.endpoint=t.endpoint),t.errorsOnly&&(n.outcome="error"),t.logIdQuery&&(n.logId={$regex:`^${t.logIdQuery.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}`,$options:"i"});let r=t.beforeId??t.sinceId;if(r){let o=await e.findOne({logId:r},{projection:{_id:0,ts:1,logId:1}});if(o){let e=t.beforeId?"$lt":"$gt";n.$or=[{ts:{[e]:o.ts}},{ts:o.ts,logId:{[e]:o.logId}}]}else t.beforeId&&(n.$and=[{logId:{$in:[]}}])}return n}async function r(e,t){await e.collection("requestLogs").insertOne({...t})}async function o(e,r){let o=e.collection("requestLogs"),i=await n(o,r);return o.find(i,{projection:t}).sort({ts:-1,logId:-1}).limit(r.limit??100).toArray()}async function i(e,t){return e.collection("requestLogs").findOne({logId:t},{projection:{_id:0}})}e.s(["getLogEntry",0,i,"insertLogEntry",0,r,"listLogSummaries",0,o,"newLogId",0,function(){return`lg_${crypto.randomUUID().replaceAll("-","").slice(0,12)}`}])},64983,e=>{"use strict";var t=e.i(60932);async function n(e,n,r,o){try{await (0,t.insertLogEntry)(e,{logId:(0,t.newLogId)(),ts:new Date,kind:"admin",profileId:n,trace:{adminAction:r,...o&&{adminEndpoint:o}}})}catch(e){console.warn("[mock-log] failed to write admin log entry:",e)}}e.s(["writeAdminLog",0,n])},13506,e=>{"use strict";let t="dynamicHistory";async function n(e,n,r,o){let i=await e.collection(t).findOne({ownerType:n,ownerKey:r,endpointName:o},{projection:{_id:0,history:1}});return i?.history??[]}async function r(e,n,r,o,i,a){let s=new Date;await e.collection(t).updateOne({ownerType:n,ownerKey:r,endpointName:o},{$push:{history:{$each:[i],$slice:-Math.max(1,a)}},$set:{modifiedAt:s},$setOnInsert:{ownerType:n,ownerKey:r,endpointName:o,createdAt:s}},{upsert:!0})}async function o(e,n,r,o){await e.collection(t).deleteMany(void 0===o?{ownerType:n,ownerKey:r}:{ownerType:n,ownerKey:r,endpointName:o})}e.s(["appendDynamicHistory",0,r,"getDynamicHistory",0,n,"resetDynamicHistory",0,o])},22151,e=>{"use strict";var t=e.i(47909),n=e.i(74017),r=e.i(96250),o=e.i(59756),i=e.i(61916),a=e.i(74677),s=e.i(69741),l=e.i(16795),c=e.i(87718),d=e.i(95169),p=e.i(47587),u=e.i(66012),f=e.i(70101),y=e.i(26937),g=e.i(10372),m=e.i(93695);e.i(52474);var w=e.i(220),h=e.i(13506),I=e.i(64983),x=e.i(53952);async function v(e,{params:t}){let n,{profileId:r}=await t;try{let t=await e.json();"string"==typeof t?.endpoint&&""!==t.endpoint&&(n=t.endpoint)}catch{}let o=await (0,x.getDb)();return await (0,x.resetScenarioProgress)(o,r,n),await (0,h.resetDynamicHistory)(o,"profile",r,n),await (0,I.writeAdminLog)(o,r,"progress_reset",n),new Response(null,{status:204})}e.s(["POST",0,v,"dynamic",0,"force-dynamic"],12519);var R=e.i(12519);let b=new t.AppRouteRouteModule({definition:{kind:n.RouteKind.APP_ROUTE,page:"/ui/api/profiles/[profileId]/reset/route",pathname:"/ui/api/profiles/[profileId]/reset",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/src/app/ui/api/profiles/[profileId]/reset/route.ts",nextConfigOutput:"standalone",userland:R,...{}}),{workAsyncStorage:O,workUnitAsyncStorage:k,serverHooks:A}=b;async function E(e,t,r){r.requestMeta&&(0,o.setRequestMeta)(e,r.requestMeta),b.isDev&&(0,o.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let h="/ui/api/profiles/[profileId]/reset/route";h=h.replace(/\/index$/,"")||"/";let I=await b.prepare(e,t,{srcPage:h,multiZoneDraftMode:!1});if(!I)return t.statusCode=400,t.end("Bad Request"),null==r.waitUntil||r.waitUntil.call(r,Promise.resolve()),null;let{buildId:x,deploymentId:v,params:R,nextConfig:O,parsedUrl:k,isDraftMode:A,prerenderManifest:E,routerServerContext:M,isOnDemandRevalidate:P,revalidateOnlyGenerated:$,resolvedPathname:N,clientReferenceManifest:C,serverActionsManifest:S}=I,_=(0,s.normalizeAppPath)(h),q=!!(E.dynamicRoutes[_]||E.routes[N]),D=async()=>((null==M?void 0:M.render404)?await M.render404(e,t,k,!1):t.end("This page could not be found"),null);if(q&&!A){let e=!!E.routes[N],t=E.dynamicRoutes[_];if(t&&!1===t.fallback&&!e){if(O.adapterPath)return await D();throw new m.NoFallbackError}}let T=null;!q||b.isDev||A||(T="/index"===(T=N)?"/":T);let j=!0===b.isDev||!q,H=q&&!j;S&&C&&(0,a.setManifestsSingleton)({page:h,clientReferenceManifest:C,serverActionsManifest:S});let L=e.method||"GET",U=(0,i.getTracer)(),K=U.getActiveScopeSpan(),B=!!(null==M?void 0:M.isWrappedByNextServer),G=!!(0,o.getRequestMeta)(e,"minimalMode"),F=(0,o.getRequestMeta)(e,"incrementalCache")||await b.getIncrementalCache(e,O,E,G);null==F||F.resetRequestCache(),globalThis.__incrementalCache=F;let V={params:R,previewProps:E.preview,renderOpts:{experimental:{authInterrupts:!!O.experimental.authInterrupts},cacheComponents:!!O.cacheComponents,supportsDynamicResponse:j,incrementalCache:F,cacheLifeProfiles:O.cacheLife,waitUntil:r.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,n,r,o)=>b.onRequestError(e,t,r,o,M)},sharedContext:{buildId:x,deploymentId:v}},W=new l.NodeNextRequest(e),X=new l.NodeNextResponse(t),Q=c.NextRequestAdapter.fromNodeNextRequest(W,(0,c.signalFromNodeResponse)(t));try{let o,a=async e=>b.handle(Q,V).finally(()=>{if(!e)return;e.setAttributes({"http.status_code":t.statusCode,"next.rsc":!1});let n=U.getRootSpanAttributes();if(!n)return;if(n.get("next.span_type")!==d.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${n.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let r=n.get("next.route");if(r){let t=`${L} ${r}`;e.setAttributes({"next.route":r,"http.route":r,"next.span_name":t}),e.updateName(t),o&&o!==e&&(o.setAttribute("http.route",r),o.updateName(t))}else e.updateName(`${L} ${h}`)}),s=async o=>{var i,s;let l=async({previousCacheEntry:n})=>{try{if(!G&&P&&$&&!n)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let i=await a(o);e.fetchMetrics=V.renderOpts.fetchMetrics;let s=V.renderOpts.pendingWaitUntil;s&&r.waitUntil&&(r.waitUntil(s),s=void 0);let l=V.renderOpts.collectedTags;if(!q)return await (0,u.sendResponse)(W,X,i,V.renderOpts.pendingWaitUntil),null;{let e=await i.blob(),t=(0,f.toNodeOutgoingHttpHeaders)(i.headers);l&&(t[g.NEXT_CACHE_TAGS_HEADER]=l),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let n=void 0!==V.renderOpts.collectedRevalidate&&!(V.renderOpts.collectedRevalidate>=g.INFINITE_CACHE)&&V.renderOpts.collectedRevalidate,r=void 0===V.renderOpts.collectedExpire||V.renderOpts.collectedExpire>=g.INFINITE_CACHE?void 0:V.renderOpts.collectedExpire;return{value:{kind:w.CachedRouteKind.APP_ROUTE,status:i.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:n,expire:r}}}}catch(t){throw(null==n?void 0:n.isStale)&&await b.onRequestError(e,t,{routerKind:"App Router",routePath:h,routeType:"route",revalidateReason:(0,p.getRevalidateReason)({isStaticGeneration:H,isOnDemandRevalidate:P})},!1,M),t}},c=await b.handleResponse({req:e,nextConfig:O,cacheKey:T,routeKind:n.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:E,isRoutePPREnabled:!1,isOnDemandRevalidate:P,revalidateOnlyGenerated:$,responseGenerator:l,waitUntil:r.waitUntil,isMinimalMode:G});if(!q)return null;if((null==c||null==(i=c.value)?void 0:i.kind)!==w.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==c||null==(s=c.value)?void 0:s.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});G||t.setHeader("x-nextjs-cache",P?"REVALIDATED":c.isMiss?"MISS":c.isStale?"STALE":"HIT"),A&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let d=(0,f.fromNodeOutgoingHttpHeaders)(c.value.headers);return G&&q||d.delete(g.NEXT_CACHE_TAGS_HEADER),!c.cacheControl||t.getHeader("Cache-Control")||d.get("Cache-Control")||d.set("Cache-Control",(0,y.getCacheControlHeader)(c.cacheControl)),await (0,u.sendResponse)(W,X,new Response(c.value.body,{headers:d,status:c.value.status||200})),null};B&&K?await s(K):(o=U.getActiveScopeSpan(),await U.withPropagatedContext(e.headers,()=>U.trace(d.BaseServerSpan.handleRequest,{spanName:`${L} ${h}`,kind:i.SpanKind.SERVER,attributes:{"http.method":L,"http.target":e.url}},s),void 0,!B))}catch(t){if(t instanceof m.NoFallbackError||await b.onRequestError(e,t,{routerKind:"App Router",routePath:_,routeType:"route",revalidateReason:(0,p.getRevalidateReason)({isStaticGeneration:H,isOnDemandRevalidate:P})},!1,M),q)throw t;return await (0,u.sendResponse)(W,X,new Response(null,{status:500})),null}}e.s(["handler",0,E,"patchFetch",0,function(){return(0,r.patchFetch)({workAsyncStorage:O,workUnitAsyncStorage:k})},"routeModule",0,b,"serverHooks",0,A,"workAsyncStorage",0,O,"workUnitAsyncStorage",0,k],22151)},82647,e=>{e.v(t=>Promise.all(["server/chunks/[externals]_mongodb-memory-server_1ofgmwu._.js"].map(t=>e.l(t))).then(()=>t(87818)))}];
|
|
2
|
-
|
|
3
|
-
//# sourceMappingURL=%5Broot-of-the-server%5D__0f-_c79._.js.map
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
module.exports=[93695,(e,t,n)=>{t.exports=e.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},18622,(e,t,n)=>{t.exports=e.x("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js",()=>require("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js"))},56704,(e,t,n)=>{t.exports=e.x("next/dist/server/app-render/work-async-storage.external.js",()=>require("next/dist/server/app-render/work-async-storage.external.js"))},32319,(e,t,n)=>{t.exports=e.x("next/dist/server/app-render/work-unit-async-storage.external.js",()=>require("next/dist/server/app-render/work-unit-async-storage.external.js"))},70406,(e,t,n)=>{t.exports=e.x("next/dist/compiled/@opentelemetry/api",()=>require("next/dist/compiled/@opentelemetry/api"))},66486,(e,t,n)=>{t.exports=e.x("mongodb-438b504308ffa4be",()=>require("mongodb-438b504308ffa4be"))},53952,e=>{"use strict";var t=e.i(66486);let n=null;async function r(){let{MongoMemoryServer:t}=await e.A(82647);return console.log("[mock-server] MONGODB_CONNECTION_STRING not set; starting embedded in-memory MongoDB (data is ephemeral)…"),(await t.create()).getUri()}async function o(){let e=process.env.MONGODB_CONNECTION_STRING;return e||(n||(n=r().catch(e=>{throw n=null,e})),n)}class i extends Error{namespace;key;existingProfileId;newProfileId;constructor(e,t,n,r){super(`profile key mapping conflict for ${e}/${t}: ${n} already exists, got ${r}`),this.namespace=e,this.key=t,this.existingProfileId=n,this.newProfileId=r}}let a=null;async function s(){if(!a){let e=await o();a=new t.MongoClient(e),await a.connect(),await c(a.db(l()))}return a.db(l())}function l(){return process.env.MONGODB_DB??"mockDB"}async function c(e){await e.collection("mockProfiles").createIndex({profileId:1},{unique:!0}),await e.collection("profileKeyMappings").createIndex({namespace:1,key:1},{unique:!0}),await e.collection("profileKeyMappings").createIndex({profileId:1}),await e.collection("globalMockScenarios").createIndex({system:1,endpoint:1},{unique:!0}),await e.collection("scenarioProgress").createIndex({profileId:1,endpointName:1},{unique:!0}),await e.collection("dynamicHistory").createIndex({ownerType:1,ownerKey:1,endpointName:1},{unique:!0}),await e.collection("requestLogs").createIndex({ts:1},{expireAfterSeconds:86400}),await e.collection("requestLogs").createIndex({logId:1},{unique:!0}),await e.collection("requestLogs").createIndex({profileId:1,ts:-1}),await e.collection("requestLogs").createIndex({endpoint:1,ts:-1})}async function d(e,t){return e.collection("mockProfiles").findOne({profileId:t},{projection:{_id:0}})}async function p(e,t){let n=new Date,r={endpointScenarios:t.endpointScenarios,modifiedAt:n};void 0!==t.displayName&&(r.displayName=t.displayName),await e.collection("mockProfiles").updateOne({profileId:t.profileId},{$set:r,$setOnInsert:{profileId:t.profileId,createdAt:n}},{upsert:!0})}async function u(e,t){await e.collection("mockProfiles").deleteOne({profileId:t}),await e.collection("profileKeyMappings").deleteMany({profileId:t}),await e.collection("scenarioProgress").deleteMany({profileId:t}),await e.collection("requestLogs").deleteMany({profileId:t}),await e.collection("dynamicHistory").deleteMany({ownerType:"profile",ownerKey:t})}async function f(e,n,r,o){try{return await g(e,n,r,o)}catch(i){if(!(i instanceof t.MongoServerError)||11e3!==i.code)throw i;return g(e,n,r,o)}}async function g(e,t,n,r){let o=new Date,i=await e.collection("scenarioProgress").findOneAndUpdate({profileId:t,endpointName:n},[{$set:{served:{$cond:[{$eq:["$steps",{$literal:r}]},{$add:[{$ifNull:["$served",0]},1]},1]},steps:{$literal:r},createdAt:{$ifNull:["$createdAt",o]},modifiedAt:o}}],{upsert:!0,returnDocument:"after"});if(!i)throw Error("scenario progress upsert returned no document");return i.served}async function y(e,t,n){await e.collection("scenarioProgress").deleteMany(void 0===n?{profileId:t}:{profileId:t,endpointName:n})}async function m(e,t,n){return e.collection("profileKeyMappings").findOne({namespace:t,key:n},{projection:{_id:0}})}async function w(e,n){let r=e.collection("profileKeyMappings"),o=new Date,a=await r.findOne({namespace:n.namespace,key:n.key},{projection:{_id:0}});if(a){if(a.profileId!==n.profileId)throw new i(n.namespace,n.key,a.profileId,n.profileId);await r.updateOne({namespace:n.namespace,key:n.key,profileId:n.profileId},{$set:{capturedBy:n.capturedBy,modifiedAt:o}});return}try{await r.insertOne({namespace:n.namespace,key:n.key,profileId:n.profileId,capturedBy:n.capturedBy,createdAt:o,modifiedAt:o})}catch(a){if(!(a instanceof t.MongoServerError)||11e3!==a.code)throw a;let e=await r.findOne({namespace:n.namespace,key:n.key},{projection:{_id:0}});if(!e)throw a;if(e.profileId!==n.profileId)throw new i(n.namespace,n.key,e.profileId,n.profileId);await r.updateOne({namespace:n.namespace,key:n.key,profileId:n.profileId},{$set:{capturedBy:n.capturedBy,modifiedAt:o}})}}async function h(e,t,n){return e.collection("globalMockScenarios").findOne({system:t,endpoint:n},{projection:{_id:0}})}async function I(e){return e.collection("globalMockScenarios").find({},{projection:{_id:0}}).sort({modifiedAt:-1}).toArray()}async function x(e,t){let n=new Date;await e.collection("globalMockScenarios").updateOne({system:t.system,endpoint:t.endpoint},{$set:{scenario:t.scenario,modifiedAt:n},$setOnInsert:{system:t.system,endpoint:t.endpoint,createdAt:n}},{upsert:!0})}async function v(e,t,n){await e.collection("globalMockScenarios").deleteOne({system:t,endpoint:n}),await e.collection("dynamicHistory").deleteMany({ownerType:"global",ownerKey:t,endpointName:n})}e.s(["ProfileKeyMappingConflictError",0,i,"advanceScenarioProgress",0,f,"captureProfileKeyMapping",0,w,"clearGlobalMockScenario",0,v,"deleteProfile",0,u,"getDb",0,s,"getGlobalMockScenario",0,h,"getProfile",0,d,"getProfileKeyMapping",0,m,"listGlobalMockScenarios",0,I,"resetScenarioProgress",0,y,"upsertGlobalMockScenario",0,x,"upsertProfile",0,p],53952)},60932,e=>{"use strict";let t={_id:0,request:0,"response.headers":0,"response.body":0,"response.truncated":0};async function n(e,t){let n={};t.profileId&&(n.profileId=t.profileId),t.endpoint&&(n.endpoint=t.endpoint),t.errorsOnly&&(n.outcome="error"),t.logIdQuery&&(n.logId={$regex:`^${t.logIdQuery.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}`,$options:"i"});let r=t.beforeId??t.sinceId;if(r){let o=await e.findOne({logId:r},{projection:{_id:0,ts:1,logId:1}});if(o){let e=t.beforeId?"$lt":"$gt";n.$or=[{ts:{[e]:o.ts}},{ts:o.ts,logId:{[e]:o.logId}}]}else t.beforeId&&(n.$and=[{logId:{$in:[]}}])}return n}async function r(e,t){await e.collection("requestLogs").insertOne({...t})}async function o(e,r){let o=e.collection("requestLogs"),i=await n(o,r);return o.find(i,{projection:t}).sort({ts:-1,logId:-1}).limit(r.limit??100).toArray()}async function i(e,t){return e.collection("requestLogs").findOne({logId:t},{projection:{_id:0}})}e.s(["getLogEntry",0,i,"insertLogEntry",0,r,"listLogSummaries",0,o,"newLogId",0,function(){return`lg_${crypto.randomUUID().replaceAll("-","").slice(0,12)}`}])},38954,e=>{"use strict";e.s(["toLogEntryView",0,function(e){return{...e,ts:new Date(e.ts).toISOString()}},"toLogSummaryView",0,function(e){return{...e,ts:new Date(e.ts).toISOString()}}])},26381,e=>{"use strict";var t=e.i(47909),n=e.i(74017),r=e.i(96250),o=e.i(59756),i=e.i(61916),a=e.i(74677),s=e.i(69741),l=e.i(16795),c=e.i(87718),d=e.i(95169),p=e.i(47587),u=e.i(66012),f=e.i(70101),g=e.i(26937),y=e.i(10372),m=e.i(93695);e.i(52474);var w=e.i(220),h=e.i(60932),I=e.i(53952),x=e.i(38954);async function v(e){let t=new URL(e.url).searchParams,n=Number.parseInt(t.get("limit")??"",10),r=await (0,h.listLogSummaries)(await (0,I.getDb)(),{profileId:t.get("profile")||void 0,endpoint:t.get("endpoint")||void 0,errorsOnly:"1"===t.get("errorsOnly"),logIdQuery:t.get("logId")||void 0,sinceId:t.get("since")||void 0,beforeId:t.get("before")||void 0,limit:Number.isFinite(n)?Math.min(Math.max(n,1),200):void 0});return Response.json({entries:r.map(x.toLogSummaryView)})}e.s(["GET",0,v,"dynamic",0,"force-dynamic"],74775);var R=e.i(74775);let b=new t.AppRouteRouteModule({definition:{kind:n.RouteKind.APP_ROUTE,page:"/ui/api/logs/route",pathname:"/ui/api/logs",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/src/app/ui/api/logs/route.ts",nextConfigOutput:"standalone",userland:R,...{}}),{workAsyncStorage:O,workUnitAsyncStorage:E,serverHooks:k}=b;async function A(e,t,r){r.requestMeta&&(0,o.setRequestMeta)(e,r.requestMeta),b.isDev&&(0,o.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let h="/ui/api/logs/route";h=h.replace(/\/index$/,"")||"/";let I=await b.prepare(e,t,{srcPage:h,multiZoneDraftMode:!1});if(!I)return t.statusCode=400,t.end("Bad Request"),null==r.waitUntil||r.waitUntil.call(r,Promise.resolve()),null;let{buildId:x,deploymentId:v,params:R,nextConfig:O,parsedUrl:E,isDraftMode:k,prerenderManifest:A,routerServerContext:S,isOnDemandRevalidate:M,revalidateOnlyGenerated:N,resolvedPathname:P,clientReferenceManifest:C,serverActionsManifest:$}=I,q=(0,s.normalizeAppPath)(h),_=!!(A.dynamicRoutes[q]||A.routes[P]),T=async()=>((null==S?void 0:S.render404)?await S.render404(e,t,E,!1):t.end("This page could not be found"),null);if(_&&!k){let e=!!A.routes[P],t=A.dynamicRoutes[q];if(t&&!1===t.fallback&&!e){if(O.adapterPath)return await T();throw new m.NoFallbackError}}let D=null;!_||b.isDev||k||(D="/index"===(D=P)?"/":D);let j=!0===b.isDev||!_,L=_&&!j;$&&C&&(0,a.setManifestsSingleton)({page:h,clientReferenceManifest:C,serverActionsManifest:$});let U=e.method||"GET",H=(0,i.getTracer)(),K=H.getActiveScopeSpan(),B=!!(null==S?void 0:S.isWrappedByNextServer),G=!!(0,o.getRequestMeta)(e,"minimalMode"),F=(0,o.getRequestMeta)(e,"incrementalCache")||await b.getIncrementalCache(e,O,A,G);null==F||F.resetRequestCache(),globalThis.__incrementalCache=F;let V={params:R,previewProps:A.preview,renderOpts:{experimental:{authInterrupts:!!O.experimental.authInterrupts},cacheComponents:!!O.cacheComponents,supportsDynamicResponse:j,incrementalCache:F,cacheLifeProfiles:O.cacheLife,waitUntil:r.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,n,r,o)=>b.onRequestError(e,t,r,o,S)},sharedContext:{buildId:x,deploymentId:v}},Q=new l.NodeNextRequest(e),W=new l.NodeNextResponse(t),X=c.NextRequestAdapter.fromNodeNextRequest(Q,(0,c.signalFromNodeResponse)(t));try{let o,a=async e=>b.handle(X,V).finally(()=>{if(!e)return;e.setAttributes({"http.status_code":t.statusCode,"next.rsc":!1});let n=H.getRootSpanAttributes();if(!n)return;if(n.get("next.span_type")!==d.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${n.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let r=n.get("next.route");if(r){let t=`${U} ${r}`;e.setAttributes({"next.route":r,"http.route":r,"next.span_name":t}),e.updateName(t),o&&o!==e&&(o.setAttribute("http.route",r),o.updateName(t))}else e.updateName(`${U} ${h}`)}),s=async o=>{var i,s;let l=async({previousCacheEntry:n})=>{try{if(!G&&M&&N&&!n)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let i=await a(o);e.fetchMetrics=V.renderOpts.fetchMetrics;let s=V.renderOpts.pendingWaitUntil;s&&r.waitUntil&&(r.waitUntil(s),s=void 0);let l=V.renderOpts.collectedTags;if(!_)return await (0,u.sendResponse)(Q,W,i,V.renderOpts.pendingWaitUntil),null;{let e=await i.blob(),t=(0,f.toNodeOutgoingHttpHeaders)(i.headers);l&&(t[y.NEXT_CACHE_TAGS_HEADER]=l),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let n=void 0!==V.renderOpts.collectedRevalidate&&!(V.renderOpts.collectedRevalidate>=y.INFINITE_CACHE)&&V.renderOpts.collectedRevalidate,r=void 0===V.renderOpts.collectedExpire||V.renderOpts.collectedExpire>=y.INFINITE_CACHE?void 0:V.renderOpts.collectedExpire;return{value:{kind:w.CachedRouteKind.APP_ROUTE,status:i.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:n,expire:r}}}}catch(t){throw(null==n?void 0:n.isStale)&&await b.onRequestError(e,t,{routerKind:"App Router",routePath:h,routeType:"route",revalidateReason:(0,p.getRevalidateReason)({isStaticGeneration:L,isOnDemandRevalidate:M})},!1,S),t}},c=await b.handleResponse({req:e,nextConfig:O,cacheKey:D,routeKind:n.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:A,isRoutePPREnabled:!1,isOnDemandRevalidate:M,revalidateOnlyGenerated:N,responseGenerator:l,waitUntil:r.waitUntil,isMinimalMode:G});if(!_)return null;if((null==c||null==(i=c.value)?void 0:i.kind)!==w.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==c||null==(s=c.value)?void 0:s.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});G||t.setHeader("x-nextjs-cache",M?"REVALIDATED":c.isMiss?"MISS":c.isStale?"STALE":"HIT"),k&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let d=(0,f.fromNodeOutgoingHttpHeaders)(c.value.headers);return G&&_||d.delete(y.NEXT_CACHE_TAGS_HEADER),!c.cacheControl||t.getHeader("Cache-Control")||d.get("Cache-Control")||d.set("Cache-Control",(0,g.getCacheControlHeader)(c.cacheControl)),await (0,u.sendResponse)(Q,W,new Response(c.value.body,{headers:d,status:c.value.status||200})),null};B&&K?await s(K):(o=H.getActiveScopeSpan(),await H.withPropagatedContext(e.headers,()=>H.trace(d.BaseServerSpan.handleRequest,{spanName:`${U} ${h}`,kind:i.SpanKind.SERVER,attributes:{"http.method":U,"http.target":e.url}},s),void 0,!B))}catch(t){if(t instanceof m.NoFallbackError||await b.onRequestError(e,t,{routerKind:"App Router",routePath:q,routeType:"route",revalidateReason:(0,p.getRevalidateReason)({isStaticGeneration:L,isOnDemandRevalidate:M})},!1,S),_)throw t;return await (0,u.sendResponse)(Q,W,new Response(null,{status:500})),null}}e.s(["handler",0,A,"patchFetch",0,function(){return(0,r.patchFetch)({workAsyncStorage:O,workUnitAsyncStorage:E})},"routeModule",0,b,"serverHooks",0,k,"workAsyncStorage",0,O,"workUnitAsyncStorage",0,E],26381)},82647,e=>{e.v(t=>Promise.all(["server/chunks/[externals]_mongodb-memory-server_1ofgmwu._.js"].map(t=>e.l(t))).then(()=>t(87818)))}];
|
|
2
|
-
|
|
3
|
-
//# sourceMappingURL=%5Broot-of-the-server%5D__0geqpjb._.js.map
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
module.exports=[93695,(e,t,n)=>{t.exports=e.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},50227,(e,t,n)=>{t.exports=e.x("node:path",()=>require("node:path"))},2157,(e,t,n)=>{t.exports=e.x("node:fs",()=>require("node:fs"))},81543,(e,t,n)=>{t.exports=e.x("node:vm",()=>require("node:vm"))},73352,(e,t,n)=>{t.exports=e.x("esbuild-fd20e3d002e1b402",()=>require("esbuild-fd20e3d002e1b402"))},18622,(e,t,n)=>{t.exports=e.x("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js",()=>require("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js"))},56704,(e,t,n)=>{t.exports=e.x("next/dist/server/app-render/work-async-storage.external.js",()=>require("next/dist/server/app-render/work-async-storage.external.js"))},32319,(e,t,n)=>{t.exports=e.x("next/dist/server/app-render/work-unit-async-storage.external.js",()=>require("next/dist/server/app-render/work-unit-async-storage.external.js"))},70406,(e,t,n)=>{t.exports=e.x("next/dist/compiled/@opentelemetry/api",()=>require("next/dist/compiled/@opentelemetry/api"))},66486,(e,t,n)=>{t.exports=e.x("mongodb-438b504308ffa4be",()=>require("mongodb-438b504308ffa4be"))},53952,e=>{"use strict";var t=e.i(66486);let n=null;async function o(){let{MongoMemoryServer:t}=await e.A(82647);return console.log("[mock-server] MONGODB_CONNECTION_STRING not set; starting embedded in-memory MongoDB (data is ephemeral)…"),(await t.create()).getUri()}async function r(){let e=process.env.MONGODB_CONNECTION_STRING;return e||(n||(n=o().catch(e=>{throw n=null,e})),n)}class i extends Error{namespace;key;existingProfileId;newProfileId;constructor(e,t,n,o){super(`profile key mapping conflict for ${e}/${t}: ${n} already exists, got ${o}`),this.namespace=e,this.key=t,this.existingProfileId=n,this.newProfileId=o}}let a=null;async function s(){if(!a){let e=await r();a=new t.MongoClient(e),await a.connect(),await l(a.db(c()))}return a.db(c())}function c(){return process.env.MONGODB_DB??"mockDB"}async function l(e){await e.collection("mockProfiles").createIndex({profileId:1},{unique:!0}),await e.collection("profileKeyMappings").createIndex({namespace:1,key:1},{unique:!0}),await e.collection("profileKeyMappings").createIndex({profileId:1}),await e.collection("globalMockScenarios").createIndex({system:1,endpoint:1},{unique:!0}),await e.collection("scenarioProgress").createIndex({profileId:1,endpointName:1},{unique:!0}),await e.collection("dynamicHistory").createIndex({ownerType:1,ownerKey:1,endpointName:1},{unique:!0}),await e.collection("requestLogs").createIndex({ts:1},{expireAfterSeconds:86400}),await e.collection("requestLogs").createIndex({logId:1},{unique:!0}),await e.collection("requestLogs").createIndex({profileId:1,ts:-1}),await e.collection("requestLogs").createIndex({endpoint:1,ts:-1})}async function d(e,t){return e.collection("mockProfiles").findOne({profileId:t},{projection:{_id:0}})}async function p(e,t){let n=new Date,o={endpointScenarios:t.endpointScenarios,modifiedAt:n};void 0!==t.displayName&&(o.displayName=t.displayName),await e.collection("mockProfiles").updateOne({profileId:t.profileId},{$set:o,$setOnInsert:{profileId:t.profileId,createdAt:n}},{upsert:!0})}async function u(e,t){await e.collection("mockProfiles").deleteOne({profileId:t}),await e.collection("profileKeyMappings").deleteMany({profileId:t}),await e.collection("scenarioProgress").deleteMany({profileId:t}),await e.collection("requestLogs").deleteMany({profileId:t}),await e.collection("dynamicHistory").deleteMany({ownerType:"profile",ownerKey:t})}async function f(e,n,o,r){try{return await y(e,n,o,r)}catch(i){if(!(i instanceof t.MongoServerError)||11e3!==i.code)throw i;return y(e,n,o,r)}}async function y(e,t,n,o){let r=new Date,i=await e.collection("scenarioProgress").findOneAndUpdate({profileId:t,endpointName:n},[{$set:{served:{$cond:[{$eq:["$steps",{$literal:o}]},{$add:[{$ifNull:["$served",0]},1]},1]},steps:{$literal:o},createdAt:{$ifNull:["$createdAt",r]},modifiedAt:r}}],{upsert:!0,returnDocument:"after"});if(!i)throw Error("scenario progress upsert returned no document");return i.served}async function m(e,t,n){await e.collection("scenarioProgress").deleteMany(void 0===n?{profileId:t}:{profileId:t,endpointName:n})}async function g(e,t,n){return e.collection("profileKeyMappings").findOne({namespace:t,key:n},{projection:{_id:0}})}async function w(e,n){let o=e.collection("profileKeyMappings"),r=new Date,a=await o.findOne({namespace:n.namespace,key:n.key},{projection:{_id:0}});if(a){if(a.profileId!==n.profileId)throw new i(n.namespace,n.key,a.profileId,n.profileId);await o.updateOne({namespace:n.namespace,key:n.key,profileId:n.profileId},{$set:{capturedBy:n.capturedBy,modifiedAt:r}});return}try{await o.insertOne({namespace:n.namespace,key:n.key,profileId:n.profileId,capturedBy:n.capturedBy,createdAt:r,modifiedAt:r})}catch(a){if(!(a instanceof t.MongoServerError)||11e3!==a.code)throw a;let e=await o.findOne({namespace:n.namespace,key:n.key},{projection:{_id:0}});if(!e)throw a;if(e.profileId!==n.profileId)throw new i(n.namespace,n.key,e.profileId,n.profileId);await o.updateOne({namespace:n.namespace,key:n.key,profileId:n.profileId},{$set:{capturedBy:n.capturedBy,modifiedAt:r}})}}async function I(e,t,n){return e.collection("globalMockScenarios").findOne({system:t,endpoint:n},{projection:{_id:0}})}async function x(e){return e.collection("globalMockScenarios").find({},{projection:{_id:0}}).sort({modifiedAt:-1}).toArray()}async function k(e,t){let n=new Date;await e.collection("globalMockScenarios").updateOne({system:t.system,endpoint:t.endpoint},{$set:{scenario:t.scenario,modifiedAt:n},$setOnInsert:{system:t.system,endpoint:t.endpoint,createdAt:n}},{upsert:!0})}async function $(e,t,n){await e.collection("globalMockScenarios").deleteOne({system:t,endpoint:n}),await e.collection("dynamicHistory").deleteMany({ownerType:"global",ownerKey:t,endpointName:n})}e.s(["ProfileKeyMappingConflictError",0,i,"advanceScenarioProgress",0,f,"captureProfileKeyMapping",0,w,"clearGlobalMockScenario",0,$,"deleteProfile",0,u,"getDb",0,s,"getGlobalMockScenario",0,I,"getProfile",0,d,"getProfileKeyMapping",0,g,"listGlobalMockScenarios",0,x,"resetScenarioProgress",0,m,"upsertGlobalMockScenario",0,k,"upsertProfile",0,p],53952)},60932,e=>{"use strict";let t={_id:0,request:0,"response.headers":0,"response.body":0,"response.truncated":0};async function n(e,t){let n={};t.profileId&&(n.profileId=t.profileId),t.endpoint&&(n.endpoint=t.endpoint),t.errorsOnly&&(n.outcome="error"),t.logIdQuery&&(n.logId={$regex:`^${t.logIdQuery.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}`,$options:"i"});let o=t.beforeId??t.sinceId;if(o){let r=await e.findOne({logId:o},{projection:{_id:0,ts:1,logId:1}});if(r){let e=t.beforeId?"$lt":"$gt";n.$or=[{ts:{[e]:r.ts}},{ts:r.ts,logId:{[e]:r.logId}}]}else t.beforeId&&(n.$and=[{logId:{$in:[]}}])}return n}async function o(e,t){await e.collection("requestLogs").insertOne({...t})}async function r(e,o){let r=e.collection("requestLogs"),i=await n(r,o);return r.find(i,{projection:t}).sort({ts:-1,logId:-1}).limit(o.limit??100).toArray()}async function i(e,t){return e.collection("requestLogs").findOne({logId:t},{projection:{_id:0}})}e.s(["getLogEntry",0,i,"insertLogEntry",0,o,"listLogSummaries",0,r,"newLogId",0,function(){return`lg_${crypto.randomUUID().replaceAll("-","").slice(0,12)}`}])},99610,e=>{"use strict";e.i(98003);let t="default",n="real",o="dynamic";function r(e,t){return t===n||t in e.scenarios}e.s(["DEFAULT_SCENARIO",0,t,"DYNAMIC_SCENARIO",0,o,"REAL_SCENARIO",0,n,"implicitScenario",0,function(e){return e?n:t},"isScenarioDeclared",0,r,"isScenarioSelectable",0,function(e,t){return r(e,t)||t===o&&!!e.hasResolver}])},13506,e=>{"use strict";let t="dynamicHistory";async function n(e,n,o,r){let i=await e.collection(t).findOne({ownerType:n,ownerKey:o,endpointName:r},{projection:{_id:0,history:1}});return i?.history??[]}async function o(e,n,o,r,i,a){let s=new Date;await e.collection(t).updateOne({ownerType:n,ownerKey:o,endpointName:r},{$push:{history:{$each:[i],$slice:-Math.max(1,a)}},$set:{modifiedAt:s},$setOnInsert:{ownerType:n,ownerKey:o,endpointName:r,createdAt:s}},{upsert:!0})}async function r(e,n,o,r){await e.collection(t).deleteMany(void 0===r?{ownerType:n,ownerKey:o}:{ownerType:n,ownerKey:o,endpointName:r})}e.s(["appendDynamicHistory",0,o,"getDynamicHistory",0,n,"resetDynamicHistory",0,r])},82647,e=>{e.v(t=>Promise.all(["server/chunks/[externals]_mongodb-memory-server_1ofgmwu._.js"].map(t=>e.l(t))).then(()=>t(87818)))}];
|
|
2
|
-
|
|
3
|
-
//# sourceMappingURL=%5Broot-of-the-server%5D__0uudiqz._.js.map
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
module.exports=[93695,(e,t,r)=>{t.exports=e.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},18622,(e,t,r)=>{t.exports=e.x("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js",()=>require("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js"))},56704,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-async-storage.external.js",()=>require("next/dist/server/app-render/work-async-storage.external.js"))},32319,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-unit-async-storage.external.js",()=>require("next/dist/server/app-render/work-unit-async-storage.external.js"))},70406,(e,t,r)=>{t.exports=e.x("next/dist/compiled/@opentelemetry/api",()=>require("next/dist/compiled/@opentelemetry/api"))},66486,(e,t,r)=>{t.exports=e.x("mongodb-438b504308ffa4be",()=>require("mongodb-438b504308ffa4be"))},53952,e=>{"use strict";var t=e.i(66486);let r=null;async function n(){let{MongoMemoryServer:t}=await e.A(82647);return console.log("[mock-server] MONGODB_CONNECTION_STRING not set; starting embedded in-memory MongoDB (data is ephemeral)…"),(await t.create()).getUri()}async function a(){let e=process.env.MONGODB_CONNECTION_STRING;return e||(r||(r=n().catch(e=>{throw r=null,e})),r)}class o extends Error{namespace;key;existingProfileId;newProfileId;constructor(e,t,r,n){super(`profile key mapping conflict for ${e}/${t}: ${r} already exists, got ${n}`),this.namespace=e,this.key=t,this.existingProfileId=r,this.newProfileId=n}}let i=null;async function s(){if(!i){let e=await a();i=new t.MongoClient(e),await i.connect(),await c(i.db(l()))}return i.db(l())}function l(){return process.env.MONGODB_DB??"mockDB"}async function c(e){await e.collection("mockProfiles").createIndex({profileId:1},{unique:!0}),await e.collection("profileKeyMappings").createIndex({namespace:1,key:1},{unique:!0}),await e.collection("profileKeyMappings").createIndex({profileId:1}),await e.collection("globalMockScenarios").createIndex({system:1,endpoint:1},{unique:!0}),await e.collection("scenarioProgress").createIndex({profileId:1,endpointName:1},{unique:!0}),await e.collection("dynamicHistory").createIndex({ownerType:1,ownerKey:1,endpointName:1},{unique:!0}),await e.collection("requestLogs").createIndex({ts:1},{expireAfterSeconds:86400}),await e.collection("requestLogs").createIndex({logId:1},{unique:!0}),await e.collection("requestLogs").createIndex({profileId:1,ts:-1}),await e.collection("requestLogs").createIndex({endpoint:1,ts:-1})}async function d(e,t){return e.collection("mockProfiles").findOne({profileId:t},{projection:{_id:0}})}async function p(e,t){let r=new Date,n={endpointScenarios:t.endpointScenarios,modifiedAt:r};void 0!==t.displayName&&(n.displayName=t.displayName),await e.collection("mockProfiles").updateOne({profileId:t.profileId},{$set:n,$setOnInsert:{profileId:t.profileId,createdAt:r}},{upsert:!0})}async function u(e,t){await e.collection("mockProfiles").deleteOne({profileId:t}),await e.collection("profileKeyMappings").deleteMany({profileId:t}),await e.collection("scenarioProgress").deleteMany({profileId:t}),await e.collection("requestLogs").deleteMany({profileId:t}),await e.collection("dynamicHistory").deleteMany({ownerType:"profile",ownerKey:t})}async function f(e,r,n,a){try{return await y(e,r,n,a)}catch(o){if(!(o instanceof t.MongoServerError)||11e3!==o.code)throw o;return y(e,r,n,a)}}async function y(e,t,r,n){let a=new Date,o=await e.collection("scenarioProgress").findOneAndUpdate({profileId:t,endpointName:r},[{$set:{served:{$cond:[{$eq:["$steps",{$literal:n}]},{$add:[{$ifNull:["$served",0]},1]},1]},steps:{$literal:n},createdAt:{$ifNull:["$createdAt",a]},modifiedAt:a}}],{upsert:!0,returnDocument:"after"});if(!o)throw Error("scenario progress upsert returned no document");return o.served}async function m(e,t,r){await e.collection("scenarioProgress").deleteMany(void 0===r?{profileId:t}:{profileId:t,endpointName:r})}async function w(e,t,r){return e.collection("profileKeyMappings").findOne({namespace:t,key:r},{projection:{_id:0}})}async function h(e,r){let n=e.collection("profileKeyMappings"),a=new Date,i=await n.findOne({namespace:r.namespace,key:r.key},{projection:{_id:0}});if(i){if(i.profileId!==r.profileId)throw new o(r.namespace,r.key,i.profileId,r.profileId);await n.updateOne({namespace:r.namespace,key:r.key,profileId:r.profileId},{$set:{capturedBy:r.capturedBy,modifiedAt:a}});return}try{await n.insertOne({namespace:r.namespace,key:r.key,profileId:r.profileId,capturedBy:r.capturedBy,createdAt:a,modifiedAt:a})}catch(i){if(!(i instanceof t.MongoServerError)||11e3!==i.code)throw i;let e=await n.findOne({namespace:r.namespace,key:r.key},{projection:{_id:0}});if(!e)throw i;if(e.profileId!==r.profileId)throw new o(r.namespace,r.key,e.profileId,r.profileId);await n.updateOne({namespace:r.namespace,key:r.key,profileId:r.profileId},{$set:{capturedBy:r.capturedBy,modifiedAt:a}})}}async function g(e,t,r){return e.collection("globalMockScenarios").findOne({system:t,endpoint:r},{projection:{_id:0}})}async function x(e){return e.collection("globalMockScenarios").find({},{projection:{_id:0}}).sort({modifiedAt:-1}).toArray()}async function v(e,t){let r=new Date;await e.collection("globalMockScenarios").updateOne({system:t.system,endpoint:t.endpoint},{$set:{scenario:t.scenario,modifiedAt:r},$setOnInsert:{system:t.system,endpoint:t.endpoint,createdAt:r}},{upsert:!0})}async function R(e,t,r){await e.collection("globalMockScenarios").deleteOne({system:t,endpoint:r}),await e.collection("dynamicHistory").deleteMany({ownerType:"global",ownerKey:t,endpointName:r})}e.s(["ProfileKeyMappingConflictError",0,o,"advanceScenarioProgress",0,f,"captureProfileKeyMapping",0,h,"clearGlobalMockScenario",0,R,"deleteProfile",0,u,"getDb",0,s,"getGlobalMockScenario",0,g,"getProfile",0,d,"getProfileKeyMapping",0,w,"listGlobalMockScenarios",0,x,"resetScenarioProgress",0,m,"upsertGlobalMockScenario",0,v,"upsertProfile",0,p],53952)},19169,e=>{"use strict";var t=e.i(47909),r=e.i(74017),n=e.i(96250),a=e.i(59756),o=e.i(61916),i=e.i(74677),s=e.i(69741),l=e.i(16795),c=e.i(87718),d=e.i(95169),p=e.i(47587),u=e.i(66012),f=e.i(70101),y=e.i(26937),m=e.i(10372),w=e.i(93695);e.i(52474);var h=e.i(220),g=e.i(53952);async function x(){try{var e;return await (e=v(),new Promise((t,r)=>{let n=setTimeout(()=>r(Error(`health check timed out after ${3e3}ms`)),3e3);e.then(e=>{clearTimeout(n),t(e)},e=>{clearTimeout(n),r(e)})})),Response.json({status:"ok",mongo:"up"})}catch(e){return Response.json({status:"error",mongo:"down",error:e instanceof Error?e.message:String(e)},{status:503})}}async function v(){let e=await (0,g.getDb)();await e.command({ping:1})}e.s(["GET",0,x,"dynamic",0,"force-dynamic"],88699);var R=e.i(88699);let I=new t.AppRouteRouteModule({definition:{kind:r.RouteKind.APP_ROUTE,page:"/ui/api/health/route",pathname:"/ui/api/health",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/src/app/ui/api/health/route.ts",nextConfigOutput:"standalone",userland:R,...{}}),{workAsyncStorage:k,workUnitAsyncStorage:b,serverHooks:E}=I;async function A(e,t,n){n.requestMeta&&(0,a.setRequestMeta)(e,n.requestMeta),I.isDev&&(0,a.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let g="/ui/api/health/route";g=g.replace(/\/index$/,"")||"/";let x=await I.prepare(e,t,{srcPage:g,multiZoneDraftMode:!1});if(!x)return t.statusCode=400,t.end("Bad Request"),null==n.waitUntil||n.waitUntil.call(n,Promise.resolve()),null;let{buildId:v,deploymentId:R,params:k,nextConfig:b,parsedUrl:E,isDraftMode:A,prerenderManifest:O,routerServerContext:P,isOnDemandRevalidate:M,revalidateOnlyGenerated:N,resolvedPathname:C,clientReferenceManifest:S,serverActionsManifest:q}=x,T=(0,s.normalizeAppPath)(g),_=!!(O.dynamicRoutes[T]||O.routes[C]),$=async()=>((null==P?void 0:P.render404)?await P.render404(e,t,E,!1):t.end("This page could not be found"),null);if(_&&!A){let e=!!O.routes[C],t=O.dynamicRoutes[T];if(t&&!1===t.fallback&&!e){if(b.adapterPath)return await $();throw new w.NoFallbackError}}let D=null;!_||I.isDev||A||(D="/index"===(D=C)?"/":D);let j=!0===I.isDev||!_,H=_&&!j;q&&S&&(0,i.setManifestsSingleton)({page:g,clientReferenceManifest:S,serverActionsManifest:q});let K=e.method||"GET",B=(0,o.getTracer)(),U=B.getActiveScopeSpan(),G=!!(null==P?void 0:P.isWrappedByNextServer),L=!!(0,a.getRequestMeta)(e,"minimalMode"),F=(0,a.getRequestMeta)(e,"incrementalCache")||await I.getIncrementalCache(e,b,O,L);null==F||F.resetRequestCache(),globalThis.__incrementalCache=F;let V={params:k,previewProps:O.preview,renderOpts:{experimental:{authInterrupts:!!b.experimental.authInterrupts},cacheComponents:!!b.cacheComponents,supportsDynamicResponse:j,incrementalCache:F,cacheLifeProfiles:b.cacheLife,waitUntil:n.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,r,n,a)=>I.onRequestError(e,t,n,a,P)},sharedContext:{buildId:v,deploymentId:R}},W=new l.NodeNextRequest(e),X=new l.NodeNextResponse(t),z=c.NextRequestAdapter.fromNodeNextRequest(W,(0,c.signalFromNodeResponse)(t));try{let a,i=async e=>I.handle(z,V).finally(()=>{if(!e)return;e.setAttributes({"http.status_code":t.statusCode,"next.rsc":!1});let r=B.getRootSpanAttributes();if(!r)return;if(r.get("next.span_type")!==d.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${r.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let n=r.get("next.route");if(n){let t=`${K} ${n}`;e.setAttributes({"next.route":n,"http.route":n,"next.span_name":t}),e.updateName(t),a&&a!==e&&(a.setAttribute("http.route",n),a.updateName(t))}else e.updateName(`${K} ${g}`)}),s=async a=>{var o,s;let l=async({previousCacheEntry:r})=>{try{if(!L&&M&&N&&!r)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let o=await i(a);e.fetchMetrics=V.renderOpts.fetchMetrics;let s=V.renderOpts.pendingWaitUntil;s&&n.waitUntil&&(n.waitUntil(s),s=void 0);let l=V.renderOpts.collectedTags;if(!_)return await (0,u.sendResponse)(W,X,o,V.renderOpts.pendingWaitUntil),null;{let e=await o.blob(),t=(0,f.toNodeOutgoingHttpHeaders)(o.headers);l&&(t[m.NEXT_CACHE_TAGS_HEADER]=l),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let r=void 0!==V.renderOpts.collectedRevalidate&&!(V.renderOpts.collectedRevalidate>=m.INFINITE_CACHE)&&V.renderOpts.collectedRevalidate,n=void 0===V.renderOpts.collectedExpire||V.renderOpts.collectedExpire>=m.INFINITE_CACHE?void 0:V.renderOpts.collectedExpire;return{value:{kind:h.CachedRouteKind.APP_ROUTE,status:o.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:r,expire:n}}}}catch(t){throw(null==r?void 0:r.isStale)&&await I.onRequestError(e,t,{routerKind:"App Router",routePath:g,routeType:"route",revalidateReason:(0,p.getRevalidateReason)({isStaticGeneration:H,isOnDemandRevalidate:M})},!1,P),t}},c=await I.handleResponse({req:e,nextConfig:b,cacheKey:D,routeKind:r.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:O,isRoutePPREnabled:!1,isOnDemandRevalidate:M,revalidateOnlyGenerated:N,responseGenerator:l,waitUntil:n.waitUntil,isMinimalMode:L});if(!_)return null;if((null==c||null==(o=c.value)?void 0:o.kind)!==h.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==c||null==(s=c.value)?void 0:s.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});L||t.setHeader("x-nextjs-cache",M?"REVALIDATED":c.isMiss?"MISS":c.isStale?"STALE":"HIT"),A&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let d=(0,f.fromNodeOutgoingHttpHeaders)(c.value.headers);return L&&_||d.delete(m.NEXT_CACHE_TAGS_HEADER),!c.cacheControl||t.getHeader("Cache-Control")||d.get("Cache-Control")||d.set("Cache-Control",(0,y.getCacheControlHeader)(c.cacheControl)),await (0,u.sendResponse)(W,X,new Response(c.value.body,{headers:d,status:c.value.status||200})),null};G&&U?await s(U):(a=B.getActiveScopeSpan(),await B.withPropagatedContext(e.headers,()=>B.trace(d.BaseServerSpan.handleRequest,{spanName:`${K} ${g}`,kind:o.SpanKind.SERVER,attributes:{"http.method":K,"http.target":e.url}},s),void 0,!G))}catch(t){if(t instanceof w.NoFallbackError||await I.onRequestError(e,t,{routerKind:"App Router",routePath:T,routeType:"route",revalidateReason:(0,p.getRevalidateReason)({isStaticGeneration:H,isOnDemandRevalidate:M})},!1,P),_)throw t;return await (0,u.sendResponse)(W,X,new Response(null,{status:500})),null}}e.s(["handler",0,A,"patchFetch",0,function(){return(0,n.patchFetch)({workAsyncStorage:k,workUnitAsyncStorage:b})},"routeModule",0,I,"serverHooks",0,E,"workAsyncStorage",0,k,"workUnitAsyncStorage",0,b],19169)},82647,e=>{e.v(t=>Promise.all(["server/chunks/[externals]_mongodb-memory-server_1ofgmwu._.js"].map(t=>e.l(t))).then(()=>t(87818)))}];
|
|
2
|
-
|
|
3
|
-
//# sourceMappingURL=%5Broot-of-the-server%5D__0wg041t._.js.map
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
module.exports=[93695,(e,t,n)=>{t.exports=e.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},50227,(e,t,n)=>{t.exports=e.x("node:path",()=>require("node:path"))},2157,(e,t,n)=>{t.exports=e.x("node:fs",()=>require("node:fs"))},81543,(e,t,n)=>{t.exports=e.x("node:vm",()=>require("node:vm"))},73352,(e,t,n)=>{t.exports=e.x("esbuild-fd20e3d002e1b402",()=>require("esbuild-fd20e3d002e1b402"))},18622,(e,t,n)=>{t.exports=e.x("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js",()=>require("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js"))},56704,(e,t,n)=>{t.exports=e.x("next/dist/server/app-render/work-async-storage.external.js",()=>require("next/dist/server/app-render/work-async-storage.external.js"))},32319,(e,t,n)=>{t.exports=e.x("next/dist/server/app-render/work-unit-async-storage.external.js",()=>require("next/dist/server/app-render/work-unit-async-storage.external.js"))},70406,(e,t,n)=>{t.exports=e.x("next/dist/compiled/@opentelemetry/api",()=>require("next/dist/compiled/@opentelemetry/api"))},66486,(e,t,n)=>{t.exports=e.x("mongodb-438b504308ffa4be",()=>require("mongodb-438b504308ffa4be"))},53952,e=>{"use strict";var t=e.i(66486);let n=null;async function r(){let{MongoMemoryServer:t}=await e.A(82647);return console.log("[mock-server] MONGODB_CONNECTION_STRING not set; starting embedded in-memory MongoDB (data is ephemeral)…"),(await t.create()).getUri()}async function o(){let e=process.env.MONGODB_CONNECTION_STRING;return e||(n||(n=r().catch(e=>{throw n=null,e})),n)}class i extends Error{namespace;key;existingProfileId;newProfileId;constructor(e,t,n,r){super(`profile key mapping conflict for ${e}/${t}: ${n} already exists, got ${r}`),this.namespace=e,this.key=t,this.existingProfileId=n,this.newProfileId=r}}let a=null;async function s(){if(!a){let e=await o();a=new t.MongoClient(e),await a.connect(),await c(a.db(l()))}return a.db(l())}function l(){return process.env.MONGODB_DB??"mockDB"}async function c(e){await e.collection("mockProfiles").createIndex({profileId:1},{unique:!0}),await e.collection("profileKeyMappings").createIndex({namespace:1,key:1},{unique:!0}),await e.collection("profileKeyMappings").createIndex({profileId:1}),await e.collection("globalMockScenarios").createIndex({system:1,endpoint:1},{unique:!0}),await e.collection("scenarioProgress").createIndex({profileId:1,endpointName:1},{unique:!0}),await e.collection("dynamicHistory").createIndex({ownerType:1,ownerKey:1,endpointName:1},{unique:!0}),await e.collection("requestLogs").createIndex({ts:1},{expireAfterSeconds:86400}),await e.collection("requestLogs").createIndex({logId:1},{unique:!0}),await e.collection("requestLogs").createIndex({profileId:1,ts:-1}),await e.collection("requestLogs").createIndex({endpoint:1,ts:-1})}async function d(e,t){return e.collection("mockProfiles").findOne({profileId:t},{projection:{_id:0}})}async function p(e,t){let n=new Date,r={endpointScenarios:t.endpointScenarios,modifiedAt:n};void 0!==t.displayName&&(r.displayName=t.displayName),await e.collection("mockProfiles").updateOne({profileId:t.profileId},{$set:r,$setOnInsert:{profileId:t.profileId,createdAt:n}},{upsert:!0})}async function u(e,t){await e.collection("mockProfiles").deleteOne({profileId:t}),await e.collection("profileKeyMappings").deleteMany({profileId:t}),await e.collection("scenarioProgress").deleteMany({profileId:t}),await e.collection("requestLogs").deleteMany({profileId:t}),await e.collection("dynamicHistory").deleteMany({ownerType:"profile",ownerKey:t})}async function f(e,n,r,o){try{return await y(e,n,r,o)}catch(i){if(!(i instanceof t.MongoServerError)||11e3!==i.code)throw i;return y(e,n,r,o)}}async function y(e,t,n,r){let o=new Date,i=await e.collection("scenarioProgress").findOneAndUpdate({profileId:t,endpointName:n},[{$set:{served:{$cond:[{$eq:["$steps",{$literal:r}]},{$add:[{$ifNull:["$served",0]},1]},1]},steps:{$literal:r},createdAt:{$ifNull:["$createdAt",o]},modifiedAt:o}}],{upsert:!0,returnDocument:"after"});if(!i)throw Error("scenario progress upsert returned no document");return i.served}async function g(e,t,n){await e.collection("scenarioProgress").deleteMany(void 0===n?{profileId:t}:{profileId:t,endpointName:n})}async function w(e,t,n){return e.collection("profileKeyMappings").findOne({namespace:t,key:n},{projection:{_id:0}})}async function m(e,n){let r=e.collection("profileKeyMappings"),o=new Date,a=await r.findOne({namespace:n.namespace,key:n.key},{projection:{_id:0}});if(a){if(a.profileId!==n.profileId)throw new i(n.namespace,n.key,a.profileId,n.profileId);await r.updateOne({namespace:n.namespace,key:n.key,profileId:n.profileId},{$set:{capturedBy:n.capturedBy,modifiedAt:o}});return}try{await r.insertOne({namespace:n.namespace,key:n.key,profileId:n.profileId,capturedBy:n.capturedBy,createdAt:o,modifiedAt:o})}catch(a){if(!(a instanceof t.MongoServerError)||11e3!==a.code)throw a;let e=await r.findOne({namespace:n.namespace,key:n.key},{projection:{_id:0}});if(!e)throw a;if(e.profileId!==n.profileId)throw new i(n.namespace,n.key,e.profileId,n.profileId);await r.updateOne({namespace:n.namespace,key:n.key,profileId:n.profileId},{$set:{capturedBy:n.capturedBy,modifiedAt:o}})}}async function h(e,t,n){return e.collection("globalMockScenarios").findOne({system:t,endpoint:n},{projection:{_id:0}})}async function x(e){return e.collection("globalMockScenarios").find({},{projection:{_id:0}}).sort({modifiedAt:-1}).toArray()}async function I(e,t){let n=new Date;await e.collection("globalMockScenarios").updateOne({system:t.system,endpoint:t.endpoint},{$set:{scenario:t.scenario,modifiedAt:n},$setOnInsert:{system:t.system,endpoint:t.endpoint,createdAt:n}},{upsert:!0})}async function v(e,t,n){await e.collection("globalMockScenarios").deleteOne({system:t,endpoint:n}),await e.collection("dynamicHistory").deleteMany({ownerType:"global",ownerKey:t,endpointName:n})}e.s(["ProfileKeyMappingConflictError",0,i,"advanceScenarioProgress",0,f,"captureProfileKeyMapping",0,m,"clearGlobalMockScenario",0,v,"deleteProfile",0,u,"getDb",0,s,"getGlobalMockScenario",0,h,"getProfile",0,d,"getProfileKeyMapping",0,w,"listGlobalMockScenarios",0,x,"resetScenarioProgress",0,g,"upsertGlobalMockScenario",0,I,"upsertProfile",0,p],53952)},60932,e=>{"use strict";let t={_id:0,request:0,"response.headers":0,"response.body":0,"response.truncated":0};async function n(e,t){let n={};t.profileId&&(n.profileId=t.profileId),t.endpoint&&(n.endpoint=t.endpoint),t.errorsOnly&&(n.outcome="error"),t.logIdQuery&&(n.logId={$regex:`^${t.logIdQuery.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}`,$options:"i"});let r=t.beforeId??t.sinceId;if(r){let o=await e.findOne({logId:r},{projection:{_id:0,ts:1,logId:1}});if(o){let e=t.beforeId?"$lt":"$gt";n.$or=[{ts:{[e]:o.ts}},{ts:o.ts,logId:{[e]:o.logId}}]}else t.beforeId&&(n.$and=[{logId:{$in:[]}}])}return n}async function r(e,t){await e.collection("requestLogs").insertOne({...t})}async function o(e,r){let o=e.collection("requestLogs"),i=await n(o,r);return o.find(i,{projection:t}).sort({ts:-1,logId:-1}).limit(r.limit??100).toArray()}async function i(e,t){return e.collection("requestLogs").findOne({logId:t},{projection:{_id:0}})}e.s(["getLogEntry",0,i,"insertLogEntry",0,r,"listLogSummaries",0,o,"newLogId",0,function(){return`lg_${crypto.randomUUID().replaceAll("-","").slice(0,12)}`}])},99610,e=>{"use strict";e.i(98003);let t="default",n="real",r="dynamic";function o(e,t){return t===n||t in e.scenarios}e.s(["DEFAULT_SCENARIO",0,t,"DYNAMIC_SCENARIO",0,r,"REAL_SCENARIO",0,n,"implicitScenario",0,function(e){return e?n:t},"isScenarioDeclared",0,o,"isScenarioSelectable",0,function(e,t){return o(e,t)||t===r&&!!e.hasResolver}])},64983,e=>{"use strict";var t=e.i(60932);async function n(e,n,r,o){try{await (0,t.insertLogEntry)(e,{logId:(0,t.newLogId)(),ts:new Date,kind:"admin",profileId:n,trace:{adminAction:r,...o&&{adminEndpoint:o}}})}catch(e){console.warn("[mock-log] failed to write admin log entry:",e)}}e.s(["writeAdminLog",0,n])},82576,e=>{"use strict";var t=e.i(47909),n=e.i(74017),r=e.i(96250),o=e.i(59756),i=e.i(61916),a=e.i(74677),s=e.i(69741),l=e.i(16795),c=e.i(87718),d=e.i(95169),p=e.i(47587),u=e.i(66012),f=e.i(70101),y=e.i(26937),g=e.i(10372),w=e.i(93695);e.i(52474);var m=e.i(220),h=e.i(64983),x=e.i(99610);class I extends Error{}function v(e,t){if(!(0,x.isScenarioSelectable)(e,t))throw new I(`endpoint "${e.name}": scenario "${t}" is not declared`)}var R=e.i(53952),b=e.i(27972);async function A(e,{params:t}){let{profileId:n}=await t,r=await (0,R.getProfile)(await (0,R.getDb)(),n);return r?Response.json(r):Response.json({error:"not_found"},{status:404})}async function E(e,{params:t}){let n,r,{profileId:o}=await t;try{n=await e.json()}catch{return Response.json({error:"request body is not valid JSON"},{status:400})}let i=n,{catalog:a,passthroughAsDefault:s}=(0,b.getRuntime)(),l=(0,x.implicitScenario)(s);try{r=function(e,t,n){if(null===e||"object"!=typeof e||Array.isArray(e))throw new I("endpointScenarios must be an object");let r=new Map;for(let e of t.systems)for(let t of e.endpoints)r.set(t.name,t);let o={};for(let[t,i]of Object.entries(e)){let e=r.get(t);if(!e)throw new I(`unknown endpoint "${t}"`);let a=function(e,t,n){if(Array.isArray(t)){if(!t.every(e=>"string"==typeof e))throw new I(`endpoint "${e.name}": scenario sequence must be an array of strings`);for(let n of t)v(e,n);return 0===t.length?void 0:t.length>1?t:t[0]===n?void 0:t[0]}if("string"!=typeof t)throw new I(`endpoint "${e.name}": scenario must be a string or array of strings`);if(""!==t&&t!==n)return v(e,t),t}(e,i,n);void 0!==a&&(o[t]=a)}return o}(i?.endpointScenarios??{},a,l)}catch(e){if(e instanceof I)return Response.json({error:e.message},{status:400});throw e}let c="string"==typeof i?.displayName&&""!==i.displayName.trim()?i.displayName.trim():void 0,d=await (0,R.getDb)();return await (0,R.upsertProfile)(d,{profileId:o,displayName:c,endpointScenarios:r}),await (0,h.writeAdminLog)(d,o,"profile_saved"),Response.json(await (0,R.getProfile)(d,o))}async function O(e,{params:t}){let{profileId:n}=await t;return await (0,R.deleteProfile)(await (0,R.getDb)(),n),new Response(null,{status:204})}e.s(["DELETE",0,O,"GET",0,A,"PUT",0,E,"dynamic",0,"force-dynamic"],65553);var k=e.i(65553);let S=new t.AppRouteRouteModule({definition:{kind:n.RouteKind.APP_ROUTE,page:"/ui/api/profiles/[profileId]/route",pathname:"/ui/api/profiles/[profileId]",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/src/app/ui/api/profiles/[profileId]/route.ts",nextConfigOutput:"standalone",userland:k,...{}}),{workAsyncStorage:N,workUnitAsyncStorage:P,serverHooks:C}=S;async function M(e,t,r){r.requestMeta&&(0,o.setRequestMeta)(e,r.requestMeta),S.isDev&&(0,o.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let h="/ui/api/profiles/[profileId]/route";h=h.replace(/\/index$/,"")||"/";let x=await S.prepare(e,t,{srcPage:h,multiZoneDraftMode:!1});if(!x)return t.statusCode=400,t.end("Bad Request"),null==r.waitUntil||r.waitUntil.call(r,Promise.resolve()),null;let{buildId:I,deploymentId:v,params:R,nextConfig:b,parsedUrl:A,isDraftMode:E,prerenderManifest:O,routerServerContext:k,isOnDemandRevalidate:N,revalidateOnlyGenerated:P,resolvedPathname:C,clientReferenceManifest:M,serverActionsManifest:q}=x,$=(0,s.normalizeAppPath)(h),_=!!(O.dynamicRoutes[$]||O.routes[C]),T=async()=>((null==k?void 0:k.render404)?await k.render404(e,t,A,!1):t.end("This page could not be found"),null);if(_&&!E){let e=!!O.routes[C],t=O.dynamicRoutes[$];if(t&&!1===t.fallback&&!e){if(b.adapterPath)return await T();throw new w.NoFallbackError}}let j=null;!_||S.isDev||E||(j="/index"===(j=C)?"/":j);let D=!0===S.isDev||!_,L=_&&!D;q&&M&&(0,a.setManifestsSingleton)({page:h,clientReferenceManifest:M,serverActionsManifest:q});let U=e.method||"GET",H=(0,i.getTracer)(),K=H.getActiveScopeSpan(),B=!!(null==k?void 0:k.isWrappedByNextServer),G=!!(0,o.getRequestMeta)(e,"minimalMode"),F=(0,o.getRequestMeta)(e,"incrementalCache")||await S.getIncrementalCache(e,b,O,G);null==F||F.resetRequestCache(),globalThis.__incrementalCache=F;let V={params:R,previewProps:O.preview,renderOpts:{experimental:{authInterrupts:!!b.experimental.authInterrupts},cacheComponents:!!b.cacheComponents,supportsDynamicResponse:D,incrementalCache:F,cacheLifeProfiles:b.cacheLife,waitUntil:r.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,n,r,o)=>S.onRequestError(e,t,r,o,k)},sharedContext:{buildId:I,deploymentId:v}},W=new l.NodeNextRequest(e),X=new l.NodeNextResponse(t),Q=c.NextRequestAdapter.fromNodeNextRequest(W,(0,c.signalFromNodeResponse)(t));try{let o,a=async e=>S.handle(Q,V).finally(()=>{if(!e)return;e.setAttributes({"http.status_code":t.statusCode,"next.rsc":!1});let n=H.getRootSpanAttributes();if(!n)return;if(n.get("next.span_type")!==d.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${n.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let r=n.get("next.route");if(r){let t=`${U} ${r}`;e.setAttributes({"next.route":r,"http.route":r,"next.span_name":t}),e.updateName(t),o&&o!==e&&(o.setAttribute("http.route",r),o.updateName(t))}else e.updateName(`${U} ${h}`)}),s=async o=>{var i,s;let l=async({previousCacheEntry:n})=>{try{if(!G&&N&&P&&!n)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let i=await a(o);e.fetchMetrics=V.renderOpts.fetchMetrics;let s=V.renderOpts.pendingWaitUntil;s&&r.waitUntil&&(r.waitUntil(s),s=void 0);let l=V.renderOpts.collectedTags;if(!_)return await (0,u.sendResponse)(W,X,i,V.renderOpts.pendingWaitUntil),null;{let e=await i.blob(),t=(0,f.toNodeOutgoingHttpHeaders)(i.headers);l&&(t[g.NEXT_CACHE_TAGS_HEADER]=l),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let n=void 0!==V.renderOpts.collectedRevalidate&&!(V.renderOpts.collectedRevalidate>=g.INFINITE_CACHE)&&V.renderOpts.collectedRevalidate,r=void 0===V.renderOpts.collectedExpire||V.renderOpts.collectedExpire>=g.INFINITE_CACHE?void 0:V.renderOpts.collectedExpire;return{value:{kind:m.CachedRouteKind.APP_ROUTE,status:i.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:n,expire:r}}}}catch(t){throw(null==n?void 0:n.isStale)&&await S.onRequestError(e,t,{routerKind:"App Router",routePath:h,routeType:"route",revalidateReason:(0,p.getRevalidateReason)({isStaticGeneration:L,isOnDemandRevalidate:N})},!1,k),t}},c=await S.handleResponse({req:e,nextConfig:b,cacheKey:j,routeKind:n.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:O,isRoutePPREnabled:!1,isOnDemandRevalidate:N,revalidateOnlyGenerated:P,responseGenerator:l,waitUntil:r.waitUntil,isMinimalMode:G});if(!_)return null;if((null==c||null==(i=c.value)?void 0:i.kind)!==m.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==c||null==(s=c.value)?void 0:s.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});G||t.setHeader("x-nextjs-cache",N?"REVALIDATED":c.isMiss?"MISS":c.isStale?"STALE":"HIT"),E&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let d=(0,f.fromNodeOutgoingHttpHeaders)(c.value.headers);return G&&_||d.delete(g.NEXT_CACHE_TAGS_HEADER),!c.cacheControl||t.getHeader("Cache-Control")||d.get("Cache-Control")||d.set("Cache-Control",(0,y.getCacheControlHeader)(c.cacheControl)),await (0,u.sendResponse)(W,X,new Response(c.value.body,{headers:d,status:c.value.status||200})),null};B&&K?await s(K):(o=H.getActiveScopeSpan(),await H.withPropagatedContext(e.headers,()=>H.trace(d.BaseServerSpan.handleRequest,{spanName:`${U} ${h}`,kind:i.SpanKind.SERVER,attributes:{"http.method":U,"http.target":e.url}},s),void 0,!B))}catch(t){if(t instanceof w.NoFallbackError||await S.onRequestError(e,t,{routerKind:"App Router",routePath:$,routeType:"route",revalidateReason:(0,p.getRevalidateReason)({isStaticGeneration:L,isOnDemandRevalidate:N})},!1,k),_)throw t;return await (0,u.sendResponse)(W,X,new Response(null,{status:500})),null}}e.s(["handler",0,M,"patchFetch",0,function(){return(0,r.patchFetch)({workAsyncStorage:N,workUnitAsyncStorage:P})},"routeModule",0,S,"serverHooks",0,C,"workAsyncStorage",0,N,"workUnitAsyncStorage",0,P],82576)},82647,e=>{e.v(t=>Promise.all(["server/chunks/[externals]_mongodb-memory-server_1ofgmwu._.js"].map(t=>e.l(t))).then(()=>t(87818)))}];
|
|
2
|
-
|
|
3
|
-
//# sourceMappingURL=%5Broot-of-the-server%5D__19qak1g._.js.map
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
module.exports=[93695,(e,t,n)=>{t.exports=e.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},18622,(e,t,n)=>{t.exports=e.x("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js",()=>require("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js"))},56704,(e,t,n)=>{t.exports=e.x("next/dist/server/app-render/work-async-storage.external.js",()=>require("next/dist/server/app-render/work-async-storage.external.js"))},32319,(e,t,n)=>{t.exports=e.x("next/dist/server/app-render/work-unit-async-storage.external.js",()=>require("next/dist/server/app-render/work-unit-async-storage.external.js"))},70406,(e,t,n)=>{t.exports=e.x("next/dist/compiled/@opentelemetry/api",()=>require("next/dist/compiled/@opentelemetry/api"))},66486,(e,t,n)=>{t.exports=e.x("mongodb-438b504308ffa4be",()=>require("mongodb-438b504308ffa4be"))},53952,e=>{"use strict";var t=e.i(66486);let n=null;async function r(){let{MongoMemoryServer:t}=await e.A(82647);return console.log("[mock-server] MONGODB_CONNECTION_STRING not set; starting embedded in-memory MongoDB (data is ephemeral)…"),(await t.create()).getUri()}async function a(){let e=process.env.MONGODB_CONNECTION_STRING;return e||(n||(n=r().catch(e=>{throw n=null,e})),n)}class o extends Error{namespace;key;existingProfileId;newProfileId;constructor(e,t,n,r){super(`profile key mapping conflict for ${e}/${t}: ${n} already exists, got ${r}`),this.namespace=e,this.key=t,this.existingProfileId=n,this.newProfileId=r}}let i=null;async function s(){if(!i){let e=await a();i=new t.MongoClient(e),await i.connect(),await c(i.db(l()))}return i.db(l())}function l(){return process.env.MONGODB_DB??"mockDB"}async function c(e){await e.collection("mockProfiles").createIndex({profileId:1},{unique:!0}),await e.collection("profileKeyMappings").createIndex({namespace:1,key:1},{unique:!0}),await e.collection("profileKeyMappings").createIndex({profileId:1}),await e.collection("globalMockScenarios").createIndex({system:1,endpoint:1},{unique:!0}),await e.collection("scenarioProgress").createIndex({profileId:1,endpointName:1},{unique:!0}),await e.collection("dynamicHistory").createIndex({ownerType:1,ownerKey:1,endpointName:1},{unique:!0}),await e.collection("requestLogs").createIndex({ts:1},{expireAfterSeconds:86400}),await e.collection("requestLogs").createIndex({logId:1},{unique:!0}),await e.collection("requestLogs").createIndex({profileId:1,ts:-1}),await e.collection("requestLogs").createIndex({endpoint:1,ts:-1})}async function d(e,t){return e.collection("mockProfiles").findOne({profileId:t},{projection:{_id:0}})}async function p(e,t){let n=new Date,r={endpointScenarios:t.endpointScenarios,modifiedAt:n};void 0!==t.displayName&&(r.displayName=t.displayName),await e.collection("mockProfiles").updateOne({profileId:t.profileId},{$set:r,$setOnInsert:{profileId:t.profileId,createdAt:n}},{upsert:!0})}async function u(e,t){await e.collection("mockProfiles").deleteOne({profileId:t}),await e.collection("profileKeyMappings").deleteMany({profileId:t}),await e.collection("scenarioProgress").deleteMany({profileId:t}),await e.collection("requestLogs").deleteMany({profileId:t}),await e.collection("dynamicHistory").deleteMany({ownerType:"profile",ownerKey:t})}async function f(e,n,r,a){try{return await y(e,n,r,a)}catch(o){if(!(o instanceof t.MongoServerError)||11e3!==o.code)throw o;return y(e,n,r,a)}}async function y(e,t,n,r){let a=new Date,o=await e.collection("scenarioProgress").findOneAndUpdate({profileId:t,endpointName:n},[{$set:{served:{$cond:[{$eq:["$steps",{$literal:r}]},{$add:[{$ifNull:["$served",0]},1]},1]},steps:{$literal:r},createdAt:{$ifNull:["$createdAt",a]},modifiedAt:a}}],{upsert:!0,returnDocument:"after"});if(!o)throw Error("scenario progress upsert returned no document");return o.served}async function m(e,t,n){await e.collection("scenarioProgress").deleteMany(void 0===n?{profileId:t}:{profileId:t,endpointName:n})}async function w(e,t,n){return e.collection("profileKeyMappings").findOne({namespace:t,key:n},{projection:{_id:0}})}async function g(e,n){let r=e.collection("profileKeyMappings"),a=new Date,i=await r.findOne({namespace:n.namespace,key:n.key},{projection:{_id:0}});if(i){if(i.profileId!==n.profileId)throw new o(n.namespace,n.key,i.profileId,n.profileId);await r.updateOne({namespace:n.namespace,key:n.key,profileId:n.profileId},{$set:{capturedBy:n.capturedBy,modifiedAt:a}});return}try{await r.insertOne({namespace:n.namespace,key:n.key,profileId:n.profileId,capturedBy:n.capturedBy,createdAt:a,modifiedAt:a})}catch(i){if(!(i instanceof t.MongoServerError)||11e3!==i.code)throw i;let e=await r.findOne({namespace:n.namespace,key:n.key},{projection:{_id:0}});if(!e)throw i;if(e.profileId!==n.profileId)throw new o(n.namespace,n.key,e.profileId,n.profileId);await r.updateOne({namespace:n.namespace,key:n.key,profileId:n.profileId},{$set:{capturedBy:n.capturedBy,modifiedAt:a}})}}async function h(e,t,n){return e.collection("globalMockScenarios").findOne({system:t,endpoint:n},{projection:{_id:0}})}async function x(e){return e.collection("globalMockScenarios").find({},{projection:{_id:0}}).sort({modifiedAt:-1}).toArray()}async function v(e,t){let n=new Date;await e.collection("globalMockScenarios").updateOne({system:t.system,endpoint:t.endpoint},{$set:{scenario:t.scenario,modifiedAt:n},$setOnInsert:{system:t.system,endpoint:t.endpoint,createdAt:n}},{upsert:!0})}async function R(e,t,n){await e.collection("globalMockScenarios").deleteOne({system:t,endpoint:n}),await e.collection("dynamicHistory").deleteMany({ownerType:"global",ownerKey:t,endpointName:n})}e.s(["ProfileKeyMappingConflictError",0,o,"advanceScenarioProgress",0,f,"captureProfileKeyMapping",0,g,"clearGlobalMockScenario",0,R,"deleteProfile",0,u,"getDb",0,s,"getGlobalMockScenario",0,h,"getProfile",0,d,"getProfileKeyMapping",0,w,"listGlobalMockScenarios",0,x,"resetScenarioProgress",0,m,"upsertGlobalMockScenario",0,v,"upsertProfile",0,p],53952)},17361,e=>{"use strict";var t=e.i(47909),n=e.i(74017),r=e.i(96250),a=e.i(59756),o=e.i(61916),i=e.i(74677),s=e.i(69741),l=e.i(16795),c=e.i(87718),d=e.i(95169),p=e.i(47587),u=e.i(66012),f=e.i(70101),y=e.i(26937),m=e.i(10372),w=e.i(93695);e.i(52474);var g=e.i(220),h=e.i(53952);async function x(){let e=await (0,h.listGlobalMockScenarios)(await (0,h.getDb)());return Response.json({scenarios:e})}e.s(["GET",0,x,"dynamic",0,"force-dynamic"],95996);var v=e.i(95996);let R=new t.AppRouteRouteModule({definition:{kind:n.RouteKind.APP_ROUTE,page:"/ui/api/global-mocks/route",pathname:"/ui/api/global-mocks",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/src/app/ui/api/global-mocks/route.ts",nextConfigOutput:"standalone",userland:v,...{}}),{workAsyncStorage:I,workUnitAsyncStorage:b,serverHooks:k}=R;async function E(e,t,r){r.requestMeta&&(0,a.setRequestMeta)(e,r.requestMeta),R.isDev&&(0,a.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let h="/ui/api/global-mocks/route";h=h.replace(/\/index$/,"")||"/";let x=await R.prepare(e,t,{srcPage:h,multiZoneDraftMode:!1});if(!x)return t.statusCode=400,t.end("Bad Request"),null==r.waitUntil||r.waitUntil.call(r,Promise.resolve()),null;let{buildId:v,deploymentId:I,params:b,nextConfig:k,parsedUrl:E,isDraftMode:A,prerenderManifest:M,routerServerContext:O,isOnDemandRevalidate:P,revalidateOnlyGenerated:N,resolvedPathname:C,clientReferenceManifest:S,serverActionsManifest:q}=x,_=(0,s.normalizeAppPath)(h),T=!!(M.dynamicRoutes[_]||M.routes[C]),$=async()=>((null==O?void 0:O.render404)?await O.render404(e,t,E,!1):t.end("This page could not be found"),null);if(T&&!A){let e=!!M.routes[C],t=M.dynamicRoutes[_];if(t&&!1===t.fallback&&!e){if(k.adapterPath)return await $();throw new w.NoFallbackError}}let D=null;!T||R.isDev||A||(D="/index"===(D=C)?"/":D);let j=!0===R.isDev||!T,H=T&&!j;q&&S&&(0,i.setManifestsSingleton)({page:h,clientReferenceManifest:S,serverActionsManifest:q});let K=e.method||"GET",B=(0,o.getTracer)(),U=B.getActiveScopeSpan(),G=!!(null==O?void 0:O.isWrappedByNextServer),L=!!(0,a.getRequestMeta)(e,"minimalMode"),F=(0,a.getRequestMeta)(e,"incrementalCache")||await R.getIncrementalCache(e,k,M,L);null==F||F.resetRequestCache(),globalThis.__incrementalCache=F;let V={params:b,previewProps:M.preview,renderOpts:{experimental:{authInterrupts:!!k.experimental.authInterrupts},cacheComponents:!!k.cacheComponents,supportsDynamicResponse:j,incrementalCache:F,cacheLifeProfiles:k.cacheLife,waitUntil:r.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,n,r,a)=>R.onRequestError(e,t,r,a,O)},sharedContext:{buildId:v,deploymentId:I}},W=new l.NodeNextRequest(e),X=new l.NodeNextResponse(t),z=c.NextRequestAdapter.fromNodeNextRequest(W,(0,c.signalFromNodeResponse)(t));try{let a,i=async e=>R.handle(z,V).finally(()=>{if(!e)return;e.setAttributes({"http.status_code":t.statusCode,"next.rsc":!1});let n=B.getRootSpanAttributes();if(!n)return;if(n.get("next.span_type")!==d.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${n.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let r=n.get("next.route");if(r){let t=`${K} ${r}`;e.setAttributes({"next.route":r,"http.route":r,"next.span_name":t}),e.updateName(t),a&&a!==e&&(a.setAttribute("http.route",r),a.updateName(t))}else e.updateName(`${K} ${h}`)}),s=async a=>{var o,s;let l=async({previousCacheEntry:n})=>{try{if(!L&&P&&N&&!n)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let o=await i(a);e.fetchMetrics=V.renderOpts.fetchMetrics;let s=V.renderOpts.pendingWaitUntil;s&&r.waitUntil&&(r.waitUntil(s),s=void 0);let l=V.renderOpts.collectedTags;if(!T)return await (0,u.sendResponse)(W,X,o,V.renderOpts.pendingWaitUntil),null;{let e=await o.blob(),t=(0,f.toNodeOutgoingHttpHeaders)(o.headers);l&&(t[m.NEXT_CACHE_TAGS_HEADER]=l),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let n=void 0!==V.renderOpts.collectedRevalidate&&!(V.renderOpts.collectedRevalidate>=m.INFINITE_CACHE)&&V.renderOpts.collectedRevalidate,r=void 0===V.renderOpts.collectedExpire||V.renderOpts.collectedExpire>=m.INFINITE_CACHE?void 0:V.renderOpts.collectedExpire;return{value:{kind:g.CachedRouteKind.APP_ROUTE,status:o.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:n,expire:r}}}}catch(t){throw(null==n?void 0:n.isStale)&&await R.onRequestError(e,t,{routerKind:"App Router",routePath:h,routeType:"route",revalidateReason:(0,p.getRevalidateReason)({isStaticGeneration:H,isOnDemandRevalidate:P})},!1,O),t}},c=await R.handleResponse({req:e,nextConfig:k,cacheKey:D,routeKind:n.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:M,isRoutePPREnabled:!1,isOnDemandRevalidate:P,revalidateOnlyGenerated:N,responseGenerator:l,waitUntil:r.waitUntil,isMinimalMode:L});if(!T)return null;if((null==c||null==(o=c.value)?void 0:o.kind)!==g.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==c||null==(s=c.value)?void 0:s.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});L||t.setHeader("x-nextjs-cache",P?"REVALIDATED":c.isMiss?"MISS":c.isStale?"STALE":"HIT"),A&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let d=(0,f.fromNodeOutgoingHttpHeaders)(c.value.headers);return L&&T||d.delete(m.NEXT_CACHE_TAGS_HEADER),!c.cacheControl||t.getHeader("Cache-Control")||d.get("Cache-Control")||d.set("Cache-Control",(0,y.getCacheControlHeader)(c.cacheControl)),await (0,u.sendResponse)(W,X,new Response(c.value.body,{headers:d,status:c.value.status||200})),null};G&&U?await s(U):(a=B.getActiveScopeSpan(),await B.withPropagatedContext(e.headers,()=>B.trace(d.BaseServerSpan.handleRequest,{spanName:`${K} ${h}`,kind:o.SpanKind.SERVER,attributes:{"http.method":K,"http.target":e.url}},s),void 0,!G))}catch(t){if(t instanceof w.NoFallbackError||await R.onRequestError(e,t,{routerKind:"App Router",routePath:_,routeType:"route",revalidateReason:(0,p.getRevalidateReason)({isStaticGeneration:H,isOnDemandRevalidate:P})},!1,O),T)throw t;return await (0,u.sendResponse)(W,X,new Response(null,{status:500})),null}}e.s(["handler",0,E,"patchFetch",0,function(){return(0,r.patchFetch)({workAsyncStorage:I,workUnitAsyncStorage:b})},"routeModule",0,R,"serverHooks",0,k,"workAsyncStorage",0,I,"workUnitAsyncStorage",0,b],17361)},82647,e=>{e.v(t=>Promise.all(["server/chunks/[externals]_mongodb-memory-server_1ofgmwu._.js"].map(t=>e.l(t))).then(()=>t(87818)))}];
|
|
2
|
-
|
|
3
|
-
//# sourceMappingURL=%5Broot-of-the-server%5D__1eiw7ks._.js.map
|