chore: bump dependencies (#3258)

Co-authored-by: Andrew Bastin <andrewbastin.k@gmail.com>
This commit is contained in:
Akash K
2023-08-21 09:06:30 +05:30
committed by GitHub
parent 10bb68a538
commit 8c57d81718
56 changed files with 6351 additions and 5462 deletions

View File

@@ -80,10 +80,11 @@ const props = defineProps<{
active: boolean
}>()
const formattedShortcutKeys = computed(() =>
props.entry.meta?.keyboardShortcut?.map((key) => {
return SPECIAL_KEY_CHARS[key] ?? capitalize(key)
})
const formattedShortcutKeys = computed(
() =>
props.entry.meta?.keyboardShortcut?.map((key) => {
return SPECIAL_KEY_CHARS[key] ?? capitalize(key)
})
)
const emit = defineEmits<{

View File

@@ -57,28 +57,28 @@ const emit = defineEmits<{
(e: "hide-modal"): void
}>()
const name = ref("")
const editingName = ref("")
watch(
() => props.show,
(show) => {
if (!show) {
name.value = ""
editingName.value = ""
}
}
)
const addNewCollection = () => {
if (!name.value) {
if (!editingName.value) {
toast.error(t("collection.invalid_name"))
return
}
emit("submit", name.value)
emit("submit", editingName.value)
}
const hideModal = () => {
name.value = ""
editingName.value = ""
emit("hide-modal")
}
</script>

View File

@@ -57,27 +57,27 @@ const emit = defineEmits<{
(e: "add-folder", name: string): void
}>()
const name = ref("")
const editingName = ref("")
watch(
() => props.show,
(show) => {
if (!show) {
name.value = ""
editingName.value = ""
}
}
)
const addFolder = () => {
if (name.value.trim() === "") {
if (editingName.value.trim() === "") {
toast.error(t("folder.invalid_name"))
return
}
emit("add-folder", name.value)
emit("add-folder", editingName.value)
}
const hideModal = () => {
name.value = ""
editingName.value = ""
emit("hide-modal")
}
</script>

View File

@@ -58,23 +58,23 @@ const emit = defineEmits<{
(event: "add-request", name: string): void
}>()
const name = ref("")
const editingName = ref("")
watch(
() => props.show,
(show) => {
if (show) {
name.value = currentActiveTab.value.document.request.name
editingName.value = currentActiveTab.value.document.request.name
}
}
)
const addRequest = () => {
if (name.value.trim() === "") {
if (editingName.value.trim() === "") {
toast.error(`${t("error.empty_req_name")}`)
return
}
emit("add-request", name.value)
emit("add-request", editingName.value)
}
const hideModal = () => {

View File

@@ -59,26 +59,26 @@ const emit = defineEmits<{
(e: "hide-modal"): void
}>()
const name = ref("")
const editingName = ref("")
watch(
() => props.editingCollectionName,
(newName) => {
name.value = newName
editingName.value = newName
}
)
const saveCollection = () => {
if (name.value.trim() === "") {
if (editingName.value.trim() === "") {
toast.error(t("collection.invalid_name"))
return
}
emit("submit", name.value)
emit("submit", editingName.value)
}
const hideModal = () => {
name.value = ""
editingName.value = ""
emit("hide-modal")
}
</script>

View File

@@ -59,26 +59,26 @@ const emit = defineEmits<{
(e: "hide-modal"): void
}>()
const name = ref("")
const editingName = ref("")
watch(
() => props.editingFolderName,
(newName) => {
name.value = newName
editingName.value = newName
}
)
const editFolder = () => {
if (name.value.trim() === "") {
if (editingName.value.trim() === "") {
toast.error(t("folder.invalid_name"))
return
}
emit("submit", name.value)
emit("submit", editingName.value)
}
const hideModal = () => {
name.value = ""
editingName.value = ""
emit("hide-modal")
}
</script>

View File

@@ -60,19 +60,19 @@ const emit = defineEmits<{
(e: "update:modelValue", value: string): void
}>()
const name = useVModel(props, "modelValue")
const editingName = useVModel(props, "modelValue")
const editRequest = () => {
if (name.value.trim() === "") {
if (editingName.value.trim() === "") {
toast.error(t("request.invalid_name"))
return
}
emit("submit", name.value)
emit("submit", editingName.value)
}
const hideModal = () => {
name.value = ""
editingName.value = ""
emit("hide-modal")
}
</script>

View File

@@ -57,24 +57,24 @@ const emit = defineEmits<{
): void
}>()
const name = ref("")
const editingName = ref("")
watch(
() => props.show,
(show) => {
if (show) {
name.value = getGQLSession().request.name
editingName.value = getGQLSession().request.name
}
}
)
const addRequest = () => {
if (!name.value) {
if (!editingName.value) {
toast.error(`${t("error.empty_req_name")}`)
return
}
emit("add-request", {
name: name.value,
name: editingName.value,
path: props.folderPath,
})
hideModal()

View File

@@ -52,17 +52,17 @@ const emit = defineEmits<{
const t = useI18n()
const toast = useToast()
const name = ref<string | null>()
const editingName = ref<string | null>()
watch(
() => props.editingCollectionName,
(val) => {
name.value = val
editingName.value = val
}
)
const saveCollection = () => {
if (!name.value) {
if (!editingName.value) {
toast.error(`${t("collection.invalid_name")}`)
return
}
@@ -70,7 +70,7 @@ const saveCollection = () => {
// TODO: Better typechecking here ?
const collectionUpdated = {
...(props.editingCollection as any),
name: name.value,
name: editingName.value,
}
editGraphqlCollection(props.editingCollectionIndex, collectionUpdated)
@@ -78,7 +78,7 @@ const saveCollection = () => {
}
const hideModal = () => {
name.value = null
editingName.value = null
emit("hide-modal")
}
</script>

View File

@@ -11,7 +11,7 @@
t("environment.name")
}}</label>
<input
v-model="name"
v-model="editingName"
type="text"
:placeholder="t('environment.variable')"
class="input"
@@ -88,7 +88,6 @@ const props = defineProps<{
position: { top: number; left: number }
name: string
value: string
replaceWithVariable: boolean
}>()
const emit = defineEmits<{
@@ -106,7 +105,7 @@ watch(
scope.value = {
type: "global",
}
name.value = ""
editingName.value = ""
replaceWithVariable.value = false
}
}
@@ -132,22 +131,22 @@ const scope = ref<Scope>({
const replaceWithVariable = ref(false)
const name = ref("")
const editingName = ref(props.name)
const addEnvironment = async () => {
if (!name.value) {
if (!editingName.value) {
toast.error(`${t("environment.invalid_name")}`)
return
}
if (scope.value.type === "global") {
addGlobalEnvVariable({
key: name.value,
key: editingName.value,
value: props.value,
})
toast.success(`${t("environment.updated")}`)
} else if (scope.value.type === "my-environment") {
addEnvironmentVariable(scope.value.index, {
key: name.value,
key: editingName.value,
value: props.value,
})
toast.success(`${t("environment.updated")}`)
@@ -155,7 +154,7 @@ const addEnvironment = async () => {
const newVariables = [
...scope.value.environment.environment.variables,
{
key: name.value,
key: editingName.value,
value: props.value,
},
]
@@ -179,7 +178,7 @@ const addEnvironment = async () => {
}
if (replaceWithVariable.value) {
//replace the current tab endpoint with the variable name with << and >>
const variableName = `<<${name.value}>>`
const variableName = `<<${editingName.value}>>`
//replace the currenttab endpoint containing the value in the text with variablename
currentActiveTab.value.document.request.endpoint =
currentActiveTab.value.document.request.endpoint.replace(

View File

@@ -171,7 +171,7 @@ const emit = defineEmits<{
const idTicker = ref(0)
const name = ref<string | null>(null)
const editingName = ref<string | null>(null)
const vars = ref<EnvironmentVariable[]>([
{ id: idTicker.value++, env: { key: "", value: "" } },
])
@@ -224,10 +224,12 @@ const liveEnvs = computed(() => {
}
if (props.editingEnvironmentIndex === "Global") {
return [...vars.value.map((x) => ({ ...x.env, source: name.value! }))]
return [
...vars.value.map((x) => ({ ...x.env, source: editingName.value! })),
]
} else {
return [
...vars.value.map((x) => ({ ...x.env, source: name.value! })),
...vars.value.map((x) => ({ ...x.env, source: editingName.value! })),
...globalVars.value.map((x) => ({ ...x, source: "Global" })),
]
}
@@ -237,7 +239,7 @@ watch(
() => props.show,
(show) => {
if (show) {
name.value = workingEnv.value?.name ?? null
editingName.value = workingEnv.value?.name ?? null
vars.value = pipe(
workingEnv.value?.variables ?? [],
A.map((e) => ({
@@ -270,7 +272,7 @@ const removeEnvironmentVariable = (index: number) => {
}
const saveEnvironment = () => {
if (!name.value) {
if (!editingName.value) {
toast.error(`${t("environment.invalid_name")}`)
return
}
@@ -286,13 +288,13 @@ const saveEnvironment = () => {
)
const environmentUpdated: Environment = {
name: name.value,
name: editingName.value,
variables: filterdVariables,
}
if (props.action === "new") {
// Creating a new environment
createEnvironment(name.value, environmentUpdated.variables)
createEnvironment(editingName.value, environmentUpdated.variables)
setSelectedEnvironmentIndex({
type: "MY_ENV",
index: envList.value.length - 1,
@@ -330,7 +332,7 @@ const saveEnvironment = () => {
}
const hideModal = () => {
name.value = null
editingName.value = null
emit("hide-modal")
}
</script>

View File

@@ -182,7 +182,7 @@ const emit = defineEmits<{
const idTicker = ref(0)
const name = ref<string | null>(null)
const editingName = ref<string | null>(null)
const vars = ref<EnvironmentVariable[]>([
{ id: idTicker.value++, env: { key: "", value: "" } },
])
@@ -208,7 +208,9 @@ const liveEnvs = computed(() => {
if (evnExpandError.value) {
return []
} else {
return [...vars.value.map((x) => ({ ...x.env, source: name.value! }))]
return [
...vars.value.map((x) => ({ ...x.env, source: editingName.value! })),
]
}
})
@@ -217,7 +219,7 @@ watch(
(show) => {
if (show) {
if (props.action === "new") {
name.value = null
editingName.value = null
vars.value = pipe(
props.envVars() ?? [],
A.map((e: { key: string; value: string }) => ({
@@ -226,7 +228,7 @@ watch(
}))
)
} else if (props.editingEnvironment !== null) {
name.value = props.editingEnvironment.environment.name ?? null
editingName.value = props.editingEnvironment.environment.name ?? null
vars.value = pipe(
props.editingEnvironment.environment.variables ?? [],
A.map((e: { key: string; value: string }) => ({
@@ -264,7 +266,7 @@ const isLoading = ref(false)
const saveEnvironment = async () => {
isLoading.value = true
if (!name.value) {
if (!editingName.value) {
toast.error(`${t("environment.invalid_name")}`)
return
}
@@ -289,7 +291,7 @@ const saveEnvironment = async () => {
createTeamEnvironment(
JSON.stringify(filterdVariables),
props.editingTeamId,
name.value
editingName.value
),
TE.match(
(err: GQLError<string>) => {
@@ -312,7 +314,7 @@ const saveEnvironment = async () => {
updateTeamEnvironment(
JSON.stringify(filterdVariables),
props.editingEnvironment.id,
name.value
editingName.value
),
TE.match(
(err: GQLError<string>) => {
@@ -331,7 +333,7 @@ const saveEnvironment = async () => {
}
const hideModal = () => {
name.value = null
editingName.value = null
emit("hide-modal")
}

View File

@@ -757,7 +757,11 @@ const hideRequestModal = () => {
const prettifyQuery = () => {
try {
gqlQueryString.value = gql.print(gql.parse(gqlQueryString.value))
gqlQueryString.value = gql.print(
gql.parse(gqlQueryString.value, {
allowLegacyFragmentVariables: true,
})
)
prettifyQueryIcon.value = IconCheck
} catch (e) {
toast.error(`${t("error.gql_prettify_invalid_query")}`)

View File

@@ -28,7 +28,9 @@
>
<HoppSmartItem
:label="t('state.none')"
:info-icon="(body.contentType === null ? IconDone : null) as any"
:info-icon="
(body.contentType === null ? IconDone : null) as any
"
:active-info-icon="body.contentType === null"
@click="
() => {

View File

@@ -69,7 +69,9 @@
<HoppButtonPrimary
id="send"
v-tippy="{ theme: 'tooltip', delay: [500, 20], allowHTML: true }"
:title="`${t('action.send')} <kbd>${getSpecialKey()}</kbd><kbd>↩</kbd>`"
:title="`${t(
'action.send'
)} <kbd>${getSpecialKey()}</kbd><kbd>↩</kbd>`"
:label="`${!loading ? t('action.send') : t('action.cancel')}`"
class="flex-1 rounded-r-none min-w-20"
@click="!loading ? newSendRequest() : cancelRequest()"

View File

@@ -131,6 +131,7 @@ const fetchMyTeams = async () => {
loading.value = true
const result = await runGQLQuery({
query: GetMyTeamsDocument,
variables: {},
})
loading.value = false

View File

@@ -113,13 +113,13 @@ const emit = defineEmits<{
}>()
const QoS = ref<(typeof QOS_VALUES)[number]>(2)
const name = ref("")
const editingName = ref("")
const color = ref("#f58290")
watch(
() => props.show,
() => {
name.value = ""
editingName.value = ""
QoS.value = 2
const randomColor = Math.floor(Math.random() * 16777215).toString(16)
color.value = `#${randomColor}`
@@ -127,18 +127,18 @@ watch(
)
const addNewSubscription = () => {
if (!name.value) {
if (!editingName.value) {
toastr.error(t("mqtt.invalid_topic").toString())
return
}
emit("submit", {
name: name.value,
name: editingName.value,
qos: QoS.value,
color: color.value,
})
}
const hideModal = () => {
name.value = ""
editingName.value = ""
QoS.value = 2
emit("hide-modal")
}

View File

@@ -50,14 +50,14 @@ const emit = defineEmits<{
(e: "hide-modal"): void
}>()
const name = ref<string | null>(null)
const editingName = ref<string | null>(null)
const isLoading = ref(false)
const addNewTeam = async () => {
isLoading.value = true
await pipe(
TeamNameCodec.decode(name.value),
TeamNameCodec.decode(editingName.value),
TE.fromEither,
TE.mapLeft(() => "invalid_name" as const),
TE.chainW(createTeam),
@@ -86,7 +86,7 @@ const addNewTeam = async () => {
}
const hideModal = () => {
name.value = null
editingName.value = null
emit("hide-modal")
}
</script>

View File

@@ -228,12 +228,12 @@ const props = defineProps<{
const toast = useToast()
const name = toRef(props.editingTeam, "name")
const editingName = toRef(props.editingTeam, "name")
watch(
() => props.editingTeam.name,
(newName: string) => {
name.value = newName
editingName.value = newName
}
)
@@ -381,11 +381,11 @@ const isLoading = ref(false)
const saveTeam = async () => {
isLoading.value = true
if (name.value !== "") {
if (TeamNameCodec.is(name.value)) {
if (editingName.value !== "") {
if (TeamNameCodec.is(editingName.value)) {
const updateTeamNameResult = await renameTeam(
props.editingTeamID,
name.value
editingName.value
)()
if (E.isLeft(updateTeamNameResult)) {
toast.error(`${t("error.something_went_wrong")}`)