From 14c06e7a21a91d929953414074408df2f7eed28a Mon Sep 17 00:00:00 2001 From: Kevin Newton Date: Sat, 25 Feb 2023 15:03:55 -0500 Subject: [PATCH 1/5] Simplify to use new DefaultRubyVM --- bin/build | 21 - bin/build.mjs | 22 + bin/serve | 25 - bin/serve.mjs | 20 + bin/{wasmPlugin.js => wasmPlugin.mjs} | 11 +- package.json | 14 +- src/createRuby.ts | 68 +-- yarn.lock | 656 ++++++++++++++++++++------ 8 files changed, 564 insertions(+), 273 deletions(-) delete mode 100755 bin/build create mode 100644 bin/build.mjs delete mode 100755 bin/serve create mode 100644 bin/serve.mjs rename bin/{wasmPlugin.js => wasmPlugin.mjs} (90%) diff --git a/bin/build b/bin/build deleted file mode 100755 index 818f84b..0000000 --- a/bin/build +++ /dev/null @@ -1,21 +0,0 @@ -#!/usr/bin/env node - -const esbuild = require("esbuild"); -const path = require("path"); - -const wasmPlugin = require("./wasmPlugin"); - -esbuild.build({ - bundle: true, - entryPoints: [path.join(__dirname, "../src/index.ts")], - format: "esm", - metafile: true, - minify: true, - outdir: path.join(__dirname, "../docs"), - plugins: [wasmPlugin], - sourcemap: true, - splitting: true, - target: "es6" -}).then((result) => esbuild.analyzeMetafile(result.metafile)).then((analysis) => { - console.log(analysis); -}); diff --git a/bin/build.mjs b/bin/build.mjs new file mode 100644 index 0000000..045e4a9 --- /dev/null +++ b/bin/build.mjs @@ -0,0 +1,22 @@ +import esbuild from "esbuild"; +import url from "url"; +import wasmPlugin from "./wasmPlugin.mjs"; + +const entryPoint = url.fileURLToPath(new URL("../src/index.ts", import.meta.url)); +const outdir = url.fileURLToPath(new URL("../docs", import.meta.url)); + +const { metafile } = await esbuild.build({ + bundle: true, + entryPoints: [entryPoint], + format: "esm", + metafile: true, + minify: true, + outdir, + plugins: [wasmPlugin], + sourcemap: true, + splitting: true, + target: "es6" +}); + +const analysis = await esbuild.analyzeMetafile(metafile); +console.log(analysis); diff --git a/bin/serve b/bin/serve deleted file mode 100755 index b2568da..0000000 --- a/bin/serve +++ /dev/null @@ -1,25 +0,0 @@ -#!/usr/bin/env node - -const esbuild = require("esbuild"); -const path = require("path"); - -const wasmPlugin = require("./wasmPlugin"); - -const serveOptions = { - servedir: path.join(__dirname, "../docs") -}; - -const buildOptions = { - bundle: true, - entryPoints: [path.join(__dirname, "../src/index.ts")], - format: "esm", - outdir: path.join(__dirname, "../docs"), - plugins: [wasmPlugin], - sourcemap: true, - splitting: true, - target: "esnext" -}; - -esbuild.serve(serveOptions, buildOptions).then((result) => { - console.log(`Listening at ${result.host}:${result.port}`); -}); diff --git a/bin/serve.mjs b/bin/serve.mjs new file mode 100644 index 0000000..b194e34 --- /dev/null +++ b/bin/serve.mjs @@ -0,0 +1,20 @@ +import esbuild from "esbuild"; +import url from "url"; +import wasmPlugin from "./wasmPlugin.mjs"; + +const entryPoint = url.fileURLToPath(new URL("../src/index.ts", import.meta.url)); +const outdir = url.fileURLToPath(new URL("../docs", import.meta.url)); + +const ctx = await esbuild.context({ + bundle: true, + entryPoints: [entryPoint], + format: "esm", + outdir, + plugins: [wasmPlugin], + sourcemap: true, + splitting: true, + target: "esnext" +}); + +const { host, port } = await ctx.serve({ servedir: outdir }); +console.log(`Listening at ${host}:${port}`); diff --git a/bin/wasmPlugin.js b/bin/wasmPlugin.mjs similarity index 90% rename from bin/wasmPlugin.js rename to bin/wasmPlugin.mjs index 7c2f5f4..64c817a 100644 --- a/bin/wasmPlugin.js +++ b/bin/wasmPlugin.mjs @@ -1,9 +1,9 @@ -module.exports = { +import path from 'node:path'; +import fs from 'node:fs'; + +export default { name: 'wasm', setup(build) { - let path = require('path') - let fs = require('fs') - // Resolve ".wasm" files to a path with a namespace build.onResolve({ filter: /\.wasm$/ }, args => { // If this is the import inside the stub module, import the @@ -37,7 +37,7 @@ module.exports = { // binary itself is imported from a second virtual module. build.onLoad({ filter: /.*/, namespace: 'wasm-stub' }, async (args) => ({ contents: `import wasm from ${JSON.stringify(args.path)} - export default (imports) => WebAssembly.instantiate(wasm, imports).then((result) => result.instance)`, + export default () => WebAssembly.compile(wasm)`, })) // Virtual modules in the "wasm-binary" namespace contain the @@ -50,3 +50,4 @@ module.exports = { })) }, } + diff --git a/package.json b/package.json index dbe6cd5..7b18e05 100644 --- a/package.json +++ b/package.json @@ -1,21 +1,21 @@ { "license": "MIT", "scripts": { - "build": "bin/build", - "serve": "bin/serve" + "build": "node bin/build.mjs", + "serve": "node bin/serve.mjs" }, "dependencies": { "@monaco-editor/loader": "^1.3.2", "@wasmer/wasi": "^0.12.0", "@wasmer/wasmfs": "^0.12.0", - "mermaid": "^9.4.0", + "mermaid": "^10.0.0", "path-browserify": "^1.0.1", - "ruby-head-wasm-wasi": "^0.3.0" + "ruby-head-wasm-wasi": "^0.6.0" }, "devDependencies": { - "@types/node": "^17.0.33", + "@types/node": "^18.14.1", "@types/path-browserify": "^1.0.0", - "esbuild": "^0.14.39", - "monaco-editor": "^0.33.0" + "esbuild": "^0.17.10", + "monaco-editor": "^0.36.0" } } diff --git a/src/createRuby.ts b/src/createRuby.ts index 9b74f62..165110c 100644 --- a/src/createRuby.ts +++ b/src/createRuby.ts @@ -1,71 +1,17 @@ import { WASI } from "@wasmer/wasi"; import { WasmFs } from "@wasmer/wasmfs"; import path from "path-browserify"; -import { RubyVM } from "ruby-head-wasm-wasi/dist/index"; +import { DefaultRubyVM } from "ruby-head-wasm-wasi/dist/browser.esm.js"; import load from "./app.wasm"; -// This overwrites the default writeSync function used by the WasmFs to instead -// pipe it out to the console. -function createWriter(originalWriter: Function) { - return function () { - let text: string; - - if (arguments.length === 4) { - text = arguments[1]; - } else { - text = new TextDecoder("utf-8").decode(arguments[1]); - } - - switch (arguments[0]) { - case 1: - console.log(text); - break; - case 2: - console.warn(text); - break; - } - - return originalWriter.call(arguments); - } -} - export default async function createRuby() { - // First, create a new file system that we can use internally within the Ruby - // WASM VM. - const wasmFs = new WasmFs(); - wasmFs.fs.mkdirSync("/tmp", 0o777); - wasmFs.fs.writeSync = createWriter(wasmFs.fs.writeSync.bind(wasmFs.fs)); - - // Next, create a new WASI instance with the correct options overridden from - // the defaults. - const wasi = new WASI({ - bindings: { ...WASI.defaultBindings, fs: wasmFs.fs, path: path }, - preopens: { "/": "/tmp" } - }); - - // Then, create a new Ruby VM instance that we can use to store the memory for - // our application. - const ruby = new RubyVM(); - const imports = { wasi_snapshot_preview1: wasi.wasiImport }; - ruby.addToImports(imports); - - // Set the WASI memory to use the memory for our application. - const instance = await load(imports); - wasi.setMemory(instance.exports.memory); - - // Load our application into the virtual machine. - instance.exports._initialize(); - await ruby.setInstance(instance); - - // Initial our virtual machine and return it. It should now be able to - // evaluate and execute Ruby code. - ruby.initialize(); + const { vm } = await DefaultRubyVM(await load()) // Once our virtual machine is booted, we're going to require the necessary // files to make it work. I'm not sure why I need to explicitly require // did_you_mean here, but it doesn't work without it. - ruby.eval(` + vm.eval(` require "rubygems" require "did_you_mean" require "json" @@ -81,7 +27,7 @@ export default async function createRuby() { const jsonSource = JSON.stringify(JSON.stringify(source)); const rubySource = `RubyVM::InstructionSequence.compile(JSON.parse(${jsonSource})).disasm`; - return ruby.eval(rubySource).toString(); + return vm.eval(rubySource).toString(); }, mermaid(source: string) { const jsonSource = JSON.stringify(JSON.stringify(source)); @@ -90,7 +36,7 @@ export default async function createRuby() { SyntaxTree.parse(source).to_mermaid `; - return ruby.eval(rubySource).toString(); + return vm.eval(rubySource).toString(); }, // A function that calls through to the SyntaxTree.format function to get // the pretty-printed version of the source. @@ -98,7 +44,7 @@ export default async function createRuby() { const jsonSource = JSON.stringify(JSON.stringify(source)); const rubySource = `SyntaxTree.format(JSON.parse(${jsonSource}))`; - return ruby.eval(rubySource).toString(); + return vm.eval(rubySource).toString(); }, // A function that calls through to PP to get the pretty-printed version of // the syntax tree. @@ -106,7 +52,7 @@ export default async function createRuby() { const jsonSource = JSON.stringify(JSON.stringify(source)); const rubySource = `PP.pp(SyntaxTree.parse(JSON.parse(${jsonSource})), +"", 80)`; - return ruby.eval(rubySource).toString(); + return vm.eval(rubySource).toString(); } }; }; diff --git a/yarn.lock b/yarn.lock index ac4331d..cc57f88 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7,6 +7,116 @@ resolved "https://registry.yarnpkg.com/@braintree/sanitize-url/-/sanitize-url-6.0.2.tgz#6110f918d273fe2af8ea1c4398a88774bb9fc12f" integrity sha512-Tbsj02wXCbqGmzdnXNk0SOF19ChhRU70BsroIi4Pm6Ehp56in6vch94mfbdQ17DozxkL3BAVjbZ4Qc1a0HFRAg== +"@esbuild/android-arm64@0.17.10": + version "0.17.10" + resolved "https://registry.yarnpkg.com/@esbuild/android-arm64/-/android-arm64-0.17.10.tgz#ad2ee47dd021035abdfb0c38848ff77a1e1918c4" + integrity sha512-ht1P9CmvrPF5yKDtyC+z43RczVs4rrHpRqrmIuoSvSdn44Fs1n6DGlpZKdK6rM83pFLbVaSUwle8IN+TPmkv7g== + +"@esbuild/android-arm@0.17.10": + version "0.17.10" + resolved "https://registry.yarnpkg.com/@esbuild/android-arm/-/android-arm-0.17.10.tgz#bb5a68af8adeb94b30eadee7307404dc5237d076" + integrity sha512-7YEBfZ5lSem9Tqpsz+tjbdsEshlO9j/REJrfv4DXgKTt1+/MHqGwbtlyxQuaSlMeUZLxUKBaX8wdzlTfHkmnLw== + +"@esbuild/android-x64@0.17.10": + version "0.17.10" + resolved "https://registry.yarnpkg.com/@esbuild/android-x64/-/android-x64-0.17.10.tgz#751d5d8ae9ece1efa9627b689c888eb85b102360" + integrity sha512-CYzrm+hTiY5QICji64aJ/xKdN70IK8XZ6iiyq0tZkd3tfnwwSWTYH1t3m6zyaaBxkuj40kxgMyj1km/NqdjQZA== + +"@esbuild/darwin-arm64@0.17.10": + version "0.17.10" + resolved "https://registry.yarnpkg.com/@esbuild/darwin-arm64/-/darwin-arm64-0.17.10.tgz#85601ee7efb2129cd3218d5bcbe8da1173bc1e8b" + integrity sha512-3HaGIowI+nMZlopqyW6+jxYr01KvNaLB5znXfbyyjuo4lE0VZfvFGcguIJapQeQMS4cX/NEispwOekJt3gr5Dg== + +"@esbuild/darwin-x64@0.17.10": + version "0.17.10" + resolved "https://registry.yarnpkg.com/@esbuild/darwin-x64/-/darwin-x64-0.17.10.tgz#362c7e988c61fe72d5edef4f717e4b4fc728da98" + integrity sha512-J4MJzGchuCRG5n+B4EHpAMoJmBeAE1L3wGYDIN5oWNqX0tEr7VKOzw0ymSwpoeSpdCa030lagGUfnfhS7OvzrQ== + +"@esbuild/freebsd-arm64@0.17.10": + version "0.17.10" + resolved "https://registry.yarnpkg.com/@esbuild/freebsd-arm64/-/freebsd-arm64-0.17.10.tgz#e8a85a46ede7c3a048a12f16b9d551d25adc8bb1" + integrity sha512-ZkX40Z7qCbugeK4U5/gbzna/UQkM9d9LNV+Fro8r7HA7sRof5Rwxc46SsqeMvB5ZaR0b1/ITQ/8Y1NmV2F0fXQ== + +"@esbuild/freebsd-x64@0.17.10": + version "0.17.10" + resolved "https://registry.yarnpkg.com/@esbuild/freebsd-x64/-/freebsd-x64-0.17.10.tgz#cd0a1b68bffbcb5b65e65b3fd542e8c7c3edd86b" + integrity sha512-0m0YX1IWSLG9hWh7tZa3kdAugFbZFFx9XrvfpaCMMvrswSTvUZypp0NFKriUurHpBA3xsHVE9Qb/0u2Bbi/otg== + +"@esbuild/linux-arm64@0.17.10": + version "0.17.10" + resolved "https://registry.yarnpkg.com/@esbuild/linux-arm64/-/linux-arm64-0.17.10.tgz#13b183f432512ed9d9281cc89476caeebe9e9123" + integrity sha512-g1EZJR1/c+MmCgVwpdZdKi4QAJ8DCLP5uTgLWSAVd9wlqk9GMscaNMEViG3aE1wS+cNMzXXgdWiW/VX4J+5nTA== + +"@esbuild/linux-arm@0.17.10": + version "0.17.10" + resolved "https://registry.yarnpkg.com/@esbuild/linux-arm/-/linux-arm-0.17.10.tgz#dd11e0a5faa3ea94dc80278a601c3be7b4fdf1da" + integrity sha512-whRdrrl0X+9D6o5f0sTZtDM9s86Xt4wk1bf7ltx6iQqrIIOH+sre1yjpcCdrVXntQPCNw/G+XqsD4HuxeS+2QA== + +"@esbuild/linux-ia32@0.17.10": + version "0.17.10" + resolved "https://registry.yarnpkg.com/@esbuild/linux-ia32/-/linux-ia32-0.17.10.tgz#4d836f87b92807d9292379963c4888270d282405" + integrity sha512-1vKYCjfv/bEwxngHERp7huYfJ4jJzldfxyfaF7hc3216xiDA62xbXJfRlradiMhGZbdNLj2WA1YwYFzs9IWNPw== + +"@esbuild/linux-loong64@0.17.10": + version "0.17.10" + resolved "https://registry.yarnpkg.com/@esbuild/linux-loong64/-/linux-loong64-0.17.10.tgz#92eb2ee200c17ef12c7fb3b648231948699e7a4c" + integrity sha512-mvwAr75q3Fgc/qz3K6sya3gBmJIYZCgcJ0s7XshpoqIAIBszzfXsqhpRrRdVFAyV1G9VUjj7VopL2HnAS8aHFA== + +"@esbuild/linux-mips64el@0.17.10": + version "0.17.10" + resolved "https://registry.yarnpkg.com/@esbuild/linux-mips64el/-/linux-mips64el-0.17.10.tgz#14f7d50c40fe7f7ee545a9bd07c6f6e4cba5570e" + integrity sha512-XilKPgM2u1zR1YuvCsFQWl9Fc35BqSqktooumOY2zj7CSn5czJn279j9TE1JEqSqz88izJo7yE4x3LSf7oxHzg== + +"@esbuild/linux-ppc64@0.17.10": + version "0.17.10" + resolved "https://registry.yarnpkg.com/@esbuild/linux-ppc64/-/linux-ppc64-0.17.10.tgz#1ab5802e93ae511ce9783e1cb95f37df0f84c4af" + integrity sha512-kM4Rmh9l670SwjlGkIe7pYWezk8uxKHX4Lnn5jBZYBNlWpKMBCVfpAgAJqp5doLobhzF3l64VZVrmGeZ8+uKmQ== + +"@esbuild/linux-riscv64@0.17.10": + version "0.17.10" + resolved "https://registry.yarnpkg.com/@esbuild/linux-riscv64/-/linux-riscv64-0.17.10.tgz#4fae25201ef7ad868731d16c8b50b0e386c4774a" + integrity sha512-r1m9ZMNJBtOvYYGQVXKy+WvWd0BPvSxMsVq8Hp4GzdMBQvfZRvRr5TtX/1RdN6Va8JMVQGpxqde3O+e8+khNJQ== + +"@esbuild/linux-s390x@0.17.10": + version "0.17.10" + resolved "https://registry.yarnpkg.com/@esbuild/linux-s390x/-/linux-s390x-0.17.10.tgz#126254d8335bb3586918b1ca60beb4abb46e6d54" + integrity sha512-LsY7QvOLPw9WRJ+fU5pNB3qrSfA00u32ND5JVDrn/xG5hIQo3kvTxSlWFRP0NJ0+n6HmhPGG0Q4jtQsb6PFoyg== + +"@esbuild/linux-x64@0.17.10": + version "0.17.10" + resolved "https://registry.yarnpkg.com/@esbuild/linux-x64/-/linux-x64-0.17.10.tgz#7fa4667b2df81ea0538e1b75e607cf04e526ce91" + integrity sha512-zJUfJLebCYzBdIz/Z9vqwFjIA7iSlLCFvVi7glMgnu2MK7XYigwsonXshy9wP9S7szF+nmwrelNaP3WGanstEg== + +"@esbuild/netbsd-x64@0.17.10": + version "0.17.10" + resolved "https://registry.yarnpkg.com/@esbuild/netbsd-x64/-/netbsd-x64-0.17.10.tgz#2d24727ddc2305619685bf237a46d6087a02ee9a" + integrity sha512-lOMkailn4Ok9Vbp/q7uJfgicpDTbZFlXlnKT2DqC8uBijmm5oGtXAJy2ZZVo5hX7IOVXikV9LpCMj2U8cTguWA== + +"@esbuild/openbsd-x64@0.17.10": + version "0.17.10" + resolved "https://registry.yarnpkg.com/@esbuild/openbsd-x64/-/openbsd-x64-0.17.10.tgz#bf3fc38ee6ecf028c1f0cfe11f61d53cc75fef12" + integrity sha512-/VE0Kx6y7eekqZ+ZLU4AjMlB80ov9tEz4H067Y0STwnGOYL8CsNg4J+cCmBznk1tMpxMoUOf0AbWlb1d2Pkbig== + +"@esbuild/sunos-x64@0.17.10": + version "0.17.10" + resolved "https://registry.yarnpkg.com/@esbuild/sunos-x64/-/sunos-x64-0.17.10.tgz#8deabd6dfec6256f80bb101bc59d29dbae99c69b" + integrity sha512-ERNO0838OUm8HfUjjsEs71cLjLMu/xt6bhOlxcJ0/1MG3hNqCmbWaS+w/8nFLa0DDjbwZQuGKVtCUJliLmbVgg== + +"@esbuild/win32-arm64@0.17.10": + version "0.17.10" + resolved "https://registry.yarnpkg.com/@esbuild/win32-arm64/-/win32-arm64-0.17.10.tgz#1ec1ee04c788c4c57a83370b6abf79587b3e4965" + integrity sha512-fXv+L+Bw2AeK+XJHwDAQ9m3NRlNemG6Z6ijLwJAAVdu4cyoFbBWbEtyZzDeL+rpG2lWI51cXeMt70HA8g2MqIg== + +"@esbuild/win32-ia32@0.17.10": + version "0.17.10" + resolved "https://registry.yarnpkg.com/@esbuild/win32-ia32/-/win32-ia32-0.17.10.tgz#a362528d7f3ad5d44fa8710a96764677ef92ebe9" + integrity sha512-3s+HADrOdCdGOi5lnh5DMQEzgbsFsd4w57L/eLKKjMnN0CN4AIEP0DCP3F3N14xnxh3ruNc32A0Na9zYe1Z/AQ== + +"@esbuild/win32-x64@0.17.10": + version "0.17.10" + resolved "https://registry.yarnpkg.com/@esbuild/win32-x64/-/win32-x64-0.17.10.tgz#ac779220f2da96afd480fb3f3148a292f66e7fc3" + integrity sha512-oP+zFUjYNaMNmjTwlFtWep85hvwUu19cZklB3QsBOcZSs6y7hmH4LNCJ7075bsqzYaNvZFXJlAVaQ2ApITDXtw== + "@monaco-editor/loader@^1.3.2": version "1.3.2" resolved "https://registry.yarnpkg.com/@monaco-editor/loader/-/loader-1.3.2.tgz#04effbb87052d19cd7d3c9d81c0635490f9bb6d8" @@ -14,16 +124,138 @@ dependencies: state-local "^1.0.6" -"@types/node@^17.0.33": - version "17.0.33" - resolved "https://registry.yarnpkg.com/@types/node/-/node-17.0.33.tgz#3c1879b276dc63e73030bb91165e62a4509cd506" - integrity sha512-miWq2m2FiQZmaHfdZNcbpp9PuXg34W5JZ5CrJ/BaS70VuhoJENBEQybeiYSaPBRNq6KQGnjfEnc/F3PN++D+XQ== +"@octokit/auth-token@^2.4.4": + version "2.5.0" + resolved "https://registry.yarnpkg.com/@octokit/auth-token/-/auth-token-2.5.0.tgz#27c37ea26c205f28443402477ffd261311f21e36" + integrity sha512-r5FVUJCOLl19AxiuZD2VRZ/ORjp/4IN98Of6YJoJOkY75CIBuYfmiNHGrDwXr+aLGG55igl9QrxX3hbiXlLb+g== + dependencies: + "@octokit/types" "^6.0.3" + +"@octokit/core@^3.5.1": + version "3.6.0" + resolved "https://registry.yarnpkg.com/@octokit/core/-/core-3.6.0.tgz#3376cb9f3008d9b3d110370d90e0a1fcd5fe6085" + integrity sha512-7RKRKuA4xTjMhY+eG3jthb3hlZCsOwg3rztWh75Xc+ShDWOfDDATWbeZpAHBNRpm4Tv9WgBMOy1zEJYXG6NJ7Q== + dependencies: + "@octokit/auth-token" "^2.4.4" + "@octokit/graphql" "^4.5.8" + "@octokit/request" "^5.6.3" + "@octokit/request-error" "^2.0.5" + "@octokit/types" "^6.0.3" + before-after-hook "^2.2.0" + universal-user-agent "^6.0.0" + +"@octokit/endpoint@^6.0.1": + version "6.0.12" + resolved "https://registry.yarnpkg.com/@octokit/endpoint/-/endpoint-6.0.12.tgz#3b4d47a4b0e79b1027fb8d75d4221928b2d05658" + integrity sha512-lF3puPwkQWGfkMClXb4k/eUT/nZKQfxinRWJrdZaJO85Dqwo/G0yOC434Jr2ojwafWJMYqFGFa5ms4jJUgujdA== + dependencies: + "@octokit/types" "^6.0.3" + is-plain-object "^5.0.0" + universal-user-agent "^6.0.0" + +"@octokit/graphql@^4.5.8": + version "4.8.0" + resolved "https://registry.yarnpkg.com/@octokit/graphql/-/graphql-4.8.0.tgz#664d9b11c0e12112cbf78e10f49a05959aa22cc3" + integrity sha512-0gv+qLSBLKF0z8TKaSKTsS39scVKF9dbMxJpj3U0vC7wjNWFuIpL/z76Qe2fiuCbDRcJSavkXsVtMS6/dtQQsg== + dependencies: + "@octokit/request" "^5.6.0" + "@octokit/types" "^6.0.3" + universal-user-agent "^6.0.0" + +"@octokit/openapi-types@^12.11.0": + version "12.11.0" + resolved "https://registry.yarnpkg.com/@octokit/openapi-types/-/openapi-types-12.11.0.tgz#da5638d64f2b919bca89ce6602d059f1b52d3ef0" + integrity sha512-VsXyi8peyRq9PqIz/tpqiL2w3w80OgVMwBHltTml3LmVvXiphgeqmY9mvBw9Wu7e0QWk/fqD37ux8yP5uVekyQ== + +"@octokit/plugin-paginate-rest@^2.16.8": + version "2.21.3" + resolved "https://registry.yarnpkg.com/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-2.21.3.tgz#7f12532797775640dbb8224da577da7dc210c87e" + integrity sha512-aCZTEf0y2h3OLbrgKkrfFdjRL6eSOo8komneVQJnYecAxIej7Bafor2xhuDJOIFau4pk0i/P28/XgtbyPF0ZHw== + dependencies: + "@octokit/types" "^6.40.0" + +"@octokit/plugin-request-log@^1.0.4": + version "1.0.4" + resolved "https://registry.yarnpkg.com/@octokit/plugin-request-log/-/plugin-request-log-1.0.4.tgz#5e50ed7083a613816b1e4a28aeec5fb7f1462e85" + integrity sha512-mLUsMkgP7K/cnFEw07kWqXGF5LKrOkD+lhCrKvPHXWDywAwuDUeDwWBpc69XK3pNX0uKiVt8g5z96PJ6z9xCFA== + +"@octokit/plugin-rest-endpoint-methods@^5.12.0": + version "5.16.2" + resolved "https://registry.yarnpkg.com/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-5.16.2.tgz#7ee8bf586df97dd6868cf68f641354e908c25342" + integrity sha512-8QFz29Fg5jDuTPXVtey05BLm7OB+M8fnvE64RNegzX7U+5NUXcOcnpTIK0YfSHBg8gYd0oxIq3IZTe9SfPZiRw== + dependencies: + "@octokit/types" "^6.39.0" + deprecation "^2.3.1" + +"@octokit/request-error@^2.0.5", "@octokit/request-error@^2.1.0": + version "2.1.0" + resolved "https://registry.yarnpkg.com/@octokit/request-error/-/request-error-2.1.0.tgz#9e150357831bfc788d13a4fd4b1913d60c74d677" + integrity sha512-1VIvgXxs9WHSjicsRwq8PlR2LR2x6DwsJAaFgzdi0JfJoGSO8mYI/cHJQ+9FbN21aa+DrgNLnwObmyeSC8Rmpg== + dependencies: + "@octokit/types" "^6.0.3" + deprecation "^2.0.0" + once "^1.4.0" + +"@octokit/request@^5.6.0", "@octokit/request@^5.6.3": + version "5.6.3" + resolved "https://registry.yarnpkg.com/@octokit/request/-/request-5.6.3.tgz#19a022515a5bba965ac06c9d1334514eb50c48b0" + integrity sha512-bFJl0I1KVc9jYTe9tdGGpAMPy32dLBXXo1dS/YwSCTL/2nd9XeHsY616RE3HPXDVk+a+dBuzyz5YdlXwcDTr2A== + dependencies: + "@octokit/endpoint" "^6.0.1" + "@octokit/request-error" "^2.1.0" + "@octokit/types" "^6.16.1" + is-plain-object "^5.0.0" + node-fetch "^2.6.7" + universal-user-agent "^6.0.0" + +"@octokit/rest@^18": + version "18.12.0" + resolved "https://registry.yarnpkg.com/@octokit/rest/-/rest-18.12.0.tgz#f06bc4952fc87130308d810ca9d00e79f6988881" + integrity sha512-gDPiOHlyGavxr72y0guQEhLsemgVjwRePayJ+FcKc2SJqKUbxbkvf5kAZEWA/MKvsfYlQAMVzNJE3ezQcxMJ2Q== + dependencies: + "@octokit/core" "^3.5.1" + "@octokit/plugin-paginate-rest" "^2.16.8" + "@octokit/plugin-request-log" "^1.0.4" + "@octokit/plugin-rest-endpoint-methods" "^5.12.0" + +"@octokit/types@^6.0.3", "@octokit/types@^6.16.1", "@octokit/types@^6.39.0", "@octokit/types@^6.40.0": + version "6.41.0" + resolved "https://registry.yarnpkg.com/@octokit/types/-/types-6.41.0.tgz#e58ef78d78596d2fb7df9c6259802464b5f84a04" + integrity sha512-eJ2jbzjdijiL3B4PrSQaSjuF2sPEQPVCPzBvTHJD9Nz+9dw2SGH4K4xeQJ77YfTq5bRQ+bD8wT11JbeDPmxmGg== + dependencies: + "@octokit/openapi-types" "^12.11.0" + +"@types/glob@*": + version "8.1.0" + resolved "https://registry.yarnpkg.com/@types/glob/-/glob-8.1.0.tgz#b63e70155391b0584dce44e7ea25190bbc38f2fc" + integrity sha512-IO+MJPVhoqz+28h1qLAcBEH2+xHMK6MTyHJc7MTnnYb6wsoLR29POVGJ7LycmVXIqyy/4/2ShP5sUwTXuOwb/w== + dependencies: + "@types/minimatch" "^5.1.2" + "@types/node" "*" + +"@types/minimatch@^5.1.2": + version "5.1.2" + resolved "https://registry.yarnpkg.com/@types/minimatch/-/minimatch-5.1.2.tgz#07508b45797cb81ec3f273011b054cd0755eddca" + integrity sha512-K0VQKziLUWkVKiRVrx4a40iPaxTUefQmjtkQofBkYRcoaaL/8rhwDWww9qWbrgicNOgnpIsMxyNIUM4+n6dUIA== + +"@types/node@*", "@types/node@^18.14.1": + version "18.14.1" + resolved "https://registry.yarnpkg.com/@types/node/-/node-18.14.1.tgz#90dad8476f1e42797c49d6f8b69aaf9f876fc69f" + integrity sha512-QH+37Qds3E0eDlReeboBxfHbX9omAcBCXEzswCu6jySP642jiM3cYSIkU/REqwhCUqXdonHFuBfJDiAJxMNhaQ== "@types/path-browserify@^1.0.0": version "1.0.0" resolved "https://registry.yarnpkg.com/@types/path-browserify/-/path-browserify-1.0.0.tgz#294ec6e88b6b0d340a3897b7120e5b393f16690e" integrity sha512-XMCcyhSvxcch8b7rZAtFAaierBYdeHXVvg2iYnxOV0MCQHmPuRRmGZPFDRzPayxcGiiSL1Te9UIO+f3cuj0tfw== +"@types/shelljs@^0.8.11": + version "0.8.11" + resolved "https://registry.yarnpkg.com/@types/shelljs/-/shelljs-0.8.11.tgz#17a5696c825974e96828e96e89585d685646fcb8" + integrity sha512-x9yaMvEh5BEaZKeVQC4vp3l+QoFj3BXcd4aYfuKSzIIyihjdVARAadYy3SMNIz0WCCdS2vB9JL/U6GQk5PaxQw== + dependencies: + "@types/glob" "*" + "@types/node" "*" + "@wasmer/wasi@^0.12.0": version "0.12.0" resolved "https://registry.yarnpkg.com/@wasmer/wasi/-/wasi-0.12.0.tgz#89c7c5e5ba58f7dfae4e323359346639c4ec382a" @@ -43,11 +275,21 @@ pako "^1.0.11" tar-stream "^2.1.0" +balanced-match@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee" + integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw== + base64-js@^1.3.1: version "1.5.1" resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.5.1.tgz#1b1b440160a5bf7ad40b650f095963481903930a" integrity sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA== +before-after-hook@^2.2.0: + version "2.2.3" + resolved "https://registry.yarnpkg.com/before-after-hook/-/before-after-hook-2.2.3.tgz#c51e809c81a4e354084422b9b26bad88249c517c" + integrity sha512-NzUnlZexiaH/46WDhANlyR2bXRopNg4F/zuSA3OpZnllCUgRaOF2znDioDWrmbNVsuZk6l9pMquQB38cfBZwkQ== + bl@^4.0.3: version "4.1.0" resolved "https://registry.yarnpkg.com/bl/-/bl-4.1.0.tgz#451535264182bec2fbbc83a62ab98cf11d9f7b3a" @@ -57,6 +299,14 @@ bl@^4.0.3: inherits "^2.0.4" readable-stream "^3.4.0" +brace-expansion@^1.1.7: + version "1.1.11" + resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" + integrity sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA== + dependencies: + balanced-match "^1.0.0" + concat-map "0.0.1" + browser-process-hrtime@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/browser-process-hrtime/-/browser-process-hrtime-1.0.0.tgz#3c9b4b7d782c8121e56f10106d84c0d0ffc94626" @@ -80,6 +330,16 @@ commander@7: resolved "https://registry.yarnpkg.com/commander/-/commander-7.2.0.tgz#a36cb57d0b501ce108e4d20559a150a391d97ab7" integrity sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw== +commander@^9: + version "9.5.0" + resolved "https://registry.yarnpkg.com/commander/-/commander-9.5.0.tgz#bc08d1eb5cedf7ccb797a96199d41c7bc3e60d30" + integrity sha512-KRs7WVDKg86PWiuAqhDrAQnTXZKraVcCc6vFdL14qrZ/DcWwuRo7VoiYXalXO7S5GKpqYiVEwCbgFDfxNHKJBQ== + +concat-map@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" + integrity sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg== + cose-base@^1.0.0: version "1.0.3" resolved "https://registry.yarnpkg.com/cose-base/-/cose-base-1.0.3.tgz#650334b41b869578a543358b80cda7e0abe0a60a" @@ -324,7 +584,7 @@ d3-zoom@3: d3-selection "2 - 3" d3-transition "2 - 3" -d3@^7.0.0, d3@^7.8.2: +d3@^7.4.0, d3@^7.8.2: version "7.8.2" resolved "https://registry.yarnpkg.com/d3/-/d3-7.8.2.tgz#2bdb3c178d095ae03b107a18837ae049838e372d" integrity sha512-WXty7qOGSHb7HR7CfOzwN1Gw04MUOzN8qh9ZUsvwycIMb4DYMpY9xczZ6jUorGtO6bR9BPMPaueIKwiDxu9uiQ== @@ -368,6 +628,13 @@ dagre-d3-es@7.0.8: d3 "^7.8.2" lodash-es "^4.17.21" +debug@^4.3.4: + version "4.3.4" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865" + integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ== + dependencies: + ms "2.1.2" + delaunator@5: version "5.0.0" resolved "https://registry.yarnpkg.com/delaunator/-/delaunator-5.0.0.tgz#60f052b28bd91c9b4566850ebf7756efe821d81b" @@ -375,6 +642,11 @@ delaunator@5: dependencies: robust-predicates "^3.0.0" +deprecation@^2.0.0, deprecation@^2.3.1: + version "2.3.1" + resolved "https://registry.yarnpkg.com/deprecation/-/deprecation-2.3.1.tgz#6368cbdb40abf3373b525ac87e4a260c3a700919" + integrity sha512-xmHIy4F3scKVwMsQ4WnVaS8bHOx0DmVwRywosKhaILI0ywMDWPtBSku2HNxRvF7jtwDRsoEwYQSfbxj8b7RlJQ== + dompurify@2.4.3: version "2.4.3" resolved "https://registry.yarnpkg.com/dompurify/-/dompurify-2.4.3.tgz#f4133af0e6a50297fc8874e2eaedc13a3c308c03" @@ -392,131 +664,38 @@ end-of-stream@^1.4.1: dependencies: once "^1.4.0" -esbuild-android-64@0.14.39: - version "0.14.39" - resolved "https://registry.yarnpkg.com/esbuild-android-64/-/esbuild-android-64-0.14.39.tgz#09f12a372eed9743fd77ff6d889ac14f7b340c21" - integrity sha512-EJOu04p9WgZk0UoKTqLId9VnIsotmI/Z98EXrKURGb3LPNunkeffqQIkjS2cAvidh+OK5uVrXaIP229zK6GvhQ== - -esbuild-android-arm64@0.14.39: - version "0.14.39" - resolved "https://registry.yarnpkg.com/esbuild-android-arm64/-/esbuild-android-arm64-0.14.39.tgz#f608d00ea03fe26f3b1ab92a30f99220390f3071" - integrity sha512-+twajJqO7n3MrCz9e+2lVOnFplRsaGRwsq1KL/uOy7xK7QdRSprRQcObGDeDZUZsacD5gUkk6OiHiYp6RzU3CA== - -esbuild-darwin-64@0.14.39: - version "0.14.39" - resolved "https://registry.yarnpkg.com/esbuild-darwin-64/-/esbuild-darwin-64-0.14.39.tgz#31528daa75b4c9317721ede344195163fae3e041" - integrity sha512-ImT6eUw3kcGcHoUxEcdBpi6LfTRWaV6+qf32iYYAfwOeV+XaQ/Xp5XQIBiijLeo+LpGci9M0FVec09nUw41a5g== - -esbuild-darwin-arm64@0.14.39: - version "0.14.39" - resolved "https://registry.yarnpkg.com/esbuild-darwin-arm64/-/esbuild-darwin-arm64-0.14.39.tgz#247f770d86d90a215fa194f24f90e30a0bd97245" - integrity sha512-/fcQ5UhE05OiT+bW5v7/up1bDsnvaRZPJxXwzXsMRrr7rZqPa85vayrD723oWMT64dhrgWeA3FIneF8yER0XTw== - -esbuild-freebsd-64@0.14.39: - version "0.14.39" - resolved "https://registry.yarnpkg.com/esbuild-freebsd-64/-/esbuild-freebsd-64-0.14.39.tgz#479414d294905055eb396ebe455ed42213284ee0" - integrity sha512-oMNH8lJI4wtgN5oxuFP7BQ22vgB/e3Tl5Woehcd6i2r6F3TszpCnNl8wo2d/KvyQ4zvLvCWAlRciumhQg88+kQ== - -esbuild-freebsd-arm64@0.14.39: - version "0.14.39" - resolved "https://registry.yarnpkg.com/esbuild-freebsd-arm64/-/esbuild-freebsd-arm64-0.14.39.tgz#cedeb10357c88533615921ae767a67dc870a474c" - integrity sha512-1GHK7kwk57ukY2yI4ILWKJXaxfr+8HcM/r/JKCGCPziIVlL+Wi7RbJ2OzMcTKZ1HpvEqCTBT/J6cO4ZEwW4Ypg== - -esbuild-linux-32@0.14.39: - version "0.14.39" - resolved "https://registry.yarnpkg.com/esbuild-linux-32/-/esbuild-linux-32-0.14.39.tgz#d9f008c4322d771f3958f59c1eee5a05cdf92485" - integrity sha512-g97Sbb6g4zfRLIxHgW2pc393DjnkTRMeq3N1rmjDUABxpx8SjocK4jLen+/mq55G46eE2TA0MkJ4R3SpKMu7dg== - -esbuild-linux-64@0.14.39: - version "0.14.39" - resolved "https://registry.yarnpkg.com/esbuild-linux-64/-/esbuild-linux-64-0.14.39.tgz#ba58d7f66858913aeb1ab5c6bde1bbd824731795" - integrity sha512-4tcgFDYWdI+UbNMGlua9u1Zhu0N5R6u9tl5WOM8aVnNX143JZoBZLpCuUr5lCKhnD0SCO+5gUyMfupGrHtfggQ== - -esbuild-linux-arm64@0.14.39: - version "0.14.39" - resolved "https://registry.yarnpkg.com/esbuild-linux-arm64/-/esbuild-linux-arm64-0.14.39.tgz#708785a30072702b5b1c16b65cf9c25c51202529" - integrity sha512-23pc8MlD2D6Px1mV8GMglZlKgwgNKAO8gsgsLLcXWSs9lQsCYkIlMo/2Ycfo5JrDIbLdwgP8D2vpfH2KcBqrDQ== - -esbuild-linux-arm@0.14.39: - version "0.14.39" - resolved "https://registry.yarnpkg.com/esbuild-linux-arm/-/esbuild-linux-arm-0.14.39.tgz#4e8b5deaa7ab60d0d28fab131244ef82b40684f4" - integrity sha512-t0Hn1kWVx5UpCzAJkKRfHeYOLyFnXwYynIkK54/h3tbMweGI7dj400D1k0Vvtj2u1P+JTRT9tx3AjtLEMmfVBQ== - -esbuild-linux-mips64le@0.14.39: - version "0.14.39" - resolved "https://registry.yarnpkg.com/esbuild-linux-mips64le/-/esbuild-linux-mips64le-0.14.39.tgz#6f3bf3023f711084e5a1e8190487d2020f39f0f7" - integrity sha512-epwlYgVdbmkuRr5n4es3B+yDI0I2e/nxhKejT9H0OLxFAlMkeQZxSpxATpDc9m8NqRci6Kwyb/SfmD1koG2Zuw== - -esbuild-linux-ppc64le@0.14.39: - version "0.14.39" - resolved "https://registry.yarnpkg.com/esbuild-linux-ppc64le/-/esbuild-linux-ppc64le-0.14.39.tgz#900e718a4ea3f6aedde8424828eeefdd4b48d4b9" - integrity sha512-W/5ezaq+rQiQBThIjLMNjsuhPHg+ApVAdTz2LvcuesZFMsJoQAW2hutoyg47XxpWi7aEjJGrkS26qCJKhRn3QQ== - -esbuild-linux-riscv64@0.14.39: - version "0.14.39" - resolved "https://registry.yarnpkg.com/esbuild-linux-riscv64/-/esbuild-linux-riscv64-0.14.39.tgz#dcbff622fa37047a75d2ff7a1d8d2949d80277e4" - integrity sha512-IS48xeokcCTKeQIOke2O0t9t14HPvwnZcy+5baG13Z1wxs9ZrC5ig5ypEQQh4QMKxURD5TpCLHw2W42CLuVZaA== - -esbuild-linux-s390x@0.14.39: - version "0.14.39" - resolved "https://registry.yarnpkg.com/esbuild-linux-s390x/-/esbuild-linux-s390x-0.14.39.tgz#3f725a7945b419406c99d93744b28552561dcdfd" - integrity sha512-zEfunpqR8sMomqXhNTFEKDs+ik7HC01m3M60MsEjZOqaywHu5e5682fMsqOlZbesEAAaO9aAtRBsU7CHnSZWyA== - -esbuild-netbsd-64@0.14.39: - version "0.14.39" - resolved "https://registry.yarnpkg.com/esbuild-netbsd-64/-/esbuild-netbsd-64-0.14.39.tgz#e10e40b6a765798b90d4eb85901cc85c8b7ff85e" - integrity sha512-Uo2suJBSIlrZCe4E0k75VDIFJWfZy+bOV6ih3T4MVMRJh1lHJ2UyGoaX4bOxomYN3t+IakHPyEoln1+qJ1qYaA== - -esbuild-openbsd-64@0.14.39: - version "0.14.39" - resolved "https://registry.yarnpkg.com/esbuild-openbsd-64/-/esbuild-openbsd-64-0.14.39.tgz#935ec143f75ce10bd9cdb1c87fee00287eb0edbc" - integrity sha512-secQU+EpgUPpYjJe3OecoeGKVvRMLeKUxSMGHnK+aK5uQM3n1FPXNJzyz1LHFOo0WOyw+uoCxBYdM4O10oaCAA== - -esbuild-sunos-64@0.14.39: - version "0.14.39" - resolved "https://registry.yarnpkg.com/esbuild-sunos-64/-/esbuild-sunos-64-0.14.39.tgz#0e7aa82b022a2e6d55b0646738b2582c2d72c3c0" - integrity sha512-qHq0t5gePEDm2nqZLb+35p/qkaXVS7oIe32R0ECh2HOdiXXkj/1uQI9IRogGqKkK+QjDG+DhwiUw7QoHur/Rwg== - -esbuild-windows-32@0.14.39: - version "0.14.39" - resolved "https://registry.yarnpkg.com/esbuild-windows-32/-/esbuild-windows-32-0.14.39.tgz#3f1538241f31b538545f4b5841b248cac260fa35" - integrity sha512-XPjwp2OgtEX0JnOlTgT6E5txbRp6Uw54Isorm3CwOtloJazeIWXuiwK0ONJBVb/CGbiCpS7iP2UahGgd2p1x+Q== - -esbuild-windows-64@0.14.39: - version "0.14.39" - resolved "https://registry.yarnpkg.com/esbuild-windows-64/-/esbuild-windows-64-0.14.39.tgz#b100c59f96d3c2da2e796e42fee4900d755d3e03" - integrity sha512-E2wm+5FwCcLpKsBHRw28bSYQw0Ikxb7zIMxw3OPAkiaQhLVr3dnVO8DofmbWhhf6b97bWzg37iSZ45ZDpLw7Ow== - -esbuild-windows-arm64@0.14.39: - version "0.14.39" - resolved "https://registry.yarnpkg.com/esbuild-windows-arm64/-/esbuild-windows-arm64-0.14.39.tgz#00268517e665b33c89778d61f144e4256b39f631" - integrity sha512-sBZQz5D+Gd0EQ09tZRnz/PpVdLwvp/ufMtJ1iDFYddDaPpZXKqPyaxfYBLs3ueiaksQ26GGa7sci0OqFzNs7KA== - -esbuild@^0.14.39: - version "0.14.39" - resolved "https://registry.yarnpkg.com/esbuild/-/esbuild-0.14.39.tgz#c926b2259fe6f6d3a94f528fb42e103c5a6d909a" - integrity sha512-2kKujuzvRWYtwvNjYDY444LQIA3TyJhJIX3Yo4+qkFlDDtGlSicWgeHVJqMUP/2sSfH10PGwfsj+O2ro1m10xQ== +esbuild@^0.17.10: + version "0.17.10" + resolved "https://registry.yarnpkg.com/esbuild/-/esbuild-0.17.10.tgz#3be050561b34c5dc05b46978f4e1f326d5cc9437" + integrity sha512-n7V3v29IuZy5qgxx25TKJrEm0FHghAlS6QweUcyIgh/U0zYmQcvogWROitrTyZId1mHSkuhhuyEXtI9OXioq7A== optionalDependencies: - esbuild-android-64 "0.14.39" - esbuild-android-arm64 "0.14.39" - esbuild-darwin-64 "0.14.39" - esbuild-darwin-arm64 "0.14.39" - esbuild-freebsd-64 "0.14.39" - esbuild-freebsd-arm64 "0.14.39" - esbuild-linux-32 "0.14.39" - esbuild-linux-64 "0.14.39" - esbuild-linux-arm "0.14.39" - esbuild-linux-arm64 "0.14.39" - esbuild-linux-mips64le "0.14.39" - esbuild-linux-ppc64le "0.14.39" - esbuild-linux-riscv64 "0.14.39" - esbuild-linux-s390x "0.14.39" - esbuild-netbsd-64 "0.14.39" - esbuild-openbsd-64 "0.14.39" - esbuild-sunos-64 "0.14.39" - esbuild-windows-32 "0.14.39" - esbuild-windows-64 "0.14.39" - esbuild-windows-arm64 "0.14.39" + "@esbuild/android-arm" "0.17.10" + "@esbuild/android-arm64" "0.17.10" + "@esbuild/android-x64" "0.17.10" + "@esbuild/darwin-arm64" "0.17.10" + "@esbuild/darwin-x64" "0.17.10" + "@esbuild/freebsd-arm64" "0.17.10" + "@esbuild/freebsd-x64" "0.17.10" + "@esbuild/linux-arm" "0.17.10" + "@esbuild/linux-arm64" "0.17.10" + "@esbuild/linux-ia32" "0.17.10" + "@esbuild/linux-loong64" "0.17.10" + "@esbuild/linux-mips64el" "0.17.10" + "@esbuild/linux-ppc64" "0.17.10" + "@esbuild/linux-riscv64" "0.17.10" + "@esbuild/linux-s390x" "0.17.10" + "@esbuild/linux-x64" "0.17.10" + "@esbuild/netbsd-x64" "0.17.10" + "@esbuild/openbsd-x64" "0.17.10" + "@esbuild/sunos-x64" "0.17.10" + "@esbuild/win32-arm64" "0.17.10" + "@esbuild/win32-ia32" "0.17.10" + "@esbuild/win32-x64" "0.17.10" + +escape-string-regexp@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz#14ba83a5d373e3d311e5afca29cf5bfad965bf34" + integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA== fast-extend@1.0.2: version "1.0.2" @@ -533,6 +712,35 @@ fs-monkey@0.3.3: resolved "https://registry.yarnpkg.com/fs-monkey/-/fs-monkey-0.3.3.tgz#7960bb2b1fa2653731b9d0e2e84812a7e8b3664a" integrity sha512-FNUvuTAJ3CqCQb5ELn+qCbGR/Zllhf2HtwsdAtBi59s1WeCjKMT81fHcSu7dwIskqGVK+MmOrb7VOBlq3/SItw== +fs.realpath@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" + integrity sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw== + +function-bind@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d" + integrity sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A== + +glob@^7.0.0: + version "7.2.3" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.3.tgz#b8df0fb802bbfa8e89bd1d938b4e16578ed44f2b" + integrity sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q== + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^3.1.1" + once "^1.3.0" + path-is-absolute "^1.0.0" + +has@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/has/-/has-1.0.3.tgz#722d7cbfc1f6aa8241f16dd814e011e1f41e8796" + integrity sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw== + dependencies: + function-bind "^1.1.1" + heap@^0.2.6: version "0.2.7" resolved "https://registry.yarnpkg.com/heap/-/heap-0.2.7.tgz#1e6adf711d3f27ce35a81fe3b7bd576c2260a8fc" @@ -550,7 +758,15 @@ ieee754@^1.1.13: resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.2.1.tgz#8eb7a10a63fff25d15a57b001586d177d1b0d352" integrity sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA== -inherits@^2.0.3, inherits@^2.0.4: +inflight@^1.0.4: + version "1.0.6" + resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" + integrity sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA== + dependencies: + once "^1.3.0" + wrappy "1" + +inherits@2, inherits@^2.0.3, inherits@^2.0.4: version "2.0.4" resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== @@ -560,6 +776,23 @@ inherits@^2.0.3, inherits@^2.0.4: resolved "https://registry.yarnpkg.com/internmap/-/internmap-2.0.3.tgz#6685f23755e43c524e251d29cbc97248e3061009" integrity sha512-5Hh7Y1wQbvY5ooGgPbDaL5iYLAPzMTUrjMulskHLH6wnv/A+1q5rgEaiuqEjB+oxGXIVZs1FF+R/KPN3ZSQYYg== +interpret@^1.0.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.4.0.tgz#665ab8bc4da27a774a40584e812e3e0fa45b1a1e" + integrity sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA== + +is-core-module@^2.9.0: + version "2.11.0" + resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.11.0.tgz#ad4cb3e3863e814523c96f3f58d26cc570ff0144" + integrity sha512-RRjxlvLDkD1YJwDbroBHMb+cukurkDWNyHx7D3oNB5x9rb5ogcksMC5wHCadcXoo67gVr/+3GFySh3134zi6rw== + dependencies: + has "^1.0.3" + +is-plain-object@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/is-plain-object/-/is-plain-object-5.0.0.tgz#4427f50ab3429e9025ea7d52e9043a9ef4159344" + integrity sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q== + khroma@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/khroma/-/khroma-2.0.0.tgz#7577de98aed9f36c7a474c4d453d94c0d6c6588b" @@ -585,6 +818,13 @@ lodash@^4.17.21: resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== +matcher@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/matcher/-/matcher-4.0.0.tgz#a42a05a09aaed92e2d241eb91fddac689461ea51" + integrity sha512-S6x5wmcDmsDRRU/c2dkccDwQPXoFczc5+HpQ2lON8pnvHlnvHAHj5WlLVvw6n6vNyHuVugYrFohYxbS+pvFpKQ== + dependencies: + escape-string-regexp "^4.0.0" + memfs@3.0.4: version "3.0.4" resolved "https://registry.yarnpkg.com/memfs/-/memfs-3.0.4.tgz#17997ec34d67d0a4756f6a34f2fefd13a8dbab08" @@ -593,46 +833,70 @@ memfs@3.0.4: fast-extend "1.0.2" fs-monkey "0.3.3" -mermaid@^9.4.0: - version "9.4.0" - resolved "https://registry.yarnpkg.com/mermaid/-/mermaid-9.4.0.tgz#ff9afcac9f565a358fa8fc39135dec2c842c3b8f" - integrity sha512-4PWbOND7CNRbjHrdG3WUUGBreKAFVnMhdlPjttuUkeHbCQmAHkwzSh5dGwbrKmXGRaR4uTvfFVYzUcg++h0DkA== +mermaid@^10.0.0: + version "10.0.0" + resolved "https://registry.yarnpkg.com/mermaid/-/mermaid-10.0.0.tgz#6f7ae2eda0ab221089dc1eb166938203f2a7b04d" + integrity sha512-syS1qyYCd3EPXCVSpYtefY4D9z9WZAK8hFgjeHR9PAtanybLO162Tu7o5i/nZkqRrJq0Rk8RqskQlhBPgT8eBw== dependencies: "@braintree/sanitize-url" "^6.0.0" cytoscape "^3.23.0" cytoscape-cose-bilkent "^4.1.0" cytoscape-fcose "^2.1.0" - d3 "^7.0.0" + d3 "^7.4.0" dagre-d3-es "7.0.8" dompurify "2.4.3" elkjs "^0.8.2" khroma "^2.0.0" lodash-es "^4.17.21" - moment "^2.29.4" + moment-mini "^2.29.4" non-layered-tidy-tree-layout "^2.0.2" stylis "^4.1.2" ts-dedent "^2.2.0" uuid "^9.0.0" + web-worker "^1.2.0" -moment@^2.29.4: +minimatch@^3.1.1: + version "3.1.2" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b" + integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw== + dependencies: + brace-expansion "^1.1.7" + +moment-mini@^2.29.4: version "2.29.4" - resolved "https://registry.yarnpkg.com/moment/-/moment-2.29.4.tgz#3dbe052889fe7c1b2ed966fcb3a77328964ef108" - integrity sha512-5LC9SOxjSc2HF6vO2CyuTDNivEdoz2IvyJJGj6X8DJ0eFyfszE0QiEd+iXmBvUP3WHxSjFH/vIsA0EN00cgr8w== + resolved "https://registry.yarnpkg.com/moment-mini/-/moment-mini-2.29.4.tgz#cbbcdc58ce1b267506f28ea6668dbe060a32758f" + integrity sha512-uhXpYwHFeiTbY9KSgPPRoo1nt8OxNVdMVoTBYHfSEKeRkIkwGpO+gERmhuhBtzfaeOyTkykSrm2+noJBgqt3Hg== + +monaco-editor@^0.36.0: + version "0.36.0" + resolved "https://registry.yarnpkg.com/monaco-editor/-/monaco-editor-0.36.0.tgz#8e7dba92f8110b369fdbc2312366184216419fc7" + integrity sha512-1Pn3AatfK88flUigyBozA4mt8+SB5xlgloQDu1RqivARw9yKaml/jceIvndae7Z2Nq8T7xZccFlmH+n6rkFg6g== + dependencies: + "@types/shelljs" "^0.8.11" + pin-github-action "^1.8.0" + shelljs "^0.8.5" + +ms@2.1.2: + version "2.1.2" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" + integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== -monaco-editor@^0.33.0: - version "0.33.0" - resolved "https://registry.yarnpkg.com/monaco-editor/-/monaco-editor-0.33.0.tgz#842e244f3750a2482f8a29c676b5684e75ff34af" - integrity sha512-VcRWPSLIUEgQJQIE0pVT8FcGBIgFoxz7jtqctE+IiCxWugD0DwgyQBcZBhdSrdMC84eumoqMZsGl2GTreOzwqw== +node-fetch@^2.6.7: + version "2.6.9" + resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.9.tgz#7c7f744b5cc6eb5fd404e0c7a9fec630a55657e6" + integrity sha512-DJm/CJkZkRjKKj4Zi4BsKVZh3ValV5IR5s7LVZnW+6YMh0W1BfNA8XSs6DLMGYlId5F3KnA70uu2qepcR08Qqg== + dependencies: + whatwg-url "^5.0.0" non-layered-tidy-tree-layout@^2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/non-layered-tidy-tree-layout/-/non-layered-tidy-tree-layout-2.0.2.tgz#57d35d13c356643fc296a55fb11ac15e74da7804" integrity sha512-gkXMxRzUH+PB0ax9dUN0yYF0S25BqeAYqhgMaLUFmpXLEk7Fcu8f4emJuOAY0V8kjDICxROIKsTAKsV/v355xw== -once@^1.4.0: +once@^1.3.0, once@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" - integrity sha1-WDsap3WWHUsROsF9nFC6753Xa9E= + integrity sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w== dependencies: wrappy "1" @@ -646,6 +910,27 @@ path-browserify@^1.0.0, path-browserify@^1.0.1: resolved "https://registry.yarnpkg.com/path-browserify/-/path-browserify-1.0.1.tgz#d98454a9c3753d5790860f16f68867b9e46be1fd" integrity sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g== +path-is-absolute@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" + integrity sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg== + +path-parse@^1.0.7: + version "1.0.7" + resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.7.tgz#fbc114b60ca42b30d9daf5858e4bd68bbedb6735" + integrity sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw== + +pin-github-action@^1.8.0: + version "1.8.0" + resolved "https://registry.yarnpkg.com/pin-github-action/-/pin-github-action-1.8.0.tgz#50f0833e6af5bbba2bbfc978ca5e498b5670b9d8" + integrity sha512-8QMKGbDUmMLFSyeV7hDIVmlI8B3ThJed1uFYuhcCBLi/w8xHPbrPhnCvJndYdugNc8aj1FrijrOMDLQ93ATc7A== + dependencies: + "@octokit/rest" "^18" + commander "^9" + debug "^4.3.4" + matcher "^4.0.0" + yaml "^2.1.3" + randombytes@^2.0.5: version "2.1.0" resolved "https://registry.yarnpkg.com/randombytes/-/randombytes-2.1.0.tgz#df6f84372f0270dc65cdf6291349ab7a473d4f2a" @@ -662,23 +947,39 @@ randomfill@^1.0.4: safe-buffer "^5.1.0" readable-stream@^3.1.1, readable-stream@^3.4.0: - version "3.6.0" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.6.0.tgz#337bbda3adc0706bd3e024426a286d4b4b2c9198" - integrity sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA== + version "3.6.1" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.6.1.tgz#f9f9b5f536920253b3d26e7660e7da4ccff9bb62" + integrity sha512-+rQmrWMYGA90yenhTYsLWAsLsqVC8osOw6PKE1HDYiO0gdPeKe/xDHNzIAIn4C91YQ6oenEhfYqqc1883qHbjQ== dependencies: inherits "^2.0.3" string_decoder "^1.1.1" util-deprecate "^1.0.1" +rechoir@^0.6.2: + version "0.6.2" + resolved "https://registry.yarnpkg.com/rechoir/-/rechoir-0.6.2.tgz#85204b54dba82d5742e28c96756ef43af50e3384" + integrity sha512-HFM8rkZ+i3zrV+4LQjwQ0W+ez98pApMGM3HUrN04j3CqzPOzl9nmP15Y8YXNm8QHGv/eacOVEjqhmWpkRV0NAw== + dependencies: + resolve "^1.1.6" + +resolve@^1.1.6: + version "1.22.1" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.1.tgz#27cb2ebb53f91abb49470a928bba7558066ac177" + integrity sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw== + dependencies: + is-core-module "^2.9.0" + path-parse "^1.0.7" + supports-preserve-symlinks-flag "^1.0.0" + robust-predicates@^3.0.0: version "3.0.1" resolved "https://registry.yarnpkg.com/robust-predicates/-/robust-predicates-3.0.1.tgz#ecde075044f7f30118682bd9fb3f123109577f9a" integrity sha512-ndEIpszUHiG4HtDsQLeIuMvRsDnn8c8rYStabochtUeCvfuvNptb5TUbVD68LRAILPX7p9nqQGh4xJgn3EHS/g== -ruby-head-wasm-wasi@^0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/ruby-head-wasm-wasi/-/ruby-head-wasm-wasi-0.3.0.tgz#fcf9f07e34f8a48944bd5072ce92aebcce61f31a" - integrity sha512-6EiZxeGZs8V7qPP7JhLxsg7e/Vmy3O4upQs8PcvMesXuH5r0XV0DIN6QII7Gd/5ot39tLL5VqAbi0zSefjaa7Q== +ruby-head-wasm-wasi@^0.6.0: + version "0.6.0" + resolved "https://registry.yarnpkg.com/ruby-head-wasm-wasi/-/ruby-head-wasm-wasi-0.6.0.tgz#6ecf838782e4d8c2cf9e93c7efd949a01d62967c" + integrity sha512-GkzMPZxDm8YGdCn/u9GXNfkwDIkSTXAUm45FoC/zZdADBWA3Z93ivHGPcv6tVsISP3mNda47nWUtJWZjjTl4ng== rw@1: version "1.3.3" @@ -695,6 +996,15 @@ safe-buffer@^5.1.0, safe-buffer@~5.2.0: resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== +shelljs@^0.8.5: + version "0.8.5" + resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.8.5.tgz#de055408d8361bed66c669d2f000538ced8ee20c" + integrity sha512-TiwcRcrkhHvbrZbnRcFYMLl30Dfov3HKqzp5tO5b4pt6G/SezKcYhmDg15zXVBswHmctSAQKznqNW2LO5tTDow== + dependencies: + glob "^7.0.0" + interpret "^1.0.0" + rechoir "^0.6.2" + state-local@^1.0.6: version "1.0.7" resolved "https://registry.yarnpkg.com/state-local/-/state-local-1.0.7.tgz#da50211d07f05748d53009bee46307a37db386d5" @@ -712,6 +1022,11 @@ stylis@^4.1.2: resolved "https://registry.yarnpkg.com/stylis/-/stylis-4.1.3.tgz#fd2fbe79f5fed17c55269e16ed8da14c84d069f7" integrity sha512-GP6WDNWf+o403jrEp9c5jibKavrtLW+/qYGhFxFrG8maXhwTBI7gLLhiBb0o7uFccWN+EOS9aMO6cGHWAO07OA== +supports-preserve-symlinks-flag@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz#6eda4bd344a3c94aea376d4cc31bc77311039e09" + integrity sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w== + tar-stream@^2.1.0: version "2.2.0" resolved "https://registry.yarnpkg.com/tar-stream/-/tar-stream-2.2.0.tgz#acad84c284136b060dc3faa64474aa9aebd77287" @@ -723,22 +1038,55 @@ tar-stream@^2.1.0: inherits "^2.0.3" readable-stream "^3.1.1" +tr46@~0.0.3: + version "0.0.3" + resolved "https://registry.yarnpkg.com/tr46/-/tr46-0.0.3.tgz#8184fd347dac9cdc185992f3a6622e14b9d9ab6a" + integrity sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw== + ts-dedent@^2.2.0: version "2.2.0" resolved "https://registry.yarnpkg.com/ts-dedent/-/ts-dedent-2.2.0.tgz#39e4bd297cd036292ae2394eb3412be63f563bb5" integrity sha512-q5W7tVM71e2xjHZTlgfTDoPF/SmqKG5hddq9SzR49CH2hayqRKJtQ4mtRlSxKaJlR/+9rEM+mnBHf7I2/BQcpQ== +universal-user-agent@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/universal-user-agent/-/universal-user-agent-6.0.0.tgz#3381f8503b251c0d9cd21bc1de939ec9df5480ee" + integrity sha512-isyNax3wXoKaulPDZWHQqbmIx1k2tb9fb3GGDBRxCscfYV2Ch7WxPArBsFEG8s/safwXTT7H4QGhaIkTp9447w== + util-deprecate@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" - integrity sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8= + integrity sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw== uuid@^9.0.0: version "9.0.0" resolved "https://registry.yarnpkg.com/uuid/-/uuid-9.0.0.tgz#592f550650024a38ceb0c562f2f6aa435761efb5" integrity sha512-MXcSTerfPa4uqyzStbRoTgt5XIe3x5+42+q1sDuy3R5MDk66URdLMOZe5aPX/SQd+kuYAh0FdP/pO28IkQyTeg== +web-worker@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/web-worker/-/web-worker-1.2.0.tgz#5d85a04a7fbc1e7db58f66595d7a3ac7c9c180da" + integrity sha512-PgF341avzqyx60neE9DD+XS26MMNMoUQRz9NOZwW32nPQrF6p77f1htcnjBSEV8BGMKZ16choqUG4hyI0Hx7mA== + +webidl-conversions@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-3.0.1.tgz#24534275e2a7bc6be7bc86611cc16ae0a5654871" + integrity sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ== + +whatwg-url@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-5.0.0.tgz#966454e8765462e37644d3626f6742ce8b70965d" + integrity sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw== + dependencies: + tr46 "~0.0.3" + webidl-conversions "^3.0.0" + wrappy@1: version "1.0.2" resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" - integrity sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8= + integrity sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ== + +yaml@^2.1.3: + version "2.2.1" + resolved "https://registry.yarnpkg.com/yaml/-/yaml-2.2.1.tgz#3014bf0482dcd15147aa8e56109ce8632cd60ce4" + integrity sha512-e0WHiYql7+9wr4cWMx3TVQrNwejKaEe7/rHNmQmqRjazfOP5W8PB6Jpebb5o6fIapbz9o9+2ipcaTM2ZwDI6lw== From 7b39ea100a0b156511dab0956eb0c9739059fdce Mon Sep 17 00:00:00 2001 From: Kevin Newton Date: Sat, 25 Feb 2023 15:12:20 -0500 Subject: [PATCH 2/5] Strip out typescript --- bin/{build.mjs => build.js} | 4 +-- bin/{serve.mjs => serve.js} | 4 +-- bin/{wasmPlugin.mjs => wasmPlugin.js} | 0 package.json | 7 ++--- src/{createRuby.ts => createRuby.js} | 25 ++++++----------- src/{index.ts => index.js} | 35 +++++++++++------------- src/{mermaid-js.ts => mermaid.js} | 6 ++-- src/{monacoLoader.ts => monacoLoader.js} | 0 tsconfig.json | 13 --------- yarn.lock | 7 +---- 10 files changed, 34 insertions(+), 67 deletions(-) rename bin/{build.mjs => build.js} (77%) rename bin/{serve.mjs => serve.js} (77%) rename bin/{wasmPlugin.mjs => wasmPlugin.js} (100%) rename src/{createRuby.ts => createRuby.js} (75%) rename src/{index.ts => index.js} (71%) rename src/{mermaid-js.ts => mermaid.js} (89%) rename src/{monacoLoader.ts => monacoLoader.js} (100%) delete mode 100644 tsconfig.json diff --git a/bin/build.mjs b/bin/build.js similarity index 77% rename from bin/build.mjs rename to bin/build.js index 045e4a9..ffcf388 100644 --- a/bin/build.mjs +++ b/bin/build.js @@ -1,8 +1,8 @@ import esbuild from "esbuild"; import url from "url"; -import wasmPlugin from "./wasmPlugin.mjs"; +import wasmPlugin from "./wasmPlugin.js"; -const entryPoint = url.fileURLToPath(new URL("../src/index.ts", import.meta.url)); +const entryPoint = url.fileURLToPath(new URL("../src/index", import.meta.url)); const outdir = url.fileURLToPath(new URL("../docs", import.meta.url)); const { metafile } = await esbuild.build({ diff --git a/bin/serve.mjs b/bin/serve.js similarity index 77% rename from bin/serve.mjs rename to bin/serve.js index b194e34..39a72e7 100644 --- a/bin/serve.mjs +++ b/bin/serve.js @@ -1,8 +1,8 @@ import esbuild from "esbuild"; import url from "url"; -import wasmPlugin from "./wasmPlugin.mjs"; +import wasmPlugin from "./wasmPlugin.js"; -const entryPoint = url.fileURLToPath(new URL("../src/index.ts", import.meta.url)); +const entryPoint = url.fileURLToPath(new URL("../src/index", import.meta.url)); const outdir = url.fileURLToPath(new URL("../docs", import.meta.url)); const ctx = await esbuild.context({ diff --git a/bin/wasmPlugin.mjs b/bin/wasmPlugin.js similarity index 100% rename from bin/wasmPlugin.mjs rename to bin/wasmPlugin.js diff --git a/package.json b/package.json index 7b18e05..4fd62a6 100644 --- a/package.json +++ b/package.json @@ -1,8 +1,9 @@ { "license": "MIT", + "type": "module", "scripts": { - "build": "node bin/build.mjs", - "serve": "node bin/serve.mjs" + "build": "node bin/build.js", + "serve": "node bin/serve.js" }, "dependencies": { "@monaco-editor/loader": "^1.3.2", @@ -13,8 +14,6 @@ "ruby-head-wasm-wasi": "^0.6.0" }, "devDependencies": { - "@types/node": "^18.14.1", - "@types/path-browserify": "^1.0.0", "esbuild": "^0.17.10", "monaco-editor": "^0.36.0" } diff --git a/src/createRuby.ts b/src/createRuby.js similarity index 75% rename from src/createRuby.ts rename to src/createRuby.js index 165110c..6c2f7c8 100644 --- a/src/createRuby.ts +++ b/src/createRuby.js @@ -1,12 +1,8 @@ -import { WASI } from "@wasmer/wasi"; -import { WasmFs } from "@wasmer/wasmfs"; -import path from "path-browserify"; -import { DefaultRubyVM } from "ruby-head-wasm-wasi/dist/browser.esm.js"; - -import load from "./app.wasm"; +import { DefaultRubyVM } from "ruby-head-wasm-wasi/dist/browser.esm"; +import app from "./app.wasm"; export default async function createRuby() { - const { vm } = await DefaultRubyVM(await load()) + const { vm } = await DefaultRubyVM(await app()); // Once our virtual machine is booted, we're going to require the necessary // files to make it work. I'm not sure why I need to explicitly require @@ -23,24 +19,21 @@ export default async function createRuby() { return { // A function that disassembles the YARV instructions for the given source. - disasm(source: string) { + disasm(source) { const jsonSource = JSON.stringify(JSON.stringify(source)); const rubySource = `RubyVM::InstructionSequence.compile(JSON.parse(${jsonSource})).disasm`; return vm.eval(rubySource).toString(); }, - mermaid(source: string) { + mermaid(source) { const jsonSource = JSON.stringify(JSON.stringify(source)); - const rubySource = ` - source = JSON.parse(${jsonSource}) - SyntaxTree.parse(source).to_mermaid - `; + const rubySource = `SyntaxTree.parse(JSON.parse(${jsonSource})).to_mermaid`; return vm.eval(rubySource).toString(); }, // A function that calls through to the SyntaxTree.format function to get // the pretty-printed version of the source. - format(source: string) { + format(source) { const jsonSource = JSON.stringify(JSON.stringify(source)); const rubySource = `SyntaxTree.format(JSON.parse(${jsonSource}))`; @@ -48,7 +41,7 @@ export default async function createRuby() { }, // A function that calls through to PP to get the pretty-printed version of // the syntax tree. - prettyPrint(source: string) { + prettyPrint(source) { const jsonSource = JSON.stringify(JSON.stringify(source)); const rubySource = `PP.pp(SyntaxTree.parse(JSON.parse(${jsonSource})), +"", 80)`; @@ -56,5 +49,3 @@ export default async function createRuby() { } }; }; - -export type Ruby = Awaited>; diff --git a/src/index.ts b/src/index.js similarity index 71% rename from src/index.ts rename to src/index.js index d20aa27..d88bf25 100644 --- a/src/index.ts +++ b/src/index.js @@ -1,15 +1,12 @@ import "./index.css"; -type SourceChangedEvent = { source: string }; -type DisplayChangedEvent = { kind: "prettyPrint" | "disasm" | "mermaid" }; - -Promise.all([ +await Promise.all([ // We're going to load the editor asynchronously so that we can get to // first-paint faster. This works out nicely since we can use a textarea until // this chunk is loaded. import("./monacoLoader").then(async ({ default: loader }) => { const monaco = await loader.init(); - const editor = document.getElementById("editor") as HTMLTextAreaElement; + const editor = document.getElementById("editor"); const newEditor = document.createElement("div"); editor.replaceWith(newEditor); @@ -21,15 +18,15 @@ Promise.all([ } }); }), - import("./mermaid-js"), + import("./mermaid"), // We're going to load the Ruby VM chunk asynchronously because it is pretty // dang huge (> 40Mb). In the meantime the textarea that is holding the place // of the actual functional one is just going to display "Loading...". import("./createRuby").then(({ default: createRuby }) => createRuby()) -]).then(([editor, mermaidjs, ruby]) => { +]).then(([editor, mermaid, ruby]) => { // First, grab a reference to the output element so that we can update it. // Then, set it initially to the output represented by the source. - const output = document.getElementById("output") as HTMLTextAreaElement; + const output = document.getElementById("output"); output.value = ruby.prettyPrint(editor.getValue()); output.disabled = false; @@ -38,14 +35,14 @@ Promise.all([ let displayFunction = ruby.prettyPrint; // Handle a custom event here for if the display option changed. - output.addEventListener("display-changed", (event: CustomEvent) => { + output.addEventListener("display-changed", (event) => { displayFunction = ruby[event.detail.kind]; try { let source = displayFunction(editor.getValue()); if (event.detail.kind === 'mermaid') { - mermaidjs.render(() => { + mermaid.render(() => { output.setAttribute("style", "display: none;"); return source; @@ -54,7 +51,7 @@ Promise.all([ output.value = source; output.setAttribute("style", ""); - mermaidjs.reset(); + mermaid.reset(); } } catch (error) { // For now, just ignoring the error. Eventually I'd like to make this mark @@ -66,33 +63,33 @@ Promise.all([ // event information. const toggles = document.getElementsByClassName("toggles")[0]; - toggles.querySelector("select").addEventListener('change', (e) => { - output.dispatchEvent(new CustomEvent("display-changed", { - detail: { kind: e.target.value as DisplayChangedEvent["kind"] } + toggles.querySelector("select").addEventListener('change', (event) => { + output.dispatchEvent(new CustomEvent("display-changed", { + detail: { kind: event.target.value } })); }); // We're going to handle updates to the source through a custom event. This // turns out to be faster than handling the change event directly on the // editor since it blocks updates to the UI until the event handled returns. - output.addEventListener("source-changed", (event: CustomEvent) => { + output.addEventListener("source-changed", (event) => { // We may want to add some throttle here to avoid to much rerendering in our Graph - output.dispatchEvent(new CustomEvent("display-changed", { - detail: { kind: toggles.querySelector('select').value as DisplayChangedEvent["kind"] } + output.dispatchEvent(new CustomEvent("display-changed", { + detail: { kind: toggles.querySelector('select').value } })); }); // Attach to the editor and dispatch custom source-changed events whenever the // value is updated in the editor. editor.onDidChangeModelContent(() => { - output.dispatchEvent(new CustomEvent("source-changed", { + output.dispatchEvent(new CustomEvent("source-changed", { detail: { source: editor.getValue() } })); }); // Attach to the format button to update the source whenever the button is // clicked. - const format = document.getElementById("format") as HTMLButtonElement; + const format = document.getElementById("format"); format.disabled = false; format.addEventListener("click", () => { diff --git a/src/mermaid-js.ts b/src/mermaid.js similarity index 89% rename from src/mermaid-js.ts rename to src/mermaid.js index 96aa9b6..a8c4ffd 100644 --- a/src/mermaid-js.ts +++ b/src/mermaid.js @@ -2,13 +2,11 @@ import mermaidjs from "mermaid"; const getCleanContainer = () => { const div = document.querySelector("#graph-container"); - - div.innerHTML = ''; - + div.innerHTML = ""; return div; } -const render = (fn: Function) => { +const render = (fn) => { let container = getCleanContainer(); container.setAttribute("style", "display: block;"); diff --git a/src/monacoLoader.ts b/src/monacoLoader.js similarity index 100% rename from src/monacoLoader.ts rename to src/monacoLoader.js diff --git a/tsconfig.json b/tsconfig.json deleted file mode 100644 index e9ac5ef..0000000 --- a/tsconfig.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "compilerOptions": { - "allowJs": true, - "allowSyntheticDefaultImports": true, - "downlevelIteration": true, - "jsx": "react", - "module": "es2020", - "moduleResolution": "node", - "noImplicitAny": true, - "target": "es5" - }, - "files": ["src/index.ts"] -} diff --git a/yarn.lock b/yarn.lock index cc57f88..6daedd6 100644 --- a/yarn.lock +++ b/yarn.lock @@ -238,16 +238,11 @@ resolved "https://registry.yarnpkg.com/@types/minimatch/-/minimatch-5.1.2.tgz#07508b45797cb81ec3f273011b054cd0755eddca" integrity sha512-K0VQKziLUWkVKiRVrx4a40iPaxTUefQmjtkQofBkYRcoaaL/8rhwDWww9qWbrgicNOgnpIsMxyNIUM4+n6dUIA== -"@types/node@*", "@types/node@^18.14.1": +"@types/node@*": version "18.14.1" resolved "https://registry.yarnpkg.com/@types/node/-/node-18.14.1.tgz#90dad8476f1e42797c49d6f8b69aaf9f876fc69f" integrity sha512-QH+37Qds3E0eDlReeboBxfHbX9omAcBCXEzswCu6jySP642jiM3cYSIkU/REqwhCUqXdonHFuBfJDiAJxMNhaQ== -"@types/path-browserify@^1.0.0": - version "1.0.0" - resolved "https://registry.yarnpkg.com/@types/path-browserify/-/path-browserify-1.0.0.tgz#294ec6e88b6b0d340a3897b7120e5b393f16690e" - integrity sha512-XMCcyhSvxcch8b7rZAtFAaierBYdeHXVvg2iYnxOV0MCQHmPuRRmGZPFDRzPayxcGiiSL1Te9UIO+f3cuj0tfw== - "@types/shelljs@^0.8.11": version "0.8.11" resolved "https://registry.yarnpkg.com/@types/shelljs/-/shelljs-0.8.11.tgz#17a5696c825974e96828e96e89585d685646fcb8" From cf055dfd8aa4c8761d6e5d99f49deea6a64170e4 Mon Sep 17 00:00:00 2001 From: Kevin Newton Date: Sat, 25 Feb 2023 15:19:27 -0500 Subject: [PATCH 3/5] Simplify even further --- package.json | 7 +-- src/index.js | 16 +++--- src/mermaid.js | 7 +-- yarn.lock | 150 +------------------------------------------------ 4 files changed, 13 insertions(+), 167 deletions(-) diff --git a/package.json b/package.json index 4fd62a6..045e28a 100644 --- a/package.json +++ b/package.json @@ -7,14 +7,11 @@ }, "dependencies": { "@monaco-editor/loader": "^1.3.2", - "@wasmer/wasi": "^0.12.0", - "@wasmer/wasmfs": "^0.12.0", "mermaid": "^10.0.0", - "path-browserify": "^1.0.1", + "monaco-editor": "^0.36.0", "ruby-head-wasm-wasi": "^0.6.0" }, "devDependencies": { - "esbuild": "^0.17.10", - "monaco-editor": "^0.36.0" + "esbuild": "^0.17.10" } } diff --git a/src/index.js b/src/index.js index d88bf25..c6caf31 100644 --- a/src/index.js +++ b/src/index.js @@ -41,12 +41,9 @@ await Promise.all([ try { let source = displayFunction(editor.getValue()); - if (event.detail.kind === 'mermaid') { - mermaid.render(() => { - output.setAttribute("style", "display: none;"); - - return source; - }); + if (event.detail.kind === "mermaid") { + output.setAttribute("style", "display: none;"); + mermaid.render(source); } else { output.value = source; output.setAttribute("style", ""); @@ -73,9 +70,10 @@ await Promise.all([ // turns out to be faster than handling the change event directly on the // editor since it blocks updates to the UI until the event handled returns. output.addEventListener("source-changed", (event) => { - // We may want to add some throttle here to avoid to much rerendering in our Graph + // We may want to add some throttle here to avoid to much rerendering in our + // graph. output.dispatchEvent(new CustomEvent("display-changed", { - detail: { kind: toggles.querySelector('select').value } + detail: { kind: toggles.querySelector("select").value } })); }); @@ -96,5 +94,5 @@ await Promise.all([ editor.setValue(ruby.format(editor.getValue())); }); - toggles.querySelector("select").removeAttribute('disabled'); + toggles.querySelector("select").removeAttribute("disabled"); }); diff --git a/src/mermaid.js b/src/mermaid.js index a8c4ffd..88ff8ff 100644 --- a/src/mermaid.js +++ b/src/mermaid.js @@ -6,15 +6,14 @@ const getCleanContainer = () => { return div; } -const render = (fn) => { +const render = async (source) => { let container = getCleanContainer(); container.setAttribute("style", "display: block;"); mermaidjs.initialize({ startOnLoad: false }); - mermaidjs.render('preparedScheme', fn(), (svg) => { - container.innerHTML = svg; - }, container); + const { svg } = await mermaidjs.render('preparedScheme', source); + container.innerHTML = svg; } const reset = () => getCleanContainer().setAttribute("style", "display: none;"); diff --git a/yarn.lock b/yarn.lock index 6daedd6..cf0d2ae 100644 --- a/yarn.lock +++ b/yarn.lock @@ -251,49 +251,16 @@ "@types/glob" "*" "@types/node" "*" -"@wasmer/wasi@^0.12.0": - version "0.12.0" - resolved "https://registry.yarnpkg.com/@wasmer/wasi/-/wasi-0.12.0.tgz#89c7c5e5ba58f7dfae4e323359346639c4ec382a" - integrity sha512-FJhLZKAfLWm/yjQI7eCRHNbA8ezmb7LSpUYFkHruZXs2mXk2+DaQtSElEtOoNrVQ4vApTyVaAd5/b7uEu8w6wQ== - dependencies: - browser-process-hrtime "^1.0.0" - buffer-es6 "^4.9.3" - path-browserify "^1.0.0" - randomfill "^1.0.4" - -"@wasmer/wasmfs@^0.12.0": - version "0.12.0" - resolved "https://registry.yarnpkg.com/@wasmer/wasmfs/-/wasmfs-0.12.0.tgz#7f2ad51b42b87316fac5df0b93256d1b7e567c1b" - integrity sha512-m1ftchyQ1DfSenm5XbbdGIpb6KJHH5z0gODo3IZr6lATkj4WXfX/UeBTZ0aG9YVShBp+kHLdUHvOkqjy6p/GWw== - dependencies: - memfs "3.0.4" - pako "^1.0.11" - tar-stream "^2.1.0" - balanced-match@^1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee" integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw== -base64-js@^1.3.1: - version "1.5.1" - resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.5.1.tgz#1b1b440160a5bf7ad40b650f095963481903930a" - integrity sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA== - before-after-hook@^2.2.0: version "2.2.3" resolved "https://registry.yarnpkg.com/before-after-hook/-/before-after-hook-2.2.3.tgz#c51e809c81a4e354084422b9b26bad88249c517c" integrity sha512-NzUnlZexiaH/46WDhANlyR2bXRopNg4F/zuSA3OpZnllCUgRaOF2znDioDWrmbNVsuZk6l9pMquQB38cfBZwkQ== -bl@^4.0.3: - version "4.1.0" - resolved "https://registry.yarnpkg.com/bl/-/bl-4.1.0.tgz#451535264182bec2fbbc83a62ab98cf11d9f7b3a" - integrity sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w== - dependencies: - buffer "^5.5.0" - inherits "^2.0.4" - readable-stream "^3.4.0" - brace-expansion@^1.1.7: version "1.1.11" resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" @@ -302,24 +269,6 @@ brace-expansion@^1.1.7: balanced-match "^1.0.0" concat-map "0.0.1" -browser-process-hrtime@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/browser-process-hrtime/-/browser-process-hrtime-1.0.0.tgz#3c9b4b7d782c8121e56f10106d84c0d0ffc94626" - integrity sha512-9o5UecI3GhkpM6DrXr69PblIuWxPKk9Y0jHBRhdocZ2y7YECBFCsHm79Pr3OyR2AvjhDkabFJaDJMYRazHgsow== - -buffer-es6@^4.9.3: - version "4.9.3" - resolved "https://registry.yarnpkg.com/buffer-es6/-/buffer-es6-4.9.3.tgz#f26347b82df76fd37e18bcb5288c4970cfd5c404" - integrity sha512-Ibt+oXxhmeYJSsCkODPqNpPmyegefiD8rfutH1NYGhMZQhSp95Rz7haemgnJ6dxa6LT+JLLbtgOMORRluwKktw== - -buffer@^5.5.0: - version "5.7.1" - resolved "https://registry.yarnpkg.com/buffer/-/buffer-5.7.1.tgz#ba62e7c13133053582197160851a8f648e99eed0" - integrity sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ== - dependencies: - base64-js "^1.3.1" - ieee754 "^1.1.13" - commander@7: version "7.2.0" resolved "https://registry.yarnpkg.com/commander/-/commander-7.2.0.tgz#a36cb57d0b501ce108e4d20559a150a391d97ab7" @@ -652,13 +601,6 @@ elkjs@^0.8.2: resolved "https://registry.yarnpkg.com/elkjs/-/elkjs-0.8.2.tgz#c37763c5a3e24e042e318455e0147c912a7c248e" integrity sha512-L6uRgvZTH+4OF5NE/MBbzQx/WYpru1xCBE9respNj6qznEewGUIfhzmm7horWWxbNO2M0WckQypGctR8lH79xQ== -end-of-stream@^1.4.1: - version "1.4.4" - resolved "https://registry.yarnpkg.com/end-of-stream/-/end-of-stream-1.4.4.tgz#5ae64a5f45057baf3626ec14da0ca5e4b2431eb0" - integrity sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q== - dependencies: - once "^1.4.0" - esbuild@^0.17.10: version "0.17.10" resolved "https://registry.yarnpkg.com/esbuild/-/esbuild-0.17.10.tgz#3be050561b34c5dc05b46978f4e1f326d5cc9437" @@ -692,21 +634,6 @@ escape-string-regexp@^4.0.0: resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz#14ba83a5d373e3d311e5afca29cf5bfad965bf34" integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA== -fast-extend@1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/fast-extend/-/fast-extend-1.0.2.tgz#3b8a5b09cbc8ff3d6d47eaf397398c0a643e441b" - integrity sha512-XXA9RmlPatkFKUzqVZAFth18R4Wo+Xug/S+C7YlYA3xrXwfPlW3dqNwOb4hvQo7wZJ2cNDYhrYuPzVOfHy5/uQ== - -fs-constants@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/fs-constants/-/fs-constants-1.0.0.tgz#6be0de9be998ce16af8afc24497b9ee9b7ccd9ad" - integrity sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow== - -fs-monkey@0.3.3: - version "0.3.3" - resolved "https://registry.yarnpkg.com/fs-monkey/-/fs-monkey-0.3.3.tgz#7960bb2b1fa2653731b9d0e2e84812a7e8b3664a" - integrity sha512-FNUvuTAJ3CqCQb5ELn+qCbGR/Zllhf2HtwsdAtBi59s1WeCjKMT81fHcSu7dwIskqGVK+MmOrb7VOBlq3/SItw== - fs.realpath@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" @@ -748,11 +675,6 @@ iconv-lite@0.6: dependencies: safer-buffer ">= 2.1.2 < 3.0.0" -ieee754@^1.1.13: - version "1.2.1" - resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.2.1.tgz#8eb7a10a63fff25d15a57b001586d177d1b0d352" - integrity sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA== - inflight@^1.0.4: version "1.0.6" resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" @@ -761,7 +683,7 @@ inflight@^1.0.4: once "^1.3.0" wrappy "1" -inherits@2, inherits@^2.0.3, inherits@^2.0.4: +inherits@2: version "2.0.4" resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== @@ -820,14 +742,6 @@ matcher@^4.0.0: dependencies: escape-string-regexp "^4.0.0" -memfs@3.0.4: - version "3.0.4" - resolved "https://registry.yarnpkg.com/memfs/-/memfs-3.0.4.tgz#17997ec34d67d0a4756f6a34f2fefd13a8dbab08" - integrity sha512-OcZEzwX9E5AoY8SXjuAvw0DbIAYwUzV/I236I8Pqvrlv7sL/Y0E9aRCon05DhaV8pg1b32uxj76RgW0s5xjHBA== - dependencies: - fast-extend "1.0.2" - fs-monkey "0.3.3" - mermaid@^10.0.0: version "10.0.0" resolved "https://registry.yarnpkg.com/mermaid/-/mermaid-10.0.0.tgz#6f7ae2eda0ab221089dc1eb166938203f2a7b04d" @@ -895,16 +809,6 @@ once@^1.3.0, once@^1.4.0: dependencies: wrappy "1" -pako@^1.0.11: - version "1.0.11" - resolved "https://registry.yarnpkg.com/pako/-/pako-1.0.11.tgz#6c9599d340d54dfd3946380252a35705a6b992bf" - integrity sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw== - -path-browserify@^1.0.0, path-browserify@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/path-browserify/-/path-browserify-1.0.1.tgz#d98454a9c3753d5790860f16f68867b9e46be1fd" - integrity sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g== - path-is-absolute@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" @@ -926,30 +830,6 @@ pin-github-action@^1.8.0: matcher "^4.0.0" yaml "^2.1.3" -randombytes@^2.0.5: - version "2.1.0" - resolved "https://registry.yarnpkg.com/randombytes/-/randombytes-2.1.0.tgz#df6f84372f0270dc65cdf6291349ab7a473d4f2a" - integrity sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ== - dependencies: - safe-buffer "^5.1.0" - -randomfill@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/randomfill/-/randomfill-1.0.4.tgz#c92196fc86ab42be983f1bf31778224931d61458" - integrity sha512-87lcbR8+MhcWcUiQ+9e+Rwx8MyR2P7qnt15ynUlbm3TU/fjbgz4GsvfSUDTemtCCtVCqb4ZcEFlyPNTh9bBTLw== - dependencies: - randombytes "^2.0.5" - safe-buffer "^5.1.0" - -readable-stream@^3.1.1, readable-stream@^3.4.0: - version "3.6.1" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.6.1.tgz#f9f9b5f536920253b3d26e7660e7da4ccff9bb62" - integrity sha512-+rQmrWMYGA90yenhTYsLWAsLsqVC8osOw6PKE1HDYiO0gdPeKe/xDHNzIAIn4C91YQ6oenEhfYqqc1883qHbjQ== - dependencies: - inherits "^2.0.3" - string_decoder "^1.1.1" - util-deprecate "^1.0.1" - rechoir@^0.6.2: version "0.6.2" resolved "https://registry.yarnpkg.com/rechoir/-/rechoir-0.6.2.tgz#85204b54dba82d5742e28c96756ef43af50e3384" @@ -981,11 +861,6 @@ rw@1: resolved "https://registry.yarnpkg.com/rw/-/rw-1.3.3.tgz#3f862dfa91ab766b14885ef4d01124bfda074fb4" integrity sha512-PdhdWy89SiZogBLaw42zdeqtRJ//zFd2PgQavcICDUgJT5oW10QCRKbJ6bg4r0/UY2M6BWd5tkxuGFRvCkgfHQ== -safe-buffer@^5.1.0, safe-buffer@~5.2.0: - version "5.2.1" - resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" - integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== - "safer-buffer@>= 2.1.2 < 3.0.0": version "2.1.2" resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" @@ -1005,13 +880,6 @@ state-local@^1.0.6: resolved "https://registry.yarnpkg.com/state-local/-/state-local-1.0.7.tgz#da50211d07f05748d53009bee46307a37db386d5" integrity sha512-HTEHMNieakEnoe33shBYcZ7NX83ACUjCu8c40iOGEZsngj9zRnkqS9j1pqQPXwobB0ZcVTk27REb7COQ0UR59w== -string_decoder@^1.1.1: - version "1.3.0" - resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.3.0.tgz#42f114594a46cf1a8e30b0a84f56c78c3edac21e" - integrity sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA== - dependencies: - safe-buffer "~5.2.0" - stylis@^4.1.2: version "4.1.3" resolved "https://registry.yarnpkg.com/stylis/-/stylis-4.1.3.tgz#fd2fbe79f5fed17c55269e16ed8da14c84d069f7" @@ -1022,17 +890,6 @@ supports-preserve-symlinks-flag@^1.0.0: resolved "https://registry.yarnpkg.com/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz#6eda4bd344a3c94aea376d4cc31bc77311039e09" integrity sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w== -tar-stream@^2.1.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/tar-stream/-/tar-stream-2.2.0.tgz#acad84c284136b060dc3faa64474aa9aebd77287" - integrity sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ== - dependencies: - bl "^4.0.3" - end-of-stream "^1.4.1" - fs-constants "^1.0.0" - inherits "^2.0.3" - readable-stream "^3.1.1" - tr46@~0.0.3: version "0.0.3" resolved "https://registry.yarnpkg.com/tr46/-/tr46-0.0.3.tgz#8184fd347dac9cdc185992f3a6622e14b9d9ab6a" @@ -1048,11 +905,6 @@ universal-user-agent@^6.0.0: resolved "https://registry.yarnpkg.com/universal-user-agent/-/universal-user-agent-6.0.0.tgz#3381f8503b251c0d9cd21bc1de939ec9df5480ee" integrity sha512-isyNax3wXoKaulPDZWHQqbmIx1k2tb9fb3GGDBRxCscfYV2Ch7WxPArBsFEG8s/safwXTT7H4QGhaIkTp9447w== -util-deprecate@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" - integrity sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw== - uuid@^9.0.0: version "9.0.0" resolved "https://registry.yarnpkg.com/uuid/-/uuid-9.0.0.tgz#592f550650024a38ceb0c562f2f6aa435761efb5" From f58c860096c14085ff89c1f188dffadfec0ef159 Mon Sep 17 00:00:00 2001 From: Kevin Newton Date: Sat, 25 Feb 2023 15:49:59 -0500 Subject: [PATCH 4/5] Push to GitHub pages with actions --- .github/workflows/main.yml | 48 +++++++++++++++++++++++++++++++------- docs/index.html | 7 ++++-- src/index.css | 2 +- src/index.js | 22 +++++++++++++---- src/mermaid.js | 22 ++--------------- 5 files changed, 65 insertions(+), 36 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 33dd0d1..21e6df7 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,11 +1,35 @@ -name: Github Pages -on: [push] +# Simple workflow for deploying static content to GitHub Pages +name: Deploy static content to Pages + +on: + # Runs on pushes targeting the default branch + push: + branches: ["main"] + + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages +permissions: + contents: read + pages: write + id-token: write + +# Allow one concurrent deployment +concurrency: + group: "pages" + cancel-in-progress: true + jobs: - build-and-deploy: + # Single deploy job since we're just deploying + deploy: + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@master + uses: actions/checkout@v3 - name: Setup Ruby uses: ruby/setup-ruby@v1 @@ -16,17 +40,23 @@ jobs: - name: Setup node uses: actions/setup-node@v2 with: - node-version: 14.x + node-version: 18.x cache: yarn + - name: Setup Pages + uses: actions/configure-pages@v3 + - name: Package application run: | bundle exec rake yarn install --frozen-lockfile yarn build - - name: Deploy - uses: peaceiris/actions-gh-pages@v3 + - name: Upload artifact + uses: actions/upload-pages-artifact@v1 with: - github_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: ./docs + path: './docs' + + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v1 diff --git a/docs/index.html b/docs/index.html index 1ca2640..4802bcc 100644 --- a/docs/index.html +++ b/docs/index.html @@ -23,9 +23,12 @@

