Isolate Netlify, Firebase and Helper functions + Import from absolute paths
This commit is contained in:
@@ -43,14 +43,14 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { fb } from "../../functions/fb"
|
||||
import { fb } from "~/helpers/fb"
|
||||
|
||||
export default {
|
||||
props: {
|
||||
show: Boolean,
|
||||
},
|
||||
components: {
|
||||
modal: () => import("../../components/ui/modal"),
|
||||
modal: () => import("~/components/ui/modal"),
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { fb } from "../../functions/fb"
|
||||
import { fb } from "~/helpers/fb"
|
||||
|
||||
export default {
|
||||
props: {
|
||||
@@ -52,7 +52,7 @@ export default {
|
||||
collectionIndex: Number,
|
||||
},
|
||||
components: {
|
||||
modal: () => import("../../components/ui/modal"),
|
||||
modal: () => import("~/components/ui/modal"),
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
||||
@@ -87,7 +87,7 @@ ul li {
|
||||
</style>
|
||||
|
||||
<script>
|
||||
import { fb } from "../../functions/fb"
|
||||
import { fb } from "~/helpers/fb"
|
||||
|
||||
export default {
|
||||
components: {
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { fb } from "../../functions/fb"
|
||||
import { fb } from "~/helpers/fb"
|
||||
|
||||
export default {
|
||||
props: {
|
||||
@@ -52,7 +52,7 @@ export default {
|
||||
editingCollectionIndex: Number,
|
||||
},
|
||||
components: {
|
||||
modal: () => import("../../components/ui/modal"),
|
||||
modal: () => import("~/components/ui/modal"),
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { fb } from "../../functions/fb"
|
||||
import { fb } from "~/helpers/fb"
|
||||
|
||||
export default {
|
||||
props: {
|
||||
@@ -49,7 +49,7 @@ export default {
|
||||
folderIndex: Number,
|
||||
},
|
||||
components: {
|
||||
modal: () => import("../../components/ui/modal"),
|
||||
modal: () => import("~/components/ui/modal"),
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
||||
@@ -69,7 +69,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { fb } from "../../functions/fb"
|
||||
import { fb } from "~/helpers/fb"
|
||||
|
||||
export default {
|
||||
props: {
|
||||
@@ -80,7 +80,7 @@ export default {
|
||||
requestIndex: Number,
|
||||
},
|
||||
components: {
|
||||
modal: () => import("../../components/ui/modal"),
|
||||
modal: () => import("~/components/ui/modal"),
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
||||
@@ -70,7 +70,7 @@ ul li {
|
||||
</style>
|
||||
|
||||
<script>
|
||||
import { fb } from "../../functions/fb"
|
||||
import { fb } from "~/helpers/fb"
|
||||
|
||||
export default {
|
||||
props: {
|
||||
|
||||
@@ -76,7 +76,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { fb } from "../../functions/fb"
|
||||
import { fb } from "~/helpers/fb"
|
||||
|
||||
export default {
|
||||
data() {
|
||||
@@ -88,7 +88,7 @@ export default {
|
||||
show: Boolean,
|
||||
},
|
||||
components: {
|
||||
modal: () => import("../../components/ui/modal"),
|
||||
modal: () => import("~/components/ui/modal"),
|
||||
},
|
||||
computed: {
|
||||
collectionJson() {
|
||||
|
||||
@@ -103,7 +103,7 @@ ul {
|
||||
|
||||
<script>
|
||||
import collection from "./collection"
|
||||
import { fb } from "../../functions/fb"
|
||||
import { fb } from "~/helpers/fb"
|
||||
|
||||
export default {
|
||||
components: {
|
||||
|
||||
@@ -42,7 +42,7 @@ ul li {
|
||||
</style>
|
||||
|
||||
<script>
|
||||
import { fb } from "../../functions/fb"
|
||||
import { fb } from "~/helpers/fb"
|
||||
|
||||
export default {
|
||||
props: {
|
||||
|
||||
@@ -78,7 +78,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { fb } from "../../functions/fb"
|
||||
import { fb } from "~/helpers/fb"
|
||||
|
||||
export default {
|
||||
props: {
|
||||
@@ -86,7 +86,7 @@ export default {
|
||||
editingRequest: Object,
|
||||
},
|
||||
components: {
|
||||
modal: () => import("../../components/ui/modal"),
|
||||
modal: () => import("~/components/ui/modal"),
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
||||
@@ -43,14 +43,14 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { fb } from "../../functions/fb"
|
||||
import { fb } from "~/helpers/fb"
|
||||
|
||||
export default {
|
||||
props: {
|
||||
show: Boolean,
|
||||
},
|
||||
components: {
|
||||
modal: () => import("../../components/ui/modal"),
|
||||
modal: () => import("~/components/ui/modal"),
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
||||
@@ -114,8 +114,8 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import textareaAutoHeight from "../../directives/textareaAutoHeight"
|
||||
import { fb } from "../../functions/fb"
|
||||
import textareaAutoHeight from "~/directives/textareaAutoHeight"
|
||||
import { fb } from "~/helpers/fb"
|
||||
|
||||
export default {
|
||||
directives: {
|
||||
@@ -127,7 +127,7 @@ export default {
|
||||
editingEnvironmentIndex: Number,
|
||||
},
|
||||
components: {
|
||||
modal: () => import("../../components/ui/modal"),
|
||||
modal: () => import("~/components/ui/modal"),
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
||||
@@ -42,7 +42,7 @@ ul li {
|
||||
</style>
|
||||
|
||||
<script>
|
||||
import { fb } from "../../functions/fb"
|
||||
import { fb } from "~/helpers/fb"
|
||||
|
||||
export default {
|
||||
props: {
|
||||
|
||||
@@ -76,7 +76,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { fb } from "../../functions/fb"
|
||||
import { fb } from "~/helpers/fb"
|
||||
|
||||
export default {
|
||||
data() {
|
||||
@@ -88,7 +88,7 @@ export default {
|
||||
show: Boolean,
|
||||
},
|
||||
components: {
|
||||
modal: () => import("../../components/ui/modal"),
|
||||
modal: () => import("~/components/ui/modal"),
|
||||
},
|
||||
computed: {
|
||||
environmentJson() {
|
||||
|
||||
@@ -58,7 +58,7 @@ ul {
|
||||
|
||||
<script>
|
||||
import environment from "./environment"
|
||||
import { fb } from "../../functions/fb"
|
||||
import { fb } from "~/helpers/fb"
|
||||
|
||||
export default {
|
||||
components: {
|
||||
|
||||
@@ -49,7 +49,7 @@ ol {
|
||||
</style>
|
||||
|
||||
<script>
|
||||
import { fb } from "../../functions/fb"
|
||||
import { fb } from "~/helpers/fb"
|
||||
|
||||
export default {
|
||||
data() {
|
||||
|
||||
@@ -46,7 +46,7 @@ ol {
|
||||
</style>
|
||||
|
||||
<script>
|
||||
import { fb } from "../../functions/fb"
|
||||
import { fb } from "~/helpers/fb"
|
||||
|
||||
export default {
|
||||
data() {
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
|
||||
<script>
|
||||
import firebase from "firebase/app"
|
||||
import { fb } from "../../functions/fb"
|
||||
import { fb } from "~/helpers/fb"
|
||||
|
||||
export default {
|
||||
data() {
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
<script>
|
||||
import firebase from "firebase/app"
|
||||
import { fb } from "../../functions/fb"
|
||||
import { fb } from "~/helpers/fb"
|
||||
|
||||
export default {
|
||||
data() {
|
||||
|
||||
@@ -25,11 +25,11 @@ import ace from "ace-builds"
|
||||
import "ace-builds/webpack-resolver"
|
||||
import "ace-builds/src-noconflict/ext-language_tools"
|
||||
import "ace-builds/src-noconflict/mode-graphqlschema"
|
||||
import { defineGQLLanguageMode } from "~/functions/syntax/gqlQueryLangMode"
|
||||
import { defineGQLLanguageMode } from "~/helpers/syntax/gqlQueryLangMode"
|
||||
|
||||
import * as gql from "graphql"
|
||||
import { getAutocompleteSuggestions } from "graphql-language-service-interface"
|
||||
import debounce from "../../functions/utils/debounce"
|
||||
import debounce from "~/helpers/utils/debounce"
|
||||
|
||||
export default {
|
||||
props: {
|
||||
|
||||
@@ -282,15 +282,15 @@
|
||||
</style>
|
||||
|
||||
<script>
|
||||
import intializePwa from "../../assets/js/pwa"
|
||||
import intializePwa from "~/assets/js/pwa"
|
||||
import {
|
||||
hasExtensionInstalled,
|
||||
hasChromeExtensionInstalled,
|
||||
hasFirefoxExtensionInstalled,
|
||||
} from "../../functions/strategies/ExtensionStrategy"
|
||||
import { getPlatformSpecialKey } from "../../functions/platformutils"
|
||||
} from "~/helpers/strategies/ExtensionStrategy"
|
||||
import { getPlatformSpecialKey } from "~/helpers/platformutils"
|
||||
import firebase from "firebase/app"
|
||||
import { fb } from "../../functions/fb"
|
||||
import { fb } from "~/helpers/fb"
|
||||
|
||||
export default {
|
||||
components: {
|
||||
|
||||
@@ -306,8 +306,8 @@ ol {
|
||||
</style>
|
||||
|
||||
<script>
|
||||
import { findStatusGroup } from "../../pages/index"
|
||||
import { fb } from "../../functions/fb"
|
||||
import { findStatusGroup } from "~/pages/index"
|
||||
import { fb } from "~/helpers/fb"
|
||||
|
||||
const updateOnLocalStorage = (propertyName, property) =>
|
||||
window.localStorage.setItem(propertyName, JSON.stringify(property))
|
||||
|
||||
@@ -40,7 +40,7 @@ div.realtime-log {
|
||||
</style>
|
||||
|
||||
<script>
|
||||
import { getSourcePrefix } from "~/functions/utils/string"
|
||||
import { getSourcePrefix } from "~/helpers/utils/string"
|
||||
|
||||
export default {
|
||||
props: ["log", "title"],
|
||||
|
||||
@@ -70,11 +70,11 @@
|
||||
|
||||
<script>
|
||||
import Paho from "paho-mqtt"
|
||||
import { wsValid } from "~/functions/utils/valid"
|
||||
import { wsValid } from "~/helpers/utils/valid"
|
||||
|
||||
export default {
|
||||
components: {
|
||||
"pw-section": () => import("../../components/layout/section"),
|
||||
"pw-section": () => import("~/components/layout/section"),
|
||||
realtimeLog: () => import("./log"),
|
||||
},
|
||||
data: function () {
|
||||
|
||||
@@ -76,13 +76,13 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { socketioValid } from "~/functions/utils/valid"
|
||||
import { socketioValid } from "~/helpers/utils/valid"
|
||||
import io from "socket.io-client"
|
||||
import wildcard from "socketio-wildcard"
|
||||
|
||||
export default {
|
||||
components: {
|
||||
"pw-section": () => import("../../components/layout/section"),
|
||||
"pw-section": () => import("~/components/layout/section"),
|
||||
realtimeLog: () => import("./log"),
|
||||
},
|
||||
data() {
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { httpValid } from "~/functions/utils/valid"
|
||||
import { httpValid } from "~/helpers/utils/valid"
|
||||
|
||||
export default {
|
||||
components: {
|
||||
|
||||
@@ -66,7 +66,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { wsValid } from "~/functions/utils/valid"
|
||||
import { wsValid } from "~/helpers/utils/valid"
|
||||
|
||||
export default {
|
||||
components: {
|
||||
|
||||
@@ -23,8 +23,8 @@ const DEFAULT_THEME = "twilight"
|
||||
|
||||
import ace from "ace-builds"
|
||||
import "ace-builds/webpack-resolver"
|
||||
import jsonParse from "../../functions/jsonParse"
|
||||
import debounce from "../../functions/utils/debounce"
|
||||
import jsonParse from "~/helpers/jsonParse"
|
||||
import debounce from "~/helpers/utils/debounce"
|
||||
|
||||
export default {
|
||||
props: {
|
||||
|
||||
@@ -16,9 +16,9 @@
|
||||
<script>
|
||||
export default {
|
||||
components: {
|
||||
sidenav: () => import("../components/layout/sidenav"),
|
||||
"pw-header": () => import("../components/layout/header"),
|
||||
"pw-footer": () => import("../components/layout/footer"),
|
||||
sidenav: () => import("~/components/layout/sidenav"),
|
||||
"pw-header": () => import("~/components/layout/header"),
|
||||
"pw-footer": () => import("~/components/layout/footer"),
|
||||
},
|
||||
|
||||
beforeMount() {
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
[build]
|
||||
command = "npm run generate"
|
||||
functions = "functions/"
|
||||
functions = "netlify/"
|
||||
|
||||
@@ -303,11 +303,11 @@
|
||||
</style>
|
||||
|
||||
<script>
|
||||
import AceEditor from "../components/ui/ace-editor"
|
||||
import AceEditor from "~/components/ui/ace-editor"
|
||||
|
||||
export default {
|
||||
components: {
|
||||
"pw-section": () => import("../components/layout/section"),
|
||||
"pw-section": () => import("~/components/layout/section"),
|
||||
Editor: AceEditor,
|
||||
},
|
||||
|
||||
|
||||
@@ -339,26 +339,26 @@
|
||||
<script>
|
||||
import axios from "axios"
|
||||
import * as gql from "graphql"
|
||||
import textareaAutoHeight from "../directives/textareaAutoHeight"
|
||||
import { commonHeaders } from "../functions/headers"
|
||||
import AceEditor from "../components/ui/ace-editor"
|
||||
import QueryEditor from "../components/graphql/queryeditor"
|
||||
import { getPlatformSpecialKey } from "~/functions/platformutils"
|
||||
import { sendNetworkRequest } from "../functions/network"
|
||||
import textareaAutoHeight from "~/directives/textareaAutoHeight"
|
||||
import { commonHeaders } from "~/helpers/headers"
|
||||
import AceEditor from "~/components/ui/ace-editor"
|
||||
import QueryEditor from "~/components/graphql/queryeditor"
|
||||
import { getPlatformSpecialKey } from "~/helpers/platformutils"
|
||||
import { sendNetworkRequest } from "~/helpers/network"
|
||||
|
||||
export default {
|
||||
directives: {
|
||||
textareaAutoHeight,
|
||||
},
|
||||
components: {
|
||||
"pw-section": () => import("../components/layout/section"),
|
||||
"gql-field": () => import("../components/graphql/field"),
|
||||
"gql-type": () => import("../components/graphql/type"),
|
||||
autocomplete: () => import("../components/ui/autocomplete"),
|
||||
"pw-section": () => import("~/components/layout/section"),
|
||||
"gql-field": () => import("~/components/graphql/field"),
|
||||
"gql-type": () => import("~/components/graphql/type"),
|
||||
autocomplete: () => import("~/components/ui/autocomplete"),
|
||||
Editor: AceEditor,
|
||||
QueryEditor: QueryEditor,
|
||||
tabs: () => import("../components/ui/tabs"),
|
||||
tab: () => import("../components/ui/tab"),
|
||||
tabs: () => import("~/components/ui/tabs"),
|
||||
tab: () => import("~/components/ui/tab"),
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
||||
@@ -1339,28 +1339,24 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import section from "../components/layout/section"
|
||||
import section from "~/components/layout/section"
|
||||
import url from "url"
|
||||
import querystring from "querystring"
|
||||
import { commonHeaders } from "../functions/headers"
|
||||
import textareaAutoHeight from "../directives/textareaAutoHeight"
|
||||
import parseCurlCommand from "../assets/js/curlparser.js"
|
||||
import getEnvironmentVariablesFromScript from "../functions/preRequest"
|
||||
import runTestScriptWithVariables from "../functions/postwomanTesting"
|
||||
import parseTemplateString from "../functions/templating"
|
||||
import AceEditor from "../components/ui/ace-editor"
|
||||
import { tokenRequest, oauthRedirect } from "../assets/js/oauth"
|
||||
import { cancelRunningRequest, sendNetworkRequest } from "../functions/network"
|
||||
import { fb } from "../functions/fb"
|
||||
import { getEditorLangForMimeType } from "~/functions/editorutils"
|
||||
import {
|
||||
hasPathParams,
|
||||
addPathParamsToVariables,
|
||||
getQueryParams,
|
||||
} from "../functions/requestParams.js"
|
||||
import { parseUrlAndPath } from "../functions/utils/uri.js"
|
||||
import { httpValid } from "../functions/utils/valid"
|
||||
import { knownContentTypes, isJSONContentType } from "../functions/utils/contenttypes"
|
||||
import { commonHeaders } from "~/helpers/headers"
|
||||
import textareaAutoHeight from "~/directives/textareaAutoHeight"
|
||||
import parseCurlCommand from "~/assets/js/curlparser.js"
|
||||
import getEnvironmentVariablesFromScript from "~/helpers/preRequest"
|
||||
import runTestScriptWithVariables from "~/helpers/postwomanTesting"
|
||||
import parseTemplateString from "~/helpers/templating"
|
||||
import AceEditor from "~/components/ui/ace-editor"
|
||||
import { tokenRequest, oauthRedirect } from "~/assets/js/oauth"
|
||||
import { cancelRunningRequest, sendNetworkRequest } from "~/helpers/network"
|
||||
import { fb } from "~/helpers/fb"
|
||||
import { getEditorLangForMimeType } from "~/helpers/editorutils"
|
||||
import { hasPathParams, addPathParamsToVariables, getQueryParams } from "~/helpers/requestParams.js"
|
||||
import { parseUrlAndPath } from "~/helpers/utils/uri.js"
|
||||
import { httpValid } from "~/helpers/utils/valid"
|
||||
import { knownContentTypes, isJSONContentType } from "~/helpers/utils/contenttypes"
|
||||
|
||||
const statusCategories = [
|
||||
{
|
||||
@@ -1417,19 +1413,19 @@ export default {
|
||||
},
|
||||
components: {
|
||||
"pw-section": section,
|
||||
"pw-toggle": () => import("../components/ui/toggle"),
|
||||
"pw-modal": () => import("../components/ui/modal"),
|
||||
autocomplete: () => import("../components/ui/autocomplete"),
|
||||
history: () => import("../components/layout/history"),
|
||||
collections: () => import("../components/collections"),
|
||||
saveRequestAs: () => import("../components/collections/saveRequestAs"),
|
||||
"pw-toggle": () => import("~/components/ui/toggle"),
|
||||
"pw-modal": () => import("~/components/ui/modal"),
|
||||
autocomplete: () => import("~/components/ui/autocomplete"),
|
||||
history: () => import("~/components/layout/history"),
|
||||
collections: () => import("~/components/collections"),
|
||||
saveRequestAs: () => import("~/components/collections/saveRequestAs"),
|
||||
Editor: AceEditor,
|
||||
environments: () => import("../components/environments"),
|
||||
inputform: () => import("../components/firebase/inputform"),
|
||||
notes: () => import("../components/firebase/feeds"),
|
||||
login: () => import("../components/firebase/login"),
|
||||
tabs: () => import("../components/ui/tabs"),
|
||||
tab: () => import("../components/ui/tab"),
|
||||
environments: () => import("~/components/environments"),
|
||||
inputform: () => import("~/components/firebase/inputform"),
|
||||
notes: () => import("~/components/firebase/feeds"),
|
||||
login: () => import("~/components/firebase/login"),
|
||||
tabs: () => import("~/components/ui/tabs"),
|
||||
tab: () => import("~/components/ui/tab"),
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
||||
@@ -25,13 +25,13 @@
|
||||
<script>
|
||||
export default {
|
||||
components: {
|
||||
"pw-section": () => import("../components/layout/section"),
|
||||
tabs: () => import("../components/ui/tabs"),
|
||||
tab: () => import("../components/ui/tab"),
|
||||
websocket: () => import("../components/realtime/websocket"),
|
||||
sse: () => import("../components/realtime/sse"),
|
||||
socketio: () => import("../components/realtime/socketio"),
|
||||
mqtt: () => import("../components/realtime/mqtt"),
|
||||
"pw-section": () => import("~/components/layout/section"),
|
||||
tabs: () => import("~/components/ui/tabs"),
|
||||
tab: () => import("~/components/ui/tab"),
|
||||
websocket: () => import("~/components/realtime/websocket"),
|
||||
sse: () => import("~/components/realtime/sse"),
|
||||
socketio: () => import("~/components/realtime/socketio"),
|
||||
mqtt: () => import("~/components/realtime/mqtt"),
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -209,15 +209,15 @@
|
||||
|
||||
<script>
|
||||
import firebase from "firebase/app"
|
||||
import { fb } from "../functions/fb"
|
||||
import { fb } from "~/helpers/fb"
|
||||
|
||||
export default {
|
||||
components: {
|
||||
"pw-section": () => import("../components/layout/section"),
|
||||
"pw-toggle": () => import("../components/ui/toggle"),
|
||||
swatch: () => import("../components/settings/swatch"),
|
||||
login: () => import("../components/firebase/login"),
|
||||
logout: () => import("../components/firebase/logout"),
|
||||
"pw-section": () => import("~/components/layout/section"),
|
||||
"pw-toggle": () => import("~/components/ui/toggle"),
|
||||
swatch: () => import("~/components/settings/swatch"),
|
||||
login: () => import("~/components/firebase/login"),
|
||||
logout: () => import("~/components/firebase/logout"),
|
||||
},
|
||||
|
||||
data() {
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
|
||||
describe("Proxy enabled - external request", () => {
|
||||
it("Enable proxy and make a GET request to Postwoman API", () => {
|
||||
cy.enableProxy("/?url=https://postwoman.io&path=/.netlify/functions/api")
|
||||
cy.enableProxy("/?url=https://postwoman.io&path=/.netlify/netlify/api")
|
||||
.get("#send")
|
||||
.click()
|
||||
.get("#response-details-wrapper", { timeout: 24000 })
|
||||
|
||||
Reference in New Issue
Block a user