@scalar/api-reference 1.31.3 → 1.31.4

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.
Files changed (127) hide show
  1. package/CHANGELOG.md +36 -0
  2. package/dist/browser/standalone.js +9287 -9267
  3. package/dist/browser/webpack-stats.json +1 -1
  4. package/dist/components/ApiReferenceLayout.vue.d.ts.map +1 -1
  5. package/dist/components/ApiReferenceLayout.vue.js +2 -2
  6. package/dist/components/ApiReferenceLayout.vue2.js +69 -71
  7. package/dist/components/Content/ClientLibraries/ClientLibraries.vue.js +2 -2
  8. package/dist/components/Content/ClientLibraries/ClientLibraries.vue2.js +1 -1
  9. package/dist/components/Content/Introduction/Description.vue.d.ts.map +1 -1
  10. package/dist/components/Content/Introduction/Description.vue.js +2 -2
  11. package/dist/components/Content/Lazy/Loading.vue.d.ts.map +1 -1
  12. package/dist/components/Content/Lazy/Loading.vue.js +1 -1
  13. package/dist/components/Content/Schema/SchemaComposition.vue.d.ts.map +1 -1
  14. package/dist/components/Content/Schema/SchemaComposition.vue.js +81 -101
  15. package/dist/components/Content/Schema/SchemaProperty.vue.d.ts.map +1 -1
  16. package/dist/components/Content/Schema/SchemaProperty.vue.js +2 -2
  17. package/dist/components/Content/Schema/SchemaProperty.vue2.js +114 -105
  18. package/dist/components/Content/Schema/helpers/merge-all-of-schemas.js +35 -35
  19. package/dist/components/Content/Schema/helpers/optimizeValueForDisplay.d.ts.map +1 -1
  20. package/dist/components/Content/Schema/helpers/optimizeValueForDisplay.js +17 -15
  21. package/dist/components/Content/Schema/helpers/schema-name.js +13 -21
  22. package/dist/components/Content/Tag/OperationsList.vue.d.ts.map +1 -1
  23. package/dist/components/Content/Tag/OperationsList.vue.js +1 -1
  24. package/dist/components/Content/Tag/OperationsList.vue2.js +10 -9
  25. package/dist/components/Content/Tag/OperationsListItem.vue.d.ts.map +1 -1
  26. package/dist/components/Content/Tag/OperationsListItem.vue.js +1 -1
  27. package/dist/components/Content/Tag/OperationsListItem.vue2.js +29 -28
  28. package/dist/components/Content/Tag/TagList.vue.d.ts.map +1 -1
  29. package/dist/components/Content/Tag/TagList.vue.js +35 -34
  30. package/dist/components/DocumentSelector/DocumentSelector.vue.d.ts.map +1 -1
  31. package/dist/components/DocumentSelector/DocumentSelector.vue.js +21 -28
  32. package/dist/components/HttpMethod/HttpMethod.vue.d.ts +1 -20
  33. package/dist/components/HttpMethod/HttpMethod.vue.d.ts.map +1 -1
  34. package/dist/components/HttpMethod/HttpMethod.vue.js +12 -13
  35. package/dist/components/Section/CompactSection.vue.js +2 -2
  36. package/dist/components/Section/CompactSection.vue2.js +6 -6
  37. package/dist/components/Sidebar/Sidebar.vue.d.ts.map +1 -1
  38. package/dist/components/Sidebar/Sidebar.vue.js +2 -2
  39. package/dist/components/Sidebar/Sidebar.vue2.js +1 -1
  40. package/dist/components/Sidebar/SidebarElement.vue.js +1 -1
  41. package/dist/components/Sidebar/SidebarElement.vue2.js +5 -5
  42. package/dist/esm.d.ts.map +1 -1
  43. package/dist/features/DocumentSource/hooks/useDocumentFetcher.js +1 -1
  44. package/dist/features/DocumentSource/hooks/useDocumentSource.d.ts +1 -1
  45. package/dist/features/DocumentSource/hooks/useDocumentSource.d.ts.map +1 -1
  46. package/dist/features/DocumentSource/hooks/useDocumentSource.js +11 -11
  47. package/dist/features/DownloadLink/DownloadLink.vue.d.ts.map +1 -1
  48. package/dist/features/DownloadLink/DownloadLink.vue.js +2 -2
  49. package/dist/features/DownloadLink/DownloadLink.vue2.js +21 -21
  50. package/dist/features/ExampleRequest/ExampleRequest.vue.d.ts.map +1 -1
  51. package/dist/features/ExampleRequest/ExampleRequest.vue.js +1 -1
  52. package/dist/features/ExampleRequest/ExampleRequest.vue2.js +1 -1
  53. package/dist/features/Search/SearchButton.vue.d.ts.map +1 -1
  54. package/dist/features/Search/SearchButton.vue.js +2 -2
  55. package/dist/features/Search/SearchButton.vue2.js +16 -16
  56. package/dist/features/Search/SearchModal.vue.d.ts.map +1 -1
  57. package/dist/features/Search/SearchModal.vue.js +2 -2
  58. package/dist/features/Search/SearchModal.vue2.js +1 -1
  59. package/dist/features/Search/useSearchIndex.d.ts.map +1 -1
  60. package/dist/features/Search/useSearchIndex.js +29 -28
  61. package/dist/features/sidebar/helpers/create-sidebar.d.ts +26 -0
  62. package/dist/features/sidebar/helpers/create-sidebar.d.ts.map +1 -0
  63. package/dist/features/sidebar/hooks/useSidebar.d.ts +23 -0
  64. package/dist/features/sidebar/hooks/useSidebar.d.ts.map +1 -0
  65. package/dist/features/sidebar/index.d.ts +2 -0
  66. package/dist/features/sidebar/index.d.ts.map +1 -0
  67. package/dist/features/traverse-schema/helpers/get-tag.d.ts +4 -0
  68. package/dist/features/traverse-schema/helpers/get-tag.d.ts.map +1 -0
  69. package/dist/features/traverse-schema/helpers/operation-id-params.d.ts +8 -0
  70. package/dist/features/traverse-schema/helpers/operation-id-params.d.ts.map +1 -0
  71. package/dist/features/traverse-schema/helpers/operation-id-params.js +8 -0
  72. package/dist/features/traverse-schema/helpers/traverse-description.d.ts +9 -0
  73. package/dist/features/traverse-schema/helpers/traverse-description.d.ts.map +1 -0
  74. package/dist/features/traverse-schema/helpers/traverse-document.d.ts +16 -0
  75. package/dist/features/traverse-schema/helpers/traverse-document.d.ts.map +1 -0
  76. package/dist/features/traverse-schema/helpers/traverse-paths.d.ts +11 -0
  77. package/dist/features/traverse-schema/helpers/traverse-paths.d.ts.map +1 -0
  78. package/dist/features/traverse-schema/helpers/traverse-schemas.d.ts +6 -0
  79. package/dist/features/traverse-schema/helpers/traverse-schemas.d.ts.map +1 -0
  80. package/dist/features/traverse-schema/helpers/traverse-tags.d.ts +9 -0
  81. package/dist/features/traverse-schema/helpers/traverse-tags.d.ts.map +1 -0
  82. package/dist/features/traverse-schema/helpers/traverse-webhooks.d.ts +6 -0
  83. package/dist/features/traverse-schema/helpers/traverse-webhooks.d.ts.map +1 -0
  84. package/dist/features/traverse-schema/index.d.ts +4 -0
  85. package/dist/features/traverse-schema/index.d.ts.map +1 -0
  86. package/dist/features/traverse-schema/types.d.ts +51 -0
  87. package/dist/features/traverse-schema/types.d.ts.map +1 -0
  88. package/dist/helpers/parse.d.ts.map +1 -1
  89. package/dist/helpers/parse.js +16 -16
  90. package/dist/hooks/useNavState.d.ts +9 -4
  91. package/dist/hooks/useNavState.d.ts.map +1 -1
  92. package/dist/hooks/useNavState.js +31 -29
  93. package/dist/hooks/useSidebar.d.ts.map +1 -1
  94. package/dist/hooks/useSidebar.js +69 -68
  95. package/dist/index.js +1 -1
  96. package/dist/legacy/fixtures/httpRequestMethods.js +2 -6
  97. package/dist/stores/useHttpClientStore.js +9 -8
  98. package/dist/style.css +1 -1
  99. package/dist/types.d.ts +0 -1
  100. package/dist/types.d.ts.map +1 -1
  101. package/package.json +12 -11
  102. package/dist/components/HttpMethod/constants.d.ts +0 -9
  103. package/dist/components/HttpMethod/constants.d.ts.map +0 -1
  104. package/dist/components/HttpMethod/constants.js +0 -36
  105. package/dist/components/HttpMethod/utils/isRequestMethod.d.ts +0 -4
  106. package/dist/components/HttpMethod/utils/isRequestMethod.d.ts.map +0 -1
  107. package/dist/components/HttpMethod/utils/isRequestMethod.js +0 -7
  108. package/dist/helpers/freeze-element.d.ts +0 -11
  109. package/dist/helpers/freeze-element.d.ts.map +0 -1
  110. package/dist/helpers/freeze-element.js +0 -20
  111. package/dist/helpers/is-mac-os.d.ts +0 -5
  112. package/dist/helpers/is-mac-os.d.ts.map +0 -1
  113. package/dist/helpers/is-mac-os.js +0 -4
  114. package/dist/helpers/measure.d.ts +0 -21
  115. package/dist/helpers/measure.d.ts.map +0 -1
  116. package/dist/helpers/measure.js +0 -7
  117. package/dist/helpers/scroll-to-id.d.ts +0 -7
  118. package/dist/helpers/scroll-to-id.d.ts.map +0 -1
  119. package/dist/helpers/scroll-to-id.js +0 -21
  120. package/dist/helpers/sleep.d.ts +0 -6
  121. package/dist/helpers/sleep.d.ts.map +0 -1
  122. package/dist/helpers/sleep.js +0 -4
  123. package/dist/legacy/helpers/index.d.ts +0 -2
  124. package/dist/legacy/helpers/index.d.ts.map +0 -1
  125. package/dist/legacy/helpers/normalizeRequestMethod.d.ts +0 -6
  126. package/dist/legacy/helpers/normalizeRequestMethod.d.ts.map +0 -1
  127. package/dist/legacy/helpers/normalizeRequestMethod.js +0 -10
