-

+
{{ error.statusCode }}
{{ error.message }}
@@ -39,16 +35,16 @@ export default {
methods: {
reloadApplication() {
- this.$router.push("/", () => window.location.reload());
- }
+ this.$router.push("/", () => window.location.reload())
+ },
},
head() {
return {
bodyAttrs: {
- class: "sticky-footer"
- }
- };
- }
-};
+ class: "sticky-footer",
+ },
+ }
+ },
+}
diff --git a/middleware/parsedefaulturl.js b/middleware/parsedefaulturl.js
index 684a03673..7b3d49a7e 100644
--- a/middleware/parsedefaulturl.js
+++ b/middleware/parsedefaulturl.js
@@ -1,5 +1,5 @@
export default function({ route, redirect }) {
if (route.fullPath !== "/") {
- return redirect("/");
+ return redirect("/")
}
}
diff --git a/nuxt.config.js b/nuxt.config.js
index 8dbdf656d..988b00f5b 100644
--- a/nuxt.config.js
+++ b/nuxt.config.js
@@ -4,201 +4,201 @@ export const meta = {
name: "Postwoman",
shortDescription: "A free, fast and beautiful API request builder",
description:
- "Web alternative to Postman - Helps you create requests faster, saving precious time on development."
-};
+ "Web alternative to Postman - Helps you create requests faster, saving precious time on development.",
+}
// Sets the base path for the router.
// Important for deploying to GitHub pages.
// -- Travis includes the author in the repo slug,
// so if there's a /, we need to get everything after it.
-let repoName = (process.env.TRAVIS_REPO_SLUG || "").split("/").pop();
+let repoName = (process.env.TRAVIS_REPO_SLUG || "").split("/").pop()
export const routerBase =
process.env.DEPLOY_ENV === "GH_PAGES"
? {
router: {
- base: `/${repoName}/`
- }
+ base: `/${repoName}/`,
+ },
}
: {
router: {
- base: "/"
- }
- };
+ base: "/",
+ },
+ }
export default {
mode: "spa",
/*
** Headers of the page
*/
server: {
- host: "0.0.0.0" // default: localhost
+ host: "0.0.0.0", // default: localhost
},
render: {
bundleRenderer: {
shouldPreload: (file, type) => {
- return ["script", "style", "font"].includes(type);
- }
- }
+ return ["script", "style", "font"].includes(type)
+ },
+ },
},
head: {
title: `${meta.name} \u2022 ${meta.shortDescription}`,
meta: [
{
- charset: "utf-8"
+ charset: "utf-8",
},
{
name: "viewport",
content:
- "width=device-width, initial-scale=1, minimum-scale=1, viewport-fit=cover, minimal-ui"
+ "width=device-width, initial-scale=1, minimum-scale=1, viewport-fit=cover, minimal-ui",
},
{
hid: "description",
name: "description",
- content: meta.description || ""
+ content: meta.description || "",
},
{
name: "keywords",
content:
- "postwoman, postwoman chrome, postwoman online, postwoman for mac, postwoman app, postwoman for windows, postwoman google chrome, postwoman chrome app, get postwoman, postwoman web, postwoman android, postwoman app for chrome, postwoman mobile app, postwoman web app, api, request, testing, tool, rest, websocket, sse, graphql"
+ "postwoman, postwoman chrome, postwoman online, postwoman for mac, postwoman app, postwoman for windows, postwoman google chrome, postwoman chrome app, get postwoman, postwoman web, postwoman android, postwoman app for chrome, postwoman mobile app, postwoman web app, api, request, testing, tool, rest, websocket, sse, graphql",
},
{
name: "X-UA-Compatible",
- content: "IE=edge, chrome=1"
+ content: "IE=edge, chrome=1",
},
{
itemprop: "name",
- content: `${meta.name} \u2022 ${meta.shortDescription}`
+ content: `${meta.name} \u2022 ${meta.shortDescription}`,
},
{
itemprop: "description",
- content: meta.description
+ content: meta.description,
},
{
itemprop: "image",
- content: `https://postwoman.io/logo.jpg`
+ content: `https://postwoman.io/logo.jpg`,
},
// Add to homescreen for Chrome on Android. Fallback for PWA (handled by nuxt)
{
name: "application-name",
- content: meta.name
+ content: meta.name,
},
// Add to homescreen for Safari on iOS
{
name: "apple-mobile-web-app-capable",
- content: "yes"
+ content: "yes",
},
{
name: "apple-mobile-web-app-status-bar-style",
- content: "black-translucent"
+ content: "black-translucent",
},
{
name: "apple-mobile-web-app-title",
- content: meta.name
+ content: meta.name,
},
// Windows phone tile icon
{
name: "msapplication-TileImage",
- content: `${routerBase.router.base}icons/icon-144x144.png`
+ content: `${routerBase.router.base}icons/icon-144x144.png`,
},
{
name: "msapplication-TileColor",
- content: "#202124"
+ content: "#202124",
},
{
name: "msapplication-tap-highlight",
- content: "no"
+ content: "no",
},
// OpenGraph
{
property: "og:site_name",
- content: meta.name
+ content: meta.name,
},
{
property: "og:url",
- content: "https://postwoman.io"
+ content: "https://postwoman.io",
},
{
property: "og:type",
- content: "website"
+ content: "website",
},
{
property: "og:title",
- content: `${meta.name} \u2022 ${meta.shortDescription}`
+ content: `${meta.name} \u2022 ${meta.shortDescription}`,
},
{
property: "og:description",
- content: meta.description
+ content: meta.description,
},
{
property: "og:image",
- content: `https://postwoman.io/logo.jpg`
+ content: `https://postwoman.io/logo.jpg`,
},
// Twitter
{
name: "twitter:card",
- content: "summary_large_image"
+ content: "summary_large_image",
},
{
name: "twitter:site",
- content: "@liyasthomas"
+ content: "@liyasthomas",
},
{
name: "twitter:creator",
- content: "@liyasthomas"
+ content: "@liyasthomas",
},
{
name: "twitter:url",
- content: "https://postwoman.io"
+ content: "https://postwoman.io",
},
{
name: "twitter:title",
- content: `${meta.name} \u2022 ${meta.shortDescription}`
+ content: `${meta.name} \u2022 ${meta.shortDescription}`,
},
{
name: "twitter:description",
- content: meta.description
+ content: meta.description,
},
{
name: "twitter:image",
- content: "https://postwoman.io/logo.jpg"
- }
+ content: "https://postwoman.io/logo.jpg",
+ },
],
link: [
{
rel: "icon",
type: "image/x-icon",
- href: `${routerBase.router.base}favicon.ico`
+ href: `${routerBase.router.base}favicon.ico`,
},
// Home-screen icons (iOS)
{
rel: "apple-touch-icon",
- href: `${routerBase.router.base}icons/icon-48x48.png`
+ href: `${routerBase.router.base}icons/icon-48x48.png`,
},
{
rel: "apple-touch-icon",
sizes: "72x72",
- href: `${routerBase.router.base}icons/icon-72x72.png`
+ href: `${routerBase.router.base}icons/icon-72x72.png`,
},
{
rel: "apple-touch-icon",
sizes: "96x96",
- href: `${routerBase.router.base}icons/icon-96x96.png`
+ href: `${routerBase.router.base}icons/icon-96x96.png`,
},
{
rel: "apple-touch-icon",
sizes: "144x144",
- href: `${routerBase.router.base}icons/icon-144x144.png`
+ href: `${routerBase.router.base}icons/icon-144x144.png`,
},
{
rel: "apple-touch-icon",
sizes: "192x192",
- href: `${routerBase.router.base}icons/icon-192x192.png`
- }
- ]
+ href: `${routerBase.router.base}icons/icon-192x192.png`,
+ },
+ ],
},
/*
** Customize the progress-bar color
*/
loading: {
- color: "var(--ac-color)"
+ color: "var(--ac-color)",
},
/*
** Customize the loading indicator
@@ -206,26 +206,22 @@ export default {
loadingIndicator: {
name: "pulse",
color: "var(--ac-color)",
- background: "var(--bg-color)"
+ background: "var(--bg-color)",
},
/*
** Global CSS
*/
- css: [
- "~/assets/css/styles.scss",
- "~/assets/css/themes.scss",
- "~/assets/css/fonts.scss"
- ],
+ css: ["~/assets/css/styles.scss", "~/assets/css/themes.scss", "~/assets/css/fonts.scss"],
/*
** Plugins to load before mounting the App
*/
plugins: [
{
- src: "~/plugins/vuex-persist"
+ src: "~/plugins/vuex-persist",
},
{
- src: "~/plugins/v-tooltip"
- }
+ src: "~/plugins/v-tooltip",
+ },
],
/*
** Nuxt.js dev-modules
@@ -244,11 +240,11 @@ export default {
[
"@nuxtjs/google-tag-manager",
{
- id: process.env.GTM_ID || "GTM-MXWD8NQ"
- }
+ id: process.env.GTM_ID || "GTM-MXWD8NQ",
+ },
],
["@nuxtjs/robots"],
- ["nuxt-i18n"]
+ ["nuxt-i18n"],
],
pwa: {
manifest: {
@@ -259,43 +255,43 @@ export default {
theme_color: "#202124",
background_color: "#202124",
- start_url: `${routerBase.router.base}`
+ start_url: `${routerBase.router.base}`,
},
meta: {
description: meta.shortDescription,
- theme_color: "#202124"
+ theme_color: "#202124",
},
icons: (sizes => {
- let icons = [];
+ let icons = []
for (let size of sizes) {
icons.push({
src: `${routerBase.router.base}icons/icon-${size}x${size}.png`,
type: "image/png",
- sizes: `${size}x${size}`
- });
+ sizes: `${size}x${size}`,
+ })
}
- return icons;
- })([48, 72, 96, 144, 192, 512])
+ return icons
+ })([48, 72, 96, 144, 192, 512]),
},
toast: {
position: "bottom-center",
duration: 3000,
theme: "bubble",
- keepOnHover: true
+ keepOnHover: true,
},
googleAnalytics: {
- id: process.env.GA_ID || "UA-61422507-2"
+ id: process.env.GA_ID || "UA-61422507-2",
},
sitemap: {
- hostname: "https://postwoman.io"
+ hostname: "https://postwoman.io",
},
robots: {
UserAgent: "*",
Disallow: "",
Allow: "/",
- Sitemap: "https://postwoman.io/sitemap.xml"
+ Sitemap: "https://postwoman.io/sitemap.xml",
},
i18n: {
locales: [
@@ -303,69 +299,75 @@ export default {
code: "en",
name: "English",
iso: "en-US",
- file: "en-US.js"
+ file: "en-US.js",
},
{
code: "es",
name: "Español",
iso: "es-ES",
- file: "es-ES.js"
+ file: "es-ES.js",
},
{
code: "fr",
name: "Français",
iso: "fr-FR",
- file: "fr-FR.js"
+ file: "fr-FR.js",
},
{
code: "fa",
name: "Farsi",
iso: "fa-IR",
- file: "fa-IR.js"
+ file: "fa-IR.js",
},
{
code: "pt",
name: "Português Brasileiro",
iso: "pt-BR",
- file: "pt-BR.js"
+ file: "pt-BR.js",
},
{
code: "cn",
name: "简体中文",
iso: "zh-CN",
- file: "zh-CN.js"
+ file: "zh-CN.js",
},
{
code: "id",
name: "Bahasa Indonesia",
iso: "id-ID",
- file: "id-ID.js"
+ file: "id-ID.js",
},
{
code: "tr",
name: "Türkçe",
iso: "tr-TR",
- file: "tr-TR.js"
+ file: "tr-TR.js",
},
{
code: "de",
name: "Deutsch",
iso: "de-DE",
- file: "de-DE.js"
+ file: "de-DE.js",
},
{
code: "ja",
name: "日本語",
iso: "ja-JP",
file: "ja-JP.js"
+ },
+ {
+ code: "ko",
+ name: "한국어",
+ iso: "ko-KR",
+ file: "ko-KR.js"
}
],
defaultLocale: "en",
vueI18n: {
- fallbackLocale: "en"
+ fallbackLocale: "en",
},
lazy: true,
- langDir: "lang/"
+ langDir: "lang/",
},
/*
** Build configuration
@@ -374,16 +376,16 @@ export default {
/*
** You can extend webpack config here
*/
- extend(config, ctx) {}
+ extend(config, ctx) {},
},
/*
** Generate configuration
*/
generate: {
- fallback: true
+ fallback: true,
},
/*
** Router configuration
*/
- ...routerBase
-};
+ ...routerBase,
+}
diff --git a/package-lock.json b/package-lock.json
index 85bbc7eaa..8733be693 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,6 +1,6 @@
{
"name": "postwoman",
- "version": "1.8.0",
+ "version": "1.9.0",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
@@ -1860,11 +1860,23 @@
"resolved": "https://registry.npmjs.org/@types/long/-/long-4.0.1.tgz",
"integrity": "sha512-5tXH6Bx/kNGd3MgffdmP4dy2Z+G4eaXw0SE81Tq3BNadtnMR5/ySMzX4SLEzHJzSmPNn4HIdpQsBvXMUykr58w=="
},
+ "@types/minimatch": {
+ "version": "3.0.3",
+ "resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-3.0.3.tgz",
+ "integrity": "sha512-tHq6qdbT9U1IRSGf14CL0pUlULksvY9OZ+5eEgl1N7t+OA3tGvNpxJCzuKQlsNgCVwbAs670L1vcVQi8j9HjnA==",
+ "dev": true
+ },
"@types/node": {
"version": "12.12.17",
"resolved": "https://registry.npmjs.org/@types/node/-/node-12.12.17.tgz",
"integrity": "sha512-Is+l3mcHvs47sKy+afn2O1rV4ldZFU7W8101cNlOd+MRbjM4Onida8jSZnJdTe/0Pcf25g9BNIUsuugmE6puHA=="
},
+ "@types/parse-json": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/@types/parse-json/-/parse-json-4.0.0.tgz",
+ "integrity": "sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA==",
+ "dev": true
+ },
"@types/q": {
"version": "1.5.2",
"resolved": "https://registry.npmjs.org/@types/q/-/q-1.5.2.tgz",
@@ -2378,6 +2390,12 @@
"resolved": "https://registry.npmjs.org/arr-union/-/arr-union-3.1.0.tgz",
"integrity": "sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ="
},
+ "array-differ": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/array-differ/-/array-differ-3.0.0.tgz",
+ "integrity": "sha512-THtfYS6KtME/yIAhKjZ2ul7XI96lQGHRputJQHO80LAWQnuGP4iCIN8vdMRboGbIEYBwU33q8Tch1os2+X0kMg==",
+ "dev": true
+ },
"array-find-index": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/array-find-index/-/array-find-index-1.0.2.tgz",
@@ -2389,11 +2407,23 @@
"resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz",
"integrity": "sha1-ml9pkFGx5wczKPKgCJaLZOopVdI="
},
+ "array-union": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz",
+ "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==",
+ "dev": true
+ },
"array-unique": {
"version": "0.3.2",
"resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz",
"integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg="
},
+ "arrify": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/arrify/-/arrify-2.0.1.tgz",
+ "integrity": "sha512-3duEwti880xqi4eAMN8AyR4a0ByT90zoYdLlevfrvU43vb0YZwZVfxOgxWrLXXXpyugL0hNZc9G6BiB5B3nUug==",
+ "dev": true
+ },
"ascli": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/ascli/-/ascli-1.0.1.tgz",
@@ -3565,6 +3595,12 @@
"resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz",
"integrity": "sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs="
},
+ "compare-versions": {
+ "version": "3.6.0",
+ "resolved": "https://registry.npmjs.org/compare-versions/-/compare-versions-3.6.0.tgz",
+ "integrity": "sha512-W6Af2Iw1z4CB7q4uU4hv646dW9GQuBM+YpC0UvUCWSD8w90SJjp+ujJuXaEMtAXBtSqGfMPuFOVn4/+FlaqfBA==",
+ "dev": true
+ },
"component-emitter": {
"version": "1.3.0",
"resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.3.0.tgz",
@@ -4293,6 +4329,12 @@
"resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz",
"integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU="
},
+ "dedent": {
+ "version": "0.7.0",
+ "resolved": "https://registry.npmjs.org/dedent/-/dedent-0.7.0.tgz",
+ "integrity": "sha1-JJXduvbrh0q7Dhvp3yLS5aVEMmw=",
+ "dev": true
+ },
"deepmerge": {
"version": "4.2.2",
"resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.2.2.tgz",
@@ -5214,6 +5256,15 @@
"locate-path": "^3.0.0"
}
},
+ "find-versions": {
+ "version": "3.2.0",
+ "resolved": "https://registry.npmjs.org/find-versions/-/find-versions-3.2.0.tgz",
+ "integrity": "sha512-P8WRou2S+oe222TOCHitLy8zj+SIsVJh52VP4lvXkaFVnOFFdoWv1H1Jjvel1aI6NCFOAaeAVm8qrI0odiLcww==",
+ "dev": true,
+ "requires": {
+ "semver-regex": "^2.0.0"
+ }
+ },
"firebase": {
"version": "7.9.1",
"resolved": "https://registry.npmjs.org/firebase/-/firebase-7.9.1.tgz",
@@ -5514,6 +5565,12 @@
"integrity": "sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w==",
"dev": true
},
+ "get-own-enumerable-property-symbols": {
+ "version": "3.0.2",
+ "resolved": "https://registry.npmjs.org/get-own-enumerable-property-symbols/-/get-own-enumerable-property-symbols-3.0.2.tgz",
+ "integrity": "sha512-I0UBV/XOz1XkIJHEUDMZAbzCThU/H8DxmSfmdGcKPnVhu2VfFqr34jr9777IyaTYvxjedWhqVIilEDsCdP5G6g==",
+ "dev": true
+ },
"get-stdin": {
"version": "4.0.1",
"resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-4.0.1.tgz",
@@ -6519,6 +6576,132 @@
"resolved": "https://registry.npmjs.org/human-signals/-/human-signals-1.1.1.tgz",
"integrity": "sha512-SEQu7vl8KjNL2eoGBLF3+wAjpsNfA9XMlXAYj/3EdaNfAlxKthD1xjEQfGOUhllCGGJVNY34bRr6lPINhNjyZw=="
},
+ "husky": {
+ "version": "4.2.3",
+ "resolved": "https://registry.npmjs.org/husky/-/husky-4.2.3.tgz",
+ "integrity": "sha512-VxTsSTRwYveKXN4SaH1/FefRJYCtx+wx04sSVcOpD7N2zjoHxa+cEJ07Qg5NmV3HAK+IRKOyNVpi2YBIVccIfQ==",
+ "dev": true,
+ "requires": {
+ "chalk": "^3.0.0",
+ "ci-info": "^2.0.0",
+ "compare-versions": "^3.5.1",
+ "cosmiconfig": "^6.0.0",
+ "find-versions": "^3.2.0",
+ "opencollective-postinstall": "^2.0.2",
+ "pkg-dir": "^4.2.0",
+ "please-upgrade-node": "^3.2.0",
+ "slash": "^3.0.0",
+ "which-pm-runs": "^1.0.0"
+ },
+ "dependencies": {
+ "chalk": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-3.0.0.tgz",
+ "integrity": "sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==",
+ "dev": true,
+ "requires": {
+ "ansi-styles": "^4.1.0",
+ "supports-color": "^7.1.0"
+ }
+ },
+ "ci-info": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-2.0.0.tgz",
+ "integrity": "sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ==",
+ "dev": true
+ },
+ "cosmiconfig": {
+ "version": "6.0.0",
+ "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-6.0.0.tgz",
+ "integrity": "sha512-xb3ZL6+L8b9JLLCx3ZdoZy4+2ECphCMo2PwqgP1tlfVq6M6YReyzBJtvWWtbDSpNr9hn96pkCiZqUcFEc+54Qg==",
+ "dev": true,
+ "requires": {
+ "@types/parse-json": "^4.0.0",
+ "import-fresh": "^3.1.0",
+ "parse-json": "^5.0.0",
+ "path-type": "^4.0.0",
+ "yaml": "^1.7.2"
+ }
+ },
+ "find-up": {
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz",
+ "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==",
+ "dev": true,
+ "requires": {
+ "locate-path": "^5.0.0",
+ "path-exists": "^4.0.0"
+ }
+ },
+ "import-fresh": {
+ "version": "3.2.1",
+ "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.2.1.tgz",
+ "integrity": "sha512-6e1q1cnWP2RXD9/keSkxHScg508CdXqXWgWBaETNhyuBFz+kUZlKboh+ISK+bU++DmbHimVBrOz/zzPe0sZ3sQ==",
+ "dev": true,
+ "requires": {
+ "parent-module": "^1.0.0",
+ "resolve-from": "^4.0.0"
+ }
+ },
+ "locate-path": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz",
+ "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==",
+ "dev": true,
+ "requires": {
+ "p-locate": "^4.1.0"
+ }
+ },
+ "p-locate": {
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz",
+ "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==",
+ "dev": true,
+ "requires": {
+ "p-limit": "^2.2.0"
+ }
+ },
+ "parse-json": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.0.0.tgz",
+ "integrity": "sha512-OOY5b7PAEFV0E2Fir1KOkxchnZNCdowAJgQ5NuxjpBKTRP3pQhwkrkxqQjeoKJ+fO7bCpmIZaogI4eZGDMEGOw==",
+ "dev": true,
+ "requires": {
+ "@babel/code-frame": "^7.0.0",
+ "error-ex": "^1.3.1",
+ "json-parse-better-errors": "^1.0.1",
+ "lines-and-columns": "^1.1.6"
+ }
+ },
+ "path-exists": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz",
+ "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==",
+ "dev": true
+ },
+ "path-type": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz",
+ "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==",
+ "dev": true
+ },
+ "pkg-dir": {
+ "version": "4.2.0",
+ "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz",
+ "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==",
+ "dev": true,
+ "requires": {
+ "find-up": "^4.0.0"
+ }
+ },
+ "resolve-from": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz",
+ "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==",
+ "dev": true
+ }
+ }
+ },
"iconv-lite": {
"version": "0.4.24",
"resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz",
@@ -6884,6 +7067,12 @@
"has": "^1.0.3"
}
},
+ "is-regexp": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/is-regexp/-/is-regexp-1.0.0.tgz",
+ "integrity": "sha1-/S2INUXEa6xaYz57mgnof6LLUGk=",
+ "dev": true
+ },
"is-resolvable": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/is-resolvable/-/is-resolvable-1.1.0.tgz",
@@ -7148,6 +7337,239 @@
"invert-kv": "^1.0.0"
}
},
+ "lines-and-columns": {
+ "version": "1.1.6",
+ "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.1.6.tgz",
+ "integrity": "sha1-HADHQ7QzzQpOgHWPe2SldEDZ/wA=",
+ "dev": true
+ },
+ "lint-staged": {
+ "version": "10.0.8",
+ "resolved": "https://registry.npmjs.org/lint-staged/-/lint-staged-10.0.8.tgz",
+ "integrity": "sha512-Oa9eS4DJqvQMVdywXfEor6F4vP+21fPHF8LUXgBbVWUSWBddjqsvO6Bv1LwMChmgQZZqwUvgJSHlu8HFHAPZmA==",
+ "dev": true,
+ "requires": {
+ "chalk": "^3.0.0",
+ "commander": "^4.0.1",
+ "cosmiconfig": "^6.0.0",
+ "debug": "^4.1.1",
+ "dedent": "^0.7.0",
+ "execa": "^3.4.0",
+ "listr": "^0.14.3",
+ "log-symbols": "^3.0.0",
+ "micromatch": "^4.0.2",
+ "normalize-path": "^3.0.0",
+ "please-upgrade-node": "^3.2.0",
+ "string-argv": "0.3.1",
+ "stringify-object": "^3.3.0"
+ },
+ "dependencies": {
+ "braces": {
+ "version": "3.0.2",
+ "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz",
+ "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==",
+ "dev": true,
+ "requires": {
+ "fill-range": "^7.0.1"
+ }
+ },
+ "chalk": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-3.0.0.tgz",
+ "integrity": "sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==",
+ "dev": true,
+ "requires": {
+ "ansi-styles": "^4.1.0",
+ "supports-color": "^7.1.0"
+ }
+ },
+ "commander": {
+ "version": "4.1.1",
+ "resolved": "https://registry.npmjs.org/commander/-/commander-4.1.1.tgz",
+ "integrity": "sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==",
+ "dev": true
+ },
+ "cosmiconfig": {
+ "version": "6.0.0",
+ "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-6.0.0.tgz",
+ "integrity": "sha512-xb3ZL6+L8b9JLLCx3ZdoZy4+2ECphCMo2PwqgP1tlfVq6M6YReyzBJtvWWtbDSpNr9hn96pkCiZqUcFEc+54Qg==",
+ "dev": true,
+ "requires": {
+ "@types/parse-json": "^4.0.0",
+ "import-fresh": "^3.1.0",
+ "parse-json": "^5.0.0",
+ "path-type": "^4.0.0",
+ "yaml": "^1.7.2"
+ }
+ },
+ "cross-spawn": {
+ "version": "7.0.1",
+ "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.1.tgz",
+ "integrity": "sha512-u7v4o84SwFpD32Z8IIcPZ6z1/ie24O6RU3RbtL5Y316l3KuHVPx9ItBgWQ6VlfAFnRnTtMUrsQ9MUUTuEZjogg==",
+ "dev": true,
+ "requires": {
+ "path-key": "^3.1.0",
+ "shebang-command": "^2.0.0",
+ "which": "^2.0.1"
+ }
+ },
+ "debug": {
+ "version": "4.1.1",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz",
+ "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==",
+ "dev": true,
+ "requires": {
+ "ms": "^2.1.1"
+ }
+ },
+ "execa": {
+ "version": "3.4.0",
+ "resolved": "https://registry.npmjs.org/execa/-/execa-3.4.0.tgz",
+ "integrity": "sha512-r9vdGQk4bmCuK1yKQu1KTwcT2zwfWdbdaXfCtAh+5nU/4fSX+JAb7vZGvI5naJrQlvONrEB20jeruESI69530g==",
+ "dev": true,
+ "requires": {
+ "cross-spawn": "^7.0.0",
+ "get-stream": "^5.0.0",
+ "human-signals": "^1.1.1",
+ "is-stream": "^2.0.0",
+ "merge-stream": "^2.0.0",
+ "npm-run-path": "^4.0.0",
+ "onetime": "^5.1.0",
+ "p-finally": "^2.0.0",
+ "signal-exit": "^3.0.2",
+ "strip-final-newline": "^2.0.0"
+ }
+ },
+ "fill-range": {
+ "version": "7.0.1",
+ "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz",
+ "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==",
+ "dev": true,
+ "requires": {
+ "to-regex-range": "^5.0.1"
+ }
+ },
+ "get-stream": {
+ "version": "5.1.0",
+ "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.1.0.tgz",
+ "integrity": "sha512-EXr1FOzrzTfGeL0gQdeFEvOMm2mzMOglyiOXSTpPC+iAjAKftbr3jpCMWynogwYnM+eSj9sHGc6wjIcDvYiygw==",
+ "dev": true,
+ "requires": {
+ "pump": "^3.0.0"
+ }
+ },
+ "import-fresh": {
+ "version": "3.2.1",
+ "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.2.1.tgz",
+ "integrity": "sha512-6e1q1cnWP2RXD9/keSkxHScg508CdXqXWgWBaETNhyuBFz+kUZlKboh+ISK+bU++DmbHimVBrOz/zzPe0sZ3sQ==",
+ "dev": true,
+ "requires": {
+ "parent-module": "^1.0.0",
+ "resolve-from": "^4.0.0"
+ }
+ },
+ "is-number": {
+ "version": "7.0.0",
+ "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz",
+ "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==",
+ "dev": true
+ },
+ "is-stream": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.0.tgz",
+ "integrity": "sha512-XCoy+WlUr7d1+Z8GgSuXmpuUFC9fOhRXglJMx+dwLKTkL44Cjd4W1Z5P+BQZpr+cR93aGP4S/s7Ftw6Nd/kiEw==",
+ "dev": true
+ },
+ "micromatch": {
+ "version": "4.0.2",
+ "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.2.tgz",
+ "integrity": "sha512-y7FpHSbMUMoyPbYUSzO6PaZ6FyRnQOpHuKwbo1G+Knck95XVU4QAiKdGEnj5wwoS7PlOgthX/09u5iFJ+aYf5Q==",
+ "dev": true,
+ "requires": {
+ "braces": "^3.0.1",
+ "picomatch": "^2.0.5"
+ }
+ },
+ "npm-run-path": {
+ "version": "4.0.1",
+ "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz",
+ "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==",
+ "dev": true,
+ "requires": {
+ "path-key": "^3.0.0"
+ }
+ },
+ "p-finally": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-2.0.1.tgz",
+ "integrity": "sha512-vpm09aKwq6H9phqRQzecoDpD8TmVyGw70qmWlyq5onxY7tqyTTFVvxMykxQSQKILBSFlbXpypIw2T1Ml7+DDtw==",
+ "dev": true
+ },
+ "parse-json": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.0.0.tgz",
+ "integrity": "sha512-OOY5b7PAEFV0E2Fir1KOkxchnZNCdowAJgQ5NuxjpBKTRP3pQhwkrkxqQjeoKJ+fO7bCpmIZaogI4eZGDMEGOw==",
+ "dev": true,
+ "requires": {
+ "@babel/code-frame": "^7.0.0",
+ "error-ex": "^1.3.1",
+ "json-parse-better-errors": "^1.0.1",
+ "lines-and-columns": "^1.1.6"
+ }
+ },
+ "path-key": {
+ "version": "3.1.1",
+ "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz",
+ "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==",
+ "dev": true
+ },
+ "path-type": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz",
+ "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==",
+ "dev": true
+ },
+ "resolve-from": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz",
+ "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==",
+ "dev": true
+ },
+ "shebang-command": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz",
+ "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==",
+ "dev": true,
+ "requires": {
+ "shebang-regex": "^3.0.0"
+ }
+ },
+ "shebang-regex": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz",
+ "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==",
+ "dev": true
+ },
+ "to-regex-range": {
+ "version": "5.0.1",
+ "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz",
+ "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==",
+ "dev": true,
+ "requires": {
+ "is-number": "^7.0.0"
+ }
+ },
+ "which": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz",
+ "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==",
+ "dev": true,
+ "requires": {
+ "isexe": "^2.0.0"
+ }
+ }
+ }
+ },
"listr": {
"version": "0.14.3",
"resolved": "https://registry.npmjs.org/listr/-/listr-0.14.3.tgz",
@@ -7914,11 +8336,30 @@
"run-queue": "^1.0.3"
}
},
+ "mri": {
+ "version": "1.1.4",
+ "resolved": "https://registry.npmjs.org/mri/-/mri-1.1.4.tgz",
+ "integrity": "sha512-6y7IjGPm8AzlvoUrwAaw1tLnUBudaS3752vcd8JtrpGGQn+rXIe63LFVHm/YMwtqAuh+LJPCFdlLYPWM1nYn6w==",
+ "dev": true
+ },
"ms": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
"integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w=="
},
+ "multimatch": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/multimatch/-/multimatch-4.0.0.tgz",
+ "integrity": "sha512-lDmx79y1z6i7RNx0ZGCPq1bzJ6ZoDDKbvh7jxr9SJcWLkShMzXrHbYVpTdnhNM5MXpDUxCQ4DgqVttVXlBgiBQ==",
+ "dev": true,
+ "requires": {
+ "@types/minimatch": "^3.0.3",
+ "array-differ": "^3.0.0",
+ "array-union": "^2.1.0",
+ "arrify": "^2.0.1",
+ "minimatch": "^3.0.4"
+ }
+ },
"mustache": {
"version": "2.3.2",
"resolved": "https://registry.npmjs.org/mustache/-/mustache-2.3.2.tgz",
@@ -8408,6 +8849,12 @@
"mimic-fn": "^2.1.0"
}
},
+ "opencollective-postinstall": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/opencollective-postinstall/-/opencollective-postinstall-2.0.2.tgz",
+ "integrity": "sha512-pVOEP16TrAO2/fjej1IdOyupJY8KDUM1CvsaScRbw6oddvpQoOfGk4ywha0HKKVAD6RkW4x6Q+tNBwhf3Bgpuw==",
+ "dev": true
+ },
"opener": {
"version": "1.5.1",
"resolved": "https://registry.npmjs.org/opener/-/opener-1.5.1.tgz",
@@ -8543,6 +8990,23 @@
"no-case": "^2.2.0"
}
},
+ "parent-module": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz",
+ "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==",
+ "dev": true,
+ "requires": {
+ "callsites": "^3.0.0"
+ },
+ "dependencies": {
+ "callsites": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz",
+ "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==",
+ "dev": true
+ }
+ }
+ },
"parse-asn1": {
"version": "5.1.5",
"resolved": "https://registry.npmjs.org/parse-asn1/-/parse-asn1-5.1.5.tgz",
@@ -8701,6 +9165,15 @@
"find-up": "^3.0.0"
}
},
+ "please-upgrade-node": {
+ "version": "3.2.0",
+ "resolved": "https://registry.npmjs.org/please-upgrade-node/-/please-upgrade-node-3.2.0.tgz",
+ "integrity": "sha512-gQR3WpIgNIKwBMVLkpMUeR3e1/E1y42bqDQZfql+kDeXd8COYfM8PQA4X6y7a8u9Ua9FHmsrrmirW2vHs45hWg==",
+ "dev": true,
+ "requires": {
+ "semver-compare": "^1.0.0"
+ }
+ },
"popper.js": {
"version": "1.16.1",
"resolved": "https://registry.npmjs.org/popper.js/-/popper.js-1.16.1.tgz",
@@ -9709,6 +10182,144 @@
"utila": "~0.4"
}
},
+ "pretty-quick": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/pretty-quick/-/pretty-quick-2.0.1.tgz",
+ "integrity": "sha512-y7bJt77XadjUr+P1uKqZxFWLddvj3SKY6EU4BuQtMxmmEFSMpbN132pUWdSG1g1mtUfO0noBvn7wBf0BVeomHg==",
+ "dev": true,
+ "requires": {
+ "chalk": "^2.4.2",
+ "execa": "^2.1.0",
+ "find-up": "^4.1.0",
+ "ignore": "^5.1.4",
+ "mri": "^1.1.4",
+ "multimatch": "^4.0.0"
+ },
+ "dependencies": {
+ "cross-spawn": {
+ "version": "7.0.1",
+ "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.1.tgz",
+ "integrity": "sha512-u7v4o84SwFpD32Z8IIcPZ6z1/ie24O6RU3RbtL5Y316l3KuHVPx9ItBgWQ6VlfAFnRnTtMUrsQ9MUUTuEZjogg==",
+ "dev": true,
+ "requires": {
+ "path-key": "^3.1.0",
+ "shebang-command": "^2.0.0",
+ "which": "^2.0.1"
+ }
+ },
+ "execa": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/execa/-/execa-2.1.0.tgz",
+ "integrity": "sha512-Y/URAVapfbYy2Xp/gb6A0E7iR8xeqOCXsuuaoMn7A5PzrXUK84E1gyiEfq0wQd/GHA6GsoHWwhNq8anb0mleIw==",
+ "dev": true,
+ "requires": {
+ "cross-spawn": "^7.0.0",
+ "get-stream": "^5.0.0",
+ "is-stream": "^2.0.0",
+ "merge-stream": "^2.0.0",
+ "npm-run-path": "^3.0.0",
+ "onetime": "^5.1.0",
+ "p-finally": "^2.0.0",
+ "signal-exit": "^3.0.2",
+ "strip-final-newline": "^2.0.0"
+ }
+ },
+ "find-up": {
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz",
+ "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==",
+ "dev": true,
+ "requires": {
+ "locate-path": "^5.0.0",
+ "path-exists": "^4.0.0"
+ }
+ },
+ "get-stream": {
+ "version": "5.1.0",
+ "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.1.0.tgz",
+ "integrity": "sha512-EXr1FOzrzTfGeL0gQdeFEvOMm2mzMOglyiOXSTpPC+iAjAKftbr3jpCMWynogwYnM+eSj9sHGc6wjIcDvYiygw==",
+ "dev": true,
+ "requires": {
+ "pump": "^3.0.0"
+ }
+ },
+ "is-stream": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.0.tgz",
+ "integrity": "sha512-XCoy+WlUr7d1+Z8GgSuXmpuUFC9fOhRXglJMx+dwLKTkL44Cjd4W1Z5P+BQZpr+cR93aGP4S/s7Ftw6Nd/kiEw==",
+ "dev": true
+ },
+ "locate-path": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz",
+ "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==",
+ "dev": true,
+ "requires": {
+ "p-locate": "^4.1.0"
+ }
+ },
+ "npm-run-path": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-3.1.0.tgz",
+ "integrity": "sha512-Dbl4A/VfiVGLgQv29URL9xshU8XDY1GeLy+fsaZ1AA8JDSfjvr5P5+pzRbWqRSBxk6/DW7MIh8lTM/PaGnP2kg==",
+ "dev": true,
+ "requires": {
+ "path-key": "^3.0.0"
+ }
+ },
+ "p-finally": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-2.0.1.tgz",
+ "integrity": "sha512-vpm09aKwq6H9phqRQzecoDpD8TmVyGw70qmWlyq5onxY7tqyTTFVvxMykxQSQKILBSFlbXpypIw2T1Ml7+DDtw==",
+ "dev": true
+ },
+ "p-locate": {
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz",
+ "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==",
+ "dev": true,
+ "requires": {
+ "p-limit": "^2.2.0"
+ }
+ },
+ "path-exists": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz",
+ "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==",
+ "dev": true
+ },
+ "path-key": {
+ "version": "3.1.1",
+ "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz",
+ "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==",
+ "dev": true
+ },
+ "shebang-command": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz",
+ "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==",
+ "dev": true,
+ "requires": {
+ "shebang-regex": "^3.0.0"
+ }
+ },
+ "shebang-regex": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz",
+ "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==",
+ "dev": true
+ },
+ "which": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz",
+ "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==",
+ "dev": true,
+ "requires": {
+ "isexe": "^2.0.0"
+ }
+ }
+ }
+ },
"pretty-time": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/pretty-time/-/pretty-time-1.1.0.tgz",
@@ -10463,6 +11074,18 @@
"resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz",
"integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ=="
},
+ "semver-compare": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/semver-compare/-/semver-compare-1.0.0.tgz",
+ "integrity": "sha1-De4hahyUGrN+nvsXiPavxf9VN/w=",
+ "dev": true
+ },
+ "semver-regex": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/semver-regex/-/semver-regex-2.0.0.tgz",
+ "integrity": "sha512-mUdIBBvdn0PLOeP3TEkMH7HHeUP3GjsXCwKarjv/kGmUFOYg1VqEemKhoQpWMu6X2I8kHeuVdGibLGkVK+/5Qw==",
+ "dev": true
+ },
"send": {
"version": "0.17.1",
"resolved": "https://registry.npmjs.org/send/-/send-0.17.1.tgz",
@@ -10646,6 +11269,12 @@
"xmlbuilder": "^13.0.0"
}
},
+ "slash": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz",
+ "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==",
+ "dev": true
+ },
"slice-ansi": {
"version": "0.0.4",
"resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-0.0.4.tgz",
@@ -11192,6 +11821,12 @@
"resolved": "https://registry.npmjs.org/strict-uri-encode/-/strict-uri-encode-1.1.0.tgz",
"integrity": "sha1-J5siXfHVgrH1TmWt3UNS4Y+qBxM="
},
+ "string-argv": {
+ "version": "0.3.1",
+ "resolved": "https://registry.npmjs.org/string-argv/-/string-argv-0.3.1.tgz",
+ "integrity": "sha512-a1uQGz7IyVy9YwhqjZIZu1c8JO8dNIe20xBmSS6qu9kv++k3JGzCVmprbNN5Kn+BgzD5E7YYwg1CcjuJMRNsvg==",
+ "dev": true
+ },
"string-width": {
"version": "4.2.0",
"resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.0.tgz",
@@ -11260,6 +11895,17 @@
}
}
},
+ "stringify-object": {
+ "version": "3.3.0",
+ "resolved": "https://registry.npmjs.org/stringify-object/-/stringify-object-3.3.0.tgz",
+ "integrity": "sha512-rHqiFh1elqCQ9WPLIC8I0Q/g/wj5J1eMkyoiD6eoQApWHP0FtlK7rqnhmabL5VUY9JQCcqwwvlOaSuutekgyrw==",
+ "dev": true,
+ "requires": {
+ "get-own-enumerable-property-symbols": "^3.0.0",
+ "is-obj": "^1.0.1",
+ "is-regexp": "^1.0.0"
+ }
+ },
"strip-ansi": {
"version": "5.2.0",
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz",
@@ -13101,6 +13747,12 @@
"integrity": "sha1-u6Y8qGGUiZT/MHc2CJ47lgJsKk8=",
"dev": true
},
+ "which-pm-runs": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/which-pm-runs/-/which-pm-runs-1.0.0.tgz",
+ "integrity": "sha1-Zws6+8VS4LVd9rd4DKdGFfI60cs=",
+ "dev": true
+ },
"wide-align": {
"version": "1.1.3",
"resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.3.tgz",
@@ -13280,6 +13932,15 @@
"resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz",
"integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI="
},
+ "yaml": {
+ "version": "1.7.2",
+ "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.7.2.tgz",
+ "integrity": "sha512-qXROVp90sb83XtAoqE8bP9RwAkTTZbugRUTm5YeFCBfNRPEp2YzTeqWiz7m5OORHzEvrA/qcGS8hp/E+MMROYw==",
+ "dev": true,
+ "requires": {
+ "@babel/runtime": "^7.6.3"
+ }
+ },
"yargs": {
"version": "7.1.0",
"resolved": "https://registry.npmjs.org/yargs/-/yargs-7.1.0.tgz",
diff --git a/package.json b/package.json
index 9c7f98ec0..8e7e2baec 100644
--- a/package.json
+++ b/package.json
@@ -1,47 +1,63 @@
{
- "name": "postwoman",
- "version": "1.9.0",
- "description": "A free, fast and beautiful API request builder",
- "author": "liyasthomas",
- "private": true,
- "scripts": {
- "predev": "node build.js --dev",
- "dev": "nuxt",
- "prebuild": "node build.js",
- "build": "nuxt build",
- "start": "nuxt start",
- "pregenerate": "node build.js",
- "generate": "nuxt generate",
- "e2e": "cypress run",
- "e2e:open": "cypress open",
- "dev:e2e": "server-test dev :3000 e2e:open",
- "test": "start-server-and-test start http-get://localhost:3000 e2e"
- },
- "dependencies": {
- "@nuxtjs/axios": "^5.9.5",
- "@nuxtjs/google-analytics": "^2.2.3",
- "@nuxtjs/google-tag-manager": "^2.3.1",
- "@nuxtjs/pwa": "^3.0.0-beta.20",
- "@nuxtjs/robots": "^2.4.2",
- "@nuxtjs/sitemap": "^2.0.1",
- "@nuxtjs/toast": "^3.3.0",
- "ace-builds": "^1.4.8",
- "firebase": "^7.9.1",
- "graphql": "^14.6.0",
- "graphql-language-service-interface": "^2.3.3",
- "nuxt": "^2.11.0",
- "nuxt-i18n": "^6.5.0",
- "v-tooltip": "^2.0.3",
- "vue-virtual-scroll-list": "^1.4.6",
- "vuefire": "^2.2.1",
- "vuejs-auto-complete": "^0.9.0",
- "vuex-persist": "^2.2.0",
- "yargs-parser": "^17.0.0"
- },
- "devDependencies": {
- "cypress": "^4.0.2",
- "node-sass": "^4.13.1",
- "sass-loader": "^8.0.2",
- "start-server-and-test": "^1.10.8"
+ "name": "postwoman",
+ "version": "1.9.0",
+ "description": "A free, fast and beautiful API request builder",
+ "author": "liyasthomas",
+ "private": true,
+ "scripts": {
+ "predev": "node build.js --dev",
+ "dev": "nuxt",
+ "prebuild": "node build.js",
+ "build": "nuxt build",
+ "start": "nuxt start",
+ "pregenerate": "node build.js",
+ "generate": "nuxt generate",
+ "e2e": "cypress run",
+ "e2e:open": "cypress open",
+ "dev:e2e": "server-test dev :3000 e2e:open",
+ "pretty-quick": "pretty-quick --pattern \"**/*.*(html|js|json|vue)\"",
+ "test": "start-server-and-test start http-get://localhost:3000 e2e"
+ },
+ "husky": {
+ "hooks": {
+ "pre-commit": "npm run pretty-quick"
}
+ },
+ "prettier": {
+ "trailingComma": "es5",
+ "semi": false,
+ "singleQuote": false,
+ "printWidth": 100
+ },
+ "dependencies": {
+ "@nuxtjs/axios": "^5.9.5",
+ "@nuxtjs/google-analytics": "^2.2.3",
+ "@nuxtjs/google-tag-manager": "^2.3.1",
+ "@nuxtjs/pwa": "^3.0.0-beta.20",
+ "@nuxtjs/robots": "^2.4.2",
+ "@nuxtjs/sitemap": "^2.0.1",
+ "@nuxtjs/toast": "^3.3.0",
+ "ace-builds": "^1.4.8",
+ "firebase": "^7.9.1",
+ "graphql": "^14.6.0",
+ "graphql-language-service-interface": "^2.3.3",
+ "nuxt": "^2.11.0",
+ "nuxt-i18n": "^6.5.0",
+ "v-tooltip": "^2.0.3",
+ "vue-virtual-scroll-list": "^1.4.6",
+ "vuefire": "^2.2.1",
+ "vuejs-auto-complete": "^0.9.0",
+ "vuex-persist": "^2.2.0",
+ "yargs-parser": "^17.0.0"
+ },
+ "devDependencies": {
+ "cypress": "^4.0.2",
+ "husky": "^4.2.3",
+ "lint-staged": "^10.0.8",
+ "node-sass": "^4.13.1",
+ "prettier": "^1.19.1",
+ "pretty-quick": "^2.0.1",
+ "sass-loader": "^8.0.2",
+ "start-server-and-test": "^1.10.8"
+ }
}
diff --git a/pages/doc.vue b/pages/doc.vue
index 07dabf4de..ac6f0d499 100644
--- a/pages/doc.vue
+++ b/pages/doc.vue
@@ -11,11 +11,7 @@
-
@@ -59,29 +55,17 @@
{{ $t("generate_docs_first") }}
-
+
folder
{{ collection.name || $t("none") }}
-
+
folder_open
{{ folder.name || $t("none") }}
-
+
insert_drive_file
{{ request.name || $t("none") }}
@@ -129,11 +113,7 @@
{{ $t("headers") }}
-
+
{{ header.key || $t("none") }}:
{{ header.value || $t("none") }}
@@ -142,11 +122,7 @@
{{ $t("parameters") }}
-
+
{{ parameter.key || $t("none") }}:
{{ parameter.value || $t("none") }}
@@ -155,11 +131,7 @@
{{ $t("payload") }}
-
+
{{ payload.key || $t("none") }}:
{{ payload.value || $t("none") }}
@@ -237,11 +209,7 @@
{{ $t("headers") }}
-
+
{{ header.key || $t("none") }}:
{{ header.value || $t("none") }}
@@ -250,11 +218,7 @@
{{ $t("parameters") }}
-
+
{{ parameter.key || $t("none") }}:
{{ parameter.value || $t("none") }}
@@ -263,11 +227,7 @@
{{ $t("payload") }}
-
+
{{ payload.key || $t("none") }}:
{{ payload.value || $t("none") }}
@@ -342,53 +302,53 @@
diff --git a/pages/graphql.vue b/pages/graphql.vue
index fee7f8a17..290c4972b 100644
--- a/pages/graphql.vue
+++ b/pages/graphql.vue
@@ -10,6 +10,7 @@
id="url"
type="url"
v-model="url"
+ spellcheck="false"
@keyup.enter="getSchema()"
/>
@@ -31,11 +32,7 @@
-
+
clear_all
@@ -60,7 +57,7 @@
@input="
$store.commit('setGQLHeaderKey', {
index,
- value: $event
+ value: $event,
})
"
autofocus
@@ -74,7 +71,7 @@
@change="
$store.commit('setGQLHeaderValue', {
index,
- value: $event.target.value
+ value: $event.target.value,
})
"
autofocus
@@ -112,9 +109,7 @@
@click="ToggleExpandResponse"
ref="ToggleExpandResponse"
v-tooltip="{
- content: !expandResponse
- ? $t('expand_response')
- : $t('collapse_response')
+ content: !expandResponse ? $t('expand_response') : $t('collapse_response'),
}"
>
@@ -140,7 +135,7 @@
-
+
-
+
play_arrow
@@ -199,7 +190,7 @@
fontSize: '16px',
autoScrollEditorIntoView: true,
showPrintMargin: false,
- useWorker: false
+ useWorker: false,
}"
/>
@@ -219,8 +210,9 @@
@@ -248,10 +240,7 @@
@@ -267,10 +256,7 @@
@@ -286,10 +272,7 @@
@@ -304,15 +287,8 @@
{{ $t("types") }}
-
@@ -339,20 +315,23 @@
max-height: calc(100vh - 186px);
overflow: auto;
}
+.gqlRunQuery {
+ margin-bottom: 12px;
+}
diff --git a/pages/index.vue b/pages/index.vue
index 15a9461d2..a037646f0 100644
--- a/pages/index.vue
+++ b/pages/index.vue
@@ -2,12 +2,7 @@
-
+
-
@@ -33,7 +28,7 @@
fontSize: '16px',
autoScrollEditorIntoView: true,
showPrintMargin: false,
- useWorker: false
+ useWorker: false,
}"
/>
@@ -42,143 +37,145 @@
-
+
+
+
+
+
@@ -321,7 +292,7 @@
@change="
$store.commit('setKeyBodyParams', {
index,
- value: $event.target.value
+ value: $event.target.value,
})
"
@keyup.prevent="setRouteQueryState"
@@ -337,7 +308,7 @@
@change="
$store.commit('setValueBodyParams', {
index,
- value: $event.target.value
+ value: $event.target.value,
})
"
@keyup.prevent="setRouteQueryState"
@@ -358,11 +329,7 @@
-
-
+
add
{{ $t("add_new") }}
@@ -382,7 +349,7 @@
fontSize: '16px',
autoScrollEditorIntoView: true,
showPrintMargin: false,
- useWorker: false
+ useWorker: false,
}"
/>
@@ -405,7 +372,7 @@
@click="isHidden = !isHidden"
:disabled="!isValidURL"
v-tooltip.bottom="{
- content: isHidden ? $t('show_code') : $t('hide_code')
+ content: isHidden ? $t('show_code') : $t('hide_code'),
}"
>
code
@@ -416,7 +383,7 @@
v-tooltip.bottom="{
content: !showPreRequestScript
? $t('show_prerequest_script')
- : $t('hide_prerequest_script')
+ : $t('hide_prerequest_script'),
}"
@click="showPreRequestScript = !showPreRequestScript"
>
@@ -435,15 +402,11 @@
class="icon"
id="preRequestScriptButto"
v-tooltip.bottom="{
- content: !testsEnabled ? 'Enable Tests' : 'Disable Tests'
+ content: !testsEnabled ? 'Enable Tests' : 'Disable Tests',
}"
@click="testsEnabled = !testsEnabled"
>
-
+
playlist_add_check
close
@@ -483,12 +446,7 @@
-
+
-
@@ -514,7 +472,7 @@
fontSize: '16px',
autoScrollEditorIntoView: true,
showPrintMargin: false,
- useWorker: false
+ useWorker: false,
}"
/>
@@ -555,11 +513,7 @@
-
+
-
@@ -586,11 +540,7 @@
-
-
+
-
- visibility
- visibility
+ visibility_off
@@ -625,11 +569,7 @@
-
-->
-
+
-
@@ -994,9 +924,7 @@
ref="ToggleExpandResponse"
v-if="response.body"
v-tooltip="{
- content: !expandResponse
- ? $t('expand_response')
- : $t('collapse_response')
+ content: !expandResponse ? $t('expand_response') : $t('collapse_response'),
}"
>
@@ -1034,7 +962,7 @@
autoScrollEditorIntoView: true,
readOnly: true,
showPrintMargin: false,
- useWorker: false
+ useWorker: false,
}"
/>
-
+
{{ !previewEnabled ? "visibility" : "visibility_off" }}
- {{
- previewEnabled ? $t("hide_preview") : $t("preview_html")
- }}
+ {{ previewEnabled ? $t("hide_preview") : $t("preview_html") }}
@@ -1245,7 +1168,7 @@
@change="
$store.commit('setOAuthTokenName', {
index,
- value: $event.target.value
+ value: $event.target.value,
})
"
/>
@@ -1281,10 +1204,7 @@
-
+
-
@@ -1330,11 +1250,7 @@
:disabled="this.tokenReqs.length === 0"
@change="tokenReqChange($event)"
>
-
@@ -1377,76 +1293,73 @@
diff --git a/pages/index.vue.orig b/pages/index.vue.orig
new file mode 100644
index 000000000..0325c80e4
--- /dev/null
+++ b/pages/index.vue.orig
@@ -0,0 +1,2937 @@
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ -
+
+ Content Type
+
+
+
+
+
+ -
+
+
+
+
+
+
+ -
+
+ add
+ {{ $t("add_new") }}
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+
+ import_export
+
+
+ code
+
+
+
+ playlist_add
+
+
+ close
+
+
+
+
+ playlist_add_check
+
+ close
+
+
+
+
+ share
+ file_copy
+
+
+ save
+
+
+ clear_all
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+
+
+ clear_all
+
+
+
+
+
+
{{ testReport.startBlock }}
+
+
+
+
+ {{ testReport.styles.icon }}
+
+ {{ testReport.result }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+ clear_all
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ $t("include_in_url") }}
+
+
+
+
+
+ -
+
+
+
+
+ library_add
+
+
+ clear_all
+
+
+ close
+
+
+
+
+
+
+
+
+
+
+
+
+ -
+
+ vpn_key
+ {{ $t("request_token") }}
+
+
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+ clear_all
+
+
+
+
+
+
+
+
+ -
+
+ add
+ {{ $t("add_new") }}
+
+
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+ clear_all
+
+
+
+
+
+
+
+
+ -
+
+ add
+ {{ $t("add_new") }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ -
+
+
{{ $t("import_curl") }}
+
+
+ close
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ $t("cancel") }}
+
+
+ {{ $t("import") }}
+
+
+
+
+
+
+
+
+
+ -
+
+
{{ $t("generate_code") }}
+
+
+ close
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+ -
+
+
+
+
+ file_copy
+
+
+
+
+
+
+
+
+
+
+
+
+
+ -
+
+
{{ $t("manage_token") }}
+
+
+ close
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+ clear_all
+
+
+
+
+
+
+
+ {{ $t("empty") }}
+
+
+
+
+
+
+
+
+ -
+
+
{{ $t("manage_token_req") }}
+
+
+ close
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+ input
+
+
+ delete
+
+
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+
+
+ {{ $t("save_token_req") }}
+
+
+
+
+
+
+
+
+
+
diff --git a/pages/realtime.vue b/pages/realtime.vue
index 9e97c4d06..473feaad3 100644
--- a/pages/realtime.vue
+++ b/pages/realtime.vue
@@ -11,6 +11,7 @@
-
-
+
{{ !connectionState ? $t("connect") : $t("disconnect") }}
@@ -37,12 +33,7 @@
-
+
-
@@ -75,12 +66,7 @@
-
-
+
{{ $t("send") }}
send
@@ -127,12 +113,7 @@
-
+
-
@@ -187,7 +168,7 @@ div.log {
diff --git a/pages/settings.vue b/pages/settings.vue
index e3520db3b..721df672b 100644
--- a/pages/settings.vue
+++ b/pages/settings.vue
@@ -12,14 +12,14 @@
/>
account_circle
- {{ fb.currentUser.displayName || "Name not found" }}
+ {{ fb.currentUser.displayName || $t("nothing_found") }}
email
- {{ fb.currentUser.email || "Email not found" }}
+ {{ fb.currentUser.email || $t("nothing_found") }}
@@ -88,18 +88,14 @@
-
-
+
+ />
@@ -110,7 +106,7 @@
{{ $t("multi_color") }}
- {{
- settings.FRAME_COLORS_ENABLED ? $t("enabled") : $t("disabled")
- }}
+ {{ settings.FRAME_COLORS_ENABLED ? $t("enabled") : $t("disabled") }}
-
-
+
-
{{ $t("scrollInto_use_toggle") }}
- {{
- settings.SCROLL_INTO_ENABLED ? $t("enabled") : $t("disabled")
- }}
+ {{ settings.SCROLL_INTO_ENABLED ? $t("enabled") : $t("disabled") }}
@@ -176,10 +168,7 @@
-
-
+
{{ $t("proxy") }}
{{ settings.PROXY_ENABLED ? $t("enabled") : $t("disabled") }}
@@ -200,11 +189,7 @@
-
-
+
clear_all
@@ -226,10 +211,8 @@
class="link"
href="https://apollosoftware.xyz/legal/postwoman"
target="_blank"
- rel="noopener"
- >
- {{ $t("apollosw_privacy_policy") }} .
+ rel="noopener">
+ {{ $t("apollosw_privacy_policy") }} .
@@ -255,14 +238,14 @@
diff --git a/plugins/v-tooltip.js b/plugins/v-tooltip.js
index fa550d499..8288b571a 100644
--- a/plugins/v-tooltip.js
+++ b/plugins/v-tooltip.js
@@ -1,4 +1,4 @@
-import Vue from "vue";
-import VTooltip from "v-tooltip";
+import Vue from "vue"
+import VTooltip from "v-tooltip"
-Vue.use(VTooltip);
+Vue.use(VTooltip)
diff --git a/plugins/vuex-persist.js b/plugins/vuex-persist.js
index 1db2255fa..c834193f6 100644
--- a/plugins/vuex-persist.js
+++ b/plugins/vuex-persist.js
@@ -1,5 +1,5 @@
-import VuexPersistence from "vuex-persist";
+import VuexPersistence from "vuex-persist"
export default ({ store }) => {
- new VuexPersistence().plugin(store);
-};
+ new VuexPersistence().plugin(store)
+}
diff --git a/store/index.js b/store/index.js
index ac40e28b2..f19b77f4d 100644
--- a/store/index.js
+++ b/store/index.js
@@ -1,24 +1,24 @@
-import Vuex from "vuex";
-import state from "./state";
-import VuexPersist from "vuex-persist";
+import Vuex from "vuex"
+import state from "./state"
+import VuexPersist from "vuex-persist"
export default {
install(Vue) {
- Vue.use(Vuex);
+ Vue.use(Vuex)
const vuexLocalStorage = new VuexPersist({
key: "vuex",
storage: window.localStorage,
reducer: ({ ...request }) => ({
- ...request
- })
- });
+ ...request,
+ }),
+ })
const store = new Vuex.Store({
state,
- plugins: [vuexLocalStorage.plugin]
- });
+ plugins: [vuexLocalStorage.plugin],
+ })
- Vue.prototype.$store = store;
- }
-};
+ Vue.prototype.$store = store
+ },
+}
diff --git a/store/mutations.js b/store/mutations.js
index acc84471a..9a229291a 100644
--- a/store/mutations.js
+++ b/store/mutations.js
@@ -1,97 +1,103 @@
export default {
setState({ request }, { attribute, value }) {
- request[attribute] = value;
+ request[attribute] = value
},
setGQLState({ gql }, { attribute, value }) {
- gql[attribute] = value;
+ gql[attribute] = value
+ },
+
+ setCollapsedSection({ theme }, value) {
+ theme.collapsedSections.includes(value)
+ ? (theme.collapsedSections = theme.collapsedSections.filter(section => section !== value))
+ : theme.collapsedSections.push(value)
},
addGQLHeader({ gql }, object) {
- gql.headers.push(object);
+ gql.headers.push(object)
},
removeGQLHeader({ gql }, index) {
- gql.headers.splice(index, 1);
+ gql.headers.splice(index, 1)
},
setGQLHeaderKey({ gql }, { index, value }) {
- gql.headers[index].key = value;
+ gql.headers[index].key = value
},
setGQLHeaderValue({ gql }, { index, value }) {
- gql.headers[index].value = value;
+ gql.headers[index].value = value
},
addHeaders({ request }, value) {
- request.headers.push(value);
+ request.headers.push(value)
},
removeHeaders({ request }, index) {
- request.headers.splice(index, 1);
+ request.headers.splice(index, 1)
},
setKeyHeader({ request }, { index, value }) {
- request.headers[index].key = value;
+ request.headers[index].key = value
},
setValueHeader({ request }, { index, value }) {
- request.headers[index].value = value;
+ request.headers[index].value = value
},
addParams({ request }, value) {
- request.params.push(value);
+ request.params.push(value)
},
removeParams({ request }, index) {
- request.params.splice(index, 1);
+ request.params.splice(index, 1)
},
setKeyParams({ request }, { index, value }) {
- request.params[index].key = value;
+ request.params[index].key = value
},
setValueParams({ request }, { index, value }) {
- request.params[index].value = value;
+ request.params[index].value = value
},
addBodyParams({ request }, value) {
- request.bodyParams.push(value);
+ request.bodyParams.push(value)
},
removeBodyParams({ request }, index) {
- request.bodyParams.splice(index, 1);
+ request.bodyParams.splice(index, 1)
},
setKeyBodyParams({ request }, { index, value }) {
- request.bodyParams[index].key = value;
+ request.bodyParams[index].key = value
},
setValueBodyParams({ request }, { index, value }) {
- request.bodyParams[index].value = value;
+ request.bodyParams[index].value = value
},
setOAuth2({ oauth2 }, { attribute, value }) {
- oauth2[attribute] = value;
+ oauth2[attribute] = value
},
addOAuthToken({ oauth2 }, value) {
- oauth2.tokens.push(value);
+ oauth2.tokens.push(value)
},
removeOAuthToken({ oauth2 }, index) {
- oauth2.tokens.splice(index, 1);
+ oauth2.tokens.splice(index, 1)
},
setOAuthTokenName({ oauth2 }, { index, value }) {
- oauth2.tokens[index].name = value;
+ oauth2.tokens[index].name = value
},
addOAuthTokenReq({ oauth2 }, value) {
- oauth2.tokenReqs.push(value);
+ oauth2.tokenReqs.push(value)
},
removeOAuthTokenReq({ oauth2 }, index) {
- oauth2.tokenReqs.splice(index, 1);
- }
-};
+ oauth2.tokenReqs.splice(index, 1)
+ },
+}
diff --git a/store/postwoman.js b/store/postwoman.js
index ad7b13f63..8857ccaba 100644
--- a/store/postwoman.js
+++ b/store/postwoman.js
@@ -1,4 +1,4 @@
-import Vue from "vue";
+import Vue from "vue"
export const SETTINGS_KEYS = [
/**
@@ -68,8 +68,8 @@ export const SETTINGS_KEYS = [
* A boolean value indicating whether to use the browser extensions
* to run the requests
*/
- "EXTENSIONS_ENABLED"
-];
+ "EXTENSIONS_ENABLED",
+]
export const state = () => ({
settings: {},
@@ -77,200 +77,190 @@ export const state = () => ({
{
name: "My Collection",
folders: [],
- requests: []
- }
+ requests: [],
+ },
],
environments: [
{
name: "My Environment Variables",
- variables: []
- }
+ variables: [],
+ },
],
editingEnvironment: {},
selectedRequest: {},
- editingRequest: {}
-});
+ editingRequest: {},
+})
export const mutations = {
applySetting({ settings }, setting) {
- if (
- setting === null ||
- !(setting instanceof Array) ||
- setting.length !== 2
- ) {
- throw new Error(
- "You must provide a setting (array in the form [key, value])"
- );
+ if (setting === null || !(setting instanceof Array) || setting.length !== 2) {
+ throw new Error("You must provide a setting (array in the form [key, value])")
}
- const [key, value] = setting;
+ const [key, value] = setting
// Do not just remove this check.
// Add your settings key to the SETTINGS_KEYS array at the
// top of the file.
// This is to ensure that application settings remain documented.
if (!SETTINGS_KEYS.includes(key)) {
- throw new Error(`The settings structure does not include the key ${key}`);
+ throw new Error(`The settings structure does not include the key ${key}`)
}
- settings[key] = value;
+ settings[key] = value
},
removeVariables({ editingEnvironment }, value) {
- editingEnvironment.variables = value;
+ editingEnvironment.variables = value
},
setEditingEnvironment(state, value) {
- state.editingEnvironment = { ...value };
+ state.editingEnvironment = { ...value }
},
setVariableKey({ editingEnvironment }, { index, value }) {
- editingEnvironment.variables[index].key = value;
+ editingEnvironment.variables[index].key = value
},
setVariableValue({ editingEnvironment }, { index, value }) {
- editingEnvironment.variables[index].value = testValue(value);
+ editingEnvironment.variables[index].value = testValue(value)
},
removeVariable({ editingEnvironment }, variables) {
- editingEnvironment.variables = variables;
+ editingEnvironment.variables = variables
},
addVariable({ editingEnvironment }, value) {
- editingEnvironment.variables.push(value);
+ editingEnvironment.variables.push(value)
},
replaceEnvironments(state, environments) {
- state.environments = environments;
+ state.environments = environments
},
importAddEnvironments(state, { environments, confirmation }) {
- const duplicateEnvironment = environments.some(
- item => {
- return state.environments.some(
- item2 => {
- return item.name.toLowerCase() === item2.name.toLowerCase();
- });
- }
- );
+ const duplicateEnvironment = environments.some(item => {
+ return state.environments.some(item2 => {
+ return item.name.toLowerCase() === item2.name.toLowerCase()
+ })
+ })
if (duplicateEnvironment) {
- this.$toast.info("Duplicate environment");
- return;
- };
- state.environments = [...state.environments, ...environments];
+ this.$toast.info("Duplicate environment")
+ return
+ }
+ state.environments = [...state.environments, ...environments]
- let index = 0;
+ let index = 0
for (let environment of state.environments) {
- environment.environmentIndex = index;
- index += 1;
+ environment.environmentIndex = index
+ index += 1
}
this.$toast.info(confirmation, {
- icon: "folder_shared"
- });
+ icon: "folder_shared",
+ })
},
removeEnvironment({ environments }, environmentIndex) {
- environments.splice(environmentIndex, 1);
+ environments.splice(environmentIndex, 1)
},
saveEnvironment({ environments }, payload) {
- const { environment, environmentIndex } = payload;
- const { name } = environment;
- const duplicateEnvironment = environments.length === 1
- ? false
- : environments.some(
- item =>
- item.environmentIndex !== environmentIndex &&
- item.name.toLowerCase() === name.toLowerCase()
- );
+ const { environment, environmentIndex } = payload
+ const { name } = environment
+ const duplicateEnvironment =
+ environments.length === 1
+ ? false
+ : environments.some(
+ item =>
+ item.environmentIndex !== environmentIndex &&
+ item.name.toLowerCase() === name.toLowerCase()
+ )
if (duplicateEnvironment) {
- this.$toast.info("Duplicate environment");
- return;
+ this.$toast.info("Duplicate environment")
+ return
}
- environments[environmentIndex] = environment;
+ environments[environmentIndex] = environment
},
replaceCollections(state, collections) {
- state.collections = collections;
+ state.collections = collections
},
importCollections(state, collections) {
- state.collections = [...state.collections, ...collections];
+ state.collections = [...state.collections, ...collections]
- let index = 0;
+ let index = 0
for (let collection of collections) {
- collection.collectionIndex = index;
- index += 1;
+ collection.collectionIndex = index
+ index += 1
}
},
addNewCollection({ collections }, collection) {
- const { name } = collection;
+ const { name } = collection
const duplicateCollection = collections.some(
item => item.name.toLowerCase() === name.toLowerCase()
- );
+ )
if (duplicateCollection) {
- this.$toast.info("Duplicate collection");
- return;
+ this.$toast.info("Duplicate collection")
+ return
}
collections.push({
name: "",
folders: [],
requests: [],
- ...collection
- });
+ ...collection,
+ })
},
removeCollection({ collections }, payload) {
- const { collectionIndex } = payload;
- collections.splice(collectionIndex, 1);
+ const { collectionIndex } = payload
+ collections.splice(collectionIndex, 1)
},
editCollection({ collections }, payload) {
const {
collection: { name },
- collectionIndex
- } = payload;
+ collectionIndex,
+ } = payload
const duplicateCollection = collections.some(
item => item.name.toLowerCase() === name.toLowerCase()
- );
+ )
if (duplicateCollection) {
- this.$toast.info("Duplicate collection");
- return;
+ this.$toast.info("Duplicate collection")
+ return
}
- collections[collectionIndex] = collection;
+ collections[collectionIndex] = collection
},
addNewFolder({ collections }, payload) {
- const { collectionIndex, folder } = payload;
+ const { collectionIndex, folder } = payload
collections[collectionIndex].folders.push({
name: "",
requests: [],
- ...folder
- });
+ ...folder,
+ })
},
editFolder({ collections }, payload) {
- const { collectionIndex, folder, folderIndex } = payload;
- Vue.set(collections[collectionIndex].folders, folderIndex, folder);
+ const { collectionIndex, folder, folderIndex } = payload
+ Vue.set(collections[collectionIndex].folders, folderIndex, folder)
},
removeFolder({ collections }, payload) {
- const { collectionIndex, folderIndex } = payload;
- collections[collectionIndex].folders.splice(folderIndex, 1);
+ const { collectionIndex, folderIndex } = payload
+ collections[collectionIndex].folders.splice(folderIndex, 1)
},
addRequest({ collections }, payload) {
- const { request } = payload;
+ const { request } = payload
// Request that is directly attached to collection
if (request.folder === -1) {
- collections[request.collection].requests.push(request);
- return;
+ collections[request.collection].requests.push(request)
+ return
}
- collections[request.collection].folders[request.folder].requests.push(
- request
- );
+ collections[request.collection].folders[request.folder].requests.push(request)
},
editRequest({ collections }, payload) {
@@ -280,148 +270,116 @@ export const mutations = {
requestOldIndex,
requestNew,
requestNewCollectionIndex,
- requestNewFolderIndex
- } = payload;
+ requestNewFolderIndex,
+ } = payload
- const changedCollection =
- requestOldCollectionIndex !== requestNewCollectionIndex;
- const changedFolder = requestOldFolderIndex !== requestNewFolderIndex;
- const changedPlace = changedCollection || changedFolder;
+ const changedCollection = requestOldCollectionIndex !== requestNewCollectionIndex
+ const changedFolder = requestOldFolderIndex !== requestNewFolderIndex
+ const changedPlace = changedCollection || changedFolder
// set new request
if (requestNewFolderIndex !== undefined) {
Vue.set(
- collections[requestNewCollectionIndex].folders[requestNewFolderIndex]
- .requests,
+ collections[requestNewCollectionIndex].folders[requestNewFolderIndex].requests,
requestOldIndex,
requestNew
- );
+ )
} else {
- Vue.set(
- collections[requestNewCollectionIndex].requests,
- requestOldIndex,
- requestNew
- );
+ Vue.set(collections[requestNewCollectionIndex].requests, requestOldIndex, requestNew)
}
// remove old request
if (changedPlace) {
if (requestOldFolderIndex !== undefined) {
- collections[requestOldCollectionIndex].folders[
- requestOldFolderIndex
- ].requests.splice(requestOldIndex, 1);
- } else {
- collections[requestOldCollectionIndex].requests.splice(
+ collections[requestOldCollectionIndex].folders[requestOldFolderIndex].requests.splice(
requestOldIndex,
1
- );
+ )
+ } else {
+ collections[requestOldCollectionIndex].requests.splice(requestOldIndex, 1)
}
}
},
saveRequestAs({ collections }, payload) {
- const { request, collectionIndex, folderIndex, requestIndex } = payload;
+ const { request, collectionIndex, folderIndex, requestIndex } = payload
- const specifiedCollection = collectionIndex !== undefined;
- const specifiedFolder = folderIndex !== undefined;
- const specifiedRequest = requestIndex !== undefined;
+ const specifiedCollection = collectionIndex !== undefined
+ const specifiedFolder = folderIndex !== undefined
+ const specifiedRequest = requestIndex !== undefined
if (specifiedCollection && specifiedFolder && specifiedRequest) {
- Vue.set(
- collections[collectionIndex].folders[folderIndex].requests,
- requestIndex,
- request
- );
+ Vue.set(collections[collectionIndex].folders[folderIndex].requests, requestIndex, request)
} else if (specifiedCollection && specifiedFolder && !specifiedRequest) {
- const requests =
- collections[collectionIndex].folders[folderIndex].requests;
- const lastRequestIndex = requests.length - 1;
- Vue.set(requests, lastRequestIndex + 1, request);
+ const requests = collections[collectionIndex].folders[folderIndex].requests
+ const lastRequestIndex = requests.length - 1
+ Vue.set(requests, lastRequestIndex + 1, request)
} else if (specifiedCollection && !specifiedFolder && specifiedRequest) {
- const requests = collections[collectionIndex].requests;
- Vue.set(requests, requestIndex, request);
+ const requests = collections[collectionIndex].requests
+ Vue.set(requests, requestIndex, request)
} else if (specifiedCollection && !specifiedFolder && !specifiedRequest) {
- const requests = collections[collectionIndex].requests;
- const lastRequestIndex = requests.length - 1;
- Vue.set(requests, lastRequestIndex + 1, request);
+ const requests = collections[collectionIndex].requests
+ const lastRequestIndex = requests.length - 1
+ Vue.set(requests, lastRequestIndex + 1, request)
}
},
saveRequest({ collections }, payload) {
- const { request } = payload;
+ const { request } = payload
// Remove the old request from collection
if (request.hasOwnProperty("oldCollection") && request.oldCollection > -1) {
const folder =
request.hasOwnProperty("oldFolder") && request.oldFolder >= -1
? request.oldFolder
- : request.folder;
+ : request.folder
if (folder > -1) {
- collections[request.oldCollection].folders[folder].requests.splice(
- request.requestIndex,
- 1
- );
+ collections[request.oldCollection].folders[folder].requests.splice(request.requestIndex, 1)
} else {
- collections[request.oldCollection].requests.splice(
- request.requestIndex,
- 1
- );
+ collections[request.oldCollection].requests.splice(request.requestIndex, 1)
}
- } else if (
- request.hasOwnProperty("oldFolder") &&
- request.oldFolder !== -1
- ) {
- collections[request.collection].folders[folder].requests.splice(
- request.requestIndex,
- 1
- );
+ } else if (request.hasOwnProperty("oldFolder") && request.oldFolder !== -1) {
+ collections[request.collection].folders[folder].requests.splice(request.requestIndex, 1)
}
- delete request.oldCollection;
- delete request.oldFolder;
+ delete request.oldCollection
+ delete request.oldFolder
// Request that is directly attached to collection
if (request.folder === -1) {
- Vue.set(
- collections[request.collection].requests,
- request.requestIndex,
- request
- );
- return;
+ Vue.set(collections[request.collection].requests, request.requestIndex, request)
+ return
}
Vue.set(
collections[request.collection].folders[request.folder].requests,
request.requestIndex,
request
- );
+ )
},
removeRequest({ collections }, payload) {
- const { collectionIndex, folderIndex, requestIndex } = payload;
+ const { collectionIndex, folderIndex, requestIndex } = payload
// Request that is directly attached to collection
if (folderIndex === -1) {
- collections[collectionIndex].requests.splice(requestIndex, 1);
- return;
+ collections[collectionIndex].requests.splice(requestIndex, 1)
+ return
}
- collections[collectionIndex].folders[folderIndex].requests.splice(
- requestIndex,
- 1
- );
+ collections[collectionIndex].folders[folderIndex].requests.splice(requestIndex, 1)
},
selectRequest(state, { request }) {
- state.selectedRequest = Object.assign({}, request);
- }
-};
+ state.selectedRequest = Object.assign({}, request)
+ },
+}
function testValue(myValue) {
try {
- return JSON.parse(myValue);
- } catch(ex) {
- // Now we know it's a string just leave it as a string value.
- return myValue;
+ return JSON.parse(myValue)
+ } catch (ex) {
+ // Now we know it's a string just leave it as a string value.
+ return myValue
}
}
diff --git a/store/state.js b/store/state.js
index 25d04f6fd..442896f4e 100644
--- a/store/state.js
+++ b/store/state.js
@@ -1,6 +1,7 @@
export default () => ({
request: {
method: "GET",
+ uri: "",
url: "https://httpbin.org",
path: "/get",
label: "",
@@ -15,13 +16,18 @@ export default () => ({
rawParams: "",
rawInput: false,
requestType: "",
- contentType: ""
+ contentType: "",
},
gql: {
url: "https://rickandmortyapi.com/graphql",
headers: [],
+ schema: "",
variablesJSONString: "{}",
- query: ""
+ query: "",
+ response: "",
+ },
+ theme: {
+ collapsedSections: [],
},
oauth2: {
tokens: [],
@@ -33,6 +39,6 @@ export default () => ({
authUrl: "",
accessTokenUrl: "",
clientId: "",
- scope: ""
- }
-});
+ scope: "",
+ },
+})
diff --git a/tests/e2e/fixtures/catapi.json b/tests/e2e/fixtures/catapi.json
index 315b67589..07f146bc8 100644
--- a/tests/e2e/fixtures/catapi.json
+++ b/tests/e2e/fixtures/catapi.json
@@ -1 +1 @@
-{ "message": "FAKE Cat API" }
\ No newline at end of file
+{ "message": "FAKE Cat API" }
diff --git a/tests/e2e/integration/app.starter.spec.js b/tests/e2e/integration/app.starter.spec.js
index 6c459d24f..301176d8b 100644
--- a/tests/e2e/integration/app.starter.spec.js
+++ b/tests/e2e/integration/app.starter.spec.js
@@ -1,7 +1,7 @@
-describe('Visit home', () => {
+describe("Visit home", () => {
it('Have a page title with "Postwoman"', () => {
- cy.visit('/', { retryOnStatusCodeFailure: true })
- .get('title')
- .should('contain','Postwoman')
+ cy.visit("/", { retryOnStatusCodeFailure: true })
+ .get("title")
+ .should("contain", "Postwoman")
})
})
diff --git a/tests/e2e/integration/feature.url-queries.spec.js b/tests/e2e/integration/feature.url-queries.spec.js
index 4792987eb..3481242b7 100644
--- a/tests/e2e/integration/feature.url-queries.spec.js
+++ b/tests/e2e/integration/feature.url-queries.spec.js
@@ -1,34 +1,34 @@
-describe('Authentication', () => {
+describe("Authentication", () => {
it(`Change default auth user and pass with url`, () => {
cy.visit(`?&auth=Basic Auth&httpUser=foo&httpPassword=bar`, { retryOnStatusCodeFailure: true })
.get('input[name="http_basic_user"]', { timeout: 500 })
- .invoke('val')
- .then((user) => {
- expect(user === 'foo').to.equal(true)
+ .invoke("val")
+ .then(user => {
+ expect(user === "foo").to.equal(true)
})
.get('input[name="http_basic_passwd"]')
- .invoke('val')
- .then((pass) => {
- expect(pass === 'bar').to.equal(true)
+ .invoke("val")
+ .then(pass => {
+ expect(pass === "bar").to.equal(true)
})
})
- it('Enable user and pass at url with toggler', () => {
- cy.visit('/', { retryOnStatusCodeFailure: true })
- .get('#auth')
- .select('Basic Auth')
+ it("Enable user and pass at url with toggler", () => {
+ cy.visit("/", { retryOnStatusCodeFailure: true })
+ .get("#auth")
+ .select("Basic Auth")
.get('input[name="http_basic_user"]', { timeout: 500 })
- .type('foo')
+ .type("foo")
.get('input[name="http_basic_passwd"]', { timeout: 500 })
- .type('bar')
+ .type("bar")
.url()
- .should('not.contain', 'foo')
- .should('not.contain', 'bar')
- .get('.toggle')
+ .should("not.contain", "foo")
+ .should("not.contain", "bar")
+ .get(".toggle")
.click()
.url()
- .should('contain', 'foo')
- .should('contain', 'bar')
- })
+ .should("contain", "foo")
+ .should("contain", "bar")
+ })
})
diff --git a/tests/e2e/integration/proxy.spec.js b/tests/e2e/integration/proxy.spec.js
index 63ef53ff5..f5579b11b 100644
--- a/tests/e2e/integration/proxy.spec.js
+++ b/tests/e2e/integration/proxy.spec.js
@@ -1,20 +1,23 @@
-describe('Proxy disabled - local request', () => {
- it('Change default url with query and make a request to local cat api', () => {
- cy.seedAndVisit('catapi', '/?url=https://api.thecatapi.com&path=')
- .get('#url').then((el) => expect(el.val() === 'https://api.thecatapi.com').to.equal(true))
- .get("#path").then((el) => expect(el.val() === '').to.equal(true))
- .get('#response-details-wrapper').should($wrapper => {
- expect($wrapper).to.contain('FAKE Cat API')
+describe("Proxy disabled - local request", () => {
+ it("Change default url with query and make a request to local cat api", () => {
+ cy.seedAndVisit("catapi", "/?url=https://api.thecatapi.com&path=")
+ .get("#url")
+ .then(el => expect(el.val() === "https://api.thecatapi.com").to.equal(true))
+ .get("#response-details-wrapper")
+ .should($wrapper => {
+ expect($wrapper).to.contain("FAKE Cat API")
})
})
})
-describe('Proxy enabled - external request', () => {
- it('Enable the proxy and make a request to the real cat api', () => {
- cy.enableProxy('/?url=https://api.thecatapi.com&path=')
- .get('#send').click()
- .get('#response-details-wrapper').should($wrapper => {
- expect($wrapper).to.contain('Cat API')
+describe("Proxy enabled - external request", () => {
+ it("Enable the proxy and make a request to the real cat api", () => {
+ cy.enableProxy("/?url=https://api.thecatapi.com&path=")
+ .get("#send")
+ .click()
+ .get("#response-details-wrapper")
+ .should($wrapper => {
+ expect($wrapper).to.contain("Cat API")
})
})
})
diff --git a/tests/e2e/support/commands.js b/tests/e2e/support/commands.js
index 21b444909..519174757 100644
--- a/tests/e2e/support/commands.js
+++ b/tests/e2e/support/commands.js
@@ -1,29 +1,31 @@
/**
-* Creates cy.seedAndVisit() function
-* This function will go to some path and wait for some fake response from 'src/tests/fixtures/*.json'
-* @param { String } seedData The name of json at 'src/tests/fixtures/
-* @param { String } path The path or query parameters to go -ex. '/?path=/api/users'
-* @param { String } method The fake request method
-*/
-Cypress.Commands.add('seedAndVisit', (seedData, path = '/', method = 'GET') => {
+ * Creates cy.seedAndVisit() function
+ * This function will go to some path and wait for some fake response from 'src/tests/fixtures/*.json'
+ * @param { String } seedData The name of json at 'src/tests/fixtures/
+ * @param { String } path The path or query parameters to go -ex. '/?path=/api/users'
+ * @param { String } method The fake request method
+ */
+Cypress.Commands.add("seedAndVisit", (seedData, path = "/", method = "GET") => {
cy.server()
- .route(method, 'https://api.thecatapi.com/', `fixture:${seedData}`).as('load')
+ .route(method, "https://api.thecatapi.com/", `fixture:${seedData}`)
+ .as("load")
cy.visit(path)
- .get('#send').click()
- .wait('@load')
+ .get("#send")
+ .click()
+ .wait("@load")
})
/**
-* Creates cy.enableProxy() function
-* This function will enable the proxy and navigate back to a given path
-* @param { String } goBackPath The page go back
-*/
-Cypress.Commands.add('enableProxy', (goBackPath) => {
- cy.visit('/settings')
- .get('#proxy')
- .find('.toggle')
- .click( { force: true } )
- .should('have.class', 'on')
+ * Creates cy.enableProxy() function
+ * This function will enable the proxy and navigate back to a given path
+ * @param { String } goBackPath The page go back
+ */
+Cypress.Commands.add("enableProxy", goBackPath => {
+ cy.visit("/settings")
+ .get("#proxy")
+ .find(".toggle")
+ .click({ force: true })
+ .should("have.class", "on")
.visit(goBackPath)
-})
\ No newline at end of file
+})
diff --git a/tests/e2e/support/index.js b/tests/e2e/support/index.js
index f65e7f7cd..b7cb303d8 100644
--- a/tests/e2e/support/index.js
+++ b/tests/e2e/support/index.js
@@ -1 +1 @@
-import './commands'
\ No newline at end of file
+import "./commands"