@scalar/api-client 2.19.2 → 2.20.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 +55 -0
- package/dist/components/CodeInput/CodeInput.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/TheCommandPalette.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/WatchModeToggle.vue.d.ts.map +1 -1
- package/dist/components/DataTable/DataTable.vue.d.ts.map +1 -1
- package/dist/components/DataTable/DataTableInput.vue.d.ts.map +1 -1
- package/dist/components/Form/Form.vue.d.ts.map +1 -1
- package/dist/components/HttpMethod/HttpMethod.vue.d.ts.map +1 -1
- package/dist/components/ImportCollection/ImportCollectionModal.vue.d.ts.map +1 -1
- package/dist/components/ScalarAsciiArt.vue.d.ts.map +1 -1
- package/dist/components/SectionFilterButton.vue.d.ts.map +1 -1
- package/dist/components/Server/ServerDropdownItem.vue.d.ts.map +1 -1
- package/dist/components/Server/ServerVariablesSelect.vue.d.ts.map +1 -1
- package/dist/components/SideNav/DownloadAppButton.vue.d.ts.map +1 -1
- package/dist/components/SideNav/SideNav.vue.d.ts.map +1 -1
- package/dist/components/SideNav/SideNavLink.vue.d.ts.map +1 -1
- package/dist/components/Sidebar/Sidebar.vue.d.ts.map +1 -1
- package/dist/components/TopNav/TopNavItem.vue.d.ts.map +1 -1
- package/dist/components/ViewLayout/ViewLayoutCollapse.vue.d.ts.map +1 -1
- package/dist/hooks/useFileDialog.d.ts +4 -4
- package/dist/layouts/App/MainLayout.vue.d.ts.map +1 -1
- package/dist/style.css +1 -1
- package/dist/v2/blocks/operation-block/OperationBlock.vue.d.ts +0 -9
- package/dist/v2/blocks/operation-block/OperationBlock.vue.d.ts.map +1 -1
- package/dist/v2/blocks/operation-block/OperationBlock.vue.js +126 -67
- package/dist/v2/blocks/operation-block/components/Header.vue.d.ts +6 -0
- package/dist/v2/blocks/operation-block/components/Header.vue.d.ts.map +1 -1
- package/dist/v2/blocks/operation-block/components/Header.vue.js +2 -2
- package/dist/v2/blocks/operation-block/components/Header.vue2.js +25 -24
- package/dist/v2/blocks/operation-block/helpers/build-request-cookie-header.d.ts +1 -1
- package/dist/v2/blocks/operation-block/helpers/build-request-cookie-header.d.ts.map +1 -1
- package/dist/v2/blocks/operation-block/helpers/build-request-cookie-header.js +1 -1
- package/dist/v2/blocks/operation-block/helpers/build-request-parameters.d.ts +0 -1
- package/dist/v2/blocks/operation-block/helpers/build-request-parameters.d.ts.map +1 -1
- package/dist/v2/blocks/operation-block/helpers/build-request-parameters.js +96 -48
- package/dist/v2/blocks/operation-block/helpers/build-request.d.ts.map +1 -1
- package/dist/v2/blocks/operation-block/helpers/build-request.js +41 -39
- package/dist/v2/blocks/operation-block/helpers/har-to-fetch-request.d.ts +42 -0
- package/dist/v2/blocks/operation-block/helpers/har-to-fetch-request.d.ts.map +1 -0
- package/dist/v2/blocks/operation-block/helpers/har-to-fetch-request.js +31 -0
- package/dist/v2/blocks/operation-block/helpers/har-to-fetch-response.d.ts +66 -0
- package/dist/v2/blocks/operation-block/helpers/har-to-fetch-response.d.ts.map +1 -0
- package/dist/v2/blocks/operation-block/helpers/har-to-fetch-response.js +43 -0
- package/dist/v2/blocks/operation-block/helpers/send-request.d.ts +1 -0
- package/dist/v2/blocks/operation-block/helpers/send-request.d.ts.map +1 -1
- package/dist/v2/blocks/operation-block/helpers/send-request.js +40 -38
- package/dist/v2/blocks/operation-block/helpers/serialize-parameter.d.ts +96 -0
- package/dist/v2/blocks/operation-block/helpers/serialize-parameter.d.ts.map +1 -0
- package/dist/v2/blocks/operation-block/helpers/serialize-parameter.js +49 -0
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/operation-to-har.d.ts.map +1 -1
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/operation-to-har.js +16 -17
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-parameters.d.ts +1 -2
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-parameters.d.ts.map +1 -1
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-parameters.js +109 -152
- package/dist/v2/blocks/request-block/components/RequestTableRow.vue.d.ts.map +1 -1
- package/dist/v2/blocks/request-block/helpers/get-default-headers.js +1 -1
- package/dist/v2/blocks/response-block/ResponseBlock.vue.d.ts.map +1 -1
- package/dist/v2/blocks/response-block/components/ResponseBodyPreview.vue.d.ts.map +1 -1
- package/dist/v2/blocks/response-block/components/ResponseBodyToggle.vue.d.ts.map +1 -1
- package/dist/v2/blocks/response-block/components/ResponseEmpty.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.d.ts +6 -0
- package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.js +2 -2
- package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue2.js +24 -23
- package/dist/v2/blocks/scalar-address-bar-block/components/AddressBarHistory.vue.d.ts +2 -3
- package/dist/v2/blocks/scalar-address-bar-block/components/AddressBarHistory.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-address-bar-block/components/AddressBarHistory.vue.js +2 -2
- package/dist/v2/blocks/scalar-address-bar-block/components/AddressBarHistory.vue2.js +20 -20
- package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesInput.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.d.ts.map +1 -1
- package/dist/v2/components/code-input/CodeInput.vue.d.ts.map +1 -1
- package/dist/v2/components/data-table/DataTable.vue.d.ts.map +1 -1
- package/dist/v2/components/data-table/DataTableInput.vue.d.ts.map +1 -1
- package/dist/v2/components/server/ServerDropdownItem.vue.d.ts.map +1 -1
- package/dist/v2/components/sidebar/Sidebar.vue.d.ts +5 -0
- package/dist/v2/components/sidebar/Sidebar.vue.d.ts.map +1 -1
- package/dist/v2/components/sidebar/Sidebar.vue.js +60 -54
- package/dist/v2/features/app/app-events.d.ts.map +1 -1
- package/dist/v2/features/app/app-events.js +53 -42
- package/dist/v2/features/app/app-state.d.ts.map +1 -1
- package/dist/v2/features/app/app-state.js +72 -72
- package/dist/v2/features/app/components/AppSidebar.vue.d.ts.map +1 -1
- package/dist/v2/features/app/components/AppSidebar.vue.js +1 -1
- package/dist/v2/features/app/components/AppSidebar.vue2.js +84 -76
- package/dist/v2/features/app/components/DesktopTab.vue.d.ts.map +1 -1
- package/dist/v2/features/app/helpers/routes.d.ts +2 -2
- package/dist/v2/features/collection/DocumentCollection.vue.d.ts.map +1 -1
- package/dist/v2/features/collection/DocumentCollection.vue.js +82 -43
- package/dist/v2/features/collection/components/Settings.vue.d.ts.map +1 -1
- package/dist/v2/features/collection/components/Settings.vue.js +9 -10
- package/dist/v2/features/command-palette/components/CommandPaletteImport.vue.d.ts +1 -3
- package/dist/v2/features/command-palette/components/CommandPaletteImport.vue.d.ts.map +1 -1
- package/dist/v2/features/command-palette/components/TheCommandPalette.vue.d.ts.map +1 -1
- package/dist/v2/features/command-palette/components/WatchModeToggle.vue.d.ts.map +1 -1
- package/dist/v2/features/environments/components/EnvironmentVariablesDropdown.vue.d.ts.map +1 -1
- package/dist/v2/features/modal/Modal.vue.d.ts +1 -1
- package/dist/v2/features/modal/Modal.vue.d.ts.map +1 -1
- package/dist/v2/features/modal/Modal.vue.js +2 -2
- package/dist/v2/features/modal/Modal.vue2.js +31 -31
- package/dist/v2/features/modal/helpers/map-hidden-clients-config.d.ts +8 -0
- package/dist/v2/features/modal/helpers/map-hidden-clients-config.d.ts.map +1 -0
- package/dist/v2/features/modal/helpers/map-hidden-clients-config.js +36 -0
- package/dist/v2/features/modal/index.d.ts +1 -0
- package/dist/v2/features/modal/index.d.ts.map +1 -1
- package/dist/v2/features/modal/index.js +4 -2
- package/dist/v2/features/operation/Operation.vue.d.ts +5 -2
- package/dist/v2/features/operation/Operation.vue.d.ts.map +1 -1
- package/dist/v2/features/operation/Operation.vue.js +48 -35
- package/dist/v2/features/operation/helpers/get-selected-server.d.ts +2 -1
- package/dist/v2/features/operation/helpers/get-selected-server.d.ts.map +1 -1
- package/dist/v2/features/operation/helpers/get-selected-server.js +2 -2
- package/dist/v2/features/search/components/SearchResult.vue.d.ts.map +1 -1
- package/dist/v2/features/settings/CollectionSettings.vue.d.ts +0 -2
- package/dist/v2/features/settings/CollectionSettings.vue.d.ts.map +1 -1
- package/dist/v2/features/settings/CollectionSettings.vue.js +110 -135
- package/dist/v2/features/settings/components/Appearance.vue.d.ts.map +1 -1
- package/dist/v2/helpers/get-servers.d.ts +23 -0
- package/dist/v2/helpers/get-servers.d.ts.map +1 -0
- package/dist/v2/helpers/get-servers.js +66 -0
- package/dist/v2/helpers/index.d.ts +1 -0
- package/dist/v2/helpers/index.d.ts.map +1 -1
- package/dist/v2/helpers/index.js +4 -2
- package/dist/v2/workspace-events.d.ts.map +1 -1
- package/dist/v2/workspace-events.js +12 -6
- package/dist/views/Collection/components/EnvironmentForm.vue.d.ts.map +1 -1
- package/dist/views/Environment/Environment.vue.d.ts.map +1 -1
- package/dist/views/Environment/EnvironmentVariableDropdown.vue.d.ts.map +1 -1
- package/dist/views/Request/Request.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestRoot.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/OAuthScopesInput.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthTab.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestParams.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestTable.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSidebar.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSidebarItem.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSubpageHeader.vue.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseBodyPreview.vue.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseBodyToggle.vue.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
- package/dist/views/Request/ResponseSection/ResponseSection.vue.d.ts.map +1 -1
- package/dist/views/Settings/SettingsGeneral.vue.d.ts.map +1 -1
- package/dist/views/Settings/components/SettingsAppearance.vue.d.ts.map +1 -1
- package/package.json +12 -12
- package/dist/v2/blocks/operation-block/helpers/get-delimiter.js +0 -15
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared parameter serialization utilities for OpenAPI style values.
|
|
3
|
+
* Used by both build-request-parameters and process-parameters.
|
|
4
|
+
*
|
|
5
|
+
* @see https://spec.openapis.org/oas/v3.1.1.html#style-values
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* Serializes a value based on the content type for content-based query parameters.
|
|
9
|
+
* Content-based query parameters do not use style serialization and instead follow
|
|
10
|
+
* their content type specification (e.g., application/json should be JSON.stringified).
|
|
11
|
+
*
|
|
12
|
+
* @param value - The value to serialize
|
|
13
|
+
* @param contentType - The content type to use for serialization
|
|
14
|
+
* @returns The serialized value as a string
|
|
15
|
+
*/
|
|
16
|
+
export declare const serializeContentValue: (value: unknown, contentType: string) => string;
|
|
17
|
+
/**
|
|
18
|
+
* Serializes a value according to OpenAPI simple style.
|
|
19
|
+
* Used for path and header parameters.
|
|
20
|
+
*
|
|
21
|
+
* Simple style with explode: false
|
|
22
|
+
* - Primitive: blue
|
|
23
|
+
* - Array: blue,black,brown
|
|
24
|
+
* - Object: R,100,G,200,B,150
|
|
25
|
+
*
|
|
26
|
+
* Simple style with explode: true
|
|
27
|
+
* - Primitive: blue
|
|
28
|
+
* - Array: blue,black,brown
|
|
29
|
+
* - Object: R=100,G=200,B=150
|
|
30
|
+
*/
|
|
31
|
+
export declare const serializeSimpleStyle: (value: unknown, explode: boolean) => unknown;
|
|
32
|
+
/**
|
|
33
|
+
* Serializes a value according to OpenAPI form style.
|
|
34
|
+
* Used for query and cookie parameters.
|
|
35
|
+
*
|
|
36
|
+
* Form style with explode: true (default for query)
|
|
37
|
+
* - Primitive: color=blue
|
|
38
|
+
* - Array: color=blue&color=black&color=brown (multiple entries)
|
|
39
|
+
* - Object: R=100&G=200&B=150 (multiple entries)
|
|
40
|
+
*
|
|
41
|
+
* Form style with explode: false
|
|
42
|
+
* - Primitive: color=blue
|
|
43
|
+
* - Array: color=blue,black,brown
|
|
44
|
+
* - Object: color=R,100,G,200,B,150
|
|
45
|
+
*/
|
|
46
|
+
export declare const serializeFormStyle: (value: unknown, explode: boolean) => unknown | Array<{
|
|
47
|
+
key: string;
|
|
48
|
+
value: unknown;
|
|
49
|
+
}>;
|
|
50
|
+
/**
|
|
51
|
+
* Serializes a value according to OpenAPI form style for cookies.
|
|
52
|
+
* This is similar to serializeFormStyle but handles nested objects recursively
|
|
53
|
+
* and treats null values specially for cookie serialization.
|
|
54
|
+
*
|
|
55
|
+
* Form style with explode: true (default for cookies)
|
|
56
|
+
* - Primitive: color=blue
|
|
57
|
+
* - Array: color=blue&color=black&color=brown (multiple entries)
|
|
58
|
+
* - Object: R=100&G=200&B=150 (multiple entries)
|
|
59
|
+
*
|
|
60
|
+
* Form style with explode: false
|
|
61
|
+
* - Primitive: color=blue
|
|
62
|
+
* - Array: color=blue,black,brown (null becomes "null")
|
|
63
|
+
* - Object: color=R,100,G,200,B,150 (recursively flattened)
|
|
64
|
+
*/
|
|
65
|
+
export declare const serializeFormStyleForCookies: (value: unknown, explode: boolean) => unknown | Array<{
|
|
66
|
+
key: string;
|
|
67
|
+
value: unknown;
|
|
68
|
+
}>;
|
|
69
|
+
/**
|
|
70
|
+
* Serializes a value according to OpenAPI spaceDelimited style.
|
|
71
|
+
* Only valid for query parameters with array or object values.
|
|
72
|
+
*
|
|
73
|
+
* SpaceDelimited array: blue black brown
|
|
74
|
+
* SpaceDelimited object: R 100 G 200 B 150
|
|
75
|
+
*/
|
|
76
|
+
export declare const serializeSpaceDelimitedStyle: (value: unknown) => string;
|
|
77
|
+
/**
|
|
78
|
+
* Serializes a value according to OpenAPI pipeDelimited style.
|
|
79
|
+
* Only valid for query parameters with array or object values.
|
|
80
|
+
*
|
|
81
|
+
* PipeDelimited array: blue|black|brown
|
|
82
|
+
* PipeDelimited object: R|100|G|200|B|150
|
|
83
|
+
*/
|
|
84
|
+
export declare const serializePipeDelimitedStyle: (value: unknown) => string;
|
|
85
|
+
/**
|
|
86
|
+
* Serializes a value according to OpenAPI deepObject style.
|
|
87
|
+
* Only valid for query parameters with explode: true.
|
|
88
|
+
*
|
|
89
|
+
* DeepObject: color[R]=100&color[G]=200&color[B]=150
|
|
90
|
+
* Nested: user[name][first]=Alex&user[name][last]=Smith&user[role]=admin
|
|
91
|
+
*/
|
|
92
|
+
export declare const serializeDeepObjectStyle: (paramName: string, value: unknown) => Array<{
|
|
93
|
+
key: string;
|
|
94
|
+
value: string;
|
|
95
|
+
}>;
|
|
96
|
+
//# sourceMappingURL=serialize-parameter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"serialize-parameter.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/operation-block/helpers/serialize-parameter.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH;;;;;;;;GAQG;AACH,eAAO,MAAM,qBAAqB,GAAI,OAAO,OAAO,EAAE,aAAa,MAAM,KAAG,MAa3E,CAAA;AAED;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,oBAAoB,GAAI,OAAO,OAAO,EAAE,SAAS,OAAO,KAAG,OAqBvE,CAAA;AAED;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,kBAAkB,GAC7B,OAAO,OAAO,EACd,SAAS,OAAO,KACf,OAAO,GAAG,KAAK,CAAC;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,OAAO,CAAA;CAAE,CA4BjD,CAAA;AAED;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,4BAA4B,GACvC,OAAO,OAAO,EACd,SAAS,OAAO,KACf,OAAO,GAAG,KAAK,CAAC;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,OAAO,CAAA;CAAE,CA2CjD,CAAA;AAED;;;;;;GAMG;AACH,eAAO,MAAM,4BAA4B,GAAI,OAAO,OAAO,KAAG,MAe7D,CAAA;AAED;;;;;;GAMG;AACH,eAAO,MAAM,2BAA2B,GAAI,OAAO,OAAO,KAAG,MAe5D,CAAA;AAED;;;;;;GAMG;AACH,eAAO,MAAM,wBAAwB,GAAI,WAAW,MAAM,EAAE,OAAO,OAAO,KAAG,KAAK,CAAC;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAyBhH,CAAA"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
const c = (r, n) => typeof r == "string" ? r : n.includes("json") || typeof r == "object" && r !== null && !Array.isArray(r) ? JSON.stringify(r) : String(r), j = (r, n) => {
|
|
2
|
+
if (Array.isArray(r))
|
|
3
|
+
return r.join(",");
|
|
4
|
+
if (typeof r == "object" && r !== null) {
|
|
5
|
+
const t = Object.entries(r);
|
|
6
|
+
return n ? t.map(([e, i]) => `${e}=${i}`).join(",") : t.map(([e, i]) => `${e},${i}`).join(",");
|
|
7
|
+
}
|
|
8
|
+
return r;
|
|
9
|
+
}, p = (r, n) => Array.isArray(r) && n ? r.map((t) => ({ key: "", value: t })) : Array.isArray(r) ? r.join(",") : typeof r == "object" && r !== null && n ? Object.entries(r).map(([t, e]) => ({
|
|
10
|
+
key: t,
|
|
11
|
+
value: e
|
|
12
|
+
})) : typeof r == "object" && r !== null ? Object.entries(r).map(([t, e]) => `${t},${e}`).join(",") : r, A = (r, n) => {
|
|
13
|
+
if (Array.isArray(r) && n)
|
|
14
|
+
return r.map((t) => ({ key: "", value: t }));
|
|
15
|
+
if (Array.isArray(r))
|
|
16
|
+
return r.map((t) => t === null ? "null" : String(t)).join(",");
|
|
17
|
+
if (typeof r == "object" && r !== null && n)
|
|
18
|
+
return Object.entries(r).map(([t, e]) => ({
|
|
19
|
+
key: t,
|
|
20
|
+
value: e
|
|
21
|
+
}));
|
|
22
|
+
if (typeof r == "object" && r !== null) {
|
|
23
|
+
const t = (e) => {
|
|
24
|
+
const i = [];
|
|
25
|
+
for (const [y, o] of Object.entries(e))
|
|
26
|
+
typeof o == "object" && o !== null && !Array.isArray(o) ? i.push(y, ...t(o)) : i.push(y, o === null ? "null" : String(o));
|
|
27
|
+
return i;
|
|
28
|
+
};
|
|
29
|
+
return t(r).join(",");
|
|
30
|
+
}
|
|
31
|
+
return r;
|
|
32
|
+
}, b = (r) => Array.isArray(r) ? r.join(" ") : typeof r == "object" && r !== null ? Object.entries(r).map(([n, t]) => `${n} ${t}`).join(" ") : String(r), l = (r) => Array.isArray(r) ? r.join("|") : typeof r == "object" && r !== null ? Object.entries(r).flat().join("|") : String(r), S = (r, n) => {
|
|
33
|
+
const t = [], e = (i, y) => {
|
|
34
|
+
for (const [o, s] of Object.entries(i)) {
|
|
35
|
+
const f = `${y}[${o}]`;
|
|
36
|
+
typeof s == "object" && s !== null && !Array.isArray(s) ? e(s, f) : t.push({ key: f, value: String(s) });
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
return typeof n == "object" && n !== null && !Array.isArray(n) && e(n, r), t;
|
|
40
|
+
};
|
|
41
|
+
export {
|
|
42
|
+
c as serializeContentValue,
|
|
43
|
+
S as serializeDeepObjectStyle,
|
|
44
|
+
p as serializeFormStyle,
|
|
45
|
+
A as serializeFormStyleForCookies,
|
|
46
|
+
l as serializePipeDelimitedStyle,
|
|
47
|
+
j as serializeSimpleStyle,
|
|
48
|
+
b as serializeSpaceDelimitedStyle
|
|
49
|
+
};
|
package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/operation-to-har.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"operation-to-har.d.ts","sourceRoot":"","sources":["../../../../../../src/v2/blocks/operation-code-sample/helpers/operation-to-har/operation-to-har.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAA;AAEnE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qEAAqE,CAAA;AACxG,OAAO,KAAK,EACV,eAAe,EACf,oBAAoB,EACpB,YAAY,EACb,MAAM,8DAA8D,CAAA;AACrE,OAAO,KAAK,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,YAAY,CAAA;AAUvD,MAAM,MAAM,mBAAmB,GAAG;IAChC,+BAA+B;IAC/B,SAAS,EAAE,eAAe,CAAA;IAC1B,mCAAmC;IACnC,MAAM,EAAE,UAAU,CAAA;IAClB,4BAA4B;IAC5B,IAAI,EAAE,MAAM,CAAA;IACZ;;;;OAIG;IACH,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB;;;;;OAKG;IACH,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,4BAA4B;IAC5B,MAAM,CAAC,EAAE,YAAY,GAAG,IAAI,CAAA;IAC5B,2EAA2E;IAC3E,eAAe,CAAC,EAAE,oBAAoB,EAAE,CAAA;IACxC,mCAAmC;IACnC,aAAa,CAAC,EAAE,aAAa,EAAE,CAAA;IAC/B;;;;OAIG;IACH,qBAAqB,CAAC,EAAE,OAAO,CAAA;CAChC,CAAA;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,eAAO,MAAM,cAAc,GAAI,mHAU5B,mBAAmB,KAAG,
|
|
1
|
+
{"version":3,"file":"operation-to-har.d.ts","sourceRoot":"","sources":["../../../../../../src/v2/blocks/operation-code-sample/helpers/operation-to-har/operation-to-har.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAA;AAEnE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qEAAqE,CAAA;AACxG,OAAO,KAAK,EACV,eAAe,EACf,oBAAoB,EACpB,YAAY,EACb,MAAM,8DAA8D,CAAA;AACrE,OAAO,KAAK,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,YAAY,CAAA;AAUvD,MAAM,MAAM,mBAAmB,GAAG;IAChC,+BAA+B;IAC/B,SAAS,EAAE,eAAe,CAAA;IAC1B,mCAAmC;IACnC,MAAM,EAAE,UAAU,CAAA;IAClB,4BAA4B;IAC5B,IAAI,EAAE,MAAM,CAAA;IACZ;;;;OAIG;IACH,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB;;;;;OAKG;IACH,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,4BAA4B;IAC5B,MAAM,CAAC,EAAE,YAAY,GAAG,IAAI,CAAA;IAC5B,2EAA2E;IAC3E,eAAe,CAAC,EAAE,oBAAoB,EAAE,CAAA;IACxC,mCAAmC;IACnC,aAAa,CAAC,EAAE,aAAa,EAAE,CAAA;IAC/B;;;;OAIG;IACH,qBAAqB,CAAC,EAAE,OAAO,CAAA;CAChC,CAAA;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,eAAO,MAAM,cAAc,GAAI,mHAU5B,mBAAmB,KAAG,UA+FxB,CAAA"}
|
|
@@ -6,23 +6,23 @@ import { processParameters as H } from "./process-parameters.js";
|
|
|
6
6
|
import { processSecuritySchemes as z } from "./process-security-schemes.js";
|
|
7
7
|
import { processServerUrl as D } from "./process-server-url.js";
|
|
8
8
|
const w = ({
|
|
9
|
-
includeDefaultHeaders:
|
|
9
|
+
includeDefaultHeaders: u = !1,
|
|
10
10
|
operation: t,
|
|
11
|
-
contentType:
|
|
12
|
-
method:
|
|
11
|
+
contentType: f,
|
|
12
|
+
method: l,
|
|
13
13
|
path: p,
|
|
14
14
|
server: c = null,
|
|
15
15
|
example: a,
|
|
16
|
-
securitySchemes:
|
|
16
|
+
securitySchemes: n,
|
|
17
17
|
globalCookies: h
|
|
18
18
|
}) => {
|
|
19
|
-
const y =
|
|
20
|
-
method:
|
|
19
|
+
const y = u ? T({
|
|
20
|
+
method: l,
|
|
21
21
|
operation: t,
|
|
22
22
|
exampleKey: a ?? "default",
|
|
23
23
|
hideDisabledHeaders: !0
|
|
24
24
|
}).filter((e) => !e.isOverridden) : [], g = t["x-scalar-disable-parameters"]?.["global-cookies"]?.[a ?? "default"] ?? {}, v = D(c, p), r = {
|
|
25
|
-
method:
|
|
25
|
+
method: l,
|
|
26
26
|
url: v,
|
|
27
27
|
headers: y.map((e) => ({ name: e.name, value: e.defaultValue })),
|
|
28
28
|
queryString: [],
|
|
@@ -36,14 +36,13 @@ const w = ({
|
|
|
36
36
|
const { url: e, headers: s, queryString: o, cookies: S } = H({
|
|
37
37
|
harRequest: r,
|
|
38
38
|
parameters: t.parameters,
|
|
39
|
-
example: a
|
|
40
|
-
contentType: l
|
|
39
|
+
example: a
|
|
41
40
|
}), b = h?.filter((i) => q({ cookie: i, url: e, disabledGlobalCookies: g }))?.map((i) => ({ name: i.name, value: i.value })) ?? [];
|
|
42
41
|
r.url = e, r.headers = s, r.queryString = o, r.cookies = [...b, ...S];
|
|
43
42
|
}
|
|
44
|
-
const
|
|
45
|
-
if (
|
|
46
|
-
const e = C({ requestBody:
|
|
43
|
+
const d = k(t.requestBody);
|
|
44
|
+
if (d?.content) {
|
|
45
|
+
const e = C({ requestBody: d, contentType: f, example: a });
|
|
47
46
|
if (e && (r.postData = e, r.bodySize = e.text?.length ?? -1, e.mimeType)) {
|
|
48
47
|
const s = r.headers.find(
|
|
49
48
|
(o) => o.name.toLowerCase() === "content-type"
|
|
@@ -54,14 +53,14 @@ const w = ({
|
|
|
54
53
|
});
|
|
55
54
|
}
|
|
56
55
|
}
|
|
57
|
-
if (
|
|
58
|
-
const { headers: e, queryString: s, cookies: o } = z(
|
|
56
|
+
if (n) {
|
|
57
|
+
const { headers: e, queryString: s, cookies: o } = z(n);
|
|
59
58
|
r.headers.push(...e), r.queryString.push(...s), r.cookies.push(...o);
|
|
60
59
|
}
|
|
61
|
-
let
|
|
60
|
+
let m = 0;
|
|
62
61
|
for (const e of r.headers)
|
|
63
|
-
|
|
64
|
-
return r.headersSize =
|
|
62
|
+
m += (e.name?.length ?? 0) + 2 + (e.value?.length ?? 0) + 2;
|
|
63
|
+
return r.headersSize = m, r;
|
|
65
64
|
};
|
|
66
65
|
export {
|
|
67
66
|
w as operationToHar
|
package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-parameters.d.ts
CHANGED
|
@@ -12,12 +12,11 @@ type ProcessedParameters = {
|
|
|
12
12
|
*
|
|
13
13
|
* @see https://spec.openapis.org/oas/latest.html#style-values
|
|
14
14
|
*/
|
|
15
|
-
export declare const processParameters: ({ harRequest, parameters, example,
|
|
15
|
+
export declare const processParameters: ({ harRequest, parameters, example, }: {
|
|
16
16
|
harRequest: HarRequest;
|
|
17
17
|
parameters: OperationObject["parameters"];
|
|
18
18
|
/** The name of the example to use */
|
|
19
19
|
example?: string | undefined;
|
|
20
|
-
contentType?: string | undefined;
|
|
21
20
|
}) => ProcessedParameters;
|
|
22
21
|
export {};
|
|
23
22
|
//# sourceMappingURL=process-parameters.d.ts.map
|
package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-parameters.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"process-parameters.d.ts","sourceRoot":"","sources":["../../../../../../src/v2/blocks/operation-code-sample/helpers/operation-to-har/process-parameters.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAmB,MAAM,8DAA8D,CAAA;AAEpH,OAAO,KAAK,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,YAAY,CAAA;
|
|
1
|
+
{"version":3,"file":"process-parameters.d.ts","sourceRoot":"","sources":["../../../../../../src/v2/blocks/operation-code-sample/helpers/operation-to-har/process-parameters.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAmB,MAAM,8DAA8D,CAAA;AAEpH,OAAO,KAAK,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,YAAY,CAAA;AAcvD,KAAK,mBAAmB,GAAG;IACzB,GAAG,EAAE,MAAM,CAAA;IACX,OAAO,EAAE,UAAU,CAAC,SAAS,CAAC,CAAA;IAC9B,WAAW,EAAE,UAAU,CAAC,aAAa,CAAC,CAAA;IACtC,OAAO,EAAE,UAAU,CAAC,SAAS,CAAC,CAAA;CAC/B,CAAA;AAuED;;;;;GAKG;AACH,eAAO,MAAM,iBAAiB,GAAI,sCAI/B;IACD,UAAU,EAAE,UAAU,CAAA;IACtB,UAAU,EAAE,eAAe,CAAC,YAAY,CAAC,CAAA;IACzC,qCAAqC;IACrC,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;CAC7B,KAAG,mBAuHH,CAAA"}
|
|
@@ -1,214 +1,171 @@
|
|
|
1
|
-
import { getResolvedRef as
|
|
2
|
-
import { getExampleFromSchema as
|
|
3
|
-
import { getExample as
|
|
4
|
-
import {
|
|
5
|
-
|
|
1
|
+
import { getResolvedRef as m } from "@scalar/workspace-store/helpers/get-resolved-ref";
|
|
2
|
+
import { getExampleFromSchema as k } from "../get-example-from-schema.js";
|
|
3
|
+
import { getExample as S } from "../../../operation-block/helpers/get-example.js";
|
|
4
|
+
import { serializeFormStyleForCookies as b, serializeSimpleStyle as v, serializeContentValue as h, serializeDeepObjectStyle as p, serializePipeDelimitedStyle as x, serializeSpaceDelimitedStyle as j, serializeFormStyle as g } from "../../../operation-block/helpers/serialize-parameter.js";
|
|
5
|
+
import { isParamDisabled as z } from "../../../request-block/helpers/is-param-disabled.js";
|
|
6
|
+
const A = (e) => (e ?? []).map((t) => m(t)), P = (e) => {
|
|
6
7
|
if (e.in === "header")
|
|
7
8
|
return { style: "simple", explode: "explode" in e && e.explode !== void 0 ? e.explode : !1 };
|
|
8
9
|
if (e.in === "cookie")
|
|
9
10
|
return { style: "form", explode: "explode" in e && e.explode !== void 0 ? e.explode : !0 };
|
|
10
|
-
const
|
|
11
|
+
const t = {
|
|
11
12
|
path: "simple",
|
|
12
13
|
query: "form",
|
|
13
14
|
header: "simple",
|
|
14
15
|
cookie: "form"
|
|
15
|
-
}[e.in],
|
|
16
|
-
return { style:
|
|
17
|
-
},
|
|
18
|
-
const
|
|
19
|
-
if (
|
|
16
|
+
}[e.in], n = "style" in e && e.style ? e.style : t, d = "explode" in e && e.explode !== void 0 ? e.explode : n === "form";
|
|
17
|
+
return { style: n, explode: d };
|
|
18
|
+
}, O = (e, t, n) => {
|
|
19
|
+
const d = S(e, t, n);
|
|
20
|
+
if (z(e, d))
|
|
20
21
|
return;
|
|
21
|
-
if (
|
|
22
|
-
return
|
|
22
|
+
if (d?.value !== void 0)
|
|
23
|
+
return d.value;
|
|
23
24
|
if (!("schema" in e) || !e.schema)
|
|
24
25
|
return;
|
|
25
|
-
const
|
|
26
|
-
return
|
|
27
|
-
},
|
|
26
|
+
const s = e.in === "path" ? { emptyString: `{${e.name}}` } : {};
|
|
27
|
+
return k(m(e.schema), s);
|
|
28
|
+
}, Q = ({
|
|
28
29
|
harRequest: e,
|
|
29
|
-
parameters:
|
|
30
|
-
example:
|
|
31
|
-
contentType: y
|
|
30
|
+
parameters: t,
|
|
31
|
+
example: n
|
|
32
32
|
}) => {
|
|
33
|
-
const
|
|
34
|
-
let
|
|
35
|
-
const
|
|
36
|
-
for (const
|
|
37
|
-
if (!
|
|
33
|
+
const d = [...e.headers], s = [...e.queryString];
|
|
34
|
+
let r = e.url;
|
|
35
|
+
const l = A(t);
|
|
36
|
+
for (const i of l) {
|
|
37
|
+
if (!i.in || !i.name)
|
|
38
38
|
continue;
|
|
39
|
-
const
|
|
40
|
-
if (
|
|
39
|
+
const f = O(i, n, void 0);
|
|
40
|
+
if (f === void 0)
|
|
41
41
|
continue;
|
|
42
|
-
const { style:
|
|
43
|
-
switch (
|
|
42
|
+
const { style: u, explode: y } = P(i);
|
|
43
|
+
switch (i.in) {
|
|
44
44
|
case "path": {
|
|
45
|
-
|
|
45
|
+
r = w(r, i, f, u, y);
|
|
46
46
|
break;
|
|
47
47
|
}
|
|
48
48
|
case "query": {
|
|
49
|
-
|
|
49
|
+
if ("content" in i && i.content) {
|
|
50
|
+
const o = Object.keys(i.content)[0] ?? "application/json", c = h(f, o);
|
|
51
|
+
s.push({ name: i.name, value: c });
|
|
52
|
+
break;
|
|
53
|
+
}
|
|
54
|
+
switch (u) {
|
|
50
55
|
case "form": {
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
i.push({ name: s.name, value: String(n) });
|
|
60
|
-
else if (Array.isArray(n))
|
|
61
|
-
i.push({ name: s.name, value: n.join(",") });
|
|
62
|
-
else if (typeof n == "object" && n !== null) {
|
|
63
|
-
const l = Object.entries(n).map(([r, $]) => `${r},${$}`).join(",");
|
|
64
|
-
i.push({ name: s.name, value: l });
|
|
65
|
-
} else
|
|
66
|
-
i.push({ name: s.name, value: String(n) });
|
|
56
|
+
const o = g(f, y);
|
|
57
|
+
if (Array.isArray(o))
|
|
58
|
+
for (const c of o) {
|
|
59
|
+
const $ = c.key || i.name;
|
|
60
|
+
s.push({ name: $, value: String(c.value) });
|
|
61
|
+
}
|
|
62
|
+
else
|
|
63
|
+
s.push({ name: i.name, value: String(o) });
|
|
67
64
|
break;
|
|
68
65
|
}
|
|
69
66
|
case "spaceDelimited": {
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
else if (typeof n == "object" && n !== null) {
|
|
73
|
-
const l = Object.entries(n).map(([r, $]) => `${r} ${$}`).join(" ");
|
|
74
|
-
i.push({ name: s.name, value: l });
|
|
75
|
-
}
|
|
67
|
+
const o = j(f);
|
|
68
|
+
s.push({ name: i.name, value: o });
|
|
76
69
|
break;
|
|
77
70
|
}
|
|
78
71
|
case "pipeDelimited": {
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
else if (typeof n == "object" && n !== null) {
|
|
82
|
-
const l = Object.entries(n).flat().join("|");
|
|
83
|
-
i.push({ name: s.name, value: l });
|
|
84
|
-
}
|
|
72
|
+
const o = x(f);
|
|
73
|
+
s.push({ name: i.name, value: o });
|
|
85
74
|
break;
|
|
86
75
|
}
|
|
87
76
|
case "deepObject": {
|
|
88
|
-
if (
|
|
89
|
-
|
|
90
|
-
|
|
77
|
+
if (y) {
|
|
78
|
+
const o = p(i.name, f);
|
|
79
|
+
for (const c of o)
|
|
80
|
+
s.push({ name: c.key, value: c.value });
|
|
81
|
+
}
|
|
91
82
|
break;
|
|
92
83
|
}
|
|
93
84
|
// Default to form style
|
|
94
85
|
default:
|
|
95
|
-
|
|
86
|
+
s.push({ name: i.name, value: String(f) });
|
|
96
87
|
}
|
|
97
88
|
break;
|
|
98
89
|
}
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
const l = Object.entries(n).map(([r, $]) => `${r}=${$}`).join(",");
|
|
106
|
-
f.push({ name: s.name, value: l });
|
|
107
|
-
} else
|
|
108
|
-
f.push({ name: s.name, value: String(n) });
|
|
109
|
-
else if (Array.isArray(n))
|
|
110
|
-
f.push({ name: s.name, value: n.join(",") });
|
|
111
|
-
else if (typeof n == "object" && n !== null) {
|
|
112
|
-
const l = Object.entries(n).map(([r, $]) => `${r},${$}`).join(",");
|
|
113
|
-
f.push({ name: s.name, value: l });
|
|
114
|
-
} else
|
|
115
|
-
f.push({ name: s.name, value: String(n) });
|
|
90
|
+
// Headers only support 'simple' style according to OpenAPI 3.1.1
|
|
91
|
+
// For arrays, simple style always produces comma-separated values regardless of explode
|
|
92
|
+
// The explode parameter only affects object serialization
|
|
93
|
+
case "header": {
|
|
94
|
+
const o = v(f, y);
|
|
95
|
+
d.push({ name: i.name, value: String(o) });
|
|
116
96
|
break;
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
} else if (typeof n == "object" && n !== null) {
|
|
131
|
-
const l = ($) => {
|
|
132
|
-
const a = [];
|
|
133
|
-
for (const [b, j] of Object.entries($))
|
|
134
|
-
typeof j == "object" && j !== null && !Array.isArray(j) ? a.push(b, ...l(j)) : a.push(b, j === null ? "null" : String(j));
|
|
135
|
-
return a;
|
|
136
|
-
}, r = l(n).join(",");
|
|
137
|
-
e.cookies.push({ name: s.name, value: r });
|
|
138
|
-
} else
|
|
139
|
-
e.cookies.push({ name: s.name, value: n === null ? "null" : String(n) });
|
|
97
|
+
}
|
|
98
|
+
// Cookies only support 'form' style according to OpenAPI 3.1.1
|
|
99
|
+
case "cookie": {
|
|
100
|
+
const o = b(f, y);
|
|
101
|
+
if (Array.isArray(o))
|
|
102
|
+
for (const c of o) {
|
|
103
|
+
const $ = c.key || i.name, a = c.value === null ? "null" : String(c.value);
|
|
104
|
+
e.cookies.push({ name: $, value: a });
|
|
105
|
+
}
|
|
106
|
+
else {
|
|
107
|
+
const c = o === null ? "null" : String(o);
|
|
108
|
+
e.cookies.push({ name: i.name, value: c });
|
|
109
|
+
}
|
|
140
110
|
break;
|
|
111
|
+
}
|
|
141
112
|
}
|
|
142
113
|
}
|
|
143
114
|
return {
|
|
144
|
-
url:
|
|
145
|
-
headers:
|
|
146
|
-
queryString:
|
|
115
|
+
url: r,
|
|
116
|
+
headers: d,
|
|
117
|
+
queryString: s,
|
|
147
118
|
cookies: e.cookies
|
|
148
119
|
};
|
|
149
|
-
},
|
|
150
|
-
switch (
|
|
120
|
+
}, w = (e, t, n, d, s) => {
|
|
121
|
+
switch (d) {
|
|
151
122
|
case "matrix": {
|
|
152
|
-
if (
|
|
153
|
-
if (Array.isArray(
|
|
154
|
-
const
|
|
155
|
-
return e.replace(`{;${
|
|
123
|
+
if (s) {
|
|
124
|
+
if (Array.isArray(n)) {
|
|
125
|
+
const r = n.map((l) => `${t.name}=${l}`).join(";");
|
|
126
|
+
return e.replace(`{;${t.name}}`, `;${r}`);
|
|
156
127
|
}
|
|
157
|
-
if (typeof
|
|
158
|
-
const
|
|
159
|
-
return e.replace(`{;${
|
|
128
|
+
if (typeof n == "object" && n !== null) {
|
|
129
|
+
const r = Object.entries(n).map(([l, i]) => `${l}=${i}`).join(";");
|
|
130
|
+
return e.replace(`{;${t.name}}`, `;${r}`);
|
|
160
131
|
}
|
|
161
|
-
return e.replace(`{;${
|
|
132
|
+
return e.replace(`{;${t.name}}`, `;${t.name}=${n}`);
|
|
162
133
|
}
|
|
163
|
-
if (Array.isArray(
|
|
164
|
-
return e.replace(`{;${
|
|
165
|
-
if (typeof
|
|
166
|
-
const
|
|
167
|
-
return e.replace(`{;${
|
|
134
|
+
if (Array.isArray(n))
|
|
135
|
+
return e.replace(`{;${t.name}}`, `;${t.name}=${n.join(",")}`);
|
|
136
|
+
if (typeof n == "object" && n !== null) {
|
|
137
|
+
const r = Object.entries(n).map(([l, i]) => `${l},${i}`).join(",");
|
|
138
|
+
return e.replace(`{;${t.name}}`, `;${t.name}=${r}`);
|
|
168
139
|
}
|
|
169
|
-
return e.replace(`{;${
|
|
140
|
+
return e.replace(`{;${t.name}}`, `;${t.name}=${n}`);
|
|
170
141
|
}
|
|
171
142
|
case "label": {
|
|
172
|
-
if (
|
|
173
|
-
if (Array.isArray(
|
|
174
|
-
return e.replace(`{.${
|
|
175
|
-
if (typeof
|
|
176
|
-
const
|
|
177
|
-
return e.replace(`{.${
|
|
143
|
+
if (s) {
|
|
144
|
+
if (Array.isArray(n))
|
|
145
|
+
return e.replace(`{.${t.name}}`, `.${n.join(".")}`);
|
|
146
|
+
if (typeof n == "object" && n !== null) {
|
|
147
|
+
const r = Object.entries(n).map(([l, i]) => `${l}=${i}`).join(".");
|
|
148
|
+
return e.replace(`{.${t.name}}`, `.${r}`);
|
|
178
149
|
}
|
|
179
|
-
return e.replace(`{.${
|
|
150
|
+
return e.replace(`{.${t.name}}`, `.${n}`);
|
|
180
151
|
}
|
|
181
|
-
if (Array.isArray(
|
|
182
|
-
return e.replace(`{.${
|
|
183
|
-
if (typeof
|
|
184
|
-
const
|
|
185
|
-
return e.replace(`{.${
|
|
152
|
+
if (Array.isArray(n))
|
|
153
|
+
return e.replace(`{.${t.name}}`, `.${n.join(",")}`);
|
|
154
|
+
if (typeof n == "object" && n !== null) {
|
|
155
|
+
const r = Object.entries(n).map(([l, i]) => `${l},${i}`).join(",");
|
|
156
|
+
return e.replace(`{.${t.name}}`, `.${r}`);
|
|
186
157
|
}
|
|
187
|
-
return e.replace(`{.${
|
|
158
|
+
return e.replace(`{.${t.name}}`, `.${n}`);
|
|
188
159
|
}
|
|
189
160
|
case "simple": {
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
return e.replace(`{${o.name}}`, t.join(","));
|
|
193
|
-
if (typeof t == "object" && t !== null) {
|
|
194
|
-
const i = Object.entries(t).map(([c, u]) => `${c}=${u}`).join(",");
|
|
195
|
-
return e.replace(`{${o.name}}`, i);
|
|
196
|
-
}
|
|
197
|
-
return e.replace(`{${o.name}}`, String(t));
|
|
198
|
-
}
|
|
199
|
-
if (Array.isArray(t))
|
|
200
|
-
return e.replace(`{${o.name}}`, t.join(","));
|
|
201
|
-
if (typeof t == "object" && t !== null) {
|
|
202
|
-
const i = Object.entries(t).map(([c, u]) => `${c},${u}`).join(",");
|
|
203
|
-
return e.replace(`{${o.name}}`, i);
|
|
204
|
-
}
|
|
205
|
-
return e.replace(`{${o.name}}`, String(t));
|
|
161
|
+
const r = v(n, s);
|
|
162
|
+
return e.replace(`{${t.name}}`, String(r));
|
|
206
163
|
}
|
|
207
164
|
// Default to simple style
|
|
208
165
|
default:
|
|
209
|
-
return e.replace(`{${
|
|
166
|
+
return e.replace(`{${t.name}}`, String(n));
|
|
210
167
|
}
|
|
211
168
|
};
|
|
212
169
|
export {
|
|
213
|
-
|
|
170
|
+
Q as processParameters
|
|
214
171
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RequestTableRow.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/request-block/components/RequestTableRow.vue"],"names":[],"mappings":"AAoRA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2EAA2E,CAAA;AACnH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8DAA8D,CAAA;AAchG,MAAM,MAAM,QAAQ,GAAG;IACrB,sCAAsC;IACtC,IAAI,EAAE,MAAM,CAAA;IACZ,0DAA0D;IAC1D,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI,CAAA;IAC3B,6CAA6C;IAC7C,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,mFAAmF;IACnF,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,iDAAiD;IACjD,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,wEAAwE;IACxE,MAAM,CAAC,EAAE,YAAY,CAAA;IACrB,wCAAwC;IACxC,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,mDAAmD;IACnD,YAAY,CAAC,EAAE,OAAO,CAAA;CACvB,CAAA;AAED,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,QAAQ,CAAA;IACd,mBAAmB,CAAC,EAAE,OAAO,CAAA;IAC7B,aAAa,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;IAC3B,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,WAAW,EAAE,kBAAkB,CAAA;IAC/B,gBAAgB,CAAC,EAAE,OAAO,CAAA;CAC3B,CAAC;;;;;;;cAYmB,MAAM;eAAS,MAAM,GAAG,IAAI;oBAAc,OAAO;;;;;;;;cAAjD,MAAM;eAAS,MAAM,GAAG,IAAI;oBAAc,OAAO;;;
|
|
1
|
+
{"version":3,"file":"RequestTableRow.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/request-block/components/RequestTableRow.vue"],"names":[],"mappings":"AAoRA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2EAA2E,CAAA;AACnH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8DAA8D,CAAA;AAchG,MAAM,MAAM,QAAQ,GAAG;IACrB,sCAAsC;IACtC,IAAI,EAAE,MAAM,CAAA;IACZ,0DAA0D;IAC1D,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI,CAAA;IAC3B,6CAA6C;IAC7C,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,mFAAmF;IACnF,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,iDAAiD;IACjD,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,wEAAwE;IACxE,MAAM,CAAC,EAAE,YAAY,CAAA;IACrB,wCAAwC;IACxC,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,mDAAmD;IACnD,YAAY,CAAC,EAAE,OAAO,CAAA;CACvB,CAAA;AAED,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,QAAQ,CAAA;IACd,mBAAmB,CAAC,EAAE,OAAO,CAAA;IAC7B,aAAa,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;IAC3B,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,WAAW,EAAE,kBAAkB,CAAA;IAC/B,gBAAgB,CAAC,EAAE,OAAO,CAAA;CAC3B,CAAC;;;;;;;cAYmB,MAAM;eAAS,MAAM,GAAG,IAAI;oBAAc,OAAO;;;;;;;;cAAjD,MAAM;eAAS,MAAM,GAAG,IAAI;oBAAc,OAAO;;;AAghBtE,wBAOG"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { canMethodHaveBody as p } from "@scalar/helpers/http/can-method-have-body";
|
|
2
2
|
import { getResolvedRef as n } from "@scalar/workspace-store/helpers/get-resolved-ref";
|
|
3
3
|
import { isElectron as u } from "../../../../libs/electron.js";
|
|
4
|
-
const i = "2.
|
|
4
|
+
const i = "2.20.0", m = "application/json", h = "*/*", c = (r, t, a) => ({
|
|
5
5
|
name: r,
|
|
6
6
|
defaultValue: t,
|
|
7
7
|
isOverridden: a.has(r.toLowerCase())
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ResponseBlock.vue.d.ts","sourceRoot":"","sources":["../../../../src/v2/blocks/response-block/ResponseBlock.vue"],"names":[],"mappings":"AA4RA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAA;AACvE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AAKvE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AAC3C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAA;AAWvD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;AAExD,KAAK,WAAW,GAAG;IACjB,4BAA4B;IAC5B,QAAQ,EAAE,gBAAgB,GAAG,IAAI,CAAA;IACjC,gCAAgC;IAChC,OAAO,EAAE,OAAO,GAAG,IAAI,CAAA;IACvB,oBAAoB;IACpB,MAAM,EAAE,YAAY,CAAA;IACpB,yCAAyC;IACzC,sBAAsB,EAAE,MAAM,CAAA;IAC9B,0BAA0B;IAC1B,UAAU,EAAE,MAAM,CAAA;IAClB,6BAA6B;IAC7B,OAAO,EAAE,YAAY,EAAE,CAAA;IACvB,gBAAgB;IAChB,MAAM,EAAE,UAAU,CAAC,OAAO,iBAAiB,CAAC,CAAA;IAC5C,QAAQ,EAAE,iBAAiB,CAAA;CAC5B,CAAC;AA4BF,QAAA,MAAM,gBAAgB,yCAA0C,CAAA;AAChE,KAAK,MAAM,GAAG,KAAK,GAAG,CAAC,OAAO,gBAAgB,CAAC,CAAC,MAAM,CAAC,CAAA;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"ResponseBlock.vue.d.ts","sourceRoot":"","sources":["../../../../src/v2/blocks/response-block/ResponseBlock.vue"],"names":[],"mappings":"AA4RA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAA;AACvE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AAKvE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AAC3C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAA;AAWvD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;AAExD,KAAK,WAAW,GAAG;IACjB,4BAA4B;IAC5B,QAAQ,EAAE,gBAAgB,GAAG,IAAI,CAAA;IACjC,gCAAgC;IAChC,OAAO,EAAE,OAAO,GAAG,IAAI,CAAA;IACvB,oBAAoB;IACpB,MAAM,EAAE,YAAY,CAAA;IACpB,yCAAyC;IACzC,sBAAsB,EAAE,MAAM,CAAA;IAC9B,0BAA0B;IAC1B,UAAU,EAAE,MAAM,CAAA;IAClB,6BAA6B;IAC7B,OAAO,EAAE,YAAY,EAAE,CAAA;IACvB,gBAAgB;IAChB,MAAM,EAAE,UAAU,CAAC,OAAO,iBAAiB,CAAC,CAAA;IAC5C,QAAQ,EAAE,iBAAiB,CAAA;CAC5B,CAAC;AA4BF,QAAA,MAAM,gBAAgB,yCAA0C,CAAA;AAChE,KAAK,MAAM,GAAG,KAAK,GAAG,CAAC,OAAO,gBAAgB,CAAC,CAAC,MAAM,CAAC,CAAA;;;;;;;;;;;;;;;;;;;;;;;AAiZvD,wBAQG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ResponseBodyPreview.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/response-block/components/ResponseBodyPreview.vue"],"names":[],"mappings":"AA6EA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAA;AAI1D,KAAK,WAAW,GAAG;IACjB,GAAG,EAAE,MAAM,CAAA;IACX,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,YAAY,CAAA;IAClB,KAAK,CAAC,EAAE,OAAO,GAAG,SAAS,CAAA;CAC5B,CAAC;;
|
|
1
|
+
{"version":3,"file":"ResponseBodyPreview.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/response-block/components/ResponseBodyPreview.vue"],"names":[],"mappings":"AA6EA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAA;AAI1D,KAAK,WAAW,GAAG;IACjB,GAAG,EAAE,MAAM,CAAA;IACX,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,YAAY,CAAA;IAClB,KAAK,CAAC,EAAE,OAAO,GAAG,SAAS,CAAA;CAC5B,CAAC;;AA0IF,wBAMG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ResponseBodyToggle.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/response-block/components/ResponseBodyToggle.vue"],"names":[],"mappings":"AA6BA,KAAK,WAAW,GAAG;IACjB,UAAU,EAAE,OAAO,CAAA;CACpB,CAAC;;;;;;
|
|
1
|
+
{"version":3,"file":"ResponseBodyToggle.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/response-block/components/ResponseBodyToggle.vue"],"names":[],"mappings":"AA6BA,KAAK,WAAW,GAAG;IACjB,UAAU,EAAE,OAAO,CAAA;CACpB,CAAC;;;;;;AAoEF,wBAOG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ResponseEmpty.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/response-block/components/ResponseEmpty.vue"],"names":[],"mappings":"AAmJA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,SAAS,CAAA;AAE3C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAA;AAEvD,KAAK,WAAW,GAAG;IACjB,oBAAoB;IACpB,MAAM,EAAE,YAAY,CAAA;IACpB,yCAAyC;IACzC,sBAAsB,EAAE,MAAM,CAAA;IAC9B,0BAA0B;IAC1B,UAAU,EAAE,MAAM,CAAA;IAClB,gBAAgB;IAChB,MAAM,EAAE,UAAU,CAAC,OAAO,iBAAiB,CAAC,CAAA;CAC7C,CAAC;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"ResponseEmpty.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/response-block/components/ResponseEmpty.vue"],"names":[],"mappings":"AAmJA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,SAAS,CAAA;AAE3C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAA;AAEvD,KAAK,WAAW,GAAG;IACjB,oBAAoB;IACpB,MAAM,EAAE,YAAY,CAAA;IACpB,yCAAyC;IACzC,sBAAsB,EAAE,MAAM,CAAA;IAC9B,0BAA0B;IAC1B,UAAU,EAAE,MAAM,CAAA;IAClB,gBAAgB;IAChB,MAAM,EAAE,UAAU,CAAC,OAAO,iBAAiB,CAAC,CAAA;CAC7C,CAAC;;;;;;;;;;AAiNF,wBAOG"}
|
|
@@ -28,9 +28,15 @@ declare const _default: import("vue").DefineComponent<__VLS_Props, {
|
|
|
28
28
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
29
29
|
execute: () => any;
|
|
30
30
|
"update:servers": () => any;
|
|
31
|
+
"select:history:item": (payload: {
|
|
32
|
+
index: number;
|
|
33
|
+
}) => any;
|
|
31
34
|
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
32
35
|
onExecute?: (() => any) | undefined;
|
|
33
36
|
"onUpdate:servers"?: (() => any) | undefined;
|
|
37
|
+
"onSelect:history:item"?: ((payload: {
|
|
38
|
+
index: number;
|
|
39
|
+
}) => any) | undefined;
|
|
34
40
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
35
41
|
export default _default;
|
|
36
42
|
//# sourceMappingURL=AddressBar.vue.d.ts.map
|