@visulima/api-platform 1.0.0 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,23 @@
1
+ ## @visulima/api-platform [1.0.2](https://github.com/visulima/visulima/compare/@visulima/api-platform@1.0.1...@visulima/api-platform@1.0.2) (2022-11-16)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * fixed wrong image and url for the npm version ([297c187](https://github.com/visulima/visulima/commit/297c187d07ca7fb82d25fd46defe4f320c514de9))
7
+
8
+
9
+
10
+ ### Dependencies
11
+
12
+ * **@visulima/crud:** upgraded to 1.0.1
13
+
14
+ ## @visulima/api-platform [1.0.1](https://github.com/visulima/visulima/compare/@visulima/api-platform@1.0.0...@visulima/api-platform@1.0.1) (2022-11-15)
15
+
16
+
17
+ ### Bug Fixes
18
+
19
+ * **api-platform:** fixed the issue with swagger css loading ([a77e7cc](https://github.com/visulima/visulima/commit/a77e7cc0092b2479e0bea0f4fb823b4aac98466a))
20
+
1
21
  ## @visulima/api-platform 1.0.0 (2022-11-15)
2
22
 
3
23
 
package/README.md CHANGED
@@ -132,6 +132,6 @@ The visulima api-platform is open-sourced software licensed under the [MIT][lice
132
132
  [typescript-url]: "typescript"
133
133
  [license-image]: https://img.shields.io/npm/l/@visulima/api-platform?color=blueviolet&style=for-the-badge
134
134
  [license-url]: LICENSE.md "license"
135
- [npm-image]: https://img.shields.io/npm/v/@visulima/api-platform/alpha.svg?style=for-the-badge&logo=npm
136
- [npm-url]: https://www.npmjs.com/package/@visulima/api-platform/v/alpha "npm"
135
+ [npm-image]: https://img.shields.io/npm/v/@visulima/api-platform/latest.svg?style=for-the-badge&logo=npm
136
+ [npm-url]: https://www.npmjs.com/package/@visulima/api-platform/v/latest "npm"
137
137
 
@@ -17,6 +17,7 @@ var _dynamic = require('next/dynamic'); var _dynamic2 = _interopRequireDefault(_
17
17
 
18
18
 
19
19
  var SwaggerUI = _dynamic2.default.call(void 0, Promise.resolve().then(() => require("swagger-ui-react")), { ssr: false });
20
+ _dynamic2.default.call(void 0, Promise.resolve().then(() => require("swagger-ui-react/swagger-ui.css")), { ssr: false });
20
21
  var SwaggerApiDocument = (name, swagger = {}) => ({ swaggerData }) => /* @__PURE__ */ _react2.default.createElement(_react2.default.Fragment, null, /* @__PURE__ */ _react2.default.createElement(_head2.default, null, /* @__PURE__ */ _react2.default.createElement("title", null, name), /* @__PURE__ */ _react2.default.createElement("style", null, `
21
22
  body {
22
23
  background: #fafafa !important;
@@ -48,4 +49,4 @@ var get_static_properties_swagger_default = getStaticProps;
48
49
 
49
50
 
50
51
  exports.redoc_default = redoc_default; exports.swagger_default = swagger_default; exports.get_static_properties_swagger_default = get_static_properties_swagger_default;
51
- //# sourceMappingURL=chunk-4DRV4PCJ.js.map
52
+ //# sourceMappingURL=chunk-AJKZCWFG.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/next/routes/pages/swagger/redoc.tsx","../src/next/routes/pages/swagger/swagger.tsx","../src/next/routes/pages/swagger/get-static-properties-swagger.ts"],"names":["Head","React"],"mappings":";AAGA,OAAO,UAAU;AACjB,OAAO,WAAW;AAIlB,SAAS,uBAAuB;AAKhC,IAAM,mBAI0D,CAAC,MAAM,UAAU,CAAC,MAAM,CAAC,EAAE,YAAY,MAC3F,0DACI,oCAAC,YACG,oCAAC,eAAO,IAAK,GACb,oCAAC,eACI;AAAA;AAAA;AAAA;AAAA,CAKL,CACJ,GAEA,oCAAC;AAAA,EAAiB,GAAG;AAAA,EAAS,MAAM;AAAA,CAAa,CACrD;AAGZ,IAAO,gBAAQ;;;ACjCf,OAAO,aAAa;AAEpB,OAAOA,WAAU;AAEjB,OAAOC,YAAW;AAKlB,IAAM,YAAY,QAIf,OAAO,qBAAqB,EAAE,KAAK,MAAM,CAAC;AAC7C,QAIG,OAAO,oCAAoC,EAAE,KAAK,MAAM,CAAC;AAG5D,IAAM,qBAI0D,CAAC,MAAM,UAAU,CAAC,MAAM,CAAC,EAAE,YAAY,MAC3F,gBAAAA,OAAA,cAAAA,OAAA,gBACI,gBAAAA,OAAA,cAACD,OAAA,MACG,gBAAAC,OAAA,cAAC,eAAO,IAAK,GACb,gBAAAA,OAAA,cAAC,eACI;AAAA;AAAA;AAAA;AAAA,CAKL,CACJ,GAEA,gBAAAA,OAAA,cAAC;AAAA,EAAW,GAAG;AAAA,EAAS,MAAM;AAAA,CAAa,CAC/C;AAGZ,IAAO,kBAAQ;;;AC1Cf,OAAO,WAAW;AAKlB,IAAM,eAAe,MAAM,6DAA6D;AAGxF,IAAM,iBAEgB,CAAC,eAAe,YAKhC;AAEF,QAAM,WAAW,MAAM,MAAM,UAAU;AACvC,QAAM,cAAc,MAAM,SAAS,KAAK;AAExC,eAAa,WAAW;AAExB,SAAO;AAAA,IACH,OAAO;AAAA,MACH;AAAA,MACA,aAAa,KAAK,MAAM,KAAK,UAAU,WAAW,CAAC;AAAA,IACvD;AAAA,EACJ;AACJ;AAEA,IAAO,wCAAQ","sourcesContent":["// eslint-disable-next-line import/no-extraneous-dependencies\nimport type { InferGetStaticPropsType, NextPage } from \"next\";\n// eslint-disable-next-line import/no-extraneous-dependencies\nimport Head from \"next/head\";\nimport React from \"react\";\n// eslint-disable-next-line import/no-extraneous-dependencies\nimport type { RedocStandaloneProps } from \"redoc\";\n// eslint-disable-next-line import/no-extraneous-dependencies\nimport { RedocStandalone } from \"redoc\";\n\nimport getStaticProps from \"./get-static-properties-swagger\";\n\n// eslint-disable-next-line max-len\nconst RedocApiDocument: (\n name: string,\n swagger?: Exclude<RedocStandaloneProps, \"spec\">,\n // eslint-disable-next-line max-len,unicorn/no-useless-undefined\n) => NextPage<InferGetStaticPropsType<typeof getStaticProps>> = (name, swagger = {}) => ({ 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","import type { InferGetStaticPropsType, NextPage } from \"next\";\nimport dynamic from \"next/dynamic\";\n// eslint-disable-next-line import/no-extraneous-dependencies\nimport Head from \"next/head\";\n// eslint-disable-next-line import/no-extraneous-dependencies\nimport React from \"react\";\nimport type { SwaggerUIProps } from \"swagger-ui-react\";\n\nimport getStaticProps from \"./get-static-properties-swagger\";\n// eslint-disable-next-line import/no-extraneous-dependencies\nconst SwaggerUI = dynamic<{\n spec: any;\n // @ts-ignore\n // eslint-disable-next-line import/no-extraneous-dependencies\n}>(import(\"swagger-ui-react\"), { ssr: false });\ndynamic<{\n spec: any;\n // @ts-ignore\n // eslint-disable-next-line import/no-extraneous-dependencies\n}>(import(\"swagger-ui-react/swagger-ui.css\"), { ssr: false });\n\n// eslint-disable-next-line max-len\nconst SwaggerApiDocument: (\n name: string,\n swagger?: Exclude<SwaggerUIProps, \"spec\">,\n // eslint-disable-next-line max-len,unicorn/no-useless-undefined\n) => NextPage<InferGetStaticPropsType<typeof getStaticProps>> = (name, swagger = {}) => ({ 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 <SwaggerUI {...swagger} spec={swaggerData} />\n </>\n);\n\nexport default SwaggerApiDocument;\n","// eslint-disable-next-line unicorn/prevent-abbreviations\nimport debug from \"debug\";\nimport type { GetStaticProps } from \"next\";\nimport type { OAS3Definition } from \"swagger-jsdoc\";\n\n// eslint-disable-next-line testing-library/no-debugging-utils\nconst swaggerDebug = debug(\"visulima:api-platform:swagger:get-static-properties-swagger\");\n\n// eslint-disable-next-line unicorn/consistent-function-scoping\nconst getStaticProps: (\n swaggerUrl: string,\n) => GetStaticProps = (swaggerUrl) => async (): Promise<{\n props: {\n swaggerUrl: string;\n swaggerData: OAS3Definition;\n };\n}> => {\n // eslint-disable-next-line compat/compat\n const response = await fetch(swaggerUrl);\n const swaggerData = await response.json();\n\n swaggerDebug(swaggerData);\n\n return {\n props: {\n swaggerUrl,\n swaggerData: JSON.parse(JSON.stringify(swaggerData)),\n },\n };\n};\n\nexport default getStaticProps;\n"]}
@@ -17,6 +17,7 @@ import dynamic from "next/dynamic";
17
17
  import Head2 from "next/head";
18
18
  import React2 from "react";
19
19
  var SwaggerUI = dynamic(import("swagger-ui-react"), { ssr: false });
20
+ dynamic(import("swagger-ui-react/swagger-ui.css"), { ssr: false });
20
21
  var SwaggerApiDocument = (name, swagger = {}) => ({ swaggerData }) => /* @__PURE__ */ React2.createElement(React2.Fragment, null, /* @__PURE__ */ React2.createElement(Head2, null, /* @__PURE__ */ React2.createElement("title", null, name), /* @__PURE__ */ React2.createElement("style", null, `
21
22
  body {
22
23
  background: #fafafa !important;
@@ -48,4 +49,4 @@ export {
48
49
  swagger_default,
49
50
  get_static_properties_swagger_default
50
51
  };
51
- //# sourceMappingURL=chunk-GSWANBU5.mjs.map
52
+ //# sourceMappingURL=chunk-XXZ56SKG.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/next/routes/pages/swagger/redoc.tsx","../src/next/routes/pages/swagger/swagger.tsx","../src/next/routes/pages/swagger/get-static-properties-swagger.ts"],"sourcesContent":["// eslint-disable-next-line import/no-extraneous-dependencies\nimport type { InferGetStaticPropsType, NextPage } from \"next\";\n// eslint-disable-next-line import/no-extraneous-dependencies\nimport Head from \"next/head\";\nimport React from \"react\";\n// eslint-disable-next-line import/no-extraneous-dependencies\nimport type { RedocStandaloneProps } from \"redoc\";\n// eslint-disable-next-line import/no-extraneous-dependencies\nimport { RedocStandalone } from \"redoc\";\n\nimport getStaticProps from \"./get-static-properties-swagger\";\n\n// eslint-disable-next-line max-len\nconst RedocApiDocument: (\n name: string,\n swagger?: Exclude<RedocStandaloneProps, \"spec\">,\n // eslint-disable-next-line max-len,unicorn/no-useless-undefined\n) => NextPage<InferGetStaticPropsType<typeof getStaticProps>> = (name, swagger = {}) => ({ 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","import type { InferGetStaticPropsType, NextPage } from \"next\";\nimport dynamic from \"next/dynamic\";\n// eslint-disable-next-line import/no-extraneous-dependencies\nimport Head from \"next/head\";\n// eslint-disable-next-line import/no-extraneous-dependencies\nimport React from \"react\";\nimport type { SwaggerUIProps } from \"swagger-ui-react\";\n\nimport getStaticProps from \"./get-static-properties-swagger\";\n// eslint-disable-next-line import/no-extraneous-dependencies\nconst SwaggerUI = dynamic<{\n spec: any;\n // @ts-ignore\n // eslint-disable-next-line import/no-extraneous-dependencies\n}>(import(\"swagger-ui-react\"), { ssr: false });\ndynamic<{\n spec: any;\n // @ts-ignore\n // eslint-disable-next-line import/no-extraneous-dependencies\n}>(import(\"swagger-ui-react/swagger-ui.css\"), { ssr: false });\n\n// eslint-disable-next-line max-len\nconst SwaggerApiDocument: (\n name: string,\n swagger?: Exclude<SwaggerUIProps, \"spec\">,\n // eslint-disable-next-line max-len,unicorn/no-useless-undefined\n) => NextPage<InferGetStaticPropsType<typeof getStaticProps>> = (name, swagger = {}) => ({ 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 <SwaggerUI {...swagger} spec={swaggerData} />\n </>\n);\n\nexport default SwaggerApiDocument;\n","// eslint-disable-next-line unicorn/prevent-abbreviations\nimport debug from \"debug\";\nimport type { GetStaticProps } from \"next\";\nimport type { OAS3Definition } from \"swagger-jsdoc\";\n\n// eslint-disable-next-line testing-library/no-debugging-utils\nconst swaggerDebug = debug(\"visulima:api-platform:swagger:get-static-properties-swagger\");\n\n// eslint-disable-next-line unicorn/consistent-function-scoping\nconst getStaticProps: (\n swaggerUrl: string,\n) => GetStaticProps = (swaggerUrl) => async (): Promise<{\n props: {\n swaggerUrl: string;\n swaggerData: OAS3Definition;\n };\n}> => {\n // eslint-disable-next-line compat/compat\n const response = await fetch(swaggerUrl);\n const swaggerData = await response.json();\n\n swaggerDebug(swaggerData);\n\n return {\n props: {\n swaggerUrl,\n swaggerData: JSON.parse(JSON.stringify(swaggerData)),\n },\n };\n};\n\nexport default getStaticProps;\n"],"mappings":";AAGA,OAAO,UAAU;AACjB,OAAO,WAAW;AAIlB,SAAS,uBAAuB;AAKhC,IAAM,mBAI0D,CAAC,MAAM,UAAU,CAAC,MAAM,CAAC,EAAE,YAAY,MAC3F,0DACI,oCAAC,YACG,oCAAC,eAAO,IAAK,GACb,oCAAC,eACI;AAAA;AAAA;AAAA;AAAA,CAKL,CACJ,GAEA,oCAAC;AAAA,EAAiB,GAAG;AAAA,EAAS,MAAM;AAAA,CAAa,CACrD;AAGZ,IAAO,gBAAQ;;;ACjCf,OAAO,aAAa;AAEpB,OAAOA,WAAU;AAEjB,OAAOC,YAAW;AAKlB,IAAM,YAAY,QAIf,OAAO,qBAAqB,EAAE,KAAK,MAAM,CAAC;AAC7C,QAIG,OAAO,oCAAoC,EAAE,KAAK,MAAM,CAAC;AAG5D,IAAM,qBAI0D,CAAC,MAAM,UAAU,CAAC,MAAM,CAAC,EAAE,YAAY,MAC3F,gBAAAA,OAAA,cAAAA,OAAA,gBACI,gBAAAA,OAAA,cAACD,OAAA,MACG,gBAAAC,OAAA,cAAC,eAAO,IAAK,GACb,gBAAAA,OAAA,cAAC,eACI;AAAA;AAAA;AAAA;AAAA,CAKL,CACJ,GAEA,gBAAAA,OAAA,cAAC;AAAA,EAAW,GAAG;AAAA,EAAS,MAAM;AAAA,CAAa,CAC/C;AAGZ,IAAO,kBAAQ;;;AC1Cf,OAAO,WAAW;AAKlB,IAAM,eAAe,MAAM,6DAA6D;AAGxF,IAAM,iBAEgB,CAAC,eAAe,YAKhC;AAEF,QAAM,WAAW,MAAM,MAAM,UAAU;AACvC,QAAM,cAAc,MAAM,SAAS,KAAK;AAExC,eAAa,WAAW;AAExB,SAAO;AAAA,IACH,OAAO;AAAA,MACH;AAAA,MACA,aAAa,KAAK,MAAM,KAAK,UAAU,WAAW,CAAC;AAAA,IACvD;AAAA,EACJ;AACJ;AAEA,IAAO,wCAAQ;","names":["Head","React"]}
@@ -2,11 +2,11 @@
2
2
 
3
3
 
4
4
 
5
- var _chunk4DRV4PCJjs = require('../chunk-4DRV4PCJ.js');
5
+ var _chunkAJKZCWFGjs = require('../chunk-AJKZCWFG.js');
6
6
  require('../chunk-JC4IRQUL.js');
7
7
 
8
8
 
9
9
 
10
10
 
11
- exports.RedocPage = _chunk4DRV4PCJjs.redoc_default; exports.SwaggerPage = _chunk4DRV4PCJjs.swagger_default; exports.getSwaggerStaticProps = _chunk4DRV4PCJjs.get_static_properties_swagger_default;
11
+ exports.RedocPage = _chunkAJKZCWFGjs.redoc_default; exports.SwaggerPage = _chunkAJKZCWFGjs.swagger_default; exports.getSwaggerStaticProps = _chunkAJKZCWFGjs.get_static_properties_swagger_default;
12
12
  //# sourceMappingURL=index-browser.js.map
@@ -2,7 +2,7 @@ import {
2
2
  get_static_properties_swagger_default,
3
3
  redoc_default,
4
4
  swagger_default
5
- } from "../chunk-GSWANBU5.mjs";
5
+ } from "../chunk-XXZ56SKG.mjs";
6
6
  import "../chunk-5VRACIDE.mjs";
7
7
  export {
8
8
  redoc_default as RedocPage,
@@ -5,7 +5,7 @@ var _chunkS7GUPAL4js = require('../chunk-S7GUPAL4.js');
5
5
 
6
6
 
7
7
 
8
- var _chunk4DRV4PCJjs = require('../chunk-4DRV4PCJ.js');
8
+ var _chunkAJKZCWFGjs = require('../chunk-AJKZCWFG.js');
9
9
  require('../chunk-JC4IRQUL.js');
10
10
 
11
11
  // src/next/webpack/with-open-api.ts
@@ -72,5 +72,5 @@ var swagger_default2 = swaggerApiRoute;
72
72
 
73
73
 
74
74
 
75
- exports.RedocPage = _chunk4DRV4PCJjs.redoc_default; exports.SwaggerPage = _chunk4DRV4PCJjs.swagger_default; exports.getSwaggerStaticProps = _chunk4DRV4PCJjs.get_static_properties_swagger_default; exports.swaggerApiRoute = swagger_default2; exports.withOpenApi = with_open_api_default;
75
+ exports.RedocPage = _chunkAJKZCWFGjs.redoc_default; exports.SwaggerPage = _chunkAJKZCWFGjs.swagger_default; exports.getSwaggerStaticProps = _chunkAJKZCWFGjs.get_static_properties_swagger_default; exports.swaggerApiRoute = swagger_default2; exports.withOpenApi = with_open_api_default;
76
76
  //# sourceMappingURL=index-server.js.map
@@ -5,7 +5,7 @@ import {
5
5
  get_static_properties_swagger_default,
6
6
  redoc_default,
7
7
  swagger_default
8
- } from "../chunk-GSWANBU5.mjs";
8
+ } from "../chunk-XXZ56SKG.mjs";
9
9
  import "../chunk-5VRACIDE.mjs";
10
10
 
11
11
  // src/next/webpack/with-open-api.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@visulima/api-platform",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
4
4
  "description": "visulima api platform",
5
5
  "keywords": [
6
6
  "anolilab",
@@ -89,7 +89,7 @@
89
89
  "test": "vitest"
90
90
  },
91
91
  "dependencies": {
92
- "@visulima/connect": "1.2.0",
92
+ "@visulima/connect": "1.3.0",
93
93
  "@visulima/jsdoc-open-api": "1.2.0",
94
94
  "accepts": "^1.3.8",
95
95
  "case": "^1.6.3",
@@ -125,7 +125,7 @@
125
125
  "@types/webpack": "^5.28.0",
126
126
  "@typescript-eslint/eslint-plugin": "^5.40.0",
127
127
  "@typescript-eslint/parser": "^5.40.0",
128
- "@visulima/crud": "1.0.0",
128
+ "@visulima/crud": "1.0.1",
129
129
  "@visulima/readdir": "1.3.0",
130
130
  "chalk": "4.1.2",
131
131
  "commander": "^9.4.1",
@@ -181,14 +181,14 @@
181
181
  "zod": "^3.19.1"
182
182
  },
183
183
  "optionalDependencies": {
184
- "@visulima/crud": "1.0.0",
184
+ "@visulima/crud": "1.0.1",
185
185
  "@visulima/readdir": "1.3.0",
186
186
  "chalk": "4.1.2",
187
187
  "commander": "^9.4.1",
188
188
  "cors": "^2.8.5",
189
189
  "rate-limiter-flexible": "^2.3.11",
190
- "swagger-ui-react": "^4.14.3",
191
190
  "redoc": "^2.0.0",
191
+ "swagger-ui-react": "^4.14.3",
192
192
  "webpack": "^5.74.0"
193
193
  },
194
194
  "engines": {
@@ -13,6 +13,11 @@ const SwaggerUI = dynamic<{
13
13
  // @ts-ignore
14
14
  // eslint-disable-next-line import/no-extraneous-dependencies
15
15
  }>(import("swagger-ui-react"), { ssr: false });
16
+ dynamic<{
17
+ spec: any;
18
+ // @ts-ignore
19
+ // eslint-disable-next-line import/no-extraneous-dependencies
20
+ }>(import("swagger-ui-react/swagger-ui.css"), { ssr: false });
16
21
 
17
22
  // eslint-disable-next-line max-len
18
23
  const SwaggerApiDocument: (
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/next/routes/pages/swagger/redoc.tsx","../src/next/routes/pages/swagger/swagger.tsx","../src/next/routes/pages/swagger/get-static-properties-swagger.ts"],"names":["Head","React"],"mappings":";AAGA,OAAO,UAAU;AACjB,OAAO,WAAW;AAIlB,SAAS,uBAAuB;AAKhC,IAAM,mBAI0D,CAAC,MAAM,UAAU,CAAC,MAAM,CAAC,EAAE,YAAY,MAC3F,0DACI,oCAAC,YACG,oCAAC,eAAO,IAAK,GACb,oCAAC,eACI;AAAA;AAAA;AAAA;AAAA,CAKL,CACJ,GAEA,oCAAC;AAAA,EAAiB,GAAG;AAAA,EAAS,MAAM;AAAA,CAAa,CACrD;AAGZ,IAAO,gBAAQ;;;ACjCf,OAAO,aAAa;AAEpB,OAAOA,WAAU;AAEjB,OAAOC,YAAW;AAKlB,IAAM,YAAY,QAIf,OAAO,qBAAqB,EAAE,KAAK,MAAM,CAAC;AAG7C,IAAM,qBAI0D,CAAC,MAAM,UAAU,CAAC,MAAM,CAAC,EAAE,YAAY,MAC3F,gBAAAA,OAAA,cAAAA,OAAA,gBACI,gBAAAA,OAAA,cAACD,OAAA,MACG,gBAAAC,OAAA,cAAC,eAAO,IAAK,GACb,gBAAAA,OAAA,cAAC,eACI;AAAA;AAAA;AAAA;AAAA,CAKL,CACJ,GAEA,gBAAAA,OAAA,cAAC;AAAA,EAAW,GAAG;AAAA,EAAS,MAAM;AAAA,CAAa,CAC/C;AAGZ,IAAO,kBAAQ;;;ACrCf,OAAO,WAAW;AAKlB,IAAM,eAAe,MAAM,6DAA6D;AAGxF,IAAM,iBAEgB,CAAC,eAAe,YAKhC;AAEF,QAAM,WAAW,MAAM,MAAM,UAAU;AACvC,QAAM,cAAc,MAAM,SAAS,KAAK;AAExC,eAAa,WAAW;AAExB,SAAO;AAAA,IACH,OAAO;AAAA,MACH;AAAA,MACA,aAAa,KAAK,MAAM,KAAK,UAAU,WAAW,CAAC;AAAA,IACvD;AAAA,EACJ;AACJ;AAEA,IAAO,wCAAQ","sourcesContent":["// eslint-disable-next-line import/no-extraneous-dependencies\nimport type { InferGetStaticPropsType, NextPage } from \"next\";\n// eslint-disable-next-line import/no-extraneous-dependencies\nimport Head from \"next/head\";\nimport React from \"react\";\n// eslint-disable-next-line import/no-extraneous-dependencies\nimport type { RedocStandaloneProps } from \"redoc\";\n// eslint-disable-next-line import/no-extraneous-dependencies\nimport { RedocStandalone } from \"redoc\";\n\nimport getStaticProps from \"./get-static-properties-swagger\";\n\n// eslint-disable-next-line max-len\nconst RedocApiDocument: (\n name: string,\n swagger?: Exclude<RedocStandaloneProps, \"spec\">,\n // eslint-disable-next-line max-len,unicorn/no-useless-undefined\n) => NextPage<InferGetStaticPropsType<typeof getStaticProps>> = (name, swagger = {}) => ({ 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","import type { InferGetStaticPropsType, NextPage } from \"next\";\nimport dynamic from \"next/dynamic\";\n// eslint-disable-next-line import/no-extraneous-dependencies\nimport Head from \"next/head\";\n// eslint-disable-next-line import/no-extraneous-dependencies\nimport React from \"react\";\nimport type { SwaggerUIProps } from \"swagger-ui-react\";\n\nimport getStaticProps from \"./get-static-properties-swagger\";\n// eslint-disable-next-line import/no-extraneous-dependencies\nconst SwaggerUI = dynamic<{\n spec: any;\n // @ts-ignore\n // eslint-disable-next-line import/no-extraneous-dependencies\n}>(import(\"swagger-ui-react\"), { ssr: false });\n\n// eslint-disable-next-line max-len\nconst SwaggerApiDocument: (\n name: string,\n swagger?: Exclude<SwaggerUIProps, \"spec\">,\n // eslint-disable-next-line max-len,unicorn/no-useless-undefined\n) => NextPage<InferGetStaticPropsType<typeof getStaticProps>> = (name, swagger = {}) => ({ 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 <SwaggerUI {...swagger} spec={swaggerData} />\n </>\n);\n\nexport default SwaggerApiDocument;\n","// eslint-disable-next-line unicorn/prevent-abbreviations\nimport debug from \"debug\";\nimport type { GetStaticProps } from \"next\";\nimport type { OAS3Definition } from \"swagger-jsdoc\";\n\n// eslint-disable-next-line testing-library/no-debugging-utils\nconst swaggerDebug = debug(\"visulima:api-platform:swagger:get-static-properties-swagger\");\n\n// eslint-disable-next-line unicorn/consistent-function-scoping\nconst getStaticProps: (\n swaggerUrl: string,\n) => GetStaticProps = (swaggerUrl) => async (): Promise<{\n props: {\n swaggerUrl: string;\n swaggerData: OAS3Definition;\n };\n}> => {\n // eslint-disable-next-line compat/compat\n const response = await fetch(swaggerUrl);\n const swaggerData = await response.json();\n\n swaggerDebug(swaggerData);\n\n return {\n props: {\n swaggerUrl,\n swaggerData: JSON.parse(JSON.stringify(swaggerData)),\n },\n };\n};\n\nexport default getStaticProps;\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/next/routes/pages/swagger/redoc.tsx","../src/next/routes/pages/swagger/swagger.tsx","../src/next/routes/pages/swagger/get-static-properties-swagger.ts"],"sourcesContent":["// eslint-disable-next-line import/no-extraneous-dependencies\nimport type { InferGetStaticPropsType, NextPage } from \"next\";\n// eslint-disable-next-line import/no-extraneous-dependencies\nimport Head from \"next/head\";\nimport React from \"react\";\n// eslint-disable-next-line import/no-extraneous-dependencies\nimport type { RedocStandaloneProps } from \"redoc\";\n// eslint-disable-next-line import/no-extraneous-dependencies\nimport { RedocStandalone } from \"redoc\";\n\nimport getStaticProps from \"./get-static-properties-swagger\";\n\n// eslint-disable-next-line max-len\nconst RedocApiDocument: (\n name: string,\n swagger?: Exclude<RedocStandaloneProps, \"spec\">,\n // eslint-disable-next-line max-len,unicorn/no-useless-undefined\n) => NextPage<InferGetStaticPropsType<typeof getStaticProps>> = (name, swagger = {}) => ({ 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","import type { InferGetStaticPropsType, NextPage } from \"next\";\nimport dynamic from \"next/dynamic\";\n// eslint-disable-next-line import/no-extraneous-dependencies\nimport Head from \"next/head\";\n// eslint-disable-next-line import/no-extraneous-dependencies\nimport React from \"react\";\nimport type { SwaggerUIProps } from \"swagger-ui-react\";\n\nimport getStaticProps from \"./get-static-properties-swagger\";\n// eslint-disable-next-line import/no-extraneous-dependencies\nconst SwaggerUI = dynamic<{\n spec: any;\n // @ts-ignore\n // eslint-disable-next-line import/no-extraneous-dependencies\n}>(import(\"swagger-ui-react\"), { ssr: false });\n\n// eslint-disable-next-line max-len\nconst SwaggerApiDocument: (\n name: string,\n swagger?: Exclude<SwaggerUIProps, \"spec\">,\n // eslint-disable-next-line max-len,unicorn/no-useless-undefined\n) => NextPage<InferGetStaticPropsType<typeof getStaticProps>> = (name, swagger = {}) => ({ 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 <SwaggerUI {...swagger} spec={swaggerData} />\n </>\n);\n\nexport default SwaggerApiDocument;\n","// eslint-disable-next-line unicorn/prevent-abbreviations\nimport debug from \"debug\";\nimport type { GetStaticProps } from \"next\";\nimport type { OAS3Definition } from \"swagger-jsdoc\";\n\n// eslint-disable-next-line testing-library/no-debugging-utils\nconst swaggerDebug = debug(\"visulima:api-platform:swagger:get-static-properties-swagger\");\n\n// eslint-disable-next-line unicorn/consistent-function-scoping\nconst getStaticProps: (\n swaggerUrl: string,\n) => GetStaticProps = (swaggerUrl) => async (): Promise<{\n props: {\n swaggerUrl: string;\n swaggerData: OAS3Definition;\n };\n}> => {\n // eslint-disable-next-line compat/compat\n const response = await fetch(swaggerUrl);\n const swaggerData = await response.json();\n\n swaggerDebug(swaggerData);\n\n return {\n props: {\n swaggerUrl,\n swaggerData: JSON.parse(JSON.stringify(swaggerData)),\n },\n };\n};\n\nexport default getStaticProps;\n"],"mappings":";AAGA,OAAO,UAAU;AACjB,OAAO,WAAW;AAIlB,SAAS,uBAAuB;AAKhC,IAAM,mBAI0D,CAAC,MAAM,UAAU,CAAC,MAAM,CAAC,EAAE,YAAY,MAC3F,0DACI,oCAAC,YACG,oCAAC,eAAO,IAAK,GACb,oCAAC,eACI;AAAA;AAAA;AAAA;AAAA,CAKL,CACJ,GAEA,oCAAC;AAAA,EAAiB,GAAG;AAAA,EAAS,MAAM;AAAA,CAAa,CACrD;AAGZ,IAAO,gBAAQ;;;ACjCf,OAAO,aAAa;AAEpB,OAAOA,WAAU;AAEjB,OAAOC,YAAW;AAKlB,IAAM,YAAY,QAIf,OAAO,qBAAqB,EAAE,KAAK,MAAM,CAAC;AAG7C,IAAM,qBAI0D,CAAC,MAAM,UAAU,CAAC,MAAM,CAAC,EAAE,YAAY,MAC3F,gBAAAA,OAAA,cAAAA,OAAA,gBACI,gBAAAA,OAAA,cAACD,OAAA,MACG,gBAAAC,OAAA,cAAC,eAAO,IAAK,GACb,gBAAAA,OAAA,cAAC,eACI;AAAA;AAAA;AAAA;AAAA,CAKL,CACJ,GAEA,gBAAAA,OAAA,cAAC;AAAA,EAAW,GAAG;AAAA,EAAS,MAAM;AAAA,CAAa,CAC/C;AAGZ,IAAO,kBAAQ;;;ACrCf,OAAO,WAAW;AAKlB,IAAM,eAAe,MAAM,6DAA6D;AAGxF,IAAM,iBAEgB,CAAC,eAAe,YAKhC;AAEF,QAAM,WAAW,MAAM,MAAM,UAAU;AACvC,QAAM,cAAc,MAAM,SAAS,KAAK;AAExC,eAAa,WAAW;AAExB,SAAO;AAAA,IACH,OAAO;AAAA,MACH;AAAA,MACA,aAAa,KAAK,MAAM,KAAK,UAAU,WAAW,CAAC;AAAA,IACvD;AAAA,EACJ;AACJ;AAEA,IAAO,wCAAQ;","names":["Head","React"]}