@scalar/nextjs-openapi 0.1.16 → 0.1.17

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,5 +1,15 @@
1
1
  # @scalar/nextjs-openapi
2
2
 
3
+ ## 0.1.17
4
+
5
+ ### Patch Changes
6
+
7
+ - 8c7bad8: chore: move build tooling to esbuild
8
+ - Updated dependencies [8c7bad8]
9
+ - @scalar/ts-to-openapi@0.0.6
10
+ - @scalar/types@0.1.14
11
+ - @scalar/nextjs-api-reference@0.7.15
12
+
3
13
  ## 0.1.16
4
14
 
5
15
  ### Patch Changes
package/dist/index.js CHANGED
@@ -1 +1,2 @@
1
- export { OpenAPI } from './openapi.js';
1
+ export * from "./openapi.js";
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../src/index.ts"],
4
+ "sourcesContent": ["export * from './openapi'\n"],
5
+ "mappings": "AAAA,cAAc;",
6
+ "names": []
7
+ }
package/dist/openapi.js CHANGED
@@ -1,82 +1,69 @@
1
- import { readFileSync } from 'node:fs';
2
- import { ApiReference } from '@scalar/nextjs-api-reference';
3
- import { sync } from 'fast-glob';
4
- import { createSourceFile, ScriptTarget, ScriptKind, JSDocParsingMode, createProgram } from 'typescript';
5
- import { getPathSchema } from './path.js';
6
-
7
- // TODO switch to watcher
8
- // @see https://github.com/microsoft/TypeScript-wiki/blob/main/Using-the-Compiler-API.md#writing-an-incremental-program-watcher
1
+ import { readFileSync } from "node:fs";
2
+ import { ApiReference } from "@scalar/nextjs-api-reference";
3
+ import { sync } from "fast-glob";
4
+ import {
5
+ JSDocParsingMode,
6
+ ScriptKind,
7
+ ScriptTarget,
8
+ createProgram,
9
+ createSourceFile
10
+ } from "typescript";
11
+ import { getPathSchema } from "./path.js";
9
12
  const compilerHost = {
10
- fileExists: () => true,
11
- getCanonicalFileName: (filename) => filename,
12
- getCurrentDirectory: () => '',
13
- getDefaultLibFileName: () => '',
14
- getNewLine: () => '\n',
15
- getSourceFile: (filename) => createSourceFile(filename, readFileSync(filename).toString(), ScriptTarget.Latest, false, ScriptKind.TS),
16
- jsDocParsingMode: JSDocParsingMode.ParseAll,
17
- readFile: () => undefined,
18
- useCaseSensitiveFileNames: () => true,
19
- writeFile: () => null,
13
+ fileExists: () => true,
14
+ getCanonicalFileName: (filename) => filename,
15
+ getCurrentDirectory: () => "",
16
+ getDefaultLibFileName: () => "",
17
+ getNewLine: () => "\n",
18
+ getSourceFile: (filename) => createSourceFile(filename, readFileSync(filename).toString(), ScriptTarget.Latest, false, ScriptKind.TS),
19
+ jsDocParsingMode: JSDocParsingMode.ParseAll,
20
+ readFile: () => void 0,
21
+ useCaseSensitiveFileNames: () => true,
22
+ writeFile: () => null
20
23
  };
21
- /** OpenAPI 3.1.0 Spec */
22
24
  const spec = {
23
- openapi: '3.1.0',
24
- info: {
25
- title: `${process.env.npm_package_name} - Next.js OpenAPI Spec by Scalar`,
26
- description: process.env.npm_package_description ||
27
- 'This file has been autogenerated, check out the docs to see how to customize these options',
28
- version: process.env.npm_package_version || '0.0.0',
29
- },
30
- paths: {},
25
+ openapi: "3.1.0",
26
+ info: {
27
+ title: `${process.env.npm_package_name} - Next.js OpenAPI Spec by Scalar`,
28
+ description: process.env.npm_package_description || "This file has been autogenerated, check out the docs to see how to customize these options",
29
+ version: process.env.npm_package_version || "0.0.0"
30
+ },
31
+ paths: {}
31
32
  };
