Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified bun.lockb
Binary file not shown.
137 changes: 69 additions & 68 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,75 +1,76 @@
{
"name": "@elysiajs/swagger",
"version": "1.1.6",
"description": "Plugin for Elysia to auto-generate Swagger page",
"author": {
"name": "saltyAom",
"url": "https://github.com/SaltyAom",
"email": "saltyaom@gmail.com"
"name": "@elysiajs/swagger",
"version": "1.1.6",
"description": "Plugin for Elysia to auto-generate Swagger page",
"author": {
"name": "saltyAom",
"url": "https://github.com/SaltyAom",
"email": "saltyaom@gmail.com"
},
"main": "./dist/cjs/index.js",
"module": "./dist/index.mjs",
"types": "./dist/index.d.ts",
"exports": {
"./package.json": "./package.json",
".": {
"types": "./dist/index.d.ts",
"import": "./dist/index.mjs",
"require": "./dist/cjs/index.js"
},
"main": "./dist/cjs/index.js",
"module": "./dist/index.mjs",
"types": "./dist/index.d.ts",
"exports": {
"./package.json": "./package.json",
".": {
"types": "./dist/index.d.ts",
"import": "./dist/index.mjs",
"require": "./dist/cjs/index.js"
},
"./types": {
"types": "./dist/types.d.ts",
"import": "./dist/types.mjs",
"require": "./dist/cjs/types.js"
},
"./utils": {
"types": "./dist/utils.d.ts",
"import": "./dist/utils.mjs",
"require": "./dist/cjs/utils.js"
},
"./scalar": {
"types": "./dist/scalar/index.d.ts",
"import": "./dist/scalar/index.mjs",
"require": "./dist/cjs/scalar/index.js"
},
"./scalar/theme": {
"types": "./dist/scalar/theme.d.ts",
"import": "./dist/scalar/theme.mjs",
"require": "./dist/cjs/scalar/theme.js"
}
"./types": {
"types": "./dist/types.d.ts",
"import": "./dist/types.mjs",
"require": "./dist/cjs/types.js"
},
"keywords": [
"elysia",
"swagger"
],
"homepage": "https://github.com/elysiajs/elysia-swagger",
"repository": {
"type": "git",
"url": "https://github.com/elysiajs/elysia-swagger"
"./utils": {
"types": "./dist/utils.d.ts",
"import": "./dist/utils.mjs",
"require": "./dist/cjs/utils.js"
},
"bugs": "https://github.com/elysiajs/elysia-swagger/issues",
"license": "MIT",
"scripts": {
"dev": "bun run --watch example/index.ts",
"test": "bun test && npm run test:node",
"test:node": "npm install --prefix ./test/node/cjs/ && npm install --prefix ./test/node/esm/ && node ./test/node/cjs/index.js && node ./test/node/esm/index.js",
"build": "bun build.ts",
"release": "npm run build && npm run test && npm publish --access public"
"./scalar": {
"types": "./dist/scalar/index.d.ts",
"import": "./dist/scalar/index.mjs",
"require": "./dist/cjs/scalar/index.js"
},
"peerDependencies": {
"elysia": ">= 1.1.0"
},
"devDependencies": {
"@apidevtools/swagger-parser": "^10.1.0",
"@types/bun": "1.1.6",
"elysia": "1.1.18",
"eslint": "9.6.0",
"tsup": "^8.1.0",
"typescript": "^5.5.3"
},
"dependencies": {
"@scalar/types": "^0.0.12",
"openapi-types": "^12.1.3",
"pathe": "^1.1.2"
"./scalar/theme": {
"types": "./dist/scalar/theme.d.ts",
"import": "./dist/scalar/theme.mjs",
"require": "./dist/cjs/scalar/theme.js"
}
},
"keywords": [
"elysia",
"swagger"
],
"homepage": "https://github.com/elysiajs/elysia-swagger",
"repository": {
"type": "git",
"url": "https://github.com/elysiajs/elysia-swagger"
},
"bugs": "https://github.com/elysiajs/elysia-swagger/issues",
"license": "MIT",
"scripts": {
"dev": "bun run --watch example/index.ts",
"test": "bun test && npm run test:node",
"test:node": "npm install --prefix ./test/node/cjs/ && npm install --prefix ./test/node/esm/ && node ./test/node/cjs/index.js && node ./test/node/esm/index.js",
"build": "bun build.ts",
"release": "npm run build && npm run test && npm publish --access public"
},
"peerDependencies": {
"elysia": ">= 1.1.0"
},
"devDependencies": {
"@apidevtools/swagger-parser": "^10.1.0",
"@types/bun": "1.1.6",
"elysia": "1.1.18",
"eslint": "9.6.0",
"tsup": "^8.1.0",
"typescript": "^5.5.3"
},
"dependencies": {
"@scalar/themes": "^0.9.52",
"@scalar/types": "^0.0.12",
"openapi-types": "^12.1.3",
"pathe": "^1.1.2"
}
}
5 changes: 4 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,10 @@ export const swagger = async <Path extends string = '/swagger'>(
...scalarConfig.spec,
url: `/${relativePath}/json`
},
...scalarConfig
...scalarConfig,
// so we can showcase the elysia theme
// @ts-expect-error
_integration: 'elysiajs'
}

return new Response(
Expand Down
4 changes: 2 additions & 2 deletions src/scalar/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import scalarElysiaTheme from './theme'
import { elysiajsTheme } from '@scalar/themes'
import type { OpenAPIV3 } from 'openapi-types'
import type { ReferenceConfiguration } from '@scalar/types'

Expand Down Expand Up @@ -29,7 +29,7 @@ export const ScalarRender = (
}
</style>
<style>
${config.customCss ?? scalarElysiaTheme}
${config.customCss ?? elysiajsTheme}
</style>
</head>
<body>
Expand Down
196 changes: 0 additions & 196 deletions src/scalar/theme.ts

This file was deleted.