@visulima/api-platform 3.0.26 → 3.0.27

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.
Files changed (52) hide show
  1. package/CHANGELOG.md +28 -0
  2. package/LICENSE.md +6 -0
  3. package/README.md +2 -2
  4. package/dist/chunk-4C666HHU.js +1 -6
  5. package/dist/chunk-66EUOAFS.mjs +1 -8
  6. package/dist/chunk-66EUOAFS.mjs.map +1 -1
  7. package/dist/chunk-EQRZRNG6.js +6 -0
  8. package/dist/chunk-EQRZRNG6.js.map +1 -0
  9. package/dist/chunk-GI7VS3DY.mjs +1 -6
  10. package/dist/chunk-GI7VS3DY.mjs.map +1 -1
  11. package/dist/chunk-HZWWJL43.mjs +1 -4
  12. package/dist/chunk-MYU5ZKUN.js +1 -12
  13. package/dist/chunk-MYU5ZKUN.js.map +1 -1
  14. package/dist/chunk-T4ABIWHW.mjs +1 -12
  15. package/dist/chunk-T4ABIWHW.mjs.map +1 -1
  16. package/dist/chunk-UPRO35MO.js +1 -12
  17. package/dist/chunk-UPRO35MO.js.map +1 -1
  18. package/dist/chunk-XANI6TRN.mjs +6 -0
  19. package/dist/chunk-XANI6TRN.mjs.map +1 -0
  20. package/dist/chunk-YG667K32.js +1 -22
  21. package/dist/chunk-YG667K32.js.map +1 -1
  22. package/dist/framework/cli/commander/index.js +1 -10
  23. package/dist/framework/cli/commander/index.js.map +1 -1
  24. package/dist/framework/cli/commander/index.mjs +1 -8
  25. package/dist/framework/cli/commander/index.mjs.map +1 -1
  26. package/dist/framework/cli/index.js +1 -12
  27. package/dist/framework/cli/index.mjs +1 -3
  28. package/dist/framework/next/index-browser.js +1 -12
  29. package/dist/framework/next/index-browser.mjs +1 -3
  30. package/dist/framework/next/index-server.js +1 -22
  31. package/dist/framework/next/index-server.js.map +1 -1
  32. package/dist/framework/next/index-server.mjs +1 -11
  33. package/dist/framework/next/index-server.mjs.map +1 -1
  34. package/dist/framework/next/routes/pages/redoc/index.js +2 -16
  35. package/dist/framework/next/routes/pages/redoc/index.js.map +1 -1
  36. package/dist/framework/next/routes/pages/redoc/index.mjs +2 -10
  37. package/dist/framework/next/routes/pages/redoc/index.mjs.map +1 -1
  38. package/dist/framework/next/routes/pages/swagger/index.js +2 -17
  39. package/dist/framework/next/routes/pages/swagger/index.js.map +1 -1
  40. package/dist/framework/next/routes/pages/swagger/index.mjs +2 -10
  41. package/dist/framework/next/routes/pages/swagger/index.mjs.map +1 -1
  42. package/dist/index-browser.js +1 -12
  43. package/dist/index-browser.mjs +1 -3
  44. package/dist/index-server.js +2 -246
  45. package/dist/index-server.js.map +1 -1
  46. package/dist/index-server.mjs +2 -19
  47. package/dist/index-server.mjs.map +1 -1
  48. package/package.json +42 -42
  49. package/dist/chunk-GLAABR73.mjs +0 -18
  50. package/dist/chunk-GLAABR73.mjs.map +0 -1
  51. package/dist/chunk-INI6VCIA.js +0 -25
  52. package/dist/chunk-INI6VCIA.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/framework/next/routes/api/swagger.ts","../../../src/framework/next/webpack/with-open-api.ts"],"names":["swaggerApiRoute","options","swagger_handler_default","swagger_default","withOpenApi","definition","output","sources","verbose","nextConfig","config","SwaggerCompilerPlugin","source","combinedPath","join","fs","with_open_api_default"],"mappings":";;;;;;;;;;;;;AAOA,IAAMA,CAAsH,CAAA,CAACC,CAAU,CAAA,EACnIC,GAAAA,kBAAAA,CAAeD,CAAO,CAAA,CAGnBE,CAAQH,CAAAA,MCFTI,CACF,CAAA,CAAC,CACG,UAAA,CAAAC,CACA,CAAA,MAAA,CAAAC,CAAS,CAAA,sBAAA,CACT,QAAAC,CACA,CAAA,OAAA,CAAAC,CACJ,CAAA,GAMCC,CACI,GAAA,CACG,GAAGA,CAAAA,CACH,QAAS,CAACC,CAAAA,CAAuBT,CAAkC,GAAA,CAC/D,GAAI,CAACA,CAAQ,CAAA,QAAA,CACT,OAAOS,CAQX,CAAA,GALIJ,CAAO,CAAA,UAAA,CAAW,GAAG,CAAA,GAErBA,CAASA,CAAAA,CAAAA,CAAO,MAAM,CAAC,CAAA,CAAA,CAGvB,CAACA,CAAAA,CAAO,QAAS,CAAA,OAAO,CACxB,CAAA,MAAM,IAAI,KAAM,CAAA,qCAAqC,CA6BzD,CAAA,OAzBAI,CAAS,CAAA,CACL,GAAGA,CAAAA,CACH,OAAS,CAAA,CAEL,GAAGA,CAAAA,CAAO,OACV,CAAA,IAAIC,kCACA,CAAA,CAAA,EAAGV,EAAQ,GAAG,CAAA,CAAA,EAAIK,CAAM,CAAA,CAAA,CACxBC,CAAQ,CAAA,GAAA,CAAKK,CAAW,EAAA,CACpB,IAAMC,CAAeC,CAAAA,SAAAA,CAAKb,CAAQ,CAAA,GAAA,CAAeW,CAAO,CAAA,OAAA,CAAQ,IAAM,CAAA,EAAE,CAAC,CAGzE,CAAA,OAAAG,kBAAG,CAAA,SAAA,CAAUF,CAAY,CAAA,CAAE,WAAY,EAAA,CAEhCA,CACX,CAAC,CAAA,CACD,CAEI,OAAA,CAAS,OACT,CAAA,GAAGR,CACP,CAAA,CACA,CAAE,OAAAG,CAAAA,CAAQ,CACd,CACJ,CACJ,CAAA,CAEI,OAAOC,CAAAA,CAAW,SAAY,UACvBA,CAAAA,CAAAA,CAAW,OAAQC,CAAAA,CAAAA,CAAQT,CAAO,CAAA,CAGtCS,CACX,CACJ,GAEDM,CAAQZ,CAAAA","file":"index-server.js","sourcesContent":["import type { SwaggerHandlerOptions } from \"../../../../swagger/api/swagger-handler\";\nimport swaggerHandler from \"../../../../swagger/api/swagger-handler\";\n\n/**\n * @deprecated Use `import { swaggerHandler } from \"@visulima/api-platform\"` instead.\n */\n\nconst swaggerApiRoute: <M extends string, PrismaClient>(options: Partial<SwaggerHandlerOptions<M, PrismaClient>>) => void = (options = {}) =>\n swaggerHandler(options);\n\n// eslint-disable-next-line deprecation/deprecation\nexport default swaggerApiRoute;\n","import fs from \"node:fs\";\n\nimport type { BaseDefinition } from \"@visulima/jsdoc-open-api\";\nimport { SwaggerCompilerPlugin } from \"@visulima/jsdoc-open-api\";\nimport { join } from \"@visulima/path\";\nimport type { NextJsWebpackConfig, WebpackConfigContext } from \"next/dist/server/config-shared\";\nimport type { NextConfig } from \"next/types\";\nimport type { Configuration } from \"webpack\";\n\nconst withOpenApi =\n ({\n definition,\n output = \"swagger/swagger.json\",\n sources,\n verbose,\n }: {\n definition: Exclude<BaseDefinition, \"openapi\"> & { openapi?: string };\n output: string;\n sources: string[];\n verbose?: boolean;\n }) =>\n (nextConfig: NextConfig): NextConfig =>\n ({\n ...nextConfig,\n webpack: (config: Configuration, options: WebpackConfigContext) => {\n if (!options.isServer) {\n return config;\n }\n\n if (output.startsWith(\"/\")) {\n // eslint-disable-next-line no-param-reassign\n output = output.slice(1);\n }\n\n if (!output.endsWith(\".json\")) {\n throw new Error(\"The output path must end with .json\");\n }\n\n // eslint-disable-next-line no-param-reassign\n config = {\n ...config,\n plugins: [\n // @ts-expect-error: ignore\n ...config.plugins,\n new SwaggerCompilerPlugin(\n `${options.dir}/${output}`,\n sources.map((source) => {\n const combinedPath = join(options.dir as string, source.replace(\"./\", \"\"));\n\n // Check if the path is a directory\n fs.lstatSync(combinedPath).isDirectory();\n\n return combinedPath;\n }),\n {\n // @ts-expect-error: This property should be overwritten\n openapi: \"3.0.0\",\n ...definition,\n },\n { verbose },\n ),\n ],\n };\n\n if (typeof nextConfig.webpack === \"function\") {\n return nextConfig.webpack(config, options) as NextJsWebpackConfig;\n }\n\n return config as NextJsWebpackConfig;\n },\n }) as NextConfig;\n\nexport default withOpenApi;\n"]}
