From 3658bd46ec60630a73542867204ac5581b06f9ca Mon Sep 17 00:00:00 2001 From: Zef Hemel Date: Mon, 18 Jul 2022 10:51:28 +0200 Subject: [PATCH 1/9] Documentation for `readSettings` call --- packages/plugs/lib/settings_page.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/packages/plugs/lib/settings_page.ts b/packages/plugs/lib/settings_page.ts index acea4c1..c9d746e 100644 --- a/packages/plugs/lib/settings_page.ts +++ b/packages/plugs/lib/settings_page.ts @@ -1,5 +1,15 @@ import { readYamlPage } from "./yaml_page"; +/** + * Convenience function to read a specific set of settings from the `SETTINGS` page as well as default values + * in case they are not specified. + * Example: `await readSettings({showPreview: false})` will return an object like `{showPreview: false}` (or `true`) + * in case this setting is specifically set in the `SETTINGS` page. + * + * @param settings object with settings to fetch and their default values + * @returns an object with the same shape as `settings` but with non-default values override based on `SETTINGS` + */ + export async function readSettings(settings: T): Promise { try { let allSettings = (await readYamlPage("SETTINGS", ["yaml"])) || {}; From 311e8f03417aadaf979bba857ecdb83676636024 Mon Sep 17 00:00:00 2001 From: Zef Hemel Date: Mon, 18 Jul 2022 10:55:29 +0200 Subject: [PATCH 2/9] 0.0.23 release --- package-lock.json | 30 +++++++++---------- packages/common/package.json | 2 +- .../plugos-silverbullet-syscall/package.json | 2 +- packages/plugos-syscall/package.json | 2 +- packages/plugos/package.json | 2 +- packages/plugs/package.json | 4 +-- packages/server/package.json | 8 ++--- packages/web/package.json | 2 +- 8 files changed, 26 insertions(+), 26 deletions(-) diff --git a/package-lock.json b/package-lock.json index 83097b8..97cdc27 100644 --- a/package-lock.json +++ b/package-lock.json @@ -16566,7 +16566,7 @@ }, "packages/common": { "name": "@silverbulletmd/common", - "version": "0.0.22", + "version": "0.0.23", "license": "MIT", "dependencies": { "@codemirror/autocomplete": "6.0.1", @@ -16590,7 +16590,7 @@ }, "packages/plugos": { "name": "@plugos/plugos", - "version": "0.0.22", + "version": "0.0.23", "license": "MIT", "dependencies": { "@jest/globals": "^27.5.1", @@ -16645,12 +16645,12 @@ }, "packages/plugos-silverbullet-syscall": { "name": "@silverbulletmd/plugos-silverbullet-syscall", - "version": "0.0.22", + "version": "0.0.23", "license": "MIT" }, "packages/plugos-syscall": { "name": "@plugos/plugos-syscall", - "version": "0.0.22", + "version": "0.0.23", "license": "MIT" }, "packages/plugos/node_modules/@lezer/common": { @@ -18013,13 +18013,13 @@ }, "packages/plugs": { "name": "@silverbulletmd/plugs", - "version": "0.0.22", + "version": "0.0.23", "license": "MIT", "dependencies": { "@jest/globals": "^27.5.1", "@lezer/generator": "1.0.0", "@lezer/lr": "1.0.0", - "@silverbulletmd/common": "^0.0.22", + "@silverbulletmd/common": "^0.0.23", "@types/yaml": "^1.9.7", "handlebars": "^4.7.7", "markdown-it": "^12.3.2", @@ -18052,7 +18052,7 @@ }, "packages/server": { "name": "@silverbulletmd/server", - "version": "0.0.22", + "version": "0.0.23", "license": "MIT", "dependencies": { "@codemirror/lang-javascript": "6.0.0", @@ -18060,9 +18060,9 @@ "@codemirror/legacy-modes": "6.0.0", "@jest/globals": "^27.5.1", "@lezer/markdown": "1.0.1", - "@silverbulletmd/common": "^0.0.22", - "@silverbulletmd/plugs": "^0.0.22", - "@silverbulletmd/web": "^0.0.22", + "@silverbulletmd/common": "^0.0.23", + "@silverbulletmd/plugs": "^0.0.23", + "@silverbulletmd/web": "^0.0.23", "better-sqlite3": "^7.5.0", "body-parser": "^1.19.2", "buffer": "^6.0.3", @@ -19157,7 +19157,7 @@ }, "packages/web": { "name": "@silverbulletmd/web", - "version": "0.0.22", + "version": "0.0.23", "license": "MIT", "dependencies": { "@codemirror/autocomplete": "6.0.1", @@ -26544,7 +26544,7 @@ "@jest/globals": "^27.5.1", "@lezer/generator": "1.0.0", "@lezer/lr": "1.0.0", - "@silverbulletmd/common": "^0.0.22", + "@silverbulletmd/common": "^0.0.23", "@types/markdown-it": "^12.2.3", "@types/yaml": "^1.9.7", "handlebars": "^4.7.7", @@ -26585,9 +26585,9 @@ "@parcel/transformer-sass": "2.5.0", "@parcel/transformer-webmanifest": "2.5.0", "@parcel/validator-typescript": "2.5.0", - "@silverbulletmd/common": "^0.0.22", - "@silverbulletmd/plugs": "^0.0.22", - "@silverbulletmd/web": "^0.0.22", + "@silverbulletmd/common": "^0.0.23", + "@silverbulletmd/plugs": "^0.0.23", + "@silverbulletmd/web": "^0.0.23", "@types/cors": "^2.8.12", "@types/events": "^3.0.0", "@types/express": "^4.17.13", diff --git a/packages/common/package.json b/packages/common/package.json index 01f6d64..77c8014 100644 --- a/packages/common/package.json +++ b/packages/common/package.json @@ -4,7 +4,7 @@ "name": "Zef Hemel", "email": "zef@zef.me" }, - "version": "0.0.22", + "version": "0.0.23", "license": "MIT", "dependencies": { "@codemirror/autocomplete": "6.0.1", diff --git a/packages/plugos-silverbullet-syscall/package.json b/packages/plugos-silverbullet-syscall/package.json index 02caba7..f4669bc 100644 --- a/packages/plugos-silverbullet-syscall/package.json +++ b/packages/plugos-silverbullet-syscall/package.json @@ -4,6 +4,6 @@ "name": "Zef Hemel", "email": "zef@zef.me" }, - "version": "0.0.22", + "version": "0.0.23", "license": "MIT" } diff --git a/packages/plugos-syscall/package.json b/packages/plugos-syscall/package.json index c1f6662..e2a0087 100644 --- a/packages/plugos-syscall/package.json +++ b/packages/plugos-syscall/package.json @@ -4,6 +4,6 @@ "name": "Zef Hemel", "email": "zef@zef.me" }, - "version": "0.0.22", + "version": "0.0.23", "license": "MIT" } diff --git a/packages/plugos/package.json b/packages/plugos/package.json index c75c8d1..ae67efa 100644 --- a/packages/plugos/package.json +++ b/packages/plugos/package.json @@ -4,7 +4,7 @@ "name": "Zef Hemel", "email": "zef@zef.me" }, - "version": "0.0.22", + "version": "0.0.23", "license": "MIT", "bin": { "plugos-bundle": "./dist/plugos/plugos-bundle.js", diff --git a/packages/plugs/package.json b/packages/plugs/package.json index 0c148c1..2e354ce 100644 --- a/packages/plugs/package.json +++ b/packages/plugs/package.json @@ -4,7 +4,7 @@ "name": "Zef Hemel", "email": "zef@zef.me" }, - "version": "0.0.22", + "version": "0.0.23", "license": "MIT", "scripts": { "generate": "lezer-generator query/query.grammar -o query/parse-query.js", @@ -34,7 +34,7 @@ "@jest/globals": "^27.5.1", "@lezer/generator": "1.0.0", "@lezer/lr": "1.0.0", - "@silverbulletmd/common": "^0.0.22", + "@silverbulletmd/common": "^0.0.23", "@types/yaml": "^1.9.7", "handlebars": "^4.7.7", "markdown-it": "^12.3.2", diff --git a/packages/server/package.json b/packages/server/package.json index f7b1712..387d0fe 100644 --- a/packages/server/package.json +++ b/packages/server/package.json @@ -4,7 +4,7 @@ "name": "Zef Hemel", "email": "zef@zef.me" }, - "version": "0.0.22", + "version": "0.0.23", "license": "MIT", "bin": { "silverbullet": "./dist/server/server.js" @@ -39,9 +39,9 @@ "@codemirror/legacy-modes": "6.0.0", "@jest/globals": "^27.5.1", "@lezer/markdown": "1.0.1", - "@silverbulletmd/common": "^0.0.22", - "@silverbulletmd/plugs": "^0.0.22", - "@silverbulletmd/web": "^0.0.22", + "@silverbulletmd/common": "^0.0.23", + "@silverbulletmd/plugs": "^0.0.23", + "@silverbulletmd/web": "^0.0.23", "better-sqlite3": "^7.5.0", "body-parser": "^1.19.2", "buffer": "^6.0.3", diff --git a/packages/web/package.json b/packages/web/package.json index d301bb3..a0248b2 100644 --- a/packages/web/package.json +++ b/packages/web/package.json @@ -4,7 +4,7 @@ "name": "Zef Hemel", "email": "zef@zef.me" }, - "version": "0.0.22", + "version": "0.0.23", "license": "MIT", "scripts": { "watch": "rm -rf .parcel-cache && parcel watch", From 96d945bc560ed5b52c81290818852333d195d32c Mon Sep 17 00:00:00 2001 From: Zef Hemel Date: Mon, 18 Jul 2022 12:10:31 +0200 Subject: [PATCH 3/9] Fix scroll bug when moving between pages --- packages/web/editor.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/web/editor.tsx b/packages/web/editor.tsx index c174813..e94b7d4 100644 --- a/packages/web/editor.tsx +++ b/packages/web/editor.tsx @@ -598,11 +598,13 @@ export class Editor { if (pageState) { // Restore state // console.log("Restoring selection state", pageState); + editorView.scrollDOM.scrollTop = pageState!.scrollTop; editorView.dispatch({ selection: pageState.selection, scrollIntoView: true, }); - editorView.scrollDOM.scrollTop = pageState!.scrollTop; + } else { + editorView.scrollDOM.scrollTop = 0; } editorView.focus(); } From d5ebab0358aa25948ff9d9bac9aeb7b281df174a Mon Sep 17 00:00:00 2001 From: Zef Hemel Date: Mon, 18 Jul 2022 12:11:03 +0200 Subject: [PATCH 4/9] Added importing of CSS (as text), images (as data URLs) --- packages/plugos/bin/plugos-bundle.ts | 4 ++++ packages/plugos/compile.ts | 6 ++++++ 2 files changed, 10 insertions(+) diff --git a/packages/plugos/bin/plugos-bundle.ts b/packages/plugos/bin/plugos-bundle.ts index 69457cb..d11dc6d 100755 --- a/packages/plugos/bin/plugos-bundle.ts +++ b/packages/plugos/bin/plugos-bundle.ts @@ -120,6 +120,10 @@ async function run() { if ( filename.endsWith(".plug.yaml") || filename.endsWith(".js") || + filename.endsWith(".css") || + filename.endsWith(".png") || + filename.endsWith(".jpg") || + filename.endsWith(".gif") || (filename.endsWith(".ts") && !filename.endsWith("_in.ts")) ) { console.log("Change detected", eventType, filename); diff --git a/packages/plugos/compile.ts b/packages/plugos/compile.ts index c23375a..9c1a2c2 100644 --- a/packages/plugos/compile.ts +++ b/packages/plugos/compile.ts @@ -41,6 +41,12 @@ export async function compile( outfile: outFile, metafile: true, external: excludeModules, + loader: { + ".css": "text", + ".png": "dataurl", + ".gif": "dataurl", + ".jpg": "dataurl", + }, absWorkingDir: path.resolve(path.dirname(inFile)), }); From 928ef5919091814a7452a24f5e2cb5945ef6296b Mon Sep 17 00:00:00 2001 From: Zef Hemel Date: Mon, 18 Jul 2022 16:44:43 +0200 Subject: [PATCH 5/9] Add inline command links {[Command Name]} syntax --- packages/plugs/core/core.plug.yaml | 14 ++++++++++++++ packages/plugs/core/navigate.ts | 8 ++++++++ 2 files changed, 22 insertions(+) diff --git a/packages/plugs/core/core.plug.yaml b/packages/plugs/core/core.plug.yaml index bbad1a5..2086753 100644 --- a/packages/plugs/core/core.plug.yaml +++ b/packages/plugs/core/core.plug.yaml @@ -14,6 +14,20 @@ syntax: color: "#0330cb" textDecoration: underline cursor: pointer + CommandLink: + firstCharacters: + - "{" + regex: "\\{\\[[^\\]]+\\]\\}" + styles: + #color: "#1e62a0" + backgroundColor: "#e3dfdf" + cursor: pointer + borderTop: 1px solid silver + borderLeft: 1px solid silver + borderBottom: 1px solid gray + borderRight: 1px solid gray + borderRadius: 4px + padding: 0 4px functions: clearPageIndex: path: "./page.ts:clearPageIndex" diff --git a/packages/plugs/core/navigate.ts b/packages/plugs/core/navigate.ts index 9e52f7c..2f6f523 100644 --- a/packages/plugs/core/navigate.ts +++ b/packages/plugs/core/navigate.ts @@ -7,6 +7,7 @@ import { } from "@silverbulletmd/plugos-silverbullet-syscall/editor"; import { parseMarkdown } from "@silverbulletmd/plugos-silverbullet-syscall/markdown"; import { nodeAtPos, ParseTree } from "@silverbulletmd/common/tree"; +import { invokeCommand } from "@silverbulletmd/plugos-silverbullet-syscall/system"; async function actionClickOrActionEnter(mdTree: ParseTree | null) { if (!mdTree) { @@ -29,6 +30,13 @@ async function actionClickOrActionEnter(mdTree: ParseTree | null) { case "Link": await openUrl(mdTree.children![4].children![0].text!); break; + case "CommandLink": + let command = mdTree + .children![0].text!.substring(2, mdTree.children![0].text!.length - 2) + .trim(); + console.log("Got command link", command); + await invokeCommand(command); + break; } } From 363a11a2642ec892770f8347b27888ca54aaf3f0 Mon Sep 17 00:00:00 2001 From: Zef Hemel Date: Mon, 18 Jul 2022 16:45:04 +0200 Subject: [PATCH 6/9] Add prefixLines and substring helpers to query templates --- packages/plugs/query/engine.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/packages/plugs/query/engine.ts b/packages/plugs/query/engine.ts index 9c2dc92..51ce5be 100644 --- a/packages/plugs/query/engine.ts +++ b/packages/plugs/query/engine.ts @@ -144,6 +144,17 @@ export async function renderQuery( if (parsedQuery.render) { Handlebars.registerHelper("json", (v) => JSON.stringify(v)); Handlebars.registerHelper("niceDate", (ts) => niceDate(new Date(ts))); + Handlebars.registerHelper("prefixLines", (v: string, prefix) => + v + .split("\n") + .map((l) => prefix + l) + .join("\n") + ); + + Handlebars.registerHelper("substring", (s, from, to, elipsis = "") => + s.length > to - from ? s.substring(from, to) + elipsis : s + ); + Handlebars.registerHelper("yaml", (v, prefix) => { if (typeof prefix === "string") { let yaml = YAML.stringify(v) From 0abf0436520ebed0a2f99cbf9dcfc40fffc50fcc Mon Sep 17 00:00:00 2001 From: Zef Hemel Date: Mon, 18 Jul 2022 16:48:36 +0200 Subject: [PATCH 7/9] Fixes #29 --- packages/plugs/markdown/markdown.plug.yaml | 3 ++- packages/web/editor.tsx | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/plugs/markdown/markdown.plug.yaml b/packages/plugs/markdown/markdown.plug.yaml index ccad33c..4e53d55 100644 --- a/packages/plugs/markdown/markdown.plug.yaml +++ b/packages/plugs/markdown/markdown.plug.yaml @@ -12,4 +12,5 @@ functions: events: - plug:load - editor:updated - - editor:pageSwitched + - editor:pageLoaded + - editor:pageReloaded diff --git a/packages/web/editor.tsx b/packages/web/editor.tsx index e94b7d4..1bb33b1 100644 --- a/packages/web/editor.tsx +++ b/packages/web/editor.tsx @@ -582,6 +582,8 @@ export class Editor { if (loadingDifferentPage) { await this.eventHook.dispatchEvent("editor:pageLoaded", pageName); + } else { + await this.eventHook.dispatchEvent("editor:pageReloaded", pageName); } } From 04992d99cfeab5b6225d6eac7169f3af82c44cc0 Mon Sep 17 00:00:00 2001 From: Zef Hemel Date: Mon, 18 Jul 2022 16:48:56 +0200 Subject: [PATCH 8/9] Make Mattermost client work --- packages/plugos/environments/node_worker.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/plugos/environments/node_worker.ts b/packages/plugos/environments/node_worker.ts index 0ce2e3a..fc60d80 100644 --- a/packages/plugos/environments/node_worker.ts +++ b/packages/plugos/environments/node_worker.ts @@ -28,6 +28,9 @@ let consoleLogger = new ConsoleLogger((level, message) => { let loadedModules = new Map(); +// HACK to make Mattermost client work... +loadedModules.set("form-data", require(`${nodeModulesPath}/form-data`)); + let vm = new VM({ sandbox: { // Exposing some "safe" APIs From d01012962a0c4d4c3902cf2547b1a9c99ebfba0c Mon Sep 17 00:00:00 2001 From: Zef Hemel Date: Mon, 18 Jul 2022 17:21:46 +0200 Subject: [PATCH 9/9] 0.0.25 --- package-lock.json | 162 ++---------------- packages/common/package.json | 2 +- .../plugos-silverbullet-syscall/package.json | 2 +- packages/plugos-syscall/package.json | 2 +- packages/plugos/package.json | 3 +- packages/plugs/package.json | 4 +- packages/server/package.json | 9 +- packages/web/package.json | 3 +- 8 files changed, 32 insertions(+), 155 deletions(-) diff --git a/package-lock.json b/package-lock.json index 97cdc27..7cc5856 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9680,14 +9680,6 @@ "integrity": "sha512-uX1KG+x9h5hIJsaKR9xHUeUraxf8IODOwq9JLNPq6BwB04a/xgpq3rcx47l5BZu5zBPlgD342tdke3Hom/nJRA==", "dev": true }, - "node_modules/data-uri-to-buffer": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-4.0.0.tgz", - "integrity": "sha512-Vr3mLBA8qWmcuschSLAOogKgQ/Jwxulv3RNE4FXnYWRGujzrRWQI4m12fQqRkwX06C0KanhLr4hK+GydchZsaA==", - "engines": { - "node": ">= 12" - } - }, "node_modules/data-urls": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/data-urls/-/data-urls-2.0.0.tgz", @@ -10662,28 +10654,6 @@ "bser": "2.1.1" } }, - "node_modules/fetch-blob": { - "version": "3.1.5", - "resolved": "https://registry.npmjs.org/fetch-blob/-/fetch-blob-3.1.5.tgz", - "integrity": "sha512-N64ZpKqoLejlrwkIAnb9iLSA3Vx/kjgzpcDhygcqJ2KKjky8nCgUQ+dzXtbrLaWZGZNmNfQTsiQ0weZ1svglHg==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/jimmywarting" - }, - { - "type": "paypal", - "url": "https://paypal.me/jimmywarting" - } - ], - "dependencies": { - "node-domexception": "^1.0.0", - "web-streams-polyfill": "^3.0.3" - }, - "engines": { - "node": "^12.20 || >= 14.13" - } - }, "node_modules/file-uri-to-path": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz", @@ -10751,17 +10721,6 @@ "node": ">= 6" } }, - "node_modules/formdata-polyfill": { - "version": "4.0.10", - "resolved": "https://registry.npmjs.org/formdata-polyfill/-/formdata-polyfill-4.0.10.tgz", - "integrity": "sha512-buewHzMvYL29jdeQTVILecSaZKnt/RJWjoZCF5OW60Z67/GmSLBkOFM7qh1PI3zFNtJbaZL5eQu1vLfazOwj4g==", - "dependencies": { - "fetch-blob": "^3.1.2" - }, - "engines": { - "node": ">=12.20.0" - } - }, "node_modules/formidable": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/formidable/-/formidable-2.0.1.tgz", @@ -13453,24 +13412,6 @@ "node": ">=6.0.0" } }, - "node_modules/node-domexception": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/node-domexception/-/node-domexception-1.0.0.tgz", - "integrity": "sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/jimmywarting" - }, - { - "type": "github", - "url": "https://paypal.me/jimmywarting" - } - ], - "engines": { - "node": ">=10.5.0" - } - }, "node_modules/node-fetch": { "version": "2.6.7", "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz", @@ -16315,14 +16256,6 @@ "integrity": "sha512-DEAoo25RfSYMuTGc9vPJzZcZullwIqRDSI9LOy+fkCJPi6hykCnfKaXTuPBDuXAUcqHXyOgFtHNp/kB2FjYHbw==", "dev": true }, - "node_modules/web-streams-polyfill": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/web-streams-polyfill/-/web-streams-polyfill-3.2.1.tgz", - "integrity": "sha512-e0MO3wdXWKrLbL0DgGnUV7WHVuw9OUvL4hjgnPkIeEvESk74gAITi5G606JtZPp39cd8HA9VQzCIvA49LpPN5Q==", - "engines": { - "node": ">= 8" - } - }, "node_modules/webidl-conversions": { "version": "6.1.0", "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-6.1.0.tgz", @@ -16566,7 +16499,7 @@ }, "packages/common": { "name": "@silverbulletmd/common", - "version": "0.0.23", + "version": "0.0.25", "license": "MIT", "dependencies": { "@codemirror/autocomplete": "6.0.1", @@ -16590,7 +16523,7 @@ }, "packages/plugos": { "name": "@plugos/plugos", - "version": "0.0.23", + "version": "0.0.25", "license": "MIT", "dependencies": { "@jest/globals": "^27.5.1", @@ -16604,6 +16537,7 @@ "esbuild": "^0.14.27", "express": "^4.17.3", "fake-indexeddb": "^3.1.7", + "form-data": "^4.0.0", "jest": "^27.5.1", "jsonwebtoken": "^8.5.1", "knex": "^1.0.4", @@ -16645,12 +16579,12 @@ }, "packages/plugos-silverbullet-syscall": { "name": "@silverbulletmd/plugos-silverbullet-syscall", - "version": "0.0.23", + "version": "0.0.25", "license": "MIT" }, "packages/plugos-syscall": { "name": "@plugos/plugos-syscall", - "version": "0.0.23", + "version": "0.0.25", "license": "MIT" }, "packages/plugos/node_modules/@lezer/common": { @@ -18013,13 +17947,13 @@ }, "packages/plugs": { "name": "@silverbulletmd/plugs", - "version": "0.0.23", + "version": "0.0.25", "license": "MIT", "dependencies": { "@jest/globals": "^27.5.1", "@lezer/generator": "1.0.0", "@lezer/lr": "1.0.0", - "@silverbulletmd/common": "^0.0.23", + "@silverbulletmd/common": "^0.0.25", "@types/yaml": "^1.9.7", "handlebars": "^4.7.7", "markdown-it": "^12.3.2", @@ -18052,7 +17986,7 @@ }, "packages/server": { "name": "@silverbulletmd/server", - "version": "0.0.23", + "version": "0.0.25", "license": "MIT", "dependencies": { "@codemirror/lang-javascript": "6.0.0", @@ -18060,9 +17994,9 @@ "@codemirror/legacy-modes": "6.0.0", "@jest/globals": "^27.5.1", "@lezer/markdown": "1.0.1", - "@silverbulletmd/common": "^0.0.23", - "@silverbulletmd/plugs": "^0.0.23", - "@silverbulletmd/web": "^0.0.23", + "@silverbulletmd/common": "^0.0.25", + "@silverbulletmd/plugs": "^0.0.25", + "@silverbulletmd/web": "^0.0.25", "better-sqlite3": "^7.5.0", "body-parser": "^1.19.2", "buffer": "^6.0.3", @@ -18072,6 +18006,7 @@ "events": "^3.3.0", "express": "^4.17.3", "fake-indexeddb": "^3.1.7", + "form-data": "^4.0.0", "jest": "^27.5.1", "jsonwebtoken": "^8.5.1", "knex": "^1.0.4", @@ -19157,7 +19092,7 @@ }, "packages/web": { "name": "@silverbulletmd/web", - "version": "0.0.23", + "version": "0.0.25", "license": "MIT", "dependencies": { "@codemirror/autocomplete": "6.0.1", @@ -19179,7 +19114,6 @@ "fuzzysort": "^1.9.0", "jest": "^27.5.1", "knex": "^1.0.4", - "node-fetch": "^3.2.6", "react": "^17.0.2", "react-dom": "^17.0.2" }, @@ -20209,23 +20143,6 @@ "integrity": "sha512-73sE9+3UaLYYFmDsFZnqCInzPyh3MqIwZO9cw58yIqAZhONrrabrYyYe3TuIqtIiOuTXVhsGau8hcrhhwSsDIQ==", "dev": true }, - "packages/web/node_modules/node-fetch": { - "version": "3.2.6", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-3.2.6.tgz", - "integrity": "sha512-LAy/HZnLADOVkVPubaxHDft29booGglPFDr2Hw0J1AercRh01UiVFm++KMDnJeH9sHgNB4hsXPii7Sgym/sTbw==", - "dependencies": { - "data-uri-to-buffer": "^4.0.0", - "fetch-blob": "^3.1.4", - "formdata-polyfill": "^4.0.10" - }, - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/node-fetch" - } - }, "packages/web/node_modules/node-gyp-build-optional-packages": { "version": "4.3.5", "resolved": "https://registry.npmjs.org/node-gyp-build-optional-packages/-/node-gyp-build-optional-packages-4.3.5.tgz", @@ -25644,6 +25561,7 @@ "events": "^3.3.0", "express": "^4.17.3", "fake-indexeddb": "^3.1.7", + "form-data": "^4.0.0", "jest": "^27.5.1", "jsonwebtoken": "^8.5.1", "knex": "^1.0.4", @@ -26544,7 +26462,7 @@ "@jest/globals": "^27.5.1", "@lezer/generator": "1.0.0", "@lezer/lr": "1.0.0", - "@silverbulletmd/common": "^0.0.23", + "@silverbulletmd/common": "^0.0.25", "@types/markdown-it": "^12.2.3", "@types/yaml": "^1.9.7", "handlebars": "^4.7.7", @@ -26585,9 +26503,9 @@ "@parcel/transformer-sass": "2.5.0", "@parcel/transformer-webmanifest": "2.5.0", "@parcel/validator-typescript": "2.5.0", - "@silverbulletmd/common": "^0.0.23", - "@silverbulletmd/plugs": "^0.0.23", - "@silverbulletmd/web": "^0.0.23", + "@silverbulletmd/common": "^0.0.25", + "@silverbulletmd/plugs": "^0.0.25", + "@silverbulletmd/web": "^0.0.25", "@types/cors": "^2.8.12", "@types/events": "^3.0.0", "@types/express": "^4.17.13", @@ -26603,6 +26521,7 @@ "events": "^3.3.0", "express": "^4.17.3", "fake-indexeddb": "^3.1.7", + "form-data": "^4.0.0", "jest": "^27.5.1", "jsonwebtoken": "^8.5.1", "knex": "^1.0.4", @@ -27303,7 +27222,6 @@ "fuzzysort": "^1.9.0", "jest": "^27.5.1", "knex": "^1.0.4", - "node-fetch": "^3.2.6", "nodemon": "^2.0.18", "parcel": "2.5.0", "prettier": "^2.5.1", @@ -27933,16 +27851,6 @@ "integrity": "sha512-73sE9+3UaLYYFmDsFZnqCInzPyh3MqIwZO9cw58yIqAZhONrrabrYyYe3TuIqtIiOuTXVhsGau8hcrhhwSsDIQ==", "dev": true }, - "node-fetch": { - "version": "3.2.6", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-3.2.6.tgz", - "integrity": "sha512-LAy/HZnLADOVkVPubaxHDft29booGglPFDr2Hw0J1AercRh01UiVFm++KMDnJeH9sHgNB4hsXPii7Sgym/sTbw==", - "requires": { - "data-uri-to-buffer": "^4.0.0", - "fetch-blob": "^3.1.4", - "formdata-polyfill": "^4.0.10" - } - }, "node-gyp-build-optional-packages": { "version": "4.3.5", "resolved": "https://registry.npmjs.org/node-gyp-build-optional-packages/-/node-gyp-build-optional-packages-4.3.5.tgz", @@ -29249,11 +29157,6 @@ "integrity": "sha512-uX1KG+x9h5hIJsaKR9xHUeUraxf8IODOwq9JLNPq6BwB04a/xgpq3rcx47l5BZu5zBPlgD342tdke3Hom/nJRA==", "dev": true }, - "data-uri-to-buffer": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-4.0.0.tgz", - "integrity": "sha512-Vr3mLBA8qWmcuschSLAOogKgQ/Jwxulv3RNE4FXnYWRGujzrRWQI4m12fQqRkwX06C0KanhLr4hK+GydchZsaA==" - }, "data-urls": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/data-urls/-/data-urls-2.0.0.tgz", @@ -29878,15 +29781,6 @@ "bser": "2.1.1" } }, - "fetch-blob": { - "version": "3.1.5", - "resolved": "https://registry.npmjs.org/fetch-blob/-/fetch-blob-3.1.5.tgz", - "integrity": "sha512-N64ZpKqoLejlrwkIAnb9iLSA3Vx/kjgzpcDhygcqJ2KKjky8nCgUQ+dzXtbrLaWZGZNmNfQTsiQ0weZ1svglHg==", - "requires": { - "node-domexception": "^1.0.0", - "web-streams-polyfill": "^3.0.3" - } - }, "file-uri-to-path": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz", @@ -29942,14 +29836,6 @@ "mime-types": "^2.1.12" } }, - "formdata-polyfill": { - "version": "4.0.10", - "resolved": "https://registry.npmjs.org/formdata-polyfill/-/formdata-polyfill-4.0.10.tgz", - "integrity": "sha512-buewHzMvYL29jdeQTVILecSaZKnt/RJWjoZCF5OW60Z67/GmSLBkOFM7qh1PI3zFNtJbaZL5eQu1vLfazOwj4g==", - "requires": { - "fetch-blob": "^3.1.2" - } - }, "formidable": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/formidable/-/formidable-2.0.1.tgz", @@ -31884,11 +31770,6 @@ "resolved": "https://registry.npmjs.org/node-cron/-/node-cron-3.0.1.tgz", "integrity": "sha512-RAWZTNn2M5KDIUV/389UX0EXsqvdFAwc9QwHQceh0Ga56dygqSRthqIjwpgZsoDspHGt2rkHdk9Z4RgfPMdALw==" }, - "node-domexception": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/node-domexception/-/node-domexception-1.0.0.tgz", - "integrity": "sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ==" - }, "node-fetch": { "version": "2.6.7", "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz", @@ -33923,11 +33804,6 @@ "integrity": "sha512-DEAoo25RfSYMuTGc9vPJzZcZullwIqRDSI9LOy+fkCJPi6hykCnfKaXTuPBDuXAUcqHXyOgFtHNp/kB2FjYHbw==", "dev": true }, - "web-streams-polyfill": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/web-streams-polyfill/-/web-streams-polyfill-3.2.1.tgz", - "integrity": "sha512-e0MO3wdXWKrLbL0DgGnUV7WHVuw9OUvL4hjgnPkIeEvESk74gAITi5G606JtZPp39cd8HA9VQzCIvA49LpPN5Q==" - }, "webidl-conversions": { "version": "6.1.0", "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-6.1.0.tgz", diff --git a/packages/common/package.json b/packages/common/package.json index 77c8014..63f9daa 100644 --- a/packages/common/package.json +++ b/packages/common/package.json @@ -4,7 +4,7 @@ "name": "Zef Hemel", "email": "zef@zef.me" }, - "version": "0.0.23", + "version": "0.0.25", "license": "MIT", "dependencies": { "@codemirror/autocomplete": "6.0.1", diff --git a/packages/plugos-silverbullet-syscall/package.json b/packages/plugos-silverbullet-syscall/package.json index f4669bc..1769e5c 100644 --- a/packages/plugos-silverbullet-syscall/package.json +++ b/packages/plugos-silverbullet-syscall/package.json @@ -4,6 +4,6 @@ "name": "Zef Hemel", "email": "zef@zef.me" }, - "version": "0.0.23", + "version": "0.0.25", "license": "MIT" } diff --git a/packages/plugos-syscall/package.json b/packages/plugos-syscall/package.json index e2a0087..24920e1 100644 --- a/packages/plugos-syscall/package.json +++ b/packages/plugos-syscall/package.json @@ -4,6 +4,6 @@ "name": "Zef Hemel", "email": "zef@zef.me" }, - "version": "0.0.23", + "version": "0.0.25", "license": "MIT" } diff --git a/packages/plugos/package.json b/packages/plugos/package.json index ae67efa..5547c1f 100644 --- a/packages/plugos/package.json +++ b/packages/plugos/package.json @@ -4,7 +4,7 @@ "name": "Zef Hemel", "email": "zef@zef.me" }, - "version": "0.0.23", + "version": "0.0.25", "license": "MIT", "bin": { "plugos-bundle": "./dist/plugos/plugos-bundle.js", @@ -50,6 +50,7 @@ "esbuild": "^0.14.27", "express": "^4.17.3", "fake-indexeddb": "^3.1.7", + "form-data": "^4.0.0", "jest": "^27.5.1", "jsonwebtoken": "^8.5.1", "knex": "^1.0.4", diff --git a/packages/plugs/package.json b/packages/plugs/package.json index 2e354ce..f5406f9 100644 --- a/packages/plugs/package.json +++ b/packages/plugs/package.json @@ -4,7 +4,7 @@ "name": "Zef Hemel", "email": "zef@zef.me" }, - "version": "0.0.23", + "version": "0.0.25", "license": "MIT", "scripts": { "generate": "lezer-generator query/query.grammar -o query/parse-query.js", @@ -34,7 +34,7 @@ "@jest/globals": "^27.5.1", "@lezer/generator": "1.0.0", "@lezer/lr": "1.0.0", - "@silverbulletmd/common": "^0.0.23", + "@silverbulletmd/common": "^0.0.25", "@types/yaml": "^1.9.7", "handlebars": "^4.7.7", "markdown-it": "^12.3.2", diff --git a/packages/server/package.json b/packages/server/package.json index 387d0fe..4cff0ad 100644 --- a/packages/server/package.json +++ b/packages/server/package.json @@ -4,7 +4,7 @@ "name": "Zef Hemel", "email": "zef@zef.me" }, - "version": "0.0.23", + "version": "0.0.25", "license": "MIT", "bin": { "silverbullet": "./dist/server/server.js" @@ -39,9 +39,9 @@ "@codemirror/legacy-modes": "6.0.0", "@jest/globals": "^27.5.1", "@lezer/markdown": "1.0.1", - "@silverbulletmd/common": "^0.0.23", - "@silverbulletmd/plugs": "^0.0.23", - "@silverbulletmd/web": "^0.0.23", + "@silverbulletmd/common": "^0.0.25", + "@silverbulletmd/plugs": "^0.0.25", + "@silverbulletmd/web": "^0.0.25", "better-sqlite3": "^7.5.0", "body-parser": "^1.19.2", "buffer": "^6.0.3", @@ -51,6 +51,7 @@ "events": "^3.3.0", "express": "^4.17.3", "fake-indexeddb": "^3.1.7", + "form-data": "^4.0.0", "jest": "^27.5.1", "jsonwebtoken": "^8.5.1", "knex": "^1.0.4", diff --git a/packages/web/package.json b/packages/web/package.json index a0248b2..e2bb610 100644 --- a/packages/web/package.json +++ b/packages/web/package.json @@ -4,7 +4,7 @@ "name": "Zef Hemel", "email": "zef@zef.me" }, - "version": "0.0.23", + "version": "0.0.25", "license": "MIT", "scripts": { "watch": "rm -rf .parcel-cache && parcel watch", @@ -45,7 +45,6 @@ "fuzzysort": "^1.9.0", "jest": "^27.5.1", "knex": "^1.0.4", - "node-fetch": "^3.2.6", "react": "^17.0.2", "react-dom": "^17.0.2" },