|
90 | 90 | import { watch, ref, computed, inject } from 'vue' |
91 | 91 | import type { PropType, Ref } from 'vue' |
92 | 92 | import type { IHttpOperation, INodeExample } from '@stoplight/types' |
93 | | -import { HTTPSnippet } from 'httpsnippet-lite' |
| 93 | +import { HTTPSnippet } from 'httpsnippet' |
94 | 94 | import { requestSampleConfigs } from '@/constants' |
95 | 95 | import { getRequestHeaders } from '@/utils' |
96 | 96 | import CodeBlock from '@/components/common/CodeBlock.vue' |
97 | 97 | import CollapsablePanel from '@/components/common/CollapsablePanel.vue' |
98 | 98 | import type { LanguageCode } from '@/types/request-languages' |
99 | | -import type { HarRequest, HTTPSnippet as HTTPSnippetType, TargetId } from 'httpsnippet-lite' |
| 99 | +import type { HarRequest, HTTPSnippet as HTTPSnippetType, TargetId } from 'httpsnippet' |
100 | 100 | import SelectDropdown from '@/components/common/SelectDropdown.vue' |
101 | 101 | import LanguageIcon from '@/components/common/LanguageIcon.vue' |
102 | 102 | import type { SelectItem } from '@/types' |
@@ -243,7 +243,7 @@ watch(() => ({ |
243 | 243 | requestQuery: props.requestQuery, |
244 | 244 | authQuery: props.authQuery, |
245 | 245 | requestBody: props.requestBody, |
246 | | -}), async (newValue, oldValue) => { |
| 246 | +}), (newValue, oldValue) => { |
247 | 247 |
|
248 | 248 | if (newValue.method !== oldValue?.method && requestConfigs.value?.[0]) { |
249 | 249 | selectedLang.value = requestConfigs.value[0].httpSnippetLanguage |
@@ -308,7 +308,7 @@ watch(() => ({ |
308 | 308 | requestCode.value = newValue.requestBody |
309 | 309 | return requestSampleConfigs.filter(c => c.httpSnippetLanguage !== 'json') |
310 | 310 | } else if (snippet.value) { |
311 | | - requestCode.value = await snippet.value.convert((newValue.lang as TargetId), newValue.lib) |
| 311 | + requestCode.value = snippet.value.convert((newValue.lang as TargetId), newValue.lib) || '' |
312 | 312 | } |
313 | 313 | } |
314 | 314 | } |
|
0 commit comments