@scalar/oas-utils 0.11.1 → 0.13.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.
Files changed (128) hide show
  1. package/CHANGELOG.md +21 -0
  2. package/dist/helpers/client-plugins.d.ts +57 -2
  3. package/dist/helpers/client-plugins.d.ts.map +1 -1
  4. package/dist/helpers/index.d.ts +1 -83
  5. package/dist/helpers/index.d.ts.map +1 -1
  6. package/dist/helpers/index.js +0 -78
  7. package/dist/migrations/migrate-to-indexdb.d.ts.map +1 -1
  8. package/dist/migrations/migrate-to-indexdb.js +1 -1
  9. package/dist/migrations/v-2.5.0/types.generated.d.ts +428 -34
  10. package/dist/migrations/v-2.5.0/types.generated.d.ts.map +1 -1
  11. package/package.json +7 -61
  12. package/dist/entities/cookie/cookie.d.ts +0 -15
  13. package/dist/entities/cookie/cookie.d.ts.map +0 -1
  14. package/dist/entities/cookie/cookie.js +0 -12
  15. package/dist/entities/cookie/index.d.ts +0 -2
  16. package/dist/entities/cookie/index.d.ts.map +0 -1
  17. package/dist/entities/cookie/index.js +0 -1
  18. package/dist/entities/environment/environment.d.ts +0 -12
  19. package/dist/entities/environment/environment.d.ts.map +0 -1
  20. package/dist/entities/environment/environment.js +0 -8
  21. package/dist/entities/environment/index.d.ts +0 -2
  22. package/dist/entities/environment/index.d.ts.map +0 -1
  23. package/dist/entities/environment/index.js +0 -1
  24. package/dist/entities/hotkeys/hotkeys.d.ts +0 -15
  25. package/dist/entities/hotkeys/hotkeys.d.ts.map +0 -1
  26. package/dist/entities/hotkeys/hotkeys.js +0 -118
  27. package/dist/entities/hotkeys/index.d.ts +0 -2
  28. package/dist/entities/hotkeys/index.d.ts.map +0 -1
  29. package/dist/entities/hotkeys/index.js +0 -1
  30. package/dist/entities/shared/index.d.ts +0 -2
  31. package/dist/entities/shared/index.d.ts.map +0 -1
  32. package/dist/entities/shared/index.js +0 -1
  33. package/dist/entities/shared/utility.d.ts +0 -5
  34. package/dist/entities/shared/utility.d.ts.map +0 -1
  35. package/dist/entities/shared/utility.js +0 -9
  36. package/dist/entities/spec/collection.d.ts +0 -133
  37. package/dist/entities/spec/collection.d.ts.map +0 -1
  38. package/dist/entities/spec/collection.js +0 -95
  39. package/dist/entities/spec/index.d.ts +0 -12
  40. package/dist/entities/spec/index.d.ts.map +0 -1
  41. package/dist/entities/spec/index.js +0 -10
  42. package/dist/entities/spec/operation.d.ts +0 -99
  43. package/dist/entities/spec/operation.d.ts.map +0 -1
  44. package/dist/entities/spec/operation.js +0 -6
  45. package/dist/entities/spec/parameters.d.ts +0 -44
  46. package/dist/entities/spec/parameters.d.ts.map +0 -1
  47. package/dist/entities/spec/parameters.js +0 -41
  48. package/dist/entities/spec/request-examples.d.ts +0 -380
  49. package/dist/entities/spec/request-examples.d.ts.map +0 -1
  50. package/dist/entities/spec/request-examples.js +0 -449
  51. package/dist/entities/spec/requests.d.ts +0 -137
  52. package/dist/entities/spec/requests.d.ts.map +0 -1
  53. package/dist/entities/spec/requests.js +0 -123
  54. package/dist/entities/spec/server.d.ts +0 -15
  55. package/dist/entities/spec/server.d.ts.map +0 -1
  56. package/dist/entities/spec/server.js +0 -67
  57. package/dist/entities/spec/spec-objects.d.ts +0 -171
  58. package/dist/entities/spec/spec-objects.d.ts.map +0 -1
  59. package/dist/entities/spec/spec-objects.js +0 -134
  60. package/dist/entities/spec/x-scalar-environments.d.ts +0 -22
  61. package/dist/entities/spec/x-scalar-environments.d.ts.map +0 -1
  62. package/dist/entities/spec/x-scalar-environments.js +0 -22
  63. package/dist/entities/spec/x-scalar-secrets.d.ts +0 -6
  64. package/dist/entities/spec/x-scalar-secrets.d.ts.map +0 -1
  65. package/dist/entities/spec/x-scalar-secrets.js +0 -8
  66. package/dist/entities/workspace/index.d.ts +0 -2
  67. package/dist/entities/workspace/index.d.ts.map +0 -1
  68. package/dist/entities/workspace/index.js +0 -1
  69. package/dist/entities/workspace/workspace.d.ts +0 -236
  70. package/dist/entities/workspace/workspace.d.ts.map +0 -1
  71. package/dist/entities/workspace/workspace.js +0 -49
  72. package/dist/helpers/fetch-document.d.ts +0 -7
  73. package/dist/helpers/fetch-document.d.ts.map +0 -1
  74. package/dist/helpers/fetch-document.js +0 -32
  75. package/dist/helpers/fetch-with-proxy-fallback.d.ts +0 -15
  76. package/dist/helpers/fetch-with-proxy-fallback.d.ts.map +0 -1
  77. package/dist/helpers/fetch-with-proxy-fallback.js +0 -29
  78. package/dist/helpers/normalize-mime-type-object.d.ts +0 -8
  79. package/dist/helpers/normalize-mime-type-object.d.ts.map +0 -1
  80. package/dist/helpers/normalize-mime-type-object.js +0 -21
  81. package/dist/helpers/normalize-mime-type.d.ts +0 -10
  82. package/dist/helpers/normalize-mime-type.d.ts.map +0 -1
  83. package/dist/helpers/normalize-mime-type.js +0 -12
  84. package/dist/helpers/operation-stability.d.ts +0 -19
  85. package/dist/helpers/operation-stability.d.ts.map +0 -1
  86. package/dist/helpers/operation-stability.js +0 -24
  87. package/dist/helpers/schema-model.d.ts +0 -5
  88. package/dist/helpers/schema-model.d.ts.map +0 -1
  89. package/dist/helpers/schema-model.js +0 -14
  90. package/dist/helpers/security/get-schemes.d.ts +0 -97
  91. package/dist/helpers/security/get-schemes.d.ts.map +0 -1
  92. package/dist/helpers/security/get-schemes.js +0 -8
  93. package/dist/helpers/security/has-token.d.ts +0 -4
  94. package/dist/helpers/security/has-token.d.ts.map +0 -1
  95. package/dist/helpers/security/has-token.js +0 -19
  96. package/dist/helpers/security/index.d.ts +0 -3
  97. package/dist/helpers/security/index.d.ts.map +0 -1
  98. package/dist/helpers/security/index.js +0 -2
  99. package/dist/helpers/servers.d.ts +0 -24
  100. package/dist/helpers/servers.d.ts.map +0 -1
  101. package/dist/helpers/servers.js +0 -146
  102. package/dist/helpers/should-ignore-entity.d.ts +0 -8
  103. package/dist/helpers/should-ignore-entity.d.ts.map +0 -1
  104. package/dist/helpers/should-ignore-entity.js +0 -4
  105. package/dist/migrations/generate-types.d.ts +0 -2
  106. package/dist/migrations/generate-types.d.ts.map +0 -1
  107. package/dist/migrations/generate-types.js +0 -53
  108. package/dist/spec-getters/get-example-from-schema.d.ts +0 -36
  109. package/dist/spec-getters/get-example-from-schema.d.ts.map +0 -1
  110. package/dist/spec-getters/get-example-from-schema.js +0 -521
  111. package/dist/spec-getters/get-parameters-from-operation.d.ts +0 -17
  112. package/dist/spec-getters/get-parameters-from-operation.d.ts.map +0 -1
  113. package/dist/spec-getters/get-parameters-from-operation.js +0 -40
  114. package/dist/spec-getters/get-request-body-from-operation.d.ts +0 -14
  115. package/dist/spec-getters/get-request-body-from-operation.d.ts.map +0 -1
  116. package/dist/spec-getters/get-request-body-from-operation.js +0 -176
  117. package/dist/spec-getters/get-server-variable-examples.d.ts +0 -4
  118. package/dist/spec-getters/get-server-variable-examples.d.ts.map +0 -1
  119. package/dist/spec-getters/get-server-variable-examples.js +0 -12
  120. package/dist/spec-getters/index.d.ts +0 -5
  121. package/dist/spec-getters/index.d.ts.map +0 -1
  122. package/dist/spec-getters/index.js +0 -4
  123. package/dist/transforms/import-spec.d.ts +0 -64
  124. package/dist/transforms/import-spec.d.ts.map +0 -1
  125. package/dist/transforms/import-spec.js +0 -397
  126. package/dist/transforms/index.d.ts +0 -2
  127. package/dist/transforms/index.d.ts.map +0 -1
  128. package/dist/transforms/index.js +0 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,26 @@
