@visulima/api-platform 2.0.0 → 2.0.1

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 (58) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/dist/{chunk-AB7BFRZY.mjs → chunk-FP5U4CV5.mjs} +3 -3
  3. package/dist/chunk-GI7VS3DY.mjs +7 -0
  4. package/dist/chunk-GI7VS3DY.mjs.map +1 -0
  5. package/dist/{chunk-Z6VLWWDV.js → chunk-IRR5W2VO.js} +13 -13
  6. package/dist/{chunk-WYXGSYH5.js → chunk-JSH2MOOI.js} +5 -5
  7. package/dist/{chunk-KJPWKW4M.mjs → chunk-L4XBKO3Q.mjs} +7 -7
  8. package/dist/{chunk-KJPWKW4M.mjs.map → chunk-L4XBKO3Q.mjs.map} +1 -1
  9. package/dist/chunk-MYU5ZKUN.js +13 -0
  10. package/dist/chunk-MYU5ZKUN.js.map +1 -0
  11. package/dist/chunk-TTZOSRGR.mjs +17 -0
  12. package/dist/{chunk-7PP5RUGR.js.map → chunk-TTZOSRGR.mjs.map} +1 -1
  13. package/dist/chunk-U6GO6MGJ.js +24 -0
  14. package/dist/{chunk-FGLO2Y7X.mjs.map → chunk-U6GO6MGJ.js.map} +1 -1
  15. package/dist/framework/cli/commander/index.js +3 -3
  16. package/dist/framework/cli/commander/index.mjs +3 -3
  17. package/dist/framework/cli/index.js +2 -2
  18. package/dist/framework/cli/index.mjs +1 -1
  19. package/dist/framework/next/index-browser.d.mts +1 -1
  20. package/dist/framework/next/index-browser.d.ts +1 -1
  21. package/dist/framework/next/index-browser.js +2 -2
  22. package/dist/framework/next/index-browser.mjs +1 -1
  23. package/dist/framework/next/index-server.d.mts +1 -1
  24. package/dist/framework/next/index-server.d.ts +1 -1
  25. package/dist/framework/next/index-server.js +9 -9
  26. package/dist/framework/next/index-server.js.map +1 -1
  27. package/dist/framework/next/index-server.mjs +6 -6
  28. package/dist/framework/next/index-server.mjs.map +1 -1
  29. package/dist/framework/next/routes/pages/redoc/index.d.mts +1 -1
  30. package/dist/framework/next/routes/pages/redoc/index.d.ts +1 -1
  31. package/dist/framework/next/routes/pages/redoc/index.js +3 -3
  32. package/dist/framework/next/routes/pages/redoc/index.js.map +1 -1
  33. package/dist/framework/next/routes/pages/redoc/index.mjs +3 -3
  34. package/dist/framework/next/routes/pages/redoc/index.mjs.map +1 -1
  35. package/dist/framework/next/routes/pages/swagger/index.d.mts +1 -1
  36. package/dist/framework/next/routes/pages/swagger/index.d.ts +1 -1
  37. package/dist/framework/next/routes/pages/swagger/index.js +5 -5
  38. package/dist/framework/next/routes/pages/swagger/index.js.map +1 -1
  39. package/dist/framework/next/routes/pages/swagger/index.mjs +4 -4
  40. package/dist/framework/next/routes/pages/swagger/index.mjs.map +1 -1
  41. package/dist/index-browser.js +2 -2
  42. package/dist/index-browser.mjs +1 -1
  43. package/dist/index-server.d.mts +1 -1
  44. package/dist/index-server.d.ts +1 -1
  45. package/dist/index-server.js +71 -71
  46. package/dist/index-server.js.map +1 -1
  47. package/dist/index-server.mjs +11 -11
  48. package/dist/index-server.mjs.map +1 -1
  49. package/package.json +48 -18
  50. package/dist/chunk-3GKT5H3V.js +0 -13
  51. package/dist/chunk-3GKT5H3V.js.map +0 -1
  52. package/dist/chunk-7PP5RUGR.js +0 -24
  53. package/dist/chunk-FGLO2Y7X.mjs +0 -17
  54. package/dist/chunk-IGJDNXIE.mjs +0 -7
  55. package/dist/chunk-IGJDNXIE.mjs.map +0 -1
  56. /package/dist/{chunk-AB7BFRZY.mjs.map → chunk-FP5U4CV5.mjs.map} +0 -0
  57. /package/dist/{chunk-Z6VLWWDV.js.map → chunk-IRR5W2VO.js.map} +0 -0
  58. /package/dist/{chunk-WYXGSYH5.js.map → chunk-JSH2MOOI.js.map} +0 -0
@@ -1,4 +1,4 @@
1
- export { a as getSwaggerStaticProps } from '../../chunk-IGJDNXIE.mjs';
1
+ export { a as getSwaggerStaticProps } from '../../chunk-GI7VS3DY.mjs';
2
2
  import '../../chunk-XIJ2ZQRX.mjs';
3
3
  //# sourceMappingURL=out.js.map
4
4
  //# sourceMappingURL=index-browser.mjs.map
@@ -1,7 +1,7 @@
1
1
  export { getSwaggerStaticProps } from './index-browser.mjs';
2
2
  import { S as SwaggerHandlerOptions } from '../../swagger-handler-1f05481b.js';
3
3
  import { BaseDefinition } from '@visulima/jsdoc-open-api';