package/dist/types.d.ts CHANGED
@@ -66,6 +66,5 @@ export type DocumentSelectorSlot = {
66
66
  };
67
67
  export type ReferenceSlotProps = {
68
68
  spec: Spec;
69
- breadcrumb: string;
70
69
  };
71
70
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,4BAA4B,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAA;AAC1G,OAAO,KAAK,EAAE,WAAW,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAA;AAE7D,YAAY,EAAE,yBAAyB,EAAE,CAAA;AAEzC,MAAM,MAAM,cAAc,GAAG;IAC3B,aAAa,CAAC,EAAE,4BAA4B,CAAA;CAC7C,CAAA;AAED;;GAEG;AACH,MAAM,MAAM,oBAAoB,GAAG;IACjC,aAAa,EAAE,OAAO,CAAC,yBAAyB,CAAC,CAAA;IACjD;;;;;;;;;;;;OAYG;IACH,oBAAoB,CAAC,EAAE,WAAW,CAAC,QAAQ,CAAA;IAC3C;;OAEG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,MAAM,EAAE,OAAO,CAAA;IACf;;OAEG;IACH,UAAU,CAAC,EAAE,IAAI,CAAA;IACjB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB,CAAA;AAED,MAAM,MAAM,sBAAsB,GAAG,UAAU,GAAG,eAAe,CAAA;AAEjE,MAAM,MAAM,iBAAiB,GAAG;IAC9B,CAAC,GAAG,EAAE,MAAM,GAAG;QACb,IAAI,EAAE,MAAM,CAAA;QACZ,M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,MAAM,MAAM,kBAAkB,GAAG;IAC/B,IAAI,EAAE,IAAI,CAAA;CACX,CAAA"}
package/package.json CHANGED
@@ -20,7 +20,7 @@
20
20
  "vue",