32
- /**
33
- * Scalar Next.js OpenAPI schema generation
34
- *
35
- * Handles both the schema generation as well as the references
36
- *
37
- * TODO:
38
- * - Docs
39
- * - file watcher
40
- * - caching
41
- */
42
33
  const OpenAPI = (config = {}) => {
43
- const apiDirectory = config.apiDirectory ?? 'app/api';
44
- /** All ts files required for the schema */
45
- const programFileNames = sync(apiDirectory + '/**/*.ts');
46
- /** Specific route files to generate paths */
47
- const routeFileNames = sync(apiDirectory + '/**/route.ts');
48
- const program = createProgram(programFileNames, {
49
- noResolve: true,
50
- target: ScriptTarget.Latest,
51
- }, compilerHost);
52
- // Loop over all non scalar files to extract openapi data using AST
53
- routeFileNames.forEach((fileName) => {
54
- const sourceFile = program.getSourceFile(fileName);
55
- if (sourceFile) {
56
- const resp = getPathSchema(sourceFile, program);
57
- // Grab the path from the fileName
58
- const rawPath = fileName
59
- .replace(/^(?:src\/)?app|\/route\.ts$/g, '')
60
- .replace(/\[/g, '{')
61
- .replace(/]/g, '}');
62
- const path = rawPath.startsWith('/') ? rawPath : '/' + rawPath;
63
- spec.paths[path] = resp;
64
- }
65
- });
66
- return {
67
- GET: async (req) => {
68
- // OpenAPI Schema JSON
69
- if (req.nextUrl.pathname.endsWith('.json')) {
70
- // Just grabbing the origin here but we can be smarter and look for the greatest common few segments
71
- spec.servers = [{ url: req.nextUrl.origin }];
72
- return Response.json(spec);
73
- }
74
- // References
75
- return await ApiReference({
76
- url: req.nextUrl.pathname + '/schema.json',
77
- })();
78
- },
79
- };
34
+ const apiDirectory = config.apiDirectory ?? "app/api";
35
+ const programFileNames = sync(apiDirectory + "/**/*.ts");
36
+ const routeFileNames = sync(apiDirectory + "/**/route.ts");
37
+ const program = createProgram(
38
+ programFileNames,
39
+ {
40
+ noResolve: true,
41
+ target: ScriptTarget.Latest
42
+ },
43
+ compilerHost
44
+ );
45
+ routeFileNames.forEach((fileName) => {
46
+ const sourceFile = program.getSourceFile(fileName);
47
+ if (sourceFile) {
48
+ const resp = getPathSchema(sourceFile, program);
49
+ const rawPath = fileName.replace(/^(?:src\/)?app|\/route\.ts$/g, "").replace(/\[/g, "{").replace(/]/g, "}");
50
+ const path = rawPath.startsWith("/") ? rawPath : "/" + rawPath;
51
+ spec.paths[path] = resp;
52
+ }
53
+ });
54
+ return {
55
+ GET: async (req) => {
56
+ if (req.nextUrl.pathname.endsWith(".json")) {
57
+ spec.servers = [{ url: req.nextUrl.origin }];
58
+ return Response.json(spec);
59
+ }
60
+ return await ApiReference({
61
+ url: req.nextUrl.pathname + "/schema.json"
62
+ })();
63
+ }
64
+ };
65
+ };
66
+ export {
67
+ OpenAPI
80
68
  };
