@scalar/fastify-api-reference 1.57.5 → 1.58.0
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 +6 -0
- package/dist/fastifyApiReference.d.ts.map +1 -1
- package/dist/fastifyApiReference.js +3 -0
- package/dist/js/standalone.js +253 -255
- package/package.json +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @scalar/fastify-api-reference
|
|
2
2
|
|
|
3
|
+
## 1.58.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#9209](https://github.com/scalar/scalar/pull/9209): Fix intermittent TypeScript error when hook handlers are spread into route options. Annotating the internal `schemaToHideRoute` constant as `FastifySchema` prevents TypeScript from narrowing its type to `{ hide: boolean }`, which caused incompatible hook-handler types with Fastify 5's `NoInfer<SchemaCompiler>`-based route definitions.
|
|
8
|
+
|
|
3
9
|
## 1.57.5
|
|
4
10
|
|
|
5
11
|
## 1.57.4
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fastifyApiReference.d.ts","sourceRoot":"","sources":["../src/fastifyApiReference.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,iBAAiB,
|
|
1
|
+
{"version":3,"file":"fastifyApiReference.d.ts","sourceRoot":"","sources":["../src/fastifyApiReference.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,iBAAiB,EAAiB,0BAA0B,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAA;AAI7G,OAAO,KAAK,EAA8D,0BAA0B,EAAE,MAAM,SAAS,CAAA;AAoDrH,QAAA,MAAM,mBAAmB,sIAwMxB,CAAA;AAED,eAAe,mBAAmB,CAAA"}
|
|
@@ -15,6 +15,9 @@ const RELATIVE_JAVASCRIPT_PATH = 'js/scalar.js';
|
|
|
15
15
|
*
|
|
16
16
|
* @see https://github.com/fastify/fastify-swagger#hide-a-route
|
|
17
17
|
*/
|
|
18
|
+
// Typed as FastifySchema so route inference uses FastifySchema (not the narrow
|
|
19
|
+
// literal { hide: boolean }), keeping hook handler types compatible across
|
|
20
|
+
// Fastify v4 and v5 even when @fastify/swagger augments FastifySchema with `hide`.
|
|
18
21
|
const schemaToHideRoute = {
|
|
19
22
|
hide: true,
|
|
20
23
|
};
|