feat: add support for AWS Signature auth type (#4142)
Co-authored-by: jamesgeorge007 <25279263+jamesgeorge007@users.noreply.github.com> Co-authored-by: nivedin <nivedinp@gmail.com>
This commit is contained in:
@@ -174,7 +174,16 @@
|
|||||||
"save_to_inherit": "Please save this request in any collection to inherit the authorization",
|
"save_to_inherit": "Please save this request in any collection to inherit the authorization",
|
||||||
"token": "Token",
|
"token": "Token",
|
||||||
"type": "Authorization Type",
|
"type": "Authorization Type",
|
||||||
"username": "Username"
|
"username": "Username",
|
||||||
|
"aws_signature": {
|
||||||
|
"access_key": "Access Key",
|
||||||
|
"secret_key": "Secret Key",
|
||||||
|
"service_name": "Service Name",
|
||||||
|
"aws_region": "AWS Region",
|
||||||
|
"service_token": "Service Token",
|
||||||
|
"advance_config": "Advanced Configuration",
|
||||||
|
"advance_config_description": "Hoppscotch automatically assigns default values to certain fields if no explicit value is provided"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"collection": {
|
"collection": {
|
||||||
"created": "Collection created",
|
"created": "Collection created",
|
||||||
|
|||||||
@@ -49,6 +49,7 @@
|
|||||||
"@vueuse/core": "10.7.0",
|
"@vueuse/core": "10.7.0",
|
||||||
"acorn-walk": "8.3.0",
|
"acorn-walk": "8.3.0",
|
||||||
"axios": "1.7.5",
|
"axios": "1.7.5",
|
||||||
|
"aws4fetch": "1.0.19",
|
||||||
"buffer": "6.0.3",
|
"buffer": "6.0.3",
|
||||||
"cookie-es": "1.0.0",
|
"cookie-es": "1.0.0",
|
||||||
"dioc": "3.0.2",
|
"dioc": "3.0.2",
|
||||||
|
|||||||
438
packages/hoppscotch-common/src/components.d.ts
vendored
438
packages/hoppscotch-common/src/components.d.ts
vendored
@@ -5,230 +5,238 @@
|
|||||||
// Read more: https://github.com/vuejs/core/pull/3399
|
// Read more: https://github.com/vuejs/core/pull/3399
|
||||||
export {}
|
export {}
|
||||||
|
|
||||||
declare module "vue" {
|
declare module 'vue' {
|
||||||
export interface GlobalComponents {
|
export interface GlobalComponents {
|
||||||
AccessTokens: (typeof import("./components/accessTokens/index.vue"))["default"]
|
AccessTokens: typeof import('./components/accessTokens/index.vue')['default']
|
||||||
AccessTokensGenerateModal: (typeof import("./components/accessTokens/GenerateModal.vue"))["default"]
|
AccessTokensGenerateModal: typeof import('./components/accessTokens/GenerateModal.vue')['default']
|
||||||
AccessTokensList: (typeof import("./components/accessTokens/List.vue"))["default"]
|
AccessTokensList: typeof import('./components/accessTokens/List.vue')['default']
|
||||||
AccessTokensOverview: (typeof import("./components/accessTokens/Overview.vue"))["default"]
|
AccessTokensOverview: typeof import('./components/accessTokens/Overview.vue')['default']
|
||||||
AppActionHandler: (typeof import("./components/app/ActionHandler.vue"))["default"]
|
AppActionHandler: typeof import('./components/app/ActionHandler.vue')['default']
|
||||||
AppBanner: (typeof import("./components/app/Banner.vue"))["default"]
|
AppBanner: typeof import('./components/app/Banner.vue')['default']
|
||||||
AppContextMenu: (typeof import("./components/app/ContextMenu.vue"))["default"]
|
AppContextMenu: typeof import('./components/app/ContextMenu.vue')['default']
|
||||||
AppDeveloperOptions: (typeof import("./components/app/DeveloperOptions.vue"))["default"]
|
AppDeveloperOptions: typeof import('./components/app/DeveloperOptions.vue')['default']
|
||||||
AppDrawer: (typeof import("./components/app/Drawer.vue"))["default"]
|
AppDrawer: (typeof import("./components/app/Drawer.vue"))["default"]
|
||||||
AppFooter: (typeof import("./components/app/Footer.vue"))["default"]
|
AppFooter: typeof import('./components/app/Footer.vue')['default']
|
||||||
AppGitHubStarButton: (typeof import("./components/app/GitHubStarButton.vue"))["default"]
|
AppGitHubStarButton: typeof import('./components/app/GitHubStarButton.vue')['default']
|
||||||
AppHeader: (typeof import("./components/app/Header.vue"))["default"]
|
AppHeader: typeof import('./components/app/Header.vue')['default']
|
||||||
AppInspection: (typeof import("./components/app/Inspection.vue"))["default"]
|
AppInspection: typeof import('./components/app/Inspection.vue')['default']
|
||||||
AppInterceptor: (typeof import("./components/app/Interceptor.vue"))["default"]
|
AppInterceptor: typeof import('./components/app/Interceptor.vue')['default']
|
||||||
AppLogo: (typeof import("./components/app/Logo.vue"))["default"]
|
AppLogo: typeof import('./components/app/Logo.vue')['default']
|
||||||
AppOptions: (typeof import("./components/app/Options.vue"))["default"]
|
AppOptions: typeof import('./components/app/Options.vue')['default']
|
||||||
AppPaneLayout: (typeof import("./components/app/PaneLayout.vue"))["default"]
|
AppPaneLayout: typeof import('./components/app/PaneLayout.vue')['default']
|
||||||
AppPWAPrompt: (typeof import("./components/app/PWAPrompt.vue"))["default"]
|
AppPWAPrompt: (typeof import("./components/app/PWAPrompt.vue"))["default"]
|
||||||
AppShare: (typeof import("./components/app/Share.vue"))["default"]
|
AppShare: typeof import('./components/app/Share.vue')['default']
|
||||||
AppShortcuts: (typeof import("./components/app/Shortcuts.vue"))["default"]
|
AppShortcuts: typeof import('./components/app/Shortcuts.vue')['default']
|
||||||
AppShortcutsEntry: (typeof import("./components/app/ShortcutsEntry.vue"))["default"]
|
AppShortcutsEntry: typeof import('./components/app/ShortcutsEntry.vue')['default']
|
||||||
AppShortcutsPrompt: (typeof import("./components/app/ShortcutsPrompt.vue"))["default"]
|
AppShortcutsPrompt: typeof import('./components/app/ShortcutsPrompt.vue')['default']
|
||||||
AppSidenav: (typeof import("./components/app/Sidenav.vue"))["default"]
|
AppSidenav: typeof import('./components/app/Sidenav.vue')['default']
|
||||||
AppSpotlight: (typeof import("./components/app/spotlight/index.vue"))["default"]
|
AppSpotlight: typeof import('./components/app/spotlight/index.vue')['default']
|
||||||
AppSpotlightEntry: (typeof import("./components/app/spotlight/Entry.vue"))["default"]
|
AppSpotlightEntry: typeof import('./components/app/spotlight/Entry.vue')['default']
|
||||||
AppSpotlightEntryGQLHistory: (typeof import("./components/app/spotlight/entry/GQLHistory.vue"))["default"]
|
AppSpotlightEntryGQLHistory: typeof import('./components/app/spotlight/entry/GQLHistory.vue')['default']
|
||||||
AppSpotlightEntryGQLRequest: (typeof import("./components/app/spotlight/entry/GQLRequest.vue"))["default"]
|
AppSpotlightEntryGQLRequest: typeof import('./components/app/spotlight/entry/GQLRequest.vue')['default']
|
||||||
AppSpotlightEntryIconSelected: (typeof import("./components/app/spotlight/entry/IconSelected.vue"))["default"]
|
AppSpotlightEntryIconSelected: typeof import('./components/app/spotlight/entry/IconSelected.vue')['default']
|
||||||
AppSpotlightEntryRESTHistory: (typeof import("./components/app/spotlight/entry/RESTHistory.vue"))["default"]
|
AppSpotlightEntryRESTHistory: typeof import('./components/app/spotlight/entry/RESTHistory.vue')['default']
|
||||||
AppSpotlightEntryRESTRequest: (typeof import("./components/app/spotlight/entry/RESTRequest.vue"))["default"]
|
AppSpotlightEntryRESTRequest: typeof import('./components/app/spotlight/entry/RESTRequest.vue')['default']
|
||||||
AppSpotlightEntryRESTTeamRequestEntry: (typeof import("./components/app/spotlight/entry/RESTTeamRequestEntry.vue"))["default"]
|
AppSpotlightEntryRESTTeamRequestEntry: typeof import('./components/app/spotlight/entry/RESTTeamRequestEntry.vue')['default']
|
||||||
AppSpotlightSearch: (typeof import("./components/app/SpotlightSearch.vue"))["default"]
|
AppSpotlightSearch: typeof import('./components/app/SpotlightSearch.vue')['default']
|
||||||
AppSupport: (typeof import("./components/app/Support.vue"))["default"]
|
AppSupport: typeof import('./components/app/Support.vue')['default']
|
||||||
AppWhatsNewDialog: (typeof import("./components/app/WhatsNewDialog.vue"))["default"]
|
AppWhatsNewDialog: typeof import('./components/app/WhatsNewDialog.vue')['default']
|
||||||
Collections: (typeof import("./components/collections/index.vue"))["default"]
|
Collections: typeof import('./components/collections/index.vue')['default']
|
||||||
CollectionsAdd: (typeof import("./components/collections/Add.vue"))["default"]
|
CollectionsAdd: typeof import('./components/collections/Add.vue')['default']
|
||||||
CollectionsAddFolder: (typeof import("./components/collections/AddFolder.vue"))["default"]
|
CollectionsAddFolder: typeof import('./components/collections/AddFolder.vue')['default']
|
||||||
CollectionsAddRequest: (typeof import("./components/collections/AddRequest.vue"))["default"]
|
CollectionsAddRequest: typeof import('./components/collections/AddRequest.vue')['default']
|
||||||
CollectionsCollection: (typeof import("./components/collections/Collection.vue"))["default"]
|
CollectionsCollection: typeof import('./components/collections/Collection.vue')['default']
|
||||||
CollectionsEdit: (typeof import("./components/collections/Edit.vue"))["default"]
|
CollectionsEdit: typeof import('./components/collections/Edit.vue')['default']
|
||||||
CollectionsEditFolder: (typeof import("./components/collections/EditFolder.vue"))["default"]
|
CollectionsEditFolder: typeof import('./components/collections/EditFolder.vue')['default']
|
||||||
CollectionsEditRequest: (typeof import("./components/collections/EditRequest.vue"))["default"]
|
CollectionsEditRequest: typeof import('./components/collections/EditRequest.vue')['default']
|
||||||
CollectionsGraphql: (typeof import("./components/collections/graphql/index.vue"))["default"]
|
CollectionsGraphql: typeof import('./components/collections/graphql/index.vue')['default']
|
||||||
CollectionsGraphqlAdd: (typeof import("./components/collections/graphql/Add.vue"))["default"]
|
CollectionsGraphqlAdd: typeof import('./components/collections/graphql/Add.vue')['default']
|
||||||
CollectionsGraphqlAddFolder: (typeof import("./components/collections/graphql/AddFolder.vue"))["default"]
|
CollectionsGraphqlAddFolder: typeof import('./components/collections/graphql/AddFolder.vue')['default']
|
||||||
CollectionsGraphqlAddRequest: (typeof import("./components/collections/graphql/AddRequest.vue"))["default"]
|
CollectionsGraphqlAddRequest: typeof import('./components/collections/graphql/AddRequest.vue')['default']
|
||||||
CollectionsGraphqlCollection: (typeof import("./components/collections/graphql/Collection.vue"))["default"]
|
CollectionsGraphqlCollection: typeof import('./components/collections/graphql/Collection.vue')['default']
|
||||||
CollectionsGraphqlEdit: (typeof import("./components/collections/graphql/Edit.vue"))["default"]
|
CollectionsGraphqlEdit: typeof import('./components/collections/graphql/Edit.vue')['default']
|
||||||
CollectionsGraphqlEditFolder: (typeof import("./components/collections/graphql/EditFolder.vue"))["default"]
|
CollectionsGraphqlEditFolder: typeof import('./components/collections/graphql/EditFolder.vue')['default']
|
||||||
CollectionsGraphqlEditRequest: (typeof import("./components/collections/graphql/EditRequest.vue"))["default"]
|
CollectionsGraphqlEditRequest: typeof import('./components/collections/graphql/EditRequest.vue')['default']
|
||||||
CollectionsGraphqlFolder: (typeof import("./components/collections/graphql/Folder.vue"))["default"]
|
CollectionsGraphqlFolder: typeof import('./components/collections/graphql/Folder.vue')['default']
|
||||||
CollectionsGraphqlImportExport: (typeof import("./components/collections/graphql/ImportExport.vue"))["default"]
|
CollectionsGraphqlImportExport: typeof import('./components/collections/graphql/ImportExport.vue')['default']
|
||||||
CollectionsGraphqlRequest: (typeof import("./components/collections/graphql/Request.vue"))["default"]
|
CollectionsGraphqlRequest: typeof import('./components/collections/graphql/Request.vue')['default']
|
||||||
CollectionsImportExport: (typeof import("./components/collections/ImportExport.vue"))["default"]
|
CollectionsImportExport: typeof import('./components/collections/ImportExport.vue')['default']
|
||||||
CollectionsMyCollections: (typeof import("./components/collections/MyCollections.vue"))["default"]
|
CollectionsMyCollections: typeof import('./components/collections/MyCollections.vue')['default']
|
||||||
CollectionsProperties: (typeof import("./components/collections/Properties.vue"))["default"]
|
CollectionsProperties: typeof import('./components/collections/Properties.vue')['default']
|
||||||
CollectionsRequest: (typeof import("./components/collections/Request.vue"))["default"]
|
CollectionsRequest: typeof import('./components/collections/Request.vue')['default']
|
||||||
CollectionsRunner: (typeof import("./components/collections/Runner.vue"))["default"]
|
CollectionsRunner: typeof import('./components/collections/Runner.vue')['default']
|
||||||
CollectionsSaveRequest: (typeof import("./components/collections/SaveRequest.vue"))["default"]
|
CollectionsSaveRequest: typeof import('./components/collections/SaveRequest.vue')['default']
|
||||||
CollectionsTeamCollections: (typeof import("./components/collections/TeamCollections.vue"))["default"]
|
CollectionsTeamCollections: typeof import('./components/collections/TeamCollections.vue')['default']
|
||||||
CookiesAllModal: (typeof import("./components/cookies/AllModal.vue"))["default"]
|
CookiesAllModal: typeof import('./components/cookies/AllModal.vue')['default']
|
||||||
CookiesEditCookie: (typeof import("./components/cookies/EditCookie.vue"))["default"]
|
CookiesEditCookie: typeof import('./components/cookies/EditCookie.vue')['default']
|
||||||
Embeds: (typeof import("./components/embeds/index.vue"))["default"]
|
Embeds: typeof import('./components/embeds/index.vue')['default']
|
||||||
EmbedsHeader: (typeof import("./components/embeds/Header.vue"))["default"]
|
EmbedsHeader: typeof import('./components/embeds/Header.vue')['default']
|
||||||
EmbedsRequest: (typeof import("./components/embeds/Request.vue"))["default"]
|
EmbedsRequest: typeof import('./components/embeds/Request.vue')['default']
|
||||||
Environments: (typeof import("./components/environments/index.vue"))["default"]
|
Environments: typeof import('./components/environments/index.vue')['default']
|
||||||
EnvironmentsAdd: (typeof import("./components/environments/Add.vue"))["default"]
|
EnvironmentsAdd: typeof import('./components/environments/Add.vue')['default']
|
||||||
EnvironmentsImportExport: (typeof import("./components/environments/ImportExport.vue"))["default"]
|
EnvironmentsImportExport: typeof import('./components/environments/ImportExport.vue')['default']
|
||||||
EnvironmentsMy: (typeof import("./components/environments/my/index.vue"))["default"]
|
EnvironmentsMy: typeof import('./components/environments/my/index.vue')['default']
|
||||||
EnvironmentsMyDetails: (typeof import("./components/environments/my/Details.vue"))["default"]
|
EnvironmentsMyDetails: typeof import('./components/environments/my/Details.vue')['default']
|
||||||
EnvironmentsMyEnvironment: (typeof import("./components/environments/my/Environment.vue"))["default"]
|
EnvironmentsMyEnvironment: typeof import('./components/environments/my/Environment.vue')['default']
|
||||||
EnvironmentsProperties: (typeof import("./components/environments/Properties.vue"))["default"]
|
EnvironmentsProperties: typeof import('./components/environments/Properties.vue')['default']
|
||||||
EnvironmentsSelector: (typeof import("./components/environments/Selector.vue"))["default"]
|
EnvironmentsSelector: typeof import('./components/environments/Selector.vue')['default']
|
||||||
EnvironmentsTeams: (typeof import("./components/environments/teams/index.vue"))["default"]
|
EnvironmentsTeams: typeof import('./components/environments/teams/index.vue')['default']
|
||||||
EnvironmentsTeamsDetails: (typeof import("./components/environments/teams/Details.vue"))["default"]
|
EnvironmentsTeamsDetails: typeof import('./components/environments/teams/Details.vue')['default']
|
||||||
EnvironmentsTeamsEnvironment: (typeof import("./components/environments/teams/Environment.vue"))["default"]
|
EnvironmentsTeamsEnvironment: typeof import('./components/environments/teams/Environment.vue')['default']
|
||||||
FirebaseLogin: (typeof import("./components/firebase/Login.vue"))["default"]
|
FirebaseLogin: typeof import('./components/firebase/Login.vue')['default']
|
||||||
FirebaseLogout: (typeof import("./components/firebase/Logout.vue"))["default"]
|
FirebaseLogout: typeof import('./components/firebase/Logout.vue')['default']
|
||||||
GraphqlAuthorization: (typeof import("./components/graphql/Authorization.vue"))["default"]
|
GraphqlAuthorization: typeof import('./components/graphql/Authorization.vue')['default']
|
||||||
GraphqlField: (typeof import("./components/graphql/Field.vue"))["default"]
|
GraphqlField: typeof import('./components/graphql/Field.vue')['default']
|
||||||
GraphqlHeaders: (typeof import("./components/graphql/Headers.vue"))["default"]
|
GraphqlHeaders: typeof import('./components/graphql/Headers.vue')['default']
|
||||||
GraphqlQuery: (typeof import("./components/graphql/Query.vue"))["default"]
|
GraphqlQuery: typeof import('./components/graphql/Query.vue')['default']
|
||||||
GraphqlRequest: (typeof import("./components/graphql/Request.vue"))["default"]
|
GraphqlRequest: typeof import('./components/graphql/Request.vue')['default']
|
||||||
GraphqlRequestOptions: (typeof import("./components/graphql/RequestOptions.vue"))["default"]
|
GraphqlRequestOptions: typeof import('./components/graphql/RequestOptions.vue')['default']
|
||||||
GraphqlRequestTab: (typeof import("./components/graphql/RequestTab.vue"))["default"]
|
GraphqlRequestTab: typeof import('./components/graphql/RequestTab.vue')['default']
|
||||||
GraphqlResponse: (typeof import("./components/graphql/Response.vue"))["default"]
|
GraphqlResponse: typeof import('./components/graphql/Response.vue')['default']
|
||||||
GraphqlSidebar: (typeof import("./components/graphql/Sidebar.vue"))["default"]
|
GraphqlSidebar: typeof import('./components/graphql/Sidebar.vue')['default']
|
||||||
GraphqlSubscriptionLog: (typeof import("./components/graphql/SubscriptionLog.vue"))["default"]
|
GraphqlSubscriptionLog: typeof import('./components/graphql/SubscriptionLog.vue')['default']
|
||||||
GraphqlTabHead: (typeof import("./components/graphql/TabHead.vue"))["default"]
|
GraphqlTabHead: typeof import('./components/graphql/TabHead.vue')['default']
|
||||||
GraphqlType: (typeof import("./components/graphql/Type.vue"))["default"]
|
GraphqlType: typeof import('./components/graphql/Type.vue')['default']
|
||||||
GraphqlTypeLink: (typeof import("./components/graphql/TypeLink.vue"))["default"]
|
GraphqlTypeLink: typeof import('./components/graphql/TypeLink.vue')['default']
|
||||||
GraphqlVariable: (typeof import("./components/graphql/Variable.vue"))["default"]
|
GraphqlVariable: typeof import('./components/graphql/Variable.vue')['default']
|
||||||
History: (typeof import("./components/history/index.vue"))["default"]
|
History: typeof import('./components/history/index.vue')['default']
|
||||||
HistoryGraphqlCard: (typeof import("./components/history/graphql/Card.vue"))["default"]
|
HistoryGraphqlCard: typeof import('./components/history/graphql/Card.vue')['default']
|
||||||
HistoryRestCard: (typeof import("./components/history/rest/Card.vue"))["default"]
|
HistoryRestCard: typeof import('./components/history/rest/Card.vue')['default']
|
||||||
HoppButtonPrimary: (typeof import("@hoppscotch/ui"))["HoppButtonPrimary"]
|
HoppButtonPrimary: typeof import('@hoppscotch/ui')['HoppButtonPrimary']
|
||||||
HoppButtonSecondary: (typeof import("@hoppscotch/ui"))["HoppButtonSecondary"]
|
HoppButtonSecondary: typeof import('@hoppscotch/ui')['HoppButtonSecondary']
|
||||||
HoppSmartAnchor: (typeof import("@hoppscotch/ui"))["HoppSmartAnchor"]
|
HoppSmartAnchor: typeof import('@hoppscotch/ui')['HoppSmartAnchor']
|
||||||
HoppSmartCheckbox: (typeof import("@hoppscotch/ui"))["HoppSmartCheckbox"]
|
HoppSmartCheckbox: typeof import('@hoppscotch/ui')['HoppSmartCheckbox']
|
||||||
HoppSmartConfirmModal: (typeof import("@hoppscotch/ui"))["HoppSmartConfirmModal"]
|
HoppSmartConfirmModal: typeof import('@hoppscotch/ui')['HoppSmartConfirmModal']
|
||||||
HoppSmartExpand: (typeof import("@hoppscotch/ui"))["HoppSmartExpand"]
|
HoppSmartExpand: typeof import('@hoppscotch/ui')['HoppSmartExpand']
|
||||||
HoppSmartFileChip: (typeof import("@hoppscotch/ui"))["HoppSmartFileChip"]
|
HoppSmartFileChip: typeof import('@hoppscotch/ui')['HoppSmartFileChip']
|
||||||
HoppSmartInput: (typeof import("@hoppscotch/ui"))["HoppSmartInput"]
|
HoppSmartInput: typeof import('@hoppscotch/ui')['HoppSmartInput']
|
||||||
HoppSmartIntersection: (typeof import("@hoppscotch/ui"))["HoppSmartIntersection"]
|
HoppSmartIntersection: typeof import('@hoppscotch/ui')['HoppSmartIntersection']
|
||||||
HoppSmartItem: (typeof import("@hoppscotch/ui"))["HoppSmartItem"]
|
HoppSmartItem: typeof import('@hoppscotch/ui')['HoppSmartItem']
|
||||||
HoppSmartLink: (typeof import("@hoppscotch/ui"))["HoppSmartLink"]
|
HoppSmartLink: typeof import('@hoppscotch/ui')['HoppSmartLink']
|
||||||
HoppSmartModal: (typeof import("@hoppscotch/ui"))["HoppSmartModal"]
|
HoppSmartModal: typeof import('@hoppscotch/ui')['HoppSmartModal']
|
||||||
HoppSmartPicture: (typeof import("@hoppscotch/ui"))["HoppSmartPicture"]
|
HoppSmartPicture: typeof import('@hoppscotch/ui')['HoppSmartPicture']
|
||||||
HoppSmartPlaceholder: (typeof import("@hoppscotch/ui"))["HoppSmartPlaceholder"]
|
HoppSmartPlaceholder: typeof import('@hoppscotch/ui')['HoppSmartPlaceholder']
|
||||||
HoppSmartProgressRing: (typeof import("@hoppscotch/ui"))["HoppSmartProgressRing"]
|
HoppSmartProgressRing: typeof import('@hoppscotch/ui')['HoppSmartProgressRing']
|
||||||
HoppSmartRadio: (typeof import("@hoppscotch/ui"))["HoppSmartRadio"]
|
HoppSmartRadio: typeof import('@hoppscotch/ui')['HoppSmartRadio']
|
||||||
HoppSmartRadioGroup: (typeof import("@hoppscotch/ui"))["HoppSmartRadioGroup"]
|
HoppSmartRadioGroup: typeof import('@hoppscotch/ui')['HoppSmartRadioGroup']
|
||||||
HoppSmartSelectWrapper: (typeof import("@hoppscotch/ui"))["HoppSmartSelectWrapper"]
|
HoppSmartSelectWrapper: typeof import('@hoppscotch/ui')['HoppSmartSelectWrapper']
|
||||||
HoppSmartSlideOver: (typeof import("@hoppscotch/ui"))["HoppSmartSlideOver"]
|
HoppSmartSlideOver: typeof import('@hoppscotch/ui')['HoppSmartSlideOver']
|
||||||
HoppSmartSpinner: (typeof import("@hoppscotch/ui"))["HoppSmartSpinner"]
|
HoppSmartSpinner: typeof import('@hoppscotch/ui')['HoppSmartSpinner']
|
||||||
HoppSmartTab: (typeof import("@hoppscotch/ui"))["HoppSmartTab"]
|
HoppSmartTab: typeof import('@hoppscotch/ui')['HoppSmartTab']
|
||||||
HoppSmartTabs: (typeof import("@hoppscotch/ui"))["HoppSmartTabs"]
|
HoppSmartTabs: typeof import('@hoppscotch/ui')['HoppSmartTabs']
|
||||||
HoppSmartToggle: (typeof import("@hoppscotch/ui"))["HoppSmartToggle"]
|
HoppSmartToggle: typeof import('@hoppscotch/ui')['HoppSmartToggle']
|
||||||
HoppSmartTree: (typeof import("@hoppscotch/ui"))["HoppSmartTree"]
|
HoppSmartTree: typeof import('@hoppscotch/ui')['HoppSmartTree']
|
||||||
HoppSmartWindow: (typeof import("@hoppscotch/ui"))["HoppSmartWindow"]
|
HoppSmartWindow: typeof import('@hoppscotch/ui')['HoppSmartWindow']
|
||||||
HoppSmartWindows: (typeof import("@hoppscotch/ui"))["HoppSmartWindows"]
|
HoppSmartWindows: typeof import('@hoppscotch/ui')['HoppSmartWindows']
|
||||||
HttpAuthorization: (typeof import("./components/http/Authorization.vue"))["default"]
|
HttpAuthorization: typeof import('./components/http/Authorization.vue')['default']
|
||||||
HttpAuthorizationApiKey: (typeof import("./components/http/authorization/ApiKey.vue"))["default"]
|
HttpAuthorizationAkamaiEG: typeof import('./components/http/authorization/AkamaiEG.vue')['default']
|
||||||
HttpAuthorizationBasic: (typeof import("./components/http/authorization/Basic.vue"))["default"]
|
HttpAuthorizationApiKey: typeof import('./components/http/authorization/ApiKey.vue')['default']
|
||||||
HttpBody: (typeof import("./components/http/Body.vue"))["default"]
|
HttpAuthorizationASAP: typeof import('./components/http/authorization/ASAP.vue')['default']
|
||||||
HttpBodyParameters: (typeof import("./components/http/BodyParameters.vue"))["default"]
|
HttpAuthorizationAWSSign: typeof import('./components/http/authorization/AWSSign.vue')['default']
|
||||||
HttpCodegen: (typeof import("./components/http/Codegen.vue"))["default"]
|
HttpAuthorizationBasic: typeof import('./components/http/authorization/Basic.vue')['default']
|
||||||
HttpCodegenModal: (typeof import("./components/http/CodegenModal.vue"))["default"]
|
HttpAuthorizationHAWK: typeof import('./components/http/authorization/HAWK.vue')['default']
|
||||||
HttpHeaders: (typeof import("./components/http/Headers.vue"))["default"]
|
HttpAuthorizationNTLM: typeof import('./components/http/authorization/NTLM.vue')['default']
|
||||||
HttpImportCurl: (typeof import("./components/http/ImportCurl.vue"))["default"]
|
HttpAuthorizationOAuth2: typeof import('./components/http/authorization/OAuth2.vue')['default']
|
||||||
HttpKeyValue: (typeof import("./components/http/KeyValue.vue"))["default"]
|
HttpAuthorizationOAuth2Authorization: (typeof import("./components/http/authorization/OAuth2Authorization.vue"))["default"]
|
||||||
|
HttpBody: typeof import('./components/http/Body.vue')['default']
|
||||||
|
HttpBodyParameters: typeof import('./components/http/BodyParameters.vue')['default']
|
||||||
|
HttpCodegen: typeof import('./components/http/Codegen.vue')['default']
|
||||||
|
HttpCodegenModal: typeof import('./components/http/CodegenModal.vue')['default']
|
||||||
|
HttpHeaders: typeof import('./components/http/Headers.vue')['default']
|
||||||
|
HttpImportCurl: typeof import('./components/http/ImportCurl.vue')['default']
|
||||||
|
HttpKeyValue: typeof import('./components/http/KeyValue.vue')['default']
|
||||||
HttpOAuth2Authorization: (typeof import("./components/http/OAuth2Authorization.vue"))["default"]
|
HttpOAuth2Authorization: (typeof import("./components/http/OAuth2Authorization.vue"))["default"]
|
||||||
HttpParameters: (typeof import("./components/http/Parameters.vue"))["default"]
|
HttpParameters: typeof import('./components/http/Parameters.vue')['default']
|
||||||
HttpPreRequestScript: (typeof import("./components/http/PreRequestScript.vue"))["default"]
|
HttpPreRequestScript: typeof import('./components/http/PreRequestScript.vue')['default']
|
||||||
HttpRawBody: (typeof import("./components/http/RawBody.vue"))["default"]
|
HttpRawBody: typeof import('./components/http/RawBody.vue')['default']
|
||||||
HttpReqChangeConfirmModal: (typeof import("./components/http/ReqChangeConfirmModal.vue"))["default"]
|
HttpReqChangeConfirmModal: typeof import('./components/http/ReqChangeConfirmModal.vue')['default']
|
||||||
HttpRequest: (typeof import("./components/http/Request.vue"))["default"]
|
HttpRequest: typeof import('./components/http/Request.vue')['default']
|
||||||
HttpRequestOptions: (typeof import("./components/http/RequestOptions.vue"))["default"]
|
HttpRequestOptions: typeof import('./components/http/RequestOptions.vue')['default']
|
||||||
HttpRequestTab: (typeof import("./components/http/RequestTab.vue"))["default"]
|
HttpRequestTab: typeof import('./components/http/RequestTab.vue')['default']
|
||||||
HttpRequestVariables: (typeof import("./components/http/RequestVariables.vue"))["default"]
|
HttpRequestVariables: typeof import('./components/http/RequestVariables.vue')['default']
|
||||||
HttpResponse: (typeof import("./components/http/Response.vue"))["default"]
|
HttpResponse: typeof import('./components/http/Response.vue')['default']
|
||||||
HttpResponseMeta: (typeof import("./components/http/ResponseMeta.vue"))["default"]
|
HttpResponseInterface: typeof import('./components/http/ResponseInterface.vue')['default']
|
||||||
HttpSidebar: (typeof import("./components/http/Sidebar.vue"))["default"]
|
HttpResponseMeta: typeof import('./components/http/ResponseMeta.vue')['default']
|
||||||
HttpTabHead: (typeof import("./components/http/TabHead.vue"))["default"]
|
HttpSidebar: typeof import('./components/http/Sidebar.vue')['default']
|
||||||
HttpTestResult: (typeof import("./components/http/TestResult.vue"))["default"]
|
HttpTabHead: typeof import('./components/http/TabHead.vue')['default']
|
||||||
HttpTestResultEntry: (typeof import("./components/http/TestResultEntry.vue"))["default"]
|
HttpTestResult: typeof import('./components/http/TestResult.vue')['default']
|
||||||
HttpTestResultEnv: (typeof import("./components/http/TestResultEnv.vue"))["default"]
|
HttpTestResultEntry: typeof import('./components/http/TestResultEntry.vue')['default']
|
||||||
HttpTestResultReport: (typeof import("./components/http/TestResultReport.vue"))["default"]
|
HttpTestResultEnv: typeof import('./components/http/TestResultEnv.vue')['default']
|
||||||
HttpTests: (typeof import("./components/http/Tests.vue"))["default"]
|
HttpTestResultReport: typeof import('./components/http/TestResultReport.vue')['default']
|
||||||
HttpURLEncodedParams: (typeof import("./components/http/URLEncodedParams.vue"))["default"]
|
HttpTests: typeof import('./components/http/Tests.vue')['default']
|
||||||
IconLucideActivity: (typeof import("~icons/lucide/activity"))["default"]
|
HttpURLEncodedParams: typeof import('./components/http/URLEncodedParams.vue')['default']
|
||||||
IconLucideAlertTriangle: (typeof import("~icons/lucide/alert-triangle"))["default"]
|
IconLucideActivity: typeof import('~icons/lucide/activity')['default']
|
||||||
IconLucideArrowLeft: (typeof import("~icons/lucide/arrow-left"))["default"]
|
IconLucideAlertTriangle: typeof import('~icons/lucide/alert-triangle')['default']
|
||||||
IconLucideArrowUpRight: (typeof import("~icons/lucide/arrow-up-right"))["default"]
|
IconLucideArrowLeft: typeof import('~icons/lucide/arrow-left')['default']
|
||||||
|
IconLucideArrowUpRight: typeof import('~icons/lucide/arrow-up-right')['default']
|
||||||
IconLucideBrush: (typeof import("~icons/lucide/brush"))["default"]
|
IconLucideBrush: (typeof import("~icons/lucide/brush"))["default"]
|
||||||
IconLucideCheckCircle: (typeof import("~icons/lucide/check-circle"))["default"]
|
IconLucideCheckCircle: typeof import('~icons/lucide/check-circle')['default']
|
||||||
IconLucideChevronRight: (typeof import("~icons/lucide/chevron-right"))["default"]
|
IconLucideChevronRight: typeof import('~icons/lucide/chevron-right')['default']
|
||||||
IconLucideGlobe: (typeof import("~icons/lucide/globe"))["default"]
|
IconLucideGlobe: typeof import('~icons/lucide/globe')['default']
|
||||||
IconLucideHelpCircle: (typeof import("~icons/lucide/help-circle"))["default"]
|
IconLucideHelpCircle: typeof import('~icons/lucide/help-circle')['default']
|
||||||
IconLucideInbox: (typeof import("~icons/lucide/inbox"))["default"]
|
IconLucideInbox: typeof import('~icons/lucide/inbox')['default']
|
||||||
IconLucideInfo: (typeof import("~icons/lucide/info"))["default"]
|
IconLucideInfo: typeof import('~icons/lucide/info')['default']
|
||||||
IconLucideLayers: (typeof import("~icons/lucide/layers"))["default"]
|
IconLucideLayers: typeof import('~icons/lucide/layers')['default']
|
||||||
IconLucideListEnd: (typeof import("~icons/lucide/list-end"))["default"]
|
IconLucideListEnd: typeof import('~icons/lucide/list-end')['default']
|
||||||
IconLucideMinus: (typeof import("~icons/lucide/minus"))["default"]
|
IconLucideMinus: typeof import('~icons/lucide/minus')['default']
|
||||||
IconLucideRss: (typeof import("~icons/lucide/rss"))["default"]
|
IconLucideRss: (typeof import("~icons/lucide/rss"))["default"]
|
||||||
IconLucideSearch: (typeof import("~icons/lucide/search"))["default"]
|
IconLucideSearch: typeof import('~icons/lucide/search')['default']
|
||||||
IconLucideUsers: (typeof import("~icons/lucide/users"))["default"]
|
IconLucideUsers: typeof import('~icons/lucide/users')['default']
|
||||||
IconLucideX: (typeof import("~icons/lucide/x"))["default"]
|
IconLucideX: typeof import('~icons/lucide/x')['default']
|
||||||
ImportExportBase: (typeof import("./components/importExport/Base.vue"))["default"]
|
ImportExportBase: typeof import('./components/importExport/Base.vue')['default']
|
||||||
ImportExportImportExportList: (typeof import("./components/importExport/ImportExportList.vue"))["default"]
|
ImportExportImportExportList: typeof import('./components/importExport/ImportExportList.vue')['default']
|
||||||
ImportExportImportExportSourcesList: (typeof import("./components/importExport/ImportExportSourcesList.vue"))["default"]
|
ImportExportImportExportSourcesList: typeof import('./components/importExport/ImportExportSourcesList.vue')['default']
|
||||||
ImportExportImportExportStepsFileImport: (typeof import("./components/importExport/ImportExportSteps/FileImport.vue"))["default"]
|
ImportExportImportExportStepsFileImport: typeof import('./components/importExport/ImportExportSteps/FileImport.vue')['default']
|
||||||
ImportExportImportExportStepsMyCollectionImport: (typeof import("./components/importExport/ImportExportSteps/MyCollectionImport.vue"))["default"]
|
ImportExportImportExportStepsMyCollectionImport: typeof import('./components/importExport/ImportExportSteps/MyCollectionImport.vue')['default']
|
||||||
ImportExportImportExportStepsUrlImport: (typeof import("./components/importExport/ImportExportSteps/UrlImport.vue"))["default"]
|
ImportExportImportExportStepsUrlImport: typeof import('./components/importExport/ImportExportSteps/UrlImport.vue')['default']
|
||||||
InterceptorsErrorPlaceholder: (typeof import("./components/interceptors/ErrorPlaceholder.vue"))["default"]
|
InterceptorsErrorPlaceholder: typeof import('./components/interceptors/ErrorPlaceholder.vue')['default']
|
||||||
InterceptorsExtensionSubtitle: (typeof import("./components/interceptors/ExtensionSubtitle.vue"))["default"]
|
InterceptorsExtensionSubtitle: typeof import('./components/interceptors/ExtensionSubtitle.vue')['default']
|
||||||
LensesHeadersRenderer: (typeof import("./components/lenses/HeadersRenderer.vue"))["default"]
|
LensesHeadersRenderer: typeof import('./components/lenses/HeadersRenderer.vue')['default']
|
||||||
LensesHeadersRendererEntry: (typeof import("./components/lenses/HeadersRendererEntry.vue"))["default"]
|
LensesHeadersRendererEntry: typeof import('./components/lenses/HeadersRendererEntry.vue')['default']
|
||||||
LensesRenderersAudioLensRenderer: (typeof import("./components/lenses/renderers/AudioLensRenderer.vue"))["default"]
|
LensesRenderersAudioLensRenderer: typeof import('./components/lenses/renderers/AudioLensRenderer.vue')['default']
|
||||||
LensesRenderersHTMLLensRenderer: (typeof import("./components/lenses/renderers/HTMLLensRenderer.vue"))["default"]
|
LensesRenderersHTMLLensRenderer: typeof import('./components/lenses/renderers/HTMLLensRenderer.vue')['default']
|
||||||
LensesRenderersImageLensRenderer: (typeof import("./components/lenses/renderers/ImageLensRenderer.vue"))["default"]
|
LensesRenderersImageLensRenderer: typeof import('./components/lenses/renderers/ImageLensRenderer.vue')['default']
|
||||||
LensesRenderersJSONLensRenderer: (typeof import("./components/lenses/renderers/JSONLensRenderer.vue"))["default"]
|
LensesRenderersJSONLensRenderer: typeof import('./components/lenses/renderers/JSONLensRenderer.vue')['default']
|
||||||
LensesRenderersPDFLensRenderer: (typeof import("./components/lenses/renderers/PDFLensRenderer.vue"))["default"]
|
LensesRenderersPDFLensRenderer: typeof import('./components/lenses/renderers/PDFLensRenderer.vue')['default']
|
||||||
LensesRenderersRawLensRenderer: (typeof import("./components/lenses/renderers/RawLensRenderer.vue"))["default"]
|
LensesRenderersRawLensRenderer: typeof import('./components/lenses/renderers/RawLensRenderer.vue')['default']
|
||||||
LensesRenderersVideoLensRenderer: (typeof import("./components/lenses/renderers/VideoLensRenderer.vue"))["default"]
|
LensesRenderersVideoLensRenderer: typeof import('./components/lenses/renderers/VideoLensRenderer.vue')['default']
|
||||||
LensesRenderersXMLLensRenderer: (typeof import("./components/lenses/renderers/XMLLensRenderer.vue"))["default"]
|
LensesRenderersXMLLensRenderer: typeof import('./components/lenses/renderers/XMLLensRenderer.vue')['default']
|
||||||
LensesResponseBodyRenderer: (typeof import("./components/lenses/ResponseBodyRenderer.vue"))["default"]
|
LensesResponseBodyRenderer: typeof import('./components/lenses/ResponseBodyRenderer.vue')['default']
|
||||||
ModalsNativeCACertificates: (typeof import("./../../hoppscotch-selfhost-desktop/src/components/modals/NativeCACertificates.vue"))["default"]
|
ModalsNativeCACertificates: (typeof import("./../../hoppscotch-selfhost-desktop/src/components/modals/NativeCACertificates.vue"))["default"]
|
||||||
ModalsNativeClientCertificates: (typeof import("./../../hoppscotch-selfhost-desktop/src/components/modals/NativeClientCertificates.vue"))["default"]
|
ModalsNativeClientCertificates: (typeof import("./../../hoppscotch-selfhost-desktop/src/components/modals/NativeClientCertificates.vue"))["default"]
|
||||||
ModalsNativeClientCertsAdd: (typeof import("./../../hoppscotch-selfhost-desktop/src/components/modals/NativeClientCertsAdd.vue"))["default"]
|
ModalsNativeClientCertsAdd: (typeof import("./../../hoppscotch-selfhost-desktop/src/components/modals/NativeClientCertsAdd.vue"))["default"]
|
||||||
ProfileUserDelete: (typeof import("./components/profile/UserDelete.vue"))["default"]
|
ProfileUserDelete: typeof import('./components/profile/UserDelete.vue')['default']
|
||||||
RealtimeCommunication: (typeof import("./components/realtime/Communication.vue"))["default"]
|
RealtimeCommunication: typeof import('./components/realtime/Communication.vue')['default']
|
||||||
RealtimeConnectionConfig: (typeof import("./components/realtime/ConnectionConfig.vue"))["default"]
|
RealtimeConnectionConfig: typeof import('./components/realtime/ConnectionConfig.vue')['default']
|
||||||
RealtimeLog: (typeof import("./components/realtime/Log.vue"))["default"]
|
RealtimeLog: typeof import('./components/realtime/Log.vue')['default']
|
||||||
RealtimeLogEntry: (typeof import("./components/realtime/LogEntry.vue"))["default"]
|
RealtimeLogEntry: typeof import('./components/realtime/LogEntry.vue')['default']
|
||||||
RealtimeSubscription: (typeof import("./components/realtime/Subscription.vue"))["default"]
|
RealtimeSubscription: typeof import('./components/realtime/Subscription.vue')['default']
|
||||||
SettingsExtension: (typeof import("./components/settings/Extension.vue"))["default"]
|
SettingsExtension: typeof import('./components/settings/Extension.vue')['default']
|
||||||
SettingsNativeInterceptor: (typeof import("./../../hoppscotch-selfhost-desktop/src/components/settings/NativeInterceptor.vue"))["default"]
|
SettingsNativeInterceptor: (typeof import("./../../hoppscotch-selfhost-desktop/src/components/settings/NativeInterceptor.vue"))["default"]
|
||||||
SettingsProxy: (typeof import("./components/settings/Proxy.vue"))["default"]
|
SettingsProxy: typeof import('./components/settings/Proxy.vue')['default']
|
||||||
Share: (typeof import("./components/share/index.vue"))["default"]
|
Share: typeof import('./components/share/index.vue')['default']
|
||||||
ShareCreateModal: (typeof import("./components/share/CreateModal.vue"))["default"]
|
ShareCreateModal: typeof import('./components/share/CreateModal.vue')['default']
|
||||||
ShareCustomizeModal: (typeof import("./components/share/CustomizeModal.vue"))["default"]
|
ShareCustomizeModal: typeof import('./components/share/CustomizeModal.vue')['default']
|
||||||
ShareModal: (typeof import("./components/share/Modal.vue"))["default"]
|
ShareModal: typeof import('./components/share/Modal.vue')['default']
|
||||||
ShareRequest: (typeof import("./components/share/Request.vue"))["default"]
|
ShareRequest: typeof import('./components/share/Request.vue')['default']
|
||||||
ShareTemplatesButton: (typeof import("./components/share/templates/Button.vue"))["default"]
|
ShareTemplatesButton: typeof import('./components/share/templates/Button.vue')['default']
|
||||||
ShareTemplatesEmbeds: (typeof import("./components/share/templates/Embeds.vue"))["default"]
|
ShareTemplatesEmbeds: typeof import('./components/share/templates/Embeds.vue')['default']
|
||||||
ShareTemplatesLink: (typeof import("./components/share/templates/Link.vue"))["default"]
|
ShareTemplatesLink: typeof import('./components/share/templates/Link.vue')['default']
|
||||||
SmartAccentModePicker: (typeof import("./components/smart/AccentModePicker.vue"))["default"]
|
SmartAccentModePicker: typeof import('./components/smart/AccentModePicker.vue')['default']
|
||||||
SmartChangeLanguage: (typeof import("./components/smart/ChangeLanguage.vue"))["default"]
|
SmartChangeLanguage: typeof import('./components/smart/ChangeLanguage.vue')['default']
|
||||||
SmartColorModePicker: (typeof import("./components/smart/ColorModePicker.vue"))["default"]
|
SmartColorModePicker: typeof import('./components/smart/ColorModePicker.vue')['default']
|
||||||
SmartEnvInput: (typeof import("./components/smart/EnvInput.vue"))["default"]
|
SmartEnvInput: typeof import('./components/smart/EnvInput.vue')['default']
|
||||||
TabPrimary: (typeof import("./components/tab/Primary.vue"))["default"]
|
TabPrimary: typeof import('./components/tab/Primary.vue')['default']
|
||||||
TabSecondary: (typeof import("./components/tab/Secondary.vue"))["default"]
|
TabSecondary: typeof import('./components/tab/Secondary.vue')['default']
|
||||||
Teams: (typeof import("./components/teams/index.vue"))["default"]
|
Teams: typeof import('./components/teams/index.vue')['default']
|
||||||
TeamsAdd: (typeof import("./components/teams/Add.vue"))["default"]
|
TeamsAdd: typeof import('./components/teams/Add.vue')['default']
|
||||||
TeamsEdit: (typeof import("./components/teams/Edit.vue"))["default"]
|
TeamsEdit: typeof import('./components/teams/Edit.vue')['default']
|
||||||
TeamsInvite: (typeof import("./components/teams/Invite.vue"))["default"]
|
TeamsInvite: typeof import('./components/teams/Invite.vue')['default']
|
||||||
TeamsMemberStack: (typeof import("./components/teams/MemberStack.vue"))["default"]
|
TeamsMemberStack: typeof import('./components/teams/MemberStack.vue')['default']
|
||||||
TeamsModal: (typeof import("./components/teams/Modal.vue"))["default"]
|
TeamsModal: typeof import('./components/teams/Modal.vue')['default']
|
||||||
TeamsTeam: (typeof import("./components/teams/Team.vue"))["default"]
|
TeamsTeam: typeof import('./components/teams/Team.vue')['default']
|
||||||
Tippy: (typeof import("vue-tippy"))["Tippy"]
|
Tippy: typeof import('vue-tippy')['Tippy']
|
||||||
WorkspaceCurrent: (typeof import("./components/workspace/Current.vue"))["default"]
|
WorkspaceCurrent: typeof import('./components/workspace/Current.vue')['default']
|
||||||
WorkspaceSelector: (typeof import("./components/workspace/Selector.vue"))["default"]
|
WorkspaceSelector: typeof import('./components/workspace/Selector.vue')['default']
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -32,68 +32,14 @@
|
|||||||
@keyup.escape="hide()"
|
@keyup.escape="hide()"
|
||||||
>
|
>
|
||||||
<HoppSmartItem
|
<HoppSmartItem
|
||||||
v-if="!isRootCollection"
|
v-for="item in authTypes"
|
||||||
label="Inherit"
|
:key="item.key"
|
||||||
:icon="authName === 'Inherit' ? IconCircleDot : IconCircle"
|
:label="item.label"
|
||||||
:active="authName === 'Inherit'"
|
:icon="item.key === authType ? IconCircleDot : IconCircle"
|
||||||
|
:active="item.key === authType"
|
||||||
@click="
|
@click="
|
||||||
() => {
|
() => {
|
||||||
auth.authType = 'inherit'
|
item.handler ? item.handler() : (auth.authType = item.key)
|
||||||
hide()
|
|
||||||
}
|
|
||||||
"
|
|
||||||
/>
|
|
||||||
<HoppSmartItem
|
|
||||||
label="None"
|
|
||||||
:icon="authName === 'None' ? IconCircleDot : IconCircle"
|
|
||||||
:active="authName === 'None'"
|
|
||||||
@click="
|
|
||||||
() => {
|
|
||||||
auth.authType = 'none'
|
|
||||||
hide()
|
|
||||||
}
|
|
||||||
"
|
|
||||||
/>
|
|
||||||
<HoppSmartItem
|
|
||||||
label="Basic Auth"
|
|
||||||
:icon="authName === 'Basic Auth' ? IconCircleDot : IconCircle"
|
|
||||||
:active="authName === 'Basic Auth'"
|
|
||||||
@click="
|
|
||||||
() => {
|
|
||||||
auth.authType = 'basic'
|
|
||||||
hide()
|
|
||||||
}
|
|
||||||
"
|
|
||||||
/>
|
|
||||||
<HoppSmartItem
|
|
||||||
label="Bearer Token"
|
|
||||||
:icon="authName === 'Bearer' ? IconCircleDot : IconCircle"
|
|
||||||
:active="authName === 'Bearer'"
|
|
||||||
@click="
|
|
||||||
() => {
|
|
||||||
auth.authType = 'bearer'
|
|
||||||
hide()
|
|
||||||
}
|
|
||||||
"
|
|
||||||
/>
|
|
||||||
<HoppSmartItem
|
|
||||||
label="OAuth 2.0"
|
|
||||||
:icon="authName === 'OAuth 2.0' ? IconCircleDot : IconCircle"
|
|
||||||
:active="authName === 'OAuth 2.0'"
|
|
||||||
@click="
|
|
||||||
() => {
|
|
||||||
selectOAuth2AuthType()
|
|
||||||
hide()
|
|
||||||
}
|
|
||||||
"
|
|
||||||
/>
|
|
||||||
<HoppSmartItem
|
|
||||||
label="API key"
|
|
||||||
:icon="authName === 'API key' ? IconCircleDot : IconCircle"
|
|
||||||
:active="authName === 'API key'"
|
|
||||||
@click="
|
|
||||||
() => {
|
|
||||||
auth.authType = 'api-key'
|
|
||||||
hide()
|
hide()
|
||||||
}
|
}
|
||||||
"
|
"
|
||||||
@@ -168,13 +114,17 @@
|
|||||||
</div>
|
</div>
|
||||||
<div v-if="auth.authType === 'inherit'" class="p-4">
|
<div v-if="auth.authType === 'inherit'" class="p-4">
|
||||||
<span v-if="inheritedProperties?.auth">
|
<span v-if="inheritedProperties?.auth">
|
||||||
Inherited
|
{{
|
||||||
{{ getAuthName(inheritedProperties.auth.inheritedAuth.authType) }}
|
t("authorization.inherited_from", {
|
||||||
from Parent Collection {{ inheritedProperties?.auth.parentName }}
|
auth: getAuthName(
|
||||||
|
inheritedProperties.auth.inheritedAuth.authType
|
||||||
|
),
|
||||||
|
collection: inheritedProperties?.auth.parentName,
|
||||||
|
})
|
||||||
|
}}
|
||||||
</span>
|
</span>
|
||||||
<span v-else>
|
<span v-else>
|
||||||
Please save this request in any collection to inherit the
|
{{ t("authorization.save_to_inherit") }}
|
||||||
authorization
|
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="auth.authType === 'bearer'">
|
<div v-if="auth.authType === 'bearer'">
|
||||||
@@ -194,11 +144,14 @@
|
|||||||
placeholder="Token"
|
placeholder="Token"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<HttpOAuth2Authorization v-model="auth" source="GraphQL" />
|
<HttpAuthorizationOAuth2 v-model="auth" source="GraphQL" />
|
||||||
</div>
|
</div>
|
||||||
<div v-if="auth.authType === 'api-key'">
|
<div v-if="auth.authType === 'api-key'">
|
||||||
<HttpAuthorizationApiKey v-model="auth" />
|
<HttpAuthorizationApiKey v-model="auth" />
|
||||||
</div>
|
</div>
|
||||||
|
<div v-if="auth.authType === 'aws-signature'">
|
||||||
|
<HttpAuthorizationAWSSign v-model="auth" />
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
class="z-[9] sticky top-upperTertiaryStickyFold h-full min-w-[12rem] max-w-1/3 flex-shrink-0 overflow-auto overflow-x-auto bg-primary p-4"
|
class="z-[9] sticky top-upperTertiaryStickyFold h-full min-w-[12rem] max-w-1/3 flex-shrink-0 overflow-auto overflow-x-auto bg-primary p-4"
|
||||||
@@ -237,6 +190,12 @@ import IconTrash2 from "~icons/lucide/trash-2"
|
|||||||
|
|
||||||
import { getDefaultAuthCodeOauthFlowParams } from "~/services/oauth/flows/authCode"
|
import { getDefaultAuthCodeOauthFlowParams } from "~/services/oauth/flows/authCode"
|
||||||
|
|
||||||
|
type AuthType = {
|
||||||
|
key: HoppGQLAuth["authType"]
|
||||||
|
label: string
|
||||||
|
handler?: () => void
|
||||||
|
}
|
||||||
|
|
||||||
const t = useI18n()
|
const t = useI18n()
|
||||||
|
|
||||||
const colorMode = useColorMode()
|
const colorMode = useColorMode()
|
||||||
@@ -263,26 +222,6 @@ onMounted(() => {
|
|||||||
|
|
||||||
const auth = useVModel(props, "modelValue", emit)
|
const auth = useVModel(props, "modelValue", emit)
|
||||||
|
|
||||||
const AUTH_KEY_NAME = {
|
|
||||||
basic: "Basic Auth",
|
|
||||||
bearer: "Bearer",
|
|
||||||
"oauth-2": "OAuth 2.0",
|
|
||||||
"api-key": "API key",
|
|
||||||
none: "None",
|
|
||||||
inherit: "Inherit",
|
|
||||||
} as const
|
|
||||||
|
|
||||||
const authType = pluckRef(auth, "authType")
|
|
||||||
|
|
||||||
const authName = computed(() =>
|
|
||||||
AUTH_KEY_NAME[authType.value] ? AUTH_KEY_NAME[authType.value] : "None"
|
|
||||||
)
|
|
||||||
|
|
||||||
const getAuthName = (type: HoppGQLAuth["authType"] | undefined) => {
|
|
||||||
if (!type) return "None"
|
|
||||||
return AUTH_KEY_NAME[type] ? AUTH_KEY_NAME[type] : "None"
|
|
||||||
}
|
|
||||||
|
|
||||||
const selectOAuth2AuthType = () => {
|
const selectOAuth2AuthType = () => {
|
||||||
const defaultGrantTypeInfo: HoppGQLAuthOAuth2["grantTypeInfo"] = {
|
const defaultGrantTypeInfo: HoppGQLAuthOAuth2["grantTypeInfo"] = {
|
||||||
...getDefaultAuthCodeOauthFlowParams(),
|
...getDefaultAuthCodeOauthFlowParams(),
|
||||||
@@ -307,6 +246,59 @@ const selectOAuth2AuthType = () => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const authTypes: AuthType[] = [
|
||||||
|
{
|
||||||
|
key: "inherit",
|
||||||
|
label: "Inherit",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: "none",
|
||||||
|
label: "None",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: "basic",
|
||||||
|
label: "Basic Auth",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: "bearer",
|
||||||
|
label: "Bearer",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: "oauth-2",
|
||||||
|
label: "OAuth 2.0",
|
||||||
|
handler: selectOAuth2AuthType,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: "api-key",
|
||||||
|
label: "API Key",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: "aws-signature",
|
||||||
|
label: "AWS Signature",
|
||||||
|
},
|
||||||
|
]
|
||||||
|
|
||||||
|
const AUTH_KEY_NAME: Record<HoppGQLAuth["authType"], string> = {
|
||||||
|
basic: "Basic Auth",
|
||||||
|
bearer: "Bearer",
|
||||||
|
"oauth-2": "OAuth 2.0",
|
||||||
|
"api-key": "API key",
|
||||||
|
none: "None",
|
||||||
|
inherit: "Inherit",
|
||||||
|
"aws-signature": "AWS Signature",
|
||||||
|
}
|
||||||
|
|
||||||
|
const authType = pluckRef(auth, "authType")
|
||||||
|
|
||||||
|
const authName = computed(() =>
|
||||||
|
AUTH_KEY_NAME[authType.value] ? AUTH_KEY_NAME[authType.value] : "None"
|
||||||
|
)
|
||||||
|
|
||||||
|
const getAuthName = (type: HoppGQLAuth["authType"] | undefined) => {
|
||||||
|
if (!type) return "None"
|
||||||
|
return AUTH_KEY_NAME[type] ? AUTH_KEY_NAME[type] : "None"
|
||||||
|
}
|
||||||
|
|
||||||
const authActive = pluckRef(auth, "authActive")
|
const authActive = pluckRef(auth, "authActive")
|
||||||
|
|
||||||
const clearContent = () => {
|
const clearContent = () => {
|
||||||
|
|||||||
@@ -231,26 +231,25 @@ import { useColorMode } from "@composables/theming"
|
|||||||
import { useToast } from "@composables/toast"
|
import { useToast } from "@composables/toast"
|
||||||
import {
|
import {
|
||||||
GQLHeader,
|
GQLHeader,
|
||||||
HoppGQLAuth,
|
|
||||||
HoppGQLRequest,
|
HoppGQLRequest,
|
||||||
parseRawKeyValueEntriesE,
|
parseRawKeyValueEntriesE,
|
||||||
rawKeyValueEntriesToString,
|
rawKeyValueEntriesToString,
|
||||||
RawKeyValueEntry,
|
RawKeyValueEntry,
|
||||||
} from "@hoppscotch/data"
|
} from "@hoppscotch/data"
|
||||||
import { useVModel } from "@vueuse/core"
|
import { computedAsync, useVModel } from "@vueuse/core"
|
||||||
|
import { AwsV4Signer } from "aws4fetch"
|
||||||
import * as A from "fp-ts/Array"
|
import * as A from "fp-ts/Array"
|
||||||
import * as E from "fp-ts/Either"
|
import * as E from "fp-ts/Either"
|
||||||
import * as O from "fp-ts/Option"
|
import * as O from "fp-ts/Option"
|
||||||
import * as RA from "fp-ts/ReadonlyArray"
|
import * as RA from "fp-ts/ReadonlyArray"
|
||||||
import { flow, pipe } from "fp-ts/function"
|
import { flow, pipe } from "fp-ts/function"
|
||||||
import { clone, cloneDeep, isEqual } from "lodash-es"
|
import { clone, cloneDeep, isEqual } from "lodash-es"
|
||||||
import { computed, reactive, ref, toRef, watch } from "vue"
|
import { reactive, ref, toRef, watch } from "vue"
|
||||||
import draggable from "vuedraggable-es"
|
import draggable from "vuedraggable-es"
|
||||||
|
|
||||||
import { useNestedSetting } from "~/composables/settings"
|
import { useNestedSetting } from "~/composables/settings"
|
||||||
import { throwError } from "~/helpers/functional/error"
|
import { throwError } from "~/helpers/functional/error"
|
||||||
import { objRemoveKey } from "~/helpers/functional/object"
|
import { objRemoveKey } from "~/helpers/functional/object"
|
||||||
import { HoppGQLHeader } from "~/helpers/graphql"
|
|
||||||
import { commonHeaders } from "~/helpers/headers"
|
import { commonHeaders } from "~/helpers/headers"
|
||||||
import { HoppInheritedProperty } from "~/helpers/types/HoppInheritedProperties"
|
import { HoppInheritedProperty } from "~/helpers/types/HoppInheritedProperties"
|
||||||
import { toggleNestedSetting } from "~/newstore/settings"
|
import { toggleNestedSetting } from "~/newstore/settings"
|
||||||
@@ -524,7 +523,7 @@ const clearContent = () => {
|
|||||||
bulkHeaders.value = ""
|
bulkHeaders.value = ""
|
||||||
}
|
}
|
||||||
|
|
||||||
const getComputedAuthHeaders = (
|
const getComputedAuthHeaders = async (
|
||||||
req?: HoppGQLRequest,
|
req?: HoppGQLRequest,
|
||||||
auth?: HoppGQLRequest["auth"]
|
auth?: HoppGQLRequest["auth"]
|
||||||
) => {
|
) => {
|
||||||
@@ -537,7 +536,7 @@ const getComputedAuthHeaders = (
|
|||||||
|
|
||||||
if (!request.auth || !request.auth.authActive) return []
|
if (!request.auth || !request.auth.authActive) return []
|
||||||
|
|
||||||
const headers: HoppGQLHeader[] = []
|
const headers: GQLHeader[] = []
|
||||||
|
|
||||||
// TODO: Support a better b64 implementation than btoa ?
|
// TODO: Support a better b64 implementation than btoa ?
|
||||||
if (request.auth.authType === "basic") {
|
if (request.auth.authType === "basic") {
|
||||||
@@ -548,6 +547,7 @@ const getComputedAuthHeaders = (
|
|||||||
active: true,
|
active: true,
|
||||||
key: "Authorization",
|
key: "Authorization",
|
||||||
value: `Basic ${btoa(`${username}:${password}`)}`,
|
value: `Basic ${btoa(`${username}:${password}`)}`,
|
||||||
|
description: "",
|
||||||
})
|
})
|
||||||
} else if (
|
} else if (
|
||||||
request.auth.authType === "bearer" ||
|
request.auth.authType === "bearer" ||
|
||||||
@@ -563,6 +563,7 @@ const getComputedAuthHeaders = (
|
|||||||
active: true,
|
active: true,
|
||||||
key: "Authorization",
|
key: "Authorization",
|
||||||
value: `Bearer ${token}`,
|
value: `Bearer ${token}`,
|
||||||
|
description: "",
|
||||||
})
|
})
|
||||||
} else if (request.auth.authType === "api-key") {
|
} else if (request.auth.authType === "api-key") {
|
||||||
const { key, addTo } = request.auth
|
const { key, addTo } = request.auth
|
||||||
@@ -572,6 +573,35 @@ const getComputedAuthHeaders = (
|
|||||||
active: true,
|
active: true,
|
||||||
key,
|
key,
|
||||||
value: request.auth.value ?? "",
|
value: request.auth.value ?? "",
|
||||||
|
description: "",
|
||||||
|
})
|
||||||
|
}
|
||||||
|
} else if (request.auth.authType === "aws-signature") {
|
||||||
|
const { addTo } = request.auth
|
||||||
|
if (addTo === "HEADERS") {
|
||||||
|
const currentDate = new Date()
|
||||||
|
const amzDate = currentDate.toISOString().replace(/[:-]|\.\d{3}/g, "")
|
||||||
|
|
||||||
|
const { url } = req as HoppGQLRequest
|
||||||
|
|
||||||
|
const signer = new AwsV4Signer({
|
||||||
|
datetime: amzDate,
|
||||||
|
accessKeyId: request.auth.accessKey,
|
||||||
|
secretAccessKey: request.auth.secretKey,
|
||||||
|
region: request.auth.region ?? "us-east-1",
|
||||||
|
service: request.auth.serviceName,
|
||||||
|
url,
|
||||||
|
})
|
||||||
|
|
||||||
|
const sign = await signer.sign()
|
||||||
|
|
||||||
|
sign.headers.forEach((x, k) => {
|
||||||
|
headers.push({
|
||||||
|
active: true,
|
||||||
|
key: k,
|
||||||
|
value: x,
|
||||||
|
description: "",
|
||||||
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -579,23 +609,23 @@ const getComputedAuthHeaders = (
|
|||||||
return headers
|
return headers
|
||||||
}
|
}
|
||||||
|
|
||||||
const getComputedHeaders = (req: HoppGQLRequest) => {
|
const getComputedHeaders = async (req: HoppGQLRequest) => {
|
||||||
return [
|
return [
|
||||||
...getComputedAuthHeaders(req).map((header) => ({
|
...(await getComputedAuthHeaders(req)).map((header) => ({
|
||||||
source: "auth" as const,
|
source: "auth" as const,
|
||||||
header,
|
header,
|
||||||
})),
|
})),
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
const computedHeaders = computed(() =>
|
const computedHeaders = computedAsync(async () =>
|
||||||
getComputedHeaders(request.value).map((header, index) => ({
|
(await getComputedHeaders(request.value)).map((header, index) => ({
|
||||||
id: `header-${index}`,
|
id: `header-${index}`,
|
||||||
...header,
|
...header,
|
||||||
}))
|
}))
|
||||||
)
|
)
|
||||||
|
|
||||||
const inheritedProperties = computed(() => {
|
const inheritedProperties = computedAsync(async () => {
|
||||||
if (!props.inheritedProperties?.auth || !props.inheritedProperties.headers)
|
if (!props.inheritedProperties?.auth || !props.inheritedProperties.headers)
|
||||||
return []
|
return []
|
||||||
|
|
||||||
@@ -642,10 +672,10 @@ const inheritedProperties = computed(() => {
|
|||||||
}
|
}
|
||||||
}[]
|
}[]
|
||||||
|
|
||||||
const computedAuthHeader = getComputedAuthHeaders(
|
const [computedAuthHeader] = await getComputedAuthHeaders(
|
||||||
request.value,
|
request.value,
|
||||||
props.inheritedProperties.auth.inheritedAuth as HoppGQLAuth
|
props.inheritedProperties.auth.inheritedAuth
|
||||||
)[0]
|
)
|
||||||
|
|
||||||
if (
|
if (
|
||||||
computedAuthHeader &&
|
computedAuthHeader &&
|
||||||
|
|||||||
@@ -1,58 +1,56 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="h-full">
|
<HoppSmartTabs
|
||||||
<HoppSmartTabs
|
v-model="selectedOptionTab"
|
||||||
v-model="selectedOptionTab"
|
styles="sticky bg-primary top-0 z-10 border-b-0"
|
||||||
styles="sticky top-0 bg-primary z-10 border-b-0"
|
:render-inactive-tabs="true"
|
||||||
:render-inactive-tabs="true"
|
>
|
||||||
|
<HoppSmartTab
|
||||||
|
:id="'query'"
|
||||||
|
:label="`${t('tab.query')}`"
|
||||||
|
:indicator="request.query && request.query.length > 0 ? true : false"
|
||||||
>
|
>
|
||||||
<HoppSmartTab
|
<GraphqlQuery
|
||||||
:id="'query'"
|
v-model="request.query"
|
||||||
:label="`${t('tab.query')}`"
|
@run-query="runQuery"
|
||||||
:indicator="request.query && request.query.length > 0 ? true : false"
|
@save-request="saveRequest"
|
||||||
>
|
/>
|
||||||
<GraphqlQuery
|
</HoppSmartTab>
|
||||||
v-model="request.query"
|
<HoppSmartTab
|
||||||
@run-query="runQuery"
|
:id="'variables'"
|
||||||
@save-request="saveRequest"
|
:label="`${t('tab.variables')}`"
|
||||||
/>
|
:indicator="
|
||||||
</HoppSmartTab>
|
request.variables && request.variables.length > 0 ? true : false
|
||||||
<HoppSmartTab
|
"
|
||||||
:id="'variables'"
|
>
|
||||||
:label="`${t('tab.variables')}`"
|
<GraphqlVariable
|
||||||
:indicator="
|
v-model="request.variables"
|
||||||
request.variables && request.variables.length > 0 ? true : false
|
@run-query="runQuery"
|
||||||
"
|
@save-request="saveRequest"
|
||||||
>
|
/>
|
||||||
<GraphqlVariable
|
</HoppSmartTab>
|
||||||
v-model="request.variables"
|
<HoppSmartTab
|
||||||
@run-query="runQuery"
|
:id="'headers'"
|
||||||
@save-request="saveRequest"
|
:label="`${t('tab.headers')}`"
|
||||||
/>
|
:info="activeGQLHeadersCount === 0 ? null : `${activeGQLHeadersCount}`"
|
||||||
</HoppSmartTab>
|
>
|
||||||
<HoppSmartTab
|
<GraphqlHeaders
|
||||||
:id="'headers'"
|
v-model="request"
|
||||||
:label="`${t('tab.headers')}`"
|
:inherited-properties="inheritedProperties"
|
||||||
:info="activeGQLHeadersCount === 0 ? null : `${activeGQLHeadersCount}`"
|
@change-tab="changeOptionTab"
|
||||||
>
|
/>
|
||||||
<GraphqlHeaders
|
</HoppSmartTab>
|
||||||
v-model="request"
|
<HoppSmartTab :id="'authorization'" :label="`${t('tab.authorization')}`">
|
||||||
:inherited-properties="inheritedProperties"
|
<GraphqlAuthorization
|
||||||
@change-tab="changeOptionTab"
|
v-model="request.auth"
|
||||||
/>
|
:inherited-properties="inheritedProperties"
|
||||||
</HoppSmartTab>
|
/>
|
||||||
<HoppSmartTab :id="'authorization'" :label="`${t('tab.authorization')}`">
|
</HoppSmartTab>
|
||||||
<GraphqlAuthorization
|
</HoppSmartTabs>
|
||||||
v-model="request.auth"
|
<CollectionsSaveRequest
|
||||||
:inherited-properties="inheritedProperties"
|
mode="graphql"
|
||||||
/>
|
:show="showSaveRequestModal"
|
||||||
</HoppSmartTab>
|
@hide-modal="hideRequestModal"
|
||||||
</HoppSmartTabs>
|
/>
|
||||||
<CollectionsSaveRequest
|
|
||||||
mode="graphql"
|
|
||||||
:show="showSaveRequestModal"
|
|
||||||
@hide-modal="hideRequestModal"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
|
|||||||
@@ -32,68 +32,14 @@
|
|||||||
@keyup.escape="hide()"
|
@keyup.escape="hide()"
|
||||||
>
|
>
|
||||||
<HoppSmartItem
|
<HoppSmartItem
|
||||||
v-if="!isRootCollection"
|
v-for="item in authTypes"
|
||||||
label="Inherit"
|
:key="item.key"
|
||||||
:icon="authName === 'Inherit' ? IconCircleDot : IconCircle"
|
:label="item.label"
|
||||||
:active="authName === 'Inherit'"
|
:icon="item.key === authType ? IconCircleDot : IconCircle"
|
||||||
|
:active="item.key === authType"
|
||||||
@click="
|
@click="
|
||||||
() => {
|
() => {
|
||||||
auth.authType = 'inherit'
|
item.handler ? item.handler() : (auth.authType = item.key)
|
||||||
hide()
|
|
||||||
}
|
|
||||||
"
|
|
||||||
/>
|
|
||||||
<HoppSmartItem
|
|
||||||
label="None"
|
|
||||||
:icon="authName === 'None' ? IconCircleDot : IconCircle"
|
|
||||||
:active="authName === 'None'"
|
|
||||||
@click="
|
|
||||||
() => {
|
|
||||||
auth.authType = 'none'
|
|
||||||
hide()
|
|
||||||
}
|
|
||||||
"
|
|
||||||
/>
|
|
||||||
<HoppSmartItem
|
|
||||||
label="Basic Auth"
|
|
||||||
:icon="authName === 'Basic Auth' ? IconCircleDot : IconCircle"
|
|
||||||
:active="authName === 'Basic Auth'"
|
|
||||||
@click="
|
|
||||||
() => {
|
|
||||||
auth.authType = 'basic'
|
|
||||||
hide()
|
|
||||||
}
|
|
||||||
"
|
|
||||||
/>
|
|
||||||
<HoppSmartItem
|
|
||||||
label="Bearer Token"
|
|
||||||
:icon="authName === 'Bearer' ? IconCircleDot : IconCircle"
|
|
||||||
:active="authName === 'Bearer'"
|
|
||||||
@click="
|
|
||||||
() => {
|
|
||||||
auth.authType = 'bearer'
|
|
||||||
hide()
|
|
||||||
}
|
|
||||||
"
|
|
||||||
/>
|
|
||||||
<HoppSmartItem
|
|
||||||
label="OAuth 2.0"
|
|
||||||
:icon="authName === 'OAuth 2.0' ? IconCircleDot : IconCircle"
|
|
||||||
:active="authName === 'OAuth 2.0'"
|
|
||||||
@click="
|
|
||||||
() => {
|
|
||||||
selectOAuth2AuthType()
|
|
||||||
hide()
|
|
||||||
}
|
|
||||||
"
|
|
||||||
/>
|
|
||||||
<HoppSmartItem
|
|
||||||
label="API key"
|
|
||||||
:icon="authName === 'API key' ? IconCircleDot : IconCircle"
|
|
||||||
:active="authName === 'API key'"
|
|
||||||
@click="
|
|
||||||
() => {
|
|
||||||
auth.authType = 'api-key'
|
|
||||||
hide()
|
hide()
|
||||||
}
|
}
|
||||||
"
|
"
|
||||||
@@ -174,6 +120,7 @@
|
|||||||
placeholder="Token"
|
placeholder="Token"
|
||||||
:auto-complete-env="true"
|
:auto-complete-env="true"
|
||||||
:envs="envs"
|
:envs="envs"
|
||||||
|
class="px-4"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -189,7 +136,7 @@
|
|||||||
"
|
"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<HttpOAuth2Authorization
|
<HttpAuthorizationOAuth2
|
||||||
v-model="auth"
|
v-model="auth"
|
||||||
:is-collection-property="isCollectionProperty"
|
:is-collection-property="isCollectionProperty"
|
||||||
:envs="envs"
|
:envs="envs"
|
||||||
@@ -199,6 +146,9 @@
|
|||||||
<div v-if="auth.authType === 'api-key'">
|
<div v-if="auth.authType === 'api-key'">
|
||||||
<HttpAuthorizationApiKey v-model="auth" :envs="envs" />
|
<HttpAuthorizationApiKey v-model="auth" :envs="envs" />
|
||||||
</div>
|
</div>
|
||||||
|
<div v-if="auth.authType === 'aws-signature'">
|
||||||
|
<HttpAuthorizationAWSSign v-model="auth" :envs="envs" />
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
class="z-[9] sticky top-upperTertiaryStickyFold h-full min-w-[12rem] max-w-1/3 flex-shrink-0 overflow-auto overflow-x-auto bg-primary p-4"
|
class="z-[9] sticky top-upperTertiaryStickyFold h-full min-w-[12rem] max-w-1/3 flex-shrink-0 overflow-auto overflow-x-auto bg-primary p-4"
|
||||||
@@ -272,26 +222,52 @@ onMounted(() => {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
const AUTH_KEY_NAME = {
|
type AuthType = {
|
||||||
basic: "Basic Auth",
|
key: HoppRESTAuth["authType"]
|
||||||
bearer: "Bearer",
|
label: string
|
||||||
"oauth-2": "OAuth 2.0",
|
handler?: () => void
|
||||||
"api-key": "API key",
|
|
||||||
none: "None",
|
|
||||||
inherit: "Inherit",
|
|
||||||
} as const
|
|
||||||
|
|
||||||
const authType = pluckRef(auth, "authType")
|
|
||||||
const authName = computed(() =>
|
|
||||||
AUTH_KEY_NAME[authType.value] ? AUTH_KEY_NAME[authType.value] : "None"
|
|
||||||
)
|
|
||||||
|
|
||||||
const getAuthName = (type: HoppRESTAuth["authType"] | undefined) => {
|
|
||||||
if (!type) return "None"
|
|
||||||
return AUTH_KEY_NAME[type] ? AUTH_KEY_NAME[type] : "None"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const selectOAuth2AuthType = () => {
|
const authTypes: AuthType[] = [
|
||||||
|
{
|
||||||
|
key: "inherit",
|
||||||
|
label: "Inherit",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: "none",
|
||||||
|
label: "None",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: "basic",
|
||||||
|
label: "Basic Auth",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: "bearer",
|
||||||
|
label: "Bearer",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: "oauth-2",
|
||||||
|
label: "OAuth 2.0",
|
||||||
|
handler: selectOAuth2AuthType,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: "api-key",
|
||||||
|
label: "API Key",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: "aws-signature",
|
||||||
|
label: "AWS Signature",
|
||||||
|
},
|
||||||
|
]
|
||||||
|
|
||||||
|
const authType = pluckRef(auth, "authType")
|
||||||
|
const getAuthName = (type: HoppRESTAuth["authType"] | undefined) => {
|
||||||
|
if (!type) return "None"
|
||||||
|
return authTypes.find((a) => a.key === type)?.label || "None"
|
||||||
|
}
|
||||||
|
const authName = computed(() => getAuthName(authType.value))
|
||||||
|
|
||||||
|
function selectOAuth2AuthType() {
|
||||||
const defaultGrantTypeInfo: HoppRESTAuthOAuth2["grantTypeInfo"] = {
|
const defaultGrantTypeInfo: HoppRESTAuthOAuth2["grantTypeInfo"] = {
|
||||||
...getDefaultAuthCodeOauthFlowParams(),
|
...getDefaultAuthCodeOauthFlowParams(),
|
||||||
grantType: "AUTHORIZATION_CODE",
|
grantType: "AUTHORIZATION_CODE",
|
||||||
|
|||||||
@@ -253,17 +253,17 @@ import {
|
|||||||
rawKeyValueEntriesToString,
|
rawKeyValueEntriesToString,
|
||||||
RawKeyValueEntry,
|
RawKeyValueEntry,
|
||||||
} from "@hoppscotch/data"
|
} from "@hoppscotch/data"
|
||||||
import { useVModel } from "@vueuse/core"
|
|
||||||
import { useService } from "dioc/vue"
|
|
||||||
import * as A from "fp-ts/Array"
|
import * as A from "fp-ts/Array"
|
||||||
import * as E from "fp-ts/Either"
|
import * as E from "fp-ts/Either"
|
||||||
import { flow, pipe } from "fp-ts/function"
|
import { flow, pipe } from "fp-ts/function"
|
||||||
import * as O from "fp-ts/Option"
|
import * as O from "fp-ts/Option"
|
||||||
import * as RA from "fp-ts/ReadonlyArray"
|
import * as RA from "fp-ts/ReadonlyArray"
|
||||||
import { cloneDeep, isEqual } from "lodash-es"
|
import { cloneDeep, isEqual } from "lodash-es"
|
||||||
import { computed, reactive, ref, toRef, watch } from "vue"
|
import { reactive, ref, toRef, watch } from "vue"
|
||||||
import draggable from "vuedraggable-es"
|
import draggable from "vuedraggable-es"
|
||||||
|
|
||||||
|
import { computedAsync, useVModel } from "@vueuse/core"
|
||||||
|
import { useService } from "dioc/vue"
|
||||||
import { useNestedSetting } from "~/composables/settings"
|
import { useNestedSetting } from "~/composables/settings"
|
||||||
import linter from "~/helpers/editor/linting/rawKeyValue"
|
import linter from "~/helpers/editor/linting/rawKeyValue"
|
||||||
import { throwError } from "~/helpers/functional/error"
|
import { throwError } from "~/helpers/functional/error"
|
||||||
@@ -545,16 +545,18 @@ const clearContent = () => {
|
|||||||
|
|
||||||
const aggregateEnvs = useReadonlyStream(aggregateEnvs$, getAggregateEnvs())
|
const aggregateEnvs = useReadonlyStream(aggregateEnvs$, getAggregateEnvs())
|
||||||
|
|
||||||
const computedHeaders = computed(() =>
|
const computedHeaders = computedAsync(
|
||||||
getComputedHeaders(request.value, aggregateEnvs.value, false).map(
|
async () =>
|
||||||
(header, index) => ({
|
(await getComputedHeaders(request.value, aggregateEnvs.value, false)).map(
|
||||||
id: `header-${index}`,
|
(header, index) => ({
|
||||||
...header,
|
id: `header-${index}`,
|
||||||
})
|
...header,
|
||||||
)
|
})
|
||||||
|
),
|
||||||
|
[]
|
||||||
)
|
)
|
||||||
|
|
||||||
const inheritedProperties = computed(() => {
|
const inheritedProperties = computedAsync(async () => {
|
||||||
if (!props.inheritedProperties?.auth || !props.inheritedProperties.headers)
|
if (!props.inheritedProperties?.auth || !props.inheritedProperties.headers)
|
||||||
return []
|
return []
|
||||||
|
|
||||||
@@ -601,12 +603,12 @@ const inheritedProperties = computed(() => {
|
|||||||
}
|
}
|
||||||
}[]
|
}[]
|
||||||
|
|
||||||
const computedAuthHeader = getComputedAuthHeaders(
|
const [computedAuthHeader] = await getComputedAuthHeaders(
|
||||||
aggregateEnvs.value,
|
aggregateEnvs.value,
|
||||||
request.value,
|
request.value,
|
||||||
props.inheritedProperties.auth.inheritedAuth,
|
props.inheritedProperties.auth.inheritedAuth,
|
||||||
false
|
false
|
||||||
)[0]
|
)
|
||||||
|
|
||||||
if (
|
if (
|
||||||
computedAuthHeader &&
|
computedAuthHeader &&
|
||||||
|
|||||||
@@ -0,0 +1,192 @@
|
|||||||
|
<template>
|
||||||
|
<div class="flex flex-1 border-b border-dividerLight">
|
||||||
|
<SmartEnvInput
|
||||||
|
v-model="auth.issuer"
|
||||||
|
:auto-complete-env="true"
|
||||||
|
placeholder="Issuer"
|
||||||
|
:envs="envs"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div class="flex flex-1 border-b border-dividerLight">
|
||||||
|
<SmartEnvInput
|
||||||
|
v-model="auth.audience"
|
||||||
|
:auto-complete-env="true"
|
||||||
|
placeholder="Audience"
|
||||||
|
:envs="envs"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div class="flex flex-1 border-b border-dividerLight">
|
||||||
|
<SmartEnvInput
|
||||||
|
v-model="auth.keyId"
|
||||||
|
:auto-complete-env="true"
|
||||||
|
placeholder="Key ID"
|
||||||
|
:envs="envs"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="flex items-center border-b border-dividerLight">
|
||||||
|
<span class="flex items-center">
|
||||||
|
<label class="ml-4 text-secondaryLight"> Algorithm </label>
|
||||||
|
<tippy
|
||||||
|
interactive
|
||||||
|
trigger="click"
|
||||||
|
theme="popover"
|
||||||
|
:on-shown="() => authTippyActions.focus()"
|
||||||
|
>
|
||||||
|
<HoppSmartSelectWrapper>
|
||||||
|
<HoppButtonSecondary
|
||||||
|
:label="auth.algorithm"
|
||||||
|
class="ml-2 rounded-none pr-8"
|
||||||
|
/>
|
||||||
|
</HoppSmartSelectWrapper>
|
||||||
|
<template #content="{ hide }">
|
||||||
|
<div
|
||||||
|
ref="authTippyActions"
|
||||||
|
class="flex flex-col focus:outline-none"
|
||||||
|
tabindex="0"
|
||||||
|
@keyup.escape="hide()"
|
||||||
|
>
|
||||||
|
<HoppSmartItem
|
||||||
|
v-for="alg in algorithms"
|
||||||
|
:key="alg"
|
||||||
|
:icon="auth.algorithm === alg ? IconCircleDot : IconCircle"
|
||||||
|
:active="auth.algorithm === alg"
|
||||||
|
:label="alg"
|
||||||
|
@click="
|
||||||
|
() => {
|
||||||
|
auth.algorithm = alg
|
||||||
|
hide()
|
||||||
|
}
|
||||||
|
"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</tippy>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="flex flex-1 border-b border-dividerLight items-center">
|
||||||
|
<label class="ml-4 text-secondaryLight"> Private Key </label>
|
||||||
|
<label :for="`attachment`" class="p-0">
|
||||||
|
<input
|
||||||
|
:id="`attachment`"
|
||||||
|
:name="`attachment`"
|
||||||
|
type="file"
|
||||||
|
multiple
|
||||||
|
class="cursor-pointer p-1 text-tiny text-secondaryLight transition file:mr-2 file:cursor-pointer file:rounded file:border-0 file:bg-primaryLight file:px-4 file:py-1 file:text-tiny file:text-secondary file:transition hover:text-secondaryDark hover:file:bg-primaryDark hover:file:text-secondaryDark"
|
||||||
|
@change="setPrivateKey($event)"
|
||||||
|
/>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
<pre>
|
||||||
|
{{ auth.privateKey }}
|
||||||
|
</pre>
|
||||||
|
|
||||||
|
<!-- advanced config -->
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<!-- label as advanced config here -->
|
||||||
|
<div class="p-4">
|
||||||
|
<label class="text-secondaryLight"> Optional Configuration </label>
|
||||||
|
</div>
|
||||||
|
<div class="flex flex-1 border-b border-dividerLight h-[300px]">
|
||||||
|
<label class="ml-4 text-secondaryLight"> Additional Claims </label>
|
||||||
|
<div class="h-full relative">
|
||||||
|
<div ref="claimsRef" class="absolute inset-0"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="flex flex-1 border-b border-dividerLight">
|
||||||
|
<SmartEnvInput
|
||||||
|
v-model="auth.subject"
|
||||||
|
:auto-complete-env="true"
|
||||||
|
placeholder="Subject"
|
||||||
|
:envs="envs"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div class="flex flex-1 border-b border-dividerLight">
|
||||||
|
<SmartEnvInput
|
||||||
|
v-model="auth.expiresIn"
|
||||||
|
:auto-complete-env="true"
|
||||||
|
placeholder="Expires In"
|
||||||
|
:envs="envs"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="ts">
|
||||||
|
import IconCircle from "~icons/lucide/circle"
|
||||||
|
import IconCircleDot from "~icons/lucide/circle-dot"
|
||||||
|
import { useI18n } from "@composables/i18n"
|
||||||
|
import { HoppRESTAuthASAP } from "@hoppscotch/data"
|
||||||
|
import { useVModel } from "@vueuse/core"
|
||||||
|
import { ref } from "vue"
|
||||||
|
import { AggregateEnvironment } from "~/newstore/environments"
|
||||||
|
import { useCodemirror } from "~/composables/codemirror"
|
||||||
|
import { reactive } from "vue"
|
||||||
|
import { Ref } from "vue"
|
||||||
|
import { getEditorLangForMimeType } from "~/helpers/editorutils"
|
||||||
|
import JSONLinter from "~/helpers/editor/linting/json"
|
||||||
|
|
||||||
|
const t = useI18n()
|
||||||
|
|
||||||
|
const props = defineProps<{
|
||||||
|
modelValue: HoppRESTAuthASAP
|
||||||
|
envs?: AggregateEnvironment[]
|
||||||
|
}>()
|
||||||
|
|
||||||
|
const emit = defineEmits<{
|
||||||
|
(e: "update:modelValue", value: HoppRESTAuthASAP): void
|
||||||
|
}>()
|
||||||
|
|
||||||
|
const auth = useVModel(props, "modelValue", emit)
|
||||||
|
|
||||||
|
const claimsRef = ref<any | null>(null)
|
||||||
|
const codemirrorValue: Ref<string | undefined> =
|
||||||
|
typeof auth.value.additionalClaims === "string"
|
||||||
|
? ref(auth.value.additionalClaims)
|
||||||
|
: ref(undefined)
|
||||||
|
|
||||||
|
useCodemirror(
|
||||||
|
claimsRef,
|
||||||
|
codemirrorValue,
|
||||||
|
reactive({
|
||||||
|
extendedEditorConfig: {
|
||||||
|
mode: getEditorLangForMimeType("application/json"),
|
||||||
|
placeholder: t("request.raw_body").toString(),
|
||||||
|
},
|
||||||
|
linter: JSONLinter,
|
||||||
|
completer: null,
|
||||||
|
environmentHighlights: true,
|
||||||
|
})
|
||||||
|
)
|
||||||
|
|
||||||
|
const algorithms: HoppRESTAuthASAP["algorithm"][] = [
|
||||||
|
"RS256",
|
||||||
|
"RS384",
|
||||||
|
"RS512",
|
||||||
|
"PS256",
|
||||||
|
"PS384",
|
||||||
|
"PS512",
|
||||||
|
"ES256",
|
||||||
|
"ES384",
|
||||||
|
"ES512",
|
||||||
|
]
|
||||||
|
|
||||||
|
const setPrivateKey = (e: Event) => {
|
||||||
|
const target = e.target as HTMLInputElement
|
||||||
|
const file = target.files?.[0]
|
||||||
|
if (!file) return
|
||||||
|
|
||||||
|
const reader = new FileReader()
|
||||||
|
reader.onload = (e) => {
|
||||||
|
const result = e.target?.result
|
||||||
|
if (typeof result !== "string") return
|
||||||
|
|
||||||
|
auth.value.privateKey = result
|
||||||
|
}
|
||||||
|
reader.readAsText(file)
|
||||||
|
}
|
||||||
|
|
||||||
|
const authTippyActions = ref<any | null>(null)
|
||||||
|
</script>
|
||||||
@@ -0,0 +1,140 @@
|
|||||||
|
<template>
|
||||||
|
<div class="flex flex-1 border-b border-dividerLight">
|
||||||
|
<SmartEnvInput
|
||||||
|
v-model="auth.accessKey"
|
||||||
|
:auto-complete-env="true"
|
||||||
|
:placeholder="t('authorization.aws_signature.access_key')"
|
||||||
|
:envs="envs"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div class="flex flex-1 border-b border-dividerLight">
|
||||||
|
<SmartEnvInput
|
||||||
|
v-model="auth.secretKey"
|
||||||
|
:auto-complete-env="true"
|
||||||
|
:placeholder="t('authorization.aws_signature.secret_key')"
|
||||||
|
:envs="envs"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- advanced config -->
|
||||||
|
|
||||||
|
<div class="flex flex-col divide-y divide-dividerLight">
|
||||||
|
<!-- label as advanced config here -->
|
||||||
|
<div class="p-4 flex flex-col space-y-1">
|
||||||
|
<label class="">
|
||||||
|
{{ t("authorization.aws_signature.advance_config") }}
|
||||||
|
</label>
|
||||||
|
<p class="text-secondaryLight">
|
||||||
|
{{ t("authorization.aws_signature.advance_config_description") }}
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
<div class="flex flex-1">
|
||||||
|
<SmartEnvInput
|
||||||
|
v-model="auth.region"
|
||||||
|
:auto-complete-env="true"
|
||||||
|
:placeholder="t('authorization.aws_signature.aws_region')"
|
||||||
|
:envs="envs"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div class="flex flex-1">
|
||||||
|
<SmartEnvInput
|
||||||
|
v-model="auth.serviceName"
|
||||||
|
:auto-complete-env="true"
|
||||||
|
:placeholder="t('authorization.aws_signature.service_name')"
|
||||||
|
:envs="envs"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div class="flex flex-1">
|
||||||
|
<SmartEnvInput
|
||||||
|
v-model="auth.serviceToken"
|
||||||
|
:auto-complete-env="true"
|
||||||
|
:placeholder="t('authorization.aws_signature.service_token')"
|
||||||
|
:envs="envs"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div class="flex items-center !border-b border-dividerLight">
|
||||||
|
<span class="flex items-center">
|
||||||
|
<label class="ml-4 text-secondaryLight">
|
||||||
|
{{ t("authorization.pass_key_by") }}
|
||||||
|
</label>
|
||||||
|
<tippy
|
||||||
|
interactive
|
||||||
|
trigger="click"
|
||||||
|
theme="popover"
|
||||||
|
:on-shown="() => authTippyActions.focus()"
|
||||||
|
>
|
||||||
|
<HoppSmartSelectWrapper>
|
||||||
|
<HoppButtonSecondary
|
||||||
|
:label="
|
||||||
|
auth.addTo
|
||||||
|
? auth.addTo === 'HEADERS'
|
||||||
|
? t('authorization.pass_by_headers_label')
|
||||||
|
: t('authorization.pass_by_query_params_label')
|
||||||
|
: t('state.none')
|
||||||
|
"
|
||||||
|
class="ml-2 rounded-none pr-8"
|
||||||
|
/>
|
||||||
|
</HoppSmartSelectWrapper>
|
||||||
|
<template #content="{ hide }">
|
||||||
|
<div
|
||||||
|
ref="authTippyActions"
|
||||||
|
class="flex flex-col focus:outline-none"
|
||||||
|
tabindex="0"
|
||||||
|
@keyup.escape="hide()"
|
||||||
|
>
|
||||||
|
<HoppSmartItem
|
||||||
|
:icon="auth.addTo === 'HEADERS' ? IconCircleDot : IconCircle"
|
||||||
|
:active="auth.addTo === 'HEADERS'"
|
||||||
|
:label="t('authorization.pass_by_headers_label')"
|
||||||
|
@click="
|
||||||
|
() => {
|
||||||
|
auth.addTo = 'HEADERS'
|
||||||
|
hide()
|
||||||
|
}
|
||||||
|
"
|
||||||
|
/>
|
||||||
|
<HoppSmartItem
|
||||||
|
:icon="
|
||||||
|
auth.addTo === 'QUERY_PARAMS' ? IconCircleDot : IconCircle
|
||||||
|
"
|
||||||
|
:active="auth.addTo === 'QUERY_PARAMS'"
|
||||||
|
:label="t('authorization.pass_by_query_params_label')"
|
||||||
|
@click="
|
||||||
|
() => {
|
||||||
|
auth.addTo = 'QUERY_PARAMS'
|
||||||
|
hide()
|
||||||
|
}
|
||||||
|
"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</tippy>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="ts">
|
||||||
|
import IconCircle from "~icons/lucide/circle"
|
||||||
|
import IconCircleDot from "~icons/lucide/circle-dot"
|
||||||
|
import { useI18n } from "@composables/i18n"
|
||||||
|
import { HoppRESTAuthAWSSignature } from "@hoppscotch/data"
|
||||||
|
import { useVModel } from "@vueuse/core"
|
||||||
|
import { AggregateEnvironment } from "~/newstore/environments"
|
||||||
|
import { ref } from "vue"
|
||||||
|
|
||||||
|
const t = useI18n()
|
||||||
|
|
||||||
|
const props = defineProps<{
|
||||||
|
modelValue: HoppRESTAuthAWSSignature
|
||||||
|
envs?: AggregateEnvironment[]
|
||||||
|
}>()
|
||||||
|
|
||||||
|
const emit = defineEmits<{
|
||||||
|
(e: "update:modelValue", value: HoppRESTAuthAWSSignature): void
|
||||||
|
}>()
|
||||||
|
|
||||||
|
const auth = useVModel(props, "modelValue", emit)
|
||||||
|
|
||||||
|
const authTippyActions = ref<any | null>(null)
|
||||||
|
</script>
|
||||||
@@ -0,0 +1,96 @@
|
|||||||
|
<template>
|
||||||
|
<div class="flex flex-1 border-b border-dividerLight">
|
||||||
|
<SmartEnvInput
|
||||||
|
v-model="auth.accessToken"
|
||||||
|
:auto-complete-env="true"
|
||||||
|
placeholder="Access Token"
|
||||||
|
:envs="envs"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div class="flex flex-1 border-b border-dividerLight">
|
||||||
|
<SmartEnvInput
|
||||||
|
v-model="auth.clientToken"
|
||||||
|
:auto-complete-env="true"
|
||||||
|
placeholder="Client Token"
|
||||||
|
:envs="envs"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div class="flex flex-1 border-b border-dividerLight">
|
||||||
|
<SmartEnvInput
|
||||||
|
v-model="auth.clientSecret"
|
||||||
|
:auto-complete-env="true"
|
||||||
|
placeholder="Client Secret"
|
||||||
|
:envs="envs"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- advanced config -->
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<!-- label as advanced config here -->
|
||||||
|
<div class="p-4">
|
||||||
|
<label class="text-secondaryLight"> Advanced Configuration </label>
|
||||||
|
<p>
|
||||||
|
Hoppscotch automatically assigns default values to certain fields if no
|
||||||
|
explicit value is provided.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
<div class="flex flex-1 border-b border-dividerLight">
|
||||||
|
<SmartEnvInput
|
||||||
|
v-model="auth.nonce"
|
||||||
|
:auto-complete-env="true"
|
||||||
|
placeholder="Nonce"
|
||||||
|
:envs="envs"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div class="flex flex-1 border-b border-dividerLight">
|
||||||
|
<SmartEnvInput
|
||||||
|
v-model="auth.timestamp"
|
||||||
|
:auto-complete-env="true"
|
||||||
|
placeholder="Timestamp"
|
||||||
|
:envs="envs"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div class="flex flex-1 border-b border-dividerLight">
|
||||||
|
<SmartEnvInput
|
||||||
|
v-model="auth.host"
|
||||||
|
:auto-complete-env="true"
|
||||||
|
placeholder="Host"
|
||||||
|
:envs="envs"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div class="flex flex-1 border-b border-dividerLight">
|
||||||
|
<SmartEnvInput
|
||||||
|
v-model="auth.headersToSign"
|
||||||
|
:auto-complete-env="true"
|
||||||
|
placeholder="Headers to Sign"
|
||||||
|
:envs="envs"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div class="flex flex-1 border-b border-dividerLight">
|
||||||
|
<SmartEnvInput
|
||||||
|
v-model="auth.maxBody"
|
||||||
|
:auto-complete-env="true"
|
||||||
|
placeholder="Max Body Size"
|
||||||
|
:envs="envs"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="ts">
|
||||||
|
import { HoppRESTAuthAkamaiEdgeGrid } from "@hoppscotch/data"
|
||||||
|
import { useVModel } from "@vueuse/core"
|
||||||
|
import { AggregateEnvironment } from "~/newstore/environments"
|
||||||
|
|
||||||
|
const props = defineProps<{
|
||||||
|
modelValue: HoppRESTAuthAkamaiEdgeGrid
|
||||||
|
envs?: AggregateEnvironment[]
|
||||||
|
}>()
|
||||||
|
|
||||||
|
const emit = defineEmits<{
|
||||||
|
(e: "update:modelValue", value: HoppRESTAuthAkamaiEdgeGrid): void
|
||||||
|
}>()
|
||||||
|
|
||||||
|
const auth = useVModel(props, "modelValue", emit)
|
||||||
|
</script>
|
||||||
@@ -0,0 +1,152 @@
|
|||||||
|
<template>
|
||||||
|
<div class="flex flex-1 border-b border-dividerLight">
|
||||||
|
<SmartEnvInput
|
||||||
|
v-model="auth.authId"
|
||||||
|
:auto-complete-env="true"
|
||||||
|
placeholder="HAWK Auth ID"
|
||||||
|
:envs="envs"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div class="flex flex-1 border-b border-dividerLight">
|
||||||
|
<SmartEnvInput
|
||||||
|
v-model="auth.authKey"
|
||||||
|
:auto-complete-env="true"
|
||||||
|
placeholder="HAWK Auth Key"
|
||||||
|
:envs="envs"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="flex items-center border-b border-dividerLight">
|
||||||
|
<span class="flex items-center">
|
||||||
|
<label class="ml-4 text-secondaryLight"> Algorithm </label>
|
||||||
|
<tippy
|
||||||
|
interactive
|
||||||
|
trigger="click"
|
||||||
|
theme="popover"
|
||||||
|
:on-shown="() => authTippyActions.focus()"
|
||||||
|
>
|
||||||
|
<HoppSmartSelectWrapper>
|
||||||
|
<HoppButtonSecondary
|
||||||
|
:label="auth.algorithm"
|
||||||
|
class="ml-2 rounded-none pr-8"
|
||||||
|
/>
|
||||||
|
</HoppSmartSelectWrapper>
|
||||||
|
<template #content="{ hide }">
|
||||||
|
<div
|
||||||
|
ref="authTippyActions"
|
||||||
|
class="flex flex-col focus:outline-none"
|
||||||
|
tabindex="0"
|
||||||
|
@keyup.escape="hide()"
|
||||||
|
>
|
||||||
|
<HoppSmartItem
|
||||||
|
v-for="alg in algorithms"
|
||||||
|
:key="alg"
|
||||||
|
:icon="auth.algorithm === alg ? IconCircleDot : IconCircle"
|
||||||
|
:active="auth.algorithm === alg"
|
||||||
|
:label="alg"
|
||||||
|
@click="
|
||||||
|
() => {
|
||||||
|
auth.algorithm = alg
|
||||||
|
hide()
|
||||||
|
}
|
||||||
|
"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</tippy>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- advanced config -->
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<!-- label as advanced config here -->
|
||||||
|
<div class="p-4">
|
||||||
|
<label class="text-secondaryLight"> Optional Config </label>
|
||||||
|
</div>
|
||||||
|
<div class="flex flex-1 border-b border-dividerLight">
|
||||||
|
<SmartEnvInput
|
||||||
|
v-model="auth.user"
|
||||||
|
:auto-complete-env="true"
|
||||||
|
:placeholder="t('authorization.username')"
|
||||||
|
:envs="envs"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div class="flex flex-1 border-b border-dividerLight">
|
||||||
|
<SmartEnvInput
|
||||||
|
v-model="auth.nonce"
|
||||||
|
:auto-complete-env="true"
|
||||||
|
placeholder="Nonce"
|
||||||
|
:envs="envs"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div class="flex flex-1 border-b border-dividerLight">
|
||||||
|
<SmartEnvInput
|
||||||
|
v-model="auth.ext"
|
||||||
|
:auto-complete-env="true"
|
||||||
|
placeholder="ext"
|
||||||
|
:envs="envs"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div class="flex flex-1 border-b border-dividerLight">
|
||||||
|
<SmartEnvInput
|
||||||
|
v-model="auth.app"
|
||||||
|
:auto-complete-env="true"
|
||||||
|
placeholder="app"
|
||||||
|
:envs="envs"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div class="flex flex-1 border-b border-dividerLight">
|
||||||
|
<SmartEnvInput
|
||||||
|
v-model="auth.dlg"
|
||||||
|
:auto-complete-env="true"
|
||||||
|
placeholder="dlg"
|
||||||
|
:envs="envs"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div class="flex flex-1 border-b border-dividerLight">
|
||||||
|
<SmartEnvInput
|
||||||
|
v-model="auth.timestamp"
|
||||||
|
:auto-complete-env="true"
|
||||||
|
placeholder="Timestamp"
|
||||||
|
:envs="envs"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="px-4 mt-6">
|
||||||
|
<HoppSmartCheckbox
|
||||||
|
:on="auth.includePayloadHash"
|
||||||
|
@change="auth.includePayloadHash = !auth.includePayloadHash"
|
||||||
|
>
|
||||||
|
Include Payload Hash
|
||||||
|
</HoppSmartCheckbox>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="ts">
|
||||||
|
import IconCircle from "~icons/lucide/circle"
|
||||||
|
import IconCircleDot from "~icons/lucide/circle-dot"
|
||||||
|
import { useI18n } from "@composables/i18n"
|
||||||
|
import { HoppRESTAuthHAWK } from "@hoppscotch/data"
|
||||||
|
import { useVModel } from "@vueuse/core"
|
||||||
|
import { ref } from "vue"
|
||||||
|
import { AggregateEnvironment } from "~/newstore/environments"
|
||||||
|
|
||||||
|
const t = useI18n()
|
||||||
|
|
||||||
|
const props = defineProps<{
|
||||||
|
modelValue: HoppRESTAuthHAWK
|
||||||
|
envs?: AggregateEnvironment[]
|
||||||
|
}>()
|
||||||
|
|
||||||
|
const emit = defineEmits<{
|
||||||
|
(e: "update:modelValue", value: HoppRESTAuthHAWK): void
|
||||||
|
}>()
|
||||||
|
|
||||||
|
const auth = useVModel(props, "modelValue", emit)
|
||||||
|
|
||||||
|
const algorithms: HoppRESTAuthHAWK["algorithm"][] = ["sha256", "sha1"]
|
||||||
|
|
||||||
|
const authTippyActions = ref<any | null>(null)
|
||||||
|
</script>
|
||||||
@@ -0,0 +1,77 @@
|
|||||||
|
<template>
|
||||||
|
<div class="flex flex-1 border-b border-dividerLight">
|
||||||
|
<SmartEnvInput
|
||||||
|
v-model="auth.username"
|
||||||
|
:auto-complete-env="true"
|
||||||
|
:placeholder="t('authorization.username')"
|
||||||
|
:envs="envs"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div class="flex flex-1 border-b border-dividerLight">
|
||||||
|
<input
|
||||||
|
v-model="auth.password"
|
||||||
|
name="password"
|
||||||
|
:placeholder="t('authorization.password')"
|
||||||
|
class="flex flex-1 bg-transparent px-4 py-2"
|
||||||
|
type="password"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- advanced config -->
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<!-- label as advanced config here -->
|
||||||
|
<div class="p-4">
|
||||||
|
<label class="text-secondaryLight"> Advanced Configuration </label>
|
||||||
|
<p>
|
||||||
|
Hoppscotch automatically assigns default values to certain fields if no
|
||||||
|
explicit value is provided.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
<div class="flex flex-1 border-b border-dividerLight">
|
||||||
|
<SmartEnvInput
|
||||||
|
v-model="auth.domain"
|
||||||
|
:auto-complete-env="true"
|
||||||
|
placeholder="Domain"
|
||||||
|
:envs="envs"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div class="flex flex-1 border-b border-dividerLight">
|
||||||
|
<SmartEnvInput
|
||||||
|
v-model="auth.workstation"
|
||||||
|
:auto-complete-env="true"
|
||||||
|
placeholder="Workstation"
|
||||||
|
:envs="envs"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="px-4 mt-6">
|
||||||
|
<HoppSmartCheckbox
|
||||||
|
:on="auth.retryingRequest"
|
||||||
|
@change="auth.retryingRequest = !auth.retryingRequest"
|
||||||
|
>
|
||||||
|
Disable Retrying Requset
|
||||||
|
</HoppSmartCheckbox>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="ts">
|
||||||
|
import { useI18n } from "@composables/i18n"
|
||||||
|
import { HoppRESTAuthNTLM } from "@hoppscotch/data"
|
||||||
|
import { useVModel } from "@vueuse/core"
|
||||||
|
import { AggregateEnvironment } from "~/newstore/environments"
|
||||||
|
|
||||||
|
const t = useI18n()
|
||||||
|
|
||||||
|
const props = defineProps<{
|
||||||
|
modelValue: HoppRESTAuthNTLM
|
||||||
|
envs?: AggregateEnvironment[]
|
||||||
|
}>()
|
||||||
|
|
||||||
|
const emit = defineEmits<{
|
||||||
|
(e: "update:modelValue", value: HoppRESTAuthNTLM): void
|
||||||
|
}>()
|
||||||
|
|
||||||
|
const auth = useVModel(props, "modelValue", emit)
|
||||||
|
</script>
|
||||||
@@ -182,11 +182,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import {
|
import { HoppGQLAuthOAuth2, HoppRESTAuthOAuth2 } from "@hoppscotch/data"
|
||||||
HoppGQLAuthOAuth2,
|
|
||||||
HoppRESTAuthOAuth2,
|
|
||||||
parseTemplateStringE,
|
|
||||||
} from "@hoppscotch/data"
|
|
||||||
import { useService } from "dioc/vue"
|
import { useService } from "dioc/vue"
|
||||||
import * as E from "fp-ts/Either"
|
import * as E from "fp-ts/Either"
|
||||||
import { Ref, computed, ref } from "vue"
|
import { Ref, computed, ref } from "vue"
|
||||||
@@ -194,7 +190,7 @@ import { z } from "zod"
|
|||||||
import { useI18n } from "~/composables/i18n"
|
import { useI18n } from "~/composables/i18n"
|
||||||
import { refWithCallbackOnChange } from "~/composables/ref"
|
import { refWithCallbackOnChange } from "~/composables/ref"
|
||||||
import { useToast } from "~/composables/toast"
|
import { useToast } from "~/composables/toast"
|
||||||
import { getCombinedEnvVariables } from "~/helpers/preRequest"
|
import { replaceTemplateStringsInObjectValues } from "~/helpers/auth"
|
||||||
import { AggregateEnvironment } from "~/newstore/environments"
|
import { AggregateEnvironment } from "~/newstore/environments"
|
||||||
import authCode, {
|
import authCode, {
|
||||||
AuthCodeOauthFlowParams,
|
AuthCodeOauthFlowParams,
|
||||||
@@ -1057,55 +1053,6 @@ const generateOAuthToken = async () => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const replaceTemplateStringsInObjectValues = <
|
|
||||||
T extends Record<string, unknown>,
|
|
||||||
>(
|
|
||||||
obj: T
|
|
||||||
) => {
|
|
||||||
const envs = getCombinedEnvVariables()
|
|
||||||
|
|
||||||
const requestVariables =
|
|
||||||
props.source === "REST"
|
|
||||||
? restTabsService.currentActiveTab.value.document.request.requestVariables.map(
|
|
||||||
({ key, value }) => ({
|
|
||||||
key,
|
|
||||||
value,
|
|
||||||
secret: false,
|
|
||||||
})
|
|
||||||
)
|
|
||||||
: []
|
|
||||||
|
|
||||||
// Ensure request variables are prioritized by removing any selected/global environment variables with the same key
|
|
||||||
const selectedEnvVars = envs.selected.filter(
|
|
||||||
({ key }) =>
|
|
||||||
!requestVariables.some(({ key: reqVarKey }) => reqVarKey === key)
|
|
||||||
)
|
|
||||||
const globalEnvVars = envs.global.filter(
|
|
||||||
({ key }) =>
|
|
||||||
!requestVariables.some(({ key: reqVarKey }) => reqVarKey === key)
|
|
||||||
)
|
|
||||||
|
|
||||||
const envVars = [...selectedEnvVars, ...globalEnvVars, ...requestVariables]
|
|
||||||
|
|
||||||
const newObj: Partial<T> = {}
|
|
||||||
|
|
||||||
for (const key in obj) {
|
|
||||||
const val = obj[key]
|
|
||||||
|
|
||||||
if (typeof val === "string") {
|
|
||||||
const parseResult = parseTemplateStringE(val, envVars)
|
|
||||||
|
|
||||||
newObj[key] = E.isRight(parseResult)
|
|
||||||
? (parseResult.right as T[typeof key])
|
|
||||||
: (val as T[typeof key])
|
|
||||||
} else {
|
|
||||||
newObj[key] = val
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return newObj as T
|
|
||||||
}
|
|
||||||
|
|
||||||
const grantTypeTippyActions = ref<HTMLElement | null>(null)
|
const grantTypeTippyActions = ref<HTMLElement | null>(null)
|
||||||
const pkceTippyActions = ref<HTMLElement | null>(null)
|
const pkceTippyActions = ref<HTMLElement | null>(null)
|
||||||
const authTippyActions = ref<HTMLElement | null>(null)
|
const authTippyActions = ref<HTMLElement | null>(null)
|
||||||
@@ -185,7 +185,7 @@ export function runRESTRequest$(
|
|||||||
const res = getFinalEnvsFromPreRequest(
|
const res = getFinalEnvsFromPreRequest(
|
||||||
tab.value.document.request.preRequestScript,
|
tab.value.document.request.preRequestScript,
|
||||||
getCombinedEnvVariables()
|
getCombinedEnvVariables()
|
||||||
).then((envs) => {
|
).then(async (envs) => {
|
||||||
if (cancelCalled) return E.left("cancellation" as const)
|
if (cancelCalled) return E.left("cancellation" as const)
|
||||||
|
|
||||||
if (E.isLeft(envs)) {
|
if (E.isLeft(envs)) {
|
||||||
@@ -254,7 +254,9 @@ export function runRESTRequest$(
|
|||||||
variables: finalEnvsWithNonEmptyValues,
|
variables: finalEnvsWithNonEmptyValues,
|
||||||
})
|
})
|
||||||
|
|
||||||
const [stream, cancelRun] = createRESTNetworkRequestStream(effectiveRequest)
|
const [stream, cancelRun] = createRESTNetworkRequestStream(
|
||||||
|
await effectiveRequest
|
||||||
|
)
|
||||||
cancelFunc = cancelRun
|
cancelFunc = cancelRun
|
||||||
|
|
||||||
const subscription = stream
|
const subscription = stream
|
||||||
|
|||||||
56
packages/hoppscotch-common/src/helpers/auth/index.ts
Normal file
56
packages/hoppscotch-common/src/helpers/auth/index.ts
Normal file
@@ -0,0 +1,56 @@
|
|||||||
|
import { getService } from "~/modules/dioc"
|
||||||
|
import { getCombinedEnvVariables } from "../preRequest"
|
||||||
|
import { RESTTabService } from "~/services/tab/rest"
|
||||||
|
import { parseTemplateStringE } from "@hoppscotch/data"
|
||||||
|
import * as E from "fp-ts/Either"
|
||||||
|
|
||||||
|
export const replaceTemplateStringsInObjectValues = <
|
||||||
|
T extends Record<string, unknown>,
|
||||||
|
>(
|
||||||
|
obj: T,
|
||||||
|
source: "REST" | "GQL" = "REST"
|
||||||
|
) => {
|
||||||
|
const envs = getCombinedEnvVariables()
|
||||||
|
const restTabsService = getService(RESTTabService)
|
||||||
|
|
||||||
|
const requestVariables =
|
||||||
|
source === "REST"
|
||||||
|
? restTabsService.currentActiveTab.value.document.request.requestVariables.map(
|
||||||
|
({ key, value }) => ({
|
||||||
|
key,
|
||||||
|
value,
|
||||||
|
secret: false,
|
||||||
|
})
|
||||||
|
)
|
||||||
|
: []
|
||||||
|
|
||||||
|
// Ensure request variables are prioritized by removing any selected/global environment variables with the same key
|
||||||
|
const selectedEnvVars = envs.selected.filter(
|
||||||
|
({ key }) =>
|
||||||
|
!requestVariables.some(({ key: reqVarKey }) => reqVarKey === key)
|
||||||
|
)
|
||||||
|
const globalEnvVars = envs.global.filter(
|
||||||
|
({ key }) =>
|
||||||
|
!requestVariables.some(({ key: reqVarKey }) => reqVarKey === key)
|
||||||
|
)
|
||||||
|
|
||||||
|
const envVars = [...selectedEnvVars, ...globalEnvVars, ...requestVariables]
|
||||||
|
|
||||||
|
const newObj: Partial<T> = {}
|
||||||
|
|
||||||
|
for (const key in obj) {
|
||||||
|
const val = obj[key]
|
||||||
|
|
||||||
|
if (typeof val === "string") {
|
||||||
|
const parseResult = parseTemplateStringE(val, envVars)
|
||||||
|
|
||||||
|
newObj[key] = E.isRight(parseResult)
|
||||||
|
? (parseResult.right as T[typeof key])
|
||||||
|
: (val as T[typeof key])
|
||||||
|
} else {
|
||||||
|
newObj[key] = val
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return newObj as T
|
||||||
|
}
|
||||||
@@ -1,5 +1,6 @@
|
|||||||
import { GQLHeader, HoppGQLAuth, makeGQLRequest } from "@hoppscotch/data"
|
import { GQLHeader, HoppGQLAuth, makeGQLRequest } from "@hoppscotch/data"
|
||||||
import { OperationType } from "@urql/core"
|
import { OperationType } from "@urql/core"
|
||||||
|
import { AwsV4Signer } from "aws4fetch"
|
||||||
import * as E from "fp-ts/Either"
|
import * as E from "fp-ts/Either"
|
||||||
import {
|
import {
|
||||||
GraphQLEnumType,
|
GraphQLEnumType,
|
||||||
@@ -286,6 +287,33 @@ export const runGQLOperation = async (options: RunQueryOptions) => {
|
|||||||
} else if (addTo === "QUERY_PARAMS") {
|
} else if (addTo === "QUERY_PARAMS") {
|
||||||
params[key] = value
|
params[key] = value
|
||||||
}
|
}
|
||||||
|
} else if (auth.authType === "aws-signature") {
|
||||||
|
const { accessKey, secretKey, region, serviceName, addTo } = auth
|
||||||
|
|
||||||
|
const currentDate = new Date()
|
||||||
|
const amzDate = currentDate.toISOString().replace(/[:-]|\.\d{3}/g, "")
|
||||||
|
|
||||||
|
const signer = new AwsV4Signer({
|
||||||
|
datetime: amzDate,
|
||||||
|
signQuery: addTo === "QUERY_PARAMS",
|
||||||
|
accessKeyId: accessKey,
|
||||||
|
secretAccessKey: secretKey,
|
||||||
|
region: region ?? "us-east-1",
|
||||||
|
service: serviceName,
|
||||||
|
url,
|
||||||
|
})
|
||||||
|
|
||||||
|
const sign = await signer.sign()
|
||||||
|
|
||||||
|
if (addTo === "HEADERS") {
|
||||||
|
sign.headers.forEach((v, k) => {
|
||||||
|
finalHeaders[k] = v
|
||||||
|
})
|
||||||
|
} else if (addTo === "QUERY_PARAMS") {
|
||||||
|
for (const [k, v] of sign.url.searchParams) {
|
||||||
|
params[k] = v
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -4,18 +4,6 @@ import * as N from "fp-ts/number"
|
|||||||
import * as S from "fp-ts/string"
|
import * as S from "fp-ts/string"
|
||||||
import { lodashIsEqualEq, mapThenEq, undefinedEq } from "./eq"
|
import { lodashIsEqualEq, mapThenEq, undefinedEq } from "./eq"
|
||||||
|
|
||||||
export type HoppGQLParam = {
|
|
||||||
key: string
|
|
||||||
value: string
|
|
||||||
active: boolean
|
|
||||||
}
|
|
||||||
|
|
||||||
export type HoppGQLHeader = {
|
|
||||||
key: string
|
|
||||||
value: string
|
|
||||||
active: boolean
|
|
||||||
}
|
|
||||||
|
|
||||||
export type FormDataKeyValue = {
|
export type FormDataKeyValue = {
|
||||||
key: string
|
key: string
|
||||||
active: boolean
|
active: boolean
|
||||||
|
|||||||
@@ -24,6 +24,7 @@ import {
|
|||||||
import { arrayFlatMap, arraySort } from "../functional/array"
|
import { arrayFlatMap, arraySort } from "../functional/array"
|
||||||
import { toFormData } from "../functional/formData"
|
import { toFormData } from "../functional/formData"
|
||||||
import { tupleWithSameKeysToRecord } from "../functional/record"
|
import { tupleWithSameKeysToRecord } from "../functional/record"
|
||||||
|
import { AwsV4Signer } from "aws4fetch"
|
||||||
|
|
||||||
export interface EffectiveHoppRESTRequest extends HoppRESTRequest {
|
export interface EffectiveHoppRESTRequest extends HoppRESTRequest {
|
||||||
/**
|
/**
|
||||||
@@ -47,7 +48,7 @@ export interface EffectiveHoppRESTRequest extends HoppRESTRequest {
|
|||||||
* @param showKeyIfSecret Whether to show the key if the value is a secret
|
* @param showKeyIfSecret Whether to show the key if the value is a secret
|
||||||
* @returns The list of headers
|
* @returns The list of headers
|
||||||
*/
|
*/
|
||||||
export const getComputedAuthHeaders = (
|
export const getComputedAuthHeaders = async (
|
||||||
envVars: Environment["variables"],
|
envVars: Environment["variables"],
|
||||||
req?:
|
req?:
|
||||||
| HoppRESTRequest
|
| HoppRESTRequest
|
||||||
@@ -131,6 +132,34 @@ export const getComputedAuthHeaders = (
|
|||||||
description: "",
|
description: "",
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
} else if (request.auth.authType === "aws-signature") {
|
||||||
|
const { addTo } = request.auth
|
||||||
|
if (addTo === "HEADERS") {
|
||||||
|
const currentDate = new Date()
|
||||||
|
const amzDate = currentDate.toISOString().replace(/[:-]|\.\d{3}/g, "")
|
||||||
|
const { method, endpoint } = req as HoppRESTRequest
|
||||||
|
const signer = new AwsV4Signer({
|
||||||
|
method: method,
|
||||||
|
datetime: amzDate,
|
||||||
|
accessKeyId: parseTemplateString(request.auth.accessKey, envVars),
|
||||||
|
secretAccessKey: parseTemplateString(request.auth.secretKey, envVars),
|
||||||
|
region:
|
||||||
|
parseTemplateString(request.auth.region, envVars) ?? "us-east-1",
|
||||||
|
service: parseTemplateString(request.auth.serviceName, envVars),
|
||||||
|
url: parseTemplateString(endpoint, envVars),
|
||||||
|
})
|
||||||
|
|
||||||
|
const sign = await signer.sign()
|
||||||
|
|
||||||
|
sign.headers.forEach((x, k) => {
|
||||||
|
headers.push({
|
||||||
|
active: true,
|
||||||
|
key: k,
|
||||||
|
value: x,
|
||||||
|
description: "",
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return headers
|
return headers
|
||||||
@@ -186,7 +215,7 @@ export type ComputedHeader = {
|
|||||||
* @param showKeyIfSecret Whether to show the key if the value is a secret
|
* @param showKeyIfSecret Whether to show the key if the value is a secret
|
||||||
* @returns The headers that are generated along with the source of that header
|
* @returns The headers that are generated along with the source of that header
|
||||||
*/
|
*/
|
||||||
export const getComputedHeaders = (
|
export const getComputedHeaders = async (
|
||||||
req:
|
req:
|
||||||
| HoppRESTRequest
|
| HoppRESTRequest
|
||||||
| {
|
| {
|
||||||
@@ -196,14 +225,16 @@ export const getComputedHeaders = (
|
|||||||
envVars: Environment["variables"],
|
envVars: Environment["variables"],
|
||||||
parse = true,
|
parse = true,
|
||||||
showKeyIfSecret = false
|
showKeyIfSecret = false
|
||||||
): ComputedHeader[] => {
|
): Promise<ComputedHeader[]> => {
|
||||||
return [
|
return [
|
||||||
...getComputedAuthHeaders(
|
...(
|
||||||
envVars,
|
await getComputedAuthHeaders(
|
||||||
req,
|
envVars,
|
||||||
undefined,
|
req,
|
||||||
parse,
|
undefined,
|
||||||
showKeyIfSecret
|
parse,
|
||||||
|
showKeyIfSecret
|
||||||
|
)
|
||||||
).map((header) => ({
|
).map((header) => ({
|
||||||
source: "auth" as const,
|
source: "auth" as const,
|
||||||
header,
|
header,
|
||||||
@@ -227,22 +258,55 @@ export type ComputedParam = {
|
|||||||
* @param envVars The environment variables active
|
* @param envVars The environment variables active
|
||||||
* @returns The params that are generated along with the source of that header
|
* @returns The params that are generated along with the source of that header
|
||||||
*/
|
*/
|
||||||
export const getComputedParams = (
|
export const getComputedParams = async (
|
||||||
req: HoppRESTRequest,
|
req: HoppRESTRequest,
|
||||||
envVars: Environment["variables"]
|
envVars: Environment["variables"]
|
||||||
): ComputedParam[] => {
|
): Promise<ComputedParam[]> => {
|
||||||
// When this gets complex, its best to split this function off (like with getComputedHeaders)
|
// When this gets complex, its best to split this function off (like with getComputedHeaders)
|
||||||
// API-key auth can be added to query params
|
// API-key auth can be added to query params
|
||||||
if (!req.auth || !req.auth.authActive) {
|
if (!req.auth || !req.auth.authActive) return []
|
||||||
return []
|
|
||||||
}
|
|
||||||
|
|
||||||
if (req.auth.authType !== "api-key" && req.auth.authType !== "oauth-2") {
|
if (
|
||||||
|
req.auth.authType !== "api-key" &&
|
||||||
|
req.auth.authType !== "oauth-2" &&
|
||||||
|
req.auth.authType !== "aws-signature"
|
||||||
|
)
|
||||||
return []
|
return []
|
||||||
}
|
|
||||||
|
|
||||||
if (req.auth.addTo !== "QUERY_PARAMS") {
|
if (req.auth.addTo !== "QUERY_PARAMS") return []
|
||||||
return []
|
|
||||||
|
if (req.auth.authType === "aws-signature") {
|
||||||
|
const { addTo } = req.auth
|
||||||
|
const params: ComputedParam[] = []
|
||||||
|
if (addTo === "QUERY_PARAMS") {
|
||||||
|
const currentDate = new Date()
|
||||||
|
const amzDate = currentDate.toISOString().replace(/[:-]|\.\d{3}/g, "")
|
||||||
|
|
||||||
|
const signer = new AwsV4Signer({
|
||||||
|
method: req.method,
|
||||||
|
datetime: amzDate,
|
||||||
|
signQuery: true,
|
||||||
|
accessKeyId: parseTemplateString(req.auth.accessKey, envVars),
|
||||||
|
secretAccessKey: parseTemplateString(req.auth.secretKey, envVars),
|
||||||
|
region: parseTemplateString(req.auth.region, envVars) ?? "us-east-1",
|
||||||
|
service: parseTemplateString(req.auth.serviceName, envVars),
|
||||||
|
url: parseTemplateString(req.endpoint, envVars),
|
||||||
|
})
|
||||||
|
const sign = await signer.sign()
|
||||||
|
|
||||||
|
for (const [k, v] of sign.url.searchParams) {
|
||||||
|
params.push({
|
||||||
|
source: "auth" as const,
|
||||||
|
param: {
|
||||||
|
active: true,
|
||||||
|
key: k,
|
||||||
|
value: v,
|
||||||
|
description: "",
|
||||||
|
},
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return params
|
||||||
}
|
}
|
||||||
|
|
||||||
if (req.auth.authType === "api-key") {
|
if (req.auth.authType === "api-key") {
|
||||||
@@ -259,19 +323,21 @@ export const getComputedParams = (
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
const { grantTypeInfo } = req.auth
|
if (req.auth.authType === "oauth-2") {
|
||||||
|
const { grantTypeInfo } = req.auth
|
||||||
return [
|
return [
|
||||||
{
|
{
|
||||||
source: "auth",
|
source: "auth",
|
||||||
param: {
|
param: {
|
||||||
active: true,
|
active: true,
|
||||||
key: "access_token",
|
key: "access_token",
|
||||||
value: parseTemplateString(grantTypeInfo.token, envVars, false, true),
|
value: parseTemplateString(grantTypeInfo.token, envVars),
|
||||||
description: "",
|
description: "",
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
]
|
||||||
]
|
}
|
||||||
|
return []
|
||||||
}
|
}
|
||||||
|
|
||||||
// Resolves environment variables in the body
|
// Resolves environment variables in the body
|
||||||
@@ -405,18 +471,15 @@ function getFinalBodyFromRequest(
|
|||||||
*
|
*
|
||||||
* @returns An object with extra fields defining a complete request
|
* @returns An object with extra fields defining a complete request
|
||||||
*/
|
*/
|
||||||
export function getEffectiveRESTRequest(
|
export async function getEffectiveRESTRequest(
|
||||||
request: HoppRESTRequest,
|
request: HoppRESTRequest,
|
||||||
environment: Environment,
|
environment: Environment,
|
||||||
showKeyIfSecret = false
|
showKeyIfSecret = false
|
||||||
): EffectiveHoppRESTRequest {
|
): Promise<EffectiveHoppRESTRequest> {
|
||||||
const effectiveFinalHeaders = pipe(
|
const effectiveFinalHeaders = pipe(
|
||||||
getComputedHeaders(
|
(await getComputedHeaders(request, environment.variables)).map(
|
||||||
request,
|
(h) => h.header
|
||||||
environment.variables,
|
),
|
||||||
true,
|
|
||||||
showKeyIfSecret
|
|
||||||
).map((h) => h.header),
|
|
||||||
A.concat(request.headers),
|
A.concat(request.headers),
|
||||||
A.filter((x) => x.active && x.key !== ""),
|
A.filter((x) => x.active && x.key !== ""),
|
||||||
A.map((x) => ({
|
A.map((x) => ({
|
||||||
@@ -437,7 +500,9 @@ export function getEffectiveRESTRequest(
|
|||||||
)
|
)
|
||||||
|
|
||||||
const effectiveFinalParams = pipe(
|
const effectiveFinalParams = pipe(
|
||||||
getComputedParams(request, environment.variables).map((p) => p.param),
|
(await getComputedParams(request, environment.variables)).map(
|
||||||
|
(p) => p.param
|
||||||
|
),
|
||||||
A.concat(request.params),
|
A.concat(request.params),
|
||||||
A.filter((x) => x.active && x.key !== ""),
|
A.filter((x) => x.active && x.key !== ""),
|
||||||
A.map((x) => ({
|
A.map((x) => ({
|
||||||
@@ -500,8 +565,8 @@ export function getEffectiveRESTRequest(
|
|||||||
export function getEffectiveRESTRequestStream(
|
export function getEffectiveRESTRequestStream(
|
||||||
request$: Observable<HoppRESTRequest>,
|
request$: Observable<HoppRESTRequest>,
|
||||||
environment$: Observable<Environment>
|
environment$: Observable<Environment>
|
||||||
): Observable<EffectiveHoppRESTRequest> {
|
): Observable<Promise<EffectiveHoppRESTRequest>> {
|
||||||
return combineLatest([request$, environment$]).pipe(
|
return combineLatest([request$, environment$]).pipe(
|
||||||
map(([request, env]) => getEffectiveRESTRequest(request, env))
|
map(async ([request, env]) => await getEffectiveRESTRequest(request, env))
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ import {
|
|||||||
import { cloneDeep } from "lodash-es"
|
import { cloneDeep } from "lodash-es"
|
||||||
import { pluck } from "rxjs/operators"
|
import { pluck } from "rxjs/operators"
|
||||||
import { resolveSaveContextOnRequestReorder } from "~/helpers/collection/request"
|
import { resolveSaveContextOnRequestReorder } from "~/helpers/collection/request"
|
||||||
import { HoppGQLHeader } from "~/helpers/graphql"
|
import { GQLHeader } from "@hoppscotch/data"
|
||||||
import { HoppInheritedProperty } from "~/helpers/types/HoppInheritedProperties"
|
import { HoppInheritedProperty } from "~/helpers/types/HoppInheritedProperties"
|
||||||
import { getService } from "~/modules/dioc"
|
import { getService } from "~/modules/dioc"
|
||||||
import { getI18n } from "~/modules/i18n"
|
import { getI18n } from "~/modules/i18n"
|
||||||
@@ -117,7 +117,7 @@ export function cascadeParentCollectionForHeaderAuth(
|
|||||||
const parentFolderAuth = parentFolder.auth as HoppRESTAuth | HoppGQLAuth
|
const parentFolderAuth = parentFolder.auth as HoppRESTAuth | HoppGQLAuth
|
||||||
const parentFolderHeaders = parentFolder.headers as
|
const parentFolderHeaders = parentFolder.headers as
|
||||||
| HoppRESTHeaders
|
| HoppRESTHeaders
|
||||||
| HoppGQLHeader[]
|
| GQLHeader[]
|
||||||
|
|
||||||
// check if the parent folder has authType 'inherit' and if it is the root folder
|
// check if the parent folder has authType 'inherit' and if it is the root folder
|
||||||
if (
|
if (
|
||||||
|
|||||||
@@ -1,18 +1,25 @@
|
|||||||
import { defineVersion } from "verzod"
|
import { defineVersion } from "verzod"
|
||||||
import { z } from "zod"
|
import { z } from "zod"
|
||||||
|
|
||||||
import { GQLHeader as GQLHeaderV1 } from "../../graphql/v/1"
|
import { GQLHeader as V1_GQLHeader } from "../../graphql/v/1"
|
||||||
import { GQLHeader as GQLHeaderV2 } from "../../graphql/v/6"
|
|
||||||
import { HoppRESTHeaders as V1_HoppRESTHeaders } from "../../rest/v/1"
|
import { HoppRESTHeaders as V1_HoppRESTHeaders } from "../../rest/v/1"
|
||||||
import { HoppRESTHeaders as V2_HoppRESTHeaders } from "../../rest/v/7"
|
|
||||||
import { HoppRESTAuth } from "../../rest/v/7"
|
import { HoppGQLAuth, GQLHeader as V2_GQLHeader } from "../../graphql/v/6"
|
||||||
import { HoppGQLAuth } from "../../graphql/v/6"
|
import {
|
||||||
|
HoppRESTAuth,
|
||||||
|
HoppRESTHeaders as V2_HoppRESTHeaders,
|
||||||
|
} from "../../rest/v/7"
|
||||||
|
|
||||||
import { v2_baseCollectionSchema, V2_SCHEMA } from "./2"
|
import { v2_baseCollectionSchema, V2_SCHEMA } from "./2"
|
||||||
|
|
||||||
const v3_baseCollectionSchema = v2_baseCollectionSchema.extend({
|
const v3_baseCollectionSchema = v2_baseCollectionSchema.extend({
|
||||||
v: z.literal(3),
|
v: z.literal(3),
|
||||||
headers: z.union([V2_HoppRESTHeaders, z.array(GQLHeaderV2)]),
|
|
||||||
|
// AWS Signature Authorization type addition
|
||||||
auth: z.union([HoppRESTAuth, HoppGQLAuth]),
|
auth: z.union([HoppRESTAuth, HoppGQLAuth]),
|
||||||
|
|
||||||
|
// `description` field addition under `headers`
|
||||||
|
headers: z.union([V2_HoppRESTHeaders, z.array(V2_GQLHeader)]),
|
||||||
})
|
})
|
||||||
|
|
||||||
type Input = z.input<typeof v3_baseCollectionSchema> & {
|
type Input = z.input<typeof v3_baseCollectionSchema> & {
|
||||||
@@ -32,7 +39,7 @@ export default defineVersion({
|
|||||||
initial: false,
|
initial: false,
|
||||||
schema: V3_SCHEMA,
|
schema: V3_SCHEMA,
|
||||||
up(old: z.infer<typeof V2_SCHEMA>) {
|
up(old: z.infer<typeof V2_SCHEMA>) {
|
||||||
const headers = (old.headers as V1_HoppRESTHeaders | GQLHeaderV1[]).map(
|
const headers = (old.headers as V1_HoppRESTHeaders | V1_GQLHeader[]).map(
|
||||||
(header) => ({
|
(header) => ({
|
||||||
...header,
|
...header,
|
||||||
description: "",
|
description: "",
|
||||||
|
|||||||
@@ -13,12 +13,11 @@ export {
|
|||||||
HoppGQLAuthInherit,
|
HoppGQLAuthInherit,
|
||||||
HoppGQLAuthNone,
|
HoppGQLAuthNone,
|
||||||
} from "./v/2"
|
} from "./v/2"
|
||||||
export { GQLHeader } from "./v/6"
|
|
||||||
|
|
||||||
export { HoppGQLAuth, HoppGQLAuthOAuth2 } from "./v/6"
|
|
||||||
|
|
||||||
export { HoppGQLAuthAPIKey } from "./v/4"
|
export { HoppGQLAuthAPIKey } from "./v/4"
|
||||||
|
|
||||||
|
export { GQLHeader, HoppGQLAuth, HoppGQLAuthOAuth2 } from "./v/6"
|
||||||
|
|
||||||
export const GQL_REQ_SCHEMA_VERSION = 6
|
export const GQL_REQ_SCHEMA_VERSION = 6
|
||||||
|
|
||||||
const versionedObject = z.object({
|
const versionedObject = z.object({
|
||||||
|
|||||||
@@ -1,33 +1,21 @@
|
|||||||
import { defineVersion } from "verzod"
|
import { defineVersion } from "verzod"
|
||||||
import { z } from "zod"
|
import { z } from "zod"
|
||||||
import { V5_SCHEMA } from "./5"
|
import { HoppRESTAuthAWSSignature } from "./../../rest/v/7"
|
||||||
import { HoppRESTAuthOAuth2 } from "./../../rest/v/7"
|
|
||||||
import {
|
import {
|
||||||
|
HoppGQLAuthAPIKey,
|
||||||
HoppGQLAuthBasic,
|
HoppGQLAuthBasic,
|
||||||
HoppGQLAuthBearer,
|
HoppGQLAuthBearer,
|
||||||
HoppGQLAuthInherit,
|
HoppGQLAuthInherit,
|
||||||
HoppGQLAuthNone,
|
HoppGQLAuthNone,
|
||||||
} from "./2"
|
} from "./2"
|
||||||
import { HoppGQLAuthAPIKey } from "./4"
|
import { HoppGQLAuthOAuth2, V5_SCHEMA } from "./5"
|
||||||
|
|
||||||
export { HoppRESTAuthOAuth2 as HoppGQLAuthOAuth2 } from "../../rest/v/7"
|
export { HoppRESTAuthOAuth2 as HoppGQLAuthOAuth2 } from "../../rest/v/7"
|
||||||
|
|
||||||
export const HoppGQLAuth = z
|
// Both REST & GQL have the same schema definition for AWS Signature Authorization type
|
||||||
.discriminatedUnion("authType", [
|
export const HoppGQLAuthAWSSignature = HoppRESTAuthAWSSignature
|
||||||
HoppGQLAuthNone,
|
|
||||||
HoppGQLAuthInherit,
|
|
||||||
HoppGQLAuthBasic,
|
|
||||||
HoppGQLAuthBearer,
|
|
||||||
HoppGQLAuthAPIKey,
|
|
||||||
HoppRESTAuthOAuth2, // both rest and gql have the same auth type for oauth2
|
|
||||||
])
|
|
||||||
.and(
|
|
||||||
z.object({
|
|
||||||
authActive: z.boolean(),
|
|
||||||
})
|
|
||||||
)
|
|
||||||
|
|
||||||
export type HoppGQLAuth = z.infer<typeof HoppGQLAuth>
|
export type HoppGQLAuthAWSSignature = z.infer<typeof HoppGQLAuthAWSSignature>
|
||||||
|
|
||||||
export const GQLHeader = z.object({
|
export const GQLHeader = z.object({
|
||||||
key: z.string().catch(""),
|
key: z.string().catch(""),
|
||||||
@@ -38,10 +26,28 @@ export const GQLHeader = z.object({
|
|||||||
|
|
||||||
export type GQLHeader = z.infer<typeof GQLHeader>
|
export type GQLHeader = z.infer<typeof GQLHeader>
|
||||||
|
|
||||||
|
export const HoppGQLAuth = z
|
||||||
|
.discriminatedUnion("authType", [
|
||||||
|
HoppGQLAuthNone,
|
||||||
|
HoppGQLAuthInherit,
|
||||||
|
HoppGQLAuthBasic,
|
||||||
|
HoppGQLAuthBearer,
|
||||||
|
HoppGQLAuthOAuth2,
|
||||||
|
HoppGQLAuthAPIKey,
|
||||||
|
HoppGQLAuthAWSSignature,
|
||||||
|
])
|
||||||
|
.and(
|
||||||
|
z.object({
|
||||||
|
authActive: z.boolean(),
|
||||||
|
})
|
||||||
|
)
|
||||||
|
|
||||||
|
export type HoppGQLAuth = z.infer<typeof HoppGQLAuth>
|
||||||
|
|
||||||
export const V6_SCHEMA = V5_SCHEMA.extend({
|
export const V6_SCHEMA = V5_SCHEMA.extend({
|
||||||
v: z.literal(6),
|
v: z.literal(6),
|
||||||
headers: z.array(GQLHeader).catch([]),
|
|
||||||
auth: HoppGQLAuth,
|
auth: HoppGQLAuth,
|
||||||
|
headers: z.array(GQLHeader).catch([]),
|
||||||
})
|
})
|
||||||
|
|
||||||
export default defineVersion({
|
export default defineVersion({
|
||||||
|
|||||||
@@ -8,15 +8,14 @@ import { lodashIsEqualEq, mapThenEq, undefinedEq } from "../utils/eq"
|
|||||||
|
|
||||||
import V0_VERSION from "./v/0"
|
import V0_VERSION from "./v/0"
|
||||||
import V1_VERSION from "./v/1"
|
import V1_VERSION from "./v/1"
|
||||||
import V2_VERSION from "./v/2"
|
import V2_VERSION, { HoppRESTRequestVariables } from "./v/2"
|
||||||
import V3_VERSION from "./v/3"
|
import V3_VERSION from "./v/3"
|
||||||
import V4_VERSION from "./v/4"
|
import V4_VERSION from "./v/4"
|
||||||
import V5_VERSION from "./v/5"
|
import V5_VERSION from "./v/5"
|
||||||
import V6_VERSION, { HoppRESTReqBody } from "./v/6"
|
import V6_VERSION, { HoppRESTReqBody } from "./v/6"
|
||||||
import V7_VERSION, { HoppRESTAuth } from "./v/7"
|
import V7_VERSION, { HoppRESTAuth } from "./v/7"
|
||||||
|
|
||||||
import { HoppRESTHeaders, HoppRESTParams } from "./v/7"
|
import { HoppRESTParams, HoppRESTHeaders } from "./v/7"
|
||||||
import { HoppRESTRequestVariables } from "./v/2"
|
|
||||||
|
|
||||||
export * from "./content-types"
|
export * from "./content-types"
|
||||||
|
|
||||||
@@ -28,22 +27,24 @@ export {
|
|||||||
HoppRESTAuthNone,
|
HoppRESTAuthNone,
|
||||||
HoppRESTReqBodyFormData,
|
HoppRESTReqBodyFormData,
|
||||||
} from "./v/1"
|
} from "./v/1"
|
||||||
|
|
||||||
export {
|
export {
|
||||||
ClientCredentialsGrantTypeParams,
|
ClientCredentialsGrantTypeParams,
|
||||||
ImplicitOauthFlowParams,
|
ImplicitOauthFlowParams,
|
||||||
PasswordGrantTypeParams,
|
PasswordGrantTypeParams,
|
||||||
} from "./v/3"
|
} from "./v/3"
|
||||||
|
|
||||||
export { AuthCodeGrantTypeParams } from "./v/5"
|
export { HoppRESTRequestVariables } from "./v/2"
|
||||||
export { HoppRESTAuthOAuth2, HoppRESTAuth } from "./v/7"
|
|
||||||
|
|
||||||
export { HoppRESTAuthAPIKey } from "./v/4"
|
export { HoppRESTAuthAPIKey } from "./v/4"
|
||||||
|
|
||||||
export { HoppRESTRequestVariables } from "./v/2"
|
export { AuthCodeGrantTypeParams } from "./v/5"
|
||||||
|
|
||||||
export { HoppRESTReqBody } from "./v/6"
|
export { HoppRESTReqBody } from "./v/6"
|
||||||
export { HoppRESTHeaders } from "./v/7"
|
export {
|
||||||
|
HoppRESTAuth,
|
||||||
|
HoppRESTAuthAWSSignature,
|
||||||
|
HoppRESTAuthOAuth2,
|
||||||
|
HoppRESTHeaders,
|
||||||
|
HoppRESTParams,
|
||||||
|
} from "./v/7"
|
||||||
|
|
||||||
const versionedObject = z.object({
|
const versionedObject = z.object({
|
||||||
// v is a stringified number
|
// v is a stringified number
|
||||||
|
|||||||
@@ -1,6 +1,12 @@
|
|||||||
import { defineVersion } from "verzod"
|
|
||||||
import { z } from "zod"
|
import { z } from "zod"
|
||||||
|
import { defineVersion } from "verzod"
|
||||||
|
import {
|
||||||
|
HoppRESTAuthAPIKey,
|
||||||
|
HoppRESTAuthBasic,
|
||||||
|
HoppRESTAuthBearer,
|
||||||
|
HoppRESTAuthInherit,
|
||||||
|
HoppRESTAuthNone,
|
||||||
|
} from "./1"
|
||||||
import { V6_SCHEMA } from "./6"
|
import { V6_SCHEMA } from "./6"
|
||||||
|
|
||||||
import { AuthCodeGrantTypeParams as AuthCodeGrantTypeParamsOld } from "./5"
|
import { AuthCodeGrantTypeParams as AuthCodeGrantTypeParamsOld } from "./5"
|
||||||
@@ -10,13 +16,6 @@ import {
|
|||||||
ImplicitOauthFlowParams,
|
ImplicitOauthFlowParams,
|
||||||
PasswordGrantTypeParams,
|
PasswordGrantTypeParams,
|
||||||
} from "./3"
|
} from "./3"
|
||||||
import {
|
|
||||||
HoppRESTAuthAPIKey,
|
|
||||||
HoppRESTAuthBasic,
|
|
||||||
HoppRESTAuthBearer,
|
|
||||||
HoppRESTAuthInherit,
|
|
||||||
HoppRESTAuthNone,
|
|
||||||
} from "./1"
|
|
||||||
|
|
||||||
// Add refreshToken to all grant types except Implicit
|
// Add refreshToken to all grant types except Implicit
|
||||||
export const AuthCodeGrantTypeParams = AuthCodeGrantTypeParamsOld.extend({
|
export const AuthCodeGrantTypeParams = AuthCodeGrantTypeParamsOld.extend({
|
||||||
@@ -36,23 +35,6 @@ export const HoppRESTAuthOAuth2 = z.object({
|
|||||||
|
|
||||||
export type HoppRESTAuthOAuth2 = z.infer<typeof HoppRESTAuthOAuth2>
|
export type HoppRESTAuthOAuth2 = z.infer<typeof HoppRESTAuthOAuth2>
|
||||||
|
|
||||||
export const HoppRESTAuth = z
|
|
||||||
.discriminatedUnion("authType", [
|
|
||||||
HoppRESTAuthNone,
|
|
||||||
HoppRESTAuthInherit,
|
|
||||||
HoppRESTAuthBasic,
|
|
||||||
HoppRESTAuthBearer,
|
|
||||||
HoppRESTAuthOAuth2,
|
|
||||||
HoppRESTAuthAPIKey,
|
|
||||||
])
|
|
||||||
.and(
|
|
||||||
z.object({
|
|
||||||
authActive: z.boolean(),
|
|
||||||
})
|
|
||||||
)
|
|
||||||
|
|
||||||
export type HoppRESTAuth = z.infer<typeof HoppRESTAuth>
|
|
||||||
|
|
||||||
export const HoppRESTParams = z.array(
|
export const HoppRESTParams = z.array(
|
||||||
z.object({
|
z.object({
|
||||||
key: z.string().catch(""),
|
key: z.string().catch(""),
|
||||||
@@ -75,6 +57,41 @@ export const HoppRESTHeaders = z.array(
|
|||||||
|
|
||||||
export type HoppRESTHeaders = z.infer<typeof HoppRESTHeaders>
|
export type HoppRESTHeaders = z.infer<typeof HoppRESTHeaders>
|
||||||
|
|
||||||
|
// in this new version, we add a new auth type for AWS Signature
|
||||||
|
// this auth type is used for AWS Signature V5 authentication
|
||||||
|
// it requires the user to provide the access key id, secret access key, region, service name, and service token
|
||||||
|
|
||||||
|
export const HoppRESTAuthAWSSignature = z.object({
|
||||||
|
authType: z.literal("aws-signature"),
|
||||||
|
accessKey: z.string().catch(""),
|
||||||
|
secretKey: z.string().catch(""),
|
||||||
|
region: z.string().catch(""),
|
||||||
|
serviceName: z.string().catch(""),
|
||||||
|
serviceToken: z.string().optional(),
|
||||||
|
signature: z.object({}).optional(),
|
||||||
|
addTo: z.enum(["HEADERS", "QUERY_PARAMS"]).catch("HEADERS"),
|
||||||
|
})
|
||||||
|
|
||||||
|
export type HoppRESTAuthAWSSignature = z.infer<typeof HoppRESTAuthAWSSignature>
|
||||||
|
|
||||||
|
export const HoppRESTAuth = z
|
||||||
|
.discriminatedUnion("authType", [
|
||||||
|
HoppRESTAuthNone,
|
||||||
|
HoppRESTAuthInherit,
|
||||||
|
HoppRESTAuthBasic,
|
||||||
|
HoppRESTAuthBearer,
|
||||||
|
HoppRESTAuthOAuth2,
|
||||||
|
HoppRESTAuthAPIKey,
|
||||||
|
HoppRESTAuthAWSSignature,
|
||||||
|
])
|
||||||
|
.and(
|
||||||
|
z.object({
|
||||||
|
authActive: z.boolean(),
|
||||||
|
})
|
||||||
|
)
|
||||||
|
|
||||||
|
export type HoppRESTAuth = z.infer<typeof HoppRESTAuth>
|
||||||
|
|
||||||
export const V7_SCHEMA = V6_SCHEMA.extend({
|
export const V7_SCHEMA = V6_SCHEMA.extend({
|
||||||
v: z.literal("7"),
|
v: z.literal("7"),
|
||||||
params: HoppRESTParams,
|
params: HoppRESTParams,
|
||||||
|
|||||||
100
pnpm-lock.yaml
generated
100
pnpm-lock.yaml
generated
@@ -373,7 +373,7 @@ importers:
|
|||||||
version: 3.2.5
|
version: 3.2.5
|
||||||
tsup:
|
tsup:
|
||||||
specifier: 8.0.2
|
specifier: 8.0.2
|
||||||
version: 8.0.2(@swc/core@1.4.2)(postcss@8.4.40)(ts-node@10.9.1(@swc/core@1.4.2)(@types/node@18.18.8)(typescript@5.3.3))(typescript@5.3.3)
|
version: 8.0.2(@swc/core@1.4.2)(postcss@8.4.32)(ts-node@10.9.1(@swc/core@1.4.2)(@types/node@18.18.8)(typescript@5.3.3))(typescript@5.3.3)
|
||||||
typescript:
|
typescript:
|
||||||
specifier: 5.3.3
|
specifier: 5.3.3
|
||||||
version: 5.3.3
|
version: 5.3.3
|
||||||
@@ -464,6 +464,9 @@ importers:
|
|||||||
acorn-walk:
|
acorn-walk:
|
||||||
specifier: 8.3.0
|
specifier: 8.3.0
|
||||||
version: 8.3.0
|
version: 8.3.0
|
||||||
|
aws4fetch:
|
||||||
|
specifier: 1.0.19
|
||||||
|
version: 1.0.19
|
||||||
axios:
|
axios:
|
||||||
specifier: 1.7.5
|
specifier: 1.7.5
|
||||||
version: 1.7.5
|
version: 1.7.5
|
||||||
@@ -779,7 +782,7 @@ importers:
|
|||||||
version: 4.5.0(@types/node@18.18.8)(sass@1.69.5)(terser@5.31.0)
|
version: 4.5.0(@types/node@18.18.8)(sass@1.69.5)(terser@5.31.0)
|
||||||
vite-plugin-checker:
|
vite-plugin-checker:
|
||||||
specifier: 0.6.2
|
specifier: 0.6.2
|
||||||
version: 0.6.2(eslint@8.57.0)(optionator@0.9.4)(typescript@5.3.2)(vite@4.5.0(@types/node@18.18.8)(sass@1.69.5)(terser@5.31.0))(vue-tsc@1.8.24(typescript@5.3.2))
|
version: 0.6.2(eslint@8.57.0)(meow@8.1.2)(optionator@0.9.4)(typescript@5.3.2)(vite@4.5.0(@types/node@18.18.8)(sass@1.69.5)(terser@5.31.0))(vue-tsc@1.8.24(typescript@5.3.2))
|
||||||
vite-plugin-fonts:
|
vite-plugin-fonts:
|
||||||
specifier: 0.7.0
|
specifier: 0.7.0
|
||||||
version: 0.7.0(vite@4.5.0(@types/node@18.18.8)(sass@1.69.5)(terser@5.31.0))
|
version: 0.7.0(vite@4.5.0(@types/node@18.18.8)(sass@1.69.5)(terser@5.31.0))
|
||||||
@@ -898,7 +901,7 @@ importers:
|
|||||||
version: 2.8.4
|
version: 2.8.4
|
||||||
ts-jest:
|
ts-jest:
|
||||||
specifier: 27.1.5
|
specifier: 27.1.5
|
||||||
version: 27.1.5(@babel/core@7.24.5)(@types/jest@27.5.2)(jest@29.7.0(@types/node@17.0.45)(ts-node@10.9.1(@swc/core@1.4.2)(@types/node@17.0.45)(typescript@4.9.5)))(typescript@4.9.5)
|
version: 27.1.5(@babel/core@7.24.5)(@types/jest@27.5.2)(babel-jest@29.7.0(@babel/core@7.24.5))(jest@29.7.0(@types/node@17.0.45)(ts-node@10.9.1(@swc/core@1.4.2)(@types/node@17.0.45)(typescript@4.9.5)))(typescript@4.9.5)
|
||||||
typescript:
|
typescript:
|
||||||
specifier: 4.9.5
|
specifier: 4.9.5
|
||||||
version: 4.9.5
|
version: 4.9.5
|
||||||
@@ -1082,7 +1085,7 @@ importers:
|
|||||||
version: 0.14.9(@vue/compiler-sfc@3.3.10)(vue-template-compiler@2.7.16)
|
version: 0.14.9(@vue/compiler-sfc@3.3.10)(vue-template-compiler@2.7.16)
|
||||||
unplugin-vue-components:
|
unplugin-vue-components:
|
||||||
specifier: 0.21.0
|
specifier: 0.21.0
|
||||||
version: 0.21.0(@babel/parser@7.24.5)(esbuild@0.20.2)(rollup@2.79.1)(vite@4.5.0(@types/node@18.18.8)(sass@1.69.5)(terser@5.31.0))(vue@3.3.9(typescript@4.9.5))(webpack@5.91.0(@swc/core@1.4.2)(esbuild@0.20.2))
|
version: 0.21.0(@babel/parser@7.24.5)(esbuild@0.20.2)(rollup@3.29.4)(vite@4.5.0(@types/node@18.18.8)(sass@1.69.5)(terser@5.31.0))(vue@3.3.9(typescript@4.9.5))(webpack@5.91.0(@swc/core@1.4.2)(esbuild@0.20.2))
|
||||||
vite:
|
vite:
|
||||||
specifier: 4.5.0
|
specifier: 4.5.0
|
||||||
version: 4.5.0(@types/node@18.18.8)(sass@1.69.5)(terser@5.31.0)
|
version: 4.5.0(@types/node@18.18.8)(sass@1.69.5)(terser@5.31.0)
|
||||||
@@ -1091,7 +1094,7 @@ importers:
|
|||||||
version: 1.0.11(vite@4.5.0(@types/node@18.18.8)(sass@1.69.5)(terser@5.31.0))
|
version: 1.0.11(vite@4.5.0(@types/node@18.18.8)(sass@1.69.5)(terser@5.31.0))
|
||||||
vite-plugin-inspect:
|
vite-plugin-inspect:
|
||||||
specifier: 0.7.38
|
specifier: 0.7.38
|
||||||
version: 0.7.38(rollup@2.79.1)(vite@4.5.0(@types/node@18.18.8)(sass@1.69.5)(terser@5.31.0))
|
version: 0.7.38(rollup@3.29.4)(vite@4.5.0(@types/node@18.18.8)(sass@1.69.5)(terser@5.31.0))
|
||||||
vite-plugin-pages:
|
vite-plugin-pages:
|
||||||
specifier: 0.26.0
|
specifier: 0.26.0
|
||||||
version: 0.26.0(@vue/compiler-sfc@3.3.10)(vite@4.5.0(@types/node@18.18.8)(sass@1.69.5)(terser@5.31.0))
|
version: 0.26.0(@vue/compiler-sfc@3.3.10)(vite@4.5.0(@types/node@18.18.8)(sass@1.69.5)(terser@5.31.0))
|
||||||
@@ -1251,7 +1254,7 @@ importers:
|
|||||||
version: 0.17.4(@vue/compiler-sfc@3.3.10)(vue-template-compiler@2.7.16)
|
version: 0.17.4(@vue/compiler-sfc@3.3.10)(vue-template-compiler@2.7.16)
|
||||||
unplugin-vue-components:
|
unplugin-vue-components:
|
||||||
specifier: 0.25.2
|
specifier: 0.25.2
|
||||||
version: 0.25.2(@babel/parser@7.24.5)(rollup@4.17.2)(vue@3.3.9(typescript@5.3.2))
|
version: 0.25.2(@babel/parser@7.24.5)(rollup@3.29.4)(vue@3.3.9(typescript@5.3.2))
|
||||||
vite:
|
vite:
|
||||||
specifier: 4.5.0
|
specifier: 4.5.0
|
||||||
version: 4.5.0(@types/node@18.18.8)(sass@1.69.5)(terser@5.31.0)
|
version: 4.5.0(@types/node@18.18.8)(sass@1.69.5)(terser@5.31.0)
|
||||||
@@ -1263,7 +1266,7 @@ importers:
|
|||||||
version: 1.0.11(vite@4.5.0(@types/node@18.18.8)(sass@1.69.5)(terser@5.31.0))
|
version: 1.0.11(vite@4.5.0(@types/node@18.18.8)(sass@1.69.5)(terser@5.31.0))
|
||||||
vite-plugin-inspect:
|
vite-plugin-inspect:
|
||||||
specifier: 0.7.42
|
specifier: 0.7.42
|
||||||
version: 0.7.42(rollup@4.17.2)(vite@4.5.0(@types/node@18.18.8)(sass@1.69.5)(terser@5.31.0))
|
version: 0.7.42(rollup@3.29.4)(vite@4.5.0(@types/node@18.18.8)(sass@1.69.5)(terser@5.31.0))
|
||||||
vite-plugin-pages:
|
vite-plugin-pages:
|
||||||
specifier: 0.31.0
|
specifier: 0.31.0
|
||||||
version: 0.31.0(@vue/compiler-sfc@3.3.10)(vite@4.5.0(@types/node@18.18.8)(sass@1.69.5)(terser@5.31.0))
|
version: 0.31.0(@vue/compiler-sfc@3.3.10)(vite@4.5.0(@types/node@18.18.8)(sass@1.69.5)(terser@5.31.0))
|
||||||
@@ -1305,7 +1308,7 @@ importers:
|
|||||||
version: 0.1.0(vue@3.3.9(typescript@4.9.3))
|
version: 0.1.0(vue@3.3.9(typescript@4.9.3))
|
||||||
'@intlify/unplugin-vue-i18n':
|
'@intlify/unplugin-vue-i18n':
|
||||||
specifier: 1.2.0
|
specifier: 1.2.0
|
||||||
version: 1.2.0(rollup@2.79.1)(vue-i18n@9.2.2(vue@3.3.9(typescript@4.9.3)))
|
version: 1.2.0(rollup@3.29.4)(vue-i18n@9.2.2(vue@3.3.9(typescript@4.9.3)))
|
||||||
'@types/cors':
|
'@types/cors':
|
||||||
specifier: 2.8.13
|
specifier: 2.8.13
|
||||||
version: 2.8.13
|
version: 2.8.13
|
||||||
@@ -1371,7 +1374,7 @@ importers:
|
|||||||
version: 0.14.9(@vue/compiler-sfc@3.2.45)(vue-template-compiler@2.7.16)
|
version: 0.14.9(@vue/compiler-sfc@3.2.45)(vue-template-compiler@2.7.16)
|
||||||
unplugin-vue-components:
|
unplugin-vue-components:
|
||||||
specifier: 0.21.0
|
specifier: 0.21.0
|
||||||
version: 0.21.0(@babel/parser@7.24.5)(esbuild@0.20.2)(rollup@2.79.1)(vite@3.2.4(@types/node@18.18.8)(sass@1.58.0)(terser@5.31.0))(vue@3.3.9(typescript@4.9.3))(webpack@5.91.0(@swc/core@1.4.2)(esbuild@0.20.2))
|
version: 0.21.0(@babel/parser@7.24.5)(esbuild@0.20.2)(rollup@3.29.4)(vite@3.2.4(@types/node@18.18.8)(sass@1.58.0)(terser@5.31.0))(vue@3.3.9(typescript@4.9.3))(webpack@5.91.0(@swc/core@1.4.2)(esbuild@0.20.2))
|
||||||
vue:
|
vue:
|
||||||
specifier: 3.3.9
|
specifier: 3.3.9
|
||||||
version: 3.3.9(typescript@4.9.3)
|
version: 3.3.9(typescript@4.9.3)
|
||||||
@@ -5762,6 +5765,9 @@ packages:
|
|||||||
resolution: {integrity: sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ==}
|
resolution: {integrity: sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ==}
|
||||||
engines: {node: '>= 0.4'}
|
engines: {node: '>= 0.4'}
|
||||||
|
|
||||||
|
aws4fetch@1.0.19:
|
||||||
|
resolution: {integrity: sha512-N+F8pZ9hVjckkHODDyalITRNxBJxAGX5ShkVoAgHwqERXsW8Iu5ziFx3SCjGlxx/YStWBTZx4HI/GCMvTBu5kQ==}
|
||||||
|
|
||||||
axios@1.7.5:
|
axios@1.7.5:
|
||||||
resolution: {integrity: sha512-fZu86yCo+svH3uqJ/yTdQ0QHpQu5oL+/QE+QPSv6BZSkDAoky9vytxp7u5qk83OJFS3kEBcesWni9WTZAv3tSw==}
|
resolution: {integrity: sha512-fZu86yCo+svH3uqJ/yTdQ0QHpQu5oL+/QE+QPSv6BZSkDAoky9vytxp7u5qk83OJFS3kEBcesWni9WTZAv3tSw==}
|
||||||
|
|
||||||
@@ -15941,11 +15947,11 @@ snapshots:
|
|||||||
|
|
||||||
'@intlify/shared@9.8.0': {}
|
'@intlify/shared@9.8.0': {}
|
||||||
|
|
||||||
'@intlify/unplugin-vue-i18n@1.2.0(rollup@2.79.1)(vue-i18n@9.2.2(vue@3.3.9(typescript@4.9.3)))':
|
'@intlify/unplugin-vue-i18n@1.2.0(rollup@3.29.4)(vue-i18n@9.2.2(vue@3.3.9(typescript@4.9.3)))':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@intlify/bundle-utils': 7.5.1(vue-i18n@9.2.2(vue@3.3.9(typescript@4.9.3)))
|
'@intlify/bundle-utils': 7.5.1(vue-i18n@9.2.2(vue@3.3.9(typescript@4.9.3)))
|
||||||
'@intlify/shared': 9.13.1
|
'@intlify/shared': 9.13.1
|
||||||
'@rollup/pluginutils': 5.1.0(rollup@2.79.1)
|
'@rollup/pluginutils': 5.1.0(rollup@3.29.4)
|
||||||
'@vue/compiler-sfc': 3.3.10
|
'@vue/compiler-sfc': 3.3.10
|
||||||
debug: 4.3.4(supports-color@9.4.0)
|
debug: 4.3.4(supports-color@9.4.0)
|
||||||
fast-glob: 3.3.2
|
fast-glob: 3.3.2
|
||||||
@@ -18806,6 +18812,8 @@ snapshots:
|
|||||||
dependencies:
|
dependencies:
|
||||||
possible-typed-array-names: 1.0.0
|
possible-typed-array-names: 1.0.0
|
||||||
|
|
||||||
|
aws4fetch@1.0.19: {}
|
||||||
|
|
||||||
axios@1.7.5:
|
axios@1.7.5:
|
||||||
dependencies:
|
dependencies:
|
||||||
follow-redirects: 1.15.6
|
follow-redirects: 1.15.6
|
||||||
@@ -24474,12 +24482,12 @@ snapshots:
|
|||||||
postcss: 8.4.32
|
postcss: 8.4.32
|
||||||
ts-node: 10.9.1(@swc/core@1.4.2)(@types/node@18.18.8)(typescript@5.3.2)
|
ts-node: 10.9.1(@swc/core@1.4.2)(@types/node@18.18.8)(typescript@5.3.2)
|
||||||
|
|
||||||
postcss-load-config@4.0.2(postcss@8.4.40)(ts-node@10.9.1(@swc/core@1.4.2)(@types/node@18.18.8)(typescript@5.3.3)):
|
postcss-load-config@4.0.2(postcss@8.4.32)(ts-node@10.9.1(@swc/core@1.4.2)(@types/node@18.18.8)(typescript@5.3.3)):
|
||||||
dependencies:
|
dependencies:
|
||||||
lilconfig: 3.1.1
|
lilconfig: 3.1.1
|
||||||
yaml: 2.4.2
|
yaml: 2.4.2
|
||||||
optionalDependencies:
|
optionalDependencies:
|
||||||
postcss: 8.4.40
|
postcss: 8.4.32
|
||||||
ts-node: 10.9.1(@swc/core@1.4.2)(@types/node@18.18.8)(typescript@5.3.3)
|
ts-node: 10.9.1(@swc/core@1.4.2)(@types/node@18.18.8)(typescript@5.3.3)
|
||||||
|
|
||||||
postcss-merge-longhand@7.0.2(postcss@8.4.40):
|
postcss-merge-longhand@7.0.2(postcss@8.4.40):
|
||||||
@@ -26100,7 +26108,7 @@ snapshots:
|
|||||||
|
|
||||||
ts-interface-checker@0.1.13: {}
|
ts-interface-checker@0.1.13: {}
|
||||||
|
|
||||||
ts-jest@27.1.5(@babel/core@7.24.5)(@types/jest@27.5.2)(jest@29.7.0(@types/node@17.0.45)(ts-node@10.9.1(@swc/core@1.4.2)(@types/node@17.0.45)(typescript@4.9.5)))(typescript@4.9.5):
|
ts-jest@27.1.5(@babel/core@7.24.5)(@types/jest@27.5.2)(babel-jest@29.7.0(@babel/core@7.24.5))(jest@29.7.0(@types/node@17.0.45)(ts-node@10.9.1(@swc/core@1.4.2)(@types/node@17.0.45)(typescript@4.9.5)))(typescript@4.9.5):
|
||||||
dependencies:
|
dependencies:
|
||||||
bs-logger: 0.2.6
|
bs-logger: 0.2.6
|
||||||
fast-json-stable-stringify: 2.1.0
|
fast-json-stable-stringify: 2.1.0
|
||||||
@@ -26115,6 +26123,7 @@ snapshots:
|
|||||||
optionalDependencies:
|
optionalDependencies:
|
||||||
'@babel/core': 7.24.5
|
'@babel/core': 7.24.5
|
||||||
'@types/jest': 27.5.2
|
'@types/jest': 27.5.2
|
||||||
|
babel-jest: 29.7.0(@babel/core@7.24.5)
|
||||||
|
|
||||||
ts-jest@29.0.5(@babel/core@7.24.5)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.24.5))(jest@29.4.1(@types/node@18.11.10)(ts-node@10.9.1(@swc/core@1.4.2)(@types/node@18.11.10)(typescript@4.9.3)))(typescript@4.9.3):
|
ts-jest@29.0.5(@babel/core@7.24.5)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.24.5))(jest@29.4.1(@types/node@18.11.10)(ts-node@10.9.1(@swc/core@1.4.2)(@types/node@18.11.10)(typescript@4.9.3)))(typescript@4.9.3):
|
||||||
dependencies:
|
dependencies:
|
||||||
@@ -26320,7 +26329,7 @@ snapshots:
|
|||||||
|
|
||||||
tslib@2.6.2: {}
|
tslib@2.6.2: {}
|
||||||
|
|
||||||
tsup@8.0.2(@swc/core@1.4.2)(postcss@8.4.40)(ts-node@10.9.1(@swc/core@1.4.2)(@types/node@18.18.8)(typescript@5.3.3))(typescript@5.3.3):
|
tsup@8.0.2(@swc/core@1.4.2)(postcss@8.4.32)(ts-node@10.9.1(@swc/core@1.4.2)(@types/node@18.18.8)(typescript@5.3.3))(typescript@5.3.3):
|
||||||
dependencies:
|
dependencies:
|
||||||
bundle-require: 4.1.0(esbuild@0.19.12)
|
bundle-require: 4.1.0(esbuild@0.19.12)
|
||||||
cac: 6.7.14
|
cac: 6.7.14
|
||||||
@@ -26330,7 +26339,7 @@ snapshots:
|
|||||||
execa: 5.1.1
|
execa: 5.1.1
|
||||||
globby: 11.1.0
|
globby: 11.1.0
|
||||||
joycon: 3.1.1
|
joycon: 3.1.1
|
||||||
postcss-load-config: 4.0.2(postcss@8.4.40)(ts-node@10.9.1(@swc/core@1.4.2)(@types/node@18.18.8)(typescript@5.3.3))
|
postcss-load-config: 4.0.2(postcss@8.4.32)(ts-node@10.9.1(@swc/core@1.4.2)(@types/node@18.18.8)(typescript@5.3.3))
|
||||||
resolve-from: 5.0.0
|
resolve-from: 5.0.0
|
||||||
rollup: 4.17.2
|
rollup: 4.17.2
|
||||||
source-map: 0.8.0-beta.0
|
source-map: 0.8.0-beta.0
|
||||||
@@ -26338,7 +26347,7 @@ snapshots:
|
|||||||
tree-kill: 1.2.2
|
tree-kill: 1.2.2
|
||||||
optionalDependencies:
|
optionalDependencies:
|
||||||
'@swc/core': 1.4.2
|
'@swc/core': 1.4.2
|
||||||
postcss: 8.4.40
|
postcss: 8.4.32
|
||||||
typescript: 5.3.3
|
typescript: 5.3.3
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- supports-color
|
- supports-color
|
||||||
@@ -26559,7 +26568,7 @@ snapshots:
|
|||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- supports-color
|
- supports-color
|
||||||
|
|
||||||
unplugin-vue-components@0.21.0(@babel/parser@7.24.5)(esbuild@0.20.2)(rollup@2.79.1)(vite@3.2.4(@types/node@18.18.8)(sass@1.58.0)(terser@5.31.0))(vue@3.3.9(typescript@4.9.3))(webpack@5.91.0(@swc/core@1.4.2)(esbuild@0.20.2)):
|
unplugin-vue-components@0.21.0(@babel/parser@7.24.5)(esbuild@0.20.2)(rollup@3.29.4)(vite@3.2.4(@types/node@18.18.8)(sass@1.58.0)(terser@5.31.0))(vue@3.3.9(typescript@4.9.3))(webpack@5.91.0(@swc/core@1.4.2)(esbuild@0.20.2)):
|
||||||
dependencies:
|
dependencies:
|
||||||
'@antfu/utils': 0.5.2
|
'@antfu/utils': 0.5.2
|
||||||
'@rollup/pluginutils': 4.2.1
|
'@rollup/pluginutils': 4.2.1
|
||||||
@@ -26570,7 +26579,7 @@ snapshots:
|
|||||||
magic-string: 0.26.7
|
magic-string: 0.26.7
|
||||||
minimatch: 5.1.6
|
minimatch: 5.1.6
|
||||||
resolve: 1.22.8
|
resolve: 1.22.8
|
||||||
unplugin: 0.7.2(esbuild@0.20.2)(rollup@2.79.1)(vite@3.2.4(@types/node@18.18.8)(sass@1.58.0)(terser@5.31.0))(webpack@5.91.0(@swc/core@1.4.2)(esbuild@0.20.2))
|
unplugin: 0.7.2(esbuild@0.20.2)(rollup@3.29.4)(vite@3.2.4(@types/node@18.18.8)(sass@1.58.0)(terser@5.31.0))(webpack@5.91.0(@swc/core@1.4.2)(esbuild@0.20.2))
|
||||||
vue: 3.3.9(typescript@4.9.3)
|
vue: 3.3.9(typescript@4.9.3)
|
||||||
optionalDependencies:
|
optionalDependencies:
|
||||||
'@babel/parser': 7.24.5
|
'@babel/parser': 7.24.5
|
||||||
@@ -26581,7 +26590,7 @@ snapshots:
|
|||||||
- vite
|
- vite
|
||||||
- webpack
|
- webpack
|
||||||
|
|
||||||
unplugin-vue-components@0.21.0(@babel/parser@7.24.5)(esbuild@0.20.2)(rollup@2.79.1)(vite@4.5.0(@types/node@18.18.8)(sass@1.69.5)(terser@5.31.0))(vue@3.3.9(typescript@4.9.5))(webpack@5.91.0(@swc/core@1.4.2)(esbuild@0.20.2)):
|
unplugin-vue-components@0.21.0(@babel/parser@7.24.5)(esbuild@0.20.2)(rollup@3.29.4)(vite@4.5.0(@types/node@18.18.8)(sass@1.69.5)(terser@5.31.0))(vue@3.3.9(typescript@4.9.5))(webpack@5.91.0(@swc/core@1.4.2)(esbuild@0.20.2)):
|
||||||
dependencies:
|
dependencies:
|
||||||
'@antfu/utils': 0.5.2
|
'@antfu/utils': 0.5.2
|
||||||
'@rollup/pluginutils': 4.2.1
|
'@rollup/pluginutils': 4.2.1
|
||||||
@@ -26592,7 +26601,7 @@ snapshots:
|
|||||||
magic-string: 0.26.7
|
magic-string: 0.26.7
|
||||||
minimatch: 5.1.6
|
minimatch: 5.1.6
|
||||||
resolve: 1.22.8
|
resolve: 1.22.8
|
||||||
unplugin: 0.7.2(esbuild@0.20.2)(rollup@2.79.1)(vite@4.5.0(@types/node@18.18.8)(sass@1.69.5)(terser@5.31.0))(webpack@5.91.0(@swc/core@1.4.2)(esbuild@0.20.2))
|
unplugin: 0.7.2(esbuild@0.20.2)(rollup@3.29.4)(vite@4.5.0(@types/node@18.18.8)(sass@1.69.5)(terser@5.31.0))(webpack@5.91.0(@swc/core@1.4.2)(esbuild@0.20.2))
|
||||||
vue: 3.3.9(typescript@4.9.5)
|
vue: 3.3.9(typescript@4.9.5)
|
||||||
optionalDependencies:
|
optionalDependencies:
|
||||||
'@babel/parser': 7.24.5
|
'@babel/parser': 7.24.5
|
||||||
@@ -26603,6 +26612,25 @@ snapshots:
|
|||||||
- vite
|
- vite
|
||||||
- webpack
|
- webpack
|
||||||
|
|
||||||
|
unplugin-vue-components@0.25.2(@babel/parser@7.24.5)(rollup@3.29.4)(vue@3.3.9(typescript@5.3.2)):
|
||||||
|
dependencies:
|
||||||
|
'@antfu/utils': 0.7.7
|
||||||
|
'@rollup/pluginutils': 5.1.0(rollup@3.29.4)
|
||||||
|
chokidar: 3.6.0
|
||||||
|
debug: 4.3.4(supports-color@9.4.0)
|
||||||
|
fast-glob: 3.3.2
|
||||||
|
local-pkg: 0.4.3
|
||||||
|
magic-string: 0.30.10
|
||||||
|
minimatch: 9.0.4
|
||||||
|
resolve: 1.22.8
|
||||||
|
unplugin: 1.10.1
|
||||||
|
vue: 3.3.9(typescript@5.3.2)
|
||||||
|
optionalDependencies:
|
||||||
|
'@babel/parser': 7.24.5
|
||||||
|
transitivePeerDependencies:
|
||||||
|
- rollup
|
||||||
|
- supports-color
|
||||||
|
|
||||||
unplugin-vue-components@0.25.2(@babel/parser@7.24.5)(rollup@4.17.2)(vue@3.3.9(typescript@5.3.2)):
|
unplugin-vue-components@0.25.2(@babel/parser@7.24.5)(rollup@4.17.2)(vue@3.3.9(typescript@5.3.2)):
|
||||||
dependencies:
|
dependencies:
|
||||||
'@antfu/utils': 0.7.7
|
'@antfu/utils': 0.7.7
|
||||||
@@ -26622,7 +26650,7 @@ snapshots:
|
|||||||
- rollup
|
- rollup
|
||||||
- supports-color
|
- supports-color
|
||||||
|
|
||||||
unplugin@0.7.2(esbuild@0.20.2)(rollup@2.79.1)(vite@3.2.4(@types/node@18.18.8)(sass@1.58.0)(terser@5.31.0))(webpack@5.91.0(@swc/core@1.4.2)(esbuild@0.20.2)):
|
unplugin@0.7.2(esbuild@0.20.2)(rollup@3.29.4)(vite@3.2.4(@types/node@18.18.8)(sass@1.58.0)(terser@5.31.0))(webpack@5.91.0(@swc/core@1.4.2)(esbuild@0.20.2)):
|
||||||
dependencies:
|
dependencies:
|
||||||
acorn: 8.11.3
|
acorn: 8.11.3
|
||||||
chokidar: 3.6.0
|
chokidar: 3.6.0
|
||||||
@@ -26630,11 +26658,11 @@ snapshots:
|
|||||||
webpack-virtual-modules: 0.4.6
|
webpack-virtual-modules: 0.4.6
|
||||||
optionalDependencies:
|
optionalDependencies:
|
||||||
esbuild: 0.20.2
|
esbuild: 0.20.2
|
||||||
rollup: 2.79.1
|
rollup: 3.29.4
|
||||||
vite: 3.2.4(@types/node@18.18.8)(sass@1.58.0)(terser@5.31.0)
|
vite: 3.2.4(@types/node@18.18.8)(sass@1.58.0)(terser@5.31.0)
|
||||||
webpack: 5.91.0(@swc/core@1.4.2)(esbuild@0.20.2)
|
webpack: 5.91.0(@swc/core@1.4.2)(esbuild@0.20.2)
|
||||||
|
|
||||||
unplugin@0.7.2(esbuild@0.20.2)(rollup@2.79.1)(vite@4.5.0(@types/node@18.18.8)(sass@1.69.5)(terser@5.31.0))(webpack@5.91.0(@swc/core@1.4.2)(esbuild@0.20.2)):
|
unplugin@0.7.2(esbuild@0.20.2)(rollup@3.29.4)(vite@4.5.0(@types/node@18.18.8)(sass@1.69.5)(terser@5.31.0))(webpack@5.91.0(@swc/core@1.4.2)(esbuild@0.20.2)):
|
||||||
dependencies:
|
dependencies:
|
||||||
acorn: 8.11.3
|
acorn: 8.11.3
|
||||||
chokidar: 3.6.0
|
chokidar: 3.6.0
|
||||||
@@ -26642,7 +26670,7 @@ snapshots:
|
|||||||
webpack-virtual-modules: 0.4.6
|
webpack-virtual-modules: 0.4.6
|
||||||
optionalDependencies:
|
optionalDependencies:
|
||||||
esbuild: 0.20.2
|
esbuild: 0.20.2
|
||||||
rollup: 2.79.1
|
rollup: 3.29.4
|
||||||
vite: 4.5.0(@types/node@18.18.8)(sass@1.69.5)(terser@5.31.0)
|
vite: 4.5.0(@types/node@18.18.8)(sass@1.69.5)(terser@5.31.0)
|
||||||
webpack: 5.91.0(@swc/core@1.4.2)(esbuild@0.20.2)
|
webpack: 5.91.0(@swc/core@1.4.2)(esbuild@0.20.2)
|
||||||
|
|
||||||
@@ -26787,7 +26815,7 @@ snapshots:
|
|||||||
- supports-color
|
- supports-color
|
||||||
- terser
|
- terser
|
||||||
|
|
||||||
vite-plugin-checker@0.6.2(eslint@8.57.0)(optionator@0.9.4)(typescript@5.3.2)(vite@4.5.0(@types/node@18.18.8)(sass@1.69.5)(terser@5.31.0))(vue-tsc@1.8.24(typescript@5.3.2)):
|
vite-plugin-checker@0.6.2(eslint@8.57.0)(meow@8.1.2)(optionator@0.9.4)(typescript@5.3.2)(vite@4.5.0(@types/node@18.18.8)(sass@1.69.5)(terser@5.31.0))(vue-tsc@1.8.24(typescript@5.3.2)):
|
||||||
dependencies:
|
dependencies:
|
||||||
'@babel/code-frame': 7.24.2
|
'@babel/code-frame': 7.24.2
|
||||||
ansi-escapes: 4.3.2
|
ansi-escapes: 4.3.2
|
||||||
@@ -26809,6 +26837,7 @@ snapshots:
|
|||||||
vscode-uri: 3.0.8
|
vscode-uri: 3.0.8
|
||||||
optionalDependencies:
|
optionalDependencies:
|
||||||
eslint: 8.57.0
|
eslint: 8.57.0
|
||||||
|
meow: 8.1.2
|
||||||
optionator: 0.9.4
|
optionator: 0.9.4
|
||||||
typescript: 5.3.2
|
typescript: 5.3.2
|
||||||
vue-tsc: 1.8.24(typescript@5.3.2)
|
vue-tsc: 1.8.24(typescript@5.3.2)
|
||||||
@@ -26854,10 +26883,25 @@ snapshots:
|
|||||||
dependencies:
|
dependencies:
|
||||||
vite: 4.5.0(@types/node@18.18.8)(sass@1.69.5)(terser@5.31.0)
|
vite: 4.5.0(@types/node@18.18.8)(sass@1.69.5)(terser@5.31.0)
|
||||||
|
|
||||||
vite-plugin-inspect@0.7.38(rollup@2.79.1)(vite@4.5.0(@types/node@18.18.8)(sass@1.69.5)(terser@5.31.0)):
|
vite-plugin-inspect@0.7.38(rollup@3.29.4)(vite@4.5.0(@types/node@18.18.8)(sass@1.69.5)(terser@5.31.0)):
|
||||||
dependencies:
|
dependencies:
|
||||||
'@antfu/utils': 0.7.7
|
'@antfu/utils': 0.7.7
|
||||||
'@rollup/pluginutils': 5.1.0(rollup@2.79.1)
|
'@rollup/pluginutils': 5.1.0(rollup@3.29.4)
|
||||||
|
debug: 4.3.4(supports-color@9.4.0)
|
||||||
|
error-stack-parser-es: 0.1.1
|
||||||
|
fs-extra: 11.2.0
|
||||||
|
open: 9.1.0
|
||||||
|
picocolors: 1.0.0
|
||||||
|
sirv: 2.0.4
|
||||||
|
vite: 4.5.0(@types/node@18.18.8)(sass@1.69.5)(terser@5.31.0)
|
||||||
|
transitivePeerDependencies:
|
||||||
|
- rollup
|
||||||
|
- supports-color
|
||||||
|
|
||||||
|
vite-plugin-inspect@0.7.42(rollup@3.29.4)(vite@4.5.0(@types/node@18.18.8)(sass@1.69.5)(terser@5.31.0)):
|
||||||
|
dependencies:
|
||||||
|
'@antfu/utils': 0.7.7
|
||||||
|
'@rollup/pluginutils': 5.1.0(rollup@3.29.4)
|
||||||
debug: 4.3.4(supports-color@9.4.0)
|
debug: 4.3.4(supports-color@9.4.0)
|
||||||
error-stack-parser-es: 0.1.1
|
error-stack-parser-es: 0.1.1
|
||||||
fs-extra: 11.2.0
|
fs-extra: 11.2.0
|
||||||
|
|||||||
Reference in New Issue
Block a user