Compare commits
2 Commits
dependabot
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
| 337acb5448 | |||
| e019d5660b |
@@ -49,7 +49,7 @@
|
||||
"css-loader": "^4.2.0",
|
||||
"eslint": "7.6.0",
|
||||
"eslint-config-prettier": "^6.11.0",
|
||||
"eslint-plugin-jest": "^24.0.2",
|
||||
"eslint-plugin-jest": "^23.13.2",
|
||||
"eslint-plugin-prettier": "^3.1.3",
|
||||
"eslint-plugin-react": "^7.20.0",
|
||||
"file-loader": "^6.0.0",
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import axios from "axios"
|
||||
import { formatDate } from "utils"
|
||||
|
||||
const baseURL = subdomain => {
|
||||
const baseURL = (subdomain) => {
|
||||
if (process.env.NODE_ENV === "production") {
|
||||
return `https://${encodeURIComponent(subdomain)}.mocoapp.com/api/browser_extensions`
|
||||
} else {
|
||||
return `http://${encodeURIComponent(subdomain)}.mocoapp.localhost:3000/api/browser_extensions`
|
||||
return `https://${encodeURIComponent(subdomain)}.mocoapp.com/api/browser_extensions`
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@ export default class Client {
|
||||
})
|
||||
}
|
||||
|
||||
login = service =>
|
||||
login = (service) =>
|
||||
this.#client.post("session", {
|
||||
api_key: this.#apiKey,
|
||||
remote_service: service?.name,
|
||||
@@ -46,7 +46,7 @@ export default class Client {
|
||||
params: { date: `${formatDate(fromDate)}:${formatDate(toDate)}` },
|
||||
})
|
||||
|
||||
activitiesStatus = service => {
|
||||
activitiesStatus = (service) => {
|
||||
if (!service) {
|
||||
return Promise.resolve({ data: { hours: 0 } })
|
||||
}
|
||||
@@ -55,7 +55,7 @@ export default class Client {
|
||||
})
|
||||
}
|
||||
|
||||
createActivity = activity => this.#client.post("activities", { activity })
|
||||
createActivity = (activity) => this.#client.post("activities", { activity })
|
||||
|
||||
stopTimer = timedActivity => this.#client.get(`activities/${timedActivity.id}/stop_timer`)
|
||||
stopTimer = (timedActivity) => this.#client.get(`activities/${timedActivity.id}/stop_timer`)
|
||||
}
|
||||
|
||||
@@ -122,18 +122,31 @@ export default {
|
||||
allowHostOverride: false,
|
||||
},
|
||||
|
||||
wunderlist: {
|
||||
mstodo: {
|
||||
name: "wunderlist",
|
||||
host: "https://www.wunderlist.com",
|
||||
urlPatterns: [":host:/(webapp)#/tasks/:id(/*)"],
|
||||
host: "https://to-do.office.com",
|
||||
urlPatterns: [":host:/tasks/id/:id(*)"],
|
||||
description: (document) =>
|
||||
document
|
||||
.querySelector(".taskItem.selected .taskItem-titleWrapper-title")
|
||||
?.textContent?.trim(),
|
||||
projectId: projectIdentifierBySelector(".taskItem.selected .taskItem-titleWrapper-title"),
|
||||
.querySelector(".detailHeader")
|
||||
?.textContent?.replace(/^[^[]+\[/, "[")
|
||||
.replace(projectRegex, "")
|
||||
.trim(),
|
||||
projectId: projectIdentifierBySelector(".detailHeader"),
|
||||
allowHostOverride: false,
|
||||
},
|
||||
|
||||
gitbase: {
|
||||
name: "gitlab",
|
||||
host: "https://gitbase.de",
|
||||
urlPatterns: [":host:/:owner/:repo/issues/:id"],
|
||||
description: (document) =>
|
||||
document.querySelector("#issue-title")?.textContent?.replace(projectRegex, "").trim(),
|
||||
projectId: projectIdentifierBySelector(".select-project.list a"),
|
||||
allowHostOverride: false,
|
||||
},
|
||||
|
||||
/*
|
||||
"gitlab-mr": {
|
||||
name: "gitlab",
|
||||
host: "https://gitlab.com",
|
||||
@@ -161,6 +174,7 @@ export default {
|
||||
},
|
||||
allowHostOverride: true,
|
||||
},
|
||||
*/
|
||||
|
||||
monday: {
|
||||
name: "monday",
|
||||
|
||||
@@ -28,6 +28,8 @@ export function tabUpdated(tab, { messenger, settings }) {
|
||||
const service = matcher(tab.url)
|
||||
const apiClient = new ApiClient(settings)
|
||||
|
||||
// console.log(service)
|
||||
|
||||
if (service?.match?.id) {
|
||||
messenger.postMessage(tab, { type: "requestService" })
|
||||
|
||||
@@ -67,7 +69,7 @@ export function settingsChanged(settings, { messenger }) {
|
||||
queryTabs({ currentWindow: true })
|
||||
.then(reject(isBrowserTab))
|
||||
.then(
|
||||
forEach(tab => {
|
||||
forEach((tab) => {
|
||||
messenger.postMessage(tab, { type: "closePopup" })
|
||||
tabUpdated(tab, { settings, messenger })
|
||||
}),
|
||||
|
||||
@@ -20,7 +20,7 @@ module.exports = (env) => {
|
||||
...manifest,
|
||||
permissions: compact([
|
||||
...manifest.permissions,
|
||||
env.NODE_ENV === "development" ? "http://*.mocoapp.localhost/*" : null,
|
||||
env.NODE_ENV === "development" ? "https://*.mocoapp.com/*" : null,
|
||||
]),
|
||||
options_ui: {
|
||||
...manifest.options_ui,
|
||||
|
||||
@@ -21,7 +21,7 @@ module.exports = (env) => {
|
||||
...manifest,
|
||||
permissions: compact([
|
||||
...manifest.permissions,
|
||||
env.NODE_ENV === "development" ? "http://*.mocoapp.localhost/*" : null,
|
||||
env.NODE_ENV === "development" ? "https://*.mocoapp.com/*" : null,
|
||||
]),
|
||||
options_ui: {
|
||||
...manifest.options_ui,
|
||||
|
||||
61
yarn.lock
61
yarn.lock
@@ -1439,53 +1439,29 @@
|
||||
dependencies:
|
||||
"@types/yargs-parser" "*"
|
||||
|
||||
"@typescript-eslint/experimental-utils@^4.0.1":
|
||||
version "4.3.0"
|
||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-4.3.0.tgz#3f3c6c508e01b8050d51b016e7f7da0e3aefcb87"
|
||||
integrity sha512-cmmIK8shn3mxmhpKfzMMywqiEheyfXLV/+yPDnOTvQX/ztngx7Lg/OD26J8gTZfkLKUmaEBxO2jYP3keV7h2OQ==
|
||||
"@typescript-eslint/experimental-utils@^2.5.0":
|
||||
version "2.34.0"
|
||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-2.34.0.tgz#d3524b644cdb40eebceca67f8cf3e4cc9c8f980f"
|
||||
integrity sha512-eS6FTkq+wuMJ+sgtuNTtcqavWXqsflWcfBnlYhg/nS4aZ1leewkXGbvBhaapn1q6qf4M71bsR1tez5JTRMuqwA==
|
||||
dependencies:
|
||||
"@types/json-schema" "^7.0.3"
|
||||
"@typescript-eslint/scope-manager" "4.3.0"
|
||||
"@typescript-eslint/types" "4.3.0"
|
||||
"@typescript-eslint/typescript-estree" "4.3.0"
|
||||
"@typescript-eslint/typescript-estree" "2.34.0"
|
||||
eslint-scope "^5.0.0"
|
||||
eslint-utils "^2.0.0"
|
||||
|
||||
"@typescript-eslint/scope-manager@4.3.0":
|
||||
version "4.3.0"
|
||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-4.3.0.tgz#c743227e087545968080d2362cfb1273842cb6a7"
|
||||
integrity sha512-cTeyP5SCNE8QBRfc+Lgh4Xpzje46kNUhXYfc3pQWmJif92sjrFuHT9hH4rtOkDTo/si9Klw53yIr+djqGZS1ig==
|
||||
"@typescript-eslint/typescript-estree@2.34.0":
|
||||
version "2.34.0"
|
||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-2.34.0.tgz#14aeb6353b39ef0732cc7f1b8285294937cf37d5"
|
||||
integrity sha512-OMAr+nJWKdlVM9LOqCqh3pQQPwxHAN7Du8DR6dmwCrAmxtiXQnhHJ6tBNtf+cggqfo51SG/FCwnKhXCIM7hnVg==
|
||||
dependencies:
|
||||
"@typescript-eslint/types" "4.3.0"
|
||||
"@typescript-eslint/visitor-keys" "4.3.0"
|
||||
|
||||
"@typescript-eslint/types@4.3.0":
|
||||
version "4.3.0"
|
||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-4.3.0.tgz#1f0b2d5e140543e2614f06d48fb3ae95193c6ddf"
|
||||
integrity sha512-Cx9TpRvlRjOppGsU6Y6KcJnUDOelja2NNCX6AZwtVHRzaJkdytJWMuYiqi8mS35MRNA3cJSwDzXePfmhU6TANw==
|
||||
|
||||
"@typescript-eslint/typescript-estree@4.3.0":
|
||||
version "4.3.0"
|
||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-4.3.0.tgz#0edc1068e6b2e4c7fdc54d61e329fce76241cee8"
|
||||
integrity sha512-ZAI7xjkl+oFdLV/COEz2tAbQbR3XfgqHEGy0rlUXzfGQic6EBCR4s2+WS3cmTPG69aaZckEucBoTxW9PhzHxxw==
|
||||
dependencies:
|
||||
"@typescript-eslint/types" "4.3.0"
|
||||
"@typescript-eslint/visitor-keys" "4.3.0"
|
||||
debug "^4.1.1"
|
||||
globby "^11.0.1"
|
||||
eslint-visitor-keys "^1.1.0"
|
||||
glob "^7.1.6"
|
||||
is-glob "^4.0.1"
|
||||
lodash "^4.17.15"
|
||||
semver "^7.3.2"
|
||||
tsutils "^3.17.1"
|
||||
|
||||
"@typescript-eslint/visitor-keys@4.3.0":
|
||||
version "4.3.0"
|
||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-4.3.0.tgz#0e5ab0a09552903edeae205982e8521e17635ae0"
|
||||
integrity sha512-xZxkuR7XLM6RhvLkgv9yYlTcBHnTULzfnw4i6+z2TGBLy9yljAypQaZl9c3zFvy7PNI7fYWyvKYtohyF8au3cw==
|
||||
dependencies:
|
||||
"@typescript-eslint/types" "4.3.0"
|
||||
eslint-visitor-keys "^2.0.0"
|
||||
|
||||
"@webassemblyjs/ast@1.9.0":
|
||||
version "1.9.0"
|
||||
resolved "https://registry.yarnpkg.com/@webassemblyjs/ast/-/ast-1.9.0.tgz#bd850604b4042459a5a41cd7d338cbed695ed964"
|
||||
@@ -3330,12 +3306,12 @@ eslint-config-prettier@^6.11.0:
|
||||
dependencies:
|
||||
get-stdin "^6.0.0"
|
||||
|
||||
eslint-plugin-jest@^24.0.2:
|
||||
version "24.0.2"
|
||||
resolved "https://registry.yarnpkg.com/eslint-plugin-jest/-/eslint-plugin-jest-24.0.2.tgz#4bf0fcdc86289d702a7dacb430b4363482af773b"
|
||||
integrity sha512-DSBLNpkKDOpUJQkTGSs5sVJWsu0nDyQ2rYxkr0Eh7nrkc5bMUr/dlDbtTj3l8y6UaCVsem6rryF1OZrKnz1S5g==
|
||||
eslint-plugin-jest@^23.13.2:
|
||||
version "23.20.0"
|
||||
resolved "https://registry.yarnpkg.com/eslint-plugin-jest/-/eslint-plugin-jest-23.20.0.tgz#e1d69c75f639e99d836642453c4e75ed22da4099"
|
||||
integrity sha512-+6BGQt85OREevBDWCvhqj1yYA4+BFK4XnRZSGJionuEYmcglMZYLNNBBemwzbqUAckURaHdJSBcjHPyrtypZOw==
|
||||
dependencies:
|
||||
"@typescript-eslint/experimental-utils" "^4.0.1"
|
||||
"@typescript-eslint/experimental-utils" "^2.5.0"
|
||||
|
||||
eslint-plugin-prettier@^3.1.3:
|
||||
version "3.1.4"
|
||||
@@ -3389,11 +3365,6 @@ eslint-visitor-keys@^1.0.0, eslint-visitor-keys@^1.1.0, eslint-visitor-keys@^1.3
|
||||
resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz#30ebd1ef7c2fdff01c3a4f151044af25fab0523e"
|
||||
integrity sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==
|
||||
|
||||
eslint-visitor-keys@^2.0.0:
|
||||
version "2.0.0"
|
||||
resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-2.0.0.tgz#21fdc8fbcd9c795cc0321f0563702095751511a8"
|
||||
integrity sha512-QudtT6av5WXels9WjIM7qz1XD1cWGvX4gGXvp/zBn9nXG02D0utdU3Em2m/QjTnrsk6bBjmCygl3rmj118msQQ==
|
||||
|
||||
eslint@7.6.0:
|
||||
version "7.6.0"
|
||||
resolved "https://registry.yarnpkg.com/eslint/-/eslint-7.6.0.tgz#522d67cfaea09724d96949c70e7a0550614d64d6"
|
||||
|
||||
Reference in New Issue
Block a user