81
-
82
- export { OpenAPI };
69
+ //# sourceMappingURL=openapi.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../src/openapi.ts"],
4
+ "sourcesContent": ["import { readFileSync } from 'node:fs'\nimport { ApiReference } from '@scalar/nextjs-api-reference'\nimport type { ApiReferenceConfiguration } from '@scalar/types/api-reference'\nimport { sync } from 'fast-glob'\nimport type { NextRequest } from 'next/server'\nimport type { OpenAPIV3_1 } from 'openapi-types'\nimport {\n type CompilerHost,\n JSDocParsingMode,\n ScriptKind,\n ScriptTarget,\n createProgram,\n createSourceFile,\n} from 'typescript'\n\nimport { getPathSchema } from './path'\n\n/**\n * Scalar OpenAPI config\n */\nexport type OpenAPIConfig = {\n /**\n * The base directory for your API files\n * @default 'app/api'\n */\n apiDirectory?: string\n} & Partial<ApiReferenceConfiguration>\n\n// TODO switch to watcher\n// @see https://github.com/microsoft/TypeScript-wiki/blob/main/Using-the-Compiler-API.md#writing-an-incremental-program-watcher\nconst compilerHost: CompilerHost = {\n fileExists: () => true,\n getCanonicalFileName: (filename) => filename,\n getCurrentDirectory: () => '',\n getDefaultLibFileName: () => '',\n getNewLine: () => '\\n',\n getSourceFile: (filename) =>\n createSourceFile(filename, readFileSync(filename).toString(), ScriptTarget.Latest, false, ScriptKind.TS),\n jsDocParsingMode: JSDocParsingMode.ParseAll,\n readFile: () => undefined,\n useCaseSensitiveFileNames: () => true,\n writeFile: () => null,\n}\n\n/** OpenAPI 3.1.0 Spec */\nconst spec: OpenAPIV3_1.Document = {\n openapi: '3.1.0',\n info: {\n title: `${process.env.npm_package_name} - Next.js OpenAPI Spec by Scalar`,\n description:\n process.env.npm_package_description ||\n 'This file has been autogenerated, check out the docs to see how to customize these options',\n version: process.env.npm_package_version || '0.0.0',\n },\n paths: {},\n}\n\n/**\n * Scalar Next.js OpenAPI schema generation\n *\n * Handles both the schema generation as well as the references\n *\n * TODO:\n * - Docs\n * - file watcher\n * - caching\n */\nexport const OpenAPI = (config: OpenAPIConfig = {}) => {\n const apiDirectory = config.apiDirectory ?? 'app/api'\n /** All ts files required for the schema */\n const programFileNames = sync(apiDirectory + '/**/*.ts')\n /** Specific route files to generate paths */\n const routeFileNames = sync(apiDirectory + '/**/route.ts')\n\n const program = createProgram(\n programFileNames,\n {\n noResolve: true,\n target: ScriptTarget.Latest,\n },\n compilerHost,\n )\n\n // Loop over all non scalar files to extract openapi data using AST\n routeFileNames.forEach((fileName) => {\n const sourceFile = program.getSourceFile(fileName)\n\n if (sourceFile) {\n const resp = getPathSchema(sourceFile, program)\n\n // Grab the path from the fileName\n const rawPath = fileName\n .replace(/^(?:src\\/)?app|\\/route\\.ts$/g, '')\n .replace(/\\[/g, '{')\n .replace(/]/g, '}')\n const path = rawPath.startsWith('/') ? rawPath : '/' + rawPath\n\n spec.paths[path] = resp\n }\n })\n\n return {\n GET: async (req: NextRequest) => {\n // OpenAPI Schema JSON\n if (req.nextUrl.pathname.endsWith('.json')) {\n // Just grabbing the origin here but we can be smarter and look for the greatest common few segments\n spec.servers = [{ url: req.nextUrl.origin }]\n\n return Response.json(spec)\n }\n // References\n\n return await ApiReference({\n url: req.nextUrl.pathname + '/schema.json',\n })()\n },\n }\n}\n"],
5
+ "mappings": "AAAA,SAAS,oBAAoB;AAC7B,SAAS,oBAAoB;AAE7B,SAAS,YAAY;AAGrB;AAAA,EAEE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAEP,SAAS,qBAAqB;AAe9B,MAAM,eAA6B;AAAA,EACjC,YAAY,MAAM;AAAA,EAClB,sBAAsB,CAAC,aAAa;AAAA,EACpC,qBAAqB,MAAM;AAAA,EAC3B,uBAAuB,MAAM;AAAA,EAC7B,YAAY,MAAM;AAAA,EAClB,eAAe,CAAC,aACd,iBAAiB,UAAU,aAAa,QAAQ,EAAE,SAAS,GAAG,aAA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9B,CAAC,EAAE;AAAA,IACL;AAAA,EACF;AACF;",
6
+ "names": []
7
+ }
package/dist/path.js CHANGED
@@ -1,84 +1,72 @@
1
- import { getJSDocFromNode, generateResponses, getSchemaFromTypeNode } from '@scalar/ts-to-openapi';
2
- import { extname, join } from 'node:path';
3
- import { isFunctionDeclaration, isVariableStatement, isParameter, isTypeLiteralNode, isPropertySignature, isIdentifier } from 'typescript';
4
-
5
- /** Check if identifier is a supported http method */
1
+ import { generateResponses, getJSDocFromNode, getSchemaFromTypeNode } from "@scalar/ts-to-openapi";
2
+ import { extname, join } from "node:path";
3
+ import {
4
+ isFunctionDeclaration,
5
+ isIdentifier,
6
+ isParameter,
7
+ isPropertySignature,
8
+ isTypeLiteralNode,
9
+ isVariableStatement
10
+ } from "typescript";
6
11
  const checkForMethod = (identifier) => {
7
- const method = identifier?.escapedText?.toLowerCase();
8
- return method?.match(/^(get|post|put|patch|delete|head|options)$/) ? method : null;
12
+ const method = identifier?.escapedText?.toLowerCase();
13
+ return method?.match(/^(get|post|put|patch|delete|head|options)$/) ? method : null;
9
14
  };