1
+ {"version":3,"sources":["../../../src/framework/next/routes/api/swagger.ts","../../../src/framework/next/webpack/with-open-api.ts"],"names":["swaggerApiRoute","options","swagger_handler_default","swagger_default","withOpenApi","definition","output","sources","verbose","nextConfig","config","SwaggerCompilerPlugin","source","combinedPath","join","fs","with_open_api_default"],"mappings":"gXAOA,IAAMA,CAAsH,CAAA,CAACC,CAAU,CAAA,EACnIC,GAAAA,kBAAAA,CAAeD,CAAO,CAAA,CAGnBE,CAAQH,CAAAA,MCFTI,CACF,CAAA,CAAC,CACG,UAAA,CAAAC,CACA,CAAA,MAAA,CAAAC,CAAS,CAAA,sBAAA,CACT,QAAAC,CACA,CAAA,OAAA,CAAAC,CACJ,CAAA,GAMCC,CACI,GAAA,CACG,GAAGA,CAAAA,CACH,QAAS,CAACC,CAAAA,CAAuBT,CAAkC,GAAA,CAC/D,GAAI,CAACA,CAAQ,CAAA,QAAA,CACT,OAAOS,CAQX,CAAA,GALIJ,CAAO,CAAA,UAAA,CAAW,GAAG,CAAA,GAErBA,CAASA,CAAAA,CAAAA,CAAO,MAAM,CAAC,CAAA,CAAA,CAGvB,CAACA,CAAAA,CAAO,QAAS,CAAA,OAAO,CACxB,CAAA,MAAM,IAAI,KAAM,CAAA,qCAAqC,CA6BzD,CAAA,OAzBAI,CAAS,CAAA,CACL,GAAGA,CAAAA,CACH,OAAS,CAAA,CAEL,GAAGA,CAAAA,CAAO,OACV,CAAA,IAAIC,kCACA,CAAA,CAAA,EAAGV,EAAQ,GAAG,CAAA,CAAA,EAAIK,CAAM,CAAA,CAAA,CACxBC,CAAQ,CAAA,GAAA,CAAKK,CAAW,EAAA,CACpB,IAAMC,CAAeC,CAAAA,SAAAA,CAAKb,CAAQ,CAAA,GAAA,CAAeW,CAAO,CAAA,OAAA,CAAQ,IAAM,CAAA,EAAE,CAAC,CAGzE,CAAA,OAAAG,kBAAG,CAAA,SAAA,CAAUF,CAAY,CAAA,CAAE,WAAY,EAAA,CAEhCA,CACX,CAAC,CAAA,CACD,CAEI,OAAA,CAAS,OACT,CAAA,GAAGR,CACP,CAAA,CACA,CAAE,OAAAG,CAAAA,CAAQ,CACd,CACJ,CACJ,CAAA,CAEI,OAAOC,CAAAA,CAAW,SAAY,UACvBA,CAAAA,CAAAA,CAAW,OAAQC,CAAAA,CAAAA,CAAQT,CAAO,CAAA,CAGtCS,CACX,CACJ,GAEDM,CAAQZ,CAAAA","file":"index-server.js","sourcesContent":["import type { SwaggerHandlerOptions } from \"../../../../swagger/api/swagger-handler\";\nimport swaggerHandler from \"../../../../swagger/api/swagger-handler\";\n\n/**\n * @deprecated Use `import { swaggerHandler } from \"@visulima/api-platform\"` instead.\n */\n\nconst swaggerApiRoute: <M extends string, PrismaClient>(options: Partial<SwaggerHandlerOptions<M, PrismaClient>>) => void = (options = {}) =>\n swaggerHandler(options);\n\n// eslint-disable-next-line deprecation/deprecation\nexport default swaggerApiRoute;\n","import fs from \"node:fs\";\n\nimport type { BaseDefinition } from \"@visulima/jsdoc-open-api\";\nimport { SwaggerCompilerPlugin } from \"@visulima/jsdoc-open-api\";\nimport { join } from \"@visulima/path\";\nimport type { NextJsWebpackConfig, WebpackConfigContext } from \"next/dist/server/config-shared\";\nimport type { NextConfig } from \"next/types\";\nimport type { Configuration } from \"webpack\";\n\nconst withOpenApi =\n ({\n definition,\n output = \"swagger/swagger.json\",\n sources,\n verbose,\n }: {\n definition: Exclude<BaseDefinition, \"openapi\"> & { openapi?: string };\n output: string;\n sources: string[];\n verbose?: boolean;\n }) =>\n (nextConfig: NextConfig): NextConfig =>\n ({\n ...nextConfig,\n webpack: (config: Configuration, options: WebpackConfigContext) => {\n if (!options.isServer) {\n return config;\n }\n\n if (output.startsWith(\"/\")) {\n // eslint-disable-next-line no-param-reassign\n output = output.slice(1);\n }\n\n if (!output.endsWith(\".json\")) {\n throw new Error(\"The output path must end with .json\");\n }\n\n // eslint-disable-next-line no-param-reassign\n config = {\n ...config,\n plugins: [\n // @ts-expect-error: ignore\n ...config.plugins,\n new SwaggerCompilerPlugin(\n `${options.dir}/${output}`,\n sources.map((source) => {\n const combinedPath = join(options.dir as string, source.replace(\"./\", \"\"));\n\n // Check if the path is a directory\n fs.lstatSync(combinedPath).isDirectory();\n\n return combinedPath;\n }),\n {\n // @ts-expect-error: This property should be overwritten\n openapi: \"3.0.0\",\n ...definition,\n },\n { verbose },\n ),\n ],\n };\n\n if (typeof nextConfig.webpack === \"function\") {\n return nextConfig.webpack(config, options) as NextJsWebpackConfig;\n }\n\n return config as NextJsWebpackConfig;\n },\n }) as NextConfig;\n\nexport default withOpenApi;\n"]}
@@ -1,12 +1,2 @@
1
- import { c } from '../../chunk-T4ABIWHW.mjs';
2
- export { a as getSwaggerStaticProps } from '../../chunk-GI7VS3DY.mjs';
3
- import '../../chunk-HZWWJL43.mjs';
4
- import w from 'node:fs';
5
- import { SwaggerCompilerPlugin } from '@visulima/jsdoc-open-api';
6
- import { join } from '@visulima/path';
7
-
8
- var l=(i={})=>c(i),d=l;var x=({definition:i,output:r="swagger/swagger.json",sources:g,verbose:f})=>o=>({...o,webpack:(e,t)=>{if(!t.isServer)return e;if(r.startsWith("/")&&(r=r.slice(1)),!r.endsWith(".json"))throw new Error("The output path must end with .json");return e={...e,plugins:[...e.plugins,new SwaggerCompilerPlugin(`${t.dir}/${r}`,g.map(m=>{let n=join(t.dir,m.replace("./",""));return w.lstatSync(n).isDirectory(),n}),{openapi:"3.0.0",...i},{verbose:f})]},typeof o.webpack=="function"?o.webpack(e,t):e}}),C=x;
9
-
10
- export { d as swaggerApiRoute, C as withOpenApi };
11
- //# sourceMappingURL=index-server.mjs.map
1
+ import {c}from'../../chunk-T4ABIWHW.mjs';export{a as getSwaggerStaticProps}from'../../chunk-GI7VS3DY.mjs';import'../../chunk-HZWWJL43.mjs';import w from'node:fs';import {SwaggerCompilerPlugin}from'@visulima/jsdoc-open-api';import {join}from'@visulima/path';var l=(i={})=>c(i),d=l;var x=({definition:i,output:r="swagger/swagger.json",sources:g,verbose:f})=>o=>({...o,webpack:(e,t)=>{if(!t.isServer)return e;if(r.startsWith("/")&&(r=r.slice(1)),!r.endsWith(".json"))throw new Error("The output path must end with .json");return e={...e,plugins:[...e.plugins,new SwaggerCompilerPlugin(`${t.dir}/${r}`,g.map(m=>{let n=join(t.dir,m.replace("./",""));return w.lstatSync(n).isDirectory(),n}),{openapi:"3.0.0",...i},{verbose:f})]},typeof o.webpack=="function"?o.webpack(e,t):e}}),C=x;export{d as swaggerApiRoute,C as withOpenApi};//# sourceMappingURL=index-server.mjs.map
12
2
  //# sourceMappingURL=index-server.mjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/framework/next/routes/api/swagger.ts","../../../src/framework/next/webpack/with-open-api.ts"],"names":["swaggerApiRoute","options","swagger_handler_default","swagger_default","withOpenApi","definition","output","sources","verbose","nextConfig","config","SwaggerCompilerPlugin","source","combinedPath","join","fs","with_open_api_default"],"mappings":";;;;;;;AAOA,IAAMA,CAAsH,CAAA,CAACC,CAAU,CAAA,EACnIC,GAAAA,CAAAA,CAAeD,CAAO,CAAA,CAGnBE,CAAQH,CAAAA,MCFTI,CACF,CAAA,CAAC,CACG,UAAA,CAAAC,CACA,CAAA,MAAA,CAAAC,CAAS,CAAA,sBAAA,CACT,QAAAC,CACA,CAAA,OAAA,CAAAC,CACJ,CAAA,GAMCC,CACI,GAAA,CACG,GAAGA,CAAAA,CACH,QAAS,CAACC,CAAAA,CAAuBT,CAAkC,GAAA,CAC/D,GAAI,CAACA,CAAQ,CAAA,QAAA,CACT,OAAOS,CAQX,CAAA,GALIJ,CAAO,CAAA,UAAA,CAAW,GAAG,CAAA,GAErBA,CAASA,CAAAA,CAAAA,CAAO,MAAM,CAAC,CAAA,CAAA,CAGvB,CAACA,CAAAA,CAAO,QAAS,CAAA,OAAO,CACxB,CAAA,MAAM,IAAI,KAAM,CAAA,qCAAqC,CA6BzD,CAAA,OAzBAI,CAAS,CAAA,CACL,GAAGA,CAAAA,CACH,OAAS,CAAA,CAEL,GAAGA,CAAAA,CAAO,OACV,CAAA,IAAIC,qBACA,CAAA,CAAA,EAAGV,EAAQ,GAAG,CAAA,CAAA,EAAIK,CAAM,CAAA,CAAA,CACxBC,CAAQ,CAAA,GAAA,CAAKK,CAAW,EAAA,CACpB,IAAMC,CAAeC,CAAAA,IAAAA,CAAKb,CAAQ,CAAA,GAAA,CAAeW,CAAO,CAAA,OAAA,CAAQ,IAAM,CAAA,EAAE,CAAC,CAGzE,CAAA,OAAAG,CAAG,CAAA,SAAA,CAAUF,CAAY,CAAA,CAAE,WAAY,EAAA,CAEhCA,CACX,CAAC,CAAA,CACD,CAEI,OAAA,CAAS,OACT,CAAA,GAAGR,CACP,CAAA,CACA,CAAE,OAAAG,CAAAA,CAAQ,CACd,CACJ,CACJ,CAAA,CAEI,OAAOC,CAAAA,CAAW,SAAY,UACvBA,CAAAA,CAAAA,CAAW,OAAQC,CAAAA,CAAAA,CAAQT,CAAO,CAAA,CAGtCS,CACX,CACJ,GAEDM,CAAQZ,CAAAA","file":"index-server.mjs","sourcesContent":["import type { SwaggerHandlerOptions } from \"../../../../swagger/api/swagger-handler\";\nimport swaggerHandler from \"../../../../swagger/api/swagger-handler\";\n\n/**\n * @deprecated Use `import { swaggerHandler } from \"@visulima/api-platform\"` instead.\n */\n\nconst swaggerApiRoute: <M extends string, PrismaClient>(options: Partial<SwaggerHandlerOptions<M, PrismaClient>>) => void = (options = {}) =>\n swaggerHandler(options);\n\n// eslint-disable-next-line deprecation/deprecation\nexport default swaggerApiRoute;\n","import fs from \"node:fs\";\n\nimport type { BaseDefinition } from \"@visulima/jsdoc-open-api\";\nimport { SwaggerCompilerPlugin } from \"@visulima/jsdoc-open-api\";\nimport { join } from \"@visulima/path\";\nimport type { NextJsWebpackConfig, WebpackConfigContext } from \"next/dist/server/config-shared\";\nimport type { NextConfig } from \"next/types\";\nimport type { Configuration } from \"webpack\";\n\nconst withOpenApi =\n ({\n definition,\n output = \"swagger/swagger.json\",\n sources,\n verbose,\n }: {\n definition: Exclude<BaseDefinition, \"openapi\"> & { openapi?: string };\n output: string;\n sources: string[];\n verbose?: boolean;\n }) =>\n (nextConfig: NextConfig): NextConfig =>\n ({\n ...nextConfig,\n webpack: (config: Configuration, options: WebpackConfigContext) => {\n if (!options.isServer) {\n return config;\n }\n\n if (output.startsWith(\"/\")) {\n // eslint-disable-next-line no-param-reassign\n output = output.slice(1);\n }\n\n if (!output.endsWith(\".json\")) {\n throw new Error(\"The output path must end with .json\");\n }\n\n // eslint-disable-next-line no-param-reassign\n config = {\n ...config,\n plugins: [\n // @ts-expect-error: ignore\n ...config.plugins,\n new SwaggerCompilerPlugin(\n `${options.dir}/${output}`,\n sources.map((source) => {\n const combinedPath = join(options.dir as string, source.replace(\"./\", \"\"));\n\n // Check if the path is a directory\n fs.lstatSync(combinedPath).isDirectory();\n\n return combinedPath;\n }),\n {\n // @ts-expect-error: This property should be overwritten\n openapi: \"3.0.0\",\n ...definition,\n },\n { verbose },\n ),\n ],\n };\n\n if (typeof nextConfig.webpack === \"function\") {\n return nextConfig.webpack(config, options) as NextJsWebpackConfig;\n }\n\n return config as NextJsWebpackConfig;\n },\n }) as NextConfig;\n\nexport default withOpenApi;\n"]}
