diff --git a/packages/lesspass-pure/package.json b/packages/lesspass-pure/package.json index 6c0dc0b..4a9e62e 100644 --- a/packages/lesspass-pure/package.json +++ b/packages/lesspass-pure/package.json @@ -9,7 +9,7 @@ "build": "vue-cli-service build", "i18n:build": "node src/i18n/build.js", "i18n:translate": "node src/i18n/translate.js", - "prettier": "prettier --write src/", + "prettier": "prettier --write 'src/**/*'", "cypress:run": "cypress run", "cypress:open": "cypress open", "test": "npm run test:unit && npm run test:e2e", diff --git a/packages/lesspass-pure/src/api/password.test.js b/packages/lesspass-pure/src/api/password.test.js index aa91a9b..cbda40c 100644 --- a/packages/lesspass-pure/src/api/password.test.js +++ b/packages/lesspass-pure/src/api/password.test.js @@ -6,7 +6,9 @@ const mock = new MockAdapter(axios); test("Passwords.create", () => { const password = { login: "text@example.org" }; - mock.onPost("https://api.lesspass.com/passwords/", password).reply(201, { ...password, id: "1" }); + mock + .onPost("https://api.lesspass.com/passwords/", password) + .reply(201, { ...password, id: "1" }); return Passwords.create(password).then(response => { const passwordCreated = response.data; expect(passwordCreated.id).toBe("1"); diff --git a/packages/lesspass-pure/src/api/user.test.js b/packages/lesspass-pure/src/api/user.test.js index 9001009..852c76e 100644 --- a/packages/lesspass-pure/src/api/user.test.js +++ b/packages/lesspass-pure/src/api/user.test.js @@ -8,7 +8,9 @@ test("login", () => { const access = "12345"; const refresh = "67890"; const user = { email: "test@example.org", password: "password" }; - mock.onPost("https://api.lesspass.com/auth/jwt/create/", user).reply(201, { access, refresh }); + mock + .onPost("https://api.lesspass.com/auth/jwt/create/", user) + .reply(201, { access, refresh }); return User.login(user).then(response => { expect(response.data.access).toBe(access); expect(response.data.refresh).toBe(refresh); @@ -27,7 +29,9 @@ test("register", () => { test("resetPassword", () => { var email = "test@lesspass.com"; - mock.onPost("https://api.lesspass.com/auth/users/reset_password/", { email }).reply(204); + mock + .onPost("https://api.lesspass.com/auth/users/reset_password/", { email }) + .reply(204); return User.resetPassword({ email }).then(response => { expect(response.status).toBe(204); }); @@ -41,7 +45,10 @@ test("confirmResetPassword", () => { re_new_password: "password1" }; mock - .onPost("https://api.lesspass.com/auth/users/reset_password_confirm/", newPassword) + .onPost( + "https://api.lesspass.com/auth/users/reset_password_confirm/", + newPassword + ) .reply(204); return User.confirmResetPassword({ uid: "MQ", diff --git a/packages/lesspass-pure/src/i18n/de.json b/packages/lesspass-pure/src/i18n/de.json index 39225e3..5f3eedd 100644 --- a/packages/lesspass-pure/src/i18n/de.json +++ b/packages/lesspass-pure/src/i18n/de.json @@ -65,4 +65,4 @@ "noAutoFillSite": "Füllen Sie das Site-Feld nicht mehr automatisch aus", "removeSiteSubdomain": "Subdomain von der Site entfernen", "resetPasswordSuccess": "Wenn die E-Mail-Adresse {email} mit einem LessPass-Konto verknüpft ist, erhalten Sie in Kürze eine E-Mail von LessPass mit Anweisungen zum Zurücksetzen Ihres Passworts." -} \ No newline at end of file +} diff --git a/packages/lesspass-pure/src/i18n/es.json b/packages/lesspass-pure/src/i18n/es.json index c4ba609..4e8f42e 100644 --- a/packages/lesspass-pure/src/i18n/es.json +++ b/packages/lesspass-pure/src/i18n/es.json @@ -65,4 +65,4 @@ "noAutoFillSite": "Deje de completar el campo del sitio automáticamente", "removeSiteSubdomain": "Eliminar subdominio del sitio", "resetPasswordSuccess": "Si la dirección de correo electrónico {email} está asociada a una cuenta LessPass, recibirá un correo electrónico de LessPass con instrucciones sobre cómo restablecer su contraseña." -} \ No newline at end of file +} diff --git a/packages/lesspass-pure/src/i18n/fr.json b/packages/lesspass-pure/src/i18n/fr.json index d04dd24..c7d8add 100644 --- a/packages/lesspass-pure/src/i18n/fr.json +++ b/packages/lesspass-pure/src/i18n/fr.json @@ -65,4 +65,4 @@ "noAutoFillSite": "Arrêtez de remplir automatiquement le champ site", "removeSiteSubdomain": "Supprimer le sous-domaine du site", "resetPasswordSuccess": "Si l'adresse email {email} est associée avec un compte LessPass, vous allez recevoir un email de la part de LessPass avec les instructions pour changer votre mot de passe." -} \ No newline at end of file +} diff --git a/packages/lesspass-pure/src/i18n/pl.json b/packages/lesspass-pure/src/i18n/pl.json index 6cdaa3d..20e45d3 100644 --- a/packages/lesspass-pure/src/i18n/pl.json +++ b/packages/lesspass-pure/src/i18n/pl.json @@ -65,4 +65,4 @@ "noAutoFillSite": "Przestań automatycznie wypełniać pole witryny", "removeSiteSubdomain": "Usuń subdomenę z witryny", "resetPasswordSuccess": "Jeśli adres {email} jest skojarzony z kontem LessPass, wkrótce otrzymasz wiadomość od LessPass zawierającą instrukcje resetowania hasła." -} \ No newline at end of file +} diff --git a/packages/lesspass-pure/src/i18n/pt.json b/packages/lesspass-pure/src/i18n/pt.json index 4d9fcfc..ab9a2b1 100644 --- a/packages/lesspass-pure/src/i18n/pt.json +++ b/packages/lesspass-pure/src/i18n/pt.json @@ -65,4 +65,4 @@ "noAutoFillSite": "Pare de preencher o campo do site automaticamente", "removeSiteSubdomain": "Remover subdomínio do site", "resetPasswordSuccess": "Se o seu endereço de email {email} estiver associado com uma conta LessPass, você receberá logo um email do LessPass com instruções de como resetar a sua senha." -} \ No newline at end of file +} diff --git a/packages/lesspass-pure/src/i18n/ru.json b/packages/lesspass-pure/src/i18n/ru.json index a78cfc1..3761e4e 100644 --- a/packages/lesspass-pure/src/i18n/ru.json +++ b/packages/lesspass-pure/src/i18n/ru.json @@ -65,4 +65,4 @@ "noAutoFillSite": "Прекратить автоматическое заполнение поля сайта", "removeSiteSubdomain": "Удалить субдомен с сайта", "resetPasswordSuccess": "Если адрес электронной почты {email} связан с учетной записью LessPass, вы получите электронное письмо от LessPass с инструкциями по восстановлению пароля." -} \ No newline at end of file +} diff --git a/packages/lesspass-pure/src/i18n/zh-CN.json b/packages/lesspass-pure/src/i18n/zh-CN.json index 19473fa..db639e6 100644 --- a/packages/lesspass-pure/src/i18n/zh-CN.json +++ b/packages/lesspass-pure/src/i18n/zh-CN.json @@ -65,4 +65,4 @@ "noAutoFillSite": "停止自动填写站点字段", "removeSiteSubdomain": "从网站删除子域", "resetPasswordSuccess": "如果电子邮件地址 {email} 与一个 LessPass 账户相关联,您将很快收到 LessPass 的电子邮件,里面提供有重置密码的操作说明。" -} \ No newline at end of file +} diff --git a/packages/lesspass-pure/src/i18n/zh-TW.json b/packages/lesspass-pure/src/i18n/zh-TW.json index f9ef293..fc8d465 100644 --- a/packages/lesspass-pure/src/i18n/zh-TW.json +++ b/packages/lesspass-pure/src/i18n/zh-TW.json @@ -65,4 +65,4 @@ "noAutoFillSite": "停止自動填寫站點字段", "removeSiteSubdomain": "從網站刪除子域", "resetPasswordSuccess": "如果郵件位址 {email} 已和 LessPass 帳號連動,您很快能收到 LessPass 的信件,當中提供如何重置密碼的說明。" -} \ No newline at end of file +} diff --git a/packages/lesspass-pure/src/services/localStore.js b/packages/lesspass-pure/src/services/localStore.js index 4dd3be5..0d2b974 100644 --- a/packages/lesspass-pure/src/services/localStore.js +++ b/packages/lesspass-pure/src/services/localStore.js @@ -1 +1 @@ -export const key = "lesspass-v2" \ No newline at end of file +export const key = "lesspass-v2"; diff --git a/packages/lesspass-pure/src/services/url-parser.test.js b/packages/lesspass-pure/src/services/url-parser.test.js index 59358d2..8ef3b18 100644 --- a/packages/lesspass-pure/src/services/url-parser.test.js +++ b/packages/lesspass-pure/src/services/url-parser.test.js @@ -42,7 +42,9 @@ test("cleanUrl beta", () => { expect(urlParser.removeSiteSubdomain("https://api.lesspass.com/")).toBe( "lesspass.com" ); - expect(urlParser.removeSiteSubdomain("http://lesspass.com")).toBe("lesspass.com"); + expect(urlParser.removeSiteSubdomain("http://lesspass.com")).toBe( + "lesspass.com" + ); expect(urlParser.removeSiteSubdomain("http://www.lesspass.com")).toBe( "lesspass.com" ); @@ -61,18 +63,22 @@ test("cleanUrl beta", () => { "https://accounts.google.com/ServiceLogin?service=mail&passive=true&rm=false&continue=https://mail.google.com/mail/&ss=1&scc=1<mpl=default<mplcache=2&emr=1&osid=1#identifier" ) ).toBe("google.com"); - expect(urlParser.removeSiteSubdomain("https://mail.google.com/mail/u/0/")).toBe( - "google.com" - ); + expect( + urlParser.removeSiteSubdomain("https://mail.google.com/mail/u/0/") + ).toBe("google.com"); expect(urlParser.removeSiteSubdomain("https://www.netflix.com/browse")).toBe( "netflix.com" ); - expect(urlParser.removeSiteSubdomain("https://www.bbc.co.uk")).toBe("bbc.co.uk"); - expect(urlParser.removeSiteSubdomain("https://192.168.1.1:10443/webapp/")).toBe( - "192.168.1.1" + expect(urlParser.removeSiteSubdomain("https://www.bbc.co.uk")).toBe( + "bbc.co.uk" ); + expect( + urlParser.removeSiteSubdomain("https://192.168.1.1:10443/webapp/") + ).toBe("192.168.1.1"); expect(urlParser.removeSiteSubdomain(undefined)).toBe(""); - expect(urlParser.removeSiteSubdomain("chrome://extensions/")).toBe("extensions"); + expect(urlParser.removeSiteSubdomain("chrome://extensions/")).toBe( + "extensions" + ); }); test("getSuggestions", () => { diff --git a/packages/lesspass-pure/src/store/getters.js b/packages/lesspass-pure/src/store/getters.js index c7461b0..7557010 100644 --- a/packages/lesspass-pure/src/store/getters.js +++ b/packages/lesspass-pure/src/store/getters.js @@ -12,4 +12,5 @@ export const passwordURL = state => { export const shouldAutoFillSite = state => !state.settings.noAutoFillSite; -export const shouldRemoveSubdomain = state => state.settings.removeSiteSubdomain; +export const shouldRemoveSubdomain = state => + state.settings.removeSiteSubdomain; diff --git a/packages/lesspass-pure/src/store/mutations.test.js b/packages/lesspass-pure/src/store/mutations.test.js index c03cfe5..700bae1 100644 --- a/packages/lesspass-pure/src/store/mutations.test.js +++ b/packages/lesspass-pure/src/store/mutations.test.js @@ -275,7 +275,7 @@ test("SET_SITE default state", () => { test("SET_SITE ignore empty", () => { const state = { password: { - "site": "www.example.org" + site: "www.example.org" }, passwords: [], defaultPassword @@ -288,8 +288,8 @@ test("SET_SITE ignore empty", () => { test("SET_SITE ignore if id set", () => { const state = { password: { - "id": "1", - "site": "www.example.org" + id: "1", + site: "www.example.org" }, passwords: [], defaultPassword