refactor: check spelling (#2200)
Co-authored-by: Josh Soref <jsoref@users.noreply.github.com>
This commit is contained in:
@@ -53,17 +53,17 @@ const searchResultsItems = computed(() =>
|
|||||||
|
|
||||||
const emitSearchAction = (action: HoppAction) => emit("action", action)
|
const emitSearchAction = (action: HoppAction) => emit("action", action)
|
||||||
|
|
||||||
const { bindArrowKeysListerners, unbindArrowKeysListerners, selectedEntry } =
|
const { bindArrowKeysListeners, unbindArrowKeysListeners, selectedEntry } =
|
||||||
useArrowKeysNavigation(searchResultsItems, {
|
useArrowKeysNavigation(searchResultsItems, {
|
||||||
onEnter: emitSearchAction,
|
onEnter: emitSearchAction,
|
||||||
stopPropagation: true,
|
stopPropagation: true,
|
||||||
})
|
})
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
bindArrowKeysListerners()
|
bindArrowKeysListeners()
|
||||||
})
|
})
|
||||||
|
|
||||||
onUnmounted(() => {
|
onUnmounted(() => {
|
||||||
unbindArrowKeysListerners()
|
unbindArrowKeysListeners()
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -145,7 +145,7 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { onMounted, reactive, ref } from "@nuxtjs/composition-api"
|
import { onMounted, reactive, ref } from "@nuxtjs/composition-api"
|
||||||
import { useNetwork } from "@vueuse/core"
|
import { useNetwork } from "@vueuse/core"
|
||||||
import intializePwa from "~/helpers/pwa"
|
import initializePwa from "~/helpers/pwa"
|
||||||
import { probableUser$ } from "~/helpers/fb/auth"
|
import { probableUser$ } from "~/helpers/fb/auth"
|
||||||
import { getLocalConfig, setLocalConfig } from "~/newstore/localpersistence"
|
import { getLocalConfig, setLocalConfig } from "~/newstore/localpersistence"
|
||||||
import {
|
import {
|
||||||
@@ -181,7 +181,7 @@ defineActionHandler("modals.support.toggle", () => {
|
|||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
// Initializes the PWA code - checks if the app is installed,
|
// Initializes the PWA code - checks if the app is installed,
|
||||||
// etc.
|
// etc.
|
||||||
showInstallPrompt.value = intializePwa()
|
showInstallPrompt.value = initializePwa()
|
||||||
|
|
||||||
const cookiesAllowed = getLocalConfig("cookiesAllowed") === "yes"
|
const cookiesAllowed = getLocalConfig("cookiesAllowed") === "yes"
|
||||||
if (!cookiesAllowed) {
|
if (!cookiesAllowed) {
|
||||||
|
|||||||
@@ -107,7 +107,7 @@ const shortcutsItems = computed(() =>
|
|||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
const { bindArrowKeysListerners, unbindArrowKeysListerners, selectedEntry } =
|
const { bindArrowKeysListeners, unbindArrowKeysListeners, selectedEntry } =
|
||||||
useArrowKeysNavigation(shortcutsItems, {
|
useArrowKeysNavigation(shortcutsItems, {
|
||||||
onEnter: runAction,
|
onEnter: runAction,
|
||||||
})
|
})
|
||||||
@@ -115,8 +115,8 @@ const { bindArrowKeysListerners, unbindArrowKeysListerners, selectedEntry } =
|
|||||||
watch(
|
watch(
|
||||||
() => props.show,
|
() => props.show,
|
||||||
(show) => {
|
(show) => {
|
||||||
if (show) bindArrowKeysListerners()
|
if (show) bindArrowKeysListeners()
|
||||||
else unbindArrowKeysListerners()
|
else unbindArrowKeysListeners()
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -31,7 +31,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="flex flex-1 border-b border-dividerLight">
|
<div class="flex flex-1 border-b border-dividerLight">
|
||||||
<div class="w-2/3 border-r border-dividerLight">
|
<div class="w-2/3 border-r border-dividerLight">
|
||||||
<div ref="preRrequestEditor" class="h-full"></div>
|
<div ref="preRequestEditor" class="h-full"></div>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
class="sticky h-full p-4 overflow-auto bg-primary top-upperTertiaryStickyFold min-w-46 max-w-1/3 z-9"
|
class="sticky h-full p-4 overflow-auto bg-primary top-upperTertiaryStickyFold min-w-46 max-w-1/3 z-9"
|
||||||
@@ -74,11 +74,11 @@ const t = useI18n()
|
|||||||
|
|
||||||
const preRequestScript = usePreRequestScript()
|
const preRequestScript = usePreRequestScript()
|
||||||
|
|
||||||
const preRrequestEditor = ref<any | null>(null)
|
const preRequestEditor = ref<any | null>(null)
|
||||||
const linewrapEnabled = ref(true)
|
const linewrapEnabled = ref(true)
|
||||||
|
|
||||||
useCodemirror(
|
useCodemirror(
|
||||||
preRrequestEditor,
|
preRequestEditor,
|
||||||
preRequestScript,
|
preRequestScript,
|
||||||
reactive({
|
reactive({
|
||||||
extendedEditorConfig: {
|
extendedEditorConfig: {
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ const props = defineProps({
|
|||||||
})
|
})
|
||||||
|
|
||||||
const logsRef = ref<any | null>(null)
|
const logsRef = ref<any | null>(null)
|
||||||
const BOTTOM_SCROLL_DIST_INNACURACY = 5
|
const BOTTOM_SCROLL_DIST_INACCURACY = 5
|
||||||
|
|
||||||
watch(
|
watch(
|
||||||
() => props.log,
|
() => props.log,
|
||||||
@@ -48,7 +48,7 @@ watch(
|
|||||||
logsRef.value.scrollHeight -
|
logsRef.value.scrollHeight -
|
||||||
logsRef.value.scrollTop -
|
logsRef.value.scrollTop -
|
||||||
logsRef.value.clientHeight
|
logsRef.value.clientHeight
|
||||||
if (distToBottom < BOTTOM_SCROLL_DIST_INNACURACY) {
|
if (distToBottom < BOTTOM_SCROLL_DIST_INACCURACY) {
|
||||||
nextTick(() => (logsRef.value.scrollTop = logsRef.value.scrollHeight))
|
nextTick(() => (logsRef.value.scrollTop = logsRef.value.scrollHeight))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
/*
|
/*
|
||||||
Implements a wrapper listening to viewport intersections via
|
Implements a wrapper listening to viewport intersections via
|
||||||
IntesectionObserver API
|
IntersectionObserver API
|
||||||
|
|
||||||
Events
|
Events
|
||||||
------
|
------
|
||||||
|
|||||||
@@ -383,7 +383,7 @@ function getQueries(
|
|||||||
* Joins dangling params to origin
|
* Joins dangling params to origin
|
||||||
* @param origin origin value from the URL Object
|
* @param origin origin value from the URL Object
|
||||||
* @param params params without values
|
* @param params params without values
|
||||||
* @returns origin string concatenated with dngling paramas
|
* @returns origin string concatenated with dangling paramas
|
||||||
*/
|
*/
|
||||||
function concatParams(urlObject: URL | undefined, params: string[]) {
|
function concatParams(urlObject: URL | undefined, params: string[]) {
|
||||||
return pipe(
|
return pipe(
|
||||||
|
|||||||
@@ -3,12 +3,12 @@ import { HoppRESTRequest, HoppCollection } from "@hoppscotch/data"
|
|||||||
|
|
||||||
export type HoppExporter<T> = (content: T) => TE.TaskEither<string, string>
|
export type HoppExporter<T> = (content: T) => TE.TaskEither<string, string>
|
||||||
|
|
||||||
export type HoppExporterDefintion<T> = {
|
export type HoppExporterDefinition<T> = {
|
||||||
name: string
|
name: string
|
||||||
exporter: () => Promise<HoppExporter<T>>
|
exporter: () => Promise<HoppExporter<T>>
|
||||||
}
|
}
|
||||||
|
|
||||||
export const RESTCollectionExporters: HoppExporterDefintion<
|
export const RESTCollectionExporters: HoppExporterDefinition<
|
||||||
HoppCollection<HoppRESTRequest>
|
HoppCollection<HoppRESTRequest>
|
||||||
>[] = [
|
>[] = [
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ type HoppImporter<T, StepsType, Errors> = (
|
|||||||
/**
|
/**
|
||||||
* Definition for importers
|
* Definition for importers
|
||||||
*/
|
*/
|
||||||
type HoppImporterDefintion<T, Y, E> = {
|
type HoppImporterDefinition<T, Y, E> = {
|
||||||
/**
|
/**
|
||||||
* Name of the importer, shown on the Select Importer dropdown
|
* Name of the importer, shown on the Select Importer dropdown
|
||||||
*/
|
*/
|
||||||
@@ -53,7 +53,7 @@ export const defineImporter = <ReturnType, StepType, Errors>(input: {
|
|||||||
applicableTo?: Array<"team-collections" | "my-collections">
|
applicableTo?: Array<"team-collections" | "my-collections">
|
||||||
steps: StepType
|
steps: StepType
|
||||||
}) => {
|
}) => {
|
||||||
return <HoppImporterDefintion<ReturnType, StepType, Errors>>{
|
return <HoppImporterDefinition<ReturnType, StepType, Errors>>{
|
||||||
...input,
|
...input,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -37,19 +37,19 @@ export function useArrowKeysNavigation(searchItems: any, options: any = {}) {
|
|||||||
handleArrowKeysNavigation(event, selectedEntry, preventPropagation)
|
handleArrowKeysNavigation(event, selectedEntry, preventPropagation)
|
||||||
}
|
}
|
||||||
|
|
||||||
function bindArrowKeysListerners() {
|
function bindArrowKeysListeners() {
|
||||||
window.addEventListener("keydown", onKeyUp, { capture: preventPropagation })
|
window.addEventListener("keydown", onKeyUp, { capture: preventPropagation })
|
||||||
}
|
}
|
||||||
|
|
||||||
function unbindArrowKeysListerners() {
|
function unbindArrowKeysListeners() {
|
||||||
window.removeEventListener("keydown", onKeyUp, {
|
window.removeEventListener("keydown", onKeyUp, {
|
||||||
capture: preventPropagation,
|
capture: preventPropagation,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
bindArrowKeysListerners,
|
bindArrowKeysListeners,
|
||||||
unbindArrowKeysListerners,
|
unbindArrowKeysListeners,
|
||||||
selectedEntry,
|
selectedEntry,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ const TEAMS_BACKEND_PAGE_SIZE = 10
|
|||||||
* @param {string} collID - ID of the collection to find the parent of
|
* @param {string} collID - ID of the collection to find the parent of
|
||||||
* @param {TeamCollection} currentParent - (used for recursion, do not set) The parent in the current iteration (undefined if root)
|
* @param {TeamCollection} currentParent - (used for recursion, do not set) The parent in the current iteration (undefined if root)
|
||||||
*
|
*
|
||||||
* @returns REFERENCE to the collecton or null if not found or the collection is in root
|
* @returns REFERENCE to the collection or null if not found or the collection is in root
|
||||||
*/
|
*/
|
||||||
function findParentOfColl(
|
function findParentOfColl(
|
||||||
tree: TeamCollection[],
|
tree: TeamCollection[],
|
||||||
|
|||||||
@@ -314,7 +314,7 @@ function makeVisitors(server, query, file, messages) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function validateAssignement(nodeLeft, nodeRight, rule, state) {
|
function validateAssignment(nodeLeft, nodeRight, rule, state) {
|
||||||
if (!nodeLeft || !nodeRight) return
|
if (!nodeLeft || !nodeRight) return
|
||||||
if (!rule) return
|
if (!rule) return
|
||||||
var leftType = infer.expressionType({ node: nodeLeft, state: state }),
|
var leftType = infer.expressionType({ node: nodeLeft, state: state }),
|
||||||
@@ -387,7 +387,7 @@ function makeVisitors(server, query, file, messages) {
|
|||||||
)
|
)
|
||||||
// type mismatch?
|
// type mismatch?
|
||||||
if (mismatchRule)
|
if (mismatchRule)
|
||||||
validateAssignement(varNode, decl.init, mismatchRule, state)
|
validateAssignment(varNode, decl.init, mismatchRule, state)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break
|
break
|
||||||
@@ -525,7 +525,7 @@ function makeVisitors(server, query, file, messages) {
|
|||||||
CallExpression: validateCallExpression,
|
CallExpression: validateCallExpression,
|
||||||
AssignmentExpression: function (node, state, c) {
|
AssignmentExpression: function (node, state, c) {
|
||||||
var rule = getRule("TypeMismatch")
|
var rule = getRule("TypeMismatch")
|
||||||
validateAssignement(node.left, node.right, rule, state)
|
validateAssignment(node.left, node.right, rule, state)
|
||||||
},
|
},
|
||||||
ObjectExpression: function (node, state, c) {
|
ObjectExpression: function (node, state, c) {
|
||||||
// validate properties of the object literal
|
// validate properties of the object literal
|
||||||
@@ -551,7 +551,7 @@ function makeVisitors(server, query, file, messages) {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
ArrayExpression: function (node, state, c) {
|
ArrayExpression: function (node, state, c) {
|
||||||
// validate elements of the Arrray
|
// validate elements of the Array
|
||||||
var rule = getRule("Array")
|
var rule = getRule("Array")
|
||||||
if (!rule) return
|
if (!rule) return
|
||||||
//var actualType = infer.expressionType({node: node, state: state});
|
//var actualType = infer.expressionType({node: node, state: state});
|
||||||
|
|||||||
@@ -113,7 +113,7 @@ function setupRequestSync(
|
|||||||
sub = startRequestSync()
|
sub = startRequestSync()
|
||||||
})
|
})
|
||||||
|
|
||||||
// Stop subscripton to stop syncing
|
// Stop subscription to stop syncing
|
||||||
onBeforeUnmount(() => {
|
onBeforeUnmount(() => {
|
||||||
sub?.unsubscribe()
|
sub?.unsubscribe()
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
# PLUGINS
|
# PLUGINS
|
||||||
|
|
||||||
This directory contains Javascript plugins that you want to run before mounting the root Vue.js application.
|
This directory contains JavaScript plugins that you want to run before mounting the root Vue.js application.
|
||||||
|
|
||||||
More information about the usage of this directory in [the documentation](https://nuxtjs.org/guide/plugins).
|
More information about the usage of this directory in [the documentation](https://nuxtjs.org/guide/plugins).
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ This package deals with providing a JavaScript sandbox for executing various sec
|
|||||||
|
|
||||||
## How does this work?
|
## How does this work?
|
||||||
|
|
||||||
This package makes use of [quickjs-empscripten](https://www.npmjs.com/package/quickjs-emscripten) for building sandboxes for running external code on Hoppscotch.
|
This package makes use of [quickjs-emscripten](https://www.npmjs.com/package/quickjs-emscripten) for building sandboxes for running external code on Hoppscotch.
|
||||||
|
|
||||||
Currently implemented sandboxes:
|
Currently implemented sandboxes:
|
||||||
- Hoppscotch Test Scripts
|
- Hoppscotch Test Scripts
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ export const runTestScript = (
|
|||||||
/**
|
/**
|
||||||
* Executes a given pre-request script on the sandbox
|
* Executes a given pre-request script on the sandbox
|
||||||
* @param preRequestScript The script to run
|
* @param preRequestScript The script to run
|
||||||
* @param env The envirionment variables active
|
* @param env The environment variables active
|
||||||
* @returns A TaskEither with an error message or an array of the final environments with the all the script values applied
|
* @returns A TaskEither with an error message or an array of the final environments with the all the script values applied
|
||||||
*/
|
*/
|
||||||
export const runPreRequestScript = execPreRequestScript
|
export const runPreRequestScript = execPreRequestScript
|
||||||
|
|||||||
Reference in New Issue
Block a user