@scalar/api-client 2.38.1 → 2.38.3
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 +17 -0
- package/dist/AddressBar-CX8xiYoe.js +302 -0
- package/dist/AddressBar-CX8xiYoe.js.map +1 -0
- package/dist/App-BpNPKHmM.js +533 -0
- package/dist/App-BpNPKHmM.js.map +1 -0
- package/dist/App-Ckirvnv1.js +2510 -0
- package/dist/App-Ckirvnv1.js.map +1 -0
- package/dist/CodeInput-BN7uw3Bh.js +694 -0
- package/dist/CodeInput-BN7uw3Bh.js.map +1 -0
- package/dist/CodeSnippet-D7Heh1nd.js +218 -0
- package/dist/CodeSnippet-D7Heh1nd.js.map +1 -0
- package/dist/Collection-ChAxs3rz.js +219 -0
- package/dist/Collection-ChAxs3rz.js.map +1 -0
- package/dist/CollectionAuthentication-BDpvv8cA.js +56 -0
- package/dist/CollectionAuthentication-BDpvv8cA.js.map +1 -0
- package/dist/CollectionCookies-DyjPPMdt.js +19 -0
- package/dist/CollectionCookies-DyjPPMdt.js.map +1 -0
- package/dist/CollectionEnvironment-dwisJ-h5.js +514 -0
- package/dist/CollectionEnvironment-dwisJ-h5.js.map +1 -0
- package/dist/CollectionOverview-CJ9-Vmei.js +131 -0
- package/dist/CollectionOverview-CJ9-Vmei.js.map +1 -0
- package/dist/CollectionScripts-CMNlBlby.js +19 -0
- package/dist/CollectionScripts-CMNlBlby.js.map +1 -0
- package/dist/CollectionServers-BWkIGwz4.js +168 -0
- package/dist/CollectionServers-BWkIGwz4.js.map +1 -0
- package/dist/CollectionSettings-CqUUYOym.js +87 -0
- package/dist/CollectionSettings-CqUUYOym.js.map +1 -0
- package/dist/CollectionSync-CAflc5yW.js +19 -0
- package/dist/CollectionSync-CAflc5yW.js.map +1 -0
- package/dist/CommandActionInput-TkcAx6E8.js +97 -0
- package/dist/CommandActionInput-TkcAx6E8.js.map +1 -0
- package/dist/CommandPalette-BiA0IgO8.js +964 -0
- package/dist/CommandPalette-BiA0IgO8.js.map +1 -0
- package/dist/CommandPaletteImport-Diu5dDIY.js +622 -0
- package/dist/CommandPaletteImport-Diu5dDIY.js.map +1 -0
- package/dist/Cookies-CNRSxP8J.js +284 -0
- package/dist/Cookies-CNRSxP8J.js.map +1 -0
- package/dist/DataTable-BqbZKW3K.js +62 -0
- package/dist/DataTable-BqbZKW3K.js.map +1 -0
- package/dist/DataTableHeader-DJVB0jCZ.js +21 -0
- package/dist/DataTableHeader-DJVB0jCZ.js.map +1 -0
- package/dist/DataTableInput-SkIUPlrB.js +166 -0
- package/dist/DataTableInput-SkIUPlrB.js.map +1 -0
- package/dist/DataTableRow-c3XveEUO.js +57 -0
- package/dist/DataTableRow-c3XveEUO.js.map +1 -0
- package/dist/DeleteSidebarListElement-C-p87d03.js +78 -0
- package/dist/DeleteSidebarListElement-C-p87d03.js.map +1 -0
- package/dist/EditSidebarListElement-CodWPnM6.js +32 -0
- package/dist/EditSidebarListElement-CodWPnM6.js.map +1 -0
- package/dist/Editor-BomsGWHx.js +909 -0
- package/dist/Editor-BomsGWHx.js.map +1 -0
- package/dist/EmptyState-Cnm7hGW5.js +46 -0
- package/dist/EmptyState-Cnm7hGW5.js.map +1 -0
- package/dist/Environment-D_CbZk0A.js +416 -0
- package/dist/Environment-D_CbZk0A.js.map +1 -0
- package/dist/EnvironmentModal-CcyqnPc2.js +288 -0
- package/dist/EnvironmentModal-CcyqnPc2.js.map +1 -0
- package/dist/Form-bA4bV_oA.js +83 -0
- package/dist/Form-bA4bV_oA.js.map +1 -0
- package/dist/HttpMethod-rnWEgC3T.js +78 -0
- package/dist/HttpMethod-rnWEgC3T.js.map +1 -0
- package/dist/IconSelector-BDC_GQXv.js +67 -0
- package/dist/IconSelector-BDC_GQXv.js.map +1 -0
- package/dist/ImportCollection-BIYMxB9Q.js +804 -0
- package/dist/ImportCollection-BIYMxB9Q.js.map +1 -0
- package/dist/IntegrationLogo-B9EDW8db.js +51 -0
- package/dist/IntegrationLogo-B9EDW8db.js.map +1 -0
- package/dist/MainLayout-oMIJ5QXF.js +281 -0
- package/dist/MainLayout-oMIJ5QXF.js.map +1 -0
- package/dist/Modal-DkOa_KK0.js +67 -0
- package/dist/Modal-DkOa_KK0.js.map +1 -0
- package/dist/ModalClientContainer-qHsZi4wQ.js +65 -0
- package/dist/ModalClientContainer-qHsZi4wQ.js.map +1 -0
- package/dist/Request-BWfYWyBa.js +212 -0
- package/dist/Request-BWfYWyBa.js.map +1 -0
- package/dist/RequestAuth-BU6ubH-c.js +989 -0
- package/dist/RequestAuth-BU6ubH-c.js.map +1 -0
- package/dist/RequestRoot-7xhK5_qr.js +1611 -0
- package/dist/RequestRoot-7xhK5_qr.js.map +1 -0
- package/dist/RequestSection-Bx8UHW-k.js +1582 -0
- package/dist/RequestSection-Bx8UHW-k.js.map +1 -0
- package/dist/ResponseSection-CLrgLMN_.js +949 -0
- package/dist/ResponseSection-CLrgLMN_.js.map +1 -0
- package/dist/ScalarAsciiArt-BjuSnj8e.js +45 -0
- package/dist/ScalarAsciiArt-BjuSnj8e.js.map +1 -0
- package/dist/SectionFilter-hrtoRLwj.js +99 -0
- package/dist/SectionFilter-hrtoRLwj.js.map +1 -0
- package/dist/Server-BS4zjUdO.js +303 -0
- package/dist/Server-BS4zjUdO.js.map +1 -0
- package/dist/ServerVariablesForm-BRZ9XC8o.js +145 -0
- package/dist/ServerVariablesForm-BRZ9XC8o.js.map +1 -0
- package/dist/Settings-BuLKHzRY.js +347 -0
- package/dist/Settings-BuLKHzRY.js.map +1 -0
- package/dist/Sidebar-Xl9_nFXX.js +73 -0
- package/dist/Sidebar-Xl9_nFXX.js.map +1 -0
- package/dist/SidebarButton-BAagdMDe.js +37 -0
- package/dist/SidebarButton-BAagdMDe.js.map +1 -0
- package/dist/SidebarListElement-BfTPiihc.js +232 -0
- package/dist/SidebarListElement-BfTPiihc.js.map +1 -0
- package/dist/TheCommandPalette-Dl9TAeke.js +204 -0
- package/dist/TheCommandPalette-Dl9TAeke.js.map +1 -0
- package/dist/ValueEmitter-QYkZ9Hdc.js +20 -0
- package/dist/ValueEmitter-QYkZ9Hdc.js.map +1 -0
- package/dist/ViewLayout-BOXN0IYo.js +17 -0
- package/dist/ViewLayout-BOXN0IYo.js.map +1 -0
- package/dist/ViewLayoutCollapse-CiTb-Uml.js +86 -0
- package/dist/ViewLayoutCollapse-CiTb-Uml.js.map +1 -0
- package/dist/ViewLayoutContent-CvMoJYPF.js +13 -0
- package/dist/ViewLayoutContent-CvMoJYPF.js.map +1 -0
- package/dist/ViewLayoutSection-mUqKbQry.js +23 -0
- package/dist/ViewLayoutSection-mUqKbQry.js.map +1 -0
- package/dist/WatchModeToggle-D_eAiTWJ.js +41 -0
- package/dist/WatchModeToggle-D_eAiTWJ.js.map +1 -0
- package/dist/_plugin-vue_export-helper-BmmBcIzD.js +8 -0
- package/dist/analytics-BZimCWcw.js +7 -0
- package/dist/analytics-BZimCWcw.js.map +1 -0
- package/dist/build-request-security-BQjNr2MD.js +41 -0
- package/dist/build-request-security-BQjNr2MD.js.map +1 -0
- package/dist/code-input-iq-moLxi.js +775 -0
- package/dist/code-input-iq-moLxi.js.map +1 -0
- package/dist/components/AddressBar/AddressBar.vue.d.ts +1 -1
- package/dist/components/AddressBar/index.d.ts +1 -1
- package/dist/components/AddressBar/index.js +5 -4
- package/dist/components/CodeInput/CodeInput.vue.d.ts +1 -1
- package/dist/components/CodeInput/codeVariableWidget.d.ts +1 -1
- package/dist/components/CodeInput/index.d.ts +1 -1
- package/dist/components/CodeInput/index.js +2 -4
- package/dist/components/CommandPalette/index.d.ts +1 -1
- package/dist/components/CommandPalette/index.js +3 -4
- package/dist/components/DataTable/DataTableInput.vue.d.ts +2 -2
- package/dist/components/DataTable/index.d.ts +8 -8
- package/dist/components/DataTable/index.js +6 -18
- package/dist/components/Form/LabelInput.vue.d.ts +1 -1
- package/dist/components/HttpMethod/index.d.ts +1 -1
- package/dist/components/HttpMethod/index.js +2 -4
- package/dist/components/ImportCollection/index.d.ts +1 -1
- package/dist/components/ImportCollection/index.js +2 -4
- package/dist/components/ImportCollection/utils/import-collection.d.ts +1 -1
- package/dist/components/ImportCollection/utils/workspace-store-is-empty.d.ts +1 -1
- package/dist/components/Server/ServerVariablesForm.vue.d.ts +1 -1
- package/dist/components/Server/index.d.ts +3 -3
- package/dist/components/Server/index.js +3 -8
- package/dist/components/Sidebar/index.d.ts +1 -1
- package/dist/components/Sidebar/index.js +2 -4
- package/dist/components/ViewLayout/index.d.ts +1 -1
- package/dist/components/ViewLayout/index.js +2 -4
- package/dist/components/index.d.ts +3 -3
- package/dist/components/index.js +7 -8
- package/dist/components-ChixwQhN.js +61 -0
- package/dist/components-ChixwQhN.js.map +1 -0
- package/dist/components-DfJHvSLM.js +183 -0
- package/dist/components-DfJHvSLM.js.map +1 -0
- package/dist/computer-D7VW3Ruy.js +562 -0
- package/dist/computer-D7VW3Ruy.js.map +1 -0
- package/dist/consts-CyGRb9dl.js +318 -0
- package/dist/consts-CyGRb9dl.js.map +1 -0
- package/dist/curl-nbw1OxbV.js +54 -0
- package/dist/curl-nbw1OxbV.js.map +1 -0
- package/dist/data-table-PL7e8NRO.js +282 -0
- package/dist/data-table-PL7e8NRO.js.map +1 -0
- package/dist/editor-BZ_J0eze.js +466 -0
- package/dist/editor-BZ_J0eze.js.map +1 -0
- package/dist/environments-ByLK9lnC.js +592 -0
- package/dist/environments-ByLK9lnC.js.map +1 -0
- package/dist/formatters-DOGXZq9R.js +36 -0
- package/dist/formatters-DOGXZq9R.js.map +1 -0
- package/dist/forms-CZX6cFDS.js +42 -0
- package/dist/forms-CZX6cFDS.js.map +1 -0
- package/dist/get-active-environment-CkxyQ1dM.js +19 -0
- package/dist/get-active-environment-CkxyQ1dM.js.map +1 -0
- package/dist/get-resolved-url-SybDPV0U.js +85 -0
- package/dist/get-resolved-url-SybDPV0U.js.map +1 -0
- package/dist/get-server-url-UVN-dx79.js +32 -0
- package/dist/get-server-url-UVN-dx79.js.map +1 -0
- package/dist/get-servers-B_WNlQWB.js +106 -0
- package/dist/get-servers-B_WNlQWB.js.map +1 -0
- package/dist/get-snippet-DBRUSfZ2.js +39 -0
- package/dist/get-snippet-DBRUSfZ2.js.map +1 -0
- package/dist/global-cookies-D3ZS9ON3.js +184 -0
- package/dist/global-cookies-D3ZS9ON3.js.map +1 -0
- package/dist/hooks/index.d.ts +4 -4
- package/dist/hooks/index.js +3 -11
- package/dist/hooks/useSidebar.d.ts +1 -1
- package/dist/hooks-BvZxH4XB.js +80 -0
- package/dist/hooks-BvZxH4XB.js.map +1 -0
- package/dist/index.d.ts +3 -3
- package/dist/index.js +8 -12
- package/dist/layout-BWiL7dfb.js +81 -0
- package/dist/layout-BWiL7dfb.js.map +1 -0
- package/dist/layouts/App/create-api-client-app.d.ts +9 -9
- package/dist/layouts/App/index.d.ts +2 -2
- package/dist/layouts/App/index.js +5 -7
- package/dist/layouts/Modal/create-api-client-modal.d.ts +1 -1
- package/dist/layouts/Modal/index.d.ts +2 -2
- package/dist/layouts/Modal/index.js +3 -4
- package/dist/layouts/Web/create-api-client-web.d.ts +9 -9
- package/dist/layouts/Web/index.d.ts +2 -2
- package/dist/layouts/Web/index.js +101 -6
- package/dist/layouts/Web/index.js.map +1 -0
- package/dist/libs/create-client.d.ts +9 -9
- package/dist/libs/create-client.d.ts.map +1 -1
- package/dist/libs/environment-parser.d.ts +1 -1
- package/dist/libs/get-request-uid-by-path-method.d.ts +1 -1
- package/dist/libs/hot-keys.d.ts +1 -1
- package/dist/libs/importers/index.d.ts +1 -1
- package/dist/libs/importers/index.js +2 -4
- package/dist/libs/index.d.ts +15 -15
- package/dist/libs/index.js +6 -45
- package/dist/libs/local-storage.d.ts +1 -1
- package/dist/libs/send-request/create-request-operation.d.ts +3 -3
- package/dist/libs/send-request/index.d.ts +3 -3
- package/dist/libs/send-request/index.js +3 -8
- package/dist/libs-spbv4P0g.js +249 -0
- package/dist/libs-spbv4P0g.js.map +1 -0
- package/dist/monacoeditorwork/json.worker.bundle.js +8 -8
- package/dist/monacoeditorwork/yaml.worker.bundle.js +151 -151
- package/dist/operation-block-DE-hoO03.js +1674 -0
- package/dist/operation-block-DE-hoO03.js.map +1 -0
- package/dist/operation-code-sample-xgx4qi2H.js +1738 -0
- package/dist/operation-code-sample-xgx4qi2H.js.map +1 -0
- package/dist/parse-curl-BtypQT3D.js +106 -0
- package/dist/parse-curl-BtypQT3D.js.map +1 -0
- package/dist/plugins/hooks/usePluginManager.d.ts +1 -1
- package/dist/plugins/index.d.ts +2 -2
- package/dist/plugins/index.js +2 -7
- package/dist/plugins/plugin-manager.d.ts +10 -4
- package/dist/plugins/plugin-manager.d.ts.map +1 -1
- package/dist/plugins-B52hCIyZ.js +50 -0
- package/dist/plugins-B52hCIyZ.js.map +1 -0
- package/dist/rabbitjump-CMZXAR6d.js +9 -0
- package/dist/rabbitjump-CMZXAR6d.js.map +1 -0
- package/dist/request-block-N7dPFyrG.js +1466 -0
- package/dist/request-block-N7dPFyrG.js.map +1 -0
- package/dist/resize-D2IYvVdh.js +114 -0
- package/dist/resize-D2IYvVdh.js.map +1 -0
- package/dist/response-block-DmkaDZYs.js +1188 -0
- package/dist/response-block-DmkaDZYs.js.map +1 -0
- package/dist/scalar-address-bar-block-BbysOhkE.js +425 -0
- package/dist/scalar-address-bar-block-BbysOhkE.js.map +1 -0
- package/dist/scalar-auth-selector-block-Bs79QOMA.js +1889 -0
- package/dist/scalar-auth-selector-block-Bs79QOMA.js.map +1 -0
- package/dist/search-CmsQQkjn.js +151 -0
- package/dist/search-CmsQQkjn.js.map +1 -0
- package/dist/send-request-BsTfRiBC.js +348 -0
- package/dist/send-request-BsTfRiBC.js.map +1 -0
- package/dist/server-tcI-OCyx.js +140 -0
- package/dist/server-tcI-OCyx.js.map +1 -0
- package/dist/set-request-cookies-BJJhsU4A.js +88 -0
- package/dist/set-request-cookies-BJJhsU4A.js.map +1 -0
- package/dist/settings-BKk_1lcH.js +455 -0
- package/dist/settings-BKk_1lcH.js.map +1 -0
- package/dist/sidebar-ceSbYmnt.js +217 -0
- package/dist/sidebar-ceSbYmnt.js.map +1 -0
- package/dist/store/collections.d.ts +1 -1
- package/dist/store/environment.d.ts +1 -1
- package/dist/store/events.d.ts +8 -8
- package/dist/store/import-spec.d.ts +2 -2
- package/dist/store/index.d.ts +2 -2
- package/dist/store/index.js +2 -10
- package/dist/store/request-example.d.ts +1 -1
- package/dist/store/requests.d.ts +1 -1
- package/dist/store/security-schemes.d.ts +1 -1
- package/dist/store/servers.d.ts +1 -1
- package/dist/store/store.d.ts +7 -7
- package/dist/store/tags.d.ts +1 -1
- package/dist/store/workspace.d.ts +1 -1
- package/dist/store-DaPoVtIS.js +1512 -0
- package/dist/store-DaPoVtIS.js.map +1 -0
- package/dist/string-template-sS5PtY6T.js +64 -0
- package/dist/string-template-sS5PtY6T.js.map +1 -0
- package/dist/style.css +10372 -1
- package/dist/types/index.js +0 -1
- package/dist/use-global-hot-keys-D8Ai8Qbm.js +274 -0
- package/dist/use-global-hot-keys-D8Ai8Qbm.js.map +1 -0
- package/dist/useSidebar-DLTwHDI-.js +45 -0
- package/dist/useSidebar-DLTwHDI-.js.map +1 -0
- package/dist/v2/blocks/operation-block/OperationBlock.vue.d.ts +3 -3
- package/dist/v2/blocks/operation-block/OperationBlock.vue.d.ts.map +1 -1
- package/dist/v2/blocks/operation-block/components/Header.vue.d.ts +2 -2
- package/dist/v2/blocks/operation-block/helpers/apply-allow-reserved-to-url.d.ts +6 -0
- package/dist/v2/blocks/operation-block/helpers/apply-allow-reserved-to-url.d.ts.map +1 -0
- package/dist/v2/blocks/operation-block/helpers/build-request-body.d.ts.map +1 -1
- package/dist/v2/blocks/operation-block/helpers/build-request-parameters.d.ts +1 -0
- package/dist/v2/blocks/operation-block/helpers/build-request-parameters.d.ts.map +1 -1
- package/dist/v2/blocks/operation-block/helpers/build-request-security.d.ts +2 -2
- package/dist/v2/blocks/operation-block/helpers/build-request.d.ts +2 -2
- package/dist/v2/blocks/operation-block/helpers/build-request.d.ts.map +1 -1
- package/dist/v2/blocks/operation-block/helpers/get-resolved-url.d.ts +2 -1
- package/dist/v2/blocks/operation-block/helpers/get-resolved-url.d.ts.map +1 -1
- package/dist/v2/blocks/operation-block/helpers/har-to-fetch-response.d.ts +1 -1
- package/dist/v2/blocks/operation-block/helpers/send-request.d.ts +1 -1
- package/dist/v2/blocks/operation-block/index.d.ts +4 -4
- package/dist/v2/blocks/operation-block/index.js +20 -11
- package/dist/v2/blocks/operation-code-sample/components/OperationCodeSample.vue.d.ts +2 -2
- package/dist/v2/blocks/operation-code-sample/helpers/find-client.d.ts +1 -1
- package/dist/v2/blocks/operation-code-sample/helpers/generate-client-options.d.ts +1 -1
- package/dist/v2/blocks/operation-code-sample/helpers/generate-code-snippet.d.ts +2 -2
- package/dist/v2/blocks/operation-code-sample/helpers/get-clients.d.ts +2 -2
- package/dist/v2/blocks/operation-code-sample/helpers/get-secrets.d.ts +1 -1
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/operation-to-har.d.ts +1 -1
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-body.d.ts +1 -1
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-body.d.ts.map +1 -1
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-security-schemes.d.ts +1 -1
- package/dist/v2/blocks/operation-code-sample/index.d.ts +6 -6
- package/dist/v2/blocks/operation-code-sample/index.js +2 -16
- package/dist/v2/blocks/request-block/RequestBlock.vue.d.ts +4 -4
- package/dist/v2/blocks/request-block/components/RequestCodeSnippet.vue.d.ts +1 -1
- package/dist/v2/blocks/request-block/components/RequestParams.vue.d.ts +1 -1
- package/dist/v2/blocks/request-block/components/RequestTable.vue.d.ts +1 -1
- package/dist/v2/blocks/request-block/helpers/create-parameter-handlers.d.ts +1 -1
- package/dist/v2/blocks/request-block/helpers/get-default-headers.d.ts +3 -2
- package/dist/v2/blocks/request-block/helpers/get-default-headers.d.ts.map +1 -1
- package/dist/v2/blocks/request-block/helpers/get-form-body-rows.d.ts +1 -1
- package/dist/v2/blocks/request-block/index.d.ts +1 -1
- package/dist/v2/blocks/request-block/index.js +9 -4
- package/dist/v2/blocks/response-block/ResponseBlock.vue.d.ts +1 -1
- package/dist/v2/blocks/response-block/components/ResponseBodyPreview.vue.d.ts +1 -1
- package/dist/v2/blocks/response-block/components/ResponseEmpty.vue.d.ts +1 -1
- package/dist/v2/blocks/response-block/index.d.ts +1 -1
- package/dist/v2/blocks/response-block/index.js +6 -4
- package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.d.ts +2 -2
- package/dist/v2/blocks/scalar-address-bar-block/index.d.ts +2 -2
- package/dist/v2/blocks/scalar-address-bar-block/index.js +5 -4
- package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.d.ts +3 -3
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.d.ts +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue.d.ts +2 -2
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTableInput.vue.d.ts +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.d.ts +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/extract-security-scheme-secrets.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/fetch-openid-connect-discovery.d.ts +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth.d.ts +2 -2
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/openid-discovery-to-flows.d.ts +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/security-scheme.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/index.d.ts +4 -4
- package/dist/v2/blocks/scalar-auth-selector-block/index.js +6 -8
- package/dist/v2/components/code-input/CodeInput.vue.d.ts +1 -1
- package/dist/v2/components/code-input/index.d.ts +1 -1
- package/dist/v2/components/code-input/index.js +2 -4
- package/dist/v2/components/data-table/DataTableInput.vue.d.ts +1 -1
- package/dist/v2/components/data-table/DataTableInputSelect.vue.d.ts +1 -1
- package/dist/v2/components/data-table/index.d.ts +8 -8
- package/dist/v2/components/data-table/index.js +3 -18
- package/dist/v2/components/forms/index.d.ts +1 -1
- package/dist/v2/components/forms/index.js +2 -4
- package/dist/v2/components/layout/index.d.ts +1 -1
- package/dist/v2/components/layout/index.js +2 -4
- package/dist/v2/components/modals/index.d.ts +1 -1
- package/dist/v2/components/modals/index.js +37 -3
- package/dist/v2/components/modals/index.js.map +1 -0
- package/dist/v2/components/resize/index.d.ts +2 -2
- package/dist/v2/components/resize/index.js +2 -6
- package/dist/v2/components/server/ServerDropdown.vue.d.ts +1 -1
- package/dist/v2/components/server/index.d.ts +1 -1
- package/dist/v2/components/server/index.js +2 -4
- package/dist/v2/components/sidebar/Sidebar.vue.d.ts +1 -1
- package/dist/v2/components/sidebar/index.d.ts +3 -3
- package/dist/v2/components/sidebar/index.js +3 -8
- package/dist/v2/constants.d.ts +3 -0
- package/dist/v2/constants.d.ts.map +1 -0
- package/dist/v2/features/app/App.vue.d.ts +4 -4
- package/dist/v2/features/app/components/AppSidebar.vue.d.ts +1 -1
- package/dist/v2/features/app/components/index.d.ts +1 -1
- package/dist/v2/features/app/components/index.js +10 -5
- package/dist/v2/features/app/helpers/create-api-client-app.d.ts +3 -3
- package/dist/v2/features/app/helpers/get-route-param.d.ts +1 -1
- package/dist/v2/features/app/helpers/routes.d.ts +5 -5
- package/dist/v2/features/app/hooks/use-theme.d.ts +1 -1
- package/dist/v2/features/app/index.d.ts +8 -8
- package/dist/v2/features/app/index.js +3161 -19
- package/dist/v2/features/app/index.js.map +1 -0
- package/dist/v2/features/collection/DocumentCollection.vue.d.ts +1 -1
- package/dist/v2/features/collection/OperationCollection.vue.d.ts +1 -1
- package/dist/v2/features/collection/WorkspaceCollection.vue.d.ts +1 -1
- package/dist/v2/features/collection/components/Authentication.vue.d.ts +4 -4
- package/dist/v2/features/collection/components/Authentication.vue.d.ts.map +1 -1
- package/dist/v2/features/collection/components/Cookies.vue.d.ts +4 -4
- package/dist/v2/features/collection/components/Editor/Editor.vue.d.ts +4 -4
- package/dist/v2/features/collection/components/Editor/index.d.ts +1 -1
- package/dist/v2/features/collection/components/Editor/index.js +2 -4
- package/dist/v2/features/collection/components/Environment.vue.d.ts +4 -4
- package/dist/v2/features/collection/components/Overview.vue.d.ts +4 -4
- package/dist/v2/features/collection/components/Servers.vue.d.ts +4 -4
- package/dist/v2/features/collection/components/Settings.vue.d.ts +4 -4
- package/dist/v2/features/collection/components/Tabs.vue.d.ts +1 -1
- package/dist/v2/features/command-palette/TheCommandPalette.vue.d.ts +1 -1
- package/dist/v2/features/command-palette/hooks/use-command-palette-state.d.ts +10 -45
- package/dist/v2/features/command-palette/hooks/use-command-palette-state.d.ts.map +1 -1
- package/dist/v2/features/command-palette/index.d.ts +2 -2
- package/dist/v2/features/command-palette/index.js +3 -6
- package/dist/v2/features/editor/helpers/json/create-json-model.d.ts +1 -1
- package/dist/v2/features/editor/helpers/json/get-json-ast-node-from-path.d.ts +1 -1
- package/dist/v2/features/editor/helpers/json/json-pointer-path.d.ts +1 -1
- package/dist/v2/features/editor/helpers/yaml/create-yaml-model.d.ts +1 -1
- package/dist/v2/features/editor/helpers/yaml/get-yaml-node-range-from-path.d.ts +1 -1
- package/dist/v2/features/editor/hooks/use-editor.d.ts +1 -1
- package/dist/v2/features/editor/hooks/use-json-pointer-link-support.d.ts +1 -1
- package/dist/v2/features/editor/index.d.ts +4 -4
- package/dist/v2/features/editor/index.js +2 -10
- package/dist/v2/features/environments/index.d.ts +1 -1
- package/dist/v2/features/environments/index.js +4 -4
- package/dist/v2/features/global-cookies/index.d.ts +1 -1
- package/dist/v2/features/global-cookies/index.js +4 -4
- package/dist/v2/features/modal/Modal.vue.d.ts +1 -1
- package/dist/v2/features/modal/helpers/create-api-client-modal.d.ts +2 -2
- package/dist/v2/features/modal/hooks/use-modal-sidebar.d.ts +1 -1
- package/dist/v2/features/modal/index.d.ts +3 -3
- package/dist/v2/features/modal/index.js +639 -7
- package/dist/v2/features/modal/index.js.map +1 -0
- package/dist/v2/features/modal/modal-events.d.ts +1 -1
- package/dist/v2/features/operation/Operation.vue.d.ts +2 -2
- package/dist/v2/features/operation/Operation.vue.d.ts.map +1 -1
- package/dist/v2/features/operation/helpers/get-selected-security.d.ts +6 -1
- package/dist/v2/features/operation/helpers/get-selected-security.d.ts.map +1 -1
- package/dist/v2/features/operation/index.d.ts +5 -5
- package/dist/v2/features/operation/index.js +19 -12
- package/dist/v2/features/search/helpers/create-fuse-instance.d.ts +1 -1
- package/dist/v2/features/search/helpers/create-search-index.d.ts +1 -1
- package/dist/v2/features/search/index.d.ts +1 -1
- package/dist/v2/features/search/index.js +2 -4
- package/dist/v2/features/settings/index.d.ts +2 -2
- package/dist/v2/features/settings/index.js +2 -6
- package/dist/v2/helpers/get-active-proxy-url.d.ts +1 -1
- package/dist/v2/helpers/get-tab-details.d.ts +1 -1
- package/dist/v2/helpers/handle-hotkeys.d.ts +1 -1
- package/dist/v2/helpers/index.d.ts +2 -2
- package/dist/v2/helpers/index.js +3 -6
- package/dist/v2/hooks/use-global-hot-keys.d.ts +1 -1
- package/dist/views/Collection/components/EnvironmentForm.vue.d.ts +1 -1
- package/dist/views/Collection/components/MarkdownInput.vue.d.ts +1 -1
- package/dist/views/Components/CodeSnippet/CodeSnippet.vue.d.ts +1 -1
- package/dist/views/Components/CodeSnippet/helpers/get-har-request.d.ts +1 -1
- package/dist/views/Components/CodeSnippet/helpers/get-snippet.d.ts +1 -1
- package/dist/views/Components/CodeSnippet/index.d.ts +4 -4
- package/dist/views/Components/CodeSnippet/index.js +3 -10
- package/dist/views/Environment/EnvironmentVariableDropdown.vue.d.ts +1 -1
- package/dist/views/Environment/handle-drag.d.ts +1 -1
- package/dist/views/Request/Request.vue.d.ts +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.d.ts +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/OAuthScopesInput.vue.d.ts +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.d.ts +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue.d.ts +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTableInput.vue.d.ts +2 -2
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthTab.vue.d.ts +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/helpers/restore-auth-from-local-storage.d.ts +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/index.d.ts +3 -3
- package/dist/views/Request/RequestSection/RequestAuth/index.js +4 -8
- package/dist/views/Request/RequestSection/RequestBody.vue.d.ts +1 -1
- package/dist/views/Request/RequestSection/RequestCodeExample.vue.d.ts +1 -1
- package/dist/views/Request/RequestSection/RequestParams.vue.d.ts +1 -1
- package/dist/views/Request/RequestSection/RequestPathParams.vue.d.ts +1 -1
- package/dist/views/Request/RequestSection/RequestSection.vue.d.ts +1 -1
- package/dist/views/Request/RequestSection/RequestTable.vue.d.ts +1 -1
- package/dist/views/Request/RequestSection/helpers/update-scheme.d.ts +1 -1
- package/dist/views/Request/RequestSection/index.d.ts +2 -2
- package/dist/views/Request/RequestSection/index.js +42 -5
- package/dist/views/Request/RequestSection/index.js.map +1 -0
- package/dist/views/Request/RequestSidebarItem.vue.d.ts +1 -1
- package/dist/views/Request/RequestSidebarItemMenu.vue.d.ts +3 -3
- package/dist/views/Request/RequestSubpageHeader.vue.d.ts +1 -1
- package/dist/views/Request/ResponseSection/ResponseBodyPreview.vue.d.ts +1 -1
- package/dist/views/Request/ResponseSection/ResponseSection.vue.d.ts +1 -1
- package/dist/views/Request/ResponseSection/index.d.ts +2 -2
- package/dist/views/Request/ResponseSection/index.js +7 -6
- package/dist/views/Request/components/index.d.ts +1 -1
- package/dist/views/Request/components/index.js +2 -4
- package/dist/views/Request/consts/index.d.ts +2 -2
- package/dist/views/Request/consts/index.js +2 -10
- package/dist/views/Request/handle-drag.d.ts +2 -2
- package/dist/views/Request/libs/auth.d.ts +1 -1
- package/dist/views/Request/libs/index.d.ts +3 -3
- package/dist/views/Request/libs/index.js +3 -22
- package/dist/views/Request/libs/oauth2.d.ts +1 -1
- package/dist/views/Request/libs/watch-mode.d.ts +2 -2
- package/dist/views/Request/types/index.js +0 -1
- package/dist/watch-mode-Dbaqd9bG.js +375 -0
- package/dist/watch-mode-Dbaqd9bG.js.map +1 -0
- package/package.json +29 -33
- package/dist/_virtual/_plugin-vue_export-helper.js +0 -9
- package/dist/analytics.js +0 -9
- package/dist/assets/computer.ascii.js +0 -34
- package/dist/assets/keycap.ascii.js +0 -25
- package/dist/assets/rabbit.ascii.js +0 -11
- package/dist/assets/rabbitjump.ascii.js +0 -11
- package/dist/components/AddressBar/AddressBar.vue.js +0 -7
- package/dist/components/AddressBar/AddressBar.vue2.js +0 -160
- package/dist/components/AddressBar/AddressBarHistory.vue.js +0 -7
- package/dist/components/AddressBar/AddressBarHistory.vue2.js +0 -98
- package/dist/components/AddressBar/httpStatusCodeColors.js +0 -38
- package/dist/components/CodeInput/CodeInput.vue.js +0 -8
- package/dist/components/CodeInput/CodeInput.vue2.js +0 -209
- package/dist/components/CodeInput/codeVariableWidget.js +0 -111
- package/dist/components/CommandPalette/CommandActionForm.vue.js +0 -44
- package/dist/components/CommandPalette/CommandActionForm.vue2.js +0 -4
- package/dist/components/CommandPalette/CommandActionInput.vue.js +0 -52
- package/dist/components/CommandPalette/CommandActionInput.vue2.js +0 -4
- package/dist/components/CommandPalette/CommandPaletteCollection.vue.js +0 -80
- package/dist/components/CommandPalette/CommandPaletteCollection.vue2.js +0 -4
- package/dist/components/CommandPalette/CommandPaletteExample.vue.js +0 -116
- package/dist/components/CommandPalette/CommandPaletteExample.vue2.js +0 -4
- package/dist/components/CommandPalette/CommandPaletteImport.vue.js +0 -217
- package/dist/components/CommandPalette/CommandPaletteImport.vue2.js +0 -4
- package/dist/components/CommandPalette/CommandPaletteImportCurl.vue.js +0 -7
- package/dist/components/CommandPalette/CommandPaletteImportCurl.vue2.js +0 -136
- package/dist/components/CommandPalette/CommandPaletteServer.vue.js +0 -123
- package/dist/components/CommandPalette/CommandPaletteServer.vue2.js +0 -4
- package/dist/components/CommandPalette/CommandPaletteTag.vue.js +0 -84
- package/dist/components/CommandPalette/CommandPaletteTag.vue2.js +0 -4
- package/dist/components/CommandPalette/CommandPaletteWorkspace.vue.js +0 -48
- package/dist/components/CommandPalette/CommandPaletteWorkspace.vue2.js +0 -4
- package/dist/components/CommandPalette/TheCommandPalette.vue.js +0 -7
- package/dist/components/CommandPalette/TheCommandPalette.vue2.js +0 -305
- package/dist/components/CommandPalette/WatchModeToggle.vue.js +0 -39
- package/dist/components/CommandPalette/WatchModeToggle.vue2.js +0 -4
- package/dist/components/DataTable/DataTable.vue.js +0 -38
- package/dist/components/DataTable/DataTable.vue2.js +0 -4
- package/dist/components/DataTable/DataTableCell.vue.js +0 -26
- package/dist/components/DataTable/DataTableCell.vue2.js +0 -4
- package/dist/components/DataTable/DataTableCheckbox.vue.js +0 -53
- package/dist/components/DataTable/DataTableCheckbox.vue2.js +0 -4
- package/dist/components/DataTable/DataTableHeader.vue.js +0 -18
- package/dist/components/DataTable/DataTableHeader.vue2.js +0 -4
- package/dist/components/DataTable/DataTableInput.vue.js +0 -7
- package/dist/components/DataTable/DataTableInput.vue2.js +0 -124
- package/dist/components/DataTable/DataTableInputSelect.vue.js +0 -146
- package/dist/components/DataTable/DataTableInputSelect.vue2.js +0 -4
- package/dist/components/DataTable/DataTableRow.vue.js +0 -12
- package/dist/components/DataTable/DataTableText.vue.js +0 -23
- package/dist/components/DataTable/DataTableText.vue2.js +0 -4
- package/dist/components/EmptyState.vue.js +0 -7
- package/dist/components/EmptyState.vue2.js +0 -42
- package/dist/components/EnvironmentSelector/EnvironmentSelector.vue.js +0 -113
- package/dist/components/EnvironmentSelector/EnvironmentSelector.vue2.js +0 -4
- package/dist/components/Form/Form.vue.js +0 -83
- package/dist/components/Form/Form.vue2.js +0 -4
- package/dist/components/Form/LabelInput.vue.js +0 -7
- package/dist/components/Form/LabelInput.vue2.js +0 -42
- package/dist/components/HelpfulLink.vue.js +0 -20
- package/dist/components/HelpfulLink.vue2.js +0 -4
- package/dist/components/HttpMethod/HttpMethod.vue.js +0 -7
- package/dist/components/HttpMethod/HttpMethod.vue2.js +0 -62
- package/dist/components/IconSelector.vue.js +0 -75
- package/dist/components/IconSelector.vue2.js +0 -4
- package/dist/components/ImportCollection/DropEventListener.vue.js +0 -81
- package/dist/components/ImportCollection/DropEventListener.vue2.js +0 -4
- package/dist/components/ImportCollection/ImportCollectionListener.vue.js +0 -77
- package/dist/components/ImportCollection/ImportCollectionListener.vue2.js +0 -4
- package/dist/components/ImportCollection/ImportCollectionModal.vue.js +0 -208
- package/dist/components/ImportCollection/ImportCollectionModal.vue3.js +0 -5
- package/dist/components/ImportCollection/ImportNowButton.vue.js +0 -73
- package/dist/components/ImportCollection/ImportNowButton.vue2.js +0 -4
- package/dist/components/ImportCollection/IntegrationLogo.vue.js +0 -44
- package/dist/components/ImportCollection/IntegrationLogo.vue2.js +0 -4
- package/dist/components/ImportCollection/PasteEventListener.vue.js +0 -24
- package/dist/components/ImportCollection/PasteEventListener.vue2.js +0 -4
- package/dist/components/ImportCollection/PrefetchError.vue.js +0 -27
- package/dist/components/ImportCollection/PrefetchError.vue2.js +0 -4
- package/dist/components/ImportCollection/UrlQueryParameterChecker.vue.js +0 -20
- package/dist/components/ImportCollection/UrlQueryParameterChecker.vue2.js +0 -4
- package/dist/components/ImportCollection/WorkspaceSelector.vue.js +0 -134
- package/dist/components/ImportCollection/WorkspaceSelector.vue2.js +0 -4
- package/dist/components/ImportCollection/hooks/useUrlPrefetcher.js +0 -106
- package/dist/components/ImportCollection/utils/get-openapi-version.js +0 -20
- package/dist/components/ImportCollection/utils/import-collection.js +0 -29
- package/dist/components/ImportCollection/utils/is-document.js +0 -9
- package/dist/components/ImportCollection/utils/is-url.js +0 -9
- package/dist/components/ImportCollection/utils/workspace-store-is-empty.js +0 -7
- package/dist/components/OpenApiClientButton.vue.js +0 -7
- package/dist/components/OpenApiClientButton.vue2.js +0 -48
- package/dist/components/ScalarAsciiArt.vue.js +0 -7
- package/dist/components/ScalarAsciiArt.vue2.js +0 -37
- package/dist/components/Search/useSearch.js +0 -78
- package/dist/components/SectionFilter.vue.js +0 -7
- package/dist/components/SectionFilter.vue2.js +0 -64
- package/dist/components/SectionFilterButton.vue.js +0 -23
- package/dist/components/SectionFilterButton.vue2.js +0 -4
- package/dist/components/Server/ServerDropdown.vue.js +0 -132
- package/dist/components/Server/ServerDropdown.vue2.js +0 -4
- package/dist/components/Server/ServerDropdownItem.vue.js +0 -7
- package/dist/components/Server/ServerDropdownItem.vue2.js +0 -84
- package/dist/components/Server/ServerSelector.vue.js +0 -82
- package/dist/components/Server/ServerSelector.vue2.js +0 -4
- package/dist/components/Server/ServerVariablesForm.vue.js +0 -49
- package/dist/components/Server/ServerVariablesForm.vue2.js +0 -4
- package/dist/components/Server/ServerVariablesSelect.vue.js +0 -54
- package/dist/components/Server/ServerVariablesSelect.vue2.js +0 -4
- package/dist/components/Server/ServerVariablesTextbox.vue.js +0 -29
- package/dist/components/Server/ServerVariablesTextbox.vue2.js +0 -4
- package/dist/components/SideNav/DownloadAppButton.vue.js +0 -7
- package/dist/components/SideNav/DownloadAppButton.vue2.js +0 -33
- package/dist/components/SideNav/SideHelp.vue.js +0 -127
- package/dist/components/SideNav/SideHelp.vue2.js +0 -4
- package/dist/components/SideNav/SideNav.vue.js +0 -96
- package/dist/components/SideNav/SideNav.vue2.js +0 -4
- package/dist/components/SideNav/SideNavGroup.vue.js +0 -16
- package/dist/components/SideNav/SideNavGroup.vue2.js +0 -4
- package/dist/components/SideNav/SideNavLink.vue.js +0 -39
- package/dist/components/SideNav/SideNavLink.vue2.js +0 -4
- package/dist/components/SideNav/SideNavRouterLink.vue.js +0 -27
- package/dist/components/SideNav/SideNavRouterLink.vue2.js +0 -4
- package/dist/components/Sidebar/Actions/DeleteSidebarListElement.vue.js +0 -30
- package/dist/components/Sidebar/Actions/DeleteSidebarListElement.vue2.js +0 -4
- package/dist/components/Sidebar/Actions/EditSidebarListCollection.vue.js +0 -58
- package/dist/components/Sidebar/Actions/EditSidebarListCollection.vue2.js +0 -4
- package/dist/components/Sidebar/Actions/EditSidebarListElement.vue.js +0 -29
- package/dist/components/Sidebar/Actions/EditSidebarListElement.vue2.js +0 -4
- package/dist/components/Sidebar/Actions/SidebarListElementForm.vue.js +0 -46
- package/dist/components/Sidebar/Actions/SidebarListElementForm.vue2.js +0 -4
- package/dist/components/Sidebar/Sidebar.vue.js +0 -7
- package/dist/components/Sidebar/Sidebar.vue2.js +0 -63
- package/dist/components/Sidebar/SidebarButton.vue.js +0 -33
- package/dist/components/Sidebar/SidebarButton.vue2.js +0 -4
- package/dist/components/Sidebar/SidebarList.vue.js +0 -12
- package/dist/components/Sidebar/SidebarListElement.vue.js +0 -8
- package/dist/components/Sidebar/SidebarListElement.vue2.js +0 -94
- package/dist/components/Sidebar/SidebarListElementActions.vue.js +0 -86
- package/dist/components/Sidebar/SidebarListElementActions.vue2.js +0 -4
- package/dist/components/Sidebar/SidebarToggle.vue.js +0 -49
- package/dist/components/Sidebar/SidebarToggle.vue2.js +0 -4
- package/dist/components/TopNav/TopNav.vue.js +0 -210
- package/dist/components/TopNav/TopNav.vue2.js +0 -4
- package/dist/components/TopNav/TopNavItem.vue.js +0 -7
- package/dist/components/TopNav/TopNavItem.vue2.js +0 -138
- package/dist/components/ViewLayout/ViewLayout.vue.js +0 -18
- package/dist/components/ViewLayout/ViewLayout.vue2.js +0 -4
- package/dist/components/ViewLayout/ViewLayoutCollapse.vue.js +0 -92
- package/dist/components/ViewLayout/ViewLayoutCollapse.vue2.js +0 -4
- package/dist/components/ViewLayout/ViewLayoutContent.vue.js +0 -12
- package/dist/components/ViewLayout/ViewLayoutSection.vue.js +0 -23
- package/dist/components/ViewLayout/ViewLayoutSection.vue2.js +0 -4
- package/dist/constants.js +0 -40
- package/dist/data/httpHeaders.js +0 -537
- package/dist/hooks/useAnalytics.js +0 -11
- package/dist/hooks/useClientConfig.js +0 -7
- package/dist/hooks/useFileDialog.js +0 -21
- package/dist/hooks/useLayout.js +0 -8
- package/dist/hooks/useResponseBody.js +0 -20
- package/dist/hooks/useSidebar.js +0 -28
- package/dist/layouts/App/ApiClientApp.vue.js +0 -70
- package/dist/layouts/App/ApiClientApp.vue3.js +0 -5
- package/dist/layouts/App/MainLayout.vue.js +0 -26
- package/dist/layouts/App/MainLayout.vue2.js +0 -4
- package/dist/layouts/App/create-api-client-app.js +0 -35
- package/dist/layouts/App/hotkeys.js +0 -21
- package/dist/layouts/Modal/ApiClientModal.vue.js +0 -30
- package/dist/layouts/Modal/ApiClientModal.vue2.js +0 -4
- package/dist/layouts/Modal/create-api-client-modal.js +0 -32
- package/dist/layouts/Web/ApiClientWeb.vue.js +0 -64
- package/dist/layouts/Web/ApiClientWeb.vue3.js +0 -5
- package/dist/layouts/Web/create-api-client-web.js +0 -32
- package/dist/libs/create-client.js +0 -189
- package/dist/libs/electron.js +0 -4
- package/dist/libs/env-helpers.js +0 -6
- package/dist/libs/environment-parser.js +0 -18
- package/dist/libs/errors.js +0 -16
- package/dist/libs/event-bus.js +0 -32
- package/dist/libs/extractAttachmentFilename.js +0 -18
- package/dist/libs/find-request.js +0 -23
- package/dist/libs/formatters.js +0 -10
- package/dist/libs/get-request-uid-by-path-method.js +0 -18
- package/dist/libs/getOpenApiDocumentDetails.js +0 -40
- package/dist/libs/hot-keys.js +0 -44
- package/dist/libs/importers/curl.js +0 -53
- package/dist/libs/isUrl.js +0 -7
- package/dist/libs/local-storage.js +0 -41
- package/dist/libs/normalize-headers.js +0 -27
- package/dist/libs/parse-curl.js +0 -59
- package/dist/libs/postman.js +0 -37
- package/dist/libs/send-request/build-request-security.js +0 -35
- package/dist/libs/send-request/create-fetch-body.js +0 -25
- package/dist/libs/send-request/create-fetch-headers.js +0 -11
- package/dist/libs/send-request/create-fetch-query-params.js +0 -33
- package/dist/libs/send-request/create-request-operation.js +0 -140
- package/dist/libs/send-request/decode-buffer.js +0 -9
- package/dist/libs/send-request/set-request-cookies.js +0 -58
- package/dist/libs/string-template.js +0 -42
- package/dist/libs/validate-parameters.js +0 -16
- package/dist/plugins/hooks/usePluginManager.js +0 -10
- package/dist/plugins/plugin-manager.js +0 -26
- package/dist/routes.js +0 -210
- package/dist/store/active-entities.js +0 -118
- package/dist/store/collections.js +0 -73
- package/dist/store/cookies.js +0 -13
- package/dist/store/environment.js +0 -32
- package/dist/store/events.js +0 -35
- package/dist/store/import-spec.js +0 -55
- package/dist/store/request-example.js +0 -43
- package/dist/store/requests.js +0 -97
- package/dist/store/router-params.js +0 -22
- package/dist/store/security-schemes.js +0 -55
- package/dist/store/servers.js +0 -39
- package/dist/store/store.js +0 -144
- package/dist/store/tags.js +0 -45
- package/dist/store/workspace.js +0 -52
- package/dist/v2/blocks/operation-block/OperationBlock.vue.js +0 -242
- package/dist/v2/blocks/operation-block/OperationBlock.vue2.js +0 -4
- package/dist/v2/blocks/operation-block/components/Header.vue.js +0 -7
- package/dist/v2/blocks/operation-block/components/Header.vue2.js +0 -100
- package/dist/v2/blocks/operation-block/helpers/build-request-body.js +0 -40
- package/dist/v2/blocks/operation-block/helpers/build-request-cookie-header.js +0 -31
- package/dist/v2/blocks/operation-block/helpers/build-request-parameters.js +0 -107
- package/dist/v2/blocks/operation-block/helpers/build-request-security.js +0 -46
- package/dist/v2/blocks/operation-block/helpers/build-request.js +0 -70
- package/dist/v2/blocks/operation-block/helpers/de-serialize-parameter.js +0 -25
- package/dist/v2/blocks/operation-block/helpers/decode-buffer.js +0 -9
- package/dist/v2/blocks/operation-block/helpers/filter-global-cookies.js +0 -14
- package/dist/v2/blocks/operation-block/helpers/get-cookie-header-keys.js +0 -4
- package/dist/v2/blocks/operation-block/helpers/get-environment-variables.js +0 -7
- package/dist/v2/blocks/operation-block/helpers/get-example.js +0 -36
- package/dist/v2/blocks/operation-block/helpers/get-resolved-url.js +0 -17
- package/dist/v2/blocks/operation-block/helpers/get-selected-body-content-type.js +0 -4
- package/dist/v2/blocks/operation-block/helpers/get-server-url.js +0 -12
- package/dist/v2/blocks/operation-block/helpers/har-to-fetch-request.js +0 -31
- package/dist/v2/blocks/operation-block/helpers/har-to-fetch-response.js +0 -43
- package/dist/v2/blocks/operation-block/helpers/response-cache.js +0 -12
- package/dist/v2/blocks/operation-block/helpers/send-request.js +0 -122
- package/dist/v2/blocks/operation-block/helpers/serialize-parameter.js +0 -49
- package/dist/v2/blocks/operation-block/helpers/validate-path-parameters.js +0 -17
- package/dist/v2/blocks/operation-code-sample/components/ExamplePicker.vue.js +0 -56
- package/dist/v2/blocks/operation-code-sample/components/ExamplePicker.vue2.js +0 -4
- package/dist/v2/blocks/operation-code-sample/components/HttpMethod.vue.js +0 -30
- package/dist/v2/blocks/operation-code-sample/components/HttpMethod.vue2.js +0 -4
- package/dist/v2/blocks/operation-code-sample/components/OperationCodeSample.vue.js +0 -7
- package/dist/v2/blocks/operation-code-sample/components/OperationCodeSample.vue2.js +0 -227
- package/dist/v2/blocks/operation-code-sample/helpers/find-client.js +0 -22
- package/dist/v2/blocks/operation-code-sample/helpers/generate-client-options.js +0 -27
- package/dist/v2/blocks/operation-code-sample/helpers/generate-code-snippet.js +0 -40
- package/dist/v2/blocks/operation-code-sample/helpers/get-clients.js +0 -20
- package/dist/v2/blocks/operation-code-sample/helpers/get-custom-code-samples.js +0 -4
- package/dist/v2/blocks/operation-code-sample/helpers/get-example-from-schema.js +0 -302
- package/dist/v2/blocks/operation-code-sample/helpers/get-resolved-ref-deep.js +0 -28
- package/dist/v2/blocks/operation-code-sample/helpers/get-secrets.js +0 -10
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/operation-to-har.js +0 -67
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-body.js +0 -66
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-parameters.js +0 -172
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-security-schemes.js +0 -55
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-server-url.js +0 -18
- package/dist/v2/blocks/request-block/RequestBlock.vue.js +0 -7
- package/dist/v2/blocks/request-block/RequestBlock.vue2.js +0 -347
- package/dist/v2/blocks/request-block/components/RequestBody.vue.js +0 -7
- package/dist/v2/blocks/request-block/components/RequestBody.vue2.js +0 -191
- package/dist/v2/blocks/request-block/components/RequestBodyForm.vue.js +0 -84
- package/dist/v2/blocks/request-block/components/RequestBodyForm.vue2.js +0 -4
- package/dist/v2/blocks/request-block/components/RequestCodeSnippet.vue.js +0 -135
- package/dist/v2/blocks/request-block/components/RequestCodeSnippet.vue2.js +0 -4
- package/dist/v2/blocks/request-block/components/RequestParams.vue.js +0 -78
- package/dist/v2/blocks/request-block/components/RequestParams.vue2.js +0 -4
- package/dist/v2/blocks/request-block/components/RequestTable.vue.js +0 -7
- package/dist/v2/blocks/request-block/components/RequestTable.vue2.js +0 -74
- package/dist/v2/blocks/request-block/components/RequestTableRow.vue.js +0 -204
- package/dist/v2/blocks/request-block/components/RequestTableRow.vue2.js +0 -4
- package/dist/v2/blocks/request-block/components/RequestTableTooltip.vue.js +0 -7
- package/dist/v2/blocks/request-block/components/RequestTableTooltip.vue2.js +0 -63
- package/dist/v2/blocks/request-block/helpers/create-parameter-handlers.js +0 -55
- package/dist/v2/blocks/request-block/helpers/files.js +0 -7
- package/dist/v2/blocks/request-block/helpers/get-default-headers.js +0 -26
- package/dist/v2/blocks/request-block/helpers/get-form-body-rows.js +0 -29
- package/dist/v2/blocks/request-block/helpers/get-parameter-content.js +0 -9
- package/dist/v2/blocks/request-block/helpers/get-parameter-schema.js +0 -6
- package/dist/v2/blocks/request-block/helpers/get-request-body-example.js +0 -16
- package/dist/v2/blocks/request-block/helpers/group-by.js +0 -10
- package/dist/v2/blocks/request-block/helpers/is-param-disabled.js +0 -7
- package/dist/v2/blocks/request-block/helpers/validate-parameter.js +0 -32
- package/dist/v2/blocks/response-block/ResponseBlock.vue.js +0 -7
- package/dist/v2/blocks/response-block/ResponseBlock.vue2.js +0 -180
- package/dist/v2/blocks/response-block/components/Headers.vue.js +0 -96
- package/dist/v2/blocks/response-block/components/Headers.vue2.js +0 -4
- package/dist/v2/blocks/response-block/components/ResponseBody.vue.js +0 -7
- package/dist/v2/blocks/response-block/components/ResponseBody.vue2.js +0 -87
- package/dist/v2/blocks/response-block/components/ResponseBodyDownload.vue.js +0 -36
- package/dist/v2/blocks/response-block/components/ResponseBodyDownload.vue2.js +0 -4
- package/dist/v2/blocks/response-block/components/ResponseBodyInfo.vue.js +0 -14
- package/dist/v2/blocks/response-block/components/ResponseBodyPreview.vue.js +0 -7
- package/dist/v2/blocks/response-block/components/ResponseBodyPreview.vue2.js +0 -63
- package/dist/v2/blocks/response-block/components/ResponseBodyRaw.vue.js +0 -7
- package/dist/v2/blocks/response-block/components/ResponseBodyRaw.vue2.js +0 -41
- package/dist/v2/blocks/response-block/components/ResponseBodyStreaming.vue.js +0 -94
- package/dist/v2/blocks/response-block/components/ResponseBodyStreaming.vue2.js +0 -4
- package/dist/v2/blocks/response-block/components/ResponseBodyToggle.vue.js +0 -25
- package/dist/v2/blocks/response-block/components/ResponseBodyToggle.vue2.js +0 -4
- package/dist/v2/blocks/response-block/components/ResponseBodyVirtual.vue.js +0 -52
- package/dist/v2/blocks/response-block/components/ResponseBodyVirtual.vue3.js +0 -5
- package/dist/v2/blocks/response-block/components/ResponseCookies.vue.js +0 -54
- package/dist/v2/blocks/response-block/components/ResponseCookies.vue2.js +0 -4
- package/dist/v2/blocks/response-block/components/ResponseEmpty.vue.js +0 -7
- package/dist/v2/blocks/response-block/components/ResponseEmpty.vue2.js +0 -79
- package/dist/v2/blocks/response-block/components/ResponseLoadingOverlay.vue.js +0 -7
- package/dist/v2/blocks/response-block/components/ResponseLoadingOverlay.vue2.js +0 -46
- package/dist/v2/blocks/response-block/components/ResponseMetaInformation.vue.js +0 -67
- package/dist/v2/blocks/response-block/components/ResponseMetaInformation.vue2.js +0 -4
- package/dist/v2/blocks/response-block/helpers/extract-filename.js +0 -18
- package/dist/v2/blocks/response-block/helpers/get-content-length.js +0 -12
- package/dist/v2/blocks/response-block/helpers/media-types.js +0 -126
- package/dist/v2/blocks/response-block/helpers/parse-set-cookie.js +0 -12
- package/dist/v2/blocks/response-block/helpers/process-response-body.js +0 -16
- package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.js +0 -7
- package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue2.js +0 -208
- package/dist/v2/blocks/scalar-address-bar-block/components/AddressBarHistory.vue.js +0 -7
- package/dist/v2/blocks/scalar-address-bar-block/components/AddressBarHistory.vue2.js +0 -95
- package/dist/v2/blocks/scalar-address-bar-block/components/EnvironmentSelector.vue.js +0 -145
- package/dist/v2/blocks/scalar-address-bar-block/components/EnvironmentSelector.vue2.js +0 -4
- package/dist/v2/blocks/scalar-address-bar-block/components/httpStatusCodeColors.js +0 -38
- package/dist/v2/blocks/scalar-address-bar-block/hooks/use-loading-animation.js +0 -25
- package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.js +0 -184
- package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue2.js +0 -4
- package/dist/v2/blocks/scalar-auth-selector-block/components/DeleteRequestAuthModal.vue.js +0 -51
- package/dist/v2/blocks/scalar-auth-selector-block/components/DeleteRequestAuthModal.vue2.js +0 -4
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.js +0 -330
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue2.js +0 -4
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesAddModal.vue.js +0 -7
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesAddModal.vue2.js +0 -76
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesInput.vue.js +0 -165
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesInput.vue3.js +0 -5
- package/dist/v2/blocks/scalar-auth-selector-block/components/OpenIDConnect.vue.js +0 -91
- package/dist/v2/blocks/scalar-auth-selector-block/components/OpenIDConnect.vue2.js +0 -4
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue.js +0 -83
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue2.js +0 -4
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTableInput.vue.js +0 -46
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTableInput.vue2.js +0 -4
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.js +0 -244
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue2.js +0 -4
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/auth-options.js +0 -97
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/extract-security-scheme-secrets.js +0 -135
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/fetch-openid-connect-discovery.js +0 -35
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/is-auth-optional.js +0 -7
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/merge-security.js +0 -23
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth.js +0 -139
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/openid-discovery-to-flows.js +0 -27
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/security-scheme.js +0 -64
- package/dist/v2/components/callout/Callout.vue.js +0 -7
- package/dist/v2/components/callout/Callout.vue2.js +0 -43
- package/dist/v2/components/code-input/CodeInput.vue.js +0 -8
- package/dist/v2/components/code-input/CodeInput.vue2.js +0 -213
- package/dist/v2/components/code-input/code-variable-widget.js +0 -106
- package/dist/v2/components/data-table/DataTable.vue.js +0 -38
- package/dist/v2/components/data-table/DataTable.vue2.js +0 -4
- package/dist/v2/components/data-table/DataTableCell.vue.js +0 -26
- package/dist/v2/components/data-table/DataTableCell.vue2.js +0 -4
- package/dist/v2/components/data-table/DataTableCheckbox.vue.js +0 -53
- package/dist/v2/components/data-table/DataTableCheckbox.vue2.js +0 -4
- package/dist/v2/components/data-table/DataTableHeader.vue.js +0 -18
- package/dist/v2/components/data-table/DataTableHeader.vue2.js +0 -4
- package/dist/v2/components/data-table/DataTableInput.vue.js +0 -7
- package/dist/v2/components/data-table/DataTableInput.vue2.js +0 -121
- package/dist/v2/components/data-table/DataTableInputSelect.vue.js +0 -149
- package/dist/v2/components/data-table/DataTableInputSelect.vue2.js +0 -4
- package/dist/v2/components/data-table/DataTableRow.vue.js +0 -12
- package/dist/v2/components/data-table/DataTableText.vue.js +0 -23
- package/dist/v2/components/data-table/DataTableText.vue2.js +0 -4
- package/dist/v2/components/forms/ConfirmationForm.vue.js +0 -45
- package/dist/v2/components/forms/ConfirmationForm.vue2.js +0 -4
- package/dist/v2/components/layout/CollapsibleSection.vue.js +0 -89
- package/dist/v2/components/layout/CollapsibleSection.vue2.js +0 -4
- package/dist/v2/components/layout/ValueEmitter.vue.js +0 -21
- package/dist/v2/components/layout/ValueEmitter.vue2.js +0 -4
- package/dist/v2/components/modals/DeleteModal.vue.js +0 -31
- package/dist/v2/components/modals/DeleteModal.vue2.js +0 -4
- package/dist/v2/components/modals/ModalClientContainer.vue.js +0 -7
- package/dist/v2/components/modals/ModalClientContainer.vue2.js +0 -60
- package/dist/v2/components/resize/Resize.vue.js +0 -8
- package/dist/v2/components/resize/Resize.vue2.js +0 -36
- package/dist/v2/components/resize/use-split-resize.js +0 -57
- package/dist/v2/components/server/ServerDropdown.vue.js +0 -91
- package/dist/v2/components/server/ServerDropdown.vue2.js +0 -4
- package/dist/v2/components/server/ServerDropdownItem.vue.js +0 -7
- package/dist/v2/components/server/ServerDropdownItem.vue2.js +0 -49
- package/dist/v2/components/sidebar/Sidebar.vue.js +0 -115
- package/dist/v2/components/sidebar/Sidebar.vue2.js +0 -4
- package/dist/v2/components/sidebar/SidebarMenu.vue.js +0 -52
- package/dist/v2/components/sidebar/SidebarMenu.vue2.js +0 -4
- package/dist/v2/components/sidebar/SidebarToggle.vue.js +0 -52
- package/dist/v2/components/sidebar/SidebarToggle.vue2.js +0 -4
- package/dist/v2/features/app/App.vue.js +0 -152
- package/dist/v2/features/app/App.vue3.js +0 -5
- package/dist/v2/features/app/app-events.js +0 -251
- package/dist/v2/features/app/app-state.js +0 -415
- package/dist/v2/features/app/components/AppSidebar.vue.js +0 -7
- package/dist/v2/features/app/components/AppSidebar.vue2.js +0 -304
- package/dist/v2/features/app/components/CreateWorkspaceModal.vue.js +0 -56
- package/dist/v2/features/app/components/CreateWorkspaceModal.vue2.js +0 -4
- package/dist/v2/features/app/components/DesktopTab.vue.js +0 -7
- package/dist/v2/features/app/components/DesktopTab.vue2.js +0 -134
- package/dist/v2/features/app/components/DesktopTabs.vue.js +0 -56
- package/dist/v2/features/app/components/DesktopTabs.vue2.js +0 -4
- package/dist/v2/features/app/components/DownloadAppButton.vue.js +0 -7
- package/dist/v2/features/app/components/DownloadAppButton.vue2.js +0 -19
- package/dist/v2/features/app/components/SidebarItemMenu.vue.js +0 -185
- package/dist/v2/features/app/components/SidebarItemMenu.vue2.js +0 -4
- package/dist/v2/features/app/components/SplashScreen.vue.js +0 -7
- package/dist/v2/features/app/components/SplashScreen.vue2.js +0 -18
- package/dist/v2/features/app/helpers/create-api-client-app.js +0 -36
- package/dist/v2/features/app/helpers/filter-workspaces.js +0 -5
- package/dist/v2/features/app/helpers/get-route-param.js +0 -9
- package/dist/v2/features/app/helpers/group-workspaces.js +0 -23
- package/dist/v2/features/app/helpers/routes.js +0 -157
- package/dist/v2/features/app/hooks/use-document-watcher.js +0 -66
- package/dist/v2/features/app/hooks/use-theme.js +0 -48
- package/dist/v2/features/collection/DocumentCollection.vue.js +0 -336
- package/dist/v2/features/collection/DocumentCollection.vue3.js +0 -5
- package/dist/v2/features/collection/OperationCollection.vue.js +0 -86
- package/dist/v2/features/collection/OperationCollection.vue2.js +0 -4
- package/dist/v2/features/collection/WorkspaceCollection.vue.js +0 -68
- package/dist/v2/features/collection/WorkspaceCollection.vue2.js +0 -4
- package/dist/v2/features/collection/components/Authentication.vue.js +0 -7
- package/dist/v2/features/collection/components/Authentication.vue2.js +0 -154
- package/dist/v2/features/collection/components/Cookies.vue.js +0 -52
- package/dist/v2/features/collection/components/Cookies.vue2.js +0 -4
- package/dist/v2/features/collection/components/Editor/Editor.vue.js +0 -7
- package/dist/v2/features/collection/components/Editor/Editor.vue2.js +0 -344
- package/dist/v2/features/collection/components/Editor/components/EditorDiagnosticsPanel.vue.js +0 -78
- package/dist/v2/features/collection/components/Editor/components/EditorDiagnosticsPanel.vue2.js +0 -4
- package/dist/v2/features/collection/components/Editor/components/EditorSavePanel.vue.js +0 -83
- package/dist/v2/features/collection/components/Editor/components/EditorSavePanel.vue2.js +0 -4
- package/dist/v2/features/collection/components/Editor/helpers/get-diagnostic-counts.js +0 -10
- package/dist/v2/features/collection/components/Editor/helpers/get-operation-context.js +0 -5
- package/dist/v2/features/collection/components/Editor/helpers/get-visible-diagnostics.js +0 -5
- package/dist/v2/features/collection/components/Editor/helpers/parse-editor-object.js +0 -21
- package/dist/v2/features/collection/components/Editor/helpers/stringify-document.js +0 -5
- package/dist/v2/features/collection/components/Editor/hooks/use-editor-state.js +0 -25
- package/dist/v2/features/collection/components/Environment.vue.js +0 -54
- package/dist/v2/features/collection/components/Environment.vue2.js +0 -4
- package/dist/v2/features/collection/components/Form.vue.js +0 -78
- package/dist/v2/features/collection/components/Form.vue2.js +0 -4
- package/dist/v2/features/collection/components/LabelInput.vue.js +0 -7
- package/dist/v2/features/collection/components/LabelInput.vue2.js +0 -35
- package/dist/v2/features/collection/components/Overview.vue.js +0 -7
- package/dist/v2/features/collection/components/Overview.vue2.js +0 -208
- package/dist/v2/features/collection/components/Servers.vue.js +0 -210
- package/dist/v2/features/collection/components/Servers.vue2.js +0 -4
- package/dist/v2/features/collection/components/Settings.vue.js +0 -61
- package/dist/v2/features/collection/components/Settings.vue2.js +0 -4
- package/dist/v2/features/collection/components/SyncConflictResolutionEditor.vue.js +0 -7
- package/dist/v2/features/collection/components/SyncConflictResolutionEditor.vue2.js +0 -136
- package/dist/v2/features/collection/components/Tabs.vue.js +0 -44
- package/dist/v2/features/collection/components/Tabs.vue2.js +0 -4
- package/dist/v2/features/collection/helpers/get-default-operation-security-toggle.js +0 -13
- package/dist/v2/features/command-palette/TheCommandPalette.vue.js +0 -7
- package/dist/v2/features/command-palette/TheCommandPalette.vue2.js +0 -152
- package/dist/v2/features/command-palette/components/CommandActionForm.vue.js +0 -48
- package/dist/v2/features/command-palette/components/CommandActionForm.vue2.js +0 -4
- package/dist/v2/features/command-palette/components/CommandActionInput.vue.js +0 -52
- package/dist/v2/features/command-palette/components/CommandActionInput.vue2.js +0 -4
- package/dist/v2/features/command-palette/components/CommandPaletteExample.vue.js +0 -211
- package/dist/v2/features/command-palette/components/CommandPaletteExample.vue2.js +0 -4
- package/dist/v2/features/command-palette/components/CommandPaletteImport.vue.js +0 -182
- package/dist/v2/features/command-palette/components/CommandPaletteImport.vue2.js +0 -4
- package/dist/v2/features/command-palette/components/CommandPaletteImportCurl.vue.js +0 -7
- package/dist/v2/features/command-palette/components/CommandPaletteImportCurl.vue2.js +0 -115
- package/dist/v2/features/command-palette/components/CommandPaletteOpenApiDocument.vue.js +0 -78
- package/dist/v2/features/command-palette/components/CommandPaletteOpenApiDocument.vue2.js +0 -4
- package/dist/v2/features/command-palette/components/CommandPaletteRequest.vue.js +0 -221
- package/dist/v2/features/command-palette/components/CommandPaletteRequest.vue2.js +0 -4
- package/dist/v2/features/command-palette/components/CommandPaletteTag.vue.js +0 -114
- package/dist/v2/features/command-palette/components/CommandPaletteTag.vue2.js +0 -4
- package/dist/v2/features/command-palette/components/WatchModeToggle.vue.js +0 -40
- package/dist/v2/features/command-palette/components/WatchModeToggle.vue2.js +0 -4
- package/dist/v2/features/command-palette/helpers/generate-unique-slug.js +0 -11
- package/dist/v2/features/command-palette/helpers/get-openapi-document-details.js +0 -31
- package/dist/v2/features/command-palette/helpers/get-openapi-from-postman.js +0 -11
- package/dist/v2/features/command-palette/helpers/get-operation-from-curl.js +0 -76
- package/dist/v2/features/command-palette/helpers/get-postman-document-details.js +0 -18
- package/dist/v2/features/command-palette/helpers/import-document-to-workspace.js +0 -33
- package/dist/v2/features/command-palette/helpers/is-postman-collection.js +0 -11
- package/dist/v2/features/command-palette/helpers/load-document-from-source.js +0 -52
- package/dist/v2/features/command-palette/hooks/use-command-palette-state.js +0 -139
- package/dist/v2/features/editor/config.js +0 -16
- package/dist/v2/features/editor/helpers/configure-language-support.js +0 -39
- package/dist/v2/features/editor/helpers/ensure-monaco-environment.js +0 -20
- package/dist/v2/features/editor/helpers/json/create-json-model.js +0 -19
- package/dist/v2/features/editor/helpers/json/get-json-ast-node-from-path.js +0 -9
- package/dist/v2/features/editor/helpers/json/json-ast.js +0 -24
- package/dist/v2/features/editor/helpers/json/json-pointer-links.js +0 -72
- package/dist/v2/features/editor/helpers/json/json-pointer-path.js +0 -21
- package/dist/v2/features/editor/helpers/range-to-whole-line.js +0 -8
- package/dist/v2/features/editor/helpers/theme/apply-scalar-theme.js +0 -56
- package/dist/v2/features/editor/helpers/theme/load-css-variables.js +0 -21
- package/dist/v2/features/editor/helpers/yaml/create-yaml-model.js +0 -19
- package/dist/v2/features/editor/helpers/yaml/get-yaml-node-range-from-path.js +0 -50
- package/dist/v2/features/editor/hooks/use-editor-markers.js +0 -34
- package/dist/v2/features/editor/hooks/use-editor.js +0 -107
- package/dist/v2/features/editor/hooks/use-json-pointer-link-support.js +0 -27
- package/dist/v2/features/editor/hooks/use-three-way-merge-editor.js +0 -316
- package/dist/v2/features/editor/schemas/openapi-3.1-schema.json.js +0 -25
- package/dist/v2/features/environments/EnvironmentsList.vue.js +0 -68
- package/dist/v2/features/environments/EnvironmentsList.vue2.js +0 -4
- package/dist/v2/features/environments/components/Environment.vue.js +0 -66
- package/dist/v2/features/environments/components/Environment.vue2.js +0 -4
- package/dist/v2/features/environments/components/EnvironmentColors.vue.js +0 -121
- package/dist/v2/features/environments/components/EnvironmentColors.vue2.js +0 -4
- package/dist/v2/features/environments/components/EnvironmentCreateModal.vue.js +0 -85
- package/dist/v2/features/environments/components/EnvironmentCreateModal.vue2.js +0 -4
- package/dist/v2/features/environments/components/EnvironmentDeleteModal.vue.js +0 -53
- package/dist/v2/features/environments/components/EnvironmentDeleteModal.vue2.js +0 -4
- package/dist/v2/features/environments/components/EnvironmentVariablesDropdown.vue.js +0 -109
- package/dist/v2/features/environments/components/EnvironmentVariablesDropdown.vue2.js +0 -4
- package/dist/v2/features/environments/components/EnvironmentVariablesTable.vue.js +0 -7
- package/dist/v2/features/environments/components/EnvironmentVariablesTable.vue2.js +0 -136
- package/dist/v2/features/global-cookies/components/CookiesTable.vue.js +0 -7
- package/dist/v2/features/global-cookies/components/CookiesTable.vue2.js +0 -189
- package/dist/v2/features/modal/Modal.vue.js +0 -122
- package/dist/v2/features/modal/Modal.vue2.js +0 -4
- package/dist/v2/features/modal/helpers/create-api-client-modal.js +0 -89
- package/dist/v2/features/modal/helpers/map-hidden-clients-config.js +0 -36
- package/dist/v2/features/modal/helpers/resolve-route-parameters.js +0 -29
- package/dist/v2/features/modal/helpers/restore-workspace-state.js +0 -36
- package/dist/v2/features/modal/hooks/use-modal-sidebar.js +0 -93
- package/dist/v2/features/modal/modal-events.js +0 -44
- package/dist/v2/features/operation/Operation.vue.js +0 -126
- package/dist/v2/features/operation/Operation.vue2.js +0 -4
- package/dist/v2/features/operation/helpers/combine-params.js +0 -14
- package/dist/v2/features/operation/helpers/get-security-requirements.js +0 -4
- package/dist/v2/features/operation/helpers/get-selected-security.js +0 -18
- package/dist/v2/features/operation/helpers/get-selected-server.js +0 -4
- package/dist/v2/features/search/helpers/create-fuse-instance.js +0 -43
- package/dist/v2/features/search/helpers/create-search-index.js +0 -63
- package/dist/v2/features/search/hooks/use-search-index.js +0 -18
- package/dist/v2/features/settings/CollectionSettings.vue.js +0 -275
- package/dist/v2/features/settings/CollectionSettings.vue2.js +0 -4
- package/dist/v2/features/settings/DocumentSettings.vue.js +0 -115
- package/dist/v2/features/settings/DocumentSettings.vue2.js +0 -4
- package/dist/v2/features/settings/components/Appearance.vue.js +0 -88
- package/dist/v2/features/settings/components/Appearance.vue2.js +0 -4
- package/dist/v2/features/settings/components/Section.vue.js +0 -35
- package/dist/v2/features/settings/components/Section.vue2.js +0 -4
- package/dist/v2/features/settings/helpers/get-theme-colors.js +0 -16
- package/dist/v2/helpers/drag-handle-factory.js +0 -120
- package/dist/v2/helpers/generate-location-id.js +0 -10
- package/dist/v2/helpers/get-active-environment.js +0 -22
- package/dist/v2/helpers/get-active-proxy-url.js +0 -5
- package/dist/v2/helpers/get-servers.js +0 -66
- package/dist/v2/helpers/get-tab-details.js +0 -34
- package/dist/v2/helpers/handle-hotkeys.js +0 -54
- package/dist/v2/helpers/is-url.js +0 -5
- package/dist/v2/helpers/slugify.js +0 -4
- package/dist/v2/helpers/storage.js +0 -16
- package/dist/v2/hooks/use-color-mode.js +0 -24
- package/dist/v2/hooks/use-global-hot-keys.js +0 -11
- package/dist/v2/hooks/use-scroll-lock.js +0 -21
- package/dist/v2/workspace-events.js +0 -252
- package/dist/views/Collection/Collection.vue.js +0 -4
- package/dist/views/Collection/Collection.vue2.js +0 -49
- package/dist/views/Collection/CollectionAuthentication.vue.js +0 -7
- package/dist/views/Collection/CollectionAuthentication.vue2.js +0 -56
- package/dist/views/Collection/CollectionCookies.vue.js +0 -4
- package/dist/views/Collection/CollectionCookies.vue2.js +0 -16
- package/dist/views/Collection/CollectionEnvironment.vue.js +0 -5
- package/dist/views/Collection/CollectionEnvironment.vue2.js +0 -229
- package/dist/views/Collection/CollectionInfoForm.vue.js +0 -7
- package/dist/views/Collection/CollectionInfoForm.vue2.js +0 -63
- package/dist/views/Collection/CollectionNavigation.vue.js +0 -133
- package/dist/views/Collection/CollectionNavigation.vue2.js +0 -4
- package/dist/views/Collection/CollectionOverview.vue.js +0 -4
- package/dist/views/Collection/CollectionOverview.vue2.js +0 -34
- package/dist/views/Collection/CollectionScripts.vue.js +0 -4
- package/dist/views/Collection/CollectionScripts.vue2.js +0 -16
- package/dist/views/Collection/CollectionServerForm.vue.js +0 -75
- package/dist/views/Collection/CollectionServerForm.vue2.js +0 -4
- package/dist/views/Collection/CollectionServers.vue.js +0 -4
- package/dist/views/Collection/CollectionServers.vue2.js +0 -94
- package/dist/views/Collection/CollectionSettings.vue.js +0 -4
- package/dist/views/Collection/CollectionSettings.vue2.js +0 -118
- package/dist/views/Collection/CollectionSync.vue.js +0 -4
- package/dist/views/Collection/CollectionSync.vue2.js +0 -16
- package/dist/views/Collection/components/EnvironmentForm.vue.js +0 -7
- package/dist/views/Collection/components/EnvironmentForm.vue2.js +0 -270
- package/dist/views/Collection/components/MarkdownInput.vue.js +0 -7
- package/dist/views/Collection/components/MarkdownInput.vue2.js +0 -100
- package/dist/views/Components/CodeSnippet/CodeSnippet.vue.js +0 -50
- package/dist/views/Components/CodeSnippet/CodeSnippet.vue2.js +0 -4
- package/dist/views/Components/CodeSnippet/helpers/convert-to-har-request.js +0 -62
- package/dist/views/Components/CodeSnippet/helpers/get-har-request.js +0 -82
- package/dist/views/Components/CodeSnippet/helpers/get-snippet.js +0 -30
- package/dist/views/Cookies/CookieForm.vue.js +0 -34
- package/dist/views/Cookies/CookieForm.vue2.js +0 -4
- package/dist/views/Cookies/CookieModal.vue.js +0 -7
- package/dist/views/Cookies/CookieModal.vue2.js +0 -88
- package/dist/views/Cookies/Cookies.vue.js +0 -4
- package/dist/views/Cookies/Cookies.vue2.js +0 -162
- package/dist/views/Environment/Environment.vue.js +0 -4
- package/dist/views/Environment/Environment.vue2.js +0 -402
- package/dist/views/Environment/EnvironmentColorModal.vue.js +0 -42
- package/dist/views/Environment/EnvironmentColorModal.vue2.js +0 -4
- package/dist/views/Environment/EnvironmentColors.vue.js +0 -118
- package/dist/views/Environment/EnvironmentColors.vue2.js +0 -4
- package/dist/views/Environment/EnvironmentModal.vue.js +0 -131
- package/dist/views/Environment/EnvironmentModal.vue2.js +0 -4
- package/dist/views/Environment/EnvironmentVariableDropdown.vue.js +0 -129
- package/dist/views/Environment/EnvironmentVariableDropdown.vue2.js +0 -4
- package/dist/views/Environment/handle-drag.js +0 -32
- package/dist/views/Request/Request.vue.js +0 -7
- package/dist/views/Request/Request.vue2.js +0 -105
- package/dist/views/Request/RequestRoot.vue.js +0 -7
- package/dist/views/Request/RequestRoot.vue2.js +0 -123
- package/dist/views/Request/RequestSection/RequestAuth/DeleteRequestAuthModal.vue.js +0 -52
- package/dist/views/Request/RequestSection/RequestAuth/DeleteRequestAuthModal.vue2.js +0 -4
- package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.js +0 -246
- package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue2.js +0 -4
- package/dist/views/Request/RequestSection/RequestAuth/OAuthScopesInput.vue.js +0 -135
- package/dist/views/Request/RequestSection/RequestAuth/OAuthScopesInput.vue2.js +0 -4
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.js +0 -7
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue2.js +0 -209
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue.js +0 -7
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue2.js +0 -116
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTableInput.vue.js +0 -50
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTableInput.vue2.js +0 -4
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthTab.vue.js +0 -219
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthTab.vue2.js +0 -4
- package/dist/views/Request/RequestSection/RequestAuth/helpers/restore-auth-from-local-storage.js +0 -28
- package/dist/views/Request/RequestSection/RequestBody.vue.js +0 -7
- package/dist/views/Request/RequestSection/RequestBody.vue2.js +0 -451
- package/dist/views/Request/RequestSection/RequestCodeExample.vue.js +0 -7
- package/dist/views/Request/RequestSection/RequestCodeExample.vue2.js +0 -170
- package/dist/views/Request/RequestSection/RequestParams.vue.js +0 -162
- package/dist/views/Request/RequestSection/RequestParams.vue2.js +0 -4
- package/dist/views/Request/RequestSection/RequestPathParams.vue.js +0 -96
- package/dist/views/Request/RequestSection/RequestPathParams.vue2.js +0 -4
- package/dist/views/Request/RequestSection/RequestSection.vue.js +0 -7
- package/dist/views/Request/RequestSection/RequestSection.vue2.js +0 -247
- package/dist/views/Request/RequestSection/RequestTable.vue.js +0 -7
- package/dist/views/Request/RequestSection/RequestTable.vue2.js +0 -227
- package/dist/views/Request/RequestSection/RequestTableTooltip.vue.js +0 -7
- package/dist/views/Request/RequestSection/RequestTableTooltip.vue2.js +0 -61
- package/dist/views/Request/RequestSection/helpers/filter-security-requirements.js +0 -29
- package/dist/views/Request/RequestSection/helpers/getting-started.js +0 -13
- package/dist/views/Request/RequestSection/helpers/update-scheme.js +0 -16
- package/dist/views/Request/RequestSidebar.vue.js +0 -7
- package/dist/views/Request/RequestSidebar.vue2.js +0 -341
- package/dist/views/Request/RequestSidebarItem.vue.js +0 -8
- package/dist/views/Request/RequestSidebarItem.vue2.js +0 -464
- package/dist/views/Request/RequestSidebarItemMenu.vue.js +0 -7
- package/dist/views/Request/RequestSidebarItemMenu.vue2.js +0 -236
- package/dist/views/Request/RequestSubpageHeader.vue.js +0 -7
- package/dist/views/Request/RequestSubpageHeader.vue2.js +0 -79
- package/dist/views/Request/ResponseSection/RequestHeaders.vue.js +0 -96
- package/dist/views/Request/ResponseSection/RequestHeaders.vue2.js +0 -4
- package/dist/views/Request/ResponseSection/ResponseBody.vue.js +0 -7
- package/dist/views/Request/ResponseSection/ResponseBody.vue2.js +0 -83
- package/dist/views/Request/ResponseSection/ResponseBodyDownload.vue.js +0 -36
- package/dist/views/Request/ResponseSection/ResponseBodyDownload.vue2.js +0 -4
- package/dist/views/Request/ResponseSection/ResponseBodyInfo.vue.js +0 -14
- package/dist/views/Request/ResponseSection/ResponseBodyPreview.vue.js +0 -7
- package/dist/views/Request/ResponseSection/ResponseBodyPreview.vue2.js +0 -63
- package/dist/views/Request/ResponseSection/ResponseBodyRaw.vue.js +0 -7
- package/dist/views/Request/ResponseSection/ResponseBodyRaw.vue2.js +0 -42
- package/dist/views/Request/ResponseSection/ResponseBodyStreaming.vue.js +0 -74
- package/dist/views/Request/ResponseSection/ResponseBodyStreaming.vue2.js +0 -4
- package/dist/views/Request/ResponseSection/ResponseBodyToggle.vue.js +0 -25
- package/dist/views/Request/ResponseSection/ResponseBodyToggle.vue2.js +0 -4
- package/dist/views/Request/ResponseSection/ResponseBodyVirtual.vue.js +0 -50
- package/dist/views/Request/ResponseSection/ResponseBodyVirtual.vue3.js +0 -5
- package/dist/views/Request/ResponseSection/ResponseCookies.vue.js +0 -51
- package/dist/views/Request/ResponseSection/ResponseCookies.vue2.js +0 -4
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue.js +0 -7
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +0 -103
- package/dist/views/Request/ResponseSection/ResponseHeaders.vue.js +0 -96
- package/dist/views/Request/ResponseSection/ResponseHeaders.vue2.js +0 -4
- package/dist/views/Request/ResponseSection/ResponseLoadingOverlay.vue.js +0 -7
- package/dist/views/Request/ResponseSection/ResponseLoadingOverlay.vue2.js +0 -38
- package/dist/views/Request/ResponseSection/ResponseMetaInformation.vue.js +0 -67
- package/dist/views/Request/ResponseSection/ResponseMetaInformation.vue2.js +0 -4
- package/dist/views/Request/ResponseSection/ResponseSection.vue.js +0 -7
- package/dist/views/Request/ResponseSection/ResponseSection.vue2.js +0 -189
- package/dist/views/Request/components/WorkspaceDropdown.vue.js +0 -182
- package/dist/views/Request/components/WorkspaceDropdown.vue2.js +0 -4
- package/dist/views/Request/consts/mediaTypes.js +0 -131
- package/dist/views/Request/consts/new-auth-options.js +0 -100
- package/dist/views/Request/handle-drag.js +0 -42
- package/dist/views/Request/hooks/useOpenApiWatcher.js +0 -57
- package/dist/views/Request/libs/auth.js +0 -52
- package/dist/views/Request/libs/oauth2.js +0 -127
- package/dist/views/Request/libs/request.js +0 -40
- package/dist/views/Request/libs/watch-mode.js +0 -337
- package/dist/views/Settings/Settings.vue.js +0 -4
- package/dist/views/Settings/Settings.vue2.js +0 -29
- package/dist/views/Settings/SettingsGeneral.vue.js +0 -286
- package/dist/views/Settings/SettingsGeneral.vue2.js +0 -4
- package/dist/views/Settings/components/SettingsAppearance.vue.js +0 -85
- package/dist/views/Settings/components/SettingsAppearance.vue2.js +0 -4
- package/dist/views/Settings/components/SettingsSection.vue.js +0 -24
- package/dist/views/Settings/components/SettingsSection.vue2.js +0 -4
|
@@ -1,6 +1,43 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import "../../../CodeInput-BN7uw3Bh.js";
|
|
2
|
+
import "../../../DataTableInput-SkIUPlrB.js";
|
|
3
|
+
import "../../../SectionFilter-hrtoRLwj.js";
|
|
4
|
+
import { t as RequestSection_default } from "../../../RequestSection-Bx8UHW-k.js";
|
|
5
|
+
import "../../../RequestAuth-BU6ubH-c.js";
|
|
6
|
+
//#region src/views/Request/RequestSection/helpers/filter-security-requirements.ts
|
|
7
|
+
/**
|
|
8
|
+
* Takes in selected security and filters it with the requirements
|
|
9
|
+
*/
|
|
10
|
+
var filterSecurityRequirements = (securityRequirements, selectedSecuritySchemeUids = [], securitySchemes = {}) => {
|
|
11
|
+
if (!securityRequirements || securityRequirements.length === 0) return [];
|
|
12
|
+
const nonOptionalRequirements = securityRequirements.filter((requirement) => Object.keys(requirement).length > 0);
|
|
13
|
+
if (nonOptionalRequirements.length === 0) return [];
|
|
14
|
+
if (selectedSecuritySchemeUids.length === 0) {
|
|
15
|
+
const firstRequirement = nonOptionalRequirements[0];
|
|
16
|
+
const firstSchemeNameKey = firstRequirement ? Object.keys(firstRequirement)[0] : void 0;
|
|
17
|
+
const matchingScheme = Object.values(securitySchemes).find((scheme) => scheme.nameKey === firstSchemeNameKey);
|
|
18
|
+
return matchingScheme ? [matchingScheme] : [];
|
|
19
|
+
}
|
|
20
|
+
const requiredCombinations = new Set(nonOptionalRequirements.map((requirement) => Object.keys(requirement).sort().join(",")));
|
|
21
|
+
const result = [];
|
|
22
|
+
for (const uids of selectedSecuritySchemeUids) {
|
|
23
|
+
const schemeUids = Array.isArray(uids) ? uids : [uids];
|
|
24
|
+
const validSchemes = [];
|
|
25
|
+
const nameKeys = [];
|
|
26
|
+
for (const uid of schemeUids) {
|
|
27
|
+
const scheme = securitySchemes[uid];
|
|
28
|
+
if (scheme?.nameKey) {
|
|
29
|
+
validSchemes.push(scheme);
|
|
30
|
+
nameKeys.push(scheme.nameKey);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
if (nameKeys.length > 0) {
|
|
34
|
+
const key = nameKeys.sort().join(",");
|
|
35
|
+
if (requiredCombinations.has(key)) result.push(...validSchemes);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
return result;
|
|
6
39
|
};
|
|
40
|
+
//#endregion
|
|
41
|
+
export { RequestSection_default as RequestSection, filterSecurityRequirements };
|
|
42
|
+
|
|
43
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../../src/views/Request/RequestSection/helpers/filter-security-requirements.ts"],"sourcesContent":["import type { Collection, SecurityScheme } from '@scalar/oas-utils/entities/spec'\n\n/**\n * Takes in selected security and filters it with the requirements\n */\nexport const filterSecurityRequirements = (\n securityRequirements: Collection['security'],\n selectedSecuritySchemeUids: Collection['selectedSecuritySchemeUids'] = [],\n securitySchemes: Record<string, SecurityScheme> = {},\n): SecurityScheme[] => {\n // Return empty array if no security requirements exist\n if (!securityRequirements || securityRequirements.length === 0) {\n return []\n }\n\n // Filter out optional security requirements (empty objects)\n const nonOptionalRequirements = securityRequirements.filter((requirement) => Object.keys(requirement).length > 0)\n\n // Return empty array if only optional security requirements exist\n if (nonOptionalRequirements.length === 0) {\n return []\n }\n\n // If no security schemes are selected, return the first available security scheme\n if (selectedSecuritySchemeUids.length === 0) {\n const firstRequirement = nonOptionalRequirements[0]\n const firstSchemeNameKey = firstRequirement ? Object.keys(firstRequirement)[0] : undefined\n\n // Find the security scheme that matches the first requirement\n const matchingScheme = Object.values(securitySchemes).find((scheme) => scheme.nameKey === firstSchemeNameKey)\n\n return matchingScheme ? [matchingScheme] : []\n }\n\n // Create a Set of required security combinations for fast lookup\n const requiredCombinations = new Set(\n nonOptionalRequirements.map((requirement) => Object.keys(requirement).sort().join(',')),\n )\n\n const result: SecurityScheme[] = []\n\n for (const uids of selectedSecuritySchemeUids) {\n // Handle both single uid and array of uids\n const schemeUids = Array.isArray(uids) ? uids : [uids]\n\n // Get valid schemes and their name keys in one pass\n const validSchemes: SecurityScheme[] = []\n const nameKeys: string[] = []\n\n for (const uid of schemeUids) {\n const scheme = securitySchemes[uid]\n if (scheme?.nameKey) {\n validSchemes.push(scheme)\n nameKeys.push(scheme.nameKey)\n }\n }\n\n // Check if this combination is required\n if (nameKeys.length > 0) {\n const key = nameKeys.sort().join(',')\n if (requiredCombinations.has(key)) {\n result.push(...validSchemes)\n }\n }\n }\n\n return result\n}\n"],"mappings":";;;;;;;;;AAKA,IAAa,8BACX,sBACA,6BAAuE,EAAE,EACzE,kBAAkD,EAAE,KAC/B;AAErB,KAAI,CAAC,wBAAwB,qBAAqB,WAAW,EAC3D,QAAO,EAAE;CAIX,MAAM,0BAA0B,qBAAqB,QAAQ,gBAAgB,OAAO,KAAK,YAAY,CAAC,SAAS,EAAE;AAGjH,KAAI,wBAAwB,WAAW,EACrC,QAAO,EAAE;AAIX,KAAI,2BAA2B,WAAW,GAAG;EAC3C,MAAM,mBAAmB,wBAAwB;EACjD,MAAM,qBAAqB,mBAAmB,OAAO,KAAK,iBAAiB,CAAC,KAAK,KAAA;EAGjF,MAAM,iBAAiB,OAAO,OAAO,gBAAgB,CAAC,MAAM,WAAW,OAAO,YAAY,mBAAmB;AAE7G,SAAO,iBAAiB,CAAC,eAAe,GAAG,EAAE;;CAI/C,MAAM,uBAAuB,IAAI,IAC/B,wBAAwB,KAAK,gBAAgB,OAAO,KAAK,YAAY,CAAC,MAAM,CAAC,KAAK,IAAI,CAAC,CACxF;CAED,MAAM,SAA2B,EAAE;AAEnC,MAAK,MAAM,QAAQ,4BAA4B;EAE7C,MAAM,aAAa,MAAM,QAAQ,KAAK,GAAG,OAAO,CAAC,KAAK;EAGtD,MAAM,eAAiC,EAAE;EACzC,MAAM,WAAqB,EAAE;AAE7B,OAAK,MAAM,OAAO,YAAY;GAC5B,MAAM,SAAS,gBAAgB;AAC/B,OAAI,QAAQ,SAAS;AACnB,iBAAa,KAAK,OAAO;AACzB,aAAS,KAAK,OAAO,QAAQ;;;AAKjC,MAAI,SAAS,SAAS,GAAG;GACvB,MAAM,MAAM,SAAS,MAAM,CAAC,KAAK,IAAI;AACrC,OAAI,qBAAqB,IAAI,IAAI,CAC/B,QAAO,KAAK,GAAG,aAAa;;;AAKlC,QAAO"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type DraggableProps, type DraggingItem, type HoveredItem } from '@scalar/draggable';
|
|
2
|
-
import type { SidebarMenuItem } from '
|
|
2
|
+
import type { SidebarMenuItem } from '@/views/Request/types';
|
|
3
3
|
type __VLS_Props = {
|
|
4
4
|
/**
|
|
5
5
|
* Toggle dragging on and off
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import type { SidebarMenuItem } from '
|
|
1
|
+
import type { SidebarMenuItem } from '@/views/Request/types';
|
|
2
2
|
type __VLS_Props = {
|
|
3
3
|
menuItem: SidebarMenuItem;
|
|
4
4
|
};
|
|
5
5
|
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
6
6
|
closeMenu: () => any;
|
|
7
|
-
toggleWatchMode: (item: import("
|
|
7
|
+
toggleWatchMode: (item: import("@/views/Request/types").SidebarItem | undefined) => any;
|
|
8
8
|
clearDrafts: () => any;
|
|
9
9
|
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
10
10
|
onCloseMenu?: (() => any) | undefined;
|
|
11
|
-
onToggleWatchMode?: ((item: import("
|
|
11
|
+
onToggleWatchMode?: ((item: import("@/views/Request/types").SidebarItem | undefined) => any) | undefined;
|
|
12
12
|
onClearDrafts?: (() => any) | undefined;
|
|
13
13
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
14
14
|
declare const _default: typeof __VLS_export;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Environment } from '@scalar/oas-utils/entities/environment';
|
|
2
2
|
import type { Collection, Operation, Server } from '@scalar/oas-utils/entities/spec';
|
|
3
3
|
import type { Workspace } from '@scalar/oas-utils/entities/workspace';
|
|
4
|
-
import type { EnvVariable } from '
|
|
4
|
+
import type { EnvVariable } from '@/store/active-entities';
|
|
5
5
|
type __VLS_Props = {
|
|
6
6
|
collection: Collection;
|
|
7
7
|
operation: Operation;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Collection, Operation, ResponseInstance } from '@scalar/oas-utils/entities/spec';
|
|
2
2
|
import type { Workspace } from '@scalar/oas-utils/entities/workspace';
|
|
3
|
-
import type { SendRequestResult } from '
|
|
3
|
+
import type { SendRequestResult } from '@/libs/send-request/create-request-operation';
|
|
4
4
|
type __VLS_Props = {
|
|
5
5
|
collection: Collection;
|
|
6
6
|
operation: Operation;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { default as ResponseBody } from './ResponseBody.vue
|
|
2
|
-
export { default as ResponseSection } from './ResponseSection.vue
|
|
1
|
+
export { default as ResponseBody } from './ResponseBody.vue';
|
|
2
|
+
export { default as ResponseSection } from './ResponseSection.vue';
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import "../../../CodeInput-BN7uw3Bh.js";
|
|
2
|
+
import "../../../DataTableInput-SkIUPlrB.js";
|
|
3
|
+
import "../../../SectionFilter-hrtoRLwj.js";
|
|
4
|
+
import "../../../ScalarAsciiArt-BjuSnj8e.js";
|
|
5
|
+
import { n as ResponseBody_default, t as ResponseSection_default } from "../../../ResponseSection-CLrgLMN_.js";
|
|
6
|
+
import "../../../EmptyState-Cnm7hGW5.js";
|
|
7
|
+
export { ResponseBody_default as ResponseBody, ResponseSection_default as ResponseSection };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { default as WorkspaceDropdown } from './WorkspaceDropdown.vue
|
|
1
|
+
export { default as WorkspaceDropdown } from './WorkspaceDropdown.vue';
|
|
2
2
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { type MediaConfig, type MediaPreview, getMediaTypeConfig, isTextMediaType, mediaTypes, textMediaTypes, } from './mediaTypes
|
|
2
|
-
export { ADD_AUTH_DICT, ADD_AUTH_OPTIONS, type SecuritySchemeGroup, type SecuritySchemeOption, } from './new-auth-options
|
|
1
|
+
export { type MediaConfig, type MediaPreview, getMediaTypeConfig, isTextMediaType, mediaTypes, textMediaTypes, } from './mediaTypes';
|
|
2
|
+
export { ADD_AUTH_DICT, ADD_AUTH_OPTIONS, type SecuritySchemeGroup, type SecuritySchemeOption, } from './new-auth-options';
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,10 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
export {
|
|
4
|
-
a as ADD_AUTH_DICT,
|
|
5
|
-
d as ADD_AUTH_OPTIONS,
|
|
6
|
-
i as getMediaTypeConfig,
|
|
7
|
-
p as isTextMediaType,
|
|
8
|
-
t as mediaTypes,
|
|
9
|
-
o as textMediaTypes
|
|
10
|
-
};
|
|
1
|
+
import { a as mediaTypes, i as isTextMediaType, n as ADD_AUTH_OPTIONS, o as textMediaTypes, r as getMediaTypeConfig, t as ADD_AUTH_DICT } from "../../../consts-CyGRb9dl.js";
|
|
2
|
+
export { ADD_AUTH_DICT, ADD_AUTH_OPTIONS, getMediaTypeConfig, isTextMediaType, mediaTypes, textMediaTypes };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { DraggingItem, HoveredItem } from '@scalar/draggable';
|
|
2
|
-
import type { WorkspaceStore } from '
|
|
3
|
-
import type { ActiveEntitiesStore } from '
|
|
2
|
+
import type { WorkspaceStore } from '@/store';
|
|
3
|
+
import type { ActiveEntitiesStore } from '@/store/active-entities';
|
|
4
4
|
/** Create DnD handlers */
|
|
5
5
|
export declare function dragHandlerFactory(activeWorkspace: ActiveEntitiesStore['activeWorkspace'], { collections, collectionMutators, tags, tagMutators, workspaceMutators }: WorkspaceStore): {
|
|
6
6
|
handleDragEnd: (draggingItem: DraggingItem, hoveredItem: HoveredItem) => void;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Collection, Operation, SecurityScheme } from '@scalar/oas-utils/entities/spec';
|
|
2
|
-
import { type SecuritySchemeGroup, type SecuritySchemeOption } from '
|
|
2
|
+
import { type SecuritySchemeGroup, type SecuritySchemeOption } from '@/views/Request/consts';
|
|
3
3
|
type DisplayScheme = {
|
|
4
4
|
type: SecurityScheme['type'] | 'complex';
|
|
5
5
|
nameKey: SecurityScheme['nameKey'];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { formatComplexScheme, formatScheme, getSchemeOptions, getSecurityRequirements } from './auth
|
|
2
|
-
export { authorizeOauth2, authorizeServers, generateCodeChallenge } from './oauth2
|
|
3
|
-
export { combineRenameDiffs, findResource, mutateCollectionDiff, mutateRequestDiff, mutateSecuritySchemeDiff, mutateServerDiff, mutateTagDiff, narrowUnionSchema, parseDiff, traverseZodSchema, } from './watch-mode
|
|
1
|
+
export { formatComplexScheme, formatScheme, getSchemeOptions, getSecurityRequirements } from './auth';
|
|
2
|
+
export { authorizeOauth2, authorizeServers, generateCodeChallenge } from './oauth2';
|
|
3
|
+
export { combineRenameDiffs, findResource, mutateCollectionDiff, mutateRequestDiff, mutateSecuritySchemeDiff, mutateServerDiff, mutateTagDiff, narrowUnionSchema, parseDiff, traverseZodSchema, } from './watch-mode';
|
|
4
4
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,22 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
export {
|
|
5
|
-
i as authorizeOauth2,
|
|
6
|
-
u as authorizeServers,
|
|
7
|
-
h as combineRenameDiffs,
|
|
8
|
-
S as findResource,
|
|
9
|
-
r as formatComplexScheme,
|
|
10
|
-
f as formatScheme,
|
|
11
|
-
c as generateCodeChallenge,
|
|
12
|
-
m as getSchemeOptions,
|
|
13
|
-
o as getSecurityRequirements,
|
|
14
|
-
s as mutateCollectionDiff,
|
|
15
|
-
D as mutateRequestDiff,
|
|
16
|
-
p as mutateSecuritySchemeDiff,
|
|
17
|
-
g as mutateServerDiff,
|
|
18
|
-
l as mutateTagDiff,
|
|
19
|
-
x as narrowUnionSchema,
|
|
20
|
-
C as parseDiff,
|
|
21
|
-
R as traverseZodSchema
|
|
22
|
-
};
|
|
1
|
+
import { a as formatScheme, i as formatComplexScheme, n as authorizeServers, o as getSchemeOptions, r as generateCodeChallenge, s as getSecurityRequirements, t as authorizeOauth2 } from "../../../libs-spbv4P0g.js";
|
|
2
|
+
import { a as mutateSecuritySchemeDiff, c as narrowUnionSchema, i as mutateRequestDiff, l as parseDiff, n as findResource, o as mutateServerDiff, r as mutateCollectionDiff, s as mutateTagDiff, t as combineRenameDiffs, u as traverseZodSchema } from "../../../watch-mode-Dbaqd9bG.js";
|
|
3
|
+
export { authorizeOauth2, authorizeServers, combineRenameDiffs, findResource, formatComplexScheme, formatScheme, generateCodeChallenge, getSchemeOptions, getSecurityRequirements, mutateCollectionDiff, mutateRequestDiff, mutateSecuritySchemeDiff, mutateServerDiff, mutateTagDiff, narrowUnionSchema, parseDiff, traverseZodSchema };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Oauth2Flow, Server } from '@scalar/oas-utils/entities/spec';
|
|
2
|
-
import type { ErrorResponse } from '
|
|
2
|
+
import type { ErrorResponse } from '@/libs/errors';
|
|
3
3
|
/** Oauth2 security schemes which are not implicit */
|
|
4
4
|
type NonImplicitFlow = Exclude<Oauth2Flow, {
|
|
5
5
|
type: 'implicit';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { type Path, type PathValue } from '@scalar/object-utils/nested';
|
|
2
2
|
import { type Difference } from 'microdiff';
|
|
3
3
|
import { type ZodSchema } from 'zod';
|
|
4
|
-
import type { WorkspaceStore } from '
|
|
5
|
-
import type { ActiveEntitiesStore } from '
|
|
4
|
+
import type { WorkspaceStore } from '@/store';
|
|
5
|
+
import type { ActiveEntitiesStore } from '@/store/active-entities';
|
|
6
6
|
/**
|
|
7
7
|
* Combine Rename Diffs
|
|
8
8
|
* Rename diffs show up as a delete and an add.
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
|
|
@@ -0,0 +1,375 @@
|
|
|
1
|
+
import { isHttpMethod, schemaModel } from "@scalar/oas-utils/helpers";
|
|
2
|
+
import { collectionSchema, createExampleFromRequest, requestSchema, securitySchemeSchema, serverSchema, tagSchema } from "@scalar/oas-utils/entities/spec";
|
|
3
|
+
import { z } from "zod";
|
|
4
|
+
import { getNestedValue } from "@scalar/object-utils/nested";
|
|
5
|
+
import microdiff from "microdiff";
|
|
6
|
+
//#region src/views/Request/libs/watch-mode.ts
|
|
7
|
+
/**
|
|
8
|
+
* Combine Rename Diffs
|
|
9
|
+
* Rename diffs show up as a delete and an add.
|
|
10
|
+
* This will go through the diff and combine any diff items which are next to each other which go from remove to add.
|
|
11
|
+
*
|
|
12
|
+
* - first we check if the payloads are the same then it was just a simple rename
|
|
13
|
+
* - next we will add the rename and also handle any changes in the diff
|
|
14
|
+
*/
|
|
15
|
+
var combineRenameDiffs = (diff, pathPrefix = []) => {
|
|
16
|
+
const combined = [];
|
|
17
|
+
let skipNext = false;
|
|
18
|
+
for (let i = 0; i < diff.length; i++) {
|
|
19
|
+
if (skipNext) {
|
|
20
|
+
skipNext = false;
|
|
21
|
+
continue;
|
|
22
|
+
}
|
|
23
|
+
const current = diff[i];
|
|
24
|
+
const next = diff[i + 1];
|
|
25
|
+
if (!current) continue;
|
|
26
|
+
if (pathPrefix.length) {
|
|
27
|
+
current.path = [...pathPrefix, ...current.path];
|
|
28
|
+
if (next) next.path = [...pathPrefix, ...next.path];
|
|
29
|
+
} else if (current.path[0] !== "paths") {
|
|
30
|
+
combined.push(current);
|
|
31
|
+
continue;
|
|
32
|
+
}
|
|
33
|
+
if (current.type === "REMOVE" && next?.type === "CREATE") {
|
|
34
|
+
const [, currPath, currMethod] = current.path;
|
|
35
|
+
const [, nextPath, nextMethod] = next.path;
|
|
36
|
+
const nestedPrefix = ["paths", nextPath].filter((p) => typeof p === "string");
|
|
37
|
+
if (currPath !== nextPath) combined.push({
|
|
38
|
+
type: "CHANGE",
|
|
39
|
+
path: ["paths", "path"],
|
|
40
|
+
oldValue: currPath,
|
|
41
|
+
value: nextPath
|
|
42
|
+
});
|
|
43
|
+
if (currMethod && typeof nextMethod === "string" && currMethod !== nextMethod && nextPath) {
|
|
44
|
+
combined.push({
|
|
45
|
+
type: "CHANGE",
|
|
46
|
+
path: [
|
|
47
|
+
"paths",
|
|
48
|
+
nextPath,
|
|
49
|
+
"method"
|
|
50
|
+
],
|
|
51
|
+
oldValue: currMethod,
|
|
52
|
+
value: nextMethod
|
|
53
|
+
});
|
|
54
|
+
nestedPrefix.push(nextMethod);
|
|
55
|
+
}
|
|
56
|
+
if (pathPrefix.length === 0) {
|
|
57
|
+
const innerDiff = microdiff(current.oldValue, next.value);
|
|
58
|
+
if (innerDiff.length) {
|
|
59
|
+
const innerCombined = combineRenameDiffs(innerDiff, nestedPrefix);
|
|
60
|
+
combined.push(...innerCombined);
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
skipNext = true;
|
|
64
|
+
} else if (current.type === "CREATE" && current.path.length > 3 && typeof current.path.at(-1) !== "number") combined.push({
|
|
65
|
+
...current,
|
|
66
|
+
type: "CHANGE",
|
|
67
|
+
oldValue: void 0
|
|
68
|
+
});
|
|
69
|
+
else if (current.type === "REMOVE" && current.path.length > 3 && typeof current.path.at(-1) !== "number") combined.push({
|
|
70
|
+
...current,
|
|
71
|
+
type: "CHANGE",
|
|
72
|
+
value: void 0
|
|
73
|
+
});
|
|
74
|
+
else combined.push(current);
|
|
75
|
+
}
|
|
76
|
+
return combined;
|
|
77
|
+
};
|
|
78
|
+
/** Like array.find but returns the resource instead of the uid */
|
|
79
|
+
var findResource = (arr, resources, condition) => {
|
|
80
|
+
for (const uid of arr) {
|
|
81
|
+
const resource = resources[uid];
|
|
82
|
+
if (resource && condition(resource)) return resource;
|
|
83
|
+
}
|
|
84
|
+
return null;
|
|
85
|
+
};
|
|
86
|
+
/** Helper function to unwrap optional and default schemas */
|
|
87
|
+
var unwrapSchema = (schema) => {
|
|
88
|
+
if (schema instanceof z.ZodOptional) {
|
|
89
|
+
const unwrapped = schema.unwrap();
|
|
90
|
+
if (unwrapped instanceof z.ZodType) return unwrapSchema(unwrapped);
|
|
91
|
+
}
|
|
92
|
+
if (schema instanceof z.ZodDefault) {
|
|
93
|
+
const innerType = schema._zod.def.innerType;
|
|
94
|
+
if (innerType instanceof z.ZodType) return unwrapSchema(innerType);
|
|
95
|
+
}
|
|
96
|
+
if (schema instanceof z.ZodCatch) {
|
|
97
|
+
const innerType = schema._zod.def.innerType;
|
|
98
|
+
if (innerType instanceof z.ZodType) return unwrapSchema(innerType);
|
|
99
|
+
}
|
|
100
|
+
if (schema instanceof z.ZodPipe) {
|
|
101
|
+
const inType = schema._zod.def.in;
|
|
102
|
+
if (inType instanceof z.ZodType) return unwrapSchema(inType);
|
|
103
|
+
}
|
|
104
|
+
return schema;
|
|
105
|
+
};
|
|
106
|
+
/**
|
|
107
|
+
* Traverses a zod schema based on the path and returns the schema at the end of the path
|
|
108
|
+
* or null if the path doesn't exist. Handles optional unwrapping, records, and arrays
|
|
109
|
+
*/
|
|
110
|
+
var traverseZodSchema = (schema, path) => {
|
|
111
|
+
let currentSchema = schema;
|
|
112
|
+
for (const key of path) {
|
|
113
|
+
currentSchema = unwrapSchema(currentSchema);
|
|
114
|
+
if (currentSchema instanceof z.ZodAny) return currentSchema;
|
|
115
|
+
if (currentSchema instanceof z.ZodObject && typeof key === "string" && key in currentSchema.shape) {
|
|
116
|
+
const shapeValue = currentSchema.shape[key];
|
|
117
|
+
if (shapeValue instanceof z.ZodType) currentSchema = shapeValue;
|
|
118
|
+
else return null;
|
|
119
|
+
} else if (currentSchema instanceof z.ZodArray) if (typeof key === "number") if (currentSchema.element instanceof z.ZodType) currentSchema = currentSchema.element;
|
|
120
|
+
else return null;
|
|
121
|
+
else if (typeof key === "string") {
|
|
122
|
+
if (currentSchema.element instanceof z.ZodType) currentSchema = currentSchema.element;
|
|
123
|
+
else return null;
|
|
124
|
+
if (currentSchema instanceof z.ZodObject && key in currentSchema.shape) {
|
|
125
|
+
const shapeValue = currentSchema.shape[key];
|
|
126
|
+
if (shapeValue instanceof z.ZodType) currentSchema = shapeValue;
|
|
127
|
+
else return null;
|
|
128
|
+
} else return null;
|
|
129
|
+
} else return null;
|
|
130
|
+
else if (currentSchema instanceof z.ZodRecord) {
|
|
131
|
+
const valueSchema = currentSchema._zod.def.valueType;
|
|
132
|
+
if (!valueSchema || !(valueSchema instanceof z.ZodType)) return null;
|
|
133
|
+
if (typeof key === "string") {
|
|
134
|
+
currentSchema = valueSchema;
|
|
135
|
+
currentSchema = unwrapSchema(currentSchema);
|
|
136
|
+
} else if (typeof key === "number") {
|
|
137
|
+
currentSchema = valueSchema;
|
|
138
|
+
currentSchema = unwrapSchema(currentSchema);
|
|
139
|
+
if (currentSchema instanceof z.ZodArray) if (currentSchema.element instanceof z.ZodType) currentSchema = currentSchema.element;
|
|
140
|
+
else return null;
|
|
141
|
+
} else currentSchema = valueSchema;
|
|
142
|
+
} else return null;
|
|
143
|
+
currentSchema = unwrapSchema(currentSchema);
|
|
144
|
+
}
|
|
145
|
+
return currentSchema;
|
|
146
|
+
};
|
|
147
|
+
/**
|
|
148
|
+
* Takes in diff, uses the path to get to the nested schema then parse the value
|
|
149
|
+
* If there is a sub schema and it successfully parses, both the path and new value are valid and returned as such
|
|
150
|
+
*
|
|
151
|
+
* We return a tuple to make it easier to pass into the mutators
|
|
152
|
+
*/
|
|
153
|
+
var parseDiff = (schema, diff) => {
|
|
154
|
+
const parsedSchema = traverseZodSchema(schema, diff.path);
|
|
155
|
+
if (!parsedSchema) return null;
|
|
156
|
+
const path = diff.path.join(".");
|
|
157
|
+
const pathMinusOne = diff.path.slice(0, -1).join(".");
|
|
158
|
+
if (diff.type === "REMOVE") return {
|
|
159
|
+
path,
|
|
160
|
+
pathMinusOne,
|
|
161
|
+
value: void 0
|
|
162
|
+
};
|
|
163
|
+
const parsedValue = schemaModel(diff.value, parsedSchema, false);
|
|
164
|
+
if (typeof parsedValue === "undefined" || parsedValue === null) return null;
|
|
165
|
+
return {
|
|
166
|
+
path,
|
|
167
|
+
pathMinusOne,
|
|
168
|
+
value: parsedValue
|
|
169
|
+
};
|
|
170
|
+
};
|
|
171
|
+
/**
|
|
172
|
+
* Transforms the diff into a payload for the collection mutator then executes that mutation
|
|
173
|
+
*
|
|
174
|
+
* @returns true if it succeeds, and false for a failure
|
|
175
|
+
*/
|
|
176
|
+
var mutateCollectionDiff = (diff, { activeCollection }, { collectionMutators }) => {
|
|
177
|
+
if (!activeCollection.value) return false;
|
|
178
|
+
if (typeof diff.path[diff.path.length - 1] === "number" && (diff.type === "CREATE" || diff.type === "REMOVE")) {
|
|
179
|
+
const parsed = parseDiff(collectionSchema, {
|
|
180
|
+
...diff,
|
|
181
|
+
path: diff.path
|
|
182
|
+
});
|
|
183
|
+
if (!parsed) return false;
|
|
184
|
+
const oldValue = [...getNestedValue(activeCollection.value, parsed.pathMinusOne)];
|
|
185
|
+
if (diff.type === "CREATE") oldValue.push(parsed.value);
|
|
186
|
+
else if (diff.type === "REMOVE") oldValue.pop();
|
|
187
|
+
collectionMutators.edit(activeCollection.value.uid, parsed.pathMinusOne, oldValue);
|
|
188
|
+
} else {
|
|
189
|
+
const parsed = parseDiff(collectionSchema, diff);
|
|
190
|
+
if (!parsed) return false;
|
|
191
|
+
collectionMutators.edit(activeCollection.value.uid, parsed.path, parsed.value);
|
|
192
|
+
}
|
|
193
|
+
return true;
|
|
194
|
+
};
|
|
195
|
+
/**
|
|
196
|
+
* Currently we just generate new examples
|
|
197
|
+
*
|
|
198
|
+
* TODO: diff the changes in the examples and just update what we need to
|
|
199
|
+
*/
|
|
200
|
+
var updateRequestExamples = (requestUid, store) => {
|
|
201
|
+
const { requests, requestExamples, requestExampleMutators } = store;
|
|
202
|
+
const request = requests[requestUid];
|
|
203
|
+
request?.examples.forEach((exampleUid) => {
|
|
204
|
+
const newExample = createExampleFromRequest(request, requestExamples[exampleUid]?.name ?? "Default");
|
|
205
|
+
if (newExample) requestExampleMutators.set({
|
|
206
|
+
...newExample,
|
|
207
|
+
uid: exampleUid
|
|
208
|
+
});
|
|
209
|
+
});
|
|
210
|
+
};
|
|
211
|
+
/**
|
|
212
|
+
* Generates an array of payloads for the request mutator from the request diff, also executes the mutation
|
|
213
|
+
*/
|
|
214
|
+
var mutateRequestDiff = (diff, { activeCollection }, store) => {
|
|
215
|
+
if (!activeCollection.value) return false;
|
|
216
|
+
const { requests, requestMutators } = store;
|
|
217
|
+
const [, path, method, ...keys] = diff.path;
|
|
218
|
+
if (path === "path" && diff.type === "CHANGE") activeCollection.value.requests.forEach((uid) => {
|
|
219
|
+
if (requests[uid]?.path === diff.oldValue) requestMutators.edit(uid, "path", diff.value);
|
|
220
|
+
});
|
|
221
|
+
else if (method === "method" && diff.type === "CHANGE") activeCollection.value.requests.forEach((uid) => {
|
|
222
|
+
if (requests[uid]?.method === diff.oldValue && requests[uid]?.path === path) requestMutators.edit(uid, "method", diff.value);
|
|
223
|
+
});
|
|
224
|
+
else if (diff.type !== "CHANGE" && typeof keys.at(-1) === "number") {
|
|
225
|
+
const request = findResource(activeCollection.value.requests, requests, (r) => r.path === path && r.method === method);
|
|
226
|
+
const parsed = parseDiff(requestSchema, {
|
|
227
|
+
...diff,
|
|
228
|
+
path: diff.path.slice(3)
|
|
229
|
+
});
|
|
230
|
+
if (!request || !parsed) return false;
|
|
231
|
+
const oldValue = [...getNestedValue(request, parsed.pathMinusOne)];
|
|
232
|
+
if (diff.type === "CREATE") oldValue.push(parsed.value);
|
|
233
|
+
else if (diff.type === "REMOVE") oldValue.pop();
|
|
234
|
+
requestMutators.edit(request.uid, parsed.pathMinusOne, oldValue);
|
|
235
|
+
if (diff.path[3] === "parameters" || diff.path[3] === "requestBody") updateRequestExamples(request.uid, store);
|
|
236
|
+
} else if (diff.type === "CREATE") {
|
|
237
|
+
const [firstEntry] = Object.entries(diff.value ?? {});
|
|
238
|
+
const [_method, _operation] = firstEntry ?? [];
|
|
239
|
+
const operation = method ? diff.value : _operation;
|
|
240
|
+
const newMethod = method || _method;
|
|
241
|
+
const operationServers = serverSchema.array().parse(operation.servers ?? []);
|
|
242
|
+
const { security: operationSecurity, ...operationWithoutSecurity } = operation;
|
|
243
|
+
const requestPayload = {
|
|
244
|
+
...operationWithoutSecurity,
|
|
245
|
+
method: isHttpMethod(newMethod) ? newMethod : "get",
|
|
246
|
+
path,
|
|
247
|
+
parameters: operation.parameters ?? [],
|
|
248
|
+
servers: operationServers.map((s) => s.uid)
|
|
249
|
+
};
|
|
250
|
+
if (operationSecurity?.length) requestPayload.security = operationSecurity.map((s) => {
|
|
251
|
+
if (Object.keys(s).length) {
|
|
252
|
+
const [key] = Object.keys(s);
|
|
253
|
+
if (!key) return s;
|
|
254
|
+
return { [key]: s[key] };
|
|
255
|
+
}
|
|
256
|
+
return s;
|
|
257
|
+
});
|
|
258
|
+
const request = schemaModel(requestPayload, requestSchema, false);
|
|
259
|
+
if (!request) return false;
|
|
260
|
+
requestMutators.add(request, activeCollection.value.uid);
|
|
261
|
+
} else if (diff.type === "REMOVE") {
|
|
262
|
+
const request = findResource(activeCollection.value.requests, requests, (_request) => _request.path === path && _request.method === method);
|
|
263
|
+
if (!request) return false;
|
|
264
|
+
requestMutators.delete(request, activeCollection.value.uid);
|
|
265
|
+
} else if (diff.type === "CHANGE") {
|
|
266
|
+
const request = findResource(activeCollection.value.requests, requests, (r) => r.path === path && r.method === method);
|
|
267
|
+
const parsed = parseDiff(requestSchema, {
|
|
268
|
+
...diff,
|
|
269
|
+
path: keys
|
|
270
|
+
});
|
|
271
|
+
if (!request || !parsed) return false;
|
|
272
|
+
requestMutators.edit(request.uid, parsed.path, parsed.value);
|
|
273
|
+
if (diff.path[3] === "parameters" || diff.path[3] === "requestBody") updateRequestExamples(request.uid, store);
|
|
274
|
+
}
|
|
275
|
+
return true;
|
|
276
|
+
};
|
|
277
|
+
/** Generates a payload for the server mutator from the server diff including the mutator method */
|
|
278
|
+
var mutateServerDiff = (diff, { activeCollection }, { servers, serverMutators }) => {
|
|
279
|
+
if (!activeCollection.value) return false;
|
|
280
|
+
const [, index, ...keys] = diff.path;
|
|
281
|
+
if (keys?.length) {
|
|
282
|
+
const serverUid = activeCollection.value.servers[index];
|
|
283
|
+
if (!serverUid) return false;
|
|
284
|
+
const server = servers[serverUid];
|
|
285
|
+
const parsed = parseDiff(serverSchema, {
|
|
286
|
+
...diff,
|
|
287
|
+
path: keys
|
|
288
|
+
});
|
|
289
|
+
if (!server || !parsed) return false;
|
|
290
|
+
const value = diff.type === "REMOVE" && keys[keys.length - 1] === "variables" ? {} : parsed.value;
|
|
291
|
+
serverMutators.edit(serverUid, parsed.path, value);
|
|
292
|
+
} else if (diff.type === "REMOVE") {
|
|
293
|
+
if (!activeCollection.value.servers[index]) return false;
|
|
294
|
+
serverMutators.delete(activeCollection.value.servers[index], activeCollection.value.uid);
|
|
295
|
+
} else if (diff.type === "CREATE") {
|
|
296
|
+
const parsed = schemaModel(diff.value, serverSchema, false);
|
|
297
|
+
if (!parsed) return false;
|
|
298
|
+
serverMutators.add(parsed, activeCollection.value.uid);
|
|
299
|
+
}
|
|
300
|
+
return true;
|
|
301
|
+
};
|
|
302
|
+
/** Generates a payload for the tag mutator from the tag diff */
|
|
303
|
+
var mutateTagDiff = (diff, { activeCollection }, { tags, tagMutators }) => {
|
|
304
|
+
if (!activeCollection.value) return false;
|
|
305
|
+
const [, index, ...keys] = diff.path;
|
|
306
|
+
if (keys?.length) {
|
|
307
|
+
const tagUid = activeCollection.value.tags[index];
|
|
308
|
+
if (!tagUid) return false;
|
|
309
|
+
const tag = tags[tagUid];
|
|
310
|
+
const parsed = parseDiff(tagSchema, {
|
|
311
|
+
...diff,
|
|
312
|
+
path: keys
|
|
313
|
+
});
|
|
314
|
+
if (!tag || !parsed) return false;
|
|
315
|
+
tagMutators.edit(tagUid, parsed.path, parsed.value);
|
|
316
|
+
} else if (diff.type === "REMOVE") {
|
|
317
|
+
const tagUid = activeCollection.value.tags[index];
|
|
318
|
+
if (!tagUid) return false;
|
|
319
|
+
const tag = tags[tagUid];
|
|
320
|
+
if (!tag) return false;
|
|
321
|
+
tagMutators.delete(tag, activeCollection.value.uid);
|
|
322
|
+
} else if (diff.type === "CREATE") {
|
|
323
|
+
const parsed = schemaModel(diff.value, tagSchema, false);
|
|
324
|
+
if (!parsed) return false;
|
|
325
|
+
tagMutators.add(parsed, activeCollection.value.uid);
|
|
326
|
+
}
|
|
327
|
+
return true;
|
|
328
|
+
};
|
|
329
|
+
/** Narrows down a zod union schema */
|
|
330
|
+
var narrowUnionSchema = (schema, key, value) => {
|
|
331
|
+
const _schema = unwrapSchema(schema);
|
|
332
|
+
if (_schema instanceof z.ZodUnion || _schema instanceof z.ZodDiscriminatedUnion) for (const option of _schema.options) {
|
|
333
|
+
if (!(option instanceof z.ZodType)) continue;
|
|
334
|
+
const unwrappedOption = unwrapSchema(option);
|
|
335
|
+
if (unwrappedOption instanceof z.ZodObject && key in unwrappedOption.shape) {
|
|
336
|
+
const fieldSchema = unwrapSchema(unwrappedOption.shape[key]);
|
|
337
|
+
if (fieldSchema instanceof z.ZodLiteral && fieldSchema.value === value) return unwrappedOption;
|
|
338
|
+
if (fieldSchema instanceof z.ZodDefault && fieldSchema._zod.def.innerType instanceof z.ZodLiteral && fieldSchema._zod.def.innerType.value === value) return unwrappedOption;
|
|
339
|
+
if (fieldSchema instanceof z.ZodOptional && fieldSchema._zod.def.innerType instanceof z.ZodLiteral && fieldSchema._zod.def.innerType.value === value) return unwrappedOption;
|
|
340
|
+
if (fieldSchema instanceof z.ZodDefault && fieldSchema._zod.def.innerType instanceof z.ZodOptional && fieldSchema._zod.def.innerType._zod.def.innerType instanceof z.ZodLiteral && fieldSchema._zod.def.innerType._zod.def.innerType.value === value) return unwrappedOption;
|
|
341
|
+
}
|
|
342
|
+
}
|
|
343
|
+
return null;
|
|
344
|
+
};
|
|
345
|
+
/**
|
|
346
|
+
* Generates a payload for the security scheme mutator from the security scheme diff, then executes that mutation
|
|
347
|
+
*
|
|
348
|
+
* Note: for edit we cannot use parseDiff here as it can't do unions, so we handle the unions first
|
|
349
|
+
*
|
|
350
|
+
* @returns true if it succeeds, and false for a failure
|
|
351
|
+
*/
|
|
352
|
+
var mutateSecuritySchemeDiff = (diff, { activeCollection }, { securitySchemes, securitySchemeMutators }) => {
|
|
353
|
+
if (!activeCollection.value) return false;
|
|
354
|
+
const [, , schemeName, ...keys] = diff.path;
|
|
355
|
+
const scheme = securitySchemes[schemeName] ?? findResource(activeCollection.value.securitySchemes, securitySchemes, (s) => s.nameKey === schemeName);
|
|
356
|
+
if (keys?.length) {
|
|
357
|
+
const schema = narrowUnionSchema(securitySchemeSchema, "type", scheme?.type ?? "");
|
|
358
|
+
if (!schema || !scheme) return false;
|
|
359
|
+
const parsed = parseDiff(schema, {
|
|
360
|
+
...diff,
|
|
361
|
+
path: keys
|
|
362
|
+
});
|
|
363
|
+
if (!parsed) return false;
|
|
364
|
+
const path = parsed.path;
|
|
365
|
+
securitySchemeMutators.edit(scheme.uid, path, parsed.value);
|
|
366
|
+
} else if (diff.type === "REMOVE") {
|
|
367
|
+
if (!scheme) return false;
|
|
368
|
+
securitySchemeMutators.delete(scheme.uid);
|
|
369
|
+
} else if (diff.type === "CREATE") securitySchemeMutators.add(securitySchemeSchema.parse(diff.value), activeCollection.value.uid);
|
|
370
|
+
return true;
|
|
371
|
+
};
|
|
372
|
+
//#endregion
|
|
373
|
+
export { mutateSecuritySchemeDiff as a, narrowUnionSchema as c, mutateRequestDiff as i, parseDiff as l, findResource as n, mutateServerDiff as o, mutateCollectionDiff as r, mutateTagDiff as s, combineRenameDiffs as t, traverseZodSchema as u };
|
|
374
|
+
|
|
375
|
+
//# sourceMappingURL=watch-mode-Dbaqd9bG.js.map
|