@scalar/fastify-api-reference 1.25.18 → 1.25.20

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,14 @@
1
1
  # @scalar/fastify-api-reference
2
2
 
3
+ ## 1.25.20
4
+
5
+ ### Patch Changes
6
+
7
+ - b966dfe: fix: JS can't be fetched in proxied environments
8
+ - b966dfe: chore!: mark `publicPath` as deprecated, remove it from the configuration
9
+
10
+ ## 1.25.19
11
+
3
12
  ## 1.25.18
4
13
 
5
14
  ### Patch Changes
@@ -1,66 +1,5 @@
1
- import type { ReferenceConfiguration } from '@scalar/types/legacy';
2
- import type { FastifyBaseLogger, FastifyTypeProviderDefault, RawServerDefault, onRequestHookHandler, preHandlerHookHandler } from 'fastify';
3
- export type FastifyApiReferenceOptions = {
4
- /**
5
- * If you’re prefixing Fastify with a path, you can set it here.
6
- * It’ll be added to the JavaScript URL and the route.
7
- *
8
- * Example: `${publicPath}${routePrefix}/@scalar/fastify-api-reference/js/browser.js`
9
- */
10
- publicPath?: string;
11
- /**
12
- * Prefix the route with a path. This is where the API Reference will be available.
13
- *
14
- * @default '/reference'
15
- */
16
- routePrefix?: `/${string}`;
17
- /**
18
- * Set where the OpenAPI specification is exposed under `${routePrefix}`.
19
- *
20
- * The specification is always available on these endpoints, parsed by `@scalar/openapi-parser`.
21
- *
22
- * The specification is sourced from, in order of precedence:
23
- * - `configuration.spec.content`
24
- * - `configuration.spec.url` – fetched via `@scalar/openapi-parser/plugins/fetch-urls`
25
- * - `@fastify/swagger` – if `configuration.spec` is not provided
26
- *
27
- * These endpoints can be used to fetch the OpenAPI specification for your own programmatic use.
28
- *
29
- * @default{ json: '/openapi.json', yaml: '/openapi.yaml' }
30
- */
31
- openApiDocumentEndpoints?: {
32
- /**
33
- * Set where the OpenAPI specification is exposed under `${routePrefix}`, in JSON format.
34
- *
35
- * With the default value, the endpoint is: `${publicPath}${routePrefix}/openapi.json`
36
- *
37
- * @default '/openapi.json'
38
- */
39
- json?: `/${string}`;
40
- /**
41
- * Set where the OpenAPI specification is exposed under `${routePrefix}`, in YAML format.
42
- *
43
- * With the default value, the endpoint is: `${publicPath}${routePrefix}/openapi.yaml`
44
- *
45
- * @default '/openapi.yaml'
46
- */
47
- yaml?: `/${string}`;
48
- };
49
- /**
50
- * The universal configuration object for @scalar/api-reference.
51
- *
52
- * Read more: https://github.com/scalar/scalar
53
- */
54
- configuration?: ReferenceConfiguration;
55
- /**
56
- * The hooks for the API Reference.
57
- */
58
- hooks?: FastifyApiReferenceHooksOptions;
59
- };
60
- export type FastifyApiReferenceHooksOptions = Partial<{
61
- onRequest?: onRequestHookHandler;
62
- preHandler?: preHandlerHookHandler;
63
- }>;
1
+ import type { FastifyBaseLogger, FastifyTypeProviderDefault, RawServerDefault } from 'fastify';
2
+ import type { FastifyApiReferenceOptions } from './types';
64
3
  /**
65
4
  * The Fastify custom theme CSS
66
5
  */
@@ -1 +1 @@
1
- {"version":3,"file":"fastifyApiReference.d.ts","sourceRoot":"","sources":["../src/fastifyApiReference.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAW,sBAAsB,EAAE,MAAM,sBAAsB,CAAA;AAC3E,OAAO,KAAK,EACV,iBAAiB,EACjB,0BAA0B,EAC1B,gBAAgB,EAChB,oBAAoB,EACpB,qBAAqB,EACtB,MAAM,SAAS,CAAA;AAMhB,MAAM,MAAM,0BAA0B,GAAG;IACvC;;;;;OAKG;IACH,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB;;;;OAIG;IACH,WAAW,CAAC,EAAE,IAAI,MAAM,EAAE,CAAA;IAC1B;;;;;;;;;;;;;OAaG;IACH,wBAAwB,CAAC,EAAE;QACzB;;;;;;WAMG;QACH,IAAI,CAAC,EAAE,IAAI,MAAM,EAAE,CAAA;QACnB;;;;;;WAMG;QACH,IAAI,CAAC,EAAE,IAAI,MAAM,EAAE,CAAA;KACpB,CAAA;IACD;;;;OAI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