1
+ {"version":3,"sources":["../../../src/framework/next/routes/api/swagger.ts","../../../src/framework/next/webpack/with-open-api.ts"],"names":["swaggerApiRoute","options","swagger_handler_default","swagger_default","withOpenApi","definition","output","sources","verbose","nextConfig","config","SwaggerCompilerPlugin","source","combinedPath","join","fs","with_open_api_default"],"mappings":"iQAOA,IAAMA,CAAsH,CAAA,CAACC,CAAU,CAAA,EACnIC,GAAAA,CAAAA,CAAeD,CAAO,CAAA,CAGnBE,CAAQH,CAAAA,MCFTI,CACF,CAAA,CAAC,CACG,UAAA,CAAAC,CACA,CAAA,MAAA,CAAAC,CAAS,CAAA,sBAAA,CACT,QAAAC,CACA,CAAA,OAAA,CAAAC,CACJ,CAAA,GAMCC,CACI,GAAA,CACG,GAAGA,CAAAA,CACH,QAAS,CAACC,CAAAA,CAAuBT,CAAkC,GAAA,CAC/D,GAAI,CAACA,CAAQ,CAAA,QAAA,CACT,OAAOS,CAQX,CAAA,GALIJ,CAAO,CAAA,UAAA,CAAW,GAAG,CAAA,GAErBA,CAASA,CAAAA,CAAAA,CAAO,MAAM,CAAC,CAAA,CAAA,CAGvB,CAACA,CAAAA,CAAO,QAAS,CAAA,OAAO,CACxB,CAAA,MAAM,IAAI,KAAM,CAAA,qCAAqC,CA6BzD,CAAA,OAzBAI,CAAS,CAAA,CACL,GAAGA,CAAAA,CACH,OAAS,CAAA,CAEL,GAAGA,CAAAA,CAAO,OACV,CAAA,IAAIC,qBACA,CAAA,CAAA,EAAGV,EAAQ,GAAG,CAAA,CAAA,EAAIK,CAAM,CAAA,CAAA,CACxBC,CAAQ,CAAA,GAAA,CAAKK,CAAW,EAAA,CACpB,IAAMC,CAAeC,CAAAA,IAAAA,CAAKb,CAAQ,CAAA,GAAA,CAAeW,CAAO,CAAA,OAAA,CAAQ,IAAM,CAAA,EAAE,CAAC,CAGzE,CAAA,OAAAG,CAAG,CAAA,SAAA,CAAUF,CAAY,CAAA,CAAE,WAAY,EAAA,CAEhCA,CACX,CAAC,CAAA,CACD,CAEI,OAAA,CAAS,OACT,CAAA,GAAGR,CACP,CAAA,CACA,CAAE,OAAAG,CAAAA,CAAQ,CACd,CACJ,CACJ,CAAA,CAEI,OAAOC,CAAAA,CAAW,SAAY,UACvBA,CAAAA,CAAAA,CAAW,OAAQC,CAAAA,CAAAA,CAAQT,CAAO,CAAA,CAGtCS,CACX,CACJ,GAEDM,CAAQZ,CAAAA","file":"index-server.mjs","sourcesContent":["import type { SwaggerHandlerOptions } from \"../../../../swagger/api/swagger-handler\";\nimport swaggerHandler from \"../../../../swagger/api/swagger-handler\";\n\n/**\n * @deprecated Use `import { swaggerHandler } from \"@visulima/api-platform\"` instead.\n */\n\nconst swaggerApiRoute: <M extends string, PrismaClient>(options: Partial<SwaggerHandlerOptions<M, PrismaClient>>) => void = (options = {}) =>\n swaggerHandler(options);\n\n// eslint-disable-next-line deprecation/deprecation\nexport default swaggerApiRoute;\n","import fs from \"node:fs\";\n\nimport type { BaseDefinition } from \"@visulima/jsdoc-open-api\";\nimport { SwaggerCompilerPlugin } from \"@visulima/jsdoc-open-api\";\nimport { join } from \"@visulima/path\";\nimport type { NextJsWebpackConfig, WebpackConfigContext } from \"next/dist/server/config-shared\";\nimport type { NextConfig } from \"next/types\";\nimport type { Configuration } from \"webpack\";\n\nconst withOpenApi =\n ({\n definition,\n output = \"swagger/swagger.json\",\n sources,\n verbose,\n }: {\n definition: Exclude<BaseDefinition, \"openapi\"> & { openapi?: string };\n output: string;\n sources: string[];\n verbose?: boolean;\n }) =>\n (nextConfig: NextConfig): NextConfig =>\n ({\n ...nextConfig,\n webpack: (config: Configuration, options: WebpackConfigContext) => {\n if (!options.isServer) {\n return config;\n }\n\n if (output.startsWith(\"/\")) {\n // eslint-disable-next-line no-param-reassign\n output = output.slice(1);\n }\n\n if (!output.endsWith(\".json\")) {\n throw new Error(\"The output path must end with .json\");\n }\n\n // eslint-disable-next-line no-param-reassign\n config = {\n ...config,\n plugins: [\n // @ts-expect-error: ignore\n ...config.plugins,\n new SwaggerCompilerPlugin(\n `${options.dir}/${output}`,\n sources.map((source) => {\n const combinedPath = join(options.dir as string, source.replace(\"./\", \"\"));\n\n // Check if the path is a directory\n fs.lstatSync(combinedPath).isDirectory();\n\n return combinedPath;\n }),\n {\n // @ts-expect-error: This property should be overwritten\n openapi: \"3.0.0\",\n ...definition,\n },\n { verbose },\n ),\n ],\n };\n\n if (typeof nextConfig.webpack === \"function\") {\n return nextConfig.webpack(config, options) as NextJsWebpackConfig;\n }\n\n return config as NextJsWebpackConfig;\n },\n }) as NextConfig;\n\nexport default withOpenApi;\n"]}
@@ -1,22 +1,8 @@
1
- 'use strict';
2
-
3
- require('../../../../../chunk-4C666HHU.js');
4
- var a = require('next/head');
5
- var redoc = require('redoc');
6
- var jsxRuntime = require('react/jsx-runtime');
7
-
8
- function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
9
-
10
- var a__default = /*#__PURE__*/_interopDefault(a);
11
-
12
- var i=(o,p={})=>({swaggerData:r})=>jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsxs(a__default.default,{children:[jsxRuntime.jsx("title",{children:o}),jsxRuntime.jsx("style",{children:`
1
+ 'use strict';require('../../../../../chunk-4C666HHU.js');var a=require('next/head'),redoc=require('redoc'),jsxRuntime=require('react/jsx-runtime');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var a__default=/*#__PURE__*/_interopDefault(a);var i=(o,p={})=>({swaggerData:r})=>jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsxs(a__default.default,{children:[jsxRuntime.jsx("title",{children:o}),jsxRuntime.jsx("style",{children:`
13
2
  body {
14
3
  background: #fafafa !important;
15
4
  }
16
- `})]}),jsxRuntime.jsx(redoc.RedocStandalone,{...p,spec:r})]}),y=i;
17
-
18
- module.exports = y;
19
- //# sourceMappingURL=index.js.map
5
+ `})]}),jsxRuntime.jsx(redoc.RedocStandalone,{...p,spec:r})]}),y=i;module.exports=y;//# sourceMappingURL=index.js.map
20
6
 
21
7
  module.exports = module.exports;
