@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.
- package/CHANGELOG.md +21 -0
- package/dist/helpers/client-plugins.d.ts +57 -2
- package/dist/helpers/client-plugins.d.ts.map +1 -1
- package/dist/helpers/index.d.ts +1 -83
- package/dist/helpers/index.d.ts.map +1 -1
- package/dist/helpers/index.js +0 -78
- package/dist/migrations/migrate-to-indexdb.d.ts.map +1 -1
- package/dist/migrations/migrate-to-indexdb.js +1 -1
- package/dist/migrations/v-2.5.0/types.generated.d.ts +428 -34
- package/dist/migrations/v-2.5.0/types.generated.d.ts.map +1 -1
- package/package.json +7 -61
- package/dist/entities/cookie/cookie.d.ts +0 -15
- package/dist/entities/cookie/cookie.d.ts.map +0 -1
- package/dist/entities/cookie/cookie.js +0 -12
- package/dist/entities/cookie/index.d.ts +0 -2
- package/dist/entities/cookie/index.d.ts.map +0 -1
- package/dist/entities/cookie/index.js +0 -1
- package/dist/entities/environment/environment.d.ts +0 -12
- package/dist/entities/environment/environment.d.ts.map +0 -1
- package/dist/entities/environment/environment.js +0 -8
- package/dist/entities/environment/index.d.ts +0 -2
- package/dist/entities/environment/index.d.ts.map +0 -1
- package/dist/entities/environment/index.js +0 -1
- package/dist/entities/hotkeys/hotkeys.d.ts +0 -15
- package/dist/entities/hotkeys/hotkeys.d.ts.map +0 -1
- package/dist/entities/hotkeys/hotkeys.js +0 -118
- package/dist/entities/hotkeys/index.d.ts +0 -2
- package/dist/entities/hotkeys/index.d.ts.map +0 -1
- package/dist/entities/hotkeys/index.js +0 -1
- package/dist/entities/shared/index.d.ts +0 -2
- package/dist/entities/shared/index.d.ts.map +0 -1
- package/dist/entities/shared/index.js +0 -1
- package/dist/entities/shared/utility.d.ts +0 -5
- package/dist/entities/shared/utility.d.ts.map +0 -1
- package/dist/entities/shared/utility.js +0 -9
- package/dist/entities/spec/collection.d.ts +0 -133
- package/dist/entities/spec/collection.d.ts.map +0 -1
- package/dist/entities/spec/collection.js +0 -95
- package/dist/entities/spec/index.d.ts +0 -12
- package/dist/entities/spec/index.d.ts.map +0 -1
- package/dist/entities/spec/index.js +0 -10
- package/dist/entities/spec/operation.d.ts +0 -99
- package/dist/entities/spec/operation.d.ts.map +0 -1
- package/dist/entities/spec/operation.js +0 -6
- package/dist/entities/spec/parameters.d.ts +0 -44
- package/dist/entities/spec/parameters.d.ts.map +0 -1
- package/dist/entities/spec/parameters.js +0 -41
- package/dist/entities/spec/request-examples.d.ts +0 -380
- package/dist/entities/spec/request-examples.d.ts.map +0 -1
- package/dist/entities/spec/request-examples.js +0 -449
- package/dist/entities/spec/requests.d.ts +0 -137
- package/dist/entities/spec/requests.d.ts.map +0 -1
- package/dist/entities/spec/requests.js +0 -123
- package/dist/entities/spec/server.d.ts +0 -15
- package/dist/entities/spec/server.d.ts.map +0 -1
- package/dist/entities/spec/server.js +0 -67
- package/dist/entities/spec/spec-objects.d.ts +0 -171
- package/dist/entities/spec/spec-objects.d.ts.map +0 -1
- package/dist/entities/spec/spec-objects.js +0 -134
- package/dist/entities/spec/x-scalar-environments.d.ts +0 -22
- package/dist/entities/spec/x-scalar-environments.d.ts.map +0 -1
- package/dist/entities/spec/x-scalar-environments.js +0 -22
- package/dist/entities/spec/x-scalar-secrets.d.ts +0 -6
- package/dist/entities/spec/x-scalar-secrets.d.ts.map +0 -1
- package/dist/entities/spec/x-scalar-secrets.js +0 -8
- package/dist/entities/workspace/index.d.ts +0 -2
- package/dist/entities/workspace/index.d.ts.map +0 -1
- package/dist/entities/workspace/index.js +0 -1
- package/dist/entities/workspace/workspace.d.ts +0 -236
- package/dist/entities/workspace/workspace.d.ts.map +0 -1
- package/dist/entities/workspace/workspace.js +0 -49
- package/dist/helpers/fetch-document.d.ts +0 -7
- package/dist/helpers/fetch-document.d.ts.map +0 -1
- package/dist/helpers/fetch-document.js +0 -32
- package/dist/helpers/fetch-with-proxy-fallback.d.ts +0 -15
- package/dist/helpers/fetch-with-proxy-fallback.d.ts.map +0 -1
- package/dist/helpers/fetch-with-proxy-fallback.js +0 -29
- package/dist/helpers/normalize-mime-type-object.d.ts +0 -8
- package/dist/helpers/normalize-mime-type-object.d.ts.map +0 -1
- package/dist/helpers/normalize-mime-type-object.js +0 -21
- package/dist/helpers/normalize-mime-type.d.ts +0 -10
- package/dist/helpers/normalize-mime-type.d.ts.map +0 -1
- package/dist/helpers/normalize-mime-type.js +0 -12
- package/dist/helpers/operation-stability.d.ts +0 -19
- package/dist/helpers/operation-stability.d.ts.map +0 -1
- package/dist/helpers/operation-stability.js +0 -24
- package/dist/helpers/schema-model.d.ts +0 -5
- package/dist/helpers/schema-model.d.ts.map +0 -1
- package/dist/helpers/schema-model.js +0 -14
- package/dist/helpers/security/get-schemes.d.ts +0 -97
- package/dist/helpers/security/get-schemes.d.ts.map +0 -1
- package/dist/helpers/security/get-schemes.js +0 -8
- package/dist/helpers/security/has-token.d.ts +0 -4
- package/dist/helpers/security/has-token.d.ts.map +0 -1
- package/dist/helpers/security/has-token.js +0 -19
- package/dist/helpers/security/index.d.ts +0 -3
- package/dist/helpers/security/index.d.ts.map +0 -1
- package/dist/helpers/security/index.js +0 -2
- package/dist/helpers/servers.d.ts +0 -24
- package/dist/helpers/servers.d.ts.map +0 -1
- package/dist/helpers/servers.js +0 -146
- package/dist/helpers/should-ignore-entity.d.ts +0 -8
- package/dist/helpers/should-ignore-entity.d.ts.map +0 -1
- package/dist/helpers/should-ignore-entity.js +0 -4
- package/dist/migrations/generate-types.d.ts +0 -2
- package/dist/migrations/generate-types.d.ts.map +0 -1
- package/dist/migrations/generate-types.js +0 -53
- package/dist/spec-getters/get-example-from-schema.d.ts +0 -36
- package/dist/spec-getters/get-example-from-schema.d.ts.map +0 -1
- package/dist/spec-getters/get-example-from-schema.js +0 -521
- package/dist/spec-getters/get-parameters-from-operation.d.ts +0 -17
- package/dist/spec-getters/get-parameters-from-operation.d.ts.map +0 -1
- package/dist/spec-getters/get-parameters-from-operation.js +0 -40
- package/dist/spec-getters/get-request-body-from-operation.d.ts +0 -14
- package/dist/spec-getters/get-request-body-from-operation.d.ts.map +0 -1
- package/dist/spec-getters/get-request-body-from-operation.js +0 -176
- package/dist/spec-getters/get-server-variable-examples.d.ts +0 -4
- package/dist/spec-getters/get-server-variable-examples.d.ts.map +0 -1
- package/dist/spec-getters/get-server-variable-examples.js +0 -12
- package/dist/spec-getters/index.d.ts +0 -5
- package/dist/spec-getters/index.d.ts.map +0 -1
- package/dist/spec-getters/index.js +0 -4
- package/dist/transforms/import-spec.d.ts +0 -64
- package/dist/transforms/import-spec.d.ts.map +0 -1
- package/dist/transforms/import-spec.js +0 -397
- package/dist/transforms/index.d.ts +0 -2
- package/dist/transforms/index.d.ts.map +0 -1
- 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;
|
|
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,SAAS,EAAE,eAAe,EAAE,MAAM,KAAK,CAAA;AAErD,mEAAmE;AACnE,KAAK,uBAAuB,GAAG;IAC7B,4FAA4F;IAC5F,SAAS,EAAE,MAAM,EAAE,CAAA;IACnB,gEAAgE;IAChE,MAAM,CAAC,EAAE,CAAC,MAAM,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,KAAK,MAAM,GAAG,IAAI,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAA;IAC7F,4CAA4C;IAC5C,gBAAgB,CAAC,EAAE,SAAS,CAAA;CAC7B,CAAA;AAED;;;;;;;;;GASG;AACH,MAAM,MAAM,mBAAmB,GAAG,uBAAuB,GACvD,CAAC;IAAE,YAAY,EAAE,SAAS,CAAC;IAAC,QAAQ,CAAC,EAAE,KAAK,CAAA;CA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AC;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"}
|
package/dist/helpers/index.d.ts
CHANGED
|
@@ -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
|
|
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"}
|
package/dist/helpers/index.js
CHANGED
|
@@ -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;
|
|
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';
|