From a6e7e172fe65fb37933b836fd22a2a0b93108bbd Mon Sep 17 00:00:00 2001 From: aperez Date: Thu, 12 Dec 2024 09:32:49 +0100 Subject: [PATCH] First push --- .editorconfig | 10 + .eslintignore | 3 + .eslintrc | 23 ++ .gitignore | 22 ++ .npmrc | 1 + README.md | 30 ++- esbuild.config.mjs | 49 ++++ main.ts | 649 +++++++++++++++++++++++++++++++++++++++++++++ manifest.json | 9 + package.json | 25 ++ styles.css | 8 + tsconfig.json | 24 ++ version-bump.mjs | 14 + versions.json | 3 + yarn.lock | 517 ++++++++++++++++++++++++++++++++++++ 15 files changed, 1385 insertions(+), 2 deletions(-) create mode 100644 .editorconfig create mode 100644 .eslintignore create mode 100644 .eslintrc create mode 100644 .gitignore create mode 100644 .npmrc create mode 100644 esbuild.config.mjs create mode 100644 main.ts create mode 100644 manifest.json create mode 100644 package.json create mode 100644 styles.css create mode 100644 tsconfig.json create mode 100644 version-bump.mjs create mode 100644 versions.json create mode 100644 yarn.lock diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..81f3ec3 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,10 @@ +# top-most EditorConfig file +root = true + +[*] +charset = utf-8 +end_of_line = lf +insert_final_newline = true +indent_style = tab +indent_size = 4 +tab_width = 4 diff --git a/.eslintignore b/.eslintignore new file mode 100644 index 0000000..e019f3c --- /dev/null +++ b/.eslintignore @@ -0,0 +1,3 @@ +node_modules/ + +main.js diff --git a/.eslintrc b/.eslintrc new file mode 100644 index 0000000..0807290 --- /dev/null +++ b/.eslintrc @@ -0,0 +1,23 @@ +{ + "root": true, + "parser": "@typescript-eslint/parser", + "env": { "node": true }, + "plugins": [ + "@typescript-eslint" + ], + "extends": [ + "eslint:recommended", + "plugin:@typescript-eslint/eslint-recommended", + "plugin:@typescript-eslint/recommended" + ], + "parserOptions": { + "sourceType": "module" + }, + "rules": { + "no-unused-vars": "off", + "@typescript-eslint/no-unused-vars": ["error", { "args": "none" }], + "@typescript-eslint/ban-ts-comment": "off", + "no-prototype-builtins": "off", + "@typescript-eslint/no-empty-function": "off" + } + } \ No newline at end of file diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..386ac2b --- /dev/null +++ b/.gitignore @@ -0,0 +1,22 @@ +# vscode +.vscode + +# Intellij +*.iml +.idea + +# npm +node_modules + +# Don't include the compiled main.js file in the repo. +# They should be uploaded to GitHub releases instead. +main.js + +# Exclude sourcemaps +*.map + +# obsidian +data.json + +# Exclude macOS Finder (System Explorer) View States +.DS_Store diff --git a/.npmrc b/.npmrc new file mode 100644 index 0000000..b973752 --- /dev/null +++ b/.npmrc @@ -0,0 +1 @@ +tag-version-prefix="" \ No newline at end of file diff --git a/README.md b/README.md index 1532668..b334a15 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,28 @@ -# obsidian-to-jira -Obisdian plugin to update and creating of Jira issues from Obsidian directly +# Obsidian to Jira Plugin + +This plugins supports creating and updating jira issues from obsidian using the command palette, there are 3 commands: + +- Import issue from Jira: Let you import a issue information to a MD file inside a new jira-issues directory (There is a ribbon icon for this too) +- Update issue to Jira: Let you update a issue to Jira, with a key, priority and summary from the frontmatter. +- Create issue in Jira: Let you create a issue to Jira, with a priority and summary from the frontmatter. Will let you choose with suggests modals the project and issue type. + +## Configuration + +Is required the following information for authentication and to know the url to the api. + +- Username +- Password +- Url + +## How to use + +- Clone this repo. +- Make sure your NodeJS is at least v16 (`node --version`). +- `npm i` or `yarn` to install dependencies. +- `npm run dev` to start compilation in watch mode. + +## Manually installing the plugin + +- Copy over `main.js`, `styles.css`, `manifest.json` to your vault `VaultFolder/.obsidian/plugins/your-plugin-id/`. + + diff --git a/esbuild.config.mjs b/esbuild.config.mjs new file mode 100644 index 0000000..a5de8b8 --- /dev/null +++ b/esbuild.config.mjs @@ -0,0 +1,49 @@ +import esbuild from "esbuild"; +import process from "process"; +import builtins from "builtin-modules"; + +const banner = +`/* +THIS IS A GENERATED/BUNDLED FILE BY ESBUILD +if you want to view the source, please visit the github repository of this plugin +*/ +`; + +const prod = (process.argv[2] === "production"); + +const context = await esbuild.context({ + banner: { + js: banner, + }, + entryPoints: ["main.ts"], + bundle: true, + external: [ + "obsidian", + "electron", + "@codemirror/autocomplete", + "@codemirror/collab", + "@codemirror/commands", + "@codemirror/language", + "@codemirror/lint", + "@codemirror/search", + "@codemirror/state", + "@codemirror/view", + "@lezer/common", + "@lezer/highlight", + "@lezer/lr", + ...builtins], + format: "cjs", + target: "es2018", + logLevel: "info", + sourcemap: prod ? false : "inline", + treeShaking: true, + outfile: "main.js", + minify: prod, +}); + +if (prod) { + await context.rebuild(); + process.exit(0); +} else { + await context.watch(); +} diff --git a/main.ts b/main.ts new file mode 100644 index 0000000..f9f95d6 --- /dev/null +++ b/main.ts @@ -0,0 +1,649 @@ +import { + App, + MarkdownView, + Modal, + Notice, + Plugin, + PluginSettingTab, + Setting, + requestUrl, + SuggestModal, +} from "obsidian"; +// Remember to rename these classes and interfaces! +interface MyPluginSettings { + username: string; + password: string; + jiraUrl: string; +} + +interface project { + name: string; + id: string; +} +interface type { + name: string; +} +let ALL_PROJECTS: any[] = []; +let ALL_TYPES: any[] = []; +export default class MyPlugin extends Plugin { + settings: MyPluginSettings; + async onload() { + await this.loadSettings(); + // Start the local proxy server + // This creates an icon in the left ribbon. + this.addRibbonIcon( + "file-down", + "Import issue from Jira", + (evt: MouseEvent) => { + // Called when the user clicks the icon. + this.openIssue() + } + ); + + // This adds a update command that can be triggered anywhere + this.addCommand({ + id: "update-issue-jira", + name: "Update issue to Jira", + callback: async () => { + try { + if (this.settings.username && this.settings.password && this.settings.jiraUrl) { + const response = await requestUrl({ + url: this.settings.jiraUrl + "/rest/auth/1/session", + method: "post", + body: JSON.stringify({ + username: this.settings.username, + password: this.settings.password, + }), + contentType: "application/json", + headers: { + "Content-type": "application/json", + Origin: this.settings.jiraUrl + }, + }); + + localStorage.setItem("cookie", response.json.session.value); + const file = this.app.workspace.getActiveFile(); + let issueKey = '' + let issueSummary = '' + let priority = '' + if (file) { + this.app.fileManager.processFrontMatter(file, (frontmatter) => { + issueKey = frontmatter['key'] + issueSummary = frontmatter['summary'] + if (frontmatter['priority']) { + priority = frontmatter['priority'].charAt(0).toUpperCase() + frontmatter['priority'].slice(1).toLowerCase(); + } + }).then(async () => { + const view = this.app.workspace.getActiveViewOfType(MarkdownView); + const issueDescription = view?.getViewData().replace(/---.*?---/gs, "").trim() + await requestUrl({ + url: this.settings.jiraUrl + "/rest/api/2/issue/" + issueKey, + method: "put", + headers: { Cookie: "JSESSIONID=" + localStorage.getItem("cookie"), contentType: "application/json", Origin: "http://cm.amplia.es" }, + contentType: "application/json", + body: JSON.stringify({ + fields: { + description: markdownToJira(issueDescription || ''), + summary: issueSummary, + priority: { + name: priority + } + } + }) + }); + + } + ) + } + + new Notice("Issue updated successfully"); + } else { + new Notice("Please configure Jira username, password and url in plugin settings"); + } + + } catch { + new Notice("Error updating issue"); + } + }, + }); + this.addCommand({ + id: "get-issue-jira", + name: "Get issue from Jira", + callback: async () => { + this.openIssue() + }, + }); + this.addCommand({ + id: "create-issue-jira", + name: "Create issue in Jira", + callback: async () => { + try { + if (this.settings.username && this.settings.password && this.settings.jiraUrl) { + const response = await requestUrl({ + url: this.settings.jiraUrl + "/rest/auth/1/session", + method: "post", + body: JSON.stringify({ + username: this.settings.username, + password: this.settings.password, + }), + contentType: "application/json", + headers: { + "Content-type": "application/json", + Origin: this.settings.jiraUrl + }, + }); + + localStorage.setItem("cookie", response.json.session.value); + const file = this.app.workspace.getActiveFile(); + let issueSummary = '' + if (file) { + this.app.fileManager.processFrontMatter(file, (frontmatter) => { + issueSummary = frontmatter['summary'] + }).then(async () => { + if (issueSummary) { + const view = this.app.workspace.getActiveViewOfType(MarkdownView); + const projects = await requestUrl({ + url: this.settings.jiraUrl + "/rest/api/2/project", + method: "get", + headers: { Cookie: "JSESSIONID=" + localStorage.getItem("cookie"), contentType: "application/json", Origin: this.settings.jiraUrl }, + }); + ALL_PROJECTS = projects.json.map((project: { key: any; name: any; }) => { + return { + id: project.key, + name: project.name + } + }) + await new ProjectModal(this.app, async (project) => { + const types = await requestUrl({ + url: this.settings.jiraUrl + "/rest/api/2/issue/createmeta/" + project + '/issuetypes', + method: "get", + headers: { Cookie: "JSESSIONID=" + localStorage.getItem("cookie"), contentType: "application/json", Origin: this.settings.jiraUrl }, + }); + ALL_TYPES = types.json.values.map((type: { name: any; }) => { + return { + name: type.name + } + + }) + await new TypeModal(this.app, (type) => { + try { + const file = this.app.workspace.getActiveFile(); + let issueSummary = '' + let priority = '' + if (file) { + this.app.fileManager.processFrontMatter(file, (frontmatter) => { + issueSummary = frontmatter['summary'] + if (frontmatter['priority']) { + priority = frontmatter['priority'].charAt(0).toUpperCase() + frontmatter['priority'].slice(1).toLowerCase(); + } + }).then(async () => { + try { + const issueDescription = view?.getViewData().replace(/---.*?---/gs, "").trim() + const response = await requestUrl({ + url: this.settings.jiraUrl + "/rest/api/2/issue/", + method: "post", + headers: { Cookie: "JSESSIONID=" + localStorage.getItem("cookie"), contentType: "application/json", Origin: this.settings.jiraUrl }, + contentType: "application/json", + body: JSON.stringify({ + fields: { + description: markdownToJira(issueDescription || ''), + summary: issueSummary, + project: { + key: project + }, + issuetype: { + name: type + }, priority: { + name: priority + } + } + + }) + }); + this.app.fileManager.processFrontMatter(file, (frontmatter) => { + frontmatter['key'] = response.json.key + }) + new Notice("Issue create successfully"); + } catch (err) { + new Notice("Error creating issue"); + } + } + ) + } else { + + } + + } catch (err) { + new Notice("Error creating issue"); + } + }).open(); + }).open(); + } else { + new Notice("Please set a summary in the frontMatter for the task"); + } + + } + ) + } + + } else { + new Notice("Please configure Jira username, password and url in settings"); + } + + } catch { + new Notice("Error updating issue"); + } + }, + }); + this.addSettingTab(new JiraSettingTab(this.app, this)); + + } + openIssue() { + new selectIssueModal(this.app, async (issue) => { + try { + if (this.settings.username && this.settings.password && this.settings.jiraUrl) { + const response = await requestUrl({ + url: this.settings.jiraUrl + "/rest/auth/1/session", + method: "post", + body: JSON.stringify({ + username: this.settings.username, + password: this.settings.password, + }), + contentType: "application/json", + headers: { + "Content-type": "application/json", + Origin: this.settings.jiraUrl + }, + }); + localStorage.setItem("cookie", response.json.session.value); + const responseIssue = await requestUrl({ + url: this.settings.jiraUrl + "/rest/api/2/issue/" + issue, + headers: { Cookie: "JSESSIONID=" + localStorage.getItem("cookie") }, + }); + const folder = await this.app.vault.getFolderByPath('jira-issues') + const route = 'jira-issues/' + responseIssue.json.fields.summary + '.md' + if (!folder) { + await this.app.vault.createFolder('jira-issues') + } + const file = await this.app.vault.getFileByPath(route) + if (file) { + await this.app.vault.delete(file) + } + await this.app.vault.create(route, '') + await this.app.workspace.openLinkText(route, "") + const view = this.app.workspace.getActiveViewOfType(MarkdownView); + if (responseIssue.json.fields.description !== null) { + const mk = jiraToMarkdown(responseIssue.json.fields.description) + view?.setViewData(mk, false) + } else { + view?.setViewData('', false) + } + if (view && view.file) { + await this.app.fileManager.processFrontMatter(view.file, (frontmatter) => { + frontmatter['key'] = issue + frontmatter['summary'] = responseIssue.json.fields.summary + frontmatter['priority'] = responseIssue.json.fields.priority.name + }) + const contenido = await this.app.vault.read(view.file); + const partes = contenido.split(/^---\n([\s\S]*?)\n---\n/m); + let nuevoTexto; + let nuevoContenido; + if (responseIssue.json.fields.description !== null) { + nuevoContenido = jiraToMarkdown(responseIssue.json.fields.description) + } else { + nuevoContenido = '' + } + if (partes.length > 1) { + // Tiene frontmatter + const frontmatter = `---\n${partes[1]}\n---\n`; + const cuerpo = partes[2] || ""; + nuevoTexto = frontmatter + nuevoContenido; // Mantén el frontmatter intacto y actualiza el cuerpo + } else { + // No tiene frontmatter, reemplaza todo + nuevoTexto = nuevoContenido; + } + + view.editor.setValue(nuevoTexto) + } + + + + } else { + new Notice("Please configure Jira username, password and url in plugin settings"); + } + + } catch { + new Notice("Error retrieving issue"); + } + }).open(); + } + onunload() { } + + async loadSettings() { + this.settings = Object.assign( + {}, + await this.loadData() + ); + } + + async saveSettings() { + await this.saveData(this.settings); + } +} + +class selectIssueModal extends Modal { + constructor(app: App, onSubmit: (result: string) => void) { + super(app); + this.setTitle('Search issue for key'); + + let name = ''; + new Setting(this.contentEl) + .setName('Key') + .addText((text) => + text.onChange((value) => { + name = value; + })); + + new Setting(this.contentEl) + .addButton((btn) => + btn. + setButtonText('Search') + .setCta() + .onClick(() => { + this.close(); + onSubmit(name); + }) + ); + this.contentEl.addEventListener("keydown", (event) => { + if (event.key === "Enter") { + event.preventDefault(); // Previene comportamiento por defecto si es necesario + onSubmit(name); + this.close(); + } + }) + + } +} +class ProjectModal extends SuggestModal { + onSubmit: (result: string) => void; + constructor(app: App, onSubmit: (result: string) => void) { + super(app); + this.onSubmit = onSubmit; + } + // Returns all available suggestions. + getSuggestions(query: string): project[] { + return ALL_PROJECTS.filter((project) => + project.id.toLowerCase().includes(query.toLowerCase()) || project.name.toLowerCase().includes(query.toLowerCase()) + ); + } + + // Renders each suggestion item. + renderSuggestion(project: project, el: HTMLElement) { + el.createEl('div', { text: project.name }); + el.createEl('small', { text: project.id }); + } + + // Perform action on the selected suggestion. + async onChooseSuggestion(project: project, evt: MouseEvent | KeyboardEvent) { + this.onSubmit(project.id); + } +} +class TypeModal extends SuggestModal { + onSubmit: (result: string) => void; + constructor(app: App, onSubmit: (result: string) => void) { + super(app); + this.onSubmit = onSubmit; + } + renderSuggestion(type: type, el: HTMLElement) { + el.createEl('div', { text: type.name }); + } + + // Returns all available suggestions. + getSuggestions(query: string): type[] { + return ALL_TYPES.filter((type) => + type.name.toLowerCase().includes(query.toLowerCase()) + ); + } + + // Renders each suggestion item. + + // Perform action on the selected suggestion. + async onChooseSuggestion(type: type, evt: MouseEvent | KeyboardEvent) { + this.onSubmit(type.name) + } +} +class JiraSettingTab extends PluginSettingTab { + plugin: MyPlugin; + + constructor(app: App, plugin: MyPlugin) { + super(app, plugin); + this.plugin = plugin; + } + + display(): void { + const { containerEl } = this; + + containerEl.empty(); + + new Setting(containerEl) + .setName("Jira Username") + .addText((text) => + text + .setPlaceholder("Username") + .setValue(this.plugin.settings.username) + .onChange(async (value) => { + this.plugin.settings.username = value; + await this.plugin.saveSettings(); + }) + ); + new Setting(containerEl) + .setName("Jira Password") + .addText((text) => { + text.inputEl.type = "password"; + text + .setPlaceholder("Password") + .setValue(this.plugin.settings.password) + .onChange(async (value) => { + this.plugin.settings.password = value; + await this.plugin.saveSettings(); + }) + + } + ); + new Setting(containerEl) + .setName("Jira url") + .addText((text) => + text + .setPlaceholder("Url") + .setValue(this.plugin.settings.jiraUrl) + .onChange(async (value) => { + this.plugin.settings.jiraUrl = value; + await this.plugin.saveSettings(); + }) + ); + } +} +function markdownToJira(str: string) { + const map: Object = { + // cite: '??', + del: "-", + ins: "+", + sup: "^", + sub: "~", + }; + + return ( + str + // Tables + .replace( + /^(\|[^\n]+\|\r?\n)((?:\|\s*:?[-]+:?\s*)+\|)(\n(?:\|[^\n]+\|\r?\n?)*)?$/gm, + ( + match: any, + headerLine: string, + separatorLine: string, + rowstr: string + ) => { + const headers = headerLine.match(/[^|]+(?=\|)/g) || []; + const separators = + separatorLine.match(/[^|]+(?=\|)/g) || []; + if (headers.length !== separators.length) return match; + + const rows = rowstr.split("\n"); + if (rows.length === 2 && headers.length === 1) + // Panel + return `{panel:title=${headers[0].trim()}}\n${rowstr + .replace(/^\|(.*)[ \t]*\|/, "$1") + .trim()}\n{panel}\n`; + + return `||${headers.join("||")}||${rowstr}`; + } + ) + // Bold, Italic, and Combined (bold+italic) + .replace( + /([*_]+)(\S.*?)\1/g, + (match: any, wrapper: string | any[], content: any) => { + switch (wrapper.length) { + case 1: + return `_${content}_`; + case 2: + return `*${content}*`; + case 3: + return `_*${content}*_`; + default: + return wrapper + content + wrapper; + } + } + ) + // All Headers (# format) + .replace( + /^([#]+)(.*?)$/gm, + (match: any, level: string | any[], content: any) => { + return `h${level.length}.${content}`; + } + ) + // Headers (H1 and H2 underlines) + .replace( + /^(.*?)\n([=-]+)$/gm, + (match: any, content: any, level: string[]) => { + return `h${level[0] === "=" ? 1 : 2}. ${content}`; + } + ) + // Ordered lists + .replace( + /^([ \t]*)\d+\.\s+/gm, + (match: any, spaces: string | any[]) => { + return `${Array(Math.floor(spaces.length / 3) + 1) + .fill("#") + .join("")} `; + } + ) + // Un-Ordered Lists + .replace( + /^([ \t]*)\*\s+/gm, + (match: any, spaces: string | any[]) => { + return `${Array(Math.floor(spaces.length / 2 + 1)) + .fill("*") + .join("")} `; + } + ) + // Headers (h1 or h2) (lines "underlined" by ---- or =====) + // Citations, Inserts, Subscripts, Superscripts, and Strikethroughs + .replace( + new RegExp(`<(${Object.keys(map).join("|")})>(.*?)`, "g"), + (match: any, from: string | number, content: any) => { + const to = map[from as keyof Object]; + return to + content + to; + } + ) + // Other kind of strikethrough + .replace(/(\s+)~~(.*?)~~(\s+)/g, "$1-$2-$3") + // Named/Un-Named Code Block + .replace( + /```(.+\n)?((?:.|\n)*?)```/g, + (match: any, synt: string, content: any) => { + let code = "{code}"; + if (synt) { + code = `{code:${synt.replace(/\n/g, "")}}\n`; + } + return `${code}${content}{code}`; + } + ) + // Inline-Preformatted Text + .replace(/`([^`]+)`/g, "{{$1}}") + // Images + .replace(/!\[[^\]]*\]\(([^)]+)\)/g, "!$1!") + // Named Link + .replace(/\[([^\]]+)\]\(([^)]+)\)/g, "[$1|$2]") + // Un-Named Link + .replace(/<([^>]+)>/g, "[$1]") + // Single Paragraph Blockquote + .replace(/^>/gm, "bq.") + ); +} +function jiraToMarkdown(str: string) { + return ( + str + // Un-Ordered Lists + .replace(/^[ \t]*(\*+)\s+/gm, (match: any, stars: any) => { + return `${Array(stars.length).join(' ')}* `; + }) + // Ordered lists + .replace(/^[ \t]*(#+)\s+/gm, (match: any, nums: any) => { + return `${Array(nums.length).join(' ')}1. `; + }) + // Headers 1-6 + .replace(/^h([0-6])\.(.*)$/gm, (match: any, level: any, content: any) => { + return Array(parseInt(level, 10) + 1).join('#') + content; + }) + // Bold + .replace(/\*(\S.*)\*/g, '**$1**') + // Italic + .replace(/_(\S.*)_/g, '*$1*') + // Monospaced text + .replace(/\{\{([^}]+)\}\}/g, '`$1`') + // Citations (buggy) + // .replace(/\?\?((?:.[^?]|[^?].)+)\?\?/g, '$1') + // Inserts + .replace(/\+([^+]*)\+/g, '$1') + // Superscript + .replace(/\^([^^]*)\^/g, '$1') + // Subscript + .replace(/~([^~]*)~/g, '$1') + // Strikethrough + .replace(/(\s+)-(\S+.*?\S)-(\s+)/g, '$1~~$2~~$3') + // Code Block + .replace( + /\{code(:([a-z]+))?([:|]?(title|borderStyle|borderColor|borderWidth|bgColor|titleBGColor)=.+?)*\}([^]*?)\n?\{code\}/gm, + '```$2$5\n```' + ) + // Pre-formatted text + .replace(/{noformat}/g, '```') + // Un-named Links + .replace(/\[([^|]+?)\]/g, '<$1>') + // Images + .replace(/!(.+)!/g, '![]($1)') + // Named Links + .replace(/\[(.+?)\|(.+?)\]/g, '[$1]($2)') + // Single Paragraph Blockquote + .replace(/^bq\.\s+/gm, '> ') + // Remove color: unsupported in md + .replace(/\{color:[^}]+\}([^]*?)\{color\}/gm, '$1') + // panel into table + .replace(/\{panel:title=([^}]*)\}\n?([^]*?)\n?\{panel\}/gm, '\n| $1 |\n| --- |\n| $2 |') + // table header + .replace(/^[ \t]*((?:\|\|.*?)+\|\|)[ \t]*$/gm, (match: any, headers: any) => { + const singleBarred = headers.replace(/\|\|/g, '|'); + return `${singleBarred}\n${singleBarred.replace(/\|[^|]+/g, '| --- ')}`; + }) + // remove leading-space of table headers and rows + .replace(/^[ \t]*\|/gm, '|') + ); + // // remove unterminated inserts across table cells + // .replace(/\|([^<]*)(?![^|]*<\/ins>)([^|]*)\|/g, (_, preceding, following) => { + // return `|${preceding}+${following}|`; + // }) + // // remove unopened inserts across table cells + // .replace(/\|(?)([^<]*)<\/ins>([^|]*)\|/g, (_, preceding, following) => { + // return `|${preceding}+${following}|`; + // }); +}; diff --git a/manifest.json b/manifest.json new file mode 100644 index 0000000..ca711bd --- /dev/null +++ b/manifest.json @@ -0,0 +1,9 @@ +{ + "id": "obsidian-to-jira-plugin", + "name": "Obsidian to Jira", + "version": "1.0.0", + "minAppVersion": "1.7.7", + "description": "Update and creating of Jira issues from Obsidian directly", + "author": "Amplia", + "isDesktopOnly": false +} diff --git a/package.json b/package.json new file mode 100644 index 0000000..e21389c --- /dev/null +++ b/package.json @@ -0,0 +1,25 @@ +{ + "name": "obsidian-sample-plugin", + "version": "1.0.0", + "description": "This is a sample plugin for Obsidian (https://obsidian.md)", + "main": "main.js", + "scripts": { + "dev": "node esbuild.config.mjs", + "build": "tsc -noEmit -skipLibCheck && node esbuild.config.mjs production", + "version": "node version-bump.mjs && git add manifest.json versions.json" + }, + "keywords": [], + "author": "", + "license": "MIT", + "devDependencies": { + "@types/node": "^16.11.6", + "@typescript-eslint/eslint-plugin": "5.29.0", + "@typescript-eslint/parser": "5.29.0", + "builtin-modules": "3.3.0", + "esbuild": "0.17.3", + "obsidian": "latest", + "tslib": "2.4.0", + "typescript": "4.7.4" + }, + "dependencies": {} +} diff --git a/styles.css b/styles.css new file mode 100644 index 0000000..71cc60f --- /dev/null +++ b/styles.css @@ -0,0 +1,8 @@ +/* + +This CSS file will be included with your plugin, and +available in the app when your plugin is enabled. + +If your plugin does not need CSS, delete this file. + +*/ diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 0000000..2373fed --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "baseUrl": ".", + "inlineSourceMap": true, + "inlineSources": true, + "module": "node16", + "target": "ES2018", + "allowJs": true, + "noImplicitAny": true, + "moduleResolution": "node16", + "importHelpers": true, + "isolatedModules": false, + "strictNullChecks": true, + "lib": [ + "DOM", + "ES5", + "ES6", + "ES7" + ] + }, + "include": [ + "**/*.ts" + ] +} diff --git a/version-bump.mjs b/version-bump.mjs new file mode 100644 index 0000000..d409fa0 --- /dev/null +++ b/version-bump.mjs @@ -0,0 +1,14 @@ +import { readFileSync, writeFileSync } from "fs"; + +const targetVersion = process.env.npm_package_version; + +// read minAppVersion from manifest.json and bump version to target version +let manifest = JSON.parse(readFileSync("manifest.json", "utf8")); +const { minAppVersion } = manifest; +manifest.version = targetVersion; +writeFileSync("manifest.json", JSON.stringify(manifest, null, "\t")); + +// update versions.json with target version and minAppVersion from manifest.json +let versions = JSON.parse(readFileSync("versions.json", "utf8")); +versions[targetVersion] = minAppVersion; +writeFileSync("versions.json", JSON.stringify(versions, null, "\t")); diff --git a/versions.json b/versions.json new file mode 100644 index 0000000..26382a1 --- /dev/null +++ b/versions.json @@ -0,0 +1,3 @@ +{ + "1.0.0": "0.15.0" +} diff --git a/yarn.lock b/yarn.lock new file mode 100644 index 0000000..9db75f8 --- /dev/null +++ b/yarn.lock @@ -0,0 +1,517 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + +"@esbuild/android-arm64@0.17.3": + version "0.17.3" + resolved "https://registry.yarnpkg.com/@esbuild/android-arm64/-/android-arm64-0.17.3.tgz#35d045f69c9b4cf3f8efcd1ced24a560213d3346" + integrity sha512-XvJsYo3dO3Pi4kpalkyMvfQsjxPWHYjoX4MDiB/FUM4YMfWcXa5l4VCwFWVYI1+92yxqjuqrhNg0CZg3gSouyQ== + +"@esbuild/android-arm@0.17.3": + version "0.17.3" + resolved "https://registry.yarnpkg.com/@esbuild/android-arm/-/android-arm-0.17.3.tgz#4986d26306a7440078d42b3bf580d186ef714286" + integrity sha512-1Mlz934GvbgdDmt26rTLmf03cAgLg5HyOgJN+ZGCeP3Q9ynYTNMn2/LQxIl7Uy+o4K6Rfi2OuLsr12JQQR8gNg== + +"@esbuild/android-x64@0.17.3": + version "0.17.3" + resolved "https://registry.yarnpkg.com/@esbuild/android-x64/-/android-x64-0.17.3.tgz#a1928cd681e4055103384103c8bd34df7b9c7b19" + integrity sha512-nuV2CmLS07Gqh5/GrZLuqkU9Bm6H6vcCspM+zjp9TdQlxJtIe+qqEXQChmfc7nWdyr/yz3h45Utk1tUn8Cz5+A== + +"@esbuild/darwin-arm64@0.17.3": + version "0.17.3" + resolved "https://registry.yarnpkg.com/@esbuild/darwin-arm64/-/darwin-arm64-0.17.3.tgz#e4af2b392e5606a4808d3a78a99d38c27af39f1d" + integrity sha512-01Hxaaat6m0Xp9AXGM8mjFtqqwDjzlMP0eQq9zll9U85ttVALGCGDuEvra5Feu/NbP5AEP1MaopPwzsTcUq1cw== + +"@esbuild/darwin-x64@0.17.3": + version "0.17.3" + resolved "https://registry.yarnpkg.com/@esbuild/darwin-x64/-/darwin-x64-0.17.3.tgz#cbcbfb32c8d5c86953f215b48384287530c5a38e" + integrity sha512-Eo2gq0Q/er2muf8Z83X21UFoB7EU6/m3GNKvrhACJkjVThd0uA+8RfKpfNhuMCl1bKRfBzKOk6xaYKQZ4lZqvA== + +"@esbuild/freebsd-arm64@0.17.3": + version "0.17.3" + resolved "https://registry.yarnpkg.com/@esbuild/freebsd-arm64/-/freebsd-arm64-0.17.3.tgz#90ec1755abca4c3ffe1ad10819cd9d31deddcb89" + integrity sha512-CN62ESxaquP61n1ZjQP/jZte8CE09M6kNn3baos2SeUfdVBkWN5n6vGp2iKyb/bm/x4JQzEvJgRHLGd5F5b81w== + +"@esbuild/freebsd-x64@0.17.3": + version "0.17.3" + resolved "https://registry.yarnpkg.com/@esbuild/freebsd-x64/-/freebsd-x64-0.17.3.tgz#8760eedc466af253c3ed0dfa2940d0e59b8b0895" + integrity sha512-feq+K8TxIznZE+zhdVurF3WNJ/Sa35dQNYbaqM/wsCbWdzXr5lyq+AaTUSER2cUR+SXPnd/EY75EPRjf4s1SLg== + +"@esbuild/linux-arm64@0.17.3": + version "0.17.3" + resolved "https://registry.yarnpkg.com/@esbuild/linux-arm64/-/linux-arm64-0.17.3.tgz#13916fc8873115d7d546656e19037267b12d4567" + integrity sha512-JHeZXD4auLYBnrKn6JYJ0o5nWJI9PhChA/Nt0G4MvLaMrvXuWnY93R3a7PiXeJQphpL1nYsaMcoV2QtuvRnF/g== + +"@esbuild/linux-arm@0.17.3": + version "0.17.3" + resolved "https://registry.yarnpkg.com/@esbuild/linux-arm/-/linux-arm-0.17.3.tgz#15f876d127b244635ddc09eaaa65ae97bc472a63" + integrity sha512-CLP3EgyNuPcg2cshbwkqYy5bbAgK+VhyfMU7oIYyn+x4Y67xb5C5ylxsNUjRmr8BX+MW3YhVNm6Lq6FKtRTWHQ== + +"@esbuild/linux-ia32@0.17.3": + version "0.17.3" + resolved "https://registry.yarnpkg.com/@esbuild/linux-ia32/-/linux-ia32-0.17.3.tgz#6691f02555d45b698195c81c9070ab4e521ef005" + integrity sha512-FyXlD2ZjZqTFh0sOQxFDiWG1uQUEOLbEh9gKN/7pFxck5Vw0qjWSDqbn6C10GAa1rXJpwsntHcmLqydY9ST9ZA== + +"@esbuild/linux-loong64@0.17.3": + version "0.17.3" + resolved "https://registry.yarnpkg.com/@esbuild/linux-loong64/-/linux-loong64-0.17.3.tgz#f77ef657f222d8b3a8fbd530a09e40976c458d48" + integrity sha512-OrDGMvDBI2g7s04J8dh8/I7eSO+/E7nMDT2Z5IruBfUO/RiigF1OF6xoH33Dn4W/OwAWSUf1s2nXamb28ZklTA== + +"@esbuild/linux-mips64el@0.17.3": + version "0.17.3" + resolved "https://registry.yarnpkg.com/@esbuild/linux-mips64el/-/linux-mips64el-0.17.3.tgz#fa38833cfc8bfaadaa12b243257fe6d19d0f6f79" + integrity sha512-DcnUpXnVCJvmv0TzuLwKBC2nsQHle8EIiAJiJ+PipEVC16wHXaPEKP0EqN8WnBe0TPvMITOUlP2aiL5YMld+CQ== + +"@esbuild/linux-ppc64@0.17.3": + version "0.17.3" + resolved "https://registry.yarnpkg.com/@esbuild/linux-ppc64/-/linux-ppc64-0.17.3.tgz#c157a602b627c90d174743e4b0dfb7630b101dbf" + integrity sha512-BDYf/l1WVhWE+FHAW3FzZPtVlk9QsrwsxGzABmN4g8bTjmhazsId3h127pliDRRu5674k1Y2RWejbpN46N9ZhQ== + +"@esbuild/linux-riscv64@0.17.3": + version "0.17.3" + resolved "https://registry.yarnpkg.com/@esbuild/linux-riscv64/-/linux-riscv64-0.17.3.tgz#7bf79614bd544bd932839b1fcff6cf1f8f6bdf1a" + integrity sha512-WViAxWYMRIi+prTJTyV1wnqd2mS2cPqJlN85oscVhXdb/ZTFJdrpaqm/uDsZPGKHtbg5TuRX/ymKdOSk41YZow== + +"@esbuild/linux-s390x@0.17.3": + version "0.17.3" + resolved "https://registry.yarnpkg.com/@esbuild/linux-s390x/-/linux-s390x-0.17.3.tgz#6bb50c5a2613d31ce1137fe5c249ecadbecccdea" + integrity sha512-Iw8lkNHUC4oGP1O/KhumcVy77u2s6+KUjieUqzEU3XuWJqZ+AY7uVMrrCbAiwWTkpQHkr00BuXH5RpC6Sb/7Ug== + +"@esbuild/linux-x64@0.17.3": + version "0.17.3" + resolved "https://registry.yarnpkg.com/@esbuild/linux-x64/-/linux-x64-0.17.3.tgz#aa140d99f0d9e0af388024823bfe4558d73fbbf9" + integrity sha512-0AGkWQMzeoeAtXQRNB3s4J1/T2XbigM2/Mn2yU1tQSmQRmHIZdkGbVq2A3aDdNslPyhb9/lH0S5GMTZ4xsjBqg== + +"@esbuild/netbsd-x64@0.17.3": + version "0.17.3" + resolved "https://registry.yarnpkg.com/@esbuild/netbsd-x64/-/netbsd-x64-0.17.3.tgz#b6ae9948b03e4c95dc581c68358fb61d9d12a625" + integrity sha512-4+rR/WHOxIVh53UIQIICryjdoKdHsFZFD4zLSonJ9RRw7bhKzVyXbnRPsWSfwybYqw9sB7ots/SYyufL1mBpEg== + +"@esbuild/openbsd-x64@0.17.3": + version "0.17.3" + resolved "https://registry.yarnpkg.com/@esbuild/openbsd-x64/-/openbsd-x64-0.17.3.tgz#cda007233e211fc9154324bfa460540cfc469408" + integrity sha512-cVpWnkx9IYg99EjGxa5Gc0XmqumtAwK3aoz7O4Dii2vko+qXbkHoujWA68cqXjhh6TsLaQelfDO4MVnyr+ODeA== + +"@esbuild/sunos-x64@0.17.3": + version "0.17.3" + resolved "https://registry.yarnpkg.com/@esbuild/sunos-x64/-/sunos-x64-0.17.3.tgz#f1385b092000c662d360775f3fad80943d2169c4" + integrity sha512-RxmhKLbTCDAY2xOfrww6ieIZkZF+KBqG7S2Ako2SljKXRFi+0863PspK74QQ7JpmWwncChY25JTJSbVBYGQk2Q== + +"@esbuild/win32-arm64@0.17.3": + version "0.17.3" + resolved "https://registry.yarnpkg.com/@esbuild/win32-arm64/-/win32-arm64-0.17.3.tgz#14e9dd9b1b55aa991f80c120fef0c4492d918801" + integrity sha512-0r36VeEJ4efwmofxVJRXDjVRP2jTmv877zc+i+Pc7MNsIr38NfsjkQj23AfF7l0WbB+RQ7VUb+LDiqC/KY/M/A== + +"@esbuild/win32-ia32@0.17.3": + version "0.17.3" + resolved "https://registry.yarnpkg.com/@esbuild/win32-ia32/-/win32-ia32-0.17.3.tgz#de584423513d13304a6925e01233499a37a4e075" + integrity sha512-wgO6rc7uGStH22nur4aLFcq7Wh86bE9cOFmfTr/yxN3BXvDEdCSXyKkO+U5JIt53eTOgC47v9k/C1bITWL/Teg== + +"@esbuild/win32-x64@0.17.3": + version "0.17.3" + resolved "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.17.3.tgz" + integrity sha512-FdVl64OIuiKjgXBjwZaJLKp0eaEckifbhn10dXWhysMJkWblg3OEEGKSIyhiD5RSgAya8WzP3DNkngtIg3Nt7g== + +"@nodelib/fs.scandir@2.1.5": + version "2.1.5" + resolved "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz" + integrity sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g== + dependencies: + "@nodelib/fs.stat" "2.0.5" + run-parallel "^1.1.9" + +"@nodelib/fs.stat@2.0.5", "@nodelib/fs.stat@^2.0.2": + version "2.0.5" + resolved "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz" + integrity sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A== + +"@nodelib/fs.walk@^1.2.3": + version "1.2.8" + resolved "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz" + integrity sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg== + dependencies: + "@nodelib/fs.scandir" "2.1.5" + fastq "^1.6.0" + +"@types/codemirror@5.60.8": + version "5.60.8" + resolved "https://registry.npmjs.org/@types/codemirror/-/codemirror-5.60.8.tgz" + integrity sha512-VjFgDF/eB+Aklcy15TtOTLQeMjTo07k7KAjql8OK5Dirr7a6sJY4T1uVBDuTVG9VEmn1uUsohOpYnVfgC6/jyw== + dependencies: + "@types/tern" "*" + +"@types/estree@*": + version "1.0.6" + resolved "https://registry.npmjs.org/@types/estree/-/estree-1.0.6.tgz" + integrity sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw== + +"@types/json-schema@^7.0.9": + version "7.0.15" + resolved "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz" + integrity sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA== + +"@types/node@^16.11.6": + version "16.18.121" + resolved "https://registry.npmjs.org/@types/node/-/node-16.18.121.tgz" + integrity sha512-Gk/pOy8H0cvX8qNrwzElYIECpcUn87w4EAEFXFvPJ8qsP9QR/YqukUORSy0zmyDyvdo149idPpy4W6iC5aSbQA== + +"@types/tern@*": + version "0.23.9" + resolved "https://registry.npmjs.org/@types/tern/-/tern-0.23.9.tgz" + integrity sha512-ypzHFE/wBzh+BlH6rrBgS5I/Z7RD21pGhZ2rltb/+ZrVM1awdZwjx7hE5XfuYgHWk9uvV5HLZN3SloevCAp3Bw== + dependencies: + "@types/estree" "*" + +"@typescript-eslint/eslint-plugin@5.29.0": + version "5.29.0" + resolved "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.29.0.tgz" + integrity sha512-kgTsISt9pM53yRFQmLZ4npj99yGl3x3Pl7z4eA66OuTzAGC4bQB5H5fuLwPnqTKU3yyrrg4MIhjF17UYnL4c0w== + dependencies: + "@typescript-eslint/scope-manager" "5.29.0" + "@typescript-eslint/type-utils" "5.29.0" + "@typescript-eslint/utils" "5.29.0" + debug "^4.3.4" + functional-red-black-tree "^1.0.1" + ignore "^5.2.0" + regexpp "^3.2.0" + semver "^7.3.7" + tsutils "^3.21.0" + +"@typescript-eslint/parser@5.29.0": + version "5.29.0" + resolved "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.29.0.tgz" + integrity sha512-ruKWTv+x0OOxbzIw9nW5oWlUopvP/IQDjB5ZqmTglLIoDTctLlAJpAQFpNPJP/ZI7hTT9sARBosEfaKbcFuECw== + dependencies: + "@typescript-eslint/scope-manager" "5.29.0" + "@typescript-eslint/types" "5.29.0" + "@typescript-eslint/typescript-estree" "5.29.0" + debug "^4.3.4" + +"@typescript-eslint/scope-manager@5.29.0": + version "5.29.0" + resolved "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.29.0.tgz" + integrity sha512-etbXUT0FygFi2ihcxDZjz21LtC+Eps9V2xVx09zFoN44RRHPrkMflidGMI+2dUs821zR1tDS6Oc9IXxIjOUZwA== + dependencies: + "@typescript-eslint/types" "5.29.0" + "@typescript-eslint/visitor-keys" "5.29.0" + +"@typescript-eslint/type-utils@5.29.0": + version "5.29.0" + resolved "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.29.0.tgz" + integrity sha512-JK6bAaaiJozbox3K220VRfCzLa9n0ib/J+FHIwnaV3Enw/TO267qe0pM1b1QrrEuy6xun374XEAsRlA86JJnyg== + dependencies: + "@typescript-eslint/utils" "5.29.0" + debug "^4.3.4" + tsutils "^3.21.0" + +"@typescript-eslint/types@5.29.0": + version "5.29.0" + resolved "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.29.0.tgz" + integrity sha512-X99VbqvAXOMdVyfFmksMy3u8p8yoRGITgU1joBJPzeYa0rhdf5ok9S56/itRoUSh99fiDoMtarSIJXo7H/SnOg== + +"@typescript-eslint/typescript-estree@5.29.0": + version "5.29.0" + resolved "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.29.0.tgz" + integrity sha512-mQvSUJ/JjGBdvo+1LwC+GY2XmSYjK1nAaVw2emp/E61wEVYEyibRHCqm1I1vEKbXCpUKuW4G7u9ZCaZhJbLoNQ== + dependencies: + "@typescript-eslint/types" "5.29.0" + "@typescript-eslint/visitor-keys" "5.29.0" + debug "^4.3.4" + globby "^11.1.0" + is-glob "^4.0.3" + semver "^7.3.7" + tsutils "^3.21.0" + +"@typescript-eslint/utils@5.29.0": + version "5.29.0" + resolved "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.29.0.tgz" + integrity sha512-3Eos6uP1nyLOBayc/VUdKZikV90HahXE5Dx9L5YlSd/7ylQPXhLk1BYb29SDgnBnTp+jmSZUU0QxUiyHgW4p7A== + dependencies: + "@types/json-schema" "^7.0.9" + "@typescript-eslint/scope-manager" "5.29.0" + "@typescript-eslint/types" "5.29.0" + "@typescript-eslint/typescript-estree" "5.29.0" + eslint-scope "^5.1.1" + eslint-utils "^3.0.0" + +"@typescript-eslint/visitor-keys@5.29.0": + version "5.29.0" + resolved "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.29.0.tgz" + integrity sha512-Hpb/mCWsjILvikMQoZIE3voc9wtQcS0A9FUw3h8bhr9UxBdtI/tw1ZDZUOXHXLOVMedKCH5NxyzATwnU78bWCQ== + dependencies: + "@typescript-eslint/types" "5.29.0" + eslint-visitor-keys "^3.3.0" + +array-union@^2.1.0: + version "2.1.0" + resolved "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz" + integrity sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw== + +braces@^3.0.3: + version "3.0.3" + resolved "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz" + integrity sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA== + dependencies: + fill-range "^7.1.1" + +builtin-modules@3.3.0: + version "3.3.0" + resolved "https://registry.npmjs.org/builtin-modules/-/builtin-modules-3.3.0.tgz" + integrity sha512-zhaCDicdLuWN5UbN5IMnFqNMhNfo919sH85y2/ea+5Yg9TsTkeZxpL+JLbp6cgYFS4sRLp3YV4S6yDuqVWHYOw== + +debug@^4.3.4: + version "4.3.7" + resolved "https://registry.npmjs.org/debug/-/debug-4.3.7.tgz" + integrity sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ== + dependencies: + ms "^2.1.3" + +dir-glob@^3.0.1: + version "3.0.1" + resolved "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz" + integrity sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA== + dependencies: + path-type "^4.0.0" + +esbuild@0.17.3: + version "0.17.3" + resolved "https://registry.npmjs.org/esbuild/-/esbuild-0.17.3.tgz" + integrity sha512-9n3AsBRe6sIyOc6kmoXg2ypCLgf3eZSraWFRpnkto+svt8cZNuKTkb1bhQcitBcvIqjNiK7K0J3KPmwGSfkA8g== + optionalDependencies: + "@esbuild/android-arm" "0.17.3" + "@esbuild/android-arm64" "0.17.3" + "@esbuild/android-x64" "0.17.3" + "@esbuild/darwin-arm64" "0.17.3" + "@esbuild/darwin-x64" "0.17.3" + "@esbuild/freebsd-arm64" "0.17.3" + "@esbuild/freebsd-x64" "0.17.3" + "@esbuild/linux-arm" "0.17.3" + "@esbuild/linux-arm64" "0.17.3" + "@esbuild/linux-ia32" "0.17.3" + "@esbuild/linux-loong64" "0.17.3" + "@esbuild/linux-mips64el" "0.17.3" + "@esbuild/linux-ppc64" "0.17.3" + "@esbuild/linux-riscv64" "0.17.3" + "@esbuild/linux-s390x" "0.17.3" + "@esbuild/linux-x64" "0.17.3" + "@esbuild/netbsd-x64" "0.17.3" + "@esbuild/openbsd-x64" "0.17.3" + "@esbuild/sunos-x64" "0.17.3" + "@esbuild/win32-arm64" "0.17.3" + "@esbuild/win32-ia32" "0.17.3" + "@esbuild/win32-x64" "0.17.3" + +eslint-scope@^5.1.1: + version "5.1.1" + resolved "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz" + integrity sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw== + dependencies: + esrecurse "^4.3.0" + estraverse "^4.1.1" + +eslint-utils@^3.0.0: + version "3.0.0" + resolved "https://registry.npmjs.org/eslint-utils/-/eslint-utils-3.0.0.tgz" + integrity sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA== + dependencies: + eslint-visitor-keys "^2.0.0" + +eslint-visitor-keys@^2.0.0: + version "2.1.0" + resolved "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz" + integrity sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw== + +eslint-visitor-keys@^3.3.0: + version "3.4.3" + resolved "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz" + integrity sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag== + +esrecurse@^4.3.0: + version "4.3.0" + resolved "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz" + integrity sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag== + dependencies: + estraverse "^5.2.0" + +estraverse@^4.1.1: + version "4.3.0" + resolved "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz" + integrity sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw== + +estraverse@^5.2.0: + version "5.3.0" + resolved "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz" + integrity sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA== + +fast-glob@^3.2.9: + version "3.3.2" + resolved "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.2.tgz" + integrity sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow== + dependencies: + "@nodelib/fs.stat" "^2.0.2" + "@nodelib/fs.walk" "^1.2.3" + glob-parent "^5.1.2" + merge2 "^1.3.0" + micromatch "^4.0.4" + +fastq@^1.6.0: + version "1.17.1" + resolved "https://registry.npmjs.org/fastq/-/fastq-1.17.1.tgz" + integrity sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w== + dependencies: + reusify "^1.0.4" + +fill-range@^7.1.1: + version "7.1.1" + resolved "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz" + integrity sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg== + dependencies: + to-regex-range "^5.0.1" + +functional-red-black-tree@^1.0.1: + version "1.0.1" + resolved "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz" + integrity sha512-dsKNQNdj6xA3T+QlADDA7mOSlX0qiMINjn0cgr+eGHGsbSHzTabcIogz2+p/iqP1Xs6EP/sS2SbqH+brGTbq0g== + +glob-parent@^5.1.2: + version "5.1.2" + resolved "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz" + integrity sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow== + dependencies: + is-glob "^4.0.1" + +globby@^11.1.0: + version "11.1.0" + resolved "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz" + integrity sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g== + dependencies: + array-union "^2.1.0" + dir-glob "^3.0.1" + fast-glob "^3.2.9" + ignore "^5.2.0" + merge2 "^1.4.1" + slash "^3.0.0" + +ignore@^5.2.0: + version "5.3.2" + resolved "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz" + integrity sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g== + +is-extglob@^2.1.1: + version "2.1.1" + resolved "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz" + integrity sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ== + +is-glob@^4.0.1, is-glob@^4.0.3: + version "4.0.3" + resolved "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz" + integrity sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg== + dependencies: + is-extglob "^2.1.1" + +is-number@^7.0.0: + version "7.0.0" + resolved "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz" + integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng== + +merge2@^1.3.0, merge2@^1.4.1: + version "1.4.1" + resolved "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz" + integrity sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg== + +micromatch@^4.0.4: + version "4.0.8" + resolved "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz" + integrity sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA== + dependencies: + braces "^3.0.3" + picomatch "^2.3.1" + +moment@2.29.4: + version "2.29.4" + resolved "https://registry.npmjs.org/moment/-/moment-2.29.4.tgz" + integrity sha512-5LC9SOxjSc2HF6vO2CyuTDNivEdoz2IvyJJGj6X8DJ0eFyfszE0QiEd+iXmBvUP3WHxSjFH/vIsA0EN00cgr8w== + +ms@^2.1.3: + version "2.1.3" + resolved "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz" + integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== + +obsidian@latest: + version "1.7.2" + resolved "https://registry.npmjs.org/obsidian/-/obsidian-1.7.2.tgz" + integrity sha512-k9hN9brdknJC+afKr5FQzDRuEFGDKbDjfCazJwpgibwCAoZNYHYV8p/s3mM8I6AsnKrPKNXf8xGuMZ4enWelZQ== + dependencies: + "@types/codemirror" "5.60.8" + moment "2.29.4" + +path-type@^4.0.0: + version "4.0.0" + resolved "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz" + integrity sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw== + +picomatch@^2.3.1: + version "2.3.1" + resolved "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz" + integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA== + +queue-microtask@^1.2.2: + version "1.2.3" + resolved "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz" + integrity sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A== + +regexpp@^3.2.0: + version "3.2.0" + resolved "https://registry.npmjs.org/regexpp/-/regexpp-3.2.0.tgz" + integrity sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg== + +reusify@^1.0.4: + version "1.0.4" + resolved "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz" + integrity sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw== + +run-parallel@^1.1.9: + version "1.2.0" + resolved "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz" + integrity sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA== + dependencies: + queue-microtask "^1.2.2" + +semver@^7.3.7: + version "7.6.3" + resolved "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz" + integrity sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A== + +slash@^3.0.0: + version "3.0.0" + resolved "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz" + integrity sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q== + +to-regex-range@^5.0.1: + 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== + dependencies: + is-number "^7.0.0" + +tslib@2.4.0: + version "2.4.0" + resolved "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz" + integrity sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ== + +tslib@^1.8.1: + version "1.14.1" + resolved "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz" + integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== + +tsutils@^3.21.0: + version "3.21.0" + resolved "https://registry.npmjs.org/tsutils/-/tsutils-3.21.0.tgz" + integrity sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA== + dependencies: + tslib "^1.8.1" + +typescript@4.7.4: + version "4.7.4" + resolved "https://registry.npmjs.org/typescript/-/typescript-4.7.4.tgz" + integrity sha512-C0WQT0gezHuw6AdY1M2jxUO83Rjf0HP7Sk1DtXj6j1EwkQNZrHAg2XPWlq62oqEhYvONq5pkC2Y9oPljWToLmQ==