22
8
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../../src/framework/next/routes/pages/redoc/index.tsx"],"names":["RedocApiDocument","name","swagger","swaggerData","jsxs","Fragment","Head","jsx","RedocStandalone","redoc_default"],"mappings":";;;;;;;;;;;IAMMA,CASF,CAAA,CAACC,EAAMC,CAAU,CAAA,EACjB,GAAA,CAAC,CAAE,WAAAC,CAAAA,CAAY,IACXC,eAAAC,CAAAA,mBAAAA,CAAA,CACI,QAAAD,CAAAA,CAAAA,eAAAA,CAACE,kBAAA,CAAA,CACG,UAAAC,cAAC,CAAA,OAAA,CAAA,CAAO,SAAAN,CAAK,CAAA,CAAA,CACbM,eAAC,OACI,CAAA,CAAA,QAAA,CAAA,CAAA;AAAA;AAAA;AAAA;AAAA,CAKL,CAAA,CAAA,CAAA,CACJ,CAEAA,CAAAA,cAAAA,CAACC,qBAAA,CAAA,CAAiB,GAAGN,CAAAA,CAAS,IAAMC,CAAAA,CAAAA,CAAa,CACrD,CAAA,CAAA,CAAA,CAGDM,CAAQT,CAAAA","file":"index.js","sourcesContent":["import Head from \"next/head\";\nimport type { InferGetStaticPropsType, NextPage } from \"next/types\";\nimport { RedocStandalone } from \"redoc\";\n\nimport type getStaticProps from \"../get-static-properties-swagger\";\n\nconst RedocApiDocument: (\n name: string,\n swagger?: Exclude<\n {\n specUrl?: string;\n },\n \"spec\"\n >,\n) => NextPage<InferGetStaticPropsType<typeof getStaticProps>> =\n (name, swagger = {}) =>\n ({ swaggerData }: InferGetStaticPropsType<typeof getStaticProps>) => (\n <>\n <Head>\n <title>{name}</title>\n <style>\n {`\nbody {\n background: #fafafa !important;\n}\n`}\n </style>\n </Head>\n {/* eslint-disable-next-line react/jsx-props-no-spreading */}\n <RedocStandalone {...swagger} spec={swaggerData} />\n </>\n );\n\nexport default RedocApiDocument;\n"]}
1
+ {"version":3,"sources":["../../../../../../src/framework/next/routes/pages/redoc/index.tsx"],"names":["RedocApiDocument","name","swagger","swaggerData","jsxs","Fragment","Head","jsx","RedocStandalone","redoc_default"],"mappings":"uQAMMA,CASF,CAAA,CAACC,EAAMC,CAAU,CAAA,EACjB,GAAA,CAAC,CAAE,WAAAC,CAAAA,CAAY,IACXC,eAAAC,CAAAA,mBAAAA,CAAA,CACI,QAAAD,CAAAA,CAAAA,eAAAA,CAACE,kBAAA,CAAA,CACG,UAAAC,cAAC,CAAA,OAAA,CAAA,CAAO,SAAAN,CAAK,CAAA,CAAA,CACbM,eAAC,OACI,CAAA,CAAA,QAAA,CAAA,CAAA;AAAA;AAAA;AAAA;AAAA,CAKL,CAAA,CAAA,CAAA,CACJ,CAEAA,CAAAA,cAAAA,CAACC,qBAAA,CAAA,CAAiB,GAAGN,CAAAA,CAAS,IAAMC,CAAAA,CAAAA,CAAa,CACrD,CAAA,CAAA,CAAA,CAGDM,CAAQT,CAAAA","file":"index.js","sourcesContent":["import Head from \"next/head\";\nimport type { InferGetStaticPropsType, NextPage } from \"next/types\";\nimport { RedocStandalone } from \"redoc\";\n\nimport type getStaticProps from \"../get-static-properties-swagger\";\n\nconst RedocApiDocument: (\n name: string,\n swagger?: Exclude<\n {\n specUrl?: string;\n },\n \"spec\"\n >,\n) => NextPage<InferGetStaticPropsType<typeof getStaticProps>> =\n (name, swagger = {}) =>\n ({ swaggerData }: InferGetStaticPropsType<typeof getStaticProps>) => (\n <>\n <Head>\n <title>{name}</title>\n <style>\n {`\nbody {\n background: #fafafa !important;\n}\n`}\n </style>\n </Head>\n {/* eslint-disable-next-line react/jsx-props-no-spreading */}\n <RedocStandalone {...swagger} spec={swaggerData} />\n </>\n );\n\nexport default RedocApiDocument;\n"]}
@@ -1,14 +1,6 @@
1
- import '../../../../../chunk-HZWWJL43.mjs';
2
- import a from 'next/head';
3
- import { RedocStandalone } from 'redoc';
4
- import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
5
-
6
- var i=(o,p={})=>({swaggerData:r})=>jsxs(Fragment,{children:[jsxs(a,{children:[jsx("title",{children:o}),jsx("style",{children:`
1
+ import'../../../../../chunk-HZWWJL43.mjs';import a from'next/head';import {RedocStandalone}from'redoc';import {jsxs,Fragment,jsx}from'react/jsx-runtime';var i=(o,p={})=>({swaggerData:r})=>jsxs(Fragment,{children:[jsxs(a,{children:[jsx("title",{children:o}),jsx("style",{children:`
7
2
  body {
8
3
  background: #fafafa !important;
9
4
  }
10
- `})]}),jsx(RedocStandalone,{...p,spec:r})]}),m=i;
11
-
12
- export { m as default };
13
- //# sourceMappingURL=index.mjs.map
5
+ `})]}),jsx(RedocStandalone,{...p,spec:r})]}),m=i;export{m as default};//# sourceMappingURL=index.mjs.map
14
6
  //# sourceMappingURL=index.mjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../../src/framework/next/routes/pages/redoc/index.tsx"],"names":["RedocApiDocument","name","swagger","swaggerData","jsxs","Fragment","Head","jsx","RedocStandalone","redoc_default"],"mappings":";;;;;IAMMA,CASF,CAAA,CAACC,EAAMC,CAAU,CAAA,EACjB,GAAA,CAAC,CAAE,WAAAC,CAAAA,CAAY,IACXC,IAAAC,CAAAA,QAAAA,CAAA,CACI,QAAAD,CAAAA,CAAAA,IAAAA,CAACE,CAAA,CAAA,CACG,UAAAC,GAAC,CAAA,OAAA,CAAA,CAAO,SAAAN,CAAK,CAAA,CAAA,CACbM,IAAC,OACI,CAAA,CAAA,QAAA,CAAA,CAAA;AAAA;AAAA;AAAA;AAAA,CAKL,CAAA,CAAA,CAAA,CACJ,CAEAA,CAAAA,GAAAA,CAACC,eAAA,CAAA,CAAiB,GAAGN,CAAAA,CAAS,IAAMC,CAAAA,CAAAA,CAAa,CACrD,CAAA,CAAA,CAAA,CAGDM,CAAQT,CAAAA","file":"index.mjs","sourcesContent":["import Head from \"next/head\";\nimport type { InferGetStaticPropsType, NextPage } from \"next/types\";\nimport { RedocStandalone } from \"redoc\";\n\nimport type getStaticProps from \"../get-static-properties-swagger\";\n\nconst RedocApiDocument: (\n name: string,\n swagger?: Exclude<\n {\n specUrl?: string;\n },\n \"spec\"\n >,\n) => NextPage<InferGetStaticPropsType<typeof getStaticProps>> =\n (name, swagger = {}) =>\n ({ swaggerData }: InferGetStaticPropsType<typeof getStaticProps>) => (\n <>\n <Head>\n <title>{name}</title>\n <style>\n {`\nbody {\n background: #fafafa !important;\n}\n`}\n </style>\n </Head>\n {/* eslint-disable-next-line react/jsx-props-no-spreading */}\n <RedocStandalone {...swagger} spec={swaggerData} />\n </>\n );\n\nexport default RedocApiDocument;\n"]}
1
+ {"version":3,"sources":["../../../../../../src/framework/next/routes/pages/redoc/index.tsx"],"names":["RedocApiDocument","name","swagger","swaggerData","jsxs","Fragment","Head","jsx","RedocStandalone","redoc_default"],"mappings":"6JAMMA,CASF,CAAA,CAACC,EAAMC,CAAU,CAAA,EACjB,GAAA,CAAC,CAAE,WAAAC,CAAAA,CAAY,IACXC,IAAAC,CAAAA,QAAAA,CAAA,CACI,QAAAD,CAAAA,CAAAA,IAAAA,CAACE,CAAA,CAAA,CACG,UAAAC,GAAC,CAAA,OAAA,CAAA,CAAO,SAAAN,CAAK,CAAA,CAAA,CACbM,IAAC,OACI,CAAA,CAAA,QAAA,CAAA,CAAA;AAAA;AAAA;AAAA;AAAA,CAKL,CAAA,CAAA,CAAA,CACJ,CAEAA,CAAAA,GAAAA,CAACC,eAAA,CAAA,CAAiB,GAAGN,CAAAA,CAAS,IAAMC,CAAAA,CAAAA,CAAa,CACrD,CAAA,CAAA,CAAA,CAGDM,CAAQT,CAAAA","file":"index.mjs","sourcesContent":["import Head from \"next/head\";\nimport type { InferGetStaticPropsType, NextPage } from \"next/types\";\nimport { RedocStandalone } from \"redoc\";\n\nimport type getStaticProps from \"../get-static-properties-swagger\";\n\nconst RedocApiDocument: (\n name: string,\n swagger?: Exclude<\n {\n specUrl?: string;\n },\n \"spec\"\n >,\n) => NextPage<InferGetStaticPropsType<typeof getStaticProps>> =\n (name, swagger = {}) =>\n ({ swaggerData }: InferGetStaticPropsType<typeof getStaticProps>) => (\n <>\n <Head>\n <title>{name}</title>\n <style>\n {`\nbody {\n background: #fafafa !important;\n}\n`}\n </style>\n </Head>\n {/* eslint-disable-next-line react/jsx-props-no-spreading */}\n <RedocStandalone {...swagger} spec={swaggerData} />\n </>\n );\n\nexport default RedocApiDocument;\n"]}
@@ -1,23 +1,8 @@
1
- 'use strict';
2
-
3
- require('../../../../../chunk-4C666HHU.js');
4
- var o = require('next/dynamic');
5
- var s = require('next/head');
6
- var jsxRuntime = require('react/jsx-runtime');
7
-
8
- function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
9
-
10
- var o__default = /*#__PURE__*/_interopDefault(o);
11
- var s__default = /*#__PURE__*/_interopDefault(s);
12
-
13
- var g=o__default.default(async()=>await import('swagger-ui-react'),{ssr:!1}),i=(r,a={})=>({swaggerData:p})=>jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsxs(s__default.default,{children:[jsxRuntime.jsx("title",{children:r}),jsxRuntime.jsx("style",{children:`
1
+ 'use strict';require('../../../../../chunk-4C666HHU.js');var o=require('next/dynamic'),s=require('next/head'),jsxRuntime=require('react/jsx-runtime');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var o__default=/*#__PURE__*/_interopDefault(o);var s__default=/*#__PURE__*/_interopDefault(s);var g=o__default.default(async()=>await import('swagger-ui-react'),{ssr:!1}),i=(r,a={})=>({swaggerData:p})=>jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsxs(s__default.default,{children:[jsxRuntime.jsx("title",{children:r}),jsxRuntime.jsx("style",{children:`
14
2
  body {
15
3
  background: #fafafa !important;
16
4
  }
17
- `})]}),jsxRuntime.jsx(g,{...a,spec:p})]}),n=i;
18
-
19
- module.exports = n;
20
- //# sourceMappingURL=index.js.map
5
+ `})]}),jsxRuntime.jsx(g,{...a,spec:p})]}),n=i;module.exports=n;//# sourceMappingURL=index.js.map
21
6
 
22
7
  module.exports = module.exports;
