@scalar/hono-api-reference 0.5.179 → 0.5.181
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/dist/honoApiReference.d.ts +2 -2
- package/dist/honoApiReference.d.ts.map +1 -1
- package/dist/honoApiReference.js +7 -9
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/types.d.ts +1 -1
- package/package.json +3 -4
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Env, MiddlewareHandler } from 'hono';
|
|
2
|
-
import type { ApiReferenceConfiguration } from './types';
|
|
2
|
+
import type { ApiReferenceConfiguration } from './types.ts';
|
|
3
3
|
/**
|
|
4
4
|
* The custom theme for Hono
|
|
5
5
|
*/
|
|
@@ -7,5 +7,5 @@ export declare const customTheme = "\n.light-mode {\n color-scheme: light;\n -
|
|
|
7
7
|
/**
|
|
8
8
|
* The Hono middleware for the Scalar API Reference.
|
|
9
9
|
*/
|
|
10
|
-
export declare const apiReference: <E extends Env>(givenConfiguration: ApiReferenceConfiguration) => MiddlewareHandler<E>;
|
|
10
|
+
export declare const apiReference: <E extends Env>(givenConfiguration: Partial<ApiReferenceConfiguration>) => MiddlewareHandler<E>;
|
|
11
11
|
//# sourceMappingURL=honoApiReference.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"honoApiReference.d.ts","sourceRoot":"","sources":["../src/honoApiReference.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,iBAAiB,EAAE,MAAM,MAAM,CAAA;AAGlD,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"honoApiReference.d.ts","sourceRoot":"","sources":["../src/honoApiReference.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,iBAAiB,EAAE,MAAM,MAAM,CAAA;AAGlD,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,YAAY,CAAA;AAE3D;;GAEG;AACH,eAAO,MAAM,WAAW,mtHAoGvB,CAAA;AASD;;GAEG;AACH,eAAO,MAAM,YAAY,GAAI,CAAC,SAAS,GAAG,sBACpB,OAAO,CAAC,yBAAyB,CAAC,KACrD,iBAAiB,CAAC,CAAC,CASrB,CAAA"}
|
package/dist/honoApiReference.js
CHANGED
|
@@ -1,11 +1,5 @@
|
|
|
1
1
|
import { getHtmlDocument } from '@scalar/api-reference/lib/html-rendering';
|
|
2
2
|
|
|
3
|
-
/**
|
|
4
|
-
* The default configuration for the API Reference.
|
|
5
|
-
*/
|
|
6
|
-
const DEFAULT_CONFIGURATION = {
|
|
7
|
-
_integration: 'hono',
|
|
8
|
-
};
|
|
9
3
|
/**
|
|
10
4
|
* The custom theme for Hono
|
|
11
5
|
*/
|
|
@@ -110,6 +104,12 @@ const customTheme = `
|
|
|
110
104
|
--scalar-sidebar-search-color: var(--scalar-color-3);
|
|
111
105
|
}
|
|
112
106
|
`;
|
|
107
|
+
/**
|
|
108
|
+
* The default configuration for the API Reference.
|
|
109
|
+
*/
|
|
110
|
+
const DEFAULT_CONFIGURATION = {
|
|
111
|
+
_integration: 'hono',
|
|
112
|
+
};
|
|
113
113
|
/**
|
|
114
114
|
* The Hono middleware for the Scalar API Reference.
|
|
115
115
|
*/
|
|
@@ -120,9 +120,7 @@ const apiReference = (givenConfiguration) => {
|
|
|
120
120
|
...givenConfiguration,
|
|
121
121
|
};
|
|
122
122
|
// Respond with the HTML document
|
|
123
|
-
return async (c) => {
|
|
124
|
-
return c.html(/* html */ `${getHtmlDocument(configuration, customTheme)}`);
|
|
125
|
-
};
|
|
123
|
+
return async (c) => c.html(/* html */ `${getHtmlDocument(configuration, customTheme)}`);
|
|
126
124
|
};
|
|
127
125
|
|
|
128
126
|
export { apiReference, customTheme };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
1
|
+
export { apiReference } from './honoApiReference.ts';
|
|
2
|
+
export type { ApiReferenceConfiguration } from './types.ts';
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAA;AACpD,YAAY,EAAE,yBAAyB,EAAE,MAAM,YAAY,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { apiReference
|
|
1
|
+
export { apiReference } from './honoApiReference.js';
|
package/dist/types.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { HtmlRenderingConfiguration } from '@scalar/api-reference/lib/html-rendering';
|
|
2
2
|
/**
|
|
3
|
-
* The configuration for the Scalar API Reference for
|
|
3
|
+
* The configuration for the Scalar API Reference for Hono
|
|
4
4
|
*/
|
|
5
5
|
export type ApiReferenceConfiguration = HtmlRenderingConfiguration;
|
|
6
6
|
//# sourceMappingURL=types.d.ts.map
|
package/package.json
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"url": "git+https://github.com/scalar/scalar.git",
|
|
11
11
|
"directory": "integrations/hono"
|
|
12
12
|
},
|
|
13
|
-
"version": "0.5.
|
|
13
|
+
"version": "0.5.181",
|
|
14
14
|
"engines": {
|
|
15
15
|
"node": ">=18"
|
|
16
16
|
},
|
|
@@ -29,8 +29,7 @@
|
|
|
29
29
|
],
|
|
30
30
|
"module": "dist/index.js",
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@scalar/api-reference": "1.25.
|
|
33
|
-
"@scalar/types": "0.0.36"
|
|
32
|
+
"@scalar/api-reference": "1.25.128"
|
|
34
33
|
},
|
|
35
34
|
"devDependencies": {
|
|
36
35
|
"@hono/node-server": "^1.11.0",
|
|
@@ -38,7 +37,7 @@
|
|
|
38
37
|
"hono": "^4.6.5",
|
|
39
38
|
"vite": "^5.4.10",
|
|
40
39
|
"vitest": "^1.6.0",
|
|
41
|
-
"@scalar/build-tooling": "0.1.
|
|
40
|
+
"@scalar/build-tooling": "0.1.16"
|
|
42
41
|
},
|
|
43
42
|
"peerDependencies": {
|
|
44
43
|
"hono": "^4.0.0"
|