diff --git a/package-lock.json b/package-lock.json index 0c9fe018..434ae616 100644 --- a/package-lock.json +++ b/package-lock.json @@ -16582,7 +16582,7 @@ }, "packages/common": { "name": "@silverbulletmd/common", - "version": "0.0.9", + "version": "0.0.16", "license": "MIT", "dependencies": { "@codemirror/autocomplete": "6.0.1", @@ -16596,11 +16596,7 @@ "@codemirror/view": "6.0.0", "@lezer/common": "1.0.0", "@lezer/highlight": "1.0.0", - "@lezer/markdown": "1.0.0", - "@silverbulletmd/common": "^0.0.9", - "@silverbulletmd/plugs": "^0.0.9", - "@silverbulletmd/web": "^0.0.9", - "node-fetch": "^3.2.6" + "@lezer/markdown": "1.0.0" } }, "packages/common/node_modules/@lezer/common": { @@ -16608,32 +16604,12 @@ "resolved": "https://registry.npmjs.org/@lezer/common/-/common-1.0.0.tgz", "integrity": "sha512-ohydQe+Hb+w4oMDvXzs8uuJd2NoA3D8YDcLiuDsLqH+yflDTPEpgCsWI3/6rH5C3BAedtH1/R51dxENldQceEA==" }, - "packages/common/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/plugos": { "name": "@plugos/plugos", - "version": "0.0.9", + "version": "0.0.16", "license": "MIT", "dependencies": { "@jest/globals": "^27.5.1", - "@silverbulletmd/common": "^0.0.9", - "@silverbulletmd/plugs": "^0.0.9", - "@silverbulletmd/web": "^0.0.9", "@types/cors": "^2.8.12", "@types/express": "^4.17.13", "@types/jsonwebtoken": "^8.5.8", @@ -16686,59 +16662,13 @@ }, "packages/plugos-silverbullet-syscall": { "name": "@silverbulletmd/plugos-silverbullet-syscall", - "version": "0.0.9", - "license": "MIT", - "dependencies": { - "@silverbulletmd/common": "^0.0.9", - "@silverbulletmd/plugs": "^0.0.9", - "@silverbulletmd/web": "^0.0.9", - "node-fetch": "^3.2.6" - } - }, - "packages/plugos-silverbullet-syscall/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" - } + "version": "0.0.16", + "license": "MIT" }, "packages/plugos-syscall": { "name": "@plugos/plugos-syscall", - "version": "0.0.9", - "license": "MIT", - "dependencies": { - "@silverbulletmd/common": "^0.0.9", - "@silverbulletmd/plugs": "^0.0.9", - "@silverbulletmd/web": "^0.0.9", - "node-fetch": "^3.2.6" - } - }, - "packages/plugos-syscall/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" - } + "version": "0.0.16", + "license": "MIT" }, "packages/plugos/node_modules/@lezer/common": { "version": "1.0.0", @@ -18100,20 +18030,17 @@ }, "packages/plugs": { "name": "@silverbulletmd/plugs", - "version": "0.0.9", + "version": "0.0.16", "license": "MIT", "dependencies": { "@jest/globals": "^27.5.1", "@lezer/generator": "1.0.0", "@lezer/lr": "1.0.0", - "@silverbulletmd/common": "^0.0.9", - "@silverbulletmd/plugs": "^0.0.9", - "@silverbulletmd/web": "^0.0.9", + "@silverbulletmd/common": "^0.0.16", "@types/yaml": "^1.9.7", "handlebars": "^4.7.7", "markdown-it": "^12.3.2", "markdown-it-task-lists": "^2.1.1", - "node-fetch": "^3.2.6", "yaml": "^2.0.0" }, "devDependencies": { @@ -18133,23 +18060,6 @@ "@lezer/common": "^1.0.0" } }, - "packages/plugs/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/plugs/node_modules/yaml": { "version": "2.0.1", "license": "ISC", @@ -18159,7 +18069,7 @@ }, "packages/server": { "name": "@silverbulletmd/server", - "version": "0.0.9", + "version": "0.0.16", "license": "MIT", "dependencies": { "@codemirror/lang-javascript": "6.0.0", @@ -18167,9 +18077,9 @@ "@codemirror/legacy-modes": "6.0.0", "@jest/globals": "^27.5.1", "@lezer/markdown": "1.0.0", - "@silverbulletmd/common": "^0.0.9", - "@silverbulletmd/plugs": "^0.0.9", - "@silverbulletmd/web": "^0.0.9", + "@silverbulletmd/common": "^0.0.16", + "@silverbulletmd/plugs": "^0.0.16", + "@silverbulletmd/web": "^0.0.16", "better-sqlite3": "^7.5.0", "body-parser": "^1.19.2", "buffer": "^6.0.3", @@ -19265,7 +19175,7 @@ }, "packages/web": { "name": "@silverbulletmd/web", - "version": "0.0.9", + "version": "0.0.16", "license": "MIT", "dependencies": { "@codemirror/autocomplete": "6.0.1", @@ -19283,9 +19193,6 @@ "@jest/globals": "^27.5.1", "@lezer/highlight": "1.0.0", "@lezer/markdown": "1.0.0", - "@silverbulletmd/common": "^0.0.9", - "@silverbulletmd/plugs": "^0.0.9", - "@silverbulletmd/web": "^0.0.9", "fake-indexeddb": "^3.1.7", "fuzzysort": "^1.9.0", "jest": "^27.5.1", @@ -25736,9 +25643,6 @@ "@parcel/transformer-sass": "2.5.0", "@parcel/transformer-webmanifest": "2.5.0", "@parcel/validator-typescript": "2.5.0", - "@silverbulletmd/common": "^0.0.9", - "@silverbulletmd/plugs": "^0.0.9", - "@silverbulletmd/web": "^0.0.9", "@types/cors": "^2.8.12", "@types/events": "^3.0.0", "@types/express": "^4.17.13", @@ -26624,25 +26528,7 @@ } }, "@plugos/plugos-syscall": { - "version": "file:packages/plugos-syscall", - "requires": { - "@silverbulletmd/common": "^0.0.9", - "@silverbulletmd/plugs": "^0.0.9", - "@silverbulletmd/web": "^0.0.9", - "node-fetch": "^3.2.6" - }, - "dependencies": { - "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" - } - } - } + "version": "file:packages/plugos-syscall" }, "@silverbulletmd/common": { "version": "file:packages/common", @@ -26658,50 +26544,18 @@ "@codemirror/view": "6.0.0", "@lezer/common": "1.0.0", "@lezer/highlight": "1.0.0", - "@lezer/markdown": "1.0.0", - "@silverbulletmd/common": "^0.0.9", - "@silverbulletmd/plugs": "^0.0.9", - "@silverbulletmd/web": "^0.0.9", - "node-fetch": "^3.2.6" + "@lezer/markdown": "1.0.0" }, "dependencies": { "@lezer/common": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/@lezer/common/-/common-1.0.0.tgz", "integrity": "sha512-ohydQe+Hb+w4oMDvXzs8uuJd2NoA3D8YDcLiuDsLqH+yflDTPEpgCsWI3/6rH5C3BAedtH1/R51dxENldQceEA==" - }, - "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" - } } } }, "@silverbulletmd/plugos-silverbullet-syscall": { - "version": "file:packages/plugos-silverbullet-syscall", - "requires": { - "@silverbulletmd/common": "^0.0.9", - "@silverbulletmd/plugs": "^0.0.9", - "@silverbulletmd/web": "^0.0.9", - "node-fetch": "^3.2.6" - }, - "dependencies": { - "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" - } - } - } + "version": "file:packages/plugos-silverbullet-syscall" }, "@silverbulletmd/plugs": { "version": "file:packages/plugs", @@ -26709,15 +26563,12 @@ "@jest/globals": "^27.5.1", "@lezer/generator": "1.0.0", "@lezer/lr": "1.0.0", - "@silverbulletmd/common": "^0.0.9", - "@silverbulletmd/plugs": "^0.0.9", - "@silverbulletmd/web": "^0.0.9", + "@silverbulletmd/common": "^0.0.16", "@types/markdown-it": "^12.2.3", "@types/yaml": "^1.9.7", "handlebars": "^4.7.7", "markdown-it": "^12.3.2", "markdown-it-task-lists": "^2.1.1", - "node-fetch": "^3.2.6", "yaml": "^2.0.0" }, "dependencies": { @@ -26734,16 +26585,6 @@ "@lezer/common": "^1.0.0" } }, - "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" - } - }, "yaml": { "version": "2.0.1" } @@ -26763,9 +26604,9 @@ "@parcel/transformer-sass": "2.5.0", "@parcel/transformer-webmanifest": "2.5.0", "@parcel/validator-typescript": "2.5.0", - "@silverbulletmd/common": "^0.0.9", - "@silverbulletmd/plugs": "^0.0.9", - "@silverbulletmd/web": "^0.0.9", + "@silverbulletmd/common": "^0.0.16", + "@silverbulletmd/plugs": "^0.0.16", + "@silverbulletmd/web": "^0.0.16", "@types/cors": "^2.8.12", "@types/events": "^3.0.0", "@types/express": "^4.17.13", @@ -27472,9 +27313,6 @@ "@parcel/transformer-sass": "2.5.0", "@parcel/transformer-webmanifest": "2.5.0", "@parcel/validator-typescript": "2.5.0", - "@silverbulletmd/common": "^0.0.9", - "@silverbulletmd/plugs": "^0.0.9", - "@silverbulletmd/web": "^0.0.9", "@types/cors": "^2.8.12", "@types/events": "^3.0.0", "@types/jest": "^27.4.1", diff --git a/packages/common/package.json b/packages/common/package.json index 1011f831..ec526972 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.9", + "version": "0.0.16", "license": "MIT", "dependencies": { "@codemirror/autocomplete": "6.0.1", @@ -18,10 +18,6 @@ "@codemirror/view": "6.0.0", "@lezer/common": "1.0.0", "@lezer/highlight": "1.0.0", - "@lezer/markdown": "1.0.0", - "@silverbulletmd/common": "^0.0.9", - "@silverbulletmd/plugs": "^0.0.9", - "@silverbulletmd/web": "^0.0.9", - "node-fetch": "^3.2.6" + "@lezer/markdown": "1.0.0" } } diff --git a/packages/plugos-silverbullet-syscall/package.json b/packages/plugos-silverbullet-syscall/package.json index 41b43b29..9d361325 100644 --- a/packages/plugos-silverbullet-syscall/package.json +++ b/packages/plugos-silverbullet-syscall/package.json @@ -4,12 +4,6 @@ "name": "Zef Hemel", "email": "zef@zef.me" }, - "version": "0.0.9", - "license": "MIT", - "dependencies": { - "@silverbulletmd/common": "^0.0.9", - "@silverbulletmd/plugs": "^0.0.9", - "@silverbulletmd/web": "^0.0.9", - "node-fetch": "^3.2.6" - } + "version": "0.0.16", + "license": "MIT" } diff --git a/packages/plugos-syscall/package.json b/packages/plugos-syscall/package.json index 489b1d5a..67bb197f 100644 --- a/packages/plugos-syscall/package.json +++ b/packages/plugos-syscall/package.json @@ -4,12 +4,6 @@ "name": "Zef Hemel", "email": "zef@zef.me" }, - "version": "0.0.9", - "license": "MIT", - "dependencies": { - "@silverbulletmd/common": "^0.0.9", - "@silverbulletmd/plugs": "^0.0.9", - "@silverbulletmd/web": "^0.0.9", - "node-fetch": "^3.2.6" - } + "version": "0.0.16", + "license": "MIT" } diff --git a/packages/plugos/bin/plugos-bundle.ts b/packages/plugos/bin/plugos-bundle.ts index 0d6572dc..69457cb3 100755 --- a/packages/plugos/bin/plugos-bundle.ts +++ b/packages/plugos/bin/plugos-bundle.ts @@ -92,7 +92,7 @@ async function run() { process.exit(1); } - console.log("Args", args); + // console.log("Args", args); async function buildAll() { mkdirSync(args.dist, { recursive: true }); diff --git a/packages/plugos/package.json b/packages/plugos/package.json index cfced767..b2876c32 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.9", + "version": "0.0.16", "license": "MIT", "bin": { "plugos-bundle": "./dist/plugos/plugos-bundle.js", @@ -40,9 +40,6 @@ }, "dependencies": { "@jest/globals": "^27.5.1", - "@silverbulletmd/common": "^0.0.9", - "@silverbulletmd/plugs": "^0.0.9", - "@silverbulletmd/web": "^0.0.9", "@types/cors": "^2.8.12", "@types/express": "^4.17.13", "@types/jsonwebtoken": "^8.5.8", diff --git a/packages/plugos/yarn-error.log b/packages/plugos/yarn-error.log deleted file mode 100644 index dec934c9..00000000 --- a/packages/plugos/yarn-error.log +++ /dev/null @@ -1,113 +0,0 @@ -Arguments: - /Users/zef/.nvm/versions/node/v16.13.2/bin/node /Users/zef/.nvm/versions/node/v16.13.2/bin/yarn add --json @parcel/transformer-babel -D -W - -PATH: - /Users/zef/git/silverbullet/packages/plugos/node_modules/.bin:/Users/zef/git/silverbullet/packages/node_modules/.bin:/Users/zef/git/silverbullet/node_modules/.bin:/Users/zef/git/node_modules/.bin:/Users/zef/node_modules/.bin:/Users/node_modules/.bin:/node_modules/.bin:/Users/zef/.nvm/versions/node/v16.13.2/lib/node_modules/npm/node_modules/@npmcli/run-script/lib/node-gyp-bin:/Users/zef/.nvm/versions/node/v16.13.2/bin:/Library/Frameworks/Python.framework/Versions/2.7/bin:/Users/zef/.local/share/solana/install/active_release/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/Apple/usr/bin:/Users/zef/.nvm/versions/node/v16.13.2/bin:/Library/Frameworks/Python.framework/Versions/2.7/bin:/Users/zef/.local/share/solana/install/active_release/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/Users/zef/.cargo/bin - -Yarn version: - 1.22.18 - -Node version: - 16.13.2 - -Platform: - darwin arm64 - -Trace: - Error: ENOENT: no such file or directory, scandir '/Users/zef/git/silverbullet/node_modules/@plugos-silverbulet-syscall' - -npm manifest: - { - "name": "@plugos/plugos", - "author": { - "name": "Zef Hemel", - "email": "zef@zef.me" - }, - "version": "0.0.1", - "license": "MIT", - "bin": { - "plugos-bundle": "./dist/plugos/plugos-bundle.js", - "plugos-server": "./dist/plugos/plugos-server.js" - }, - "scripts": { - "watch": "rm -rf .parcel-cache && parcel watch", - "build": "parcel build", - "clean": "rm -rf dist", - "test": "jest dist/test" - }, - "targets": { - "plugos": { - "source": [ - "bin/plugos-bundle.ts", - "bin/plugos-server.ts" - ], - "outputFormat": "commonjs", - "isLibrary": true, - "context": "node" - }, - "test": { - "source": [ - "runtime.test.ts", - "hooks/endpoint.test.ts", - "syscalls/store.knex_node.test.ts", - "syscalls/store.dexie_browser.test.ts" - ], - "outputFormat": "commonjs", - "isLibrary": true, - "context": "node" - } - }, - "dependencies": { - "@jest/globals": "^27.5.1", - "@types/cors": "^2.8.12", - "@types/express": "^4.17.13", - "@types/jsonwebtoken": "^8.5.8", - "better-sqlite3": "^7.5.0", - "body-parser": "^1.19.2", - "cors": "^2.8.5", - "dexie": "^3.2.1", - "esbuild": "^0.14.27", - "express": "^4.17.3", - "fake-indexeddb": "^3.1.7", - "jest": "^27.5.1", - "jsonwebtoken": "^8.5.1", - "knex": "^1.0.4", - "node-cron": "^3.0.0", - "node-fetch": "2", - "node-watch": "^0.7.3", - "supertest": "^6.2.2", - "vm2": "^3.9.9", - "ws": "^8.5.0", - "yaml": "^1.10.2", - "yargs": "^17.3.1" - }, - "devDependencies": { - "@lezer/lr": "^0.15.0", - "@parcel/optimizer-data-url": "2.3.2", - "@parcel/packager-raw-url": "2.3.2", - "@parcel/service-worker": "2.3.2", - "@parcel/transformer-inline-string": "2.3.2", - "@parcel/transformer-sass": "2.3.2", - "@parcel/transformer-webmanifest": "2.3.2", - "@parcel/validator-typescript": "2.3.2", - "@types/events": "^3.0.0", - "@types/jest": "^27.4.1", - "@types/node": "^17.0.21", - "@types/node-cron": "^3.0.1", - "@types/node-fetch": "^2.6.1", - "@types/supertest": "^2.0.11", - "@types/yaml": "^1.9.7", - "@vscode/sqlite3": "^5.0.7", - "assert": "^2.0.0", - "events": "^3.3.0", - "parcel": "2.3.2", - "prettier": "^2.5.1", - "typescript": "^4.6.2" - } - } - -yarn manifest: - No manifest - -Lockfile: - No lockfile diff --git a/packages/plugs/.gitignore b/packages/plugs/.gitignore new file mode 100644 index 00000000..c795b054 --- /dev/null +++ b/packages/plugs/.gitignore @@ -0,0 +1 @@ +build \ No newline at end of file diff --git a/packages/plugs/build/test/engine.test.js b/packages/plugs/build/test/engine.test.js deleted file mode 100644 index cb8b3c3a..00000000 --- a/packages/plugs/build/test/engine.test.js +++ /dev/null @@ -1,580 +0,0 @@ -var $hVExJ$jestglobals = require("@jest/globals"); -var $hVExJ$handlebars = require("handlebars"); -var $hVExJ$yaml = require("yaml"); -var $hVExJ$lezerlr = require("@lezer/lr"); - -function $parcel$interopDefault(a) { - return a && a.__esModule ? a.default : a; -} - -function $255163dfff8c42fb$export$6dd7a1b2f91e0e12(tree) { - if (!tree.children) return; - for (let child of tree.children){ - if (child.parent) // Already added parent pointers before - return; - child.parent = tree; - $255163dfff8c42fb$export$6dd7a1b2f91e0e12(child); - } -} -function $255163dfff8c42fb$export$7bbc263cafa7dd78(tree) { - delete tree.parent; - if (!tree.children) return; - for (let child of tree.children)$255163dfff8c42fb$export$7bbc263cafa7dd78(child); -} -function $255163dfff8c42fb$export$6dcbc6776594ee95(tree, matchFn) { - let node = tree.parent; - while(node){ - if (matchFn(node)) return node; - node = node.parent; - } - return null; -} -function $255163dfff8c42fb$export$dddeb721bf64f8df(tree, nodeType) { - return $255163dfff8c42fb$export$b86407c733c9fe3(tree, (n)=>n.type === nodeType - ); -} -function $255163dfff8c42fb$export$b86407c733c9fe3(tree, matchFn) { - if (matchFn(tree)) return [ - tree - ]; - let results = []; - if (tree.children) for (let child of tree.children)results = [ - ...results, - ...$255163dfff8c42fb$export$b86407c733c9fe3(child, matchFn) - ]; - return results; -} -function $255163dfff8c42fb$export$90b8ac453fa63932(tree, substituteFn) { - if (tree.children) { - let children = tree.children.slice(); - for (let child of children){ - let subst = substituteFn(child); - if (subst !== undefined) { - let pos = tree.children.indexOf(child); - if (subst) tree.children.splice(pos, 1, subst); - else // null = delete - tree.children.splice(pos, 1); - } else $255163dfff8c42fb$export$90b8ac453fa63932(child, substituteFn); - } - } -} -function $255163dfff8c42fb$export$4d49acedd23f9b0a(tree, matchFn) { - return $255163dfff8c42fb$export$b86407c733c9fe3(tree, matchFn)[0]; -} -function $255163dfff8c42fb$export$80a8b4335833eeeb(tree, nodeType) { - return $255163dfff8c42fb$export$b86407c733c9fe3(tree, (n)=>n.type === nodeType - )[0]; -} -function $255163dfff8c42fb$export$a41716fb83443983(tree, pos) { - if (pos < tree.from || pos > tree.to) return null; - if (!tree.children) return tree; - for (let child of tree.children){ - let n = $255163dfff8c42fb$export$a41716fb83443983(child, pos); - if (n && n.text !== undefined) // Got a text node, let's return its parent - return tree; - else if (n) // Got it - return n; - } - return null; -} -function $255163dfff8c42fb$export$f21c5276b1e9847a(tree) { - let pieces = []; - if (tree.text !== undefined) return tree.text; - for (let child of tree.children)pieces.push($255163dfff8c42fb$export$f21c5276b1e9847a(child)); - return pieces.join(""); -} - - -function $88d466d5aaf7a497$export$87cc1c28aef74af1(text, n, offset = 0) { - let children = []; - let nodeText; - let child = n.firstChild; - while(child){ - children.push($88d466d5aaf7a497$export$87cc1c28aef74af1(text, child)); - child = child.nextSibling; - } - if (children.length === 0) children = [ - { - from: n.from + offset, - to: n.to + offset, - text: text.substring(n.from, n.to) - }, - ]; - else { - let newChildren = []; - let index = n.from; - for (let child of children){ - let s = text.substring(index, child.from); - if (s) newChildren.push({ - from: index + offset, - to: child.from + offset, - text: s - }); - newChildren.push(child); - index = child.to; - } - let s = text.substring(index, n.to); - if (s) newChildren.push({ - from: index + offset, - to: n.to + offset, - text: s - }); - children = newChildren; - } - let result = { - type: n.name, - from: n.from + offset, - to: n.to + offset - }; - if (children.length > 0) result.children = children; - if (nodeText) result.text = nodeText; - return result; -} -function $88d466d5aaf7a497$export$98e6a39c04603d36(language, text) { - let tree = $88d466d5aaf7a497$export$87cc1c28aef74af1(text, language.parser.parse(text).topNode); - // replaceNodesMatching(tree, (n): MarkdownTree | undefined | null => { - // if (n.type === "FencedCode") { - // let infoN = findNodeMatching(n, (n) => n.type === "CodeInfo"); - // let language = infoN!.children![0].text; - // let textN = findNodeMatching(n, (n) => n.type === "CodeText"); - // let text = textN!.children![0].text!; - // - // console.log(language, text); - // switch (language) { - // case "yaml": - // let parsed = StreamLanguage.define(yaml).parser.parse(text); - // let subTree = treeToAST(text, parsed.topNode, n.from); - // // console.log(JSON.stringify(subTree, null, 2)); - // subTree.type = "yaml"; - // return subTree; - // } - // } - // return; - // }); - return tree; -} - - - - - -const $d85524f23de2149a$export$8f49e4af10703ce3 = $hVExJ$lezerlr.LRParser.deserialize({ - version: 13, - states: "&fOVQPOOOmQQO'#C^QOQPOOOtQPO'#C`OyQQO'#CkO!OQPO'#CmO!TQPO'#CnO!YQPO'#CoOOQO'#Cp'#CpO!_QQO,58xO!fQQO'#CcO#TQQO'#CaOOQO'#Ca'#CaOOQO,58z,58zO#lQPO,59VOOQO,59X,59XO#qQQO'#D`OOQO,59Y,59YOOQO,59Z,59ZOOQO-E6n-E6nO$YQQO,58}OtQPO,58|O$qQQO1G.qO%]QPO'#CrO%bQQO,59zOOQO'#Cg'#CgOOQO'#Ci'#CiO$YQQO'#CjOOQO'#Cd'#CdOOQO1G.i1G.iOOQO1G.h1G.hOOQO'#Cl'#ClOOQO7+$]7+$]OOQO,59^,59^OOQO-E6p-E6pO%yQPO'#C|O&RQPO,59UO$YQQO'#CqO&WQPO,59hOOQO1G.p1G.pOOQO,59],59]OOQO-E6o-E6o", - stateData: "&`~OiOS~ORPO~OjRO|SO!QTO!RUO!TVO~OgQX~P[ORYO~O}^O~OX_O~OR`O~OYbO~OgQa~P[OkdOsdOtdOudOvdOwdOxdOydOzdO~O{eOgTXjTX|TX!QTX!RTX!TTX~ORfO~OqgOg!SXj!SX|!SX!Q!SX!R!SX!T!SX~OXlOYlO[lOliOmiOnjOokO~O!OoO!PoOg_ij_i|_i!Q_i!R_i!T_i~ORqO~OqgOg!Saj!Sa|!Sa!Q!Sa!R!Sa!T!Sa~OquOrpX~OrwO~OquOrpa~O", - goto: "#d!TPP!UP!X!]!`!c!iPP!rP!r!r!X!w!X!X!X!z#Q#WPPPPPPPPP#^PPPPPPPPPPPPPPPPP#aRQOTWPXR]RR[RQZRRneQmdQskRxuVldkuRpfQXPRcXQvsRyvQh`RrhRtkRaU", - nodeNames: "⚠ Program Query Name WhereClause LogicalExpr AndExpr FilterExpr Value Number String Bool Regex Null List OrderClause Order LimitClause SelectClause RenderClause", - maxTerm: 51, - skippedNodes: [ - 0 - ], - repeatNodeCount: 3, - tokenData: "Ap~R}X^$Opq$Oqr$srs%W|}%r}!O%w!P!Q&Y!Q!['P!^!_'X!_!`'f!`!a's!c!}%w!}#O(Q#P#Q(V#R#S%w#T#U([#U#V*q#V#W%w#W#X+m#X#Y%w#Y#Z-i#Z#]%w#]#^/y#^#`%w#`#a0u#a#b%w#b#c3Y#c#d5U#d#f%w#f#g7i#g#h:e#h#i=a#i#k%w#k#l?]#l#o%w#y#z$O$f$g$O#BY#BZ$O$IS$I_$O$Ip$Iq%W$Iq$Ir%W$I|$JO$O$JT$JU$O$KV$KW$O&FU&FV$O~$TYi~X^$Opq$O#y#z$O$f$g$O#BY#BZ$O$IS$I_$O$I|$JO$O$JT$JU$O$KV$KW$O&FU&FV$O~$vP!_!`$y~%OPu~#r#s%R~%WOy~~%ZUOr%Wrs%ms$Ip%W$Ip$Iq%m$Iq$Ir%m$Ir~%W~%rOY~~%wOq~P%|SRP}!O%w!c!}%w#R#S%w#T#o%w~&_V[~OY&YZ]&Y^!P&Y!P!Q&t!Q#O&Y#O#P&y#P~&Y~&yO[~~&|PO~&Y~'UPX~!Q!['P~'^Pk~!_!`'a~'fOs~~'kPt~#r#s'n~'sOx~~'xPw~!_!`'{~(QOv~~(VOo~~([Or~R(aWRP}!O%w!c!}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!}%w#R#S%w#T#f%w#f#g5m#g#o%wR5rURP}!O%w!c!}%w#R#S%w#T#W%w#W#X6U#X#o%wR6ZURP}!O%w!c!}%w#R#S%w#T#X%w#X#Y6m#Y#o%wR6rURP}!O%w!c!}%w#R#S%w#T#f%w#f#g7U#g#o%wR7]S|QRP}!O%w!c!}%w#R#S%w#T#o%wR7nURP}!O%w!c!}%w#R#S%w#T#X%w#X#Y8Q#Y#o%wR8VURP}!O%w!c!}%w#R#S%w#T#b%w#b#c8i#c#o%wR8nURP}!O%w!c!}%w#R#S%w#T#W%w#W#X9Q#X#o%wR9VURP}!O%w!c!}%w#R#S%w#T#X%w#X#Y9i#Y#o%wR9nURP}!O%w!c!}%w#R#S%w#T#f%w#f#g:Q#g#o%wR:XS!TQRP}!O%w!c!}%w#R#S%w#T#o%wR:jURP}!O%w!c!}%w#R#S%w#T#X%w#X#Y:|#Y#o%wR;RURP}!O%w!c!}%w#R#S%w#T#`%w#`#a;e#a#o%wR;jURP}!O%w!c!}%w#R#S%w#T#X%w#X#Y;|#Y#o%wRa#j#o%wR>fURP}!O%w!c!}%w#R#S%w#T#X%w#X#Y>x#Y#o%wR?PSlQRP}!O%w!c!}%w#R#S%w#T#o%wR?bURP}!O%w!c!}%w#R#S%w#T#[%w#[#]?t#]#o%wR?yURP}!O%w!c!}%w#R#S%w#T#X%w#X#Y@]#Y#o%wR@bURP}!O%w!c!}%w#R#S%w#T#f%w#f#g@t#g#o%wR@yURP}!O%w!c!}%w#R#S%w#T#X%w#X#YA]#Y#o%wRAdSjQRP}!O%w!c!}%w#R#S%w#T#o%w", - tokenizers: [ - 0, - 1 - ], - topRules: { - "Program": [ - 0, - 1 - ] - }, - tokenPrec: 0 -}); - - -const $4ba3510c824e3aea$export$c5be9092dbf465c = self.syscall; - - -async function $2780e5830b4782c9$export$c3455d2d4767a60b(unfiltered = false) { - return $4ba3510c824e3aea$export$c5be9092dbf465c("space.listPages", unfiltered); -} -async function $2780e5830b4782c9$export$126f79da5c357ad(name) { - return $4ba3510c824e3aea$export$c5be9092dbf465c("space.readPage", name); -} -async function $2780e5830b4782c9$export$7ed3b3f07f54e00c(name, text) { - return $4ba3510c824e3aea$export$c5be9092dbf465c("space.writePage", name, text); -} -async function $2780e5830b4782c9$export$2e9858c25869c949(name) { - return $4ba3510c824e3aea$export$c5be9092dbf465c("space.deletePage", name); -} - - - -function $11a7e2bff790f35a$export$7945ba8eb1c827e6() { - return $4ba3510c824e3aea$export$c5be9092dbf465c("editor.getCurrentPage"); -} -function $11a7e2bff790f35a$export$5e830c5f3cd8a610(newName) { - return $4ba3510c824e3aea$export$c5be9092dbf465c("editor.setPage", newName); -} -function $11a7e2bff790f35a$export$c72d34660a162238() { - return $4ba3510c824e3aea$export$c5be9092dbf465c("editor.getText"); -} -function $11a7e2bff790f35a$export$da3f040fb23d21f() { - return $4ba3510c824e3aea$export$c5be9092dbf465c("editor.getCursor"); -} -function $11a7e2bff790f35a$export$ca798a7e6e94638c() { - return $4ba3510c824e3aea$export$c5be9092dbf465c("editor.getSelection"); -} -function $11a7e2bff790f35a$export$f6e36f80a8190133(from, to) { - return $4ba3510c824e3aea$export$c5be9092dbf465c("editor.setSelection", from, to); -} -function $11a7e2bff790f35a$export$a1544dad697b423d() { - return $4ba3510c824e3aea$export$c5be9092dbf465c("editor.save"); -} -function $11a7e2bff790f35a$export$ff7962acd6052c28(name, pos) { - return $4ba3510c824e3aea$export$c5be9092dbf465c("editor.navigate", name, pos); -} -function $11a7e2bff790f35a$export$da22d4a5076a7905() { - return $4ba3510c824e3aea$export$c5be9092dbf465c("editor.reloadPage"); -} -function $11a7e2bff790f35a$export$a238cfe4a10e6279(url) { - return $4ba3510c824e3aea$export$c5be9092dbf465c("editor.openUrl", url); -} -function $11a7e2bff790f35a$export$4f02334034b5dd8c(message) { - return $4ba3510c824e3aea$export$c5be9092dbf465c("editor.flashNotification", message); -} -function $11a7e2bff790f35a$export$83b9d7a71bc0a208(label, options, helpText = "", placeHolder = "") { - return $4ba3510c824e3aea$export$c5be9092dbf465c("editor.filterBox", label, options, helpText, placeHolder); -} -function $11a7e2bff790f35a$export$53ed0b99a5f8822e(html, script, flex = 1) { - return $4ba3510c824e3aea$export$c5be9092dbf465c("editor.showRhs", html, script, flex); -} -function $11a7e2bff790f35a$export$f19f28e8a128fabe() { - return $4ba3510c824e3aea$export$c5be9092dbf465c("editor.hideRhs"); -} -function $11a7e2bff790f35a$export$dcf0ace441f4b3a4(html, script, flex = 1) { - return $4ba3510c824e3aea$export$c5be9092dbf465c("editor.showLhs", html, script, flex); -} -function $11a7e2bff790f35a$export$1be2ad20c6324dcf() { - return $4ba3510c824e3aea$export$c5be9092dbf465c("editor.hideLhs"); -} -function $11a7e2bff790f35a$export$6ebe231c70cc6efb(html, script, flex = 1) { - return $4ba3510c824e3aea$export$c5be9092dbf465c("editor.showBhs", html, script, flex); -} -function $11a7e2bff790f35a$export$a7a5aa8ba1cd9dc3() { - return $4ba3510c824e3aea$export$c5be9092dbf465c("editor.hideBhs"); -} -function $11a7e2bff790f35a$export$f1124a4ce9f9bf29(text, pos) { - return $4ba3510c824e3aea$export$c5be9092dbf465c("editor.insertAtPos", text, pos); -} -function $11a7e2bff790f35a$export$54cb80d99fa58e48(from, to, text) { - return $4ba3510c824e3aea$export$c5be9092dbf465c("editor.replaceRange", from, to, text); -} -function $11a7e2bff790f35a$export$185d1f0722e636b2(pos) { - return $4ba3510c824e3aea$export$c5be9092dbf465c("editor.moveCursor", pos); -} -function $11a7e2bff790f35a$export$df659347c0c138a9(text) { - return $4ba3510c824e3aea$export$c5be9092dbf465c("editor.insertAtCursor", text); -} -function $11a7e2bff790f35a$export$c4c1b7dbe675fa50(re) { - return $4ba3510c824e3aea$export$c5be9092dbf465c("editor.matchBefore", re); -} -function $11a7e2bff790f35a$export$635e15bbd66f01ea(change) { - return $4ba3510c824e3aea$export$c5be9092dbf465c("editor.dispatch", change); -} -function $11a7e2bff790f35a$export$195ba6d62321b933(message, defaultValue = "") { - return $4ba3510c824e3aea$export$c5be9092dbf465c("editor.prompt", message, defaultValue); -} - - -function $c3893eec0c49ec96$export$5dc1410f87262ed6(d) { - return d.toISOString().split("T")[0]; -} -async function $c3893eec0c49ec96$export$151bb3c215c78d5a() { - await $11a7e2bff790f35a$export$df659347c0c138a9($c3893eec0c49ec96$export$5dc1410f87262ed6(new Date())); -} -async function $c3893eec0c49ec96$export$2177dd573df27382() { - let d = new Date(); - d.setDate(d.getDate() + 1); - await $11a7e2bff790f35a$export$df659347c0c138a9($c3893eec0c49ec96$export$5dc1410f87262ed6(d)); -} - - -function $9072202279b76d33$export$1e8473eaf75b0d10(query) { - let n1 = $88d466d5aaf7a497$export$87cc1c28aef74af1(query, $d85524f23de2149a$export$8f49e4af10703ce3.parse(query).topNode); - // Clean the tree a bit - $255163dfff8c42fb$export$90b8ac453fa63932(n1, (n)=>{ - if (!n.type) { - let trimmed = n.text.trim(); - if (!trimmed) return null; - n.text = trimmed; - } - }); - // console.log("Parsed", JSON.stringify(n, null, 2)); - let queryNode = n1.children[0]; - let parsedQuery = { - table: queryNode.children[0].children[0].text, - filter: [] - }; - let orderByNode = $255163dfff8c42fb$export$80a8b4335833eeeb(queryNode, "OrderClause"); - if (orderByNode) { - let nameNode = $255163dfff8c42fb$export$80a8b4335833eeeb(orderByNode, "Name"); - parsedQuery.orderBy = nameNode.children[0].text; - let orderNode = $255163dfff8c42fb$export$80a8b4335833eeeb(orderByNode, "Order"); - parsedQuery.orderDesc = orderNode ? orderNode.children[0].text === "desc" : false; - } - let limitNode = $255163dfff8c42fb$export$80a8b4335833eeeb(queryNode, "LimitClause"); - if (limitNode) { - let nameNode = $255163dfff8c42fb$export$80a8b4335833eeeb(limitNode, "Number"); - parsedQuery.limit = $9072202279b76d33$var$valueNodeToVal(nameNode); - } - let filterNodes = $255163dfff8c42fb$export$dddeb721bf64f8df(queryNode, "FilterExpr"); - for (let filterNode of filterNodes){ - let val = undefined; - let valNode = filterNode.children[2].children[0]; - val = $9072202279b76d33$var$valueNodeToVal(valNode); - let f = { - prop: filterNode.children[0].children[0].text, - op: filterNode.children[1].text, - value: val - }; - parsedQuery.filter.push(f); - } - let selectNode = $255163dfff8c42fb$export$80a8b4335833eeeb(queryNode, "SelectClause"); - if (selectNode) { - // console.log("Select node", JSON.stringify(selectNode)); - parsedQuery.select = []; - $255163dfff8c42fb$export$dddeb721bf64f8df(selectNode, "Name").forEach((t)=>{ - parsedQuery.select.push(t.children[0].text); - }); - // let nameNode = findNodeOfType(selectNode, "Number"); - // parsedQuery.limit = +nameNode!.children![0].text!; - } - let renderNode = $255163dfff8c42fb$export$80a8b4335833eeeb(queryNode, "RenderClause"); - if (renderNode) { - let renderNameNode = $255163dfff8c42fb$export$80a8b4335833eeeb(renderNode, "String"); - parsedQuery.render = $9072202279b76d33$var$valueNodeToVal(renderNameNode); - } - // console.log(JSON.stringify(queryNode, null, 2)); - return parsedQuery; -} -function $9072202279b76d33$var$valueNodeToVal(valNode) { - switch(valNode.type){ - case "Number": - return +valNode.children[0].text; - case "Bool": - return valNode.children[0].text === "true"; - case "Null": - return null; - case "Name": - return valNode.children[0].text; - case "Regex": - let val = valNode.children[0].text; - return val.substring(1, val.length - 1); - case "String": - let stringVal = valNode.children[0].text; - return stringVal.substring(1, stringVal.length - 1); - case "List": - return $255163dfff8c42fb$export$dddeb721bf64f8df(valNode, "Value").map((t)=>$9072202279b76d33$var$valueNodeToVal(t.children[0]) - ); - } -} -function $9072202279b76d33$export$5884dae03c64f759(parsedQuery, records) { - let resultRecords = []; - if (parsedQuery.filter.length === 0) resultRecords = records.slice(); - else recordLoop: for (let record of records){ - const recordAny = record; - for (let { op: op , prop: prop , value: value } of parsedQuery.filter)switch(op){ - case "=": - if (!(recordAny[prop] == value)) continue recordLoop; - break; - case "!=": - if (!(recordAny[prop] != value)) continue recordLoop; - break; - case "<": - if (!(recordAny[prop] < value)) continue recordLoop; - break; - case "<=": - if (!(recordAny[prop] <= value)) continue recordLoop; - break; - case ">": - if (!(recordAny[prop] > value)) continue recordLoop; - break; - case ">=": - if (!(recordAny[prop] >= value)) continue recordLoop; - break; - case "=~": - // TODO: Cache regexps somehow - if (!new RegExp(value).exec(recordAny[prop])) continue recordLoop; - break; - case "!=~": - if (new RegExp(value).exec(recordAny[prop])) continue recordLoop; - break; - case "in": - if (!value.includes(recordAny[prop])) continue recordLoop; - break; - } - resultRecords.push(recordAny); - } - // Now the sorting - if (parsedQuery.orderBy) resultRecords = resultRecords.sort((a, b)=>{ - const orderBy = parsedQuery.orderBy; - const orderDesc = parsedQuery.orderDesc; - if (a[orderBy] === b[orderBy]) return 0; - if (a[orderBy] < b[orderBy]) return orderDesc ? 1 : -1; - else return orderDesc ? -1 : 1; - }); - if (parsedQuery.limit) resultRecords = resultRecords.slice(0, parsedQuery.limit); - if (parsedQuery.select) resultRecords = resultRecords.map((rec)=>{ - let newRec = {}; - for (let k of parsedQuery.select)newRec[k] = rec[k]; - return newRec; - }); - return resultRecords; -} -async function $9072202279b76d33$export$b3c659c1456e61b0(parsedQuery, data) { - if (parsedQuery.render) { - ($parcel$interopDefault($hVExJ$handlebars)).registerHelper("json", (v)=>JSON.stringify(v) - ); - ($parcel$interopDefault($hVExJ$handlebars)).registerHelper("niceDate", (ts)=>$c3893eec0c49ec96$export$5dc1410f87262ed6(new Date(ts)) - ); - ($parcel$interopDefault($hVExJ$handlebars)).registerHelper("yaml", (v, prefix)=>{ - if (typeof prefix === "string") { - let yaml = ($parcel$interopDefault($hVExJ$yaml)).stringify(v).split("\n").join("\n" + prefix).trim(); - if (Array.isArray(v)) return "\n" + prefix + yaml; - else return yaml; - } else return ($parcel$interopDefault($hVExJ$yaml)).stringify(v).trim(); - }); - let { text: templateText } = await $2780e5830b4782c9$export$126f79da5c357ad(parsedQuery.render); - let template = ($parcel$interopDefault($hVExJ$handlebars)).compile(templateText, { - noEscape: true - }); - return template(data); - } - return "ERROR"; -} - - -$hVExJ$jestglobals.test("Test parser", ()=>{ - let parsedBasicQuery = $9072202279b76d33$export$1e8473eaf75b0d10(`page`); - $hVExJ$jestglobals.expect(parsedBasicQuery.table).toBe("page"); - let parsedQuery1 = $9072202279b76d33$export$1e8473eaf75b0d10(`task where completed = false and dueDate <= "{{today}}" order by dueDate desc limit 5`); - $hVExJ$jestglobals.expect(parsedQuery1.table).toBe("task"); - $hVExJ$jestglobals.expect(parsedQuery1.orderBy).toBe("dueDate"); - $hVExJ$jestglobals.expect(parsedQuery1.orderDesc).toBe(true); - $hVExJ$jestglobals.expect(parsedQuery1.limit).toBe(5); - $hVExJ$jestglobals.expect(parsedQuery1.filter.length).toBe(2); - $hVExJ$jestglobals.expect(parsedQuery1.filter[0]).toStrictEqual({ - op: "=", - prop: "completed", - value: false - }); - $hVExJ$jestglobals.expect(parsedQuery1.filter[1]).toStrictEqual({ - op: "<=", - prop: "dueDate", - value: "{{today}}" - }); - let parsedQuery2 = $9072202279b76d33$export$1e8473eaf75b0d10(`page where name =~ /interview\\/.*/"`); - $hVExJ$jestglobals.expect(parsedQuery2.table).toBe("page"); - $hVExJ$jestglobals.expect(parsedQuery2.filter.length).toBe(1); - $hVExJ$jestglobals.expect(parsedQuery2.filter[0]).toStrictEqual({ - op: "=~", - prop: "name", - value: "interview\\/.*" - }); - let parsedQuery3 = $9072202279b76d33$export$1e8473eaf75b0d10(`page where something != null`); - $hVExJ$jestglobals.expect(parsedQuery3.table).toBe("page"); - $hVExJ$jestglobals.expect(parsedQuery3.filter.length).toBe(1); - $hVExJ$jestglobals.expect(parsedQuery3.filter[0]).toStrictEqual({ - op: "!=", - prop: "something", - value: null - }); - $hVExJ$jestglobals.expect($9072202279b76d33$export$1e8473eaf75b0d10(`page select name`).select).toStrictEqual([ - "name" - ]); - $hVExJ$jestglobals.expect($9072202279b76d33$export$1e8473eaf75b0d10(`page select name, age`).select).toStrictEqual([ - "name", - "age", - ]); - $hVExJ$jestglobals.expect($9072202279b76d33$export$1e8473eaf75b0d10(`gh-events where type in ["PushEvent", "somethingElse"]`)).toStrictEqual({ - table: "gh-events", - filter: [ - { - op: "in", - prop: "type", - value: [ - "PushEvent", - "somethingElse" - ] - }, - ] - }); - $hVExJ$jestglobals.expect($9072202279b76d33$export$1e8473eaf75b0d10(`something render "template/table"`)).toStrictEqual({ - table: "something", - filter: [], - render: "template/table" - }); -}); -$hVExJ$jestglobals.test("Test performing the queries", ()=>{ - let data = [ - { - name: "interview/My Interview", - lastModified: 1 - }, - { - name: "interview/My Interview 2", - lastModified: 2 - }, - { - name: "Pete", - age: 38 - }, - { - name: "Angie", - age: 28 - }, - ]; - $hVExJ$jestglobals.expect($9072202279b76d33$export$5884dae03c64f759($9072202279b76d33$export$1e8473eaf75b0d10(`page where name =~ /interview\\/.*/`), data)).toStrictEqual([ - { - name: "interview/My Interview", - lastModified: 1 - }, - { - name: "interview/My Interview 2", - lastModified: 2 - }, - ]); - $hVExJ$jestglobals.expect($9072202279b76d33$export$5884dae03c64f759($9072202279b76d33$export$1e8473eaf75b0d10(`page where name =~ /interview\\/.*/ order by lastModified`), data)).toStrictEqual([ - { - name: "interview/My Interview", - lastModified: 1 - }, - { - name: "interview/My Interview 2", - lastModified: 2 - }, - ]); - $hVExJ$jestglobals.expect($9072202279b76d33$export$5884dae03c64f759($9072202279b76d33$export$1e8473eaf75b0d10(`page where name =~ /interview\\/.*/ order by lastModified desc`), data)).toStrictEqual([ - { - name: "interview/My Interview 2", - lastModified: 2 - }, - { - name: "interview/My Interview", - lastModified: 1 - }, - ]); - $hVExJ$jestglobals.expect($9072202279b76d33$export$5884dae03c64f759($9072202279b76d33$export$1e8473eaf75b0d10(`page where age > 30`), data)).toStrictEqual([ - { - name: "Pete", - age: 38 - }, - ]); - $hVExJ$jestglobals.expect($9072202279b76d33$export$5884dae03c64f759($9072202279b76d33$export$1e8473eaf75b0d10(`page where age > 28 and age < 38`), data)).toStrictEqual([]); - $hVExJ$jestglobals.expect($9072202279b76d33$export$5884dae03c64f759($9072202279b76d33$export$1e8473eaf75b0d10(`page where age > 30 select name`), data)).toStrictEqual([ - { - name: "Pete" - } - ]); - $hVExJ$jestglobals.expect($9072202279b76d33$export$5884dae03c64f759($9072202279b76d33$export$1e8473eaf75b0d10(`page where name in ["Pete"] select name`), data)).toStrictEqual([ - { - name: "Pete" - } - ]); -}); - - -//# sourceMappingURL=engine.test.js.map diff --git a/packages/plugs/build/test/engine.test.js.map b/packages/plugs/build/test/engine.test.js.map deleted file mode 100644 index 2e123cf5..00000000 --- a/packages/plugs/build/test/engine.test.js.map +++ /dev/null @@ -1 +0,0 @@ -{"mappings":";;;;;;;;AAAA;AEUO,SAAS,yCAAiB,CAAC,IAAe,EAAE;IACjD,IAAI,CAAC,IAAI,CAAC,QAAQ,EAChB,OAAO;IAET,KAAK,IAAI,KAAK,IAAI,IAAI,CAAC,QAAQ,CAAE;QAC/B,IAAI,KAAK,CAAC,MAAM,EACd,uCAAuC;QACvC,OAAO;QAET,KAAK,CAAC,MAAM,GAAG,IAAI,CAAC;QACpB,yCAAiB,CAAC,KAAK,CAAC,CAAC;KAC1B;CACF;AAEM,SAAS,yCAAoB,CAAC,IAAe,EAAE;IACpD,OAAO,IAAI,CAAC,MAAM,CAAC;IACnB,IAAI,CAAC,IAAI,CAAC,QAAQ,EAChB,OAAO;IAET,KAAK,IAAI,KAAK,IAAI,IAAI,CAAC,QAAQ,CAC7B,yCAAoB,CAAC,KAAK,CAAC,CAAC;CAE/B;AAEM,SAAS,yCAAkB,CAChC,IAAe,EACf,OAAqC,EACnB;IAClB,IAAI,IAAI,GAAG,IAAI,CAAC,MAAM,AAAC;IACvB,MAAO,IAAI,CAAE;QACX,IAAI,OAAO,CAAC,IAAI,CAAC,EACf,OAAO,IAAI,CAAC;QAEd,IAAI,GAAG,IAAI,CAAC,MAAM,CAAC;KACpB;IACD,OAAO,IAAI,CAAC;CACb;AAEM,SAAS,yCAAkB,CAChC,IAAe,EACf,QAAgB,EACH;IACb,OAAO,wCAAoB,CAAC,IAAI,EAAE,CAAC,CAAC,GAAK,CAAC,CAAC,IAAI,KAAK,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E;KACpD,CAAC,CAAC;IACH,yBAAM,CAAC,yCAAU,CAAC,yCAAU,CAAC,CAAC,mBAAmB,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC,aAAa,CAAC;QACxE;YAAE,IAAI,EAAE,MAAM;YAAE,GAAG,EAAE,EAAE;SAAE;KAC1B,CAAC,CAAC;IACH,yBAAM,CACJ,yCAAU,CAAC,yCAAU,CAAC,CAAC,gCAAgC,CAAC,CAAC,EAAE,IAAI,CAAC,CACjE,CAAC,aAAa,CAAC,EAAE,CAAC,CAAC;IACpB,yBAAM,CACJ,yCAAU,CAAC,yCAAU,CAAC,CAAC,+BAA+B,CAAC,CAAC,EAAE,IAAI,CAAC,CAChE,CAAC,aAAa,CAAC;QAAC;YAAE,IAAI,EAAE,MAAM;SAAE;KAAC,CAAC,CAAC;IAEpC,yBAAM,CACJ,yCAAU,CAAC,yCAAU,CAAC,CAAC,uCAAuC,CAAC,CAAC,EAAE,IAAI,CAAC,CACxE,CAAC,aAAa,CAAC;QAAC;YAAE,IAAI,EAAE,MAAM;SAAE;KAAC,CAAC,CAAC;CACrC,CAAC,CAAC","sources":["packages/plugs/query/engine.test.ts","packages/plugs/query/engine.ts","packages/common/tree.ts","packages/common/parse_tree.ts","packages/plugs/query/parse-query.js","packages/plugos-silverbullet-syscall/space.ts","packages/plugos-silverbullet-syscall/syscall.ts","packages/plugs/core/dates.ts","packages/plugos-silverbullet-syscall/editor.ts"],"sourcesContent":["import { expect, test } from \"@jest/globals\";\nimport { applyQuery, parseQuery } from \"./engine\";\n\ntest(\"Test parser\", () => {\n let parsedBasicQuery = parseQuery(`page`);\n expect(parsedBasicQuery.table).toBe(\"page\");\n\n let parsedQuery1 = parseQuery(\n `task where completed = false and dueDate <= \"{{today}}\" order by dueDate desc limit 5`\n );\n expect(parsedQuery1.table).toBe(\"task\");\n expect(parsedQuery1.orderBy).toBe(\"dueDate\");\n expect(parsedQuery1.orderDesc).toBe(true);\n expect(parsedQuery1.limit).toBe(5);\n expect(parsedQuery1.filter.length).toBe(2);\n expect(parsedQuery1.filter[0]).toStrictEqual({\n op: \"=\",\n prop: \"completed\",\n value: false,\n });\n expect(parsedQuery1.filter[1]).toStrictEqual({\n op: \"<=\",\n prop: \"dueDate\",\n value: \"{{today}}\",\n });\n\n let parsedQuery2 = parseQuery(`page where name =~ /interview\\\\/.*/\"`);\n expect(parsedQuery2.table).toBe(\"page\");\n expect(parsedQuery2.filter.length).toBe(1);\n expect(parsedQuery2.filter[0]).toStrictEqual({\n op: \"=~\",\n prop: \"name\",\n value: \"interview\\\\/.*\",\n });\n\n let parsedQuery3 = parseQuery(`page where something != null`);\n expect(parsedQuery3.table).toBe(\"page\");\n expect(parsedQuery3.filter.length).toBe(1);\n expect(parsedQuery3.filter[0]).toStrictEqual({\n op: \"!=\",\n prop: \"something\",\n value: null,\n });\n\n expect(parseQuery(`page select name`).select).toStrictEqual([\"name\"]);\n expect(parseQuery(`page select name, age`).select).toStrictEqual([\n \"name\",\n \"age\",\n ]);\n\n expect(\n parseQuery(`gh-events where type in [\"PushEvent\", \"somethingElse\"]`)\n ).toStrictEqual({\n table: \"gh-events\",\n filter: [\n {\n op: \"in\",\n prop: \"type\",\n value: [\"PushEvent\", \"somethingElse\"],\n },\n ],\n });\n\n expect(parseQuery(`something render \"template/table\"`)).toStrictEqual({\n table: \"something\",\n filter: [],\n render: \"template/table\",\n });\n});\n\ntest(\"Test performing the queries\", () => {\n let data: any[] = [\n { name: \"interview/My Interview\", lastModified: 1 },\n { name: \"interview/My Interview 2\", lastModified: 2 },\n { name: \"Pete\", age: 38 },\n { name: \"Angie\", age: 28 },\n ];\n\n expect(\n applyQuery(parseQuery(`page where name =~ /interview\\\\/.*/`), data)\n ).toStrictEqual([\n { name: \"interview/My Interview\", lastModified: 1 },\n { name: \"interview/My Interview 2\", lastModified: 2 },\n ]);\n expect(\n applyQuery(\n parseQuery(`page where name =~ /interview\\\\/.*/ order by lastModified`),\n data\n )\n ).toStrictEqual([\n { name: \"interview/My Interview\", lastModified: 1 },\n { name: \"interview/My Interview 2\", lastModified: 2 },\n ]);\n expect(\n applyQuery(\n parseQuery(\n `page where name =~ /interview\\\\/.*/ order by lastModified desc`\n ),\n data\n )\n ).toStrictEqual([\n { name: \"interview/My Interview 2\", lastModified: 2 },\n { name: \"interview/My Interview\", lastModified: 1 },\n ]);\n expect(applyQuery(parseQuery(`page where age > 30`), data)).toStrictEqual([\n { name: \"Pete\", age: 38 },\n ]);\n expect(\n applyQuery(parseQuery(`page where age > 28 and age < 38`), data)\n ).toStrictEqual([]);\n expect(\n applyQuery(parseQuery(`page where age > 30 select name`), data)\n ).toStrictEqual([{ name: \"Pete\" }]);\n\n expect(\n applyQuery(parseQuery(`page where name in [\"Pete\"] select name`), data)\n ).toStrictEqual([{ name: \"Pete\" }]);\n});\n","import {\n collectNodesOfType,\n findNodeOfType,\n ParseTree,\n replaceNodesMatching,\n} from \"@silverbulletmd/common/tree\";\nimport { lezerToParseTree } from \"@silverbulletmd/common/parse_tree\";\nimport Handlebars from \"handlebars\";\nimport YAML from \"yaml\";\n\n// @ts-ignore\nimport { parser } from \"./parse-query\";\nimport { readPage } from \"@silverbulletmd/plugos-silverbullet-syscall/space\";\nimport { niceDate } from \"../core/dates\";\n\nexport type QueryProviderEvent = {\n query: ParsedQuery;\n pageName: string;\n};\n\nexport type Filter = {\n op: string;\n prop: string;\n value: any;\n};\n\nexport type ParsedQuery = {\n table: string;\n orderBy?: string;\n orderDesc?: boolean;\n limit?: number;\n filter: Filter[];\n select?: string[];\n render?: string;\n};\n\nexport function parseQuery(query: string): ParsedQuery {\n let n = lezerToParseTree(query, parser.parse(query).topNode);\n // Clean the tree a bit\n replaceNodesMatching(n, (n) => {\n if (!n.type) {\n let trimmed = n.text!.trim();\n if (!trimmed) {\n return null;\n }\n n.text = trimmed;\n }\n });\n\n // console.log(\"Parsed\", JSON.stringify(n, null, 2));\n\n let queryNode = n.children![0];\n let parsedQuery: ParsedQuery = {\n table: queryNode.children![0].children![0].text!,\n filter: [],\n };\n let orderByNode = findNodeOfType(queryNode, \"OrderClause\");\n if (orderByNode) {\n let nameNode = findNodeOfType(orderByNode, \"Name\");\n parsedQuery.orderBy = nameNode!.children![0].text!;\n let orderNode = findNodeOfType(orderByNode, \"Order\");\n parsedQuery.orderDesc = orderNode\n ? orderNode.children![0].text! === \"desc\"\n : false;\n }\n let limitNode = findNodeOfType(queryNode, \"LimitClause\");\n if (limitNode) {\n let nameNode = findNodeOfType(limitNode, \"Number\");\n parsedQuery.limit = valueNodeToVal(nameNode!);\n }\n\n let filterNodes = collectNodesOfType(queryNode, \"FilterExpr\");\n for (let filterNode of filterNodes) {\n let val: any = undefined;\n let valNode = filterNode.children![2].children![0];\n val = valueNodeToVal(valNode);\n let f: Filter = {\n prop: filterNode.children![0].children![0].text!,\n op: filterNode.children![1].text!,\n value: val,\n };\n parsedQuery.filter.push(f);\n }\n let selectNode = findNodeOfType(queryNode, \"SelectClause\");\n if (selectNode) {\n // console.log(\"Select node\", JSON.stringify(selectNode));\n parsedQuery.select = [];\n collectNodesOfType(selectNode, \"Name\").forEach((t) => {\n parsedQuery.select!.push(t.children![0].text!);\n });\n // let nameNode = findNodeOfType(selectNode, \"Number\");\n // parsedQuery.limit = +nameNode!.children![0].text!;\n }\n\n let renderNode = findNodeOfType(queryNode, \"RenderClause\");\n if (renderNode) {\n let renderNameNode = findNodeOfType(renderNode, \"String\");\n parsedQuery.render = valueNodeToVal(renderNameNode!);\n }\n\n // console.log(JSON.stringify(queryNode, null, 2));\n return parsedQuery;\n}\n\nfunction valueNodeToVal(valNode: ParseTree): any {\n switch (valNode.type) {\n case \"Number\":\n return +valNode.children![0].text!;\n case \"Bool\":\n return valNode.children![0].text! === \"true\";\n case \"Null\":\n return null;\n case \"Name\":\n return valNode.children![0].text!;\n case \"Regex\":\n let val = valNode.children![0].text!;\n return val.substring(1, val.length - 1);\n case \"String\":\n let stringVal = valNode.children![0].text!;\n return stringVal.substring(1, stringVal.length - 1);\n case \"List\":\n return collectNodesOfType(valNode, \"Value\").map((t) =>\n valueNodeToVal(t.children![0])\n );\n }\n}\n\nexport function applyQuery(parsedQuery: ParsedQuery, records: T[]): T[] {\n let resultRecords: any[] = [];\n if (parsedQuery.filter.length === 0) {\n resultRecords = records.slice();\n } else {\n recordLoop: for (let record of records) {\n const recordAny: any = record;\n for (let { op, prop, value } of parsedQuery.filter) {\n switch (op) {\n case \"=\":\n if (!(recordAny[prop] == value)) {\n continue recordLoop;\n }\n break;\n case \"!=\":\n if (!(recordAny[prop] != value)) {\n continue recordLoop;\n }\n break;\n case \"<\":\n if (!(recordAny[prop] < value)) {\n continue recordLoop;\n }\n break;\n case \"<=\":\n if (!(recordAny[prop] <= value)) {\n continue recordLoop;\n }\n break;\n case \">\":\n if (!(recordAny[prop] > value)) {\n continue recordLoop;\n }\n break;\n case \">=\":\n if (!(recordAny[prop] >= value)) {\n continue recordLoop;\n }\n break;\n case \"=~\":\n // TODO: Cache regexps somehow\n if (!new RegExp(value).exec(recordAny[prop])) {\n continue recordLoop;\n }\n break;\n case \"!=~\":\n if (new RegExp(value).exec(recordAny[prop])) {\n continue recordLoop;\n }\n break;\n case \"in\":\n if (!value.includes(recordAny[prop])) {\n continue recordLoop;\n }\n break;\n }\n }\n resultRecords.push(recordAny);\n }\n }\n // Now the sorting\n if (parsedQuery.orderBy) {\n resultRecords = resultRecords.sort((a: any, b: any) => {\n const orderBy = parsedQuery.orderBy!;\n const orderDesc = parsedQuery.orderDesc!;\n if (a[orderBy] === b[orderBy]) {\n return 0;\n }\n\n if (a[orderBy] < b[orderBy]) {\n return orderDesc ? 1 : -1;\n } else {\n return orderDesc ? -1 : 1;\n }\n });\n }\n if (parsedQuery.limit) {\n resultRecords = resultRecords.slice(0, parsedQuery.limit);\n }\n if (parsedQuery.select) {\n resultRecords = resultRecords.map((rec) => {\n let newRec: any = {};\n for (let k of parsedQuery.select!) {\n newRec[k] = rec[k];\n }\n return newRec;\n });\n }\n return resultRecords;\n}\n\nexport async function renderQuery(\n parsedQuery: ParsedQuery,\n data: any[]\n): Promise {\n if (parsedQuery.render) {\n Handlebars.registerHelper(\"json\", (v) => JSON.stringify(v));\n Handlebars.registerHelper(\"niceDate\", (ts) => niceDate(new Date(ts)));\n Handlebars.registerHelper(\"yaml\", (v, prefix) => {\n if (typeof prefix === \"string\") {\n let yaml = YAML.stringify(v)\n .split(\"\\n\")\n .join(\"\\n\" + prefix)\n .trim();\n if (Array.isArray(v)) {\n return \"\\n\" + prefix + yaml;\n } else {\n return yaml;\n }\n } else {\n return YAML.stringify(v).trim();\n }\n });\n let { text: templateText } = await readPage(parsedQuery.render);\n let template = Handlebars.compile(templateText, { noEscape: true });\n return template(data);\n }\n\n return \"ERROR\";\n}\n","export type ParseTree = {\n type?: string; // undefined === text node\n from?: number;\n to?: number;\n text?: string;\n children?: ParseTree[];\n // Only present after running addParentPointers\n parent?: ParseTree;\n};\n\nexport function addParentPointers(tree: ParseTree) {\n if (!tree.children) {\n return;\n }\n for (let child of tree.children) {\n if (child.parent) {\n // Already added parent pointers before\n return;\n }\n child.parent = tree;\n addParentPointers(child);\n }\n}\n\nexport function removeParentPointers(tree: ParseTree) {\n delete tree.parent;\n if (!tree.children) {\n return;\n }\n for (let child of tree.children) {\n removeParentPointers(child);\n }\n}\n\nexport function findParentMatching(\n tree: ParseTree,\n matchFn: (tree: ParseTree) => boolean\n): ParseTree | null {\n let node = tree.parent;\n while (node) {\n if (matchFn(node)) {\n return node;\n }\n node = node.parent;\n }\n return null;\n}\n\nexport function collectNodesOfType(\n tree: ParseTree,\n nodeType: string\n): ParseTree[] {\n return collectNodesMatching(tree, (n) => n.type === nodeType);\n}\n\nexport function collectNodesMatching(\n tree: ParseTree,\n matchFn: (tree: ParseTree) => boolean\n): ParseTree[] {\n if (matchFn(tree)) {\n return [tree];\n }\n let results: ParseTree[] = [];\n if (tree.children) {\n for (let child of tree.children) {\n results = [...results, ...collectNodesMatching(child, matchFn)];\n }\n }\n return results;\n}\n\n// return value: returning undefined = not matched, continue, null = delete, new node = replace\nexport function replaceNodesMatching(\n tree: ParseTree,\n substituteFn: (tree: ParseTree) => ParseTree | null | undefined\n) {\n if (tree.children) {\n let children = tree.children.slice();\n for (let child of children) {\n let subst = substituteFn(child);\n if (subst !== undefined) {\n let pos = tree.children.indexOf(child);\n if (subst) {\n tree.children.splice(pos, 1, subst);\n } else {\n // null = delete\n tree.children.splice(pos, 1);\n }\n } else {\n replaceNodesMatching(child, substituteFn);\n }\n }\n }\n}\n\nexport function findNodeMatching(\n tree: ParseTree,\n matchFn: (tree: ParseTree) => boolean\n): ParseTree | null {\n return collectNodesMatching(tree, matchFn)[0];\n}\n\nexport function findNodeOfType(\n tree: ParseTree,\n nodeType: string\n): ParseTree | null {\n return collectNodesMatching(tree, (n) => n.type === nodeType)[0];\n}\n\n// Finds non-text node at position\nexport function nodeAtPos(tree: ParseTree, pos: number): ParseTree | null {\n if (pos < tree.from! || pos > tree.to!) {\n return null;\n }\n if (!tree.children) {\n return tree;\n }\n for (let child of tree.children) {\n let n = nodeAtPos(child, pos);\n if (n && n.text !== undefined) {\n // Got a text node, let's return its parent\n return tree;\n } else if (n) {\n // Got it\n return n;\n }\n }\n return null;\n}\n\n// Turn ParseTree back into text\nexport function renderToText(tree: ParseTree): string {\n let pieces: string[] = [];\n if (tree.text !== undefined) {\n return tree.text;\n }\n for (let child of tree.children!) {\n pieces.push(renderToText(child));\n }\n return pieces.join(\"\");\n}\n","import type { SyntaxNode } from \"@lezer/common\";\nimport type { Language } from \"@codemirror/language\";\nimport { ParseTree } from \"./tree\";\n\nexport function lezerToParseTree(\n text: string,\n n: SyntaxNode,\n offset = 0\n): ParseTree {\n let children: ParseTree[] = [];\n let nodeText: string | undefined;\n let child = n.firstChild;\n while (child) {\n children.push(lezerToParseTree(text, child));\n child = child.nextSibling;\n }\n\n if (children.length === 0) {\n children = [\n {\n from: n.from + offset,\n to: n.to + offset,\n text: text.substring(n.from, n.to),\n },\n ];\n } else {\n let newChildren: ParseTree[] = [];\n let index = n.from;\n for (let child of children) {\n let s = text.substring(index, child.from);\n if (s) {\n newChildren.push({\n from: index + offset,\n to: child.from! + offset,\n text: s,\n });\n }\n newChildren.push(child);\n index = child.to!;\n }\n let s = text.substring(index, n.to);\n if (s) {\n newChildren.push({ from: index + offset, to: n.to + offset, text: s });\n }\n children = newChildren;\n }\n\n let result: ParseTree = {\n type: n.name,\n from: n.from + offset,\n to: n.to + offset,\n };\n if (children.length > 0) {\n result.children = children;\n }\n if (nodeText) {\n result.text = nodeText;\n }\n return result;\n}\n\nexport function parse(language: Language, text: string): ParseTree {\n let tree = lezerToParseTree(text, language.parser.parse(text).topNode);\n // replaceNodesMatching(tree, (n): MarkdownTree | undefined | null => {\n // if (n.type === \"FencedCode\") {\n // let infoN = findNodeMatching(n, (n) => n.type === \"CodeInfo\");\n // let language = infoN!.children![0].text;\n // let textN = findNodeMatching(n, (n) => n.type === \"CodeText\");\n // let text = textN!.children![0].text!;\n //\n // console.log(language, text);\n // switch (language) {\n // case \"yaml\":\n // let parsed = StreamLanguage.define(yaml).parser.parse(text);\n // let subTree = treeToAST(text, parsed.topNode, n.from);\n // // console.log(JSON.stringify(subTree, null, 2));\n // subTree.type = \"yaml\";\n // return subTree;\n // }\n // }\n // return;\n // });\n return tree;\n}\n","// This file was generated by lezer-generator. You probably shouldn't edit it.\nimport {LRParser} from \"@lezer/lr\"\nexport const parser = LRParser.deserialize({\n version: 13,\n states: \"&fOVQPOOOmQQO'#C^QOQPOOOtQPO'#C`OyQQO'#CkO!OQPO'#CmO!TQPO'#CnO!YQPO'#CoOOQO'#Cp'#CpO!_QQO,58xO!fQQO'#CcO#TQQO'#CaOOQO'#Ca'#CaOOQO,58z,58zO#lQPO,59VOOQO,59X,59XO#qQQO'#D`OOQO,59Y,59YOOQO,59Z,59ZOOQO-E6n-E6nO$YQQO,58}OtQPO,58|O$qQQO1G.qO%]QPO'#CrO%bQQO,59zOOQO'#Cg'#CgOOQO'#Ci'#CiO$YQQO'#CjOOQO'#Cd'#CdOOQO1G.i1G.iOOQO1G.h1G.hOOQO'#Cl'#ClOOQO7+$]7+$]OOQO,59^,59^OOQO-E6p-E6pO%yQPO'#C|O&RQPO,59UO$YQQO'#CqO&WQPO,59hOOQO1G.p1G.pOOQO,59],59]OOQO-E6o-E6o\",\n stateData: \"&`~OiOS~ORPO~OjRO|SO!QTO!RUO!TVO~OgQX~P[ORYO~O}^O~OX_O~OR`O~OYbO~OgQa~P[OkdOsdOtdOudOvdOwdOxdOydOzdO~O{eOgTXjTX|TX!QTX!RTX!TTX~ORfO~OqgOg!SXj!SX|!SX!Q!SX!R!SX!T!SX~OXlOYlO[lOliOmiOnjOokO~O!OoO!PoOg_ij_i|_i!Q_i!R_i!T_i~ORqO~OqgOg!Saj!Sa|!Sa!Q!Sa!R!Sa!T!Sa~OquOrpX~OrwO~OquOrpa~O\",\n goto: \"#d!TPP!UP!X!]!`!c!iPP!rP!r!r!X!w!X!X!X!z#Q#WPPPPPPPPP#^PPPPPPPPPPPPPPPPP#aRQOTWPXR]RR[RQZRRneQmdQskRxuVldkuRpfQXPRcXQvsRyvQh`RrhRtkRaU\",\n nodeNames: \"⚠ Program Query Name WhereClause LogicalExpr AndExpr FilterExpr Value Number String Bool Regex Null List OrderClause Order LimitClause SelectClause RenderClause\",\n maxTerm: 51,\n skippedNodes: [0],\n repeatNodeCount: 3,\n tokenData: \"Ap~R}X^$Opq$Oqr$srs%W|}%r}!O%w!P!Q&Y!Q!['P!^!_'X!_!`'f!`!a's!c!}%w!}#O(Q#P#Q(V#R#S%w#T#U([#U#V*q#V#W%w#W#X+m#X#Y%w#Y#Z-i#Z#]%w#]#^/y#^#`%w#`#a0u#a#b%w#b#c3Y#c#d5U#d#f%w#f#g7i#g#h:e#h#i=a#i#k%w#k#l?]#l#o%w#y#z$O$f$g$O#BY#BZ$O$IS$I_$O$Ip$Iq%W$Iq$Ir%W$I|$JO$O$JT$JU$O$KV$KW$O&FU&FV$O~$TYi~X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#R#S%w#T#X%w#X#Y@]#Y#o%wR@bURP}!O%w!c!}%w#R#S%w#T#f%w#f#g@t#g#o%wR@yURP}!O%w!c!}%w#R#S%w#T#X%w#X#YA]#Y#o%wRAdSjQRP}!O%w!c!}%w#R#S%w#T#o%w\",\n tokenizers: [0, 1],\n topRules: {\"Program\":[0,1]},\n tokenPrec: 0\n})\n","import { syscall } from \"./syscall\";\nimport { PageMeta } from \"../common/types\";\n\nexport async function listPages(unfiltered = false): Promise {\n return syscall(\"space.listPages\", unfiltered);\n}\n\nexport async function readPage(\n name: string\n): Promise<{ text: string; meta: PageMeta }> {\n return syscall(\"space.readPage\", name);\n}\n\nexport async function writePage(name: string, text: string): Promise {\n return syscall(\"space.writePage\", name, text);\n}\n\nexport async function deletePage(name: string): Promise {\n return syscall(\"space.deletePage\", name);\n}\n","declare global {\n function syscall(name: string, ...args: any[]): Promise;\n}\n\nexport const syscall = self.syscall;\n","import { insertAtCursor } from \"@silverbulletmd/plugos-silverbullet-syscall/editor\";\n\nexport function niceDate(d: Date): string {\n return d.toISOString().split(\"T\")[0];\n}\n\nexport async function insertToday() {\n await insertAtCursor(niceDate(new Date()));\n}\n\nexport async function insertTomorrow() {\n let d = new Date();\n d.setDate(d.getDate() + 1);\n await insertAtCursor(niceDate(d));\n}\n","import { syscall } from \"./syscall\";\nimport { FilterOption } from \"../common/types\";\n\nexport function getCurrentPage(): Promise {\n return syscall(\"editor.getCurrentPage\");\n}\n\nexport function setPage(newName: string): Promise {\n return syscall(\"editor.setPage\", newName);\n}\n\nexport function getText(): Promise {\n return syscall(\"editor.getText\");\n}\n\nexport function getCursor(): Promise {\n return syscall(\"editor.getCursor\");\n}\n\nexport function getSelection(): Promise<{ from: number; to: number }> {\n return syscall(\"editor.getSelection\");\n}\n\nexport function setSelection(from: number, to: number): Promise {\n return syscall(\"editor.setSelection\", from, to);\n}\n\nexport function save(): Promise {\n return syscall(\"editor.save\");\n}\n\nexport function navigate(name: string, pos?: number): Promise {\n return syscall(\"editor.navigate\", name, pos);\n}\n\nexport function reloadPage(): Promise {\n return syscall(\"editor.reloadPage\");\n}\n\nexport function openUrl(url: string): Promise {\n return syscall(\"editor.openUrl\", url);\n}\n\nexport function flashNotification(message: string): Promise {\n return syscall(\"editor.flashNotification\", message);\n}\n\nexport function filterBox(\n label: string,\n options: FilterOption[],\n helpText: string = \"\",\n placeHolder: string = \"\"\n): Promise {\n return syscall(\"editor.filterBox\", label, options, helpText, placeHolder);\n}\n\nexport function showRhs(\n html: string,\n script?: string,\n flex = 1\n): Promise {\n return syscall(\"editor.showRhs\", html, script, flex);\n}\n\nexport function hideRhs(): Promise {\n return syscall(\"editor.hideRhs\");\n}\n\nexport function showLhs(\n html: string,\n script?: string,\n flex = 1\n): Promise {\n return syscall(\"editor.showLhs\", html, script, flex);\n}\n\nexport function hideLhs(): Promise {\n return syscall(\"editor.hideLhs\");\n}\n\nexport function showBhs(\n html: string,\n script?: string,\n flex = 1\n): Promise {\n return syscall(\"editor.showBhs\", html, script, flex);\n}\n\nexport function hideBhs(): Promise {\n return syscall(\"editor.hideBhs\");\n}\n\nexport function insertAtPos(text: string, pos: number): Promise {\n return syscall(\"editor.insertAtPos\", text, pos);\n}\n\nexport function replaceRange(\n from: number,\n to: number,\n text: string\n): Promise {\n return syscall(\"editor.replaceRange\", from, to, text);\n}\n\nexport function moveCursor(pos: number): Promise {\n return syscall(\"editor.moveCursor\", pos);\n}\n\nexport function insertAtCursor(text: string): Promise {\n return syscall(\"editor.insertAtCursor\", text);\n}\n\nexport function matchBefore(\n re: string\n): Promise<{ from: number; to: number; text: string } | null> {\n return syscall(\"editor.matchBefore\", re);\n}\n\nexport function dispatch(change: any): Promise {\n return syscall(\"editor.dispatch\", change);\n}\n\nexport function prompt(\n message: string,\n defaultValue = \"\"\n): Promise {\n return syscall(\"editor.prompt\", message, defaultValue);\n}\n"],"names":[],"version":3,"file":"engine.test.js.map","sourceRoot":"../../../../"} \ No newline at end of file diff --git a/packages/plugs/core/core.plug.yaml b/packages/plugs/core/core.plug.yaml index 4eb2b691..ef6a14e9 100644 --- a/packages/plugs/core/core.plug.yaml +++ b/packages/plugs/core/core.plug.yaml @@ -172,6 +172,14 @@ functions: updatePlugs: path: ./plugmanager.ts:updatePlugs env: server + getPlugHTTPS: + path: "./plugmanager.ts:getPlugHTTPS" + events: + - get-plug:https + getPlugGithub: + path: "./plugmanager.ts:getPlugGithub" + events: + - get-plug:github # Debug commands parseServerCommand: diff --git a/packages/plugs/core/plugmanager.ts b/packages/plugs/core/plugmanager.ts index 19f79795..6e3e7fc4 100644 --- a/packages/plugs/core/plugmanager.ts +++ b/packages/plugs/core/plugmanager.ts @@ -1,6 +1,10 @@ import { dispatch } from "@plugos/plugos-syscall/event"; +import { Manifest } from "@silverbulletmd/common/manifest"; import { findNodeOfType } from "@silverbulletmd/common/tree"; -import { flashNotification } from "@silverbulletmd/plugos-silverbullet-syscall/editor"; +import { + flashNotification, + save, +} from "@silverbulletmd/plugos-silverbullet-syscall/editor"; import { parseMarkdown } from "@silverbulletmd/plugos-silverbullet-syscall/markdown"; import { deletePage, @@ -22,6 +26,7 @@ async function listPlugs(): Promise { } export async function updatePlugsCommand() { + await save(); flashNotification("Updating plugs..."); await invokeFunction("server", "updatePlugs"); flashNotification("And... done!"); @@ -67,3 +72,26 @@ export async function updatePlugs() { } await reloadPlugs(); } + +export async function getPlugHTTPS(url: string): Promise { + let fullUrl = `https:${url}`; + console.log("Now fetching plug manifest from", fullUrl); + let req = await fetch(fullUrl); + if (req.status !== 200) { + throw new Error(`Could not fetch plug manifest from ${fullUrl}`); + } + let json = await req.json(); + + return json; +} + +export async function getPlugGithub(identifier: string): Promise { + let [owner, repo, path] = identifier.split("/"); + let [repoClean, branch] = repo.split("@"); + if (!branch) { + branch = "main"; // or "master"? + } + return getPlugHTTPS( + `//raw.githubusercontent.com/${owner}/${repoClean}/${branch}/${path}` + ); +} diff --git a/packages/plugs/global.plug.yaml b/packages/plugs/global.plug.yaml index 0c6ac0b0..aa4f88d6 100644 --- a/packages/plugs/global.plug.yaml +++ b/packages/plugs/global.plug.yaml @@ -2,4 +2,4 @@ name: global dependencies: yaml: "yaml@2" handlebars: "handlebars@4.7.7:/dist/handlebars" - "@lezer/lr": "@lezer/lr@0.15.4" + "@lezer/lr": "@lezer/lr@1.0.0" diff --git a/packages/plugs/package-lock.json b/packages/plugs/package-lock.json deleted file mode 100644 index 2568d6f9..00000000 --- a/packages/plugs/package-lock.json +++ /dev/null @@ -1,1427 +0,0 @@ -{ - "name": "@silverbulletmd/plugs", - "version": "0.0.9", - "lockfileVersion": 2, - "requires": true, - "packages": { - "": { - "name": "@silverbulletmd/plugs", - "version": "0.0.9", - "license": "MIT", - "dependencies": { - "@jest/globals": "^27.5.1", - "@lezer/generator": "^0.15.4", - "@lezer/lr": "^0.15.8", - "@mattermost/client": "^6.7.0-0", - "@mattermost/types": "^6.7.0-0", - "@types/yaml": "^1.9.7", - "handlebars": "^4.7.7", - "markdown-it": "^12.3.2", - "markdown-it-task-lists": "^2.1.1", - "yaml": "^2.0.0" - }, - "devDependencies": { - "@types/markdown-it": "^12.2.3" - } - }, - "node_modules/@babel/code-frame": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.16.7.tgz", - "integrity": "sha512-iAXqUn8IIeBTNd72xsFlgaXHkMBMt6y4HJp1tIaK465CWLT/fG1aqB7ykr95gHHmlBdGbFeWWfyB4NJJ0nmeIg==", - "dependencies": { - "@babel/highlight": "^7.16.7" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-validator-identifier": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.16.7.tgz", - "integrity": "sha512-hsEnFemeiW4D08A5gUAZxLBTXpZ39P+a+DGDsHw1yxqyQ/jzFEnxf5uTEGp+3bzAbNOxU1paTgYS4ECU/IgfDw==", - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/highlight": { - "version": "7.17.9", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.17.9.tgz", - "integrity": "sha512-J9PfEKCbFIv2X5bjTMiZu6Vf341N05QIY+d6FvVKynkG1S7G0j3I0QoRtWIrXhZ+/Nlb5Q0MzqL7TokEJ5BNHg==", - "dependencies": { - "@babel/helper-validator-identifier": "^7.16.7", - "chalk": "^2.0.0", - "js-tokens": "^4.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/highlight/node_modules/ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dependencies": { - "color-convert": "^1.9.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/@babel/highlight/node_modules/chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dependencies": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/@babel/highlight/node_modules/color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", - "dependencies": { - "color-name": "1.1.3" - } - }, - "node_modules/@babel/highlight/node_modules/color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=" - }, - "node_modules/@babel/highlight/node_modules/escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", - "engines": { - "node": ">=0.8.0" - } - }, - "node_modules/@babel/highlight/node_modules/has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", - "engines": { - "node": ">=4" - } - }, - "node_modules/@babel/highlight/node_modules/supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dependencies": { - "has-flag": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/@jest/environment": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-27.5.1.tgz", - "integrity": "sha512-/WQjhPJe3/ghaol/4Bq480JKXV/Rfw8nQdN7f41fM8VDHLcxKXou6QyXAh3EFr9/bVG3x74z1NWDkP87EiY8gA==", - "dependencies": { - "@jest/fake-timers": "^27.5.1", - "@jest/types": "^27.5.1", - "@types/node": "*", - "jest-mock": "^27.5.1" - }, - "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" - } - }, - "node_modules/@jest/fake-timers": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-27.5.1.tgz", - "integrity": "sha512-/aPowoolwa07k7/oM3aASneNeBGCmGQsc3ugN4u6s4C/+s5M64MFo/+djTdiwcbQlRfFElGuDXWzaWj6QgKObQ==", - "dependencies": { - "@jest/types": "^27.5.1", - "@sinonjs/fake-timers": "^8.0.1", - "@types/node": "*", - "jest-message-util": "^27.5.1", - "jest-mock": "^27.5.1", - "jest-util": "^27.5.1" - }, - "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" - } - }, - "node_modules/@jest/globals": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/@jest/globals/-/globals-27.5.1.tgz", - "integrity": "sha512-ZEJNB41OBQQgGzgyInAv0UUfDDj3upmHydjieSxFvTRuZElrx7tXg/uVQ5hYVEwiXs3+aMsAeEc9X7xiSKCm4Q==", - "dependencies": { - "@jest/environment": "^27.5.1", - "@jest/types": "^27.5.1", - "expect": "^27.5.1" - }, - "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" - } - }, - "node_modules/@jest/types": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-27.5.1.tgz", - "integrity": "sha512-Cx46iJ9QpwQTjIdq5VJu2QTMMs3QlEjI0x1QbBP5W1+nMzyc2XmimiRR/CbX9TO0cPTeUlxWMOu8mslYsJ8DEw==", - "dependencies": { - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^3.0.0", - "@types/node": "*", - "@types/yargs": "^16.0.0", - "chalk": "^4.0.0" - }, - "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" - } - }, - "node_modules/@lezer/common": { - "version": "0.15.12", - "resolved": "https://registry.npmjs.org/@lezer/common/-/common-0.15.12.tgz", - "integrity": "sha512-edfwCxNLnzq5pBA/yaIhwJ3U3Kz8VAUOTRg0hhxaizaI1N+qxV7EXDv/kLCkLeq2RzSFvxexlaj5Mzfn2kY0Ig==" - }, - "node_modules/@lezer/generator": { - "version": "0.15.4", - "resolved": "https://registry.npmjs.org/@lezer/generator/-/generator-0.15.4.tgz", - "integrity": "sha512-9bBwU2TzKMBQ6OCEDevuMNWGOBKlkq5YIGEhjrz9pb3MLb+oYYR4dVFZ7ehwLcDoSecsSA7PdlAy0thJO5pt2w==", - "dependencies": { - "@lezer/common": "^0.15.0", - "@lezer/lr": "^0.15.0" - }, - "bin": { - "lezer-generator": "dist/lezer-generator.cjs" - } - }, - "node_modules/@lezer/lr": { - "version": "0.15.8", - "resolved": "https://registry.npmjs.org/@lezer/lr/-/lr-0.15.8.tgz", - "integrity": "sha512-bM6oE6VQZ6hIFxDNKk8bKPa14hqFrV07J/vHGOeiAbJReIaQXmkVb6xQu4MR+JBTLa5arGRyAAjJe1qaQt3Uvg==", - "dependencies": { - "@lezer/common": "^0.15.0" - } - }, - "node_modules/@mattermost/client": { - "version": "6.7.0-0", - "resolved": "https://registry.npmjs.org/@mattermost/client/-/client-6.7.0-0.tgz", - "integrity": "sha512-XIKEWYmadlCh3Bb3JwMi65raKe7jhBLPJ5DPPu6FPMZc4FoM1YoHdPfrkuT1c2KgcTX5HNbkGd1cXV6cLXxHUw==", - "dependencies": { - "form-data": "^4.0.0" - }, - "peerDependencies": { - "@mattermost/types": "*", - "typescript": "^4.3" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "node_modules/@mattermost/types": { - "version": "6.7.0-0", - "resolved": "https://registry.npmjs.org/@mattermost/types/-/types-6.7.0-0.tgz", - "integrity": "sha512-mT8wJwWEp20KPo9D12y7bW7EdUHO7VhUHxr3gH8nPGapWooGcl0Ra0H3u1iCjPpqPWvp7LiodcneU0IysunYKQ==", - "peerDependencies": { - "typescript": "^4.3" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "node_modules/@sinonjs/commons": { - "version": "1.8.3", - "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-1.8.3.tgz", - "integrity": "sha512-xkNcLAn/wZaX14RPlwizcKicDk9G3F8m2nU3L7Ukm5zBgTwiT0wsoFAHx9Jq56fJA1z/7uKGtCRu16sOUCLIHQ==", - "dependencies": { - "type-detect": "4.0.8" - } - }, - "node_modules/@sinonjs/fake-timers": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-8.1.0.tgz", - "integrity": "sha512-OAPJUAtgeINhh/TAlUID4QTs53Njm7xzddaVlEs/SXwgtiD1tW22zAB/W1wdqfrpmikgaWQ9Fw6Ws+hsiRm5Vg==", - "dependencies": { - "@sinonjs/commons": "^1.7.0" - } - }, - "node_modules/@types/istanbul-lib-coverage": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.4.tgz", - "integrity": "sha512-z/QT1XN4K4KYuslS23k62yDIDLwLFkzxOuMplDtObz0+y7VqJCaO2o+SPwHCvLFZh7xazvvoor2tA/hPz9ee7g==" - }, - "node_modules/@types/istanbul-lib-report": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@types/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz", - "integrity": "sha512-plGgXAPfVKFoYfa9NpYDAkseG+g6Jr294RqeqcqDixSbU34MZVJRi/P+7Y8GDpzkEwLaGZZOpKIEmeVZNtKsrg==", - "dependencies": { - "@types/istanbul-lib-coverage": "*" - } - }, - "node_modules/@types/istanbul-reports": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/@types/istanbul-reports/-/istanbul-reports-3.0.1.tgz", - "integrity": "sha512-c3mAZEuK0lvBp8tmuL74XRKn1+y2dcwOUpH7x4WrF6gk1GIgiluDRgMYQtw2OFcBvAJWlt6ASU3tSqxp0Uu0Aw==", - "dependencies": { - "@types/istanbul-lib-report": "*" - } - }, - "node_modules/@types/linkify-it": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/@types/linkify-it/-/linkify-it-3.0.2.tgz", - "integrity": "sha512-HZQYqbiFVWufzCwexrvh694SOim8z2d+xJl5UNamcvQFejLY/2YUtzXHYi3cHdI7PMlS8ejH2slRAOJQ32aNbA==", - "dev": true - }, - "node_modules/@types/markdown-it": { - "version": "12.2.3", - "resolved": "https://registry.npmjs.org/@types/markdown-it/-/markdown-it-12.2.3.tgz", - "integrity": "sha512-GKMHFfv3458yYy+v/N8gjufHO6MSZKCOXpZc5GXIWWy8uldwfmPn98vp81gZ5f9SVw8YYBctgfJ22a2d7AOMeQ==", - "dev": true, - "dependencies": { - "@types/linkify-it": "*", - "@types/mdurl": "*" - } - }, - "node_modules/@types/mdurl": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/@types/mdurl/-/mdurl-1.0.2.tgz", - "integrity": "sha512-eC4U9MlIcu2q0KQmXszyn5Akca/0jrQmwDRgpAMJai7qBWq4amIQhZyNau4VYGtCeALvW1/NtjzJJ567aZxfKA==", - "dev": true - }, - "node_modules/@types/node": { - "version": "17.0.29", - "resolved": "https://registry.npmjs.org/@types/node/-/node-17.0.29.tgz", - "integrity": "sha512-tx5jMmMFwx7wBwq/V7OohKDVb/JwJU5qCVkeLMh1//xycAJ/ESuw9aJ9SEtlCZDYi2pBfe4JkisSoAtbOsBNAA==" - }, - "node_modules/@types/stack-utils": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-2.0.1.tgz", - "integrity": "sha512-Hl219/BT5fLAaz6NDkSuhzasy49dwQS/DSdu4MdggFB8zcXv7vflBI3xp7FEmkmdDkBUI2bPUNeMttp2knYdxw==" - }, - "node_modules/@types/yaml": { - "version": "1.9.7", - "resolved": "https://registry.npmjs.org/@types/yaml/-/yaml-1.9.7.tgz", - "integrity": "sha512-8WMXRDD1D+wCohjfslHDgICd2JtMATZU8CkhH8LVJqcJs6dyYj5TGptzP8wApbmEullGBSsCEzzap73DQ1HJaA==", - "deprecated": "This is a stub types definition. yaml provides its own type definitions, so you do not need this installed.", - "dependencies": { - "yaml": "*" - } - }, - "node_modules/@types/yargs": { - "version": "16.0.4", - "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-16.0.4.tgz", - "integrity": "sha512-T8Yc9wt/5LbJyCaLiHPReJa0kApcIgJ7Bn735GjItUfh08Z1pJvu8QZqb9s+mMvKV6WUQRV7K2R46YbjMXTTJw==", - "dependencies": { - "@types/yargs-parser": "*" - } - }, - "node_modules/@types/yargs-parser": { - "version": "21.0.0", - "resolved": "https://registry.npmjs.org/@types/yargs-parser/-/yargs-parser-21.0.0.tgz", - "integrity": "sha512-iO9ZQHkZxHn4mSakYV0vFHAVDyEOIJQrV2uZ06HxEPcx+mt8swXoZHIbaaJ2crJYFfErySgktuTZ3BeLz+XmFA==" - }, - "node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "engines": { - "node": ">=8" - } - }, - "node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/argparse": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", - "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==" - }, - "node_modules/asynckit": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", - "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=" - }, - "node_modules/braces": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", - "dependencies": { - "fill-range": "^7.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/ci-info": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.3.0.tgz", - "integrity": "sha512-riT/3vI5YpVH6/qomlDnJow6TBee2PBKSEpx3O32EGPYbWGIRsIlGRms3Sm74wYE1JMo8RnO04Hb12+v1J5ICw==" - }, - "node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" - }, - "node_modules/combined-stream": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", - "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", - "dependencies": { - "delayed-stream": "~1.0.0" - }, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/delayed-stream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", - "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=", - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/diff-sequences": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-27.5.1.tgz", - "integrity": "sha512-k1gCAXAsNgLwEL+Y8Wvl+M6oEFj5bgazfZULpS5CneoPPXRaCCW7dm+q21Ky2VEE5X+VeRDBVg1Pcvvsr4TtNQ==", - "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" - } - }, - "node_modules/entities": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/entities/-/entities-2.1.0.tgz", - "integrity": "sha512-hCx1oky9PFrJ611mf0ifBLBRW8lUUVRlFolb5gWRfIELabBlbp9xZvrqZLZAs+NxFnbfQoeGd8wDkygjg7U85w==", - "funding": { - "url": "https://github.com/fb55/entities?sponsor=1" - } - }, - "node_modules/escape-string-regexp": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz", - "integrity": "sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==", - "engines": { - "node": ">=8" - } - }, - "node_modules/expect": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/expect/-/expect-27.5.1.tgz", - "integrity": "sha512-E1q5hSUG2AmYQwQJ041nvgpkODHQvB+RKlB4IYdru6uJsyFTRyZAP463M+1lINorwbqAmUggi6+WwkD8lCS/Dw==", - "dependencies": { - "@jest/types": "^27.5.1", - "jest-get-type": "^27.5.1", - "jest-matcher-utils": "^27.5.1", - "jest-message-util": "^27.5.1" - }, - "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" - } - }, - "node_modules/fill-range": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", - "dependencies": { - "to-regex-range": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/form-data": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", - "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", - "dependencies": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.8", - "mime-types": "^2.1.12" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/graceful-fs": { - "version": "4.2.10", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz", - "integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==" - }, - "node_modules/handlebars": { - "version": "4.7.7", - "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.7.tgz", - "integrity": "sha512-aAcXm5OAfE/8IXkcZvCepKU3VzW1/39Fb5ZuqMtgI/hT8X2YgoMvBY5dLhq/cpOvw7Lk1nK/UF71aLG/ZnVYRA==", - "dependencies": { - "minimist": "^1.2.5", - "neo-async": "^2.6.0", - "source-map": "^0.6.1", - "wordwrap": "^1.0.0" - }, - "bin": { - "handlebars": "bin/handlebars" - }, - "engines": { - "node": ">=0.4.7" - }, - "optionalDependencies": { - "uglify-js": "^3.1.4" - } - }, - "node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "engines": { - "node": ">=8" - } - }, - "node_modules/is-number": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", - "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", - "engines": { - "node": ">=0.12.0" - } - }, - "node_modules/jest-diff": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-27.5.1.tgz", - "integrity": "sha512-m0NvkX55LDt9T4mctTEgnZk3fmEg3NRYutvMPWM/0iPnkFj2wIeF45O1718cMSOFO1vINkqmxqD8vE37uTEbqw==", - "dependencies": { - "chalk": "^4.0.0", - "diff-sequences": "^27.5.1", - "jest-get-type": "^27.5.1", - "pretty-format": "^27.5.1" - }, - "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" - } - }, - "node_modules/jest-get-type": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-27.5.1.tgz", - "integrity": "sha512-2KY95ksYSaK7DMBWQn6dQz3kqAf3BB64y2udeG+hv4KfSOb9qwcYQstTJc1KCbsix+wLZWZYN8t7nwX3GOBLRw==", - "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" - } - }, - "node_modules/jest-matcher-utils": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-27.5.1.tgz", - "integrity": "sha512-z2uTx/T6LBaCoNWNFWwChLBKYxTMcGBRjAt+2SbP929/Fflb9aa5LGma654Rz8z9HLxsrUaYzxE9T/EFIL/PAw==", - "dependencies": { - "chalk": "^4.0.0", - "jest-diff": "^27.5.1", - "jest-get-type": "^27.5.1", - "pretty-format": "^27.5.1" - }, - "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" - } - }, - "node_modules/jest-message-util": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-27.5.1.tgz", - "integrity": "sha512-rMyFe1+jnyAAf+NHwTclDz0eAaLkVDdKVHHBFWsBWHnnh5YeJMNWWsv7AbFYXfK3oTqvL7VTWkhNLu1jX24D+g==", - "dependencies": { - "@babel/code-frame": "^7.12.13", - "@jest/types": "^27.5.1", - "@types/stack-utils": "^2.0.0", - "chalk": "^4.0.0", - "graceful-fs": "^4.2.9", - "micromatch": "^4.0.4", - "pretty-format": "^27.5.1", - "slash": "^3.0.0", - "stack-utils": "^2.0.3" - }, - "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" - } - }, - "node_modules/jest-mock": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-27.5.1.tgz", - "integrity": "sha512-K4jKbY1d4ENhbrG2zuPWaQBvDly+iZ2yAW+T1fATN78hc0sInwn7wZB8XtlNnvHug5RMwV897Xm4LqmPM4e2Og==", - "dependencies": { - "@jest/types": "^27.5.1", - "@types/node": "*" - }, - "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" - } - }, - "node_modules/jest-util": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-27.5.1.tgz", - "integrity": "sha512-Kv2o/8jNvX1MQ0KGtw480E/w4fBCDOnH6+6DmeKi6LZUIlKA5kwY0YNdlzaWTiVgxqAqik11QyxDOKk543aKXw==", - "dependencies": { - "@jest/types": "^27.5.1", - "@types/node": "*", - "chalk": "^4.0.0", - "ci-info": "^3.2.0", - "graceful-fs": "^4.2.9", - "picomatch": "^2.2.3" - }, - "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" - } - }, - "node_modules/js-tokens": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", - "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==" - }, - "node_modules/linkify-it": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/linkify-it/-/linkify-it-3.0.3.tgz", - "integrity": "sha512-ynTsyrFSdE5oZ/O9GEf00kPngmOfVwazR5GKDq6EYfhlpFug3J2zybX56a2PRRpc9P+FuSoGNAwjlbDs9jJBPQ==", - "dependencies": { - "uc.micro": "^1.0.1" - } - }, - "node_modules/markdown-it": { - "version": "12.3.2", - "resolved": "https://registry.npmjs.org/markdown-it/-/markdown-it-12.3.2.tgz", - "integrity": "sha512-TchMembfxfNVpHkbtriWltGWc+m3xszaRD0CZup7GFFhzIgQqxIfn3eGj1yZpfuflzPvfkt611B2Q/Bsk1YnGg==", - "dependencies": { - "argparse": "^2.0.1", - "entities": "~2.1.0", - "linkify-it": "^3.0.1", - "mdurl": "^1.0.1", - "uc.micro": "^1.0.5" - }, - "bin": { - "markdown-it": "bin/markdown-it.js" - } - }, - "node_modules/markdown-it-task-lists": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/markdown-it-task-lists/-/markdown-it-task-lists-2.1.1.tgz", - "integrity": "sha512-TxFAc76Jnhb2OUu+n3yz9RMu4CwGfaT788br6HhEDlvWfdeJcLUsxk1Hgw2yJio0OXsxv7pyIPmvECY7bMbluA==" - }, - "node_modules/mdurl": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/mdurl/-/mdurl-1.0.1.tgz", - "integrity": "sha1-/oWy7HWlkDfyrf7BAP1sYBdhFS4=" - }, - "node_modules/micromatch": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", - "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", - "dependencies": { - "braces": "^3.0.2", - "picomatch": "^2.3.1" - }, - "engines": { - "node": ">=8.6" - } - }, - "node_modules/mime-db": { - "version": "1.52.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", - "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/mime-types": { - "version": "2.1.35", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", - "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", - "dependencies": { - "mime-db": "1.52.0" - }, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/minimist": { - "version": "1.2.6", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz", - "integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==" - }, - "node_modules/neo-async": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz", - "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==" - }, - "node_modules/picomatch": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", - "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", - "engines": { - "node": ">=8.6" - }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" - } - }, - "node_modules/pretty-format": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-27.5.1.tgz", - "integrity": "sha512-Qb1gy5OrP5+zDf2Bvnzdl3jsTf1qXVMazbvCoKhtKqVs4/YK4ozX4gKQJJVyNe+cajNPn0KoC0MC3FUmaHWEmQ==", - "dependencies": { - "ansi-regex": "^5.0.1", - "ansi-styles": "^5.0.0", - "react-is": "^17.0.1" - }, - "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" - } - }, - "node_modules/pretty-format/node_modules/ansi-styles": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", - "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/react-is": { - "version": "17.0.2", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz", - "integrity": "sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==" - }, - "node_modules/slash": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", - "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", - "engines": { - "node": ">=8" - } - }, - "node_modules/source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/stack-utils": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/stack-utils/-/stack-utils-2.0.5.tgz", - "integrity": "sha512-xrQcmYhOsn/1kX+Vraq+7j4oE2j/6BFscZ0etmYg81xuM8Gq0022Pxb8+IqgOFUIaxHs0KaSb7T1+OegiNrNFA==", - "dependencies": { - "escape-string-regexp": "^2.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/to-regex-range": { - "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" - }, - "engines": { - "node": ">=8.0" - } - }, - "node_modules/type-detect": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", - "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", - "engines": { - "node": ">=4" - } - }, - "node_modules/uc.micro": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/uc.micro/-/uc.micro-1.0.6.tgz", - "integrity": "sha512-8Y75pvTYkLJW2hWQHXxoqRgV7qb9B+9vFEtidML+7koHUFapnVJAZ6cKs+Qjz5Aw3aZWHMC6u0wJE3At+nSGwA==" - }, - "node_modules/uglify-js": { - "version": "3.15.4", - "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.15.4.tgz", - "integrity": "sha512-vMOPGDuvXecPs34V74qDKk4iJ/SN4vL3Ow/23ixafENYvtrNvtbcgUeugTcUGRGsOF/5fU8/NYSL5Hyb3l1OJA==", - "optional": true, - "bin": { - "uglifyjs": "bin/uglifyjs" - }, - "engines": { - "node": ">=0.8.0" - } - }, - "node_modules/wordwrap": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", - "integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=" - }, - "node_modules/yaml": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.0.1.tgz", - "integrity": "sha512-1NpAYQ3wjzIlMs0mgdBmYzLkFgWBIWrzYVDYfrixhoFNNgJ444/jT2kUT2sicRbJES3oQYRZugjB6Ro8SjKeFg==", - "engines": { - "node": ">= 14" - } - } - }, - "dependencies": { - "@babel/code-frame": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.16.7.tgz", - "integrity": "sha512-iAXqUn8IIeBTNd72xsFlgaXHkMBMt6y4HJp1tIaK465CWLT/fG1aqB7ykr95gHHmlBdGbFeWWfyB4NJJ0nmeIg==", - "requires": { - "@babel/highlight": "^7.16.7" - } - }, - "@babel/helper-validator-identifier": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.16.7.tgz", - "integrity": "sha512-hsEnFemeiW4D08A5gUAZxLBTXpZ39P+a+DGDsHw1yxqyQ/jzFEnxf5uTEGp+3bzAbNOxU1paTgYS4ECU/IgfDw==" - }, - "@babel/highlight": { - "version": "7.17.9", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.17.9.tgz", - "integrity": "sha512-J9PfEKCbFIv2X5bjTMiZu6Vf341N05QIY+d6FvVKynkG1S7G0j3I0QoRtWIrXhZ+/Nlb5Q0MzqL7TokEJ5BNHg==", - "requires": { - "@babel/helper-validator-identifier": "^7.16.7", - "chalk": "^2.0.0", - "js-tokens": "^4.0.0" - }, - "dependencies": { - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "requires": { - "color-convert": "^1.9.0" - } - }, - "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", - "requires": { - "color-name": "1.1.3" - } - }, - "color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=" - }, - "escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=" - }, - "has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=" - }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "requires": { - "has-flag": "^3.0.0" - } - } - } - }, - "@jest/environment": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-27.5.1.tgz", - "integrity": "sha512-/WQjhPJe3/ghaol/4Bq480JKXV/Rfw8nQdN7f41fM8VDHLcxKXou6QyXAh3EFr9/bVG3x74z1NWDkP87EiY8gA==", - "requires": { - "@jest/fake-timers": "^27.5.1", - "@jest/types": "^27.5.1", - "@types/node": "*", - "jest-mock": "^27.5.1" - } - }, - "@jest/fake-timers": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-27.5.1.tgz", - "integrity": "sha512-/aPowoolwa07k7/oM3aASneNeBGCmGQsc3ugN4u6s4C/+s5M64MFo/+djTdiwcbQlRfFElGuDXWzaWj6QgKObQ==", - "requires": { - "@jest/types": "^27.5.1", - "@sinonjs/fake-timers": "^8.0.1", - "@types/node": "*", - "jest-message-util": "^27.5.1", - "jest-mock": "^27.5.1", - "jest-util": "^27.5.1" - } - }, - "@jest/globals": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/@jest/globals/-/globals-27.5.1.tgz", - "integrity": "sha512-ZEJNB41OBQQgGzgyInAv0UUfDDj3upmHydjieSxFvTRuZElrx7tXg/uVQ5hYVEwiXs3+aMsAeEc9X7xiSKCm4Q==", - "requires": { - "@jest/environment": "^27.5.1", - "@jest/types": "^27.5.1", - "expect": "^27.5.1" - } - }, - "@jest/types": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-27.5.1.tgz", - "integrity": "sha512-Cx46iJ9QpwQTjIdq5VJu2QTMMs3QlEjI0x1QbBP5W1+nMzyc2XmimiRR/CbX9TO0cPTeUlxWMOu8mslYsJ8DEw==", - "requires": { - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^3.0.0", - "@types/node": "*", - "@types/yargs": "^16.0.0", - "chalk": "^4.0.0" - } - }, - "@lezer/common": { - "version": "0.15.12", - "resolved": "https://registry.npmjs.org/@lezer/common/-/common-0.15.12.tgz", - "integrity": "sha512-edfwCxNLnzq5pBA/yaIhwJ3U3Kz8VAUOTRg0hhxaizaI1N+qxV7EXDv/kLCkLeq2RzSFvxexlaj5Mzfn2kY0Ig==" - }, - "@lezer/generator": { - "version": "0.15.4", - "resolved": "https://registry.npmjs.org/@lezer/generator/-/generator-0.15.4.tgz", - "integrity": "sha512-9bBwU2TzKMBQ6OCEDevuMNWGOBKlkq5YIGEhjrz9pb3MLb+oYYR4dVFZ7ehwLcDoSecsSA7PdlAy0thJO5pt2w==", - "requires": { - "@lezer/common": "^0.15.0", - "@lezer/lr": "^0.15.0" - } - }, - "@lezer/lr": { - "version": "0.15.8", - "resolved": "https://registry.npmjs.org/@lezer/lr/-/lr-0.15.8.tgz", - "integrity": "sha512-bM6oE6VQZ6hIFxDNKk8bKPa14hqFrV07J/vHGOeiAbJReIaQXmkVb6xQu4MR+JBTLa5arGRyAAjJe1qaQt3Uvg==", - "requires": { - "@lezer/common": "^0.15.0" - } - }, - "@mattermost/client": { - "version": "6.7.0-0", - "resolved": "https://registry.npmjs.org/@mattermost/client/-/client-6.7.0-0.tgz", - "integrity": "sha512-XIKEWYmadlCh3Bb3JwMi65raKe7jhBLPJ5DPPu6FPMZc4FoM1YoHdPfrkuT1c2KgcTX5HNbkGd1cXV6cLXxHUw==", - "requires": { - "form-data": "^4.0.0" - } - }, - "@mattermost/types": { - "version": "6.7.0-0", - "resolved": "https://registry.npmjs.org/@mattermost/types/-/types-6.7.0-0.tgz", - "integrity": "sha512-mT8wJwWEp20KPo9D12y7bW7EdUHO7VhUHxr3gH8nPGapWooGcl0Ra0H3u1iCjPpqPWvp7LiodcneU0IysunYKQ==", - "requires": {} - }, - "@sinonjs/commons": { - "version": "1.8.3", - "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-1.8.3.tgz", - "integrity": "sha512-xkNcLAn/wZaX14RPlwizcKicDk9G3F8m2nU3L7Ukm5zBgTwiT0wsoFAHx9Jq56fJA1z/7uKGtCRu16sOUCLIHQ==", - "requires": { - "type-detect": "4.0.8" - } - }, - "@sinonjs/fake-timers": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-8.1.0.tgz", - "integrity": "sha512-OAPJUAtgeINhh/TAlUID4QTs53Njm7xzddaVlEs/SXwgtiD1tW22zAB/W1wdqfrpmikgaWQ9Fw6Ws+hsiRm5Vg==", - "requires": { - "@sinonjs/commons": "^1.7.0" - } - }, - "@types/istanbul-lib-coverage": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.4.tgz", - "integrity": "sha512-z/QT1XN4K4KYuslS23k62yDIDLwLFkzxOuMplDtObz0+y7VqJCaO2o+SPwHCvLFZh7xazvvoor2tA/hPz9ee7g==" - }, - "@types/istanbul-lib-report": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@types/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz", - "integrity": "sha512-plGgXAPfVKFoYfa9NpYDAkseG+g6Jr294RqeqcqDixSbU34MZVJRi/P+7Y8GDpzkEwLaGZZOpKIEmeVZNtKsrg==", - "requires": { - "@types/istanbul-lib-coverage": "*" - } - }, - "@types/istanbul-reports": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/@types/istanbul-reports/-/istanbul-reports-3.0.1.tgz", - "integrity": "sha512-c3mAZEuK0lvBp8tmuL74XRKn1+y2dcwOUpH7x4WrF6gk1GIgiluDRgMYQtw2OFcBvAJWlt6ASU3tSqxp0Uu0Aw==", - "requires": { - "@types/istanbul-lib-report": "*" - } - }, - "@types/linkify-it": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/@types/linkify-it/-/linkify-it-3.0.2.tgz", - "integrity": "sha512-HZQYqbiFVWufzCwexrvh694SOim8z2d+xJl5UNamcvQFejLY/2YUtzXHYi3cHdI7PMlS8ejH2slRAOJQ32aNbA==", - "dev": true - }, - "@types/markdown-it": { - "version": "12.2.3", - "resolved": "https://registry.npmjs.org/@types/markdown-it/-/markdown-it-12.2.3.tgz", - "integrity": "sha512-GKMHFfv3458yYy+v/N8gjufHO6MSZKCOXpZc5GXIWWy8uldwfmPn98vp81gZ5f9SVw8YYBctgfJ22a2d7AOMeQ==", - "dev": true, - "requires": { - "@types/linkify-it": "*", - "@types/mdurl": "*" - } - }, - "@types/mdurl": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/@types/mdurl/-/mdurl-1.0.2.tgz", - "integrity": "sha512-eC4U9MlIcu2q0KQmXszyn5Akca/0jrQmwDRgpAMJai7qBWq4amIQhZyNau4VYGtCeALvW1/NtjzJJ567aZxfKA==", - "dev": true - }, - "@types/node": { - "version": "17.0.29", - "resolved": "https://registry.npmjs.org/@types/node/-/node-17.0.29.tgz", - "integrity": "sha512-tx5jMmMFwx7wBwq/V7OohKDVb/JwJU5qCVkeLMh1//xycAJ/ESuw9aJ9SEtlCZDYi2pBfe4JkisSoAtbOsBNAA==" - }, - "@types/stack-utils": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-2.0.1.tgz", - "integrity": "sha512-Hl219/BT5fLAaz6NDkSuhzasy49dwQS/DSdu4MdggFB8zcXv7vflBI3xp7FEmkmdDkBUI2bPUNeMttp2knYdxw==" - }, - "@types/yaml": { - "version": "1.9.7", - "resolved": "https://registry.npmjs.org/@types/yaml/-/yaml-1.9.7.tgz", - "integrity": "sha512-8WMXRDD1D+wCohjfslHDgICd2JtMATZU8CkhH8LVJqcJs6dyYj5TGptzP8wApbmEullGBSsCEzzap73DQ1HJaA==", - "requires": { - "yaml": "*" - } - }, - "@types/yargs": { - "version": "16.0.4", - "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-16.0.4.tgz", - "integrity": "sha512-T8Yc9wt/5LbJyCaLiHPReJa0kApcIgJ7Bn735GjItUfh08Z1pJvu8QZqb9s+mMvKV6WUQRV7K2R46YbjMXTTJw==", - "requires": { - "@types/yargs-parser": "*" - } - }, - "@types/yargs-parser": { - "version": "21.0.0", - "resolved": "https://registry.npmjs.org/@types/yargs-parser/-/yargs-parser-21.0.0.tgz", - "integrity": "sha512-iO9ZQHkZxHn4mSakYV0vFHAVDyEOIJQrV2uZ06HxEPcx+mt8swXoZHIbaaJ2crJYFfErySgktuTZ3BeLz+XmFA==" - }, - "ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==" - }, - "ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "requires": { - "color-convert": "^2.0.1" - } - }, - "argparse": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", - "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==" - }, - "asynckit": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", - "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=" - }, - "braces": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", - "requires": { - "fill-range": "^7.0.1" - } - }, - "chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "requires": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - } - }, - "ci-info": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.3.0.tgz", - "integrity": "sha512-riT/3vI5YpVH6/qomlDnJow6TBee2PBKSEpx3O32EGPYbWGIRsIlGRms3Sm74wYE1JMo8RnO04Hb12+v1J5ICw==" - }, - "color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "requires": { - "color-name": "~1.1.4" - } - }, - "color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" - }, - "combined-stream": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", - "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", - "requires": { - "delayed-stream": "~1.0.0" - } - }, - "delayed-stream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", - "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=" - }, - "diff-sequences": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-27.5.1.tgz", - "integrity": "sha512-k1gCAXAsNgLwEL+Y8Wvl+M6oEFj5bgazfZULpS5CneoPPXRaCCW7dm+q21Ky2VEE5X+VeRDBVg1Pcvvsr4TtNQ==" - }, - "entities": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/entities/-/entities-2.1.0.tgz", - "integrity": "sha512-hCx1oky9PFrJ611mf0ifBLBRW8lUUVRlFolb5gWRfIELabBlbp9xZvrqZLZAs+NxFnbfQoeGd8wDkygjg7U85w==" - }, - "escape-string-regexp": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz", - "integrity": "sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==" - }, - "expect": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/expect/-/expect-27.5.1.tgz", - "integrity": "sha512-E1q5hSUG2AmYQwQJ041nvgpkODHQvB+RKlB4IYdru6uJsyFTRyZAP463M+1lINorwbqAmUggi6+WwkD8lCS/Dw==", - "requires": { - "@jest/types": "^27.5.1", - "jest-get-type": "^27.5.1", - "jest-matcher-utils": "^27.5.1", - "jest-message-util": "^27.5.1" - } - }, - "fill-range": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", - "requires": { - "to-regex-range": "^5.0.1" - } - }, - "form-data": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", - "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", - "requires": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.8", - "mime-types": "^2.1.12" - } - }, - "graceful-fs": { - "version": "4.2.10", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz", - "integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==" - }, - "handlebars": { - "version": "4.7.7", - "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.7.tgz", - "integrity": "sha512-aAcXm5OAfE/8IXkcZvCepKU3VzW1/39Fb5ZuqMtgI/hT8X2YgoMvBY5dLhq/cpOvw7Lk1nK/UF71aLG/ZnVYRA==", - "requires": { - "minimist": "^1.2.5", - "neo-async": "^2.6.0", - "source-map": "^0.6.1", - "uglify-js": "^3.1.4", - "wordwrap": "^1.0.0" - } - }, - "has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==" - }, - "is-number": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", - "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==" - }, - "jest-diff": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-27.5.1.tgz", - "integrity": "sha512-m0NvkX55LDt9T4mctTEgnZk3fmEg3NRYutvMPWM/0iPnkFj2wIeF45O1718cMSOFO1vINkqmxqD8vE37uTEbqw==", - "requires": { - "chalk": "^4.0.0", - "diff-sequences": "^27.5.1", - "jest-get-type": "^27.5.1", - "pretty-format": "^27.5.1" - } - }, - "jest-get-type": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-27.5.1.tgz", - "integrity": "sha512-2KY95ksYSaK7DMBWQn6dQz3kqAf3BB64y2udeG+hv4KfSOb9qwcYQstTJc1KCbsix+wLZWZYN8t7nwX3GOBLRw==" - }, - "jest-matcher-utils": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-27.5.1.tgz", - "integrity": "sha512-z2uTx/T6LBaCoNWNFWwChLBKYxTMcGBRjAt+2SbP929/Fflb9aa5LGma654Rz8z9HLxsrUaYzxE9T/EFIL/PAw==", - "requires": { - "chalk": "^4.0.0", - "jest-diff": "^27.5.1", - "jest-get-type": "^27.5.1", - "pretty-format": "^27.5.1" - } - }, - "jest-message-util": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-27.5.1.tgz", - "integrity": "sha512-rMyFe1+jnyAAf+NHwTclDz0eAaLkVDdKVHHBFWsBWHnnh5YeJMNWWsv7AbFYXfK3oTqvL7VTWkhNLu1jX24D+g==", - "requires": { - "@babel/code-frame": "^7.12.13", - "@jest/types": "^27.5.1", - "@types/stack-utils": "^2.0.0", - "chalk": "^4.0.0", - "graceful-fs": "^4.2.9", - "micromatch": "^4.0.4", - "pretty-format": "^27.5.1", - "slash": "^3.0.0", - "stack-utils": "^2.0.3" - } - }, - "jest-mock": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-27.5.1.tgz", - "integrity": "sha512-K4jKbY1d4ENhbrG2zuPWaQBvDly+iZ2yAW+T1fATN78hc0sInwn7wZB8XtlNnvHug5RMwV897Xm4LqmPM4e2Og==", - "requires": { - "@jest/types": "^27.5.1", - "@types/node": "*" - } - }, - "jest-util": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-27.5.1.tgz", - "integrity": "sha512-Kv2o/8jNvX1MQ0KGtw480E/w4fBCDOnH6+6DmeKi6LZUIlKA5kwY0YNdlzaWTiVgxqAqik11QyxDOKk543aKXw==", - "requires": { - "@jest/types": "^27.5.1", - "@types/node": "*", - "chalk": "^4.0.0", - "ci-info": "^3.2.0", - "graceful-fs": "^4.2.9", - "picomatch": "^2.2.3" - } - }, - "js-tokens": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", - "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==" - }, - "linkify-it": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/linkify-it/-/linkify-it-3.0.3.tgz", - "integrity": "sha512-ynTsyrFSdE5oZ/O9GEf00kPngmOfVwazR5GKDq6EYfhlpFug3J2zybX56a2PRRpc9P+FuSoGNAwjlbDs9jJBPQ==", - "requires": { - "uc.micro": "^1.0.1" - } - }, - "markdown-it": { - "version": "12.3.2", - "resolved": "https://registry.npmjs.org/markdown-it/-/markdown-it-12.3.2.tgz", - "integrity": "sha512-TchMembfxfNVpHkbtriWltGWc+m3xszaRD0CZup7GFFhzIgQqxIfn3eGj1yZpfuflzPvfkt611B2Q/Bsk1YnGg==", - "requires": { - "argparse": "^2.0.1", - "entities": "~2.1.0", - "linkify-it": "^3.0.1", - "mdurl": "^1.0.1", - "uc.micro": "^1.0.5" - } - }, - "markdown-it-task-lists": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/markdown-it-task-lists/-/markdown-it-task-lists-2.1.1.tgz", - "integrity": "sha512-TxFAc76Jnhb2OUu+n3yz9RMu4CwGfaT788br6HhEDlvWfdeJcLUsxk1Hgw2yJio0OXsxv7pyIPmvECY7bMbluA==" - }, - "mdurl": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/mdurl/-/mdurl-1.0.1.tgz", - "integrity": "sha1-/oWy7HWlkDfyrf7BAP1sYBdhFS4=" - }, - "micromatch": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", - "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", - "requires": { - "braces": "^3.0.2", - "picomatch": "^2.3.1" - } - }, - "mime-db": { - "version": "1.52.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", - "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==" - }, - "mime-types": { - "version": "2.1.35", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", - "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", - "requires": { - "mime-db": "1.52.0" - } - }, - "minimist": { - "version": "1.2.6", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz", - "integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==" - }, - "neo-async": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz", - "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==" - }, - "picomatch": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", - "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==" - }, - "pretty-format": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-27.5.1.tgz", - "integrity": "sha512-Qb1gy5OrP5+zDf2Bvnzdl3jsTf1qXVMazbvCoKhtKqVs4/YK4ozX4gKQJJVyNe+cajNPn0KoC0MC3FUmaHWEmQ==", - "requires": { - "ansi-regex": "^5.0.1", - "ansi-styles": "^5.0.0", - "react-is": "^17.0.1" - }, - "dependencies": { - "ansi-styles": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", - "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==" - } - } - }, - "react-is": { - "version": "17.0.2", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz", - "integrity": "sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==" - }, - "slash": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", - "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==" - }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" - }, - "stack-utils": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/stack-utils/-/stack-utils-2.0.5.tgz", - "integrity": "sha512-xrQcmYhOsn/1kX+Vraq+7j4oE2j/6BFscZ0etmYg81xuM8Gq0022Pxb8+IqgOFUIaxHs0KaSb7T1+OegiNrNFA==", - "requires": { - "escape-string-regexp": "^2.0.0" - } - }, - "supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "requires": { - "has-flag": "^4.0.0" - } - }, - "to-regex-range": { - "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==", - "requires": { - "is-number": "^7.0.0" - } - }, - "type-detect": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", - "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==" - }, - "uc.micro": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/uc.micro/-/uc.micro-1.0.6.tgz", - "integrity": "sha512-8Y75pvTYkLJW2hWQHXxoqRgV7qb9B+9vFEtidML+7koHUFapnVJAZ6cKs+Qjz5Aw3aZWHMC6u0wJE3At+nSGwA==" - }, - "uglify-js": { - "version": "3.15.4", - "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.15.4.tgz", - "integrity": "sha512-vMOPGDuvXecPs34V74qDKk4iJ/SN4vL3Ow/23ixafENYvtrNvtbcgUeugTcUGRGsOF/5fU8/NYSL5Hyb3l1OJA==", - "optional": true - }, - "wordwrap": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", - "integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=" - }, - "yaml": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.0.1.tgz", - "integrity": "sha512-1NpAYQ3wjzIlMs0mgdBmYzLkFgWBIWrzYVDYfrixhoFNNgJ444/jT2kUT2sicRbJES3oQYRZugjB6Ro8SjKeFg==" - } - } -} diff --git a/packages/plugs/package.json b/packages/plugs/package.json index 097ba2c8..ab9a6c1e 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.9", + "version": "0.0.16", "license": "MIT", "scripts": { "generate": "lezer-generator query/query.grammar -o query/parse-query.js", @@ -12,9 +12,6 @@ "build": "plugos-bundle --dist ../web/dist global.plug.yaml && plugos-bundle --dist dist --exclude @lezer/lr yaml handlebars -- */*.plug.yaml", "test": "jest build/test" }, - "files": [ - "dist" - ], "targets": { "test": { "source": [ @@ -34,14 +31,11 @@ "@jest/globals": "^27.5.1", "@lezer/generator": "1.0.0", "@lezer/lr": "1.0.0", - "@silverbulletmd/common": "^0.0.9", - "@silverbulletmd/plugs": "^0.0.9", - "@silverbulletmd/web": "^0.0.9", + "@silverbulletmd/common": "^0.0.16", "@types/yaml": "^1.9.7", "handlebars": "^4.7.7", "markdown-it": "^12.3.2", "markdown-it-task-lists": "^2.1.1", - "node-fetch": "^3.2.6", "yaml": "^2.0.0" }, "devDependencies": { diff --git a/packages/plugs/query/parse-query.js b/packages/plugs/query/parse-query.js index b78cf95e..91eb477f 100644 --- a/packages/plugs/query/parse-query.js +++ b/packages/plugs/query/parse-query.js @@ -1,7 +1,7 @@ // This file was generated by lezer-generator. You probably shouldn't edit it. import {LRParser} from "@lezer/lr" export const parser = LRParser.deserialize({ - version: 13, + version: 14, states: "&fOVQPOOOmQQO'#C^QOQPOOOtQPO'#C`OyQQO'#CkO!OQPO'#CmO!TQPO'#CnO!YQPO'#CoOOQO'#Cp'#CpO!_QQO,58xO!fQQO'#CcO#TQQO'#CaOOQO'#Ca'#CaOOQO,58z,58zO#lQPO,59VOOQO,59X,59XO#qQQO'#D`OOQO,59Y,59YOOQO,59Z,59ZOOQO-E6n-E6nO$YQQO,58}OtQPO,58|O$qQQO1G.qO%]QPO'#CrO%bQQO,59zOOQO'#Cg'#CgOOQO'#Ci'#CiO$YQQO'#CjOOQO'#Cd'#CdOOQO1G.i1G.iOOQO1G.h1G.hOOQO'#Cl'#ClOOQO7+$]7+$]OOQO,59^,59^OOQO-E6p-E6pO%yQPO'#C|O&RQPO,59UO$YQQO'#CqO&WQPO,59hOOQO1G.p1G.pOOQO,59],59]OOQO-E6o-E6o", stateData: "&`~OiOS~ORPO~OjRO|SO!QTO!RUO!TVO~OgQX~P[ORYO~O}^O~OX_O~OR`O~OYbO~OgQa~P[OkdOsdOtdOudOvdOwdOxdOydOzdO~O{eOgTXjTX|TX!QTX!RTX!TTX~ORfO~OqgOg!SXj!SX|!SX!Q!SX!R!SX!T!SX~OXlOYlO[lOliOmiOnjOokO~O!OoO!PoOg_ij_i|_i!Q_i!R_i!T_i~ORqO~OqgOg!Saj!Sa|!Sa!Q!Sa!R!Sa!T!Sa~OquOrpX~OrwO~OquOrpa~O", goto: "#d!TPP!UP!X!]!`!c!iPP!rP!r!r!X!w!X!X!X!z#Q#WPPPPPPPPP#^PPPPPPPPPPPPPPPPP#aRQOTWPXR]RR[RQZRRneQmdQskRxuVldkuRpfQXPRcXQvsRyvQh`RrhRtkRaU", diff --git a/packages/server/package.json b/packages/server/package.json index e34b4873..53a56e9b 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.9", + "version": "0.0.16", "license": "MIT", "bin": { "silverbullet": "./dist/server/server.js" @@ -41,9 +41,9 @@ "@codemirror/legacy-modes": "6.0.0", "@jest/globals": "^27.5.1", "@lezer/markdown": "1.0.0", - "@silverbulletmd/common": "^0.0.9", - "@silverbulletmd/plugs": "^0.0.9", - "@silverbulletmd/web": "^0.0.9", + "@silverbulletmd/common": "^0.0.16", + "@silverbulletmd/plugs": "^0.0.16", + "@silverbulletmd/web": "^0.0.16", "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 f840a971..747cb3f5 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.9", + "version": "0.0.16", "license": "MIT", "scripts": { "watch": "rm -rf .parcel-cache && parcel watch", @@ -41,9 +41,6 @@ "@jest/globals": "^27.5.1", "@lezer/highlight": "1.0.0", "@lezer/markdown": "1.0.0", - "@silverbulletmd/common": "^0.0.9", - "@silverbulletmd/plugs": "^0.0.9", - "@silverbulletmd/web": "^0.0.9", "fake-indexeddb": "^3.1.7", "fuzzysort": "^1.9.0", "jest": "^27.5.1", @@ -57,7 +54,6 @@ "@parcel/service-worker": "2.5.0", "@parcel/transformer-inline-string": "2.5.0", "@parcel/transformer-sass": "2.5.0", - "nodemon": "^2.0.18", "@parcel/transformer-webmanifest": "2.5.0", "@parcel/validator-typescript": "2.5.0", "@types/cors": "^2.8.12", @@ -66,6 +62,7 @@ "@types/react": "^17.0.39", "@types/react-dom": "^17.0.11", "assert": "^2.0.0", + "nodemon": "^2.0.18", "parcel": "2.5.0", "prettier": "^2.5.1", "typescript": "^4.6.2" diff --git a/scripts/release.sh b/scripts/release.sh index 03158afc..a2846338 100755 --- a/scripts/release.sh +++ b/scripts/release.sh @@ -2,6 +2,8 @@ VERSION=$1 npm version --ws $VERSION || true -npm install --ws server --save @silverbulletmd/web@$VERSION @silverbulletmd/plugs@$VERSION @silverbulletmd/common@$VERSION +npm install --workspace packages/server --save @silverbulletmd/web@$VERSION @silverbulletmd/common@$VERSION @silverbulletmd/plugs@$VERSION +npm install --workspace packages/plugs --save @silverbulletmd/common@$VERSION + npm run clean-build npm run publish-all \ No newline at end of file