23
8
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../../src/framework/next/routes/pages/swagger/index.tsx"],"names":["SwaggerUi","dynamic","SwaggerApiDocument","name","swagger","swaggerData","jsxs","Fragment","Head","jsx","swagger_default"],"mappings":";;;;;;;;;;;;AAOMA,IAAAA,CAAAA,CAAYC,kBAAQ,CAAA,SAAY,MAAM,OAAO,kBAAkB,CAAG,CAAA,CAAE,GAAK,CAAA,CAAA,CAAM,CAAC,CAAA,CAEhFC,EACF,CAACC,CAAAA,CAAMC,EAAU,EAAC,GAClB,CAAC,CAAE,WAAA,CAAAC,CAAY,CAAA,GACXC,eAAAC,CAAAA,mBAAAA,CAAA,CACI,QAAAD,CAAAA,CAAAA,eAAAA,CAACE,kBAAA,CAAA,CACG,QAAAC,CAAAA,CAAAA,cAAAA,CAAC,SAAO,QAAAN,CAAAA,CAAAA,CAAK,CACbM,CAAAA,cAAAA,CAAC,OACI,CAAA,CAAA,QAAA,CAAA,CAAA;AAAA;AAAA;AAAA;AAAA,CAKL,CAAA,CAAA,CAAA,CACJ,CAGAA,CAAAA,cAAAA,CAACT,CAAA,CAAA,CAAW,GAAGI,CAAAA,CAAS,IAAMC,CAAAA,CAAAA,CAAa,CAC/C,CAAA,CAAA,CAAA,CAGDK,CAAQR,CAAAA","file":"index.js","sourcesContent":["import dynamic from \"next/dynamic\";\nimport Head from \"next/head\";\nimport type { InferGetStaticPropsType, NextPage } from \"next/types\";\nimport type { SwaggerUIProps } from \"swagger-ui-react\";\n\nimport type getStaticProps from \"../get-static-properties-swagger\";\n\nconst SwaggerUi = dynamic(async () => await import(\"swagger-ui-react\"), { ssr: false });\n\nconst SwaggerApiDocument: (name: string, swagger?: Exclude<SwaggerUIProps, \"spec\">) => NextPage<InferGetStaticPropsType<typeof getStaticProps>> =\n (name, swagger = {}) =>\n ({ swaggerData }: InferGetStaticPropsType<typeof getStaticProps>) => (\n <>\n <Head>\n <title>{name}</title>\n <style>\n {`\nbody {\n background: #fafafa !important;\n}\n`}\n </style>\n </Head>\n\n {/* eslint-disable-next-line react/jsx-props-no-spreading */}\n <SwaggerUi {...swagger} spec={swaggerData} />\n </>\n );\n\nexport default SwaggerApiDocument;\n"]}
1
+ {"version":3,"sources":["../../../../../../src/framework/next/routes/pages/swagger/index.tsx"],"names":["SwaggerUi","dynamic","SwaggerApiDocument","name","swagger","swaggerData","jsxs","Fragment","Head","jsx","swagger_default"],"mappings":"qTAOMA,IAAAA,CAAAA,CAAYC,kBAAQ,CAAA,SAAY,MAAM,OAAO,kBAAkB,CAAG,CAAA,CAAE,GAAK,CAAA,CAAA,CAAM,CAAC,CAAA,CAEhFC,EACF,CAACC,CAAAA,CAAMC,EAAU,EAAC,GAClB,CAAC,CAAE,WAAA,CAAAC,CAAY,CAAA,GACXC,eAAAC,CAAAA,mBAAAA,CAAA,CACI,QAAAD,CAAAA,CAAAA,eAAAA,CAACE,kBAAA,CAAA,CACG,QAAAC,CAAAA,CAAAA,cAAAA,CAAC,SAAO,QAAAN,CAAAA,CAAAA,CAAK,CACbM,CAAAA,cAAAA,CAAC,OACI,CAAA,CAAA,QAAA,CAAA,CAAA;AAAA;AAAA;AAAA;AAAA,CAKL,CAAA,CAAA,CAAA,CACJ,CAGAA,CAAAA,cAAAA,CAACT,CAAA,CAAA,CAAW,GAAGI,CAAAA,CAAS,IAAMC,CAAAA,CAAAA,CAAa,CAC/C,CAAA,CAAA,CAAA,CAGDK,CAAQR,CAAAA","file":"index.js","sourcesContent":["import dynamic from \"next/dynamic\";\nimport Head from \"next/head\";\nimport type { InferGetStaticPropsType, NextPage } from \"next/types\";\nimport type { SwaggerUIProps } from \"swagger-ui-react\";\n\nimport type getStaticProps from \"../get-static-properties-swagger\";\n\nconst SwaggerUi = dynamic(async () => await import(\"swagger-ui-react\"), { ssr: false });\n\nconst SwaggerApiDocument: (name: string, swagger?: Exclude<SwaggerUIProps, \"spec\">) => NextPage<InferGetStaticPropsType<typeof getStaticProps>> =\n (name, swagger = {}) =>\n ({ swaggerData }: InferGetStaticPropsType<typeof getStaticProps>) => (\n <>\n <Head>\n <title>{name}</title>\n <style>\n {`\nbody {\n background: #fafafa !important;\n}\n`}\n </style>\n </Head>\n\n {/* eslint-disable-next-line react/jsx-props-no-spreading */}\n <SwaggerUi {...swagger} spec={swaggerData} />\n </>\n );\n\nexport default SwaggerApiDocument;\n"]}
@@ -1,14 +1,6 @@
1
- import '../../../../../chunk-HZWWJL43.mjs';
2
- import o from 'next/dynamic';
3
- import s from 'next/head';
4
- import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
5
-
6
- var g=o(async()=>await import('swagger-ui-react'),{ssr:!1}),i=(r,a={})=>({swaggerData:p})=>jsxs(Fragment,{children:[jsxs(s,{children:[jsx("title",{children:r}),jsx("style",{children:`
1
+ import'../../../../../chunk-HZWWJL43.mjs';import o from'next/dynamic';import s from'next/head';import {jsxs,Fragment,jsx}from'react/jsx-runtime';var g=o(async()=>await import('swagger-ui-react'),{ssr:!1}),i=(r,a={})=>({swaggerData:p})=>jsxs(Fragment,{children:[jsxs(s,{children:[jsx("title",{children:r}),jsx("style",{children:`
7
2
  body {
8
3
  background: #fafafa !important;
9
4
  }
10
- `})]}),jsx(g,{...a,spec:p})]}),P=i;
11
-
12
- export { P as default };
13
- //# sourceMappingURL=index.mjs.map
5
+ `})]}),jsx(g,{...a,spec:p})]}),P=i;export{P as default};//# sourceMappingURL=index.mjs.map
14
6
  //# sourceMappingURL=index.mjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../../src/framework/next/routes/pages/swagger/index.tsx"],"names":["SwaggerUi","dynamic","SwaggerApiDocument","name","swagger","swaggerData","jsxs","Fragment","Head","jsx","swagger_default"],"mappings":";;;;;AAOMA,IAAAA,CAAAA,CAAYC,CAAQ,CAAA,SAAY,MAAM,OAAO,kBAAkB,CAAG,CAAA,CAAE,GAAK,CAAA,CAAA,CAAM,CAAC,CAAA,CAEhFC,EACF,CAACC,CAAAA,CAAMC,EAAU,EAAC,GAClB,CAAC,CAAE,WAAA,CAAAC,CAAY,CAAA,GACXC,IAAAC,CAAAA,QAAAA,CAAA,CACI,QAAAD,CAAAA,CAAAA,IAAAA,CAACE,CAAA,CAAA,CACG,QAAAC,CAAAA,CAAAA,GAAAA,CAAC,SAAO,QAAAN,CAAAA,CAAAA,CAAK,CACbM,CAAAA,GAAAA,CAAC,OACI,CAAA,CAAA,QAAA,CAAA,CAAA;AAAA;AAAA;AAAA;AAAA,CAKL,CAAA,CAAA,CAAA,CACJ,CAGAA,CAAAA,GAAAA,CAACT,CAAA,CAAA,CAAW,GAAGI,CAAAA,CAAS,IAAMC,CAAAA,CAAAA,CAAa,CAC/C,CAAA,CAAA,CAAA,CAGDK,CAAQR,CAAAA","file":"index.mjs","sourcesContent":["import dynamic from \"next/dynamic\";\nimport Head from \"next/head\";\nimport type { InferGetStaticPropsType, NextPage } from \"next/types\";\nimport type { SwaggerUIProps } from \"swagger-ui-react\";\n\nimport type getStaticProps from \"../get-static-properties-swagger\";\n\nconst SwaggerUi = dynamic(async () => await import(\"swagger-ui-react\"), { ssr: false });\n\nconst SwaggerApiDocument: (name: string, swagger?: Exclude<SwaggerUIProps, \"spec\">) => NextPage<InferGetStaticPropsType<typeof getStaticProps>> =\n (name, swagger = {}) =>\n ({ swaggerData }: InferGetStaticPropsType<typeof getStaticProps>) => (\n <>\n <Head>\n <title>{name}</title>\n <style>\n {`\nbody {\n background: #fafafa !important;\n}\n`}\n </style>\n </Head>\n\n {/* eslint-disable-next-line react/jsx-props-no-spreading */}\n <SwaggerUi {...swagger} spec={swaggerData} />\n </>\n );\n\nexport default SwaggerApiDocument;\n"]}
1
+ {"version":3,"sources":["../../../../../../src/framework/next/routes/pages/swagger/index.tsx"],"names":["SwaggerUi","dynamic","SwaggerApiDocument","name","swagger","swaggerData","jsxs","Fragment","Head","jsx","swagger_default"],"mappings":"iJAOMA,IAAAA,CAAAA,CAAYC,CAAQ,CAAA,SAAY,MAAM,OAAO,kBAAkB,CAAG,CAAA,CAAE,GAAK,CAAA,CAAA,CAAM,CAAC,CAAA,CAEhFC,EACF,CAACC,CAAAA,CAAMC,EAAU,EAAC,GAClB,CAAC,CAAE,WAAA,CAAAC,CAAY,CAAA,GACXC,IAAAC,CAAAA,QAAAA,CAAA,CACI,QAAAD,CAAAA,CAAAA,IAAAA,CAACE,CAAA,CAAA,CACG,QAAAC,CAAAA,CAAAA,GAAAA,CAAC,SAAO,QAAAN,CAAAA,CAAAA,CAAK,CACbM,CAAAA,GAAAA,CAAC,OACI,CAAA,CAAA,QAAA,CAAA,CAAA;AAAA;AAAA;AAAA;AAAA,CAKL,CAAA,CAAA,CAAA,CACJ,CAGAA,CAAAA,GAAAA,CAACT,CAAA,CAAA,CAAW,GAAGI,CAAAA,CAAS,IAAMC,CAAAA,CAAAA,CAAa,CAC/C,CAAA,CAAA,CAAA,CAGDK,CAAQR,CAAAA","file":"index.mjs","sourcesContent":["import dynamic from \"next/dynamic\";\nimport Head from \"next/head\";\nimport type { InferGetStaticPropsType, NextPage } from \"next/types\";\nimport type { SwaggerUIProps } from \"swagger-ui-react\";\n\nimport type getStaticProps from \"../get-static-properties-swagger\";\n\nconst SwaggerUi = dynamic(async () => await import(\"swagger-ui-react\"), { ssr: false });\n\nconst SwaggerApiDocument: (name: string, swagger?: Exclude<SwaggerUIProps, \"spec\">) => NextPage<InferGetStaticPropsType<typeof getStaticProps>> =\n (name, swagger = {}) =>\n ({ swaggerData }: InferGetStaticPropsType<typeof getStaticProps>) => (\n <>\n <Head>\n <title>{name}</title>\n <style>\n {`\nbody {\n background: #fafafa !important;\n}\n`}\n </style>\n </Head>\n\n {/* eslint-disable-next-line react/jsx-props-no-spreading */}\n <SwaggerUi {...swagger} spec={swaggerData} />\n </>\n );\n\nexport default SwaggerApiDocument;\n"]}
@@ -1,13 +1,2 @@
1
- 'use strict';
2
-
3
- var chunkUPRO35MO_js = require('./chunk-UPRO35MO.js');
4
- require('./chunk-4C666HHU.js');
5
-
6
-
7
-
8
- Object.defineProperty(exports, "zod", {
9
- enumerable: true,
10
- get: function () { return chunkUPRO35MO_js.c; }
11
- });
12
- //# sourceMappingURL=index-browser.js.map
1
+ 'use strict';var chunkUPRO35MO_js=require('./chunk-UPRO35MO.js');require('./chunk-4C666HHU.js');Object.defineProperty(exports,"zod",{enumerable:true,get:function(){return chunkUPRO35MO_js.c}});//# sourceMappingURL=index-browser.js.map
13
2
  //# sourceMappingURL=index-browser.js.map