4
- import { NextConfig } from 'next';
4
+ import { NextConfig } from 'next/types';
5
5
  import 'node:http';
6
6
  import '@visulima/crud';
7
7
  import 'openapi-types';
@@ -1,7 +1,7 @@
1
1
  export { getSwaggerStaticProps } from './index-browser.js';
2
2
  import { S as SwaggerHandlerOptions } from '../../swagger-handler-1f05481b.js';
3
3
  import { BaseDefinition } from '@visulima/jsdoc-open-api';
4
- import { NextConfig } from 'next';
4
+ import { NextConfig } from 'next/types';
5
5
  import 'node:http';
6
6
  import '@visulima/crud';
7
7
  import 'openapi-types';
@@ -1,24 +1,24 @@
1
1
  'use strict';
2
2
 
3
- var chunkZ6VLWWDV_js = require('../../chunk-Z6VLWWDV.js');
4
- var chunk3GKT5H3V_js = require('../../chunk-3GKT5H3V.js');
3
+ var chunkIRR5W2VO_js = require('../../chunk-IRR5W2VO.js');
4
+ var chunkMYU5ZKUN_js = require('../../chunk-MYU5ZKUN.js');
5
5
  require('../../chunk-4D6JZ4TL.js');
6
- var l = require('fs');
7
- var d = require('path');
6
+ var d = require('fs');
7
+ var w = require('path');
8
8
  var jsdocOpenApi = require('@visulima/jsdoc-open-api');
9
9
 
10
10
  function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
11
11
 
12
- var l__default = /*#__PURE__*/_interopDefault(l);
13
12
  var d__default = /*#__PURE__*/_interopDefault(d);
13
+ var w__default = /*#__PURE__*/_interopDefault(w);
14
14
 
15
- var f=(t={})=>chunkZ6VLWWDV_js.c(t),m=f;var u=({definition:t,output:r="swagger/swagger.json",sources:s,verbose:p})=>o=>({...o,webpack:(e,i)=>{if(!i.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 jsdocOpenApi.SwaggerCompilerPlugin(`${i.dir}/${r}`,s.map(g=>{let a=d__default.default.join(i.dir,g.replace("./",""));return l__default.default.lstatSync(a).isDirectory(),a}),{openapi:"3.0.0",...t},{verbose:p})]},typeof o.webpack=="function"?o.webpack(e,i):e}}),c=u;
15
+ var m=(i={})=>chunkIRR5W2VO_js.c(i),l=m;var u=({definition:i,output:r="swagger/swagger.json",sources:p,verbose:g})=>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 jsdocOpenApi.SwaggerCompilerPlugin(`${t.dir}/${r}`,p.map(f=>{let a=w__default.default.join(t.dir,f.replace("./",""));return d__default.default.lstatSync(a).isDirectory(),a}),{openapi:"3.0.0",...i},{verbose:g})]},typeof o.webpack=="function"?o.webpack(e,t):e}}),x=u;
16
16
 
17
17
  Object.defineProperty(exports, 'getSwaggerStaticProps', {
18
18
  enumerable: true,
19
- get: function () { return chunk3GKT5H3V_js.a; }
19
+ get: function () { return chunkMYU5ZKUN_js.a; }
20
20
  });
21
- exports.swaggerApiRoute = m;
22
- exports.withOpenApi = c;
21
+ exports.swaggerApiRoute = l;
22
+ exports.withOpenApi = x;
23
23
  //# sourceMappingURL=out.js.map
