@scalar/hono-api-reference 0.5.154 → 0.5.156

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/README.md CHANGED
@@ -1,11 +1,11 @@
1
- # Scalar Hono API Reference Plugin
1
+ # Scalar for Hono
2
2
 
3
3
  [![Version](https://img.shields.io/npm/v/%40scalar/hono-api-reference)](https://www.npmjs.com/package/@scalar/hono-api-reference)
4
4
  [![Downloads](https://img.shields.io/npm/dm/%40scalar/hono-api-reference)](https://www.npmjs.com/package/@scalar/hono-api-reference)
5
5
  [![License](https://img.shields.io/npm/l/%40scalar%2Fhono-api-reference)](https://www.npmjs.com/package/@scalar/hono-api-reference)
6
6
  [![Discord](https://img.shields.io/discord/1135330207960678410?style=flat&color=5865F2)](https://discord.gg/scalar)
7
7
 
8
- This middleware provides an easy way to render a beautiful API reference based on an OpenAPI/Swagger file with Hono.
8
+ This middleware provides an easy way to render a beautiful API reference based on an OpenAPI/Swagger document with Hono.
9
9
 
10
10
  ![hono-js](https://github.com/scalar/scalar/assets/6176314/6f5a2102-e377-4d4e-9cfb-a512f5e0a9ba)
11
11
 
@@ -91,3 +91,11 @@ app.use(
91
91
  }),
92
92
  )
93
93
  ```
94
+
95
+ ## Community
96
+
97
+ We are API nerds. You too? Let’s chat on Discord: <https://discord.gg/scalar>
98
+
99
+ ## License
100
+
101
+ The source code in this repository is licensed under [MIT](https://github.com/scalar/scalar/blob/main/LICENSE).
@@ -1 +1 @@
1
- {"version":3,"file":"honoApiReference.d.ts","sourceRoot":"","sources":["../src/honoApiReference.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAA;AAClE,OAAO,KAAK,EAAE,GAAG,EAAE,iBAAiB,EAAE,MAAM,MAAM,CAAA;AAGlD,MAAM,MAAM,mBAAmB,GAAG,sBAAsB,GAAG;IACzD,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,GAAG,CAAC,EAAE,MAAM,CAAA;CACb,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,cAAc,mtHAoG1B,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,UAAU,kBAAmB,mBAAmB,uGAmB5D,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,YAAY,GACtB,CAAC,SAAS,GAAG,WAAW,mBAAmB,KAAG,iBAAiB,CAAC,CAAC,CAoBjE,CAAA"}
1
+ {"version":3,"file":"honoApiReference.d.ts","sourceRoot":"","sources":["../src/honoApiReference.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAA;AAClE,OAAO,KAAK,EAAE,GAAG,EAAE,iBAAiB,EAAE,MAAM,MAAM,CAAA;AAGlD,MAAM,MAAM,mBAAmB,GAAG,sBAAsB,GAAG;IACzD,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,GAAG,CAAC,EAAE,MAAM,CAAA;CACb,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,cAAc,mtHAoG1B,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,UAAU,kBAAmB,mBAAmB,uGA0B5D,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,YAAY,GACtB,CAAC,SAAS,GAAG,WAAW,mBAAmB,KAAG,iBAAiB,CAAC,CAAC,CAoBjE,CAAA"}
@@ -108,11 +108,17 @@ const customThemeCSS = `
108
108
  * The HTML to load the @scalar/api-reference JavaScript package.
109
109
  */
110
110
  const javascript = (configuration) => {
111
+ const defaultConfiguration = {
112
+ _integration: 'hono',
113
+ };
111
114
  return html `
112
115
  <script
113
116
  id="api-reference"
114
117
  type="application/json"
115
- data-configuration="${JSON.stringify(configuration)
118
+ data-configuration="${JSON.stringify({
119
+ ...defaultConfiguration,
120
+ ...configuration,
121
+ })
116
122
  .split('"')
117
123
  .join('&quot;')}">
118
124
  ${raw(configuration.spec?.content
package/package.json CHANGED
@@ -10,7 +10,7 @@
10
10
  "url": "https://github.com/scalar/scalar.git",
11
11
  "directory": "packages/hono-api-reference"
12
12
  },
13
- "version": "0.5.154",
13
+ "version": "0.5.156",
14
14
  "engines": {
15
15
  "node": ">=18"
16
16
  },
@@ -29,13 +29,12 @@
29
29
  ],
30
30
  "module": "dist/index.js",
31
31
  "dependencies": {
32
- "@scalar/types": "0.0.15"
32
+ "@scalar/types": "0.0.17"
33
33
  },
34
34
  "devDependencies": {
35
35
  "@hono/node-server": "^1.11.0",
36
36
  "@hono/zod-openapi": "^0.8.6",
37
- "hono": "^4.2.7",
38
- "tsup": "^7.2.0",
37
+ "hono": "^4.6.5",
39
38
  "vite": "^5.2.10",
40
39
  "vitest": "^1.6.0",
41
40
  "@scalar/build-tooling": "0.1.11"