10
15
  const fileNameResolver = (source, target) => {
11
- const sourceExt = extname(source);
12
- const targetExt = extname(target);
13
- const targetRelative = target + (targetExt ? '' : sourceExt);
14
- const targetPath = join(source.replace(/\/([^/]+)$/, ''), targetRelative);
15
- return targetPath;
16
+ const sourceExt = extname(source);
17
+ const targetExt = extname(target);
18
+ const targetRelative = target + (targetExt ? "" : sourceExt);
19
+ const targetPath = join(source.replace(/\/([^/]+)$/, ""), targetRelative);
20
+ return targetPath;
16
21
  };
17
- /**
18
- * Takes a parameter node and returns a path parameter schema
19
- */
20
22
  const extractPathParams = (node, program) => {
21
- // Traverse to the params with type guards
22
- if (node &&
23
- isParameter(node) &&
24
- node.type &&
25
- isTypeLiteralNode(node.type) &&
26
- node.type.members[0] &&
27
- isPropertySignature(node.type.members[0]) &&
28
- isIdentifier(node.type.members[0].name) &&
29
- node.type.members[0].name.escapedText === 'params' &&
30
- node.type.members[0].type &&
31
- isTypeLiteralNode(node.type.members[0].type)) {
32
- return node.type.members[0].type?.members.flatMap((member) => {
33
- if (!isPropertySignature(member) || !member.type) {
34
- return [];
35
- }
36
- return {
37
- name: member.name?.getText(),
38
- schema: getSchemaFromTypeNode(member.type, program, fileNameResolver),
39
- in: 'path',
40
- };
41
- });
42
- }
43
- return [];
23
+ if (node && isParameter(node) && node.type && isTypeLiteralNode(node.type) && node.type.members[0] && isPropertySignature(node.type.members[0]) && isIdentifier(node.type.members[0].name) && node.type.members[0].name.escapedText === "params" && node.type.members[0].type && isTypeLiteralNode(node.type.members[0].type)) {
24
+ return node.type.members[0].type?.members.flatMap((member) => {
25
+ if (!isPropertySignature(member) || !member.type) {
26
+ return [];
27
+ }
28
+ return {
29
+ name: member.name?.getText(),
30
+ schema: getSchemaFromTypeNode(member.type, program, fileNameResolver),
31
+ in: "path"
32
+ };
33
+ });
34
+ }
35
+ return [];
44
36
  };