24
24
  //# sourceMappingURL=index-server.js.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","fs","path","SwaggerCompilerPlugin","withOpenApi","definition","output","sources","verbose","nextConfig","config","source","combinedPath","with_open_api_default"],"mappings":"wHAOA,IAAMA,EAAsH,CAACC,EAAU,CAAC,IACpIC,EAAeD,CAAO,EAGnBE,EAAQH,ECXf,OAAOI,MAAQ,KACf,OAAOC,MAAU,OAEjB,OAAS,yBAAAC,MAA6B,2BAKtC,IAAMC,EACF,CAAC,CACG,WAAAC,EACA,OAAAC,EAAS,uBACT,QAAAC,EACA,QAAAC,CACJ,IAMCC,IACI,CACG,GAAGA,EACH,QAAS,CAACC,EAAuBZ,IAAiB,CAC9C,GAAI,CAACA,EAAQ,SACT,OAAOY,EAQX,GALIJ,EAAO,WAAW,GAAG,IAErBA,EAASA,EAAO,MAAM,CAAC,GAGvB,CAACA,EAAO,SAAS,OAAO,EACxB,MAAM,IAAI,MAAM,qCAAqC,EA6BzD,OAzBAI,EAAS,CACL,GAAGA,EACH,QAAS,CAEL,GAAGA,EAAO,QACV,IAAIP,EACA,GAAGL,EAAQ,GAAG,IAAIQ,CAAM,GACxBC,EAAQ,IAAKI,GAAW,CACpB,IAAMC,EAAeV,EAAK,KAAKJ,EAAQ,IAAea,EAAO,QAAQ,KAAM,EAAE,CAAC,EAG9E,OAAAV,EAAG,UAAUW,CAAY,EAAE,YAAY,EAEhCA,CACX,CAAC,EACD,CAEI,QAAS,QACT,GAAGP,CACP,EACA,CAAE,QAAAG,CAAQ,CACd,CACJ,CACJ,EAEI,OAAOC,EAAW,SAAY,WACvBA,EAAW,QAAQC,EAAQZ,CAAO,EAGtCY,CACX,CACJ,GAEDG,EAAQT","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 etc/no-deprecated\nexport default swaggerApiRoute;\n","import fs from \"node:fs\";\nimport path from \"node:path\";\nimport type { BaseDefinition } from \"@visulima/jsdoc-open-api\";\nimport { SwaggerCompilerPlugin } from \"@visulima/jsdoc-open-api\";\nimport type { NextConfig } from \"next\";\nimport type { NextJsWebpackConfig } from \"next/dist/server/config-shared\";\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: any) => {\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 = path.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","fs","path","SwaggerCompilerPlugin","withOpenApi","definition","output","sources","verbose","nextConfig","config","source","combinedPath","with_open_api_default"],"mappings":"wHAOA,IAAMA,EAAsH,CAACC,EAAU,CAAC,IACpIC,EAAeD,CAAO,EAGnBE,EAAQH,ECXf,OAAOI,MAAQ,KACf,OAAOC,MAAU,OAEjB,OAAS,yBAAAC,MAA6B,2BAKtC,IAAMC,EACF,CAAC,CACG,WAAAC,EACA,OAAAC,EAAS,uBACT,QAAAC,EACA,QAAAC,CACJ,IAMCC,IACI,CACG,GAAGA,EACH,QAAS,CAACC,EAAuBZ,IAAkC,CAC/D,GAAI,CAACA,EAAQ,SACT,OAAOY,EAQX,GALIJ,EAAO,WAAW,GAAG,IAErBA,EAASA,EAAO,MAAM,CAAC,GAGvB,CAACA,EAAO,SAAS,OAAO,EACxB,MAAM,IAAI,MAAM,qCAAqC,EA6BzD,OAzBAI,EAAS,CACL,GAAGA,EACH,QAAS,CAEL,GAAGA,EAAO,QACV,IAAIP,EACA,GAAGL,EAAQ,GAAG,IAAIQ,CAAM,GACxBC,EAAQ,IAAKI,GAAW,CACpB,IAAMC,EAAeV,EAAK,KAAKJ,EAAQ,IAAea,EAAO,QAAQ,KAAM,EAAE,CAAC,EAG9E,OAAAV,EAAG,UAAUW,CAAY,EAAE,YAAY,EAEhCA,CACX,CAAC,EACD,CAEI,QAAS,QACT,GAAGP,CACP,EACA,CAAE,QAAAG,CAAQ,CACd,CACJ,CACJ,EAEI,OAAOC,EAAW,SAAY,WACvBA,EAAW,QAAQC,EAAQZ,CAAO,EAGtCY,CACX,CACJ,GAEDG,EAAQT","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 etc/no-deprecated\nexport default swaggerApiRoute;\n","import fs from \"node:fs\";\nimport path from \"node:path\";\nimport type { BaseDefinition } from \"@visulima/jsdoc-open-api\";\nimport { SwaggerCompilerPlugin } from \"@visulima/jsdoc-open-api\";\nimport type { NextConfig } from \"next/types\";\nimport type { NextJsWebpackConfig, WebpackConfigContext } from \"next/dist/server/config-shared\";\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 = path.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,12 @@
1
- import { c as c$1 } from '../../chunk-KJPWKW4M.mjs';
2
- export { a as getSwaggerStaticProps } from '../../chunk-IGJDNXIE.mjs';
1
+ import { c } from '../../chunk-L4XBKO3Q.mjs';
2
+ export { a as getSwaggerStaticProps } from '../../chunk-GI7VS3DY.mjs';
3
3
  import '../../chunk-XIJ2ZQRX.mjs';
4
- import l from 'fs';
5
- import d from 'path';
4
+ import w from 'fs';
5
+ import c$1 from 'path';
6
6
  import { SwaggerCompilerPlugin } from '@visulima/jsdoc-open-api';
7
7
 
8
- var f=(t={})=>c$1(t),m=f;var u=({definition:t,output:r="swagger/swagger.json",sources:s,verbose:p})=>o=>({...o,webpack:(e,i)=>{if(!i.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(`${i.dir}/${r}`,s.map(g=>{let a=d.join(i.dir,g.replace("./",""));return l.lstatSync(a).isDirectory(),a}),{openapi:"3.0.0",...t},{verbose:p})]},typeof o.webpack=="function"?o.webpack(e,i):e}}),c=u;
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 a=c$1.join(t.dir,m.replace("./",""));return w.lstatSync(a).isDirectory(),a}),{openapi:"3.0.0",...i},{verbose:f})]},typeof o.webpack=="function"?o.webpack(e,t):e}}),C=x;
9
9
 
10
- export { m as swaggerApiRoute, c as withOpenApi };
10
+ export { d as swaggerApiRoute, C as withOpenApi };
11
11
  //# sourceMappingURL=out.js.map