Syntax Tree

- + -
+
Loading...
diff --git a/src/index.css b/src/index.css index 07b0500..5a1223a 100644 --- a/src/index.css +++ b/src/index.css @@ -53,7 +53,7 @@ select { min-width: 15em; } -.graph-container { +.graph { text-align: center; overflow-y: scroll; overflow-x: scroll; diff --git a/src/index.js b/src/index.js index c6caf31..5aeddb0 100644 --- a/src/index.js +++ b/src/index.js @@ -18,7 +18,13 @@ await Promise.all([ } }); }), - import("./mermaid"), + // We're going to load mermaid asynchronously because it is a large module. + // When it gets loaded we'll tell it not to run on load and then we'll use it + // when the user selects the graph. + import("./mermaid").then(({ default: mermaid }) => { + mermaid.initialize({ startOnLoad: false }); + return mermaid; + }), // We're going to load the Ruby VM chunk asynchronously because it is pretty // dang huge (> 40Mb). In the meantime the textarea that is holding the place // of the actual functional one is just going to display "Loading...". @@ -30,6 +36,9 @@ await Promise.all([ output.value = ruby.prettyPrint(editor.getValue()); output.disabled = false; + // Next, grab a reference to the graph container element. + const graph = document.getElementById("graph"); + // This is the function that will be used to display the output from the // source. let displayFunction = ruby.prettyPrint; @@ -43,12 +52,17 @@ await Promise.all([ if (event.detail.kind === "mermaid") { output.setAttribute("style", "display: none;"); - mermaid.render(source); + graph.setAttribute("style", "text-align: left;") + graph.innerHTML = "Loading..." + + mermaid.render("preparedScheme", source).then(({ svg }) => { + graph.innerHTML = svg; + graph.setAttribute("style", "display: block; text-align: center;"); + }); } else { output.value = source; output.setAttribute("style", ""); - - mermaid.reset(); + graph.setAttribute("style", "display: none;"); } } catch (error) { // For now, just ignoring the error. Eventually I'd like to make this mark diff --git a/src/mermaid.js b/src/mermaid.js index 88ff8ff..fb61b97 100644 --- a/src/mermaid.js +++ b/src/mermaid.js @@ -1,21 +1,3 @@ -import mermaidjs from "mermaid"; +import mermaid from "mermaid"; -const getCleanContainer = () => { - const div = document.querySelector("#graph-container"); - div.innerHTML = ""; - return div; -} - -const render = async (source) => { - let container = getCleanContainer(); - - container.setAttribute("style", "display: block;"); - - mermaidjs.initialize({ startOnLoad: false }); - const { svg } = await mermaidjs.render('preparedScheme', source); - container.innerHTML = svg; -} - -const reset = () => getCleanContainer().setAttribute("style", "display: none;"); - -export { render, reset }; +export default mermaid; From dff21801be032630997709e80ba05fe65cdfff85 Mon Sep 17 00:00:00 2001 From: Kevin Newton Date: Sat, 25 Feb 2023 15:56:42 -0500 Subject: [PATCH 5/5] Fix up build --- src/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.js b/src/index.js index 5aeddb0..7289de5 100644 --- a/src/index.js +++ b/src/index.js @@ -1,6 +1,6 @@ import "./index.css"; -await Promise.all([ +Promise.all([ // We're going to load the editor asynchronously so that we can get to // first-paint faster. This works out nicely since we can use a textarea until // this chunk is loaded.