21
21
  "vue3"
22
22
  ],
23
- "version": "1.31.3",
23
+ "version": "1.31.4",
24
24
  "engines": {
25
25
  "node": ">=20"
26
26
  },
@@ -54,18 +54,19 @@
54
54
  "nanoid": "^5.1.5",
55
55
  "vue": "^3.5.12",
56
56
  "zod": "3.24.1",
57
- "@scalar/api-client": "2.5.2",
58
- "@scalar/code-highlight": "0.1.1",
59
- "@scalar/components": "0.14.5",
57
+ "@scalar/api-client": "2.5.3",
58
+ "@scalar/code-highlight": "0.1.2",
59
+ "@scalar/components": "0.14.6",
60
+ "@scalar/helpers": "0.0.2",
60
61
  "@scalar/icons": "0.4.2",
61
- "@scalar/oas-utils": "0.4.2",
62
- "@scalar/openapi-types": "0.3.1",
63
- "@scalar/openapi-parser": "0.14.0",
62
+ "@scalar/oas-utils": "0.4.3",
63
+ "@scalar/openapi-parser": "0.15.0",
64
+ "@scalar/openapi-types": "0.3.2",
64
65
  "@scalar/snippetz": "0.3.0",
65
- "@scalar/types": "0.2.1",
66
66
  "@scalar/use-hooks": "0.2.2",