12
12
  //# 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","fs","path","SwaggerCompilerPlugin","withOpenApi","definition","output","sources","verbose","nextConfig","config","source","combinedPath","with_open_api_default"],"mappings":"2HAOA,IAAMA,EAAsH,CAACC,EAAU,CAAC,IACpIC,EAAeD,CAAO,EAGnBE,EAAQH,ECXf,OAAOI,MAAQ,KACf,OAAOC,MAAU,OAEjB,OAAS,yBAAAC,MAA6B,2BAKtC,IAAMC,EACF,CAAC,CACG,WAAAC,EACA,OAAAC,EAAS,uBACT,QAAAC,EACA,QAAAC,CACJ,IAMCC,IACI,CACG,GAAGA,EACH,QAAS,CAACC,EAAuBZ,IAAiB,CAC9C,GAAI,CAACA,EAAQ,SACT,OAAOY,EAQX,GALIJ,EAAO,WAAW,GAAG,IAErBA,EAASA,EAAO,MAAM,CAAC,GAGvB,CAACA,EAAO,SAAS,OAAO,EACxB,MAAM,IAAI,MAAM,qCAAqC,EA6BzD,OAzBAI,EAAS,CACL,GAAGA,EACH,QAAS,CAEL,GAAGA,EAAO,QACV,IAAIP,EACA,GAAGL,EAAQ,GAAG,IAAIQ,CAAM,GACxBC,EAAQ,IAAKI,GAAW,CACpB,IAAMC,EAAeV,EAAK,KAAKJ,EAAQ,IAAea,EAAO,QAAQ,KAAM,EAAE,CAAC,EAG9E,OAAAV,EAAG,UAAUW,CAAY,EAAE,YAAY,EAEhCA,CACX,CAAC,EACD,CAEI,QAAS,QACT,GAAGP,CACP,EACA,CAAE,QAAAG,CAAQ,CACd,CACJ,CACJ,EAEI,OAAOC,EAAW,SAAY,WACvBA,EAAW,QAAQC,EAAQZ,CAAO,EAGtCY,CACX,CACJ,GAEDG,EAAQT","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 etc/no-deprecated\nexport default swaggerApiRoute;\n","import fs from \"node:fs\";\nimport path from \"node:path\";\nimport type { BaseDefinition } from \"@visulima/jsdoc-open-api\";\nimport { SwaggerCompilerPlugin } from \"@visulima/jsdoc-open-api\";\nimport type { NextConfig } from \"next\";\nimport type { NextJsWebpackConfig } from \"next/dist/server/config-shared\";\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: any) => {\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 = path.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","fs","path","SwaggerCompilerPlugin","withOpenApi","definition","output","sources","verbose","nextConfig","config","source","combinedPath","with_open_api_default"],"mappings":"2HAOA,IAAMA,EAAsH,CAACC,EAAU,CAAC,IACpIC,EAAeD,CAAO,EAGnBE,EAAQH,ECXf,OAAOI,MAAQ,KACf,OAAOC,MAAU,OAEjB,OAAS,yBAAAC,MAA6B,2BAKtC,IAAMC,EACF,CAAC,CACG,WAAAC,EACA,OAAAC,EAAS,uBACT,QAAAC,EACA,QAAAC,CACJ,IAMCC,IACI,CACG,GAAGA,EACH,QAAS,CAACC,EAAuBZ,IAAkC,CAC/D,GAAI,CAACA,EAAQ,SACT,OAAOY,EAQX,GALIJ,EAAO,WAAW,GAAG,IAErBA,EAASA,EAAO,MAAM,CAAC,GAGvB,CAACA,EAAO,SAAS,OAAO,EACxB,MAAM,IAAI,MAAM,qCAAqC,EA6BzD,OAzBAI,EAAS,CACL,GAAGA,EACH,QAAS,CAEL,GAAGA,EAAO,QACV,IAAIP,EACA,GAAGL,EAAQ,GAAG,IAAIQ,CAAM,GACxBC,EAAQ,IAAKI,GAAW,CACpB,IAAMC,EAAeV,EAAK,KAAKJ,EAAQ,IAAea,EAAO,QAAQ,KAAM,EAAE,CAAC,EAG9E,OAAAV,EAAG,UAAUW,CAAY,EAAE,YAAY,EAEhCA,CACX,CAAC,EACD,CAEI,QAAS,QACT,GAAGP,CACP,EACA,CAAE,QAAAG,CAAQ,CACd,CACJ,CACJ,EAEI,OAAOC,EAAW,SAAY,WACvBA,EAAW,QAAQC,EAAQZ,CAAO,EAGtCY,CACX,CACJ,GAEDG,EAAQT","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 etc/no-deprecated\nexport default swaggerApiRoute;\n","import fs from \"node:fs\";\nimport path from \"node:path\";\nimport type { BaseDefinition } from \"@visulima/jsdoc-open-api\";\nimport { SwaggerCompilerPlugin } from \"@visulima/jsdoc-open-api\";\nimport type { NextConfig } from \"next/types\";\nimport type { NextJsWebpackConfig, WebpackConfigContext } from \"next/dist/server/config-shared\";\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 = path.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,4 +1,4 @@
1
- import { NextPage, InferGetStaticPropsType } from 'next';
1
+ import { NextPage, InferGetStaticPropsType } from 'next/types';
2
2
  import { getSwaggerStaticProps as getStaticProps } from '../../../index-browser.mjs';
3
3
 