1
1
  # @scalar/oas-utils
2
2
 
3
+ ## 0.13.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#8865](https://github.com/scalar/scalar/pull/8865): feat: add plugin support for custom response body content types
8
+
9
+ ### Patch Changes
10
+
11
+ - [#8810](https://github.com/scalar/scalar/pull/8810): refactor: move telemetry to an optional plugin
12
+
13
+ ## 0.12.0
14
+
15
+ ### Minor Changes
16
+
17
+ - [#8863](https://github.com/scalar/scalar/pull/8863): chore: updated imports to new api client version
18
+
19
+ ### Patch Changes
20
+
21
+ - [#8825](https://github.com/scalar/scalar/pull/8825): chore: moving files around in preparation for the big deletion of client v1
22
+ - [#8850](https://github.com/scalar/scalar/pull/8850): chore: remove entities, zod and the parser from oas-utils
23
+
3
24
  ## 0.11.1
4
25
 
5
26
  ## 0.11.0
@@ -2,7 +2,33 @@ import type { ApiReferenceEvents } from '@scalar/workspace-store/events';
2
2
  import type { RequestFactory, VariablesStore } from '@scalar/workspace-store/request-example';
3
3
  import type { OpenApiDocument } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document';
4
4
  import type { OperationObject } from '@scalar/workspace-store/schemas/v3.1/strict/operation';
5
- import type { DefineComponent } from 'vue';
5
+ import type { Component, DefineComponent } from 'vue';
6
+ /** Shared fields present on every response body handler variant */
7
+ type ResponseBodyHandlerBase = {
8
+ /** MIME type patterns this handler matches (exact or glob like "application/vnd.*+json") */
9
+ mimeTypes: string[];
10
+ /** Custom decoder: transform raw bytes into displayable data */
11
+ decode?: (buffer: ArrayBuffer, contentType: string) => string | Blob | Promise<string | Blob>;
12
+ /** Custom component for the preview view */
13
+ previewComponent?: Component;
14
+ };
15
+ /**
16
+ * Describes how a plugin handles a specific content type in the response body.
17
+ *
18
+ * The raw view is configured with either:
19
+ * - `rawComponent`: A custom Vue component (receives `content` and `contentType` props).
20
+ * - `language`: A CodeMirror language hint for the built-in raw renderer.
21
+ *
22
+ * These two options are mutually exclusive — providing `rawComponent` means the
23
+ * built-in renderer is not used, so `language` would have no effect.
24
+ */
25
+ export type ResponseBodyHandler = ResponseBodyHandlerBase & ({
26
+ rawComponent: Component;
27
+ language?: never;
28
+ } | {
29
+ rawComponent?: never;
30
+ language?: string;
31
+ });
6
32
  /** A type representing the hooks that a client plugin can define */
7
33
  type ClientPluginHooks = {
8
34
  beforeRequest: (payload: {
@@ -58,12 +84,41 @@ type ClientPluginComponents = {
58
84
  * components: {
59
85
  * request: MyRequestComponent, // Custom Vue component for rendering the request section
60
86
  * response: MyResponseComponent // Custom Vue component for rendering the response section
61
- * }
87
+ * },
88
+ * responseBody: [{
89
+ * mimeTypes: ['application/msgpack', 'application/x-msgpack'],
90
+ * decode: (buffer) => {
91
+ * const decoded = msgpack.decode(new Uint8Array(buffer));
92
+ * return JSON.stringify(decoded, null, 2);
93
+ * },
94
+ * language: 'json',
95
+ * }]
62
96
  * }
63
97
  */
98
+ /** Lifecycle hooks for app-level plugin concerns (analytics, logging, etc.) */
99
+ type ClientPluginLifecycle = {
100
+ /** Called when the API client is initialized */
101
+ onInit?: (context?: {
102
+ config: Record<string, unknown>;
103
+ }) => void;
104
+ /** Called when the API client configuration changes */
105
+ onConfigChange?: (context: {
106
+ config: Record<string, unknown>;
107
+ }) => void;
108
+ /** Called when the API client is destroyed */
109
+ onDestroy?: () => void;
110
+ };
64
111
  export type ClientPlugin = {
65
112
  hooks?: Partial<ClientPluginHooks>;
66
113
  components?: Partial<ClientPluginComponents>;
114
+ /** Lifecycle hooks for app-level concerns */
115
+ lifecycle?: ClientPluginLifecycle;
116
+ /** Subscribe to event bus events. The framework handles subscribe/unsubscribe automatically. */
117
+ on?: Partial<{
118
+ [K in keyof ApiReferenceEvents]: (payload: ApiReferenceEvents[K]) => void;
119
+ }>;
120
+ /** Custom response body handlers for specific content types */
121
+ responseBody?: ResponseBodyHandler[];
67
122
  };
68
123
  /**
69
124
  * Maps hook names to their expected payload types.
@@ -1 +1 @@
1
- {"version":3,"file":"client-plugins.d.ts","sourceRoot":"","sources":["../../src/helpers/client-plugins.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAA;AACxE,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,yCAAyC,CAAA;AAC7F,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,8DAA8D,CAAA;AACnG,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uDAAuD,CAAA;AAC5F,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,KAAK,CAAA;AAE1C,oEAAoE;AACpE,KAAK,iBAAiB,GAAG;IACv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AK,IAAI;KAAE,CAAC,CAAA;IAC3F,+DAA+D;IAC/D,YAAY,CAAC,EAAE,mBAAmB,EAAE,CAAA;CACrC,CAAA;AAED;;;;GAIG;AACH,KAAK,cAAc,GAAG;KACnB,CAAC,IAAI,MAAM,iBAAiB,GAAG,UAAU,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;CACpE,CAAA;AAED;;;GAGG;AACH,eAAO,MAAM,WAAW,GAAU,CAAC,SAAS,MAAM,cAAc,EAC9D,SAAS,cAAc,CAAC,CAAC,CAAC,EAC1B,UAAU,CAAC,EACX,SAAS,YAAY,EAAE,KACtB,OAAO,CAAC,cAAc,CAAC,CAAC,CAAC,CAY3B,CAAA"}
@@ -1,85 +1,3 @@
1
- export {
2
- /** @deprecated Please use isDefined from \@scalar/helpers/array/is-defined instead */
3
- isDefined, } from '@scalar/helpers/array/is-defined';
4
- export {
5
- /** @deprecated Please use json2xml from \@scalar/helpers/file/json2xml instead */
6
- json2xml, } from '@scalar/helpers/file/json2xml';
7
- export {
8
- /** @deprecated Please use canMethodHaveBody from \@scalar/helpers/http/can-method-have-body instead */
9
- canMethodHaveBody, } from '@scalar/helpers/http/can-method-have-body';
10
- export {
11
- /** @deprecated Please use REQUEST_METHODS from \@scalar/helpers/http/http-methods instead */
12
- REQUEST_METHODS,
13
- /** @deprecated Please use getHttpMethodInfo from \@scalar/helpers/http/http-info instead */
14
- getHttpMethodInfo, } from '@scalar/helpers/http/http-info';
15
- export {
16
- /** @deprecated Please use HttpStatusCode from \@scalar/helpers/http/http-status-codes instead */
17
- type HttpStatusCode,
18
- /** @deprecated Please use HttpStatusCodes from \@scalar/helpers/http/http-status-codes instead */
19
- type HttpStatusCodes,
20
- /** @deprecated Please use httpStatusCodes from \@scalar/helpers/http/http-status-codes instead */
21
- httpStatusCodes, } from '@scalar/helpers/http/http-status-codes';
22
- export {
23
- /** @deprecated Please use isHttpMethod from \@scalar/helpers/http/is-http-method instead */
24
- isHttpMethod, } from '@scalar/helpers/http/is-http-method';
25
- export {
26
- /** @deprecated Please use objectKeys from \@scalar/helpers/object/object-keys instead */
27
- objectKeys as getObjectKeys, } from '@scalar/helpers/object/object-keys';
28
- export {
29
- /** @deprecated Please use findVariables from \@scalar/helpers/regex/find-variables instead */
30
- findVariables, } from '@scalar/helpers/regex/find-variables';
31
- export {
32
- /** @deprecated Please use REGEX from \@scalar/helpers/regex/regex-helpers instead */
33
- REGEX, } from '@scalar/helpers/regex/regex-helpers';
34
- export {
35
- /** @deprecated Please use replaceVariables from \@scalar/helpers/regex/replace-variables instead */
36
- replaceVariables, } from '@scalar/helpers/regex/replace-variables';
37
- export {
38
- /** @deprecated Please use camelToTitleWords from \@scalar/helpers/string/camel-to-title instead */
39
- camelToTitleWords, } from '@scalar/helpers/string/camel-to-title';
40
- export {
41
- /** @deprecated Please use capitalize from \@scalar/helpers/string/capitalize instead */
42
- capitalize, } from '@scalar/helpers/string/capitalize';
43
- /**
44
- * @deprecated These helpers are being phased out. Please import directly from @scalar/helpers instead.
45
- * For example: import { createHash } from '/@scalar/helpers/string/create-hash'
46
- */
47
- export {
48
- /** @deprecated Please use createHash from \@scalar/helpers/string/create-hash instead */
49
- createHash, } from '@scalar/helpers/string/create-hash';
50
- export {
51
- /** @deprecated Please use iterateTitle from \@scalar/helpers/string/iterate-title instead */
52
- iterateTitle, } from '@scalar/helpers/string/iterate-title';
53
- export {
54
- /** @deprecated Please use ensureProtocol from \@scalar/helpers/url/ensure-protocol instead */
55
- ensureProtocol, } from '@scalar/helpers/url/ensure-protocol';
56
- export {
57
- /** @deprecated Please use isLocalUrl from \@scalar/helpers/url/is-local-url instead */
58
- isLocalUrl, } from '@scalar/helpers/url/is-local-url';
59
- export {
60
- /** @deprecated Please use isRelativePath from \@scalar/helpers/url/is-relative-path instead */
61
- isRelativePath, } from '@scalar/helpers/url/is-relative-path';
62
- export {
63
- /** @deprecated Please use isValidUrl from \@scalar/helpers/url/is-valid-url instead */
64
- isValidUrl, } from '@scalar/helpers/url/is-valid-url';
65
- export {
66
- /** @deprecated Please use makeUrlAbsolute from \@scalar/helpers/url/make-url-absolute instead */
67
- makeUrlAbsolute, } from '@scalar/helpers/url/make-url-absolute';
68
- export {
69
- /** @deprecated Please use combineUrlAndPath from \@scalar/helpers/url/merge-urls instead */
70
- combineUrlAndPath,
71
- /** @deprecated Please use mergeSearchParams from \@scalar/helpers/url/merge-urls instead */
72
- mergeSearchParams,
73
- /** @deprecated Please use mergeUrls from \@scalar/helpers/url/merge-urls instead */
74
- mergeUrls, } from '@scalar/helpers/url/merge-urls';
75
- export { type ClientPlugin, executeHook } from './client-plugins.js';
76
- export { fetchDocument } from './fetch-document.js';
77
- export { type FetchWithProxyFallbackOptions, fetchWithProxyFallback } from './fetch-with-proxy-fallback.js';
78
- export { normalizeMimeType } from './normalize-mime-type.js';
79
- export { normalizeMimeTypeObject } from './normalize-mime-type-object.js';
80
- export { getOperationStability, getOperationStabilityColor, isOperationDeprecated } from './operation-stability.js';
1
+ export { type ClientPlugin, type ResponseBodyHandler, executeHook } from './client-plugins.js';
81
2
  export { formatJsonOrYamlString, json, parseJsonOrYaml, transformToJson, yaml } from './parse.js';
82
- export { schemaModel } from './schema-model.js';
83
- export { getServersFromDocument } from './servers.js';
84
- export { shouldIgnoreEntity } from './should-ignore-entity.js';
85
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/helpers/index.ts"],"names":[],"mappings":"AAAA,OAAO;AACL,sFAAsF;AACtF,SAAS,GACV,MAAM,kCAAkC,CAAA;AACzC,OAAO;AACL,kFAAkF;AAClF,QAAQ,GACT,MAAM,+BAA+B,CAAA;AACtC,OAAO;AACL,uGAAuG;AACvG,iBAAiB,GAClB,MAAM,2CAA2C,CAAA;AAClD,OAAO;AACL,6FAA6F;AAC7F,eAAe;AACf,4FAA4F;AAC5F,iBAAiB,GAClB,MAAM,gCAAgC,CAAA;AACvC,O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kBAAkB,CAAA;AACjE,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAA;AAChD,OAAO,EAAE,KAAK,6BAA6B,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAA;AACxG,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAA;AACzD,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAA;AACtE,OAAO,EAAE,qBAAqB,EAAE,0BAA0B,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAA;AAChH,OAAO,EAAE,sBAAsB,EAAE,IAAI,EAAE,eAAe,EAAE,eAAe,EAAE,IAAI,EAAE,MAAM,SAAS,CAAA;AAC9F,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAA;AAC5C,OAAO,EAAE,sBAAsB,EAAE,MAAM,WAAW,CAAA;AAClD,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/helpers/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,YAAY,EAAE,KAAK,mBAAmB,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAC3F,OAAO,EAAE,sBAAsB,EAAE,IAAI,EAAE,eAAe,EAAE,eAAe,EAAE,IAAI,EAAE,MAAM,SAAS,CAAA"}
@@ -1,80 +1,2 @@
1
- export {
2
- /** @deprecated Please use isDefined from \@scalar/helpers/array/is-defined instead */
3
- isDefined, } from '@scalar/helpers/array/is-defined';
4
- export {
5
- /** @deprecated Please use json2xml from \@scalar/helpers/file/json2xml instead */
6
- json2xml, } from '@scalar/helpers/file/json2xml';
7
- export {
8
- /** @deprecated Please use canMethodHaveBody from \@scalar/helpers/http/can-method-have-body instead */
9
- canMethodHaveBody, } from '@scalar/helpers/http/can-method-have-body';
10
- export {
11
- /** @deprecated Please use REQUEST_METHODS from \@scalar/helpers/http/http-methods instead */
12
- REQUEST_METHODS,
13
- /** @deprecated Please use getHttpMethodInfo from \@scalar/helpers/http/http-info instead */
14
- getHttpMethodInfo, } from '@scalar/helpers/http/http-info';
15
- export {
16
- /** @deprecated Please use httpStatusCodes from \@scalar/helpers/http/http-status-codes instead */
17
- httpStatusCodes, } from '@scalar/helpers/http/http-status-codes';
18
- export {
19
- /** @deprecated Please use isHttpMethod from \@scalar/helpers/http/is-http-method instead */
20
- isHttpMethod, } from '@scalar/helpers/http/is-http-method';
21
- export {
22
- /** @deprecated Please use objectKeys from \@scalar/helpers/object/object-keys instead */
23
- objectKeys as getObjectKeys, } from '@scalar/helpers/object/object-keys';
24
- export {
25
- /** @deprecated Please use findVariables from \@scalar/helpers/regex/find-variables instead */
26
- findVariables, } from '@scalar/helpers/regex/find-variables';
27
- export {
28
- /** @deprecated Please use REGEX from \@scalar/helpers/regex/regex-helpers instead */
29
- REGEX, } from '@scalar/helpers/regex/regex-helpers';
30
- export {
31
- /** @deprecated Please use replaceVariables from \@scalar/helpers/regex/replace-variables instead */
32
- replaceVariables, } from '@scalar/helpers/regex/replace-variables';
33
- export {
34
- /** @deprecated Please use camelToTitleWords from \@scalar/helpers/string/camel-to-title instead */
35
- camelToTitleWords, } from '@scalar/helpers/string/camel-to-title';
36
- export {
37
- /** @deprecated Please use capitalize from \@scalar/helpers/string/capitalize instead */
38
- capitalize, } from '@scalar/helpers/string/capitalize';
39
- /**
40
- * @deprecated These helpers are being phased out. Please import directly from @scalar/helpers instead.
41
- * For example: import { createHash } from '/@scalar/helpers/string/create-hash'
42
- */
43
- export {
44
- /** @deprecated Please use createHash from \@scalar/helpers/string/create-hash instead */
45
- createHash, } from '@scalar/helpers/string/create-hash';
46
- export {
47
- /** @deprecated Please use iterateTitle from \@scalar/helpers/string/iterate-title instead */
48
- iterateTitle, } from '@scalar/helpers/string/iterate-title';
49
- export {
50
- /** @deprecated Please use ensureProtocol from \@scalar/helpers/url/ensure-protocol instead */
51
- ensureProtocol, } from '@scalar/helpers/url/ensure-protocol';
52
- export {
53
- /** @deprecated Please use isLocalUrl from \@scalar/helpers/url/is-local-url instead */
54
- isLocalUrl, } from '@scalar/helpers/url/is-local-url';
55
- export {
56
- /** @deprecated Please use isRelativePath from \@scalar/helpers/url/is-relative-path instead */
57
- isRelativePath, } from '@scalar/helpers/url/is-relative-path';
58
- export {
59
- /** @deprecated Please use isValidUrl from \@scalar/helpers/url/is-valid-url instead */
60
- isValidUrl, } from '@scalar/helpers/url/is-valid-url';
61
- export {
62
- /** @deprecated Please use makeUrlAbsolute from \@scalar/helpers/url/make-url-absolute instead */
63
- makeUrlAbsolute, } from '@scalar/helpers/url/make-url-absolute';
64
- export {
65
- /** @deprecated Please use combineUrlAndPath from \@scalar/helpers/url/merge-urls instead */
66
- combineUrlAndPath,
67
- /** @deprecated Please use mergeSearchParams from \@scalar/helpers/url/merge-urls instead */
68
- mergeSearchParams,
69
- /** @deprecated Please use mergeUrls from \@scalar/helpers/url/merge-urls instead */
70
- mergeUrls, } from '@scalar/helpers/url/merge-urls';
71
1
  export { executeHook } from './client-plugins.js';
72
- export { fetchDocument } from './fetch-document.js';
73
- export { fetchWithProxyFallback } from './fetch-with-proxy-fallback.js';
74
- export { normalizeMimeType } from './normalize-mime-type.js';
75
- export { normalizeMimeTypeObject } from './normalize-mime-type-object.js';
76
- export { getOperationStability, getOperationStabilityColor, isOperationDeprecated } from './operation-stability.js';
77
2
  export { formatJsonOrYamlString, json, parseJsonOrYaml, transformToJson, yaml } from './parse.js';
78
- export { schemaModel } from './schema-model.js';
79
- export { getServersFromDocument } from './servers.js';
80
- export { shouldIgnoreEntity } from './should-ignore-entity.js';
@@ -1 +1 @@
1
- {"version":3,"file":"migrate-to-indexdb.d.ts","sourceRoot":"","sources":["../../src/migrations/migrate-to-indexdb.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,+BAA+B,EAAE,MAAM,qCAAqC,CAAA;AAOrF,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,oDAAoD,CAAA;AAkB3F,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,sCAAsC,CAAA;AAOnE;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,4BAA4B,qBA+CxC,CAAA;AAED;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,sBAAsB,GACjC,sBAAsB,OAAO,CAAC,UAAU,CAAC,OAAO,+BAA+B,CAAC,CAAC,CAAC,WAAW,CAAC,KAC7F,OAAO,CAAC,OAAO,CAiBjB,CAAA;AAED;;;;;;;;;;GAUG;AACH,eAAO,MAAM,8BAA8B,GAAU,YAAY;IAC/D,MAAM,EAAE,OAAO,CAAC,WAAW,CAAC,CAAA;IAC5B,OAAO,EAAE,OAAO,CAAC,YAAY,CAAC,CAAA;CAC/B;;;;IA8IA,CAAA"}
1
+ {"version":3,"file":"migrate-to-indexdb.d.ts","sourceRoot":"","sources":["../../src/migrations/migrate-to-indexdb.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,+BAA+B,EAAE,MAAM,qCAAqC,CAAA;AAOrF,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,oDAAoD,CAAA;AAiB3F,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,sCAAsC,CAAA;AAOnE;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,4BAA4B,qBA+CxC,CAAA;AAED;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,sBAAsB,GACjC,sBAAsB,OAAO,CAAC,UAAU,CAAC,OAAO,+BAA+B,CAAC,CAAC,CAAC,WAAW,CAAC,KAC7F,OAAO,CAAC,OAAO,CAiBjB,CAAA;AAED;;;;;;;;;;GAUG;AACH,eAAO,MAAM,8BAA8B,GAAU,YAAY;IAC/D,MAAM,EAAE,OAAO,CAAC,WAAW,CAAC,CAAA;IAC5B,OAAO,EAAE,OAAO,CAAC,YAAY,CAAC,CAAA;CAC/B;;;;IA8IA,CAAA"}
@@ -1,6 +1,6 @@
1
- import { CONTENT_TYPES } from '@scalar/helpers/consts/content-types';
2
1
  import { createLimiter } from '@scalar/helpers/general/create-limiter';
3
2
  import { extractConfigSecrets, removeSecretFields } from '@scalar/helpers/general/extract-config-secrets';
3
+ import { CONTENT_TYPES } from '@scalar/helpers/http/content-types';
4
4
  import { objectEntries } from '@scalar/helpers/object/object-entries';
5
5
  import { toJsonCompatible } from '@scalar/helpers/object/to-json-compatible';
6
6
  import { extractServerFromPath } from '@scalar/helpers/url/extract-server-from-path';