67
- "@scalar/use-toasts": "0.8.0",
68
- "@scalar/themes": "0.13.1"
67
+ "@scalar/types": "0.2.2",
68
+ "@scalar/themes": "0.13.2",
69
+ "@scalar/use-toasts": "0.8.0"
69
70
  },
70
71
  "devDependencies": {
71
72
  "@tailwindcss/vite": "^4.1.7",
@@ -84,7 +85,7 @@
84
85
  "vitest": "^1.6.0",
85
86
  "@scalar/galaxy": "0.5.0",
86
87
  "@scalar/react-renderer": "0.2.0",
87
- "@scalar/build-tooling": "0.2.1"
88
+ "@scalar/build-tooling": "0.2.2"
88
89
  },
89
90
  "scripts": {
90
91
  "build": "pnpm build:default && pnpm build:standalone && pnpm types:build && tsc-alias -p tsconfig.build.json",
@@ -1,9 +0,0 @@
1
- export declare const validRequestMethods: readonly ["GET", "POST", "PUT", "HEAD", "DELETE", "PATCH", "OPTIONS", "CONNECT", "TRACE"];
2
- export type RequestMethod = (typeof validRequestMethods)[number];
3
- export declare const requestMethodColors: {
4
- [x in RequestMethod]: string;
5
- };
6
- export declare const requestMethodAbbreviations: {
7
- [x in RequestMethod]: string;
8
- };
9
- //# sourceMappingURL=constants.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/components/HttpMethod/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,mBAAmB,2FAUtB,CAAA;AAEV,MAAM,MAAM,aAAa,GAAG,CAAC,OAAO,mBAAmB,CAAC,CAAC,MAAM,CAAC,CAAA;AAEhE,eAAO,MAAM,mBAAmB,EAAE;KAAG,CAAC,IAAI,aAAa,GAAG,MAAM;CAU/D,CAAA;AAED,eAAO,MAAM,0BAA0B,EAAE;KAAG,CAAC,IAAI,aAAa,GAAG,MAAM;CAUtE,CAAA"}
@@ -1,36 +0,0 @@
1
- const r = [
2
- "GET",
3
- "POST",
4
- "PUT",
5
- "HEAD",
6
- "DELETE",
7
- "PATCH",
8
- "OPTIONS",
9
- "CONNECT",
10
- "TRACE"
11
- ], a = {
12
- POST: "var(--scalar-color-green)",
13
- DELETE: "var(--scalar-color-red)",
14
- PATCH: "var(--scalar-color-yellow)",
15
- GET: "var(--scalar-color-blue)",
16
- PUT: "var(--scalar-color-orange)",
17
- OPTIONS: "var(--scalar-color-purple)",
18
- HEAD: "var(--scalar-color-2)",
19
- CONNECT: "var(--scalar-color-2)",
20
- TRACE: "var(--scalar-color-2)"
21
- }, o = {
22
- POST: "POST",
23
- DELETE: "DEL",
24
- PATCH: "PATCH",
25
- GET: "GET",
26
- PUT: "PUT",
27
- OPTIONS: "OPTS",
28
- HEAD: "HEAD",
29
- CONNECT: "CONN",
30
- TRACE: "TRACE"
31
- };
32
- export {
33
- o as requestMethodAbbreviations,
34
- a as requestMethodColors,
35
- r as validRequestMethods
36
- };
@@ -1,4 +0,0 @@
1
- import { type RequestMethod } from '../constants.js';
2
- /** Checks whether a given request method is a valid request method */
3
- export declare function isRequestMethod(s: string): s is RequestMethod;
4
- //# sourceMappingURL=isRequestMethod.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"isRequestMethod.d.ts","sourceRoot":"","sources":["../../../../src/components/HttpMethod/utils/isRequestMethod.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,aAAa,EAAuB,MAAM,cAAc,CAAA;AAEtE,sEAAsE;AACtE,wBAAgB,eAAe,CAAC,CAAC,EAAE,MAAM,GAAG,CAAC,IAAI,aAAa,CAE7D"}
@@ -1,7 +0,0 @@
1
- import { validRequestMethods as t } from "../constants.js";
2
- function i(e) {
3
- return t.includes(e);
4
- }
5
- export {
6
- i as isRequestMethod
7
- };
@@ -1,11 +0,0 @@
1
- /**
2
- * Scroll Freezing Utility
3
- * "Freezes" the scroll position of an element, so that it doesn't move when the rest of the content changes
4
- *
5
- * @example
6
- * const unfreeze = freezeElement(document.querySelector('#your-element'))
7
- * ... content changes ...
8
- * unfreeze()
9
- */
10
- export declare const freezeElement: (element: HTMLElement) => () => void;
11
- //# sourceMappingURL=freeze-element.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"freeze-element.d.ts","sourceRoot":"","sources":["../../src/helpers/freeze-element.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,eAAO,MAAM,aAAa,YAAa,WAAW,eAiCjD,CAAA"}
@@ -1,20 +0,0 @@
1
- const s = (t) => {
2
- if (!t)
3
- return () => null;
4
- const e = t.getBoundingClientRect().top, r = new MutationObserver(() => {
5
- const n = t.getBoundingClientRect().top;
6
- if (n !== e) {
7
- const o = n - e;
8
- window.scrollBy(0, o);
9
- }
10
- });
11
- return r.observe(document.body, {
12
- childList: !0,
13
- subtree: !0,
14
- attributes: !0,
15
- characterData: !0
16
- }), () => r.disconnect();
17
- };
18
- export {
19
- s as freezeElement
20
- };
@@ -1,5 +0,0 @@
1
- /**
2
- * Checks whether the user is on macOS
3
- */
4
- export declare const isMacOs: () => boolean;
5
- //# sourceMappingURL=is-mac-os.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"is-mac-os.d.ts","sourceRoot":"","sources":["../../src/helpers/is-mac-os.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,eAAO,MAAM,OAAO,eAAoF,CAAA"}
@@ -1,4 +0,0 @@
1
- const a = () => typeof navigator < "u" ? /Mac/.test(navigator.platform) : !1;
2
- export {
3
- a as isMacOs
4
- };
@@ -1,21 +0,0 @@
1
- /**
2
- * Measures the execution time of a function and logs it.
3
- * Works with both async and sync functions.
4
- * Returns the result of the measured function.
5
- *
6
- * @example
7
- * ```ts
8
- * // Async function
9
- * const result = await measure('api-call', async () => {
10
- * return await fetchData()
11
- * })
12
- *
13
- * // Sync function
14
- * const result = measure('computation', () => {
15
- * return heavyComputation()
16
- * })
17
- * ```
18
- */
19
- export declare function measure<T>(name: string, fn: () => Promise<T>): Promise<T>;
20
- export declare function measure<T>(name: string, fn: () => T): T;
21
- //# sourceMappingURL=measure.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"measure.d.ts","sourceRoot":"","sources":["../../src/helpers/measure.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,OAAO,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAAA;AAC1E,wBAAgB,OAAO,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,CAAC,GAAG,CAAC,CAAA"}
@@ -1,7 +0,0 @@
1
- function c(n, o) {
2
- const r = performance.now(), t = o(), e = performance.now(), s = Math.round(e - r);
3
- return console.info(`${n}: ${s} ms`), t;
4
- }
5
- export {
6
- c as measure
7
- };
@@ -1,7 +0,0 @@
1
- /**
2
- * Tiny wrapper around the scrollIntoView API
3
- *
4
- * Also focuses the element if the focus flag is true
5
- */
6
- export declare const scrollToId: (id: string, focus?: boolean) => Promise<void>;
7
- //# sourceMappingURL=scroll-to-id.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"scroll-to-id.d.ts","sourceRoot":"","sources":["../../src/helpers/scroll-to-id.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,eAAO,MAAM,UAAU,OAAc,MAAM,UAAU,OAAO,kBAkC3D,CAAA"}
@@ -1,21 +0,0 @@
1
- const l = async (t, r) => {
2
- const n = (e) => {
3
- e.scrollIntoView(), r && e.focus();
4
- }, o = document.getElementById(t);
5
- if (o) {
6
- n(o);
7
- return;
8
- }
9
- const s = Date.now() + 1e3, c = () => {
10
- const e = document.getElementById(t);
11
- if (e) {
12
- n(e);
13
- return;
14
- }
15
- Date.now() < s && requestAnimationFrame(c);
16
- };
17
- requestAnimationFrame(c);
18
- };
19
- export {
20
- l as scrollToId
21
- };
@@ -1,6 +0,0 @@
1
- /**
2
- * Little helper for sleeping for x milliseconds
3
- * an async await friendly setTimeout
4
- */
5
- export declare const sleep: (ms: number) => Promise<unknown>;
6
- //# sourceMappingURL=sleep.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"sleep.d.ts","sourceRoot":"","sources":["../../src/helpers/sleep.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,eAAO,MAAM,KAAK,OAAQ,MAAM,qBAA0C,CAAA"}
@@ -1,4 +0,0 @@
1
- const s = (e) => new Promise((o) => setTimeout(o, e));
2
- export {
3
- s as sleep
4
- };
@@ -1,2 +0,0 @@
1
- export { normalizeRequestMethod } from './normalizeRequestMethod.js';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/legacy/helpers/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAA"}
@@ -1,6 +0,0 @@
1
- import type { RequestMethod } from '@scalar/oas-utils/entities/spec';
2
- /**
3
- * Get a normalized request method (e.g. GET, POST, etc.)
4
- */
5
- export declare const normalizeRequestMethod: (method?: string) => RequestMethod;
6
- //# sourceMappingURL=normalizeRequestMethod.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"normalizeRequestMethod.d.ts","sourceRoot":"","sources":["../../../src/legacy/helpers/normalizeRequestMethod.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAA;AAMpE;;GAEG;AACH,eAAO,MAAM,sBAAsB,YAAa,MAAM,KAAG,aAkBxD,CAAA"}
@@ -1,10 +0,0 @@
1
- import { isRequestMethod as s } from "../fixtures/httpRequestMethods.js";
2
- const e = "get", r = (t) => {
3
- if (typeof t != "string")
4
- return console.warn(`Request method is not a string. Using ${e} as the default.`), e;
5
- const o = t.trim().toUpperCase();
6
- return s(o) ? o : (console.warn(`${t} is not a valid request method. Using ${e} as the default.`), e);
7
- };
8
- export {
9
- r as normalizeRequestMethod
10
- };