4
4
  declare const RedocApiDocument: (name: string, swagger?: Exclude<{
@@ -1,4 +1,4 @@
1
- import { NextPage, InferGetStaticPropsType } from 'next';
1
+ import { NextPage, InferGetStaticPropsType } from 'next/types';
2
2
  import { getSwaggerStaticProps as getStaticProps } from '../../../index-browser.js';
3
3
 
4
4
  declare const RedocApiDocument: (name: string, swagger?: Exclude<{
@@ -9,12 +9,12 @@ function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
9
9
 
10
10
  var a__default = /*#__PURE__*/_interopDefault(a);
11
11
 
12
- var s=(o,p={})=>({swaggerData:r})=>jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsxs(a__default.default,{children:[jsxRuntime.jsx("title",{children:o}),jsxRuntime.jsx("style",{children:`
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:`
13
13
  body {
14
14
  background: #fafafa !important;
15
15
  }
16
- `})]}),jsxRuntime.jsx(redoc.RedocStandalone,{...p,spec:r})]}),n=s;
16
+ `})]}),jsxRuntime.jsx(redoc.RedocStandalone,{...p,spec:r})]}),y=i;
17
17
 
18
- module.exports = n;
18
+ module.exports = y;
19
19
  //# sourceMappingURL=out.js.map
20
20
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../../src/framework/next/routes/pages/redoc/index.tsx"],"names":["Head","RedocStandalone","Fragment","jsx","jsxs","RedocApiDocument","name","swagger","swaggerData","redoc_default"],"mappings":"yCAEA,OAAOA,MAAU,YAEjB,OAAS,mBAAAC,MAAuB,QAexB,mBAAAC,EAEQ,OAAAC,EADJ,QAAAC,MADJ,oBAXR,IAAMC,EASF,CAACC,EAAMC,EAAU,CAAC,IAClB,CAAC,CAAE,YAAAC,CAAY,IACXJ,EAAAF,EAAA,CACI,UAAAE,EAACJ,EAAA,CACG,UAAAG,EAAC,SAAO,SAAAG,EAAK,EACbH,EAAC,SACI;AAAA;AAAA;AAAA;AAAA,EAKL,GACJ,EAEAA,EAACF,EAAA,CAAiB,GAAGM,EAAS,KAAMC,EAAa,GACrD,EAGDC,EAAQJ","sourcesContent":["import type { InferGetStaticPropsType, NextPage } from \"next\";\n// eslint-disable-next-line import/no-extraneous-dependencies\nimport Head from \"next/head\";\n// eslint-disable-next-line import/no-extraneous-dependencies\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":["Head","RedocStandalone","Fragment","jsx","jsxs","RedocApiDocument","name","swagger","swaggerData","redoc_default"],"mappings":"yCAEA,OAAOA,MAAU,YAEjB,OAAS,mBAAAC,MAAuB,QAexB,mBAAAC,EAEQ,OAAAC,EADJ,QAAAC,MADJ,oBAXR,IAAMC,EASF,CAACC,EAAMC,EAAU,CAAC,IAClB,CAAC,CAAE,YAAAC,CAAY,IACXJ,EAAAF,EAAA,CACI,UAAAE,EAACJ,EAAA,CACG,UAAAG,EAAC,SAAO,SAAAG,EAAK,EACbH,EAAC,SACI;AAAA;AAAA;AAAA;AAAA,EAKL,GACJ,EAEAA,EAACF,EAAA,CAAiB,GAAGM,EAAS,KAAMC,EAAa,GACrD,EAGDC,EAAQJ","sourcesContent":["import type { InferGetStaticPropsType, NextPage } from \"next/types\";\n// eslint-disable-next-line import/no-extraneous-dependencies\nimport Head from \"next/head\";\n// eslint-disable-next-line import/no-extraneous-dependencies\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"]}
@@ -3,12 +3,12 @@ import a from 'next/head';
3
3
  import { RedocStandalone } from 'redoc';
4
4
  import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
5
5
 
6
- var s=(o,p={})=>({swaggerData:r})=>jsxs(Fragment,{children:[jsxs(a,{children:[jsx("title",{children:o}),jsx("style",{children:`
6
+ var i=(o,p={})=>({swaggerData:r})=>jsxs(Fragment,{children:[jsxs(a,{children:[jsx("title",{children:o}),jsx("style",{children:`
7
7
  body {
8
8
  background: #fafafa !important;
9
9
  }
10
- `})]}),jsx(RedocStandalone,{...p,spec:r})]}),n=s;
10
+ `})]}),jsx(RedocStandalone,{...p,spec:r})]}),m=i;
11
11
 
12
- export { n as default };
12
+ export { m as default };
13
13
  //# sourceMappingURL=out.js.map
