From 9429ef80cb74c03ac7c5c7117dcd06341caac6c9 Mon Sep 17 00:00:00 2001 From: Ayush Gaud Date: Wed, 15 Nov 2023 03:57:07 +0900 Subject: [PATCH] compile --- resources/index.js | 17 +++++++++-------- resources/main.js | 17 +++++++++-------- 2 files changed, 18 insertions(+), 16 deletions(-) diff --git a/resources/index.js b/resources/index.js index 2a9f225..7d3b85f 100755 --- a/resources/index.js +++ b/resources/index.js @@ -12339,28 +12339,29 @@ wrike_ist.wrike.link_html=function(a){var b=cljs.core.__destructure_map(a);a=clj ': \x3ca href\x3d"',cljs.core.str.cljs$core$IFn$_invoke$arity$1(c),'"\x3e (#',cljs.core.str.cljs$core$IFn$_invoke$arity$1(a),")\x3c/a\x3e"].join(""):[wrike_ist.wrike.link_badge,cljs.core.str.cljs$core$IFn$_invoke$arity$1(e)," on branch ",cljs.core.str.cljs$core$IFn$_invoke$arity$1(d),': \x3ca href\x3d"',cljs.core.str.cljs$core$IFn$_invoke$arity$1(c),'"\x3e',cljs.core.str.cljs$core$IFn$_invoke$arity$1(b)," (#",cljs.core.str.cljs$core$IFn$_invoke$arity$1(a),")\x3c/a\x3e"].join("")}; wrike_ist.wrike.parse_body=function(a){return cljs.core.js__GT_clj.cljs$core$IFn$_invoke$arity$1(JSON.parse(cljs$cst$184$body.cljs$core$IFn$_invoke$arity$1(a)))}; wrike_ist.wrike.find_task=function(a){a=["https://www.wrike.com/api/v4/tasks?fields\x3d[parentIds]\x26permalink\x3d",cljs.core.str.cljs$core$IFn$_invoke$arity$1(encodeURIComponent(a))].join("");return httpurr.client.node.get(a,new cljs.core.PersistentArrayMap(null,1,[cljs$cst$183$headers,wrike_ist.wrike.headers()],null)).then(function(b){b=cljs.core.get_in.cljs$core$IFn$_invoke$arity$2(wrike_ist.wrike.parse_body(b),new cljs.core.PersistentVector(null,2,5,cljs.core.PersistentVector.EMPTY_NODE,["data", -0],null));if(cljs.core.truth_(b))return console.info("Task found"),Promise.resolve(b);console.error("Task not found");return Promise.reject(Error("Task not found"))})}; +0],null));if(cljs.core.truth_(b))return console.info("find-task: Task found"),Promise.resolve(b);console.error("find-task: Task not found");return Promise.reject(Error("find-task: Task not found"))})}; wrike_ist.wrike.get_folder_id=function(a){return httpurr.client.node.get("https://www.wrike.com/api/v4/folders",new cljs.core.PersistentArrayMap(null,1,[cljs$cst$183$headers,wrike_ist.wrike.headers()],null)).then(wrike_ist.wrike.parse_body).then(function(b){b=cljs.core.__destructure_map(b);b=cljs.core.get.cljs$core$IFn$_invoke$arity$2(b,"data");var c=clojure.string.split.cljs$core$IFn$_invoke$arity$2(a,/\s+/);b=cljs.core.filter.cljs$core$IFn$_invoke$arity$2(function(d){return cljs.core.contains_QMARK_(c, cljs$cst$209$title.cljs$core$IFn$_invoke$arity$1(d))},b);return cljs.core.seq(b)?cljs.core.map.cljs$core$IFn$_invoke$arity$2(cljs$cst$205$id,b):cljs.core.PersistentVector.EMPTY})}; wrike_ist.wrike.fetch_wrike_task=function(a){a=["https://www.wrike.com/api/v4/tasks/",cljs.core.str.cljs$core$IFn$_invoke$arity$1(a)].join("");var b=new cljs.core.PersistentArrayMap(null,1,[cljs$cst$183$headers,wrike_ist.wrike.headers()],null);a=wrike_ist.wrike.parse_body(httpurr.client.node.get(a,b));return cljs.core._EQ_.cljs$core$IFn$_invoke$arity$2(200,cljs$cst$109$status.cljs$core$IFn$_invoke$arity$1(a))?a:null}; wrike_ist.wrike.is_wrike_task_in_folder_QMARK_=function(a,b){wrike_ist.wrike.find_task(a);return function(c){c=cljs.core.__destructure_map(c);c=cljs.core.get.cljs$core$IFn$_invoke$arity$2(c,"task-id");c=["https://www.wrike.com/api/v4/tasks/",cljs.core.str.cljs$core$IFn$_invoke$arity$1(c)].join("");return httpurr.client.node.get(c,new cljs.core.PersistentArrayMap(null,1,[cljs$cst$183$headers,wrike_ist.wrike.headers()],null)).then(wrike_ist.wrike.parse_body).then(function(d){if(cljs.core.contains_QMARK_(cljs$cst$210$folders.cljs$core$IFn$_invoke$arity$1(d), -b))return console.log("Task is in the folder or an inherited folder: true"),!0;d=cljs$cst$211$parentIds.cljs$core$IFn$_invoke$arity$1(d);if(cljs.core.truth_(d))return console.log("Task is in the folder or an inherited folder: true"),cljs.core.some(function(e){return cljs.core.contains_QMARK_(cljs$cst$210$folders.cljs$core$IFn$_invoke$arity$1(wrike_ist.wrike.fetch_wrike_task(e)),b)},d);console.log("Task is not in the folder or an inherited folder: false");return!1})}}; -wrike_ist.wrike.check_valid_task=function(a){var b=cljs.core.__destructure_map(a);a=cljs.core.get.cljs$core$IFn$_invoke$arity$2(b,cljs$cst$212$permalink);var c=cljs.core.get.cljs$core$IFn$_invoke$arity$2(b,cljs$cst$207$target_branch);b=cljs.core.get.cljs$core$IFn$_invoke$arity$2(b,cljs$cst$213$folder_names);var d=cljs.core,e=d.truth_;c=cljs.core.truth_(c)?clojure.string.starts_with_QMARK_(c,"release"):c;if(e.call(d,c)){c=wrike_ist.wrike.get_folder_id(b);if(cljs.core.seq(c)){if(cljs.core.truth_(wrike_ist.wrike.is_wrike_task_in_folder_QMARK_(a, -cljs.core.first(c))))return console.info("Task is in the folder or an inherited folder: true"),Promise.resolve(a);console.error("Task not found");return Promise.reject(Error("Task not found"))}console.error("No matching folder found");return Promise.reject(Error("No matching folder found"))}return null}; +b))return console.log("is-wrike-task-in-folder?: Task is in the folder or an inherited folder: true"),!0;d=cljs$cst$211$parentIds.cljs$core$IFn$_invoke$arity$1(d);if(cljs.core.truth_(d))return console.log("is-wrike-task-in-folder?: Task is in the folder or an inherited folder: true"),cljs.core.some(function(e){return cljs.core.contains_QMARK_(cljs$cst$210$folders.cljs$core$IFn$_invoke$arity$1(wrike_ist.wrike.fetch_wrike_task(e)),b)},d);console.log("is-wrike-task-in-folder?: Task is not in the folder or an inherited folder: false"); +return!1})}}; +wrike_ist.wrike.check_valid_task=function(a){var b=cljs.core.__destructure_map(a);a=cljs.core.get.cljs$core$IFn$_invoke$arity$2(b,cljs$cst$212$permalink);var c=cljs.core.get.cljs$core$IFn$_invoke$arity$2(b,cljs$cst$207$target_branch);b=cljs.core.get.cljs$core$IFn$_invoke$arity$2(b,cljs$cst$213$folder_names);var d=cljs.core,e=d.truth_;c=cljs.core.truth_(c)?clojure.string.starts_with_QMARK_(c,"release"):c;if(e.call(d,c)){c=wrike_ist.wrike.get_folder_id(b);if(cljs.core.seq(c)){if(cljs.core.truth_(wrike_ist.wrike.is_wrike_task_in_folder_QMARK_(a,cljs.core.first(c))))return console.info("check-valid-task: Task is in the folder or an inherited folder: true"), +Promise.resolve(a);console.error("check-valid-task: Task not found");return Promise.reject(Error("Task not found"))}console.error("check-valid-task: No matching folder found");return Promise.reject(Error("check-valid-task: No matching folder found"))}return null}; wrike_ist.wrike.link_pr=function(a){var b=cljs.core.__destructure_map(a),c=cljs.core.get.cljs$core$IFn$_invoke$arity$2(b,cljs$cst$206$pr_url);a=cljs.core.get.cljs$core$IFn$_invoke$arity$2(b,cljs$cst$212$permalink);return wrike_ist.wrike.find_task(a).then(function(d){d=cljs.core.__destructure_map(d);d=cljs.core.get.cljs$core$IFn$_invoke$arity$2(d,"id");var e=["https://www.wrike.com/api/v4/tasks/",cljs.core.str.cljs$core$IFn$_invoke$arity$1(d),"/comments"].join("");return httpurr.client.node.get(e, new cljs.core.PersistentArrayMap(null,1,[cljs$cst$183$headers,wrike_ist.wrike.headers()],null)).then(function(f){return cljs.core.reduce.cljs$core$IFn$_invoke$arity$3(function(g,h){return cljs.core.truth_(cljs.core.get.cljs$core$IFn$_invoke$arity$2(h,"text").includes(c))?cljs.core.reduced(Promise.reject(cljs$cst$214$present)):g},Promise.resolve(),cljs.core.get.cljs$core$IFn$_invoke$arity$2(wrike_ist.wrike.parse_body(f),"data"))}).then(function(){var f=function(h){h=wrike_ist.wrike.link_html(b);h= cljs.core.clj__GT_js(new cljs.core.PersistentArrayMap(null,2,[cljs$cst$215$text,h,cljs$cst$216$plainText,!1],null));return httpurr.client.node.post(e,new cljs.core.PersistentArrayMap(null,2,[cljs$cst$183$headers,wrike_ist.wrike.headers(),cljs$cst$184$body,JSON.stringify(h)],null))},g=function(h){var k=null;if(0