45
- /**
46
- * Traverse the typescript file and extract as much info as we can for the openapi spec
47
- */
48
37
  const getPathSchema = (sourceFile, program) => {
49
- const path = {};
50
- const typeChecker = program.getTypeChecker();
51
- sourceFile.statements.forEach((statement) => {
52
- // Function
53
- if (isFunctionDeclaration(statement) && statement.name) {
54
- const method = checkForMethod(statement.name);
55
- if (method) {
56
- const { title, description } = getJSDocFromNode(statement);
57
- const parameters = extractPathParams(statement.parameters[1], program);
58
- const responses = generateResponses(statement.body, typeChecker);
59
- path[method] = {
60
- summary: title,
61
- description,
62
- parameters,
63
- responses,
64
- };
65
- }
66
- }
67
- // TODO: variables
68
- else if (isVariableStatement(statement)) {
69
- const method = checkForMethod(statement.declarationList.declarations[0].name);
70
- if (method) {
71
- const { title, description } = getJSDocFromNode(statement);
72
- const responses = generateResponses(statement, typeChecker);
73
- path[method] = {
74
- summary: title,
75
- description,
76
- responses,
77
- };
78
- }
79
- }
80
- });
81
- return path;
38
+ const path = {};
39
+ const typeChecker = program.getTypeChecker();
40
+ sourceFile.statements.forEach((statement) => {
41
+ if (isFunctionDeclaration(statement) && statement.name) {
42
+ const method = checkForMethod(statement.name);
43
+ if (method) {
44
+ const { title, description } = getJSDocFromNode(statement);
45
+ const parameters = extractPathParams(statement.parameters[1], program);
46
+ const responses = generateResponses(statement.body, typeChecker);
47
+ path[method] = {
48
+ summary: title,
49
+ description,
50
+ parameters,
51
+ responses
52
+ };
53
+ }
54
+ } else if (isVariableStatement(statement)) {
55
+ const method = checkForMethod(statement.declarationList.declarations[0].name);
56
+ if (method) {
57
+ const { title, description } = getJSDocFromNode(statement);
58
+ const responses = generateResponses(statement, typeChecker);
59
+ path[method] = {
60
+ summary: title,
61
+ description,
62
+ responses
63
+ };
64
+ }
65
+ }
66
+ });
67
+ return path;
68
+ };
69
+ export {
70
+ getPathSchema
82
71
  };