14
14
  //# sourceMappingURL=index.mjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../../src/framework/next/routes/pages/redoc/index.tsx"],"names":["Head","RedocStandalone","Fragment","jsx","jsxs","RedocApiDocument","name","swagger","swaggerData","redoc_default"],"mappings":"0CAEA,OAAOA,MAAU,YAEjB,OAAS,mBAAAC,MAAuB,QAexB,mBAAAC,EAEQ,OAAAC,EADJ,QAAAC,MADJ,oBAXR,IAAMC,EASF,CAACC,EAAMC,EAAU,CAAC,IAClB,CAAC,CAAE,YAAAC,CAAY,IACXJ,EAAAF,EAAA,CACI,UAAAE,EAACJ,EAAA,CACG,UAAAG,EAAC,SAAO,SAAAG,EAAK,EACbH,EAAC,SACI;AAAA;AAAA;AAAA;AAAA,EAKL,GACJ,EAEAA,EAACF,EAAA,CAAiB,GAAGM,EAAS,KAAMC,EAAa,GACrD,EAGDC,EAAQJ","sourcesContent":["import type { InferGetStaticPropsType, NextPage } from \"next\";\n// eslint-disable-next-line import/no-extraneous-dependencies\nimport Head from \"next/head\";\n// eslint-disable-next-line import/no-extraneous-dependencies\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":["Head","RedocStandalone","Fragment","jsx","jsxs","RedocApiDocument","name","swagger","swaggerData","redoc_default"],"mappings":"0CAEA,OAAOA,MAAU,YAEjB,OAAS,mBAAAC,MAAuB,QAexB,mBAAAC,EAEQ,OAAAC,EADJ,QAAAC,MADJ,oBAXR,IAAMC,EASF,CAACC,EAAMC,EAAU,CAAC,IAClB,CAAC,CAAE,YAAAC,CAAY,IACXJ,EAAAF,EAAA,CACI,UAAAE,EAACJ,EAAA,CACG,UAAAG,EAAC,SAAO,SAAAG,EAAK,EACbH,EAAC,SACI;AAAA;AAAA;AAAA;AAAA,EAKL,GACJ,EAEAA,EAACF,EAAA,CAAiB,GAAGM,EAAS,KAAMC,EAAa,GACrD,EAGDC,EAAQJ","sourcesContent":["import type { InferGetStaticPropsType, NextPage } from \"next/types\";\n// eslint-disable-next-line import/no-extraneous-dependencies\nimport Head from \"next/head\";\n// eslint-disable-next-line import/no-extraneous-dependencies\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,4 +1,4 @@
1
- import { NextPage, InferGetStaticPropsType } from 'next';
1
+ import { NextPage, InferGetStaticPropsType } from 'next/types';
2
2
  import { SwaggerUIProps } from 'swagger-ui-react';
3
3
  import { getSwaggerStaticProps as getStaticProps } from '../../../index-browser.mjs';
4
4
 
@@ -1,4 +1,4 @@
1
- import { NextPage, InferGetStaticPropsType } from 'next';
1
+ import { NextPage, InferGetStaticPropsType } from 'next/types';
2
2
  import { SwaggerUIProps } from 'swagger-ui-react';
3
3
  import { getSwaggerStaticProps as getStaticProps } from '../../../index-browser.js';
4
4
 
@@ -1,21 +1,21 @@
1
1
  'use strict';
2
2
 
3
3
  require('../../../../../chunk-4D6JZ4TL.js');
4
- var p = require('next/dynamic');
4
+ var o = require('next/dynamic');
5
5
  var s = require('next/head');
6
6
  var jsxRuntime = require('react/jsx-runtime');
7
7
 
8
8
  function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
9
9
 
10
- var p__default = /*#__PURE__*/_interopDefault(p);
10
+ var o__default = /*#__PURE__*/_interopDefault(o);
11
11
  var s__default = /*#__PURE__*/_interopDefault(s);
12
12
 
13
- var g=p__default.default(async()=>await import('swagger-ui-react'),{ssr:!1}),i=(r,a={})=>({swaggerData:o})=>jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsxs(s__default.default,{children:[jsxRuntime.jsx("title",{children:r}),jsxRuntime.jsx("style",{children:`
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:`
14
14
  body {
15
15
  background: #fafafa !important;
16
16
  }
17
- `})]}),jsxRuntime.jsx(g,{...a,spec:o})]}),y=i;
17
+ `})]}),jsxRuntime.jsx(g,{...a,spec:p})]}),n=i;
18
18
 
19
- module.exports = y;
19
+ module.exports = n;
20
20
  //# sourceMappingURL=out.js.map