@@ -1,4 +1,2 @@
1
- export { c as zod } from './chunk-66EUOAFS.mjs';
2
- import './chunk-HZWWJL43.mjs';
3
- //# sourceMappingURL=index-browser.mjs.map
1
+ export{c as zod}from'./chunk-66EUOAFS.mjs';import'./chunk-HZWWJL43.mjs';//# sourceMappingURL=index-browser.mjs.map
4
2
  //# sourceMappingURL=index-browser.mjs.map
@@ -1,247 +1,3 @@
1
- 'use strict';
2
-
3
- var chunkUPRO35MO_js = require('./chunk-UPRO35MO.js');
4
- var chunkYG667K32_js = require('./chunk-YG667K32.js');
5
- require('./chunk-4C666HHU.js');
6
- var connect = require('@visulima/connect');
7
- var q = require('http-errors');
8
- var httpStatusCodes = require('http-status-codes');
9
- var x = require('ts-japi');
10
- var ee = require('debug');
11
- var Q = require('accepts');
12
- var jstoxml = require('jstoxml');
13
- var ie = require('cors');
14
-
15
- function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
16
-
17
- var q__default = /*#__PURE__*/_interopDefault(q);
18
- var x__default = /*#__PURE__*/_interopDefault(x);
19
- var ee__default = /*#__PURE__*/_interopDefault(ee);
20
- var Q__default = /*#__PURE__*/_interopDefault(Q);
21
- var ie__default = /*#__PURE__*/_interopDefault(ie);
22
-
23
- var u=(e,o)=>{let t=o.headers??{};Object.keys(t).forEach(r=>{e.setHeader(r,t[r]);});},l=(e,o)=>{e.setHeader("content-type","application/json; charset=utf-8"),e.end(JSON.stringify(o));},R=(e,o)=>{o.statusCode!==void 0&&(e.statusCode=o.statusCode),o.status!==void 0&&(e.statusCode=o.status),e.statusCode<400&&(e.statusCode=httpStatusCodes.StatusCodes.INTERNAL_SERVER_ERROR);};var z="An error occurred",U=(e,o,t)=>{if(R(t,e),u(t,e),e instanceof x__default.default.JapiError||x__default.default.JapiError.isLikeJapiError(e)){let r=new x__default.default.ErrorSerializer;l(t,r.serialize(e));}else if(e instanceof q.HttpError){let{message:r,statusCode:n,title:a}=e;l(t,{errors:[{code:n,title:a||httpStatusCodes.getReasonPhrase(n)||z,detail:r}]});}else {let{message:r}=e;l(t,{errors:[{code:"500",title:httpStatusCodes.getReasonPhrase(t.statusCode)||z,detail:r}]});}},T=U;var M="https://tools.ietf.org/html/rfc2616#section-10",C="An error occurred",F=(e,o,t)=>{let{message:r,stack:n}=e;if(e instanceof q.HttpError){let{expose:a,statusCode:s,title:i,type:d}=e;t.statusCode=s,u(t,e),l(t,{type:d||M,title:i||httpStatusCodes.getReasonPhrase(s)||C,details:r,...a?{trace:n}:{}});}else R(t,e),l(t,{type:M,title:httpStatusCodes.getReasonPhrase(t.statusCode)||C,details:r,...e.expose?{trace:n}:{}});},I=F;var h=(e,o)=>async(t,r,n)=>{let a=r.headers.accept,s=I;a==="application/vnd.api+json"&&(s=T);for(let{handler:i,regex:d}of e)if(d.test(a)){s=i;break}t.expose=o,s(t,r,n);},H=async(e,o,t)=>{let r=[...new Set(t.map(n=>n.method))].join(", ");throw o.setHeader("Allow",r),o.statusCode=405,q__default.default(405,`No route with [${e.method}] method found.`)};var O={alpn:"ALPN","c-pep":"C-PEP","c-pep-info":"C-PEP-Info","caldav-timezones":"CalDAV-Timezones","content-id":"Content-ID","content-md5":"Content-MD5",dasl:"DASL",dav:"DAV",dnt:"DNT",etag:"ETag",getprofile:"GetProfile","http2-settings":"HTTP2-Settings","last-event-id":"Last-Event-ID","mime-version":"MIME-Version","optional-www-authenticate":"Optional-WWW-Authenticate","sec-webSocket-key":"Sec-WebSocket-Key","sec-webSocket-protocol":"Sec-WebSocket-Protocol","sec-webSocket-version":"Sec-WebSocket-Version","sec-websocket-accept":"Sec-WebSocket-Accept","sec-websocket-extensions":"Sec-WebSocket-Extensions",slug:"SLUG",tcn:"TCN",te:"TE",ttl:"TTL","www-authenticate":"WWW-Authenticate","x-att-deviceid":"X-ATT-DeviceId","x-dnsprefetch-control":"X-DNSPrefetch-Control","x-uidh":"X-UIDH"},K=(e,o)=>{let t=e.toLowerCase();return o?O[t]?O[t]:t.split("-").map(r=>r[0]?.toUpperCase()+r.slice(1)).join("-"):t},Z={canonical:!1,normalizeHeaderKey:K},B=e=>{let o={...Z,...e};return async(t,r,n)=>{let a={},s={};return Object.keys(t.headers).forEach(i=>{a[i]=t.headers[i];let d=o.normalizeHeaderKey(i,o.canonical);d&&(s[d]=t.headers[i]);}),t.headers=s,t.rawHeaders=a,n()}},S=B;var G=e=>{if(typeof e!="string")return !1;try{let o=JSON.parse(e),t=Object.prototype.toString.call(o);return t==="[object Object]"||t==="[object Array]"}catch{return !1}},E=G;var $=e=>jstoxml.toXML(e,{header:!0,indent:" "}),y=$;var g="Content-Type",Y=(e,o,t,r,n)=>{if(typeof t.getHeader(g)=="string")return r;let i=[...Q__default.default(o).types(),n.defaultContentType],d=r,N=!1;return i.forEach(c=>{e.forEach(({regex:P,serializer:k})=>{P.test(c)&&(t.setHeader(g,c),d=k(d),N=!0);}),N||(/yaml|yml/.test(c)?(t.setHeader(g,c),d=chunkYG667K32_js.b(E(r)?JSON.parse(r):r)):c.includes("xml")&&(t.setHeader(g,c),d=y({[chunkYG667K32_js.a(`${o.url?.replace("/api/","")}`.trim())]:E(r)?JSON.parse(r):r})));}),d},m=Y;var te=ee__default.default("api-platform:connect:serializers-middleware"),re=(e=[],o="application/json; charset=utf-8")=>async(t,r,n)=>{if(typeof r.send=="function"){let a=r.send;r.send=s=>{r.send=a,s=m(e,t,r,s,{defaultContentType:o}),r.send(s);};}else if(typeof r.json=="function")te("response.json() is not supported by @visulima/api-platform serializer. Use response.send() or response.end() instead.");else {let a=r.end;r.end=(s,...i)=>(r.end=a,s=m(e,t,r,s,{defaultContentType:o}),r.end(s,...i));}return n()},w=re;var se=(e={})=>new connect.NodeRouter({onError:h(e.errorHandlers??[],e.showTrace??!1),onNoMatch:H}).use(S(e.middlewares?.["http-header-normalizer"]??{})).use(w(e.middlewares?.serializers?.serializers??[],e.middlewares?.serializers?.defaultContentType??"application/json; charset=utf-8")),ne=se;var de=e=>connect.expressWrapper(ie__default.default(e)),pe=de;var le=e=>e.ip??e.headers["x-forwarded-for"]??e.headers["x-real-ip"]??e.socket.remoteAddress,ce=(e,o)=>async(t,r,n)=>{let a=le(t);if(a===void 0)throw q__default.default(400,"Missing IP");try{let s=await e.consume(a),i={"Retry-After":Math.round(s.msBeforeNext/1e3)||1,"X-RateLimit-Remaining":s.remainingPoints,"X-RateLimit-Reset":new Date(Date.now()+s.msBeforeNext).toISOString(),...o};Object.keys(i).forEach(d=>{r.setHeader(d,i[d]);}),await n();}catch{throw q__default.default(429,"Too Many Requests")}},me=ce;
24
-
25
- Object.defineProperty(exports, "dateIn", {
26
- enumerable: true,
27
- get: function () { return chunkUPRO35MO_js.a; }
28
- });
29
- Object.defineProperty(exports, "dateOut", {
30
- enumerable: true,
31
- get: function () { return chunkUPRO35MO_js.b; }
32
- });
33
- Object.defineProperty(exports, "zod", {
34
- enumerable: true,
35
- get: function () { return chunkUPRO35MO_js.c; }
36
- });
37
- Object.defineProperty(exports, "swaggerHandler", {
38
- enumerable: true,
39
- get: function () { return chunkYG667K32_js.c; }
40
- });
41
- Object.defineProperty(exports, "yamlTransformer", {
42
- enumerable: true,
43
- get: function () { return chunkYG667K32_js.b; }
44
- });
45
- Object.defineProperty(exports, "EdgeRouter", {
46
- enumerable: true,
47
- get: function () { return connect.EdgeRouter; }
48
- });
49
- Object.defineProperty(exports, "NodeRouter", {
50
- enumerable: true,
51
- get: function () { return connect.NodeRouter; }
52
- });
53
- Object.defineProperty(exports, "Router", {
54
- enumerable: true,
55
- get: function () { return connect.Router; }
56
- });
57
- Object.defineProperty(exports, "createEdgeRouter", {
58
- enumerable: true,
59
- get: function () { return connect.createEdgeRouter; }
60
- });
61
- Object.defineProperty(exports, "expressWrapper", {
62
- enumerable: true,
63
- get: function () { return connect.expressWrapper; }
64
- });
65
- Object.defineProperty(exports, "sendJson", {
66
- enumerable: true,
67
- get: function () { return connect.sendJson; }
68
- });
69
- Object.defineProperty(exports, "withZod", {
70
- enumerable: true,
71
- get: function () { return connect.withZod; }
72
- });
73
- Object.defineProperty(exports, "BadGateway", {
74
- enumerable: true,
75
- get: function () { return q.BadGateway; }
76
- });
77
- Object.defineProperty(exports, "BadRequest", {
78
- enumerable: true,
79
- get: function () { return q.BadRequest; }
80
- });
81
- Object.defineProperty(exports, "BandwidthLimitExceeded", {
82
- enumerable: true,
83
- get: function () { return q.BandwidthLimitExceeded; }
84
- });
85
- Object.defineProperty(exports, "Conflict", {
86
- enumerable: true,
87
- get: function () { return q.Conflict; }
88
- });
89
- Object.defineProperty(exports, "ExpectationFailed", {
90
- enumerable: true,
91
- get: function () { return q.ExpectationFailed; }
92
- });
93
- Object.defineProperty(exports, "FailedDependency", {
94
- enumerable: true,
95
- get: function () { return q.FailedDependency; }
96
- });
97
- Object.defineProperty(exports, "Forbidden", {
98
- enumerable: true,
99
- get: function () { return q.Forbidden; }
100
- });
101
- Object.defineProperty(exports, "GatewayTimeout", {
102
- enumerable: true,
103
- get: function () { return q.GatewayTimeout; }
104
- });
105
- Object.defineProperty(exports, "Gone", {
106
- enumerable: true,
107
- get: function () { return q.Gone; }
108
- });
109
- Object.defineProperty(exports, "HTTPVersionNotSupported", {
110
- enumerable: true,
111
- get: function () { return q.HTTPVersionNotSupported; }
112
- });
113
- Object.defineProperty(exports, "ImATeapot", {
114
- enumerable: true,
115
- get: function () { return q.ImATeapot; }
116
- });
117
- Object.defineProperty(exports, "InsufficientStorage", {
118
- enumerable: true,
119
- get: function () { return q.InsufficientStorage; }
120
- });
121
- Object.defineProperty(exports, "InternalServerError", {
122
- enumerable: true,
123
- get: function () { return q.InternalServerError; }
124
- });
125
- Object.defineProperty(exports, "LengthRequired", {
126
- enumerable: true,
127
- get: function () { return q.LengthRequired; }
128
- });
129
- Object.defineProperty(exports, "Locked", {
130
- enumerable: true,
131
- get: function () { return q.Locked; }
132
- });
133
- Object.defineProperty(exports, "LoopDetected", {
134
- enumerable: true,
135
- get: function () { return q.LoopDetected; }
136
- });
137
- Object.defineProperty(exports, "MethodNotAllowed", {
138
- enumerable: true,
139
- get: function () { return q.MethodNotAllowed; }
140
- });
141
- Object.defineProperty(exports, "MisdirectedRequest", {
142
- enumerable: true,
143
- get: function () { return q.MisdirectedRequest; }
144
- });
145
- Object.defineProperty(exports, "NetworkAuthenticationRequire", {
146
- enumerable: true,
147
- get: function () { return q.NetworkAuthenticationRequire; }
148
- });
149
- Object.defineProperty(exports, "NotAcceptable", {
150
- enumerable: true,
151
- get: function () { return q.NotAcceptable; }
152
- });
153
- Object.defineProperty(exports, "NotExtended", {
154
- enumerable: true,
155
- get: function () { return q.NotExtended; }
156
- });
157
- Object.defineProperty(exports, "NotFound", {
158
- enumerable: true,
159
- get: function () { return q.NotFound; }
160
- });
161
- Object.defineProperty(exports, "NotImplemented", {
162
- enumerable: true,
163
- get: function () { return q.NotImplemented; }
164
- });
165
- Object.defineProperty(exports, "PayloadTooLarge", {
166
- enumerable: true,
167
- get: function () { return q.PayloadTooLarge; }
168
- });
169
- Object.defineProperty(exports, "PaymentRequired", {
170
- enumerable: true,
171
- get: function () { return q.PaymentRequired; }
172
- });
173
- Object.defineProperty(exports, "PreconditionFailed", {
174
- enumerable: true,
175
- get: function () { return q.PreconditionFailed; }
176
- });
177
- Object.defineProperty(exports, "PreconditionRequired", {
178
- enumerable: true,
179
- get: function () { return q.PreconditionRequired; }
180
- });
181
- Object.defineProperty(exports, "ProxyAuthenticationRequired", {
182
- enumerable: true,
183
- get: function () { return q.ProxyAuthenticationRequired; }
184
- });
185
- Object.defineProperty(exports, "RangeNotSatisfiable", {
186
- enumerable: true,
187
- get: function () { return q.RangeNotSatisfiable; }
188
- });
189
- Object.defineProperty(exports, "RequestHeaderFieldsTooLarge", {
190
- enumerable: true,
191
- get: function () { return q.RequestHeaderFieldsTooLarge; }
192
- });
193
- Object.defineProperty(exports, "RequestTimeout", {
194
- enumerable: true,
195
- get: function () { return q.RequestTimeout; }
196
- });
197
- Object.defineProperty(exports, "ServiceUnavailable", {
198
- enumerable: true,
199
- get: function () { return q.ServiceUnavailable; }
200
- });
201
- Object.defineProperty(exports, "TooManyRequests", {
202
- enumerable: true,
203
- get: function () { return q.TooManyRequests; }
204
- });
205
- Object.defineProperty(exports, "URITooLong", {
206
- enumerable: true,
207
- get: function () { return q.URITooLong; }
208
- });
209
- Object.defineProperty(exports, "Unauthorized", {
210
- enumerable: true,
211
- get: function () { return q.Unauthorized; }
212
- });
213
- Object.defineProperty(exports, "UnavailableForLegalReasons", {
214
- enumerable: true,
215
- get: function () { return q.UnavailableForLegalReasons; }
216
- });
217
- Object.defineProperty(exports, "UnprocessableEntity", {
218
- enumerable: true,
219
- get: function () { return q.UnprocessableEntity; }
220
- });
221
- Object.defineProperty(exports, "UnsupportedMediaType", {
222
- enumerable: true,
223
- get: function () { return q.UnsupportedMediaType; }
224
- });
225
- Object.defineProperty(exports, "UpgradeRequired", {
226
- enumerable: true,
227
- get: function () { return q.UpgradeRequired; }
228
- });
229
- Object.defineProperty(exports, "VariantAlsoNegotiates", {
230
- enumerable: true,
231
- get: function () { return q.VariantAlsoNegotiates; }
232
- });
233
- Object.defineProperty(exports, "createHttpError", {
234
- enumerable: true,
235
- get: function () { return q__default.default; }
236
- });
237
- exports.corsMiddleware = pe;
238
- exports.createNodeRouter = ne;
239
- exports.httpHeaderNormalizerMiddleware = S;
240
- exports.onError = h;
241
- exports.onNoMatch = H;
242
- exports.rateLimiterMiddleware = me;
243
- exports.serialize = m;
244
- exports.serializersMiddleware = w;
245
- exports.xmlTransformer = y;
246
- //# sourceMappingURL=index-server.js.map
1
+ 'use strict';var chunkUPRO35MO_js=require('./chunk-UPRO35MO.js'),chunkYG667K32_js=require('./chunk-YG667K32.js');require('./chunk-4C666HHU.js');var connect=require('@visulima/connect'),q=require('http-errors'),httpStatusCodes=require('http-status-codes'),x=require('ts-japi'),ee=require('debug'),Q=require('accepts'),jstoxml=require('jstoxml'),ie=require('cors');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var q__default=/*#__PURE__*/_interopDefault(q);var x__default=/*#__PURE__*/_interopDefault(x);var ee__default=/*#__PURE__*/_interopDefault(ee);var Q__default=/*#__PURE__*/_interopDefault(Q);var ie__default=/*#__PURE__*/_interopDefault(ie);var u=(e,o)=>{let t=o.headers??{};Object.keys(t).forEach(r=>{e.setHeader(r,t[r]);});},l=(e,o)=>{e.setHeader("content-type","application/json; charset=utf-8"),e.end(JSON.stringify(o));},R=(e,o)=>{o.statusCode!==void 0&&(e.statusCode=o.statusCode),o.status!==void 0&&(e.statusCode=o.status),e.statusCode<400&&(e.statusCode=httpStatusCodes.StatusCodes.INTERNAL_SERVER_ERROR);};var z="An error occurred",U=(e,o,t)=>{if(R(t,e),u(t,e),e instanceof x__default.default.JapiError||x__default.default.JapiError.isLikeJapiError(e)){let r=new x__default.default.ErrorSerializer;l(t,r.serialize(e));}else if(e instanceof q.HttpError){let{message:r,statusCode:n,title:a}=e;l(t,{errors:[{code:n,title:a||httpStatusCodes.getReasonPhrase(n)||z,detail:r}]});}else {let{message:r}=e;l(t,{errors:[{code:"500",title:httpStatusCodes.getReasonPhrase(t.statusCode)||z,detail:r}]});}},T=U;var M="https://tools.ietf.org/html/rfc2616#section-10",C="An error occurred",F=(e,o,t)=>{let{message:r,stack:n}=e;if(e instanceof q.HttpError){let{expose:a,statusCode:s,title:i,type:d}=e;t.statusCode=s,u(t,e),l(t,{type:d||M,title:i||httpStatusCodes.getReasonPhrase(s)||C,details:r,...a?{trace:n}:{}});}else R(t,e),l(t,{type:M,title:httpStatusCodes.getReasonPhrase(t.statusCode)||C,details:r,...e.expose?{trace:n}:{}});},I=F;var h=(e,o)=>async(t,r,n)=>{let a=r.headers.accept,s=I;a==="application/vnd.api+json"&&(s=T);for(let{handler:i,regex:d}of e)if(d.test(a)){s=i;break}t.expose=o,s(t,r,n);},H=async(e,o,t)=>{let r=[...new Set(t.map(n=>n.method))].join(", ");throw o.setHeader("Allow",r),o.statusCode=405,q__default.default(405,`No route with [${e.method}] method found.`)};var O={alpn:"ALPN","c-pep":"C-PEP","c-pep-info":"C-PEP-Info","caldav-timezones":"CalDAV-Timezones","content-id":"Content-ID","content-md5":"Content-MD5",dasl:"DASL",dav:"DAV",dnt:"DNT",etag:"ETag",getprofile:"GetProfile","http2-settings":"HTTP2-Settings","last-event-id":"Last-Event-ID","mime-version":"MIME-Version","optional-www-authenticate":"Optional-WWW-Authenticate","sec-webSocket-key":"Sec-WebSocket-Key","sec-webSocket-protocol":"Sec-WebSocket-Protocol","sec-webSocket-version":"Sec-WebSocket-Version","sec-websocket-accept":"Sec-WebSocket-Accept","sec-websocket-extensions":"Sec-WebSocket-Extensions",slug:"SLUG",tcn:"TCN",te:"TE",ttl:"TTL","www-authenticate":"WWW-Authenticate","x-att-deviceid":"X-ATT-DeviceId","x-dnsprefetch-control":"X-DNSPrefetch-Control","x-uidh":"X-UIDH"},K=(e,o)=>{let t=e.toLowerCase();return o?O[t]?O[t]:t.split("-").map(r=>r[0]?.toUpperCase()+r.slice(1)).join("-"):t},Z={canonical:!1,normalizeHeaderKey:K},B=e=>{let o={...Z,...e};return async(t,r,n)=>{let a={},s={};return Object.keys(t.headers).forEach(i=>{a[i]=t.headers[i];let d=o.normalizeHeaderKey(i,o.canonical);d&&(s[d]=t.headers[i]);}),t.headers=s,t.rawHeaders=a,n()}},S=B;var G=e=>{if(typeof e!="string")return !1;try{let o=JSON.parse(e),t=Object.prototype.toString.call(o);return t==="[object Object]"||t==="[object Array]"}catch{return !1}},E=G;var $=e=>jstoxml.toXML(e,{header:!0,indent:" "}),y=$;var g="Content-Type",Y=(e,o,t,r,n)=>{if(typeof t.getHeader(g)=="string")return r;let i=[...Q__default.default(o).types(),n.defaultContentType],d=r,N=!1;return i.forEach(c=>{e.forEach(({regex:P,serializer:k})=>{P.test(c)&&(t.setHeader(g,c),d=k(d),N=!0);}),N||(/yaml|yml/.test(c)?(t.setHeader(g,c),d=chunkYG667K32_js.b(E(r)?JSON.parse(r):r)):c.includes("xml")&&(t.setHeader(g,c),d=y({[chunkYG667K32_js.a(`${o.url?.replace("/api/","")}`.trim())]:E(r)?JSON.parse(r):r})));}),d},m=Y;var te=ee__default.default("api-platform:connect:serializers-middleware"),re=(e=[],o="application/json; charset=utf-8")=>async(t,r,n)=>{if(typeof r.send=="function"){let a=r.send;r.send=s=>{r.send=a,s=m(e,t,r,s,{defaultContentType:o}),r.send(s);};}else if(typeof r.json=="function")te("response.json() is not supported by @visulima/api-platform serializer. Use response.send() or response.end() instead.");else {let a=r.end;r.end=(s,...i)=>(r.end=a,s=m(e,t,r,s,{defaultContentType:o}),r.end(s,...i));}return n()},w=re;var se=(e={})=>new connect.NodeRouter({onError:h(e.errorHandlers??[],e.showTrace??!1),onNoMatch:H}).use(S(e.middlewares?.["http-header-normalizer"]??{})).use(w(e.middlewares?.serializers?.serializers??[],e.middlewares?.serializers?.defaultContentType??"application/json; charset=utf-8")),ne=se;var de=e=>connect.expressWrapper(ie__default.default(e)),pe=de;var le=e=>e.ip??e.headers["x-forwarded-for"]??e.headers["x-real-ip"]??e.socket.remoteAddress,ce=(e,o)=>async(t,r,n)=>{let a=le(t);if(a===void 0)throw q__default.default(400,"Missing IP");try{let s=await e.consume(a),i={"Retry-After":Math.round(s.msBeforeNext/1e3)||1,"X-RateLimit-Remaining":s.remainingPoints,"X-RateLimit-Reset":new Date(Date.now()+s.msBeforeNext).toISOString(),...o};Object.keys(i).forEach(d=>{r.setHeader(d,i[d]);}),await n();}catch{throw q__default.default(429,"Too Many Requests")}},me=ce;
2
+ Object.defineProperty(exports,"dateIn",{enumerable:true,get:function(){return chunkUPRO35MO_js.a}});Object.defineProperty(exports,"dateOut",{enumerable:true,get:function(){return chunkUPRO35MO_js.b}});Object.defineProperty(exports,"zod",{enumerable:true,get:function(){return chunkUPRO35MO_js.c}});Object.defineProperty(exports,"swaggerHandler",{enumerable:true,get:function(){return chunkYG667K32_js.c}});Object.defineProperty(exports,"yamlTransformer",{enumerable:true,get:function(){return chunkYG667K32_js.b}});Object.defineProperty(exports,"EdgeRouter",{enumerable:true,get:function(){return connect.EdgeRouter}});Object.defineProperty(exports,"NodeRouter",{enumerable:true,get:function(){return connect.NodeRouter}});Object.defineProperty(exports,"Router",{enumerable:true,get:function(){return connect.Router}});Object.defineProperty(exports,"createEdgeRouter",{enumerable:true,get:function(){return connect.createEdgeRouter}});Object.defineProperty(exports,"expressWrapper",{enumerable:true,get:function(){return connect.expressWrapper}});Object.defineProperty(exports,"sendJson",{enumerable:true,get:function(){return connect.sendJson}});Object.defineProperty(exports,"withZod",{enumerable:true,get:function(){return connect.withZod}});Object.defineProperty(exports,"BadGateway",{enumerable:true,get:function(){return q.BadGateway}});Object.defineProperty(exports,"BadRequest",{enumerable:true,get:function(){return q.BadRequest}});Object.defineProperty(exports,"BandwidthLimitExceeded",{enumerable:true,get:function(){return q.BandwidthLimitExceeded}});Object.defineProperty(exports,"Conflict",{enumerable:true,get:function(){return q.Conflict}});Object.defineProperty(exports,"ExpectationFailed",{enumerable:true,get:function(){return q.ExpectationFailed}});Object.defineProperty(exports,"FailedDependency",{enumerable:true,get:function(){return q.FailedDependency}});Object.defineProperty(exports,"Forbidden",{enumerable:true,get:function(){return q.Forbidden}});Object.defineProperty(exports,"GatewayTimeout",{enumerable:true,get:function(){return q.GatewayTimeout}});Object.defineProperty(exports,"Gone",{enumerable:true,get:function(){return q.Gone}});Object.defineProperty(exports,"HTTPVersionNotSupported",{enumerable:true,get:function(){return q.HTTPVersionNotSupported}});Object.defineProperty(exports,"ImATeapot",{enumerable:true,get:function(){return q.ImATeapot}});Object.defineProperty(exports,"InsufficientStorage",{enumerable:true,get:function(){return q.InsufficientStorage}});Object.defineProperty(exports,"InternalServerError",{enumerable:true,get:function(){return q.InternalServerError}});Object.defineProperty(exports,"LengthRequired",{enumerable:true,get:function(){return q.LengthRequired}});Object.defineProperty(exports,"Locked",{enumerable:true,get:function(){return q.Locked}});Object.defineProperty(exports,"LoopDetected",{enumerable:true,get:function(){return q.LoopDetected}});Object.defineProperty(exports,"MethodNotAllowed",{enumerable:true,get:function(){return q.MethodNotAllowed}});Object.defineProperty(exports,"MisdirectedRequest",{enumerable:true,get:function(){return q.MisdirectedRequest}});Object.defineProperty(exports,"NetworkAuthenticationRequire",{enumerable:true,get:function(){return q.NetworkAuthenticationRequire}});Object.defineProperty(exports,"NotAcceptable",{enumerable:true,get:function(){return q.NotAcceptable}});Object.defineProperty(exports,"NotExtended",{enumerable:true,get:function(){return q.NotExtended}});Object.defineProperty(exports,"NotFound",{enumerable:true,get:function(){return q.NotFound}});Object.defineProperty(exports,"NotImplemented",{enumerable:true,get:function(){return q.NotImplemented}});Object.defineProperty(exports,"PayloadTooLarge",{enumerable:true,get:function(){return q.PayloadTooLarge}});Object.defineProperty(exports,"PaymentRequired",{enumerable:true,get:function(){return q.PaymentRequired}});Object.defineProperty(exports,"PreconditionFailed",{enumerable:true,get:function(){return q.PreconditionFailed}});Object.defineProperty(exports,"PreconditionRequired",{enumerable:true,get:function(){return q.PreconditionRequired}});Object.defineProperty(exports,"ProxyAuthenticationRequired",{enumerable:true,get:function(){return q.ProxyAuthenticationRequired}});Object.defineProperty(exports,"RangeNotSatisfiable",{enumerable:true,get:function(){return q.RangeNotSatisfiable}});Object.defineProperty(exports,"RequestHeaderFieldsTooLarge",{enumerable:true,get:function(){return q.RequestHeaderFieldsTooLarge}});Object.defineProperty(exports,"RequestTimeout",{enumerable:true,get:function(){return q.RequestTimeout}});Object.defineProperty(exports,"ServiceUnavailable",{enumerable:true,get:function(){return q.ServiceUnavailable}});Object.defineProperty(exports,"TooManyRequests",{enumerable:true,get:function(){return q.TooManyRequests}});Object.defineProperty(exports,"URITooLong",{enumerable:true,get:function(){return q.URITooLong}});Object.defineProperty(exports,"Unauthorized",{enumerable:true,get:function(){return q.Unauthorized}});Object.defineProperty(exports,"UnavailableForLegalReasons",{enumerable:true,get:function(){return q.UnavailableForLegalReasons}});Object.defineProperty(exports,"UnprocessableEntity",{enumerable:true,get:function(){return q.UnprocessableEntity}});Object.defineProperty(exports,"UnsupportedMediaType",{enumerable:true,get:function(){return q.UnsupportedMediaType}});Object.defineProperty(exports,"UpgradeRequired",{enumerable:true,get:function(){return q.UpgradeRequired}});Object.defineProperty(exports,"VariantAlsoNegotiates",{enumerable:true,get:function(){return q.VariantAlsoNegotiates}});Object.defineProperty(exports,"createHttpError",{enumerable:true,get:function(){return q__default.default}});exports.corsMiddleware=pe;exports.createNodeRouter=ne;exports.httpHeaderNormalizerMiddleware=S;exports.onError=h;exports.onNoMatch=H;exports.rateLimiterMiddleware=me;exports.serialize=m;exports.serializersMiddleware=w;exports.xmlTransformer=y;//# sourceMappingURL=index-server.js.map
247
3
  //# sourceMappingURL=index-server.js.map