83
-
84
- export { getPathSchema };
72
+ //# sourceMappingURL=path.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../src/path.ts"],
4
+ "sourcesContent": ["import { generateResponses, getJSDocFromNode, getSchemaFromTypeNode } from '@scalar/ts-to-openapi'\nimport type { OpenAPIV3_1 } from 'openapi-types'\nimport { extname, join } from 'node:path'\nimport {\n type Identifier,\n type ParameterDeclaration,\n type Program,\n type SourceFile,\n isFunctionDeclaration,\n isIdentifier,\n isParameter,\n isPropertySignature,\n isTypeLiteralNode,\n isVariableStatement,\n} from 'typescript'\n\n/** Check if identifier is a supported http method */\nconst checkForMethod = (identifier: Identifier) => {\n const method = identifier?.escapedText?.toLowerCase()\n\n return method?.match(/^(get|post|put|patch|delete|head|options)$/) ? (method as OpenAPIV3_1.HttpMethods) : null\n}\n\nconst fileNameResolver = (source: string, target: string) => {\n const sourceExt = extname(source)\n const targetExt = extname(target)\n\n const targetRelative = target + (targetExt ? '' : sourceExt)\n const targetPath = join(source.replace(/\\/([^/]+)$/, ''), targetRelative)\n\n return targetPath\n}\n\n/**\n * Takes a parameter node and returns a path parameter schema\n */\nconst extractPathParams = (node: ParameterDeclaration, program: Program): OpenAPIV3_1.ParameterObject[] => {\n // Traverse to the params with type guards\n if (\n node &&\n isParameter(node) &&\n node.type &&\n isTypeLiteralNode(node.type) &&\n node.type.members[0] &&\n isPropertySignature(node.type.members[0]) &&\n isIdentifier(node.type.members[0].name) &&\n node.type.members[0].name.escapedText === 'params' &&\n node.type.members[0].type &&\n isTypeLiteralNode(node.type.members[0].type)\n ) {\n return node.type.members[0].type?.members.flatMap((member) => {\n if (!isPropertySignature(member) || !member.type) {\n return []\n }\n\n return {\n name: member.name?.getText(),\n schema: getSchemaFromTypeNode(member.type, program, fileNameResolver),\n in: 'path',\n } as OpenAPIV3_1.ParameterObject\n })\n }\n\n return []\n}\n\n/**\n * Traverse the typescript file and extract as much info as we can for the openapi spec\n */\nexport const getPathSchema = (sourceFile: SourceFile, program: Program) => {\n const path: OpenAPIV3_1.PathsObject = {}\n const typeChecker = program.getTypeChecker()\n\n sourceFile.statements.forEach((statement) => {\n // Function\n if (isFunctionDeclaration(statement) && statement.name) {\n const method = checkForMethod(statement.name)\n if (method) {\n const { title, description } = getJSDocFromNode(statement)\n const parameters = extractPathParams(statement.parameters[1], program)\n const responses = generateResponses(statement.body, typeChecker)\n\n path[method] = {\n summary: title,\n description,\n parameters,\n responses,\n } as OpenAPIV3_1.OperationObject\n }\n }\n\n // TODO: variables\n else if (isVariableStatement(statement)) {\n const method = checkForMethod(statement.declarationList.declarations[0].name as Identifier)\n if (method) {\n const { title, description } = getJSDocFromNode(statement)\n const responses = generateResponses(statement, typeChecker)\n path[method] = {\n summary: title,\n description,\n responses,\n } as OpenAPIV3_1.OperationObject\n }\n }\n })\n\n return path\n}\n"],
5
+ "mappings": "AAAA,SAAS,mBAAmB,kBAAkB,6BAA6B;AAE3E,SAAS,SAAS,YAAY;AAC9B;AAAA,EAKE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAGP,MAAM,iBAAiB,CAAC,eAA2B;AACjD,QAAM,SA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,UAAU,IAAI;AAC5C,UAAI,QAAQ;AACV,cAAM,EAAE,OAAO,YAAY,IAAI,iBAAiB,SAAS;AACzD,cAAM,aAAa,kBAAkB,UAAU,WAAW,CAAC,GAAG,OAAO;AACrE,cAAM,YAAY,kBAAkB,UAAU,MAAM,WAAW;AAE/D,aAAK,MAAM,IAAI;AAAA,UACb,SAAS;AAAA,UACT;AAAA,UACA;AAAA,UACA;AAAA,QACF;AAAA,MACF;AAAA,IACF,WAGS,oBAAoB,SAAS,GAAG;AACvC,YAAM,SAAS,eAAe,UAAU,gBAAgB,aAAa,CAAC,EAAE,IAAkB;AAC1F,UAAI,QAAQ;AACV,cAAM,EAAE,OAAO,YAAY,IAAI,iBAAiB,SAAS;AACzD,cAAM,YAAY,kBAAkB,WAAW,WAAW;AAC1D,aAAK,MAAM,IAAI;AAAA,UACb,SAAS;AAAA,UACT;AAAA,UACA;AAAA,QACF;AAAA,MACF;AAAA,IACF;AAAA,EACF,CAAC;AAED,SAAO;AACT;",
6
+ "names": []
7
+ }
package/package.json CHANGED
@@ -16,7 +16,7 @@
16
16
  "scalar",
17
17
  "references"
18
18
  ],
19
- "version": "0.1.16",
19
+ "version": "0.1.17",
20
20
  "engines": {
21
21
  "node": ">=18"
22
22
  },
@@ -34,9 +34,9 @@
34
34
  ],
35
35
  "dependencies": {
36
36
  "fast-glob": "^3.3.2",
37
- "@scalar/types": "0.1.13",
38
- "@scalar/nextjs-api-reference": "0.7.14",
39
- "@scalar/ts-to-openapi": "0.0.5"
37
+ "@scalar/nextjs-api-reference": "0.7.15",
38
+ "@scalar/types": "0.1.14",
39
+ "@scalar/ts-to-openapi": "0.0.6"
40
40
  },
41
41
  "devDependencies": {
42
42
  "@types/node": "^20.17.10",
@@ -44,13 +44,11 @@
44
44
  "@types/react-dom": "^19.0.2",
45
45
  "next": "^15.2.3",
46
46
  "openapi-types": "^12.1.3",
47
- "@scalar/build-tooling": "0.1.18"
47
+ "@scalar/build-tooling": "0.1.19"
48
48
  },
49
49
  "scripts": {
50
- "build": "scalar-build-rollup",
50
+ "build": "scalar-build-esbuild",
51
51
  "dev": "next dev playground -p 5066",
52
- "format": "scalar-format",
53
- "format:check": "scalar-format-check",
54
52
  "lint:check": "scalar-lint-check",
55
53
  "lint:fix": "scalar-lint-fix",
56
54
  "types:build": "scalar-types-build",