21
21
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../../src/framework/next/routes/pages/swagger/index.tsx"],"names":["dynamic","Head","Fragment","jsx","jsxs","SwaggerUi","SwaggerApiDocument","name","swagger","swaggerData","swagger_default"],"mappings":"yCAEA,OAAOA,MAAa,eAEpB,OAAOC,MAAU,YAUT,mBAAAC,EAEQ,OAAAC,EADJ,QAAAC,MADJ,oBALR,IAAMC,EAAYL,EAAQ,SAAY,KAAM,QAAO,kBAAkB,EAAG,CAAE,IAAK,EAAM,CAAC,EAEhFM,EACF,CAACC,EAAMC,EAAU,CAAC,IAClB,CAAC,CAAE,YAAAC,CAAY,IACXL,EAAAF,EAAA,CACI,UAAAE,EAACH,EAAA,CACG,UAAAE,EAAC,SAAO,SAAAI,EAAK,EACbJ,EAAC,SACI;AAAA;AAAA;AAAA;AAAA,EAKL,GACJ,EAGAA,EAACE,EAAA,CAAW,GAAGG,EAAS,KAAMC,EAAa,GAC/C,EAGDC,EAAQJ","sourcesContent":["import type { InferGetStaticPropsType, NextPage } from \"next\";\n// eslint-disable-next-line import/no-extraneous-dependencies\nimport dynamic from \"next/dynamic\";\n// eslint-disable-next-line import/no-extraneous-dependencies\nimport Head from \"next/head\";\nimport type { SwaggerUIProps } from \"swagger-ui-react\";\n\nimport type getStaticProps from \"../get-static-properties-swagger\";\n// eslint-disable-next-line import/no-extraneous-dependencies\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":["dynamic","Head","Fragment","jsx","jsxs","SwaggerUi","SwaggerApiDocument","name","swagger","swaggerData","swagger_default"],"mappings":"yCAEA,OAAOA,MAAa,eAEpB,OAAOC,MAAU,YAUT,mBAAAC,EAEQ,OAAAC,EADJ,QAAAC,MADJ,oBALR,IAAMC,EAAYL,EAAQ,SAAY,KAAM,QAAO,kBAAkB,EAAG,CAAE,IAAK,EAAM,CAAC,EAEhFM,EACF,CAACC,EAAMC,EAAU,CAAC,IAClB,CAAC,CAAE,YAAAC,CAAY,IACXL,EAAAF,EAAA,CACI,UAAAE,EAACH,EAAA,CACG,UAAAE,EAAC,SAAO,SAAAI,EAAK,EACbJ,EAAC,SACI;AAAA;AAAA;AAAA;AAAA,EAKL,GACJ,EAGAA,EAACE,EAAA,CAAW,GAAGG,EAAS,KAAMC,EAAa,GAC/C,EAGDC,EAAQJ","sourcesContent":["import type { InferGetStaticPropsType, NextPage } from \"next/types\";\n// eslint-disable-next-line import/no-extraneous-dependencies\nimport dynamic from \"next/dynamic\";\n// eslint-disable-next-line import/no-extraneous-dependencies\nimport Head from \"next/head\";\nimport type { SwaggerUIProps } from \"swagger-ui-react\";\n\nimport type getStaticProps from \"../get-static-properties-swagger\";\n// eslint-disable-next-line import/no-extraneous-dependencies\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,14 @@
1
1
  import '../../../../../chunk-XIJ2ZQRX.mjs';
2
- import p from 'next/dynamic';
2
+ import o from 'next/dynamic';
3
3
  import s from 'next/head';
4
4
  import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
5
5
 
6
- var g=p(async()=>await import('swagger-ui-react'),{ssr:!1}),i=(r,a={})=>({swaggerData:o})=>jsxs(Fragment,{children:[jsxs(s,{children:[jsx("title",{children:r}),jsx("style",{children:`
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:`
7
7
  body {
8
8
  background: #fafafa !important;
9
9
  }
10
- `})]}),jsx(g,{...a,spec:o})]}),y=i;
10
+ `})]}),jsx(g,{...a,spec:p})]}),P=i;
11
11
 
12
- export { y as default };
12
+ export { P as default };
13
13
  //# sourceMappingURL=out.js.map
14
14
  //# sourceMappingURL=index.mjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../../src/framework/next/routes/pages/swagger/index.tsx"],"names":["dynamic","Head","Fragment","jsx","jsxs","SwaggerUi","SwaggerApiDocument","name","swagger","swaggerData","swagger_default"],"mappings":"0CAEA,OAAOA,MAAa,eAEpB,OAAOC,MAAU,YAUT,mBAAAC,EAEQ,OAAAC,EADJ,QAAAC,MADJ,oBALR,IAAMC,EAAYL,EAAQ,SAAY,KAAM,QAAO,kBAAkB,EAAG,CAAE,IAAK,EAAM,CAAC,EAEhFM,EACF,CAACC,EAAMC,EAAU,CAAC,IAClB,CAAC,CAAE,YAAAC,CAAY,IACXL,EAAAF,EAAA,CACI,UAAAE,EAACH,EAAA,CACG,UAAAE,EAAC,SAAO,SAAAI,EAAK,EACbJ,EAAC,SACI;AAAA;AAAA;AAAA;AAAA,EAKL,GACJ,EAGAA,EAACE,EAAA,CAAW,GAAGG,EAAS,KAAMC,EAAa,GAC/C,EAGDC,EAAQJ","sourcesContent":["import type { InferGetStaticPropsType, NextPage } from \"next\";\n// eslint-disable-next-line import/no-extraneous-dependencies\nimport dynamic from \"next/dynamic\";\n// eslint-disable-next-line import/no-extraneous-dependencies\nimport Head from \"next/head\";\nimport type { SwaggerUIProps } from \"swagger-ui-react\";\n\nimport type getStaticProps from \"../get-static-properties-swagger\";\n// eslint-disable-next-line import/no-extraneous-dependencies\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":["dynamic","Head","Fragment","jsx","jsxs","SwaggerUi","SwaggerApiDocument","name","swagger","swaggerData","swagger_default"],"mappings":"0CAEA,OAAOA,MAAa,eAEpB,OAAOC,MAAU,YAUT,mBAAAC,EAEQ,OAAAC,EADJ,QAAAC,MADJ,oBALR,IAAMC,EAAYL,EAAQ,SAAY,KAAM,QAAO,kBAAkB,EAAG,CAAE,IAAK,EAAM,CAAC,EAEhFM,EACF,CAACC,EAAMC,EAAU,CAAC,IAClB,CAAC,CAAE,YAAAC,CAAY,IACXL,EAAAF,EAAA,CACI,UAAAE,EAACH,EAAA,CACG,UAAAE,EAAC,SAAO,SAAAI,EAAK,EACbJ,EAAC,SACI;AAAA;AAAA;AAAA;AAAA,EAKL,GACJ,EAGAA,EAACE,EAAA,CAAW,GAAGG,EAAS,KAAMC,EAAa,GAC/C,EAGDC,EAAQJ","sourcesContent":["import type { InferGetStaticPropsType, NextPage } from \"next/types\";\n// eslint-disable-next-line import/no-extraneous-dependencies\nimport dynamic from \"next/dynamic\";\n// eslint-disable-next-line import/no-extraneous-dependencies\nimport Head from \"next/head\";\nimport type { SwaggerUIProps } from \"swagger-ui-react\";\n\nimport type getStaticProps from \"../get-static-properties-swagger\";\n// eslint-disable-next-line import/no-extraneous-dependencies\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,13 @@
1
1
  'use strict';
2
2
 
3
- var chunkWYXGSYH5_js = require('./chunk-WYXGSYH5.js');
3
+ var chunkJSH2MOOI_js = require('./chunk-JSH2MOOI.js');
4
4
  require('./chunk-4D6JZ4TL.js');
5
5
 
6
6
 
7
7
 
8
8
  Object.defineProperty(exports, 'zod', {
9
9
  enumerable: true,
10
- get: function () { return chunkWYXGSYH5_js.c; }
10
+ get: function () { return chunkJSH2MOOI_js.c; }
11
11
  });
12
12
  //# sourceMappingURL=out.js.map
13
13
  //# sourceMappingURL=index-browser.js.map
@@ -1,4 +1,4 @@
1
- export { c as zod } from './chunk-AB7BFRZY.mjs';
1
+ export { c as zod } from './chunk-FP5U4CV5.mjs';
2
2
  import './chunk-XIJ2ZQRX.mjs';
3
3
  //# sourceMappingURL=out.js.map
4
4
  //# sourceMappingURL=index-browser.mjs.map
@@ -6,7 +6,7 @@ import * as _visulima_connect from '@visulima/connect';
6
6
  import { NodeRouter, Route, Nextable, FunctionLike, ValueOrPromise, NextHandler } from '@visulima/connect';
7
7
  export { EdgeRequestHandler, EdgeRouter, ExpressRequestHandler, FindResult, FunctionLike, HandlerOptions, HttpMethod, NextHandler, Nextable, NodeRequestHandler, NodeRouter, Route, RouteShortcutMethod, Router, ValueOrPromise, createEdgeRouter, expressWrapper, sendJson, withZod } from '@visulima/connect';
8
8
  import { CorsOptions, CorsOptionsDelegate } from 'cors';
9
- import { NextApiResponse } from 'next';
9
+ import { NextApiResponse } from 'next/types';
10
10
  import { RateLimiterAbstract, RateLimiterRes } from 'rate-limiter-flexible';
11
11
  export { s as swaggerHandler } from './swagger-handler-1f05481b.js';
12
12
  export { BadGateway, BadRequest, BandwidthLimitExceeded, Conflict, ExpectationFailed, FailedDependency, Forbidden, GatewayTimeout, Gone, HTTPVersionNotSupported, ImATeapot, InsufficientStorage, InternalServerError, LengthRequired, Locked, LoopDetected, MethodNotAllowed, MisdirectedRequest, NetworkAuthenticationRequire, NotAcceptable, NotExtended, NotFound, NotImplemented, PayloadTooLarge, PaymentRequired, PreconditionFailed, PreconditionRequired, ProxyAuthenticationRequired, RangeNotSatisfiable, RequestHeaderFieldsTooLarge, RequestTimeout, ServiceUnavailable, TooManyRequests, URITooLong, Unauthorized, UnavailableForLegalReasons, UnprocessableEntity, UnsupportedMediaType, UpgradeRequired, VariantAlsoNegotiates, default as createHttpError } from 'http-errors';
@@ -6,7 +6,7 @@ import * as _visulima_connect from '@visulima/connect';
6
6
  import { NodeRouter, Route, Nextable, FunctionLike, ValueOrPromise, NextHandler } from '@visulima/connect';
7
7
  export { EdgeRequestHandler, EdgeRouter, ExpressRequestHandler, FindResult, FunctionLike, HandlerOptions, HttpMethod, NextHandler, Nextable, NodeRequestHandler, NodeRouter, Route, RouteShortcutMethod, Router, ValueOrPromise, createEdgeRouter, expressWrapper, sendJson, withZod } from '@visulima/connect';
8
8
  import { CorsOptions, CorsOptionsDelegate } from 'cors';
9
- import { NextApiResponse } from 'next';
9
+ import { NextApiResponse } from 'next/types';
10
10
  import { RateLimiterAbstract, RateLimiterRes } from 'rate-limiter-flexible';
11
11
  export { s as swaggerHandler } from './swagger-handler-1f05481b.js';
12
12
  export { BadGateway, BadRequest, BandwidthLimitExceeded, Conflict, ExpectationFailed, FailedDependency, Forbidden, GatewayTimeout, Gone, HTTPVersionNotSupported, ImATeapot, InsufficientStorage, InternalServerError, LengthRequired, Locked, LoopDetected, MethodNotAllowed, MisdirectedRequest, NetworkAuthenticationRequire, NotAcceptable, NotExtended, NotFound, NotImplemented, PayloadTooLarge, PaymentRequired, PreconditionFailed, PreconditionRequired, ProxyAuthenticationRequired, RangeNotSatisfiable, RequestHeaderFieldsTooLarge, RequestTimeout, ServiceUnavailable, TooManyRequests, URITooLong, Unauthorized, UnavailableForLegalReasons, UnprocessableEntity, UnsupportedMediaType, UpgradeRequired, VariantAlsoNegotiates, default as createHttpError } from 'http-errors';