diff --git a/build/platform.ts b/build/platform.ts deleted file mode 100644 index 55f8b755..00000000 --- a/build/platform.ts +++ /dev/null @@ -1,42 +0,0 @@ -/** - * Script that detects platform name and arch. - * Cannot use os.platform() as that won't detect libc version - */ -import * as cp from "child_process"; -import * as fs from "fs"; -import * as os from "os"; - -enum Lib { - GLIBC, - MUSL, -} - -const CLIB: Lib | undefined = ((): Lib | undefined => { - if (os.platform() !== "linux") { - return; - } - const glibc = cp.spawnSync("getconf", ["GNU_LIBC_VERSION"]); - if (glibc.status === 0) { - return Lib.GLIBC; - } - - const ldd = cp.spawnSync("ldd", ["--version"]); - if (ldd.stdout && ldd.stdout.indexOf("musl") !== -1) { - return Lib.MUSL; - } - - const muslFile = fs.readdirSync("/lib").find((value) => value.startsWith("libc.musl")); - if (muslFile) { - return Lib.MUSL; - } - - return Lib.GLIBC; -})(); - -export const platform = (): NodeJS.Platform | "musl" => { - if (CLIB === Lib.MUSL) { - return "musl"; - } - - return os.platform(); -}; diff --git a/build/tasks.ts b/build/tasks.ts deleted file mode 100644 index 5af1a0d2..00000000 --- a/build/tasks.ts +++ /dev/null @@ -1,211 +0,0 @@ -import { register, run } from "@coder/runner"; -import { logger, field } from "@coder/logger"; -import * as fs from "fs"; -import * as fse from "fs-extra"; -import * as os from "os"; -import { platform } from "./platform"; -import * as path from "path"; -import * as zlib from "zlib"; -import * as https from "https"; -import * as tar from "tar"; - -const isWin = os.platform() === "win32"; -const libPath = path.join(__dirname, "../lib"); -const vscodePath = path.join(libPath, "vscode"); -const defaultExtensionsPath = path.join(libPath, "extensions"); -const pkgsPath = path.join(__dirname, "../packages"); -const vscodeVersion = process.env.VSCODE_VERSION || "1.33.1"; -const vsSourceUrl = `https://codesrv-ci.cdr.sh/vstar-${vscodeVersion}.tar.gz`; - -const buildServerBinary = register("build:server:binary", async (runner) => { - logger.info("Building with environment", field("env", { - NODE_ENV: process.env.NODE_ENV, - VERSION: process.env.VERSION, - OSTYPE: process.env.OSTYPE, - TARGET: process.env.TARGET, - })); - - await ensureInstalled(); - await Promise.all([ - buildBootstrapFork(), - buildWeb(), - buildServerBundle(), - buildAppBrowser(), - ]); - - await buildServerBinaryPackage(); -}); - -const buildServerBinaryPackage = register("build:server:binary:package", async (runner) => { - const cliPath = path.join(pkgsPath, "server"); - runner.cwd = cliPath; - if (!fs.existsSync(path.join(cliPath, "out"))) { - throw new Error("Cannot build binary without server bundle built"); - } - await buildServerBinaryCopy(); - const resp = await runner.execute(isWin ? "npm.cmd" : "npm", ["run", "build:binary"]); - if (resp.exitCode !== 0) { - throw new Error(`Failed to package binary: ${resp.stderr}`); - } -}); - -const buildServerBinaryCopy = register("build:server:binary:copy", async (runner) => { - const cliPath = path.join(pkgsPath, "server"); - const cliBuildPath = path.join(cliPath, "build"); - fse.removeSync(cliBuildPath); - fse.mkdirpSync(path.join(cliBuildPath, "extensions")); - const bootstrapForkPath = path.join(pkgsPath, "vscode", "out", "bootstrap-fork.js"); - const webOutputPath = path.join(pkgsPath, "web", "out"); - const browserAppOutputPath = path.join(pkgsPath, "app", "browser", "out"); - let ripgrepPath = path.join(pkgsPath, "..", "lib", "vscode", "node_modules", "vscode-ripgrep", "bin", "rg"); - if (isWin) { - ripgrepPath += ".exe"; - } - - if (!fs.existsSync(webOutputPath)) { - throw new Error("Web bundle must be built"); - } - if (!fs.existsSync(defaultExtensionsPath)) { - throw new Error("Default extensions must be built"); - } - if (!fs.existsSync(bootstrapForkPath)) { - throw new Error("Bootstrap fork must exist"); - } - if (!fs.existsSync(ripgrepPath)) { - throw new Error("Ripgrep must exist"); - } - fse.copySync(defaultExtensionsPath, path.join(cliBuildPath, "extensions")); - fs.writeFileSync(path.join(cliBuildPath, "bootstrap-fork.js.gz"), zlib.gzipSync(fs.readFileSync(bootstrapForkPath))); - const cpDir = (dir: string, rootPath: string, subdir?: "login"): void => { - const stat = fs.statSync(dir); - if (stat.isDirectory()) { - const paths = fs.readdirSync(dir); - paths.forEach((p) => cpDir(path.join(dir, p), rootPath, subdir)); - } else if (stat.isFile()) { - const newPath = path.join(cliBuildPath, "web", subdir || "", path.relative(rootPath, dir)); - fse.mkdirpSync(path.dirname(newPath)); - fs.writeFileSync(newPath + ".gz", zlib.gzipSync(fs.readFileSync(dir))); - } else { - // Nothing - } - }; - cpDir(webOutputPath, webOutputPath); - cpDir(browserAppOutputPath, browserAppOutputPath, "login"); - fse.mkdirpSync(path.join(cliBuildPath, "dependencies")); - fse.copySync(ripgrepPath, path.join(cliBuildPath, "dependencies", "rg")); -}); - -const buildServerBundle = register("build:server:bundle", async (runner) => { - const cliPath = path.join(pkgsPath, "server"); - runner.cwd = cliPath; - await runner.execute(isWin ? "npm.cmd" : "npm", ["run", "build"]); -}); - -const buildBootstrapFork = register("build:bootstrap-fork", async (runner) => { - await ensureInstalled(); - await ensurePatched(); - - const vscodePkgPath = path.join(pkgsPath, "vscode"); - runner.cwd = vscodePkgPath; - await runner.execute(isWin ? "npm.cmd" : "npm", ["run", "build:bootstrap-fork"]); -}); - -const buildAppBrowser = register("build:app:browser", async (runner) => { - await ensureInstalled(); - - const appPath = path.join(pkgsPath, "app/browser"); - runner.cwd = appPath; - fse.removeSync(path.join(appPath, "out")); - await runner.execute(isWin ? "npm.cmd" : "npm", ["run", "build"]); -}); - -const buildWeb = register("build:web", async (runner) => { - await ensureInstalled(); - await ensurePatched(); - - const webPath = path.join(pkgsPath, "web"); - runner.cwd = webPath; - fse.removeSync(path.join(webPath, "out")); - await runner.execute(isWin ? "npm.cmd" : "npm", ["run", "build"]); -}); - -const ensureInstalled = register("vscode:install", async (runner) => { - runner.cwd = libPath; - - if (fs.existsSync(vscodePath) && fs.existsSync(defaultExtensionsPath)) { - const pkgVersion = JSON.parse(fs.readFileSync(path.join(vscodePath, "package.json")).toString("utf8")).version; - if (pkgVersion === vscodeVersion) { - runner.cwd = vscodePath; - - const reset = await runner.execute("git", ["reset", "--hard"]); - if (reset.exitCode !== 0) { - throw new Error(`Failed to clean git repository: ${reset.stderr}`); - } - - return; - } - } - - fse.removeSync(libPath); - fse.mkdirpSync(libPath); - - await new Promise((resolve, reject): void => { - https.get(vsSourceUrl, (res) => { - if (res.statusCode !== 200) { - return reject(res.statusMessage); - } - - res.pipe(tar.x({ - C: libPath, - }).on("finish", () => { - resolve(); - }).on("error", (err: Error) => { - reject(err); - })); - }).on("error", (err) => { - reject(err); - }); - }); -}); - -const ensurePatched = register("vscode:patch", async (runner) => { - if (!fs.existsSync(vscodePath)) { - throw new Error("vscode must be cloned to patch"); - } - await ensureInstalled(); - - runner.cwd = vscodePath; - const patchPath = path.join(__dirname, "../scripts/vscode.patch"); - const apply = await runner.execute("git", ["apply", "--unidiff-zero", patchPath]); - if (apply.exitCode !== 0) { - throw new Error(`Failed to apply patches: ${apply.stderr}`); - } -}); - -register("package", async (runner, releaseTag) => { - if (!releaseTag) { - throw new Error("Please specify the release tag."); - } - - const releasePath = path.resolve(__dirname, "../release"); - - const archiveName = `code-server${releaseTag}-${platform()}-${os.arch()}`; - const archiveDir = path.join(releasePath, archiveName); - fse.removeSync(archiveDir); - fse.mkdirpSync(archiveDir); - - const binaryPath = path.join(__dirname, `../packages/server/cli-${platform()}-${os.arch()}`); - const binaryDestination = path.join(archiveDir, "code-server"); - fse.copySync(binaryPath, binaryDestination); - fs.chmodSync(binaryDestination, "755"); - ["README.md", "LICENSE"].forEach((fileName) => { - fse.copySync(path.resolve(__dirname, `../${fileName}`), path.join(archiveDir, fileName)); - }); - - runner.cwd = releasePath; - await (os.platform() === "linux" - ? runner.execute("tar", ["-cvzf", `${archiveName}.tar.gz`, `${archiveName}`]) - : runner.execute("zip", ["-r", `${archiveName}.zip`, `${archiveName}`])); -}); - -run(); diff --git a/packages/vscode/src/fill/applicationInsights.ts b/insights.ts similarity index 100% rename from packages/vscode/src/fill/applicationInsights.ts rename to insights.ts diff --git a/packages/app/browser/package.json b/packages/app/browser/package.json deleted file mode 100644 index 68c633c8..00000000 --- a/packages/app/browser/package.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "name": "@coder/app", - "scripts": { - "start": "node ../../../node_modules/webpack-dev-server/bin/webpack-dev-server.js --config ./webpack.config.js", - "build": "node ../../../node_modules/webpack/bin/webpack.js --config ./webpack.config.js" - }, - "dependencies": { - "@material/checkbox": "^0.44.1", - "@material/textfield": "^0.44.1", - "material-components-web": "^0.44.0" - } -} diff --git a/packages/app/browser/src/app.html b/packages/app/browser/src/app.html deleted file mode 100644 index dadd6d54..00000000 --- a/packages/app/browser/src/app.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - Authenticate: code-server - - - -
- -
- - - \ No newline at end of file diff --git a/packages/app/browser/src/app.scss b/packages/app/browser/src/app.scss deleted file mode 100644 index 8b504328..00000000 --- a/packages/app/browser/src/app.scss +++ /dev/null @@ -1,121 +0,0 @@ -@import url("https://use.typekit.net/vzk7ygg.css"); - -html, body { - background-color: #FFFFFF; - min-height: 100%; -} - -body { - font-family: 'aktiv-grotesk'; - display: flex; - align-items: center; - justify-content: center; - height: calc(100vh - 20px); - margin: 0; - padding: 10px; - --mdc-theme-primary: #AAADA1; - --mdc-theme-secondary: #AAADA1; - - &.in-app { - .back { - pointer-events: all; - opacity: 1; - } - } -} - -.login { - box-shadow: 0 18px 80px 10px rgba(69, 65, 78, 0.08); - max-width: 328px; - width: 100%; - padding: 40px; - border-radius: 5px; - position: relative; - color: #575962; - - .title { - margin-bottom: 0px; - font-size: 12px; - font-weight: 500; - letter-spacing: 1.5px; - line-height: 15px; - margin-bottom: 5px; - margin-top: 0px; - text-align: center; - text-transform: uppercase; - } - - .subtitle { - text-align: center; - margin: 0; - font-size: 19px; - font-weight: bold; - line-height: 25px; - margin-bottom: 45px; - } - - .mdc-text-field { - width: 100%; - background: none !important; - - &::before { - background: none !important; - } - } - - .mdc-form-field { - text-align: left; - font-size: 12px; - color: #797E84; - margin-top: 16px; - } - - .mdc-button { - border-radius: 24px; - padding-left: 75px; - padding-right: 75px; - padding-top: 15px; - padding-bottom: 15px; - height: 48px; - margin: 0 auto; - display: block; - box-shadow: 0 12px 17px 2px rgba(171,173,163,0.14), 0 5px 22px 4px rgba(171,173,163,0.12), 0 7px 8px -4px rgba(171,173,163,0.2); - margin-top: 40px; - } -} - -.mdc-text-field--focused:not(.mdc-text-field--disabled) .mdc-floating-label { - color: var(--mdc-theme-primary); -} - -.mdc-floating-label--float-above { - transform: translateY(-70%) scale(0.75); -} - -.mdc-text-field:not(.mdc-text-field--disabled):not(.mdc-text-field--outlined):not(.mdc-text-field--textarea) .mdc-text-field__input, .mdc-text-field:not(.mdc-text-field--disabled):not(.mdc-text-field--outlined):not(.mdc-text-field--textarea) .mdc-text-field__input:hover { - border-bottom-color: #EBEDF2; -} - -.back { - position: absolute; - top: -50px; - left: -50px; - font-weight: bold; - opacity: 0; - pointer-events: none; - - // transition: 500ms opacity ease; -} - -#error-display { - box-sizing: border-box; - color: #bb2d0f; - font-size: 14px; - font-weight: 400; - letter-spacing: 0.3px; - line-height: 12px; - padding: 8px; - padding-bottom: 0; - padding-top: 20px; - text-align: center; -} diff --git a/packages/app/browser/src/app.ts b/packages/app/browser/src/app.ts deleted file mode 100644 index 5fa8a9cb..00000000 --- a/packages/app/browser/src/app.ts +++ /dev/null @@ -1,46 +0,0 @@ -//@ts-ignore -import { MDCTextField } from "@material/textfield"; -//@ts-ignore -import { MDCCheckbox } from "@material/checkbox"; -import "material-components-web/dist/material-components-web.css"; -import "./app.scss"; - -document.querySelectorAll(".mdc-text-field").forEach((d) => new MDCTextField(d)); -document.querySelectorAll(".mdc-checkbox").forEach((d) => new MDCCheckbox(d)); - -window.addEventListener("message", (event) => { - if (event.data === "app") { - document.body.classList.add("in-app"); - - const back = document.querySelector(".back")!; - back.addEventListener("click", () => { - (event.source as Window).postMessage("back", event.origin); - }); - } -}); - -const password = document.getElementById("password") as HTMLInputElement; -const form = document.getElementById("login-form") as HTMLFormElement; - -if (!form) { - throw new Error("No password form found"); -} - -form.addEventListener("submit", (e) => { - e.preventDefault(); - document.cookie = `password=${password.value}; ` - + `path=${location.pathname.replace(/\/login\/?$/, "/")}; ` - + `domain=${location.hostname}`; - location.reload(); -}); - -/** - * Notify user on load of page if previous password was unsuccessful - */ -const reg = new RegExp(`password=(\\w+);?`); -const matches = document.cookie.match(reg); -const errorDisplay = document.getElementById("error-display") as HTMLDivElement; - -if (document.referrer === document.location.href && matches) { - errorDisplay.innerText = "Password is incorrect!"; -} diff --git a/packages/app/browser/webpack.config.js b/packages/app/browser/webpack.config.js deleted file mode 100644 index 05028ca9..00000000 --- a/packages/app/browser/webpack.config.js +++ /dev/null @@ -1,16 +0,0 @@ -const path = require("path"); -const webpack = require("webpack"); -const merge = require("webpack-merge"); -const HtmlWebpackPlugin = require("html-webpack-plugin"); - -const root = path.resolve(__dirname, "../../.."); - -module.exports = merge( - require(path.join(root, "scripts/webpack.client.config.js"))({ - dirname: __dirname, - entry: path.join(__dirname, "src/app.ts"), - name: "login", - template: path.join(__dirname, "src/app.html"), - }), { - }, -); diff --git a/packages/app/browser/yarn.lock b/packages/app/browser/yarn.lock deleted file mode 100644 index 19e4f6f4..00000000 --- a/packages/app/browser/yarn.lock +++ /dev/null @@ -1,606 +0,0 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. -# yarn lockfile v1 - - -"@material/animation@^0.41.0": - version "0.41.0" - resolved "https://registry.yarnpkg.com/@material/animation/-/animation-0.41.0.tgz#315b45b32e1aeebee8a4cf555b8ad52076d09ddd" - integrity sha512-yYAwJbX3Q2AFd4dr6IYOsWLQy2HN8zWOFVl9AbUXunjzTfJCa/ecfXCriaT6qkmoNoHeTdJHRrsQJZC5GsPvzA== - -"@material/auto-init@^0.41.0": - version "0.41.0" - resolved "https://registry.yarnpkg.com/@material/auto-init/-/auto-init-0.41.0.tgz#8a59bb0b83e0f51ead9508074f9a29b2b6a20eec" - integrity sha512-jp6L8MpYu7DudgDfA8iTyD9BwQrYPEDsIJGbqzN9vcCBl5FoBatkB8pcFXKr+1mRBk7T1Qmf6+H5nDtxyXjHEQ== - -"@material/base@^0.41.0": - version "0.41.0" - resolved "https://registry.yarnpkg.com/@material/base/-/base-0.41.0.tgz#badadce711b4c25b1eb889a5e7581e32cd07c421" - integrity sha512-tEyzwBRu3d1H120SfKsDVYZHcqT5lKohh/7cWKR93aAaPDkSvjpKJIjyu2yuSkjpDduVZGzVocYbOvhUKhhzXQ== - -"@material/button@^0.44.0": - version "0.44.0" - resolved "https://registry.yarnpkg.com/@material/button/-/button-0.44.0.tgz#f01dcbea88bdc314e7640b76e5558101c8b4d69d" - integrity sha512-T8u8s8rlB49D9/5Nh5b0XsKRgSq3X0yWGo71MgaTnCnwxt8oZ6PxW/cH6Nn3Xp0NCr3mlSVQs08BviUfAmtlsg== - dependencies: - "@material/elevation" "^0.44.0" - "@material/feature-targeting" "^0.44.0" - "@material/ripple" "^0.44.0" - "@material/rtl" "^0.42.0" - "@material/shape" "^0.43.0" - "@material/theme" "^0.43.0" - "@material/typography" "^0.44.0" - -"@material/card@^0.44.0": - version "0.44.0" - resolved "https://registry.yarnpkg.com/@material/card/-/card-0.44.0.tgz#e62050e3e77f525173a015119200055cd7b71bf0" - integrity sha512-fUixXuh133bVp5c1gPIHreL5jwMJEeVIQf0E4xdxhkA+i4ku8fIAvIW62EuCmfJsXicv4q8NG3Ip6pCY+NW3ZA== - dependencies: - "@material/elevation" "^0.44.0" - "@material/ripple" "^0.44.0" - "@material/rtl" "^0.42.0" - "@material/shape" "^0.43.0" - "@material/theme" "^0.43.0" - -"@material/checkbox@^0.44.0": - version "0.44.0" - resolved "https://registry.yarnpkg.com/@material/checkbox/-/checkbox-0.44.0.tgz#5d0eee1db006db9f0fb700bf1c20408292305cf7" - integrity sha512-IzucxG+NuPNyByGmHg/cuYJ5ooMKouuj994PZXZyqb7owfrjjtXm7wjav66cvCowbVbcoa1owQMGBi18C9f4TQ== - dependencies: - "@material/animation" "^0.41.0" - "@material/base" "^0.41.0" - "@material/ripple" "^0.44.0" - "@material/rtl" "^0.42.0" - "@material/selection-control" "^0.44.0" - "@material/theme" "^0.43.0" - -"@material/checkbox@^0.44.1": - version "0.44.1" - resolved "https://registry.yarnpkg.com/@material/checkbox/-/checkbox-0.44.1.tgz#7e69271ccab7c57914a475da3a15d4d36702c1c4" - integrity sha512-RFUNc+9RKRozL+gXfJ8V57tXfC31Q9R9tRMTHpe62NXZriTrwNJDnSkFIERDXqtMGtkKUnIlPfPE5znF6XyPUw== - dependencies: - "@material/animation" "^0.41.0" - "@material/base" "^0.41.0" - "@material/feature-targeting" "^0.44.1" - "@material/ripple" "^0.44.1" - "@material/rtl" "^0.42.0" - "@material/selection-control" "^0.44.1" - "@material/theme" "^0.43.0" - -"@material/chips@^0.44.0": - version "0.44.0" - resolved "https://registry.yarnpkg.com/@material/chips/-/chips-0.44.0.tgz#bf553a5bf5db7320978402ac92069c9688b84d5a" - integrity sha512-+qrme6sGwYmX/ixHAo3Z1M7lorsxRyKexn1l+BSBX5PBc2f4w5Ml1eYYYcyVGfLX9LXmefRk0G6dUXXPyCE00g== - dependencies: - "@material/animation" "^0.41.0" - "@material/base" "^0.41.0" - "@material/checkbox" "^0.44.0" - "@material/elevation" "^0.44.0" - "@material/ripple" "^0.44.0" - "@material/shape" "^0.43.0" - "@material/theme" "^0.43.0" - "@material/typography" "^0.44.0" - -"@material/dialog@^0.44.0": - version "0.44.0" - resolved "https://registry.yarnpkg.com/@material/dialog/-/dialog-0.44.0.tgz#388f93f9f225824c75cbe9da8c464a52d79972e8" - integrity sha512-V6ButfknOMKOscL0Y39yLjamxvrIuyugobjf5s44ZeJc+9jUSkC7M3zP+T7rh358NcX+JSPP8iCGmUn/+LXpMQ== - dependencies: - "@material/animation" "^0.41.0" - "@material/base" "^0.41.0" - "@material/dom" "^0.41.0" - "@material/elevation" "^0.44.0" - "@material/ripple" "^0.44.0" - "@material/rtl" "^0.42.0" - "@material/shape" "^0.43.0" - "@material/theme" "^0.43.0" - "@material/typography" "^0.44.0" - focus-trap "^4.0.2" - -"@material/dom@^0.41.0": - version "0.41.0" - resolved "https://registry.yarnpkg.com/@material/dom/-/dom-0.41.0.tgz#6756865f97bad4c91ee75e69d769d7cdc25398ae" - integrity sha512-wOJrMwjPddYXpQFZAIaCLWI3TO/6KU1lxESTBzunni8A4FHQVWhokml5Xt85GqZwmPFeIF2s+D0wfbWyrGBuKQ== - -"@material/drawer@^0.44.0": - version "0.44.0" - resolved "https://registry.yarnpkg.com/@material/drawer/-/drawer-0.44.0.tgz#74b3ddfb741bffc72331c7a73cf62716fd3f0ab3" - integrity sha512-AYwFe0jgqqSmJd1bny8JJTA2SScF86Wfbk99lXXEwd/acS8IbnnuH6zfAg6MyJX12FDb8dE8Z/Ok1IwLiVa9sQ== - dependencies: - "@material/animation" "^0.41.0" - "@material/base" "^0.41.0" - "@material/elevation" "^0.44.0" - "@material/list" "^0.44.0" - "@material/ripple" "^0.44.0" - "@material/rtl" "^0.42.0" - "@material/shape" "^0.43.0" - "@material/theme" "^0.43.0" - "@material/typography" "^0.44.0" - focus-trap "^4.0.2" - -"@material/elevation@^0.44.0": - version "0.44.0" - resolved "https://registry.yarnpkg.com/@material/elevation/-/elevation-0.44.0.tgz#ca16a67188ce9810dc2fa3d7a39073e72df4b754" - integrity sha512-edNou34yFCSMb6XXe/6Y7AEh8DigWAhBUyIeMiMBD4k1km2xYCJbcnl8FBPJFteOrca97KoJComRlJPB6EurRQ== - dependencies: - "@material/animation" "^0.41.0" - "@material/theme" "^0.43.0" - -"@material/fab@^0.44.0": - version "0.44.0" - resolved "https://registry.yarnpkg.com/@material/fab/-/fab-0.44.0.tgz#0bcbbdfb6f24c53d59e08c9c0d400d2616dea184" - integrity sha512-1CEP4NlXDYioJ/YpSjh/MlIygtoC7CaHqIbucxX1O5WRPmS7K1uPt+o7netbLErAmcJdV/JrI/tqh9kKuX2x/Q== - dependencies: - "@material/animation" "^0.41.0" - "@material/elevation" "^0.44.0" - "@material/ripple" "^0.44.0" - "@material/rtl" "^0.42.0" - "@material/shape" "^0.43.0" - "@material/theme" "^0.43.0" - "@material/typography" "^0.44.0" - -"@material/feature-targeting@^0.44.0": - version "0.44.0" - resolved "https://registry.yarnpkg.com/@material/feature-targeting/-/feature-targeting-0.44.0.tgz#52cc73f0c8a83159de0357aebe74f15f9856fb4c" - integrity sha512-ShuC2TOLfjFpYUCQFtvkqDJhM6HTaucSx5HkRbOvOG+VlpzDx6pAqRUmdVaq2p7tHoQf2vwPMlSVm3gOjWt4VQ== - -"@material/feature-targeting@^0.44.1": - version "0.44.1" - resolved "https://registry.yarnpkg.com/@material/feature-targeting/-/feature-targeting-0.44.1.tgz#afafc80294e5efab94bee31a187273d43d34979a" - integrity sha512-90cc7njn4aHbH9UxY8qgZth1W5JgOgcEdWdubH1t7sFkwqFxS5g3zgxSBt46TygFBVIXNZNq35Xmg80wgqO7Pg== - -"@material/floating-label@^0.44.0": - version "0.44.0" - resolved "https://registry.yarnpkg.com/@material/floating-label/-/floating-label-0.44.0.tgz#8694cd49f6905641b67a9e7a112b820d028f09c7" - integrity sha512-k4npGNxyMtnjgJZNjU5VvqqaUqlbzlbVAhepT8PxYTpj+4Skg6PjHwieTCDCgsbqHvFcQX+WfUrSZXY7wFV7cw== - dependencies: - "@material/animation" "^0.41.0" - "@material/base" "^0.41.0" - "@material/rtl" "^0.42.0" - "@material/theme" "^0.43.0" - "@material/typography" "^0.44.0" - -"@material/floating-label@^0.44.1": - version "0.44.1" - resolved "https://registry.yarnpkg.com/@material/floating-label/-/floating-label-0.44.1.tgz#39af84a3a0abbfa6d210911d5f4200a65c2ef59b" - integrity sha512-umj5q5feJcZuB8snRX5aVBrwQNnrt/HcvN7pENzgqaYZNcmBnxRl0OutTlHCn6l7OVU9VlWhFMf77DYwmMWKJQ== - dependencies: - "@material/animation" "^0.41.0" - "@material/base" "^0.41.0" - "@material/rtl" "^0.42.0" - "@material/theme" "^0.43.0" - "@material/typography" "^0.44.1" - -"@material/form-field@^0.44.0": - version "0.44.0" - resolved "https://registry.yarnpkg.com/@material/form-field/-/form-field-0.44.0.tgz#b7518e885c0e953a2a5fe0140af927c30e066f4e" - integrity sha512-SK+V34dzoBCQ/CHn5nBp8BAh21Vj9p1pcok+/WpYBTeg4EphTYP2nUQLMNEN92l6zjgAYf+g9Ocj3t26HNHWqA== - dependencies: - "@material/base" "^0.41.0" - "@material/rtl" "^0.42.0" - "@material/selection-control" "^0.44.0" - "@material/theme" "^0.43.0" - "@material/typography" "^0.44.0" - -"@material/grid-list@^0.44.0": - version "0.44.0" - resolved "https://registry.yarnpkg.com/@material/grid-list/-/grid-list-0.44.0.tgz#bd31d992ab1a910731e4a47c11fe91d44e3bc02b" - integrity sha512-NxLL0A48K1O14ZZymFIyf6HDbF33+NgXYXqP2yosTC3Jw4iwmUcJTpFTmSw1U/m1xT4zEpeKEGJ4vjVUWpS9Mg== - dependencies: - "@material/base" "^0.41.0" - "@material/rtl" "^0.42.0" - "@material/theme" "^0.43.0" - "@material/typography" "^0.44.0" - -"@material/icon-button@^0.44.0": - version "0.44.0" - resolved "https://registry.yarnpkg.com/@material/icon-button/-/icon-button-0.44.0.tgz#febbcfd27d91eca8096ae042b9c07ed0f65345e9" - integrity sha512-n6L7RaRyEci6eGsuBTSEG+t9ATHAHaMlf9zuTWorEnIXY4DAmGO7ggBjw4+1XIOjhpLeIjyJdcvUK6Yz/UVM6Q== - dependencies: - "@material/base" "^0.41.0" - "@material/ripple" "^0.44.0" - "@material/theme" "^0.43.0" - -"@material/icon-toggle@^0.44.0": - version "0.44.0" - resolved "https://registry.yarnpkg.com/@material/icon-toggle/-/icon-toggle-0.44.0.tgz#b9de32f194b5aa9721ca799d59be0f477a5c5305" - integrity sha512-8T1b4iK61/q/3U0iIjEDJ9do5viCQ45IbrQqa8EYCZ1KDU/Q8z5N+bvOzQK8XnTL51BdDRMgP9lfQZh6nszmkA== - dependencies: - "@material/animation" "^0.41.0" - "@material/base" "^0.41.0" - "@material/ripple" "^0.44.0" - "@material/theme" "^0.43.0" - -"@material/image-list@^0.44.0": - version "0.44.0" - resolved "https://registry.yarnpkg.com/@material/image-list/-/image-list-0.44.0.tgz#a27996962044ac8c9ce6cb509f63746f08ed2e98" - integrity sha512-kI9aKJdc1Bd02l8nRTGG1wy/lNkECScfnBmCiLQ3XjAFtRYd2eWO0Z/AVvUG3egsIZnZBxqFGGsf5Htm9E/HiQ== - dependencies: - "@material/shape" "^0.43.0" - "@material/theme" "^0.43.0" - "@material/typography" "^0.44.0" - -"@material/layout-grid@^0.41.0": - version "0.41.0" - resolved "https://registry.yarnpkg.com/@material/layout-grid/-/layout-grid-0.41.0.tgz#2e7d3be76313e0684d573b10c2c6a88b3230d251" - integrity sha512-Sa5RNoTGgfIojqJ9E94p7/k11V6q/tGk7HwKi4AQNAPjxield0zcl3G/SbsSb8YSHoK+D+7OXDN+n11x6EqF7g== - -"@material/line-ripple@^0.43.0": - version "0.43.0" - resolved "https://registry.yarnpkg.com/@material/line-ripple/-/line-ripple-0.43.0.tgz#6cb530bab53f055f3583646a21ad20c1703f3a83" - integrity sha512-sXZYW4Em5uLEnAuVsQCO+sVHsTg7J2TOTJ0+akwZFMmd2tmNicjarQdlGIE9iU7Wjm51NOoLAu6Mz+8kLg90bQ== - dependencies: - "@material/animation" "^0.41.0" - "@material/base" "^0.41.0" - "@material/theme" "^0.43.0" - -"@material/linear-progress@^0.43.0": - version "0.43.0" - resolved "https://registry.yarnpkg.com/@material/linear-progress/-/linear-progress-0.43.0.tgz#4821424aa24c78de256e74a91d5be3df55c534d9" - integrity sha512-bqkDcob+xp1mFkyBsOkoaLgrtapmz7jznGoI3nmkqyk75EB2XQcn1H8Vr6cnp/jkF4nbKu0GdVJO3VXUFmGmrQ== - dependencies: - "@material/animation" "^0.41.0" - "@material/base" "^0.41.0" - "@material/theme" "^0.43.0" - -"@material/list@^0.44.0": - version "0.44.0" - resolved "https://registry.yarnpkg.com/@material/list/-/list-0.44.0.tgz#cf1910e15b66759334b8618d1110fbcc72c3d326" - integrity sha512-35gkN1+XZaau9d9ngyN2x14bzkj/ajZCDm7mbWibDQy272A16j6KuFLQFA8RUQV04OgL4YPVxY87dpCn/p+uTg== - dependencies: - "@material/base" "^0.41.0" - "@material/dom" "^0.41.0" - "@material/ripple" "^0.44.0" - "@material/rtl" "^0.42.0" - "@material/shape" "^0.43.0" - "@material/theme" "^0.43.0" - "@material/typography" "^0.44.0" - -"@material/menu-surface@^0.44.0": - version "0.44.0" - resolved "https://registry.yarnpkg.com/@material/menu-surface/-/menu-surface-0.44.0.tgz#902c081df42859b925a5b4502791b3febf48f1ae" - integrity sha512-s49kvIlQ4H5wvMD4yeHMMqnamPod06IUagMK6Ry0oTpUANSnyeNXxa3HkScl7DMJiS8IJeV21fSLAzlZYP2PDQ== - dependencies: - "@material/animation" "^0.41.0" - "@material/base" "^0.41.0" - "@material/elevation" "^0.44.0" - "@material/rtl" "^0.42.0" - "@material/shape" "^0.43.0" - "@material/theme" "^0.43.0" - -"@material/menu@^0.44.0": - version "0.44.0" - resolved "https://registry.yarnpkg.com/@material/menu/-/menu-0.44.0.tgz#776ec8a04406266a0a0a13eb140b1fd691e442cb" - integrity sha512-92XvAcv9rBW1jQ3UvwJ8zk9hbSRe/FqSuFdZ9fNPE348dCY2pbcdQfnUJTe3ycAN/I1c5frkrhx8F0II+nfbNQ== - dependencies: - "@material/base" "^0.41.0" - "@material/list" "^0.44.0" - "@material/menu-surface" "^0.44.0" - "@material/ripple" "^0.44.0" - "@material/rtl" "^0.42.0" - -"@material/notched-outline@^0.44.0": - version "0.44.0" - resolved "https://registry.yarnpkg.com/@material/notched-outline/-/notched-outline-0.44.0.tgz#d5a2e1d649921575a7cd2e88ee4581e4a1809573" - integrity sha512-c3nqOqUQAmW3h4zBbZVbMRdf4nNTYm0tVwXIAwmcCs5nvAthEHnzHwwFddNP7/9Wju6LZ0uqWn6xlyKly0uipw== - dependencies: - "@material/animation" "^0.41.0" - "@material/base" "^0.41.0" - "@material/floating-label" "^0.44.0" - "@material/rtl" "^0.42.0" - "@material/shape" "^0.43.0" - "@material/theme" "^0.43.0" - -"@material/notched-outline@^0.44.1": - version "0.44.1" - resolved "https://registry.yarnpkg.com/@material/notched-outline/-/notched-outline-0.44.1.tgz#dba4812286ba4c20f0361e6040bf9b9cad307434" - integrity sha512-x1ZJtrrqZgXT8gYE7aRF+6hTWpX7XaKZzsuwD+e0HBsogYNNsYmkBdLjl4YwhhFuHhX8vWzgkay41GtbgQx84Q== - dependencies: - "@material/animation" "^0.41.0" - "@material/base" "^0.41.0" - "@material/floating-label" "^0.44.1" - "@material/rtl" "^0.42.0" - "@material/shape" "^0.44.1" - "@material/theme" "^0.43.0" - -"@material/radio@^0.44.0": - version "0.44.0" - resolved "https://registry.yarnpkg.com/@material/radio/-/radio-0.44.0.tgz#f4cacdfabc7d765aa000cb34c5a37966f6d4fd6d" - integrity sha512-ar7uhlfHuSwM9JUUjpv7pLDLE0p436cCMxNTpmMjWabfvo3pMWlExvk72Oj81tBgfxY/uASLB3oj4neudXu9JQ== - dependencies: - "@material/animation" "^0.41.0" - "@material/base" "^0.41.0" - "@material/ripple" "^0.44.0" - "@material/selection-control" "^0.44.0" - "@material/theme" "^0.43.0" - -"@material/ripple@^0.44.0": - version "0.44.0" - resolved "https://registry.yarnpkg.com/@material/ripple/-/ripple-0.44.0.tgz#98920ff8ec4bf5714c97df3d190f02f8a5b476cc" - integrity sha512-MlaW4nUDgzS0JOBfsUawXyTOilr0jn+xvTVn6PEaGh2rmhNA54AhixXvdsVUWE9lfmHAsZV0AJHz2z7nunNhbQ== - dependencies: - "@material/animation" "^0.41.0" - "@material/base" "^0.41.0" - "@material/feature-targeting" "^0.44.0" - "@material/theme" "^0.43.0" - -"@material/ripple@^0.44.1": - version "0.44.1" - resolved "https://registry.yarnpkg.com/@material/ripple/-/ripple-0.44.1.tgz#79cb2ddf1f998498d877d3e3c46b50fed6f13b01" - integrity sha512-prJ1p3bR+GvwAtJgtdeIixsnRVApN3bizGnX7upKoqxsqbBDHj84JxaO8EsG9bjruG/LJu8Fb6WKKdIp2oXHTA== - dependencies: - "@material/animation" "^0.41.0" - "@material/base" "^0.41.0" - "@material/feature-targeting" "^0.44.1" - "@material/theme" "^0.43.0" - -"@material/rtl@^0.42.0": - version "0.42.0" - resolved "https://registry.yarnpkg.com/@material/rtl/-/rtl-0.42.0.tgz#1836e78186c2d8b996f6fbf97adab203535335bc" - integrity sha512-VrnrKJzhmspsN8WXHuxxBZ69yM5IwhCUqWr1t1eNfw3ZEvEj7i1g3P31HGowKThIN1dc1Wh4LE14rCISWCtv5w== - -"@material/select@^0.44.0": - version "0.44.0" - resolved "https://registry.yarnpkg.com/@material/select/-/select-0.44.0.tgz#8041b4fe6247d013b0f12685fbdf50aa9ff57b35" - integrity sha512-tw3/QIBLuRCT+5IXx4IPiJk7FzeGeR65JEizdRUItH8yzoIiQLs/b2i3KtHM2YBXHgeUcEBF2AOqPX2opdYhug== - dependencies: - "@material/animation" "^0.41.0" - "@material/base" "^0.41.0" - "@material/floating-label" "^0.44.0" - "@material/line-ripple" "^0.43.0" - "@material/menu" "^0.44.0" - "@material/menu-surface" "^0.44.0" - "@material/notched-outline" "^0.44.0" - "@material/ripple" "^0.44.0" - "@material/rtl" "^0.42.0" - "@material/shape" "^0.43.0" - "@material/theme" "^0.43.0" - "@material/typography" "^0.44.0" - -"@material/selection-control@^0.44.0": - version "0.44.0" - resolved "https://registry.yarnpkg.com/@material/selection-control/-/selection-control-0.44.0.tgz#63d5c65a47a9f54f5a0316b5ecdb5e5f35108609" - integrity sha512-HgCAPnMVMEj4X4ILkFSifqtZ3Tcc5HkU+Lfk9g0807sCaN/qBKWkYKLH2WJUbW8uk+MXK7DgP1khtS5zzanJWA== - dependencies: - "@material/ripple" "^0.44.0" - -"@material/selection-control@^0.44.1": - version "0.44.1" - resolved "https://registry.yarnpkg.com/@material/selection-control/-/selection-control-0.44.1.tgz#77a47354a4c5128fa34e3ba98d9cc26e8a92839a" - integrity sha512-Xf1ee2ZV2XJ+rK8OcOD1DZOihfU0uVRdY6iYX/Bqi8k8RXnAbLIBoh6zG3xSwjRNODNvAyHEQaS/ozEfH8eehg== - dependencies: - "@material/ripple" "^0.44.1" - -"@material/shape@^0.43.0": - version "0.43.0" - resolved "https://registry.yarnpkg.com/@material/shape/-/shape-0.43.0.tgz#b877acfd8be8abc9ddcf6601eb60dd0588292415" - integrity sha512-KGnoQV4G2OQbMe5Lr5Xbk8XNlO93Qi/juxXtd2wrAfiaPmktD8ug0CwdVDOPBOmj9a0gX3Ofi9XWcoU+tLEVjg== - -"@material/shape@^0.44.1": - version "0.44.1" - resolved "https://registry.yarnpkg.com/@material/shape/-/shape-0.44.1.tgz#ff4d5d42b07c5781306677bffee43234b756ea8e" - integrity sha512-8mCDQmyTEhDK+HX8Tap2Lc82QlVySlXU8zDCNkWoIn1ge+UnRezSDjE4y4P1ABegN5PrkJZPartuQ1U0ttIYXw== - dependencies: - "@material/feature-targeting" "^0.44.1" - -"@material/slider@^0.44.0": - version "0.44.0" - resolved "https://registry.yarnpkg.com/@material/slider/-/slider-0.44.0.tgz#2055df894eb725e541cde50a544719c07934755b" - integrity sha512-Lnn2fdUesXX4O0UpJzveEuOj+og+dXCwhal73u3l3NXEdc/eRgYxwWdF3ww4MmCZ786EwUmjb4vIc9olN4DO3A== - dependencies: - "@material/animation" "^0.41.0" - "@material/base" "^0.41.0" - "@material/rtl" "^0.42.0" - "@material/theme" "^0.43.0" - "@material/typography" "^0.44.0" - -"@material/snackbar@^0.44.0": - version "0.44.0" - resolved "https://registry.yarnpkg.com/@material/snackbar/-/snackbar-0.44.0.tgz#d98672b849f5f295e4fac2d474a9c80f11945518" - integrity sha512-KhCrmJm8Zu/ZZPuRCGfMKsZ0vudINlNgTjlOau0kQ/UgR1xBUvLOE8NjyXZr0RQz5obyW7xpyIWIpscn0IUeyw== - dependencies: - "@material/animation" "^0.41.0" - "@material/base" "^0.41.0" - "@material/button" "^0.44.0" - "@material/dom" "^0.41.0" - "@material/icon-button" "^0.44.0" - "@material/ripple" "^0.44.0" - "@material/rtl" "^0.42.0" - "@material/shape" "^0.43.0" - "@material/theme" "^0.43.0" - "@material/typography" "^0.44.0" - -"@material/switch@^0.44.0": - version "0.44.0" - resolved "https://registry.yarnpkg.com/@material/switch/-/switch-0.44.0.tgz#f2cbb447437b12eb3bc7f0ec8318dbd3b4f0afce" - integrity sha512-EadCg6lHUF260R2Q/l++vXIITqacvbXlobSoewA5ib6y9BU2g7l13wL1W8xAVJNUMgFa/PyN+EKT3oCql7jZLg== - dependencies: - "@material/animation" "^0.41.0" - "@material/base" "^0.41.0" - "@material/elevation" "^0.44.0" - "@material/ripple" "^0.44.0" - "@material/rtl" "^0.42.0" - "@material/selection-control" "^0.44.0" - "@material/theme" "^0.43.0" - -"@material/tab-bar@^0.44.0": - version "0.44.0" - resolved "https://registry.yarnpkg.com/@material/tab-bar/-/tab-bar-0.44.0.tgz#b17d791bd557b1d84892fef1a1d8b8d6fef7c6d6" - integrity sha512-kCrt05d61YXyY43SNc0dPGuqysbcLr/KRDBvzpXgE4gv2jCCVhhjAH10KPlx8pthp/UtvrYJHb34acAKEGzdHA== - dependencies: - "@material/base" "^0.41.0" - "@material/elevation" "^0.44.0" - "@material/tab" "^0.44.0" - "@material/tab-scroller" "^0.44.0" - -"@material/tab-indicator@^0.43.0": - version "0.43.0" - resolved "https://registry.yarnpkg.com/@material/tab-indicator/-/tab-indicator-0.43.0.tgz#37fd05513ba55ae218d9068c986c2676096fd6eb" - integrity sha512-RMNMQpWYghWpM6d0ayfuHEPzTiebKG0bMthViiD6tly8PubmOT8mShNhPm8ihybhDPUOLSz+7V4QNE5wikLEYg== - dependencies: - "@material/animation" "^0.41.0" - "@material/base" "^0.41.0" - "@material/theme" "^0.43.0" - -"@material/tab-scroller@^0.44.0": - version "0.44.0" - resolved "https://registry.yarnpkg.com/@material/tab-scroller/-/tab-scroller-0.44.0.tgz#82d092ed45d2ee9d82038bed318e6ff6bdc36dad" - integrity sha512-Ufd3NWBN11kY2oA7bGmTYWGP1uz2mq0tfDM0JOiqoLMgD7y3Z18kmxnpq2qkg1vi4kvix28hBYGGMfLlq9rGDA== - dependencies: - "@material/animation" "^0.41.0" - "@material/base" "^0.41.0" - "@material/tab" "^0.44.0" - -"@material/tab@^0.44.0": - version "0.44.0" - resolved "https://registry.yarnpkg.com/@material/tab/-/tab-0.44.0.tgz#254b92cff99015f0bd59a86d08d3f1c4744d0742" - integrity sha512-czrbGjtKkmUS3iYBX523xT5GOkjP0h+0x9fTnw+heFNpw5dCn6cZvlj3D9ayZU+ZH93x68TFhFVBuLU5f0EBXw== - dependencies: - "@material/base" "^0.41.0" - "@material/ripple" "^0.44.0" - "@material/rtl" "^0.42.0" - "@material/tab-indicator" "^0.43.0" - "@material/theme" "^0.43.0" - "@material/typography" "^0.44.0" - -"@material/textfield@^0.44.0": - version "0.44.0" - resolved "https://registry.yarnpkg.com/@material/textfield/-/textfield-0.44.0.tgz#277b33948ddff33f7f643323895e5a683f013601" - integrity sha512-IMBwMcE82eVU+Wifpu0t84tozvBPLCeqQELDtZNYujKg3RxaultzJLwIyGKPMZ9R4yPEpV2vgXPGKE+2/AWt0g== - dependencies: - "@material/animation" "^0.41.0" - "@material/base" "^0.41.0" - "@material/floating-label" "^0.44.0" - "@material/line-ripple" "^0.43.0" - "@material/notched-outline" "^0.44.0" - "@material/ripple" "^0.44.0" - "@material/rtl" "^0.42.0" - "@material/shape" "^0.43.0" - "@material/theme" "^0.43.0" - "@material/typography" "^0.44.0" - -"@material/textfield@^0.44.1": - version "0.44.1" - resolved "https://registry.yarnpkg.com/@material/textfield/-/textfield-0.44.1.tgz#2bba41cc94e68e328683997a1acf222b643dea9c" - integrity sha512-zy+56+uqr+L9DGrdOfQjOIMdKlai/7ruyqVfqIY6ieABM7LEGsOsxHhyExQmXo9IiuFhrOceWKFa4yIb8jBsmQ== - dependencies: - "@material/animation" "^0.41.0" - "@material/base" "^0.41.0" - "@material/floating-label" "^0.44.1" - "@material/line-ripple" "^0.43.0" - "@material/notched-outline" "^0.44.1" - "@material/ripple" "^0.44.1" - "@material/rtl" "^0.42.0" - "@material/shape" "^0.44.1" - "@material/theme" "^0.43.0" - "@material/typography" "^0.44.1" - -"@material/theme@^0.43.0": - version "0.43.0" - resolved "https://registry.yarnpkg.com/@material/theme/-/theme-0.43.0.tgz#6d9fa113c82e841817882172c152d60d2d203ca6" - integrity sha512-/zndZL6EihI18v2mYd4O8xvOBAAXmLeHyHVK28LozSAaJ9okQgD25wq5Ktk95oMTmPIC+rH66KcK6371ivNk8g== - -"@material/toolbar@^0.44.0": - version "0.44.0" - resolved "https://registry.yarnpkg.com/@material/toolbar/-/toolbar-0.44.0.tgz#6689aecdeccc78b7a890a3abbe8b68a2c6339307" - integrity sha512-YgLlOFQ5VzFLQBpXYSMviEbYox0fia+sasHuYPUhTAtas1ExVt9EEiIolDSVvhv2PruTReKKefxSbXAqGlOHog== - dependencies: - "@material/base" "^0.41.0" - "@material/elevation" "^0.44.0" - "@material/ripple" "^0.44.0" - "@material/rtl" "^0.42.0" - "@material/theme" "^0.43.0" - "@material/typography" "^0.44.0" - -"@material/top-app-bar@^0.44.0": - version "0.44.0" - resolved "https://registry.yarnpkg.com/@material/top-app-bar/-/top-app-bar-0.44.0.tgz#2495c7f9567568fb961ccced24f479c4806a72af" - integrity sha512-tf0yXQJARYs8UPaH8oo3LnsSHEiur7Zm8Fc3hv3F0gNRRaZYBjwsMQMVbZZaWoQCWskMALyntBg+Fo18zdgDxw== - dependencies: - "@material/animation" "^0.41.0" - "@material/base" "^0.41.0" - "@material/elevation" "^0.44.0" - "@material/ripple" "^0.44.0" - "@material/rtl" "^0.42.0" - "@material/shape" "^0.43.0" - "@material/theme" "^0.43.0" - "@material/typography" "^0.44.0" - -"@material/typography@^0.44.0": - version "0.44.0" - resolved "https://registry.yarnpkg.com/@material/typography/-/typography-0.44.0.tgz#cf61dce2ee89bfa084d86e1b0f270a585bf9dfaf" - integrity sha512-m4SjA9OjZRDKowN3cPzEa8e2GlTlEn3ZmW/Fy9eRNSp83iY+8a0xl6kCaF80v5qAVwVcpfEFyEHWxMJtkBw2uA== - -"@material/typography@^0.44.1": - version "0.44.1" - resolved "https://registry.yarnpkg.com/@material/typography/-/typography-0.44.1.tgz#a94f01172f9122180bc2ce0aa55658183a35590d" - integrity sha512-wMXHusg+Lp5Fdgoj3m0c+Lt6GCeGSh3EPRtQ1TQ2bwdBa0et2FqBaQRgXoq3tVmr0O/7unTfa0DoXlh4nVp1wA== - dependencies: - "@material/feature-targeting" "^0.44.1" - -focus-trap@^4.0.2: - version "4.0.2" - resolved "https://registry.yarnpkg.com/focus-trap/-/focus-trap-4.0.2.tgz#4ee2b96547c9ea0e4252a2d4b2cca68944194663" - integrity sha512-HtLjfAK7Hp2qbBtLS6wEznID1mPT+48ZnP2nkHzgjpL4kroYHg0CdqJ5cTXk+UO5znAxF5fRUkhdyfgrhh8Lzw== - dependencies: - tabbable "^3.1.2" - xtend "^4.0.1" - -material-components-web@^0.44.0: - version "0.44.0" - resolved "https://registry.yarnpkg.com/material-components-web/-/material-components-web-0.44.0.tgz#ff782e8d7bdd8212d3c6022a731258d0d42da531" - integrity sha512-BSRLf58SMVhAvlDhJDlcgYuvzeMwbMHKTJ7oIB8LaM24ZpXBxP9XCYJpKheMtiVLrgllCGDlJ/47OIDReHQXdQ== - dependencies: - "@material/animation" "^0.41.0" - "@material/auto-init" "^0.41.0" - "@material/base" "^0.41.0" - "@material/button" "^0.44.0" - "@material/card" "^0.44.0" - "@material/checkbox" "^0.44.0" - "@material/chips" "^0.44.0" - "@material/dialog" "^0.44.0" - "@material/dom" "^0.41.0" - "@material/drawer" "^0.44.0" - "@material/elevation" "^0.44.0" - "@material/fab" "^0.44.0" - "@material/feature-targeting" "^0.44.0" - "@material/floating-label" "^0.44.0" - "@material/form-field" "^0.44.0" - "@material/grid-list" "^0.44.0" - "@material/icon-button" "^0.44.0" - "@material/icon-toggle" "^0.44.0" - "@material/image-list" "^0.44.0" - "@material/layout-grid" "^0.41.0" - "@material/line-ripple" "^0.43.0" - "@material/linear-progress" "^0.43.0" - "@material/list" "^0.44.0" - "@material/menu" "^0.44.0" - "@material/menu-surface" "^0.44.0" - "@material/notched-outline" "^0.44.0" - "@material/radio" "^0.44.0" - "@material/ripple" "^0.44.0" - "@material/rtl" "^0.42.0" - "@material/select" "^0.44.0" - "@material/selection-control" "^0.44.0" - "@material/shape" "^0.43.0" - "@material/slider" "^0.44.0" - "@material/snackbar" "^0.44.0" - "@material/switch" "^0.44.0" - "@material/tab" "^0.44.0" - "@material/tab-bar" "^0.44.0" - "@material/tab-indicator" "^0.43.0" - "@material/tab-scroller" "^0.44.0" - "@material/textfield" "^0.44.0" - "@material/theme" "^0.43.0" - "@material/toolbar" "^0.44.0" - "@material/top-app-bar" "^0.44.0" - "@material/typography" "^0.44.0" - -tabbable@^3.1.2: - version "3.1.2" - resolved "https://registry.yarnpkg.com/tabbable/-/tabbable-3.1.2.tgz#f2d16cccd01f400e38635c7181adfe0ad965a4a2" - integrity sha512-wjB6puVXTYO0BSFtCmWQubA/KIn7Xvajw0x0l6eJUudMG/EAiJvIUnyNX6xO4NpGrJ16lbD0eUseB9WxW0vlpQ== - -xtend@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.1.tgz#a5c6d532be656e23db820efb943a1f04998d63af" - integrity sha1-pcbVMr5lbiPbgg77lDofBJmNY68= diff --git a/packages/app/chrome/icon_128.png b/packages/app/chrome/icon_128.png deleted file mode 100644 index 11b0138c..00000000 Binary files a/packages/app/chrome/icon_128.png and /dev/null differ diff --git a/packages/app/chrome/manifest.json b/packages/app/chrome/manifest.json deleted file mode 100644 index e38c7166..00000000 --- a/packages/app/chrome/manifest.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "manifest_version": 2, - "name": "Coder", - "version": "1", - "icons": { - "128": "icon_128.png" - }, - "permissions": [ - "storage", - "webview", - "http://*/*", - "https://*/*" - ], - "app": { - "background": { - "scripts": [ - "out/background.js" - ] - }, - "content": { - "scripts": [ - "out/content.js" - ] - } - }, - "commands": { - "toggle-feature-foo": { - "suggested_key": { - "default": "Ctrl+W" - }, - "description": "Toggle feature foo", - "global": true - } - }, - "sockets": { - "tcpServer": { - "listen": [ - "" - ] - } - } -} \ No newline at end of file diff --git a/packages/app/chrome/package.json b/packages/app/chrome/package.json deleted file mode 100644 index 3a727286..00000000 --- a/packages/app/chrome/package.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "name": "@coder/chrome-app", - "dependencies": { - "@types/chrome": "^0.0.79" - }, - "scripts": { - "build": "../../../node_modules/.bin/webpack --config ./webpack.config.js" - } -} diff --git a/packages/app/chrome/src/background.ts b/packages/app/chrome/src/background.ts deleted file mode 100644 index 84d87eb3..00000000 --- a/packages/app/chrome/src/background.ts +++ /dev/null @@ -1,13 +0,0 @@ -/// - -// tslint:disable-next-line:no-any -const chromeApp = (chrome).app; - -chromeApp.runtime.onLaunched.addListener(() => { - chromeApp.window.create("src/index.html", { - outerBounds: { - width: 400, - height: 500, - }, - }); -}); diff --git a/packages/app/chrome/src/chome.ts b/packages/app/chrome/src/chome.ts deleted file mode 100644 index 150ea898..00000000 --- a/packages/app/chrome/src/chome.ts +++ /dev/null @@ -1,92 +0,0 @@ -//@ts-ignore -import { TcpHost, TcpServer, TcpConnection } from "@coder/app/common/src/app"; -import { Event, Emitter } from "@coder/events/src"; - -export const tcpHost: TcpHost = { - listen(host: string, port: number): Promise { - const socketApi: { - readonly tcpServer: { - create(props: {}, cb: (createInfo: { readonly socketId: number }) => void): void; - listen(socketId: number, address: string, port: number, callback: (result: number) => void): void; - disconnect(socketId: number, callback: () => void): void; - - readonly onAccept: { - addListener(callback: (info: { readonly socketId: number; readonly clientSocketId: number }) => void): void; - }; - }; - readonly tcp: { - readonly onReceive: { - addListener(callback: (info: { readonly socketId: number; readonly data: ArrayBuffer; }) => void): void; - }; - close(socketId: number, callback?: () => void): void; - send(socketId: number, data: ArrayBuffer, callback?: () => void): void; - setPaused(socketId: number, value: boolean): void; - }; - // tslint:disable-next-line:no-any - } = (chrome).sockets; - - return new Promise((resolve, reject): void => { - socketApi.tcpServer.create({}, (createInfo) => { - const serverSocketId = createInfo.socketId; - socketApi.tcpServer.listen(serverSocketId, host, port, (result) => { - if (result < 0) { - return reject("Failed to listen: " + chrome.runtime.lastError); - } - - const connectionEmitter = new Emitter(); - - socketApi.tcpServer.onAccept.addListener((info) => { - if (info.socketId !== serverSocketId) { - return; - } - - const dataEmitter = new Emitter(); - - socketApi.tcp.onReceive.addListener((recvInfo) => { - if (recvInfo.socketId !== info.clientSocketId) { - return; - } - - dataEmitter.emit(recvInfo.data); - }); - - socketApi.tcp.setPaused(info.clientSocketId, false); - - connectionEmitter.emit({ - send: (data): Promise => { - return new Promise((res): void => { - socketApi.tcp.send(info.clientSocketId, data, () => { - res(); - }); - }); - }, - close: (): Promise => { - return new Promise((res): void => { - socketApi.tcp.close(info.clientSocketId, () => { - res(); - }); - }); - }, - get onData(): Event { - return dataEmitter.event; - }, - }); - }); - - resolve({ - get onConnection(): Event { - return connectionEmitter.event; - }, - close: (): Promise => { - return new Promise((res): void => { - socketApi.tcpServer.disconnect(serverSocketId, () => { - res(); - }); - }); - }, - }); - }); - }); - }); - }, -}; diff --git a/packages/app/chrome/src/content.ts b/packages/app/chrome/src/content.ts deleted file mode 100644 index 64cc29ba..00000000 --- a/packages/app/chrome/src/content.ts +++ /dev/null @@ -1,33 +0,0 @@ -import { create } from "@coder/app/common/src/app"; -import { tcpHost } from "./chome"; - -create({ - storage: { - get: (key: string): Promise => { - return new Promise((resolve, reject): void => { - try { - chrome.storage.sync.get(key, (items) => { - resolve(items[key]); - }); - } catch (ex) { - reject(ex); - } - }); - }, - set: (key: string, value: T): Promise => { - return new Promise((resolve, reject): void => { - try { - chrome.storage.sync.set({ - [key]: value, - }, () => { - resolve(); - }); - } catch (ex) { - reject(ex); - } - }); - }, - }, - tcp: tcpHost, - node: document.getElementById("main") as HTMLDivElement, -}); diff --git a/packages/app/chrome/src/index.html b/packages/app/chrome/src/index.html deleted file mode 100644 index 239fedd5..00000000 --- a/packages/app/chrome/src/index.html +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - - -
- - - - \ No newline at end of file diff --git a/packages/app/chrome/webpack.config.js b/packages/app/chrome/webpack.config.js deleted file mode 100644 index 6bfae8d0..00000000 --- a/packages/app/chrome/webpack.config.js +++ /dev/null @@ -1,37 +0,0 @@ -const path = require("path"); -const webpack = require("webpack"); -const merge = require("webpack-merge"); -const BundleAnalyzerPlugin = require("webpack-bundle-analyzer").BundleAnalyzerPlugin; -const HtmlWebpackPlugin = require("html-webpack-plugin"); -const prod = process.env.NODE_ENV === "production"; - -module.exports = [ - merge(require(path.join(__dirname, "../../../scripts", "webpack.general.config.js"))(), { - devtool: "none", - mode: "development", - target: "web", - output: { - path: path.join(__dirname, "out"), - filename: "background.js", - }, - entry: [ - "./packages/app/chrome/src/background.ts" - ], - plugins: [ - ] - }), - merge(require(path.join(__dirname, "../../../scripts", "webpack.general.config.js"))(), { - devtool: "none", - mode: "development", - target: "web", - output: { - path: path.join(__dirname, "out"), - filename: "content.js", - }, - entry: [ - "./packages/app/chrome/src/content.ts" - ], - plugins: [ - ] - }), -]; diff --git a/packages/app/chrome/yarn.lock b/packages/app/chrome/yarn.lock deleted file mode 100644 index 61eebde6..00000000 --- a/packages/app/chrome/yarn.lock +++ /dev/null @@ -1,22 +0,0 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. -# yarn lockfile v1 - - -"@types/chrome@^0.0.79": - version "0.0.79" - resolved "https://registry.yarnpkg.com/@types/chrome/-/chrome-0.0.79.tgz#1c83b35bd9b21b6204fb56e4816a1ea65dc013e5" - integrity sha512-4+Xducpig6lpwVX65Hk8KSZwRoURHXMDbd38SDNcV8TBaw4xyJki39fjB1io2h7ip+BsyFvgTm9OxR5qneLPiA== - dependencies: - "@types/filesystem" "*" - -"@types/filesystem@*": - version "0.0.29" - resolved "https://registry.yarnpkg.com/@types/filesystem/-/filesystem-0.0.29.tgz#ee3748eb5be140dcf980c3bd35f11aec5f7a3748" - integrity sha512-85/1KfRedmfPGsbK8YzeaQUyV1FQAvMPMTuWFQ5EkLd2w7szhNO96bk3Rh/SKmOfd9co2rCLf0Voy4o7ECBOvw== - dependencies: - "@types/filewriter" "*" - -"@types/filewriter@*": - version "0.0.28" - resolved "https://registry.yarnpkg.com/@types/filewriter/-/filewriter-0.0.28.tgz#c054e8af4d9dd75db4e63abc76f885168714d4b3" - integrity sha1-wFTor02d11205jq8dviFFocU1LM= diff --git a/packages/app/common/package.json b/packages/app/common/package.json deleted file mode 100644 index 1864e02b..00000000 --- a/packages/app/common/package.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "name": "@coder/app-common", - "main": "src/app.ts", - "dependencies": { - "material-components-web": "^0.44.0", - "react": "^16.8.1", - "react-dom": "^16.8.1" - }, - "devDependencies": { - "@types/react": "^16.8.2", - "@types/react-dom": "^16.8.0" - } -} diff --git a/packages/app/common/src/app.scss b/packages/app/common/src/app.scss deleted file mode 100644 index 99195139..00000000 --- a/packages/app/common/src/app.scss +++ /dev/null @@ -1,279 +0,0 @@ -@font-face { - font-family: 'aktiv-grotesk'; - font-weight: 400; - // src: url("fonts/AktivGroteskRegular.ttf"); /* IE9 Compat Modes */ - src: url("fonts/AktivGroteskRegular.woff2") format("woff2"), url("fonts/AktivGroteskRegular.woff") format("woff"); /* Pretty Modern Browsers */ -} - -@font-face { - font-family: 'aktiv-grotesk'; - font-weight: 500; - src: url("fonts/AktivGroteskMedium.woff2") format("woff2"), url("fonts/AktivGroteskMedium.woff") format("woff"); /* Pretty Modern Browsers */ - // src: url("fonts/AktivGroteskMedium.ttf"); -} - -@font-face { - font-family: 'aktiv-grotesk'; - font-weight: 700; - src: url("fonts/AktivGroteskBold.woff2") format("woff2"), url("fonts/AktivGroteskBold.woff") format("woff"); /* Pretty Modern Browsers */ - // src: url("fonts/AktivGroteskBold.ttf") format("ttf"); /* IE9 Compat Modes */ -} - -body, button, input { - font-family: 'aktiv-grotesk',sans-serif !important; -} - -body { - margin: 0; - background-color: #F6F8FB; - --mdc-theme-primary: #2A2E37; -} - -webview { - position: absolute; - top: 0; - left: 0; - right: 0; - bottom: 0; - width: 100%; - height: 100%; - opacity: 0; - pointer-events: none; - transition: 150ms opacity ease; - - &.active { - opacity: 1; - pointer-events: all; - } -} - -.logo-fill { - fill: #2A2E37; -} - -.main { - & > .header { - width: 100%; - height: 71px; - border-bottom: 1px solid rgba(117, 122, 131, 0.1); - display: flex; - margin-bottom: 60px; - - .logo { - max-height: fit-content; - width: 145px; - } - - .shrinker { - max-width: 1145px; - width: 100%; - margin: 0 auto; - display: flex; - } - } - - .content { - max-width: 960px; - width: 100%; - padding-bottom: 100px; - margin: 0 auto; - } -} - -.servers { - color: #2B343B; - - & > .header { - display: flex; - flex-direction: row; - align-items: center; - padding-bottom: 21px; - - h3 { - font-size: 24px; - font-weight: 500; - letter-spacing: 0.35px; - line-height: 33px; - margin: 0; - margin-left: 30px; - } - - .add-server { - margin-left: auto; - border-radius: 24px; - font-weight: bold; - font-size: 14px; - letter-spacing: 1.25px; - } - - .refresh { - margin-left: 16px; - margin-right: 15px; - cursor: pointer; - - svg { - @keyframes rotate { - 100% { transform: rotate(360deg); } - } - - &.refreshing { - animation: rotate 1s linear infinite; - } - } - } - } - - & > .grid { - display: grid; - grid-template-columns: 1fr 1.6fr 1.3fr 1.1fr 0.6fr 0.4fr; - box-shadow: 0 18px 80px 10px rgba(69, 65, 78, 0.08); - border-radius: 0 0 5px 5px; - - .mdc-linear-progress { - grid-column-start: 1; - grid-column-end: 7; - // height: 0; - position: relative; - --mdc-theme-primary: rgb(107, 109, 102); - height: 5px; - - &:after { - position: absolute; - top: 0; - left: 0; - bottom: 0; - right: 0; - background-color: #2A2E37; - transition: 500ms opacity ease; - content: " "; - } - - &.loading { - &:after { - opacity: 0; - } - - } - } - - .title, .value { - padding-top: 14px; - padding-bottom: 14px; - } - - .title { - background-color: var(--mdc-theme-primary); - font-size: 10px; - color: #9D9FA4; - font-weight: bold; - letter-spacing: 2px; - line-height: 12px; - text-transform: uppercase; - // padding-top: 15px; - // padding-bottom: 10px; - - &:first-child { - padding-left: 30px; - border-radius: 10px 0 0 0; - } - - &:nth-child(6) { - padding-right: 30px; - border-radius: 0 10px 0 0; - } - - &.servername { - color: white; - } - } - - .value { - border-top: 1px solid #EBEBF2; - font-size: 14px; - letter-spacing: 0.2px; - display: flex; - align-items: center; - color: #717680; - background-color: white; - - &.dark { - background-color: #F6F8FB; - } - - &.servername { - .logo { - height: 25px; - } - } - - &.strong { - font-weight: 600; - color: #2B343B; - font-size: 14px; - letter-spacing: 0.6px; - } - - &.status { - padding-left: 36px; - - span { - margin-left: 7px; - line-height: 0px; - } - } - - &.buttons { - button { - margin-left: auto; - border-radius: 24px; - border: 1px solid #CFD1D7; - font-size: 14px; - font-weight: bold; - letter-spacing: 1.25px; - line-height: 16px; - padding-left: 18px; - padding-right: 18px; - } - } - - &.icons { - padding-left: 16px; - } - - &:last-child { - border-bottom-right-radius: 5px; - } - - &:nth-last-child(6) { - border-bottom-left-radius: 5px; - } - } - } -} - -.flex-row { - display: flex; - flex-direction: row; -} - -.floater { - box-shadow: 0 8px 80px 10px rgba(69, 65, 78, 0.08); - border-radius: 10px; - padding: 3em; - min-width: 300px; - width: 100%; - - & > h1 { - font-size: 3.5em; - margin-top: 0px; - - // margin-bottom: 0px; - - } -} - -.mdc-ripple-upgraded--unbounded { - padding: 2px; - padding-top: 5px; - cursor: pointer; -} \ No newline at end of file diff --git a/packages/app/common/src/app.tsx b/packages/app/common/src/app.tsx deleted file mode 100644 index 65d457f8..00000000 --- a/packages/app/common/src/app.tsx +++ /dev/null @@ -1,33 +0,0 @@ -//@ts-ignore -import { MDCTextField } from "@material/textfield"; -import { TcpHost } from "./connection"; -import { StorageProvider } from "./storage"; -import "material-components-web/dist/material-components-web.css"; -import "./app.scss"; -import "./tooltip.scss"; - -import * as React from "react"; -import { render } from "react-dom"; -import { Main } from "./containers"; - -export * from "./connection"; -export interface App { - readonly tcp: TcpHost; - readonly storage: StorageProvider; - readonly node: HTMLElement; -} - -export interface RegisteredServer { - readonly host: "coder" | "self"; - readonly hostname: string; - readonly name: string; -} - -export const create = async (app: App): Promise => { - let servers = await app.storage.get("servers"); - if (!servers) { - servers = []; - } - - render(
, app.node); -}; diff --git a/packages/app/common/src/connection.ts b/packages/app/common/src/connection.ts deleted file mode 100644 index f4c1e022..00000000 --- a/packages/app/common/src/connection.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { Event } from "@coder/events"; -import { TunnelCloseEvent } from "@coder/tunnel/src/client"; - -export interface TcpHost { - listen(host: string, port: number): Promise; -} - -export interface TcpServer { - readonly onConnection: Event; - close(): Promise; -} - -export interface TcpConnection { - readonly onData: Event; - send(data: ArrayBuffer): Promise; - close(): Promise; -} diff --git a/packages/app/common/src/containers.tsx b/packages/app/common/src/containers.tsx deleted file mode 100644 index 38deccd3..00000000 --- a/packages/app/common/src/containers.tsx +++ /dev/null @@ -1,573 +0,0 @@ -//@ts-ignore -import { MDCRipple } from "@material/ripple"; -//@ts-ignore -import { MDCTextField } from "@material/textfield"; -//@ts-ignore -import { MDCLinearProgress } from "@material/linear-progress"; -import * as React from "react"; -import * as ReactDOM from "react-dom"; -import { RegisteredServer } from "./app"; - -// tslint:disable-next-line:no-any -declare var WebSettings: any; - -interface AuthedUser { - readonly username: string; -} - -export class Main extends React.Component { - private webview: HTMLWebViewElement | undefined; - - public constructor(props: void) { - super(props); - this.state = { - view: "servers", - loading: false, - }; - } - - public componentDidMount(): void { - window.addEventListener("message", (event) => { - if (event.data === "back") { - if (this.webview) { - this.webview.classList.remove("active"); - } - } - if (event.data === "loaded") { - if (this.webview) { - // this.setState({ loading: false }); - // this.webview.classList.add("active"); - } - } - }); - - if (this.webview) { - this.webview.addEventListener("error", (event) => { - console.error(event); - }); - this.webview.addEventListener("loadstart", (event) => { - this.setState({ loading: true }); - }); - this.webview.addEventListener("loadstop", (event) => { - this.setState({ loading: false }); - this.webview!.classList.add("active"); - // tslint:disable-next-line:no-any - const cw = (this.webview as any).contentWindow as Window; - cw.postMessage("app", "*"); - }); - } - } - - public render(): JSX.Element { - return ( -
-
-
- -
-
-
- {((): JSX.Element => { - switch (this.state.view) { - case "servers": - return ( - { - if (this.webview) { - this.webview.setAttribute("src", server.hostname); - } - }} - onAddServer={() => this.setState({ view: "add-server" })} - loading={this.state.loading} - /> - ); - case "add-server": - return ( -
Add server
- ); - } - })()} -
- this.webview = wv}> -
- ); - } -} - -export class AddServer extends React.Component { - public render(): JSX.Element { - return ( -
-

Add Server

-

Something about what you can do once you add your own server. A link to setup guides for this would be great as well.

- -

-
- ); - } -} - -export class Servers extends React.Component<{ - readonly user?: AuthedUser; - readonly servers: ReadonlyArray; - readonly onSelect: (server: RegisteredServer) => void; - readonly onAddServer: () => void; - readonly loading: boolean; -}, { - readonly refreshing: boolean; -}> { - // tslint:disable-next-line:no-any - public constructor(props: any) { - super(props); - this.state = { - refreshing: false, - }; - } - - public render(): JSX.Element { - return ( -
-
-

Servers

- - -
- this.doRefresh()} className={this.state.refreshing ? "refreshing" : ""} width="24px" height="24px" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlnsXlink="http://www.w3.org/1999/xlink"> - - - - - - - - - - -
-
-
-
-
- Status -
-
- Server Name -
-
- Hostname -
-
- Details -
-
- {/* Used for continue/launch buttons */} -
-
- {/* Used for logout and delete buttons */} -
- -
{ - if (d) new MDCLinearProgress(d)}}> -
-
-
- -
-
- -
-
- - {this.props.servers.map((server, i) => { - return ( - this.props.onSelect(server)} /> - ); - })} -
-
- ); - } - - private doRefresh(): void { - if (this.state.refreshing) { - return; - } - - this.setState({ - refreshing: true, - }, () => { - setTimeout(() => { - this.setState({ - refreshing: false, - }); - }, 1500); - }); - } -} - -interface ServerProps { - readonly user?: AuthedUser; - readonly server: RegisteredServer; - readonly onSelect: () => void; -} - -export class Server extends React.Component { - // tslint:disable-next-line:no-any - public constructor(props: ServerProps) { - super(props); - this.state = { - status: props.server.host === "coder" ? "Online" : "Checking", - version: "", - }; - } - - public componentWillMount(): void { - if (this.props.server.host !== "self") { - return; - } - - const xhr = new XMLHttpRequest(); - xhr.open("GET", this.props.server.hostname); - xhr.addEventListener("error", (err) => { - this.setState({ - status: "Offline", - }); - }); - xhr.addEventListener("loadend", () => { - if (xhr.status === 200) { - this.setState({ - status: "Online", - version: process.env.VERSION, - }); - } else { - this.setState({ - status: "Offline", - }); - } - }); - xhr.send(); - } - - public render(): JSX.Element { - return ( - <> -
- {((): JSX.Element => { - switch (this.state.status) { - case "Offline": - return ( - - - - - - - - ); - case "Online": - return ( - - - - - - - - - ); - case "Checking": - return ( - - - - - - - ); - default: - throw new Error("unsupported status"); - } - })()} - - {this.state.status} - -
-
- {this.props.server.host === "coder" ? ( - - ) : this.props.server.name} -
-
- {this.props.server.hostname} -
-
- {this.props.server.host === "coder" && this.props.user ? `Logged in as ${this.props.user.username}` : this.state.version} -
-
- -
-
- -
- {this.props.server.host === "coder" ? ( - - - - - - - - - ) : ( - - - - - - - - - - )} -
-
-
- - ); - } - - private get extraClasses(): string { - return this.props.server.host === "coder" ? "dark" : ""; - } -} - -export class Input extends React.Component<{ - readonly label: string; - readonly id: string; - readonly type?: string; -}> { - private wrapper: HTMLDivElement | undefined; - - public componentDidMount(): void { - if (this.wrapper) { - const textInput = new MDCTextField(this.wrapper); - } - } - - public render(): JSX.Element { - return ( -
this.wrapper = i}> - -
-
-
- -
-
-
-
- ); - } -} - -export class Button extends React.Component<{ - readonly type: "outlined" | "unelevated"; - readonly className?: string; - readonly onClick?: () => void; -}> { - private button: HTMLButtonElement | undefined; - - public componentDidMount(): void { - if (this.button) { - const b = new MDCRipple(this.button); - } - } - - public render(): JSX.Element { - return ( - - ); - } -} - -export class Tooltip extends React.Component<{ - readonly message: string; -}> { - public componentDidMount(): void { - Object.keys(this.refs).forEach((ref) => { - const el = this.refs[ref]; - if (el) { - const element = ReactDOM.findDOMNode(el); - if (element) { - const te = document.createElement("div"); - te.className = "md-tooltip-content"; - te.innerHTML = this.props.message; - element.appendChild(te); - (element as HTMLElement).classList.add("md-tooltip"); - } - } - }); - } - - public render(): JSX.Element { - return ( - <> - {React.Children.map(this.props.children, (element, idx) => { - return React.cloneElement(element as any, { ref: idx }); - })} - - ); - } -} - -export class Ripple extends React.Component<{ - readonly className?: string; -}> { - public componentDidMount(): void { - Object.keys(this.refs).forEach((ref) => { - const el = this.refs[ref]; - if (el) { - const element = ReactDOM.findDOMNode(el); - if (element) { - (element as HTMLElement).classList.add("mdc-ripple-surface"); - (element as HTMLElement).setAttribute("data-mdc-ripple-is-unbounded", ""); - const r = new MDCRipple(element); - } - } - }); - } - - public render(): JSX.Element { - return ( - <> - {React.Children.map(this.props.children, (element, idx) => { - return React.cloneElement(element as any, { ref: idx }); - })} - - ); - } -} - -export class Logo extends React.Component { - public render(): JSX.Element { - return ( - - - - - - - - - - - - - - - - - - ); - } -} - -// const $ = (tagName: K, className?: string, content?: string): HTMLElementTagNameMap[K] => { -// const el = document.createElement(tagName); -// if (className) { -// el.className = className; -// } -// if (content) { -// el.innerText = content; -// } - -// return el; -// }; - -// const createInput = (id: string, labelName: string, type: string = "text"): HTMLDivElement => { -// //
-// // -// // -// //
-// //
-// //
-// // -// //
-// //
-// //
- -// const wrapper = $("div", "mdc-text-field mdc-text-field--outlined"); -// const input = $("input", "mdc-text-field__input"); -// input.type = type; -// input.id = id; -// wrapper.appendChild(input); -// const notchedOutline = $("div", "mdc-notched-outline"); -// notchedOutline.appendChild($("div", "mdc-notched-outline__leading")); -// const notch = $("div", "mdc-notched-outline__notch"); -// const label = $("label", "mdc-floating-label", labelName); -// label.setAttribute("for", id); -// notch.appendChild(label); -// notchedOutline.appendChild(notch); -// wrapper.appendChild(notchedOutline); -// wrapper.appendChild($("div", "mdc-notched-outline__trailing")); - -// const field = new MDCTextField(wrapper); - -// return wrapper; -// }; - -// export const createCoderLogin = (parentNode: HTMLElement): void => { -// parentNode.appendChild($("h1", "header", "Login with Coder")); -// parentNode.appendChild(createInput("username", "Username")); -// parentNode.appendChild($("br")); -// parentNode.appendChild($("br")); -// parentNode.appendChild(createInput("password", "Password", "password")); -// }; diff --git a/packages/app/common/src/fonts/AktivGroteskBold.eot b/packages/app/common/src/fonts/AktivGroteskBold.eot deleted file mode 100644 index 4af6ee98..00000000 Binary files a/packages/app/common/src/fonts/AktivGroteskBold.eot and /dev/null differ diff --git a/packages/app/common/src/fonts/AktivGroteskBold.ttf b/packages/app/common/src/fonts/AktivGroteskBold.ttf deleted file mode 100644 index ef0b1dd2..00000000 Binary files a/packages/app/common/src/fonts/AktivGroteskBold.ttf and /dev/null differ diff --git a/packages/app/common/src/fonts/AktivGroteskBold.woff b/packages/app/common/src/fonts/AktivGroteskBold.woff deleted file mode 100644 index 143aa7ce..00000000 Binary files a/packages/app/common/src/fonts/AktivGroteskBold.woff and /dev/null differ diff --git a/packages/app/common/src/fonts/AktivGroteskBold.woff2 b/packages/app/common/src/fonts/AktivGroteskBold.woff2 deleted file mode 100644 index 2ad9acc8..00000000 Binary files a/packages/app/common/src/fonts/AktivGroteskBold.woff2 and /dev/null differ diff --git a/packages/app/common/src/fonts/AktivGroteskMedium.eot b/packages/app/common/src/fonts/AktivGroteskMedium.eot deleted file mode 100644 index c1756e13..00000000 Binary files a/packages/app/common/src/fonts/AktivGroteskMedium.eot and /dev/null differ diff --git a/packages/app/common/src/fonts/AktivGroteskMedium.ttf b/packages/app/common/src/fonts/AktivGroteskMedium.ttf deleted file mode 100644 index 3475b42d..00000000 Binary files a/packages/app/common/src/fonts/AktivGroteskMedium.ttf and /dev/null differ diff --git a/packages/app/common/src/fonts/AktivGroteskMedium.woff b/packages/app/common/src/fonts/AktivGroteskMedium.woff deleted file mode 100644 index 1fb3471f..00000000 Binary files a/packages/app/common/src/fonts/AktivGroteskMedium.woff and /dev/null differ diff --git a/packages/app/common/src/fonts/AktivGroteskMedium.woff2 b/packages/app/common/src/fonts/AktivGroteskMedium.woff2 deleted file mode 100644 index 7896573d..00000000 Binary files a/packages/app/common/src/fonts/AktivGroteskMedium.woff2 and /dev/null differ diff --git a/packages/app/common/src/fonts/AktivGroteskRegular.eot b/packages/app/common/src/fonts/AktivGroteskRegular.eot deleted file mode 100644 index cd34e88c..00000000 Binary files a/packages/app/common/src/fonts/AktivGroteskRegular.eot and /dev/null differ diff --git a/packages/app/common/src/fonts/AktivGroteskRegular.ttf b/packages/app/common/src/fonts/AktivGroteskRegular.ttf deleted file mode 100644 index a30d2ec3..00000000 Binary files a/packages/app/common/src/fonts/AktivGroteskRegular.ttf and /dev/null differ diff --git a/packages/app/common/src/fonts/AktivGroteskRegular.woff b/packages/app/common/src/fonts/AktivGroteskRegular.woff deleted file mode 100644 index 3149aae5..00000000 Binary files a/packages/app/common/src/fonts/AktivGroteskRegular.woff and /dev/null differ diff --git a/packages/app/common/src/fonts/AktivGroteskRegular.woff2 b/packages/app/common/src/fonts/AktivGroteskRegular.woff2 deleted file mode 100644 index 351e9ad1..00000000 Binary files a/packages/app/common/src/fonts/AktivGroteskRegular.woff2 and /dev/null differ diff --git a/packages/app/common/src/storage.ts b/packages/app/common/src/storage.ts deleted file mode 100644 index b5f8221b..00000000 --- a/packages/app/common/src/storage.ts +++ /dev/null @@ -1,5 +0,0 @@ - -export interface StorageProvider { - set(key: string, value: T): Promise; - get(key: string): Promise; -} diff --git a/packages/app/common/src/tooltip.scss b/packages/app/common/src/tooltip.scss deleted file mode 100644 index 6a4a93c9..00000000 --- a/packages/app/common/src/tooltip.scss +++ /dev/null @@ -1,24 +0,0 @@ -.md-tooltip { - position: relative; -} - -.md-tooltip-content { - position: absolute; - bottom: -35px; - left: 50%; - padding: 7px; - transform: translateX(-50%) scale(0); - transition: transform 0.15s cubic-bezier(0, 0, 0.2, 1); - transform-origin: top; - background: rgba(67, 67, 67, 0.97); - color: white; - letter-spacing: 0.3px; - border-radius: 3px; - font-size: 12px; - font-weight: 500; - z-index: 2; -} - -.md-tooltip:hover .md-tooltip-content { - transform: translateX(-50%) scale(1); -} diff --git a/packages/app/common/yarn.lock b/packages/app/common/yarn.lock deleted file mode 100644 index fed23b62..00000000 --- a/packages/app/common/yarn.lock +++ /dev/null @@ -1,601 +0,0 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. -# yarn lockfile v1 - - -"@material/animation@^0.41.0": - version "0.41.0" - resolved "https://registry.yarnpkg.com/@material/animation/-/animation-0.41.0.tgz#315b45b32e1aeebee8a4cf555b8ad52076d09ddd" - integrity sha512-yYAwJbX3Q2AFd4dr6IYOsWLQy2HN8zWOFVl9AbUXunjzTfJCa/ecfXCriaT6qkmoNoHeTdJHRrsQJZC5GsPvzA== - -"@material/auto-init@^0.41.0": - version "0.41.0" - resolved "https://registry.yarnpkg.com/@material/auto-init/-/auto-init-0.41.0.tgz#8a59bb0b83e0f51ead9508074f9a29b2b6a20eec" - integrity sha512-jp6L8MpYu7DudgDfA8iTyD9BwQrYPEDsIJGbqzN9vcCBl5FoBatkB8pcFXKr+1mRBk7T1Qmf6+H5nDtxyXjHEQ== - -"@material/base@^0.41.0": - version "0.41.0" - resolved "https://registry.yarnpkg.com/@material/base/-/base-0.41.0.tgz#badadce711b4c25b1eb889a5e7581e32cd07c421" - integrity sha512-tEyzwBRu3d1H120SfKsDVYZHcqT5lKohh/7cWKR93aAaPDkSvjpKJIjyu2yuSkjpDduVZGzVocYbOvhUKhhzXQ== - -"@material/button@^0.44.0": - version "0.44.0" - resolved "https://registry.yarnpkg.com/@material/button/-/button-0.44.0.tgz#f01dcbea88bdc314e7640b76e5558101c8b4d69d" - integrity sha512-T8u8s8rlB49D9/5Nh5b0XsKRgSq3X0yWGo71MgaTnCnwxt8oZ6PxW/cH6Nn3Xp0NCr3mlSVQs08BviUfAmtlsg== - dependencies: - "@material/elevation" "^0.44.0" - "@material/feature-targeting" "^0.44.0" - "@material/ripple" "^0.44.0" - "@material/rtl" "^0.42.0" - "@material/shape" "^0.43.0" - "@material/theme" "^0.43.0" - "@material/typography" "^0.44.0" - -"@material/card@^0.44.0": - version "0.44.0" - resolved "https://registry.yarnpkg.com/@material/card/-/card-0.44.0.tgz#e62050e3e77f525173a015119200055cd7b71bf0" - integrity sha512-fUixXuh133bVp5c1gPIHreL5jwMJEeVIQf0E4xdxhkA+i4ku8fIAvIW62EuCmfJsXicv4q8NG3Ip6pCY+NW3ZA== - dependencies: - "@material/elevation" "^0.44.0" - "@material/ripple" "^0.44.0" - "@material/rtl" "^0.42.0" - "@material/shape" "^0.43.0" - "@material/theme" "^0.43.0" - -"@material/checkbox@^0.44.0": - version "0.44.0" - resolved "https://registry.yarnpkg.com/@material/checkbox/-/checkbox-0.44.0.tgz#5d0eee1db006db9f0fb700bf1c20408292305cf7" - integrity sha512-IzucxG+NuPNyByGmHg/cuYJ5ooMKouuj994PZXZyqb7owfrjjtXm7wjav66cvCowbVbcoa1owQMGBi18C9f4TQ== - dependencies: - "@material/animation" "^0.41.0" - "@material/base" "^0.41.0" - "@material/ripple" "^0.44.0" - "@material/rtl" "^0.42.0" - "@material/selection-control" "^0.44.0" - "@material/theme" "^0.43.0" - -"@material/chips@^0.44.0": - version "0.44.0" - resolved "https://registry.yarnpkg.com/@material/chips/-/chips-0.44.0.tgz#bf553a5bf5db7320978402ac92069c9688b84d5a" - integrity sha512-+qrme6sGwYmX/ixHAo3Z1M7lorsxRyKexn1l+BSBX5PBc2f4w5Ml1eYYYcyVGfLX9LXmefRk0G6dUXXPyCE00g== - dependencies: - "@material/animation" "^0.41.0" - "@material/base" "^0.41.0" - "@material/checkbox" "^0.44.0" - "@material/elevation" "^0.44.0" - "@material/ripple" "^0.44.0" - "@material/shape" "^0.43.0" - "@material/theme" "^0.43.0" - "@material/typography" "^0.44.0" - -"@material/dialog@^0.44.0": - version "0.44.0" - resolved "https://registry.yarnpkg.com/@material/dialog/-/dialog-0.44.0.tgz#388f93f9f225824c75cbe9da8c464a52d79972e8" - integrity sha512-V6ButfknOMKOscL0Y39yLjamxvrIuyugobjf5s44ZeJc+9jUSkC7M3zP+T7rh358NcX+JSPP8iCGmUn/+LXpMQ== - dependencies: - "@material/animation" "^0.41.0" - "@material/base" "^0.41.0" - "@material/dom" "^0.41.0" - "@material/elevation" "^0.44.0" - "@material/ripple" "^0.44.0" - "@material/rtl" "^0.42.0" - "@material/shape" "^0.43.0" - "@material/theme" "^0.43.0" - "@material/typography" "^0.44.0" - focus-trap "^4.0.2" - -"@material/dom@^0.41.0": - version "0.41.0" - resolved "https://registry.yarnpkg.com/@material/dom/-/dom-0.41.0.tgz#6756865f97bad4c91ee75e69d769d7cdc25398ae" - integrity sha512-wOJrMwjPddYXpQFZAIaCLWI3TO/6KU1lxESTBzunni8A4FHQVWhokml5Xt85GqZwmPFeIF2s+D0wfbWyrGBuKQ== - -"@material/drawer@^0.44.0": - version "0.44.0" - resolved "https://registry.yarnpkg.com/@material/drawer/-/drawer-0.44.0.tgz#74b3ddfb741bffc72331c7a73cf62716fd3f0ab3" - integrity sha512-AYwFe0jgqqSmJd1bny8JJTA2SScF86Wfbk99lXXEwd/acS8IbnnuH6zfAg6MyJX12FDb8dE8Z/Ok1IwLiVa9sQ== - dependencies: - "@material/animation" "^0.41.0" - "@material/base" "^0.41.0" - "@material/elevation" "^0.44.0" - "@material/list" "^0.44.0" - "@material/ripple" "^0.44.0" - "@material/rtl" "^0.42.0" - "@material/shape" "^0.43.0" - "@material/theme" "^0.43.0" - "@material/typography" "^0.44.0" - focus-trap "^4.0.2" - -"@material/elevation@^0.44.0": - version "0.44.0" - resolved "https://registry.yarnpkg.com/@material/elevation/-/elevation-0.44.0.tgz#ca16a67188ce9810dc2fa3d7a39073e72df4b754" - integrity sha512-edNou34yFCSMb6XXe/6Y7AEh8DigWAhBUyIeMiMBD4k1km2xYCJbcnl8FBPJFteOrca97KoJComRlJPB6EurRQ== - dependencies: - "@material/animation" "^0.41.0" - "@material/theme" "^0.43.0" - -"@material/fab@^0.44.0": - version "0.44.0" - resolved "https://registry.yarnpkg.com/@material/fab/-/fab-0.44.0.tgz#0bcbbdfb6f24c53d59e08c9c0d400d2616dea184" - integrity sha512-1CEP4NlXDYioJ/YpSjh/MlIygtoC7CaHqIbucxX1O5WRPmS7K1uPt+o7netbLErAmcJdV/JrI/tqh9kKuX2x/Q== - dependencies: - "@material/animation" "^0.41.0" - "@material/elevation" "^0.44.0" - "@material/ripple" "^0.44.0" - "@material/rtl" "^0.42.0" - "@material/shape" "^0.43.0" - "@material/theme" "^0.43.0" - "@material/typography" "^0.44.0" - -"@material/feature-targeting@^0.44.0": - version "0.44.0" - resolved "https://registry.yarnpkg.com/@material/feature-targeting/-/feature-targeting-0.44.0.tgz#52cc73f0c8a83159de0357aebe74f15f9856fb4c" - integrity sha512-ShuC2TOLfjFpYUCQFtvkqDJhM6HTaucSx5HkRbOvOG+VlpzDx6pAqRUmdVaq2p7tHoQf2vwPMlSVm3gOjWt4VQ== - -"@material/floating-label@^0.44.0": - version "0.44.0" - resolved "https://registry.yarnpkg.com/@material/floating-label/-/floating-label-0.44.0.tgz#8694cd49f6905641b67a9e7a112b820d028f09c7" - integrity sha512-k4npGNxyMtnjgJZNjU5VvqqaUqlbzlbVAhepT8PxYTpj+4Skg6PjHwieTCDCgsbqHvFcQX+WfUrSZXY7wFV7cw== - dependencies: - "@material/animation" "^0.41.0" - "@material/base" "^0.41.0" - "@material/rtl" "^0.42.0" - "@material/theme" "^0.43.0" - "@material/typography" "^0.44.0" - -"@material/form-field@^0.44.0": - version "0.44.0" - resolved "https://registry.yarnpkg.com/@material/form-field/-/form-field-0.44.0.tgz#b7518e885c0e953a2a5fe0140af927c30e066f4e" - integrity sha512-SK+V34dzoBCQ/CHn5nBp8BAh21Vj9p1pcok+/WpYBTeg4EphTYP2nUQLMNEN92l6zjgAYf+g9Ocj3t26HNHWqA== - dependencies: - "@material/base" "^0.41.0" - "@material/rtl" "^0.42.0" - "@material/selection-control" "^0.44.0" - "@material/theme" "^0.43.0" - "@material/typography" "^0.44.0" - -"@material/grid-list@^0.44.0": - version "0.44.0" - resolved "https://registry.yarnpkg.com/@material/grid-list/-/grid-list-0.44.0.tgz#bd31d992ab1a910731e4a47c11fe91d44e3bc02b" - integrity sha512-NxLL0A48K1O14ZZymFIyf6HDbF33+NgXYXqP2yosTC3Jw4iwmUcJTpFTmSw1U/m1xT4zEpeKEGJ4vjVUWpS9Mg== - dependencies: - "@material/base" "^0.41.0" - "@material/rtl" "^0.42.0" - "@material/theme" "^0.43.0" - "@material/typography" "^0.44.0" - -"@material/icon-button@^0.44.0": - version "0.44.0" - resolved "https://registry.yarnpkg.com/@material/icon-button/-/icon-button-0.44.0.tgz#febbcfd27d91eca8096ae042b9c07ed0f65345e9" - integrity sha512-n6L7RaRyEci6eGsuBTSEG+t9ATHAHaMlf9zuTWorEnIXY4DAmGO7ggBjw4+1XIOjhpLeIjyJdcvUK6Yz/UVM6Q== - dependencies: - "@material/base" "^0.41.0" - "@material/ripple" "^0.44.0" - "@material/theme" "^0.43.0" - -"@material/icon-toggle@^0.44.0": - version "0.44.0" - resolved "https://registry.yarnpkg.com/@material/icon-toggle/-/icon-toggle-0.44.0.tgz#b9de32f194b5aa9721ca799d59be0f477a5c5305" - integrity sha512-8T1b4iK61/q/3U0iIjEDJ9do5viCQ45IbrQqa8EYCZ1KDU/Q8z5N+bvOzQK8XnTL51BdDRMgP9lfQZh6nszmkA== - dependencies: - "@material/animation" "^0.41.0" - "@material/base" "^0.41.0" - "@material/ripple" "^0.44.0" - "@material/theme" "^0.43.0" - -"@material/image-list@^0.44.0": - version "0.44.0" - resolved "https://registry.yarnpkg.com/@material/image-list/-/image-list-0.44.0.tgz#a27996962044ac8c9ce6cb509f63746f08ed2e98" - integrity sha512-kI9aKJdc1Bd02l8nRTGG1wy/lNkECScfnBmCiLQ3XjAFtRYd2eWO0Z/AVvUG3egsIZnZBxqFGGsf5Htm9E/HiQ== - dependencies: - "@material/shape" "^0.43.0" - "@material/theme" "^0.43.0" - "@material/typography" "^0.44.0" - -"@material/layout-grid@^0.41.0": - version "0.41.0" - resolved "https://registry.yarnpkg.com/@material/layout-grid/-/layout-grid-0.41.0.tgz#2e7d3be76313e0684d573b10c2c6a88b3230d251" - integrity sha512-Sa5RNoTGgfIojqJ9E94p7/k11V6q/tGk7HwKi4AQNAPjxield0zcl3G/SbsSb8YSHoK+D+7OXDN+n11x6EqF7g== - -"@material/line-ripple@^0.43.0": - version "0.43.0" - resolved "https://registry.yarnpkg.com/@material/line-ripple/-/line-ripple-0.43.0.tgz#6cb530bab53f055f3583646a21ad20c1703f3a83" - integrity sha512-sXZYW4Em5uLEnAuVsQCO+sVHsTg7J2TOTJ0+akwZFMmd2tmNicjarQdlGIE9iU7Wjm51NOoLAu6Mz+8kLg90bQ== - dependencies: - "@material/animation" "^0.41.0" - "@material/base" "^0.41.0" - "@material/theme" "^0.43.0" - -"@material/linear-progress@^0.43.0": - version "0.43.0" - resolved "https://registry.yarnpkg.com/@material/linear-progress/-/linear-progress-0.43.0.tgz#4821424aa24c78de256e74a91d5be3df55c534d9" - integrity sha512-bqkDcob+xp1mFkyBsOkoaLgrtapmz7jznGoI3nmkqyk75EB2XQcn1H8Vr6cnp/jkF4nbKu0GdVJO3VXUFmGmrQ== - dependencies: - "@material/animation" "^0.41.0" - "@material/base" "^0.41.0" - "@material/theme" "^0.43.0" - -"@material/list@^0.44.0": - version "0.44.0" - resolved "https://registry.yarnpkg.com/@material/list/-/list-0.44.0.tgz#cf1910e15b66759334b8618d1110fbcc72c3d326" - integrity sha512-35gkN1+XZaau9d9ngyN2x14bzkj/ajZCDm7mbWibDQy272A16j6KuFLQFA8RUQV04OgL4YPVxY87dpCn/p+uTg== - dependencies: - "@material/base" "^0.41.0" - "@material/dom" "^0.41.0" - "@material/ripple" "^0.44.0" - "@material/rtl" "^0.42.0" - "@material/shape" "^0.43.0" - "@material/theme" "^0.43.0" - "@material/typography" "^0.44.0" - -"@material/menu-surface@^0.44.0": - version "0.44.0" - resolved "https://registry.yarnpkg.com/@material/menu-surface/-/menu-surface-0.44.0.tgz#902c081df42859b925a5b4502791b3febf48f1ae" - integrity sha512-s49kvIlQ4H5wvMD4yeHMMqnamPod06IUagMK6Ry0oTpUANSnyeNXxa3HkScl7DMJiS8IJeV21fSLAzlZYP2PDQ== - dependencies: - "@material/animation" "^0.41.0" - "@material/base" "^0.41.0" - "@material/elevation" "^0.44.0" - "@material/rtl" "^0.42.0" - "@material/shape" "^0.43.0" - "@material/theme" "^0.43.0" - -"@material/menu@^0.44.0": - version "0.44.0" - resolved "https://registry.yarnpkg.com/@material/menu/-/menu-0.44.0.tgz#776ec8a04406266a0a0a13eb140b1fd691e442cb" - integrity sha512-92XvAcv9rBW1jQ3UvwJ8zk9hbSRe/FqSuFdZ9fNPE348dCY2pbcdQfnUJTe3ycAN/I1c5frkrhx8F0II+nfbNQ== - dependencies: - "@material/base" "^0.41.0" - "@material/list" "^0.44.0" - "@material/menu-surface" "^0.44.0" - "@material/ripple" "^0.44.0" - "@material/rtl" "^0.42.0" - -"@material/notched-outline@^0.44.0": - version "0.44.0" - resolved "https://registry.yarnpkg.com/@material/notched-outline/-/notched-outline-0.44.0.tgz#d5a2e1d649921575a7cd2e88ee4581e4a1809573" - integrity sha512-c3nqOqUQAmW3h4zBbZVbMRdf4nNTYm0tVwXIAwmcCs5nvAthEHnzHwwFddNP7/9Wju6LZ0uqWn6xlyKly0uipw== - dependencies: - "@material/animation" "^0.41.0" - "@material/base" "^0.41.0" - "@material/floating-label" "^0.44.0" - "@material/rtl" "^0.42.0" - "@material/shape" "^0.43.0" - "@material/theme" "^0.43.0" - -"@material/radio@^0.44.0": - version "0.44.0" - resolved "https://registry.yarnpkg.com/@material/radio/-/radio-0.44.0.tgz#f4cacdfabc7d765aa000cb34c5a37966f6d4fd6d" - integrity sha512-ar7uhlfHuSwM9JUUjpv7pLDLE0p436cCMxNTpmMjWabfvo3pMWlExvk72Oj81tBgfxY/uASLB3oj4neudXu9JQ== - dependencies: - "@material/animation" "^0.41.0" - "@material/base" "^0.41.0" - "@material/ripple" "^0.44.0" - "@material/selection-control" "^0.44.0" - "@material/theme" "^0.43.0" - -"@material/ripple@^0.44.0": - version "0.44.0" - resolved "https://registry.yarnpkg.com/@material/ripple/-/ripple-0.44.0.tgz#98920ff8ec4bf5714c97df3d190f02f8a5b476cc" - integrity sha512-MlaW4nUDgzS0JOBfsUawXyTOilr0jn+xvTVn6PEaGh2rmhNA54AhixXvdsVUWE9lfmHAsZV0AJHz2z7nunNhbQ== - dependencies: - "@material/animation" "^0.41.0" - "@material/base" "^0.41.0" - "@material/feature-targeting" "^0.44.0" - "@material/theme" "^0.43.0" - -"@material/rtl@^0.42.0": - version "0.42.0" - resolved "https://registry.yarnpkg.com/@material/rtl/-/rtl-0.42.0.tgz#1836e78186c2d8b996f6fbf97adab203535335bc" - integrity sha512-VrnrKJzhmspsN8WXHuxxBZ69yM5IwhCUqWr1t1eNfw3ZEvEj7i1g3P31HGowKThIN1dc1Wh4LE14rCISWCtv5w== - -"@material/select@^0.44.0": - version "0.44.0" - resolved "https://registry.yarnpkg.com/@material/select/-/select-0.44.0.tgz#8041b4fe6247d013b0f12685fbdf50aa9ff57b35" - integrity sha512-tw3/QIBLuRCT+5IXx4IPiJk7FzeGeR65JEizdRUItH8yzoIiQLs/b2i3KtHM2YBXHgeUcEBF2AOqPX2opdYhug== - dependencies: - "@material/animation" "^0.41.0" - "@material/base" "^0.41.0" - "@material/floating-label" "^0.44.0" - "@material/line-ripple" "^0.43.0" - "@material/menu" "^0.44.0" - "@material/menu-surface" "^0.44.0" - "@material/notched-outline" "^0.44.0" - "@material/ripple" "^0.44.0" - "@material/rtl" "^0.42.0" - "@material/shape" "^0.43.0" - "@material/theme" "^0.43.0" - "@material/typography" "^0.44.0" - -"@material/selection-control@^0.44.0": - version "0.44.0" - resolved "https://registry.yarnpkg.com/@material/selection-control/-/selection-control-0.44.0.tgz#63d5c65a47a9f54f5a0316b5ecdb5e5f35108609" - integrity sha512-HgCAPnMVMEj4X4ILkFSifqtZ3Tcc5HkU+Lfk9g0807sCaN/qBKWkYKLH2WJUbW8uk+MXK7DgP1khtS5zzanJWA== - dependencies: - "@material/ripple" "^0.44.0" - -"@material/shape@^0.43.0": - version "0.43.0" - resolved "https://registry.yarnpkg.com/@material/shape/-/shape-0.43.0.tgz#b877acfd8be8abc9ddcf6601eb60dd0588292415" - integrity sha512-KGnoQV4G2OQbMe5Lr5Xbk8XNlO93Qi/juxXtd2wrAfiaPmktD8ug0CwdVDOPBOmj9a0gX3Ofi9XWcoU+tLEVjg== - -"@material/slider@^0.44.0": - version "0.44.0" - resolved "https://registry.yarnpkg.com/@material/slider/-/slider-0.44.0.tgz#2055df894eb725e541cde50a544719c07934755b" - integrity sha512-Lnn2fdUesXX4O0UpJzveEuOj+og+dXCwhal73u3l3NXEdc/eRgYxwWdF3ww4MmCZ786EwUmjb4vIc9olN4DO3A== - dependencies: - "@material/animation" "^0.41.0" - "@material/base" "^0.41.0" - "@material/rtl" "^0.42.0" - "@material/theme" "^0.43.0" - "@material/typography" "^0.44.0" - -"@material/snackbar@^0.44.0": - version "0.44.0" - resolved "https://registry.yarnpkg.com/@material/snackbar/-/snackbar-0.44.0.tgz#d98672b849f5f295e4fac2d474a9c80f11945518" - integrity sha512-KhCrmJm8Zu/ZZPuRCGfMKsZ0vudINlNgTjlOau0kQ/UgR1xBUvLOE8NjyXZr0RQz5obyW7xpyIWIpscn0IUeyw== - dependencies: - "@material/animation" "^0.41.0" - "@material/base" "^0.41.0" - "@material/button" "^0.44.0" - "@material/dom" "^0.41.0" - "@material/icon-button" "^0.44.0" - "@material/ripple" "^0.44.0" - "@material/rtl" "^0.42.0" - "@material/shape" "^0.43.0" - "@material/theme" "^0.43.0" - "@material/typography" "^0.44.0" - -"@material/switch@^0.44.0": - version "0.44.0" - resolved "https://registry.yarnpkg.com/@material/switch/-/switch-0.44.0.tgz#f2cbb447437b12eb3bc7f0ec8318dbd3b4f0afce" - integrity sha512-EadCg6lHUF260R2Q/l++vXIITqacvbXlobSoewA5ib6y9BU2g7l13wL1W8xAVJNUMgFa/PyN+EKT3oCql7jZLg== - dependencies: - "@material/animation" "^0.41.0" - "@material/base" "^0.41.0" - "@material/elevation" "^0.44.0" - "@material/ripple" "^0.44.0" - "@material/rtl" "^0.42.0" - "@material/selection-control" "^0.44.0" - "@material/theme" "^0.43.0" - -"@material/tab-bar@^0.44.0": - version "0.44.0" - resolved "https://registry.yarnpkg.com/@material/tab-bar/-/tab-bar-0.44.0.tgz#b17d791bd557b1d84892fef1a1d8b8d6fef7c6d6" - integrity sha512-kCrt05d61YXyY43SNc0dPGuqysbcLr/KRDBvzpXgE4gv2jCCVhhjAH10KPlx8pthp/UtvrYJHb34acAKEGzdHA== - dependencies: - "@material/base" "^0.41.0" - "@material/elevation" "^0.44.0" - "@material/tab" "^0.44.0" - "@material/tab-scroller" "^0.44.0" - -"@material/tab-indicator@^0.43.0": - version "0.43.0" - resolved "https://registry.yarnpkg.com/@material/tab-indicator/-/tab-indicator-0.43.0.tgz#37fd05513ba55ae218d9068c986c2676096fd6eb" - integrity sha512-RMNMQpWYghWpM6d0ayfuHEPzTiebKG0bMthViiD6tly8PubmOT8mShNhPm8ihybhDPUOLSz+7V4QNE5wikLEYg== - dependencies: - "@material/animation" "^0.41.0" - "@material/base" "^0.41.0" - "@material/theme" "^0.43.0" - -"@material/tab-scroller@^0.44.0": - version "0.44.0" - resolved "https://registry.yarnpkg.com/@material/tab-scroller/-/tab-scroller-0.44.0.tgz#82d092ed45d2ee9d82038bed318e6ff6bdc36dad" - integrity sha512-Ufd3NWBN11kY2oA7bGmTYWGP1uz2mq0tfDM0JOiqoLMgD7y3Z18kmxnpq2qkg1vi4kvix28hBYGGMfLlq9rGDA== - dependencies: - "@material/animation" "^0.41.0" - "@material/base" "^0.41.0" - "@material/tab" "^0.44.0" - -"@material/tab@^0.44.0": - version "0.44.0" - resolved "https://registry.yarnpkg.com/@material/tab/-/tab-0.44.0.tgz#254b92cff99015f0bd59a86d08d3f1c4744d0742" - integrity sha512-czrbGjtKkmUS3iYBX523xT5GOkjP0h+0x9fTnw+heFNpw5dCn6cZvlj3D9ayZU+ZH93x68TFhFVBuLU5f0EBXw== - dependencies: - "@material/base" "^0.41.0" - "@material/ripple" "^0.44.0" - "@material/rtl" "^0.42.0" - "@material/tab-indicator" "^0.43.0" - "@material/theme" "^0.43.0" - "@material/typography" "^0.44.0" - -"@material/textfield@^0.44.0": - version "0.44.0" - resolved "https://registry.yarnpkg.com/@material/textfield/-/textfield-0.44.0.tgz#277b33948ddff33f7f643323895e5a683f013601" - integrity sha512-IMBwMcE82eVU+Wifpu0t84tozvBPLCeqQELDtZNYujKg3RxaultzJLwIyGKPMZ9R4yPEpV2vgXPGKE+2/AWt0g== - dependencies: - "@material/animation" "^0.41.0" - "@material/base" "^0.41.0" - "@material/floating-label" "^0.44.0" - "@material/line-ripple" "^0.43.0" - "@material/notched-outline" "^0.44.0" - "@material/ripple" "^0.44.0" - "@material/rtl" "^0.42.0" - "@material/shape" "^0.43.0" - "@material/theme" "^0.43.0" - "@material/typography" "^0.44.0" - -"@material/theme@^0.43.0": - version "0.43.0" - resolved "https://registry.yarnpkg.com/@material/theme/-/theme-0.43.0.tgz#6d9fa113c82e841817882172c152d60d2d203ca6" - integrity sha512-/zndZL6EihI18v2mYd4O8xvOBAAXmLeHyHVK28LozSAaJ9okQgD25wq5Ktk95oMTmPIC+rH66KcK6371ivNk8g== - -"@material/toolbar@^0.44.0": - version "0.44.0" - resolved "https://registry.yarnpkg.com/@material/toolbar/-/toolbar-0.44.0.tgz#6689aecdeccc78b7a890a3abbe8b68a2c6339307" - integrity sha512-YgLlOFQ5VzFLQBpXYSMviEbYox0fia+sasHuYPUhTAtas1ExVt9EEiIolDSVvhv2PruTReKKefxSbXAqGlOHog== - dependencies: - "@material/base" "^0.41.0" - "@material/elevation" "^0.44.0" - "@material/ripple" "^0.44.0" - "@material/rtl" "^0.42.0" - "@material/theme" "^0.43.0" - "@material/typography" "^0.44.0" - -"@material/top-app-bar@^0.44.0": - version "0.44.0" - resolved "https://registry.yarnpkg.com/@material/top-app-bar/-/top-app-bar-0.44.0.tgz#2495c7f9567568fb961ccced24f479c4806a72af" - integrity sha512-tf0yXQJARYs8UPaH8oo3LnsSHEiur7Zm8Fc3hv3F0gNRRaZYBjwsMQMVbZZaWoQCWskMALyntBg+Fo18zdgDxw== - dependencies: - "@material/animation" "^0.41.0" - "@material/base" "^0.41.0" - "@material/elevation" "^0.44.0" - "@material/ripple" "^0.44.0" - "@material/rtl" "^0.42.0" - "@material/shape" "^0.43.0" - "@material/theme" "^0.43.0" - "@material/typography" "^0.44.0" - -"@material/typography@^0.44.0": - version "0.44.0" - resolved "https://registry.yarnpkg.com/@material/typography/-/typography-0.44.0.tgz#cf61dce2ee89bfa084d86e1b0f270a585bf9dfaf" - integrity sha512-m4SjA9OjZRDKowN3cPzEa8e2GlTlEn3ZmW/Fy9eRNSp83iY+8a0xl6kCaF80v5qAVwVcpfEFyEHWxMJtkBw2uA== - -"@types/prop-types@*": - version "15.5.8" - resolved "https://registry.yarnpkg.com/@types/prop-types/-/prop-types-15.5.8.tgz#8ae4e0ea205fe95c3901a5a1df7f66495e3a56ce" - integrity sha512-3AQoUxQcQtLHsK25wtTWIoIpgYjH3vSDroZOUr7PpCHw/jLY1RB9z9E8dBT/OSmwStVgkRNvdh+ZHNiomRieaw== - -"@types/react-dom@^16.8.0": - version "16.8.0" - resolved "https://registry.yarnpkg.com/@types/react-dom/-/react-dom-16.8.0.tgz#c565f43f9d2ec911f9e0b8f3b74e25e67879aa3f" - integrity sha512-Jp4ufcEEjVJEB0OHq2MCZcE1u3KYUKO6WnSuiU/tZeYeiZxUoQavfa/TZeiIT+1XoN6l0lQVNM30VINZFDeolQ== - dependencies: - "@types/react" "*" - -"@types/react@*", "@types/react@^16.8.2": - version "16.8.2" - resolved "https://registry.yarnpkg.com/@types/react/-/react-16.8.2.tgz#3b7a7f7ea89d1c7d68b00849fb5de839011c077b" - integrity sha512-6mcKsqlqkN9xADrwiUz2gm9Wg4iGnlVGciwBRYFQSMWG6MQjhOZ/AVnxn+6v8nslFgfYTV8fNdE6XwKu6va5PA== - dependencies: - "@types/prop-types" "*" - csstype "^2.2.0" - -csstype@^2.2.0: - version "2.6.2" - resolved "https://registry.yarnpkg.com/csstype/-/csstype-2.6.2.tgz#3043d5e065454579afc7478a18de41909c8a2f01" - integrity sha512-Rl7PvTae0pflc1YtxtKbiSqq20Ts6vpIYOD5WBafl4y123DyHUeLrRdQP66sQW8/6gmX8jrYJLXwNeMqYVJcow== - -focus-trap@^4.0.2: - version "4.0.2" - resolved "https://registry.yarnpkg.com/focus-trap/-/focus-trap-4.0.2.tgz#4ee2b96547c9ea0e4252a2d4b2cca68944194663" - integrity sha512-HtLjfAK7Hp2qbBtLS6wEznID1mPT+48ZnP2nkHzgjpL4kroYHg0CdqJ5cTXk+UO5znAxF5fRUkhdyfgrhh8Lzw== - dependencies: - tabbable "^3.1.2" - xtend "^4.0.1" - -"js-tokens@^3.0.0 || ^4.0.0": - version "4.0.0" - resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" - integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== - -loose-envify@^1.1.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.4.0.tgz#71ee51fa7be4caec1a63839f7e682d8132d30caf" - integrity sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q== - dependencies: - js-tokens "^3.0.0 || ^4.0.0" - -material-components-web@^0.44.0: - version "0.44.0" - resolved "https://registry.yarnpkg.com/material-components-web/-/material-components-web-0.44.0.tgz#ff782e8d7bdd8212d3c6022a731258d0d42da531" - integrity sha512-BSRLf58SMVhAvlDhJDlcgYuvzeMwbMHKTJ7oIB8LaM24ZpXBxP9XCYJpKheMtiVLrgllCGDlJ/47OIDReHQXdQ== - dependencies: - "@material/animation" "^0.41.0" - "@material/auto-init" "^0.41.0" - "@material/base" "^0.41.0" - "@material/button" "^0.44.0" - "@material/card" "^0.44.0" - "@material/checkbox" "^0.44.0" - "@material/chips" "^0.44.0" - "@material/dialog" "^0.44.0" - "@material/dom" "^0.41.0" - "@material/drawer" "^0.44.0" - "@material/elevation" "^0.44.0" - "@material/fab" "^0.44.0" - "@material/feature-targeting" "^0.44.0" - "@material/floating-label" "^0.44.0" - "@material/form-field" "^0.44.0" - "@material/grid-list" "^0.44.0" - "@material/icon-button" "^0.44.0" - "@material/icon-toggle" "^0.44.0" - "@material/image-list" "^0.44.0" - "@material/layout-grid" "^0.41.0" - "@material/line-ripple" "^0.43.0" - "@material/linear-progress" "^0.43.0" - "@material/list" "^0.44.0" - "@material/menu" "^0.44.0" - "@material/menu-surface" "^0.44.0" - "@material/notched-outline" "^0.44.0" - "@material/radio" "^0.44.0" - "@material/ripple" "^0.44.0" - "@material/rtl" "^0.42.0" - "@material/select" "^0.44.0" - "@material/selection-control" "^0.44.0" - "@material/shape" "^0.43.0" - "@material/slider" "^0.44.0" - "@material/snackbar" "^0.44.0" - "@material/switch" "^0.44.0" - "@material/tab" "^0.44.0" - "@material/tab-bar" "^0.44.0" - "@material/tab-indicator" "^0.43.0" - "@material/tab-scroller" "^0.44.0" - "@material/textfield" "^0.44.0" - "@material/theme" "^0.43.0" - "@material/toolbar" "^0.44.0" - "@material/top-app-bar" "^0.44.0" - "@material/typography" "^0.44.0" - -object-assign@^4.1.1: - version "4.1.1" - resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" - integrity sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM= - -prop-types@^15.6.2: - version "15.7.1" - resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.7.1.tgz#2fa61e0a699d428b40320127733ee2931f05d9d1" - integrity sha512-f8Lku2z9kERjOCcnDOPm68EBJAO2K00Q5mSgPAUE/gJuBgsYLbVy6owSrtcHj90zt8PvW+z0qaIIgsIhHOa1Qw== - dependencies: - object-assign "^4.1.1" - react-is "^16.8.1" - -react-dom@^16.8.1: - version "16.8.1" - resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-16.8.1.tgz#ec860f98853d09d39bafd3a6f1e12389d283dbb4" - integrity sha512-N74IZUrPt6UiDjXaO7UbDDFXeUXnVhZzeRLy/6iqqN1ipfjrhR60Bp5NuBK+rv3GMdqdIuwIl22u1SYwf330bg== - dependencies: - loose-envify "^1.1.0" - object-assign "^4.1.1" - prop-types "^15.6.2" - scheduler "^0.13.1" - -react-is@^16.8.1: - version "16.8.1" - resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.8.1.tgz#a80141e246eb894824fb4f2901c0c50ef31d4cdb" - integrity sha512-ioMCzVDWvCvKD8eeT+iukyWrBGrA3DiFYkXfBsVYIRdaREZuBjENG+KjrikavCLasozqRWTwFUagU/O4vPpRMA== - -react@^16.8.1: - version "16.8.1" - resolved "https://registry.yarnpkg.com/react/-/react-16.8.1.tgz#ae11831f6cb2a05d58603a976afc8a558e852c4a" - integrity sha512-wLw5CFGPdo7p/AgteFz7GblI2JPOos0+biSoxf1FPsGxWQZdN/pj6oToJs1crn61DL3Ln7mN86uZ4j74p31ELQ== - dependencies: - loose-envify "^1.1.0" - object-assign "^4.1.1" - prop-types "^15.6.2" - scheduler "^0.13.1" - -scheduler@^0.13.1: - version "0.13.1" - resolved "https://registry.yarnpkg.com/scheduler/-/scheduler-0.13.1.tgz#1a217df1bfaabaf4f1b92a9127d5d732d85a9591" - integrity sha512-VJKOkiKIN2/6NOoexuypwSrybx13MY7NSy9RNt8wPvZDMRT1CW6qlpF5jXRToXNHz3uWzbm2elNpZfXfGPqP9A== - dependencies: - loose-envify "^1.1.0" - object-assign "^4.1.1" - -tabbable@^3.1.2: - version "3.1.2" - resolved "https://registry.yarnpkg.com/tabbable/-/tabbable-3.1.2.tgz#f2d16cccd01f400e38635c7181adfe0ad965a4a2" - integrity sha512-wjB6puVXTYO0BSFtCmWQubA/KIn7Xvajw0x0l6eJUudMG/EAiJvIUnyNX6xO4NpGrJ16lbD0eUseB9WxW0vlpQ== - -xtend@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.1.tgz#a5c6d532be656e23db820efb943a1f04998d63af" - integrity sha1-pcbVMr5lbiPbgg77lDofBJmNY68= diff --git a/packages/disposable/package.json b/packages/disposable/package.json deleted file mode 100644 index 87b23eb6..00000000 --- a/packages/disposable/package.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "name": "@coder/disposable", - "main": "src/index.ts" -} diff --git a/packages/disposable/src/disposable.ts b/packages/disposable/src/disposable.ts deleted file mode 100644 index 4fc3d52d..00000000 --- a/packages/disposable/src/disposable.ts +++ /dev/null @@ -1,3 +0,0 @@ -export interface IDisposable { - dispose(): void; -} diff --git a/packages/disposable/src/index.ts b/packages/disposable/src/index.ts deleted file mode 100644 index 8991adf4..00000000 --- a/packages/disposable/src/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "./disposable"; diff --git a/packages/disposable/yarn.lock b/packages/disposable/yarn.lock deleted file mode 100644 index fb57ccd1..00000000 --- a/packages/disposable/yarn.lock +++ /dev/null @@ -1,4 +0,0 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. -# yarn lockfile v1 - - diff --git a/packages/dns/.gcloudignore b/packages/dns/.gcloudignore deleted file mode 100644 index b1a2026b..00000000 --- a/packages/dns/.gcloudignore +++ /dev/null @@ -1,18 +0,0 @@ -# This file specifies files that are *not* uploaded to Google Cloud Platform -# using gcloud. It follows the same syntax as .gitignore, with the addition of -# "#!include" directives (which insert the entries of the given .gitignore-style -# file at that point). -# -# For more information, run: -# $ gcloud topic gcloudignore -# -.gcloudignore -# If you would like to upload your .git directory, .gitignore file or files -# from your .gitignore file, remove the corresponding line -# below: -.git -.gitignore -src - -# Node.js dependencies: -node_modules/ \ No newline at end of file diff --git a/packages/dns/Dockerfile b/packages/dns/Dockerfile deleted file mode 100644 index 376d334a..00000000 --- a/packages/dns/Dockerfile +++ /dev/null @@ -1,8 +0,0 @@ -FROM node - -COPY out/main.js /main.js -COPY package.json /package.json -RUN yarn -ENV NODE_ENV production - -CMD ["node", "/main.js"] \ No newline at end of file diff --git a/packages/dns/app.yaml b/packages/dns/app.yaml deleted file mode 100644 index 6b329a92..00000000 --- a/packages/dns/app.yaml +++ /dev/null @@ -1,5 +0,0 @@ -runtime: nodejs10 -service: cdrdns -network: - forwarded_ports: - - 53/udp \ No newline at end of file diff --git a/packages/dns/package.json b/packages/dns/package.json deleted file mode 100644 index a3817a77..00000000 --- a/packages/dns/package.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "name": "@coder/dns", - "main": "out/main.js", - "scripts": { - "build": "../../node_modules/.bin/webpack --config ./webpack.config.js" - }, - "dependencies": { - "node-named": "^0.0.1" - }, - "devDependencies": { - "ip-address": "^5.8.9", - "@types/ip-address": "^5.8.2" - } -} diff --git a/packages/dns/src/dns.ts b/packages/dns/src/dns.ts deleted file mode 100644 index 06d3da77..00000000 --- a/packages/dns/src/dns.ts +++ /dev/null @@ -1,109 +0,0 @@ -import { field, logger } from "@coder/logger"; -import * as http from "http"; -//@ts-ignore -import * as named from "node-named"; -import * as ip from "ip-address"; -import { words, wordKeys } from "./words"; - -import * as dgram from "dgram"; - -const oldCreate = dgram.createSocket; - -// tslint:disable-next-line:no-any -(dgram).createSocket = (_: any, callback: any): dgram.Socket => { - return oldCreate("udp4", callback); -}; - -interface DnsQuery { - name(): string; - // tslint:disable-next-line:no-any - addAnswer(domain: string, target: any, ttl: number): void; -} - -const dnsServer: { - listen(port: number, host: string, callback: () => void): void; - on(event: "query", callback: (query: DnsQuery) => void): void; - send(query: DnsQuery): void; -} = named.createServer(); - -const isDev = process.env.NODE_ENV !== "production"; -const dnsPort = isDev ? 9999 : 53; -dnsServer.listen(dnsPort, "0.0.0.0", () => { - logger.info("DNS server started", field("port", dnsPort)); -}); - -dnsServer.on("query", (query) => { - const domain = query.name(); - const reqParts = domain.split("."); - if (reqParts.length < 2) { - dnsServer.send(query); - logger.info("Invalid request", field("request", domain)); - - return; - } - const allWords = reqParts.shift()!; - if (allWords.length > 16) { - dnsServer.send(query); - logger.info("Invalid request", field("request", domain)); - - return; - } - const wordParts = allWords.split(/(?=[A-Z])/); - const ipParts: string[] = []; - // Should be left with HowAreYouNow - for (let i = 0; i < wordParts.length; i++) { - const part = wordParts[i]; - if (part.length > 4) { - dnsServer.send(query); - logger.info("Words too long", field("request", domain)); - - return; - } - const ipPart = words[part.toLowerCase()]; - if (typeof ipPart === "undefined") { - dnsServer.send(query); - logger.info("Word not found in index", field("part", part), field("request", domain)); - - return; - } - ipParts.push(ipPart.toString()); - } - - const address = new ip.Address4(ipParts.join(".")); - - if (address.isValid()) { - logger.info("Responded with valid address query", field("address", address.address), field("request", domain)); - query.addAnswer(domain, new named.ARecord(address.address), 99999); - } else { - logger.warn("Received invalid request", field("request", domain)); - } - - dnsServer.send(query); -}); - -const httpServer = http.createServer((request, response) => { - const remoteAddr = request.connection.remoteAddress; - if (!remoteAddr) { - response.writeHead(422); - response.end(); - - return; - } - const hostHeader = request.headers.host; - if (!hostHeader) { - response.writeHead(422); - response.end(); - - return; - } - const host = remoteAddr.split(".").map(p => wordKeys[Number.parseInt(p, 10)]).map(s => s.charAt(0).toUpperCase() + s.slice(1)).join(""); - logger.info("Resolved host", field("remote-addr", remoteAddr), field("host", host)); - response.writeHead(200); - response.write(`${host}.${hostHeader}`); - response.end(); -}); - -const httpPort = isDev ? 3000 : 80; -httpServer.listen(httpPort, "0.0.0.0", () => { - logger.info("HTTP server started", field("port", httpPort)); -}); diff --git a/packages/dns/src/words.ts b/packages/dns/src/words.ts deleted file mode 100644 index a29a4933..00000000 --- a/packages/dns/src/words.ts +++ /dev/null @@ -1,260 +0,0 @@ -export const words: { readonly [key: string]: number } = { - term: 0, - salt: 1, - barn: 2, - corn: 3, - went: 4, - feel: 5, - rest: 6, - will: 7, - pale: 8, - cave: 9, - dirt: 10, - time: 11, - in: 12, - pie: 13, - star: 14, - iron: 15, - door: 16, - tone: 17, - want: 18, - task: 19, - zoo: 20, - nor: 21, - fall: 22, - tell: 23, - noon: 24, - new: 25, - per: 26, - end: 27, - arm: 28, - been: 29, - wolf: 30, - port: 31, - beat: 32, - pour: 33, - far: 34, - may: 35, - tie: 36, - moon: 37, - duck: 38, - us: 39, - led: 40, - met: 41, - bank: 42, - day: 43, - due: 44, - both: 45, - pet: 46, - gate: 47, - pain: 48, - rock: 49, - fill: 50, - open: 51, - thus: 52, - mark: 53, - our: 54, - loud: 55, - wife: 56, - say: 57, - flag: 58, - as: 59, - ride: 60, - once: 61, - sun: 62, - duty: 63, - pure: 64, - made: 65, - gulf: 66, - pig: 67, - fish: 68, - name: 69, - army: 70, - have: 71, - ill: 72, - meal: 73, - ago: 74, - late: 75, - view: 76, - atom: 77, - pen: 78, - mud: 79, - tail: 80, - sink: 81, - cow: 82, - rear: 83, - fur: 84, - go: 85, - suit: 86, - come: 87, - fear: 88, - also: 89, - sail: 90, - row: 91, - lay: 92, - noun: 93, - hat: 94, - am: 95, - mail: 96, - keep: 97, - drop: 98, - than: 99, - weak: 100, - by: 101, - who: 102, - fire: 103, - good: 104, - sick: 105, - care: 106, - pink: 107, - lady: 108, - war: 109, - sets: 110, - swam: 111, - well: 112, - shoe: 113, - bent: 114, - fuel: 115, - wet: 116, - fog: 117, - land: 118, - lead: 119, - tax: 120, - deal: 121, - verb: 122, - take: 123, - save: 124, - gift: 125, - had: 126, - gold: 127, - slow: 128, - drew: 129, - lamp: 130, - roof: 131, - hung: 132, - wild: 133, - able: 134, - girl: 135, - warn: 136, - were: 137, - know: 138, - camp: 139, - milk: 140, - neck: 141, - aid: 142, - fair: 143, - bell: 144, - dig: 145, - hope: 146, - wood: 147, - away: 148, - cook: 149, - just: 150, - form: 151, - food: 152, - hall: 153, - mind: 154, - for: 155, - card: 156, - half: 157, - sat: 158, - now: 159, - team: 160, - rush: 161, - face: 162, - wire: 163, - such: 164, - tool: 165, - make: 166, - fat: 167, - hold: 168, - inch: 169, - bill: 170, - mean: 171, - tide: 172, - burn: 173, - talk: 174, - tape: 175, - hard: 176, - mine: 177, - on: 178, - year: 179, - rich: 180, - sum: 181, - yes: 182, - baby: 183, - wide: 184, - how: 185, - clay: 186, - car: 187, - here: 188, - cent: 189, - bowl: 190, - post: 191, - said: 192, - see: 193, - raw: 194, - foot: 195, - life: 196, - bar: 197, - from: 198, - path: 199, - meat: 200, - show: 201, - sent: 202, - wait: 203, - mice: 204, - ten: 205, - pot: 206, - nice: 207, - idea: 208, - or: 209, - onto: 210, - rose: 211, - your: 212, - this: 213, - cat: 214, - bet: 215, - took: 216, - hang: 217, - very: 218, - bend: 219, - mix: 220, - base: 221, - jack: 222, - her: 223, - leg: 224, - own: 225, - book: 226, - love: 227, - dawn: 228, - deer: 229, - hit: 230, - rain: 231, - gas: 232, - eat: 233, - tube: 234, - case: 235, - pipe: 236, - get: 237, - joy: 238, - ever: 239, - nest: 240, - home: 241, - egg: 242, - pack: 243, - hand: 244, - cold: 245, - hot: 246, - frog: 247, - peep: 248, - seed: 249, - rawr: 250, - top: 251, - meow: 252, - bark: 253, - eel: 254, - swap: 255, -}; - -export const wordKeys = Object.keys(words); diff --git a/packages/dns/webpack.config.js b/packages/dns/webpack.config.js deleted file mode 100644 index 1d69f59b..00000000 --- a/packages/dns/webpack.config.js +++ /dev/null @@ -1,18 +0,0 @@ -const path = require("path"); -const merge = require("webpack-merge"); - -const root = path.resolve(__dirname, "../.."); - -module.exports = merge( - require(path.join(root, "scripts/webpack.node.config.js"))({ - dirname: __dirname, - name: "dns", - }), { - externals: { - "node-named": "commonjs node-named", - }, - entry: [ - "./packages/dns/src/dns.ts" - ], - }, -); diff --git a/packages/dns/yarn.lock b/packages/dns/yarn.lock deleted file mode 100644 index c4abe2a7..00000000 --- a/packages/dns/yarn.lock +++ /dev/null @@ -1,88 +0,0 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. -# yarn lockfile v1 - - -"@types/ip-address@^5.8.2": - version "5.8.2" - resolved "https://registry.yarnpkg.com/@types/ip-address/-/ip-address-5.8.2.tgz#5e413c477f78b3a264745eac937538a6e6e0c1f6" - integrity sha512-LFlDGRjJDnahfPyNCZGXvlaevSmZTi/zDxjTdXeTs8TQ9pQkNZKbCWaJXW29a3bGPRsASqeO+jGgZlaTUi9jTw== - dependencies: - "@types/jsbn" "*" - -"@types/jsbn@*": - version "1.2.29" - resolved "https://registry.yarnpkg.com/@types/jsbn/-/jsbn-1.2.29.tgz#28229bc0262c704a1506c3ed69a7d7e115bd7832" - integrity sha512-2dVz9LTEGWVj9Ov9zaDnpvqHFV+W4bXtU0EUEGAzWfdRNO3dlUuosdHpENI6/oQW+Kejn0hAjk6P/czs9h/hvg== - -bunyan@0.7.0: - version "0.7.0" - resolved "https://registry.yarnpkg.com/bunyan/-/bunyan-0.7.0.tgz#921065e70c936fe302a740e2c5605775beea2f42" - integrity sha1-khBl5wyTb+MCp0DixWBXdb7qL0I= - -"coffee-script@>= 1.1.1": - version "1.12.7" - resolved "https://registry.yarnpkg.com/coffee-script/-/coffee-script-1.12.7.tgz#c05dae0cb79591d05b3070a8433a98c9a89ccc53" - integrity sha512-fLeEhqwymYat/MpTPUjSKHVYYl0ec2mOyALEMLmzr5i1isuG+6jfI2j2d5oBO3VIzgUXgBVIcOT9uH1TFxBckw== - -ip-address@^5.8.9: - version "5.8.9" - resolved "https://registry.yarnpkg.com/ip-address/-/ip-address-5.8.9.tgz#6379277c23fc5adb20511e4d23ec2c1bde105dfd" - integrity sha512-7ay355oMN34iXhET1BmCJVsHjOTSItEEIIpOs38qUC23AIhOy+xIPnkrTuEFjeLMrTJ7m8KMXWgWfy/2Vn9sDw== - dependencies: - jsbn "1.1.0" - lodash.find "^4.6.0" - lodash.max "^4.0.1" - lodash.merge "^4.6.0" - lodash.padstart "^4.6.1" - lodash.repeat "^4.1.0" - sprintf-js "1.1.0" - -ipaddr.js@0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/ipaddr.js/-/ipaddr.js-0.1.1.tgz#28c6a7c116a021c555544f906ab1ad540b1d635a" - integrity sha1-KManwRagIcVVVE+QarGtVAsdY1o= - dependencies: - coffee-script ">= 1.1.1" - -jsbn@1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-1.1.0.tgz#b01307cb29b618a1ed26ec79e911f803c4da0040" - integrity sha1-sBMHyym2GKHtJux56RH4A8TaAEA= - -lodash.find@^4.6.0: - version "4.6.0" - resolved "https://registry.yarnpkg.com/lodash.find/-/lodash.find-4.6.0.tgz#cb0704d47ab71789ffa0de8b97dd926fb88b13b1" - integrity sha1-ywcE1Hq3F4n/oN6Ll92Sb7iLE7E= - -lodash.max@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/lodash.max/-/lodash.max-4.0.1.tgz#8735566c618b35a9f760520b487ae79658af136a" - integrity sha1-hzVWbGGLNan3YFILSHrnllivE2o= - -lodash.merge@^4.6.0: - version "4.6.1" - resolved "https://registry.yarnpkg.com/lodash.merge/-/lodash.merge-4.6.1.tgz#adc25d9cb99b9391c59624f379fbba60d7111d54" - integrity sha512-AOYza4+Hf5z1/0Hztxpm2/xiPZgi/cjMqdnKTUWTBSKchJlxXXuUSxCCl8rJlf4g6yww/j6mA8nC8Hw/EZWxKQ== - -lodash.padstart@^4.6.1: - version "4.6.1" - resolved "https://registry.yarnpkg.com/lodash.padstart/-/lodash.padstart-4.6.1.tgz#d2e3eebff0d9d39ad50f5cbd1b52a7bce6bb611b" - integrity sha1-0uPuv/DZ05rVD1y9G1KnvOa7YRs= - -lodash.repeat@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/lodash.repeat/-/lodash.repeat-4.1.0.tgz#fc7de8131d8c8ac07e4b49f74ffe829d1f2bec44" - integrity sha1-/H3oEx2MisB+S0n3T/6CnR8r7EQ= - -node-named@^0.0.1: - version "0.0.1" - resolved "https://registry.yarnpkg.com/node-named/-/node-named-0.0.1.tgz#3607b434cf237ab99440f5ff6d19c05e3a93e217" - integrity sha1-Nge0NM8jermUQPX/bRnAXjqT4hc= - dependencies: - bunyan "0.7.0" - ipaddr.js "0.1.1" - -sprintf-js@1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.1.0.tgz#cffcaf702daf65ea39bb4e0fa2b299cec1a1be46" - integrity sha1-z/yvcC2vZeo5u04PorKZzsGhvkY= diff --git a/packages/events/package.json b/packages/events/package.json deleted file mode 100644 index 2c540440..00000000 --- a/packages/events/package.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "name": "@coder/events", - "main": "./src/index.ts" -} diff --git a/packages/events/src/events.ts b/packages/events/src/events.ts deleted file mode 100644 index 0befa8f6..00000000 --- a/packages/events/src/events.ts +++ /dev/null @@ -1,99 +0,0 @@ -import { IDisposable } from "@coder/disposable"; - -export interface Event { - (listener: (value: T) => void): IDisposable; - (id: number | string, listener: (value: T) => void): IDisposable; -} - -/** - * Emitter typecasts for a single event type. You can optionally use IDs, but - * using undefined with IDs will not work. If you emit without an ID, *all* - * listeners regardless of their ID (or lack thereof) will receive the event. - * Similarly, if you listen without an ID you will get *all* events for any or - * no ID. - */ -export class Emitter { - private listeners = void>>[]; - private readonly idListeners = new Map void>>(); - - public get event(): Event { - return (id: number | string | ((value: T) => void), cb?: (value: T) => void): IDisposable => { - if (typeof id !== "function") { - if (this.idListeners.has(id)) { - this.idListeners.get(id)!.push(cb!); - } else { - this.idListeners.set(id, [cb!]); - } - - return { - dispose: (): void => { - if (this.idListeners.has(id)) { - const cbs = this.idListeners.get(id)!; - const i = cbs.indexOf(cb!); - if (i !== -1) { - cbs.splice(i, 1); - } - } - }, - }; - } - - cb = id; - this.listeners.push(cb); - - return { - dispose: (): void => { - const i = this.listeners.indexOf(cb!); - if (i !== -1) { - this.listeners.splice(i, 1); - } - }, - }; - }; - } - - /** - * Emit an event with a value. - */ - public emit(value: T): void; - public emit(id: number | string, value: T): void; - public emit(id: number | string | T, value?: T): void { - if ((typeof id === "number" || typeof id === "string") && typeof value !== "undefined") { - if (this.idListeners.has(id)) { - this.idListeners.get(id)!.forEach((cb) => cb(value!)); - } - this.listeners.forEach((cb) => cb(value!)); - } else { - this.idListeners.forEach((cbs) => cbs.forEach((cb) => cb((id as T)!))); - this.listeners.forEach((cb) => cb((id as T)!)); - } - } - - /** - * Dispose the current events. - */ - public dispose(): void; - public dispose(id: number | string): void; - public dispose(id?: number | string): void { - if (typeof id !== "undefined") { - this.idListeners.delete(id); - } else { - this.listeners = []; - this.idListeners.clear(); - } - } - - public get counts(): { [key: string]: number } { - const counts = <{ [key: string]: number }>{}; - if (this.listeners.length > 0) { - counts["n/a"] = this.listeners.length; - } - this.idListeners.forEach((cbs, id) => { - if (cbs.length > 0) { - counts[`${id}`] = cbs.length; - } - }); - - return counts; - } -} diff --git a/packages/events/src/index.ts b/packages/events/src/index.ts deleted file mode 100644 index 1784004f..00000000 --- a/packages/events/src/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "./events"; diff --git a/packages/events/test/events.test.ts b/packages/events/test/events.test.ts deleted file mode 100644 index 1c92327a..00000000 --- a/packages/events/test/events.test.ts +++ /dev/null @@ -1,122 +0,0 @@ -import { Emitter } from "../src/events"; - -describe("Event", () => { - const emitter = new Emitter(); - - it("should listen to global event", () => { - const fn = jest.fn(); - const d = emitter.event(fn); - emitter.emit(10); - expect(fn).toHaveBeenCalledWith(10); - d.dispose(); - }); - - it("should listen to id event", () => { - const fn = jest.fn(); - const d = emitter.event(0, fn); - emitter.emit(0, 5); - expect(fn).toHaveBeenCalledWith(5); - d.dispose(); - }); - - it("should listen to string id event", () => { - const fn = jest.fn(); - const d = emitter.event("string", fn); - emitter.emit("string", 55); - expect(fn).toHaveBeenCalledWith(55); - d.dispose(); - }); - - it("should not listen wrong id event", () => { - const fn = jest.fn(); - const d = emitter.event(1, fn); - emitter.emit(0, 5); - emitter.emit(1, 6); - expect(fn).toHaveBeenCalledWith(6); - expect(fn).toHaveBeenCalledTimes(1); - d.dispose(); - }); - - it("should listen to id event globally", () => { - const fn = jest.fn(); - const d = emitter.event(fn); - emitter.emit(1, 11); - expect(fn).toHaveBeenCalledWith(11); - d.dispose(); - }); - - it("should listen to global event", () => { - const fn = jest.fn(); - const d = emitter.event(3, fn); - emitter.emit(14); - expect(fn).toHaveBeenCalledWith(14); - d.dispose(); - }); - - it("should listen to id event multiple times", () => { - const fn = jest.fn(); - const disposers = [ - emitter.event(934, fn), - emitter.event(934, fn), - emitter.event(934, fn), - emitter.event(934, fn), - ]; - emitter.emit(934, 324); - expect(fn).toHaveBeenCalledTimes(4); - expect(fn).toHaveBeenCalledWith(324); - disposers.forEach((d) => d.dispose()); - }); - - it("should dispose individually", () => { - const fn = jest.fn(); - const d = emitter.event(fn); - - const fn2 = jest.fn(); - const d2 = emitter.event(1, fn2); - - d.dispose(); - - emitter.emit(12); - emitter.emit(1, 12); - - expect(fn).not.toBeCalled(); - expect(fn2).toBeCalledTimes(2); - - d2.dispose(); - - emitter.emit(12); - emitter.emit(1, 12); - - expect(fn).not.toBeCalled(); - expect(fn2).toBeCalledTimes(2); - }); - - it("should dispose by id", () => { - const fn = jest.fn(); - emitter.event(fn); - - const fn2 = jest.fn(); - emitter.event(1, fn2); - - emitter.dispose(1); - - emitter.emit(12); - emitter.emit(1, 12); - - expect(fn).toBeCalledTimes(2); - expect(fn2).not.toBeCalled(); - }); - - it("should dispose all", () => { - const fn = jest.fn(); - emitter.event(fn); - emitter.event(1, fn); - - emitter.dispose(); - - emitter.emit(12); - emitter.emit(1, 12); - - expect(fn).not.toBeCalled(); - }); -}); diff --git a/packages/events/yarn.lock b/packages/events/yarn.lock deleted file mode 100644 index fb57ccd1..00000000 --- a/packages/events/yarn.lock +++ /dev/null @@ -1,4 +0,0 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. -# yarn lockfile v1 - - diff --git a/packages/ide-api/README.md b/packages/ide-api/README.md deleted file mode 100644 index 3e26f7a6..00000000 --- a/packages/ide-api/README.md +++ /dev/null @@ -1,5 +0,0 @@ -# ide-api - -Provides window listeners for interfacing with the IDE. - -Created for content-scripts. \ No newline at end of file diff --git a/packages/ide-api/api.d.ts b/packages/ide-api/api.d.ts deleted file mode 100644 index e0049fd6..00000000 --- a/packages/ide-api/api.d.ts +++ /dev/null @@ -1,235 +0,0 @@ -// tslint:disable no-any - -import { ITerminalService } from "vs/workbench/contrib/terminal/common/terminal"; -import { IWorkbenchActionRegistry } from 'vs/workbench/common/actions'; -import { Action } from 'vs/base/common/actions'; -import { SyncActionDescriptor } from 'vs/platform/actions/common/actions'; - -export interface EvalHelper { } -interface ActiveEvalEmitter { - removeAllListeners(event?: string): void; - emit(event: string, ...args: any[]): void; - on(event: string, cb: (...args: any[]) => void): void; -} -interface IDisposable { - dispose(): void; -} -interface Disposer extends IDisposable { - onDidDispose: (cb: () => void) => void; -} -interface Event { - (listener: (e: T) => any, thisArgs?: any, disposables?: IDisposable[]): IDisposable; -} -interface IAction extends IDisposable { - id: string; - label: string; - tooltip: string; - class: string | undefined; - enabled: boolean; - checked: boolean; - radio: boolean; - run(event?: any): Promise; -} -interface IStatusbarEntry { - readonly text: string; - readonly tooltip?: string; - readonly color?: string; - readonly command?: string; - readonly arguments?: any[]; - readonly showBeak?: boolean; -} -interface IStatusbarService { - addEntry(entry: IStatusbarEntry, alignment: ide.StatusbarAlignment, priority?: number): IDisposable; - setStatusMessage(message: string, autoDisposeAfter?: number, delayBy?: number): IDisposable; -} -type NotificationMessage = string | Error; -interface INotificationProperties { - sticky?: boolean; - silent?: boolean; -} -interface INotification extends INotificationProperties { - severity: ide.Severity; - message: NotificationMessage; - source?: string; - actions?: INotificationActions; -} -interface INotificationActions { - primary?: IAction[]; - secondary?: IAction[]; -} - -interface INotificationProgress { - infinite(): void; - total(value: number): void; - worked(value: number): void; - done(): void; -} - -interface INotificationHandle { - readonly onDidClose: Event; - readonly progress: INotificationProgress; - updateSeverity(severity: ide.Severity): void; - updateMessage(message: NotificationMessage): void; - updateActions(actions?: INotificationActions): void; - close(): void; -} - -interface IPromptChoice { - label: string; - isSecondary?: boolean; - keepOpen?: boolean; - run: () => void; -} - -interface IPromptOptions extends INotificationProperties { - onCancel?: () => void; -} - -interface INotificationService { - notify(notification: INotification): INotificationHandle; - info(message: NotificationMessage | NotificationMessage[]): void; - warn(message: NotificationMessage | NotificationMessage[]): void; - error(message: NotificationMessage | NotificationMessage[]): void; - prompt(severity: ide.Severity, message: string, choices: IPromptChoice[], options?: IPromptOptions): INotificationHandle; -} - -interface IBaseCommandAction { - id: string; - title: string; - category?: string; -} - -interface ICommandAction extends IBaseCommandAction { - // iconLocation?: { dark: URI; light?: URI; }; - // precondition?: ContextKeyExpr; - // toggled?: ContextKeyExpr; -} - -interface ISerializableCommandAction extends IBaseCommandAction { - // iconLocation?: { dark: UriComponents; light?: UriComponents; }; -} - -interface IMenuItem { - command: ICommandAction; - alt?: ICommandAction; - // when?: ContextKeyExpr; - group?: "navigation" | string; - order?: number; -} - -interface IMenuRegistry { - appendMenuItem(menu: ide.MenuId, item: IMenuItem): IDisposable; -} - -export interface ICommandHandler { - (accessor: any, ...args: any[]): void; -} - -export interface ICommand { - id: string; - handler: ICommandHandler; - description?: ICommandHandlerDescription | null; -} - -export interface ICommandHandlerDescription { - description: string; - args: { name: string; description?: string; }[]; - returns?: string; -} - -interface ICommandRegistry { - registerCommand(command: ICommand): IDisposable; -} - -interface IStorageService { - save(): Promise; -} - -declare namespace ide { - export const client: {}; - - export const workbench: { - readonly action: Action, - readonly syncActionDescriptor: SyncActionDescriptor, - readonly statusbarService: IStatusbarService; - readonly actionsRegistry: IWorkbenchActionRegistry; - readonly notificationService: INotificationService; - readonly storageService: IStorageService; - readonly menuRegistry: IMenuRegistry; - readonly commandRegistry: ICommandRegistry; - readonly terminalService: ITerminalService; - - onFileCreate(cb: (path: string) => void): void; - onFileMove(cb: (path: string, target: string) => void): void; - onFileDelete(cb: (path: string) => void): void; - onFileSaved(cb: (path: string) => void): void; - onFileCopy(cb: (path: string, target: string) => void): void; - - onModelAdded(cb: (path: string, languageId: string) => void): void; - onModelRemoved(cb: (path: string, languageId: string) => void): void; - onModelLanguageChange(cb: (path: string, languageId: string, oldLanguageId: string) => void): void; - - onTerminalAdded(cb: () => void): void; - onTerminalRemoved(cb: () => void): void; - }; - - export enum Severity { - Ignore = 0, - Info = 1, - Warning = 2, - Error = 3, - } - - export enum StatusbarAlignment { - LEFT = 0, - RIGHT = 1, - } - - export enum MenuId { - CommandPalette, - DebugBreakpointsContext, - DebugCallStackContext, - DebugConsoleContext, - DebugVariablesContext, - DebugWatchContext, - EditorContext, - EditorTitle, - EditorTitleContext, - EmptyEditorGroupContext, - ExplorerContext, - MenubarAppearanceMenu, - MenubarDebugMenu, - MenubarEditMenu, - MenubarFileMenu, - MenubarGoMenu, - MenubarHelpMenu, - MenubarLayoutMenu, - MenubarNewBreakpointMenu, - MenubarPreferencesMenu, - MenubarRecentMenu, - MenubarSelectionMenu, - MenubarSwitchEditorMenu, - MenubarSwitchGroupMenu, - MenubarTerminalMenu, - MenubarViewMenu, - OpenEditorsContext, - ProblemsPanelContext, - SCMChangeContext, - SCMResourceContext, - SCMResourceGroupContext, - SCMSourceControl, - SCMTitle, - SearchContext, - TouchBarContext, - ViewItemContext, - ViewTitle, - } -} - -declare global { - interface Window { - ide?: typeof ide; - - addEventListener(event: "ide-ready", callback: (ide: CustomEvent & { readonly ide: typeof ide }) => void): void; - } -} diff --git a/packages/ide-api/package.json b/packages/ide-api/package.json deleted file mode 100644 index 71a1a677..00000000 --- a/packages/ide-api/package.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "name": "@coder/ide-api", - "version": "1.0.4", - "typings": "api.d.ts", - "author": "Coder", - "license": "MIT", - "description": "API for interfacing with the API created for content-scripts" -} \ No newline at end of file diff --git a/packages/ide-api/yarn.lock b/packages/ide-api/yarn.lock deleted file mode 100644 index fb57ccd1..00000000 --- a/packages/ide-api/yarn.lock +++ /dev/null @@ -1,4 +0,0 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. -# yarn lockfile v1 - - diff --git a/packages/ide/package.json b/packages/ide/package.json deleted file mode 100644 index ac53ecb0..00000000 --- a/packages/ide/package.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "name": "@coder/ide", - "description": "Browser-based IDE client abstraction.", - "main": "src/index.ts" -} diff --git a/packages/ide/src/client.ts b/packages/ide/src/client.ts deleted file mode 100644 index 63f91bde..00000000 --- a/packages/ide/src/client.ts +++ /dev/null @@ -1,139 +0,0 @@ -import { field, logger, time, Time } from "@coder/logger"; -import { SharedProcessData } from "@coder/protocol"; -import { retry } from "./retry"; -import { upload } from "./upload"; -import { client } from "./fill/client"; -import { clipboard } from "./fill/clipboard"; -import { INotificationService, IProgressService } from "./fill/notification"; -import "./fill/os"; // Ensure it fills before anything else waiting on initData. - -/** - * A general abstraction of an IDE client. - * - * Everything the client provides is asynchronous so you can wait on what - * you need from it without blocking anything else. - * - * It also provides task management to help asynchronously load and time code. - */ -export abstract class IdeClient { - public readonly retry = retry; - public readonly clipboard = clipboard; - public readonly upload = upload; - - private start: Time | undefined; - private readonly tasks = []; - private finishedTaskCount = 0; - private readonly loadTime: Time; - - public readonly initData = client.initData; - public readonly sharedProcessData: Promise; - public readonly onSharedProcessActive = client.onSharedProcessActive; - - public constructor() { - logger.info("Loading IDE"); - this.loadTime = time(2500); - - let appWindow: Window | undefined; - - window.addEventListener("beforeunload", (e) => { - e.preventDefault(); // FireFox - e.returnValue = ""; // Chrome - }); - - window.addEventListener("message", (event) => { - if (event.data === "app") { - appWindow = event.source as Window; - } - }); - - this.sharedProcessData = new Promise((resolve): void => { - let d = client.onSharedProcessActive((data) => { - d.dispose(); - d = client.onSharedProcessActive(() => { - d.dispose(); - this.retry.notificationService.error( - new Error("Disconnected from shared process. Searching, installing, enabling, and disabling extensions will not work until the page is refreshed."), - ); - }); - resolve(data); - }); - }); - - window.addEventListener("contextmenu", (event) => { - event.preventDefault(); - }); - - // Prevent Firefox from trying to reconnect when the page unloads. - window.addEventListener("unload", () => { - this.retry.block(); - logger.info("Unloaded"); - }); - - this.initialize().then(() => { - logger.info("Load completed", field("duration", this.loadTime)); - if (appWindow) { - appWindow.postMessage("loaded", "*"); - } - }).catch((error) => { - logger.error(error.message); - logger.warn("Load completed with errors", field("duration", this.loadTime)); - }); - } - - public async task(description: string, duration: number, task: () => Promise): Promise; - public async task(description: string, duration: number, task: (v: V) => Promise, t: Promise): Promise; - public async task(description: string, duration: number, task: (v1: V1, v2: V2) => Promise, t1: Promise, t2: Promise): Promise; - public async task(description: string, duration: number, task: (v1: V1, v2: V2, v3: V3) => Promise, t1: Promise, t2: Promise, t3: Promise): Promise; - public async task(description: string, duration: number, task: (v1: V1, v2: V2, v3: V3, v4: V4) => Promise, t1: Promise, t2: Promise, t3: Promise, t4: Promise): Promise; - public async task(description: string, duration: number, task: (v1: V1, v2: V2, v3: V3, v4: V4, v5: V5) => Promise, t1: Promise, t2: Promise, t3: Promise, t4: Promise, t5: Promise): Promise; - public async task(description: string, duration: number, task: (v1: V1, v2: V2, v3: V3, v4: V4, v5: V5, v6: V6) => Promise, t1: Promise, t2: Promise, t3: Promise, t4: Promise, t5: Promise, t6: Promise): Promise; - /** - * Wrap a task in some logging, timing, and progress updates. Can optionally - * wait on other tasks which won't count towards this task's time. - */ - public async task( - description: string, duration: number = 100, task: (...args: any[]) => Promise, ...after: Array> // tslint:disable-line no-any - ): Promise { - this.tasks.push(description); - if (!this.start) { - this.start = time(1000); - } - - let start: Time | undefined; - try { - const waitFor = await (after && after.length > 0 ? Promise.all(after) : Promise.resolve([])); - start = time(duration); - logger.info(description); - const value = await task(...waitFor); - logger.info(`Finished "${description}"`, field("duration", start)); - const index = this.tasks.indexOf(description); - if (index !== -1) { - this.tasks.splice(index, 1); - } - ++this.finishedTaskCount; - if (this.tasks.length === 0) { - logger.info("Finished all queued tasks", field("duration", this.start), field("count", this.finishedTaskCount)); - this.start = undefined; - } - - return value; - } catch (error) { - logger.error(`Failed "${description}"`, field("duration", typeof start !== "undefined" ? start : "not started"), field("error", error)); - throw error; - } - } - - public set notificationService(service: INotificationService) { - this.retry.notificationService = service; - this.upload.notificationService = service; - } - - public set progressService(service: IProgressService) { - this.upload.progressService = service; - } - - /** - * Initialize the IDE. - */ - protected abstract initialize(): Promise; -} diff --git a/packages/ide/src/fill/child_process.ts b/packages/ide/src/fill/child_process.ts deleted file mode 100644 index afcfe7a0..00000000 --- a/packages/ide/src/fill/child_process.ts +++ /dev/null @@ -1,4 +0,0 @@ -import { Module } from "@coder/protocol"; -import { client } from "./client"; - -export = client.modules[Module.ChildProcess]; diff --git a/packages/ide/src/fill/client.ts b/packages/ide/src/fill/client.ts deleted file mode 100644 index d179d0e6..00000000 --- a/packages/ide/src/fill/client.ts +++ /dev/null @@ -1,148 +0,0 @@ -import { Emitter } from "@coder/events"; -import { field, logger } from "@coder/logger"; -import { Client, ReadWriteConnection } from "@coder/protocol"; -import { retry } from "../retry"; - -/** - * A connection based on a web socket. Automatically reconnects and buffers - * messages during connection. - */ -class WebsocketConnection implements ReadWriteConnection { - private activeSocket: WebSocket | undefined; - private readonly messageBuffer = []; - private readonly socketTimeoutDelay = 60 * 1000; - private readonly retry = retry.register("Socket", () => this.connect()); - private isUp: boolean = false; - private closed: boolean = false; - - private readonly messageEmitter = new Emitter(); - private readonly closeEmitter = new Emitter(); - private readonly upEmitter = new Emitter(); - private readonly downEmitter = new Emitter(); - - public readonly onUp = this.upEmitter.event; - public readonly onClose = this.closeEmitter.event; - public readonly onDown = this.downEmitter.event; - public readonly onMessage = this.messageEmitter.event; - - public constructor() { - this.retry.block(); - this.retry.run(); - } - - /** - * Send data across the socket. If closed, will error. If connecting, will - * queue. - */ - public send(data: Buffer | Uint8Array): void { - if (this.closed) { - throw new Error("web socket is closed"); - } - if (!this.activeSocket || this.activeSocket.readyState !== this.activeSocket.OPEN) { - this.messageBuffer.push(data); - } else { - this.activeSocket.send(data); - } - } - - /** - * Close socket connection. - */ - public close(): void { - this.closed = true; - this.dispose(); - this.closeEmitter.emit(); - } - - /** - * Connect to the server. - */ - private async connect(): Promise { - const socket = await this.openSocket(); - - socket.addEventListener("message", (event: MessageEvent) => { - this.messageEmitter.emit(event.data); - }); - - socket.addEventListener("close", (event) => { - if (this.isUp) { - this.isUp = false; - try { - this.downEmitter.emit(undefined); - } catch (error) { - // Don't let errors here prevent restarting. - logger.error(error.message); - } - } - logger.warn( - "Web socket closed", - field("code", event.code), - field("reason", event.reason), - field("wasClean", event.wasClean), - ); - if (!this.closed) { - this.retry.block(); - this.retry.run(); - } - }); - - // Send any messages that were queued while we were waiting to connect. - while (this.messageBuffer.length > 0) { - socket.send(this.messageBuffer.shift()!); - } - - if (!this.isUp) { - this.isUp = true; - this.upEmitter.emit(undefined); - } - } - - /** - * Open a web socket, disposing the previous connection if any. - */ - private async openSocket(): Promise { - this.dispose(); - const wsProto = location.protocol === "https:" ? "wss" : "ws"; - const socket = new WebSocket( - `${wsProto}://${location.host}${location.pathname}`, - ); - socket.binaryType = "arraybuffer"; - this.activeSocket = socket; - - const socketWaitTimeout = window.setTimeout(() => { - socket.close(); - }, this.socketTimeoutDelay); - - await new Promise((resolve, reject): void => { - const doReject = (): void => { - clearTimeout(socketWaitTimeout); - socket.removeEventListener("error", doReject); - socket.removeEventListener("close", doReject); - reject(); - }; - socket.addEventListener("error", doReject); - socket.addEventListener("close", doReject); - - socket.addEventListener("open", () => { - clearTimeout(socketWaitTimeout); - socket.removeEventListener("error", doReject); - socket.removeEventListener("close", doReject); - resolve(); - }); - }); - - return socket; - } - - /** - * Dispose the current connection. - */ - private dispose(): void { - if (this.activeSocket) { - this.activeSocket.close(); - } - } -} - -// Global instance so all fills can use the same client. -export const client = new Client(new WebsocketConnection()); diff --git a/packages/ide/src/fill/clipboard.ts b/packages/ide/src/fill/clipboard.ts deleted file mode 100644 index 502d1b90..00000000 --- a/packages/ide/src/fill/clipboard.ts +++ /dev/null @@ -1,146 +0,0 @@ -import { Emitter } from "@coder/events"; - -/** - * Wrapper around the native clipboard with some fallbacks. - */ -export class Clipboard { - private readonly enableEmitter = new Emitter(); - public readonly onPermissionChange = this.enableEmitter.event; - private _isEnabled: boolean = false; - - /** - * Ask for permission to use the clipboard. - */ - public initialize(): void { - // tslint:disable no-any - const navigatorClip = (navigator as any).clipboard; - const navigatorPerms = (navigator as any).permissions; - // tslint:enable no-any - if (navigatorClip && navigatorPerms) { - navigatorPerms.query({ - name: "clipboard-read", - }).then((permissionStatus: { - onchange: () => void, - state: "denied" | "granted" | "prompt", - }) => { - const updateStatus = (): void => { - this._isEnabled = permissionStatus.state !== "denied"; - this.enableEmitter.emit(this.isEnabled); - }; - updateStatus(); - permissionStatus.onchange = (): void => { - updateStatus(); - }; - }); - } - } - - /** - * Paste currently copied text. - */ - public async paste(): Promise { - if (this.isEnabled) { - try { - const element = document.activeElement as HTMLInputElement | HTMLTextAreaElement; - const start = element.selectionStart || 0; - const end = element.selectionEnd; - const allText = element.value; - const newText = allText.substring(0, start) - + (await this.readText()) - + allText.substring(end || start); - element.value = newText; - - return true; - } catch (ex) { - // Will try execCommand below. - } - } - - return document.execCommand("paste"); - } - - /** - * Return true if the native clipboard is supported. - */ - public get isSupported(): boolean { - // tslint:disable no-any - return typeof navigator !== "undefined" - && typeof (navigator as any).clipboard !== "undefined" - && typeof (navigator as any).clipboard.readText !== "undefined"; - // tslint:enable no-any - } - - /** - * Read text from the clipboard. - */ - public readText(): Promise { - return this.instance ? this.instance.readText() : Promise.resolve(""); - } - - /** - * Write text to the clipboard. - */ - public writeText(value: string): Promise { - return this.instance - ? this.instance.writeText(value) - : this.writeTextFallback(value); - } - - /** - * Return true if the clipboard is currently enabled. - */ - public get isEnabled(): boolean { - return !!this._isEnabled; - } - - /** - * Return clipboard instance if there is one. - */ - private get instance(): ({ - readText(): Promise; - writeText(value: string): Promise; - }) | undefined { - // tslint:disable-next-line no-any - return this.isSupported ? (navigator as any).clipboard : undefined; - } - - /** - * Fallback for writing text to the clipboard. - * Taken from https://hackernoon.com/copying-text-to-clipboard-with-javascript-df4d4988697f - */ - private writeTextFallback(value: string): Promise { - // Note the current focus and selection. - const active = document.activeElement as HTMLElement; - const selection = document.getSelection(); - const selected = selection && selection.rangeCount > 0 - ? selection.getRangeAt(0) - : false; - - // Insert a hidden textarea to put the text to copy in. - const el = document.createElement("textarea"); - el.value = value; - el.setAttribute("readonly", ""); - el.style.position = "absolute"; - el.style.left = "-9999px"; - document.body.appendChild(el); - - // Select the textarea and execute a copy (this will only work as part of a - // user interaction). - el.select(); - document.execCommand("copy"); - - // Remove the textarea and put focus and selection back to where it was - // previously. - document.body.removeChild(el); - active.focus(); - if (selected && selection) { - selection.removeAllRanges(); - selection.addRange(selected); - } - - return Promise.resolve(); - } -} - -// Global clipboard instance since it's used in the Electron fill. -export const clipboard = new Clipboard(); diff --git a/packages/ide/src/fill/dialog.scss b/packages/ide/src/fill/dialog.scss deleted file mode 100644 index ca5dc53b..00000000 --- a/packages/ide/src/fill/dialog.scss +++ /dev/null @@ -1,83 +0,0 @@ -.msgbox { - padding-top: 25px; - padding-left: 40px; - padding-right: 40px; - padding-bottom: 25px; - background: #242424; - -webkit-box-shadow: 0px 0px 10px -3px rgba(0,0,0,0.75); - -moz-box-shadow: 0px 0px 10px -3px rgba(0,0,0,0.75); - box-shadow: 0px 0px 10px -3px rgba(0,0,0,0.75); - border-radius: 3px; -} - -.msgbox.input { - max-width: 500px; - width: 100%; -} - -.msgbox > .input { - background: #141414; - border: none; - box-sizing: border-box; - padding: 10px; - width: 100%; -} - -.msgbox > .msg { - font-size: 16px; - font-weight: bold; -} - -.msgbox > .detail { - font-size: 14px; - margin: 5px 0; -} - -.msgbox > .errors { - margin-top: 20px; -} - -.msgbox > .errors { - color: #f44747; -} - -.msgbox > .button-wrapper { - display: flex; - flex-direction: row; - justify-content: space-between; - margin-top: 20px; -} - -.msgbox > .button-wrapper > button { - flex: 1; - border-radius: 2px; - padding: 10px; - color: white; - background: #3d3d3d; - border: 0px; - cursor: pointer; - opacity: 0.8; -} - -.msgbox > .button-wrapper > button:hover { - opacity: 1; -} - -.msgbox > .button-wrapper > button:not(:last-child) { - margin-right: 8px; -} - -.msgbox-overlay { - align-items: center; - background: rgba(0, 0, 0, 0.4); - bottom: 0; - display: flex; - justify-content: center; - left: 0; - opacity: 0; - position: absolute; - right: 0; - top: 0; - transition: 300ms opacity ease; - z-index: 15; -} diff --git a/packages/ide/src/fill/dialog.ts b/packages/ide/src/fill/dialog.ts deleted file mode 100644 index acee2bdc..00000000 --- a/packages/ide/src/fill/dialog.ts +++ /dev/null @@ -1,176 +0,0 @@ -import { Emitter } from "@coder/events"; - -import "./dialog.scss"; - -export interface IDialogOptions { - message?: string; - detail?: string; - buttons?: string[]; - input?: { - value: string; - selection?: { - start: number; - end: number; - }; - }; -} - -export interface IDialogAction { - buttonIndex?: number; - key?: IKey; -} - -export enum IKey { - Enter = "Enter", - Escape = "Escape", -} - -export class Dialog { - private readonly overlay: HTMLElement; - private cachedActiveElement: HTMLElement | undefined; - private input: HTMLInputElement | undefined; - private errors: HTMLElement; - private buttons: HTMLElement[] | undefined; - private readonly msgBox: HTMLElement; - - private actionEmitter = new Emitter(); - public onAction = this.actionEmitter.event; - - public constructor(private readonly options: IDialogOptions) { - this.msgBox = document.createElement("div"); - this.msgBox.classList.add("msgbox"); - - if (this.options.message) { - const messageDiv = document.createElement("div"); - messageDiv.classList.add("msg"); - messageDiv.innerText = this.options.message; - this.msgBox.appendChild(messageDiv); - } - - if (this.options.detail) { - const detailDiv = document.createElement("div"); - detailDiv.classList.add("detail"); - detailDiv.innerText = this.options.detail; - this.msgBox.appendChild(detailDiv); - } - - if (this.options.input) { - this.msgBox.classList.add("input"); - this.input = document.createElement("input"); - this.input.classList.add("input"); - this.input.value = this.options.input.value; - this.input.addEventListener("keydown", (event) => { - if (event.key === IKey.Enter) { - event.preventDefault(); - this.actionEmitter.emit({ - buttonIndex: undefined, - key: IKey.Enter, - }); - } - }); - this.msgBox.appendChild(this.input); - } - - this.errors = document.createElement("div"); - this.errors.classList.add("errors"); - - if (this.options.buttons && this.options.buttons.length > 0) { - this.buttons = this.options.buttons.map((buttonText, buttonIndex) => { - const button = document.createElement("button"); - // TODO: support mnemonics. - button.innerText = buttonText.replace("&&", ""); - button.addEventListener("click", () => { - this.actionEmitter.emit({ - buttonIndex, - key: undefined, - }); - }); - - return button; - }); - - const buttonWrapper = document.createElement("div"); - buttonWrapper.classList.add("button-wrapper"); - this.buttons.forEach((b) => buttonWrapper.appendChild(b)); - this.msgBox.appendChild(buttonWrapper); - } - - this.overlay = document.createElement("div"); - this.overlay.className = "msgbox-overlay"; - this.overlay.appendChild(this.msgBox); - - setTimeout(() => { - this.overlay.style.opacity = "1"; - }); - } - - /** - * Input value if this dialog has an input. - */ - public get inputValue(): string | undefined { - return this.input ? this.input.value : undefined; - } - - /** - * Display or remove an error. - */ - public set error(error: string | undefined) { - while (this.errors.lastChild) { - this.errors.removeChild(this.errors.lastChild); - } - if (error) { - const errorDiv = document.createElement("error"); - errorDiv.innerText = error; - this.errors.appendChild(errorDiv); - this.msgBox.appendChild(this.errors); - } - } - - /** - * Show the dialog. - */ - public show(): void { - if (!this.cachedActiveElement) { - this.cachedActiveElement = document.activeElement as HTMLElement; - (document.querySelector(".monaco-workbench") || document.body).appendChild(this.overlay); - document.addEventListener("keydown", this.onKeydown); - if (this.input) { - this.input.focus(); - if (this.options.input && this.options.input.selection) { - this.input.setSelectionRange( - this.options.input.selection.start, - this.options.input.selection.end, - ); - } - } else if (this.buttons) { - this.buttons[0].focus(); - } - } - } - - /** - * Remove the dialog and clean up. - */ - public hide(): void { - if (this.cachedActiveElement) { - this.overlay.remove(); - document.removeEventListener("keydown", this.onKeydown); - this.cachedActiveElement.focus(); - this.cachedActiveElement = undefined; - } - } - - /** - * Capture escape. - */ - private onKeydown = (event: KeyboardEvent): void => { - if (event.key === "Escape") { - event.preventDefault(); - event.stopPropagation(); - this.actionEmitter.emit({ - buttonIndex: undefined, - key: IKey.Escape, - }); - } - } -} diff --git a/packages/ide/src/fill/electron.ts b/packages/ide/src/fill/electron.ts deleted file mode 100644 index dc74d244..00000000 --- a/packages/ide/src/fill/electron.ts +++ /dev/null @@ -1,490 +0,0 @@ -/// -import { EventEmitter } from "events"; -import * as fs from "fs"; -import * as trash from "trash"; -import { logger, field } from "@coder/logger"; -import { IKey, Dialog as DialogBox } from "./dialog"; -import { clipboard } from "./clipboard"; - -// tslint:disable-next-line no-any -(global as any).getOpenUrls = (): string[] => { - return []; -}; - -// This is required to make the fill load in Node without erroring. -if (typeof document === "undefined") { - // tslint:disable-next-line no-any - (global as any).document = {} as any; -} - -const oldCreateElement = document.createElement; -const newCreateElement = (tagName: K): HTMLElementTagNameMap[K] => { - const createElement = (tagName: K): HTMLElementTagNameMap[K] => { - // tslint:disable-next-line:no-any - return oldCreateElement.call(document, tagName as any); - }; - // tslint:disable-next-line:no-any - const getPropertyDescriptor = (object: any, id: string): PropertyDescriptor | undefined => { - let op = Object.getPrototypeOf(object); - while (!Object.getOwnPropertyDescriptor(op, id)) { - op = Object.getPrototypeOf(op); - } - - return Object.getOwnPropertyDescriptor(op, id); - }; - - if (tagName === "img") { - const img = createElement("img"); - const oldSrc = getPropertyDescriptor(img, "src"); - if (!oldSrc) { - throw new Error("Failed to find src property"); - } - Object.defineProperty(img, "src", { - get: (): string => { - return oldSrc!.get!.call(img); - }, - set: (value: string): void => { - if (value) { - const resourceBaseUrl = location.pathname.replace(/\/$/, "") + "/resource"; - value = value.replace(/file:\/\//g, resourceBaseUrl); - } - oldSrc!.set!.call(img, value); - }, - }); - - return img; - } - - if (tagName === "style") { - const style = createElement("style"); - const oldInnerHtml = getPropertyDescriptor(style, "innerHTML"); - if (!oldInnerHtml) { - throw new Error("Failed to find innerHTML property"); - } - Object.defineProperty(style, "innerHTML", { - get: (): string => { - return oldInnerHtml!.get!.call(style); - }, - set: (value: string): void => { - if (value) { - const resourceBaseUrl = location.pathname.replace(/\/$/, "") + "/resource"; - value = value.replace(/file:\/\//g, resourceBaseUrl); - } - oldInnerHtml!.set!.call(style, value); - }, - }); - let overridden = false; - const oldSheet = getPropertyDescriptor(style, "sheet"); - Object.defineProperty(style, "sheet", { - // tslint:disable-next-line:no-any - get: (): any => { - const sheet = oldSheet!.get!.call(style); - if (sheet && !overridden) { - const oldInsertRule = sheet.insertRule; - sheet.insertRule = (rule: string, index?: number): void => { - const resourceBaseUrl = location.pathname.replace(/\/$/, "") + "/resource"; - rule = rule.replace(/file:\/\//g, resourceBaseUrl); - oldInsertRule.call(sheet, rule, index); - }; - overridden = true; - } - - return sheet; - }, - }); - - return style; - } - - if (tagName === "webview") { - const view = createElement("iframe") as HTMLIFrameElement; - view.style.border = "0px"; - const frameID = Math.random().toString(); - view.addEventListener("error", (event) => { - logger.error("iframe error", field("event", event)); - }); - window.addEventListener("message", (event) => { - if (!event.data || !event.data.id) { - return; - } - if (event.data.id !== frameID) { - return; - } - const e = new CustomEvent("ipc-message"); - (e as any).channel = event.data.channel; // tslint:disable-line no-any - (e as any).args = event.data.data; // tslint:disable-line no-any - view.dispatchEvent(e); - }); - view.sandbox.add("allow-same-origin", "allow-scripts", "allow-popups", "allow-forms"); - Object.defineProperty(view, "preload", { - set: (url: string): void => { - view.onload = (): void => { - if (view.contentDocument) { - view.contentDocument.body.id = frameID; - view.contentDocument.body.parentElement!.style.overflow = "hidden"; - const script = createElement("script"); - script.src = url; - script.addEventListener("load", () => { - view.contentDocument!.dispatchEvent(new Event("DOMContentLoaded", { - bubbles: true, - cancelable: true, - })); - // const e = new CustomEvent("ipc-message"); - // (e as any).channel = "webview-ready"; // tslint:disable-line no-any - // (e as any).args = [frameID]; // tslint:disable-line no-any - // view.dispatchEvent(e); - }); - view.contentDocument.head.appendChild(script); - } - - }; - }, - }); - view.src = require("!!file-loader?name=[path][name].[ext]!./webview.html"); - Object.defineProperty(view, "src", { - set: (): void => { /* Nope. */ }, - }); - (view as any).getWebContents = (): void => undefined; // tslint:disable-line no-any - (view as any).send = (channel: string, ...args: any[]): void => { // tslint:disable-line no-any - if (args[0] && typeof args[0] === "object" && args[0].contents) { - // TODO - const resourceBaseUrl = location.pathname.replace(/\/$/, "") + "/resource"; - args[0].contents = (args[0].contents as string).replace(/"(file:\/\/[^"]*)"/g, (m1) => `"${resourceBaseUrl}${m1}"`); - args[0].contents = (args[0].contents as string).replace(/"vscode-resource:([^"]*)"/g, (m, m1) => `"${resourceBaseUrl}${m1}"`); - args[0].contents = (args[0].contents as string).replace(/style-src vscode-core-resource:/g, "style-src 'self'"); - } - if (view.contentWindow) { - view.contentWindow.postMessage({ - channel, - data: args, - id: frameID, - }, "*"); - } - }; - - return view; - } - - return createElement(tagName); -}; - -document.createElement = newCreateElement; - -class Clipboard { - private readonly buffers = new Map(); - - public has(format: string): boolean { - return this.buffers.has(format); - } - - public readFindText(): string { - return ""; - } - - public writeFindText(_text: string): void { - // Nothing. - } - - public writeText(value: string): Promise { - return clipboard.writeText(value); - } - - public readText(): Promise { - return clipboard.readText(); - } - - public writeBuffer(format: string, buffer: Buffer): void { - this.buffers.set(format, buffer); - } - - public readBuffer(format: string): Buffer | undefined { - return this.buffers.get(format); - } -} - -class Shell { - public async moveItemToTrash(path: string): Promise { - await trash(path); - } -} - -class App extends EventEmitter { - public isAccessibilitySupportEnabled(): boolean { - return false; - } - - public setAsDefaultProtocolClient(): void { - throw new Error("not implemented"); - } -} - -class Dialog { - public showSaveDialog(_: void, options: Electron.SaveDialogOptions, callback: (filename: string | undefined) => void): void { - const defaultPath = options.defaultPath || "/untitled"; - const fileIndex = defaultPath.lastIndexOf("/"); - const extensionIndex = defaultPath.lastIndexOf("."); - const saveDialogOptions = { - buttons: ["Cancel", "Save"], - detail: "Enter a path for this file", - input: { - value: defaultPath, - selection: { - start: fileIndex === -1 ? 0 : fileIndex + 1, - end: extensionIndex === -1 ? defaultPath.length : extensionIndex, - }, - }, - message: "Save file", - }; - - const dialog = new DialogBox(saveDialogOptions); - dialog.onAction((action) => { - if (action.key !== IKey.Enter && action.buttonIndex !== 1) { - dialog.hide(); - - return callback(undefined); - } - - const inputValue = dialog.inputValue || ""; - const filePath = inputValue.replace(/\/+$/, ""); - const split = filePath.split("/"); - const fileName = split.pop(); - const parentName = split.pop() || "/"; - if (fileName === "") { - dialog.error = "You must enter a file name."; - - return; - } - - fs.stat(filePath, (error, stats) => { - if (error && error.code === "ENOENT") { - dialog.hide(); - callback(filePath); - } else if (error) { - dialog.error = error.message; - } else if (stats.isDirectory()) { - dialog.error = `A directory named "${fileName}" already exists.`; - } else { - dialog.error = undefined; - - const confirmDialog = new DialogBox({ - message: `A file named "${fileName}" already exists. Do you want to replace it?`, - detail: `The file already exists in "${parentName}". Replacing it will overwrite its contents.`, - buttons: ["Cancel", "Replace"], - }); - - confirmDialog.onAction((action) => { - if (action.buttonIndex === 1) { - confirmDialog.hide(); - - return callback(filePath); - } - - confirmDialog.hide(); - dialog.show(); - }); - - dialog.hide(); - confirmDialog.show(); - } - }); - }); - dialog.show(); - } - - public showOpenDialog(): void { - throw new Error("not implemented"); - } - - public showMessageBox(_: void, options: Electron.MessageBoxOptions, callback: (button: number | undefined, checked: boolean) => void): void { - const dialog = new DialogBox(options); - dialog.onAction((action) => { - dialog.hide(); - callback(action.buttonIndex, false); - }); - dialog.show(); - } -} - -class WebFrame { - public getZoomFactor(): number { - return 1; - } - - public getZoomLevel(): number { - return 1; - } - - public setZoomLevel(): void { - // Nothing. - } -} - -class Screen { - public getAllDisplays(): [] { - return []; - } -} - -class WebRequest extends EventEmitter { - public onBeforeRequest(): void { - throw new Error("not implemented"); - } - - public onBeforeSendHeaders(): void { - throw new Error("not implemented"); - } - - public onHeadersReceived(): void { - throw new Error("not implemented"); - } -} - -class Session extends EventEmitter { - public webRequest = new WebRequest(); - - public resolveProxy(url: string, callback: (proxy: string) => void): void { - // TODO: not sure what this actually does. - callback(url); - } -} - -class WebContents extends EventEmitter { - public session = new Session(); -} - -class BrowserWindow extends EventEmitter { - public webContents = new WebContents(); - private representedFilename: string = ""; - - public static getFocusedWindow(): undefined { - return undefined; - } - - public focus(): void { - window.focus(); - } - - public show(): void { - window.focus(); - } - - public reload(): void { - location.reload(); - } - - public isMaximized(): boolean { - return false; - } - - public setFullScreen(fullscreen: boolean): void { - if (fullscreen) { - document.documentElement.requestFullscreen().catch((error) => { - logger.error(error.message); - }); - } else { - document.exitFullscreen().catch((error) => { - logger.error(error.message); - }); - } - } - - public isFullScreen(): boolean { - // TypeScript doesn't recognize this property. - // tslint:disable no-any - if (typeof (window as any)["fullScreen"] !== "undefined") { - return (window as any)["fullScreen"]; - } - // tslint:enable no-any - - try { - return window.matchMedia("(display-mode: fullscreen)").matches; - } catch (error) { - logger.error(error.message); - - return false; - } - } - - public isFocused(): boolean { - return document.hasFocus(); - } - - public setMenuBarVisibility(): void { - throw new Error("not implemented"); - } - - public setAutoHideMenuBar(): void { - throw new Error("not implemented"); - } - - public setRepresentedFilename(filename: string): void { - this.representedFilename = filename; - } - - public getRepresentedFilename(): string { - return this.representedFilename; - } - - public setTitle(value: string): void { - document.title = value; - } -} - -/** - * We won't be able to do a 1 to 1 fill because things like moveItemToTrash for - * example returns a boolean while we need a promise. - */ -class ElectronFill { - public readonly shell = new Shell(); - public readonly clipboard = new Clipboard(); - public readonly app = new App(); - public readonly dialog = new Dialog(); - public readonly webFrame = new WebFrame(); - public readonly screen = new Screen(); - - private readonly rendererToMainEmitter = new EventEmitter(); - private readonly mainToRendererEmitter = new EventEmitter(); - - public get BrowserWindow(): typeof BrowserWindow { - return BrowserWindow; - } - - // tslint:disable no-any - public get ipcRenderer(): object { - return { - send: (str: string, ...args: any[]): void => { - this.rendererToMainEmitter.emit(str, { - sender: module.exports.ipcMain, - }, ...args); - }, - on: (str: string, listener: (...args: any[]) => void): void => { - this.mainToRendererEmitter.on(str, listener); - }, - once: (str: string, listener: (...args: any[]) => void): void => { - this.mainToRendererEmitter.once(str, listener); - }, - removeListener: (str: string, listener: (...args: any[]) => void): void => { - this.mainToRendererEmitter.removeListener(str, listener); - }, - }; - } - - public get ipcMain(): object { - return { - send: (str: string, ...args: any[]): void => { - this.mainToRendererEmitter.emit(str, { - sender: module.exports.ipcRenderer, - }, ...args); - }, - on: (str: string, listener: (...args: any[]) => void): void => { - this.rendererToMainEmitter.on(str, listener); - }, - once: (str: string, listener: (...args: any[]) => void): void => { - this.rendererToMainEmitter.once(str, listener); - }, - }; - } - // tslint:enable no-any -} - -module.exports = new ElectronFill(); diff --git a/packages/ide/src/fill/empty.ts b/packages/ide/src/fill/empty.ts deleted file mode 100644 index 8717dbf7..00000000 --- a/packages/ide/src/fill/empty.ts +++ /dev/null @@ -1 +0,0 @@ -export = {}; diff --git a/packages/ide/src/fill/fs.ts b/packages/ide/src/fill/fs.ts deleted file mode 100644 index 93097963..00000000 --- a/packages/ide/src/fill/fs.ts +++ /dev/null @@ -1,4 +0,0 @@ -import { Module } from "@coder/protocol"; -import { client } from "./client"; - -export = client.modules[Module.Fs]; diff --git a/packages/ide/src/fill/net.ts b/packages/ide/src/fill/net.ts deleted file mode 100644 index 4eb9a4b0..00000000 --- a/packages/ide/src/fill/net.ts +++ /dev/null @@ -1,4 +0,0 @@ -import { Module } from "@coder/protocol"; -import { client } from "./client"; - -export = client.modules[Module.Net]; diff --git a/packages/ide/src/fill/notification.ts b/packages/ide/src/fill/notification.ts deleted file mode 100644 index f1c156c9..00000000 --- a/packages/ide/src/fill/notification.ts +++ /dev/null @@ -1,79 +0,0 @@ -import { logger, field } from "@coder/logger"; - -export interface INotificationHandle { - close(): void; - updateMessage(message: string): void; - updateButtons(buttons: INotificationButton[]): void; -} - -export enum Severity { - Ignore = 0, - Info = 1, - Warning = 2, - Error = 3, -} - -export interface INotificationButton { - label: string; - run(): void; -} - -/** - * Optional notification service. - */ -export interface INotificationService { - error(error: Error): void; - prompt(severity: Severity, message: string, buttons: INotificationButton[], onCancel: () => void): INotificationHandle; -} - -export interface IProgress { - /** - * Report progress, which should be the completed percentage from 0 to 100. - */ - report(progress: number): void; -} - -export interface IProgressService { - /** - * Start a new progress bar that resolves & disappears when the task finishes. - */ - start(title: string, task: (progress: IProgress) => Promise, onCancel: () => void): Promise; -} - -/** - * Console-based notification service. - */ -export class NotificationService implements INotificationService { - public error(error: Error): void { - logger.error(error.message, field("error", error)); - } - - public prompt(severity: Severity, message: string, _buttons: INotificationButton[], _onCancel: () => void): INotificationHandle { - switch (severity) { - case Severity.Info: logger.info(message); break; - case Severity.Warning: logger.warn(message); break; - case Severity.Error: logger.error(message); break; - } - - return { - close: (): void => undefined, - updateMessage: (): void => undefined, - updateButtons: (): void => undefined, - }; - } -} - -/** - * Console-based progress service. - */ -export class ProgressService implements IProgressService { - public start(title: string, task: (progress: IProgress) => Promise): Promise { - logger.info(title); - - return task({ - report: (progress): void => { - logger.info(`${title} progress: ${progress}`); - }, - }); - } -} diff --git a/packages/ide/src/fill/os.ts b/packages/ide/src/fill/os.ts deleted file mode 100644 index ffb9394c..00000000 --- a/packages/ide/src/fill/os.ts +++ /dev/null @@ -1,57 +0,0 @@ -import { OperatingSystem, InitData } from "@coder/protocol"; -import { client } from "./client"; - -class OS { - private _homedir: string | undefined; - private _tmpdir: string | undefined; - private _platform: NodeJS.Platform | undefined; - - public constructor() { - client.initData.then((d) => this.initialize(d)); - } - - public homedir(): string { - if (typeof this._homedir === "undefined") { - throw new Error("trying to access homedir before it has been set"); - } - - return this._homedir; - } - - public tmpdir(): string { - if (typeof this._tmpdir === "undefined") { - throw new Error("trying to access tmpdir before it has been set"); - } - - return this._tmpdir; - } - - public initialize(data: InitData): void { - this._homedir = data.homeDirectory; - this._tmpdir = data.tmpDirectory; - switch (data.os) { - case OperatingSystem.Windows: this._platform = "win32"; break; - case OperatingSystem.Mac: this._platform = "darwin"; break; - default: this._platform = "linux"; break; - } - process.platform = this._platform; - process.env = {}; - data.env.forEach((v, k) => { - process.env[k] = v; - }); - } - - public release(): string { - return "Unknown"; - } - - public platform(): NodeJS.Platform { - if (typeof this._platform === "undefined") { - throw new Error("trying to access platform before it has been set"); - } - - return this._platform; - } -} - -export = new OS(); diff --git a/packages/ide/src/fill/path.js b/packages/ide/src/fill/path.js deleted file mode 100644 index 1fcfd11a..00000000 --- a/packages/ide/src/fill/path.js +++ /dev/null @@ -1,518 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -var os = require('os'); -var util = require('util'); -var isWindows = os.platform() === "win32"; - -// resolves . and .. elements in a path array with directory names there -// must be no slashes, empty elements, or device names (c:\) in the array -// (so also no leading and trailing slashes - it does not distinguish -// relative and absolute paths) -function normalizeArray(parts, allowAboveRoot) { - // if the path tries to go above the root, `up` ends up > 0 - var up = 0; - for (var i = parts.length - 1; i >= 0; i--) { - var last = parts[i]; - if (last === '.') { - parts.splice(i, 1); - } else if (last === '..') { - parts.splice(i, 1); - up++; - } else if (up) { - parts.splice(i, 1); - up--; - } - } - - // if the path is allowed to go above the root, restore leading ..s - if (allowAboveRoot) { - for (; up--; up) { - parts.unshift('..'); - } - } - - return parts; -} - - -if (isWindows) { - // Regex to split a windows path into three parts: [*, device, slash, - // tail] windows-only - var splitDeviceRe = - /^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/; - - // Regex to split the tail part of the above into [*, dir, basename, ext] - var splitTailRe = - /^([\s\S]*?)((?:\.{1,2}|[^\\\/]+?|)(\.[^.\/\\]*|))(?:[\\\/]*)$/; - - // Function to split a filename into [root, dir, basename, ext] - // windows version - var splitPath = function(filename) { - // Separate device+slash from tail - var result = splitDeviceRe.exec(filename), - device = (result[1] || '') + (result[2] || ''), - tail = result[3] || ''; - // Split the tail into dir, basename and extension - var result2 = splitTailRe.exec(tail), - dir = result2[1], - basename = result2[2], - ext = result2[3]; - return [device, dir, basename, ext]; - }; - - var normalizeUNCRoot = function(device) { - return '\\\\' + device.replace(/^[\\\/]+/, '').replace(/[\\\/]+/g, '\\'); - }; - - // path.resolve([from ...], to) - // windows version - exports.resolve = function() { - var resolvedDevice = '', - resolvedTail = '', - resolvedAbsolute = false; - - for (var i = arguments.length - 1; i >= -1; i--) { - var path; - if (i >= 0) { - path = arguments[i]; - } else if (!resolvedDevice) { - path = process.cwd(); - } else { - // Windows has the concept of drive-specific current working - // directories. If we've resolved a drive letter but not yet an - // absolute path, get cwd for that drive. We're sure the device is not - // an unc path at this points, because unc paths are always absolute. - path = process.env['=' + resolvedDevice]; - // Verify that a drive-local cwd was found and that it actually points - // to our drive. If not, default to the drive's root. - if (!path || path.substr(0, 3).toLowerCase() !== - resolvedDevice.toLowerCase() + '\\') { - path = resolvedDevice + '\\'; - } - } - - // Skip empty and invalid entries - if (!util.isString(path)) { - throw new TypeError('Arguments to path.resolve must be strings'); - } else if (!path) { - continue; - } - - var result = splitDeviceRe.exec(path), - device = result[1] || '', - isUnc = device && device.charAt(1) !== ':', - isAbsolute = exports.isAbsolute(path), - tail = result[3]; - - if (device && - resolvedDevice && - device.toLowerCase() !== resolvedDevice.toLowerCase()) { - // This path points to another device so it is not applicable - continue; - } - - if (!resolvedDevice) { - resolvedDevice = device; - } - if (!resolvedAbsolute) { - resolvedTail = tail + '\\' + resolvedTail; - resolvedAbsolute = isAbsolute; - } - - if (resolvedDevice && resolvedAbsolute) { - break; - } - } - - // Convert slashes to backslashes when `resolvedDevice` points to an UNC - // root. Also squash multiple slashes into a single one where appropriate. - if (isUnc) { - resolvedDevice = normalizeUNCRoot(resolvedDevice); - } - - // At this point the path should be resolved to a full absolute path, - // but handle relative paths to be safe (might happen when process.cwd() - // fails) - - // Normalize the tail path - - function f(p) { - return !!p; - } - - resolvedTail = normalizeArray(resolvedTail.split(/[\\\/]+/).filter(f), - !resolvedAbsolute).join('\\'); - - return (resolvedDevice + (resolvedAbsolute ? '\\' : '') + resolvedTail) || - '.'; - }; - - // windows version - exports.normalize = function(path) { - var result = splitDeviceRe.exec(path), - device = result[1] || '', - isUnc = device && device.charAt(1) !== ':', - isAbsolute = exports.isAbsolute(path), - tail = result[3], - trailingSlash = /[\\\/]$/.test(tail); - - // If device is a drive letter, we'll normalize to lower case. - if (device && device.charAt(1) === ':') { - device = device[0].toLowerCase() + device.substr(1); - } - - // Normalize the tail path - tail = normalizeArray(tail.split(/[\\\/]+/).filter(function(p) { - return !!p; - }), !isAbsolute).join('\\'); - - if (!tail && !isAbsolute) { - tail = '.'; - } - if (tail && trailingSlash) { - tail += '\\'; - } - - // Convert slashes to backslashes when `device` points to an UNC root. - // Also squash multiple slashes into a single one where appropriate. - if (isUnc) { - device = normalizeUNCRoot(device); - } - - return device + (isAbsolute ? '\\' : '') + tail; - }; - - // windows version - exports.isAbsolute = function(path) { - var result = splitDeviceRe.exec(path), - device = result[1] || '', - isUnc = !!device && device.charAt(1) !== ':'; - // UNC paths are always absolute - return !!result[2] || isUnc; - }; - - // windows version - exports.join = function() { - function f(p) { - if (!util.isString(p)) { - throw new TypeError('Arguments to path.join must be strings'); - } - return p; - } - - var paths = Array.prototype.filter.call(arguments, f); - var joined = paths.join('\\'); - - // Make sure that the joined path doesn't start with two slashes, because - // normalize() will mistake it for an UNC path then. - // - // This step is skipped when it is very clear that the user actually - // intended to point at an UNC path. This is assumed when the first - // non-empty string arguments starts with exactly two slashes followed by - // at least one more non-slash character. - // - // Note that for normalize() to treat a path as an UNC path it needs to - // have at least 2 components, so we don't filter for that here. - // This means that the user can use join to construct UNC paths from - // a server name and a share name; for example: - // path.join('//server', 'share') -> '\\\\server\\share\') - if (!/^[\\\/]{2}[^\\\/]/.test(paths[0])) { - joined = joined.replace(/^[\\\/]{2,}/, '\\'); - } - - return exports.normalize(joined); - }; - - // path.relative(from, to) - // it will solve the relative path from 'from' to 'to', for instance: - // from = 'C:\\orandea\\test\\aaa' - // to = 'C:\\orandea\\impl\\bbb' - // The output of the function should be: '..\\..\\impl\\bbb' - // windows version - exports.relative = function(from, to) { - from = exports.resolve(from); - to = exports.resolve(to); - - // windows is not case sensitive - var lowerFrom = from.toLowerCase(); - var lowerTo = to.toLowerCase(); - - function trim(arr) { - var start = 0; - for (; start < arr.length; start++) { - if (arr[start] !== '') break; - } - - var end = arr.length - 1; - for (; end >= 0; end--) { - if (arr[end] !== '') break; - } - - if (start > end) return []; - return arr.slice(start, end + 1); - } - - var toParts = trim(to.split('\\')); - - var lowerFromParts = trim(lowerFrom.split('\\')); - var lowerToParts = trim(lowerTo.split('\\')); - - var length = Math.min(lowerFromParts.length, lowerToParts.length); - var samePartsLength = length; - for (var i = 0; i < length; i++) { - if (lowerFromParts[i] !== lowerToParts[i]) { - samePartsLength = i; - break; - } - } - - if (samePartsLength == 0) { - return to; - } - - var outputParts = []; - for (var i = samePartsLength; i < lowerFromParts.length; i++) { - outputParts.push('..'); - } - - outputParts = outputParts.concat(toParts.slice(samePartsLength)); - - return outputParts.join('\\'); - }; - - exports.sep = '\\'; - exports.delimiter = ';'; - -} else /* posix */ { - - // Split a filename into [root, dir, basename, ext], unix version - // 'root' is just a slash, or nothing. - var splitPathRe = - /^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/; - var splitPath = function(filename) { - return splitPathRe.exec(filename).slice(1); - }; - - // path.resolve([from ...], to) - // posix version - exports.resolve = function() { - var resolvedPath = '', - resolvedAbsolute = false; - - for (var i = arguments.length - 1; i >= -1 && !resolvedAbsolute; i--) { - var path = (i >= 0) ? arguments[i] : process.cwd(); - - // Skip empty and invalid entries - if (!util.isString(path)) { - throw new TypeError('Arguments to path.resolve must be strings'); - } else if (!path) { - continue; - } - - resolvedPath = path + '/' + resolvedPath; - resolvedAbsolute = path.charAt(0) === '/'; - } - - // At this point the path should be resolved to a full absolute path, but - // handle relative paths to be safe (might happen when process.cwd() fails) - - // Normalize the path - resolvedPath = normalizeArray(resolvedPath.split('/').filter(function(p) { - return !!p; - }), !resolvedAbsolute).join('/'); - - return ((resolvedAbsolute ? '/' : '') + resolvedPath) || '.'; - }; - - // path.normalize(path) - // posix version - exports.normalize = function(path) { - var isAbsolute = exports.isAbsolute(path), - trailingSlash = path[path.length - 1] === '/', - segments = path.split('/'), - nonEmptySegments = []; - - // Normalize the path - for (var i = 0; i < segments.length; i++) { - if (segments[i]) { - nonEmptySegments.push(segments[i]); - } - } - path = normalizeArray(nonEmptySegments, !isAbsolute).join('/'); - - if (!path && !isAbsolute) { - path = '.'; - } - if (path && trailingSlash) { - path += '/'; - } - - return (isAbsolute ? '/' : '') + path; - }; - - // posix version - exports.isAbsolute = function(path) { - return path.charAt(0) === '/'; - }; - - // posix version - exports.join = function() { - var path = ''; - for (var i = 0; i < arguments.length; i++) { - var segment = arguments[i]; - if (!util.isString(segment)) { - throw new TypeError('Arguments to path.join must be strings'); - } - if (segment) { - if (!path) { - path += segment; - } else { - path += '/' + segment; - } - } - } - return exports.normalize(path); - }; - - - // path.relative(from, to) - // posix version - exports.relative = function(from, to) { - from = exports.resolve(from).substr(1); - to = exports.resolve(to).substr(1); - - function trim(arr) { - var start = 0; - for (; start < arr.length; start++) { - if (arr[start] !== '') break; - } - - var end = arr.length - 1; - for (; end >= 0; end--) { - if (arr[end] !== '') break; - } - - if (start > end) return []; - return arr.slice(start, end + 1); - } - - var fromParts = trim(from.split('/')); - var toParts = trim(to.split('/')); - - var length = Math.min(fromParts.length, toParts.length); - var samePartsLength = length; - for (var i = 0; i < length; i++) { - if (fromParts[i] !== toParts[i]) { - samePartsLength = i; - break; - } - } - - var outputParts = []; - for (var i = samePartsLength; i < fromParts.length; i++) { - outputParts.push('..'); - } - - outputParts = outputParts.concat(toParts.slice(samePartsLength)); - - return outputParts.join('/'); - }; - - exports.sep = '/'; - exports.delimiter = ':'; -} - -exports.dirname = function(path) { - var result = splitPath(path), - root = result[0], - dir = result[1]; - - if (!root && !dir) { - // No dirname whatsoever - return '.'; - } - - if (dir) { - // It has a dirname, strip trailing slash - dir = dir.substr(0, dir.length - 1); - } - - return root + dir; -}; - - -exports.basename = function(path, ext) { - var f = splitPath(path)[2]; - // TODO: make this comparison case-insensitive on windows? - if (ext && f.substr(-1 * ext.length) === ext) { - f = f.substr(0, f.length - ext.length); - } - return f; -}; - - -exports.extname = function(path) { - return splitPath(path)[3]; -}; - - -exports.exists = util.deprecate(function(path, callback) { - require('fs').exists(path, callback); -}, 'path.exists is now called `fs.exists`.'); - - -exports.existsSync = util.deprecate(function(path) { - return require('fs').existsSync(path); -}, 'path.existsSync is now called `fs.existsSync`.'); - - -if (isWindows) { - exports._makeLong = function(path) { - // Note: this will *probably* throw somewhere. - if (!util.isString(path)) - return path; - - if (!path) { - return ''; - } - - var resolvedPath = exports.resolve(path); - - if (/^[a-zA-Z]\:\\/.test(resolvedPath)) { - // path is local filesystem path, which needs to be converted - // to long UNC path. - return '\\\\?\\' + resolvedPath; - } else if (/^\\\\[^?.]/.test(resolvedPath)) { - // path is network UNC path, which needs to be converted - // to long UNC path. - return '\\\\?\\UNC\\' + resolvedPath.substring(2); - } - - return path; - }; -} else { - exports._makeLong = function(path) { - return path; - }; -} - -exports.posix = exports; \ No newline at end of file diff --git a/packages/ide/src/fill/trash.ts b/packages/ide/src/fill/trash.ts deleted file mode 100644 index 249dab5d..00000000 --- a/packages/ide/src/fill/trash.ts +++ /dev/null @@ -1,4 +0,0 @@ -import { Module } from "@coder/protocol"; -import { client } from "./client"; - -export = client.modules[Module.Trash].trash; diff --git a/packages/ide/src/fill/util.ts b/packages/ide/src/fill/util.ts deleted file mode 100644 index f0342290..00000000 --- a/packages/ide/src/fill/util.ts +++ /dev/null @@ -1,4 +0,0 @@ -export * from "../../../../node_modules/util"; -import { implementation } from "../../../../node_modules/util.promisify"; - -export const promisify = implementation; diff --git a/packages/ide/src/fill/webview.html b/packages/ide/src/fill/webview.html deleted file mode 100644 index d2a85bdd..00000000 --- a/packages/ide/src/fill/webview.html +++ /dev/null @@ -1,8 +0,0 @@ - - - - Virtual Document - - - - diff --git a/packages/ide/src/index.ts b/packages/ide/src/index.ts deleted file mode 100644 index 5c75fbb1..00000000 --- a/packages/ide/src/index.ts +++ /dev/null @@ -1,5 +0,0 @@ -export * from "./client"; -export * from "./fill/clipboard"; -export * from "./fill/notification"; -export * from "./retry"; -export * from "./upload"; diff --git a/packages/ide/src/retry.ts b/packages/ide/src/retry.ts deleted file mode 100644 index aefa7977..00000000 --- a/packages/ide/src/retry.ts +++ /dev/null @@ -1,353 +0,0 @@ -import { logger, field } from "@coder/logger"; -import { NotificationService, INotificationHandle, INotificationService, Severity } from "./fill/notification"; - -// tslint:disable no-any can have different return values - -interface IRetryItem { - /** - * How many times this item has been retried. - */ - count?: number; - - /** - * In seconds. - */ - delay?: number; - - /** - * In milliseconds. - */ - end?: number; - - /** - * Function to run when retrying. - */ - fn(): any; - - /** - * Timer for running this item. - */ - timeout?: number | NodeJS.Timer; - - /** - * Whether the item is retrying or waiting to retry. - */ - running?: boolean; -} - -/** - * An retry-able instance. - */ -export interface RetryInstance { - /** - * Run this retry. - */ - run(error?: Error): void; - - /** - * Block on this instance. - */ - block(): void; -} - -/** - * A retry-able instance that doesn't use a promise so it must be manually - * ran again on failure and recovered on success. - */ -export interface ManualRetryInstance extends RetryInstance { - /** - * Mark this item as recovered. - */ - recover(): void; -} - -/** - * Retry services. Handles multiple services so when a connection drops the - * user doesn't get a separate notification for each service. - * - * Attempts to restart services silently up to a maximum number of tries, then - * starts waiting for a delay that grows exponentially with each attempt with a - * cap on the delay. Once the delay is long enough, it will show a notification - * to the user explaining what is happening with an option to immediately retry. - */ -export class Retry { - private readonly items = new Map(); - - // Times are in seconds. - private readonly retryMinDelay = 1; - private readonly retryMaxDelay = 3; - private readonly maxImmediateRetries = 5; - private readonly retryExponent = 1.5; - private blocked: string | boolean | undefined; - - private notificationHandle: INotificationHandle | undefined; - private readonly updateDelay = 1; - private updateTimeout: number | NodeJS.Timer | undefined; - private readonly notificationThreshold = 3; - - // Time in milliseconds to wait before restarting a service. (See usage below - // for reasoning.) - private readonly waitDelay = 50; - - public constructor(private _notificationService: INotificationService) {} - - public set notificationService(service: INotificationService) { - this._notificationService = service; - } - - public get notificationService(): INotificationService { - return this._notificationService; - } - - /** - * Register a function to retry that starts/connects to a service. - * - * The service is automatically retried or recovered when the promise resolves - * or rejects. If the service dies after starting, it must be manually - * retried. - */ - public register(name: string, fn: () => Promise): RetryInstance; - /** - * Register a function to retry that starts/connects to a service. - * - * Must manually retry if it fails to start again or dies after restarting and - * manually recover if it succeeds in starting again. - */ - public register(name: string, fn: () => any): ManualRetryInstance; - /** - * Register a function to retry that starts/connects to a service. - */ - public register(name: string, fn: () => any): RetryInstance | ManualRetryInstance { - if (this.items.has(name)) { - throw new Error(`"${name}" is already registered`); - } - this.items.set(name, { fn }); - - return { - block: (): void => this.block(name), - run: (error?: Error): void => this.run(name, error), - recover: (): void => this.recover(name), - }; - } - - /** - * Un-register a function to retry. - */ - public unregister(name: string): void { - if (!this.items.has(name)) { - throw new Error(`"${name}" is not registered`); - } - this.items.delete(name); - } - - /** - * Block retries when we know they will fail (for example when the socket is - * down ). If a name is passed, that service will still be allowed to retry - * (unless we have already blocked). - * - * Blocking without a name will override a block with a name. - */ - public block(name?: string): void { - if (!this.blocked || !name) { - this.blocked = name || true; - this.items.forEach((item) => { - this.stopItem(item); - }); - } - } - - /** - * Unblock retries and run any that are pending. - */ - private unblock(): void { - this.blocked = false; - this.items.forEach((item, name) => { - if (item.running) { - this.runItem(name, item); - } - }); - } - - /** - * Retry a service. - */ - private run(name: string, error?: Error): void { - if (!this.items.has(name)) { - throw new Error(`"${name}" is not registered`); - } - - const item = this.items.get(name)!; - if (item.running) { - throw new Error(`"${name}" is already retrying`); - } - - item.running = true; - // This timeout is for the case when the connection drops; this allows time - // for the socket service to come in and block everything because some other - // services might make it here first and try to restart, which will fail. - setTimeout(() => { - if (this.blocked && this.blocked !== name) { - return; - } - - if (!item.count || item.count < this.maxImmediateRetries) { - return this.runItem(name, item, error); - } - - if (!item.delay) { - item.delay = this.retryMinDelay; - } else { - item.delay = Math.ceil(item.delay * this.retryExponent); - if (item.delay > this.retryMaxDelay) { - item.delay = this.retryMaxDelay; - } - } - - logger.info(`Retrying ${name.toLowerCase()} in ${item.delay}s`, error && field("error", error.message)); - const itemDelayMs = item.delay * 1000; - item.end = Date.now() + itemDelayMs; - item.timeout = setTimeout(() => this.runItem(name, item, error), itemDelayMs); - - this.updateNotification(); - }, this.waitDelay); - } - - /** - * Reset a service after a successfully recovering. - */ - private recover(name: string): void { - if (!this.items.has(name)) { - throw new Error(`"${name}" is not registered`); - } - - const item = this.items.get(name)!; - if (typeof item.timeout === "undefined" && !item.running && typeof item.count !== "undefined") { - logger.info(`Connected to ${name.toLowerCase()}`); - item.delay = undefined; - item.count = undefined; - } - } - - /** - * Run an item. - */ - private runItem(name: string, item: IRetryItem, error?: Error): void { - if (!item.count) { - item.count = 1; - } else { - ++item.count; - } - - const retryCountText = item.count <= this.maxImmediateRetries - ? `[${item.count}/${this.maxImmediateRetries}]` - : `[${item.count}]`; - logger.info(`Starting ${name.toLowerCase()} ${retryCountText}...`, error && field("error", error.message)); - - const endItem = (): void => { - this.stopItem(item); - item.running = false; - }; - - try { - const maybePromise = item.fn(); - if (maybePromise instanceof Promise) { - maybePromise.then(() => { - endItem(); - this.recover(name); - if (this.blocked === name) { - this.unblock(); - } - }).catch((error) => { - endItem(); - this.run(name, error); - }); - } else { - endItem(); - } - } catch (error) { - // Prevent an exception from causing the item to never run again. - endItem(); - throw error; - } - } - - /** - * Update, close, or show the notification. - */ - private updateNotification(): void { - // tslint:disable-next-line no-any because NodeJS.Timer is valid. - clearTimeout(this.updateTimeout as any); - - const now = Date.now(); - const items = Array.from(this.items.entries()).filter(([_, item]) => { - return typeof item.end !== "undefined" - && item.end > now - && item.delay && item.delay >= this.notificationThreshold; - }).sort((a, b) => { - return a[1] < b[1] ? -1 : 1; - }); - - if (items.length === 0) { - if (this.notificationHandle) { - this.notificationHandle.close(); - this.notificationHandle = undefined; - } - - return; - } - - const join = (arr: string[]): string => { - const last = arr.pop()!; // Assume length > 0. - - return arr.length > 0 ? `${arr.join(", ")} and ${last}` : last; - }; - - const servicesStr = join(items.map(([name, _]) => name.toLowerCase())); - const message = `Lost connection to ${servicesStr}. Retrying in ${ - join(items.map(([_, item]) => `${Math.ceil((item.end! - now) / 1000)}s`)) - }.`; - - const buttons = [{ - label: `Retry ${items.length > 1 ? "Services" : items[0][0]} Now`, - run: (): void => { - logger.info(`Forcing ${servicesStr} to restart now`); - items.forEach(([name, item]) => { - this.runItem(name, item); - }); - this.updateNotification(); - }, - }]; - - if (!this.notificationHandle) { - this.notificationHandle = this.notificationService.prompt( - Severity.Info, - message, - buttons, - () => { - this.notificationHandle = undefined; - // tslint:disable-next-line no-any because NodeJS.Timer is valid. - clearTimeout(this.updateTimeout as any); - }, - ); - } else { - this.notificationHandle.updateMessage(message); - this.notificationHandle.updateButtons(buttons); - } - - this.updateTimeout = setTimeout(() => this.updateNotification(), this.updateDelay * 1000); - } - - /** - * Stop an item's timer. - */ - private stopItem(item: IRetryItem): void { - // tslint:disable-next-line no-any because NodeJS.Timer is valid. - clearTimeout(item.timeout as any); - item.timeout = undefined; - item.end = undefined; - } -} - -// Global instance so we can block other retries when retrying the main -// connection. -export const retry = new Retry(new NotificationService()); diff --git a/packages/ide/yarn.lock b/packages/ide/yarn.lock deleted file mode 100644 index fb57ccd1..00000000 --- a/packages/ide/yarn.lock +++ /dev/null @@ -1,4 +0,0 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. -# yarn lockfile v1 - - diff --git a/packages/logger/.npmignore b/packages/logger/.npmignore deleted file mode 100644 index d248c0bf..00000000 --- a/packages/logger/.npmignore +++ /dev/null @@ -1,4 +0,0 @@ -src -tsconfig.build.json -webpack.config.js -yarn.lock \ No newline at end of file diff --git a/packages/logger/README.md b/packages/logger/README.md deleted file mode 100644 index c449d6cb..00000000 --- a/packages/logger/README.md +++ /dev/null @@ -1,32 +0,0 @@ -# Logger - -Beautiful logging inspired by https://github.com/uber-go/zap. - -- Built for node and the browser -- Zero dependencies -- Uses groups in the browser to reduce clutter - -## Example Usage - -```javascript -import { field, logger } from "@coder/logger"; - -logger.info("Loading container", - field("container_id", container.id_str), - field("organization_id", organization.id_str)); -``` - -## Formatting - -By default the logger uses a different formatter depending on whether it detects -it is running in the browser or not. A custom formatter can be set: - -```javascript -import { logger, Formatter } from "@coder/logger"; - -class MyFormatter extends Formatter { - // implementation ... -} - -logger.formatter = new MyFormatter(); -``` diff --git a/packages/logger/package.json b/packages/logger/package.json deleted file mode 100644 index 955c4501..00000000 --- a/packages/logger/package.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "name": "@coder/logger", - "description": "Beautiful logging inspired by https://github.com/uber-go/zap.", - "scripts": { - "build": "tsc -p tsconfig.build.json && cp ./out/packages/logger/src/* ./out && rm -rf out/packages && ../../node_modules/.bin/webpack --config ./webpack.config.js", - "postinstall": "if [ ! -d out ];then npm run build; fi" - }, - "version": "1.1.3", - "main": "out/main.js", - "types": "out/index.d.ts", - "author": "Coder", - "license": "MIT", - "dependencies": { - "@google-cloud/logging": "^4.5.2" - } -} diff --git a/packages/logger/src/extender.test.ts b/packages/logger/src/extender.test.ts deleted file mode 100644 index cae17196..00000000 --- a/packages/logger/src/extender.test.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { field, logger } from "./logger"; -import { createStackdriverExtender } from "./extender"; - -describe("Extender", () => { - it("should add stackdriver extender", () => { - logger.extend(createStackdriverExtender("coder-dev-1", "logging-package-tests")); - }); - - it("should log", async () => { - logger.debug("Bananas!", field("frog", { hi: "wow" })); - }); -}); diff --git a/packages/logger/src/extender.ts b/packages/logger/src/extender.ts deleted file mode 100644 index b46c735d..00000000 --- a/packages/logger/src/extender.ts +++ /dev/null @@ -1,63 +0,0 @@ -import * as gcl from "@google-cloud/logging"; -import { Extender, logger, field } from "./logger"; - -export const createStackdriverExtender = (projectId: string, logId: string): Extender => { - enum GcpLogSeverity { - DEFAULT = 0, - DEBUG = 100, - INFO = 200, - NOTICE = 300, - WARNING = 400, - ERROR = 500, - CRITICAL = 600, - ALERT = 700, - EMERGENCY = 800, - } - - const logging = new gcl.Logging({ - autoRetry: true, - projectId, - }); - - const log = logging.log(logId); - const convertSeverity = (severity: "trace" | "info" | "warn" | "debug" | "error"): GcpLogSeverity => { - switch (severity) { - case "trace": - case "debug": - return GcpLogSeverity.DEBUG; - case "info": - return GcpLogSeverity.INFO; - case "error": - return GcpLogSeverity.ERROR; - case "warn": - return GcpLogSeverity.WARNING; - } - }; - - return (options): void => { - const severity = convertSeverity(options.type); - // tslint:disable-next-line:no-any - const metadata = {} as any; - if (options.fields) { - options.fields.forEach((f) => { - if (!f) { - return; - } - metadata[f.identifier] = f.value; - }); - } - - const entry = log.entry({ - // tslint:disable-next-line:no-any - severity: severity as any, - }, { - ...metadata, - message: options.message, - }); - - log.write(entry).catch((ex) => { - logger.named("GCP").error("Failed to log", field("error", ex)); - }); - }; - -}; diff --git a/packages/logger/src/index.ts b/packages/logger/src/index.ts deleted file mode 100644 index 41c7bf27..00000000 --- a/packages/logger/src/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "./logger"; diff --git a/packages/logger/src/logger.test.ts b/packages/logger/src/logger.test.ts deleted file mode 100644 index b34cad66..00000000 --- a/packages/logger/src/logger.test.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { field, logger, BrowserFormatter, Time } from "./logger"; - -describe("Logger", () => { - it("should use server formatter", () => { - logger.info("test", field("key", "value"), field("time", new Time(100, Date.now()))); - logger.named("name").debug("test name"); - logger.named("another name").warn("another test name"); - }); - - it("should use browser formatter", () => { - logger.formatter = new BrowserFormatter(); - logger.info("test", field("key", "value"), field("time", new Time(100, Date.now()))); - logger.named("name").debug("test name"); - logger.named("another name").warn("another test name"); - }); -}); diff --git a/packages/logger/src/logger.ts b/packages/logger/src/logger.ts deleted file mode 100644 index 70e15aff..00000000 --- a/packages/logger/src/logger.ts +++ /dev/null @@ -1,464 +0,0 @@ -/** - * Log level. - */ -export enum Level { - Trace, - Debug, - Info, - Warning, - Error, -} - -/** - * A field to log. - */ -export class Field { - public constructor( - public readonly identifier: string, - public readonly value: T, - ) { } - - /** - * Convert field to JSON. - */ - public toJSON(): object { - return { - identifier: this.identifier, - value: this.value, - }; - } -} - -/** - * Represents the time something takes. - */ -export class Time { - public constructor( - public readonly expected: number, - public readonly ms: number, - ) { } -} - -// `undefined` is allowed to make it easy to conditionally display a field. -// For example: `error && field("error", error)` -// tslint:disable-next-line no-any -export type FieldArray = Array | undefined>; - -// Functions can be used to remove the need to perform operations when the -// logging level won't output the result anyway. -export type LogCallback = () => [string, ...FieldArray]; - -/** - * Creates a time field - */ -export const time = (expected: number): Time => { - return new Time(expected, Date.now()); -}; - -export const field = (name: string, value: T): Field => { - return new Field(name, value); -}; - -export type Extender = (msg: { - message: string, - level: Level, - type: "trace" | "info" | "warn" | "debug" | "error", - fields?: FieldArray, - section?: string, -}) => void; - -/** - * This formats & builds text for logging. - * It should only be used to build one log item at a time since it stores the - * currently built items and appends to that. - */ -export abstract class Formatter { - protected format = ""; - protected args = []; - - /** - * Add a tag. - */ - public abstract tag(name: string, color: string): void; - - /** - * Add string or arbitrary variable. - */ - public abstract push(arg: string, color?: string, weight?: string): void; - public abstract push(arg: any): void; // tslint:disable-line no-any - - // tslint:disable-next-line no-any - public abstract fields(fields: Array>): void; - - /** - * Flush out the built arguments. - */ - public flush(): any[] { // tslint:disable-line no-any - const args = [this.format, ...this.args]; - this.format = ""; - this.args = []; - - return args; - } - - /** - * Get the format string for the value type. - */ - protected getType(arg: any): string { // tslint:disable-line no-any - switch (typeof arg) { - case "object": - return "%o"; - case "number": - return "%d"; - default: - return "%s"; - } - } -} - -/** - * Browser formatter. - */ -export class BrowserFormatter extends Formatter { - public tag(name: string, color: string): void { - this.format += `%c ${name} `; - this.args.push( - `border: 1px solid #222; background-color: ${color}; padding-top: 1px;` - + " padding-bottom: 1px; font-size: 12px; font-weight: bold; color: white;" - + (name.length === 4 ? "padding-left: 3px; padding-right: 4px;" : ""), - ); - // A space to separate the tag from the title. - this.push(" "); - } - - public push(arg: any, color: string = "inherit", weight: string = "normal"): void { // tslint:disable-line no-any - if (color || weight) { - this.format += "%c"; - this.args.push( - (color ? `color: ${color};` : "") + - (weight ? `font-weight: ${weight};` : ""), - ); - } - this.format += this.getType(arg); - this.args.push(arg); - } - - // tslint:disable-next-line no-any - public fields(fields: Array>): void { - // tslint:disable-next-line no-console - console.groupCollapsed(...this.flush()); - fields.forEach((field) => { - this.push(field.identifier, "#3794ff", "bold"); - if (typeof field.value !== "undefined" && field.value.constructor && field.value.constructor.name) { - this.push(` (${field.value.constructor.name})`); - } - this.push(": "); - this.push(field.value); - // tslint:disable-next-line no-console - console.log(...this.flush()); - }); - // tslint:disable-next-line no-console - console.groupEnd(); - } -} - -/** - * Server (Node) formatter. - */ -export class ServerFormatter extends Formatter { - public tag(name: string, color: string): void { - const [r, g, b] = this.hexToRgb(color); - while (name.length < 5) { - name += " "; - } - this.format += "\u001B[1m"; - this.format += `\u001B[38;2;${r};${g};${b}m${name} \u001B[0m`; - } - - public push(arg: any, color?: string, weight?: string): void { // tslint:disable-line no-any - if (weight === "bold") { - this.format += "\u001B[1m"; - } - if (color) { - const [r, g, b] = this.hexToRgb(color); - this.format += `\u001B[38;2;${r};${g};${b}m`; - } - this.format += this.getType(arg); - if (weight || color) { - this.format += "\u001B[0m"; - } - this.args.push(arg); - } - - // tslint:disable-next-line no-any - public fields(fields: Array>): void { - // tslint:disable-next-line no-any - const obj: { [key: string]: any} = {}; - this.format += "\u001B[38;2;140;140;140m"; - fields.forEach((field) => { - obj[field.identifier] = field.value; - }); - this.args.push(JSON.stringify(obj)); - console.log(...this.flush()); // tslint:disable-line no-console - } - - /** - * Convert fully-formed hex to rgb. - */ - private hexToRgb(hex: string): [number, number, number] { - const integer = parseInt(hex.substr(1), 16); - - return [ - (integer >> 16) & 0xFF, - (integer >> 8) & 0xFF, - integer & 0xFF, - ]; - } -} - -/** - * Class for logging. - */ -export class Logger { - public level = Level.Info; - - private readonly nameColor?: string; - private muted: boolean = false; - - public constructor( - private _formatter: Formatter, - private readonly name?: string, - private readonly defaultFields?: FieldArray, - private readonly extenders: Extender[] = [], - ) { - if (name) { - this.nameColor = this.hashStringToColor(name); - } - const envLevel = typeof global !== "undefined" && typeof global.process !== "undefined" ? global.process.env.LOG_LEVEL : process.env.LOG_LEVEL; - if (envLevel) { - switch (envLevel) { - case "trace": this.level = Level.Trace; break; - case "debug": this.level = Level.Debug; break; - case "info": this.level = Level.Info; break; - case "warn": this.level = Level.Warning; break; - case "error": this.level = Level.Error; break; - } - } - } - - public set formatter(formatter: Formatter) { - this._formatter = formatter; - } - - /** - * Supresses all output - */ - public mute(): void { - this.muted = true; - } - - public extend(extender: Extender): void { - this.extenders.push(extender); - } - - /** - * Outputs information. - */ - public info(fn: LogCallback): void; - public info(message: string, ...fields: FieldArray): void; - public info(message: LogCallback | string, ...fields: FieldArray): void { - this.handle({ - type: "info", - message, - fields, - tagColor: "#008FBF", - level: Level.Info, - }); - } - - /** - * Outputs a warning. - */ - public warn(fn: LogCallback): void; - public warn(message: string, ...fields: FieldArray): void; - public warn(message: LogCallback | string, ...fields: FieldArray): void { - this.handle({ - type: "warn", - message, - fields, - tagColor: "#FF9D00", - level: Level.Warning, - }); - } - - /** - * Outputs a trace message. - */ - public trace(fn: LogCallback): void; - public trace(message: string, ...fields: FieldArray): void; - public trace(message: LogCallback | string, ...fields: FieldArray): void { - this.handle({ - type: "trace", - message, - fields, - tagColor: "#888888", - level: Level.Trace, - }); - } - - /** - * Outputs a debug message. - */ - public debug(fn: LogCallback): void; - public debug(message: string, ...fields: FieldArray): void; - public debug(message: LogCallback | string, ...fields: FieldArray): void { - this.handle({ - type: "debug", - message, - fields, - tagColor: "#84009E", - level: Level.Debug, - }); - } - - /** - * Outputs an error. - */ - public error(fn: LogCallback): void; - public error(message: string, ...fields: FieldArray): void; - public error(message: LogCallback | string, ...fields: FieldArray): void { - this.handle({ - type: "error", - message, - fields, - tagColor: "#B00000", - level: Level.Error, - }); - } - - /** - * Returns a sub-logger with a name. - * Each name is deterministically generated a color. - */ - public named(name: string, ...fields: FieldArray): Logger { - const l = new Logger(this._formatter, name, fields, this.extenders); - if (this.muted) { - l.mute(); - } - - return l; - } - - /** - * Outputs a message. - */ - private handle(options: { - type: "trace" | "info" | "warn" | "debug" | "error"; - message: string | LogCallback; - fields?: FieldArray; - level: Level; - tagColor: string; - }): void { - if (this.level > options.level || this.muted) { - return; - } - - let passedFields = options.fields || []; - if (typeof options.message === "function") { - const values = options.message(); - options.message = values.shift() as string; - passedFields = values as FieldArray; - } - - const fields = (this.defaultFields - ? passedFields.filter((f) => !!f).concat(this.defaultFields) - : passedFields.filter((f) => !!f)) as Array>; // tslint:disable-line no-any - - const now = Date.now(); - let times: Array> = []; - const hasFields = fields && fields.length > 0; - if (hasFields) { - times = fields.filter((f) => f.value instanceof Time); - } - - this._formatter.tag(options.type.toUpperCase(), options.tagColor); - if (this.name && this.nameColor) { - this._formatter.tag(this.name.toUpperCase(), this.nameColor); - } - this._formatter.push(options.message); - if (times.length > 0) { - times.forEach((time) => { - const diff = now - time.value.ms; - const expPer = diff / time.value.expected; - const min = 125 * (1 - expPer); - const max = 125 + min; - const green = expPer < 1 ? max : min; - const red = expPer >= 1 ? max : min; - this._formatter.push(` ${time.identifier}=`, "#3794ff"); - this._formatter.push(`${diff}ms`, this.rgbToHex(red > 0 ? red : 0, green > 0 ? green : 0, 0)); - }); - } - - // tslint:disable no-console - if (hasFields) { - this._formatter.fields(fields); - } else { - console.log(...this._formatter.flush()); - } - // tslint:enable no-console - - this.extenders.forEach((extender) => { - extender({ - section: this.name, - fields: options.fields, - level: options.level, - message: options.message as string, - type: options.type, - }); - }); - } - - /** - * Hashes a string. - */ - private djb2(str: string): number { - let hash = 5381; - for (let i = 0; i < str.length; i++) { - hash = ((hash << 5) + hash) + str.charCodeAt(i); /* hash * 33 + c */ - } - - return hash; - } - - /** - * Convert rgb to hex. - */ - private rgbToHex(r: number, g: number, b: number): string { - const integer = ((Math.round(r) & 0xFF) << 16) - + ((Math.round(g) & 0xFF) << 8) - + (Math.round(b) & 0xFF); - - const str = integer.toString(16); - - return "#" + "000000".substring(str.length) + str; - } - - /** - * Generates a deterministic color from a string using hashing. - */ - private hashStringToColor(str: string): string { - const hash = this.djb2(str); - - return this.rgbToHex( - (hash & 0xFF0000) >> 16, - (hash & 0x00FF00) >> 8, - hash & 0x0000FF, - ); - } -} - -export const logger = new Logger( - typeof process === "undefined" || typeof process.stdout === "undefined" - ? new BrowserFormatter() - : new ServerFormatter(), -); diff --git a/packages/logger/tsconfig.build.json b/packages/logger/tsconfig.build.json deleted file mode 100644 index 04a1c4cb..00000000 --- a/packages/logger/tsconfig.build.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "extends": "../tsconfig.json", - "compilerOptions": { - "declarationDir": "out", - "declaration": true, - "emitDeclarationOnly": true - } -} \ No newline at end of file diff --git a/packages/logger/webpack.config.js b/packages/logger/webpack.config.js deleted file mode 100644 index 815dec73..00000000 --- a/packages/logger/webpack.config.js +++ /dev/null @@ -1,34 +0,0 @@ -const path = require("path"); -const merge = require("webpack-merge"); - -module.exports = [ - merge(require(path.join(__dirname, "../../scripts", "webpack.general.config.js"))(), { - devtool: "none", - mode: "production", - target: "node", - output: { - path: path.join(__dirname, "out"), - filename: "main.js", - libraryTarget: "commonjs", - }, - entry: [ - "./packages/logger/src/index.ts" - ], - }), - merge(require(path.join(__dirname, "../../scripts", "webpack.general.config.js"))(), { - devtool: "none", - mode: "production", - target: "node", - output: { - path: path.join(__dirname, "out"), - filename: "extender.js", - libraryTarget: "commonjs", - }, - externals: { - "@google-cloud/logging": "commonjs @google-cloud/logging", - }, - entry: [ - "./packages/logger/src/extender.ts" - ], - }), -]; diff --git a/packages/logger/yarn.lock b/packages/logger/yarn.lock deleted file mode 100644 index 7d1cf408..00000000 --- a/packages/logger/yarn.lock +++ /dev/null @@ -1,1326 +0,0 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. -# yarn lockfile v1 - - -"@google-cloud/common-grpc@^0.10.0": - version "0.10.1" - resolved "https://registry.yarnpkg.com/@google-cloud/common-grpc/-/common-grpc-0.10.1.tgz#ac50bc4b50cb50ba4c7ec335074b631900301fee" - integrity sha512-oV5mKRqPAqamPcjj8S61UKyB5cz2ugA0/9MPXUfu0CoYaG6AnhnrbPhHDOW6fQ4eci27ER5iakR00htvM9C+Xg== - dependencies: - "@google-cloud/common" "^0.31.0" - "@google-cloud/projectify" "^0.3.0" - "@google-cloud/promisify" "^0.4.0" - "@grpc/proto-loader" "^0.4.0" - duplexify "^4.0.0" - extend "^3.0.2" - grpc "^1.15.1" - is "^3.2.1" - retry-request "^4.0.0" - through2 "^3.0.0" - -"@google-cloud/common@^0.31.0": - version "0.31.1" - resolved "https://registry.yarnpkg.com/@google-cloud/common/-/common-0.31.1.tgz#ab8da218b0a435c396807d1fb6fe7a7854ce9a1f" - integrity sha512-MgaF8VmDaoyIqzZUXIbcohTb5sQn+PYlYmcpb0/E8psUpVe+kaBwLq/Z8pcFtACCr6PNT36n+a6s1kG35bAuCA== - dependencies: - "@google-cloud/projectify" "^0.3.2" - "@google-cloud/promisify" "^0.4.0" - "@types/duplexify" "^3.5.0" - "@types/request" "^2.47.0" - arrify "^1.0.1" - duplexify "^3.6.0" - ent "^2.2.0" - extend "^3.0.1" - google-auth-library "^3.0.0" - pify "^4.0.0" - retry-request "^4.0.0" - -"@google-cloud/logging@^4.5.2": - version "4.5.2" - resolved "https://registry.yarnpkg.com/@google-cloud/logging/-/logging-4.5.2.tgz#1248d7ff3f8cd2c879527aed457ee7ddce92d815" - integrity sha512-jW5XtSMf//e9JCXMkKAUuzY4hoAL6s7Cwv1gPfZMnIuMuTeD44UMyI1uTa2/yGVnvWWuawrDgdcLf5ugk7/G3w== - dependencies: - "@google-cloud/common-grpc" "^0.10.0" - "@google-cloud/paginator" "^0.2.0" - "@google-cloud/projectify" "^0.3.0" - "@google-cloud/promisify" "^0.4.0" - "@opencensus/propagation-stackdriver" "0.0.11" - arrify "^2.0.0" - eventid "^0.1.2" - extend "^3.0.2" - gcp-metadata "^1.0.0" - google-auth-library "^3.0.0" - google-gax "^0.25.0" - is "^3.2.1" - lodash.merge "^4.6.1" - on-finished "^2.3.0" - pify "^4.0.1" - protobufjs "^6.8.8" - pumpify "^1.5.1" - snakecase-keys "^2.0.0" - stream-events "^1.0.4" - through2 "^3.0.0" - type-fest "^0.3.1" - -"@google-cloud/paginator@^0.2.0": - version "0.2.0" - resolved "https://registry.yarnpkg.com/@google-cloud/paginator/-/paginator-0.2.0.tgz#eab2e6aa4b81df7418f6c51e2071f64dab2c2fa5" - integrity sha512-2ZSARojHDhkLvQ+CS32K+iUhBsWg3AEw+uxtqblA7xoCABDyhpj99FPp35xy6A+XlzMhOSrHHaxFE+t6ZTQq0w== - dependencies: - arrify "^1.0.1" - extend "^3.0.1" - split-array-stream "^2.0.0" - stream-events "^1.0.4" - -"@google-cloud/projectify@^0.3.0", "@google-cloud/projectify@^0.3.2": - version "0.3.3" - resolved "https://registry.yarnpkg.com/@google-cloud/projectify/-/projectify-0.3.3.tgz#bde9103d50b20a3ea3337df8c6783a766e70d41d" - integrity sha512-7522YHQ4IhaafgSunsFF15nG0TGVmxgXidy9cITMe+256RgqfcrfWphiMufW+Ou4kqagW/u3yxwbzVEW3dk2Uw== - -"@google-cloud/promisify@^0.4.0": - version "0.4.0" - resolved "https://registry.yarnpkg.com/@google-cloud/promisify/-/promisify-0.4.0.tgz#4fbfcf4d85bb6a2e4ccf05aa63d2b10d6c9aad9b" - integrity sha512-4yAHDC52TEMCNcMzVC8WlqnKKKq+Ssi2lXoUg9zWWkZ6U6tq9ZBRYLHHCRdfU+EU9YJsVmivwGcKYCjRGjnf4Q== - -"@grpc/grpc-js@^0.3.0": - version "0.3.6" - resolved "https://registry.yarnpkg.com/@grpc/grpc-js/-/grpc-js-0.3.6.tgz#d9b52043907170d38e06711d9477fde29ab46fa8" - integrity sha512-SmLNuPGlUur64bNS9aHZguqWDVQ8+Df1CGn+xsh7l6T2wiP5ArOMlywZ3TZo6z/rwKtGQgUJY9ZrPYUmHEXd/Q== - dependencies: - semver "^5.5.0" - -"@grpc/proto-loader@^0.4.0": - version "0.4.0" - resolved "https://registry.yarnpkg.com/@grpc/proto-loader/-/proto-loader-0.4.0.tgz#a823a51eb2fde58369bef1deb5445fd808d70901" - integrity sha512-Jm6o+75uWT7E6+lt8edg4J1F/9+BedOjaMgwE14pxS/AO43/0ZqK+rCLVVrXLoExwSAZvgvOD2B0ivy3Spsspw== - dependencies: - lodash.camelcase "^4.3.0" - protobufjs "^6.8.6" - -"@opencensus/core@^0.0.11": - version "0.0.11" - resolved "https://registry.yarnpkg.com/@opencensus/core/-/core-0.0.11.tgz#484f1486a4babb91428531e4e852ff50b5a68673" - integrity sha512-UuRmn7TbaIEkT4jhIjjlnvI7U1B3xjUbLqPr7fRrOYiTfCdaGFRmVYC4Jj7Fj5K/JQ66lR35KiRCOThWaBQ2pA== - dependencies: - continuation-local-storage "^3.2.1" - log-driver "^1.2.7" - semver "^6.0.0" - shimmer "^1.2.0" - uuid "^3.2.1" - -"@opencensus/propagation-stackdriver@0.0.11": - version "0.0.11" - resolved "https://registry.yarnpkg.com/@opencensus/propagation-stackdriver/-/propagation-stackdriver-0.0.11.tgz#302f595926f0082406a40ea51f27580c5c2bd645" - integrity sha512-Ra0bODDCTPnodi4eZ+jEFfHD6XNPiAx9tCrU7sh7c52fJat85o2xhwLwxnfDDF68ZBw5C9JNOQfCmBUTbOXrjg== - dependencies: - "@opencensus/core" "^0.0.11" - hex2dec "^1.0.1" - uuid "^3.2.1" - -"@protobufjs/aspromise@^1.1.1", "@protobufjs/aspromise@^1.1.2": - version "1.1.2" - resolved "https://registry.yarnpkg.com/@protobufjs/aspromise/-/aspromise-1.1.2.tgz#9b8b0cc663d669a7d8f6f5d0893a14d348f30fbf" - integrity sha1-m4sMxmPWaafY9vXQiToU00jzD78= - -"@protobufjs/base64@^1.1.2": - version "1.1.2" - resolved "https://registry.yarnpkg.com/@protobufjs/base64/-/base64-1.1.2.tgz#4c85730e59b9a1f1f349047dbf24296034bb2735" - integrity sha512-AZkcAA5vnN/v4PDqKyMR5lx7hZttPDgClv83E//FMNhR2TMcLUhfRUBHCmSl0oi9zMgDDqRUJkSxO3wm85+XLg== - -"@protobufjs/codegen@^2.0.4": - version "2.0.4" - resolved "https://registry.yarnpkg.com/@protobufjs/codegen/-/codegen-2.0.4.tgz#7ef37f0d010fb028ad1ad59722e506d9262815cb" - integrity sha512-YyFaikqM5sH0ziFZCN3xDC7zeGaB/d0IUb9CATugHWbd1FRFwWwt4ld4OYMPWu5a3Xe01mGAULCdqhMlPl29Jg== - -"@protobufjs/eventemitter@^1.1.0": - version "1.1.0" - resolved "https://registry.yarnpkg.com/@protobufjs/eventemitter/-/eventemitter-1.1.0.tgz#355cbc98bafad5978f9ed095f397621f1d066b70" - integrity sha1-NVy8mLr61ZePntCV85diHx0Ga3A= - -"@protobufjs/fetch@^1.1.0": - version "1.1.0" - resolved "https://registry.yarnpkg.com/@protobufjs/fetch/-/fetch-1.1.0.tgz#ba99fb598614af65700c1619ff06d454b0d84c45" - integrity sha1-upn7WYYUr2VwDBYZ/wbUVLDYTEU= - dependencies: - "@protobufjs/aspromise" "^1.1.1" - "@protobufjs/inquire" "^1.1.0" - -"@protobufjs/float@^1.0.2": - version "1.0.2" - resolved "https://registry.yarnpkg.com/@protobufjs/float/-/float-1.0.2.tgz#5e9e1abdcb73fc0a7cb8b291df78c8cbd97b87d1" - integrity sha1-Xp4avctz/Ap8uLKR33jIy9l7h9E= - -"@protobufjs/inquire@^1.1.0": - version "1.1.0" - resolved "https://registry.yarnpkg.com/@protobufjs/inquire/-/inquire-1.1.0.tgz#ff200e3e7cf2429e2dcafc1140828e8cc638f089" - integrity sha1-/yAOPnzyQp4tyvwRQIKOjMY48Ik= - -"@protobufjs/path@^1.1.2": - version "1.1.2" - resolved "https://registry.yarnpkg.com/@protobufjs/path/-/path-1.1.2.tgz#6cc2b20c5c9ad6ad0dccfd21ca7673d8d7fbf68d" - integrity sha1-bMKyDFya1q0NzP0hynZz2Nf79o0= - -"@protobufjs/pool@^1.1.0": - version "1.1.0" - resolved "https://registry.yarnpkg.com/@protobufjs/pool/-/pool-1.1.0.tgz#09fd15f2d6d3abfa9b65bc366506d6ad7846ff54" - integrity sha1-Cf0V8tbTq/qbZbw2ZQbWrXhG/1Q= - -"@protobufjs/utf8@^1.1.0": - version "1.1.0" - resolved "https://registry.yarnpkg.com/@protobufjs/utf8/-/utf8-1.1.0.tgz#a777360b5b39a1a2e5106f8e858f2fd2d060c570" - integrity sha1-p3c2C1s5oaLlEG+OhY8v0tBgxXA= - -"@types/caseless@*": - version "0.12.2" - resolved "https://registry.yarnpkg.com/@types/caseless/-/caseless-0.12.2.tgz#f65d3d6389e01eeb458bd54dc8f52b95a9463bc8" - integrity sha512-6ckxMjBBD8URvjB6J3NcnuAn5Pkl7t3TizAg+xdlzzQGSPSmBcXf8KoIH0ua/i+tio+ZRUHEXp0HEmvaR4kt0w== - -"@types/duplexify@^3.5.0": - version "3.6.0" - resolved "https://registry.yarnpkg.com/@types/duplexify/-/duplexify-3.6.0.tgz#dfc82b64bd3a2168f5bd26444af165bf0237dcd8" - integrity sha512-5zOA53RUlzN74bvrSGwjudssD9F3a797sDZQkiYpUOxW+WHaXTCPz4/d5Dgi6FKnOqZ2CpaTo0DhgIfsXAOE/A== - dependencies: - "@types/node" "*" - -"@types/form-data@*": - version "2.2.1" - resolved "https://registry.yarnpkg.com/@types/form-data/-/form-data-2.2.1.tgz#ee2b3b8eaa11c0938289953606b745b738c54b1e" - integrity sha512-JAMFhOaHIciYVh8fb5/83nmuO/AHwmto+Hq7a9y8FzLDcC1KCU344XDOMEmahnrTFlHjgh4L0WJFczNIX2GxnQ== - dependencies: - "@types/node" "*" - -"@types/long@^4.0.0": - version "4.0.0" - resolved "https://registry.yarnpkg.com/@types/long/-/long-4.0.0.tgz#719551d2352d301ac8b81db732acb6bdc28dbdef" - integrity sha512-1w52Nyx4Gq47uuu0EVcsHBxZFJgurQ+rTKS3qMHxR1GY2T8c2AJYd6vZoZ9q1rupaDjU0yT+Jc2XTyXkjeMA+Q== - -"@types/node@*": - version "11.13.4" - resolved "https://registry.yarnpkg.com/@types/node/-/node-11.13.4.tgz#f83ec3c3e05b174b7241fadeb6688267fe5b22ca" - integrity sha512-+rabAZZ3Yn7tF/XPGHupKIL5EcAbrLxnTr/hgQICxbeuAfWtT0UZSfULE+ndusckBItcv4o6ZeOJplQikVcLvQ== - -"@types/node@^10.1.0": - version "10.14.4" - resolved "https://registry.yarnpkg.com/@types/node/-/node-10.14.4.tgz#1c586b991457cbb58fef51bc4e0cfcfa347714b5" - integrity sha512-DT25xX/YgyPKiHFOpNuANIQIVvYEwCWXgK2jYYwqgaMrYE6+tq+DtmMwlD3drl6DJbUwtlIDnn0d7tIn/EbXBg== - -"@types/request@^2.47.0": - version "2.48.1" - resolved "https://registry.yarnpkg.com/@types/request/-/request-2.48.1.tgz#e402d691aa6670fbbff1957b15f1270230ab42fa" - integrity sha512-ZgEZ1TiD+KGA9LiAAPPJL68Id2UWfeSO62ijSXZjFJArVV+2pKcsVHmrcu+1oiE3q6eDGiFiSolRc4JHoerBBg== - dependencies: - "@types/caseless" "*" - "@types/form-data" "*" - "@types/node" "*" - "@types/tough-cookie" "*" - -"@types/tough-cookie@*": - version "2.3.5" - resolved "https://registry.yarnpkg.com/@types/tough-cookie/-/tough-cookie-2.3.5.tgz#9da44ed75571999b65c37b60c9b2b88db54c585d" - integrity sha512-SCcK7mvGi3+ZNz833RRjFIxrn4gI1PPR3NtuIS+6vMkvmsGjosqTJwRt5bAEFLRz+wtJMWv8+uOnZf2hi2QXTg== - -abbrev@1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.1.tgz#f8f2c887ad10bf67f634f005b6987fed3179aac8" - integrity sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q== - -abort-controller@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/abort-controller/-/abort-controller-3.0.0.tgz#eaf54d53b62bae4138e809ca225c8439a6efb392" - integrity sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg== - dependencies: - event-target-shim "^5.0.0" - -agent-base@^4.1.0: - version "4.2.1" - resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-4.2.1.tgz#d89e5999f797875674c07d87f260fc41e83e8ca9" - integrity sha512-JVwXMr9nHYTUXsBFKUqhJwvlcYU/blreOEUkhNR2eXZIvwd+c+o5V4MgDPKWnMS/56awN3TRzIP+KoPn+roQtg== - dependencies: - es6-promisify "^5.0.0" - -ansi-regex@^2.0.0: - version "2.1.1" - resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df" - integrity sha1-w7M6te42DYbg5ijwRorn7yfWVN8= - -ansi-regex@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-3.0.0.tgz#ed0317c322064f79466c02966bddb605ab37d998" - integrity sha1-7QMXwyIGT3lGbAKWa922Bas32Zg= - -aproba@^1.0.3: - version "1.2.0" - resolved "https://registry.yarnpkg.com/aproba/-/aproba-1.2.0.tgz#6802e6264efd18c790a1b0d517f0f2627bf2c94a" - integrity sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw== - -are-we-there-yet@~1.1.2: - version "1.1.5" - resolved "https://registry.yarnpkg.com/are-we-there-yet/-/are-we-there-yet-1.1.5.tgz#4b35c2944f062a8bfcda66410760350fe9ddfc21" - integrity sha512-5hYdAkZlcG8tOLujVDTgCT+uPX0VnpAH28gWsLfzpXYm7wP6mp5Q/gYyR7YQ0cKVJcXJnl3j2kpBan13PtQf6w== - dependencies: - delegates "^1.0.0" - readable-stream "^2.0.6" - -arrify@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/arrify/-/arrify-1.0.1.tgz#898508da2226f380df904728456849c1501a4b0d" - integrity sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0= - -arrify@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/arrify/-/arrify-2.0.1.tgz#c9655e9331e0abcd588d2a7cad7e9956f66701fa" - integrity sha512-3duEwti880xqi4eAMN8AyR4a0ByT90zoYdLlevfrvU43vb0YZwZVfxOgxWrLXXXpyugL0hNZc9G6BiB5B3nUug== - -ascli@~1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/ascli/-/ascli-1.0.1.tgz#bcfa5974a62f18e81cabaeb49732ab4a88f906bc" - integrity sha1-vPpZdKYvGOgcq660lzKrSoj5Brw= - dependencies: - colour "~0.7.1" - optjs "~3.2.2" - -async-listener@^0.6.0: - version "0.6.10" - resolved "https://registry.yarnpkg.com/async-listener/-/async-listener-0.6.10.tgz#a7c97abe570ba602d782273c0de60a51e3e17cbc" - integrity sha512-gpuo6xOyF4D5DE5WvyqZdPA3NGhiT6Qf07l7DCB0wwDEsLvDIbCr6j9S5aj5Ch96dLace5tXVzWBZkxU/c5ohw== - dependencies: - semver "^5.3.0" - shimmer "^1.1.0" - -balanced-match@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767" - integrity sha1-ibTRmasr7kneFk6gK4nORi1xt2c= - -base64-js@^1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.3.0.tgz#cab1e6118f051095e58b5281aea8c1cd22bfc0e3" - integrity sha512-ccav/yGvoa80BQDljCxsmmQ3Xvx60/UpBIij5QN21W3wBi/hhIC9OoO+KLpu9IJTS9j4DRVJ3aDDF9cMSoa2lw== - -bignumber.js@^7.0.0: - version "7.2.1" - resolved "https://registry.yarnpkg.com/bignumber.js/-/bignumber.js-7.2.1.tgz#80c048759d826800807c4bfd521e50edbba57a5f" - integrity sha512-S4XzBk5sMB+Rcb/LNcpzXr57VRTxgAvaAEDAl1AwRx27j00hT84O6OkteE7u8UB3NuaaygCRrEpqox4uDOrbdQ== - -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" - -buffer-equal-constant-time@1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz#f8e71132f7ffe6e01a5c9697a4c6f3e48d5cc819" - integrity sha1-+OcRMvf/5uAaXJaXpMbz5I1cyBk= - -bytebuffer@~5: - version "5.0.1" - resolved "https://registry.yarnpkg.com/bytebuffer/-/bytebuffer-5.0.1.tgz#582eea4b1a873b6d020a48d58df85f0bba6cfddd" - integrity sha1-WC7qSxqHO20CCkjVjfhfC7ps/d0= - dependencies: - long "~3" - -camelcase@^2.0.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-2.1.1.tgz#7c1d16d679a1bbe59ca02cacecfb011e201f5a1f" - integrity sha1-fB0W1nmhu+WcoCys7PsBHiAfWh8= - -chownr@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/chownr/-/chownr-1.1.1.tgz#54726b8b8fff4df053c42187e801fb4412df1494" - integrity sha512-j38EvO5+LHX84jlo6h4UzmOwi0UgW61WRyPtJz4qaadK5eY3BTS5TY/S1Stc3Uk2lIM6TPevAlULiEJwie860g== - -cliui@^3.0.3: - version "3.2.0" - resolved "https://registry.yarnpkg.com/cliui/-/cliui-3.2.0.tgz#120601537a916d29940f934da3b48d585a39213d" - integrity sha1-EgYBU3qRbSmUD5NNo7SNWFo5IT0= - dependencies: - string-width "^1.0.1" - strip-ansi "^3.0.1" - wrap-ansi "^2.0.0" - -code-point-at@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77" - integrity sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c= - -colour@~0.7.1: - version "0.7.1" - resolved "https://registry.yarnpkg.com/colour/-/colour-0.7.1.tgz#9cb169917ec5d12c0736d3e8685746df1cadf778" - integrity sha1-nLFpkX7F0SwHNtPoaFdG3xyt93g= - -concat-map@0.0.1: - version "0.0.1" - resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" - integrity sha1-2Klr13/Wjfd5OnMDajug1UBdR3s= - -console-control-strings@^1.0.0, console-control-strings@~1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/console-control-strings/-/console-control-strings-1.1.0.tgz#3d7cf4464db6446ea644bf4b39507f9851008e8e" - integrity sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4= - -continuation-local-storage@^3.2.1: - version "3.2.1" - resolved "https://registry.yarnpkg.com/continuation-local-storage/-/continuation-local-storage-3.2.1.tgz#11f613f74e914fe9b34c92ad2d28fe6ae1db7ffb" - integrity sha512-jx44cconVqkCEEyLSKWwkvUXwO561jXMa3LPjTPsm5QR22PA0/mhe33FT4Xb5y74JDvt/Cq+5lm8S8rskLv9ZA== - dependencies: - async-listener "^0.6.0" - emitter-listener "^1.1.1" - -core-util-is@~1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" - integrity sha1-tf1UIgqivFq1eqtxQMlAdUUDwac= - -d64@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/d64/-/d64-1.0.0.tgz#4002a87e850cbfc9f9d9706b60fca613a3336e90" - integrity sha1-QAKofoUMv8n52XBrYPymE6MzbpA= - -debug@^3.1.0: - version "3.2.6" - resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.6.tgz#e83d17de16d8a7efb7717edbe5fb10135eee629b" - integrity sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ== - dependencies: - ms "^2.1.1" - -debug@^4.1.0: - version "4.1.1" - resolved "https://registry.yarnpkg.com/debug/-/debug-4.1.1.tgz#3b72260255109c6b589cee050f1d516139664791" - integrity sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw== - dependencies: - ms "^2.1.1" - -decamelize@^1.1.1: - version "1.2.0" - resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" - integrity sha1-9lNNFRSCabIDUue+4m9QH5oZEpA= - -deep-extend@^0.6.0: - version "0.6.0" - resolved "https://registry.yarnpkg.com/deep-extend/-/deep-extend-0.6.0.tgz#c4fa7c95404a17a9c3e8ca7e1537312b736330ac" - integrity sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA== - -delegates@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/delegates/-/delegates-1.0.0.tgz#84c6e159b81904fdca59a0ef44cd870d31250f9a" - integrity sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o= - -detect-libc@^1.0.2: - version "1.0.3" - resolved "https://registry.yarnpkg.com/detect-libc/-/detect-libc-1.0.3.tgz#fa137c4bd698edf55cd5cd02ac559f91a4c4ba9b" - integrity sha1-+hN8S9aY7fVc1c0CrFWfkaTEups= - -duplexify@^3.6.0: - version "3.7.1" - resolved "https://registry.yarnpkg.com/duplexify/-/duplexify-3.7.1.tgz#2a4df5317f6ccfd91f86d6fd25d8d8a103b88309" - integrity sha512-07z8uv2wMyS51kKhD1KsdXJg5WQ6t93RneqRxUHnskXVtlYYkLqM0gqStQZ3pj073g687jPCHrqNfCzawLYh5g== - dependencies: - end-of-stream "^1.0.0" - inherits "^2.0.1" - readable-stream "^2.0.0" - stream-shift "^1.0.0" - -duplexify@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/duplexify/-/duplexify-4.0.0.tgz#9eddda497bf43dddd2d143d31f7a4e68ad1e53a9" - integrity sha512-yY3mlX6uXXe53lt9TnyIIlPZD9WfBEl+OU/8YLiU+p0xxaNRMjLE+rIEURR5/F1H41z9iMHcmVRxRS89tKCUcQ== - dependencies: - end-of-stream "^1.4.1" - inherits "^2.0.3" - readable-stream "^3.1.1" - stream-shift "^1.0.0" - -ecdsa-sig-formatter@1.0.11: - version "1.0.11" - resolved "https://registry.yarnpkg.com/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.11.tgz#ae0f0fa2d85045ef14a817daa3ce9acd0489e5bf" - integrity sha512-nagl3RYrbNv6kQkeJIpt6NJZy8twLB/2vtz6yN9Z4vRKHN4/QZJIEbqohALSgwKdnksuY3k5Addp5lg8sVoVcQ== - dependencies: - safe-buffer "^5.0.1" - -ee-first@1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d" - integrity sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0= - -emitter-listener@^1.1.1: - version "1.1.2" - resolved "https://registry.yarnpkg.com/emitter-listener/-/emitter-listener-1.1.2.tgz#56b140e8f6992375b3d7cb2cab1cc7432d9632e8" - integrity sha512-Bt1sBAGFHY9DKY+4/2cV6izcKJUf5T7/gkdmkxzX/qv9CcGH8xSwVRW5mtX03SWJtRTWSOpzCuWN9rBFYZepZQ== - dependencies: - shimmer "^1.2.0" - -end-of-stream@^1.0.0, end-of-stream@^1.1.0, end-of-stream@^1.4.1: - version "1.4.1" - resolved "https://registry.yarnpkg.com/end-of-stream/-/end-of-stream-1.4.1.tgz#ed29634d19baba463b6ce6b80a37213eab71ec43" - integrity sha512-1MkrZNvWTKCaigbn+W15elq2BB/L22nqrSY5DKlo3X6+vclJm8Bb5djXJBmEX6fS3+zCh/F4VBK5Z2KxJt4s2Q== - dependencies: - once "^1.4.0" - -ent@^2.2.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/ent/-/ent-2.2.0.tgz#e964219325a21d05f44466a2f686ed6ce5f5dd1d" - integrity sha1-6WQhkyWiHQX0RGai9obtbOX13R0= - -es6-promise@^4.0.3: - version "4.2.6" - resolved "https://registry.yarnpkg.com/es6-promise/-/es6-promise-4.2.6.tgz#b685edd8258886365ea62b57d30de28fadcd974f" - integrity sha512-aRVgGdnmW2OiySVPUC9e6m+plolMAJKjZnQlCwNSuK5yQ0JN61DZSO1X1Ufd1foqWRAlig0rhduTCHe7sVtK5Q== - -es6-promisify@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/es6-promisify/-/es6-promisify-5.0.0.tgz#5109d62f3e56ea967c4b63505aef08291c8a5203" - integrity sha1-UQnWLz5W6pZ8S2NQWu8IKRyKUgM= - dependencies: - es6-promise "^4.0.3" - -event-target-shim@^5.0.0: - version "5.0.1" - resolved "https://registry.yarnpkg.com/event-target-shim/-/event-target-shim-5.0.1.tgz#5d4d3ebdf9583d63a5333ce2deb7480ab2b05789" - integrity sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ== - -eventid@^0.1.2: - version "0.1.2" - resolved "https://registry.yarnpkg.com/eventid/-/eventid-0.1.2.tgz#0b232d3e244ea5b1d528984140ea69ac7ec89215" - integrity sha1-CyMtPiROpbHVKJhBQOpprH7IkhU= - dependencies: - d64 "^1.0.0" - uuid "^3.0.1" - -extend@^3.0.1, extend@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.2.tgz#f8b1136b4071fbd8eb140aff858b1019ec2915fa" - integrity sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g== - -fast-text-encoding@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/fast-text-encoding/-/fast-text-encoding-1.0.0.tgz#3e5ce8293409cfaa7177a71b9ca84e1b1e6f25ef" - integrity sha512-R9bHCvweUxxwkDwhjav5vxpFvdPGlVngtqmx4pIZfSUhM/Q4NiIUHB456BAf+Q1Nwu3HEZYONtu+Rya+af4jiQ== - -fs-minipass@^1.2.5: - version "1.2.5" - resolved "https://registry.yarnpkg.com/fs-minipass/-/fs-minipass-1.2.5.tgz#06c277218454ec288df77ada54a03b8702aacb9d" - integrity sha512-JhBl0skXjUPCFH7x6x61gQxrKyXsxB5gcgePLZCwfyCGGsTISMoIeObbrvVeP6Xmyaudw4TT43qV2Gz+iyd2oQ== - dependencies: - minipass "^2.2.1" - -fs.realpath@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" - integrity sha1-FQStJSMVjKpA20onh8sBQRmU6k8= - -gauge@~2.7.3: - version "2.7.4" - resolved "https://registry.yarnpkg.com/gauge/-/gauge-2.7.4.tgz#2c03405c7538c39d7eb37b317022e325fb018bf7" - integrity sha1-LANAXHU4w51+s3sxcCLjJfsBi/c= - dependencies: - aproba "^1.0.3" - console-control-strings "^1.0.0" - has-unicode "^2.0.0" - object-assign "^4.1.0" - signal-exit "^3.0.0" - string-width "^1.0.1" - strip-ansi "^3.0.1" - wide-align "^1.1.0" - -gaxios@^1.0.2, gaxios@^1.0.4, gaxios@^1.2.1: - version "1.8.3" - resolved "https://registry.yarnpkg.com/gaxios/-/gaxios-1.8.3.tgz#7dd79860880d22f854d814b3870332be8b16de56" - integrity sha512-6Lc1P0NjbPNQ2FGgTRurz32P6FktNJbwLqXvrUNhfwzKb9iizcWuAJiHoSG2W186K9ZL0X6ST5xD9gJWhHI1sg== - dependencies: - abort-controller "^3.0.0" - extend "^3.0.2" - https-proxy-agent "^2.2.1" - node-fetch "^2.3.0" - -gcp-metadata@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/gcp-metadata/-/gcp-metadata-1.0.0.tgz#5212440229fa099fc2f7c2a5cdcb95575e9b2ca6" - integrity sha512-Q6HrgfrCQeEircnNP3rCcEgiDv7eF9+1B+1MMgpE190+/+0mjQR8PxeOaRgxZWmdDAF9EIryHB9g1moPiw1SbQ== - dependencies: - gaxios "^1.0.2" - json-bigint "^0.3.0" - -glob@^7.0.5, glob@^7.1.3: - version "7.1.3" - resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.3.tgz#3960832d3f1574108342dafd3a67b332c0969df1" - integrity sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ== - dependencies: - fs.realpath "^1.0.0" - inflight "^1.0.4" - inherits "2" - minimatch "^3.0.4" - once "^1.3.0" - path-is-absolute "^1.0.0" - -google-auth-library@^3.0.0: - version "3.1.2" - resolved "https://registry.yarnpkg.com/google-auth-library/-/google-auth-library-3.1.2.tgz#ff2f88cd5cd2118a57bd3d5ad3c093c8837fc350" - integrity sha512-cDQMzTotwyWMrg5jRO7q0A4TL/3GWBgO7I7q5xGKNiiFf9SmGY/OJ1YsLMgI2MVHHsEGyrqYnbnmV1AE+Z6DnQ== - dependencies: - base64-js "^1.3.0" - fast-text-encoding "^1.0.0" - gaxios "^1.2.1" - gcp-metadata "^1.0.0" - gtoken "^2.3.2" - https-proxy-agent "^2.2.1" - jws "^3.1.5" - lru-cache "^5.0.0" - semver "^5.5.0" - -google-gax@^0.25.0: - version "0.25.6" - resolved "https://registry.yarnpkg.com/google-gax/-/google-gax-0.25.6.tgz#5ea5c743933ba957da63951bc828aef91fb69340" - integrity sha512-+CVtOSLQt42mwVvJJirhBiAvWsp8zKeb9zW5Wy3wyvb3VG9OugHzZpwvYO9D4yNPPspe7L9CpIs80I5nUJlS8w== - dependencies: - "@grpc/grpc-js" "^0.3.0" - "@grpc/proto-loader" "^0.4.0" - duplexify "^3.6.0" - google-auth-library "^3.0.0" - google-proto-files "^0.20.0" - grpc "^1.16.0" - grpc-gcp "^0.1.1" - is-stream-ended "^0.1.4" - lodash.at "^4.6.0" - lodash.has "^4.5.2" - protobufjs "^6.8.8" - retry-request "^4.0.0" - semver "^6.0.0" - walkdir "^0.3.2" - -google-p12-pem@^1.0.0: - version "1.0.4" - resolved "https://registry.yarnpkg.com/google-p12-pem/-/google-p12-pem-1.0.4.tgz#b77fb833a2eb9f7f3c689e2e54f095276f777605" - integrity sha512-SwLAUJqUfTB2iS+wFfSS/G9p7bt4eWcc2LyfvmUXe7cWp6p3mpxDo6LLI29MXdU6wvPcQ/up298X7GMC5ylAlA== - dependencies: - node-forge "^0.8.0" - pify "^4.0.0" - -google-proto-files@^0.20.0: - version "0.20.0" - resolved "https://registry.yarnpkg.com/google-proto-files/-/google-proto-files-0.20.0.tgz#dfcd1635a0c3f00f49ca057462cf369108ff4b5e" - integrity sha512-ORU+XhOeDv/UPtnCYLkO1ItmfhRCRPR3ZoeVQ7GfVzEs7PVitPIhsYlY5ZzG8XXnsdmtK27ENurfQ1jhAWpZHg== - dependencies: - "@google-cloud/promisify" "^0.4.0" - protobufjs "^6.8.0" - walkdir "^0.3.0" - -grpc-gcp@^0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/grpc-gcp/-/grpc-gcp-0.1.1.tgz#a11be8a7e7a6edf5f636b44a6a24fb4cc028f71f" - integrity sha512-MAt0Ae9QuL2Lbbt2d+kDta5AxqRD1JVXtBcJuQKp9GeFL5TxPw/hxIyDNyivPjKEXjbG3cBGwSE3CXq6a3KHEQ== - dependencies: - grpc "^1.16.0" - protobufjs "^6.8.8" - -grpc@^1.15.1, grpc@^1.16.0: - version "1.19.0" - resolved "https://registry.yarnpkg.com/grpc/-/grpc-1.19.0.tgz#129fb30923ea2fa7a9b2623f9e7930eda91a242f" - integrity sha512-xX+jZ1M3YXjngsRj/gTxB4EwM0WoWUr54DmyNq9xTeg1oSuVaTPD/PK9wnZKOJWTt1pkeFspXqwJPhddZNxHOA== - dependencies: - lodash.camelcase "^4.3.0" - lodash.clone "^4.5.0" - nan "^2.0.0" - node-pre-gyp "^0.12.0" - protobufjs "^5.0.3" - -gtoken@^2.3.2: - version "2.3.3" - resolved "https://registry.yarnpkg.com/gtoken/-/gtoken-2.3.3.tgz#8a7fe155c5ce0c4b71c886cfb282a9060d94a641" - integrity sha512-EaB49bu/TCoNeQjhCYKI/CurooBKkGxIqFHsWABW0b25fobBYVTMe84A8EBVVZhl8emiUdNypil9huMOTmyAnw== - dependencies: - gaxios "^1.0.4" - google-p12-pem "^1.0.0" - jws "^3.1.5" - mime "^2.2.0" - pify "^4.0.0" - -has-unicode@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/has-unicode/-/has-unicode-2.0.1.tgz#e0e6fe6a28cf51138855e086d1691e771de2a8b9" - integrity sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk= - -hex2dec@^1.0.1: - version "1.1.2" - resolved "https://registry.yarnpkg.com/hex2dec/-/hex2dec-1.1.2.tgz#8e1ce4bef36a74f7d5723c3fb3090c2860077338" - integrity sha512-Yu+q/XWr2fFQ11tHxPq4p4EiNkb2y+lAacJNhAdRXVfRIcDH6gi7htWFnnlIzvqHMHoWeIsfXlNAjZInpAOJDA== - -https-proxy-agent@^2.2.1: - version "2.2.1" - resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-2.2.1.tgz#51552970fa04d723e04c56d04178c3f92592bbc0" - integrity sha512-HPCTS1LW51bcyMYbxUIOO4HEOlQ1/1qRaFWcyxvwaqUS9TY88aoEuHUY33kuAh1YhVVaDQhLZsnPd+XNARWZlQ== - dependencies: - agent-base "^4.1.0" - debug "^3.1.0" - -iconv-lite@^0.4.4: - version "0.4.24" - resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b" - integrity sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA== - dependencies: - safer-buffer ">= 2.1.2 < 3" - -ignore-walk@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/ignore-walk/-/ignore-walk-3.0.1.tgz#a83e62e7d272ac0e3b551aaa82831a19b69f82f8" - integrity sha512-DTVlMx3IYPe0/JJcYP7Gxg7ttZZu3IInhuEhbchuqneY9wWe5Ojy2mXLBaQFUQmo0AW2r3qG7m1mg86js+gnlQ== - dependencies: - minimatch "^3.0.4" - -inflight@^1.0.4: - version "1.0.6" - resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" - integrity sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk= - dependencies: - once "^1.3.0" - wrappy "1" - -inherits@2, inherits@^2.0.1, inherits@^2.0.3, inherits@~2.0.3: - version "2.0.3" - resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" - integrity sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4= - -ini@~1.3.0: - version "1.3.5" - resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.5.tgz#eee25f56db1c9ec6085e0c22778083f596abf927" - integrity sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw== - -invert-kv@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/invert-kv/-/invert-kv-1.0.0.tgz#104a8e4aaca6d3d8cd157a8ef8bfab2d7a3ffdb6" - integrity sha1-EEqOSqym09jNFXqO+L+rLXo//bY= - -is-fullwidth-code-point@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz#ef9e31386f031a7f0d643af82fde50c457ef00cb" - integrity sha1-754xOG8DGn8NZDr4L95QxFfvAMs= - dependencies: - number-is-nan "^1.0.0" - -is-fullwidth-code-point@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz#a3b30a5c4f199183167aaab93beefae3ddfb654f" - integrity sha1-o7MKXE8ZkYMWeqq5O+764937ZU8= - -is-stream-ended@^0.1.4: - version "0.1.4" - resolved "https://registry.yarnpkg.com/is-stream-ended/-/is-stream-ended-0.1.4.tgz#f50224e95e06bce0e356d440a4827cd35b267eda" - integrity sha512-xj0XPvmr7bQFTvirqnFr50o0hQIh6ZItDqloxt5aJrR4NQsYeSsyFQERYGCAzfindAcnKjINnwEEgLx4IqVzQw== - -is@^3.2.1: - version "3.3.0" - resolved "https://registry.yarnpkg.com/is/-/is-3.3.0.tgz#61cff6dd3c4193db94a3d62582072b44e5645d79" - integrity sha512-nW24QBoPcFGGHJGUwnfpI7Yc5CdqWNdsyHQszVE/z2pKHXzh7FZ5GWhJqSyaQ9wMkQnsTx+kAI8bHlCX4tKdbg== - -isarray@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" - integrity sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE= - -json-bigint@^0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/json-bigint/-/json-bigint-0.3.0.tgz#0ccd912c4b8270d05f056fbd13814b53d3825b1e" - integrity sha1-DM2RLEuCcNBfBW+9E4FLU9OCWx4= - dependencies: - bignumber.js "^7.0.0" - -jwa@^1.4.1: - version "1.4.1" - resolved "https://registry.yarnpkg.com/jwa/-/jwa-1.4.1.tgz#743c32985cb9e98655530d53641b66c8645b039a" - integrity sha512-qiLX/xhEEFKUAJ6FiBMbes3w9ATzyk5W7Hvzpa/SLYdxNtng+gcurvrI7TbACjIXlsJyr05/S1oUhZrc63evQA== - dependencies: - buffer-equal-constant-time "1.0.1" - ecdsa-sig-formatter "1.0.11" - safe-buffer "^5.0.1" - -jws@^3.1.5: - version "3.2.2" - resolved "https://registry.yarnpkg.com/jws/-/jws-3.2.2.tgz#001099f3639468c9414000e99995fa52fb478304" - integrity sha512-YHlZCB6lMTllWDtSPHz/ZXTsi8S00usEV6v1tjq8tOUZzw7DpSDWVXjXDre6ed1w/pd495ODpHZYSdkRTsa0HA== - dependencies: - jwa "^1.4.1" - safe-buffer "^5.0.1" - -lcid@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/lcid/-/lcid-1.0.0.tgz#308accafa0bc483a3867b4b6f2b9506251d1b835" - integrity sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU= - dependencies: - invert-kv "^1.0.0" - -lodash.at@^4.6.0: - version "4.6.0" - resolved "https://registry.yarnpkg.com/lodash.at/-/lodash.at-4.6.0.tgz#93cdce664f0a1994ea33dd7cd40e23afd11b0ff8" - integrity sha1-k83OZk8KGZTqM9181A4jr9EbD/g= - -lodash.camelcase@^4.3.0: - version "4.3.0" - resolved "https://registry.yarnpkg.com/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz#b28aa6288a2b9fc651035c7711f65ab6190331a6" - integrity sha1-soqmKIorn8ZRA1x3EfZathkDMaY= - -lodash.clone@^4.5.0: - version "4.5.0" - resolved "https://registry.yarnpkg.com/lodash.clone/-/lodash.clone-4.5.0.tgz#195870450f5a13192478df4bc3d23d2dea1907b6" - integrity sha1-GVhwRQ9aExkkeN9Lw9I9LeoZB7Y= - -lodash.has@^4.5.2: - version "4.5.2" - resolved "https://registry.yarnpkg.com/lodash.has/-/lodash.has-4.5.2.tgz#d19f4dc1095058cccbe2b0cdf4ee0fe4aa37c862" - integrity sha1-0Z9NwQlQWMzL4rDN9O4P5Ko3yGI= - -lodash.merge@^4.6.1: - version "4.6.1" - resolved "https://registry.yarnpkg.com/lodash.merge/-/lodash.merge-4.6.1.tgz#adc25d9cb99b9391c59624f379fbba60d7111d54" - integrity sha512-AOYza4+Hf5z1/0Hztxpm2/xiPZgi/cjMqdnKTUWTBSKchJlxXXuUSxCCl8rJlf4g6yww/j6mA8nC8Hw/EZWxKQ== - -log-driver@^1.2.7: - version "1.2.7" - resolved "https://registry.yarnpkg.com/log-driver/-/log-driver-1.2.7.tgz#63b95021f0702fedfa2c9bb0a24e7797d71871d8" - integrity sha512-U7KCmLdqsGHBLeWqYlFA0V0Sl6P08EE1ZrmA9cxjUE0WVqT9qnyVDPz1kzpFEP0jdJuFnasWIfSd7fsaNXkpbg== - -long@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/long/-/long-4.0.0.tgz#9a7b71cfb7d361a194ea555241c92f7468d5bf28" - integrity sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA== - -long@~3: - version "3.2.0" - resolved "https://registry.yarnpkg.com/long/-/long-3.2.0.tgz#d821b7138ca1cb581c172990ef14db200b5c474b" - integrity sha1-2CG3E4yhy1gcFymQ7xTbIAtcR0s= - -lru-cache@^5.0.0: - version "5.1.1" - resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-5.1.1.tgz#1da27e6710271947695daf6848e847f01d84b920" - integrity sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w== - dependencies: - yallist "^3.0.2" - -map-obj@~3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/map-obj/-/map-obj-3.0.0.tgz#4221cc62360f88c0735f9e7c0813bd889657f490" - integrity sha512-Ot+2wruG8WqTbJngDxz0Ifm03y2pO4iL+brq/l+yEkGjUza03BnMQqX2XT//Jls8MOOl2VTHviAoLX+/nq/HXw== - -mime@^2.2.0: - version "2.4.2" - resolved "https://registry.yarnpkg.com/mime/-/mime-2.4.2.tgz#ce5229a5e99ffc313abac806b482c10e7ba6ac78" - integrity sha512-zJBfZDkwRu+j3Pdd2aHsR5GfH2jIWhmL1ZzBoc+X+3JEti2hbArWcyJ+1laC1D2/U/W1a/+Cegj0/OnEU2ybjg== - -minimatch@^3.0.4: - version "3.0.4" - resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" - integrity sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA== - dependencies: - brace-expansion "^1.1.7" - -minimist@0.0.8: - version "0.0.8" - resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d" - integrity sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0= - -minimist@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284" - integrity sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ= - -minipass@^2.2.1, minipass@^2.3.4: - version "2.3.5" - resolved "https://registry.yarnpkg.com/minipass/-/minipass-2.3.5.tgz#cacebe492022497f656b0f0f51e2682a9ed2d848" - integrity sha512-Gi1W4k059gyRbyVUZQ4mEqLm0YIUiGYfvxhF6SIlk3ui1WVxMTGfGdQ2SInh3PDrRTVvPKgULkpJtT4RH10+VA== - dependencies: - safe-buffer "^5.1.2" - yallist "^3.0.0" - -minizlib@^1.1.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/minizlib/-/minizlib-1.2.1.tgz#dd27ea6136243c7c880684e8672bb3a45fd9b614" - integrity sha512-7+4oTUOWKg7AuL3vloEWekXY2/D20cevzsrNT2kGWm+39J9hGTCBv8VI5Pm5lXZ/o3/mdR4f8rflAPhnQb8mPA== - dependencies: - minipass "^2.2.1" - -mkdirp@^0.5.0, mkdirp@^0.5.1: - version "0.5.1" - resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903" - integrity sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM= - dependencies: - minimist "0.0.8" - -ms@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.1.tgz#30a5864eb3ebb0a66f2ebe6d727af06a09d86e0a" - integrity sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg== - -nan@^2.0.0: - version "2.13.2" - resolved "https://registry.yarnpkg.com/nan/-/nan-2.13.2.tgz#f51dc7ae66ba7d5d55e1e6d4d8092e802c9aefe7" - integrity sha512-TghvYc72wlMGMVMluVo9WRJc0mB8KxxF/gZ4YYFy7V2ZQX9l7rgbPg7vjS9mt6U5HXODVFVI2bOduCzwOMv/lw== - -needle@^2.2.1: - version "2.3.0" - resolved "https://registry.yarnpkg.com/needle/-/needle-2.3.0.tgz#ce3fea21197267bacb310705a7bbe24f2a3a3492" - integrity sha512-QBZu7aAFR0522EyaXZM0FZ9GLpq6lvQ3uq8gteiDUp7wKdy0lSd2hPlgFwVuW1CBkfEs9PfDQsQzZghLs/psdg== - dependencies: - debug "^4.1.0" - iconv-lite "^0.4.4" - sax "^1.2.4" - -node-fetch@^2.3.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.3.0.tgz#1a1d940bbfb916a1d3e0219f037e89e71f8c5fa5" - integrity sha512-MOd8pV3fxENbryESLgVIeaGKrdl+uaYhCSSVkjeOb/31/njTpcis5aWfdqgNlHIrKOLRbMnfPINPOML2CIFeXA== - -node-forge@^0.8.0: - version "0.8.2" - resolved "https://registry.yarnpkg.com/node-forge/-/node-forge-0.8.2.tgz#b4bcc59fb12ce77a8825fc6a783dfe3182499c5a" - integrity sha512-mXQ9GBq1N3uDCyV1pdSzgIguwgtVpM7f5/5J4ipz12PKWElmPpVWLDuWl8iXmhysr21+WmX/OJ5UKx82wjomgg== - -node-pre-gyp@^0.12.0: - version "0.12.0" - resolved "https://registry.yarnpkg.com/node-pre-gyp/-/node-pre-gyp-0.12.0.tgz#39ba4bb1439da030295f899e3b520b7785766149" - integrity sha512-4KghwV8vH5k+g2ylT+sLTjy5wmUOb9vPhnM8NHvRf9dHmnW/CndrFXy2aRPaPST6dugXSdHXfeaHQm77PIz/1A== - dependencies: - detect-libc "^1.0.2" - mkdirp "^0.5.1" - needle "^2.2.1" - nopt "^4.0.1" - npm-packlist "^1.1.6" - npmlog "^4.0.2" - rc "^1.2.7" - rimraf "^2.6.1" - semver "^5.3.0" - tar "^4" - -nopt@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/nopt/-/nopt-4.0.1.tgz#d0d4685afd5415193c8c7505602d0d17cd64474d" - integrity sha1-0NRoWv1UFRk8jHUFYC0NF81kR00= - dependencies: - abbrev "1" - osenv "^0.1.4" - -npm-bundled@^1.0.1: - version "1.0.6" - resolved "https://registry.yarnpkg.com/npm-bundled/-/npm-bundled-1.0.6.tgz#e7ba9aadcef962bb61248f91721cd932b3fe6bdd" - integrity sha512-8/JCaftHwbd//k6y2rEWp6k1wxVfpFzB6t1p825+cUb7Ym2XQfhwIC5KwhrvzZRJu+LtDE585zVaS32+CGtf0g== - -npm-packlist@^1.1.6: - version "1.4.1" - resolved "https://registry.yarnpkg.com/npm-packlist/-/npm-packlist-1.4.1.tgz#19064cdf988da80ea3cee45533879d90192bbfbc" - integrity sha512-+TcdO7HJJ8peiiYhvPxsEDhF3PJFGUGRcFsGve3vxvxdcpO2Z4Z7rkosRM0kWj6LfbK/P0gu3dzk5RU1ffvFcw== - dependencies: - ignore-walk "^3.0.1" - npm-bundled "^1.0.1" - -npmlog@^4.0.2: - version "4.1.2" - resolved "https://registry.yarnpkg.com/npmlog/-/npmlog-4.1.2.tgz#08a7f2a8bf734604779a9efa4ad5cc717abb954b" - integrity sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg== - dependencies: - are-we-there-yet "~1.1.2" - console-control-strings "~1.1.0" - gauge "~2.7.3" - set-blocking "~2.0.0" - -number-is-nan@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/number-is-nan/-/number-is-nan-1.0.1.tgz#097b602b53422a522c1afb8790318336941a011d" - integrity sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0= - -object-assign@^4.1.0: - version "4.1.1" - resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" - integrity sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM= - -on-finished@^2.3.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/on-finished/-/on-finished-2.3.0.tgz#20f1336481b083cd75337992a16971aa2d906947" - integrity sha1-IPEzZIGwg811M3mSoWlxqi2QaUc= - dependencies: - ee-first "1.1.1" - -once@^1.3.0, once@^1.3.1, once@^1.4.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" - integrity sha1-WDsap3WWHUsROsF9nFC6753Xa9E= - dependencies: - wrappy "1" - -optjs@~3.2.2: - version "3.2.2" - resolved "https://registry.yarnpkg.com/optjs/-/optjs-3.2.2.tgz#69a6ce89c442a44403141ad2f9b370bd5bb6f4ee" - integrity sha1-aabOicRCpEQDFBrS+bNwvVu29O4= - -os-homedir@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/os-homedir/-/os-homedir-1.0.2.tgz#ffbc4988336e0e833de0c168c7ef152121aa7fb3" - integrity sha1-/7xJiDNuDoM94MFox+8VISGqf7M= - -os-locale@^1.4.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/os-locale/-/os-locale-1.4.0.tgz#20f9f17ae29ed345e8bde583b13d2009803c14d9" - integrity sha1-IPnxeuKe00XoveWDsT0gCYA8FNk= - dependencies: - lcid "^1.0.0" - -os-tmpdir@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" - integrity sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ= - -osenv@^0.1.4: - version "0.1.5" - resolved "https://registry.yarnpkg.com/osenv/-/osenv-0.1.5.tgz#85cdfafaeb28e8677f416e287592b5f3f49ea410" - integrity sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g== - dependencies: - os-homedir "^1.0.0" - os-tmpdir "^1.0.0" - -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 sha1-F0uSaHNVNP+8es5r9TpanhtcX18= - -pify@^4.0.0, pify@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/pify/-/pify-4.0.1.tgz#4b2cd25c50d598735c50292224fd8c6df41e3231" - integrity sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g== - -process-nextick-args@~2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.0.tgz#a37d732f4271b4ab1ad070d35508e8290788ffaa" - integrity sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw== - -protobufjs@^5.0.3: - version "5.0.3" - resolved "https://registry.yarnpkg.com/protobufjs/-/protobufjs-5.0.3.tgz#e4dfe9fb67c90b2630d15868249bcc4961467a17" - integrity sha512-55Kcx1MhPZX0zTbVosMQEO5R6/rikNXd9b6RQK4KSPcrSIIwoXTtebIczUrXlwaSrbz4x8XUVThGPob1n8I4QA== - dependencies: - ascli "~1" - bytebuffer "~5" - glob "^7.0.5" - yargs "^3.10.0" - -protobufjs@^6.8.0, protobufjs@^6.8.6, protobufjs@^6.8.8: - version "6.8.8" - resolved "https://registry.yarnpkg.com/protobufjs/-/protobufjs-6.8.8.tgz#c8b4f1282fd7a90e6f5b109ed11c84af82908e7c" - integrity sha512-AAmHtD5pXgZfi7GMpllpO3q1Xw1OYldr+dMUlAnffGTAhqkg72WdmSY71uKBF/JuyiKs8psYbtKrhi0ASCD8qw== - dependencies: - "@protobufjs/aspromise" "^1.1.2" - "@protobufjs/base64" "^1.1.2" - "@protobufjs/codegen" "^2.0.4" - "@protobufjs/eventemitter" "^1.1.0" - "@protobufjs/fetch" "^1.1.0" - "@protobufjs/float" "^1.0.2" - "@protobufjs/inquire" "^1.1.0" - "@protobufjs/path" "^1.1.2" - "@protobufjs/pool" "^1.1.0" - "@protobufjs/utf8" "^1.1.0" - "@types/long" "^4.0.0" - "@types/node" "^10.1.0" - long "^4.0.0" - -pump@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/pump/-/pump-2.0.1.tgz#12399add6e4cf7526d973cbc8b5ce2e2908b3909" - integrity sha512-ruPMNRkN3MHP1cWJc9OWr+T/xDP0jhXYCLfJcBuX54hhfIBnaQmAUMfDcG4DM5UMWByBbJY69QSphm3jtDKIkA== - dependencies: - end-of-stream "^1.1.0" - once "^1.3.1" - -pumpify@^1.5.1: - version "1.5.1" - resolved "https://registry.yarnpkg.com/pumpify/-/pumpify-1.5.1.tgz#36513be246ab27570b1a374a5ce278bfd74370ce" - integrity sha512-oClZI37HvuUJJxSKKrC17bZ9Cu0ZYhEAGPsPUy9KlMUmv9dKX2o77RUmq7f3XjIxbwyGwYzbzQ1L2Ks8sIradQ== - dependencies: - duplexify "^3.6.0" - inherits "^2.0.3" - pump "^2.0.0" - -rc@^1.2.7: - version "1.2.8" - resolved "https://registry.yarnpkg.com/rc/-/rc-1.2.8.tgz#cd924bf5200a075b83c188cd6b9e211b7fc0d3ed" - integrity sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw== - dependencies: - deep-extend "^0.6.0" - ini "~1.3.0" - minimist "^1.2.0" - strip-json-comments "~2.0.1" - -"readable-stream@2 || 3", readable-stream@^3.1.1: - version "3.3.0" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.3.0.tgz#cb8011aad002eb717bf040291feba8569c986fb9" - integrity sha512-EsI+s3k3XsW+fU8fQACLN59ky34AZ14LoeVZpYwmZvldCFo0r0gnelwF2TcMjLor/BTL5aDJVBMkss0dthToPw== - dependencies: - inherits "^2.0.3" - string_decoder "^1.1.1" - util-deprecate "^1.0.1" - -readable-stream@^2.0.0, readable-stream@^2.0.6, readable-stream@~2.3.6: - version "2.3.6" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.6.tgz#b11c27d88b8ff1fbe070643cf94b0c79ae1b0aaf" - integrity sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw== - dependencies: - core-util-is "~1.0.0" - inherits "~2.0.3" - isarray "~1.0.0" - process-nextick-args "~2.0.0" - safe-buffer "~5.1.1" - string_decoder "~1.1.1" - util-deprecate "~1.0.1" - -retry-request@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/retry-request/-/retry-request-4.0.0.tgz#5c366166279b3e10e9d7aa13274467a05cb69290" - integrity sha512-S4HNLaWcMP6r8E4TMH52Y7/pM8uNayOcTDDQNBwsCccL1uI+Ol2TljxRDPzaNfbhOB30+XWP5NnZkB3LiJxi1w== - dependencies: - through2 "^2.0.0" - -rimraf@^2.6.1: - version "2.6.3" - resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.3.tgz#b2d104fe0d8fb27cf9e0a1cda8262dd3833c6cab" - integrity sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA== - dependencies: - glob "^7.1.3" - -safe-buffer@^5.0.1, safe-buffer@^5.1.2, safe-buffer@~5.1.0, safe-buffer@~5.1.1: - version "5.1.2" - resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" - integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== - -"safer-buffer@>= 2.1.2 < 3": - version "2.1.2" - resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" - integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== - -sax@^1.2.4: - version "1.2.4" - resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.4.tgz#2816234e2378bddc4e5354fab5caa895df7100d9" - integrity sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw== - -semver@^5.3.0, semver@^5.5.0: - version "5.7.0" - resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.0.tgz#790a7cf6fea5459bac96110b29b60412dc8ff96b" - integrity sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA== - -semver@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/semver/-/semver-6.0.0.tgz#05e359ee571e5ad7ed641a6eec1e547ba52dea65" - integrity sha512-0UewU+9rFapKFnlbirLi3byoOuhrSsli/z/ihNnvM24vgF+8sNBiI1LZPBSH9wJKUwaUbw+s3hToDLCXkrghrQ== - -set-blocking@~2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" - integrity sha1-BF+XgtARrppoA93TgrJDkrPYkPc= - -shimmer@^1.1.0, shimmer@^1.2.0: - version "1.2.1" - resolved "https://registry.yarnpkg.com/shimmer/-/shimmer-1.2.1.tgz#610859f7de327b587efebf501fb43117f9aff337" - integrity sha512-sQTKC1Re/rM6XyFM6fIAGHRPVGvyXfgzIDvzoq608vM+jeyVD0Tu1E6Np0Kc2zAIFWIj963V2800iF/9LPieQw== - -signal-exit@^3.0.0: - version "3.0.2" - resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.2.tgz#b5fdc08f1287ea1178628e415e25132b73646c6d" - integrity sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0= - -snakecase-keys@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/snakecase-keys/-/snakecase-keys-2.1.0.tgz#619833e8ff730a74eb0348eaa2f871f97bc92297" - integrity sha512-oQSiCIgNCwixBf8Kxgv0SPo67zQSutIEymAk/dkgcdZEOMPvGMGPua/WwYGPG4LLHArGGews3CB3zEEfqlMk2g== - dependencies: - map-obj "~3.0.0" - to-snake-case "~1.0.0" - -split-array-stream@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/split-array-stream/-/split-array-stream-2.0.0.tgz#85a4f8bfe14421d7bca7f33a6d176d0c076a53b1" - integrity sha512-hmMswlVY91WvGMxs0k8MRgq8zb2mSen4FmDNc5AFiTWtrBpdZN6nwD6kROVe4vNL+ywrvbCKsWVCnEd4riELIg== - dependencies: - is-stream-ended "^0.1.4" - -stream-events@^1.0.4: - version "1.0.5" - resolved "https://registry.yarnpkg.com/stream-events/-/stream-events-1.0.5.tgz#bbc898ec4df33a4902d892333d47da9bf1c406d5" - integrity sha512-E1GUzBSgvct8Jsb3v2X15pjzN1tYebtbLaMg+eBOUOAxgbLoSbT2NS91ckc5lJD1KfLjId+jXJRgo0qnV5Nerg== - dependencies: - stubs "^3.0.0" - -stream-shift@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/stream-shift/-/stream-shift-1.0.0.tgz#d5c752825e5367e786f78e18e445ea223a155952" - integrity sha1-1cdSgl5TZ+eG944Y5EXqIjoVWVI= - -string-width@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/string-width/-/string-width-1.0.2.tgz#118bdf5b8cdc51a2a7e70d211e07e2b0b9b107d3" - integrity sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M= - dependencies: - code-point-at "^1.0.0" - is-fullwidth-code-point "^1.0.0" - strip-ansi "^3.0.0" - -"string-width@^1.0.2 || 2": - version "2.1.1" - resolved "https://registry.yarnpkg.com/string-width/-/string-width-2.1.1.tgz#ab93f27a8dc13d28cac815c462143a6d9012ae9e" - integrity sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw== - dependencies: - is-fullwidth-code-point "^2.0.0" - strip-ansi "^4.0.0" - -string_decoder@^1.1.1: - version "1.2.0" - resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.2.0.tgz#fe86e738b19544afe70469243b2a1ee9240eae8d" - integrity sha512-6YqyX6ZWEYguAxgZzHGL7SsCeGx3V2TtOTqZz1xSTSWnqsbWwbptafNyvf/ACquZUXV3DANr5BDIwNYe1mN42w== - dependencies: - safe-buffer "~5.1.0" - -string_decoder@~1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.1.1.tgz#9cf1611ba62685d7030ae9e4ba34149c3af03fc8" - integrity sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg== - dependencies: - safe-buffer "~5.1.0" - -strip-ansi@^3.0.0, strip-ansi@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf" - integrity sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8= - dependencies: - ansi-regex "^2.0.0" - -strip-ansi@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-4.0.0.tgz#a8479022eb1ac368a871389b635262c505ee368f" - integrity sha1-qEeQIusaw2iocTibY1JixQXuNo8= - dependencies: - ansi-regex "^3.0.0" - -strip-json-comments@~2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" - integrity sha1-PFMZQukIwml8DsNEhYwobHygpgo= - -stubs@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/stubs/-/stubs-3.0.0.tgz#e8d2ba1fa9c90570303c030b6900f7d5f89abe5b" - integrity sha1-6NK6H6nJBXAwPAMLaQD31fiavls= - -tar@^4: - version "4.4.8" - resolved "https://registry.yarnpkg.com/tar/-/tar-4.4.8.tgz#b19eec3fde2a96e64666df9fdb40c5ca1bc3747d" - integrity sha512-LzHF64s5chPQQS0IYBn9IN5h3i98c12bo4NCO7e0sGM2llXQ3p2FGC5sdENN4cTW48O915Sh+x+EXx7XW96xYQ== - dependencies: - chownr "^1.1.1" - fs-minipass "^1.2.5" - minipass "^2.3.4" - minizlib "^1.1.1" - mkdirp "^0.5.0" - safe-buffer "^5.1.2" - yallist "^3.0.2" - -through2@^2.0.0: - version "2.0.5" - resolved "https://registry.yarnpkg.com/through2/-/through2-2.0.5.tgz#01c1e39eb31d07cb7d03a96a70823260b23132cd" - integrity sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ== - dependencies: - readable-stream "~2.3.6" - xtend "~4.0.1" - -through2@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/through2/-/through2-3.0.1.tgz#39276e713c3302edf9e388dd9c812dd3b825bd5a" - integrity sha512-M96dvTalPT3YbYLaKaCuwu+j06D/8Jfib0o/PxbVt6Amhv3dUAtW6rTV1jPgJSBG83I/e04Y6xkVdVhSRhi0ww== - dependencies: - readable-stream "2 || 3" - -to-no-case@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/to-no-case/-/to-no-case-1.0.2.tgz#c722907164ef6b178132c8e69930212d1b4aa16a" - integrity sha1-xyKQcWTvaxeBMsjmmTAhLRtKoWo= - -to-snake-case@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/to-snake-case/-/to-snake-case-1.0.0.tgz#ce746913897946019a87e62edfaeaea4c608ab8c" - integrity sha1-znRpE4l5RgGah+Yu366upMYIq4w= - dependencies: - to-space-case "^1.0.0" - -to-space-case@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/to-space-case/-/to-space-case-1.0.0.tgz#b052daafb1b2b29dc770cea0163e5ec0ebc9fc17" - integrity sha1-sFLar7Gysp3HcM6gFj5ewOvJ/Bc= - dependencies: - to-no-case "^1.0.0" - -type-fest@^0.3.1: - version "0.3.1" - resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.3.1.tgz#63d00d204e059474fe5e1b7c011112bbd1dc29e1" - integrity sha512-cUGJnCdr4STbePCgqNFbpVNCepa+kAVohJs1sLhxzdH+gnEoOd8VhbYa7pD3zZYGiURWM2xzEII3fQcRizDkYQ== - -util-deprecate@^1.0.1, 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= - -uuid@^3.0.1, uuid@^3.2.1: - version "3.3.2" - resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.3.2.tgz#1b4af4955eb3077c501c23872fc6513811587131" - integrity sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA== - -walkdir@^0.3.0, walkdir@^0.3.2: - version "0.3.2" - resolved "https://registry.yarnpkg.com/walkdir/-/walkdir-0.3.2.tgz#ac8437a288c295656848ebc19981ebc677a5f590" - integrity sha512-0Twghia4Z5wDGDYWURlhZmI47GvERMCsXIu0QZWVVZyW9ZjpbbZvD9Zy9M6cWiQQRRbAcYajIyKNavaZZDt1Uw== - -wide-align@^1.1.0: - version "1.1.3" - resolved "https://registry.yarnpkg.com/wide-align/-/wide-align-1.1.3.tgz#ae074e6bdc0c14a431e804e624549c633b000457" - integrity sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA== - dependencies: - string-width "^1.0.2 || 2" - -window-size@^0.1.4: - version "0.1.4" - resolved "https://registry.yarnpkg.com/window-size/-/window-size-0.1.4.tgz#f8e1aa1ee5a53ec5bf151ffa09742a6ad7697876" - integrity sha1-+OGqHuWlPsW/FR/6CXQqatdpeHY= - -wrap-ansi@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-2.1.0.tgz#d8fc3d284dd05794fe84973caecdd1cf824fdd85" - integrity sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU= - dependencies: - string-width "^1.0.1" - strip-ansi "^3.0.1" - -wrappy@1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" - integrity sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8= - -xtend@~4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.1.tgz#a5c6d532be656e23db820efb943a1f04998d63af" - integrity sha1-pcbVMr5lbiPbgg77lDofBJmNY68= - -y18n@^3.2.0: - version "3.2.1" - resolved "https://registry.yarnpkg.com/y18n/-/y18n-3.2.1.tgz#6d15fba884c08679c0d77e88e7759e811e07fa41" - integrity sha1-bRX7qITAhnnA136I53WegR4H+kE= - -yallist@^3.0.0, yallist@^3.0.2: - version "3.0.3" - resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.0.3.tgz#b4b049e314be545e3ce802236d6cd22cd91c3de9" - integrity sha512-S+Zk8DEWE6oKpV+vI3qWkaK+jSbIK86pCwe2IF/xwIpQ8jEuxpw9NyaGjmp9+BoJv5FV2piqCDcoCtStppiq2A== - -yargs@^3.10.0: - version "3.32.0" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-3.32.0.tgz#03088e9ebf9e756b69751611d2a5ef591482c995" - integrity sha1-AwiOnr+edWtpdRYR0qXvWRSCyZU= - dependencies: - camelcase "^2.0.1" - cliui "^3.0.3" - decamelize "^1.1.1" - os-locale "^1.4.0" - string-width "^1.0.1" - window-size "^0.1.4" - y18n "^3.2.0" diff --git a/packages/package.json b/packages/package.json deleted file mode 100644 index 95e552cb..00000000 --- a/packages/package.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "scripts": { - "postinstall": "../node_modules/.bin/ts-node ../scripts/install-packages.ts", - "test": "jest" - }, - "devDependencies": { - "@types/jest": "^23.3.12", - "jest": "^23.6.0", - "ts-jest": "^23.10.5" - }, - "dependencies": { - "xmlhttprequest": "1.8.0" - }, - "jest": { - "globals": { - "ts-jest": { - "diagnostics": false - } - }, - "moduleFileExtensions": [ - "ts", - "tsx", - "js", - "json" - ], - "setupFiles": [ - "/../scripts/test-setup.js" - ], - "moduleNameMapper": { - "^.+\\.(s?css|png|svg)$": "/../scripts/dummy.js", - "@coder/ide/src/fill/evaluation": "/ide/src/fill/evaluation", - "@coder/ide/src/fill/client": "/ide/src/fill/client", - "@coder/(.*)/test": "/$1/test", - "@coder/(.*)": "/$1/src", - "vs/(.*)": "/../lib/vscode/src/vs/$1", - "vszip": "/../lib/vscode/src/vs/base/node/zip.ts" - }, - "transform": { - "^.+\\.tsx?$": "ts-jest" - }, - "testPathIgnorePatterns": [ - "/node_modules/", - "/logger/" - ], - "testRegex": ".*\\.test\\.tsx?" - } -} diff --git a/packages/protocol/README.md b/packages/protocol/README.md deleted file mode 100644 index a837f0ac..00000000 --- a/packages/protocol/README.md +++ /dev/null @@ -1,47 +0,0 @@ -# Protocol - -This module provides a way for the browser to run Node modules like `fs`, `net`, -etc. - -## Internals - -### Server-side proxies -The server-side proxies are regular classes that call native Node functions. The -only thing special about them is that they must return promises and they must -return serializable values. - -The only exception to the promise rule are event-related methods such as -`onEvent` and `onDone` (these are synchronous). The server will simply -immediately bind and push all events it can to the client. It doesn't wait for -the client to start listening. This prevents issues with the server not -receiving the client's request to start listening in time. - -However, there is a way to specify events that should not bind immediately and -should wait for the client to request it, because some events (like `data` on a -stream) cannot be bound immediately (because doing so changes how the stream -behaves). - -### Client-side proxies -Client-side proxies are `Proxy` instances. They simply make remote calls for any -method you call on it. The only exception is for events. Each client proxy has a -local emitter which it uses in place of a remote call (this allows the call to -be completed synchronously on the client). Then when an event is received from -the server, it gets emitted on that local emitter. - -When an event is listened to, the proxy also notifies the server so it can start -listening in case it isn't already (see the `data` example above). This only -works for events that only fire after they are bound. - -### Client-side fills -The client-side fills implement the Node API and make calls to the server-side -proxies using the client-side proxies. - -When a proxy returns a proxy (for example `fs.createWriteStream`), that proxy is -a promise (since communicating with the server is asynchronous). We have to -return the fill from `fs.createWriteStream` synchronously, so that means the -fill has to contain a proxy promise. To eliminate the need for calling `then` -and to keep the code looking clean every time you use the proxy, the proxy is -itself wrapped in another proxy which just calls the method after a `then`. This -works since all the methods return promises (aside from the event methods, but -those are not used by the fills directly—they are only used internally to -forward events to the fill if it is an event emitter). diff --git a/packages/protocol/package.json b/packages/protocol/package.json deleted file mode 100644 index 80d239e3..00000000 --- a/packages/protocol/package.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "name": "@coder/protocol", - "main": "src/index.ts", - "dependencies": { - "express": "^4.16.4", - "google-protobuf": "^3.6.1", - "trash": "^4.3.0", - "ws": "^6.1.2" - }, - "devDependencies": { - "@types/google-protobuf": "^3.2.7", - "@types/rimraf": "^2.0.2", - "@types/text-encoding": "^0.0.35", - "rimraf": "^2.6.3", - "text-encoding": "^0.7.0", - "ts-protoc-gen": "^0.8.0" - }, - "scripts": { - "gen": "./scripts/generate_proto.sh" - } -} diff --git a/packages/protocol/scripts/generate_proto.sh b/packages/protocol/scripts/generate_proto.sh deleted file mode 100755 index 9cd471a2..00000000 --- a/packages/protocol/scripts/generate_proto.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash - -cd "$(dirname "$0")/.." - -protoc --plugin="protoc-gen-ts=./node_modules/.bin/protoc-gen-ts" --js_out="import_style=commonjs,binary:./src/proto" --ts_out="./src/proto" ./src/proto/*.proto --proto_path="./src/proto" diff --git a/packages/protocol/src/browser/client.ts b/packages/protocol/src/browser/client.ts deleted file mode 100644 index cdbe9937..00000000 --- a/packages/protocol/src/browser/client.ts +++ /dev/null @@ -1,545 +0,0 @@ -import { PathLike } from "fs"; -import { ExecException, ExecOptions } from "child_process"; -import { promisify } from "util"; -import { Emitter } from "@coder/events"; -import { logger, field } from "@coder/logger"; -import { ReadWriteConnection, InitData, SharedProcessData } from "../common/connection"; -import { ClientServerProxy, Module, ServerProxy } from "../common/proxy"; -import { argumentToProto, protoToArgument, moduleToProto, protoToModule, protoToOperatingSystem } from "../common/util"; -import { Argument, Ping, ServerMessage, ClientMessage, Method, Event, Callback } from "../proto"; -import { FsModule, ChildProcessModule, NetModule, NodePtyModule, SpdlogModule, TrashModule } from "./modules"; - -// tslint:disable no-any - -interface ProxyData { - promise: Promise; - instance: any; - callbacks: Map void>; -} - -/** - * Client accepts a connection to communicate with the server. - */ -export class Client { - private messageId = 0; - private callbackId = 0; - private readonly proxies = new Map(); - private readonly successEmitter = new Emitter(); - private readonly failEmitter = new Emitter(); - private readonly eventEmitter = new Emitter<{ event: string; args: any[]; }>(); - - private _initData: InitData | undefined; - private readonly initDataEmitter = new Emitter(); - private readonly initDataPromise: Promise; - - private readonly sharedProcessActiveEmitter = new Emitter(); - public readonly onSharedProcessActive = this.sharedProcessActiveEmitter.event; - - private disconnected: boolean = false; - - // The socket timeout is 60s, so we need to send a ping periodically to - // prevent it from closing. - private pingTimeout: NodeJS.Timer | number | undefined; - private readonly pingTimeoutDelay = 30000; - - private readonly responseTimeout = 10000; - - public readonly modules: { - [Module.ChildProcess]: ChildProcessModule, - [Module.Fs]: FsModule, - [Module.Net]: NetModule, - [Module.NodePty]: NodePtyModule, - [Module.Spdlog]: SpdlogModule, - [Module.Trash]: TrashModule, - }; - - /** - * @param connection Established connection to the server - */ - public constructor(private readonly connection: ReadWriteConnection) { - connection.onMessage(async (data) => { - let message: ServerMessage | undefined; - try { - message = ServerMessage.deserializeBinary(data); - await this.handleMessage(message); - } catch (error) { - logger.error( - "Failed to handle server message", - field("id", message && this.getMessageId(message)), - field("length", data.byteLength), - field("error", error.message), - ); - } - }); - - this.createProxy(Module.ChildProcess); - this.createProxy(Module.Fs); - this.createProxy(Module.Net); - this.createProxy(Module.NodePty); - this.createProxy(Module.Spdlog); - this.createProxy(Module.Trash); - - this.modules = { - [Module.ChildProcess]: new ChildProcessModule(this.getProxy(Module.ChildProcess).instance), - [Module.Fs]: new FsModule(this.getProxy(Module.Fs).instance), - [Module.Net]: new NetModule(this.getProxy(Module.Net).instance), - [Module.NodePty]: new NodePtyModule(this.getProxy(Module.NodePty).instance), - [Module.Spdlog]: new SpdlogModule(this.getProxy(Module.Spdlog).instance), - [Module.Trash]: new TrashModule(this.getProxy(Module.Trash).instance), - }; - - // Methods that don't follow the standard callback pattern (an error - // followed by a single result) need to provide a custom promisify function. - Object.defineProperty(this.modules[Module.Fs].exists, promisify.custom, { - value: (path: PathLike): Promise => { - return new Promise((resolve): void => this.modules[Module.Fs].exists(path, resolve)); - }, - }); - - Object.defineProperty(this.modules[Module.ChildProcess].exec, promisify.custom, { - value: ( - command: string, - options?: { encoding?: string | null } & ExecOptions | null, - ): Promise<{ stdout: string | Buffer, stderr: string | Buffer }> => { - return new Promise((resolve, reject): void => { - this.modules[Module.ChildProcess].exec(command, options, (error: ExecException | null, stdout: string | Buffer, stderr: string | Buffer) => { - if (error) { - reject(error); - } else { - resolve({ stdout, stderr }); - } - }); - }); - }, - }); - - /** - * If the connection is interrupted, the calls will neither succeed nor fail - * nor exit so we need to send a failure on all of them as well as trigger - * events so things like child processes can clean up and possibly restart. - */ - const handleDisconnect = (): void => { - this.disconnected = true; - logger.trace(() => [ - "disconnected from server", - field("proxies", this.proxies.size), - field("callbacks", Array.from(this.proxies.values()).reduce((count, p) => count + p.callbacks.size, 0)), - field("success listeners", this.successEmitter.counts), - field("fail listeners", this.failEmitter.counts), - field("event listeners", this.eventEmitter.counts), - ]); - - const message = new Method.Fail(); - const error = new Error("disconnected"); - message.setResponse(argumentToProto(error)); - this.failEmitter.emit(message); - - this.eventEmitter.emit({ event: "disconnected", args: [error] }); - this.eventEmitter.emit({ event: "done", args: [] }); - }; - - connection.onDown(() => handleDisconnect()); - connection.onClose(() => { - clearTimeout(this.pingTimeout as any); - this.pingTimeout = undefined; - handleDisconnect(); - this.proxies.clear(); - this.successEmitter.dispose(); - this.failEmitter.dispose(); - this.eventEmitter.dispose(); - this.initDataEmitter.dispose(); - this.sharedProcessActiveEmitter.dispose(); - }); - connection.onUp(() => this.disconnected = false); - - this.initDataPromise = new Promise((resolve): void => { - this.initDataEmitter.event(resolve); - }); - - this.startPinging(); - } - - /** - * Close the connection. - */ - public dispose(): void { - this.connection.close(); - } - - public get initData(): Promise { - return this.initDataPromise; - } - - /** - * Make a remote call for a proxy's method using proto. - */ - private remoteCall(proxyId: number | Module, method: string, args: any[]): Promise { - if (typeof proxyId === "number" && (this.disconnected || !this.proxies.has(proxyId))) { - // Can assume killing or closing works because a disconnected proxy is - // disposed on the server's side, and a non-existent proxy has already - // been disposed. - switch (method) { - case "close": - case "kill": - return Promise.resolve(); - } - - return Promise.reject( - new Error(`Unable to call "${method}" on proxy ${proxyId}: disconnected`), - ); - } - - const message = new Method(); - const id = this.messageId++; - let proxyMessage: Method.Named | Method.Numbered; - if (typeof proxyId === "string") { - proxyMessage = new Method.Named(); - proxyMessage.setModule(moduleToProto(proxyId)); - message.setNamedProxy(proxyMessage); - } else { - proxyMessage = new Method.Numbered(); - proxyMessage.setProxyId(proxyId); - message.setNumberedProxy(proxyMessage); - } - proxyMessage.setId(id); - proxyMessage.setMethod(method); - - const storeCallback = (cb: (...args: any[]) => void): number => { - const callbackId = this.callbackId++; - logger.trace(() => [ - "storing callback", - field("proxyId", proxyId), - field("callbackId", callbackId), - ]); - - this.getProxy(proxyId).callbacks.set(callbackId, cb); - - return callbackId; - }; - - logger.trace(() => [ - "sending", - field("id", id), - field("proxyId", proxyId), - field("method", method), - ]); - - proxyMessage.setArgsList(args.map((a) => argumentToProto( - a, - storeCallback, - (p) => p.proxyId, - ))); - - const clientMessage = new ClientMessage(); - clientMessage.setMethod(message); - this.connection.send(clientMessage.serializeBinary()); - - // The server will send back a fail or success message when the method - // has completed, so we listen for that based on the message's unique ID. - const promise = new Promise((resolve, reject): void => { - const dispose = (): void => { - d1.dispose(); - d2.dispose(); - clearTimeout(timeout as any); - }; - - const timeout = setTimeout(() => { - dispose(); - reject(new Error("timed out")); - }, this.responseTimeout); - - const d1 = this.successEmitter.event(id, (message) => { - dispose(); - resolve(this.protoToArgument(message.getResponse(), promise)); - }); - - const d2 = this.failEmitter.event(id, (message) => { - dispose(); - reject(protoToArgument(message.getResponse())); - }); - }); - - return promise; - } - - /** - * Handle all messages from the server. - */ - private async handleMessage(message: ServerMessage): Promise { - switch (message.getMsgCase()) { - case ServerMessage.MsgCase.INIT: - const init = message.getInit()!; - this._initData = { - dataDirectory: init.getDataDirectory(), - homeDirectory: init.getHomeDirectory(), - tmpDirectory: init.getTmpDirectory(), - workingDirectory: init.getWorkingDirectory(), - os: protoToOperatingSystem(init.getOperatingSystem()), - shell: init.getShell(), - extensionsDirectory: init.getExtensionsDirectory(), - builtInExtensionsDirectory: init.getBuiltinExtensionsDir(), - extraExtensionDirectories: init.getExtraExtensionDirectoriesList(), - extraBuiltinExtensionDirectories: init.getExtraBuiltinExtensionDirectoriesList(), - env: init.getEnvMap(), - }; - this.initDataEmitter.emit(this._initData); - break; - case ServerMessage.MsgCase.SUCCESS: - this.emitSuccess(message.getSuccess()!); - break; - case ServerMessage.MsgCase.FAIL: - this.emitFail(message.getFail()!); - break; - case ServerMessage.MsgCase.EVENT: - await this.emitEvent(message.getEvent()!); - break; - case ServerMessage.MsgCase.CALLBACK: - await this.runCallback(message.getCallback()!); - break; - case ServerMessage.MsgCase.SHARED_PROCESS_ACTIVE: - const sharedProcessActiveMessage = message.getSharedProcessActive()!; - this.sharedProcessActiveEmitter.emit({ - socketPath: sharedProcessActiveMessage.getSocketPath(), - logPath: sharedProcessActiveMessage.getLogPath(), - }); - break; - case ServerMessage.MsgCase.PONG: - // Nothing to do since pings are on a timer rather than waiting for the - // next pong in case a message from either the client or server is dropped - // which would break the ping cycle. - break; - default: - throw new Error("unknown message type"); - } - } - - /** - * Convert message to a success event. - */ - private emitSuccess(message: Method.Success): void { - logger.trace(() => [ - "received resolve", - field("id", message.getId()), - ]); - - this.successEmitter.emit(message.getId(), message); - } - - /** - * Convert message to a fail event. - */ - private emitFail(message: Method.Fail): void { - logger.trace(() => [ - "received reject", - field("id", message.getId()), - ]); - - this.failEmitter.emit(message.getId(), message); - } - - /** - * Emit an event received from the server. We could send requests for "on" to - * the server and serialize functions using IDs, but doing it that way makes - * it possible to miss events depending on whether the server receives the - * request before it emits. Instead, emit all events from the server so all - * events are always caught on the client. - */ - private async emitEvent(message: Event): Promise { - const eventMessage = message.getNamedEvent()! || message.getNumberedEvent()!; - const proxyId = message.getNamedEvent() - ? protoToModule(message.getNamedEvent()!.getModule()) - : message.getNumberedEvent()!.getProxyId(); - const event = eventMessage.getEvent(); - await this.ensureResolved(proxyId); - logger.trace(() => [ - "received event", - field("proxyId", proxyId), - field("event", event), - ]); - - const args = eventMessage.getArgsList().map((a) => this.protoToArgument(a)); - this.eventEmitter.emit(proxyId, { event, args }); - } - - /** - * Run a callback as requested by the server. Since we don't know when - * callbacks get garbage collected we dispose them only when the proxy - * disposes. That means they should only be used if they run for the lifetime - * of the proxy (like child_process.exec), otherwise we'll leak. They should - * also only be used when passed together with the method. If they are sent - * afterward, they may never be called due to timing issues. - */ - private async runCallback(message: Callback): Promise { - const callbackMessage = message.getNamedCallback()! || message.getNumberedCallback()!; - const proxyId = message.getNamedCallback() - ? protoToModule(message.getNamedCallback()!.getModule()) - : message.getNumberedCallback()!.getProxyId(); - const callbackId = callbackMessage.getCallbackId(); - await this.ensureResolved(proxyId); - logger.trace(() => [ - "running callback", - field("proxyId", proxyId), - field("callbackId", callbackId), - ]); - const args = callbackMessage.getArgsList().map((a) => this.protoToArgument(a)); - this.getProxy(proxyId).callbacks.get(callbackId)!(...args); - } - - /** - * Start the ping loop. Does nothing if already pinging. - */ - private readonly startPinging = (): void => { - if (typeof this.pingTimeout !== "undefined") { - return; - } - - const schedulePing = (): void => { - this.pingTimeout = setTimeout(() => { - const clientMsg = new ClientMessage(); - clientMsg.setPing(new Ping()); - this.connection.send(clientMsg.serializeBinary()); - schedulePing(); - }, this.pingTimeoutDelay); - }; - - schedulePing(); - } - - /** - * Return the message's ID if it has one or a string identifier. For logging - * errors with an ID to make the error more useful. - */ - private getMessageId(message: ServerMessage): number | string | undefined { - if (message.hasInit()) { - return "init"; - } else if (message.hasSuccess()) { - return message.getSuccess()!.getId(); - } else if (message.hasFail()) { - return message.getFail()!.getId(); - } else if (message.hasEvent()) { - const eventMessage = message.getEvent()!.getNamedEvent()! - || message.getEvent()!.getNumberedEvent()!; - - return `event: ${eventMessage.getEvent()}`; - } else if (message.hasCallback()) { - const callbackMessage = message.getCallback()!.getNamedCallback()! - || message.getCallback()!.getNumberedCallback()!; - - return `callback: ${callbackMessage.getCallbackId()}`; - } else if (message.hasSharedProcessActive()) { - return "shared"; - } else if (message.hasPong()) { - return "pong"; - } - } - - /** - * Return a proxy that makes remote calls. - */ - private createProxy(proxyId: number | Module, promise: Promise = Promise.resolve()): T { - logger.trace(() => [ - "creating proxy", - field("proxyId", proxyId), - ]); - - const instance = new Proxy({ - proxyId, - onDone: (cb: (...args: any[]) => void): void => { - this.eventEmitter.event(proxyId, (event) => { - if (event.event === "done") { - cb(...event.args); - } - }); - }, - onEvent: (cb: (event: string, ...args: any[]) => void): void => { - this.eventEmitter.event(proxyId, (event) => { - cb(event.event, ...event.args); - }); - }, - } as ClientServerProxy, { - get: (target: any, name: string): any => { - // When resolving a promise with a proxy, it will check for "then". - if (name === "then") { - return; - } - - if (typeof target[name] === "undefined") { - target[name] = (...args: any[]): Promise | ServerProxy => { - return this.remoteCall(proxyId, name, args); - }; - } - - return target[name]; - }, - }); - - this.proxies.set(proxyId, { - promise, - instance, - callbacks: new Map(), - }); - - instance.onDone(() => { - const log = (): void => { - logger.trace(() => [ - typeof proxyId === "number" ? "disposed proxy" : "disposed proxy callbacks", - field("proxyId", proxyId), - field("disconnected", this.disconnected), - field("callbacks", Array.from(this.proxies.values()).reduce((count, proxy) => count + proxy.callbacks.size, 0)), - field("success listeners", this.successEmitter.counts), - field("fail listeners", this.failEmitter.counts), - field("event listeners", this.eventEmitter.counts), - ]); - }; - - // Uniquely identified items (top-level module proxies) can continue to - // be used so we don't need to delete them. - if (typeof proxyId === "number") { - const dispose = (): void => { - this.proxies.delete(proxyId); - this.eventEmitter.dispose(proxyId); - log(); - }; - if (!this.disconnected) { - instance.dispose().then(dispose).catch(dispose); - } else { - dispose(); - } - } else { - // The callbacks will still be unusable though. - this.getProxy(proxyId).callbacks.clear(); - log(); - } - }); - - return instance; - } - - /** - * We aren't guaranteed the promise will call all the `then` callbacks - * synchronously once it resolves, so the event message can come in and fire - * before a caller has been able to attach an event. Waiting for the promise - * ensures it runs after everything else. - */ - private async ensureResolved(proxyId: number | Module): Promise { - await this.getProxy(proxyId).promise; - } - - /** - * Same as protoToArgument except provides createProxy. - */ - private protoToArgument(value?: Argument, promise?: Promise): any { - return protoToArgument(value, undefined, (id) => this.createProxy(id, promise)); - } - - /** - * Get a proxy. Error if it doesn't exist. - */ - private getProxy(proxyId: number | Module): ProxyData { - if (!this.proxies.has(proxyId)) { - throw new Error(`proxy ${proxyId} disposed too early`); - } - - return this.proxies.get(proxyId)!; - } -} diff --git a/packages/protocol/src/browser/modules/child_process.ts b/packages/protocol/src/browser/modules/child_process.ts deleted file mode 100644 index 720b9656..00000000 --- a/packages/protocol/src/browser/modules/child_process.ts +++ /dev/null @@ -1,151 +0,0 @@ -import * as cp from "child_process"; -import * as net from "net"; -import * as stream from "stream"; -import { callbackify } from "util"; -import { ClientProxy, ClientServerProxy } from "../../common/proxy"; -import { ChildProcessModuleProxy, ChildProcessProxy } from "../../node/modules/child_process"; -import { ClientWritableProxy, ClientReadableProxy, Readable, Writable } from "./stream"; - -// tslint:disable completed-docs - -export interface ClientChildProcessProxy extends ChildProcessProxy, ClientServerProxy {} - -export interface ClientChildProcessProxies { - childProcess: ClientChildProcessProxy; - stdin?: ClientWritableProxy | null; - stdout?: ClientReadableProxy | null; - stderr?: ClientReadableProxy | null; -} - -export class ChildProcess extends ClientProxy implements cp.ChildProcess { - public readonly stdin: stream.Writable; - public readonly stdout: stream.Readable; - public readonly stderr: stream.Readable; - public readonly stdio: [stream.Writable, stream.Readable, stream.Readable]; - - private _connected: boolean = false; - private _killed: boolean = false; - private _pid = -1; - - public constructor(proxyPromises: Promise) { - super(proxyPromises.then((p) => p.childProcess)); - this.stdin = new Writable(proxyPromises.then((p) => p.stdin!)); - this.stdout = new Readable(proxyPromises.then((p) => p.stdout!)); - this.stderr = new Readable(proxyPromises.then((p) => p.stderr!)); - this.stdio = [this.stdin, this.stdout, this.stderr]; - - this.catch(this.proxy.getPid().then((pid) => { - this._pid = pid; - this._connected = true; - })); - this.on("disconnect", () => this._connected = false); - this.on("exit", () => { - this._connected = false; - this._killed = true; - }); - } - - public get pid(): number { - return this._pid; - } - - public get connected(): boolean { - return this._connected; - } - - public get killed(): boolean { - return this._killed; - } - - public kill(): void { - this._killed = true; - this.catch(this.proxy.kill()); - } - - public disconnect(): void { - this.catch(this.proxy.disconnect()); - } - - public ref(): void { - this.catch(this.proxy.ref()); - } - - public unref(): void { - this.catch(this.proxy.unref()); - } - - public send( - message: any, // tslint:disable-line no-any - sendHandle?: net.Socket | net.Server | ((error: Error) => void), - options?: cp.MessageOptions | ((error: Error) => void), - callback?: (error: Error) => void): boolean { - if (typeof sendHandle === "function") { - callback = sendHandle; - sendHandle = undefined; - } else if (typeof options === "function") { - callback = options; - options = undefined; - } - if (sendHandle || options) { - throw new Error("sendHandle and options are not supported"); - } - - callbackify(this.proxy.send)(message, (error) => { - if (callback) { - callback(error); - } - }); - - return true; // Always true since we can't get this synchronously. - } - - /** - * Exit and close the process when disconnected. - */ - protected handleDisconnect(): void { - this.emit("exit", 1); - this.emit("close"); - } -} - -interface ClientChildProcessModuleProxy extends ChildProcessModuleProxy, ClientServerProxy { - exec(command: string, options?: { encoding?: string | null } & cp.ExecOptions | null, callback?: ((error: cp.ExecException | null, stdin: string | Buffer, stdout: string | Buffer) => void)): Promise; - fork(modulePath: string, args?: string[], options?: cp.ForkOptions): Promise; - spawn(command: string, args?: string[], options?: cp.SpawnOptions): Promise; -} - -export class ChildProcessModule { - public constructor(private readonly proxy: ClientChildProcessModuleProxy) {} - - public exec = ( - command: string, - options?: { encoding?: string | null } & cp.ExecOptions | null - | ((error: cp.ExecException | null, stdout: string | Buffer, stderr: string | Buffer) => void), - callback?: ((error: cp.ExecException | null, stdout: string | Buffer, stderr: string | Buffer) => void), - ): cp.ChildProcess => { - if (typeof options === "function") { - callback = options; - options = undefined; - } - - return new ChildProcess(this.proxy.exec(command, options, callback)); - } - - public fork = (modulePath: string, args?: string[] | cp.ForkOptions, options?: cp.ForkOptions): cp.ChildProcess => { - if (!Array.isArray(args)) { - options = args; - args = undefined; - } - - return new ChildProcess(this.proxy.fork(modulePath, args, options)); - } - - public spawn = (command: string, args?: string[] | cp.SpawnOptions, options?: cp.SpawnOptions): cp.ChildProcess => { - if (!Array.isArray(args)) { - options = args; - args = undefined; - } - - return new ChildProcess(this.proxy.spawn(command, args, options)); - } -} diff --git a/packages/protocol/src/browser/modules/fs.ts b/packages/protocol/src/browser/modules/fs.ts deleted file mode 100644 index b8f95461..00000000 --- a/packages/protocol/src/browser/modules/fs.ts +++ /dev/null @@ -1,380 +0,0 @@ -import * as fs from "fs"; -import { callbackify } from "util"; -import { Batch, ClientProxy, ClientServerProxy } from "../../common/proxy"; -import { IEncodingOptions, IEncodingOptionsCallback } from "../../common/util"; -import { FsModuleProxy, ReadStreamProxy, Stats as IStats, WatcherProxy, WriteStreamProxy } from "../../node/modules/fs"; -import { Readable, Writable } from "./stream"; - -// tslint:disable completed-docs no-any - -class StatBatch extends Batch { - public constructor(private readonly proxy: FsModuleProxy) { - super(); - } - - protected remoteCall(batch: { path: fs.PathLike }[]): Promise<(IStats | Error)[]> { - return this.proxy.statBatch(batch); - } -} - -class LstatBatch extends Batch { - public constructor(private readonly proxy: FsModuleProxy) { - super(); - } - - protected remoteCall(batch: { path: fs.PathLike }[]): Promise<(IStats | Error)[]> { - return this.proxy.lstatBatch(batch); - } -} - -class ReaddirBatch extends Batch { - public constructor(private readonly proxy: FsModuleProxy) { - super(); - } - - protected remoteCall(queue: { path: fs.PathLike, options: IEncodingOptions }[]): Promise<(Buffer[] | fs.Dirent[] | string[] | Error)[]> { - return this.proxy.readdirBatch(queue); - } -} - -interface ClientWatcherProxy extends WatcherProxy, ClientServerProxy {} - -class Watcher extends ClientProxy implements fs.FSWatcher { - public close(): void { - this.catch(this.proxy.close()); - } - - protected handleDisconnect(): void { - this.emit("close"); - } -} - -interface ClientReadStreamProxy extends ReadStreamProxy, ClientServerProxy {} - -class ReadStream extends Readable implements fs.ReadStream { - public get bytesRead(): number { - throw new Error("not implemented"); - } - - public get path(): string | Buffer { - throw new Error("not implemented"); - } - - public close(): void { - this.catch(this.proxy.close()); - } -} - -interface ClientWriteStreamProxy extends WriteStreamProxy, ClientServerProxy {} - -class WriteStream extends Writable implements fs.WriteStream { - public get bytesWritten(): number { - throw new Error("not implemented"); - } - - public get path(): string | Buffer { - throw new Error("not implemented"); - } - - public close(): void { - this.catch(this.proxy.close()); - } -} - -interface ClientFsModuleProxy extends FsModuleProxy, ClientServerProxy { - createReadStream(path: fs.PathLike, options?: any): Promise; - createWriteStream(path: fs.PathLike, options?: any): Promise; - watch(filename: fs.PathLike, options?: IEncodingOptions): Promise; -} - -export class FsModule { - private readonly statBatch: StatBatch; - private readonly lstatBatch: LstatBatch; - private readonly readdirBatch: ReaddirBatch; - - public constructor(private readonly proxy: ClientFsModuleProxy) { - this.statBatch = new StatBatch(this.proxy); - this.lstatBatch = new LstatBatch(this.proxy); - this.readdirBatch = new ReaddirBatch(this.proxy); - } - - public access = (path: fs.PathLike, mode: number | undefined | ((err: NodeJS.ErrnoException) => void), callback?: (err: NodeJS.ErrnoException) => void): void => { - if (typeof mode === "function") { - callback = mode; - mode = undefined; - } - callbackify(this.proxy.access)(path, mode, callback!); - } - - public appendFile = (path: fs.PathLike | number, data: any, options?: fs.WriteFileOptions | ((err: NodeJS.ErrnoException) => void), callback?: (err: NodeJS.ErrnoException) => void): void => { - if (typeof options === "function") { - callback = options; - options = undefined; - } - callbackify(this.proxy.appendFile)(path, data, options, callback!); - } - - public chmod = (path: fs.PathLike, mode: string | number, callback: (err: NodeJS.ErrnoException) => void): void => { - callbackify(this.proxy.chmod)(path, mode, callback!); - } - - public chown = (path: fs.PathLike, uid: number, gid: number, callback: (err: NodeJS.ErrnoException) => void): void => { - callbackify(this.proxy.chown)(path, uid, gid, callback!); - } - - public close = (fd: number, callback: (err: NodeJS.ErrnoException) => void): void => { - callbackify(this.proxy.close)(fd, callback!); - } - - public copyFile = (src: fs.PathLike, dest: fs.PathLike, flags: number | ((err: NodeJS.ErrnoException) => void), callback?: (err: NodeJS.ErrnoException) => void): void => { - if (typeof flags === "function") { - callback = flags; - } - callbackify(this.proxy.copyFile)( - src, dest, typeof flags !== "function" ? flags : undefined, callback!, - ); - } - - public createReadStream = (path: fs.PathLike, options?: any): fs.ReadStream => { - return new ReadStream(this.proxy.createReadStream(path, options)); - } - - public createWriteStream = (path: fs.PathLike, options?: any): fs.WriteStream => { - return new WriteStream(this.proxy.createWriteStream(path, options)); - } - - public exists = (path: fs.PathLike, callback: (exists: boolean) => void): void => { - this.proxy.exists(path).then((exists) => callback(exists)).catch(() => callback(false)); - } - - public fchmod = (fd: number, mode: string | number, callback: (err: NodeJS.ErrnoException) => void): void => { - callbackify(this.proxy.fchmod)(fd, mode, callback!); - } - - public fchown = (fd: number, uid: number, gid: number, callback: (err: NodeJS.ErrnoException) => void): void => { - callbackify(this.proxy.fchown)(fd, uid, gid, callback!); - } - - public fdatasync = (fd: number, callback: (err: NodeJS.ErrnoException) => void): void => { - callbackify(this.proxy.fdatasync)(fd, callback!); - } - - public fstat = (fd: number, callback: (err: NodeJS.ErrnoException, stats: fs.Stats) => void): void => { - callbackify(this.proxy.fstat)(fd, (error, stats) => { - callback(error, stats && new Stats(stats)); - }); - } - - public fsync = (fd: number, callback: (err: NodeJS.ErrnoException) => void): void => { - callbackify(this.proxy.fsync)(fd, callback!); - } - - public ftruncate = (fd: number, len: number | undefined | null | ((err: NodeJS.ErrnoException) => void), callback?: (err: NodeJS.ErrnoException) => void): void => { - if (typeof len === "function") { - callback = len; - len = undefined; - } - callbackify(this.proxy.ftruncate)(fd, len, callback!); - } - - public futimes = (fd: number, atime: string | number | Date, mtime: string | number | Date, callback: (err: NodeJS.ErrnoException) => void): void => { - callbackify(this.proxy.futimes)(fd, atime, mtime, callback!); - } - - public lchmod = (path: fs.PathLike, mode: string | number, callback: (err: NodeJS.ErrnoException) => void): void => { - callbackify(this.proxy.lchmod)(path, mode, callback!); - } - - public lchown = (path: fs.PathLike, uid: number, gid: number, callback: (err: NodeJS.ErrnoException) => void): void => { - callbackify(this.proxy.lchown)(path, uid, gid, callback!); - } - - public link = (existingPath: fs.PathLike, newPath: fs.PathLike, callback: (err: NodeJS.ErrnoException) => void): void => { - callbackify(this.proxy.link)(existingPath, newPath, callback!); - } - - public lstat = (path: fs.PathLike, callback: (err: NodeJS.ErrnoException, stats: fs.Stats) => void): void => { - callbackify(this.lstatBatch.add)({ path }, (error, stats) => { - callback(error, stats && new Stats(stats)); - }); - } - - public mkdir = (path: fs.PathLike, mode: number | string | fs.MakeDirectoryOptions | undefined | null | ((err: NodeJS.ErrnoException) => void), callback?: (err: NodeJS.ErrnoException) => void): void => { - if (typeof mode === "function") { - callback = mode; - mode = undefined; - } - callbackify(this.proxy.mkdir)(path, mode, callback!); - } - - public mkdtemp = (prefix: string, options: IEncodingOptionsCallback, callback?: (err: NodeJS.ErrnoException, folder: string | Buffer) => void): void => { - if (typeof options === "function") { - callback = options; - options = undefined; - } - callbackify(this.proxy.mkdtemp)(prefix, options, callback!); - } - - public open = (path: fs.PathLike, flags: string | number, mode: string | number | undefined | null | ((err: NodeJS.ErrnoException, fd: number) => void), callback?: (err: NodeJS.ErrnoException, fd: number) => void): void => { - if (typeof mode === "function") { - callback = mode; - mode = undefined; - } - callbackify(this.proxy.open)(path, flags, mode, callback!); - } - - public read = (fd: number, buffer: Buffer, offset: number, length: number, position: number | null, callback: (err: NodeJS.ErrnoException, bytesRead: number, buffer: Buffer) => void): void => { - this.proxy.read(fd, length, position).then((response) => { - buffer.set(response.buffer, offset); - callback(undefined!, response.bytesRead, response.buffer); - }).catch((error) => { - callback(error, undefined!, undefined!); - }); - } - - public readFile = (path: fs.PathLike | number, options: IEncodingOptionsCallback, callback?: (err: NodeJS.ErrnoException, data: string | Buffer) => void): void => { - if (typeof options === "function") { - callback = options; - options = undefined; - } - callbackify(this.proxy.readFile)(path, options, callback!); - } - - public readdir = (path: fs.PathLike, options: IEncodingOptionsCallback, callback?: (err: NodeJS.ErrnoException, files: Buffer[] | fs.Dirent[] | string[]) => void): void => { - if (typeof options === "function") { - callback = options; - options = undefined; - } - callbackify(this.readdirBatch.add)({ path, options }, callback!); - } - - public readlink = (path: fs.PathLike, options: IEncodingOptionsCallback, callback?: (err: NodeJS.ErrnoException, linkString: string | Buffer) => void): void => { - if (typeof options === "function") { - callback = options; - options = undefined; - } - callbackify(this.proxy.readlink)(path, options, callback!); - } - - public realpath = (path: fs.PathLike, options: IEncodingOptionsCallback, callback?: (err: NodeJS.ErrnoException, resolvedPath: string | Buffer) => void): void => { - if (typeof options === "function") { - callback = options; - options = undefined; - } - callbackify(this.proxy.realpath)(path, options, callback!); - } - - public rename = (oldPath: fs.PathLike, newPath: fs.PathLike, callback: (err: NodeJS.ErrnoException) => void): void => { - callbackify(this.proxy.rename)(oldPath, newPath, callback!); - } - - public rmdir = (path: fs.PathLike, callback: (err: NodeJS.ErrnoException) => void): void => { - callbackify(this.proxy.rmdir)(path, callback!); - } - - public stat = (path: fs.PathLike, callback: (err: NodeJS.ErrnoException, stats: fs.Stats) => void): void => { - callbackify(this.statBatch.add)({ path }, (error, stats) => { - callback(error, stats && new Stats(stats)); - }); - } - - public symlink = (target: fs.PathLike, path: fs.PathLike, type: fs.symlink.Type | undefined | null | ((err: NodeJS.ErrnoException) => void), callback?: (err: NodeJS.ErrnoException) => void): void => { - if (typeof type === "function") { - callback = type; - type = undefined; - } - callbackify(this.proxy.symlink)(target, path, type, callback!); - } - - public truncate = (path: fs.PathLike, len: number | undefined | null | ((err: NodeJS.ErrnoException) => void), callback?: (err: NodeJS.ErrnoException) => void): void => { - if (typeof len === "function") { - callback = len; - len = undefined; - } - callbackify(this.proxy.truncate)(path, len, callback!); - } - - public unlink = (path: fs.PathLike, callback: (err: NodeJS.ErrnoException) => void): void => { - callbackify(this.proxy.unlink)(path, callback!); - } - - public utimes = (path: fs.PathLike, atime: string | number | Date, mtime: string | number | Date, callback: (err: NodeJS.ErrnoException) => void): void => { - callbackify(this.proxy.utimes)(path, atime, mtime, callback!); - } - - public write = (fd: number, buffer: Buffer, offset: number | undefined | ((err: NodeJS.ErrnoException, written: number, buffer: Buffer) => void), length: number | undefined | ((err: NodeJS.ErrnoException, written: number, buffer: Buffer) => void), position: number | undefined | ((err: NodeJS.ErrnoException, written: number, buffer: Buffer) => void), callback?: (err: NodeJS.ErrnoException, written: number, buffer: Buffer) => void): void => { - if (typeof offset === "function") { - callback = offset; - offset = undefined; - } - if (typeof length === "function") { - callback = length; - length = undefined; - } - if (typeof position === "function") { - callback = position; - position = undefined; - } - this.proxy.write(fd, buffer, offset, length, position).then((r) => { - callback!(undefined!, r.bytesWritten, r.buffer); - }).catch((error) => { - callback!(error, undefined!, undefined!); - }); - } - - public writeFile = (path: fs.PathLike | number, data: any, options: IEncodingOptionsCallback, callback?: (err: NodeJS.ErrnoException) => void): void => { - if (typeof options === "function") { - callback = options; - options = undefined; - } - callbackify(this.proxy.writeFile)(path, data, options, callback!); - } - - public watch = (filename: fs.PathLike, options?: IEncodingOptions | ((event: string, filename: string | Buffer) => void), listener?: ((event: string, filename: string | Buffer) => void)): fs.FSWatcher => { - if (typeof options === "function") { - listener = options; - options = undefined; - } - - const watcher = new Watcher(this.proxy.watch(filename, options)); - if (listener) { - watcher.on("change", listener); - } - - return watcher; - } -} - -class Stats implements fs.Stats { - public constructor(private readonly stats: IStats) {} - - public get dev(): number { return this.stats.dev; } - public get ino(): number { return this.stats.ino; } - public get mode(): number { return this.stats.mode; } - public get nlink(): number { return this.stats.nlink; } - public get uid(): number { return this.stats.uid; } - public get gid(): number { return this.stats.gid; } - public get rdev(): number { return this.stats.rdev; } - public get size(): number { return this.stats.size; } - public get blksize(): number { return this.stats.blksize; } - public get blocks(): number { return this.stats.blocks; } - public get atime(): Date { return this.stats.atime; } - public get mtime(): Date { return this.stats.mtime; } - public get ctime(): Date { return this.stats.ctime; } - public get birthtime(): Date { return this.stats.birthtime; } - public get atimeMs(): number { return this.stats.atimeMs; } - public get mtimeMs(): number { return this.stats.mtimeMs; } - public get ctimeMs(): number { return this.stats.ctimeMs; } - public get birthtimeMs(): number { return this.stats.birthtimeMs; } - public isFile(): boolean { return this.stats._isFile; } - public isDirectory(): boolean { return this.stats._isDirectory; } - public isBlockDevice(): boolean { return this.stats._isBlockDevice; } - public isCharacterDevice(): boolean { return this.stats._isCharacterDevice; } - public isSymbolicLink(): boolean { return this.stats._isSymbolicLink; } - public isFIFO(): boolean { return this.stats._isFIFO; } - public isSocket(): boolean { return this.stats._isSocket; } - - public toObject(): object { - return JSON.parse(JSON.stringify(this)); - } -} diff --git a/packages/protocol/src/browser/modules/index.ts b/packages/protocol/src/browser/modules/index.ts deleted file mode 100644 index 590d037d..00000000 --- a/packages/protocol/src/browser/modules/index.ts +++ /dev/null @@ -1,6 +0,0 @@ -export * from "./child_process"; -export * from "./fs"; -export * from "./net"; -export * from "./node-pty"; -export * from "./spdlog"; -export * from "./trash"; diff --git a/packages/protocol/src/browser/modules/net.ts b/packages/protocol/src/browser/modules/net.ts deleted file mode 100644 index 732711b6..00000000 --- a/packages/protocol/src/browser/modules/net.ts +++ /dev/null @@ -1,296 +0,0 @@ -import * as net from "net"; -import { callbackify } from "util"; -import { ClientProxy, ClientServerProxy } from "../../common/proxy"; -import { NetModuleProxy, NetServerProxy, NetSocketProxy } from "../../node/modules/net"; -import { Duplex } from "./stream"; - -// tslint:disable completed-docs - -interface ClientNetSocketProxy extends NetSocketProxy, ClientServerProxy {} - -export class Socket extends Duplex implements net.Socket { - private _connecting: boolean = false; - private _destroyed: boolean = false; - - public constructor(proxyPromise: Promise | ClientNetSocketProxy, connecting?: boolean) { - super(proxyPromise); - if (connecting) { - this._connecting = connecting; - } - this.on("close", () => { - this._destroyed = true; - this._connecting = false; - }); - this.on("connect", () => this._connecting = false); - } - - public connect(options: number | string | net.SocketConnectOpts, host?: string | Function, callback?: Function): this { - if (typeof host === "function") { - callback = host; - host = undefined; - } - this._connecting = true; - if (callback) { - this.on("connect", callback as () => void); - } - - return this.catch(this.proxy.connect(options, host)); - } - - // tslint:disable-next-line no-any - public end(data?: any, encoding?: string | Function, callback?: Function): void { - if (typeof encoding === "function") { - callback = encoding; - encoding = undefined; - } - - callbackify(this.proxy.end)(data, encoding, () => { - if (callback) { - callback(); - } - }); - } - - // tslint:disable-next-line no-any - public write(data: any, encoding?: string | Function, fd?: string | Function): boolean { - let callback: undefined | Function; - if (typeof encoding === "function") { - callback = encoding; - encoding = undefined; - } - if (typeof fd === "function") { - callback = fd; - fd = undefined; - } - if (typeof fd !== "undefined") { - throw new Error("fd argument not supported"); - } - - callbackify(this.proxy.write)(data, encoding, () => { - if (callback) { - callback(); - } - }); - - return true; // Always true since we can't get this synchronously. - } - - public get connecting(): boolean { - return this._connecting; - } - - public get destroyed(): boolean { - return this._destroyed; - } - - public get bufferSize(): number { - throw new Error("not implemented"); - } - - public get bytesRead(): number { - throw new Error("not implemented"); - } - - public get bytesWritten(): number { - throw new Error("not implemented"); - } - - public get localAddress(): string { - throw new Error("not implemented"); - } - - public get localPort(): number { - throw new Error("not implemented"); - } - - public address(): net.AddressInfo | string { - throw new Error("not implemented"); - } - - public setTimeout(): this { - throw new Error("not implemented"); - } - - public setNoDelay(): this { - throw new Error("not implemented"); - } - - public setKeepAlive(): this { - throw new Error("not implemented"); - } - - public unref(): void { - this.catch(this.proxy.unref()); - } - - public ref(): void { - this.catch(this.proxy.ref()); - } -} - -interface ClientNetServerProxy extends NetServerProxy, ClientServerProxy { - onConnection(cb: (proxy: ClientNetSocketProxy) => void): Promise; -} - -export class Server extends ClientProxy implements net.Server { - private socketId = 0; - private readonly sockets = new Map(); - private _listening: boolean = false; - - public constructor(proxyPromise: Promise | ClientNetServerProxy) { - super(proxyPromise); - - this.catch(this.proxy.onConnection((socketProxy) => { - const socket = new Socket(socketProxy); - const socketId = this.socketId++; - this.sockets.set(socketId, socket); - socket.on("error", () => this.sockets.delete(socketId)); - socket.on("close", () => this.sockets.delete(socketId)); - this.emit("connection", socket); - })); - - this.on("listening", () => this._listening = true); - this.on("error", () => this._listening = false); - this.on("close", () => this._listening = false); - } - - public listen(handle?: net.ListenOptions | number | string, hostname?: string | number | Function, backlog?: number | Function, callback?: Function): this { - if (typeof hostname === "function") { - callback = hostname; - hostname = undefined; - } - if (typeof backlog === "function") { - callback = backlog; - backlog = undefined; - } - if (callback) { - this.on("listening", callback as () => void); - } - - return this.catch(this.proxy.listen(handle, hostname, backlog)); - } - - public get connections(): number { - return this.sockets.size; - } - - public get listening(): boolean { - return this._listening; - } - - public get maxConnections(): number { - throw new Error("not implemented"); - } - - public address(): net.AddressInfo | string { - throw new Error("not implemented"); - } - - public close(callback?: () => void): this { - this._listening = false; - if (callback) { - this.on("close", callback); - } - - return this.catch(this.proxy.close()); - } - - public ref(): this { - return this.catch(this.proxy.ref()); - } - - public unref(): this { - return this.catch(this.proxy.unref()); - } - - public getConnections(cb: (error: Error | null, count: number) => void): void { - cb(null, this.sockets.size); - } - - protected handleDisconnect(): void { - this.emit("close"); - } -} - -type NodeNet = typeof net; - -interface ClientNetModuleProxy extends NetModuleProxy, ClientServerProxy { - createSocket(options?: net.SocketConstructorOpts): Promise; - createConnection(target: string | number | net.NetConnectOpts, host?: string): Promise; - createServer(options?: { allowHalfOpen?: boolean, pauseOnConnect?: boolean }): Promise; -} - -export class NetModule implements NodeNet { - public readonly Socket: typeof net.Socket; - public readonly Server: typeof net.Server; - - public constructor(private readonly proxy: ClientNetModuleProxy) { - // @ts-ignore this is because Socket is missing things from the Stream - // namespace but I'm unsure how best to provide them (finished, - // finished.__promisify__, pipeline, and some others) or if it even matters. - this.Socket = class extends Socket { - public constructor(options?: net.SocketConstructorOpts) { - super(proxy.createSocket(options)); - } - }; - - this.Server = class extends Server { - public constructor(options?: { allowHalfOpen?: boolean, pauseOnConnect?: boolean } | ((socket: Socket) => void), listener?: (socket: Socket) => void) { - super(proxy.createServer(typeof options !== "function" ? options : undefined)); - if (typeof options === "function") { - listener = options; - } - if (listener) { - this.on("connection", listener); - } - } - }; - } - - public createConnection = (target: string | number | net.NetConnectOpts, host?: string | Function, callback?: Function): net.Socket => { - if (typeof host === "function") { - callback = host; - host = undefined; - } - - const socket = new Socket(this.proxy.createConnection(target, host), true); - if (callback) { - socket.on("connect", callback as () => void); - } - - return socket; - } - - public createServer = ( - options?: { allowHalfOpen?: boolean, pauseOnConnect?: boolean } | ((socket: net.Socket) => void), - callback?: (socket: net.Socket) => void, - ): net.Server => { - if (typeof options === "function") { - callback = options; - options = undefined; - } - - const server = new Server(this.proxy.createServer(options)); - if (callback) { - server.on("connection", callback); - } - - return server; - } - - public connect = (): net.Socket => { - throw new Error("not implemented"); - } - - public isIP = (_input: string): number => { - throw new Error("not implemented"); - } - - public isIPv4 = (_input: string): boolean => { - throw new Error("not implemented"); - } - - public isIPv6 = (_input: string): boolean => { - throw new Error("not implemented"); - } -} diff --git a/packages/protocol/src/browser/modules/node-pty.ts b/packages/protocol/src/browser/modules/node-pty.ts deleted file mode 100644 index 2f173705..00000000 --- a/packages/protocol/src/browser/modules/node-pty.ts +++ /dev/null @@ -1,79 +0,0 @@ -import * as pty from "node-pty"; -import { ClientProxy, ClientServerProxy } from "../../common/proxy"; -import { NodePtyModuleProxy, NodePtyProcessProxy } from "../../node/modules/node-pty"; - -// tslint:disable completed-docs - -interface ClientNodePtyProcessProxy extends NodePtyProcessProxy, ClientServerProxy {} - -export class NodePtyProcess extends ClientProxy implements pty.IPty { - private _pid = -1; - private _process = ""; - private lastCols: number | undefined; - private lastRows: number | undefined; - - public constructor( - private readonly moduleProxy: ClientNodePtyModuleProxy, - private readonly file: string, - private readonly args: string[] | string, - private readonly options: pty.IPtyForkOptions, - ) { - super(moduleProxy.spawn(file, args, options)); - this.on("process", (process) => this._process = process); - } - - protected initialize(proxyPromise: Promise): ClientNodePtyProcessProxy { - const proxy = super.initialize(proxyPromise); - this.catch(this.proxy.getPid().then((p) => this._pid = p)); - this.catch(this.proxy.getProcess().then((p) => this._process = p)); - - return proxy; - } - - public get pid(): number { - return this._pid; - } - - public get process(): string { - return this._process; - } - - public resize(columns: number, rows: number): void { - this.lastCols = columns; - this.lastRows = rows; - - this.catch(this.proxy.resize(columns, rows)); - } - - public write(data: string): void { - this.catch(this.proxy.write(data)); - } - - public kill(signal?: string): void { - this.catch(this.proxy.kill(signal)); - } - - protected handleDisconnect(): void { - this._process += " (disconnected)"; - this.emit("data", "\r\n\nLost connection...\r\n\n"); - this.initialize(this.moduleProxy.spawn(this.file, this.args, { - ...this.options, - cols: this.lastCols || this.options.cols, - rows: this.lastRows || this.options.rows, - })); - } -} - -type NodePty = typeof pty; - -interface ClientNodePtyModuleProxy extends NodePtyModuleProxy, ClientServerProxy { - spawn(file: string, args: string[] | string, options: pty.IPtyForkOptions): Promise; -} - -export class NodePtyModule implements NodePty { - public constructor(private readonly proxy: ClientNodePtyModuleProxy) {} - - public spawn = (file: string, args: string[] | string, options: pty.IPtyForkOptions): pty.IPty => { - return new NodePtyProcess(this.proxy, file, args, options); - } -} diff --git a/packages/protocol/src/browser/modules/spdlog.ts b/packages/protocol/src/browser/modules/spdlog.ts deleted file mode 100644 index 058630e2..00000000 --- a/packages/protocol/src/browser/modules/spdlog.ts +++ /dev/null @@ -1,62 +0,0 @@ -import * as spdlog from "spdlog"; -import { ClientProxy, ClientServerProxy } from "../../common/proxy"; -import { RotatingLoggerProxy, SpdlogModuleProxy } from "../../node/modules/spdlog"; - -// tslint:disable completed-docs - -interface ClientRotatingLoggerProxy extends RotatingLoggerProxy, ClientServerProxy {} - -class RotatingLogger extends ClientProxy implements spdlog.RotatingLogger { - public constructor( - private readonly moduleProxy: ClientSpdlogModuleProxy, - private readonly name: string, - private readonly filename: string, - private readonly filesize: number, - private readonly filecount: number, - ) { - super(moduleProxy.createLogger(name, filename, filesize, filecount)); - } - - public trace (message: string): void { this.catch(this.proxy.trace(message)); } - public debug (message: string): void { this.catch(this.proxy.debug(message)); } - public info (message: string): void { this.catch(this.proxy.info(message)); } - public warn (message: string): void { this.catch(this.proxy.warn(message)); } - public error (message: string): void { this.catch(this.proxy.error(message)); } - public critical (message: string): void { this.catch(this.proxy.critical(message)); } - public setLevel (level: number): void { this.catch(this.proxy.setLevel(level)); } - public clearFormatters (): void { this.catch(this.proxy.clearFormatters()); } - public flush (): void { this.catch(this.proxy.flush()); } - public drop (): void { this.catch(this.proxy.drop()); } - - protected handleDisconnect(): void { - this.initialize(this.moduleProxy.createLogger(this.name, this.filename, this.filesize, this.filecount)); - } -} - -interface ClientSpdlogModuleProxy extends SpdlogModuleProxy, ClientServerProxy { - createLogger(name: string, filePath: string, fileSize: number, fileCount: number): Promise; -} - -export class SpdlogModule { - public readonly RotatingLogger: typeof spdlog.RotatingLogger; - - public constructor(private readonly proxy: ClientSpdlogModuleProxy) { - this.RotatingLogger = class extends RotatingLogger { - public constructor(name: string, filename: string, filesize: number, filecount: number) { - super(proxy, name, filename, filesize, filecount); - } - }; - } - - public setAsyncMode = (bufferSize: number, flushInterval: number): Promise => { - return this.proxy.setAsyncMode(bufferSize, flushInterval); - } - - public createRotatingLogger(name: string, filename: string, filesize: number, filecount: number): RotatingLogger { - return new RotatingLogger(this.proxy, name, filename, filesize, filecount); - } - - public createRotatingLoggerAsync(name: string, filename: string, filesize: number, filecount: number): Promise { - return Promise.resolve(this.createRotatingLogger(name, filename, filesize, filecount)); - } -} diff --git a/packages/protocol/src/browser/modules/stream.ts b/packages/protocol/src/browser/modules/stream.ts deleted file mode 100644 index 856e2789..00000000 --- a/packages/protocol/src/browser/modules/stream.ts +++ /dev/null @@ -1,257 +0,0 @@ -import * as stream from "stream"; -import { callbackify } from "util"; -import { ClientProxy, ClientServerProxy } from "../../common/proxy"; -import { isPromise } from "../../common/util"; -import { DuplexProxy, ReadableProxy, WritableProxy } from "../../node/modules/stream"; - -// tslint:disable completed-docs no-any - -export interface ClientWritableProxy extends WritableProxy, ClientServerProxy {} - -export class Writable extends ClientProxy implements stream.Writable { - public get writable(): boolean { - throw new Error("not implemented"); - } - - public get writableHighWaterMark(): number { - throw new Error("not implemented"); - } - - public get writableLength(): number { - throw new Error("not implemented"); - } - - public _write(): void { - throw new Error("not implemented"); - } - - public _destroy(): void { - throw new Error("not implemented"); - } - - public _final(): void { - throw new Error("not implemented"); - } - - public pipe(): T { - throw new Error("not implemented"); - } - - public cork(): void { - throw new Error("not implemented"); - } - - public uncork(): void { - throw new Error("not implemented"); - } - - public destroy(): void { - this.catch(this.proxy.destroy()); - } - - public setDefaultEncoding(encoding: string): this { - return this.catch(this.proxy.setDefaultEncoding(encoding)); - } - - public write(chunk: any, encoding?: string | ((error?: Error | null) => void), callback?: (error?: Error | null) => void): boolean { - if (typeof encoding === "function") { - callback = encoding; - encoding = undefined; - } - callbackify(this.proxy.write)(chunk, encoding, (error) => { - if (callback) { - callback(error); - } - }); - - return true; // Always true since we can't get this synchronously. - } - - public end(data?: any | (() => void), encoding?: string | (() => void), callback?: (() => void)): void { - if (typeof data === "function") { - callback = data; - data = undefined; - } - if (typeof encoding === "function") { - callback = encoding; - encoding = undefined; - } - callbackify(this.proxy.end)(data, encoding, () => { - if (callback) { - callback(); - } - }); - } - - protected handleDisconnect(): void { - this.emit("close"); - this.emit("finish"); - } -} - -export interface ClientReadableProxy extends ReadableProxy, ClientServerProxy {} - -export class Readable extends ClientProxy implements stream.Readable { - public get readable(): boolean { - throw new Error("not implemented"); - } - - public get readableHighWaterMark(): number { - throw new Error("not implemented"); - } - - public get readableLength(): number { - throw new Error("not implemented"); - } - - public _read(): void { - throw new Error("not implemented"); - } - - public read(): void { - throw new Error("not implemented"); - } - - public _destroy(): void { - throw new Error("not implemented"); - } - - public unpipe(): this { - throw new Error("not implemented"); - } - - public pause(): this { - throw new Error("not implemented"); - } - - public resume(): this { - throw new Error("not implemented"); - } - - public isPaused(): boolean { - throw new Error("not implemented"); - } - - public wrap(): this { - throw new Error("not implemented"); - } - - public push(): boolean { - throw new Error("not implemented"); - } - - public unshift(): void { - throw new Error("not implemented"); - } - - public pipe

(destination: P, options?: { end?: boolean }): P { - const writableProxy = (destination as any as Writable).proxyPromise; - if (!writableProxy) { - throw new Error("can only pipe stream proxies"); - } - this.catch( - isPromise(writableProxy) - ? writableProxy.then((p) => this.proxy.pipe(p, options)) - : this.proxy.pipe(writableProxy, options), - ); - - return destination; - } - - public [Symbol.asyncIterator](): AsyncIterableIterator { - throw new Error("not implemented"); - } - - public destroy(): void { - this.catch(this.proxy.destroy()); - } - - public setEncoding(encoding: string): this { - return this.catch(this.proxy.setEncoding(encoding)); - } - - protected handleDisconnect(): void { - this.emit("close"); - this.emit("end"); - } -} - -export interface ClientDuplexProxy extends DuplexProxy, ClientServerProxy {} - -export class Duplex extends Writable implements stream.Duplex, stream.Readable { - private readonly _readable: Readable; - - public constructor(proxyPromise: Promise | T) { - super(proxyPromise); - this._readable = new Readable(proxyPromise, false); - } - - public get readable(): boolean { - return this._readable.readable; - } - - public get readableHighWaterMark(): number { - return this._readable.readableHighWaterMark; - } - - public get readableLength(): number { - return this._readable.readableLength; - } - - public _read(): void { - this._readable._read(); - } - - public read(): void { - this._readable.read(); - } - - public unpipe(): this { - this._readable.unpipe(); - - return this; - } - - public pause(): this { - this._readable.unpipe(); - - return this; - } - - public resume(): this { - this._readable.resume(); - - return this; - } - - public isPaused(): boolean { - return this._readable.isPaused(); - } - - public wrap(): this { - this._readable.wrap(); - - return this; - } - - public push(): boolean { - return this._readable.push(); - } - - public unshift(): void { - this._readable.unshift(); - } - - public [Symbol.asyncIterator](): AsyncIterableIterator { - return this._readable[Symbol.asyncIterator](); - } - - public setEncoding(encoding: string): this { - return this.catch(this.proxy.setEncoding(encoding)); - } - - protected handleDisconnect(): void { - super.handleDisconnect(); - this.emit("end"); - } -} diff --git a/packages/protocol/src/browser/modules/trash.ts b/packages/protocol/src/browser/modules/trash.ts deleted file mode 100644 index 3a11f4d5..00000000 --- a/packages/protocol/src/browser/modules/trash.ts +++ /dev/null @@ -1,15 +0,0 @@ -import * as trash from "trash"; -import { ClientServerProxy } from "../../common/proxy"; -import { TrashModuleProxy } from "../../node/modules/trash"; - -// tslint:disable completed-docs - -interface ClientTrashModuleProxy extends TrashModuleProxy, ClientServerProxy {} - -export class TrashModule { - public constructor(private readonly proxy: ClientTrashModuleProxy) {} - - public trash = (path: string, options?: trash.Options): Promise => { - return this.proxy.trash(path, options); - } -} diff --git a/packages/protocol/src/common/connection.ts b/packages/protocol/src/common/connection.ts deleted file mode 100644 index 395b9a4d..00000000 --- a/packages/protocol/src/common/connection.ts +++ /dev/null @@ -1,38 +0,0 @@ -import * as jspb from "google-protobuf"; - -export interface SendableConnection { - send(data: Buffer | Uint8Array): void; -} - -export interface ReadWriteConnection extends SendableConnection { - onMessage(cb: (data: Uint8Array | Buffer) => void): void; - onClose(cb: () => void): void; - onDown(cb: () => void): void; - onUp(cb: () => void): void; - close(): void; -} - -export enum OperatingSystem { - Windows, - Linux, - Mac, -} - -export interface InitData { - readonly os: OperatingSystem; - readonly dataDirectory: string; - readonly workingDirectory: string; - readonly homeDirectory: string; - readonly tmpDirectory: string; - readonly shell: string; - readonly extensionsDirectory: string; - readonly builtInExtensionsDirectory: string; - readonly extraExtensionDirectories: string[]; - readonly extraBuiltinExtensionDirectories: string[]; - readonly env: jspb.Map; -} - -export interface SharedProcessData { - readonly socketPath: string; - readonly logPath: string; -} diff --git a/packages/protocol/src/common/proxy.ts b/packages/protocol/src/common/proxy.ts deleted file mode 100644 index 6ee895da..00000000 --- a/packages/protocol/src/common/proxy.ts +++ /dev/null @@ -1,325 +0,0 @@ -import { EventEmitter } from "events"; -import { isPromise, EventCallback } from "./util"; - -// tslint:disable no-any - -/** - * Allow using a proxy like it's returned synchronously. This only works because - * all proxy methods must return promises. - */ -const unpromisify = (proxyPromise: Promise): T => { - return new Proxy({}, { - get: (target: any, name: string): any => { - if (typeof target[name] === "undefined") { - target[name] = async (...args: any[]): Promise => { - const proxy = await proxyPromise; - - return proxy ? (proxy as any)[name](...args) : undefined; - }; - } - - return target[name]; - }, - }); -}; - -/** - * Client-side emitter that just forwards server proxy events to its own - * emitter. It also turns a promisified server proxy into a non-promisified - * proxy so we don't need a bunch of `then` calls everywhere. - */ -export abstract class ClientProxy extends EventEmitter { - private _proxy: T; - - /** - * You can specify not to bind events in order to avoid emitting twice for - * duplex streams. - */ - public constructor( - private _proxyPromise: Promise | T, - private readonly bindEvents: boolean = true, - ) { - super(); - this._proxy = this.initialize(this._proxyPromise); - if (this.bindEvents) { - this.on("disconnected", (error) => { - try { - this.emit("error", error); - } catch (error) { - // If nothing is listening, EventEmitter will throw an error. - } - this.handleDisconnect(); - }); - } - } - - /** - * Remove an event listener. - */ - public off(event: string, cb: (...args: any[]) => void): this { - // Fill it here because the fill we're using to provide EventEmitter for the - // browser doesn't appear to include `off`. - this.removeListener(event, cb); - - return this; - } - - /** - * Bind the event locally and ensure the event is bound on the server. - */ - public addListener(event: string, listener: (...args: any[]) => void): this { - this.catch(this.proxy.bindDelayedEvent(event)); - - return super.on(event, listener); - } - - /** - * Alias for `addListener`. - */ - public on(event: string, listener: (...args: any[]) => void): this { - return this.addListener(event, listener); - } - - /** - * Original promise for the server proxy. Can be used to be passed as an - * argument. - */ - public get proxyPromise(): Promise | T { - return this._proxyPromise; - } - - /** - * Server proxy. - */ - protected get proxy(): T { - return this._proxy; - } - - /** - * Initialize the proxy by unpromisifying if necessary and binding to its - * events. - */ - protected initialize(proxyPromise: Promise | T): T { - this._proxyPromise = proxyPromise; - this._proxy = isPromise(this._proxyPromise) - ? unpromisify(this._proxyPromise) - : this._proxyPromise; - if (this.bindEvents) { - this.proxy.onEvent((event, ...args): void => { - this.emit(event, ...args); - }); - } - - return this._proxy; - } - - /** - * Perform necessary cleanup on disconnect (or reconnect). - */ - protected abstract handleDisconnect(): void; - - /** - * Emit an error event if the promise errors. - */ - protected catch(promise?: Promise): this { - if (promise) { - promise.catch((e) => this.emit("error", e)); - } - - return this; - } -} - -export interface ServerProxyOptions { - /** - * The events to bind immediately. - */ - bindEvents: string[]; - /** - * Events that signal the proxy is done. - */ - doneEvents: string[]; - /** - * Events that should only be bound when asked - */ - delayedEvents?: string[]; - /** - * Whatever is emitting events (stream, child process, etc). - */ - instance: T; -} - -/** - * The actual proxy instance on the server. Every method must only accept - * serializable arguments and must return promises with serializable values. - * - * If a proxy itself has proxies on creation (like how ChildProcess has stdin), - * then it should return all of those at once, otherwise you will miss events - * from those child proxies and fail to dispose them properly. - * - * Events listeners are added client-side (since all events automatically - * forward to the client), so onDone and onEvent do not need to be asynchronous. - */ -export abstract class ServerProxy { - public readonly instance: T; - - private readonly callbacks = []; - - public constructor(private readonly options: ServerProxyOptions) { - this.instance = options.instance; - } - - /** - * Dispose the proxy. - */ - public async dispose(): Promise { - this.instance.removeAllListeners(); - } - - /** - * This is used instead of an event to force it to be implemented since there - * would be no guarantee the implementation would remember to emit the event. - */ - public onDone(cb: () => void): void { - this.options.doneEvents.forEach((event) => { - this.instance.on(event, cb); - }); - } - - /** - * Bind an event that will not fire without first binding it and shouldn't be - * bound immediately. - - * For example, binding to `data` switches a stream to flowing mode, so we - * don't want to do it until we're asked. Otherwise something like `pipe` - * won't work because potentially some or all of the data will already have - * been flushed out. - */ - public async bindDelayedEvent(event: string): Promise { - if (this.options.delayedEvents - && this.options.delayedEvents.includes(event) - && !this.options.bindEvents.includes(event)) { - this.options.bindEvents.push(event); - this.callbacks.forEach((cb) => { - this.instance.on(event, (...args: any[]) => cb(event, ...args)); - }); - } - } - - /** - * Listen to all possible events. On the client, this is to reduce boilerplate - * that would just be a bunch of error-prone forwarding of each individual - * event from the proxy to its own emitter. - * - * It also fixes a timing issue because we just always send all events from - * the server, so we never miss any due to listening too late. - * - * This cannot be async because then we can bind to the events too late. - */ - public onEvent(cb: EventCallback): void { - this.callbacks.push(cb); - this.options.bindEvents.forEach((event) => { - this.instance.on(event, (...args: any[]) => cb(event, ...args)); - }); - } -} - -/** - * A server-side proxy stored on the client. The proxy ID only exists on the - * client-side version of the server proxy. The event listeners are handled by - * the client and the remaining methods are proxied to the server. - */ -export interface ClientServerProxy extends ServerProxy { - proxyId: number | Module; -} - -/** - * Supported top-level module proxies. - */ -export enum Module { - Fs = "fs", - ChildProcess = "child_process", - Net = "net", - Spdlog = "spdlog", - NodePty = "node-pty", - Trash = "trash", -} - -interface BatchItem { - args: A; - resolve: (t: T) => void; - reject: (e: Error) => void; -} - -/** - * Batch remote calls. - */ -export abstract class Batch { - private idleTimeout: number | NodeJS.Timer | undefined; - private maxTimeout: number | NodeJS.Timer | undefined; - private batch = []>[]; - - public constructor( - /** - * Flush after reaching this amount of time. - */ - private readonly maxTime: number = 1000, - /** - * Flush after reaching this count. - */ - private readonly maxCount: number = 100, - /** - * Flush after not receiving more requests for this amount of time. - * This is pretty low by default so essentially we just end up batching - * requests that are all made at the same time. - */ - private readonly idleTime: number = 1, - ) {} - - public add = (args: A): Promise => { - return new Promise((resolve, reject): void => { - this.batch.push({ - args, - resolve, - reject, - }); - if (this.batch.length >= this.maxCount) { - this.flush(); - } else { - clearTimeout(this.idleTimeout as any); - this.idleTimeout = setTimeout(this.flush, this.idleTime); - if (typeof this.maxTimeout === "undefined") { - this.maxTimeout = setTimeout(this.flush, this.maxTime); - } - } - }); - } - - /** - * Perform remote call for a batch. - */ - protected abstract remoteCall(batch: A[]): Promise<(T | Error)[]>; - - /** - * Flush out the current batch. - */ - private readonly flush = (): void => { - clearTimeout(this.idleTimeout as any); - clearTimeout(this.maxTimeout as any); - this.maxTimeout = undefined; - - const batch = this.batch; - this.batch = []; - - this.remoteCall(batch.map((q) => q.args)).then((results) => { - batch.forEach((item, i) => { - const result = results[i]; - if (result && result instanceof Error) { - item.reject(result); - } else { - item.resolve(result); - } - }); - }).catch((error) => batch.forEach((item) => item.reject(error))); - } -} diff --git a/packages/protocol/src/common/util.ts b/packages/protocol/src/common/util.ts deleted file mode 100644 index b21941c3..00000000 --- a/packages/protocol/src/common/util.ts +++ /dev/null @@ -1,246 +0,0 @@ -import { Argument, Module as ProtoModule, WorkingInit } from "../proto"; -import { OperatingSystem } from "../common/connection"; -import { ClientServerProxy, Module, ServerProxy } from "./proxy"; - -// tslint:disable no-any - -/** - * Return true if we're in a browser environment (including web workers). - */ -export const isBrowserEnvironment = (): boolean => { - return typeof process === "undefined" || typeof process.stdout === "undefined"; -}; - -/** - * Escape a path. This prevents any issues with file names that have quotes, - * spaces, braces, etc. - */ -export const escapePath = (path: string): string => { - return `'${path.replace(/'/g, "'\\''")}'`; -}; - -export type EventCallback = (event: string, ...args: any[]) => void; - -export type IEncodingOptions = { - encoding?: BufferEncoding | null; - flag?: string; - mode?: string; - persistent?: boolean; - recursive?: boolean; -} | BufferEncoding | undefined | null; - -export type IEncodingOptionsCallback = IEncodingOptions | ((err: NodeJS.ErrnoException, ...args: any[]) => void); - -/** - * Convert an argument to proto. - * If sending a function is possible, provide `storeFunction`. - * If sending a proxy is possible, provide `storeProxy`. - */ -export const argumentToProto =

( - value: any, - storeFunction?: (fn: () => void) => number, - storeProxy?: (proxy: P) => number | Module, -): Argument => { - const convert = (currentValue: any): Argument => { - const message = new Argument(); - - if (isProxy

(currentValue)) { - if (!storeProxy) { - throw new Error("no way to serialize proxy"); - } - const arg = new Argument.ProxyValue(); - const id = storeProxy(currentValue); - if (typeof id === "string") { - throw new Error("unable to serialize module proxy"); - } - arg.setId(id); - message.setProxy(arg); - } else if (currentValue instanceof Error - || (currentValue && typeof currentValue.message !== "undefined" - && typeof currentValue.stack !== "undefined")) { - const arg = new Argument.ErrorValue(); - arg.setMessage(currentValue.message); - arg.setStack(currentValue.stack); - arg.setCode(currentValue.code); - message.setError(arg); - } else if (currentValue instanceof Uint8Array || currentValue instanceof Buffer) { - const arg = new Argument.BufferValue(); - arg.setData(currentValue); - message.setBuffer(arg); - } else if (Array.isArray(currentValue)) { - const arg = new Argument.ArrayValue(); - arg.setDataList(currentValue.map(convert)); - message.setArray(arg); - } else if (currentValue instanceof Date - || (currentValue && typeof currentValue.getTime === "function")) { - const arg = new Argument.DateValue(); - arg.setDate(currentValue.toString()); - message.setDate(arg); - } else if (currentValue !== null && typeof currentValue === "object") { - const arg = new Argument.ObjectValue(); - const map = arg.getDataMap(); - Object.keys(currentValue).forEach((key) => { - map.set(key, convert(currentValue[key])); - }); - message.setObject(arg); - } else if (currentValue === null) { - message.setNull(new Argument.NullValue()); - } else { - switch (typeof currentValue) { - case "undefined": - message.setUndefined(new Argument.UndefinedValue()); - break; - case "function": - if (!storeFunction) { - throw new Error("no way to serialize function"); - } - const arg = new Argument.FunctionValue(); - arg.setId(storeFunction(currentValue)); - message.setFunction(arg); - break; - case "number": - message.setNumber(currentValue); - break; - case "string": - message.setString(currentValue); - break; - case "boolean": - message.setBoolean(currentValue); - break; - default: - throw new Error(`cannot convert ${typeof currentValue} to proto`); - } - } - - return message; - }; - - return convert(value); -}; - -/** - * Convert proto to an argument. - * If running a remote callback is supported, provide `runCallback`. - * If using a remote proxy is supported, provide `createProxy`. - */ -export const protoToArgument = ( - message?: Argument, - runCallback?: (id: number, args: any[]) => void, - createProxy?: (id: number) => ServerProxy, -): any => { - const convert = (currentMessage: Argument): any => { - switch (currentMessage.getMsgCase()) { - case Argument.MsgCase.ERROR: - const errorMessage = currentMessage.getError()!; - const error = new Error(errorMessage.getMessage()); - (error as NodeJS.ErrnoException).code = errorMessage.getCode(); - (error as any).originalStack = errorMessage.getStack(); - - return error; - case Argument.MsgCase.BUFFER: - return Buffer.from(currentMessage.getBuffer()!.getData() as Uint8Array); - case Argument.MsgCase.ARRAY: - return currentMessage.getArray()!.getDataList().map((a) => convert(a)); - case Argument.MsgCase.PROXY: - if (!createProxy) { - throw new Error("no way to create proxy"); - } - - return createProxy(currentMessage.getProxy()!.getId()); - case Argument.MsgCase.DATE: - return new Date(currentMessage.getDate()!.getDate()); - case Argument.MsgCase.OBJECT: - const obj: { [Key: string]: any } = {}; - currentMessage.getObject()!.getDataMap().forEach((argument, key) => { - obj[key] = convert(argument); - }); - - return obj; - case Argument.MsgCase.UNDEFINED: - return undefined; - case Argument.MsgCase.NULL: - return null; - case Argument.MsgCase.FUNCTION: - if (!runCallback) { - throw new Error("no way to run remote callback"); - } - - return (...args: any[]): void => { - return runCallback(currentMessage.getFunction()!.getId(), args); - }; - case Argument.MsgCase.NUMBER: - return currentMessage.getNumber(); - case Argument.MsgCase.STRING: - return currentMessage.getString(); - case Argument.MsgCase.BOOLEAN: - return currentMessage.getBoolean(); - default: - throw new Error("cannot convert unexpected proto to argument"); - } - }; - - return message && convert(message); -}; - -export const protoToModule = (protoModule: ProtoModule): Module => { - switch (protoModule) { - case ProtoModule.CHILDPROCESS: return Module.ChildProcess; - case ProtoModule.FS: return Module.Fs; - case ProtoModule.NET: return Module.Net; - case ProtoModule.NODEPTY: return Module.NodePty; - case ProtoModule.SPDLOG: return Module.Spdlog; - case ProtoModule.TRASH: return Module.Trash; - default: throw new Error(`invalid module ${protoModule}`); - } -}; - -export const moduleToProto = (moduleName: Module): ProtoModule => { - switch (moduleName) { - case Module.ChildProcess: return ProtoModule.CHILDPROCESS; - case Module.Fs: return ProtoModule.FS; - case Module.Net: return ProtoModule.NET; - case Module.NodePty: return ProtoModule.NODEPTY; - case Module.Spdlog: return ProtoModule.SPDLOG; - case Module.Trash: return ProtoModule.TRASH; - default: throw new Error(`invalid module "${moduleName}"`); - } -}; - -export const protoToOperatingSystem = (protoOp: WorkingInit.OperatingSystem): OperatingSystem => { - switch (protoOp) { - case WorkingInit.OperatingSystem.WINDOWS: return OperatingSystem.Windows; - case WorkingInit.OperatingSystem.LINUX: return OperatingSystem.Linux; - case WorkingInit.OperatingSystem.MAC: return OperatingSystem.Mac; - default: throw new Error(`unsupported operating system ${protoOp}`); - } -}; - -export const platformToProto = (platform: NodeJS.Platform): WorkingInit.OperatingSystem => { - switch (platform) { - case "win32": return WorkingInit.OperatingSystem.WINDOWS; - case "linux": return WorkingInit.OperatingSystem.LINUX; - case "darwin": return WorkingInit.OperatingSystem.MAC; - default: throw new Error(`unrecognized platform "${platform}"`); - } -}; - -export const isProxy =

(value: any): value is P => { - return value && typeof value === "object" && typeof value.onEvent === "function"; -}; - -export const isPromise = (value: any): value is Promise => { - return typeof value.then === "function" && typeof value.catch === "function"; -}; - -/** - * When spawning VS Code tries to preserve the environment but since it's in - * the browser, it doesn't work. - */ -export const withEnv = (options?: T): T | undefined => { - return options && options.env ? { - ...options, - env: { - ...process.env, ...options.env, - }, - } : options; -}; diff --git a/packages/protocol/src/index.ts b/packages/protocol/src/index.ts deleted file mode 100644 index b118df39..00000000 --- a/packages/protocol/src/index.ts +++ /dev/null @@ -1,4 +0,0 @@ -export * from "./browser/client"; -export * from "./common/connection"; -export * from "./common/proxy"; -export * from "./common/util"; diff --git a/packages/protocol/src/node/modules/child_process.ts b/packages/protocol/src/node/modules/child_process.ts deleted file mode 100644 index 5df9a527..00000000 --- a/packages/protocol/src/node/modules/child_process.ts +++ /dev/null @@ -1,95 +0,0 @@ -import * as cp from "child_process"; -import { ServerProxy } from "../../common/proxy"; -import { withEnv } from "../../common/util"; -import { WritableProxy, ReadableProxy } from "./stream"; - -// tslint:disable completed-docs - -export type ForkProvider = (modulePath: string, args?: string[], options?: cp.ForkOptions) => cp.ChildProcess; - -export class ChildProcessProxy extends ServerProxy { - public constructor(instance: cp.ChildProcess) { - super({ - bindEvents: ["close", "disconnect", "error", "exit", "message"], - doneEvents: ["close"], - instance, - }); - } - - public async kill(signal?: string): Promise { - this.instance.kill(signal); - } - - public async disconnect(): Promise { - this.instance.disconnect(); - } - - public async ref(): Promise { - this.instance.ref(); - } - - public async unref(): Promise { - this.instance.unref(); - } - - // tslint:disable-next-line no-any - public async send(message: any): Promise { - return new Promise((resolve, reject): void => { - this.instance.send(message, (error) => { - if (error) { - reject(error); - } else { - resolve(); - } - }); - }); - } - - public async getPid(): Promise { - return this.instance.pid; - } - - public async dispose(): Promise { - this.instance.kill(); - setTimeout(() => this.instance.kill("SIGKILL"), 5000); // Double tap. - await super.dispose(); - } -} - -export interface ChildProcessProxies { - childProcess: ChildProcessProxy; - stdin?: WritableProxy | null; - stdout?: ReadableProxy | null; - stderr?: ReadableProxy | null; -} - -export class ChildProcessModuleProxy { - public constructor(private readonly forkProvider?: ForkProvider) {} - - public async exec( - command: string, - options?: { encoding?: string | null } & cp.ExecOptions | null, - callback?: ((error: cp.ExecException | null, stdin: string | Buffer, stdout: string | Buffer) => void), - ): Promise { - return this.returnProxies(cp.exec(command, options && withEnv(options), callback)); - } - - public async fork(modulePath: string, args?: string[], options?: cp.ForkOptions): Promise { - return this.returnProxies((this.forkProvider || cp.fork)(modulePath, args, withEnv(options))); - } - - public async spawn(command: string, args?: string[], options?: cp.SpawnOptions): Promise { - return this.returnProxies(cp.spawn(command, args, withEnv(options))); - } - - private returnProxies(process: cp.ChildProcess): ChildProcessProxies { - return { - childProcess: new ChildProcessProxy(process), - stdin: process.stdin && new WritableProxy(process.stdin), - // Child processes streams appear to immediately flow so we need to bind - // to the data event right away. - stdout: process.stdout && new ReadableProxy(process.stdout, ["data"]), - stderr: process.stderr && new ReadableProxy(process.stderr, ["data"]), - }; - } -} diff --git a/packages/protocol/src/node/modules/fs.ts b/packages/protocol/src/node/modules/fs.ts deleted file mode 100644 index f93452be..00000000 --- a/packages/protocol/src/node/modules/fs.ts +++ /dev/null @@ -1,272 +0,0 @@ -import * as fs from "fs"; -import { promisify } from "util"; -import { ServerProxy } from "../../common/proxy"; -import { IEncodingOptions } from "../../common/util"; -import { ReadableProxy, WritableProxy } from "./stream"; - -// tslint:disable completed-docs no-any - -/** - * A serializable version of fs.Stats. - */ -export interface Stats { - dev: number; - ino: number; - mode: number; - nlink: number; - uid: number; - gid: number; - rdev: number; - size: number; - blksize: number; - blocks: number; - atimeMs: number; - mtimeMs: number; - ctimeMs: number; - birthtimeMs: number; - atime: Date; - mtime: Date; - ctime: Date; - birthtime: Date; - _isFile: boolean; - _isDirectory: boolean; - _isBlockDevice: boolean; - _isCharacterDevice: boolean; - _isSymbolicLink: boolean; - _isFIFO: boolean; - _isSocket: boolean; -} - -export class ReadStreamProxy extends ReadableProxy { - public constructor(stream: fs.ReadStream) { - super(stream, ["open"]); - } - - public async close(): Promise { - this.instance.close(); - } - - public async dispose(): Promise { - this.instance.close(); - await super.dispose(); - } -} - -export class WriteStreamProxy extends WritableProxy { - public constructor(stream: fs.WriteStream) { - super(stream, ["open"]); - } - - public async close(): Promise { - this.instance.close(); - } - - public async dispose(): Promise { - this.instance.close(); - await super.dispose(); - } -} - -export class WatcherProxy extends ServerProxy { - public constructor(watcher: fs.FSWatcher) { - super({ - bindEvents: ["change", "close", "error"], - doneEvents: ["close", "error"], - instance: watcher, - }); - } - - public async close(): Promise { - this.instance.close(); - } - - public async dispose(): Promise { - this.instance.close(); - await super.dispose(); - } -} - -export class FsModuleProxy { - public access(path: fs.PathLike, mode?: number): Promise { - return promisify(fs.access)(path, mode); - } - - public appendFile(file: fs.PathLike | number, data: any, options?: fs.WriteFileOptions): Promise { - return promisify(fs.appendFile)(file, data, options); - } - - public chmod(path: fs.PathLike, mode: string | number): Promise { - return promisify(fs.chmod)(path, mode); - } - - public chown(path: fs.PathLike, uid: number, gid: number): Promise { - return promisify(fs.chown)(path, uid, gid); - } - - public close(fd: number): Promise { - return promisify(fs.close)(fd); - } - - public copyFile(src: fs.PathLike, dest: fs.PathLike, flags?: number): Promise { - return promisify(fs.copyFile)(src, dest, flags); - } - - public async createReadStream(path: fs.PathLike, options?: any): Promise { - return new ReadStreamProxy(fs.createReadStream(path, options)); - } - - public async createWriteStream(path: fs.PathLike, options?: any): Promise { - return new WriteStreamProxy(fs.createWriteStream(path, options)); - } - - public exists(path: fs.PathLike): Promise { - return promisify(fs.exists)(path); // tslint:disable-line deprecation - } - - public fchmod(fd: number, mode: string | number): Promise { - return promisify(fs.fchmod)(fd, mode); - } - - public fchown(fd: number, uid: number, gid: number): Promise { - return promisify(fs.fchown)(fd, uid, gid); - } - - public fdatasync(fd: number): Promise { - return promisify(fs.fdatasync)(fd); - } - - public async fstat(fd: number): Promise { - return this.makeStatsSerializable(await promisify(fs.fstat)(fd)); - } - - public fsync(fd: number): Promise { - return promisify(fs.fsync)(fd); - } - - public ftruncate(fd: number, len?: number | null): Promise { - return promisify(fs.ftruncate)(fd, len); - } - - public futimes(fd: number, atime: string | number | Date, mtime: string | number | Date): Promise { - return promisify(fs.futimes)(fd, atime, mtime); - } - - public lchmod(path: fs.PathLike, mode: string | number): Promise { - return promisify(fs.lchmod)(path, mode); - } - - public lchown(path: fs.PathLike, uid: number, gid: number): Promise { - return promisify(fs.lchown)(path, uid, gid); - } - - public link(existingPath: fs.PathLike, newPath: fs.PathLike): Promise { - return promisify(fs.link)(existingPath, newPath); - } - - public async lstat(path: fs.PathLike): Promise { - return this.makeStatsSerializable(await promisify(fs.lstat)(path)); - } - - public async lstatBatch(args: { path: fs.PathLike }[]): Promise<(Stats | Error)[]> { - return Promise.all(args.map((a) => this.lstat(a.path).catch((e) => e))); - } - - public mkdir(path: fs.PathLike, mode: number | string | fs.MakeDirectoryOptions | undefined | null): Promise { - return promisify(fs.mkdir)(path, mode); - } - - public mkdtemp(prefix: string, options: IEncodingOptions): Promise { - return promisify(fs.mkdtemp)(prefix, options); - } - - public open(path: fs.PathLike, flags: string | number, mode: string | number | undefined | null): Promise { - return promisify(fs.open)(path, flags, mode); - } - - public read(fd: number, length: number, position: number | null): Promise<{ bytesRead: number, buffer: Buffer }> { - const buffer = Buffer.alloc(length); - - return promisify(fs.read)(fd, buffer, 0, length, position); - } - - public readFile(path: fs.PathLike | number, options: IEncodingOptions): Promise { - return promisify(fs.readFile)(path, options); - } - - public readdir(path: fs.PathLike, options: IEncodingOptions): Promise { - return promisify(fs.readdir)(path, options); - } - - public readdirBatch(args: { path: fs.PathLike, options: IEncodingOptions }[]): Promise<(Buffer[] | fs.Dirent[] | string[] | Error)[]> { - return Promise.all(args.map((a) => this.readdir(a.path, a.options).catch((e) => e))); - } - - public readlink(path: fs.PathLike, options: IEncodingOptions): Promise { - return promisify(fs.readlink)(path, options); - } - - public realpath(path: fs.PathLike, options: IEncodingOptions): Promise { - return promisify(fs.realpath)(path, options); - } - - public rename(oldPath: fs.PathLike, newPath: fs.PathLike): Promise { - return promisify(fs.rename)(oldPath, newPath); - } - - public rmdir(path: fs.PathLike): Promise { - return promisify(fs.rmdir)(path); - } - - public async stat(path: fs.PathLike): Promise { - return this.makeStatsSerializable(await promisify(fs.stat)(path)); - } - - public async statBatch(args: { path: fs.PathLike }[]): Promise<(Stats | Error)[]> { - return Promise.all(args.map((a) => this.stat(a.path).catch((e) => e))); - } - - public symlink(target: fs.PathLike, path: fs.PathLike, type?: fs.symlink.Type | null): Promise { - return promisify(fs.symlink)(target, path, type); - } - - public truncate(path: fs.PathLike, len?: number | null): Promise { - return promisify(fs.truncate)(path, len); - } - - public unlink(path: fs.PathLike): Promise { - return promisify(fs.unlink)(path); - } - - public utimes(path: fs.PathLike, atime: string | number | Date, mtime: string | number | Date): Promise { - return promisify(fs.utimes)(path, atime, mtime); - } - - public async write(fd: number, buffer: Buffer, offset?: number, length?: number, position?: number): Promise<{ bytesWritten: number, buffer: Buffer }> { - return promisify(fs.write)(fd, buffer, offset, length, position); - } - - public writeFile (path: fs.PathLike | number, data: any, options: IEncodingOptions): Promise { - return promisify(fs.writeFile)(path, data, options); - } - - public async watch(filename: fs.PathLike, options?: IEncodingOptions): Promise { - return new WatcherProxy(fs.watch(filename, options)); - } - - private makeStatsSerializable(stats: fs.Stats): Stats { - return { - ...stats, - /** - * We need to check if functions exist because nexe's implemented FS - * lib doesnt implement fs.stats properly. - */ - _isBlockDevice: stats.isBlockDevice ? stats.isBlockDevice() : false, - _isCharacterDevice: stats.isCharacterDevice ? stats.isCharacterDevice() : false, - _isDirectory: stats.isDirectory(), - _isFIFO: stats.isFIFO ? stats.isFIFO() : false, - _isFile: stats.isFile(), - _isSocket: stats.isSocket ? stats.isSocket() : false, - _isSymbolicLink: stats.isSymbolicLink ? stats.isSymbolicLink() : false, - }; - } -} diff --git a/packages/protocol/src/node/modules/index.ts b/packages/protocol/src/node/modules/index.ts deleted file mode 100644 index 590d037d..00000000 --- a/packages/protocol/src/node/modules/index.ts +++ /dev/null @@ -1,6 +0,0 @@ -export * from "./child_process"; -export * from "./fs"; -export * from "./net"; -export * from "./node-pty"; -export * from "./spdlog"; -export * from "./trash"; diff --git a/packages/protocol/src/node/modules/net.ts b/packages/protocol/src/node/modules/net.ts deleted file mode 100644 index 28ffa52e..00000000 --- a/packages/protocol/src/node/modules/net.ts +++ /dev/null @@ -1,79 +0,0 @@ -import * as net from "net"; -import { ServerProxy } from "../../common/proxy"; -import { DuplexProxy } from "./stream"; - -// tslint:disable completed-docs no-any - -export class NetSocketProxy extends DuplexProxy { - public constructor(socket: net.Socket) { - super(socket, ["connect", "lookup", "timeout"]); - } - - public async connect(options: number | string | net.SocketConnectOpts, host?: string): Promise { - this.instance.connect(options as any, host as any); - } - - public async unref(): Promise { - this.instance.unref(); - } - - public async ref(): Promise { - this.instance.ref(); - } - - public async dispose(): Promise { - this.instance.end(); - this.instance.destroy(); - this.instance.unref(); - await super.dispose(); - } -} - -export class NetServerProxy extends ServerProxy { - public constructor(instance: net.Server) { - super({ - bindEvents: ["close", "error", "listening"], - doneEvents: ["close"], - instance, - }); - } - - public async listen(handle?: net.ListenOptions | number | string, hostname?: string | number, backlog?: number): Promise { - this.instance.listen(handle, hostname as any, backlog as any); - } - - public async ref(): Promise { - this.instance.ref(); - } - - public async unref(): Promise { - this.instance.unref(); - } - - public async close(): Promise { - this.instance.close(); - } - - public async onConnection(cb: (proxy: NetSocketProxy) => void): Promise { - this.instance.on("connection", (socket) => cb(new NetSocketProxy(socket))); - } - - public async dispose(): Promise { - this.instance.close(); - this.instance.removeAllListeners(); - } -} - -export class NetModuleProxy { - public async createSocket(options?: net.SocketConstructorOpts): Promise { - return new NetSocketProxy(new net.Socket(options)); - } - - public async createConnection(target: string | number | net.NetConnectOpts, host?: string): Promise { - return new NetSocketProxy(net.createConnection(target as any, host)); - } - - public async createServer(options?: { allowHalfOpen?: boolean, pauseOnConnect?: boolean }): Promise { - return new NetServerProxy(net.createServer(options)); - } -} diff --git a/packages/protocol/src/node/modules/node-pty.ts b/packages/protocol/src/node/modules/node-pty.ts deleted file mode 100644 index c6786d41..00000000 --- a/packages/protocol/src/node/modules/node-pty.ts +++ /dev/null @@ -1,71 +0,0 @@ -/// -import { EventEmitter } from "events"; -import * as pty from "node-pty"; -import { ServerProxy } from "../../common/proxy"; -import { withEnv } from "../../common/util"; - -// tslint:disable completed-docs - -/** - * Server-side IPty proxy. - */ -export class NodePtyProcessProxy extends ServerProxy { - public constructor(private readonly process: pty.IPty) { - super({ - bindEvents: ["process", "data", "exit"], - doneEvents: ["exit"], - instance: new EventEmitter(), - }); - - this.process.on("data", (data) => this.instance.emit("data", data)); - this.process.on("exit", (exitCode, signal) => this.instance.emit("exit", exitCode, signal)); - - let name = process.process; - setTimeout(() => { // Need to wait for the caller to listen to the event. - this.instance.emit("process", name); - }, 1); - const timer = setInterval(() => { - if (process.process !== name) { - name = process.process; - this.instance.emit("process", name); - } - }, 200); - - this.process.on("exit", () => clearInterval(timer)); - } - - public async getPid(): Promise { - return this.process.pid; - } - - public async getProcess(): Promise { - return this.process.process; - } - - public async kill(signal?: string): Promise { - this.process.kill(signal); - } - - public async resize(columns: number, rows: number): Promise { - this.process.resize(columns, rows); - } - - public async write(data: string): Promise { - this.process.write(data); - } - - public async dispose(): Promise { - this.process.kill(); - setTimeout(() => this.process.kill("SIGKILL"), 5000); // Double tap. - await super.dispose(); - } -} - -/** - * Server-side node-pty proxy. - */ -export class NodePtyModuleProxy { - public async spawn(file: string, args: string[] | string, options: pty.IPtyForkOptions): Promise { - return new NodePtyProcessProxy(require("node-pty").spawn(file, args, withEnv(options))); - } -} diff --git a/packages/protocol/src/node/modules/spdlog.ts b/packages/protocol/src/node/modules/spdlog.ts deleted file mode 100644 index 9023f0ae..00000000 --- a/packages/protocol/src/node/modules/spdlog.ts +++ /dev/null @@ -1,43 +0,0 @@ -/// -import { EventEmitter } from "events"; -import * as spdlog from "spdlog"; -import { ServerProxy } from "../../common/proxy"; - -// tslint:disable completed-docs - -export class RotatingLoggerProxy extends ServerProxy { - public constructor(private readonly logger: spdlog.RotatingLogger) { - super({ - bindEvents: [], - doneEvents: ["dispose"], - instance: new EventEmitter(), - }); - } - - public async trace (message: string): Promise { this.logger.trace(message); } - public async debug (message: string): Promise { this.logger.debug(message); } - public async info (message: string): Promise { this.logger.info(message); } - public async warn (message: string): Promise { this.logger.warn(message); } - public async error (message: string): Promise { this.logger.error(message); } - public async critical (message: string): Promise { this.logger.critical(message); } - public async setLevel (level: number): Promise { this.logger.setLevel(level); } - public async clearFormatters (): Promise { this.logger.clearFormatters(); } - public async flush (): Promise { this.logger.flush(); } - public async drop (): Promise { this.logger.drop(); } - - public async dispose(): Promise { - await this.flush(); - this.instance.emit("dispose"); - await super.dispose(); - } -} - -export class SpdlogModuleProxy { - public async createLogger(name: string, filePath: string, fileSize: number, fileCount: number): Promise { - return new RotatingLoggerProxy(new (require("spdlog") as typeof import("spdlog")).RotatingLogger(name, filePath, fileSize, fileCount)); - } - - public async setAsyncMode(bufferSize: number, flushInterval: number): Promise { - require("spdlog").setAsyncMode(bufferSize, flushInterval); - } -} diff --git a/packages/protocol/src/node/modules/stream.ts b/packages/protocol/src/node/modules/stream.ts deleted file mode 100644 index e64ec38d..00000000 --- a/packages/protocol/src/node/modules/stream.ts +++ /dev/null @@ -1,109 +0,0 @@ -import { EventEmitter } from "events"; -import * as stream from "stream"; -import { ServerProxy } from "../../common/proxy"; - -// tslint:disable completed-docs no-any - -export class WritableProxy extends ServerProxy { - public constructor(instance: T, bindEvents: string[] = [], delayedEvents?: string[]) { - super({ - bindEvents: ["close", "drain", "error", "finish"].concat(bindEvents), - doneEvents: ["close"], - delayedEvents, - instance, - }); - } - - public async destroy(): Promise { - this.instance.destroy(); - } - - public async end(data?: any, encoding?: string): Promise { - return new Promise((resolve): void => { - this.instance.end(data, encoding, () => { - resolve(); - }); - }); - } - - public async setDefaultEncoding(encoding: string): Promise { - this.instance.setDefaultEncoding(encoding); - } - - public async write(data: any, encoding?: string): Promise { - return new Promise((resolve, reject): void => { - this.instance.write(data, encoding, (error) => { - if (error) { - reject(error); - } else { - resolve(); - } - }); - }); - } - - public async dispose(): Promise { - this.instance.end(); - await super.dispose(); - } -} - -/** - * This noise is because we can't do multiple extends and we also can't seem to - * do `extends WritableProxy implement ReadableProxy` (for `DuplexProxy`). - */ -export interface IReadableProxy extends ServerProxy { - pipe

(destination: P, options?: { end?: boolean; }): Promise; - setEncoding(encoding: string): Promise; -} - -export class ReadableProxy extends ServerProxy implements IReadableProxy { - public constructor(instance: T, bindEvents: string[] = []) { - super({ - bindEvents: ["close", "end", "error"].concat(bindEvents), - doneEvents: ["close"], - delayedEvents: ["data"], - instance, - }); - } - - public async pipe

(destination: P, options?: { end?: boolean; }): Promise { - this.instance.pipe(destination.instance, options); - // `pipe` switches the stream to flowing mode and makes data start emitting. - await this.bindDelayedEvent("data"); - } - - public async destroy(): Promise { - this.instance.destroy(); - } - - public async setEncoding(encoding: string): Promise { - this.instance.setEncoding(encoding); - } - - public async dispose(): Promise { - this.instance.destroy(); - await super.dispose(); - } -} - -export class DuplexProxy extends WritableProxy implements IReadableProxy { - public constructor(stream: T, bindEvents: string[] = []) { - super(stream, ["end"].concat(bindEvents), ["data"]); - } - - public async pipe

(destination: P, options?: { end?: boolean; }): Promise { - this.instance.pipe(destination.instance, options); - // `pipe` switches the stream to flowing mode and makes data start emitting. - await this.bindDelayedEvent("data"); - } - - public async setEncoding(encoding: string): Promise { - this.instance.setEncoding(encoding); - } - - public async dispose(): Promise { - this.instance.destroy(); - await super.dispose(); - } -} diff --git a/packages/protocol/src/node/modules/trash.ts b/packages/protocol/src/node/modules/trash.ts deleted file mode 100644 index 53a585b1..00000000 --- a/packages/protocol/src/node/modules/trash.ts +++ /dev/null @@ -1,9 +0,0 @@ -import * as trash from "trash"; - -// tslint:disable completed-docs - -export class TrashModuleProxy { - public async trash(path: string, options?: trash.Options): Promise { - return trash(path, options); - } -} diff --git a/packages/protocol/src/node/server.ts b/packages/protocol/src/node/server.ts deleted file mode 100644 index 0ebaacb3..00000000 --- a/packages/protocol/src/node/server.ts +++ /dev/null @@ -1,369 +0,0 @@ -import { mkdirp } from "fs-extra"; -import * as os from "os"; -import { field, logger} from "@coder/logger"; -import { ReadWriteConnection } from "../common/connection"; -import { Module, ServerProxy } from "../common/proxy"; -import { isPromise, isProxy, moduleToProto, protoToArgument, platformToProto, protoToModule, argumentToProto } from "../common/util"; -import { Argument, Callback, ClientMessage, Event, Method, Pong, ServerMessage, WorkingInit } from "../proto"; -import { ChildProcessModuleProxy, ForkProvider, FsModuleProxy, NetModuleProxy, NodePtyModuleProxy, SpdlogModuleProxy, TrashModuleProxy } from "./modules"; - -// tslint:disable no-any - -export interface ServerOptions { - readonly workingDirectory: string; - readonly dataDirectory: string; - readonly cacheDirectory: string; - readonly builtInExtensionsDirectory: string; - readonly extensionsDirectory: string; - readonly extraExtensionDirectories?: string[]; - readonly extraBuiltinExtensionDirectories?: string[]; - readonly fork?: ForkProvider; -} - -interface ProxyData { - disposeTimeout?: number | NodeJS.Timer; - instance: any; -} - -/** - * Handle messages from the client. - */ -export class Server { - private proxyId = 0; - private readonly proxies = new Map(); - private disconnected: boolean = false; - private readonly responseTimeout = 10000; - - public constructor( - private readonly connection: ReadWriteConnection, - private readonly options?: ServerOptions, - ) { - connection.onMessage(async (data) => { - try { - await this.handleMessage(ClientMessage.deserializeBinary(data)); - } catch (ex) { - logger.error( - "Failed to handle client message", - field("length", data.byteLength), - field("exception", { - message: ex.message, - stack: ex.stack, - }), - ); - } - }); - - connection.onClose(() => { - this.disconnected = true; - - logger.trace(() => [ - "disconnected from client", - field("proxies", this.proxies.size), - ]); - - this.proxies.forEach((proxy, proxyId) => { - if (isProxy(proxy.instance)) { - proxy.instance.dispose().catch((error) => { - logger.error(error.message); - }); - } - this.removeProxy(proxyId); - }); - }); - - this.storeProxy(new ChildProcessModuleProxy(this.options ? this.options.fork : undefined), Module.ChildProcess); - this.storeProxy(new FsModuleProxy(), Module.Fs); - this.storeProxy(new NetModuleProxy(), Module.Net); - this.storeProxy(new NodePtyModuleProxy(), Module.NodePty); - this.storeProxy(new SpdlogModuleProxy(), Module.Spdlog); - this.storeProxy(new TrashModuleProxy(), Module.Trash); - - if (!this.options) { - logger.warn("No server options provided. InitMessage will not be sent."); - - return; - } - - Promise.all([ - mkdirp(this.options.cacheDirectory), - mkdirp(this.options.dataDirectory), - mkdirp(this.options.workingDirectory), - ]).catch((error) => { - logger.error(error.message, field("error", error)); - }); - - const initMsg = new WorkingInit(); - initMsg.setDataDirectory(this.options.dataDirectory); - initMsg.setWorkingDirectory(this.options.workingDirectory); - initMsg.setBuiltinExtensionsDir(this.options.builtInExtensionsDirectory); - initMsg.setExtensionsDirectory(this.options.extensionsDirectory); - initMsg.setHomeDirectory(os.homedir()); - initMsg.setTmpDirectory(os.tmpdir()); - initMsg.setOperatingSystem(platformToProto(os.platform())); - initMsg.setShell(os.userInfo().shell || global.process.env.SHELL || ""); - initMsg.setExtraExtensionDirectoriesList(this.options.extraExtensionDirectories || []); - initMsg.setExtraBuiltinExtensionDirectoriesList(this.options.extraBuiltinExtensionDirectories || []); - - for (let key in process.env) { - initMsg.getEnvMap().set(key, process.env[key] as string); - } - - const srvMsg = new ServerMessage(); - srvMsg.setInit(initMsg); - connection.send(srvMsg.serializeBinary()); - } - - /** - * Handle all messages from the client. - */ - private async handleMessage(message: ClientMessage): Promise { - switch (message.getMsgCase()) { - case ClientMessage.MsgCase.METHOD: - await this.runMethod(message.getMethod()!); - break; - case ClientMessage.MsgCase.PING: - logger.trace("ping"); - const srvMsg = new ServerMessage(); - srvMsg.setPong(new Pong()); - this.connection.send(srvMsg.serializeBinary()); - break; - default: - throw new Error("unknown message type"); - } - } - - /** - * Run a method on a proxy. - */ - private async runMethod(message: Method): Promise { - const proxyMessage = message.getNamedProxy()! || message.getNumberedProxy()!; - const id = proxyMessage.getId(); - const proxyId = message.hasNamedProxy() - ? protoToModule(message.getNamedProxy()!.getModule()) - : message.getNumberedProxy()!.getProxyId(); - const method = proxyMessage.getMethod(); - const args = proxyMessage.getArgsList().map((a) => protoToArgument( - a, - (id, args) => this.sendCallback(proxyId, id, args), - (id) => this.getProxy(id).instance, - )); - - logger.trace(() => [ - "received", - field("id", id), - field("proxyId", proxyId), - field("method", method), - ]); - - let response: any; - try { - const proxy = this.getProxy(proxyId); - if (typeof proxy.instance[method] !== "function") { - throw new Error(`"${method}" is not a function on proxy ${proxyId}`); - } - - response = proxy.instance[method](...args); - - // We wait for the client to call "dispose" instead of doing it onDone to - // ensure all the messages it sent get processed before we get rid of it. - if (method === "dispose") { - this.removeProxy(proxyId); - } - - // Proxies must always return promises. - if (!isPromise(response)) { - throw new Error(`"${method}" must return a promise`); - } - } catch (error) { - logger.error( - error.message, - field("type", typeof response), - field("proxyId", proxyId), - ); - this.sendException(id, error); - } - - try { - this.sendResponse(id, await response); - } catch (error) { - this.sendException(id, error); - } - } - - /** - * Send a callback to the client. - */ - private sendCallback(proxyId: number | Module, callbackId: number, args: any[]): void { - logger.trace(() => [ - "sending callback", - field("proxyId", proxyId), - field("callbackId", callbackId), - ]); - - const message = new Callback(); - let callbackMessage: Callback.Named | Callback.Numbered; - if (typeof proxyId === "string") { - callbackMessage = new Callback.Named(); - callbackMessage.setModule(moduleToProto(proxyId)); - message.setNamedCallback(callbackMessage); - } else { - callbackMessage = new Callback.Numbered(); - callbackMessage.setProxyId(proxyId); - message.setNumberedCallback(callbackMessage); - } - callbackMessage.setCallbackId(callbackId); - callbackMessage.setArgsList(args.map((a) => this.argumentToProto(a))); - - const serverMessage = new ServerMessage(); - serverMessage.setCallback(message); - this.connection.send(serverMessage.serializeBinary()); - } - - /** - * Store a numbered proxy and bind events to send them back to the client. - */ - private storeProxy(instance: ServerProxy): number; - /** - * Store a unique proxy and bind events to send them back to the client. - */ - private storeProxy(instance: any, moduleProxyId: Module): Module; - /** - * Store a proxy and bind events to send them back to the client. - */ - private storeProxy(instance: ServerProxy | any, moduleProxyId?: Module): number | Module { - // In case we disposed while waiting for a function to return. - if (this.disconnected) { - if (isProxy(instance)) { - instance.dispose().catch((error) => { - logger.error(error.message); - }); - } - - throw new Error("disposed"); - } - - const proxyId = moduleProxyId || this.proxyId++; - logger.trace(() => [ - "storing proxy", - field("proxyId", proxyId), - ]); - - this.proxies.set(proxyId, { instance }); - - if (isProxy(instance)) { - instance.onEvent((event, ...args) => this.sendEvent(proxyId, event, ...args)); - instance.onDone(() => { - // It might have finished because we disposed it due to a disconnect. - if (!this.disconnected) { - this.sendEvent(proxyId, "done"); - this.getProxy(proxyId).disposeTimeout = setTimeout(() => { - instance.dispose().catch((error) => { - logger.error(error.message); - }); - this.removeProxy(proxyId); - }, this.responseTimeout); - } - }); - } - - return proxyId; - } - - /** - * Send an event to the client. - */ - private sendEvent(proxyId: number | Module, event: string, ...args: any[]): void { - logger.trace(() => [ - "sending event", - field("proxyId", proxyId), - field("event", event), - ]); - - const message = new Event(); - let eventMessage: Event.Named | Event.Numbered; - if (typeof proxyId === "string") { - eventMessage = new Event.Named(); - eventMessage.setModule(moduleToProto(proxyId)); - message.setNamedEvent(eventMessage); - } else { - eventMessage = new Event.Numbered(); - eventMessage.setProxyId(proxyId); - message.setNumberedEvent(eventMessage); - } - eventMessage.setEvent(event); - eventMessage.setArgsList(args.map((a) => this.argumentToProto(a))); - - const serverMessage = new ServerMessage(); - serverMessage.setEvent(message); - this.connection.send(serverMessage.serializeBinary()); - } - - /** - * Send a response back to the client. - */ - private sendResponse(id: number, response: any): void { - logger.trace(() => [ - "sending resolve", - field("id", id), - ]); - - const successMessage = new Method.Success(); - successMessage.setId(id); - successMessage.setResponse(this.argumentToProto(response)); - - const serverMessage = new ServerMessage(); - serverMessage.setSuccess(successMessage); - this.connection.send(serverMessage.serializeBinary()); - } - - /** - * Send an exception back to the client. - */ - private sendException(id: number, error: Error): void { - logger.trace(() => [ - "sending reject", - field("id", id) , - field("message", error.message), - ]); - - const failedMessage = new Method.Fail(); - failedMessage.setId(id); - failedMessage.setResponse(argumentToProto(error)); - - const serverMessage = new ServerMessage(); - serverMessage.setFail(failedMessage); - this.connection.send(serverMessage.serializeBinary()); - } - - /** - * Call after disposing a proxy. - */ - private removeProxy(proxyId: number | Module): void { - clearTimeout(this.getProxy(proxyId).disposeTimeout as any); - this.proxies.delete(proxyId); - - logger.trace(() => [ - "disposed and removed proxy", - field("proxyId", proxyId), - field("proxies", this.proxies.size), - ]); - } - - /** - * Same as argumentToProto but provides storeProxy. - */ - private argumentToProto(value: any): Argument { - return argumentToProto(value, undefined, (p) => this.storeProxy(p)); - } - - /** - * Get a proxy. Error if it doesn't exist. - */ - private getProxy(proxyId: number | Module): ProxyData { - if (!this.proxies.has(proxyId)) { - throw new Error(`proxy ${proxyId} disposed too early`); - } - - return this.proxies.get(proxyId)!; - } -} diff --git a/packages/protocol/src/proto/client.proto b/packages/protocol/src/proto/client.proto deleted file mode 100644 index 994d6ac3..00000000 --- a/packages/protocol/src/proto/client.proto +++ /dev/null @@ -1,49 +0,0 @@ -syntax = "proto3"; -import "node.proto"; -import "vscode.proto"; - -// Messages that the client can send to the server. -message ClientMessage { - oneof msg { - // node.proto - Method method = 20; - Ping ping = 21; - } -} - -// Messages that the server can send to the client. -message ServerMessage { - oneof msg { - // node.proto - Method.Fail fail = 13; - Method.Success success = 14; - Event event = 19; - Callback callback = 22; - Pong pong = 18; - - WorkingInit init = 16; - - // vscode.proto - SharedProcessActive shared_process_active = 17; - } -} - -message WorkingInit { - string home_directory = 1; - string tmp_directory = 2; - string data_directory = 3; - string working_directory = 4; - enum OperatingSystem { - Windows = 0; - Linux = 1; - Mac = 2; - } - OperatingSystem operating_system = 5; - string shell = 6; - string builtin_extensions_dir = 7; - string extensions_directory = 8; - repeated string extra_extension_directories = 9; - repeated string extra_builtin_extension_directories = 10; - - map env = 11; -} diff --git a/packages/protocol/src/proto/client_pb.d.ts b/packages/protocol/src/proto/client_pb.d.ts deleted file mode 100644 index 60bbdddf..00000000 --- a/packages/protocol/src/proto/client_pb.d.ts +++ /dev/null @@ -1,181 +0,0 @@ -// package: -// file: client.proto - -import * as jspb from "google-protobuf"; -import * as node_pb from "./node_pb"; -import * as vscode_pb from "./vscode_pb"; - -export class ClientMessage extends jspb.Message { - hasMethod(): boolean; - clearMethod(): void; - getMethod(): node_pb.Method | undefined; - setMethod(value?: node_pb.Method): void; - - hasPing(): boolean; - clearPing(): void; - getPing(): node_pb.Ping | undefined; - setPing(value?: node_pb.Ping): void; - - getMsgCase(): ClientMessage.MsgCase; - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ClientMessage.AsObject; - static toObject(includeInstance: boolean, msg: ClientMessage): ClientMessage.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ClientMessage, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ClientMessage; - static deserializeBinaryFromReader(message: ClientMessage, reader: jspb.BinaryReader): ClientMessage; -} - -export namespace ClientMessage { - export type AsObject = { - method?: node_pb.Method.AsObject, - ping?: node_pb.Ping.AsObject, - } - - export enum MsgCase { - MSG_NOT_SET = 0, - METHOD = 20, - PING = 21, - } -} - -export class ServerMessage extends jspb.Message { - hasFail(): boolean; - clearFail(): void; - getFail(): node_pb.Method.Fail | undefined; - setFail(value?: node_pb.Method.Fail): void; - - hasSuccess(): boolean; - clearSuccess(): void; - getSuccess(): node_pb.Method.Success | undefined; - setSuccess(value?: node_pb.Method.Success): void; - - hasEvent(): boolean; - clearEvent(): void; - getEvent(): node_pb.Event | undefined; - setEvent(value?: node_pb.Event): void; - - hasCallback(): boolean; - clearCallback(): void; - getCallback(): node_pb.Callback | undefined; - setCallback(value?: node_pb.Callback): void; - - hasPong(): boolean; - clearPong(): void; - getPong(): node_pb.Pong | undefined; - setPong(value?: node_pb.Pong): void; - - hasInit(): boolean; - clearInit(): void; - getInit(): WorkingInit | undefined; - setInit(value?: WorkingInit): void; - - hasSharedProcessActive(): boolean; - clearSharedProcessActive(): void; - getSharedProcessActive(): vscode_pb.SharedProcessActive | undefined; - setSharedProcessActive(value?: vscode_pb.SharedProcessActive): void; - - getMsgCase(): ServerMessage.MsgCase; - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ServerMessage.AsObject; - static toObject(includeInstance: boolean, msg: ServerMessage): ServerMessage.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ServerMessage, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ServerMessage; - static deserializeBinaryFromReader(message: ServerMessage, reader: jspb.BinaryReader): ServerMessage; -} - -export namespace ServerMessage { - export type AsObject = { - fail?: node_pb.Method.Fail.AsObject, - success?: node_pb.Method.Success.AsObject, - event?: node_pb.Event.AsObject, - callback?: node_pb.Callback.AsObject, - pong?: node_pb.Pong.AsObject, - init?: WorkingInit.AsObject, - sharedProcessActive?: vscode_pb.SharedProcessActive.AsObject, - } - - export enum MsgCase { - MSG_NOT_SET = 0, - FAIL = 13, - SUCCESS = 14, - EVENT = 19, - CALLBACK = 22, - PONG = 18, - INIT = 16, - SHARED_PROCESS_ACTIVE = 17, - } -} - -export class WorkingInit extends jspb.Message { - getHomeDirectory(): string; - setHomeDirectory(value: string): void; - - getTmpDirectory(): string; - setTmpDirectory(value: string): void; - - getDataDirectory(): string; - setDataDirectory(value: string): void; - - getWorkingDirectory(): string; - setWorkingDirectory(value: string): void; - - getOperatingSystem(): WorkingInit.OperatingSystem; - setOperatingSystem(value: WorkingInit.OperatingSystem): void; - - getShell(): string; - setShell(value: string): void; - - getBuiltinExtensionsDir(): string; - setBuiltinExtensionsDir(value: string): void; - - getExtensionsDirectory(): string; - setExtensionsDirectory(value: string): void; - - clearExtraExtensionDirectoriesList(): void; - getExtraExtensionDirectoriesList(): Array; - setExtraExtensionDirectoriesList(value: Array): void; - addExtraExtensionDirectories(value: string, index?: number): string; - - clearExtraBuiltinExtensionDirectoriesList(): void; - getExtraBuiltinExtensionDirectoriesList(): Array; - setExtraBuiltinExtensionDirectoriesList(value: Array): void; - addExtraBuiltinExtensionDirectories(value: string, index?: number): string; - - getEnvMap(): jspb.Map; - clearEnvMap(): void; - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): WorkingInit.AsObject; - static toObject(includeInstance: boolean, msg: WorkingInit): WorkingInit.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: WorkingInit, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): WorkingInit; - static deserializeBinaryFromReader(message: WorkingInit, reader: jspb.BinaryReader): WorkingInit; -} - -export namespace WorkingInit { - export type AsObject = { - homeDirectory: string, - tmpDirectory: string, - dataDirectory: string, - workingDirectory: string, - operatingSystem: WorkingInit.OperatingSystem, - shell: string, - builtinExtensionsDir: string, - extensionsDirectory: string, - extraExtensionDirectoriesList: Array, - extraBuiltinExtensionDirectoriesList: Array, - envMap: Array<[string, string]>, - } - - export enum OperatingSystem { - WINDOWS = 0, - LINUX = 1, - MAC = 2, - } -} - diff --git a/packages/protocol/src/proto/client_pb.js b/packages/protocol/src/proto/client_pb.js deleted file mode 100644 index 3a1673e3..00000000 --- a/packages/protocol/src/proto/client_pb.js +++ /dev/null @@ -1,1211 +0,0 @@ -/** - * @fileoverview - * @enhanceable - * @suppress {messageConventions} JS Compiler reports an error if a variable or - * field starts with 'MSG_' and isn't a translatable message. - * @public - */ -// GENERATED CODE -- DO NOT EDIT! - -var jspb = require('google-protobuf'); -var goog = jspb; -var global = Function('return this')(); - -var node_pb = require('./node_pb.js'); -goog.object.extend(proto, node_pb); -var vscode_pb = require('./vscode_pb.js'); -goog.object.extend(proto, vscode_pb); -goog.exportSymbol('proto.ClientMessage', null, global); -goog.exportSymbol('proto.ServerMessage', null, global); -goog.exportSymbol('proto.WorkingInit', null, global); -goog.exportSymbol('proto.WorkingInit.OperatingSystem', null, global); -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.ClientMessage = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, proto.ClientMessage.oneofGroups_); -}; -goog.inherits(proto.ClientMessage, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.ClientMessage.displayName = 'proto.ClientMessage'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.ServerMessage = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, proto.ServerMessage.oneofGroups_); -}; -goog.inherits(proto.ServerMessage, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.ServerMessage.displayName = 'proto.ServerMessage'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.WorkingInit = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.WorkingInit.repeatedFields_, null); -}; -goog.inherits(proto.WorkingInit, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.WorkingInit.displayName = 'proto.WorkingInit'; -} - -/** - * Oneof group definitions for this message. Each group defines the field - * numbers belonging to that group. When of these fields' value is set, all - * other fields in the group are cleared. During deserialization, if multiple - * fields are encountered for a group, only the last value seen will be kept. - * @private {!Array>} - * @const - */ -proto.ClientMessage.oneofGroups_ = [[20,21]]; - -/** - * @enum {number} - */ -proto.ClientMessage.MsgCase = { - MSG_NOT_SET: 0, - METHOD: 20, - PING: 21 -}; - -/** - * @return {proto.ClientMessage.MsgCase} - */ -proto.ClientMessage.prototype.getMsgCase = function() { - return /** @type {proto.ClientMessage.MsgCase} */(jspb.Message.computeOneofCase(this, proto.ClientMessage.oneofGroups_[0])); -}; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto suitable for use in Soy templates. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration - * @return {!Object} - */ -proto.ClientMessage.prototype.toObject = function(opt_includeInstance) { - return proto.ClientMessage.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.ClientMessage} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.ClientMessage.toObject = function(includeInstance, msg) { - var f, obj = { - method: (f = msg.getMethod()) && node_pb.Method.toObject(includeInstance, f), - ping: (f = msg.getPing()) && node_pb.Ping.toObject(includeInstance, f) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.ClientMessage} - */ -proto.ClientMessage.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.ClientMessage; - return proto.ClientMessage.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.ClientMessage} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.ClientMessage} - */ -proto.ClientMessage.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 20: - var value = new node_pb.Method; - reader.readMessage(value,node_pb.Method.deserializeBinaryFromReader); - msg.setMethod(value); - break; - case 21: - var value = new node_pb.Ping; - reader.readMessage(value,node_pb.Ping.deserializeBinaryFromReader); - msg.setPing(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.ClientMessage.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.ClientMessage.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.ClientMessage} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.ClientMessage.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getMethod(); - if (f != null) { - writer.writeMessage( - 20, - f, - node_pb.Method.serializeBinaryToWriter - ); - } - f = message.getPing(); - if (f != null) { - writer.writeMessage( - 21, - f, - node_pb.Ping.serializeBinaryToWriter - ); - } -}; - - -/** - * optional Method method = 20; - * @return {?proto.Method} - */ -proto.ClientMessage.prototype.getMethod = function() { - return /** @type{?proto.Method} */ ( - jspb.Message.getWrapperField(this, node_pb.Method, 20)); -}; - - -/** @param {?proto.Method|undefined} value */ -proto.ClientMessage.prototype.setMethod = function(value) { - jspb.Message.setOneofWrapperField(this, 20, proto.ClientMessage.oneofGroups_[0], value); -}; - - -/** - * Clears the message field making it undefined. - */ -proto.ClientMessage.prototype.clearMethod = function() { - this.setMethod(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.ClientMessage.prototype.hasMethod = function() { - return jspb.Message.getField(this, 20) != null; -}; - - -/** - * optional Ping ping = 21; - * @return {?proto.Ping} - */ -proto.ClientMessage.prototype.getPing = function() { - return /** @type{?proto.Ping} */ ( - jspb.Message.getWrapperField(this, node_pb.Ping, 21)); -}; - - -/** @param {?proto.Ping|undefined} value */ -proto.ClientMessage.prototype.setPing = function(value) { - jspb.Message.setOneofWrapperField(this, 21, proto.ClientMessage.oneofGroups_[0], value); -}; - - -/** - * Clears the message field making it undefined. - */ -proto.ClientMessage.prototype.clearPing = function() { - this.setPing(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.ClientMessage.prototype.hasPing = function() { - return jspb.Message.getField(this, 21) != null; -}; - - - -/** - * Oneof group definitions for this message. Each group defines the field - * numbers belonging to that group. When of these fields' value is set, all - * other fields in the group are cleared. During deserialization, if multiple - * fields are encountered for a group, only the last value seen will be kept. - * @private {!Array>} - * @const - */ -proto.ServerMessage.oneofGroups_ = [[13,14,19,22,18,16,17]]; - -/** - * @enum {number} - */ -proto.ServerMessage.MsgCase = { - MSG_NOT_SET: 0, - FAIL: 13, - SUCCESS: 14, - EVENT: 19, - CALLBACK: 22, - PONG: 18, - INIT: 16, - SHARED_PROCESS_ACTIVE: 17 -}; - -/** - * @return {proto.ServerMessage.MsgCase} - */ -proto.ServerMessage.prototype.getMsgCase = function() { - return /** @type {proto.ServerMessage.MsgCase} */(jspb.Message.computeOneofCase(this, proto.ServerMessage.oneofGroups_[0])); -}; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto suitable for use in Soy templates. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration - * @return {!Object} - */ -proto.ServerMessage.prototype.toObject = function(opt_includeInstance) { - return proto.ServerMessage.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.ServerMessage} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.ServerMessage.toObject = function(includeInstance, msg) { - var f, obj = { - fail: (f = msg.getFail()) && node_pb.Method.Fail.toObject(includeInstance, f), - success: (f = msg.getSuccess()) && node_pb.Method.Success.toObject(includeInstance, f), - event: (f = msg.getEvent()) && node_pb.Event.toObject(includeInstance, f), - callback: (f = msg.getCallback()) && node_pb.Callback.toObject(includeInstance, f), - pong: (f = msg.getPong()) && node_pb.Pong.toObject(includeInstance, f), - init: (f = msg.getInit()) && proto.WorkingInit.toObject(includeInstance, f), - sharedProcessActive: (f = msg.getSharedProcessActive()) && vscode_pb.SharedProcessActive.toObject(includeInstance, f) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.ServerMessage} - */ -proto.ServerMessage.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.ServerMessage; - return proto.ServerMessage.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.ServerMessage} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.ServerMessage} - */ -proto.ServerMessage.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 13: - var value = new node_pb.Method.Fail; - reader.readMessage(value,node_pb.Method.Fail.deserializeBinaryFromReader); - msg.setFail(value); - break; - case 14: - var value = new node_pb.Method.Success; - reader.readMessage(value,node_pb.Method.Success.deserializeBinaryFromReader); - msg.setSuccess(value); - break; - case 19: - var value = new node_pb.Event; - reader.readMessage(value,node_pb.Event.deserializeBinaryFromReader); - msg.setEvent(value); - break; - case 22: - var value = new node_pb.Callback; - reader.readMessage(value,node_pb.Callback.deserializeBinaryFromReader); - msg.setCallback(value); - break; - case 18: - var value = new node_pb.Pong; - reader.readMessage(value,node_pb.Pong.deserializeBinaryFromReader); - msg.setPong(value); - break; - case 16: - var value = new proto.WorkingInit; - reader.readMessage(value,proto.WorkingInit.deserializeBinaryFromReader); - msg.setInit(value); - break; - case 17: - var value = new vscode_pb.SharedProcessActive; - reader.readMessage(value,vscode_pb.SharedProcessActive.deserializeBinaryFromReader); - msg.setSharedProcessActive(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.ServerMessage.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.ServerMessage.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.ServerMessage} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.ServerMessage.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getFail(); - if (f != null) { - writer.writeMessage( - 13, - f, - node_pb.Method.Fail.serializeBinaryToWriter - ); - } - f = message.getSuccess(); - if (f != null) { - writer.writeMessage( - 14, - f, - node_pb.Method.Success.serializeBinaryToWriter - ); - } - f = message.getEvent(); - if (f != null) { - writer.writeMessage( - 19, - f, - node_pb.Event.serializeBinaryToWriter - ); - } - f = message.getCallback(); - if (f != null) { - writer.writeMessage( - 22, - f, - node_pb.Callback.serializeBinaryToWriter - ); - } - f = message.getPong(); - if (f != null) { - writer.writeMessage( - 18, - f, - node_pb.Pong.serializeBinaryToWriter - ); - } - f = message.getInit(); - if (f != null) { - writer.writeMessage( - 16, - f, - proto.WorkingInit.serializeBinaryToWriter - ); - } - f = message.getSharedProcessActive(); - if (f != null) { - writer.writeMessage( - 17, - f, - vscode_pb.SharedProcessActive.serializeBinaryToWriter - ); - } -}; - - -/** - * optional Method.Fail fail = 13; - * @return {?proto.Method.Fail} - */ -proto.ServerMessage.prototype.getFail = function() { - return /** @type{?proto.Method.Fail} */ ( - jspb.Message.getWrapperField(this, node_pb.Method.Fail, 13)); -}; - - -/** @param {?proto.Method.Fail|undefined} value */ -proto.ServerMessage.prototype.setFail = function(value) { - jspb.Message.setOneofWrapperField(this, 13, proto.ServerMessage.oneofGroups_[0], value); -}; - - -/** - * Clears the message field making it undefined. - */ -proto.ServerMessage.prototype.clearFail = function() { - this.setFail(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.ServerMessage.prototype.hasFail = function() { - return jspb.Message.getField(this, 13) != null; -}; - - -/** - * optional Method.Success success = 14; - * @return {?proto.Method.Success} - */ -proto.ServerMessage.prototype.getSuccess = function() { - return /** @type{?proto.Method.Success} */ ( - jspb.Message.getWrapperField(this, node_pb.Method.Success, 14)); -}; - - -/** @param {?proto.Method.Success|undefined} value */ -proto.ServerMessage.prototype.setSuccess = function(value) { - jspb.Message.setOneofWrapperField(this, 14, proto.ServerMessage.oneofGroups_[0], value); -}; - - -/** - * Clears the message field making it undefined. - */ -proto.ServerMessage.prototype.clearSuccess = function() { - this.setSuccess(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.ServerMessage.prototype.hasSuccess = function() { - return jspb.Message.getField(this, 14) != null; -}; - - -/** - * optional Event event = 19; - * @return {?proto.Event} - */ -proto.ServerMessage.prototype.getEvent = function() { - return /** @type{?proto.Event} */ ( - jspb.Message.getWrapperField(this, node_pb.Event, 19)); -}; - - -/** @param {?proto.Event|undefined} value */ -proto.ServerMessage.prototype.setEvent = function(value) { - jspb.Message.setOneofWrapperField(this, 19, proto.ServerMessage.oneofGroups_[0], value); -}; - - -/** - * Clears the message field making it undefined. - */ -proto.ServerMessage.prototype.clearEvent = function() { - this.setEvent(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.ServerMessage.prototype.hasEvent = function() { - return jspb.Message.getField(this, 19) != null; -}; - - -/** - * optional Callback callback = 22; - * @return {?proto.Callback} - */ -proto.ServerMessage.prototype.getCallback = function() { - return /** @type{?proto.Callback} */ ( - jspb.Message.getWrapperField(this, node_pb.Callback, 22)); -}; - - -/** @param {?proto.Callback|undefined} value */ -proto.ServerMessage.prototype.setCallback = function(value) { - jspb.Message.setOneofWrapperField(this, 22, proto.ServerMessage.oneofGroups_[0], value); -}; - - -/** - * Clears the message field making it undefined. - */ -proto.ServerMessage.prototype.clearCallback = function() { - this.setCallback(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.ServerMessage.prototype.hasCallback = function() { - return jspb.Message.getField(this, 22) != null; -}; - - -/** - * optional Pong pong = 18; - * @return {?proto.Pong} - */ -proto.ServerMessage.prototype.getPong = function() { - return /** @type{?proto.Pong} */ ( - jspb.Message.getWrapperField(this, node_pb.Pong, 18)); -}; - - -/** @param {?proto.Pong|undefined} value */ -proto.ServerMessage.prototype.setPong = function(value) { - jspb.Message.setOneofWrapperField(this, 18, proto.ServerMessage.oneofGroups_[0], value); -}; - - -/** - * Clears the message field making it undefined. - */ -proto.ServerMessage.prototype.clearPong = function() { - this.setPong(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.ServerMessage.prototype.hasPong = function() { - return jspb.Message.getField(this, 18) != null; -}; - - -/** - * optional WorkingInit init = 16; - * @return {?proto.WorkingInit} - */ -proto.ServerMessage.prototype.getInit = function() { - return /** @type{?proto.WorkingInit} */ ( - jspb.Message.getWrapperField(this, proto.WorkingInit, 16)); -}; - - -/** @param {?proto.WorkingInit|undefined} value */ -proto.ServerMessage.prototype.setInit = function(value) { - jspb.Message.setOneofWrapperField(this, 16, proto.ServerMessage.oneofGroups_[0], value); -}; - - -/** - * Clears the message field making it undefined. - */ -proto.ServerMessage.prototype.clearInit = function() { - this.setInit(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.ServerMessage.prototype.hasInit = function() { - return jspb.Message.getField(this, 16) != null; -}; - - -/** - * optional SharedProcessActive shared_process_active = 17; - * @return {?proto.SharedProcessActive} - */ -proto.ServerMessage.prototype.getSharedProcessActive = function() { - return /** @type{?proto.SharedProcessActive} */ ( - jspb.Message.getWrapperField(this, vscode_pb.SharedProcessActive, 17)); -}; - - -/** @param {?proto.SharedProcessActive|undefined} value */ -proto.ServerMessage.prototype.setSharedProcessActive = function(value) { - jspb.Message.setOneofWrapperField(this, 17, proto.ServerMessage.oneofGroups_[0], value); -}; - - -/** - * Clears the message field making it undefined. - */ -proto.ServerMessage.prototype.clearSharedProcessActive = function() { - this.setSharedProcessActive(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.ServerMessage.prototype.hasSharedProcessActive = function() { - return jspb.Message.getField(this, 17) != null; -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.WorkingInit.repeatedFields_ = [9,10]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto suitable for use in Soy templates. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration - * @return {!Object} - */ -proto.WorkingInit.prototype.toObject = function(opt_includeInstance) { - return proto.WorkingInit.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.WorkingInit} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.WorkingInit.toObject = function(includeInstance, msg) { - var f, obj = { - homeDirectory: jspb.Message.getFieldWithDefault(msg, 1, ""), - tmpDirectory: jspb.Message.getFieldWithDefault(msg, 2, ""), - dataDirectory: jspb.Message.getFieldWithDefault(msg, 3, ""), - workingDirectory: jspb.Message.getFieldWithDefault(msg, 4, ""), - operatingSystem: jspb.Message.getFieldWithDefault(msg, 5, 0), - shell: jspb.Message.getFieldWithDefault(msg, 6, ""), - builtinExtensionsDir: jspb.Message.getFieldWithDefault(msg, 7, ""), - extensionsDirectory: jspb.Message.getFieldWithDefault(msg, 8, ""), - extraExtensionDirectoriesList: jspb.Message.getRepeatedField(msg, 9), - extraBuiltinExtensionDirectoriesList: jspb.Message.getRepeatedField(msg, 10), - envMap: (f = msg.getEnvMap()) ? f.toObject(includeInstance, undefined) : [] - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.WorkingInit} - */ -proto.WorkingInit.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.WorkingInit; - return proto.WorkingInit.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.WorkingInit} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.WorkingInit} - */ -proto.WorkingInit.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setHomeDirectory(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setTmpDirectory(value); - break; - case 3: - var value = /** @type {string} */ (reader.readString()); - msg.setDataDirectory(value); - break; - case 4: - var value = /** @type {string} */ (reader.readString()); - msg.setWorkingDirectory(value); - break; - case 5: - var value = /** @type {!proto.WorkingInit.OperatingSystem} */ (reader.readEnum()); - msg.setOperatingSystem(value); - break; - case 6: - var value = /** @type {string} */ (reader.readString()); - msg.setShell(value); - break; - case 7: - var value = /** @type {string} */ (reader.readString()); - msg.setBuiltinExtensionsDir(value); - break; - case 8: - var value = /** @type {string} */ (reader.readString()); - msg.setExtensionsDirectory(value); - break; - case 9: - var value = /** @type {string} */ (reader.readString()); - msg.addExtraExtensionDirectories(value); - break; - case 10: - var value = /** @type {string} */ (reader.readString()); - msg.addExtraBuiltinExtensionDirectories(value); - break; - case 11: - var value = msg.getEnvMap(); - reader.readMessage(value, function(message, reader) { - jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readString, null, ""); - }); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.WorkingInit.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.WorkingInit.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.WorkingInit} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.WorkingInit.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getHomeDirectory(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getTmpDirectory(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getDataDirectory(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } - f = message.getWorkingDirectory(); - if (f.length > 0) { - writer.writeString( - 4, - f - ); - } - f = message.getOperatingSystem(); - if (f !== 0.0) { - writer.writeEnum( - 5, - f - ); - } - f = message.getShell(); - if (f.length > 0) { - writer.writeString( - 6, - f - ); - } - f = message.getBuiltinExtensionsDir(); - if (f.length > 0) { - writer.writeString( - 7, - f - ); - } - f = message.getExtensionsDirectory(); - if (f.length > 0) { - writer.writeString( - 8, - f - ); - } - f = message.getExtraExtensionDirectoriesList(); - if (f.length > 0) { - writer.writeRepeatedString( - 9, - f - ); - } - f = message.getExtraBuiltinExtensionDirectoriesList(); - if (f.length > 0) { - writer.writeRepeatedString( - 10, - f - ); - } - f = message.getEnvMap(true); - if (f && f.getLength() > 0) { - f.serializeBinary(11, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeString); - } -}; - - -/** - * @enum {number} - */ -proto.WorkingInit.OperatingSystem = { - WINDOWS: 0, - LINUX: 1, - MAC: 2 -}; - -/** - * optional string home_directory = 1; - * @return {string} - */ -proto.WorkingInit.prototype.getHomeDirectory = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** @param {string} value */ -proto.WorkingInit.prototype.setHomeDirectory = function(value) { - jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional string tmp_directory = 2; - * @return {string} - */ -proto.WorkingInit.prototype.getTmpDirectory = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** @param {string} value */ -proto.WorkingInit.prototype.setTmpDirectory = function(value) { - jspb.Message.setProto3StringField(this, 2, value); -}; - - -/** - * optional string data_directory = 3; - * @return {string} - */ -proto.WorkingInit.prototype.getDataDirectory = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** @param {string} value */ -proto.WorkingInit.prototype.setDataDirectory = function(value) { - jspb.Message.setProto3StringField(this, 3, value); -}; - - -/** - * optional string working_directory = 4; - * @return {string} - */ -proto.WorkingInit.prototype.getWorkingDirectory = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); -}; - - -/** @param {string} value */ -proto.WorkingInit.prototype.setWorkingDirectory = function(value) { - jspb.Message.setProto3StringField(this, 4, value); -}; - - -/** - * optional OperatingSystem operating_system = 5; - * @return {!proto.WorkingInit.OperatingSystem} - */ -proto.WorkingInit.prototype.getOperatingSystem = function() { - return /** @type {!proto.WorkingInit.OperatingSystem} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); -}; - - -/** @param {!proto.WorkingInit.OperatingSystem} value */ -proto.WorkingInit.prototype.setOperatingSystem = function(value) { - jspb.Message.setProto3EnumField(this, 5, value); -}; - - -/** - * optional string shell = 6; - * @return {string} - */ -proto.WorkingInit.prototype.getShell = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); -}; - - -/** @param {string} value */ -proto.WorkingInit.prototype.setShell = function(value) { - jspb.Message.setProto3StringField(this, 6, value); -}; - - -/** - * optional string builtin_extensions_dir = 7; - * @return {string} - */ -proto.WorkingInit.prototype.getBuiltinExtensionsDir = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, "")); -}; - - -/** @param {string} value */ -proto.WorkingInit.prototype.setBuiltinExtensionsDir = function(value) { - jspb.Message.setProto3StringField(this, 7, value); -}; - - -/** - * optional string extensions_directory = 8; - * @return {string} - */ -proto.WorkingInit.prototype.getExtensionsDirectory = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, "")); -}; - - -/** @param {string} value */ -proto.WorkingInit.prototype.setExtensionsDirectory = function(value) { - jspb.Message.setProto3StringField(this, 8, value); -}; - - -/** - * repeated string extra_extension_directories = 9; - * @return {!Array} - */ -proto.WorkingInit.prototype.getExtraExtensionDirectoriesList = function() { - return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 9)); -}; - - -/** @param {!Array} value */ -proto.WorkingInit.prototype.setExtraExtensionDirectoriesList = function(value) { - jspb.Message.setField(this, 9, value || []); -}; - - -/** - * @param {string} value - * @param {number=} opt_index - */ -proto.WorkingInit.prototype.addExtraExtensionDirectories = function(value, opt_index) { - jspb.Message.addToRepeatedField(this, 9, value, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - */ -proto.WorkingInit.prototype.clearExtraExtensionDirectoriesList = function() { - this.setExtraExtensionDirectoriesList([]); -}; - - -/** - * repeated string extra_builtin_extension_directories = 10; - * @return {!Array} - */ -proto.WorkingInit.prototype.getExtraBuiltinExtensionDirectoriesList = function() { - return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 10)); -}; - - -/** @param {!Array} value */ -proto.WorkingInit.prototype.setExtraBuiltinExtensionDirectoriesList = function(value) { - jspb.Message.setField(this, 10, value || []); -}; - - -/** - * @param {string} value - * @param {number=} opt_index - */ -proto.WorkingInit.prototype.addExtraBuiltinExtensionDirectories = function(value, opt_index) { - jspb.Message.addToRepeatedField(this, 10, value, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - */ -proto.WorkingInit.prototype.clearExtraBuiltinExtensionDirectoriesList = function() { - this.setExtraBuiltinExtensionDirectoriesList([]); -}; - - -/** - * map env = 11; - * @param {boolean=} opt_noLazyCreate Do not create the map if - * empty, instead returning `undefined` - * @return {!jspb.Map} - */ -proto.WorkingInit.prototype.getEnvMap = function(opt_noLazyCreate) { - return /** @type {!jspb.Map} */ ( - jspb.Message.getMapField(this, 11, opt_noLazyCreate, - null)); -}; - - -/** - * Clears values from the map. The map will be non-null. - */ -proto.WorkingInit.prototype.clearEnvMap = function() { - this.getEnvMap().clear(); -}; - - -goog.object.extend(exports, proto); diff --git a/packages/protocol/src/proto/index.ts b/packages/protocol/src/proto/index.ts deleted file mode 100644 index c46ab604..00000000 --- a/packages/protocol/src/proto/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -export * from "./client_pb"; -export * from "./node_pb"; -export * from "./vscode_pb"; diff --git a/packages/protocol/src/proto/node.proto b/packages/protocol/src/proto/node.proto deleted file mode 100644 index 2ad9b33d..00000000 --- a/packages/protocol/src/proto/node.proto +++ /dev/null @@ -1,143 +0,0 @@ -syntax = "proto3"; - -enum Module { - ChildProcess = 0; - Fs = 1; - Net = 2; - NodePty = 3; - Spdlog = 4; - Trash = 5; -} - -message Argument { - message ErrorValue { - string message = 1; - string stack = 2; - string code = 3; - } - - message BufferValue { - bytes data = 1; - } - - message ObjectValue { - map data = 1; - } - - message ArrayValue { - repeated Argument data = 1; - } - - message ProxyValue { - uint64 id = 1; - } - - message FunctionValue { - uint64 id = 1; - } - - message NullValue {} - - message UndefinedValue {} - - message DateValue { - string date = 1; - } - - oneof msg { - ErrorValue error = 1; - BufferValue buffer = 2; - ObjectValue object = 3; - ArrayValue array = 4; - ProxyValue proxy = 5; - FunctionValue function = 6; - NullValue null = 7; - UndefinedValue undefined = 8; - double number = 9; - string string = 10; - bool boolean = 11; - DateValue date = 12; - } -} - -// Call a remote method. -message Method { - // A proxy identified by a unique name like "fs". - message Named { - uint64 id = 1; - Module module = 2; - string method = 3; - repeated Argument args = 4; - } - - // A general proxy identified by an ID like WriteStream. - message Numbered { - uint64 id = 1; - uint64 proxy_id = 2; - string method = 3; - repeated Argument args = 4; - } - - // Remote method failed. - message Fail { - uint64 id = 1; - Argument response = 2; - } - - // Remote method succeeded. - message Success { - uint64 id = 1; - Argument response = 2; - } - - oneof msg { - Method.Named named_proxy = 1; - Method.Numbered numbered_proxy = 2; - } -} - -message Callback { - // A remote callback for uniquely named proxy. - message Named { - Module module = 1; - uint64 callback_id = 2; - repeated Argument args = 3; - } - - // A remote callback for a numbered proxy. - message Numbered { - uint64 proxy_id = 1; - uint64 callback_id = 2; - repeated Argument args = 3; - } - - oneof msg { - Callback.Named named_callback = 1; - Callback.Numbered numbered_callback = 2; - } -} - -message Event { - // Emit an event on a uniquely named proxy. - message Named { - Module module = 1; - string event = 2; - repeated Argument args = 3; - } - - // Emit an event on a numbered proxy. - message Numbered { - uint64 proxy_id = 1; - string event = 2; - repeated Argument args = 3; - } - - oneof msg { - Event.Named named_event = 1; - Event.Numbered numbered_event = 2; - } -} - -message Ping {} - -message Pong {} diff --git a/packages/protocol/src/proto/node_pb.d.ts b/packages/protocol/src/proto/node_pb.d.ts deleted file mode 100644 index 28bd568e..00000000 --- a/packages/protocol/src/proto/node_pb.d.ts +++ /dev/null @@ -1,679 +0,0 @@ -// package: -// file: node.proto - -import * as jspb from "google-protobuf"; - -export class Argument extends jspb.Message { - hasError(): boolean; - clearError(): void; - getError(): Argument.ErrorValue | undefined; - setError(value?: Argument.ErrorValue): void; - - hasBuffer(): boolean; - clearBuffer(): void; - getBuffer(): Argument.BufferValue | undefined; - setBuffer(value?: Argument.BufferValue): void; - - hasObject(): boolean; - clearObject(): void; - getObject(): Argument.ObjectValue | undefined; - setObject(value?: Argument.ObjectValue): void; - - hasArray(): boolean; - clearArray(): void; - getArray(): Argument.ArrayValue | undefined; - setArray(value?: Argument.ArrayValue): void; - - hasProxy(): boolean; - clearProxy(): void; - getProxy(): Argument.ProxyValue | undefined; - setProxy(value?: Argument.ProxyValue): void; - - hasFunction(): boolean; - clearFunction(): void; - getFunction(): Argument.FunctionValue | undefined; - setFunction(value?: Argument.FunctionValue): void; - - hasNull(): boolean; - clearNull(): void; - getNull(): Argument.NullValue | undefined; - setNull(value?: Argument.NullValue): void; - - hasUndefined(): boolean; - clearUndefined(): void; - getUndefined(): Argument.UndefinedValue | undefined; - setUndefined(value?: Argument.UndefinedValue): void; - - hasNumber(): boolean; - clearNumber(): void; - getNumber(): number; - setNumber(value: number): void; - - hasString(): boolean; - clearString(): void; - getString(): string; - setString(value: string): void; - - hasBoolean(): boolean; - clearBoolean(): void; - getBoolean(): boolean; - setBoolean(value: boolean): void; - - hasDate(): boolean; - clearDate(): void; - getDate(): Argument.DateValue | undefined; - setDate(value?: Argument.DateValue): void; - - getMsgCase(): Argument.MsgCase; - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): Argument.AsObject; - static toObject(includeInstance: boolean, msg: Argument): Argument.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: Argument, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): Argument; - static deserializeBinaryFromReader(message: Argument, reader: jspb.BinaryReader): Argument; -} - -export namespace Argument { - export type AsObject = { - error?: Argument.ErrorValue.AsObject, - buffer?: Argument.BufferValue.AsObject, - object?: Argument.ObjectValue.AsObject, - array?: Argument.ArrayValue.AsObject, - proxy?: Argument.ProxyValue.AsObject, - pb_function?: Argument.FunctionValue.AsObject, - pb_null?: Argument.NullValue.AsObject, - undefined?: Argument.UndefinedValue.AsObject, - number: number, - string: string, - pb_boolean: boolean, - date?: Argument.DateValue.AsObject, - } - - export class ErrorValue extends jspb.Message { - getMessage(): string; - setMessage(value: string): void; - - getStack(): string; - setStack(value: string): void; - - getCode(): string; - setCode(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ErrorValue.AsObject; - static toObject(includeInstance: boolean, msg: ErrorValue): ErrorValue.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ErrorValue, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ErrorValue; - static deserializeBinaryFromReader(message: ErrorValue, reader: jspb.BinaryReader): ErrorValue; - } - - export namespace ErrorValue { - export type AsObject = { - message: string, - stack: string, - code: string, - } - } - - export class BufferValue extends jspb.Message { - getData(): Uint8Array | string; - getData_asU8(): Uint8Array; - getData_asB64(): string; - setData(value: Uint8Array | string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): BufferValue.AsObject; - static toObject(includeInstance: boolean, msg: BufferValue): BufferValue.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: BufferValue, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): BufferValue; - static deserializeBinaryFromReader(message: BufferValue, reader: jspb.BinaryReader): BufferValue; - } - - export namespace BufferValue { - export type AsObject = { - data: Uint8Array | string, - } - } - - export class ObjectValue extends jspb.Message { - getDataMap(): jspb.Map; - clearDataMap(): void; - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ObjectValue.AsObject; - static toObject(includeInstance: boolean, msg: ObjectValue): ObjectValue.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ObjectValue, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ObjectValue; - static deserializeBinaryFromReader(message: ObjectValue, reader: jspb.BinaryReader): ObjectValue; - } - - export namespace ObjectValue { - export type AsObject = { - dataMap: Array<[string, Argument.AsObject]>, - } - } - - export class ArrayValue extends jspb.Message { - clearDataList(): void; - getDataList(): Array; - setDataList(value: Array): void; - addData(value?: Argument, index?: number): Argument; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ArrayValue.AsObject; - static toObject(includeInstance: boolean, msg: ArrayValue): ArrayValue.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ArrayValue, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ArrayValue; - static deserializeBinaryFromReader(message: ArrayValue, reader: jspb.BinaryReader): ArrayValue; - } - - export namespace ArrayValue { - export type AsObject = { - dataList: Array, - } - } - - export class ProxyValue extends jspb.Message { - getId(): number; - setId(value: number): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ProxyValue.AsObject; - static toObject(includeInstance: boolean, msg: ProxyValue): ProxyValue.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ProxyValue, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ProxyValue; - static deserializeBinaryFromReader(message: ProxyValue, reader: jspb.BinaryReader): ProxyValue; - } - - export namespace ProxyValue { - export type AsObject = { - id: number, - } - } - - export class FunctionValue extends jspb.Message { - getId(): number; - setId(value: number): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): FunctionValue.AsObject; - static toObject(includeInstance: boolean, msg: FunctionValue): FunctionValue.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: FunctionValue, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): FunctionValue; - static deserializeBinaryFromReader(message: FunctionValue, reader: jspb.BinaryReader): FunctionValue; - } - - export namespace FunctionValue { - export type AsObject = { - id: number, - } - } - - export class NullValue extends jspb.Message { - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): NullValue.AsObject; - static toObject(includeInstance: boolean, msg: NullValue): NullValue.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: NullValue, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): NullValue; - static deserializeBinaryFromReader(message: NullValue, reader: jspb.BinaryReader): NullValue; - } - - export namespace NullValue { - export type AsObject = { - } - } - - export class UndefinedValue extends jspb.Message { - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): UndefinedValue.AsObject; - static toObject(includeInstance: boolean, msg: UndefinedValue): UndefinedValue.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: UndefinedValue, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): UndefinedValue; - static deserializeBinaryFromReader(message: UndefinedValue, reader: jspb.BinaryReader): UndefinedValue; - } - - export namespace UndefinedValue { - export type AsObject = { - } - } - - export class DateValue extends jspb.Message { - getDate(): string; - setDate(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): DateValue.AsObject; - static toObject(includeInstance: boolean, msg: DateValue): DateValue.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: DateValue, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): DateValue; - static deserializeBinaryFromReader(message: DateValue, reader: jspb.BinaryReader): DateValue; - } - - export namespace DateValue { - export type AsObject = { - date: string, - } - } - - export enum MsgCase { - MSG_NOT_SET = 0, - ERROR = 1, - BUFFER = 2, - OBJECT = 3, - ARRAY = 4, - PROXY = 5, - FUNCTION = 6, - NULL = 7, - UNDEFINED = 8, - NUMBER = 9, - STRING = 10, - BOOLEAN = 11, - DATE = 12, - } -} - -export class Method extends jspb.Message { - hasNamedProxy(): boolean; - clearNamedProxy(): void; - getNamedProxy(): Method.Named | undefined; - setNamedProxy(value?: Method.Named): void; - - hasNumberedProxy(): boolean; - clearNumberedProxy(): void; - getNumberedProxy(): Method.Numbered | undefined; - setNumberedProxy(value?: Method.Numbered): void; - - getMsgCase(): Method.MsgCase; - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): Method.AsObject; - static toObject(includeInstance: boolean, msg: Method): Method.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: Method, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): Method; - static deserializeBinaryFromReader(message: Method, reader: jspb.BinaryReader): Method; -} - -export namespace Method { - export type AsObject = { - namedProxy?: Method.Named.AsObject, - numberedProxy?: Method.Numbered.AsObject, - } - - export class Named extends jspb.Message { - getId(): number; - setId(value: number): void; - - getModule(): Module; - setModule(value: Module): void; - - getMethod(): string; - setMethod(value: string): void; - - clearArgsList(): void; - getArgsList(): Array; - setArgsList(value: Array): void; - addArgs(value?: Argument, index?: number): Argument; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): Named.AsObject; - static toObject(includeInstance: boolean, msg: Named): Named.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: Named, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): Named; - static deserializeBinaryFromReader(message: Named, reader: jspb.BinaryReader): Named; - } - - export namespace Named { - export type AsObject = { - id: number, - module: Module, - method: string, - argsList: Array, - } - } - - export class Numbered extends jspb.Message { - getId(): number; - setId(value: number): void; - - getProxyId(): number; - setProxyId(value: number): void; - - getMethod(): string; - setMethod(value: string): void; - - clearArgsList(): void; - getArgsList(): Array; - setArgsList(value: Array): void; - addArgs(value?: Argument, index?: number): Argument; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): Numbered.AsObject; - static toObject(includeInstance: boolean, msg: Numbered): Numbered.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: Numbered, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): Numbered; - static deserializeBinaryFromReader(message: Numbered, reader: jspb.BinaryReader): Numbered; - } - - export namespace Numbered { - export type AsObject = { - id: number, - proxyId: number, - method: string, - argsList: Array, - } - } - - export class Fail extends jspb.Message { - getId(): number; - setId(value: number): void; - - hasResponse(): boolean; - clearResponse(): void; - getResponse(): Argument | undefined; - setResponse(value?: Argument): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): Fail.AsObject; - static toObject(includeInstance: boolean, msg: Fail): Fail.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: Fail, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): Fail; - static deserializeBinaryFromReader(message: Fail, reader: jspb.BinaryReader): Fail; - } - - export namespace Fail { - export type AsObject = { - id: number, - response?: Argument.AsObject, - } - } - - export class Success extends jspb.Message { - getId(): number; - setId(value: number): void; - - hasResponse(): boolean; - clearResponse(): void; - getResponse(): Argument | undefined; - setResponse(value?: Argument): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): Success.AsObject; - static toObject(includeInstance: boolean, msg: Success): Success.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: Success, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): Success; - static deserializeBinaryFromReader(message: Success, reader: jspb.BinaryReader): Success; - } - - export namespace Success { - export type AsObject = { - id: number, - response?: Argument.AsObject, - } - } - - export enum MsgCase { - MSG_NOT_SET = 0, - NAMED_PROXY = 1, - NUMBERED_PROXY = 2, - } -} - -export class Callback extends jspb.Message { - hasNamedCallback(): boolean; - clearNamedCallback(): void; - getNamedCallback(): Callback.Named | undefined; - setNamedCallback(value?: Callback.Named): void; - - hasNumberedCallback(): boolean; - clearNumberedCallback(): void; - getNumberedCallback(): Callback.Numbered | undefined; - setNumberedCallback(value?: Callback.Numbered): void; - - getMsgCase(): Callback.MsgCase; - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): Callback.AsObject; - static toObject(includeInstance: boolean, msg: Callback): Callback.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: Callback, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): Callback; - static deserializeBinaryFromReader(message: Callback, reader: jspb.BinaryReader): Callback; -} - -export namespace Callback { - export type AsObject = { - namedCallback?: Callback.Named.AsObject, - numberedCallback?: Callback.Numbered.AsObject, - } - - export class Named extends jspb.Message { - getModule(): Module; - setModule(value: Module): void; - - getCallbackId(): number; - setCallbackId(value: number): void; - - clearArgsList(): void; - getArgsList(): Array; - setArgsList(value: Array): void; - addArgs(value?: Argument, index?: number): Argument; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): Named.AsObject; - static toObject(includeInstance: boolean, msg: Named): Named.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: Named, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): Named; - static deserializeBinaryFromReader(message: Named, reader: jspb.BinaryReader): Named; - } - - export namespace Named { - export type AsObject = { - module: Module, - callbackId: number, - argsList: Array, - } - } - - export class Numbered extends jspb.Message { - getProxyId(): number; - setProxyId(value: number): void; - - getCallbackId(): number; - setCallbackId(value: number): void; - - clearArgsList(): void; - getArgsList(): Array; - setArgsList(value: Array): void; - addArgs(value?: Argument, index?: number): Argument; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): Numbered.AsObject; - static toObject(includeInstance: boolean, msg: Numbered): Numbered.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: Numbered, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): Numbered; - static deserializeBinaryFromReader(message: Numbered, reader: jspb.BinaryReader): Numbered; - } - - export namespace Numbered { - export type AsObject = { - proxyId: number, - callbackId: number, - argsList: Array, - } - } - - export enum MsgCase { - MSG_NOT_SET = 0, - NAMED_CALLBACK = 1, - NUMBERED_CALLBACK = 2, - } -} - -export class Event extends jspb.Message { - hasNamedEvent(): boolean; - clearNamedEvent(): void; - getNamedEvent(): Event.Named | undefined; - setNamedEvent(value?: Event.Named): void; - - hasNumberedEvent(): boolean; - clearNumberedEvent(): void; - getNumberedEvent(): Event.Numbered | undefined; - setNumberedEvent(value?: Event.Numbered): void; - - getMsgCase(): Event.MsgCase; - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): Event.AsObject; - static toObject(includeInstance: boolean, msg: Event): Event.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: Event, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): Event; - static deserializeBinaryFromReader(message: Event, reader: jspb.BinaryReader): Event; -} - -export namespace Event { - export type AsObject = { - namedEvent?: Event.Named.AsObject, - numberedEvent?: Event.Numbered.AsObject, - } - - export class Named extends jspb.Message { - getModule(): Module; - setModule(value: Module): void; - - getEvent(): string; - setEvent(value: string): void; - - clearArgsList(): void; - getArgsList(): Array; - setArgsList(value: Array): void; - addArgs(value?: Argument, index?: number): Argument; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): Named.AsObject; - static toObject(includeInstance: boolean, msg: Named): Named.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: Named, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): Named; - static deserializeBinaryFromReader(message: Named, reader: jspb.BinaryReader): Named; - } - - export namespace Named { - export type AsObject = { - module: Module, - event: string, - argsList: Array, - } - } - - export class Numbered extends jspb.Message { - getProxyId(): number; - setProxyId(value: number): void; - - getEvent(): string; - setEvent(value: string): void; - - clearArgsList(): void; - getArgsList(): Array; - setArgsList(value: Array): void; - addArgs(value?: Argument, index?: number): Argument; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): Numbered.AsObject; - static toObject(includeInstance: boolean, msg: Numbered): Numbered.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: Numbered, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): Numbered; - static deserializeBinaryFromReader(message: Numbered, reader: jspb.BinaryReader): Numbered; - } - - export namespace Numbered { - export type AsObject = { - proxyId: number, - event: string, - argsList: Array, - } - } - - export enum MsgCase { - MSG_NOT_SET = 0, - NAMED_EVENT = 1, - NUMBERED_EVENT = 2, - } -} - -export class Ping extends jspb.Message { - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): Ping.AsObject; - static toObject(includeInstance: boolean, msg: Ping): Ping.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: Ping, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): Ping; - static deserializeBinaryFromReader(message: Ping, reader: jspb.BinaryReader): Ping; -} - -export namespace Ping { - export type AsObject = { - } -} - -export class Pong extends jspb.Message { - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): Pong.AsObject; - static toObject(includeInstance: boolean, msg: Pong): Pong.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: Pong, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): Pong; - static deserializeBinaryFromReader(message: Pong, reader: jspb.BinaryReader): Pong; -} - -export namespace Pong { - export type AsObject = { - } -} - -export enum Module { - CHILDPROCESS = 0, - FS = 1, - NET = 2, - NODEPTY = 3, - SPDLOG = 4, - TRASH = 5, -} - diff --git a/packages/protocol/src/proto/node_pb.js b/packages/protocol/src/proto/node_pb.js deleted file mode 100644 index c7a90b5a..00000000 --- a/packages/protocol/src/proto/node_pb.js +++ /dev/null @@ -1,4907 +0,0 @@ -/** - * @fileoverview - * @enhanceable - * @suppress {messageConventions} JS Compiler reports an error if a variable or - * field starts with 'MSG_' and isn't a translatable message. - * @public - */ -// GENERATED CODE -- DO NOT EDIT! - -var jspb = require('google-protobuf'); -var goog = jspb; -var global = Function('return this')(); - -goog.exportSymbol('proto.Argument', null, global); -goog.exportSymbol('proto.Argument.ArrayValue', null, global); -goog.exportSymbol('proto.Argument.BufferValue', null, global); -goog.exportSymbol('proto.Argument.DateValue', null, global); -goog.exportSymbol('proto.Argument.ErrorValue', null, global); -goog.exportSymbol('proto.Argument.FunctionValue', null, global); -goog.exportSymbol('proto.Argument.NullValue', null, global); -goog.exportSymbol('proto.Argument.ObjectValue', null, global); -goog.exportSymbol('proto.Argument.ProxyValue', null, global); -goog.exportSymbol('proto.Argument.UndefinedValue', null, global); -goog.exportSymbol('proto.Callback', null, global); -goog.exportSymbol('proto.Callback.Named', null, global); -goog.exportSymbol('proto.Callback.Numbered', null, global); -goog.exportSymbol('proto.Event', null, global); -goog.exportSymbol('proto.Event.Named', null, global); -goog.exportSymbol('proto.Event.Numbered', null, global); -goog.exportSymbol('proto.Method', null, global); -goog.exportSymbol('proto.Method.Fail', null, global); -goog.exportSymbol('proto.Method.Named', null, global); -goog.exportSymbol('proto.Method.Numbered', null, global); -goog.exportSymbol('proto.Method.Success', null, global); -goog.exportSymbol('proto.Module', null, global); -goog.exportSymbol('proto.Ping', null, global); -goog.exportSymbol('proto.Pong', null, global); -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.Argument = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, proto.Argument.oneofGroups_); -}; -goog.inherits(proto.Argument, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.Argument.displayName = 'proto.Argument'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.Argument.ErrorValue = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.Argument.ErrorValue, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.Argument.ErrorValue.displayName = 'proto.Argument.ErrorValue'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.Argument.BufferValue = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.Argument.BufferValue, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.Argument.BufferValue.displayName = 'proto.Argument.BufferValue'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.Argument.ObjectValue = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.Argument.ObjectValue, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.Argument.ObjectValue.displayName = 'proto.Argument.ObjectValue'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.Argument.ArrayValue = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.Argument.ArrayValue.repeatedFields_, null); -}; -goog.inherits(proto.Argument.ArrayValue, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.Argument.ArrayValue.displayName = 'proto.Argument.ArrayValue'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.Argument.ProxyValue = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.Argument.ProxyValue, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.Argument.ProxyValue.displayName = 'proto.Argument.ProxyValue'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.Argument.FunctionValue = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.Argument.FunctionValue, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.Argument.FunctionValue.displayName = 'proto.Argument.FunctionValue'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.Argument.NullValue = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.Argument.NullValue, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.Argument.NullValue.displayName = 'proto.Argument.NullValue'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.Argument.UndefinedValue = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.Argument.UndefinedValue, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.Argument.UndefinedValue.displayName = 'proto.Argument.UndefinedValue'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.Argument.DateValue = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.Argument.DateValue, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.Argument.DateValue.displayName = 'proto.Argument.DateValue'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.Method = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, proto.Method.oneofGroups_); -}; -goog.inherits(proto.Method, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.Method.displayName = 'proto.Method'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.Method.Named = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.Method.Named.repeatedFields_, null); -}; -goog.inherits(proto.Method.Named, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.Method.Named.displayName = 'proto.Method.Named'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.Method.Numbered = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.Method.Numbered.repeatedFields_, null); -}; -goog.inherits(proto.Method.Numbered, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.Method.Numbered.displayName = 'proto.Method.Numbered'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.Method.Fail = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.Method.Fail, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.Method.Fail.displayName = 'proto.Method.Fail'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.Method.Success = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.Method.Success, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.Method.Success.displayName = 'proto.Method.Success'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.Callback = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, proto.Callback.oneofGroups_); -}; -goog.inherits(proto.Callback, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.Callback.displayName = 'proto.Callback'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.Callback.Named = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.Callback.Named.repeatedFields_, null); -}; -goog.inherits(proto.Callback.Named, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.Callback.Named.displayName = 'proto.Callback.Named'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.Callback.Numbered = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.Callback.Numbered.repeatedFields_, null); -}; -goog.inherits(proto.Callback.Numbered, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.Callback.Numbered.displayName = 'proto.Callback.Numbered'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.Event = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, proto.Event.oneofGroups_); -}; -goog.inherits(proto.Event, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.Event.displayName = 'proto.Event'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.Event.Named = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.Event.Named.repeatedFields_, null); -}; -goog.inherits(proto.Event.Named, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.Event.Named.displayName = 'proto.Event.Named'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.Event.Numbered = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.Event.Numbered.repeatedFields_, null); -}; -goog.inherits(proto.Event.Numbered, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.Event.Numbered.displayName = 'proto.Event.Numbered'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.Ping = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.Ping, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.Ping.displayName = 'proto.Ping'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.Pong = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.Pong, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.Pong.displayName = 'proto.Pong'; -} - -/** - * Oneof group definitions for this message. Each group defines the field - * numbers belonging to that group. When of these fields' value is set, all - * other fields in the group are cleared. During deserialization, if multiple - * fields are encountered for a group, only the last value seen will be kept. - * @private {!Array>} - * @const - */ -proto.Argument.oneofGroups_ = [[1,2,3,4,5,6,7,8,9,10,11,12]]; - -/** - * @enum {number} - */ -proto.Argument.MsgCase = { - MSG_NOT_SET: 0, - ERROR: 1, - BUFFER: 2, - OBJECT: 3, - ARRAY: 4, - PROXY: 5, - FUNCTION: 6, - NULL: 7, - UNDEFINED: 8, - NUMBER: 9, - STRING: 10, - BOOLEAN: 11, - DATE: 12 -}; - -/** - * @return {proto.Argument.MsgCase} - */ -proto.Argument.prototype.getMsgCase = function() { - return /** @type {proto.Argument.MsgCase} */(jspb.Message.computeOneofCase(this, proto.Argument.oneofGroups_[0])); -}; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto suitable for use in Soy templates. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration - * @return {!Object} - */ -proto.Argument.prototype.toObject = function(opt_includeInstance) { - return proto.Argument.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.Argument} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.Argument.toObject = function(includeInstance, msg) { - var f, obj = { - error: (f = msg.getError()) && proto.Argument.ErrorValue.toObject(includeInstance, f), - buffer: (f = msg.getBuffer()) && proto.Argument.BufferValue.toObject(includeInstance, f), - object: (f = msg.getObject()) && proto.Argument.ObjectValue.toObject(includeInstance, f), - array: (f = msg.getArray()) && proto.Argument.ArrayValue.toObject(includeInstance, f), - proxy: (f = msg.getProxy()) && proto.Argument.ProxyValue.toObject(includeInstance, f), - pb_function: (f = msg.getFunction()) && proto.Argument.FunctionValue.toObject(includeInstance, f), - pb_null: (f = msg.getNull()) && proto.Argument.NullValue.toObject(includeInstance, f), - undefined: (f = msg.getUndefined()) && proto.Argument.UndefinedValue.toObject(includeInstance, f), - number: +jspb.Message.getFieldWithDefault(msg, 9, 0.0), - string: jspb.Message.getFieldWithDefault(msg, 10, ""), - pb_boolean: jspb.Message.getFieldWithDefault(msg, 11, false), - date: (f = msg.getDate()) && proto.Argument.DateValue.toObject(includeInstance, f) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.Argument} - */ -proto.Argument.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.Argument; - return proto.Argument.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.Argument} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.Argument} - */ -proto.Argument.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.Argument.ErrorValue; - reader.readMessage(value,proto.Argument.ErrorValue.deserializeBinaryFromReader); - msg.setError(value); - break; - case 2: - var value = new proto.Argument.BufferValue; - reader.readMessage(value,proto.Argument.BufferValue.deserializeBinaryFromReader); - msg.setBuffer(value); - break; - case 3: - var value = new proto.Argument.ObjectValue; - reader.readMessage(value,proto.Argument.ObjectValue.deserializeBinaryFromReader); - msg.setObject(value); - break; - case 4: - var value = new proto.Argument.ArrayValue; - reader.readMessage(value,proto.Argument.ArrayValue.deserializeBinaryFromReader); - msg.setArray(value); - break; - case 5: - var value = new proto.Argument.ProxyValue; - reader.readMessage(value,proto.Argument.ProxyValue.deserializeBinaryFromReader); - msg.setProxy(value); - break; - case 6: - var value = new proto.Argument.FunctionValue; - reader.readMessage(value,proto.Argument.FunctionValue.deserializeBinaryFromReader); - msg.setFunction(value); - break; - case 7: - var value = new proto.Argument.NullValue; - reader.readMessage(value,proto.Argument.NullValue.deserializeBinaryFromReader); - msg.setNull(value); - break; - case 8: - var value = new proto.Argument.UndefinedValue; - reader.readMessage(value,proto.Argument.UndefinedValue.deserializeBinaryFromReader); - msg.setUndefined(value); - break; - case 9: - var value = /** @type {number} */ (reader.readDouble()); - msg.setNumber(value); - break; - case 10: - var value = /** @type {string} */ (reader.readString()); - msg.setString(value); - break; - case 11: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setBoolean(value); - break; - case 12: - var value = new proto.Argument.DateValue; - reader.readMessage(value,proto.Argument.DateValue.deserializeBinaryFromReader); - msg.setDate(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.Argument.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.Argument.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.Argument} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.Argument.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getError(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.Argument.ErrorValue.serializeBinaryToWriter - ); - } - f = message.getBuffer(); - if (f != null) { - writer.writeMessage( - 2, - f, - proto.Argument.BufferValue.serializeBinaryToWriter - ); - } - f = message.getObject(); - if (f != null) { - writer.writeMessage( - 3, - f, - proto.Argument.ObjectValue.serializeBinaryToWriter - ); - } - f = message.getArray(); - if (f != null) { - writer.writeMessage( - 4, - f, - proto.Argument.ArrayValue.serializeBinaryToWriter - ); - } - f = message.getProxy(); - if (f != null) { - writer.writeMessage( - 5, - f, - proto.Argument.ProxyValue.serializeBinaryToWriter - ); - } - f = message.getFunction(); - if (f != null) { - writer.writeMessage( - 6, - f, - proto.Argument.FunctionValue.serializeBinaryToWriter - ); - } - f = message.getNull(); - if (f != null) { - writer.writeMessage( - 7, - f, - proto.Argument.NullValue.serializeBinaryToWriter - ); - } - f = message.getUndefined(); - if (f != null) { - writer.writeMessage( - 8, - f, - proto.Argument.UndefinedValue.serializeBinaryToWriter - ); - } - f = /** @type {number} */ (jspb.Message.getField(message, 9)); - if (f != null) { - writer.writeDouble( - 9, - f - ); - } - f = /** @type {string} */ (jspb.Message.getField(message, 10)); - if (f != null) { - writer.writeString( - 10, - f - ); - } - f = /** @type {boolean} */ (jspb.Message.getField(message, 11)); - if (f != null) { - writer.writeBool( - 11, - f - ); - } - f = message.getDate(); - if (f != null) { - writer.writeMessage( - 12, - f, - proto.Argument.DateValue.serializeBinaryToWriter - ); - } -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto suitable for use in Soy templates. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration - * @return {!Object} - */ -proto.Argument.ErrorValue.prototype.toObject = function(opt_includeInstance) { - return proto.Argument.ErrorValue.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.Argument.ErrorValue} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.Argument.ErrorValue.toObject = function(includeInstance, msg) { - var f, obj = { - message: jspb.Message.getFieldWithDefault(msg, 1, ""), - stack: jspb.Message.getFieldWithDefault(msg, 2, ""), - code: jspb.Message.getFieldWithDefault(msg, 3, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.Argument.ErrorValue} - */ -proto.Argument.ErrorValue.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.Argument.ErrorValue; - return proto.Argument.ErrorValue.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.Argument.ErrorValue} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.Argument.ErrorValue} - */ -proto.Argument.ErrorValue.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setMessage(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setStack(value); - break; - case 3: - var value = /** @type {string} */ (reader.readString()); - msg.setCode(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.Argument.ErrorValue.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.Argument.ErrorValue.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.Argument.ErrorValue} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.Argument.ErrorValue.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getMessage(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getStack(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getCode(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } -}; - - -/** - * optional string message = 1; - * @return {string} - */ -proto.Argument.ErrorValue.prototype.getMessage = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** @param {string} value */ -proto.Argument.ErrorValue.prototype.setMessage = function(value) { - jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional string stack = 2; - * @return {string} - */ -proto.Argument.ErrorValue.prototype.getStack = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** @param {string} value */ -proto.Argument.ErrorValue.prototype.setStack = function(value) { - jspb.Message.setProto3StringField(this, 2, value); -}; - - -/** - * optional string code = 3; - * @return {string} - */ -proto.Argument.ErrorValue.prototype.getCode = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** @param {string} value */ -proto.Argument.ErrorValue.prototype.setCode = function(value) { - jspb.Message.setProto3StringField(this, 3, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto suitable for use in Soy templates. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration - * @return {!Object} - */ -proto.Argument.BufferValue.prototype.toObject = function(opt_includeInstance) { - return proto.Argument.BufferValue.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.Argument.BufferValue} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.Argument.BufferValue.toObject = function(includeInstance, msg) { - var f, obj = { - data: msg.getData_asB64() - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.Argument.BufferValue} - */ -proto.Argument.BufferValue.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.Argument.BufferValue; - return proto.Argument.BufferValue.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.Argument.BufferValue} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.Argument.BufferValue} - */ -proto.Argument.BufferValue.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setData(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.Argument.BufferValue.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.Argument.BufferValue.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.Argument.BufferValue} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.Argument.BufferValue.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getData_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } -}; - - -/** - * optional bytes data = 1; - * @return {!(string|Uint8Array)} - */ -proto.Argument.BufferValue.prototype.getData = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes data = 1; - * This is a type-conversion wrapper around `getData()` - * @return {string} - */ -proto.Argument.BufferValue.prototype.getData_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getData())); -}; - - -/** - * optional bytes data = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getData()` - * @return {!Uint8Array} - */ -proto.Argument.BufferValue.prototype.getData_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getData())); -}; - - -/** @param {!(string|Uint8Array)} value */ -proto.Argument.BufferValue.prototype.setData = function(value) { - jspb.Message.setProto3BytesField(this, 1, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto suitable for use in Soy templates. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration - * @return {!Object} - */ -proto.Argument.ObjectValue.prototype.toObject = function(opt_includeInstance) { - return proto.Argument.ObjectValue.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.Argument.ObjectValue} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.Argument.ObjectValue.toObject = function(includeInstance, msg) { - var f, obj = { - dataMap: (f = msg.getDataMap()) ? f.toObject(includeInstance, proto.Argument.toObject) : [] - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.Argument.ObjectValue} - */ -proto.Argument.ObjectValue.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.Argument.ObjectValue; - return proto.Argument.ObjectValue.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.Argument.ObjectValue} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.Argument.ObjectValue} - */ -proto.Argument.ObjectValue.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = msg.getDataMap(); - reader.readMessage(value, function(message, reader) { - jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readMessage, proto.Argument.deserializeBinaryFromReader, ""); - }); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.Argument.ObjectValue.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.Argument.ObjectValue.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.Argument.ObjectValue} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.Argument.ObjectValue.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getDataMap(true); - if (f && f.getLength() > 0) { - f.serializeBinary(1, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeMessage, proto.Argument.serializeBinaryToWriter); - } -}; - - -/** - * map data = 1; - * @param {boolean=} opt_noLazyCreate Do not create the map if - * empty, instead returning `undefined` - * @return {!jspb.Map} - */ -proto.Argument.ObjectValue.prototype.getDataMap = function(opt_noLazyCreate) { - return /** @type {!jspb.Map} */ ( - jspb.Message.getMapField(this, 1, opt_noLazyCreate, - proto.Argument)); -}; - - -/** - * Clears values from the map. The map will be non-null. - */ -proto.Argument.ObjectValue.prototype.clearDataMap = function() { - this.getDataMap().clear(); -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.Argument.ArrayValue.repeatedFields_ = [1]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto suitable for use in Soy templates. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration - * @return {!Object} - */ -proto.Argument.ArrayValue.prototype.toObject = function(opt_includeInstance) { - return proto.Argument.ArrayValue.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.Argument.ArrayValue} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.Argument.ArrayValue.toObject = function(includeInstance, msg) { - var f, obj = { - dataList: jspb.Message.toObjectList(msg.getDataList(), - proto.Argument.toObject, includeInstance) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.Argument.ArrayValue} - */ -proto.Argument.ArrayValue.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.Argument.ArrayValue; - return proto.Argument.ArrayValue.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.Argument.ArrayValue} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.Argument.ArrayValue} - */ -proto.Argument.ArrayValue.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.Argument; - reader.readMessage(value,proto.Argument.deserializeBinaryFromReader); - msg.addData(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.Argument.ArrayValue.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.Argument.ArrayValue.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.Argument.ArrayValue} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.Argument.ArrayValue.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getDataList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 1, - f, - proto.Argument.serializeBinaryToWriter - ); - } -}; - - -/** - * repeated Argument data = 1; - * @return {!Array} - */ -proto.Argument.ArrayValue.prototype.getDataList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.Argument, 1)); -}; - - -/** @param {!Array} value */ -proto.Argument.ArrayValue.prototype.setDataList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 1, value); -}; - - -/** - * @param {!proto.Argument=} opt_value - * @param {number=} opt_index - * @return {!proto.Argument} - */ -proto.Argument.ArrayValue.prototype.addData = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.Argument, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - */ -proto.Argument.ArrayValue.prototype.clearDataList = function() { - this.setDataList([]); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto suitable for use in Soy templates. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration - * @return {!Object} - */ -proto.Argument.ProxyValue.prototype.toObject = function(opt_includeInstance) { - return proto.Argument.ProxyValue.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.Argument.ProxyValue} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.Argument.ProxyValue.toObject = function(includeInstance, msg) { - var f, obj = { - id: jspb.Message.getFieldWithDefault(msg, 1, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.Argument.ProxyValue} - */ -proto.Argument.ProxyValue.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.Argument.ProxyValue; - return proto.Argument.ProxyValue.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.Argument.ProxyValue} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.Argument.ProxyValue} - */ -proto.Argument.ProxyValue.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readUint64()); - msg.setId(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.Argument.ProxyValue.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.Argument.ProxyValue.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.Argument.ProxyValue} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.Argument.ProxyValue.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getId(); - if (f !== 0) { - writer.writeUint64( - 1, - f - ); - } -}; - - -/** - * optional uint64 id = 1; - * @return {number} - */ -proto.Argument.ProxyValue.prototype.getId = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** @param {number} value */ -proto.Argument.ProxyValue.prototype.setId = function(value) { - jspb.Message.setProto3IntField(this, 1, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto suitable for use in Soy templates. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration - * @return {!Object} - */ -proto.Argument.FunctionValue.prototype.toObject = function(opt_includeInstance) { - return proto.Argument.FunctionValue.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.Argument.FunctionValue} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.Argument.FunctionValue.toObject = function(includeInstance, msg) { - var f, obj = { - id: jspb.Message.getFieldWithDefault(msg, 1, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.Argument.FunctionValue} - */ -proto.Argument.FunctionValue.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.Argument.FunctionValue; - return proto.Argument.FunctionValue.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.Argument.FunctionValue} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.Argument.FunctionValue} - */ -proto.Argument.FunctionValue.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readUint64()); - msg.setId(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.Argument.FunctionValue.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.Argument.FunctionValue.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.Argument.FunctionValue} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.Argument.FunctionValue.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getId(); - if (f !== 0) { - writer.writeUint64( - 1, - f - ); - } -}; - - -/** - * optional uint64 id = 1; - * @return {number} - */ -proto.Argument.FunctionValue.prototype.getId = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** @param {number} value */ -proto.Argument.FunctionValue.prototype.setId = function(value) { - jspb.Message.setProto3IntField(this, 1, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto suitable for use in Soy templates. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration - * @return {!Object} - */ -proto.Argument.NullValue.prototype.toObject = function(opt_includeInstance) { - return proto.Argument.NullValue.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.Argument.NullValue} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.Argument.NullValue.toObject = function(includeInstance, msg) { - var f, obj = { - - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.Argument.NullValue} - */ -proto.Argument.NullValue.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.Argument.NullValue; - return proto.Argument.NullValue.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.Argument.NullValue} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.Argument.NullValue} - */ -proto.Argument.NullValue.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.Argument.NullValue.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.Argument.NullValue.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.Argument.NullValue} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.Argument.NullValue.serializeBinaryToWriter = function(message, writer) { - var f = undefined; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto suitable for use in Soy templates. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration - * @return {!Object} - */ -proto.Argument.UndefinedValue.prototype.toObject = function(opt_includeInstance) { - return proto.Argument.UndefinedValue.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.Argument.UndefinedValue} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.Argument.UndefinedValue.toObject = function(includeInstance, msg) { - var f, obj = { - - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.Argument.UndefinedValue} - */ -proto.Argument.UndefinedValue.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.Argument.UndefinedValue; - return proto.Argument.UndefinedValue.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.Argument.UndefinedValue} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.Argument.UndefinedValue} - */ -proto.Argument.UndefinedValue.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.Argument.UndefinedValue.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.Argument.UndefinedValue.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.Argument.UndefinedValue} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.Argument.UndefinedValue.serializeBinaryToWriter = function(message, writer) { - var f = undefined; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto suitable for use in Soy templates. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration - * @return {!Object} - */ -proto.Argument.DateValue.prototype.toObject = function(opt_includeInstance) { - return proto.Argument.DateValue.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.Argument.DateValue} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.Argument.DateValue.toObject = function(includeInstance, msg) { - var f, obj = { - date: jspb.Message.getFieldWithDefault(msg, 1, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.Argument.DateValue} - */ -proto.Argument.DateValue.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.Argument.DateValue; - return proto.Argument.DateValue.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.Argument.DateValue} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.Argument.DateValue} - */ -proto.Argument.DateValue.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setDate(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.Argument.DateValue.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.Argument.DateValue.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.Argument.DateValue} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.Argument.DateValue.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getDate(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } -}; - - -/** - * optional string date = 1; - * @return {string} - */ -proto.Argument.DateValue.prototype.getDate = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** @param {string} value */ -proto.Argument.DateValue.prototype.setDate = function(value) { - jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional ErrorValue error = 1; - * @return {?proto.Argument.ErrorValue} - */ -proto.Argument.prototype.getError = function() { - return /** @type{?proto.Argument.ErrorValue} */ ( - jspb.Message.getWrapperField(this, proto.Argument.ErrorValue, 1)); -}; - - -/** @param {?proto.Argument.ErrorValue|undefined} value */ -proto.Argument.prototype.setError = function(value) { - jspb.Message.setOneofWrapperField(this, 1, proto.Argument.oneofGroups_[0], value); -}; - - -/** - * Clears the message field making it undefined. - */ -proto.Argument.prototype.clearError = function() { - this.setError(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.Argument.prototype.hasError = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional BufferValue buffer = 2; - * @return {?proto.Argument.BufferValue} - */ -proto.Argument.prototype.getBuffer = function() { - return /** @type{?proto.Argument.BufferValue} */ ( - jspb.Message.getWrapperField(this, proto.Argument.BufferValue, 2)); -}; - - -/** @param {?proto.Argument.BufferValue|undefined} value */ -proto.Argument.prototype.setBuffer = function(value) { - jspb.Message.setOneofWrapperField(this, 2, proto.Argument.oneofGroups_[0], value); -}; - - -/** - * Clears the message field making it undefined. - */ -proto.Argument.prototype.clearBuffer = function() { - this.setBuffer(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.Argument.prototype.hasBuffer = function() { - return jspb.Message.getField(this, 2) != null; -}; - - -/** - * optional ObjectValue object = 3; - * @return {?proto.Argument.ObjectValue} - */ -proto.Argument.prototype.getObject = function() { - return /** @type{?proto.Argument.ObjectValue} */ ( - jspb.Message.getWrapperField(this, proto.Argument.ObjectValue, 3)); -}; - - -/** @param {?proto.Argument.ObjectValue|undefined} value */ -proto.Argument.prototype.setObject = function(value) { - jspb.Message.setOneofWrapperField(this, 3, proto.Argument.oneofGroups_[0], value); -}; - - -/** - * Clears the message field making it undefined. - */ -proto.Argument.prototype.clearObject = function() { - this.setObject(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.Argument.prototype.hasObject = function() { - return jspb.Message.getField(this, 3) != null; -}; - - -/** - * optional ArrayValue array = 4; - * @return {?proto.Argument.ArrayValue} - */ -proto.Argument.prototype.getArray = function() { - return /** @type{?proto.Argument.ArrayValue} */ ( - jspb.Message.getWrapperField(this, proto.Argument.ArrayValue, 4)); -}; - - -/** @param {?proto.Argument.ArrayValue|undefined} value */ -proto.Argument.prototype.setArray = function(value) { - jspb.Message.setOneofWrapperField(this, 4, proto.Argument.oneofGroups_[0], value); -}; - - -/** - * Clears the message field making it undefined. - */ -proto.Argument.prototype.clearArray = function() { - this.setArray(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.Argument.prototype.hasArray = function() { - return jspb.Message.getField(this, 4) != null; -}; - - -/** - * optional ProxyValue proxy = 5; - * @return {?proto.Argument.ProxyValue} - */ -proto.Argument.prototype.getProxy = function() { - return /** @type{?proto.Argument.ProxyValue} */ ( - jspb.Message.getWrapperField(this, proto.Argument.ProxyValue, 5)); -}; - - -/** @param {?proto.Argument.ProxyValue|undefined} value */ -proto.Argument.prototype.setProxy = function(value) { - jspb.Message.setOneofWrapperField(this, 5, proto.Argument.oneofGroups_[0], value); -}; - - -/** - * Clears the message field making it undefined. - */ -proto.Argument.prototype.clearProxy = function() { - this.setProxy(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.Argument.prototype.hasProxy = function() { - return jspb.Message.getField(this, 5) != null; -}; - - -/** - * optional FunctionValue function = 6; - * @return {?proto.Argument.FunctionValue} - */ -proto.Argument.prototype.getFunction = function() { - return /** @type{?proto.Argument.FunctionValue} */ ( - jspb.Message.getWrapperField(this, proto.Argument.FunctionValue, 6)); -}; - - -/** @param {?proto.Argument.FunctionValue|undefined} value */ -proto.Argument.prototype.setFunction = function(value) { - jspb.Message.setOneofWrapperField(this, 6, proto.Argument.oneofGroups_[0], value); -}; - - -/** - * Clears the message field making it undefined. - */ -proto.Argument.prototype.clearFunction = function() { - this.setFunction(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.Argument.prototype.hasFunction = function() { - return jspb.Message.getField(this, 6) != null; -}; - - -/** - * optional NullValue null = 7; - * @return {?proto.Argument.NullValue} - */ -proto.Argument.prototype.getNull = function() { - return /** @type{?proto.Argument.NullValue} */ ( - jspb.Message.getWrapperField(this, proto.Argument.NullValue, 7)); -}; - - -/** @param {?proto.Argument.NullValue|undefined} value */ -proto.Argument.prototype.setNull = function(value) { - jspb.Message.setOneofWrapperField(this, 7, proto.Argument.oneofGroups_[0], value); -}; - - -/** - * Clears the message field making it undefined. - */ -proto.Argument.prototype.clearNull = function() { - this.setNull(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.Argument.prototype.hasNull = function() { - return jspb.Message.getField(this, 7) != null; -}; - - -/** - * optional UndefinedValue undefined = 8; - * @return {?proto.Argument.UndefinedValue} - */ -proto.Argument.prototype.getUndefined = function() { - return /** @type{?proto.Argument.UndefinedValue} */ ( - jspb.Message.getWrapperField(this, proto.Argument.UndefinedValue, 8)); -}; - - -/** @param {?proto.Argument.UndefinedValue|undefined} value */ -proto.Argument.prototype.setUndefined = function(value) { - jspb.Message.setOneofWrapperField(this, 8, proto.Argument.oneofGroups_[0], value); -}; - - -/** - * Clears the message field making it undefined. - */ -proto.Argument.prototype.clearUndefined = function() { - this.setUndefined(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.Argument.prototype.hasUndefined = function() { - return jspb.Message.getField(this, 8) != null; -}; - - -/** - * optional double number = 9; - * @return {number} - */ -proto.Argument.prototype.getNumber = function() { - return /** @type {number} */ (+jspb.Message.getFieldWithDefault(this, 9, 0.0)); -}; - - -/** @param {number} value */ -proto.Argument.prototype.setNumber = function(value) { - jspb.Message.setOneofField(this, 9, proto.Argument.oneofGroups_[0], value); -}; - - -/** - * Clears the field making it undefined. - */ -proto.Argument.prototype.clearNumber = function() { - jspb.Message.setOneofField(this, 9, proto.Argument.oneofGroups_[0], undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.Argument.prototype.hasNumber = function() { - return jspb.Message.getField(this, 9) != null; -}; - - -/** - * optional string string = 10; - * @return {string} - */ -proto.Argument.prototype.getString = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 10, "")); -}; - - -/** @param {string} value */ -proto.Argument.prototype.setString = function(value) { - jspb.Message.setOneofField(this, 10, proto.Argument.oneofGroups_[0], value); -}; - - -/** - * Clears the field making it undefined. - */ -proto.Argument.prototype.clearString = function() { - jspb.Message.setOneofField(this, 10, proto.Argument.oneofGroups_[0], undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.Argument.prototype.hasString = function() { - return jspb.Message.getField(this, 10) != null; -}; - - -/** - * optional bool boolean = 11; - * Note that Boolean fields may be set to 0/1 when serialized from a Java server. - * You should avoid comparisons like {@code val === true/false} in those cases. - * @return {boolean} - */ -proto.Argument.prototype.getBoolean = function() { - return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 11, false)); -}; - - -/** @param {boolean} value */ -proto.Argument.prototype.setBoolean = function(value) { - jspb.Message.setOneofField(this, 11, proto.Argument.oneofGroups_[0], value); -}; - - -/** - * Clears the field making it undefined. - */ -proto.Argument.prototype.clearBoolean = function() { - jspb.Message.setOneofField(this, 11, proto.Argument.oneofGroups_[0], undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.Argument.prototype.hasBoolean = function() { - return jspb.Message.getField(this, 11) != null; -}; - - -/** - * optional DateValue date = 12; - * @return {?proto.Argument.DateValue} - */ -proto.Argument.prototype.getDate = function() { - return /** @type{?proto.Argument.DateValue} */ ( - jspb.Message.getWrapperField(this, proto.Argument.DateValue, 12)); -}; - - -/** @param {?proto.Argument.DateValue|undefined} value */ -proto.Argument.prototype.setDate = function(value) { - jspb.Message.setOneofWrapperField(this, 12, proto.Argument.oneofGroups_[0], value); -}; - - -/** - * Clears the message field making it undefined. - */ -proto.Argument.prototype.clearDate = function() { - this.setDate(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.Argument.prototype.hasDate = function() { - return jspb.Message.getField(this, 12) != null; -}; - - - -/** - * Oneof group definitions for this message. Each group defines the field - * numbers belonging to that group. When of these fields' value is set, all - * other fields in the group are cleared. During deserialization, if multiple - * fields are encountered for a group, only the last value seen will be kept. - * @private {!Array>} - * @const - */ -proto.Method.oneofGroups_ = [[1,2]]; - -/** - * @enum {number} - */ -proto.Method.MsgCase = { - MSG_NOT_SET: 0, - NAMED_PROXY: 1, - NUMBERED_PROXY: 2 -}; - -/** - * @return {proto.Method.MsgCase} - */ -proto.Method.prototype.getMsgCase = function() { - return /** @type {proto.Method.MsgCase} */(jspb.Message.computeOneofCase(this, proto.Method.oneofGroups_[0])); -}; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto suitable for use in Soy templates. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration - * @return {!Object} - */ -proto.Method.prototype.toObject = function(opt_includeInstance) { - return proto.Method.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.Method} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.Method.toObject = function(includeInstance, msg) { - var f, obj = { - namedProxy: (f = msg.getNamedProxy()) && proto.Method.Named.toObject(includeInstance, f), - numberedProxy: (f = msg.getNumberedProxy()) && proto.Method.Numbered.toObject(includeInstance, f) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.Method} - */ -proto.Method.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.Method; - return proto.Method.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.Method} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.Method} - */ -proto.Method.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.Method.Named; - reader.readMessage(value,proto.Method.Named.deserializeBinaryFromReader); - msg.setNamedProxy(value); - break; - case 2: - var value = new proto.Method.Numbered; - reader.readMessage(value,proto.Method.Numbered.deserializeBinaryFromReader); - msg.setNumberedProxy(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.Method.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.Method.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.Method} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.Method.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getNamedProxy(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.Method.Named.serializeBinaryToWriter - ); - } - f = message.getNumberedProxy(); - if (f != null) { - writer.writeMessage( - 2, - f, - proto.Method.Numbered.serializeBinaryToWriter - ); - } -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.Method.Named.repeatedFields_ = [4]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto suitable for use in Soy templates. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration - * @return {!Object} - */ -proto.Method.Named.prototype.toObject = function(opt_includeInstance) { - return proto.Method.Named.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.Method.Named} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.Method.Named.toObject = function(includeInstance, msg) { - var f, obj = { - id: jspb.Message.getFieldWithDefault(msg, 1, 0), - module: jspb.Message.getFieldWithDefault(msg, 2, 0), - method: jspb.Message.getFieldWithDefault(msg, 3, ""), - argsList: jspb.Message.toObjectList(msg.getArgsList(), - proto.Argument.toObject, includeInstance) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.Method.Named} - */ -proto.Method.Named.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.Method.Named; - return proto.Method.Named.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.Method.Named} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.Method.Named} - */ -proto.Method.Named.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readUint64()); - msg.setId(value); - break; - case 2: - var value = /** @type {!proto.Module} */ (reader.readEnum()); - msg.setModule(value); - break; - case 3: - var value = /** @type {string} */ (reader.readString()); - msg.setMethod(value); - break; - case 4: - var value = new proto.Argument; - reader.readMessage(value,proto.Argument.deserializeBinaryFromReader); - msg.addArgs(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.Method.Named.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.Method.Named.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.Method.Named} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.Method.Named.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getId(); - if (f !== 0) { - writer.writeUint64( - 1, - f - ); - } - f = message.getModule(); - if (f !== 0.0) { - writer.writeEnum( - 2, - f - ); - } - f = message.getMethod(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } - f = message.getArgsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 4, - f, - proto.Argument.serializeBinaryToWriter - ); - } -}; - - -/** - * optional uint64 id = 1; - * @return {number} - */ -proto.Method.Named.prototype.getId = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** @param {number} value */ -proto.Method.Named.prototype.setId = function(value) { - jspb.Message.setProto3IntField(this, 1, value); -}; - - -/** - * optional Module module = 2; - * @return {!proto.Module} - */ -proto.Method.Named.prototype.getModule = function() { - return /** @type {!proto.Module} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** @param {!proto.Module} value */ -proto.Method.Named.prototype.setModule = function(value) { - jspb.Message.setProto3EnumField(this, 2, value); -}; - - -/** - * optional string method = 3; - * @return {string} - */ -proto.Method.Named.prototype.getMethod = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** @param {string} value */ -proto.Method.Named.prototype.setMethod = function(value) { - jspb.Message.setProto3StringField(this, 3, value); -}; - - -/** - * repeated Argument args = 4; - * @return {!Array} - */ -proto.Method.Named.prototype.getArgsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.Argument, 4)); -}; - - -/** @param {!Array} value */ -proto.Method.Named.prototype.setArgsList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 4, value); -}; - - -/** - * @param {!proto.Argument=} opt_value - * @param {number=} opt_index - * @return {!proto.Argument} - */ -proto.Method.Named.prototype.addArgs = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 4, opt_value, proto.Argument, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - */ -proto.Method.Named.prototype.clearArgsList = function() { - this.setArgsList([]); -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.Method.Numbered.repeatedFields_ = [4]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto suitable for use in Soy templates. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration - * @return {!Object} - */ -proto.Method.Numbered.prototype.toObject = function(opt_includeInstance) { - return proto.Method.Numbered.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.Method.Numbered} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.Method.Numbered.toObject = function(includeInstance, msg) { - var f, obj = { - id: jspb.Message.getFieldWithDefault(msg, 1, 0), - proxyId: jspb.Message.getFieldWithDefault(msg, 2, 0), - method: jspb.Message.getFieldWithDefault(msg, 3, ""), - argsList: jspb.Message.toObjectList(msg.getArgsList(), - proto.Argument.toObject, includeInstance) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.Method.Numbered} - */ -proto.Method.Numbered.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.Method.Numbered; - return proto.Method.Numbered.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.Method.Numbered} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.Method.Numbered} - */ -proto.Method.Numbered.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readUint64()); - msg.setId(value); - break; - case 2: - var value = /** @type {number} */ (reader.readUint64()); - msg.setProxyId(value); - break; - case 3: - var value = /** @type {string} */ (reader.readString()); - msg.setMethod(value); - break; - case 4: - var value = new proto.Argument; - reader.readMessage(value,proto.Argument.deserializeBinaryFromReader); - msg.addArgs(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.Method.Numbered.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.Method.Numbered.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.Method.Numbered} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.Method.Numbered.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getId(); - if (f !== 0) { - writer.writeUint64( - 1, - f - ); - } - f = message.getProxyId(); - if (f !== 0) { - writer.writeUint64( - 2, - f - ); - } - f = message.getMethod(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } - f = message.getArgsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 4, - f, - proto.Argument.serializeBinaryToWriter - ); - } -}; - - -/** - * optional uint64 id = 1; - * @return {number} - */ -proto.Method.Numbered.prototype.getId = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** @param {number} value */ -proto.Method.Numbered.prototype.setId = function(value) { - jspb.Message.setProto3IntField(this, 1, value); -}; - - -/** - * optional uint64 proxy_id = 2; - * @return {number} - */ -proto.Method.Numbered.prototype.getProxyId = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** @param {number} value */ -proto.Method.Numbered.prototype.setProxyId = function(value) { - jspb.Message.setProto3IntField(this, 2, value); -}; - - -/** - * optional string method = 3; - * @return {string} - */ -proto.Method.Numbered.prototype.getMethod = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** @param {string} value */ -proto.Method.Numbered.prototype.setMethod = function(value) { - jspb.Message.setProto3StringField(this, 3, value); -}; - - -/** - * repeated Argument args = 4; - * @return {!Array} - */ -proto.Method.Numbered.prototype.getArgsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.Argument, 4)); -}; - - -/** @param {!Array} value */ -proto.Method.Numbered.prototype.setArgsList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 4, value); -}; - - -/** - * @param {!proto.Argument=} opt_value - * @param {number=} opt_index - * @return {!proto.Argument} - */ -proto.Method.Numbered.prototype.addArgs = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 4, opt_value, proto.Argument, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - */ -proto.Method.Numbered.prototype.clearArgsList = function() { - this.setArgsList([]); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto suitable for use in Soy templates. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration - * @return {!Object} - */ -proto.Method.Fail.prototype.toObject = function(opt_includeInstance) { - return proto.Method.Fail.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.Method.Fail} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.Method.Fail.toObject = function(includeInstance, msg) { - var f, obj = { - id: jspb.Message.getFieldWithDefault(msg, 1, 0), - response: (f = msg.getResponse()) && proto.Argument.toObject(includeInstance, f) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.Method.Fail} - */ -proto.Method.Fail.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.Method.Fail; - return proto.Method.Fail.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.Method.Fail} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.Method.Fail} - */ -proto.Method.Fail.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readUint64()); - msg.setId(value); - break; - case 2: - var value = new proto.Argument; - reader.readMessage(value,proto.Argument.deserializeBinaryFromReader); - msg.setResponse(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.Method.Fail.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.Method.Fail.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.Method.Fail} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.Method.Fail.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getId(); - if (f !== 0) { - writer.writeUint64( - 1, - f - ); - } - f = message.getResponse(); - if (f != null) { - writer.writeMessage( - 2, - f, - proto.Argument.serializeBinaryToWriter - ); - } -}; - - -/** - * optional uint64 id = 1; - * @return {number} - */ -proto.Method.Fail.prototype.getId = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** @param {number} value */ -proto.Method.Fail.prototype.setId = function(value) { - jspb.Message.setProto3IntField(this, 1, value); -}; - - -/** - * optional Argument response = 2; - * @return {?proto.Argument} - */ -proto.Method.Fail.prototype.getResponse = function() { - return /** @type{?proto.Argument} */ ( - jspb.Message.getWrapperField(this, proto.Argument, 2)); -}; - - -/** @param {?proto.Argument|undefined} value */ -proto.Method.Fail.prototype.setResponse = function(value) { - jspb.Message.setWrapperField(this, 2, value); -}; - - -/** - * Clears the message field making it undefined. - */ -proto.Method.Fail.prototype.clearResponse = function() { - this.setResponse(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.Method.Fail.prototype.hasResponse = function() { - return jspb.Message.getField(this, 2) != null; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto suitable for use in Soy templates. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration - * @return {!Object} - */ -proto.Method.Success.prototype.toObject = function(opt_includeInstance) { - return proto.Method.Success.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.Method.Success} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.Method.Success.toObject = function(includeInstance, msg) { - var f, obj = { - id: jspb.Message.getFieldWithDefault(msg, 1, 0), - response: (f = msg.getResponse()) && proto.Argument.toObject(includeInstance, f) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.Method.Success} - */ -proto.Method.Success.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.Method.Success; - return proto.Method.Success.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.Method.Success} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.Method.Success} - */ -proto.Method.Success.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readUint64()); - msg.setId(value); - break; - case 2: - var value = new proto.Argument; - reader.readMessage(value,proto.Argument.deserializeBinaryFromReader); - msg.setResponse(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.Method.Success.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.Method.Success.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.Method.Success} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.Method.Success.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getId(); - if (f !== 0) { - writer.writeUint64( - 1, - f - ); - } - f = message.getResponse(); - if (f != null) { - writer.writeMessage( - 2, - f, - proto.Argument.serializeBinaryToWriter - ); - } -}; - - -/** - * optional uint64 id = 1; - * @return {number} - */ -proto.Method.Success.prototype.getId = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** @param {number} value */ -proto.Method.Success.prototype.setId = function(value) { - jspb.Message.setProto3IntField(this, 1, value); -}; - - -/** - * optional Argument response = 2; - * @return {?proto.Argument} - */ -proto.Method.Success.prototype.getResponse = function() { - return /** @type{?proto.Argument} */ ( - jspb.Message.getWrapperField(this, proto.Argument, 2)); -}; - - -/** @param {?proto.Argument|undefined} value */ -proto.Method.Success.prototype.setResponse = function(value) { - jspb.Message.setWrapperField(this, 2, value); -}; - - -/** - * Clears the message field making it undefined. - */ -proto.Method.Success.prototype.clearResponse = function() { - this.setResponse(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.Method.Success.prototype.hasResponse = function() { - return jspb.Message.getField(this, 2) != null; -}; - - -/** - * optional Named named_proxy = 1; - * @return {?proto.Method.Named} - */ -proto.Method.prototype.getNamedProxy = function() { - return /** @type{?proto.Method.Named} */ ( - jspb.Message.getWrapperField(this, proto.Method.Named, 1)); -}; - - -/** @param {?proto.Method.Named|undefined} value */ -proto.Method.prototype.setNamedProxy = function(value) { - jspb.Message.setOneofWrapperField(this, 1, proto.Method.oneofGroups_[0], value); -}; - - -/** - * Clears the message field making it undefined. - */ -proto.Method.prototype.clearNamedProxy = function() { - this.setNamedProxy(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.Method.prototype.hasNamedProxy = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional Numbered numbered_proxy = 2; - * @return {?proto.Method.Numbered} - */ -proto.Method.prototype.getNumberedProxy = function() { - return /** @type{?proto.Method.Numbered} */ ( - jspb.Message.getWrapperField(this, proto.Method.Numbered, 2)); -}; - - -/** @param {?proto.Method.Numbered|undefined} value */ -proto.Method.prototype.setNumberedProxy = function(value) { - jspb.Message.setOneofWrapperField(this, 2, proto.Method.oneofGroups_[0], value); -}; - - -/** - * Clears the message field making it undefined. - */ -proto.Method.prototype.clearNumberedProxy = function() { - this.setNumberedProxy(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.Method.prototype.hasNumberedProxy = function() { - return jspb.Message.getField(this, 2) != null; -}; - - - -/** - * Oneof group definitions for this message. Each group defines the field - * numbers belonging to that group. When of these fields' value is set, all - * other fields in the group are cleared. During deserialization, if multiple - * fields are encountered for a group, only the last value seen will be kept. - * @private {!Array>} - * @const - */ -proto.Callback.oneofGroups_ = [[1,2]]; - -/** - * @enum {number} - */ -proto.Callback.MsgCase = { - MSG_NOT_SET: 0, - NAMED_CALLBACK: 1, - NUMBERED_CALLBACK: 2 -}; - -/** - * @return {proto.Callback.MsgCase} - */ -proto.Callback.prototype.getMsgCase = function() { - return /** @type {proto.Callback.MsgCase} */(jspb.Message.computeOneofCase(this, proto.Callback.oneofGroups_[0])); -}; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto suitable for use in Soy templates. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration - * @return {!Object} - */ -proto.Callback.prototype.toObject = function(opt_includeInstance) { - return proto.Callback.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.Callback} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.Callback.toObject = function(includeInstance, msg) { - var f, obj = { - namedCallback: (f = msg.getNamedCallback()) && proto.Callback.Named.toObject(includeInstance, f), - numberedCallback: (f = msg.getNumberedCallback()) && proto.Callback.Numbered.toObject(includeInstance, f) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.Callback} - */ -proto.Callback.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.Callback; - return proto.Callback.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.Callback} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.Callback} - */ -proto.Callback.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.Callback.Named; - reader.readMessage(value,proto.Callback.Named.deserializeBinaryFromReader); - msg.setNamedCallback(value); - break; - case 2: - var value = new proto.Callback.Numbered; - reader.readMessage(value,proto.Callback.Numbered.deserializeBinaryFromReader); - msg.setNumberedCallback(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.Callback.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.Callback.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.Callback} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.Callback.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getNamedCallback(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.Callback.Named.serializeBinaryToWriter - ); - } - f = message.getNumberedCallback(); - if (f != null) { - writer.writeMessage( - 2, - f, - proto.Callback.Numbered.serializeBinaryToWriter - ); - } -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.Callback.Named.repeatedFields_ = [3]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto suitable for use in Soy templates. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration - * @return {!Object} - */ -proto.Callback.Named.prototype.toObject = function(opt_includeInstance) { - return proto.Callback.Named.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.Callback.Named} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.Callback.Named.toObject = function(includeInstance, msg) { - var f, obj = { - module: jspb.Message.getFieldWithDefault(msg, 1, 0), - callbackId: jspb.Message.getFieldWithDefault(msg, 2, 0), - argsList: jspb.Message.toObjectList(msg.getArgsList(), - proto.Argument.toObject, includeInstance) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.Callback.Named} - */ -proto.Callback.Named.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.Callback.Named; - return proto.Callback.Named.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.Callback.Named} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.Callback.Named} - */ -proto.Callback.Named.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!proto.Module} */ (reader.readEnum()); - msg.setModule(value); - break; - case 2: - var value = /** @type {number} */ (reader.readUint64()); - msg.setCallbackId(value); - break; - case 3: - var value = new proto.Argument; - reader.readMessage(value,proto.Argument.deserializeBinaryFromReader); - msg.addArgs(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.Callback.Named.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.Callback.Named.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.Callback.Named} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.Callback.Named.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getModule(); - if (f !== 0.0) { - writer.writeEnum( - 1, - f - ); - } - f = message.getCallbackId(); - if (f !== 0) { - writer.writeUint64( - 2, - f - ); - } - f = message.getArgsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 3, - f, - proto.Argument.serializeBinaryToWriter - ); - } -}; - - -/** - * optional Module module = 1; - * @return {!proto.Module} - */ -proto.Callback.Named.prototype.getModule = function() { - return /** @type {!proto.Module} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** @param {!proto.Module} value */ -proto.Callback.Named.prototype.setModule = function(value) { - jspb.Message.setProto3EnumField(this, 1, value); -}; - - -/** - * optional uint64 callback_id = 2; - * @return {number} - */ -proto.Callback.Named.prototype.getCallbackId = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** @param {number} value */ -proto.Callback.Named.prototype.setCallbackId = function(value) { - jspb.Message.setProto3IntField(this, 2, value); -}; - - -/** - * repeated Argument args = 3; - * @return {!Array} - */ -proto.Callback.Named.prototype.getArgsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.Argument, 3)); -}; - - -/** @param {!Array} value */ -proto.Callback.Named.prototype.setArgsList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 3, value); -}; - - -/** - * @param {!proto.Argument=} opt_value - * @param {number=} opt_index - * @return {!proto.Argument} - */ -proto.Callback.Named.prototype.addArgs = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.Argument, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - */ -proto.Callback.Named.prototype.clearArgsList = function() { - this.setArgsList([]); -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.Callback.Numbered.repeatedFields_ = [3]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto suitable for use in Soy templates. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration - * @return {!Object} - */ -proto.Callback.Numbered.prototype.toObject = function(opt_includeInstance) { - return proto.Callback.Numbered.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.Callback.Numbered} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.Callback.Numbered.toObject = function(includeInstance, msg) { - var f, obj = { - proxyId: jspb.Message.getFieldWithDefault(msg, 1, 0), - callbackId: jspb.Message.getFieldWithDefault(msg, 2, 0), - argsList: jspb.Message.toObjectList(msg.getArgsList(), - proto.Argument.toObject, includeInstance) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.Callback.Numbered} - */ -proto.Callback.Numbered.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.Callback.Numbered; - return proto.Callback.Numbered.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.Callback.Numbered} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.Callback.Numbered} - */ -proto.Callback.Numbered.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readUint64()); - msg.setProxyId(value); - break; - case 2: - var value = /** @type {number} */ (reader.readUint64()); - msg.setCallbackId(value); - break; - case 3: - var value = new proto.Argument; - reader.readMessage(value,proto.Argument.deserializeBinaryFromReader); - msg.addArgs(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.Callback.Numbered.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.Callback.Numbered.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.Callback.Numbered} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.Callback.Numbered.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getProxyId(); - if (f !== 0) { - writer.writeUint64( - 1, - f - ); - } - f = message.getCallbackId(); - if (f !== 0) { - writer.writeUint64( - 2, - f - ); - } - f = message.getArgsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 3, - f, - proto.Argument.serializeBinaryToWriter - ); - } -}; - - -/** - * optional uint64 proxy_id = 1; - * @return {number} - */ -proto.Callback.Numbered.prototype.getProxyId = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** @param {number} value */ -proto.Callback.Numbered.prototype.setProxyId = function(value) { - jspb.Message.setProto3IntField(this, 1, value); -}; - - -/** - * optional uint64 callback_id = 2; - * @return {number} - */ -proto.Callback.Numbered.prototype.getCallbackId = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** @param {number} value */ -proto.Callback.Numbered.prototype.setCallbackId = function(value) { - jspb.Message.setProto3IntField(this, 2, value); -}; - - -/** - * repeated Argument args = 3; - * @return {!Array} - */ -proto.Callback.Numbered.prototype.getArgsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.Argument, 3)); -}; - - -/** @param {!Array} value */ -proto.Callback.Numbered.prototype.setArgsList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 3, value); -}; - - -/** - * @param {!proto.Argument=} opt_value - * @param {number=} opt_index - * @return {!proto.Argument} - */ -proto.Callback.Numbered.prototype.addArgs = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.Argument, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - */ -proto.Callback.Numbered.prototype.clearArgsList = function() { - this.setArgsList([]); -}; - - -/** - * optional Named named_callback = 1; - * @return {?proto.Callback.Named} - */ -proto.Callback.prototype.getNamedCallback = function() { - return /** @type{?proto.Callback.Named} */ ( - jspb.Message.getWrapperField(this, proto.Callback.Named, 1)); -}; - - -/** @param {?proto.Callback.Named|undefined} value */ -proto.Callback.prototype.setNamedCallback = function(value) { - jspb.Message.setOneofWrapperField(this, 1, proto.Callback.oneofGroups_[0], value); -}; - - -/** - * Clears the message field making it undefined. - */ -proto.Callback.prototype.clearNamedCallback = function() { - this.setNamedCallback(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.Callback.prototype.hasNamedCallback = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional Numbered numbered_callback = 2; - * @return {?proto.Callback.Numbered} - */ -proto.Callback.prototype.getNumberedCallback = function() { - return /** @type{?proto.Callback.Numbered} */ ( - jspb.Message.getWrapperField(this, proto.Callback.Numbered, 2)); -}; - - -/** @param {?proto.Callback.Numbered|undefined} value */ -proto.Callback.prototype.setNumberedCallback = function(value) { - jspb.Message.setOneofWrapperField(this, 2, proto.Callback.oneofGroups_[0], value); -}; - - -/** - * Clears the message field making it undefined. - */ -proto.Callback.prototype.clearNumberedCallback = function() { - this.setNumberedCallback(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.Callback.prototype.hasNumberedCallback = function() { - return jspb.Message.getField(this, 2) != null; -}; - - - -/** - * Oneof group definitions for this message. Each group defines the field - * numbers belonging to that group. When of these fields' value is set, all - * other fields in the group are cleared. During deserialization, if multiple - * fields are encountered for a group, only the last value seen will be kept. - * @private {!Array>} - * @const - */ -proto.Event.oneofGroups_ = [[1,2]]; - -/** - * @enum {number} - */ -proto.Event.MsgCase = { - MSG_NOT_SET: 0, - NAMED_EVENT: 1, - NUMBERED_EVENT: 2 -}; - -/** - * @return {proto.Event.MsgCase} - */ -proto.Event.prototype.getMsgCase = function() { - return /** @type {proto.Event.MsgCase} */(jspb.Message.computeOneofCase(this, proto.Event.oneofGroups_[0])); -}; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto suitable for use in Soy templates. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration - * @return {!Object} - */ -proto.Event.prototype.toObject = function(opt_includeInstance) { - return proto.Event.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.Event} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.Event.toObject = function(includeInstance, msg) { - var f, obj = { - namedEvent: (f = msg.getNamedEvent()) && proto.Event.Named.toObject(includeInstance, f), - numberedEvent: (f = msg.getNumberedEvent()) && proto.Event.Numbered.toObject(includeInstance, f) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.Event} - */ -proto.Event.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.Event; - return proto.Event.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.Event} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.Event} - */ -proto.Event.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.Event.Named; - reader.readMessage(value,proto.Event.Named.deserializeBinaryFromReader); - msg.setNamedEvent(value); - break; - case 2: - var value = new proto.Event.Numbered; - reader.readMessage(value,proto.Event.Numbered.deserializeBinaryFromReader); - msg.setNumberedEvent(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.Event.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.Event.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.Event} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.Event.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getNamedEvent(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.Event.Named.serializeBinaryToWriter - ); - } - f = message.getNumberedEvent(); - if (f != null) { - writer.writeMessage( - 2, - f, - proto.Event.Numbered.serializeBinaryToWriter - ); - } -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.Event.Named.repeatedFields_ = [3]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto suitable for use in Soy templates. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration - * @return {!Object} - */ -proto.Event.Named.prototype.toObject = function(opt_includeInstance) { - return proto.Event.Named.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.Event.Named} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.Event.Named.toObject = function(includeInstance, msg) { - var f, obj = { - module: jspb.Message.getFieldWithDefault(msg, 1, 0), - event: jspb.Message.getFieldWithDefault(msg, 2, ""), - argsList: jspb.Message.toObjectList(msg.getArgsList(), - proto.Argument.toObject, includeInstance) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.Event.Named} - */ -proto.Event.Named.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.Event.Named; - return proto.Event.Named.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.Event.Named} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.Event.Named} - */ -proto.Event.Named.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!proto.Module} */ (reader.readEnum()); - msg.setModule(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setEvent(value); - break; - case 3: - var value = new proto.Argument; - reader.readMessage(value,proto.Argument.deserializeBinaryFromReader); - msg.addArgs(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.Event.Named.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.Event.Named.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.Event.Named} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.Event.Named.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getModule(); - if (f !== 0.0) { - writer.writeEnum( - 1, - f - ); - } - f = message.getEvent(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getArgsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 3, - f, - proto.Argument.serializeBinaryToWriter - ); - } -}; - - -/** - * optional Module module = 1; - * @return {!proto.Module} - */ -proto.Event.Named.prototype.getModule = function() { - return /** @type {!proto.Module} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** @param {!proto.Module} value */ -proto.Event.Named.prototype.setModule = function(value) { - jspb.Message.setProto3EnumField(this, 1, value); -}; - - -/** - * optional string event = 2; - * @return {string} - */ -proto.Event.Named.prototype.getEvent = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** @param {string} value */ -proto.Event.Named.prototype.setEvent = function(value) { - jspb.Message.setProto3StringField(this, 2, value); -}; - - -/** - * repeated Argument args = 3; - * @return {!Array} - */ -proto.Event.Named.prototype.getArgsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.Argument, 3)); -}; - - -/** @param {!Array} value */ -proto.Event.Named.prototype.setArgsList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 3, value); -}; - - -/** - * @param {!proto.Argument=} opt_value - * @param {number=} opt_index - * @return {!proto.Argument} - */ -proto.Event.Named.prototype.addArgs = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.Argument, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - */ -proto.Event.Named.prototype.clearArgsList = function() { - this.setArgsList([]); -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.Event.Numbered.repeatedFields_ = [3]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto suitable for use in Soy templates. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration - * @return {!Object} - */ -proto.Event.Numbered.prototype.toObject = function(opt_includeInstance) { - return proto.Event.Numbered.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.Event.Numbered} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.Event.Numbered.toObject = function(includeInstance, msg) { - var f, obj = { - proxyId: jspb.Message.getFieldWithDefault(msg, 1, 0), - event: jspb.Message.getFieldWithDefault(msg, 2, ""), - argsList: jspb.Message.toObjectList(msg.getArgsList(), - proto.Argument.toObject, includeInstance) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.Event.Numbered} - */ -proto.Event.Numbered.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.Event.Numbered; - return proto.Event.Numbered.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.Event.Numbered} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.Event.Numbered} - */ -proto.Event.Numbered.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readUint64()); - msg.setProxyId(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setEvent(value); - break; - case 3: - var value = new proto.Argument; - reader.readMessage(value,proto.Argument.deserializeBinaryFromReader); - msg.addArgs(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.Event.Numbered.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.Event.Numbered.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.Event.Numbered} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.Event.Numbered.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getProxyId(); - if (f !== 0) { - writer.writeUint64( - 1, - f - ); - } - f = message.getEvent(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getArgsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 3, - f, - proto.Argument.serializeBinaryToWriter - ); - } -}; - - -/** - * optional uint64 proxy_id = 1; - * @return {number} - */ -proto.Event.Numbered.prototype.getProxyId = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** @param {number} value */ -proto.Event.Numbered.prototype.setProxyId = function(value) { - jspb.Message.setProto3IntField(this, 1, value); -}; - - -/** - * optional string event = 2; - * @return {string} - */ -proto.Event.Numbered.prototype.getEvent = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** @param {string} value */ -proto.Event.Numbered.prototype.setEvent = function(value) { - jspb.Message.setProto3StringField(this, 2, value); -}; - - -/** - * repeated Argument args = 3; - * @return {!Array} - */ -proto.Event.Numbered.prototype.getArgsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.Argument, 3)); -}; - - -/** @param {!Array} value */ -proto.Event.Numbered.prototype.setArgsList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 3, value); -}; - - -/** - * @param {!proto.Argument=} opt_value - * @param {number=} opt_index - * @return {!proto.Argument} - */ -proto.Event.Numbered.prototype.addArgs = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.Argument, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - */ -proto.Event.Numbered.prototype.clearArgsList = function() { - this.setArgsList([]); -}; - - -/** - * optional Named named_event = 1; - * @return {?proto.Event.Named} - */ -proto.Event.prototype.getNamedEvent = function() { - return /** @type{?proto.Event.Named} */ ( - jspb.Message.getWrapperField(this, proto.Event.Named, 1)); -}; - - -/** @param {?proto.Event.Named|undefined} value */ -proto.Event.prototype.setNamedEvent = function(value) { - jspb.Message.setOneofWrapperField(this, 1, proto.Event.oneofGroups_[0], value); -}; - - -/** - * Clears the message field making it undefined. - */ -proto.Event.prototype.clearNamedEvent = function() { - this.setNamedEvent(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.Event.prototype.hasNamedEvent = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional Numbered numbered_event = 2; - * @return {?proto.Event.Numbered} - */ -proto.Event.prototype.getNumberedEvent = function() { - return /** @type{?proto.Event.Numbered} */ ( - jspb.Message.getWrapperField(this, proto.Event.Numbered, 2)); -}; - - -/** @param {?proto.Event.Numbered|undefined} value */ -proto.Event.prototype.setNumberedEvent = function(value) { - jspb.Message.setOneofWrapperField(this, 2, proto.Event.oneofGroups_[0], value); -}; - - -/** - * Clears the message field making it undefined. - */ -proto.Event.prototype.clearNumberedEvent = function() { - this.setNumberedEvent(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.Event.prototype.hasNumberedEvent = function() { - return jspb.Message.getField(this, 2) != null; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto suitable for use in Soy templates. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration - * @return {!Object} - */ -proto.Ping.prototype.toObject = function(opt_includeInstance) { - return proto.Ping.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.Ping} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.Ping.toObject = function(includeInstance, msg) { - var f, obj = { - - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.Ping} - */ -proto.Ping.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.Ping; - return proto.Ping.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.Ping} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.Ping} - */ -proto.Ping.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.Ping.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.Ping.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.Ping} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.Ping.serializeBinaryToWriter = function(message, writer) { - var f = undefined; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto suitable for use in Soy templates. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration - * @return {!Object} - */ -proto.Pong.prototype.toObject = function(opt_includeInstance) { - return proto.Pong.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.Pong} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.Pong.toObject = function(includeInstance, msg) { - var f, obj = { - - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.Pong} - */ -proto.Pong.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.Pong; - return proto.Pong.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.Pong} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.Pong} - */ -proto.Pong.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.Pong.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.Pong.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.Pong} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.Pong.serializeBinaryToWriter = function(message, writer) { - var f = undefined; -}; - - -/** - * @enum {number} - */ -proto.Module = { - CHILDPROCESS: 0, - FS: 1, - NET: 2, - NODEPTY: 3, - SPDLOG: 4, - TRASH: 5 -}; - -goog.object.extend(exports, proto); diff --git a/packages/protocol/src/proto/vscode.proto b/packages/protocol/src/proto/vscode.proto deleted file mode 100644 index 3e62b65f..00000000 --- a/packages/protocol/src/proto/vscode.proto +++ /dev/null @@ -1,7 +0,0 @@ -syntax = "proto3"; - -// Sent when a shared process becomes active -message SharedProcessActive { - string socket_path = 1; - string log_path = 2; -} diff --git a/packages/protocol/src/proto/vscode_pb.d.ts b/packages/protocol/src/proto/vscode_pb.d.ts deleted file mode 100644 index f2a4ff4e..00000000 --- a/packages/protocol/src/proto/vscode_pb.d.ts +++ /dev/null @@ -1,29 +0,0 @@ -// package: -// file: vscode.proto - -import * as jspb from "google-protobuf"; - -export class SharedProcessActive extends jspb.Message { - getSocketPath(): string; - setSocketPath(value: string): void; - - getLogPath(): string; - setLogPath(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): SharedProcessActive.AsObject; - static toObject(includeInstance: boolean, msg: SharedProcessActive): SharedProcessActive.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: SharedProcessActive, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): SharedProcessActive; - static deserializeBinaryFromReader(message: SharedProcessActive, reader: jspb.BinaryReader): SharedProcessActive; -} - -export namespace SharedProcessActive { - export type AsObject = { - socketPath: string, - logPath: string, - } -} - diff --git a/packages/protocol/src/proto/vscode_pb.js b/packages/protocol/src/proto/vscode_pb.js deleted file mode 100644 index 982bcf34..00000000 --- a/packages/protocol/src/proto/vscode_pb.js +++ /dev/null @@ -1,188 +0,0 @@ -/** - * @fileoverview - * @enhanceable - * @suppress {messageConventions} JS Compiler reports an error if a variable or - * field starts with 'MSG_' and isn't a translatable message. - * @public - */ -// GENERATED CODE -- DO NOT EDIT! - -var jspb = require('google-protobuf'); -var goog = jspb; -var global = Function('return this')(); - -goog.exportSymbol('proto.SharedProcessActive', null, global); -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.SharedProcessActive = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.SharedProcessActive, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.SharedProcessActive.displayName = 'proto.SharedProcessActive'; -} - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto suitable for use in Soy templates. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration - * @return {!Object} - */ -proto.SharedProcessActive.prototype.toObject = function(opt_includeInstance) { - return proto.SharedProcessActive.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.SharedProcessActive} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.SharedProcessActive.toObject = function(includeInstance, msg) { - var f, obj = { - socketPath: jspb.Message.getFieldWithDefault(msg, 1, ""), - logPath: jspb.Message.getFieldWithDefault(msg, 2, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.SharedProcessActive} - */ -proto.SharedProcessActive.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.SharedProcessActive; - return proto.SharedProcessActive.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.SharedProcessActive} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.SharedProcessActive} - */ -proto.SharedProcessActive.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setSocketPath(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setLogPath(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.SharedProcessActive.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.SharedProcessActive.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.SharedProcessActive} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.SharedProcessActive.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getSocketPath(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getLogPath(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } -}; - - -/** - * optional string socket_path = 1; - * @return {string} - */ -proto.SharedProcessActive.prototype.getSocketPath = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** @param {string} value */ -proto.SharedProcessActive.prototype.setSocketPath = function(value) { - jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional string log_path = 2; - * @return {string} - */ -proto.SharedProcessActive.prototype.getLogPath = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** @param {string} value */ -proto.SharedProcessActive.prototype.setLogPath = function(value) { - jspb.Message.setProto3StringField(this, 2, value); -}; - - -goog.object.extend(exports, proto); diff --git a/packages/protocol/test/child_process.test.ts b/packages/protocol/test/child_process.test.ts deleted file mode 100644 index 782e92d3..00000000 --- a/packages/protocol/test/child_process.test.ts +++ /dev/null @@ -1,103 +0,0 @@ -import { ChildProcess } from "child_process"; -import * as path from "path"; -import { Readable } from "stream"; -import * as util from "util"; -import { createClient } from "@coder/protocol/test"; -import { Module } from "../src/common/proxy"; - -describe("child_process", () => { - const client = createClient(); - const cp = client.modules[Module.ChildProcess]; - - const getStdout = async (proc: ChildProcess): Promise => { - return new Promise((r): Readable => proc.stdout!.once("data", r)) - .then((s) => s.toString()); - }; - - describe("exec", () => { - it("should get exec stdout", async () => { - await expect(util.promisify(cp.exec)("echo test", { encoding: "utf8" })) - .resolves.toEqual({ - stdout: "test\n", - stderr: "", - }); - }); - }); - - describe("spawn", () => { - it("should get spawn stdout", async () => { - const proc = cp.spawn("echo", ["test"]); - await expect(Promise.all([ - getStdout(proc), - new Promise((r): ChildProcess => proc.on("exit", r)), - ]).then((values) => values[0])).resolves.toEqual("test\n"); - }); - - it("should cat", async () => { - const proc = cp.spawn("cat", []); - expect(proc.pid).toBe(-1); - proc.stdin!.write("banana"); - await expect(getStdout(proc)).resolves.toBe("banana"); - - proc.stdin!.end(); - proc.kill(); - - expect(proc.pid).toBeGreaterThan(-1); - await new Promise((r): ChildProcess => proc.on("exit", r)); - }); - - it("should print env", async () => { - const proc = cp.spawn("env", [], { - env: { hi: "donkey" }, - }); - - await expect(getStdout(proc)).resolves.toContain("hi=donkey\n"); - }); - - it("should eval", async () => { - const proc = cp.spawn("node", ["-e", "console.log('foo')"]); - await expect(getStdout(proc)).resolves.toContain("foo"); - }); - }); - - describe("fork", () => { - it("should echo messages", async () => { - const proc = cp.fork(path.join(__dirname, "forker.js")); - - proc.send({ bananas: true }); - - await expect(new Promise((r): ChildProcess => proc.on("message", r))) - .resolves.toMatchObject({ - bananas: true, - }); - - proc.kill(); - - await new Promise((r): ChildProcess => proc.on("exit", r)); - }); - }); - - it("should dispose", (done) => { - setTimeout(() => { - client.dispose(); - done(); - }, 100); - }); - - it("should disconnect", async () => { - const client = createClient(); - const cp = client.modules[Module.ChildProcess]; - const proc = cp.fork(path.join(__dirname, "forker.js")); - const fn = jest.fn(); - proc.on("error", fn); - - proc.send({ bananas: true }); - await expect(new Promise((r): ChildProcess => proc.on("message", r))) - .resolves.toMatchObject({ - bananas: true, - }); - - client.dispose(); - expect(fn).toHaveBeenCalledWith(new Error("disconnected")); - }); -}); diff --git a/packages/protocol/test/forker.js b/packages/protocol/test/forker.js deleted file mode 100644 index f676683e..00000000 --- a/packages/protocol/test/forker.js +++ /dev/null @@ -1,3 +0,0 @@ -process.on("message", (data) => { - process.send(data); -}); diff --git a/packages/protocol/test/fs.test.ts b/packages/protocol/test/fs.test.ts deleted file mode 100644 index c8db7498..00000000 --- a/packages/protocol/test/fs.test.ts +++ /dev/null @@ -1,630 +0,0 @@ -import * as nativeFs from "fs"; -import * as path from "path"; -import * as util from "util"; -import { Module } from "../src/common/proxy"; -import { createClient, Helper } from "./helpers"; - -// tslint:disable deprecation to use fs.exists - -describe("fs", () => { - const client = createClient(); - // tslint:disable-next-line no-any - const fs = client.modules[Module.Fs] as any as typeof import("fs"); - const helper = new Helper("fs"); - - beforeAll(async () => { - await helper.prepare(); - }); - - describe("access", () => { - it("should access existing file", async () => { - await expect(util.promisify(fs.access)(__filename)) - .resolves.toBeUndefined(); - }); - - it("should fail to access nonexistent file", async () => { - await expect(util.promisify(fs.access)(helper.tmpFile())) - .rejects.toThrow("ENOENT"); - }); - }); - - describe("append", () => { - it("should append to existing file", async () => { - const file = await helper.createTmpFile(); - await expect(util.promisify(fs.appendFile)(file, "howdy")) - .resolves.toBeUndefined(); - expect(await util.promisify(nativeFs.readFile)(file, "utf8")) - .toEqual("howdy"); - }); - - it("should create then append to nonexistent file", async () => { - const file = helper.tmpFile(); - await expect(util.promisify(fs.appendFile)(file, "howdy")) - .resolves.toBeUndefined(); - expect(await util.promisify(nativeFs.readFile)(file, "utf8")) - .toEqual("howdy"); - }); - - it("should fail to append to file in nonexistent directory", async () => { - const file = path.join(helper.tmpFile(), "nope"); - await expect(util.promisify(fs.appendFile)(file, "howdy")) - .rejects.toThrow("ENOENT"); - expect(await util.promisify(nativeFs.exists)(file)) - .toEqual(false); - }); - }); - - describe("chmod", () => { - it("should chmod existing file", async () => { - const file = await helper.createTmpFile(); - await expect(util.promisify(fs.chmod)(file, "755")) - .resolves.toBeUndefined(); - }); - - it("should fail to chmod nonexistent file", async () => { - await expect(util.promisify(fs.chmod)(helper.tmpFile(), "755")) - .rejects.toThrow("ENOENT"); - }); - }); - - describe("chown", () => { - it("should chown existing file", async () => { - const file = await helper.createTmpFile(); - await expect(util.promisify(nativeFs.chown)(file, 1000, 1000)) - .resolves.toBeUndefined(); - }); - - it("should fail to chown nonexistent file", async () => { - await expect(util.promisify(fs.chown)(helper.tmpFile(), 1000, 1000)) - .rejects.toThrow("ENOENT"); - }); - }); - - describe("close", () => { - it("should close opened file", async () => { - const file = await helper.createTmpFile(); - const fd = await util.promisify(nativeFs.open)(file, "r"); - await expect(util.promisify(fs.close)(fd)) - .resolves.toBeUndefined(); - }); - - it("should fail to close non-opened file", async () => { - await expect(util.promisify(fs.close)(99999999)) - .rejects.toThrow("EBADF"); - }); - }); - - describe("copyFile", () => { - it("should copy existing file", async () => { - const source = await helper.createTmpFile(); - const destination = helper.tmpFile(); - await expect(util.promisify(fs.copyFile)(source, destination)) - .resolves.toBeUndefined(); - await expect(util.promisify(fs.exists)(destination)) - .resolves.toBe(true); - }); - - it("should fail to copy nonexistent file", async () => { - await expect(util.promisify(fs.copyFile)(helper.tmpFile(), helper.tmpFile())) - .rejects.toThrow("ENOENT"); - }); - }); - - describe("createWriteStream", () => { - it("should write to file", async () => { - const file = helper.tmpFile(); - const content = "howdy\nhow\nr\nu"; - const stream = fs.createWriteStream(file); - stream.on("open", (fd) => { - expect(fd).toBeDefined(); - stream.write(content); - stream.close(); - stream.end(); - }); - - await Promise.all([ - new Promise((resolve): nativeFs.WriteStream => stream.on("close", resolve)), - new Promise((resolve): nativeFs.WriteStream => stream.on("finish", resolve)), - ]); - - await expect(util.promisify(nativeFs.readFile)(file, "utf8")).resolves.toBe(content); - }); - }); - - describe("createReadStream", () => { - it("should read a file", async () => { - const file = helper.tmpFile(); - const content = "foobar"; - await util.promisify(nativeFs.writeFile)(file, content); - - const reader = fs.createReadStream(file); - - await expect(new Promise((resolve, reject): void => { - let data = ""; - reader.once("error", reject); - reader.once("end", () => resolve(data)); - reader.on("data", (d) => data += d.toString()); - })).resolves.toBe(content); - }); - - it("should pipe to a writable stream", async () => { - const source = helper.tmpFile(); - const content = "foo"; - await util.promisify(nativeFs.writeFile)(source, content); - - const destination = helper.tmpFile(); - const reader = fs.createReadStream(source); - const writer = fs.createWriteStream(destination); - - await new Promise((resolve, reject): void => { - reader.once("error", reject); - writer.once("error", reject); - writer.once("close", resolve); - reader.pipe(writer); - }); - - await expect(util.promisify(nativeFs.readFile)(destination, "utf8")).resolves.toBe(content); - }); - }); - - describe("exists", () => { - it("should output file exists", async () => { - await expect(util.promisify(fs.exists)(__filename)) - .resolves.toBe(true); - }); - - it("should output file does not exist", async () => { - await expect(util.promisify(fs.exists)(helper.tmpFile())) - .resolves.toBe(false); - }); - }); - - describe("fchmod", () => { - it("should fchmod existing file", async () => { - const file = await helper.createTmpFile(); - const fd = await util.promisify(nativeFs.open)(file, "r"); - await expect(util.promisify(fs.fchmod)(fd, "755")) - .resolves.toBeUndefined(); - await util.promisify(nativeFs.close)(fd); - }); - - it("should fail to fchmod nonexistent file", async () => { - await expect(util.promisify(fs.fchmod)(2242342, "755")) - .rejects.toThrow("EBADF"); - }); - }); - - describe("fchown", () => { - it("should fchown existing file", async () => { - const file = await helper.createTmpFile(); - const fd = await util.promisify(nativeFs.open)(file, "r"); - await expect(util.promisify(fs.fchown)(fd, 1000, 1000)) - .resolves.toBeUndefined(); - await util.promisify(nativeFs.close)(fd); - }); - - it("should fail to fchown nonexistent file", async () => { - await expect(util.promisify(fs.fchown)(99999, 1000, 1000)) - .rejects.toThrow("EBADF"); - }); - }); - - describe("fdatasync", () => { - it("should fdatasync existing file", async () => { - const file = await helper.createTmpFile(); - const fd = await util.promisify(nativeFs.open)(file, "r"); - await expect(util.promisify(fs.fdatasync)(fd)) - .resolves.toBeUndefined(); - await util.promisify(nativeFs.close)(fd); - }); - - it("should fail to fdatasync nonexistent file", async () => { - await expect(util.promisify(fs.fdatasync)(99999)) - .rejects.toThrow("EBADF"); - }); - }); - - describe("fstat", () => { - it("should fstat existing file", async () => { - const fd = await util.promisify(nativeFs.open)(__filename, "r"); - const stat = await util.promisify(nativeFs.fstat)(fd); - await expect(util.promisify(fs.fstat)(fd)) - .resolves.toMatchObject({ - size: stat.size, - }); - await util.promisify(nativeFs.close)(fd); - }); - - it("should fail to fstat", async () => { - await expect(util.promisify(fs.fstat)(9999)) - .rejects.toThrow("EBADF"); - }); - }); - - describe("fsync", () => { - it("should fsync existing file", async () => { - const file = await helper.createTmpFile(); - const fd = await util.promisify(nativeFs.open)(file, "r"); - await expect(util.promisify(fs.fsync)(fd)) - .resolves.toBeUndefined(); - await util.promisify(nativeFs.close)(fd); - }); - - it("should fail to fsync nonexistent file", async () => { - await expect(util.promisify(fs.fsync)(99999)) - .rejects.toThrow("EBADF"); - }); - }); - - describe("ftruncate", () => { - it("should ftruncate existing file", async () => { - const file = await helper.createTmpFile(); - const fd = await util.promisify(nativeFs.open)(file, "w"); - await expect(util.promisify(fs.ftruncate)(fd, 1)) - .resolves.toBeUndefined(); - await util.promisify(nativeFs.close)(fd); - }); - - it("should fail to ftruncate nonexistent file", async () => { - await expect(util.promisify(fs.ftruncate)(99999, 9999)) - .rejects.toThrow("EBADF"); - }); - }); - - describe("futimes", () => { - it("should futimes existing file", async () => { - const file = await helper.createTmpFile(); - const fd = await util.promisify(nativeFs.open)(file, "w"); - await expect(util.promisify(fs.futimes)(fd, 1000, 1000)) - .resolves.toBeUndefined(); - await util.promisify(nativeFs.close)(fd); - }); - - it("should futimes existing file with date", async () => { - const file = await helper.createTmpFile(); - const fd = await util.promisify(nativeFs.open)(file, "w"); - await expect(util.promisify(fs.futimes)(fd, new Date(), new Date())) - .resolves.toBeUndefined(); - await util.promisify(nativeFs.close)(fd); - }); - - it("should fail to futimes nonexistent file", async () => { - await expect(util.promisify(fs.futimes)(99999, 9999, 9999)) - .rejects.toThrow("EBADF"); - }); - }); - - describe("lchmod", () => { - it("should lchmod existing file", async () => { - const file = await helper.createTmpFile(); - await expect(util.promisify(fs.lchmod)(file, "755")) - .resolves.toBeUndefined(); - }); - - // TODO: Doesn't fail on my system? - it("should fail to lchmod nonexistent file", async () => { - await expect(util.promisify(fs.lchmod)(helper.tmpFile(), "755")) - .resolves.toBeUndefined(); - }); - }); - - describe("lchown", () => { - it("should lchown existing file", async () => { - const file = await helper.createTmpFile(); - await expect(util.promisify(fs.lchown)(file, 1000, 1000)) - .resolves.toBeUndefined(); - }); - - it("should fail to lchown nonexistent file", async () => { - await expect(util.promisify(fs.lchown)(helper.tmpFile(), 1000, 1000)) - .rejects.toThrow("ENOENT"); - }); - }); - - describe("link", () => { - it("should link existing file", async () => { - const source = await helper.createTmpFile(); - const destination = helper.tmpFile(); - await expect(util.promisify(fs.link)(source, destination)) - .resolves.toBeUndefined(); - await expect(util.promisify(fs.exists)(destination)) - .resolves.toBe(true); - }); - - it("should fail to link nonexistent file", async () => { - await expect(util.promisify(fs.link)(helper.tmpFile(), helper.tmpFile())) - .rejects.toThrow("ENOENT"); - }); - }); - - describe("lstat", () => { - it("should lstat existing file", async () => { - const stat = await util.promisify(nativeFs.lstat)(__filename); - await expect(util.promisify(fs.lstat)(__filename)) - .resolves.toMatchObject({ - size: stat.size, - }); - }); - - it("should fail to lstat non-existent file", async () => { - await expect(util.promisify(fs.lstat)(helper.tmpFile())) - .rejects.toThrow("ENOENT"); - }); - }); - - describe("mkdir", () => { - let target: string; - it("should create nonexistent directory", async () => { - target = helper.tmpFile(); - await expect(util.promisify(fs.mkdir)(target)) - .resolves.toBeUndefined(); - }); - - it("should fail to create existing directory", async () => { - await expect(util.promisify(fs.mkdir)(target)) - .rejects.toThrow("EEXIST"); - }); - }); - - describe("mkdtemp", () => { - it("should create temp dir", async () => { - await expect(util.promisify(fs.mkdtemp)(helper.coderDir + "/")) - .resolves.toMatch(/^\/tmp\/coder\/fs\/[a-zA-Z0-9]{6}/); - }); - }); - - describe("open", () => { - it("should open existing file", async () => { - const fd = await util.promisify(fs.open)(__filename, "r"); - expect(fd).not.toBeNaN(); - await expect(util.promisify(fs.close)(fd)) - .resolves.toBeUndefined(); - }); - - it("should fail to open nonexistent file", async () => { - await expect(util.promisify(fs.open)(helper.tmpFile(), "r")) - .rejects.toThrow("ENOENT"); - }); - }); - - describe("read", () => { - it("should read existing file", async () => { - const fd = await util.promisify(nativeFs.open)(__filename, "r"); - const stat = await util.promisify(nativeFs.fstat)(fd); - const buffer = Buffer.alloc(stat.size); - let bytesRead = 0; - let chunkSize = 2048; - while (bytesRead < stat.size) { - if ((bytesRead + chunkSize) > stat.size) { - chunkSize = stat.size - bytesRead; - } - - await util.promisify(fs.read)(fd, buffer, bytesRead, chunkSize, bytesRead); - bytesRead += chunkSize; - } - - const content = await util.promisify(nativeFs.readFile)(__filename, "utf8"); - expect(buffer.toString()).toEqual(content); - await util.promisify(nativeFs.close)(fd); - }); - - it("should fail to read nonexistent file", async () => { - await expect(util.promisify(fs.read)(99999, Buffer.alloc(10), 9999, 999, 999)) - .rejects.toThrow("EBADF"); - }); - }); - - describe("readFile", () => { - it("should read existing file", async () => { - const content = await util.promisify(nativeFs.readFile)(__filename, "utf8"); - await expect(util.promisify(fs.readFile)(__filename, "utf8")) - .resolves.toEqual(content); - }); - - it("should fail to read nonexistent file", async () => { - await expect(util.promisify(fs.readFile)(helper.tmpFile())) - .rejects.toThrow("ENOENT"); - }); - }); - - describe("readdir", () => { - it("should read existing directory", async () => { - const paths = await util.promisify(nativeFs.readdir)(helper.coderDir); - await expect(util.promisify(fs.readdir)(helper.coderDir)) - .resolves.toEqual(paths); - }); - - it("should fail to read nonexistent directory", async () => { - await expect(util.promisify(fs.readdir)(helper.tmpFile())) - .rejects.toThrow("ENOENT"); - }); - }); - - describe("readlink", () => { - it("should read existing link", async () => { - const source = await helper.createTmpFile(); - const destination = helper.tmpFile(); - await util.promisify(nativeFs.symlink)(source, destination); - await expect(util.promisify(fs.readlink)(destination)) - .resolves.toBe(source); - }); - - it("should fail to read nonexistent link", async () => { - await expect(util.promisify(fs.readlink)(helper.tmpFile())) - .rejects.toThrow("ENOENT"); - }); - }); - - describe("realpath", () => { - it("should read real path of existing file", async () => { - const source = await helper.createTmpFile(); - const destination = helper.tmpFile(); - nativeFs.symlinkSync(source, destination); - await expect(util.promisify(fs.realpath)(destination)) - .resolves.toBe(source); - }); - - it("should fail to read real path of nonexistent file", async () => { - await expect(util.promisify(fs.realpath)(helper.tmpFile())) - .rejects.toThrow("ENOENT"); - }); - }); - - describe("rename", () => { - it("should rename existing file", async () => { - const source = await helper.createTmpFile(); - const destination = helper.tmpFile(); - await expect(util.promisify(fs.rename)(source, destination)) - .resolves.toBeUndefined(); - await expect(util.promisify(nativeFs.exists)(source)) - .resolves.toBe(false); - await expect(util.promisify(nativeFs.exists)(destination)) - .resolves.toBe(true); - }); - - it("should fail to rename nonexistent file", async () => { - await expect(util.promisify(fs.rename)(helper.tmpFile(), helper.tmpFile())) - .rejects.toThrow("ENOENT"); - }); - }); - - describe("rmdir", () => { - it("should rmdir existing directory", async () => { - const dir = helper.tmpFile(); - await util.promisify(nativeFs.mkdir)(dir); - await expect(util.promisify(fs.rmdir)(dir)) - .resolves.toBeUndefined(); - await expect(util.promisify(nativeFs.exists)(dir)) - .resolves.toBe(false); - }); - - it("should fail to rmdir nonexistent directory", async () => { - await expect(util.promisify(fs.rmdir)(helper.tmpFile())) - .rejects.toThrow("ENOENT"); - }); - }); - - describe("stat", () => { - it("should stat existing file", async () => { - const nativeStat = await util.promisify(nativeFs.stat)(__filename); - const stat = await util.promisify(fs.stat)(__filename); - expect(stat).toMatchObject({ - size: nativeStat.size, - }); - expect(typeof stat.mtime.getTime()).toBe("number"); - expect(stat.isFile()).toBe(true); - }); - - it("should stat existing folder", async () => { - const dir = helper.tmpFile(); - await util.promisify(nativeFs.mkdir)(dir); - const nativeStat = await util.promisify(nativeFs.stat)(dir); - const stat = await util.promisify(fs.stat)(dir); - expect(stat).toMatchObject({ - size: nativeStat.size, - }); - expect(stat.isDirectory()).toBe(true); - }); - - it("should fail to stat nonexistent file", async () => { - const error = await util.promisify(fs.stat)(helper.tmpFile()).catch((e) => e); - expect(error.message).toContain("ENOENT"); - expect(error.code).toBe("ENOENT"); - }); - }); - - describe("symlink", () => { - it("should symlink existing file", async () => { - const source = await helper.createTmpFile(); - const destination = helper.tmpFile(); - await expect(util.promisify(fs.symlink)(source, destination)) - .resolves.toBeUndefined(); - await expect(util.promisify(nativeFs.exists)(source)) - .resolves.toBe(true); - }); - - // TODO: Seems to be happy to do this on my system? - it("should fail to symlink nonexistent file", async () => { - await expect(util.promisify(fs.symlink)(helper.tmpFile(), helper.tmpFile())) - .resolves.toBeUndefined(); - }); - }); - - describe("truncate", () => { - it("should truncate existing file", async () => { - const file = helper.tmpFile(); - await util.promisify(nativeFs.writeFile)(file, "hiiiiii"); - await expect(util.promisify(fs.truncate)(file, 2)) - .resolves.toBeUndefined(); - await expect(util.promisify(nativeFs.readFile)(file, "utf8")) - .resolves.toBe("hi"); - }); - - it("should fail to truncate nonexistent file", async () => { - await expect(util.promisify(fs.truncate)(helper.tmpFile(), 0)) - .rejects.toThrow("ENOENT"); - }); - }); - - describe("unlink", () => { - it("should unlink existing file", async () => { - const file = await helper.createTmpFile(); - await expect(util.promisify(fs.unlink)(file)) - .resolves.toBeUndefined(); - await expect(util.promisify(nativeFs.exists)(file)) - .resolves.toBe(false); - }); - - it("should fail to unlink nonexistent file", async () => { - await expect(util.promisify(fs.unlink)(helper.tmpFile())) - .rejects.toThrow("ENOENT"); - }); - }); - - describe("utimes", () => { - it("should update times on existing file", async () => { - const file = await helper.createTmpFile(); - await expect(util.promisify(fs.utimes)(file, 100, 100)) - .resolves.toBeUndefined(); - }); - - it("should fail to update times on nonexistent file", async () => { - await expect(util.promisify(fs.utimes)(helper.tmpFile(), 100, 100)) - .rejects.toThrow("ENOENT"); - }); - }); - - describe("write", () => { - it("should write to existing file", async () => { - const file = await helper.createTmpFile(); - const fd = await util.promisify(nativeFs.open)(file, "w"); - await expect(util.promisify(fs.write)(fd, Buffer.from("hi"))) - .resolves.toBe(2); - await expect(util.promisify(nativeFs.readFile)(file, "utf8")) - .resolves.toBe("hi"); - await util.promisify(nativeFs.close)(fd); - }); - - it("should fail to write to nonexistent file", async () => { - await expect(util.promisify(fs.write)(100000, Buffer.from("wowow"))) - .rejects.toThrow("EBADF"); - }); - }); - - describe("writeFile", () => { - it("should write file", async () => { - const file = await helper.createTmpFile(); - await expect(util.promisify(fs.writeFile)(file, "howdy")) - .resolves.toBeUndefined(); - await expect(util.promisify(nativeFs.readFile)(file, "utf8")) - .resolves.toBe("howdy"); - }); - }); - - it("should dispose", (done) => { - setTimeout(() => { - client.dispose(); - done(); - }, 100); - }); -}); diff --git a/packages/protocol/test/helpers.ts b/packages/protocol/test/helpers.ts deleted file mode 100644 index f187dc6e..00000000 --- a/packages/protocol/test/helpers.ts +++ /dev/null @@ -1,77 +0,0 @@ -import * as fs from "fs"; -import * as os from "os"; -import * as path from "path"; -import * as rimraf from "rimraf"; -import * as util from "util"; -import { IDisposable } from "@coder/disposable"; -import { Emitter } from "@coder/events"; -import { Client } from "../src/browser/client"; -import { Server, ServerOptions } from "../src/node/server"; - -// So we only make the directory once when running multiple tests. -let mkdirPromise: Promise | undefined; - -export class Helper { - private i = 0; - public coderDir: string; - private baseDir = path.join(os.tmpdir(), "coder"); - - public constructor(directoryName: string) { - if (!directoryName.trim()) { - throw new Error("no directory name"); - } - - this.coderDir = path.join(this.baseDir, directoryName); - } - - public tmpFile(): string { - return path.join(this.coderDir, `${this.i++}`); - } - - public async createTmpFile(): Promise { - const tf = this.tmpFile(); - await util.promisify(fs.writeFile)(tf, ""); - - return tf; - } - - public async prepare(): Promise { - if (!mkdirPromise) { - mkdirPromise = util.promisify(fs.mkdir)(this.baseDir).catch((error) => { - if (error.code !== "EEXIST" && error.code !== "EISDIR") { - throw error; - } - }); - } - await mkdirPromise; - await util.promisify(rimraf)(this.coderDir); - await util.promisify(fs.mkdir)(this.coderDir); - } -} - -export const createClient = (serverOptions?: ServerOptions): Client => { - const s2c = new Emitter(); - const c2s = new Emitter(); - const closeCallbacks = void>>[]; - - // tslint:disable-next-line no-unused-expression - new Server({ - close: (): void => closeCallbacks.forEach((cb) => cb()), - onDown: (_cb: () => void): void => undefined, - onUp: (_cb: () => void): void => undefined, - onClose: (cb: () => void): number => closeCallbacks.push(cb), - onMessage: (cb): IDisposable => c2s.event((d) => cb(d)), - send: (data): NodeJS.Timer => setTimeout(() => s2c.emit(data), 0), - }, serverOptions); - - const client = new Client({ - close: (): void => closeCallbacks.forEach((cb) => cb()), - onDown: (_cb: () => void): void => undefined, - onUp: (_cb: () => void): void => undefined, - onClose: (cb: () => void): number => closeCallbacks.push(cb), - onMessage: (cb): IDisposable => s2c.event((d) => cb(d)), - send: (data): NodeJS.Timer => setTimeout(() => c2s.emit(data), 0), - }); - - return client; -}; diff --git a/packages/protocol/test/index.ts b/packages/protocol/test/index.ts deleted file mode 100644 index d4e09d7b..00000000 --- a/packages/protocol/test/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "./helpers"; diff --git a/packages/protocol/test/net.test.ts b/packages/protocol/test/net.test.ts deleted file mode 100644 index 856e2313..00000000 --- a/packages/protocol/test/net.test.ts +++ /dev/null @@ -1,162 +0,0 @@ -import * as nativeNet from "net"; -import { Module } from "../src/common/proxy"; -import { createClient, Helper } from "./helpers"; - -describe("net", () => { - const client = createClient(); - const net = client.modules[Module.Net]; - const helper = new Helper("net"); - - beforeAll(async () => { - await helper.prepare(); - }); - - describe("Socket", () => { - const socketPath = helper.tmpFile(); - let server: nativeNet.Server; - - beforeAll(async () => { - await new Promise((r): void => { - server = nativeNet.createServer().listen(socketPath, r); - }); - }); - - afterAll(() => { - server.close(); - }); - - it("should fail to connect", async () => { - const socket = new net.Socket(); - - const fn = jest.fn(); - socket.on("error", fn); - - socket.connect("/tmp/t/e/s/t/d/o/e/s/n/o/t/e/x/i/s/t"); - - await new Promise((r): nativeNet.Socket => socket.on("close", r)); - - expect(fn).toHaveBeenCalledTimes(1); - }); - - it("should remove event listener", async () => { - const socket = new net.Socket(); - - const fn1 = jest.fn(); - const fn2 = jest.fn(); - - socket.on("error", fn1); - socket.on("error", fn2); - socket.off("error", fn1); - - socket.connect("/tmp/t/e/s/t/d/o/e/s/n/o/t/e/x/i/s/t"); - - await new Promise((r): nativeNet.Socket => socket.on("close", r)); - expect(fn1).toHaveBeenCalledTimes(0); - expect(fn2).toHaveBeenCalledTimes(1); - }); - - it("should connect", async () => { - await new Promise((resolve): void => { - const socket = net.createConnection(socketPath, () => { - socket.end(); - socket.addListener("close", () => { - resolve(); - }); - }); - }); - - await new Promise((resolve): void => { - const socket = new net.Socket(); - socket.connect(socketPath, () => { - socket.end(); - socket.addListener("close", () => { - resolve(); - }); - }); - }); - }); - - it("should get data", (done) => { - server.once("connection", (socket: nativeNet.Socket) => { - socket.write("hi how r u"); - }); - - const socket = net.createConnection(socketPath); - - socket.addListener("data", (data) => { - expect(data.toString()).toEqual("hi how r u"); - socket.end(); - socket.addListener("close", () => { - done(); - }); - }); - }); - - it("should send data", (done) => { - const clientSocket = net.createConnection(socketPath); - clientSocket.write(Buffer.from("bananas")); - server.once("connection", (socket: nativeNet.Socket) => { - socket.addListener("data", (data) => { - expect(data.toString()).toEqual("bananas"); - socket.end(); - clientSocket.addListener("end", () => { - done(); - }); - }); - }); - }); - }); - - describe("Server", () => { - it("should listen", (done) => { - const s = net.createServer(); - s.on("listening", () => s.close()); - s.on("close", () => done()); - s.listen(helper.tmpFile()); - }); - - it("should get connection", async () => { - let constructorListener: (() => void) | undefined; - const s = net.createServer(() => { - if (constructorListener) { - constructorListener(); - } - }); - - const socketPath = helper.tmpFile(); - s.listen(socketPath); - - await new Promise((resolve): void => { - s.on("listening", resolve); - }); - - const makeConnection = async (): Promise => { - net.createConnection(socketPath); - await Promise.all([ - new Promise((resolve): void => { - constructorListener = resolve; - }), - new Promise((resolve): void => { - s.once("connection", (socket) => { - socket.destroy(); - resolve(); - }); - }), - ]); - }; - - await makeConnection(); - await makeConnection(); - - s.close(); - await new Promise((r): nativeNet.Server => s.on("close", r)); - }); - }); - - it("should dispose", (done) => { - setTimeout(() => { - client.dispose(); - done(); - }, 100); - }); -}); diff --git a/packages/protocol/test/node-pty.test.ts b/packages/protocol/test/node-pty.test.ts deleted file mode 100644 index 62159b98..00000000 --- a/packages/protocol/test/node-pty.test.ts +++ /dev/null @@ -1,99 +0,0 @@ -import { IPty } from "node-pty"; -import { Module } from "../src/common/proxy"; -import { createClient } from "./helpers"; - -describe("node-pty", () => { - const client = createClient(); - const pty = client.modules[Module.NodePty]; - - /** - * Returns a function that when called returns a promise that resolves with - * the next chunk of data from the process. - */ - const promisifyData = (proc: IPty): (() => Promise) => { - // Use a persistent callback instead of creating it in the promise since - // otherwise we could lose data that comes in while no promise is listening. - let onData: (() => void) | undefined; - let buffer: string | undefined; - proc.on("data", (data) => { - // Remove everything that isn't a letter, number, or $ to avoid issues - // with ANSI escape codes printing inside the test output. - buffer = (buffer || "") + data.toString().replace(/[^a-zA-Z0-9$]/g, ""); - if (onData) { - onData(); - } - }); - - return (): Promise => new Promise((resolve): void => { - onData = (): void => { - if (typeof buffer !== "undefined") { - const data = buffer; - buffer = undefined; - onData = undefined; - resolve(data); - } - }; - onData(); - }); - }; - - it("should create shell", async () => { - // Setting the config file to something that shouldn't exist so the test - // isn't affected by custom configuration. - const proc = pty.spawn("/bin/bash", ["--rcfile", "/tmp/test/nope/should/not/exist"], { - cols: 100, - rows: 10, - }); - - const getData = promisifyData(proc); - - // Wait for [hostname@user]$ - let data = ""; - while (!data.includes("$")) { - data = await getData(); - } - - proc.kill(); - - await new Promise((resolve): void => { - proc.on("exit", resolve); - }); - }); - - it("should resize", async () => { - // Requires the `tput lines` cmd to be available. - // Setting the config file to something that shouldn't exist so the test - // isn't affected by custom configuration. - const proc = pty.spawn("/bin/bash", ["--rcfile", "/tmp/test/nope/should/not/exist"], { - cols: 10, - rows: 912, - }); - - const getData = promisifyData(proc); - - proc.write("tput lines\n"); - - let data = ""; - while (!data.includes("912")) { - data = await getData(); - } - proc.resize(10, 219); - proc.write("tput lines\n"); - - while (!data.includes("219")) { - data = await getData(); - } - - proc.kill(); - await new Promise((resolve): void => { - proc.on("exit", resolve); - }); - }); - - it("should dispose", (done) => { - setTimeout(() => { - client.dispose(); - done(); - }, 100); - }); -}); diff --git a/packages/protocol/test/server.test.ts b/packages/protocol/test/server.test.ts deleted file mode 100644 index 0675d60f..00000000 --- a/packages/protocol/test/server.test.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { createClient } from "./helpers"; - -describe("Server", () => { - const dataDirectory = "/tmp/example"; - const workingDirectory = "/working/dir"; - const extensionsDirectory = "/tmp/example"; - const builtInExtensionsDirectory = "/tmp/example"; - const cacheDirectory = "/tmp/cache"; - const client = createClient({ - extensionsDirectory, - builtInExtensionsDirectory, - cacheDirectory, - dataDirectory, - workingDirectory, - }); - - it("should get init msg", async () => { - const data = await client.initData; - expect(data.dataDirectory).toEqual(dataDirectory); - expect(data.workingDirectory).toEqual(workingDirectory); - expect(data.builtInExtensionsDirectory).toEqual(builtInExtensionsDirectory); - }); -}); diff --git a/packages/protocol/test/spdlog.test.ts b/packages/protocol/test/spdlog.test.ts deleted file mode 100644 index fedf8161..00000000 --- a/packages/protocol/test/spdlog.test.ts +++ /dev/null @@ -1,36 +0,0 @@ -import * as fs from "fs"; -import * as util from "util"; -import { Module } from "../src/common/proxy"; -import { createClient, Helper } from "./helpers"; - -describe("spdlog", () => { - const client = createClient(); - const spdlog = client.modules[Module.Spdlog]; - const helper = new Helper("spdlog"); - - beforeAll(async () => { - await helper.prepare(); - }); - - it("should log to a file", async () => { - const file = await helper.createTmpFile(); - const logger = new spdlog.RotatingLogger("test logger", file, 10000, 10); - logger.trace("trace"); - logger.debug("debug"); - logger.info("info"); - logger.warn("warn"); - logger.error("error"); - logger.critical("critical"); - logger.flush(); - await new Promise((resolve): number | NodeJS.Timer => setTimeout(resolve, 1000)); - expect(await util.promisify(fs.readFile)(file, "utf8")) - .toContain("critical"); - }); - - it("should dispose", (done) => { - setTimeout(() => { - client.dispose(); - done(); - }, 100); - }); -}); diff --git a/packages/protocol/test/trash.test.ts b/packages/protocol/test/trash.test.ts deleted file mode 100644 index 91b11461..00000000 --- a/packages/protocol/test/trash.test.ts +++ /dev/null @@ -1,29 +0,0 @@ -import * as fs from "fs"; -import * as util from "util"; -import { Module } from "../src/common/proxy"; -import { createClient, Helper } from "./helpers"; - -// tslint:disable deprecation to use fs.exists - -describe("trash", () => { - const client = createClient(); - const trash = client.modules[Module.Trash]; - const helper = new Helper("trash"); - - beforeAll(async () => { - await helper.prepare(); - }); - - it("should trash a file", async () => { - const file = await helper.createTmpFile(); - await trash.trash(file); - expect(await util.promisify(fs.exists)(file)).toBeFalsy(); - }); - - it("should dispose", (done) => { - setTimeout(() => { - client.dispose(); - done(); - }, 100); - }); -}); diff --git a/packages/protocol/test/util.test.ts b/packages/protocol/test/util.test.ts deleted file mode 100644 index 2f9514a0..00000000 --- a/packages/protocol/test/util.test.ts +++ /dev/null @@ -1,101 +0,0 @@ -import * as fs from "fs"; -import * as util from "util"; -import { argumentToProto, protoToArgument } from "../src/common/util"; - -describe("Convert", () => { - it("should convert nothing", () => { - expect(protoToArgument()).toBeUndefined(); - }); - - it("should convert null", () => { - expect(protoToArgument(argumentToProto(null))).toBeNull(); - }); - - it("should convert undefined", () => { - expect(protoToArgument(argumentToProto(undefined))).toBeUndefined(); - }); - - it("should convert string", () => { - expect(protoToArgument(argumentToProto("test"))).toBe("test"); - }); - - it("should convert number", () => { - expect(protoToArgument(argumentToProto(10))).toBe(10); - }); - - it("should convert boolean", () => { - expect(protoToArgument(argumentToProto(true))).toBe(true); - expect(protoToArgument(argumentToProto(false))).toBe(false); - }); - - it("should convert error", () => { - const error = new Error("message"); - const convertedError = protoToArgument(argumentToProto(error)); - - expect(convertedError instanceof Error).toBeTruthy(); - expect(convertedError.message).toBe("message"); - }); - - it("should convert buffer", async () => { - const buffer = await util.promisify(fs.readFile)(__filename); - expect(buffer instanceof Buffer).toBeTruthy(); - - const convertedBuffer = protoToArgument(argumentToProto(buffer)); - expect(convertedBuffer instanceof Buffer).toBeTruthy(); - expect(convertedBuffer.toString()).toBe(buffer.toString()); - }); - - it("should convert proxy", () => { - let i = 0; - const proto = argumentToProto( - { onEvent: (): void => undefined }, - undefined, - () => i++, - ); - - const proxy = protoToArgument(proto, undefined, (id) => { - return { - id: `created: ${id}`, - dispose: (): Promise => Promise.resolve(), - onDone: (): Promise => Promise.resolve(), - onEvent: (): Promise => Promise.resolve(), - }; - }); - - expect(proxy.id).toBe("created: 0"); - }); - - it("should convert function", () => { - const fn = jest.fn(); - // tslint:disable-next-line no-any - const map = new Map void>(); - let i = 0; - const proto = argumentToProto( - fn, - (f) => { - map.set(i++, f); - - return i - 1; - }, - ); - - const remoteFn = protoToArgument(proto, (id, args) => { - map.get(id)!(...args); - }); - - remoteFn("a", "b", 1); - - expect(fn).toHaveBeenCalledWith("a", "b", 1); - }); - - it("should convert array", () => { - const array = ["a", "b", 1, [1, "a"], null, undefined]; - expect(protoToArgument(argumentToProto(array))).toEqual(array); - }); - - it("should convert object", () => { - const obj = { a: "test" }; - // const obj = { "a": 1, "b": [1, "a"], test: null, test2: undefined }; - expect(protoToArgument(argumentToProto(obj))).toEqual(obj); - }); -}); diff --git a/packages/protocol/yarn.lock b/packages/protocol/yarn.lock deleted file mode 100644 index b1c6879d..00000000 --- a/packages/protocol/yarn.lock +++ /dev/null @@ -1,831 +0,0 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. -# yarn lockfile v1 - - -"@sindresorhus/df@^1.0.1": - version "1.0.1" - resolved "https://registry.yarnpkg.com/@sindresorhus/df/-/df-1.0.1.tgz#c69b66f52f6fcdd287c807df210305dbaf78500d" - integrity sha1-xptm9S9vzdKHyAffIQMF2694UA0= - -"@sindresorhus/df@^2.1.0": - version "2.1.0" - resolved "https://registry.yarnpkg.com/@sindresorhus/df/-/df-2.1.0.tgz#d208cf27e06f0bb476d14d7deccd7d726e9aa389" - integrity sha1-0gjPJ+BvC7R20U197M19cm6ao4k= - dependencies: - execa "^0.2.2" - -"@types/events@*": - version "3.0.0" - resolved "https://registry.yarnpkg.com/@types/events/-/events-3.0.0.tgz#2862f3f58a9a7f7c3e78d79f130dd4d71c25c2a7" - integrity sha512-EaObqwIvayI5a8dCzhFrjKzVwKLxjoG9T6Ppd5CEo07LRKfQ8Yokw54r5+Wq7FaBQ+yXRvQAYPrHwya1/UFt9g== - -"@types/glob@*": - version "7.1.1" - resolved "https://registry.yarnpkg.com/@types/glob/-/glob-7.1.1.tgz#aa59a1c6e3fbc421e07ccd31a944c30eba521575" - integrity sha512-1Bh06cbWJUHMC97acuD6UMG29nMt0Aqz1vF3guLfG+kHHJhy3AyohZFFxYk2f7Q1SQIrNwvncxAE0N/9s70F2w== - dependencies: - "@types/events" "*" - "@types/minimatch" "*" - "@types/node" "*" - -"@types/google-protobuf@^3.2.7": - version "3.2.7" - resolved "https://registry.yarnpkg.com/@types/google-protobuf/-/google-protobuf-3.2.7.tgz#9576ed5dd62cdb1c9f952522028a03b7cb2b69b5" - integrity sha512-Pb9wl5qDEwfnJeeu6Zpn5Y+waLrKETStqLZXHMGCTbkNuBBudPy4qOGN6veamyeoUBwTm2knOVeP/FlHHhhmzA== - -"@types/minimatch@*": - version "3.0.3" - resolved "https://registry.yarnpkg.com/@types/minimatch/-/minimatch-3.0.3.tgz#3dca0e3f33b200fc7d1139c0cd96c1268cadfd9d" - integrity sha512-tHq6qdbT9U1IRSGf14CL0pUlULksvY9OZ+5eEgl1N7t+OA3tGvNpxJCzuKQlsNgCVwbAs670L1vcVQi8j9HjnA== - -"@types/node@*": - version "11.11.3" - resolved "https://registry.yarnpkg.com/@types/node/-/node-11.11.3.tgz#7c6b0f8eaf16ae530795de2ad1b85d34bf2f5c58" - integrity sha512-wp6IOGu1lxsfnrD+5mX6qwSwWuqsdkKKxTN4aQc4wByHAKZJf9/D4KXPQ1POUjEbnCP5LMggB0OEFNY9OTsMqg== - -"@types/rimraf@^2.0.2": - version "2.0.2" - resolved "https://registry.yarnpkg.com/@types/rimraf/-/rimraf-2.0.2.tgz#7f0fc3cf0ff0ad2a99bb723ae1764f30acaf8b6e" - integrity sha512-Hm/bnWq0TCy7jmjeN5bKYij9vw5GrDFWME4IuxV08278NtU/VdGbzsBohcCUJ7+QMqmUq5hpRKB39HeQWJjztQ== - dependencies: - "@types/glob" "*" - "@types/node" "*" - -"@types/text-encoding@^0.0.35": - version "0.0.35" - resolved "https://registry.yarnpkg.com/@types/text-encoding/-/text-encoding-0.0.35.tgz#6f14474e0b232bc70c59677aadc65dcc5a99c3a9" - integrity sha512-jfo/A88XIiAweUa8np+1mPbm3h2w0s425YrI8t3wk5QxhH6UI7w517MboNVnGDeMSuoFwA8Rwmklno+FicvV4g== - -accepts@~1.3.5: - version "1.3.5" - resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.5.tgz#eb777df6011723a3b14e8a72c0805c8e86746bd2" - integrity sha1-63d99gEXI6OxTopywIBcjoZ0a9I= - dependencies: - mime-types "~2.1.18" - negotiator "0.6.1" - -array-flatten@1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/array-flatten/-/array-flatten-1.1.1.tgz#9a5f699051b1e7073328f2a008968b64ea2955d2" - integrity sha1-ml9pkFGx5wczKPKgCJaLZOopVdI= - -array-union@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/array-union/-/array-union-1.0.2.tgz#9a34410e4f4e3da23dea375be5be70f24778ec39" - integrity sha1-mjRBDk9OPaI96jdb5b5w8kd47Dk= - dependencies: - array-uniq "^1.0.1" - -array-uniq@^1.0.1: - version "1.0.3" - resolved "https://registry.yarnpkg.com/array-uniq/-/array-uniq-1.0.3.tgz#af6ac877a25cc7f74e058894753858dfdb24fdb6" - integrity sha1-r2rId6Jcx/dOBYiUdThY39sk/bY= - -async-limiter@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/async-limiter/-/async-limiter-1.0.0.tgz#78faed8c3d074ab81f22b4e985d79e8738f720f8" - integrity sha512-jp/uFnooOiO+L211eZOoSyzpOITMXx1rBITauYykG3BRYPu8h0UcxsPNB04RR5vo4Tyz3+ay17tR6JVf9qzYWg== - -balanced-match@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767" - integrity sha1-ibTRmasr7kneFk6gK4nORi1xt2c= - -body-parser@1.18.3: - version "1.18.3" - resolved "https://registry.yarnpkg.com/body-parser/-/body-parser-1.18.3.tgz#5b292198ffdd553b3a0f20ded0592b956955c8b4" - integrity sha1-WykhmP/dVTs6DyDe0FkrlWlVyLQ= - dependencies: - bytes "3.0.0" - content-type "~1.0.4" - debug "2.6.9" - depd "~1.1.2" - http-errors "~1.6.3" - iconv-lite "0.4.23" - on-finished "~2.3.0" - qs "6.5.2" - raw-body "2.3.3" - type-is "~1.6.16" - -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" - -bytes@3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.0.0.tgz#d32815404d689699f85a4ea4fa8755dd13a96048" - integrity sha1-0ygVQE1olpn4Wk6k+odV3ROpYEg= - -concat-map@0.0.1: - version "0.0.1" - resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" - integrity sha1-2Klr13/Wjfd5OnMDajug1UBdR3s= - -content-disposition@0.5.2: - version "0.5.2" - resolved "https://registry.yarnpkg.com/content-disposition/-/content-disposition-0.5.2.tgz#0cf68bb9ddf5f2be7961c3a85178cb85dba78cb4" - integrity sha1-DPaLud318r55YcOoUXjLhdunjLQ= - -content-type@~1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/content-type/-/content-type-1.0.4.tgz#e138cc75e040c727b1966fe5e5f8c9aee256fe3b" - integrity sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA== - -cookie-signature@1.0.6: - version "1.0.6" - resolved "https://registry.yarnpkg.com/cookie-signature/-/cookie-signature-1.0.6.tgz#e303a882b342cc3ee8ca513a79999734dab3ae2c" - integrity sha1-4wOogrNCzD7oylE6eZmXNNqzriw= - -cookie@0.3.1: - version "0.3.1" - resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.3.1.tgz#e7e0a1f9ef43b4c8ba925c5c5a96e806d16873bb" - integrity sha1-5+Ch+e9DtMi6klxcWpboBtFoc7s= - -cross-spawn-async@^2.1.1: - version "2.2.5" - resolved "https://registry.yarnpkg.com/cross-spawn-async/-/cross-spawn-async-2.2.5.tgz#845ff0c0834a3ded9d160daca6d390906bb288cc" - integrity sha1-hF/wwINKPe2dFg2sptOQkGuyiMw= - dependencies: - lru-cache "^4.0.0" - which "^1.2.8" - -cross-spawn@^6.0.0: - version "6.0.5" - resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-6.0.5.tgz#4a5ec7c64dfae22c3a14124dbacdee846d80cbc4" - integrity sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ== - dependencies: - nice-try "^1.0.4" - path-key "^2.0.1" - semver "^5.5.0" - shebang-command "^1.2.0" - which "^1.2.9" - -debug@2.6.9: - version "2.6.9" - resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" - integrity sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA== - dependencies: - ms "2.0.0" - -depd@~1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/depd/-/depd-1.1.2.tgz#9bcd52e14c097763e749b274c4346ed2e560b5a9" - integrity sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak= - -destroy@~1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/destroy/-/destroy-1.0.4.tgz#978857442c44749e4206613e37946205826abd80" - integrity sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA= - -dir-glob@^2.0.0: - version "2.2.2" - resolved "https://registry.yarnpkg.com/dir-glob/-/dir-glob-2.2.2.tgz#fa09f0694153c8918b18ba0deafae94769fc50c4" - integrity sha512-f9LBi5QWzIW3I6e//uxZoLBlUt9kcp66qo0sSCxL6YZKc75R1c4MFCoe/LaZiBGmgujvQdxc5Bn3QhfyvK5Hsw== - dependencies: - path-type "^3.0.0" - -ee-first@1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d" - integrity sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0= - -encodeurl@~1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-1.0.2.tgz#ad3ff4c86ec2d029322f5a02c3a9a606c95b3f59" - integrity sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k= - -escape-html@~1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/escape-html/-/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988" - integrity sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg= - -escape-string-applescript@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/escape-string-applescript/-/escape-string-applescript-2.0.0.tgz#760bca838668e408fe5ee52ce42caf7cb46c5273" - integrity sha1-dgvKg4Zo5Aj+XuUs5CyvfLRsUnM= - -etag@~1.8.1: - version "1.8.1" - resolved "https://registry.yarnpkg.com/etag/-/etag-1.8.1.tgz#41ae2eeb65efa62268aebfea83ac7d79299b0887" - integrity sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc= - -execa@^0.10.0: - version "0.10.0" - resolved "https://registry.yarnpkg.com/execa/-/execa-0.10.0.tgz#ff456a8f53f90f8eccc71a96d11bdfc7f082cb50" - integrity sha512-7XOMnz8Ynx1gGo/3hyV9loYNPWM94jG3+3T3Y8tsfSstFmETmENCMU/A/zj8Lyaj1lkgEepKepvd6240tBRvlw== - dependencies: - cross-spawn "^6.0.0" - get-stream "^3.0.0" - is-stream "^1.1.0" - npm-run-path "^2.0.0" - p-finally "^1.0.0" - signal-exit "^3.0.0" - strip-eof "^1.0.0" - -execa@^0.2.2: - version "0.2.2" - resolved "https://registry.yarnpkg.com/execa/-/execa-0.2.2.tgz#e2ead472c2c31aad6f73f1ac956eef45e12320cb" - integrity sha1-4urUcsLDGq1vc/GslW7vReEjIMs= - dependencies: - cross-spawn-async "^2.1.1" - npm-run-path "^1.0.0" - object-assign "^4.0.1" - path-key "^1.0.0" - strip-eof "^1.0.0" - -express@^4.16.4: - version "4.16.4" - resolved "https://registry.yarnpkg.com/express/-/express-4.16.4.tgz#fddef61926109e24c515ea97fd2f1bdbf62df12e" - integrity sha512-j12Uuyb4FMrd/qQAm6uCHAkPtO8FDTRJZBDd5D2KOL2eLaz1yUNdUB/NOIyq0iU4q4cFarsUCrnFDPBcnksuOg== - dependencies: - accepts "~1.3.5" - array-flatten "1.1.1" - body-parser "1.18.3" - content-disposition "0.5.2" - content-type "~1.0.4" - cookie "0.3.1" - cookie-signature "1.0.6" - debug "2.6.9" - depd "~1.1.2" - encodeurl "~1.0.2" - escape-html "~1.0.3" - etag "~1.8.1" - finalhandler "1.1.1" - fresh "0.5.2" - merge-descriptors "1.0.1" - methods "~1.1.2" - on-finished "~2.3.0" - parseurl "~1.3.2" - path-to-regexp "0.1.7" - proxy-addr "~2.0.4" - qs "6.5.2" - range-parser "~1.2.0" - safe-buffer "5.1.2" - send "0.16.2" - serve-static "1.13.2" - setprototypeof "1.1.0" - statuses "~1.4.0" - type-is "~1.6.16" - utils-merge "1.0.1" - vary "~1.1.2" - -finalhandler@1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/finalhandler/-/finalhandler-1.1.1.tgz#eebf4ed840079c83f4249038c9d703008301b105" - integrity sha512-Y1GUDo39ez4aHAw7MysnUD5JzYX+WaIj8I57kO3aEPT1fFRL4sr7mjei97FgnwhAyyzRYmQZaTHb2+9uZ1dPtg== - dependencies: - debug "2.6.9" - encodeurl "~1.0.2" - escape-html "~1.0.3" - on-finished "~2.3.0" - parseurl "~1.3.2" - statuses "~1.4.0" - unpipe "~1.0.0" - -forwarded@~0.1.2: - version "0.1.2" - resolved "https://registry.yarnpkg.com/forwarded/-/forwarded-0.1.2.tgz#98c23dab1175657b8c0573e8ceccd91b0ff18c84" - integrity sha1-mMI9qxF1ZXuMBXPozszZGw/xjIQ= - -fresh@0.5.2: - version "0.5.2" - resolved "https://registry.yarnpkg.com/fresh/-/fresh-0.5.2.tgz#3d8cadd90d976569fa835ab1f8e4b23a105605a7" - integrity sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac= - -fs-extra@^0.30.0: - version "0.30.0" - resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-0.30.0.tgz#f233ffcc08d4da7d432daa449776989db1df93f0" - integrity sha1-8jP/zAjU2n1DLapEl3aYnbHfk/A= - dependencies: - graceful-fs "^4.1.2" - jsonfile "^2.1.0" - klaw "^1.0.0" - path-is-absolute "^1.0.0" - rimraf "^2.2.8" - -fs.realpath@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" - integrity sha1-FQStJSMVjKpA20onh8sBQRmU6k8= - -get-stream@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-3.0.0.tgz#8e943d1358dc37555054ecbe2edb05aa174ede14" - integrity sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ= - -glob@^7.1.2, glob@^7.1.3: - version "7.1.3" - resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.3.tgz#3960832d3f1574108342dafd3a67b332c0969df1" - integrity sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ== - dependencies: - fs.realpath "^1.0.0" - inflight "^1.0.4" - inherits "2" - minimatch "^3.0.4" - once "^1.3.0" - path-is-absolute "^1.0.0" - -globby@^7.1.1: - version "7.1.1" - resolved "https://registry.yarnpkg.com/globby/-/globby-7.1.1.tgz#fb2ccff9401f8600945dfada97440cca972b8680" - integrity sha1-+yzP+UAfhgCUXfral0QMypcrhoA= - dependencies: - array-union "^1.0.1" - dir-glob "^2.0.0" - glob "^7.1.2" - ignore "^3.3.5" - pify "^3.0.0" - slash "^1.0.0" - -google-protobuf@^3.6.1: - version "3.6.1" - resolved "https://registry.yarnpkg.com/google-protobuf/-/google-protobuf-3.6.1.tgz#7ef58e2bea137a93cdaf5cfd5afa5f6abdd92025" - integrity sha512-SJYemeX5GjDLPnadcmCNQePQHCS4Hl5fOcI/JawqDIYFhCmrtYAjcx/oTQx/Wi8UuCuZQhfvftbmPePPAYHFtA== - -graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.1.9: - version "4.1.15" - resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.15.tgz#ffb703e1066e8a0eeaa4c8b80ba9253eeefbfb00" - integrity sha512-6uHUhOPEBgQ24HM+r6b/QwWfZq+yiFcipKFrOFiBEnWdy5sdzYoi+pJeQaPI5qOLRFqWmAXUPQNsielzdLoecA== - -http-errors@1.6.3, http-errors@~1.6.2, http-errors@~1.6.3: - version "1.6.3" - resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-1.6.3.tgz#8b55680bb4be283a0b5bf4ea2e38580be1d9320d" - integrity sha1-i1VoC7S+KDoLW/TqLjhYC+HZMg0= - dependencies: - depd "~1.1.2" - inherits "2.0.3" - setprototypeof "1.1.0" - statuses ">= 1.4.0 < 2" - -iconv-lite@0.4.23: - version "0.4.23" - resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.23.tgz#297871f63be507adcfbfca715d0cd0eed84e9a63" - integrity sha512-neyTUVFtahjf0mB3dZT77u+8O0QB89jFdnBkd5P1JgYPbPaia3gXXOVL2fq8VyU2gMMD7SaN7QukTB/pmXYvDA== - dependencies: - safer-buffer ">= 2.1.2 < 3" - -ignore@^3.3.5: - version "3.3.10" - resolved "https://registry.yarnpkg.com/ignore/-/ignore-3.3.10.tgz#0a97fb876986e8081c631160f8f9f389157f0043" - integrity sha512-Pgs951kaMm5GXP7MOvxERINe3gsaVjUWFm+UZPSq9xYriQAksyhg0csnS0KXSNRD5NmNdapXEpjxG49+AKh/ug== - -inflight@^1.0.4: - version "1.0.6" - resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" - integrity sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk= - dependencies: - once "^1.3.0" - wrappy "1" - -inherits@2, inherits@2.0.3: - version "2.0.3" - resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" - integrity sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4= - -ipaddr.js@1.8.0: - version "1.8.0" - resolved "https://registry.yarnpkg.com/ipaddr.js/-/ipaddr.js-1.8.0.tgz#eaa33d6ddd7ace8f7f6fe0c9ca0440e706738b1e" - integrity sha1-6qM9bd16zo9/b+DJygRA5wZzix4= - -is-stream@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-1.1.0.tgz#12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44" - integrity sha1-EtSj3U5o4Lec6428hBc66A2RykQ= - -isexe@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" - integrity sha1-6PvzdNxVb/iUehDcsFctYz8s+hA= - -jsonfile@^2.1.0: - version "2.4.0" - resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-2.4.0.tgz#3736a2b428b87bbda0cc83b53fa3d633a35c2ae8" - integrity sha1-NzaitCi4e72gzIO1P6PWM6NcKug= - optionalDependencies: - graceful-fs "^4.1.6" - -klaw@^1.0.0: - version "1.3.1" - resolved "https://registry.yarnpkg.com/klaw/-/klaw-1.3.1.tgz#4088433b46b3b1ba259d78785d8e96f73ba02439" - integrity sha1-QIhDO0azsbolnXh4XY6W9zugJDk= - optionalDependencies: - graceful-fs "^4.1.9" - -lru-cache@^4.0.0: - version "4.1.5" - resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-4.1.5.tgz#8bbe50ea85bed59bc9e33dcab8235ee9bcf443cd" - integrity sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g== - dependencies: - pseudomap "^1.0.2" - yallist "^2.1.2" - -media-typer@0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/media-typer/-/media-typer-0.3.0.tgz#8710d7af0aa626f8fffa1ce00168545263255748" - integrity sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g= - -merge-descriptors@1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/merge-descriptors/-/merge-descriptors-1.0.1.tgz#b00aaa556dd8b44568150ec9d1b953f3f90cbb61" - integrity sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E= - -methods@~1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/methods/-/methods-1.1.2.tgz#5529a4d67654134edcc5266656835b0f851afcee" - integrity sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4= - -mime-db@~1.37.0: - version "1.37.0" - resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.37.0.tgz#0b6a0ce6fdbe9576e25f1f2d2fde8830dc0ad0d8" - integrity sha512-R3C4db6bgQhlIhPU48fUtdVmKnflq+hRdad7IyKhtFj06VPNVdk2RhiYL3UjQIlso8L+YxAtFkobT0VK+S/ybg== - -mime-types@~2.1.18: - version "2.1.21" - resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.21.tgz#28995aa1ecb770742fe6ae7e58f9181c744b3f96" - integrity sha512-3iL6DbwpyLzjR3xHSFNFeb9Nz/M8WDkX33t1GFQnFOllWk8pOrh/LSrB5OXlnlW5P9LH73X6loW/eogc+F5lJg== - dependencies: - mime-db "~1.37.0" - -mime@1.4.1: - version "1.4.1" - resolved "https://registry.yarnpkg.com/mime/-/mime-1.4.1.tgz#121f9ebc49e3766f311a76e1fa1c8003c4b03aa6" - integrity sha512-KI1+qOZu5DcW6wayYHSzR/tXKCDC5Om4s1z2QJjDULzLcmf3DvzS7oluY4HCTrc+9FiKmWUgeNLg7W3uIQvxtQ== - -minimatch@^3.0.4: - version "3.0.4" - resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" - integrity sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA== - dependencies: - brace-expansion "^1.1.7" - -mount-point@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/mount-point/-/mount-point-3.0.0.tgz#665cb9edebe80d110e658db56c31d0aef51a8f97" - integrity sha1-Zly57evoDREOZY21bDHQrvUaj5c= - dependencies: - "@sindresorhus/df" "^1.0.1" - pify "^2.3.0" - pinkie-promise "^2.0.1" - -ms@2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" - integrity sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g= - -negotiator@0.6.1: - version "0.6.1" - resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.1.tgz#2b327184e8992101177b28563fb5e7102acd0ca9" - integrity sha1-KzJxhOiZIQEXeyhWP7XnECrNDKk= - -nice-try@^1.0.4: - version "1.0.5" - resolved "https://registry.yarnpkg.com/nice-try/-/nice-try-1.0.5.tgz#a3378a7696ce7d223e88fc9b764bd7ef1089e366" - integrity sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ== - -npm-run-path@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-1.0.0.tgz#f5c32bf595fe81ae927daec52e82f8b000ac3c8f" - integrity sha1-9cMr9ZX+ga6Sfa7FLoL4sACsPI8= - dependencies: - path-key "^1.0.0" - -npm-run-path@^2.0.0: - version "2.0.2" - resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-2.0.2.tgz#35a9232dfa35d7067b4cb2ddf2357b1871536c5f" - integrity sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8= - dependencies: - path-key "^2.0.0" - -object-assign@^4.0.1: - version "4.1.1" - resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" - integrity sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM= - -on-finished@~2.3.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/on-finished/-/on-finished-2.3.0.tgz#20f1336481b083cd75337992a16971aa2d906947" - integrity sha1-IPEzZIGwg811M3mSoWlxqi2QaUc= - dependencies: - ee-first "1.1.1" - -once@^1.3.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" - integrity sha1-WDsap3WWHUsROsF9nFC6753Xa9E= - dependencies: - wrappy "1" - -os-homedir@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/os-homedir/-/os-homedir-1.0.2.tgz#ffbc4988336e0e833de0c168c7ef152121aa7fb3" - integrity sha1-/7xJiDNuDoM94MFox+8VISGqf7M= - -p-finally@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/p-finally/-/p-finally-1.0.0.tgz#3fbcfb15b899a44123b34b6dcc18b724336a2cae" - integrity sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4= - -p-map@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/p-map/-/p-map-1.2.0.tgz#e4e94f311eabbc8633a1e79908165fca26241b6b" - integrity sha512-r6zKACMNhjPJMTl8KcFH4li//gkrXWfbD6feV8l6doRHlzljFWGJ2AP6iKaCJXyZmAUMOPtvbW7EXkbWO/pLEA== - -p-try@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/p-try/-/p-try-1.0.0.tgz#cbc79cdbaf8fd4228e13f621f2b1a237c1b207b3" - integrity sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M= - -parseurl@~1.3.2: - version "1.3.2" - resolved "https://registry.yarnpkg.com/parseurl/-/parseurl-1.3.2.tgz#fc289d4ed8993119460c156253262cdc8de65bf3" - integrity sha1-/CidTtiZMRlGDBViUyYs3I3mW/M= - -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 sha1-F0uSaHNVNP+8es5r9TpanhtcX18= - -path-key@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/path-key/-/path-key-1.0.0.tgz#5d53d578019646c0d68800db4e146e6bdc2ac7af" - integrity sha1-XVPVeAGWRsDWiADbThRua9wqx68= - -path-key@^2.0.0, path-key@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/path-key/-/path-key-2.0.1.tgz#411cadb574c5a140d3a4b1910d40d80cc9f40b40" - integrity sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A= - -path-to-regexp@0.1.7: - version "0.1.7" - resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-0.1.7.tgz#df604178005f522f15eb4490e7247a1bfaa67f8c" - integrity sha1-32BBeABfUi8V60SQ5yR6G/qmf4w= - -path-type@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/path-type/-/path-type-3.0.0.tgz#cef31dc8e0a1a3bb0d105c0cd97cf3bf47f4e36f" - integrity sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg== - dependencies: - pify "^3.0.0" - -pify@^2.2.0, pify@^2.3.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c" - integrity sha1-7RQaasBDqEnqWISY59yosVMw6Qw= - -pify@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/pify/-/pify-3.0.0.tgz#e5a4acd2c101fdf3d9a4d07f0dbc4db49dd28176" - integrity sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY= - -pinkie-promise@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/pinkie-promise/-/pinkie-promise-2.0.1.tgz#2135d6dfa7a358c069ac9b178776288228450ffa" - integrity sha1-ITXW36ejWMBprJsXh3YogihFD/o= - dependencies: - pinkie "^2.0.0" - -pinkie@^2.0.0: - version "2.0.4" - resolved "https://registry.yarnpkg.com/pinkie/-/pinkie-2.0.4.tgz#72556b80cfa0d48a974e80e77248e80ed4f7f870" - integrity sha1-clVrgM+g1IqXToDnckjoDtT3+HA= - -proxy-addr@~2.0.4: - version "2.0.4" - resolved "https://registry.yarnpkg.com/proxy-addr/-/proxy-addr-2.0.4.tgz#ecfc733bf22ff8c6f407fa275327b9ab67e48b93" - integrity sha512-5erio2h9jp5CHGwcybmxmVqHmnCBZeewlfJ0pex+UW7Qny7OOZXTtH56TGNyBizkgiOwhJtMKrVzDTeKcySZwA== - dependencies: - forwarded "~0.1.2" - ipaddr.js "1.8.0" - -pseudomap@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/pseudomap/-/pseudomap-1.0.2.tgz#f052a28da70e618917ef0a8ac34c1ae5a68286b3" - integrity sha1-8FKijacOYYkX7wqKw0wa5aaChrM= - -qs@6.5.2: - version "6.5.2" - resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.2.tgz#cb3ae806e8740444584ef154ce8ee98d403f3e36" - integrity sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA== - -range-parser@~1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/range-parser/-/range-parser-1.2.0.tgz#f49be6b487894ddc40dcc94a322f611092e00d5e" - integrity sha1-9JvmtIeJTdxA3MlKMi9hEJLgDV4= - -raw-body@2.3.3: - version "2.3.3" - resolved "https://registry.yarnpkg.com/raw-body/-/raw-body-2.3.3.tgz#1b324ece6b5706e153855bc1148c65bb7f6ea0c3" - integrity sha512-9esiElv1BrZoI3rCDuOuKCBRbuApGGaDPQfjSflGxdy4oyzqghxu6klEkkVIvBje+FF0BX9coEv8KqW6X/7njw== - dependencies: - bytes "3.0.0" - http-errors "1.6.3" - iconv-lite "0.4.23" - unpipe "1.0.0" - -rimraf@^2.2.8, rimraf@^2.6.3: - version "2.6.3" - resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.3.tgz#b2d104fe0d8fb27cf9e0a1cda8262dd3833c6cab" - integrity sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA== - dependencies: - glob "^7.1.3" - -run-applescript@^3.0.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/run-applescript/-/run-applescript-3.2.0.tgz#73fb34ce85d3de8076d511ea767c30d4fdfc918b" - integrity sha512-Ep0RsvAjnRcBX1p5vogbaBdAGu/8j/ewpvGqnQYunnLd9SM0vWcPJewPKNnWFggf0hF0pwIgwV5XK7qQ7UZ8Qg== - dependencies: - execa "^0.10.0" - -safe-buffer@5.1.2: - version "5.1.2" - resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" - integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== - -"safer-buffer@>= 2.1.2 < 3": - version "2.1.2" - resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" - integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== - -semver@^5.5.0: - version "5.6.0" - resolved "https://registry.yarnpkg.com/semver/-/semver-5.6.0.tgz#7e74256fbaa49c75aa7c7a205cc22799cac80004" - integrity sha512-RS9R6R35NYgQn++fkDWaOmqGoj4Ek9gGs+DPxNUZKuwE183xjJroKvyo1IzVFeXvUrvmALy6FWD5xrdJT25gMg== - -send@0.16.2: - version "0.16.2" - resolved "https://registry.yarnpkg.com/send/-/send-0.16.2.tgz#6ecca1e0f8c156d141597559848df64730a6bbc1" - integrity sha512-E64YFPUssFHEFBvpbbjr44NCLtI1AohxQ8ZSiJjQLskAdKuriYEP6VyGEsRDH8ScozGpkaX1BGvhanqCwkcEZw== - dependencies: - debug "2.6.9" - depd "~1.1.2" - destroy "~1.0.4" - encodeurl "~1.0.2" - escape-html "~1.0.3" - etag "~1.8.1" - fresh "0.5.2" - http-errors "~1.6.2" - mime "1.4.1" - ms "2.0.0" - on-finished "~2.3.0" - range-parser "~1.2.0" - statuses "~1.4.0" - -serve-static@1.13.2: - version "1.13.2" - resolved "https://registry.yarnpkg.com/serve-static/-/serve-static-1.13.2.tgz#095e8472fd5b46237db50ce486a43f4b86c6cec1" - integrity sha512-p/tdJrO4U387R9oMjb1oj7qSMaMfmOyd4j9hOFoxZe2baQszgHcSWjuya/CiT5kgZZKRudHNOA0pYXOl8rQ5nw== - dependencies: - encodeurl "~1.0.2" - escape-html "~1.0.3" - parseurl "~1.3.2" - send "0.16.2" - -setprototypeof@1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.1.0.tgz#d0bd85536887b6fe7c0d818cb962d9d91c54e656" - integrity sha512-BvE/TwpZX4FXExxOxZyRGQQv651MSwmWKZGqvmPcRIjDqWub67kTKuIMx43cZZrS/cBBzwBcNDWoFxt2XEFIpQ== - -shebang-command@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-1.2.0.tgz#44aac65b695b03398968c39f363fee5deafdf1ea" - integrity sha1-RKrGW2lbAzmJaMOfNj/uXer98eo= - dependencies: - shebang-regex "^1.0.0" - -shebang-regex@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-1.0.0.tgz#da42f49740c0b42db2ca9728571cb190c98efea3" - integrity sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM= - -signal-exit@^3.0.0: - version "3.0.2" - resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.2.tgz#b5fdc08f1287ea1178628e415e25132b73646c6d" - integrity sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0= - -slash@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/slash/-/slash-1.0.0.tgz#c41f2f6c39fc16d1cd17ad4b5d896114ae470d55" - integrity sha1-xB8vbDn8FtHNF61LXYlhFK5HDVU= - -"statuses@>= 1.4.0 < 2": - version "1.5.0" - resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.5.0.tgz#161c7dac177659fd9811f43771fa99381478628c" - integrity sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow= - -statuses@~1.4.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.4.0.tgz#bb73d446da2796106efcc1b601a253d6c46bd087" - integrity sha512-zhSCtt8v2NDrRlPQpCNtw/heZLtfUDqxBM1udqikb/Hbk52LK4nQSwr10u77iopCW5LsyHpuXS0GnEc48mLeew== - -strip-eof@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/strip-eof/-/strip-eof-1.0.0.tgz#bb43ff5598a6eb05d89b59fcd129c983313606bf" - integrity sha1-u0P/VZim6wXYm1n80SnJgzE2Br8= - -text-encoding@^0.7.0: - version "0.7.0" - resolved "https://registry.yarnpkg.com/text-encoding/-/text-encoding-0.7.0.tgz#f895e836e45990624086601798ea98e8f36ee643" - integrity sha512-oJQ3f1hrOnbRLOcwKz0Liq2IcrvDeZRHXhd9RgLrsT+DjWY/nty1Hi7v3dtkaEYbPYe0mUoOfzRrMwfXXwgPUA== - -trash@^4.3.0: - version "4.3.0" - resolved "https://registry.yarnpkg.com/trash/-/trash-4.3.0.tgz#6ebeecdea4d666b06e389b47d135ea88e1de5075" - integrity sha512-f36TKwIaBiXm63xSrn8OTNghg5CYHBsFVJvcObMo76LRpgariuRi2CqXQHw1VzfeximD0igdGaonOG6N760BtQ== - dependencies: - escape-string-applescript "^2.0.0" - fs-extra "^0.30.0" - globby "^7.1.1" - p-map "^1.2.0" - p-try "^1.0.0" - pify "^3.0.0" - run-applescript "^3.0.0" - uuid "^3.1.0" - xdg-trashdir "^2.1.1" - -ts-protoc-gen@^0.8.0: - version "0.8.0" - resolved "https://registry.yarnpkg.com/ts-protoc-gen/-/ts-protoc-gen-0.8.0.tgz#2a9a31ee8a4d4760c484f1d0c7199633afaa5e3e" - integrity sha512-LUFM4Jy3qMSVyRf5ql973cJjltS98MiCz8kPf1Rc9AC9BeLu0WJfoHLf0Tvx2cGH0jSK9BpA0o1tHQQfjeO47Q== - dependencies: - google-protobuf "^3.6.1" - -type-is@~1.6.16: - version "1.6.16" - resolved "https://registry.yarnpkg.com/type-is/-/type-is-1.6.16.tgz#f89ce341541c672b25ee7ae3c73dee3b2be50194" - integrity sha512-HRkVv/5qY2G6I8iab9cI7v1bOIdhm94dVjQCPFElW9W+3GeDOSHmy2EBYe4VTApuzolPcmgFTN3ftVJRKR2J9Q== - dependencies: - media-typer "0.3.0" - mime-types "~2.1.18" - -unpipe@1.0.0, unpipe@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec" - integrity sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw= - -user-home@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/user-home/-/user-home-2.0.0.tgz#9c70bfd8169bc1dcbf48604e0f04b8b49cde9e9f" - integrity sha1-nHC/2Babwdy/SGBODwS4tJzenp8= - dependencies: - os-homedir "^1.0.0" - -utils-merge@1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/utils-merge/-/utils-merge-1.0.1.tgz#9f95710f50a267947b2ccc124741c1028427e713" - integrity sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM= - -uuid@^3.1.0: - version "3.3.2" - resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.3.2.tgz#1b4af4955eb3077c501c23872fc6513811587131" - integrity sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA== - -vary@~1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/vary/-/vary-1.1.2.tgz#2299f02c6ded30d4a5961b0b9f74524a18f634fc" - integrity sha1-IpnwLG3tMNSllhsLn3RSShj2NPw= - -which@^1.2.8, which@^1.2.9: - version "1.3.1" - resolved "https://registry.yarnpkg.com/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a" - integrity sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ== - dependencies: - isexe "^2.0.0" - -wrappy@1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" - integrity sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8= - -ws@^6.1.2: - version "6.1.2" - resolved "https://registry.yarnpkg.com/ws/-/ws-6.1.2.tgz#3cc7462e98792f0ac679424148903ded3b9c3ad8" - integrity sha512-rfUqzvz0WxmSXtJpPMX2EeASXabOrSMk1ruMOV3JBTBjo4ac2lDjGGsbQSyxj8Odhw5fBib8ZKEjDNvgouNKYw== - dependencies: - async-limiter "~1.0.0" - -xdg-basedir@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/xdg-basedir/-/xdg-basedir-2.0.0.tgz#edbc903cc385fc04523d966a335504b5504d1bd2" - integrity sha1-7byQPMOF/ARSPZZqM1UEtVBNG9I= - dependencies: - os-homedir "^1.0.0" - -xdg-trashdir@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/xdg-trashdir/-/xdg-trashdir-2.1.1.tgz#59a60aaf8e6f9240c1daed9a0944b2f514c27d8e" - integrity sha512-KcVhPaOu2ZurYNHSRTf1+ZHORkTZGCQ+u0JHN17QixRISJq4pXOnjt/lQcehvtHL5QAKhSzKgyjrcNnPdkPBHA== - dependencies: - "@sindresorhus/df" "^2.1.0" - mount-point "^3.0.0" - pify "^2.2.0" - user-home "^2.0.0" - xdg-basedir "^2.0.0" - -yallist@^2.1.2: - version "2.1.2" - resolved "https://registry.yarnpkg.com/yallist/-/yallist-2.1.2.tgz#1c11f9218f076089a47dd512f93c6699a6a81d52" - integrity sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI= diff --git a/packages/requirefs/package.json b/packages/requirefs/package.json deleted file mode 100644 index bd5eddec..00000000 --- a/packages/requirefs/package.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "name": "requirefs", - "description": "", - "main": "src/index.ts", - "scripts": { - "benchmark": "ts-node ./test/*.bench.ts" - }, - "dependencies": { - "jszip": "2.6.0", - "path": "0.12.7", - "resolve": "1.8.1" - }, - "devDependencies": { - "@types/benchmark": "^1.0.31", - "@types/jszip": "3.1.4", - "@types/resolve": "0.0.8", - "benchmark": "^2.1.4", - "text-encoding": "0.6.4" - } -} diff --git a/packages/requirefs/src/index.ts b/packages/requirefs/src/index.ts deleted file mode 100644 index d8cae7b2..00000000 --- a/packages/requirefs/src/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "./requirefs"; diff --git a/packages/requirefs/src/requirefs.ts b/packages/requirefs/src/requirefs.ts deleted file mode 100644 index 31a343bd..00000000 --- a/packages/requirefs/src/requirefs.ts +++ /dev/null @@ -1,168 +0,0 @@ -import * as JSZip from "jszip"; -import * as path from "path"; -import * as resolve from "resolve"; -import { Tar } from "./tarReader"; -const textDecoder = new (typeof TextDecoder === "undefined" ? require("text-encoding").TextDecoder : TextDecoder)(); - -export interface IFileReader { - exists(path: string): boolean; - read(path: string): Uint8Array; -} - -/** - * RequireFS allows users to require from a file system. - */ -export class RequireFS { - private readonly reader: IFileReader; - private readonly customModules: Map; - private readonly requireCache: Map; - private baseDir: string | undefined; - - public constructor(reader: IFileReader) { - this.reader = reader; - this.customModules = new Map(); - this.requireCache = new Map(); - } - - /** - * Add a base-directory to nest from. - */ - public basedir(path: string): void { - this.baseDir = path; - } - - /** - * Provide custom modules to the require instance. - */ - // tslint:disable-next-line:no-any - public provide(module: string, value: any): void { - if (this.customModules.has(module)) { - throw new Error("custom module has already been registered with this name"); - } - - this.customModules.set(module, value); - } - - public readFile(target: string, type?: "string"): string; - public readFile(target: string, type?: "buffer"): Buffer; - - /** - * Read a file and returns its contents. - */ - public readFile(target: string, type?: "string" | "buffer"): string | Buffer { - target = path.normalize(target); - const read = this.reader.read(target); - - return type === "string" ? textDecoder.decode(read) : Buffer.from(read); - } - - /** - * Require a path from a file system. - */ - // tslint:disable-next-line:no-any - public require(target: string): any { - target = path.normalize(target); - - return this.doRequire([target], `./${path.basename(target)}`); - } - - /** - * Do require for a caller. Needed for resolving relative paths. - */ - private doRequire(callers: string[], resolvePath: string): object { - if (this.customModules.has(resolvePath)) { - return this.customModules.get(resolvePath)!.exports; - } - - const caller = callers[callers.length - 1]; - const reader = this.reader; - - const newRelative = this.realizePath(caller, resolvePath); - if (this.requireCache.has(newRelative)) { - return this.requireCache.get(newRelative)!.exports; - } - - const module = { - exports: {}, - }; - this.requireCache.set(newRelative, module); - - const content = textDecoder.decode(reader.read(newRelative)); - if (newRelative.endsWith(".json")) { - module.exports = JSON.parse(content); - } else { - eval("'use strict'; " + content); - } - - return module.exports; - } - - /** - * Attempts to find a module from a path - */ - private realizePath(caller: string, fullRelative: string): string { - const stripPrefix = (path: string): string => { - if (path.startsWith("/")) { - path = path.substr(1); - } - if (path.endsWith("/")) { - path = path.substr(0, path.length - 1); - } - - return path; - }; - const callerDirname = path.dirname(caller); - const resolvedPath = resolve.sync(fullRelative, { - basedir: this.baseDir ? callerDirname.startsWith(this.baseDir) ? callerDirname : path.join(this.baseDir, callerDirname) : callerDirname, - extensions: [".js"], - readFileSync: (file: string): string => { - return this.readFile(stripPrefix(file)); - }, - isFile: (file: string): boolean => { - return this.reader.exists(stripPrefix(file)); - }, - }); - - return stripPrefix(resolvedPath); - } -} - -export const fromTar = (content: Uint8Array): RequireFS => { - const tar = Tar.fromUint8Array(content); - - return new RequireFS({ - exists: (path: string): boolean => { - return tar.files.has(path); - }, - read: (path: string): Uint8Array => { - const file = tar.files.get(path); - if (!file) { - throw new Error(`file "${path}" not found`); - } - - return file.read(); - }, - }); -}; - -export const fromZip = (content: Uint8Array): RequireFS => { - const zip = new JSZip(content); - - return new RequireFS({ - exists: (fsPath: string): boolean => { - const file = zip.file(fsPath); - - return typeof file !== "undefined" && file !== null; - }, - read: (fsPath: string): Uint8Array => { - const file = zip.file(fsPath); - if (!file) { - throw new Error(`file "${fsPath}" not found`); - } - - // TODO: Should refactor to allow a promise. - // tslint:disable-next-line no-any - return zip.file(fsPath).async("uint8array") as any; - }, - }); -}; diff --git a/packages/requirefs/src/tarReader.ts b/packages/requirefs/src/tarReader.ts deleted file mode 100644 index 4e403e56..00000000 --- a/packages/requirefs/src/tarReader.ts +++ /dev/null @@ -1,279 +0,0 @@ -import * as path from "path"; -const textDecoder = new (typeof TextDecoder === "undefined" ? require("text-encoding").TextDecoder : TextDecoder)(); - -/** - * Tar represents a tar archive. - */ -export class Tar { - /** - * Return a tar object from a Uint8Array. - */ - public static fromUint8Array(array: Uint8Array): Tar { - const reader = new Reader(array); - - const tar = new Tar(); - - while (true) { - try { - const file = TarFile.fromReader(reader); - if (file) { - tar._files.set(path.normalize(file.name), file); - } - } catch (e) { - if (e.message === "EOF") { - break; - } - throw e; - } - } - - reader.unclamp(); - - return tar; - } - - private readonly _files: Map; - - private constructor() { - this._files = new Map(); - } - - public get files(): ReadonlyMap { - return this._files; - } -} - -/** - * Represents a tar files location within a reader - */ -export class TarFile { - /** - * Locate a tar file from a reader. - */ - public static fromReader(reader: Reader): TarFile | undefined { - const firstByte = reader.peek(1)[0]; - // If the first byte is nil, we know it isn't a filename - if (firstByte === 0x00) { - // The tar header is 512 bytes large. Its safe to skip here - // because we know this block is not a header - reader.skip(512); - - return undefined; - } - - let name = reader.readString(100); - - reader.skip(8); // 100->108 mode - reader.skip(8); // 108->116 uid - reader.skip(8); // 116->124 gid - - const rawSize = reader.read(12); // 124->136 size - - reader.skip(12); // 136->148 mtime - - if (reader.jump(345).readByte()) { - name = reader.jump(345).readString(155) + "/" + name; - } - - const nums: number[] = []; - rawSize.forEach((a) => nums.push(a)); - - const parseSize = (): number => { - let offset = 0; - // While 48 (ASCII value of 0), the byte is nil and considered padding. - while (offset < rawSize.length && nums[offset] === 48) { - offset++; - } - const clamp = (index: number, len: number, defaultValue: number): number => { - if (typeof index !== "number") { - return defaultValue; - } - // Coerce index to an integer. - index = ~~index; - if (index >= len) { - return len; - } - if (index >= 0) { - return index; - } - index += len; - if (index >= 0) { - return index; - } - - return 0; - }; - - // Checks for the index of the POSIX file-size terminating char. - // Falls back to GNU's tar format. If neither characters are found - // the index will default to the end of the file size buffer. - let i = nums.indexOf(32, offset); - if (i === -1) { - i = nums.indexOf(0, offset); - if (i === -1) { - i = rawSize.length - 1; - } - } - - const end = clamp(i, rawSize.length, rawSize.length - 1); - if (end === offset) { - return 0; - } - - return parseInt(textDecoder.decode(rawSize.slice(offset, end)), 8); - }; - - const size = parseSize(); - - const overflow = ((): number => { - let newSize = size; - newSize &= 511; - - return newSize && 512 - newSize; - })(); - - reader.jump(512); - const offset = reader.offset; - reader.skip(overflow + size); - reader.clamp(); - - const tarFile = new TarFile(reader, { - offset, - name, - size, - }); - - return tarFile; - } - - public constructor( - private readonly reader: Reader, - private readonly data: { - name: string; - size: number; - offset: number; - }, - ) { } - - public get name(): string { - return this.data.name; - } - - public get size(): number { - return this.data.size; - } - - /** - * Check if the file type is a file. - */ - public isFile(): boolean { - throw new Error("not implemented"); - } - - /** - * Read the file as a string. - */ - public readAsString(): string { - return textDecoder.decode(this.read()); - } - - /** - * Read the file as Uint8Array. - */ - public read(): Uint8Array { - return this.reader.jump(this.data.offset).read(this.data.size); - } -} - -/** - * Reads within a Uint8Array. - */ -export class Reader { - private array: Uint8Array; - private _offset: number; - private lastClamp: number; - - public constructor(array: Uint8Array) { - this.array = array; - this._offset = 0; - this.lastClamp = 0; - } - - public get offset(): number { - return this._offset; - } - - /** - * Skip the specified amount of bytes. - */ - public skip(amount: number): boolean { - if (this._offset + amount > this.array.length) { - throw new Error("EOF"); - } - this._offset += amount; - - return true; - } - - /** - * Clamp the reader at a position. - */ - public clamp(): void { - this.lastClamp = this._offset; - } - - /** - * Unclamp the reader. - */ - public unclamp(): void { - this.lastClamp = 0; - } - - /** - * Jump to a specific offset. - */ - public jump(offset: number): Reader { - this._offset = offset + this.lastClamp; - - return this; - } - - /** - * Peek the amount of bytes. - */ - public peek(amount: number): Uint8Array { - return this.array.slice(this.offset, this.offset + amount); - } - - /** - * Read a string. - */ - public readString(amount: number): string { - // Replacing the 0s removes all nil bytes from the str - return textDecoder.decode(this.read(amount)).replace(/\0/g, ""); - } - - /** - * Read a byte in the array. - */ - public readByte(): number { - const data = this.array[this._offset]; - this._offset++; - - return data; - } - - /** - * Read the amount of bytes. - */ - public read(amount: number): Uint8Array { - if (this._offset > this.array.length) { - throw new Error("EOF"); - } - - const data = this.array.slice(this._offset, this._offset + amount); - this._offset += amount; - - return data; - } -} diff --git a/packages/requirefs/test/.gitignore b/packages/requirefs/test/.gitignore deleted file mode 100644 index 78728925..00000000 --- a/packages/requirefs/test/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -!lib/node_modules -*.tar -*.zip diff --git a/packages/requirefs/test/lib/chained-1.js b/packages/requirefs/test/lib/chained-1.js deleted file mode 100644 index 751e598b..00000000 --- a/packages/requirefs/test/lib/chained-1.js +++ /dev/null @@ -1 +0,0 @@ -exports = require("./chained-2"); \ No newline at end of file diff --git a/packages/requirefs/test/lib/chained-2.js b/packages/requirefs/test/lib/chained-2.js deleted file mode 100644 index 4b16fde4..00000000 --- a/packages/requirefs/test/lib/chained-2.js +++ /dev/null @@ -1 +0,0 @@ -exports = require("./chained-3"); \ No newline at end of file diff --git a/packages/requirefs/test/lib/chained-3.js b/packages/requirefs/test/lib/chained-3.js deleted file mode 100644 index 378c7cc3..00000000 --- a/packages/requirefs/test/lib/chained-3.js +++ /dev/null @@ -1 +0,0 @@ -exports.text = "moo"; \ No newline at end of file diff --git a/packages/requirefs/test/lib/customModule.js b/packages/requirefs/test/lib/customModule.js deleted file mode 100644 index 0f71af9d..00000000 --- a/packages/requirefs/test/lib/customModule.js +++ /dev/null @@ -1 +0,0 @@ -exports = require("donkey"); \ No newline at end of file diff --git a/packages/requirefs/test/lib/individual.js b/packages/requirefs/test/lib/individual.js deleted file mode 100644 index adde3b0f..00000000 --- a/packages/requirefs/test/lib/individual.js +++ /dev/null @@ -1 +0,0 @@ -exports.frog = "hi"; diff --git a/packages/requirefs/test/lib/nodeResolve.js b/packages/requirefs/test/lib/nodeResolve.js deleted file mode 100644 index d47fd080..00000000 --- a/packages/requirefs/test/lib/nodeResolve.js +++ /dev/null @@ -1,3 +0,0 @@ -const frogger = require("frogger"); - -exports = frogger; \ No newline at end of file diff --git a/packages/requirefs/test/lib/node_modules/frogger/index.js b/packages/requirefs/test/lib/node_modules/frogger/index.js deleted file mode 100644 index dde6e307..00000000 --- a/packages/requirefs/test/lib/node_modules/frogger/index.js +++ /dev/null @@ -1 +0,0 @@ -exports.banana = "potato"; \ No newline at end of file diff --git a/packages/requirefs/test/lib/scope.js b/packages/requirefs/test/lib/scope.js deleted file mode 100644 index e8fa065a..00000000 --- a/packages/requirefs/test/lib/scope.js +++ /dev/null @@ -1 +0,0 @@ -exports = coder.test; \ No newline at end of file diff --git a/packages/requirefs/test/lib/subfolder.js b/packages/requirefs/test/lib/subfolder.js deleted file mode 100644 index 9106d5c6..00000000 --- a/packages/requirefs/test/lib/subfolder.js +++ /dev/null @@ -1 +0,0 @@ -exports.orangeColor = require("./subfolder/oranges").orange; \ No newline at end of file diff --git a/packages/requirefs/test/lib/subfolder/goingUp.js b/packages/requirefs/test/lib/subfolder/goingUp.js deleted file mode 100644 index a98ea428..00000000 --- a/packages/requirefs/test/lib/subfolder/goingUp.js +++ /dev/null @@ -1 +0,0 @@ -exports = require("../individual"); \ No newline at end of file diff --git a/packages/requirefs/test/lib/subfolder/oranges.js b/packages/requirefs/test/lib/subfolder/oranges.js deleted file mode 100644 index ee32e8f2..00000000 --- a/packages/requirefs/test/lib/subfolder/oranges.js +++ /dev/null @@ -1 +0,0 @@ -exports.orange = "blue"; \ No newline at end of file diff --git a/packages/requirefs/test/requirefs.bench.ts b/packages/requirefs/test/requirefs.bench.ts deleted file mode 100644 index 410d1982..00000000 --- a/packages/requirefs/test/requirefs.bench.ts +++ /dev/null @@ -1,48 +0,0 @@ -import * as benchmark from "benchmark"; -import { performance } from "perf_hooks"; -import { TestCaseArray, isMac } from "./requirefs.util"; - -const files = [ - "./individual.js", "./chained-1", "./subfolder", - "./subfolder/goingUp", "./nodeResolve", -]; -const toBench = new TestCaseArray(); - -// Limits the amount of time taken for each test, -// but increases uncertainty. -benchmark.options.maxTime = 0.5; - -let suite = new benchmark.Suite(); -let _start = 0; -const addMany = (names: string[]): benchmark.Suite => { - for (let name of names) { - for (let file of files) { - suite = suite.add(`${name} -> ${file}`, async () => { - let rfs = await toBench.byName(name).rfs; - rfs.require(file); - }); - } - } - _start = performance.now(); - return suite; -} -// Returns mean time per operation, in microseconds (10^-6s). -const mean = (c: any): number => { - return Number((c.stats.mean * 10e+5).toFixed(5)); -}; - -// Swap out the tar command for gtar, when on MacOS. -let testNames = ["zip", "bsdtar", isMac ? "gtar" : "tar"]; -addMany(testNames).on("cycle", (event: benchmark.Event) => { - console.log(String(event.target) + ` (~${mean(event.target)} μs/op)`); -}).on("complete", () => { - const slowest = suite.filter("slowest").shift(); - const fastest = suite.filter("fastest").shift(); - console.log(`===\nFastest is ${fastest.name} with ~${mean(fastest)} μs/op`); - if (slowest.name !== fastest.name) { - console.log(`Slowest is ${slowest.name} with ~${mean(slowest)} μs/op`); - } - const d = ((performance.now() - _start)/1000).toFixed(2); - console.log(`Benchmark took ${d} s`); -}) -.run({ "async": true }); diff --git a/packages/requirefs/test/requirefs.test.ts b/packages/requirefs/test/requirefs.test.ts deleted file mode 100644 index 4446ec91..00000000 --- a/packages/requirefs/test/requirefs.test.ts +++ /dev/null @@ -1,56 +0,0 @@ -import { RequireFS } from "../src/requirefs"; -import { TestCaseArray, isMac } from "./requirefs.util"; - -const toTest = new TestCaseArray(); - -describe("requirefs", () => { - for (let i = 0; i < toTest.length(); i++) { - const testCase = toTest.byID(i); - if (!isMac && testCase.name === "gtar") { - break; - } - if (isMac && testCase.name === "tar") { - break; - } - - describe(testCase.name, () => { - let rfs: RequireFS; - beforeAll(async () => { - rfs = await testCase.rfs; - }); - - it("should parse individual module", () => { - expect(rfs.require("./individual.js").frog).toEqual("hi"); - }); - - it("should parse chained modules", () => { - expect(rfs.require("./chained-1").text).toEqual("moo"); - }); - - it("should parse through subfolders", () => { - expect(rfs.require("./subfolder").orangeColor).toEqual("blue"); - }); - - it("should be able to move up directories", () => { - expect(rfs.require("./subfolder/goingUp").frog).toEqual("hi"); - }); - - it("should resolve node_modules", () => { - expect(rfs.require("./nodeResolve").banana).toEqual("potato"); - }); - - it("should access global scope", () => { - // tslint:disable-next-line no-any for testing - (window as any).coder = { - test: "hi", - }; - expect(rfs.require("./scope")).toEqual("hi"); - }); - - it("should find custom module", () => { - rfs.provide("donkey", "ok"); - expect(rfs.require("./customModule")).toEqual("ok"); - }); - }); - } -}); diff --git a/packages/requirefs/test/requirefs.util.ts b/packages/requirefs/test/requirefs.util.ts deleted file mode 100644 index 91708dc8..00000000 --- a/packages/requirefs/test/requirefs.util.ts +++ /dev/null @@ -1,112 +0,0 @@ -import * as cp from "child_process"; -import * as path from "path"; -import * as fs from "fs"; -import * as os from "os"; -import { fromTar, RequireFS, fromZip } from "../src/requirefs"; - -export const isMac = os.platform() === "darwin"; - -/** - * Encapsulates a RequireFS Promise and the - * name of the test case it will be used in. - */ -interface TestCase { - rfs: Promise; - name: string; -} - -/** - * TestCaseArray allows tests and benchmarks to share - * test cases while limiting redundancy. - */ -export class TestCaseArray { - private cases: Array = []; - - constructor(cases?: Array) { - if (!cases) { - this.cases = TestCaseArray.defaults(); - return - } - this.cases = cases; - } - - /** - * Returns default test cases. MacOS users need to have `gtar` binary - * in order to run GNU-tar tests and benchmarks. - */ - public static defaults(): Array { - let cases: Array = [ - TestCaseArray.newCase("cd lib && zip -r ../lib.zip ./*", "lib.zip", async (c) => fromZip(c), "zip"), - TestCaseArray.newCase("cd lib && bsdtar cvf ../lib.tar ./*", "lib.tar", async (c) => fromTar(c), "bsdtar"), - ]; - if (isMac) { - const gtarInstalled: boolean = cp.execSync("which tar").length > 0; - if (gtarInstalled) { - cases.push(TestCaseArray.newCase("cd lib && gtar cvf ../lib.tar ./*", "lib.tar", async (c) => fromTar(c), "gtar")); - } else { - throw new Error("failed to setup gtar test case, gtar binary is necessary to test GNU-tar on MacOS"); - } - } else { - cases.push(TestCaseArray.newCase("cd lib && tar cvf ../lib.tar ./*", "lib.tar", async (c) => fromTar(c), "tar")); - } - return cases; - }; - - /** - * Returns a test case prepared with the provided RequireFS Promise. - * @param command Command to run immediately. For setup. - * @param targetFile File to be read and handled by prepare function. - * @param prepare Run on target file contents before test. - * @param name Test case name. - */ - public static newCase(command: string, targetFile: string, prepare: (content: Uint8Array) => Promise, name: string): TestCase { - cp.execSync(command, { cwd: __dirname }); - const content = fs.readFileSync(path.join(__dirname, targetFile)); - return { - name, - rfs: prepare(content), - }; - } - - /** - * Returns updated TestCaseArray instance, with a new test case. - * @see TestCaseArray.newCase - */ - public add(command: string, targetFile: string, prepare: (content: Uint8Array) => Promise, name: string): TestCaseArray { - this.cases.push(TestCaseArray.newCase(command, targetFile, prepare, name)); - return this; - }; - - /** - * Gets a test case by index. - * @param id Test case index. - */ - public byID(id: number): TestCase { - if (!this.cases[id]) { - if (id < 0 || id >= this.cases.length) { - throw new Error(`test case index "${id}" out of bounds`); - } - throw new Error(`test case at index "${id}" not found`); - } - return this.cases[id]; - } - - /** - * Gets a test case by name. - * @param name Test case name. - */ - public byName(name: string): TestCase { - let c = this.cases.find((c) => c.name === name); - if (!c) { - throw new Error(`test case "${name}" not found`); - } - return c; - } - - /** - * Gets the number of test cases. - */ - public length(): number { - return this.cases.length; - } -} diff --git a/packages/requirefs/yarn.lock b/packages/requirefs/yarn.lock deleted file mode 100644 index da48eeab..00000000 --- a/packages/requirefs/yarn.lock +++ /dev/null @@ -1,99 +0,0 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. -# yarn lockfile v1 - - -"@types/benchmark@^1.0.31": - version "1.0.31" - resolved "https://registry.yarnpkg.com/@types/benchmark/-/benchmark-1.0.31.tgz#2dd3514e93396f362ba5551a7c9ff0da405c1d38" - integrity sha512-F6fVNOkGEkSdo/19yWYOwVKGvzbTeWkR/XQYBKtGBQ9oGRjBN9f/L4aJI4sDcVPJO58Y1CJZN8va9V2BhrZapA== - -"@types/jszip@3.1.4": - version "3.1.4" - resolved "https://registry.yarnpkg.com/@types/jszip/-/jszip-3.1.4.tgz#9b81e3901a6988e9459ac27abf483e6b892251af" - integrity sha512-UaVbz4buRlBEolZYrxqkrGDOypugYlbqGNrUFB4qBaexrLypTH0jyvaF5jolNy5D+5C4kKV1WJ3Yx9cn/JH8oA== - dependencies: - "@types/node" "*" - -"@types/node@*": - version "10.11.3" - resolved "https://registry.yarnpkg.com/@types/node/-/node-10.11.3.tgz#c055536ac8a5e871701aa01914be5731539d01ee" - integrity sha512-3AvcEJAh9EMatxs+OxAlvAEs7OTy6AG94mcH1iqyVDwVVndekLxzwkWQ/Z4SDbY6GO2oyUXyWW8tQ4rENSSQVQ== - -"@types/resolve@0.0.8": - version "0.0.8" - resolved "https://registry.yarnpkg.com/@types/resolve/-/resolve-0.0.8.tgz#f26074d238e02659e323ce1a13d041eee280e194" - integrity sha512-auApPaJf3NPfe18hSoJkp8EbZzer2ISk7o8mCC3M9he/a04+gbMF97NkpD2S8riMGvm4BMRI59/SZQSaLTKpsQ== - dependencies: - "@types/node" "*" - -benchmark@^2.1.4: - version "2.1.4" - resolved "https://registry.yarnpkg.com/benchmark/-/benchmark-2.1.4.tgz#09f3de31c916425d498cc2ee565a0ebf3c2a5629" - integrity sha1-CfPeMckWQl1JjMLuVloOvzwqVik= - dependencies: - lodash "^4.17.4" - platform "^1.3.3" - -inherits@2.0.3: - version "2.0.3" - resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" - integrity sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4= - -jszip@2.6.0: - version "2.6.0" - resolved "https://registry.yarnpkg.com/jszip/-/jszip-2.6.0.tgz#7fb3e9c2f11c8a9840612db5dabbc8cf3a7534b7" - integrity sha1-f7PpwvEciphAYS212rvIzzp1NLc= - dependencies: - pako "~1.0.0" - -lodash@^4.17.4: - version "4.17.11" - resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.11.tgz#b39ea6229ef607ecd89e2c8df12536891cac9b8d" - integrity sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg== - -pako@~1.0.0: - version "1.0.6" - resolved "https://registry.yarnpkg.com/pako/-/pako-1.0.6.tgz#0101211baa70c4bca4a0f63f2206e97b7dfaf258" - integrity sha512-lQe48YPsMJAig+yngZ87Lus+NF+3mtu7DVOBu6b/gHO1YpKwIj5AWjZ/TOS7i46HD/UixzWb1zeWDZfGZ3iYcg== - -path-parse@^1.0.5: - version "1.0.6" - resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.6.tgz#d62dbb5679405d72c4737ec58600e9ddcf06d24c" - integrity sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw== - -path@0.12.7: - version "0.12.7" - resolved "https://registry.yarnpkg.com/path/-/path-0.12.7.tgz#d4dc2a506c4ce2197eb481ebfcd5b36c0140b10f" - integrity sha1-1NwqUGxM4hl+tIHr/NWzbAFAsQ8= - dependencies: - process "^0.11.1" - util "^0.10.3" - -platform@^1.3.3: - version "1.3.5" - resolved "https://registry.yarnpkg.com/platform/-/platform-1.3.5.tgz#fb6958c696e07e2918d2eeda0f0bc9448d733444" - integrity sha512-TuvHS8AOIZNAlE77WUDiR4rySV/VMptyMfcfeoMgs4P8apaZM3JrnbzBiixKUv+XR6i+BXrQh8WAnjaSPFO65Q== - -process@^0.11.1: - version "0.11.10" - resolved "https://registry.yarnpkg.com/process/-/process-0.11.10.tgz#7332300e840161bda3e69a1d1d91a7d4bc16f182" - integrity sha1-czIwDoQBYb2j5podHZGn1LwW8YI= - -resolve@1.8.1: - version "1.8.1" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.8.1.tgz#82f1ec19a423ac1fbd080b0bab06ba36e84a7a26" - integrity sha512-AicPrAC7Qu1JxPCZ9ZgCZlY35QgFnNqc+0LtbRNxnVw4TXvjQ72wnuL9JQcEBgXkI9JM8MsT9kaQoHcpCRJOYA== - dependencies: - path-parse "^1.0.5" - -text-encoding@0.6.4: - version "0.6.4" - resolved "https://registry.yarnpkg.com/text-encoding/-/text-encoding-0.6.4.tgz#e399a982257a276dae428bb92845cb71bdc26d19" - integrity sha1-45mpgiV6J22uQou5KEXLcb3CbRk= - -util@^0.10.3: - version "0.10.4" - resolved "https://registry.yarnpkg.com/util/-/util-0.10.4.tgz#3aa0125bfe668a4672de58857d3ace27ecb76901" - integrity sha512-0Pm9hTQ3se5ll1XihRic3FDIku70C+iHUdT/W926rSgHV5QgXsYbKZN8MSC3tJtSkhuROzvsQjAaFENRXr+19A== - dependencies: - inherits "2.0.3" diff --git a/packages/runner/package.json b/packages/runner/package.json deleted file mode 100644 index 3ff580b4..00000000 --- a/packages/runner/package.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "name": "@coder/runner", - "main": "src/index.ts" -} \ No newline at end of file diff --git a/packages/runner/src/index.ts b/packages/runner/src/index.ts deleted file mode 100644 index bd2b893c..00000000 --- a/packages/runner/src/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "./runner"; diff --git a/packages/runner/src/runner.ts b/packages/runner/src/runner.ts deleted file mode 100644 index e926b946..00000000 --- a/packages/runner/src/runner.ts +++ /dev/null @@ -1,142 +0,0 @@ -import * as cp from "child_process"; -import {field, Logger, logger, time} from "@coder/logger"; - -export interface CommandResult { - readonly exitCode: number; - readonly stdout: string; - readonly stderr: string; -} - -const execute = (command: string, args: string[] = [], options: cp.SpawnOptions, logger: Logger): Promise => { - let resolve: (result: CommandResult) => void; - const prom = new Promise((res): void => { - resolve = res; - }); - - const stdout: string[] = []; - const stderr: string[] = []; - const complete = (exitCode: number): void => { - resolve({ - stderr: stderr.join(""), - stdout: stdout.join(""), - exitCode, - }); - }; - logger.info(`Executing '${command} ${JSON.stringify(args)}'`, field("options", options)); - const proc = cp.spawn(command, args.length > 0 ? args : [], options); - proc.on("close", (code) => { - complete(code); - }); - proc.on("exit", (code) => { - complete(code!); - }); - proc.stdout.on("data", (d) => { - stdout.push(d.toString()); - logger.debug("stdio", field("stdout", d.toString())); - }); - proc.stderr.on("data", (d) => { - stderr.push(d.toString()); - logger.debug("stdio", field("stderr", d.toString())); - }); - - return prom; -}; - -// tslint:disable-next-line no-any -export type TaskFunction = (runner: Runner, ...args: any[]) => void | Promise; - -export interface Runner { - cwd: string; - - execute(command: string, args?: string[], env?: object): Promise; -} - -export interface Task { - readonly name: string; - readonly func: TaskFunction; -} - -const tasks = new Map(); -const activated = new Map>(); - -export const register = (name: string, func: TaskFunction): () => void | Promise => { - if (tasks.has(name)) { - throw new Error(`Task "${name}" already registered`); - } - - tasks.set(name, { - name, - func, - }); - - return (): void | Promise => { - return run(name); - }; -}; - -export const run = (name: string = process.argv[2]): void | Promise => { - const task = tasks.get(name); - if (!task) { - logger.error("Task not found.", field("name", name), field("available", Array.from(tasks.keys()))); - - return process.exit(1); - } - if (activated.has(name)) { - return activated.get(name); - } - let cwd: string = process.cwd(); - const log = logger.named(name); - const timer = time(Number.MAX_SAFE_INTEGER); - let outputTimer: NodeJS.Timer | undefined; - log.info("Starting..."); - const prom = task.func({ - set cwd(path: string) { - cwd = path; - }, - execute(command: string, args: string[] = [], env?: object): Promise { - const prom = execute(command, args, { - cwd, - env: env as NodeJS.ProcessEnv, - }, log); - - return prom.then((result: CommandResult) => { - if (result.exitCode != 0) { - log.error("failed", - field("exitCode", result.exitCode), - field("stdout", result.stdout), - field("stderr", result.stderr) - ); - } - - return result; - }); - }, - }, ...process.argv.slice(3)); - - if (prom) { - activated.set(name, prom); - - const doOutput = (): void => { - outputTimer = setTimeout(() => { - log.info("Still running..."); - doOutput(); - }, 60 * 1000 * 5); - }; - doOutput(); - - prom.then(() => { - if (outputTimer) { - clearTimeout(outputTimer); - } - log.info("Completed!", field("time", timer)); - }).catch((ex) => { - activated.delete(name); - log.error(`Failed: ${ex.message}`); - log.error(`Stack: ${ex.stack}`); - - return process.exit(1); - }); - } - - return prom; -}; diff --git a/packages/runner/yarn.lock b/packages/runner/yarn.lock deleted file mode 100644 index fb57ccd1..00000000 --- a/packages/runner/yarn.lock +++ /dev/null @@ -1,4 +0,0 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. -# yarn lockfile v1 - - diff --git a/packages/server/.gitignore b/packages/server/.gitignore deleted file mode 100644 index 97b40dd7..00000000 --- a/packages/server/.gitignore +++ /dev/null @@ -1,9 +0,0 @@ -out -cli* -!cli.ts -build -resources - -# This file is generated when the binary is created. -# We want to use the parent tsconfig so we can ignore it. -tsconfig.json diff --git a/packages/server/README.md b/packages/server/README.md deleted file mode 100644 index 708280d6..00000000 --- a/packages/server/README.md +++ /dev/null @@ -1,16 +0,0 @@ -# server - -## Endpoints - -### `/tunnel/` - -Tunnels a TCP connection over WebSockets. Implemented for proxying connections from a remote machine locally. - -### `/ports` - -Watches for open ports. Implemented for tunneling ports on the remote server. - -### `/resource/` - -Reads files on GET. -Writes files on POST. \ No newline at end of file diff --git a/packages/server/package.json b/packages/server/package.json deleted file mode 100644 index 88e71d9d..00000000 --- a/packages/server/package.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "name": "server", - "main": "./out/cli.js", - "bin": "./out/cli.js", - "files": [], - "scripts": { - "start": "node --max-old-space-size=32384 --require ts-node/register --require tsconfig-paths/register src/cli.ts", - "build": "rm -rf ./out && ../../node_modules/.bin/cross-env CLI=true UV_THREADPOOL_SIZE=100 node --max-old-space-size=32384 ../../node_modules/webpack/bin/webpack.js --config ./webpack.config.js", - "build:binary": "ts-node scripts/nbin.ts" - }, - "dependencies": { - "@coder/nbin": "^1.1.2", - "commander": "^2.19.0", - "express": "^4.16.4", - "express-static-gzip": "^1.1.3", - "httpolyglot": "^0.1.2", - "mime-types": "^2.1.21", - "node-netstat": "^1.6.0", - "pem": "^1.14.1", - "promise.prototype.finally": "^3.1.0", - "safe-compare": "^1.1.4", - "ws": "^6.1.2", - "xhr2": "^0.1.4" - }, - "devDependencies": { - "@types/commander": "^2.12.2", - "@types/express": "^4.16.0", - "@types/fs-extra": "^5.0.4", - "@types/mime-types": "^2.1.0", - "@types/opn": "^5.1.0", - "@types/pem": "^1.9.4", - "@types/safe-compare": "^1.1.0", - "@types/ws": "^6.0.1", - "fs-extra": "^7.0.1", - "opn": "^5.4.0", - "string-replace-webpack-plugin": "^0.1.3", - "ts-node": "^7.0.1", - "tsconfig-paths": "^3.7.0", - "typescript": "^3.2.2" - } -} diff --git a/packages/server/scripts/nbin.ts b/packages/server/scripts/nbin.ts deleted file mode 100644 index bbc76ba1..00000000 --- a/packages/server/scripts/nbin.ts +++ /dev/null @@ -1,33 +0,0 @@ -import { Binary } from "@coder/nbin"; -import * as fs from "fs"; -import * as os from "os"; -import * as path from "path"; -import { platform } from "../../../build/platform"; - -const target = `${platform()}-${os.arch()}`; -const rootDir = path.join(__dirname, ".."); -const bin = new Binary({ - mainFile: path.join(rootDir, "out", "cli.js"), - target: platform() === "darwin" ? "darwin" : platform() === "musl" ? "alpine" : "linux", -}); -bin.writeFiles(path.join(rootDir, "build", "**")); -bin.writeFiles(path.join(rootDir, "out", "**")); -[ - // Native modules. These are marked as externals in the webpack config. - "spdlog", - "node-pty", - - // These are spdlog's dependencies. - "mkdirp", "bindings", -].forEach((name) => { - bin.writeModule(path.join(__dirname, "../../../node_modules", name)); -}); -bin.build().then((binaryData) => { - const outputPath = path.join(__dirname, "..", `cli-${target}`); - fs.writeFileSync(outputPath, binaryData); - fs.chmodSync(outputPath, "755"); -}).catch((ex) => { - // tslint:disable-next-line:no-console - console.error(ex); - process.exit(1); -}); diff --git a/packages/server/src/cli.ts b/packages/server/src/cli.ts deleted file mode 100644 index 3f7db3e8..00000000 --- a/packages/server/src/cli.ts +++ /dev/null @@ -1,357 +0,0 @@ -import { field, logger } from "@coder/logger"; -import { ServerMessage, SharedProcessActive } from "@coder/protocol/src/proto"; -import { withEnv } from "@coder/protocol"; -import { ChildProcess, fork, ForkOptions } from "child_process"; -import { randomFillSync } from "crypto"; -import * as fs from "fs"; -import * as fse from "fs-extra"; -import * as os from "os"; -import * as path from "path"; -import * as WebSocket from "ws"; -import { buildDir, cacheHome, dataHome, isCli, serveStatic } from "./constants"; -import { createApp } from "./server"; -import { forkModule, requireModule } from "./vscode/bootstrapFork"; -import { SharedProcess, SharedProcessState } from "./vscode/sharedProcess"; -import opn = require("opn"); - -import * as commander from "commander"; - -const collect = (value: T, previous: T[]): T[] => { - return previous.concat(value); -}; - -commander.version(process.env.VERSION || "development") - .name("code-server") - .description("Run VS Code on a remote server.") - .option("--cert ") - .option("--cert-key ") - .option("-e, --extensions-dir

", "Override the main default path for user extensions.") - .option("--extra-extensions-dir [dir]", "Path to an extra user extension directory (repeatable).", collect, []) - .option("--extra-builtin-extensions-dir [dir]", "Path to an extra built-in extension directory (repeatable).", collect, []) - .option("-d, --user-data-dir ", "Specifies the directory that user data is kept in, useful when running as root.") - .option("--data-dir ", "DEPRECATED: Use '--user-data-dir' instead. Customize where user-data is stored.") - .option("-h, --host ", "Customize the hostname.", "0.0.0.0") - .option("-o, --open", "Open in the browser on startup.", false) - .option("-p, --port ", "Port to bind on.", parseInt(process.env.PORT!, 10) || 8443) - .option("-N, --no-auth", "Start without requiring authentication.", false) - .option("-H, --allow-http", "Allow http connections.", false) - .option("-P, --password ", "DEPRECATED: Use the PASSWORD environment variable instead. Specify a password for authentication.") - .option("--disable-telemetry", "Disables ALL telemetry.", false) - .option("--socket ", "Listen on a UNIX socket. Host and port will be ignored when set.") - .option("--trust-proxy", "Trust the X-Forwarded-For header, useful when using a reverse proxy.", false) - .option("--install-extension ", "Install an extension by its ID.") - .option("--bootstrap-fork ", "Used for development. Never set.") - .option("--extra-args ", "Used for development. Never set.") - .arguments("Specify working directory.") - .parse(process.argv); - -Error.stackTraceLimit = Infinity; -if (isCli) { - require("nbin").shimNativeFs(buildDir); - require("nbin").shimNativeFs("/node_modules"); -} -// Makes strings or numbers bold in stdout -const bold = (text: string | number): string | number => { - return `\u001B[1m${text}\u001B[0m`; -}; - -(async (): Promise => { - const args = commander.args; - const options = commander.opts() as { - noAuth: boolean; - readonly allowHttp: boolean; - readonly host: string; - readonly port: number; - readonly disableTelemetry: boolean; - - readonly userDataDir?: string; - readonly extensionsDir?: string; - readonly extraExtensionsDir?: string[]; - readonly extraBuiltinExtensionsDir?: string[]; - - readonly dataDir?: string; - readonly password?: string; - readonly open?: boolean; - readonly cert?: string; - readonly certKey?: string; - readonly socket?: string; - readonly trustProxy?: boolean; - - readonly installExtension?: string; - - readonly bootstrapFork?: string; - readonly extraArgs?: string; - }; - - if (options.disableTelemetry) { - process.env.DISABLE_TELEMETRY = "true"; - } - - // Commander has an exception for `--no` prefixes. Here we'll adjust that. - // tslint:disable-next-line:no-any - const noAuthValue = (commander as any).auth; - options.noAuth = !noAuthValue; - - const dataDir = path.resolve(options.userDataDir || options.dataDir || path.join(dataHome, "code-server")); - const extensionsDir = options.extensionsDir ? path.resolve(options.extensionsDir) : path.resolve(dataDir, "extensions"); - const builtInExtensionsDir = path.resolve(buildDir || path.join(__dirname, ".."), "build/extensions"); - const extraExtensionDirs = options.extraExtensionsDir ? options.extraExtensionsDir.map((p) => path.resolve(p)) : []; - const extraBuiltinExtensionDirs = options.extraBuiltinExtensionsDir ? options.extraBuiltinExtensionsDir.map((p) => path.resolve(p)) : []; - const workingDir = path.resolve(args[0] || process.cwd()); - const dependenciesDir = path.join(os.tmpdir(), "code-server/dependencies"); - - if (!fs.existsSync(dataDir)) { - const oldDataDir = path.resolve(path.join(os.homedir(), ".code-server")); - if (fs.existsSync(oldDataDir)) { - await fse.move(oldDataDir, dataDir); - logger.info(`Moved data directory from ${oldDataDir} to ${dataDir}`); - } - } - - await Promise.all([ - fse.mkdirp(cacheHome), - fse.mkdirp(dataDir), - fse.mkdirp(extensionsDir), - fse.mkdirp(workingDir), - fse.mkdirp(dependenciesDir), - ...extraExtensionDirs.map((p) => fse.mkdirp(p)), - ...extraBuiltinExtensionDirs.map((p) => fse.mkdirp(p)), - ]); - - const unpackExecutable = (binaryName: string): void => { - const memFile = path.join(isCli ? buildDir! : path.join(__dirname, ".."), "build/dependencies", binaryName); - const diskFile = path.join(dependenciesDir, binaryName); - if (!fse.existsSync(diskFile)) { - fse.writeFileSync(diskFile, fse.readFileSync(memFile)); - } - fse.chmodSync(diskFile, "755"); - }; - - unpackExecutable("rg"); - // tslint:disable-next-line no-any - (global).RIPGREP_LOCATION = path.join(dependenciesDir, "rg"); - - if (options.bootstrapFork) { - const modulePath = options.bootstrapFork; - if (!modulePath) { - logger.error("No module path specified to fork!"); - process.exit(1); - } - - process.argv = [ - process.argv[0], - process.argv[1], - ...(options.extraArgs ? JSON.parse(options.extraArgs) : []), - ]; - - return requireModule(modulePath, builtInExtensionsDir); - } - - const logDir = path.join(cacheHome, "code-server/logs", new Date().toISOString().replace(/[-:.TZ]/g, "")); - process.env.VSCODE_LOGS = logDir; - - const certPath = options.cert ? path.resolve(options.cert) : undefined; - const certKeyPath = options.certKey ? path.resolve(options.certKey) : undefined; - - if (certPath && !certKeyPath) { - logger.error("'--cert-key' flag is required when specifying a certificate!"); - process.exit(1); - } - - if (!certPath && certKeyPath) { - logger.error("'--cert' flag is required when specifying certificate key!"); - process.exit(1); - } - - let certData: Buffer | undefined; - let certKeyData: Buffer | undefined; - - if (typeof certPath !== "undefined" && typeof certKeyPath !== "undefined") { - try { - certData = fs.readFileSync(certPath); - } catch (ex) { - logger.error(`Failed to read certificate: ${ex.message}`); - process.exit(1); - } - - try { - certKeyData = fs.readFileSync(certKeyPath); - } catch (ex) { - logger.error(`Failed to read certificate key: ${ex.message}`); - process.exit(1); - } - } - - logger.info(`\u001B[1mcode-server ${process.env.VERSION ? `v${process.env.VERSION}` : "development"}`); - - if (options.dataDir) { - logger.warn('"--data-dir" is deprecated. Use "--user-data-dir" instead.'); - } - - if (options.installExtension) { - const fork = forkModule("vs/code/node/cli", [ - "--user-data-dir", dataDir, - "--builtin-extensions-dir", builtInExtensionsDir, - "--extensions-dir", extensionsDir, - "--install-extension", options.installExtension, - ], withEnv({ env: { VSCODE_ALLOW_IO: "true" } }), dataDir); - - fork.stdout.on("data", (d: Buffer) => d.toString().split("\n").forEach((l) => logger.info(l))); - fork.stderr.on("data", (d: Buffer) => d.toString().split("\n").forEach((l) => logger.error(l))); - fork.on("exit", () => process.exit()); - - return; - } - - // TODO: fill in appropriate doc url - logger.info("Additional documentation: http://github.com/cdr/code-server"); - logger.info("Initializing", field("data-dir", dataDir), field("extensions-dir", extensionsDir), field("working-dir", workingDir), field("log-dir", logDir)); - const sharedProcess = new SharedProcess(dataDir, extensionsDir, builtInExtensionsDir, extraExtensionDirs, extraBuiltinExtensionDirs); - const sendSharedProcessReady = (socket: WebSocket): void => { - const active = new SharedProcessActive(); - active.setSocketPath(sharedProcess.socketPath); - active.setLogPath(logDir); - const serverMessage = new ServerMessage(); - serverMessage.setSharedProcessActive(active); - socket.send(serverMessage.serializeBinary()); - }; - sharedProcess.onState((event) => { - if (event.state === SharedProcessState.Ready) { - app.wss.clients.forEach((c) => sendSharedProcessReady(c)); - } - }); - - if (options.password) { - logger.warn('"--password" is deprecated. Use the PASSWORD environment variable instead.'); - } - - let password = options.password || process.env.PASSWORD; - const usingCustomPassword = !!password; - if (!password) { - // Generate a random password with a length of 24. - const buffer = Buffer.alloc(12); - randomFillSync(buffer); - password = buffer.toString("hex"); - } - - const hasCustomHttps = certData && certKeyData; - const app = await createApp({ - allowHttp: options.allowHttp, - bypassAuth: options.noAuth, - registerMiddleware: (app): void => { - // If we're not running from the binary and we aren't serving the static - // pre-built version, use webpack to serve the web files. - if (!isCli && !serveStatic) { - const webpackConfig = require(path.resolve(__dirname, "..", "..", "web", "webpack.config.js")); - const compiler = require("webpack")(webpackConfig); - app.use(require("webpack-dev-middleware")(compiler, { - logger: { - trace: (m: string): void => logger.trace("webpack", field("message", m)), - debug: (m: string): void => logger.debug("webpack", field("message", m)), - info: (m: string): void => logger.info("webpack", field("message", m)), - warn: (m: string): void => logger.warn("webpack", field("message", m)), - error: (m: string): void => logger.error("webpack", field("message", m)), - }, - publicPath: webpackConfig.output.publicPath, - stats: webpackConfig.stats, - })); - app.use(require("webpack-hot-middleware")(compiler)); - } - }, - serverOptions: { - extensionsDirectory: extensionsDir, - builtInExtensionsDirectory: builtInExtensionsDir, - extraExtensionDirectories: extraExtensionDirs, - extraBuiltinExtensionDirectories: extraBuiltinExtensionDirs, - dataDirectory: dataDir, - workingDirectory: workingDir, - cacheDirectory: cacheHome, - fork: (modulePath: string, args?: string[], options?: ForkOptions): ChildProcess => { - if (options && options.env && options.env.AMD_ENTRYPOINT) { - return forkModule(options.env.AMD_ENTRYPOINT, args, options, dataDir); - } - - return fork(modulePath, args, options); - }, - }, - password, - trustProxy: options.trustProxy, - httpsOptions: hasCustomHttps ? { - key: certKeyData, - cert: certData, - } : undefined, - }); - - if (options.socket) { - logger.info("Starting webserver via socket...", field("socket", options.socket)); - app.server.listen(options.socket, () => { - logger.info(" "); - logger.info("Started on socket address:"); - logger.info(options.socket!); - logger.info(" "); - }); - } else { - logger.info("Starting webserver...", field("host", options.host), field("port", options.port)); - app.server.listen(options.port, options.host, async () => { - const protocol = options.allowHttp ? "http" : "https"; - const address = app.server.address(); - const port = typeof address === "string" ? options.port : address.port; - const url = `${protocol}://localhost:${port}/`; - logger.info(" "); - logger.info("Started (click the link below to open):"); - logger.info(url); - logger.info(" "); - - if (options.open) { - try { - await opn(url); - } catch (e) { - logger.warn("Url couldn't be opened automatically.", field("url", url), field("error", e.message)); - } - } - }); - } - let clientId = 1; - app.wss.on("connection", (ws, req) => { - const id = clientId++; - - if (sharedProcess.state === SharedProcessState.Ready) { - sendSharedProcessReady(ws); - } - - logger.info(`WebSocket opened \u001B[0m${req.url}`, field("client", id), field("ip", req.socket.remoteAddress)); - - ws.on("close", (code) => { - logger.info(`WebSocket closed \u001B[0m${req.url}`, field("client", id), field("code", code)); - }); - }); - app.wss.on("error", (err: NodeJS.ErrnoException) => { - if (err.code === "EADDRINUSE") { - if (options.socket) { - logger.error(`Socket ${bold(options.socket)} is in use. Please specify a different socket.`); - } else { - logger.error(`Port ${bold(options.port)} is in use. Please free up port ${options.port} or specify a different port with the -p flag`); - } - process.exit(1); - } - }); - if (!options.certKey && !options.cert) { - logger.warn("No certificate specified. \u001B[1mThis could be insecure."); - // TODO: fill in appropriate doc url - logger.warn("Documentation on securing your setup: https://github.com/cdr/code-server/blob/master/doc/security/ssl.md"); - } - - if (!options.noAuth) { - logger.info(" "); - logger.info(usingCustomPassword ? "Using custom password." : `Password:\u001B[1m ${password}`); - } else { - logger.warn(" "); - logger.warn("Launched without authentication."); - } - if (options.disableTelemetry) { - logger.info(" "); - logger.info("Telemetry is disabled."); - } -})().catch((ex) => { - logger.error(ex); -}); diff --git a/packages/server/src/constants.ts b/packages/server/src/constants.ts deleted file mode 100644 index da761801..00000000 --- a/packages/server/src/constants.ts +++ /dev/null @@ -1,11 +0,0 @@ -import * as path from "path"; -import * as os from "os"; - -export const isCli = typeof process.env.CLI !== "undefined" && process.env.CLI !== "false"; -export const serveStatic = typeof process.env.SERVE_STATIC !== "undefined" && process.env.SERVE_STATIC !== "false"; -export const buildDir = process.env.BUILD_DIR ? path.resolve(process.env.BUILD_DIR) : ""; -const xdgResolve = (primary: string | undefined, fallback: string): string => { - return primary ? path.resolve(primary) : path.resolve(process.env.HOME || os.homedir(), fallback); -}; -export const dataHome = xdgResolve(process.env.XDG_DATA_HOME, ".local/share"); -export const cacheHome = xdgResolve(process.env.XDG_CACHE_HOME, ".cache"); diff --git a/packages/server/src/ipc.ts b/packages/server/src/ipc.ts deleted file mode 100644 index b5732a9c..00000000 --- a/packages/server/src/ipc.ts +++ /dev/null @@ -1,76 +0,0 @@ -import { EventEmitter } from "events"; -import { ChildProcess } from "child_process"; - -export interface IpcMessage { - readonly event: string; - readonly args: any[]; // tslint:disable-line no-any -} - -export class StdioIpcHandler extends EventEmitter { - private isListening: boolean = false; - - public constructor( - private readonly childProcess?: ChildProcess, - ) { - super(); - } - - // tslint:disable-next-line no-any - public on(event: string, cb: (...args: any[]) => void): this { - this.listen(); - - return super.on(event, cb); - } - - // tslint:disable-next-line no-any - public once(event: string, cb: (...args: any[]) => void): this { - this.listen(); - - return super.once(event, cb); - } - - // tslint:disable-next-line no-any - public addListener(event: string, cb: (...args: any[]) => void): this { - this.listen(); - - return super.addListener(event, cb); - } - - // tslint:disable-next-line no-any - public send(event: string, ...args: any[]): void { - const msg: IpcMessage = { - event, - args, - }; - const d = JSON.stringify(msg); - if (this.childProcess) { - this.childProcess.stdin.write(d + "\n"); - } else { - process.stdout.write(d); - } - } - - private listen(): void { - if (this.isListening) { - return; - } - // tslint:disable-next-line no-any - const onData = (data: any): void => { - try { - const d = JSON.parse(data.toString()) as IpcMessage; - this.emit(d.event, ...d.args); - } catch (ex) { - if (!this.childProcess) { - process.stderr.write(`Failed to parse incoming data: ${ex.message}`); - } - } - }; - if (this.childProcess) { - this.childProcess.stdout.resume(); - this.childProcess.stdout.on("data", onData); - } else { - process.stdin.resume(); - process.stdin.on("data", onData); - } - } -} diff --git a/packages/server/src/portScanner.ts b/packages/server/src/portScanner.ts deleted file mode 100644 index da0be629..00000000 --- a/packages/server/src/portScanner.ts +++ /dev/null @@ -1,113 +0,0 @@ -//@ts-ignore -import * as netstat from "node-netstat"; -import { Event, Emitter } from "@coder/events"; -import { logger } from "@coder/logger"; - -export interface PortScanner { - readonly ports: ReadonlyArray; - - readonly onAdded: Event>; - readonly onRemoved: Event>; - - dispose(): void; -} - -/** - * Creates a disposable port scanner. - * Will scan local ports and emit events when ports are added or removed. - * Currently only scans TCP ports. - */ -export const createPortScanner = (scanInterval: number = 5000): PortScanner => { - const ports = new Map(); - - const addEmitter = new Emitter(); - const removeEmitter = new Emitter(); - - const scan = (onCompleted: (err?: Error) => void): void => { - const scanTime = Date.now(); - const added: number[] = []; - netstat({ - done: (err: Error): void => { - const removed: number[] = []; - ports.forEach((value, key) => { - if (value !== scanTime) { - // Remove port - removed.push(key); - ports.delete(key); - } - }); - if (removed.length > 0) { - removeEmitter.emit(removed); - } - - if (added.length > 0) { - addEmitter.emit(added); - } - - onCompleted(err); - }, - filter: { - state: "LISTEN", - }, - }, (data: { - readonly protocol: string; - readonly local: { - readonly port: number; - readonly address: string; - }; - }) => { - // https://en.wikipedia.org/wiki/Registered_port - if (data.local.port <= 1023 || data.local.port >= 49151) { - return; - } - // Only forward TCP ports - if (!data.protocol.startsWith("tcp")) { - return; - } - - if (!ports.has(data.local.port)) { - added.push(data.local.port); - } - ports.set(data.local.port, scanTime); - }); - }; - - let lastTimeout: NodeJS.Timer | undefined; - let disposed: boolean = false; - - const doInterval = (): void => { - logger.trace("scanning ports"); - scan((error) => { - if (error) { - if ((error as NodeJS.ErrnoException).code === "ENOENT") { - logger.warn("Port scanning will not be available because netstat is not installed"); - } else { - logger.warn(`Port scanning will not be available: ${error.message}`); - } - disposed = true; - } else if (!disposed) { - lastTimeout = setTimeout(doInterval, scanInterval); - } - }); - }; - - doInterval(); - - return { - get ports(): number[] { - return Array.from(ports.keys()); - }, - get onAdded(): Event { - return addEmitter.event; - }, - get onRemoved(): Event { - return removeEmitter.event; - }, - dispose(): void { - if (typeof lastTimeout !== "undefined") { - clearTimeout(lastTimeout); - } - disposed = true; - }, - }; -}; diff --git a/packages/server/src/server.ts b/packages/server/src/server.ts deleted file mode 100644 index 70dbb765..00000000 --- a/packages/server/src/server.ts +++ /dev/null @@ -1,368 +0,0 @@ -import { field, logger } from "@coder/logger"; -import { ReadWriteConnection } from "@coder/protocol"; -import { Server, ServerOptions } from "@coder/protocol/src/node/server"; -import { TunnelCloseCode } from "@coder/tunnel/src/common"; -import { handle as handleTunnel } from "@coder/tunnel/src/server"; -import * as express from "express"; -//@ts-ignore -import * as expressStaticGzip from "express-static-gzip"; -import * as fs from "fs"; -import { mkdirp } from "fs-extra"; -import * as http from "http"; -//@ts-ignore -import * as httpolyglot from "httpolyglot"; -import * as https from "https"; -import * as mime from "mime-types"; -import * as net from "net"; -import * as os from "os"; -import * as path from "path"; -import * as pem from "pem"; -import * as util from "util"; -import * as url from "url"; -import * as ws from "ws"; -import { buildDir } from "./constants"; -import { createPortScanner } from "./portScanner"; -import safeCompare = require("safe-compare"); - -interface CreateAppOptions { - registerMiddleware?: (app: express.Application) => void; - serverOptions?: ServerOptions; - password?: string; - httpsOptions?: https.ServerOptions; - allowHttp?: boolean; - bypassAuth?: boolean; - trustProxy?: boolean; -} - -export const createApp = async (options: CreateAppOptions): Promise<{ - readonly express: express.Application; - readonly server: http.Server; - readonly wss: ws.Server; -}> => { - const parseCookies = (req: http.IncomingMessage): { [key: string]: string } => { - const cookies: { [key: string]: string } = {}; - const rc = req.headers.cookie; - if (rc) { - rc.split(";").forEach((cook) => { - const parts = cook.split("="); - cookies[parts.shift()!.trim()] = decodeURI(parts.join("=")); - }); - } - - return cookies; - }; - - const ensureAuthed = (req: http.IncomingMessage, res: express.Response): boolean => { - if (!isAuthed(req)) { - res.status(401); - res.end(); - - return false; - } - - return true; - }; - - const remoteAddress = (req: http.IncomingMessage): string | void => { - let xForwardedFor = req.headers["x-forwarded-for"]; - if (Array.isArray(xForwardedFor)) { - xForwardedFor = xForwardedFor.join(", "); - } - - if (options.trustProxy && xForwardedFor !== undefined) { - const addresses = xForwardedFor.split(",").map(s => s.trim()); - - return addresses.pop(); - } - - return req.socket.remoteAddress; - }; - - const isAuthed = (req: http.IncomingMessage): boolean => { - try { - if (!options.password || options.bypassAuth) { - return true; - } - - // Try/catch placed here just in case - const cookies = parseCookies(req); - if (cookies.password) { - if (!safeCompare(cookies.password, options.password)) { - let userAgent = req.headers["user-agent"]; - let timestamp = Math.floor(new Date().getTime() / 1000); - if (Array.isArray(userAgent)) { - userAgent = userAgent.join(", "); - } - logger.info("Failed login attempt", - field("password", cookies.password), - field("remote_address", remoteAddress(req)), - field("user_agent", userAgent), - field("timestamp", timestamp)); - - return false; - } - - return true; - } - } catch (ex) { - logger.error("Failed to parse cookies", field("error", ex)); - } - - return false; - }; - - const isEncrypted = (socket: net.Socket): boolean => { - if (options.bypassAuth) { - return true; - } - - // tslint:disable-next-line:no-any - return (socket as any).encrypted; - }; - - const app = express(); - if (options.registerMiddleware) { - options.registerMiddleware(app); - } - - interface CertificateInfo { - readonly key: string; - // tslint:disable-next-line:no-any - readonly cert: any; - } - - const certs = await new Promise(async (resolve, reject): Promise => { - const selfSignedKeyPath = path.join(options.serverOptions!.dataDirectory, "self-signed.key"); - const selfSignedCertPath = path.join(options.serverOptions!.dataDirectory, "self-signed.cert"); - - if (!fs.existsSync(selfSignedKeyPath) || !fs.existsSync(selfSignedCertPath)) { - try { - const certs = await new Promise((res, rej): void => { - pem.createCertificate({ - selfSigned: true, - }, (err, result) => { - if (err) { - rej(err); - - return; - } - - res(result); - }); - }); - - fs.writeFileSync(selfSignedKeyPath, certs.serviceKey); - fs.writeFileSync(selfSignedCertPath, certs.certificate); - } catch (ex) { - return reject(ex); - } - } - - resolve({ - cert: fs.readFileSync(selfSignedCertPath).toString(), - key: fs.readFileSync(selfSignedKeyPath).toString(), - }); - }); - - const server = httpolyglot.createServer(options.allowHttp ? {} : options.httpsOptions || certs, app) as http.Server; - const wss = new ws.Server({ server }); - - wss.shouldHandle = (req): boolean => { - return isAuthed(req); - }; - - const portScanner = createPortScanner(); - wss.on("connection", async (ws, req) => { - if (req.url && req.url.startsWith("/tunnel")) { - try { - const rawPort = req.url.split("/").pop(); - const port = Number.parseInt(rawPort!, 10); - - await handleTunnel(ws, port); - } catch (ex) { - ws.close(TunnelCloseCode.Error, ex.toString()); - } - - return; - } - - if (req.url && req.url.startsWith("/ports")) { - const onAdded = portScanner.onAdded((added) => ws.send(JSON.stringify({ added }))); - const onRemoved = portScanner.onRemoved((removed) => ws.send(JSON.stringify({ removed }))); - ws.on("close", () => { - onAdded.dispose(); - onRemoved.dispose(); - }); - - return ws.send(JSON.stringify({ ports: portScanner.ports })); - } - - const connection: ReadWriteConnection = { - onMessage: (cb): void => { - ws.addEventListener("message", (event) => cb(event.data)); - }, - close: (): void => ws.close(), - send: (data): void => { - if (ws.readyState !== ws.OPEN) { - return; - } - try { - ws.send(data); - } catch (error) { - logger.error(error.message); - } - }, - onUp: (): void => undefined, // This can't come back up. - onDown: (cb): void => ws.addEventListener("close", () => cb()), - onClose: (cb): void => ws.addEventListener("close", () => cb()), - }; - - // tslint:disable-next-line no-unused-expression - new Server(connection, options.serverOptions); - }); - - const redirect = ( - req: express.Request, res: express.Response, - to: string = "", from: string = "", - code: number = 302, protocol: string = req.protocol, - ): void => { - const currentUrl = `${protocol}://${req.headers.host}${req.originalUrl}`; - const newUrl = url.parse(currentUrl); - if (from && newUrl.pathname) { - newUrl.pathname = newUrl.pathname.replace(new RegExp(`\/${from}\/?$`), "/"); - } - if (to) { - newUrl.pathname = (newUrl.pathname || "").replace(/\/$/, "") + `/${to}`; - } - newUrl.path = undefined; // Path is not necessary for format(). - const newUrlString = url.format(newUrl); - logger.trace(`Redirecting from ${currentUrl} to ${newUrlString}`); - - return res.redirect(code, newUrlString); - }; - - const baseDir = buildDir || path.join(__dirname, ".."); - const staticGzip = expressStaticGzip(path.join(baseDir, "build/web")); - - app.use((req, res, next) => { - logger.trace(`\u001B[1m${req.method} ${res.statusCode} \u001B[0m${req.originalUrl}`, - field("host", req.hostname), - field("remote_address", remoteAddress(req))); - - // Force HTTPS unless allowing HTTP. - if (!isEncrypted(req.socket) && !options.allowHttp) { - return redirect(req, res, "", "", 301, "https"); - } - - next(); - }); - - // @ts-ignore - app.use((err, _req, _res, next) => { - logger.error(err.message); - next(); - }); - - // If not authenticated, redirect to the login page. - app.get("/", (req, res, next) => { - if (!isAuthed(req)) { - return redirect(req, res, "login"); - } - next(); - }); - - // If already authenticated, redirect back to the root. - app.get("/login", (req, res, next) => { - if (isAuthed(req)) { - return redirect(req, res, "", "login"); - } - next(); - }); - - // For getting general server data. - app.get("/ping", (_req, res) => { - res.json({ - hostname: os.hostname(), - }); - }); - - // For getting a resource on disk. - app.get("/resource/:url(*)", async (req, res) => { - if (!ensureAuthed(req, res)) { - return; - } - - try { - const fullPath = `/${req.params.url}`; - // const relative = path.relative(options!.dataDirectory, fullPath); - // if (relative.startsWith("..")) { - // return res.status(403).end(); - // } - const exists = fs.existsSync(fullPath); - if (!exists) { - return res.status(404).end(); - } - const stat = await util.promisify(fs.stat)(fullPath); - if (!stat.isFile()) { - res.write("Resource must be a file."); - res.status(422); - - return res.end(); - } - let mimeType = mime.lookup(fullPath); - if (mimeType === false) { - mimeType = "application/octet-stream"; - } - const content = await util.promisify(fs.readFile)(fullPath); - - res.writeHead(200, { - "Content-Type": mimeType, - "Content-Length": content.byteLength, - }); - res.write(content); - res.end(); - } catch (ex) { - res.write(ex.toString()); - res.status(500); - res.end(); - } - }); - - // For writing a resource to disk. - app.post("/resource/:url(*)", async (req, res) => { - if (!ensureAuthed(req, res)) { - return; - } - - try { - const fullPath = `/${req.params.url}`; - - const data: string[] = []; - req.setEncoding("utf8"); - req.on("data", (chunk) => { - data.push(chunk); - }); - req.on("end", async () => { - const body = data.join(""); - await mkdirp(path.dirname(fullPath)); - fs.writeFileSync(fullPath, body); - logger.info("Wrote resource", field("path", fullPath), field("content-length", body.length)); - res.status(200); - res.end(); - }); - } catch (ex) { - res.write(ex.toString()); - res.status(500); - res.end(); - } - }); - - // Everything else just pulls from the static build directory. - app.use(staticGzip); - - return { - express: app, - server, - wss, - }; -}; diff --git a/packages/server/src/vscode/bootstrapFork.ts b/packages/server/src/vscode/bootstrapFork.ts deleted file mode 100644 index 1e66b64f..00000000 --- a/packages/server/src/vscode/bootstrapFork.ts +++ /dev/null @@ -1,123 +0,0 @@ -import * as cp from "child_process"; -import * as fs from "fs"; -import * as os from "os"; -import * as path from "path"; -import * as vm from "vm"; -import { logger } from "@coder/logger"; -import { buildDir, isCli } from "../constants"; - -let ipcMsgBuffer: Buffer[] | undefined = []; -let ipcMsgListener = process.send ? (d: Buffer): number => ipcMsgBuffer!.push(d) : undefined; -if (ipcMsgListener) { - process.on("message", ipcMsgListener); -} - -declare var __non_webpack_require__: typeof require; - -/** - * Requires a module from the filesystem. - * - * Will load from the CLI if file is included inside of the default extensions dir - */ -// tslint:disable-next-line:no-any -const requireFilesystemModule = (id: string, builtInExtensionsDir: string): any => { - const mod = require("module") as typeof import("module"); - const customMod = new mod.Module(id); - customMod.filename = id; - // tslint:disable-next-line:no-any - customMod.paths = (mod)._nodeModulePaths(path.dirname(id)); - - if (id.startsWith(builtInExtensionsDir)) { - customMod.loaded = true; - const fileName = id.endsWith(".js") ? id : `${id}.js`; - const req = vm.runInThisContext(mod.wrap(fs.readFileSync(fileName).toString()), { - displayErrors: true, - filename: fileName, - }); - req(customMod.exports, customMod.require.bind(customMod), customMod, fileName, path.dirname(id)); - - return customMod.exports; - } - - return customMod.require(id); -}; - -export const requireModule = (modulePath: string, builtInExtensionsDir: string): void => { - process.env.AMD_ENTRYPOINT = modulePath; - const xml = require("xhr2"); - xml.XMLHttpRequest.prototype._restrictedHeaders["user-agent"] = false; - // tslint:disable-next-line no-any this makes installing extensions work. - (global as any).XMLHttpRequest = xml.XMLHttpRequest; - - const promiseFinally = require("promise.prototype.finally") as { shim: () => void }; - promiseFinally.shim(); - /** - * Used for loading extensions. Using __non_webpack_require__ didn't work - * as it was not resolving to the FS. - */ - // tslint:disable-next-line:no-any - (global as any).nativeNodeRequire = (id: string): any => { - return requireFilesystemModule(id, builtInExtensionsDir); - }; - - if (isCli) { - process.env.NBIN_BYPASS = "true"; - } - - const baseDir = path.join(buildDir, "build"); - if (isCli) { - __non_webpack_require__(path.join(baseDir, "bootstrap-fork.js.gz")); - } else { - // We need to check `isCli` here to confuse webpack. - require(path.join(__dirname, isCli ? "" : "../../../vscode/out/bootstrap-fork.js")); - } -}; - -/** - * Uses the internal bootstrap-fork.js to load a module - * @example - * const cp = forkModule("vs/code/electron-browser/sharedProcess/sharedProcessMain"); - * cp.stdout.on("data", (data) => console.log(data.toString("utf8"))); - * cp.stderr.on("data", (data) => console.log(data.toString("utf8"))); - * @param modulePath Path of the VS Code module to load. - */ -export const forkModule = (modulePath: string, args?: string[], options?: cp.ForkOptions, dataDir?: string): cp.ChildProcess => { - const forkOptions: cp.ForkOptions = { - stdio: [null, null, null, "ipc"], - }; - if (options && options.env) { - // This prevents vscode from trying to load original-fs from electron. - delete options.env.ELECTRON_RUN_AS_NODE; - forkOptions.env = options.env; - } - - const forkArgs = ["--bootstrap-fork", modulePath]; - if (args) { - forkArgs.push("--extra-args", JSON.stringify(args)); - } - if (dataDir) { - forkArgs.push("--user-data-dir", dataDir); - } - - const nodeArgs = []; - if (isCli) { - nodeArgs.push(path.join(buildDir, "out", "cli.js")); - } else { - nodeArgs.push( - "--require", "ts-node/register", - "--require", "tsconfig-paths/register", - process.argv[1], - ); - } - - const proc = cp.spawn(process.execPath, [...nodeArgs, ...forkArgs], forkOptions); - if (args && args[0] === "--type=watcherService" && os.platform() === "linux") { - cp.exec(`renice -n 19 -p ${proc.pid}`, (error) => { - if (error) { - logger.warn(error.message); - } - }); - } - - return proc; -}; diff --git a/packages/server/src/vscode/sharedProcess.ts b/packages/server/src/vscode/sharedProcess.ts deleted file mode 100644 index 6834c2e1..00000000 --- a/packages/server/src/vscode/sharedProcess.ts +++ /dev/null @@ -1,164 +0,0 @@ -import { ChildProcess } from "child_process"; -import * as os from "os"; -import * as path from "path"; -import { forkModule } from "./bootstrapFork"; -import { StdioIpcHandler } from "../ipc"; -import { ParsedArgs } from "vs/platform/environment/common/environment"; -import { Emitter } from "@coder/events/src"; -import { retry } from "@coder/ide/src/retry"; -import { logger, field, Level } from "@coder/logger"; -import { withEnv } from "@coder/protocol"; - -export enum SharedProcessState { - Stopped, - Starting, - Ready, -} - -export type SharedProcessEvent = { - readonly state: SharedProcessState.Ready | SharedProcessState.Starting; -} | { - readonly state: SharedProcessState.Stopped; - readonly error: string; -}; - -export class SharedProcess { - public readonly socketPath: string = os.platform() === "win32" - ? path.join("\\\\?\\pipe", os.tmpdir(), `.code-server${Math.random().toString()}`) - : path.join(os.tmpdir(), `.code-server${Math.random().toString()}`); - private _state: SharedProcessState = SharedProcessState.Stopped; - private activeProcess: ChildProcess | undefined; - private ipcHandler: StdioIpcHandler | undefined; - private readonly onStateEmitter = new Emitter(); - public readonly onState = this.onStateEmitter.event; - private readonly logger = logger.named("shared"); - private readonly retry = retry.register("Shared process", () => this.connect()); - private disposed: boolean = false; - - public constructor( - private readonly userDataDir: string, - private readonly extensionsDir: string, - private readonly builtInExtensionsDir: string, - private readonly extraExtensionDirs: string[], - private readonly extraBuiltinExtensionDirs: string[], - ) { - this.retry.run(); - } - - public get state(): SharedProcessState { - return this._state; - } - - /** - * Signal the shared process to terminate. - */ - public dispose(): void { - this.disposed = true; - if (this.ipcHandler) { - this.ipcHandler.send("handshake:goodbye"); - } - this.ipcHandler = undefined; - } - - /** - * Start and connect to the shared process. - */ - private async connect(): Promise { - this.setState({ state: SharedProcessState.Starting }); - const activeProcess = await this.restart(); - - activeProcess.on("exit", (exitCode) => { - const error = new Error(`Exited with ${exitCode}`); - this.setState({ - error: error.message, - state: SharedProcessState.Stopped, - }); - if (!this.disposed) { - this.retry.run(error); - } - }); - - this.setState({ state: SharedProcessState.Ready }); - } - - /** - * Restart the shared process. Kill existing process if running. Resolve when - * the shared process is ready and reject when it errors or dies before being - * ready. - */ - private async restart(): Promise { - if (this.activeProcess && !this.activeProcess.killed) { - this.activeProcess.kill(); - } - - const activeProcess = forkModule( - "vs/code/electron-browser/sharedProcess/sharedProcessMain", [], - withEnv({ env: { VSCODE_ALLOW_IO: "true" } }), this.userDataDir, - ); - this.activeProcess = activeProcess; - - await new Promise((resolve, reject): void => { - const doReject = (error: Error | number | null): void => { - if (error === null) { - error = new Error("Exited unexpectedly"); - } else if (typeof error === "number") { - error = new Error(`Exited with ${error}`); - } - activeProcess.removeAllListeners(); - this.setState({ - error: error.message, - state: SharedProcessState.Stopped, - }); - reject(error); - }; - - activeProcess.on("error", doReject); - activeProcess.on("exit", doReject); - - activeProcess.stdout.on("data", (data) => { - logger.trace("stdout", field("data", data.toString())); - }); - - activeProcess.stderr.on("data", (data) => { - // Warn instead of error to prevent panic. It's unlikely stderr here is - // about anything critical to the functioning of the editor. - logger.warn("stderr", field("data", data.toString())); - }); - - this.ipcHandler = new StdioIpcHandler(activeProcess); - this.ipcHandler.once("handshake:hello", () => { - const data: { - sharedIPCHandle: string; - args: Partial; - logLevel: Level; - } = { - args: { - "builtin-extensions-dir": this.builtInExtensionsDir, - "user-data-dir": this.userDataDir, - "extensions-dir": this.extensionsDir, - "extra-extension-dirs": this.extraExtensionDirs, - "extra-builtin-extension-dirs": this.extraBuiltinExtensionDirs, - }, - logLevel: this.logger.level, - sharedIPCHandle: this.socketPath, - }; - this.ipcHandler!.send("handshake:hey there", "", data); - }); - this.ipcHandler.once("handshake:im ready", () => { - activeProcess.removeListener("error", doReject); - activeProcess.removeListener("exit", doReject); - resolve(); - }); - }); - - return activeProcess; - } - - /** - * Set the internal shared process state and emit the state event. - */ - private setState(event: SharedProcessEvent): void { - this._state = event.state; - this.onStateEmitter.emit(event); - } -} diff --git a/packages/server/webpack.config.js b/packages/server/webpack.config.js deleted file mode 100644 index bd2768e5..00000000 --- a/packages/server/webpack.config.js +++ /dev/null @@ -1,35 +0,0 @@ -const path = require("path"); -const webpack = require("webpack"); -const merge = require("webpack-merge"); - -const root = path.resolve(__dirname, "../.."); - -module.exports = merge( - require(path.join(root, "scripts/webpack.node.config.js"))({ - dirname: __dirname, - }), { - output: { - filename: "cli.js", - libraryTarget: "commonjs", - }, - node: { - console: false, - global: false, - process: false, - Buffer: false, - __filename: false, - __dirname: false, - setImmediate: false - }, - externals: { - "nbin": "commonjs nbin", - }, - entry: "./packages/server/src/cli.ts", - plugins: [ - new webpack.DefinePlugin({ - "process.env.BUILD_DIR": `"${__dirname.replace(/\\/g, "\\\\")}"`, - "process.env.CLI": `"${process.env.CLI ? "true" : "false"}"`, - }), - ], - }, -); diff --git a/packages/server/yarn.lock b/packages/server/yarn.lock deleted file mode 100644 index b97e1daa..00000000 --- a/packages/server/yarn.lock +++ /dev/null @@ -1,1108 +0,0 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. -# yarn lockfile v1 - - -"@coder/logger@^1.0.3": - version "1.0.3" - resolved "https://registry.yarnpkg.com/@coder/logger/-/logger-1.0.3.tgz#e0e1ae5496fde5a3c6ef3d748fdfb26a55add8b8" - integrity sha512-1o5qDZX2VZUNnzgz5KfAdMnaqaX6FNeTs0dUdg73MRHfQW94tFTIryFC1xTTCuzxGDjVHOHkaUAI4uHA2bheOA== - -"@coder/nbin@^1.1.2": - version "1.1.2" - resolved "https://registry.yarnpkg.com/@coder/nbin/-/nbin-1.1.2.tgz#3af9e4368f37532da446c7c291d476bb52de995d" - integrity sha512-MkwKpmu1SU9wkBwQ+bZVU2nPzENWUa3Isut9osVq3LG+udovsk+k5c5rjfJ1q8cf4km5snjOSYiulug3n9sdgw== - dependencies: - "@coder/logger" "^1.0.3" - fs-extra "^7.0.1" - glob "^7.1.3" - node-fetch "^2.3.0" - ora "^3.2.0" - -"@types/body-parser@*": - version "1.17.0" - resolved "https://registry.yarnpkg.com/@types/body-parser/-/body-parser-1.17.0.tgz#9f5c9d9bd04bb54be32d5eb9fc0d8c974e6cf58c" - integrity sha512-a2+YeUjPkztKJu5aIF2yArYFQQp8d51wZ7DavSHjFuY1mqVgidGyzEQ41JIVNy82fXj8yPgy2vJmfIywgESW6w== - dependencies: - "@types/connect" "*" - "@types/node" "*" - -"@types/commander@^2.12.2": - version "2.12.2" - resolved "https://registry.yarnpkg.com/@types/commander/-/commander-2.12.2.tgz#183041a23842d4281478fa5d23c5ca78e6fd08ae" - integrity sha512-0QEFiR8ljcHp9bAbWxecjVRuAMr16ivPiGOw6KFQBVrVd0RQIcM3xKdRisH2EDWgVWujiYtHwhSkSUoAAGzH7Q== - dependencies: - commander "*" - -"@types/connect@*": - version "3.4.32" - resolved "https://registry.yarnpkg.com/@types/connect/-/connect-3.4.32.tgz#aa0e9616b9435ccad02bc52b5b454ffc2c70ba28" - integrity sha512-4r8qa0quOvh7lGD0pre62CAb1oni1OO6ecJLGCezTmhQ8Fz50Arx9RUszryR8KlgK6avuSXvviL6yWyViQABOg== - dependencies: - "@types/node" "*" - -"@types/events@*": - version "1.2.0" - resolved "https://registry.yarnpkg.com/@types/events/-/events-1.2.0.tgz#81a6731ce4df43619e5c8c945383b3e62a89ea86" - integrity sha512-KEIlhXnIutzKwRbQkGWb/I4HFqBuUykAdHgDED6xqwXJfONCjF5VoE0cXEiurh3XauygxzeDzgtXUqvLkxFzzA== - -"@types/express-serve-static-core@*": - version "4.16.0" - resolved "https://registry.yarnpkg.com/@types/express-serve-static-core/-/express-serve-static-core-4.16.0.tgz#fdfe777594ddc1fe8eb8eccce52e261b496e43e7" - integrity sha512-lTeoCu5NxJU4OD9moCgm0ESZzweAx0YqsAcab6OB0EB3+As1OaHtKnaGJvcngQxYsi9UNv0abn4/DRavrRxt4w== - dependencies: - "@types/events" "*" - "@types/node" "*" - "@types/range-parser" "*" - -"@types/express@^4.16.0": - version "4.16.0" - resolved "https://registry.yarnpkg.com/@types/express/-/express-4.16.0.tgz#6d8bc42ccaa6f35cf29a2b7c3333cb47b5a32a19" - integrity sha512-TtPEYumsmSTtTetAPXlJVf3kEqb6wZK0bZojpJQrnD/djV4q1oB6QQ8aKvKqwNPACoe02GNiy5zDzcYivR5Z2w== - dependencies: - "@types/body-parser" "*" - "@types/express-serve-static-core" "*" - "@types/serve-static" "*" - -"@types/fs-extra@^5.0.4": - version "5.0.4" - resolved "https://registry.yarnpkg.com/@types/fs-extra/-/fs-extra-5.0.4.tgz#b971134d162cc0497d221adde3dbb67502225599" - integrity sha512-DsknoBvD8s+RFfSGjmERJ7ZOP1HI0UZRA3FSI+Zakhrc/Gy26YQsLI+m5V5DHxroHRJqCDLKJp7Hixn8zyaF7g== - dependencies: - "@types/node" "*" - -"@types/json5@^0.0.29": - version "0.0.29" - resolved "https://registry.yarnpkg.com/@types/json5/-/json5-0.0.29.tgz#ee28707ae94e11d2b827bcbe5270bcea7f3e71ee" - integrity sha1-7ihweulOEdK4J7y+UnC86n8+ce4= - -"@types/mime-types@^2.1.0": - version "2.1.0" - resolved "https://registry.yarnpkg.com/@types/mime-types/-/mime-types-2.1.0.tgz#9ca52cda363f699c69466c2a6ccdaad913ea7a73" - integrity sha1-nKUs2jY/aZxpRmwqbM2q2RPqenM= - -"@types/mime@*": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@types/mime/-/mime-2.0.0.tgz#5a7306e367c539b9f6543499de8dd519fac37a8b" - integrity sha512-A2TAGbTFdBw9azHbpVd+/FkdW2T6msN1uct1O9bH3vTerEHKZhTXJUQXy+hNq1B0RagfU8U+KBdqiZpxjhOUQA== - -"@types/node@*": - version "10.12.18" - resolved "https://registry.yarnpkg.com/@types/node/-/node-10.12.18.tgz#1d3ca764718915584fcd9f6344621b7672665c67" - integrity sha512-fh+pAqt4xRzPfqA6eh3Z2y6fyZavRIumvjhaCL753+TVkGKGhpPeyrJG2JftD0T9q4GF00KjefsQ+PQNDdWQaQ== - -"@types/opn@^5.1.0": - version "5.1.0" - resolved "https://registry.yarnpkg.com/@types/opn/-/opn-5.1.0.tgz#bff7bc371677f4bdbb37884400e03fd81f743927" - integrity sha512-TNPrB7Y1xl06zDI0aGyqkgxjhIev3oJ+cdqlZ52MTAHauWpEL/gIUdHebIfRHFZk9IqSBpE2ci1DT48iZH81yg== - dependencies: - "@types/node" "*" - -"@types/pem@^1.9.4": - version "1.9.4" - resolved "https://registry.yarnpkg.com/@types/pem/-/pem-1.9.4.tgz#9ef9302dc5f0352503e193003b208cddef4ffa45" - integrity sha512-cLRUgpedqF4lnQxDsjbRCgHRPHaJvnsHC+LEBTKnChddoPYJYQMq/LjSsEDwvRteeJV8MGt7Ea9jYCBVufrcNg== - dependencies: - "@types/node" "*" - -"@types/range-parser@*": - version "1.2.3" - resolved "https://registry.yarnpkg.com/@types/range-parser/-/range-parser-1.2.3.tgz#7ee330ba7caafb98090bece86a5ee44115904c2c" - integrity sha512-ewFXqrQHlFsgc09MK5jP5iR7vumV/BYayNC6PgJO2LPe8vrnNFyjQjSppfEngITi0qvfKtzFvgKymGheFM9UOA== - -"@types/safe-compare@^1.1.0": - version "1.1.0" - resolved "https://registry.yarnpkg.com/@types/safe-compare/-/safe-compare-1.1.0.tgz#47ed9b9ca51a3a791b431cd59b28f47fa9bf1224" - integrity sha512-1ri+LJhh0gRxIa37IpGytdaW7yDEHeJniBSMD1BmitS07R1j63brcYCzry+l0WJvGdEKQNQ7DYXO2epgborWPw== - -"@types/serve-static@*": - version "1.13.2" - resolved "https://registry.yarnpkg.com/@types/serve-static/-/serve-static-1.13.2.tgz#f5ac4d7a6420a99a6a45af4719f4dcd8cd907a48" - integrity sha512-/BZ4QRLpH/bNYgZgwhKEh+5AsboDBcUdlBYgzoLX0fpj3Y2gp6EApyOlM3bK53wQS/OE1SrdSYBAbux2D1528Q== - dependencies: - "@types/express-serve-static-core" "*" - "@types/mime" "*" - -"@types/ws@^6.0.1": - version "6.0.1" - resolved "https://registry.yarnpkg.com/@types/ws/-/ws-6.0.1.tgz#ca7a3f3756aa12f62a0a62145ed14c6db25d5a28" - integrity sha512-EzH8k1gyZ4xih/MaZTXwT2xOkPiIMSrhQ9b8wrlX88L0T02eYsddatQlwVFlEPyEqV0ChpdpNnE51QPH6NVT4Q== - dependencies: - "@types/events" "*" - "@types/node" "*" - -accepts@~1.3.5: - version "1.3.5" - resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.5.tgz#eb777df6011723a3b14e8a72c0805c8e86746bd2" - integrity sha1-63d99gEXI6OxTopywIBcjoZ0a9I= - dependencies: - mime-types "~2.1.18" - negotiator "0.6.1" - -amdefine@>=0.0.4: - version "1.0.1" - resolved "https://registry.yarnpkg.com/amdefine/-/amdefine-1.0.1.tgz#4a5282ac164729e93619bcfd3ad151f817ce91f5" - integrity sha1-SlKCrBZHKek2Gbz9OtFR+BfOkfU= - -ansi-regex@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-4.0.0.tgz#70de791edf021404c3fd615aa89118ae0432e5a9" - integrity sha512-iB5Dda8t/UqpPI/IjsejXu5jOGDrzn41wJyljwPH65VCIbk6+1BzFIMJGFwTNrYXT1CrD+B4l19U7awiQ8rk7w== - -ansi-styles@^3.2.1: - version "3.2.1" - resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d" - integrity sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA== - dependencies: - color-convert "^1.9.0" - -array-flatten@1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/array-flatten/-/array-flatten-1.1.1.tgz#9a5f699051b1e7073328f2a008968b64ea2955d2" - integrity sha1-ml9pkFGx5wczKPKgCJaLZOopVdI= - -arrify@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/arrify/-/arrify-1.0.1.tgz#898508da2226f380df904728456849c1501a4b0d" - integrity sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0= - -async-limiter@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/async-limiter/-/async-limiter-1.0.0.tgz#78faed8c3d074ab81f22b4e985d79e8738f720f8" - integrity sha512-jp/uFnooOiO+L211eZOoSyzpOITMXx1rBITauYykG3BRYPu8h0UcxsPNB04RR5vo4Tyz3+ay17tR6JVf9qzYWg== - -async@~0.2.10: - version "0.2.10" - resolved "https://registry.yarnpkg.com/async/-/async-0.2.10.tgz#b6bbe0b0674b9d719708ca38de8c237cb526c3d1" - integrity sha1-trvgsGdLnXGXCMo43owjfLUmw9E= - -balanced-match@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767" - integrity sha1-ibTRmasr7kneFk6gK4nORi1xt2c= - -big.js@^3.1.3: - version "3.2.0" - resolved "https://registry.yarnpkg.com/big.js/-/big.js-3.2.0.tgz#a5fc298b81b9e0dca2e458824784b65c52ba588e" - integrity sha512-+hN/Zh2D08Mx65pZ/4g5bsmNiZUuChDiQfTUQ7qJr4/kuopCr88xZsAXv6mBoZEsUI4OuGHlX59qE94K2mMW8Q== - -body-parser@1.18.3: - version "1.18.3" - resolved "https://registry.yarnpkg.com/body-parser/-/body-parser-1.18.3.tgz#5b292198ffdd553b3a0f20ded0592b956955c8b4" - integrity sha1-WykhmP/dVTs6DyDe0FkrlWlVyLQ= - dependencies: - bytes "3.0.0" - content-type "~1.0.4" - debug "2.6.9" - depd "~1.1.2" - http-errors "~1.6.3" - iconv-lite "0.4.23" - on-finished "~2.3.0" - qs "6.5.2" - raw-body "2.3.3" - type-is "~1.6.16" - -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" - -buffer-alloc-unsafe@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/buffer-alloc-unsafe/-/buffer-alloc-unsafe-1.1.0.tgz#bd7dc26ae2972d0eda253be061dba992349c19f0" - integrity sha512-TEM2iMIEQdJ2yjPJoSIsldnleVaAk1oW3DBVUykyOLsEsFmEc9kn+SFFPz+gl54KQNxlDnAwCXosOS9Okx2xAg== - -buffer-alloc@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/buffer-alloc/-/buffer-alloc-1.2.0.tgz#890dd90d923a873e08e10e5fd51a57e5b7cce0ec" - integrity sha512-CFsHQgjtW1UChdXgbyJGtnm+O/uLQeZdtbDo8mfUgYXCHSM1wgrVxXm6bSyrUuErEb+4sYVGCzASBRot7zyrow== - dependencies: - buffer-alloc-unsafe "^1.1.0" - buffer-fill "^1.0.0" - -buffer-fill@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/buffer-fill/-/buffer-fill-1.0.0.tgz#f8f78b76789888ef39f205cd637f68e702122b2c" - integrity sha1-+PeLdniYiO858gXNY39o5wISKyw= - -buffer-from@^1.0.0, buffer-from@^1.1.0: - version "1.1.1" - resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.1.tgz#32713bc028f75c02fdb710d7c7bcec1f2c6070ef" - integrity sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A== - -bytes@3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.0.0.tgz#d32815404d689699f85a4ea4fa8755dd13a96048" - integrity sha1-0ygVQE1olpn4Wk6k+odV3ROpYEg= - -chalk@^2.0.1, chalk@^2.4.2: - version "2.4.2" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" - 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" - -charenc@~0.0.1: - version "0.0.2" - resolved "https://registry.yarnpkg.com/charenc/-/charenc-0.0.2.tgz#c0a1d2f3a7092e03774bfa83f14c0fc5790a8667" - integrity sha1-wKHS86cJLgN3S/qD8UwPxXkKhmc= - -cli-cursor@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-2.1.0.tgz#b35dac376479facc3e94747d41d0d0f5238ffcb5" - integrity sha1-s12sN2R5+sw+lHR9QdDQ9SOP/LU= - dependencies: - restore-cursor "^2.0.0" - -cli-spinners@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/cli-spinners/-/cli-spinners-2.0.0.tgz#4b078756fc17a8f72043fdc9f1f14bf4fa87e2df" - integrity sha512-yiEBmhaKPPeBj7wWm4GEdtPZK940p9pl3EANIrnJ3JnvWyrPjcFcsEq6qRUuQ7fzB0+Y82ld3p6B34xo95foWw== - -clone@^1.0.2: - version "1.0.4" - resolved "https://registry.yarnpkg.com/clone/-/clone-1.0.4.tgz#da309cc263df15994c688ca902179ca3c7cd7c7e" - integrity sha1-2jCcwmPfFZlMaIypAheco8fNfH4= - -color-convert@^1.9.0: - version "1.9.3" - resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8" - integrity sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg== - dependencies: - color-name "1.1.3" - -color-name@1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" - integrity sha1-p9BVi9icQveV3UIyj3QIMcpTvCU= - -commander@*, commander@^2.19.0: - version "2.19.0" - resolved "https://registry.yarnpkg.com/commander/-/commander-2.19.0.tgz#f6198aa84e5b83c46054b94ddedbfed5ee9ff12a" - integrity sha512-6tvAOO+D6OENvRAh524Dh9jcfKTYDQAqvqezbCW82xj5X0pSrcpxtvRKHLG0yBY6SD7PSDrJaj+0AiOcKVd1Xg== - -concat-map@0.0.1: - version "0.0.1" - resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" - integrity sha1-2Klr13/Wjfd5OnMDajug1UBdR3s= - -content-disposition@0.5.2: - version "0.5.2" - resolved "https://registry.yarnpkg.com/content-disposition/-/content-disposition-0.5.2.tgz#0cf68bb9ddf5f2be7961c3a85178cb85dba78cb4" - integrity sha1-DPaLud318r55YcOoUXjLhdunjLQ= - -content-type@~1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/content-type/-/content-type-1.0.4.tgz#e138cc75e040c727b1966fe5e5f8c9aee256fe3b" - integrity sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA== - -cookie-signature@1.0.6: - version "1.0.6" - resolved "https://registry.yarnpkg.com/cookie-signature/-/cookie-signature-1.0.6.tgz#e303a882b342cc3ee8ca513a79999734dab3ae2c" - integrity sha1-4wOogrNCzD7oylE6eZmXNNqzriw= - -cookie@0.3.1: - version "0.3.1" - resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.3.1.tgz#e7e0a1f9ef43b4c8ba925c5c5a96e806d16873bb" - integrity sha1-5+Ch+e9DtMi6klxcWpboBtFoc7s= - -crypt@~0.0.1: - version "0.0.2" - resolved "https://registry.yarnpkg.com/crypt/-/crypt-0.0.2.tgz#88d7ff7ec0dfb86f713dc87bbb42d044d3e6c41b" - integrity sha1-iNf/fsDfuG9xPch7u0LQRNPmxBs= - -css-loader@^0.9.1: - version "0.9.1" - resolved "https://registry.yarnpkg.com/css-loader/-/css-loader-0.9.1.tgz#2e1aa00ce7e30ef2c6a7a4b300a080a7c979e0dc" - integrity sha1-LhqgDOfjDvLGp6SzAKCAp8l54Nw= - dependencies: - csso "1.3.x" - loader-utils "~0.2.2" - source-map "~0.1.38" - -csso@1.3.x: - version "1.3.12" - resolved "https://registry.yarnpkg.com/csso/-/csso-1.3.12.tgz#fc628694a2d38938aaac4996753218fd311cdb9e" - integrity sha1-/GKGlKLTiTiqrEmWdTIY/TEc254= - -debug@2.6.9: - version "2.6.9" - resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" - integrity sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA== - dependencies: - ms "2.0.0" - -deepmerge@^2.0.1: - version "2.2.1" - resolved "https://registry.yarnpkg.com/deepmerge/-/deepmerge-2.2.1.tgz#5d3ff22a01c00f645405a2fbc17d0778a1801170" - integrity sha512-R9hc1Xa/NOBi9WRVUWg19rl1UB7Tt4kuPd+thNJgFZoxXsTz7ncaPaeIm+40oSGuP33DfMb4sZt1QIGiJzC4EA== - -defaults@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/defaults/-/defaults-1.0.3.tgz#c656051e9817d9ff08ed881477f3fe4019f3ef7d" - integrity sha1-xlYFHpgX2f8I7YgUd/P+QBnz730= - dependencies: - clone "^1.0.2" - -define-properties@^1.1.2: - version "1.1.3" - resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.1.3.tgz#cf88da6cbee26fe6db7094f61d870cbd84cee9f1" - integrity sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ== - dependencies: - object-keys "^1.0.12" - -depd@~1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/depd/-/depd-1.1.2.tgz#9bcd52e14c097763e749b274c4346ed2e560b5a9" - integrity sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak= - -destroy@~1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/destroy/-/destroy-1.0.4.tgz#978857442c44749e4206613e37946205826abd80" - integrity sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA= - -diff@^3.1.0: - version "3.5.0" - resolved "https://registry.yarnpkg.com/diff/-/diff-3.5.0.tgz#800c0dd1e0a8bfbc95835c202ad220fe317e5a12" - integrity sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA== - -ee-first@1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d" - integrity sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0= - -emojis-list@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/emojis-list/-/emojis-list-2.1.0.tgz#4daa4d9db00f9819880c79fa457ae5b09a1fd389" - integrity sha1-TapNnbAPmBmIDHn6RXrlsJof04k= - -encodeurl@~1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-1.0.2.tgz#ad3ff4c86ec2d029322f5a02c3a9a606c95b3f59" - integrity sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k= - -es-abstract@^1.9.0: - version "1.13.0" - resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.13.0.tgz#ac86145fdd5099d8dd49558ccba2eaf9b88e24e9" - integrity sha512-vDZfg/ykNxQVwup/8E1BZhVzFfBxs9NqMzGcvIJrqg5k2/5Za2bWo40dK2J1pgLngZ7c+Shh8lwYtLGyrwPutg== - dependencies: - es-to-primitive "^1.2.0" - function-bind "^1.1.1" - has "^1.0.3" - is-callable "^1.1.4" - is-regex "^1.0.4" - object-keys "^1.0.12" - -es-to-primitive@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/es-to-primitive/-/es-to-primitive-1.2.0.tgz#edf72478033456e8dda8ef09e00ad9650707f377" - integrity sha512-qZryBOJjV//LaxLTV6UC//WewneB3LcXOL9NP++ozKVXsIIIpm/2c13UDiD9Jp2eThsecw9m3jPqDwTyobcdbg== - dependencies: - is-callable "^1.1.4" - is-date-object "^1.0.1" - is-symbol "^1.0.2" - -es6-promisify@^6.0.0: - version "6.0.1" - resolved "https://registry.yarnpkg.com/es6-promisify/-/es6-promisify-6.0.1.tgz#6edaa45f3bd570ffe08febce66f7116be4b1cdb6" - integrity sha512-J3ZkwbEnnO+fGAKrjVpeUAnZshAdfZvbhQpqfIH9kSAspReRC4nJnu8ewm55b4y9ElyeuhCTzJD0XiH8Tsbhlw== - -escape-html@~1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/escape-html/-/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988" - integrity sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg= - -escape-string-regexp@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" - integrity sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ= - -etag@~1.8.1: - version "1.8.1" - resolved "https://registry.yarnpkg.com/etag/-/etag-1.8.1.tgz#41ae2eeb65efa62268aebfea83ac7d79299b0887" - integrity sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc= - -express-static-gzip@^1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/express-static-gzip/-/express-static-gzip-1.1.3.tgz#345ea02637d9d5865777d6fb57ccc0884abcda65" - integrity sha512-k8Q4Dx4PDpzEb8kth4uiPWrBeJWJYSgnWMzNdjQUOsEyXfYKbsyZDkU/uXYKcorRwOie5Vzp4RMEVrJLMfB6rA== - dependencies: - serve-static "^1.12.3" - -express@^4.16.4: - version "4.16.4" - resolved "https://registry.yarnpkg.com/express/-/express-4.16.4.tgz#fddef61926109e24c515ea97fd2f1bdbf62df12e" - integrity sha512-j12Uuyb4FMrd/qQAm6uCHAkPtO8FDTRJZBDd5D2KOL2eLaz1yUNdUB/NOIyq0iU4q4cFarsUCrnFDPBcnksuOg== - dependencies: - accepts "~1.3.5" - array-flatten "1.1.1" - body-parser "1.18.3" - content-disposition "0.5.2" - content-type "~1.0.4" - cookie "0.3.1" - cookie-signature "1.0.6" - debug "2.6.9" - depd "~1.1.2" - encodeurl "~1.0.2" - escape-html "~1.0.3" - etag "~1.8.1" - finalhandler "1.1.1" - fresh "0.5.2" - merge-descriptors "1.0.1" - methods "~1.1.2" - on-finished "~2.3.0" - parseurl "~1.3.2" - path-to-regexp "0.1.7" - proxy-addr "~2.0.4" - qs "6.5.2" - range-parser "~1.2.0" - safe-buffer "5.1.2" - send "0.16.2" - serve-static "1.13.2" - setprototypeof "1.1.0" - statuses "~1.4.0" - type-is "~1.6.16" - utils-merge "1.0.1" - vary "~1.1.2" - -file-loader@^0.8.1: - version "0.8.5" - resolved "https://registry.yarnpkg.com/file-loader/-/file-loader-0.8.5.tgz#9275d031fe780f27d47f5f4af02bd43713cc151b" - integrity sha1-knXQMf54DyfUf19K8CvUNxPMFRs= - dependencies: - loader-utils "~0.2.5" - -finalhandler@1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/finalhandler/-/finalhandler-1.1.1.tgz#eebf4ed840079c83f4249038c9d703008301b105" - integrity sha512-Y1GUDo39ez4aHAw7MysnUD5JzYX+WaIj8I57kO3aEPT1fFRL4sr7mjei97FgnwhAyyzRYmQZaTHb2+9uZ1dPtg== - dependencies: - debug "2.6.9" - encodeurl "~1.0.2" - escape-html "~1.0.3" - on-finished "~2.3.0" - parseurl "~1.3.2" - statuses "~1.4.0" - unpipe "~1.0.0" - -forwarded@~0.1.2: - version "0.1.2" - resolved "https://registry.yarnpkg.com/forwarded/-/forwarded-0.1.2.tgz#98c23dab1175657b8c0573e8ceccd91b0ff18c84" - integrity sha1-mMI9qxF1ZXuMBXPozszZGw/xjIQ= - -fresh@0.5.2: - version "0.5.2" - resolved "https://registry.yarnpkg.com/fresh/-/fresh-0.5.2.tgz#3d8cadd90d976569fa835ab1f8e4b23a105605a7" - integrity sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac= - -fs-extra@^7.0.1: - version "7.0.1" - resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-7.0.1.tgz#4f189c44aa123b895f722804f55ea23eadc348e9" - integrity sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw== - dependencies: - graceful-fs "^4.1.2" - jsonfile "^4.0.0" - universalify "^0.1.0" - -fs.realpath@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" - integrity sha1-FQStJSMVjKpA20onh8sBQRmU6k8= - -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.1.3: - version "7.1.3" - resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.3.tgz#3960832d3f1574108342dafd3a67b332c0969df1" - integrity sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ== - dependencies: - fs.realpath "^1.0.0" - inflight "^1.0.4" - inherits "2" - minimatch "^3.0.4" - once "^1.3.0" - path-is-absolute "^1.0.0" - -graceful-fs@^4.1.2, graceful-fs@^4.1.6: - version "4.1.15" - resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.15.tgz#ffb703e1066e8a0eeaa4c8b80ba9253eeefbfb00" - integrity sha512-6uHUhOPEBgQ24HM+r6b/QwWfZq+yiFcipKFrOFiBEnWdy5sdzYoi+pJeQaPI5qOLRFqWmAXUPQNsielzdLoecA== - -has-flag@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" - integrity sha1-tdRU3CGZriJWmfNGfloH87lVuv0= - -has-symbols@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.0.tgz#ba1a8f1af2a0fc39650f5c850367704122063b44" - integrity sha1-uhqPGvKg/DllD1yFA2dwQSIGO0Q= - -has@^1.0.1, 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" - -http-errors@1.6.3, http-errors@~1.6.2, http-errors@~1.6.3: - version "1.6.3" - resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-1.6.3.tgz#8b55680bb4be283a0b5bf4ea2e38580be1d9320d" - integrity sha1-i1VoC7S+KDoLW/TqLjhYC+HZMg0= - dependencies: - depd "~1.1.2" - inherits "2.0.3" - setprototypeof "1.1.0" - statuses ">= 1.4.0 < 2" - -httpolyglot@^0.1.2: - version "0.1.2" - resolved "https://registry.yarnpkg.com/httpolyglot/-/httpolyglot-0.1.2.tgz#e4d347fe8984a62f467d4060df527f1851f6997b" - integrity sha1-5NNH/omEpi9GfUBg31J/GFH2mXs= - -iconv-lite@0.4.23: - version "0.4.23" - resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.23.tgz#297871f63be507adcfbfca715d0cd0eed84e9a63" - integrity sha512-neyTUVFtahjf0mB3dZT77u+8O0QB89jFdnBkd5P1JgYPbPaia3gXXOVL2fq8VyU2gMMD7SaN7QukTB/pmXYvDA== - dependencies: - safer-buffer ">= 2.1.2 < 3" - -inflight@^1.0.4: - version "1.0.6" - resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" - integrity sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk= - dependencies: - once "^1.3.0" - wrappy "1" - -inherits@2, inherits@2.0.3: - version "2.0.3" - resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" - integrity sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4= - -ipaddr.js@1.8.0: - version "1.8.0" - resolved "https://registry.yarnpkg.com/ipaddr.js/-/ipaddr.js-1.8.0.tgz#eaa33d6ddd7ace8f7f6fe0c9ca0440e706738b1e" - integrity sha1-6qM9bd16zo9/b+DJygRA5wZzix4= - -is-buffer@~1.1.1: - version "1.1.6" - resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.6.tgz#efaa2ea9daa0d7ab2ea13a97b2b8ad51fefbe8be" - integrity sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w== - -is-callable@^1.1.4: - version "1.1.4" - resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.1.4.tgz#1e1adf219e1eeb684d691f9d6a05ff0d30a24d75" - integrity sha512-r5p9sxJjYnArLjObpjA4xu5EKI3CuKHkJXMhT7kwbpUyIFD1n5PMAsoPvWnvtZiNz7LjkYDRZhd7FlI0eMijEA== - -is-date-object@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/is-date-object/-/is-date-object-1.0.1.tgz#9aa20eb6aeebbff77fbd33e74ca01b33581d3a16" - integrity sha1-mqIOtq7rv/d/vTPnTKAbM1gdOhY= - -is-regex@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.0.4.tgz#5517489b547091b0930e095654ced25ee97e9491" - integrity sha1-VRdIm1RwkbCTDglWVM7SXul+lJE= - dependencies: - has "^1.0.1" - -is-symbol@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/is-symbol/-/is-symbol-1.0.2.tgz#a055f6ae57192caee329e7a860118b497a950f38" - integrity sha512-HS8bZ9ox60yCJLH9snBpIwv9pYUAkcuLhSA1oero1UB5y9aiQpRA8y2ex945AOtCZL1lJDeIk3G5LthswI46Lw== - dependencies: - has-symbols "^1.0.0" - -is-wsl@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/is-wsl/-/is-wsl-1.1.0.tgz#1f16e4aa22b04d1336b66188a66af3c600c3a66d" - integrity sha1-HxbkqiKwTRM2tmGIpmrzxgDDpm0= - -isexe@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" - integrity sha1-6PvzdNxVb/iUehDcsFctYz8s+hA= - -json5@^0.5.0: - version "0.5.1" - resolved "https://registry.yarnpkg.com/json5/-/json5-0.5.1.tgz#1eade7acc012034ad84e2396767ead9fa5495821" - integrity sha1-Hq3nrMASA0rYTiOWdn6tn6VJWCE= - -json5@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/json5/-/json5-1.0.1.tgz#779fb0018604fa854eacbf6252180d83543e3dbe" - integrity sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow== - dependencies: - minimist "^1.2.0" - -jsonfile@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-4.0.0.tgz#8771aae0799b64076b76640fca058f9c10e33ecb" - integrity sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss= - optionalDependencies: - graceful-fs "^4.1.6" - -loader-utils@^0.2.5, loader-utils@~0.2.2, loader-utils@~0.2.3, loader-utils@~0.2.5: - version "0.2.17" - resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-0.2.17.tgz#f86e6374d43205a6e6c60e9196f17c0299bfb348" - integrity sha1-+G5jdNQyBabmxg6RlvF8Apm/s0g= - dependencies: - big.js "^3.1.3" - emojis-list "^2.0.0" - json5 "^0.5.0" - object-assign "^4.0.1" - -log-symbols@^2.2.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-2.2.0.tgz#5740e1c5d6f0dfda4ad9323b5332107ef6b4c40a" - integrity sha512-VeIAFslyIerEJLXHziedo2basKbMKtTw3vfn5IzG0XTjhAVEJyNHnL2p7vc+wBDSdQuUpNw3M2u6xb9QsAY5Eg== - dependencies: - chalk "^2.0.1" - -make-error@^1.1.1: - version "1.3.5" - resolved "https://registry.yarnpkg.com/make-error/-/make-error-1.3.5.tgz#efe4e81f6db28cadd605c70f29c831b58ef776c8" - integrity sha512-c3sIjNUow0+8swNwVpqoH4YCShKNFkMaw6oH1mNS2haDZQqkeZFlHS3dhoeEbKKmJB4vXpJucU6oH75aDYeE9g== - -md5@^2.2.1: - version "2.2.1" - resolved "https://registry.yarnpkg.com/md5/-/md5-2.2.1.tgz#53ab38d5fe3c8891ba465329ea23fac0540126f9" - integrity sha1-U6s41f48iJG6RlMp6iP6wFQBJvk= - dependencies: - charenc "~0.0.1" - crypt "~0.0.1" - is-buffer "~1.1.1" - -media-typer@0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/media-typer/-/media-typer-0.3.0.tgz#8710d7af0aa626f8fffa1ce00168545263255748" - integrity sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g= - -merge-descriptors@1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/merge-descriptors/-/merge-descriptors-1.0.1.tgz#b00aaa556dd8b44568150ec9d1b953f3f90cbb61" - integrity sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E= - -methods@~1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/methods/-/methods-1.1.2.tgz#5529a4d67654134edcc5266656835b0f851afcee" - integrity sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4= - -mime-db@~1.37.0: - version "1.37.0" - resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.37.0.tgz#0b6a0ce6fdbe9576e25f1f2d2fde8830dc0ad0d8" - integrity sha512-R3C4db6bgQhlIhPU48fUtdVmKnflq+hRdad7IyKhtFj06VPNVdk2RhiYL3UjQIlso8L+YxAtFkobT0VK+S/ybg== - -mime-types@^2.1.21, mime-types@~2.1.18: - version "2.1.21" - resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.21.tgz#28995aa1ecb770742fe6ae7e58f9181c744b3f96" - integrity sha512-3iL6DbwpyLzjR3xHSFNFeb9Nz/M8WDkX33t1GFQnFOllWk8pOrh/LSrB5OXlnlW5P9LH73X6loW/eogc+F5lJg== - dependencies: - mime-db "~1.37.0" - -mime@1.4.1: - version "1.4.1" - resolved "https://registry.yarnpkg.com/mime/-/mime-1.4.1.tgz#121f9ebc49e3766f311a76e1fa1c8003c4b03aa6" - integrity sha512-KI1+qOZu5DcW6wayYHSzR/tXKCDC5Om4s1z2QJjDULzLcmf3DvzS7oluY4HCTrc+9FiKmWUgeNLg7W3uIQvxtQ== - -mimic-fn@^1.0.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-1.2.0.tgz#820c86a39334640e99516928bd03fca88057d022" - integrity sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ== - -minimatch@^3.0.4: - version "3.0.4" - resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" - integrity sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA== - dependencies: - brace-expansion "^1.1.7" - -minimist@0.0.8: - version "0.0.8" - resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d" - integrity sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0= - -minimist@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284" - integrity sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ= - -mkdirp@^0.5.1: - version "0.5.1" - resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903" - integrity sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM= - dependencies: - minimist "0.0.8" - -ms@2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" - integrity sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g= - -negotiator@0.6.1: - version "0.6.1" - resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.1.tgz#2b327184e8992101177b28563fb5e7102acd0ca9" - integrity sha1-KzJxhOiZIQEXeyhWP7XnECrNDKk= - -node-fetch@^2.3.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.3.0.tgz#1a1d940bbfb916a1d3e0219f037e89e71f8c5fa5" - integrity sha512-MOd8pV3fxENbryESLgVIeaGKrdl+uaYhCSSVkjeOb/31/njTpcis5aWfdqgNlHIrKOLRbMnfPINPOML2CIFeXA== - -node-netstat@^1.6.0: - version "1.6.0" - resolved "https://registry.yarnpkg.com/node-netstat/-/node-netstat-1.6.0.tgz#38c36b5f966b00ffaa2ed6f6321e6ad4487d8c89" - integrity sha512-KPDopkvPllhcILoHMWYUxvOO5c+VcPB38LxlOFPiZhZ/hJTMH/GXGCs6nvxu4d6unwsbEfgzJ4pPye3CFv9yTg== - dependencies: - is-wsl "^1.1.0" - -object-assign@^4.0.1: - version "4.1.1" - resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" - integrity sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM= - -object-keys@^1.0.12: - version "1.0.12" - resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.0.12.tgz#09c53855377575310cca62f55bb334abff7b3ed2" - integrity sha512-FTMyFUm2wBcGHnH2eXmz7tC6IwlqQZ6mVZ+6dm6vZ4IQIHjs6FdNsQBuKGPuUUUY6NfJw2PshC08Tn6LzLDOag== - -on-finished@~2.3.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/on-finished/-/on-finished-2.3.0.tgz#20f1336481b083cd75337992a16971aa2d906947" - integrity sha1-IPEzZIGwg811M3mSoWlxqi2QaUc= - dependencies: - ee-first "1.1.1" - -once@^1.3.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" - integrity sha1-WDsap3WWHUsROsF9nFC6753Xa9E= - dependencies: - wrappy "1" - -onetime@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/onetime/-/onetime-2.0.1.tgz#067428230fd67443b2794b22bba528b6867962d4" - integrity sha1-BnQoIw/WdEOyeUsiu6UotoZ5YtQ= - dependencies: - mimic-fn "^1.0.0" - -opn@^5.4.0: - version "5.4.0" - resolved "https://registry.yarnpkg.com/opn/-/opn-5.4.0.tgz#cb545e7aab78562beb11aa3bfabc7042e1761035" - integrity sha512-YF9MNdVy/0qvJvDtunAOzFw9iasOQHpVthTCvGzxt61Il64AYSGdK+rYwld7NAfk9qJ7dt+hymBNSc9LNYS+Sw== - dependencies: - is-wsl "^1.1.0" - -ora@^3.2.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/ora/-/ora-3.2.0.tgz#67e98a7e11f7f0ac95deaaaf11bb04de3d09e481" - integrity sha512-XHMZA5WieCbtg+tu0uPF8CjvwQdNzKCX6BVh3N6GFsEXH40mTk5dsw/ya1lBTUGJslcEFJFQ8cBhOgkkZXQtMA== - dependencies: - chalk "^2.4.2" - cli-cursor "^2.1.0" - cli-spinners "^2.0.0" - log-symbols "^2.2.0" - strip-ansi "^5.0.0" - wcwidth "^1.0.1" - -os-tmpdir@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" - integrity sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ= - -parseurl@~1.3.2: - version "1.3.2" - resolved "https://registry.yarnpkg.com/parseurl/-/parseurl-1.3.2.tgz#fc289d4ed8993119460c156253262cdc8de65bf3" - integrity sha1-/CidTtiZMRlGDBViUyYs3I3mW/M= - -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 sha1-F0uSaHNVNP+8es5r9TpanhtcX18= - -path-to-regexp@0.1.7: - version "0.1.7" - resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-0.1.7.tgz#df604178005f522f15eb4490e7247a1bfaa67f8c" - integrity sha1-32BBeABfUi8V60SQ5yR6G/qmf4w= - -pem@^1.14.1: - version "1.14.1" - resolved "https://registry.yarnpkg.com/pem/-/pem-1.14.1.tgz#8ff3c5884bfcba7bbdfea5b67a7fa24b4ca3bb86" - integrity sha512-WY3IzMoh+Gwp4xJTT2MqIOaVzNqU7jHqj7k0pOnLIkNSnOpjhy3PHr9mXGi+C5tRC2z1EX5lvzEbd9BtHumHLQ== - dependencies: - es6-promisify "^6.0.0" - md5 "^2.2.1" - os-tmpdir "^1.0.1" - which "^1.3.1" - -promise.prototype.finally@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/promise.prototype.finally/-/promise.prototype.finally-3.1.0.tgz#66f161b1643636e50e7cf201dc1b84a857f3864e" - integrity sha512-7p/K2f6dI+dM8yjRQEGrTQs5hTQixUAdOGpMEA3+pVxpX5oHKRSKAXyLw9Q9HUWDTdwtoo39dSHGQtN90HcEwQ== - dependencies: - define-properties "^1.1.2" - es-abstract "^1.9.0" - function-bind "^1.1.1" - -proxy-addr@~2.0.4: - version "2.0.4" - resolved "https://registry.yarnpkg.com/proxy-addr/-/proxy-addr-2.0.4.tgz#ecfc733bf22ff8c6f407fa275327b9ab67e48b93" - integrity sha512-5erio2h9jp5CHGwcybmxmVqHmnCBZeewlfJ0pex+UW7Qny7OOZXTtH56TGNyBizkgiOwhJtMKrVzDTeKcySZwA== - dependencies: - forwarded "~0.1.2" - ipaddr.js "1.8.0" - -qs@6.5.2: - version "6.5.2" - resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.2.tgz#cb3ae806e8740444584ef154ce8ee98d403f3e36" - integrity sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA== - -range-parser@~1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/range-parser/-/range-parser-1.2.0.tgz#f49be6b487894ddc40dcc94a322f611092e00d5e" - integrity sha1-9JvmtIeJTdxA3MlKMi9hEJLgDV4= - -raw-body@2.3.3: - version "2.3.3" - resolved "https://registry.yarnpkg.com/raw-body/-/raw-body-2.3.3.tgz#1b324ece6b5706e153855bc1148c65bb7f6ea0c3" - integrity sha512-9esiElv1BrZoI3rCDuOuKCBRbuApGGaDPQfjSflGxdy4oyzqghxu6klEkkVIvBje+FF0BX9coEv8KqW6X/7njw== - dependencies: - bytes "3.0.0" - http-errors "1.6.3" - iconv-lite "0.4.23" - unpipe "1.0.0" - -restore-cursor@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-2.0.0.tgz#9f7ee287f82fd326d4fd162923d62129eee0dfaf" - integrity sha1-n37ih/gv0ybU/RYpI9YhKe7g368= - dependencies: - onetime "^2.0.0" - signal-exit "^3.0.2" - -safe-buffer@5.1.2: - version "5.1.2" - resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" - integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== - -safe-compare@^1.1.4: - version "1.1.4" - resolved "https://registry.yarnpkg.com/safe-compare/-/safe-compare-1.1.4.tgz#5e0128538a82820e2e9250cd78e45da6786ba593" - integrity sha512-b9wZ986HHCo/HbKrRpBJb2kqXMK9CEWIE1egeEvZsYn69ay3kdfl9nG3RyOcR+jInTDf7a86WQ1d4VJX7goSSQ== - dependencies: - buffer-alloc "^1.2.0" - -"safer-buffer@>= 2.1.2 < 3": - version "2.1.2" - resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" - integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== - -send@0.16.2: - version "0.16.2" - resolved "https://registry.yarnpkg.com/send/-/send-0.16.2.tgz#6ecca1e0f8c156d141597559848df64730a6bbc1" - integrity sha512-E64YFPUssFHEFBvpbbjr44NCLtI1AohxQ8ZSiJjQLskAdKuriYEP6VyGEsRDH8ScozGpkaX1BGvhanqCwkcEZw== - dependencies: - debug "2.6.9" - depd "~1.1.2" - destroy "~1.0.4" - encodeurl "~1.0.2" - escape-html "~1.0.3" - etag "~1.8.1" - fresh "0.5.2" - http-errors "~1.6.2" - mime "1.4.1" - ms "2.0.0" - on-finished "~2.3.0" - range-parser "~1.2.0" - statuses "~1.4.0" - -serve-static@1.13.2, serve-static@^1.12.3: - version "1.13.2" - resolved "https://registry.yarnpkg.com/serve-static/-/serve-static-1.13.2.tgz#095e8472fd5b46237db50ce486a43f4b86c6cec1" - integrity sha512-p/tdJrO4U387R9oMjb1oj7qSMaMfmOyd4j9hOFoxZe2baQszgHcSWjuya/CiT5kgZZKRudHNOA0pYXOl8rQ5nw== - dependencies: - encodeurl "~1.0.2" - escape-html "~1.0.3" - parseurl "~1.3.2" - send "0.16.2" - -setprototypeof@1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.1.0.tgz#d0bd85536887b6fe7c0d818cb962d9d91c54e656" - integrity sha512-BvE/TwpZX4FXExxOxZyRGQQv651MSwmWKZGqvmPcRIjDqWub67kTKuIMx43cZZrS/cBBzwBcNDWoFxt2XEFIpQ== - -signal-exit@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.2.tgz#b5fdc08f1287ea1178628e415e25132b73646c6d" - integrity sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0= - -source-map-support@^0.5.6: - version "0.5.10" - resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.10.tgz#2214080bc9d51832511ee2bab96e3c2f9353120c" - integrity sha512-YfQ3tQFTK/yzlGJuX8pTwa4tifQj4QS2Mj7UegOu8jAz59MqIiMGPXxQhVQiIMNzayuUSF/jEuVnfFF5JqybmQ== - dependencies: - buffer-from "^1.0.0" - source-map "^0.6.0" - -source-map@^0.6.0: - version "0.6.1" - resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" - integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== - -source-map@~0.1.38: - version "0.1.43" - resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.1.43.tgz#c24bc146ca517c1471f5dacbe2571b2b7f9e3346" - integrity sha1-wkvBRspRfBRx9drL4lcbK3+eM0Y= - dependencies: - amdefine ">=0.0.4" - -"statuses@>= 1.4.0 < 2": - version "1.5.0" - resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.5.0.tgz#161c7dac177659fd9811f43771fa99381478628c" - integrity sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow= - -statuses@~1.4.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.4.0.tgz#bb73d446da2796106efcc1b601a253d6c46bd087" - integrity sha512-zhSCtt8v2NDrRlPQpCNtw/heZLtfUDqxBM1udqikb/Hbk52LK4nQSwr10u77iopCW5LsyHpuXS0GnEc48mLeew== - -string-replace-webpack-plugin@^0.1.3: - version "0.1.3" - resolved "https://registry.yarnpkg.com/string-replace-webpack-plugin/-/string-replace-webpack-plugin-0.1.3.tgz#73c657e759d66cfe80ae1e0cf091aa256d0e715c" - integrity sha1-c8ZX51nWbP6Arh4M8JGqJW0OcVw= - dependencies: - async "~0.2.10" - loader-utils "~0.2.3" - optionalDependencies: - css-loader "^0.9.1" - file-loader "^0.8.1" - style-loader "^0.8.3" - -strip-ansi@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-5.0.0.tgz#f78f68b5d0866c20b2c9b8c61b5298508dc8756f" - integrity sha512-Uu7gQyZI7J7gn5qLn1Np3G9vcYGTVqB+lFTytnDJv83dd8T22aGH451P3jueT2/QemInJDfxHB5Tde5OzgG1Ow== - dependencies: - ansi-regex "^4.0.0" - -strip-bom@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-3.0.0.tgz#2334c18e9c759f7bdd56fdef7e9ae3d588e68ed3" - integrity sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM= - -style-loader@^0.8.3: - version "0.8.3" - resolved "https://registry.yarnpkg.com/style-loader/-/style-loader-0.8.3.tgz#f4f92eb7db63768748f15065cd6700f5a1c85357" - integrity sha1-9Pkut9tjdodI8VBlzWcA9aHIU1c= - dependencies: - loader-utils "^0.2.5" - -supports-color@^5.3.0: - version "5.5.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f" - integrity sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow== - dependencies: - has-flag "^3.0.0" - -ts-node@^7.0.1: - version "7.0.1" - resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-7.0.1.tgz#9562dc2d1e6d248d24bc55f773e3f614337d9baf" - integrity sha512-BVwVbPJRspzNh2yfslyT1PSbl5uIk03EZlb493RKHN4qej/D06n1cEhjlOJG69oFsE7OT8XjpTUcYf6pKTLMhw== - dependencies: - arrify "^1.0.0" - buffer-from "^1.1.0" - diff "^3.1.0" - make-error "^1.1.1" - minimist "^1.2.0" - mkdirp "^0.5.1" - source-map-support "^0.5.6" - yn "^2.0.0" - -tsconfig-paths@^3.7.0: - version "3.7.0" - resolved "https://registry.yarnpkg.com/tsconfig-paths/-/tsconfig-paths-3.7.0.tgz#02ae978db447b22e09dafcd4198be95c4885ceb2" - integrity sha512-7iE+Q/2E1lgvxD+c0Ot+GFFmgmfIjt/zCayyruXkXQ84BLT85gHXy0WSoQSiuFX9+d+keE/jiON7notV74ZY+A== - dependencies: - "@types/json5" "^0.0.29" - deepmerge "^2.0.1" - json5 "^1.0.1" - minimist "^1.2.0" - strip-bom "^3.0.0" - -type-is@~1.6.16: - version "1.6.16" - resolved "https://registry.yarnpkg.com/type-is/-/type-is-1.6.16.tgz#f89ce341541c672b25ee7ae3c73dee3b2be50194" - integrity sha512-HRkVv/5qY2G6I8iab9cI7v1bOIdhm94dVjQCPFElW9W+3GeDOSHmy2EBYe4VTApuzolPcmgFTN3ftVJRKR2J9Q== - dependencies: - media-typer "0.3.0" - mime-types "~2.1.18" - -typescript@^3.2.2: - version "3.2.2" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.2.2.tgz#fe8101c46aa123f8353523ebdcf5730c2ae493e5" - integrity sha512-VCj5UiSyHBjwfYacmDuc/NOk4QQixbE+Wn7MFJuS0nRuPQbof132Pw4u53dm264O8LPc2MVsc7RJNml5szurkg== - -universalify@^0.1.0: - version "0.1.2" - resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.1.2.tgz#b646f69be3942dabcecc9d6639c80dc105efaa66" - integrity sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg== - -unpipe@1.0.0, unpipe@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec" - integrity sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw= - -utils-merge@1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/utils-merge/-/utils-merge-1.0.1.tgz#9f95710f50a267947b2ccc124741c1028427e713" - integrity sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM= - -vary@~1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/vary/-/vary-1.1.2.tgz#2299f02c6ded30d4a5961b0b9f74524a18f634fc" - integrity sha1-IpnwLG3tMNSllhsLn3RSShj2NPw= - -wcwidth@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/wcwidth/-/wcwidth-1.0.1.tgz#f0b0dcf915bc5ff1528afadb2c0e17b532da2fe8" - integrity sha1-8LDc+RW8X/FSivrbLA4XtTLaL+g= - dependencies: - defaults "^1.0.3" - -which@^1.3.1: - version "1.3.1" - resolved "https://registry.yarnpkg.com/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a" - integrity sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ== - dependencies: - isexe "^2.0.0" - -wrappy@1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" - integrity sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8= - -ws@^6.1.2: - version "6.1.2" - resolved "https://registry.yarnpkg.com/ws/-/ws-6.1.2.tgz#3cc7462e98792f0ac679424148903ded3b9c3ad8" - integrity sha512-rfUqzvz0WxmSXtJpPMX2EeASXabOrSMk1ruMOV3JBTBjo4ac2lDjGGsbQSyxj8Odhw5fBib8ZKEjDNvgouNKYw== - dependencies: - async-limiter "~1.0.0" - -xhr2@^0.1.4: - version "0.1.4" - resolved "https://registry.yarnpkg.com/xhr2/-/xhr2-0.1.4.tgz#7f87658847716db5026323812f818cadab387a5f" - integrity sha1-f4dliEdxbbUCYyOBL4GMras4el8= - -yn@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/yn/-/yn-2.0.0.tgz#e5adabc8acf408f6385fc76495684c88e6af689a" - integrity sha1-5a2ryKz0CPY4X8dklWhMiOavaJo= diff --git a/packages/tsconfig.json b/packages/tsconfig.json deleted file mode 100644 index 6c347746..00000000 --- a/packages/tsconfig.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "extends": "../tsconfig.json" -} diff --git a/packages/tunnel/package.json b/packages/tunnel/package.json deleted file mode 100644 index da3dc84f..00000000 --- a/packages/tunnel/package.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "name": "@coder/tunnel", - "main": "src/tunnel.ts" -} \ No newline at end of file diff --git a/packages/tunnel/src/client.ts b/packages/tunnel/src/client.ts deleted file mode 100644 index 5941096a..00000000 --- a/packages/tunnel/src/client.ts +++ /dev/null @@ -1,48 +0,0 @@ -import { Event, Emitter } from "@coder/events"; -import { TunnelCloseCode } from "./common"; - -export interface TunnelCloseEvent { - readonly code: TunnelCloseCode; - readonly reason: string; -} - -export interface ClientConnection { - readonly onData: Event; - readonly onClose: Event; - send(data: ArrayBuffer): void; -} - -export const forward = (connectionUrl: string): Promise => { - return new Promise((resolve, reject): void => { - const socket = new WebSocket(connectionUrl); - const closeEmitter = new Emitter(); - const dataEmitter = new Emitter(); - const connection: ClientConnection = { - get onClose(): Event { - return closeEmitter.event; - }, - get onData(): Event { - return dataEmitter.event; - }, - send(data: ArrayBuffer): void { - socket.send(data); - }, - }; - socket.binaryType = "arraybuffer"; - socket.addEventListener("message", (event) => { - dataEmitter.emit(event.data); - }); - socket.addEventListener("error", (event) => { - reject("uncertain"); - }); - socket.addEventListener("open", () => { - resolve(connection); - }); - socket.addEventListener("close", (event) => { - closeEmitter.emit({ - code: event.code, - reason: event.reason, - }); - }); - }); -}; diff --git a/packages/tunnel/src/common.ts b/packages/tunnel/src/common.ts deleted file mode 100644 index 9fa33a76..00000000 --- a/packages/tunnel/src/common.ts +++ /dev/null @@ -1,5 +0,0 @@ -export enum TunnelCloseCode { - Normal = 1000, - Error = 4000, - ConnectionRefused = 4001, -} diff --git a/packages/tunnel/src/server.ts b/packages/tunnel/src/server.ts deleted file mode 100644 index 5fcabe7b..00000000 --- a/packages/tunnel/src/server.ts +++ /dev/null @@ -1,53 +0,0 @@ -import * as net from "net"; -import { TunnelCloseCode } from "./common"; - -export interface WS { - addEventListener(event: "message", cb: (event: { - // tslint:disable-next-line:no-any - readonly data: any; - }) => void): void; - addEventListener(event: "close", cb: () => void): void; - binaryType: string; - close(code: number, reason?: string): void; - // tslint:disable-next-line:no-any - send(data: any): void; -} - -export const handle = async (socket: WS, port: number): Promise => { - const hosts = [ - "127.0.0.1", - "::", // localhost - ]; - - let localSocket: net.Socket | undefined; - for (let i = 0; i < hosts.length; i++) { - if (localSocket) { - break; - } - localSocket = await new Promise((resolve, reject): void => { - const socket = net.connect({ - host: hosts[i], - port, - }, () => { - // Connected - resolve(socket); - }); - socket.on("error", (err: Error & { readonly code: string }) => { - if (err.code === "ECONNREFUSED") { - resolve(undefined); - } - }); - }); - } - if (!localSocket) { - socket.close(TunnelCloseCode.ConnectionRefused); - - return; - } - socket.binaryType = "arraybuffer"; - socket.addEventListener("message", (event) => localSocket!.write(Buffer.from(event.data))); - socket.addEventListener("close", () => localSocket!.end()); - localSocket.on("data", (data) => socket.send(data)); - localSocket.on("error", (err) => socket.close(TunnelCloseCode.Error, err.toString())); - localSocket.on("close", () => socket.close(TunnelCloseCode.Normal)); -}; diff --git a/packages/tunnel/yarn.lock b/packages/tunnel/yarn.lock deleted file mode 100644 index fb57ccd1..00000000 --- a/packages/tunnel/yarn.lock +++ /dev/null @@ -1,4 +0,0 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. -# yarn lockfile v1 - - diff --git a/packages/vscode/.gitignore b/packages/vscode/.gitignore deleted file mode 100644 index 8af4e3b6..00000000 --- a/packages/vscode/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -bin -test/.test* \ No newline at end of file diff --git a/packages/vscode/package.json b/packages/vscode/package.json deleted file mode 100644 index 777dcdf6..00000000 --- a/packages/vscode/package.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "name": "@coder/vscode", - "description": "VS Code implementation of the browser-based IDE client.", - "main": "src/index.ts", - "scripts": { - "build:bootstrap-fork": "../../node_modules/.bin/cross-env UV_THREADPOOL_SIZE=100 node --max-old-space-size=32384 ../../node_modules/webpack/bin/webpack.js --config ./webpack.bootstrap.config.js" - }, - "dependencies": { - "iconv-lite": "^0.4.24", - "onigasm": "^2.2.1", - "string-replace-loader": "^2.1.1", - "tar-stream": "^2.0.1" - }, - "devDependencies": { - "@types/tar-stream": "^1.6.0", - "vscode-textmate": "^4.0.1" - } -} diff --git a/packages/vscode/src/client.ts b/packages/vscode/src/client.ts deleted file mode 100644 index f783a36c..00000000 --- a/packages/vscode/src/client.ts +++ /dev/null @@ -1,133 +0,0 @@ -import { IdeClient } from "@coder/ide"; -import { client as ideClientInstance } from "@coder/ide/src/fill/client"; -import Severity from "vs/base/common/severity"; -import { INotificationService } from "vs/platform/notification/common/notification"; -import { IStatusbarService, StatusbarAlignment } from "vs/platform/statusbar/common/statusbar"; -import * as paths from "./fill/paths"; -import product from "./fill/product"; -import "./vscode.scss"; -import { Action } from 'vs/base/common/actions'; -import { SyncActionDescriptor, MenuRegistry, MenuId } from 'vs/platform/actions/common/actions'; -import { Registry } from 'vs/platform/registry/common/platform'; -import { IWorkbenchActionRegistry, Extensions } from 'vs/workbench/common/actions'; -import { CommandsRegistry } from "vs/platform/commands/common/commands"; -import { IFileService, FileOperation } from "vs/platform/files/common/files"; -import { ITextFileService } from "vs/workbench/services/textfile/common/textfiles"; -import { IModelService } from "vs/editor/common/services/modelService"; -import { ITerminalService } from "vs/workbench/contrib/terminal/common/terminal"; -import { IStorageService } from "vs/platform/storage/common/storage"; - -// NOTE: shouldn't import anything from VS Code here or anything that will -// depend on a synchronous fill like `os`. - -class VSClient extends IdeClient { - protected initialize(): Promise { - return this.task("Start workbench", 1000, async (data, sharedData) => { - paths._paths.initialize(data, sharedData); - product.initialize(data); - process.env.SHELL = data.shell; - // At this point everything should be filled, including `os`. `os` also - // relies on `initData` but it listens first so it initialize before this - // callback, meaning we are safe to include everything from VS Code now. - const { workbench } = require("./workbench") as typeof import("./workbench"); - await workbench.initialize(); - - // tslint:disable-next-line:no-any - const getService = (id: any): T => workbench.serviceCollection.get(id) as T; - window.ide = { - client: ideClientInstance, - workbench: { - action: Action, - syncActionDescriptor: SyncActionDescriptor, - commandRegistry: CommandsRegistry, - actionsRegistry: Registry.as(Extensions.WorkbenchActions), - menuRegistry: MenuRegistry, - statusbarService: getService(IStatusbarService), - notificationService: getService(INotificationService), - terminalService: getService(ITerminalService), - storageService: { - save: (): Promise => { - // tslint:disable-next-line:no-any - const storageService = getService(IStorageService) as any; - - return storageService.close(); - }, - }, - - onFileCreate: (cb): void => { - getService(IFileService).onAfterOperation((e) => { - if (e.operation === FileOperation.CREATE) { - cb(e.resource.path); - } - }); - }, - onFileMove: (cb): void => { - getService(IFileService).onAfterOperation((e) => { - if (e.operation === FileOperation.MOVE) { - cb(e.resource.path, e.target ? e.target.resource.path : undefined!); - } - }); - }, - onFileDelete: (cb): void => { - getService(IFileService).onAfterOperation((e) => { - if (e.operation === FileOperation.DELETE) { - cb(e.resource.path); - } - }); - }, - onFileSaved: (cb): void => { - getService(ITextFileService).models.onModelSaved((e) => { - cb(e.resource.path); - }); - }, - onFileCopy: (cb): void => { - getService(IFileService).onAfterOperation((e) => { - if (e.operation === FileOperation.COPY) { - cb(e.resource.path, e.target ? e.target.resource.path : undefined!); - } - }); - }, - - onModelAdded: (cb): void => { - getService(IModelService).onModelAdded((e) => { - cb(e.uri.path, e.getLanguageIdentifier().language); - }); - }, - onModelRemoved: (cb): void => { - getService(IModelService).onModelRemoved((e) => { - cb(e.uri.path, e.getLanguageIdentifier().language); - }); - }, - onModelLanguageChange: (cb): void => { - getService(IModelService).onModelModeChanged((e) => { - cb(e.model.uri.path, e.model.getLanguageIdentifier().language, e.oldModeId); - }); - }, - - onTerminalAdded: (cb): void => { - getService(ITerminalService).onInstanceCreated(() => cb()); - }, - onTerminalRemoved: (cb): void => { - getService(ITerminalService).onInstanceDisposed(() => cb()); - }, - }, - - // @ts-ignore - // tslint:disable-next-line:no-any - MenuId: MenuId as any, - // tslint:disable-next-line:no-any - Severity: Severity as any, - // @ts-ignore - // tslint:disable-next-line:no-any - StatusbarAlignment: StatusbarAlignment as any, - }; - - const event = new CustomEvent("ide-ready"); - // tslint:disable-next-line:no-any - (event).ide = window.ide; - window.dispatchEvent(event); - }, this.initData, this.sharedProcessData); - } -} - -export const client = new VSClient(); diff --git a/packages/vscode/src/dialog.scss b/packages/vscode/src/dialog.scss deleted file mode 100644 index b1ffb846..00000000 --- a/packages/vscode/src/dialog.scss +++ /dev/null @@ -1,160 +0,0 @@ -.dialog { - --primary: #2A2E37; - --border: black; - --faded: #a0a1a5; - --disabled: #888; - --header-background: #161616; - --header-foreground: white; - --list-active-selection-background: rgb(0, 120, 160); - --list-active-selection-foreground: white; - --list-hover-background: rgb(36, 39, 46); - font-family: inherit; - box-shadow: 0 18px 80px 10px rgba(0, 0, 0, 0.1); - background-color: var(--primary); - display: flex; - flex-direction: column; - user-select: none; - overflow: hidden; - border-radius: 5px; - - .monaco-tl-twistie { - display: none; - } - - .title { - background-color: var(--header-background); - color: var(--header-foreground); - padding: 1px; - font-size: 11px; - font-weight: normal; - text-transform: uppercase; - white-space: nowrap; - padding: 5px 10px; - } - - .nav { - display: flex; - flex-direction: row; - padding: 4px; - border-bottom: 1px solid var(--border); - } - - .path { - display: flex; - flex-direction: row; - - .path-part { - padding: 5px; - border-radius: 3px; - font-size: 1.02em; - cursor: pointer; - - &:not(:first-child) { - margin-left: 5px; - } - - &.active { - font-weight: bold; - color: var(--list-active-selection-foreground); - } - } - } - - .dialog-grid { - display: grid; - grid-template-columns: 2fr 0.2fr 0.8fr; - } - - .headings { - padding: 8px; - font-size: 12px; - } - - .file-area { - flex: 1; - display: flex; - flex-direction: column; - overflow: hidden; - - .dialog-entry { - cursor: pointer; - font-size: 1.02em; - padding: 0px 8px; - - .dialog-entry-info { - display: flex; - flex-direction: row; - } - - .dialog-entry-icon { - width: 16px; - height: 19px; - margin-right: 5px; - } - - .dialog-entry-size { - text-align: right; - } - - .dialog-entry-mtime { - padding-left: 8px; - } - - &:hover { - background-color: var(--list-hover-background); - } - - &.active { - background-color: var(--list-active-selection-background); - color: var(--list-active-selection-foreground); - } - - &.disabled, &.disabled:hover { - background-color: var(--primary); - color: var(--disabled); - cursor: initial; - } - } - } - - .buttons { - display: flex; - flex-direction: row; - padding: 10px; - position: relative; - background: var(--primary); - border-top: 1px solid var(--border); - - button:first-child { - margin-left: auto; - margin-right: 10px; - } - - button { - background: transparent; - outline: none; - border: 0; - color: var(--faded); - padding: 10px; - padding-left: 18px; - padding-right: 18px; - transition: 150ms background ease, 150ms color ease; - cursor: pointer; - border-radius: 5px; - - &:hover { - background: var(--titlebar); - color: white; - } - } - - button[disabled], button[disabled]:hover { - color: var(--disabled); - cursor: initial; - } - } -} - -.monaco-shell .monaco-tree.focused.no-focused-item:focus:before, .monaco-shell .monaco-list:not(.element-focused):focus:before { - display: none; -} diff --git a/packages/vscode/src/dialog.ts b/packages/vscode/src/dialog.ts deleted file mode 100644 index c7a9cc5c..00000000 --- a/packages/vscode/src/dialog.ts +++ /dev/null @@ -1,521 +0,0 @@ -import * as fs from "fs"; -import * as path from "path"; -import * as util from "util"; -import { Emitter, Event } from "@coder/events"; -import { $, addClass, append } from "vs/base/browser/dom"; -import { HighlightedLabel } from "vs/base/browser/ui/highlightedlabel/highlightedLabel"; -import { ObjectTree } from "vs/base/browser/ui/tree/objectTree"; -import { ITreeElement, ITreeNode, ITreeRenderer, TreeFilterResult, TreeVisibility } from "vs/base/browser/ui/tree/tree"; -import { KeyCode } from "vs/base/common/keyCodes"; -import { URI } from "vs/base/common/uri"; -import { getIconClasses } from "vs/editor/common/services/getIconClasses"; -import { IModelService } from "vs/editor/common/services/modelService"; -import { IModeService } from "vs/editor/common/services/modeService"; -import { FileKind } from "vs/platform/files/common/files"; -import { IThemeService } from "vs/platform/theme/common/themeService"; -import { workbench } from "./workbench"; -import "./dialog.scss"; - -/** - * Describes the type of dialog to show. - */ -export enum DialogType { - NewFolder, - Save, - Open, -} - -export interface CommonDialogOptions { - readonly title?: string; - readonly defaultPath?: string; - readonly buttonLabel?: string; -} - -export interface OpenDialogOptions extends CommonDialogOptions { - readonly properties: { - readonly openFile: true; - readonly openDirectory?: boolean; - readonly showHiddenFiles?: boolean; - } | { - readonly openDirectory: true; - readonly showHiddenFiles?: boolean; - readonly openFile?: boolean; - }; -} - -export interface SaveDialogOptions extends CommonDialogOptions { - readonly type: DialogType.Save; - readonly nameFieldLabel?: string; -} - -export type DialogOptions = OpenDialogOptions | SaveDialogOptions; - -export const showOpenDialog = (options: OpenDialogOptions): Promise => { - return new Promise((resolve, reject): void => { - // Make the default to show hidden files and directories since there is no - // other way to make them visible in the dialogs currently. - const dialog = new Dialog(DialogType.Open, typeof options.properties.showHiddenFiles === "undefined" ? { - ...options, - properties: { - ...options.properties, - showHiddenFiles: true, - }, - } : options); - dialog.onSelect((e) => { - dialog.dispose(); - resolve(e); - }); - dialog.onError((e) => { - dialog.dispose(); - reject(e); - }); - }); - -}; - -interface DialogEntry { - readonly fullPath: string; - readonly name: string; - readonly isDirectory: boolean; - readonly size: number; - readonly lastModified: string; - readonly isDisabled?: boolean; -} - -/** - * Open and save dialogs. - */ -class Dialog { - private _path: string | undefined; - - private static readonly UpperDirId = ".."; - - private readonly filesNode: HTMLElement; - private readonly pathNode: HTMLElement; - - private readonly entryList: ObjectTree; - private readonly background: HTMLElement; - private readonly root: HTMLElement; - - private readonly selectEmitter: Emitter; - private readonly errorEmitter: Emitter; - - public constructor( - private readonly type: DialogType, - private readonly options: DialogOptions, - ) { - this.selectEmitter = new Emitter(); - this.errorEmitter = new Emitter(); - - this.background = document.createElement("div"); - this.background.style.position = "absolute"; - this.background.style.top = "0"; - this.background.style.left = "0"; - this.background.style.bottom = "0"; - this.background.style.right = "0"; - this.background.style.zIndex = "5"; - this.background.style.display = "flex"; - this.background.style.alignItems = "center"; - this.background.style.justifyContent = "center"; - this.background.style.background = "rgba(0, 0, 0, 0.25)"; - - this.root = document.createElement("div"); - this.root.style.width = "850px"; - this.root.style.height = "600px"; - this.background.appendChild(this.root); - (document.querySelector(".monaco-workbench") || document.body).appendChild(this.background); - this.root.classList.add("dialog"); - - const setProperty = (vari: string, id: string): void => { - const getColor = (id: string): string | undefined => { - const ts = workbench.serviceCollection.get(IThemeService) as IThemeService; - const c = ts.getTheme().getColor(id); - if (!c) { - return; - } - - return c.toString(); - }; - const c = getColor(id); - if (c) { - this.root.style.setProperty(vari, c); - } - }; - setProperty("--primary", "sideBar.background"); - setProperty("--list-active-selection-background", "list.activeSelectionBackground"); - setProperty("--list-active-selection-foreground", "list.activeSelectionForeground"); - setProperty("--list-hover-background", "list.hoverBackground"); - setProperty("--header-background", "sideBarSectionHeader.background"); - setProperty("--header-foreground", "sideBarSectionHeader.foreground"); - setProperty("--border", "panel.border"); - - this.background.addEventListener("contextmenu", (event) => { - event.preventDefault(); - }); - - const titleNode = document.createElement("div"); - titleNode.classList.add("title"); - let title: string | undefined; - switch (this.type) { - // case DialogType.NewFolder: - // title = "New Folder"; - // break; - case DialogType.Open: - title = "Open File"; - break; - case DialogType.Save: - title = "Save File"; - break; - default: - throw new Error("Uncased type"); - } - titleNode.innerText = options.title || title; - this.root.appendChild(titleNode); - - const navItems = document.createElement("div"); - navItems.classList.add("nav"); - - this.pathNode = document.createElement("div"); - this.pathNode.classList.add("path"); - navItems.appendChild(this.pathNode); - this.root.appendChild(navItems); - - const headingsNode = document.createElement("div"); - headingsNode.className = "headings dialog-grid"; - ["Name", "Size", "Last Modified"].forEach(e => { - const header = document.createElement("div"); - header.innerText = e; - headingsNode.appendChild(header); - }); - this.root.appendChild(headingsNode); - - const fileAreaNode = document.createElement("div"); - fileAreaNode.classList.add("file-area"); - fileAreaNode.classList.add("show-file-icons"); - - this.filesNode = document.createElement("div"); - this.filesNode.className = "files-list"; - this.entryList = new ObjectTree(this.filesNode, { - getHeight: (_entry: DialogEntry): number => { - return 20; - }, - getTemplateId: (_entry: DialogEntry): string => { - return "dialog-entry"; - }, - }, [new DialogEntryRenderer()], { - openController: { - shouldOpen: (_event): boolean => { - return true; - }, - }, - keyboardNavigationLabelProvider: { - getKeyboardNavigationLabel: (element): string => { - return element.name; - }, - mightProducePrintableCharacter: (event): boolean => { - if (event.ctrlKey || event.metaKey) { - // ignore ctrl/cmd-combination but not shift/alt-combinatios - return false; - } - // weak check for certain ranges. this is properly implemented in a subclass - // with access to the KeyboardMapperFactory. - if ((event.keyCode >= KeyCode.KEY_A && event.keyCode <= KeyCode.KEY_Z) - || (event.keyCode >= KeyCode.KEY_0 && event.keyCode <= KeyCode.KEY_9) - || event.keyCode === KeyCode.US_DOT || event.keyCode === KeyCode.US_SLASH || event.keyCode === KeyCode.US_MINUS) { - return true; - } - - return false; - }, - }, - automaticKeyboardNavigation: true, - enableKeyboardNavigation: true, - multipleSelectionSupport: false, - openOnSingleClick: false, - filter: { - filter: (): TreeFilterResult => { - // tslint:disable-next-line:no-any - (this.entryList)._options.simpleKeyboardNavigation = true; - // tslint:disable-next-line:no-any - const pat = (this.entryList).typeFilterController.filter._pattern; - - return { - data: pat, - visibility: TreeVisibility.Visible, - }; - }, - }, - filterOnType: true, - }); - // tslint:disable-next-line:no-any - (this.entryList).focusNavigationFilter = (node: ITreeNode): boolean => { - if (node.filterData) { - return node.element.name.toLowerCase().startsWith(node.filterData.toLowerCase()!); - } - - return false; - }; - this.entryList.onDidOpen((event) => { - const element = event.elements[0]!; - if (!element) { - const fv = this.filterValue; - - if (fv === Dialog.UpperDirId) { - this.path = path.dirname(this._path!); - } - - if (fv.startsWith("/")) { - fs.stat(fv, (err, stats) => { - if (err) { - return; - } - - if (stats.isDirectory()) { - this.path = fv; - } - }); - } - - return; - } - - // If it's a directory, we want to navigate to it. If it's a file, then we - // only want to open it if opening files is supported. - if (element.isDirectory) { - this.path = element.fullPath; - } else if ((this.options as OpenDialogOptions).properties.openFile) { - this.selectEmitter.emit(element.fullPath); - } - }); - fileAreaNode.appendChild(this.entryList.getHTMLElement()); - this.root.appendChild(fileAreaNode); - - const buttonsNode = document.createElement("div"); - buttonsNode.className = "buttons"; - const cancelBtn = document.createElement("button"); - cancelBtn.innerText = "Cancel"; - cancelBtn.addEventListener("click", () => { - this.errorEmitter.emit(new Error("Cancelled")); - }); - buttonsNode.appendChild(cancelBtn); - const confirmBtn = document.createElement("button"); - const openDirectory = (this.options as OpenDialogOptions).properties.openDirectory; - confirmBtn.innerText = this.options.buttonLabel || "Confirm"; - confirmBtn.addEventListener("click", () => { - if (this._path && openDirectory) { - this.selectEmitter.emit(this._path); - } - }); - // Disable if we can't open directories, otherwise you can open a directory - // as a file which won't work. This is because our button currently just - // always opens whatever directory is opened and will not open selected - // files. (A single click on a file is used to open it instead.) - if (!openDirectory) { - confirmBtn.disabled = true; - } - buttonsNode.appendChild(confirmBtn); - this.root.appendChild(buttonsNode); - - this.path = options.defaultPath || "/"; - } - - public get onSelect(): Event { - return this.selectEmitter.event; - } - - public get onError(): Event { - return this.errorEmitter.event; - } - - /** - * Remove the dialog. - */ - public dispose(): void { - this.selectEmitter.dispose(); - this.errorEmitter.dispose(); - this.entryList.dispose(); - this.background.remove(); - } - - /** - * Build and insert the path shown at the top of the dialog. - */ - private buildPath(): void { - while (this.pathNode.lastChild) { - this.pathNode.removeChild(this.pathNode.lastChild); - } - - if (!this._path) { - throw new Error("cannot build path node without valid path"); - } - - const pathParts = ["", ...this._path.split("/").filter((p) => p.length > 0)]; - - for (let i = 0; i < pathParts.length; i++) { - const pathPartNode = document.createElement("div"); - pathPartNode.classList.add("path-part"); - pathPartNode.innerText = pathParts[i].length > 0 ? pathParts[i] : "/"; - - if (i === pathParts.length - 1) { - pathPartNode.classList.add("active"); - } - - pathPartNode.addEventListener("click", () => { - this.path = "/" + pathParts.slice(0, i + 1).join("/"); - }); - - this.pathNode.appendChild(pathPartNode); - } - } - - private set path(directory: string) { - this.list(directory).then((value) => { - this._path = directory; - this.buildPath(); - - while (this.filesNode.lastChild) { - this.filesNode.removeChild(this.filesNode.lastChild); - } - - const items = value.filter((v) => { - if (v.name.startsWith(".")) { - const props = (this.options as OpenDialogOptions).properties; - if (props && props.showHiddenFiles) { - return true; - } - - return false; - } - - return true; - }); - - this.entryList.layout(); - - this.entryList.setChildren(null, items.map((i: DialogEntry): ITreeElement => ({ element: i }))); - this.entryList.domFocus(); - this.entryList.setFocus([null]); - // Clears the input on refresh - // tslint:disable-next-line:no-any - (this.entryList).typeFilterController.onInput(""); - }).catch((ex) => { - this.errorEmitter.emit(ex); - }); - } - - private get filterValue(): string { - // tslint:disable-next-line:no-any - return (this.entryList).typeFilterController.filter._pattern; - } - - /** - * List the files and return dialog entries. - */ - private async list(directory: string): Promise> { - const paths = (await util.promisify(fs.readdir)(directory)).sort(); - const stats = await Promise.all(paths.map(p => util.promisify(fs.lstat)(path.join(directory, p)))); - - return stats.map((stat, index): DialogEntry => ({ - fullPath: path.join(directory, paths[index]), - name: paths[index], - isDirectory: stat.isDirectory(), - lastModified: stat.mtime.toDateString(), - size: stat.size, - // If we can't open files, show them as disabled. - isDisabled: !stat.isDirectory() - && !(this.options as OpenDialogOptions).properties.openFile, - })); - } -} - -interface DialogEntryData { - icon: HTMLElement; - size: HTMLElement; - lastModified: HTMLElement; - label: HighlightedLabel; -} - -/** - * Rendering for the different parts of a dialog entry. - */ -class DialogEntryRenderer implements ITreeRenderer { - public get templateId(): string { - return "dialog-entry"; - } - - /** - * Append and return containers for each part of the dialog entry. - */ - public renderTemplate(container: HTMLElement): DialogEntryData { - addClass(container, "dialog-entry"); - addClass(container, "dialog-grid"); - - const wrapper = append(container, $(".dialog-entry-info")); - const icon: HTMLElement = append(wrapper, $("div")); - const name = append(wrapper, $(".dialog-entry-name")); - const label = new HighlightedLabel(name, false); - append(container, wrapper); - const size = append(container, $(".dialog-entry-size")); - const mtime = append(container, $(".dialog-entry-mtime")); - - return { - icon, - size, - lastModified: mtime, - label, - }; - } - - /** - * Render a dialog entry. - */ - public renderElement(node: ITreeNode, _index: number, templateData: DialogEntryData): void { - templateData.icon.className = "dialog-entry-icon monaco-icon-label"; - const classes = getIconClasses( - workbench.serviceCollection.get(IModelService) as IModelService, - workbench.serviceCollection.get(IModeService) as IModeService, - URI.file(node.element.name), - node.element.isDirectory ? FileKind.FOLDER : FileKind.FILE, - ); - templateData.icon.hidden = classes.length === 0; - classes.forEach((c) => { - try { - templateData.icon.classList.add(c); - } catch (ex) { - // Nothin needed. Sometimes bad classes are given - } - }); - templateData.label.set(node.element.name, typeof node.filterData === "string" && node.element.name.toLowerCase().startsWith(node.filterData.toLowerCase()) ? [{ - start: 0, - end: node.filterData.length, - }] : []); - templateData.size.innerText = !node.element.isDirectory ? this.humanReadableSize(node.element.size) : ""; - templateData.lastModified.innerText = node.element.lastModified; - - // We know this exists because we created the template. - const entryContainer = templateData.label.element.parentElement!.parentElement!.parentElement!; - if (node.element.isDisabled) { - entryContainer.classList.add("disabled"); - } else { - entryContainer.classList.remove("disabled"); - } - } - - /** - * Does nothing (not implemented). - */ - public disposeTemplate(_templateData: DialogEntryData): void { - // throw new Error("Method not implemented."); - } - - /** - * Given a positive size in bytes, return a string that is more readable for - * humans. - */ - private humanReadableSize(bytes: number): string { - const units = ["B", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"]; - const i = Math.min(Math.floor(bytes && Math.log(bytes) / Math.log(1000)), units.length - 1); - - return (bytes / Math.pow(1000, i)).toFixed(2) + " " + units[i]; - } -} diff --git a/packages/vscode/src/fill/amd.ts b/packages/vscode/src/fill/amd.ts deleted file mode 100644 index 8d322bc1..00000000 --- a/packages/vscode/src/fill/amd.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { URI } from "vs/base/common/uri"; - -export const getPathFromAmdModule = (_: typeof require, relativePath: string): string => { - if (process.mainModule && process.mainModule.filename) { - const index = process.mainModule.filename.lastIndexOf("/"); - - return process.mainModule.filename.slice(0, index); - } - - return relativePath ? URI.file(relativePath).fsPath : ""; -}; diff --git a/packages/vscode/src/fill/codeEditor.ts b/packages/vscode/src/fill/codeEditor.ts deleted file mode 100644 index e1134724..00000000 --- a/packages/vscode/src/fill/codeEditor.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { join } from "path"; -import * as editor from "vs/editor/browser/services/codeEditorServiceImpl"; -import { IDecorationRenderOptions } from "vs/editor/common/editorCommon"; - -/** - * This converts icon paths for decorations to the correct URL. - */ -abstract class CodeEditorServiceImpl extends editor.CodeEditorServiceImpl { - public registerDecorationType(key: string, options: IDecorationRenderOptions, parentTypeKey?: string): void { - super.registerDecorationType(key, options ? { - ...options, - gutterIconPath: options.gutterIconPath && options.gutterIconPath.scheme === "file" ? { - ...options.gutterIconPath, - scheme: location.protocol.replace(":", ""), - authority: location.host, - path: join("/resource", options.gutterIconPath.path), - } :options.gutterIconPath, - } : {}, parentTypeKey); - } -} - -const target = editor as typeof editor; -target.CodeEditorServiceImpl = CodeEditorServiceImpl; diff --git a/packages/vscode/src/fill/css.js b/packages/vscode/src/fill/css.js deleted file mode 100644 index 9519b515..00000000 --- a/packages/vscode/src/fill/css.js +++ /dev/null @@ -1,6 +0,0 @@ -module.exports = function(source) { - if (this.resourcePath.endsWith(".ts")) { - this.resourcePath = this.resourcePath.replace(".ts", ".css"); - } - return `module.exports = require("${this.resourcePath.replace(/\\/g, "\\\\")}");`; -}; diff --git a/packages/vscode/src/fill/dom.ts b/packages/vscode/src/fill/dom.ts deleted file mode 100644 index c68d7320..00000000 --- a/packages/vscode/src/fill/dom.ts +++ /dev/null @@ -1,31 +0,0 @@ -import * as dom from "vs/base/browser/dom"; -import { IDisposable } from "vs/base/common/lifecycle"; - -// Firefox has no implementation of toElement. -if (!("toElement" in MouseEvent.prototype)) { - Object.defineProperty(MouseEvent.prototype, "toElement", { - get: function (): EventTarget | null { - // @ts-ignore - const event = this as MouseEvent; - switch (event.type) { - case "mouseup": - case "focusin": - case "mousenter": - case "mouseover": - case "dragenter": - return event.target; - default: - return event.relatedTarget; - } - }, - }); -} - -const _addDisposableListener = dom.addDisposableListener; -// tslint:disable-next-line no-any -const addDisposableListener = (node: Element | Window | Document, type: string, handler: (event: any) => void, useCapture?: boolean): IDisposable => { - return _addDisposableListener(node, type === "mousewheel" ? "wheel" : type, handler, useCapture); -}; - -const target = dom as typeof dom; -target.addDisposableListener = addDisposableListener; diff --git a/packages/vscode/src/fill/environmentService.ts b/packages/vscode/src/fill/environmentService.ts deleted file mode 100644 index 0539d1e3..00000000 --- a/packages/vscode/src/fill/environmentService.ts +++ /dev/null @@ -1,30 +0,0 @@ -import * as paths from "./paths"; -import * as environment from "vs/platform/environment/node/environmentService"; - -/** - * Customize paths using data received from the initialization message. - */ -export class EnvironmentService extends environment.EnvironmentService { - public get sharedIPCHandle(): string { - return paths.getSocketPath() || super.sharedIPCHandle; - } - - public get extensionsPath(): string { - return paths.getExtensionsDirectory(); - } - - public get builtinExtensionsPath(): string { - return paths.getBuiltInExtensionsDirectory(); - } - - public get extraExtensionPaths(): string[] { - return paths.getExtraExtensionDirectories(); - } - - public get extraBuiltinExtensionPaths(): string[] { - return paths.getExtraBuiltinExtensionDirectories(); - } -} - -const target = environment as typeof environment; -target.EnvironmentService = EnvironmentService; diff --git a/packages/vscode/src/fill/graceful-fs.ts b/packages/vscode/src/fill/graceful-fs.ts deleted file mode 100644 index b4ddba27..00000000 --- a/packages/vscode/src/fill/graceful-fs.ts +++ /dev/null @@ -1,3 +0,0 @@ -export const gracefulify = (): void => undefined; - -export * from "fs"; diff --git a/packages/vscode/src/fill/iconv-lite.ts b/packages/vscode/src/fill/iconv-lite.ts deleted file mode 100644 index ac1fcc22..00000000 --- a/packages/vscode/src/fill/iconv-lite.ts +++ /dev/null @@ -1,64 +0,0 @@ -import * as iconv from "../../node_modules/iconv-lite"; -import { Transform, TransformCallback } from "stream"; - -class IconvLiteDecoderStream extends Transform { - // tslint:disable-next-line no-any - private conv: any; - private encoding: string; - - public constructor(options: { encoding: string }) { - super(options); - // tslint:disable-next-line no-any - this.conv = (iconv as any).getDecoder(options.encoding, undefined); - this.encoding = options.encoding; - } - - // tslint:disable-next-line no-any - public _transform(chunk: any, _encoding: string, done: TransformCallback): void { - if (!Buffer.isBuffer(chunk)) { - return done(new Error("Iconv decoding stream needs buffers as its input.")); - } - try { - const res = this.conv.write(chunk); - if (res && res.length) { - this.push(res, this.encoding); - } - done(); - } catch (error) { - done(error); - } - } - - public _flush(done: TransformCallback): void { - try { - const res = this.conv.end(); - if (res && res.length) { - this.push(res, this.encoding); - } - done(); - } catch (error) { - done(error); - } - } - - // tslint:disable-next-line no-any - public collect(cb: (error: Error | null, response?: any) => void): this { - let res = ""; - this.on("error", cb); - this.on("data", (chunk) => res += chunk); - this.on("end", () => { - cb(null, res); - }); - - return this; - } -} - -const decodeStream = (encoding: string): NodeJS.ReadWriteStream => { - return new IconvLiteDecoderStream({ encoding }); -}; - -const target = iconv as typeof iconv; -target.decodeStream = decodeStream; - -export = target; diff --git a/packages/vscode/src/fill/labels.ts b/packages/vscode/src/fill/labels.ts deleted file mode 100644 index ee8cc16d..00000000 --- a/packages/vscode/src/fill/labels.ts +++ /dev/null @@ -1,11 +0,0 @@ -import * as labels from "vs/base/common/labels"; - -// Disable all mnemonics for now until we implement it. -const target = labels as typeof labels; -target.mnemonicMenuLabel = (label: string, forceDisable?: boolean): string => { - return label.replace(/\(&&\w\)|&&/g, ""); -}; -target.mnemonicButtonLabel = (label: string): string => { - return label.replace(/\(&&\w\)|&&/g, ""); -}; -target.unmnemonicLabel = (label: string): string => { return label; }; diff --git a/packages/vscode/src/fill/menuRegistry.ts b/packages/vscode/src/fill/menuRegistry.ts deleted file mode 100644 index c095f63d..00000000 --- a/packages/vscode/src/fill/menuRegistry.ts +++ /dev/null @@ -1,40 +0,0 @@ -import { IDisposable } from "vs/base/common/lifecycle"; -import * as actions from "vs/platform/actions/common/actions"; -import { CloseWorkspaceAction } from "vs/workbench/browser/actions/workspaceActions"; -import { OpenProcessExplorer } from "vs/workbench/contrib/issue/electron-browser/issueActions"; -import { ToggleDevToolsAction } from "vs/workbench/electron-browser/actions/developerActions"; -import { OpenPrivacyStatementUrlAction, OpenRequestFeatureUrlAction, OpenTwitterUrlAction } from "vs/workbench/electron-browser/actions/helpActions"; -import { CloseCurrentWindowAction, NewWindowAction, ShowAboutDialogAction } from "vs/workbench/electron-browser/actions/windowActions"; -import { REVEAL_IN_OS_COMMAND_ID } from "vs/workbench/contrib/files/browser/fileCommands"; - -const toSkip = [ - ToggleDevToolsAction.ID, - OpenTwitterUrlAction.ID, - OpenPrivacyStatementUrlAction.ID, - ShowAboutDialogAction.ID, - OpenProcessExplorer.ID, - OpenRequestFeatureUrlAction.ID, - NewWindowAction.ID, - CloseCurrentWindowAction.ID, - CloseWorkspaceAction.ID, - REVEAL_IN_OS_COMMAND_ID, - - // Unfortunately referenced as a string - "update.showCurrentReleaseNotes", - "workbench.action.openIssueReporter", -]; - -// Intercept appending menu items so we can skip items that won't work. -const originalAppend = actions.MenuRegistry.appendMenuItem.bind(actions.MenuRegistry); -actions.MenuRegistry.appendMenuItem = (id: actions.MenuId, item: actions.IMenuItem | actions.ISubmenuItem): IDisposable => { - if (actions.isIMenuItem(item)) { - if (toSkip.indexOf(item.command.id) !== -1) { - // Skip instantiation - return { - dispose: (): void => undefined, - }; - } - } - - return originalAppend(id, item); -}; diff --git a/packages/vscode/src/fill/mouseEvent.ts b/packages/vscode/src/fill/mouseEvent.ts deleted file mode 100644 index 08ca6666..00000000 --- a/packages/vscode/src/fill/mouseEvent.ts +++ /dev/null @@ -1,17 +0,0 @@ -import * as mouse from "vs/base/browser/mouseEvent"; - -/** - * Fix the wheel event for Firefox. - */ -class StandardWheelEvent extends mouse.StandardWheelEvent { - public constructor(event: mouse.IMouseWheelEvent | null) { - super( - event, - (-(event as any as MouseWheelEvent).deltaX || 0) / 3, // tslint:disable-line no-any - (-(event as any as MouseWheelEvent).deltaY || 0) / 3, // tslint:disable-line no-any - ); - } -} - -const target = mouse as typeof mouse; -target.StandardWheelEvent = StandardWheelEvent; diff --git a/packages/vscode/src/fill/native-keymap.ts b/packages/vscode/src/fill/native-keymap.ts deleted file mode 100644 index f3749cea..00000000 --- a/packages/vscode/src/fill/native-keymap.ts +++ /dev/null @@ -1,11 +0,0 @@ -class NativeKeymap { - public getCurrentKeyboardLayout(): null { - return null; - } - - public getKeyMap(): undefined[] { - return []; - } -} - -export = new NativeKeymap(); diff --git a/packages/vscode/src/fill/native-watchdog.ts b/packages/vscode/src/fill/native-watchdog.ts deleted file mode 100644 index cf8d8346..00000000 --- a/packages/vscode/src/fill/native-watchdog.ts +++ /dev/null @@ -1,7 +0,0 @@ -class Watchdog { - public start(): void { - // No action required. - } -} - -export = new Watchdog(); diff --git a/packages/vscode/src/fill/node-pty.ts b/packages/vscode/src/fill/node-pty.ts deleted file mode 100644 index 41c703fe..00000000 --- a/packages/vscode/src/fill/node-pty.ts +++ /dev/null @@ -1,4 +0,0 @@ -import { Module } from "@coder/protocol"; -import { client } from "@coder/ide/src/fill/client"; - -export = client.modules[Module.NodePty]; diff --git a/packages/vscode/src/fill/package.ts b/packages/vscode/src/fill/package.ts deleted file mode 100644 index 8d6ff3f8..00000000 --- a/packages/vscode/src/fill/package.ts +++ /dev/null @@ -1,2 +0,0 @@ -import * as packageJson from "../../../../lib/vscode/package.json"; -export default { name: "vscode", version: packageJson.version }; diff --git a/packages/vscode/src/fill/paste.ts b/packages/vscode/src/fill/paste.ts deleted file mode 100644 index 72db94ba..00000000 --- a/packages/vscode/src/fill/paste.ts +++ /dev/null @@ -1,80 +0,0 @@ -import * as nls from "vs/nls"; -import { Action } from "vs/base/common/actions"; -import { TERMINAL_COMMAND_ID } from "vs/workbench/contrib/terminal/common/terminalCommands"; -import { ITerminalService } from "vs/workbench/contrib/terminal/common/terminal"; -import * as actions from "vs/workbench/contrib/terminal/browser/terminalActions"; -import * as instance from "vs/workbench/contrib/terminal/browser/terminalInstance"; -import { client } from "../client"; - -const getLabel = (key: string, enabled: boolean): string => { - return enabled - ? nls.localize(key, "Paste") - : nls.localize(`${key}WithKeybind`, "Paste (must use keybind)"); -}; - -export class PasteAction extends Action { - private static readonly KEY = "paste"; - - public constructor() { - super( - "editor.action.clipboardPasteAction", - getLabel(PasteAction.KEY, client.clipboard.isEnabled), - undefined, - client.clipboard.isEnabled, - async (): Promise => client.clipboard.paste(), - ); - - client.clipboard.onPermissionChange((enabled) => { - this.label = getLabel(PasteAction.KEY, enabled); - this.enabled = enabled; - }); - } -} - -class TerminalPasteAction extends Action { - private static readonly KEY = "workbench.action.terminal.paste"; - - public static readonly ID = TERMINAL_COMMAND_ID.PASTE; - public static readonly LABEL = nls.localize("workbench.action.terminal.paste", "Paste into Active Terminal"); - public static readonly SHORT_LABEL = getLabel(TerminalPasteAction.KEY, client.clipboard.isEnabled); - - public constructor( - id: string, label: string, - @ITerminalService private terminalService: ITerminalService, - ) { - super(id, label); - client.clipboard.onPermissionChange((enabled) => { - this._setLabel(getLabel(TerminalPasteAction.KEY, enabled)); - }); - this._setLabel(getLabel(TerminalPasteAction.KEY, client.clipboard.isEnabled)); - } - - public run(): Promise { - const instance = this.terminalService.getActiveOrCreateInstance(); - if (instance) { - // tslint:disable-next-line no-any it will return a promise (see below) - return (instance as any).paste(); - } - - return Promise.resolve(); - } -} - -class TerminalInstance extends instance.TerminalInstance { - public async paste(): Promise { - this.focus(); - if (client.clipboard.isEnabled) { - const text = await client.clipboard.readText(); - this.sendText(text, false); - } else { - document.execCommand("paste"); - } - } -} - -const actionsTarget = actions as typeof actions; -// @ts-ignore TODO: don't ignore it. -actionsTarget.TerminalPasteAction = TerminalPasteAction; - -const instanceTarget = instance as typeof instance; -instanceTarget.TerminalInstance = TerminalInstance; diff --git a/packages/vscode/src/fill/paths.ts b/packages/vscode/src/fill/paths.ts deleted file mode 100644 index 88e19dc6..00000000 --- a/packages/vscode/src/fill/paths.ts +++ /dev/null @@ -1,104 +0,0 @@ -import { InitData, SharedProcessData } from "@coder/protocol"; - -/** - * Provides paths. - */ -class Paths { - private _appData: string | undefined; - private _defaultUserData: string | undefined; - private _socketPath: string | undefined; - private _extensionsDirectory: string | undefined; - private _builtInExtensionsDirectory: string | undefined; - private _workingDirectory: string | undefined; - private _extraExtensionDirectories: string[] | undefined; - private _extraBuiltinExtensionDirectories: string[] | undefined; - - public get appData(): string { - if (typeof this._appData === "undefined") { - throw new Error("trying to access appData before it has been set"); - } - - return this._appData; - } - - public get defaultUserData(): string { - if (typeof this._defaultUserData === "undefined") { - throw new Error("trying to access defaultUserData before it has been set"); - } - - return this._defaultUserData; - } - - public get socketPath(): string { - if (typeof this._socketPath === "undefined") { - throw new Error("trying to access socketPath before it has been set"); - } - - return this._socketPath; - } - - public get extensionsDirectory(): string { - if (!this._extensionsDirectory) { - throw new Error("trying to access extensions directory before it has been set"); - } - - return this._extensionsDirectory; - } - - public get builtInExtensionsDirectory(): string { - if (!this._builtInExtensionsDirectory) { - throw new Error("trying to access builtin extensions directory before it has been set"); - } - - return this._builtInExtensionsDirectory; - } - - public get extraExtensionDirectories(): string[] { - if (!this._extraExtensionDirectories) { - throw new Error("trying to access extra extension directories before they have been set"); - } - - return this._extraExtensionDirectories; - } - - public get extraBuiltinExtensionDirectories(): string[] { - if (!this._extraBuiltinExtensionDirectories) { - throw new Error("trying to access extra builtin extension directories before they have been set"); - } - - return this._extraBuiltinExtensionDirectories; - } - - public get workingDirectory(): string { - if (!this._workingDirectory) { - throw new Error("trying to access working directory before it has been set"); - } - - return this._workingDirectory; - } - - /** - * Initialize paths using the provided data. - */ - public initialize(data: InitData, sharedData: SharedProcessData): void { - process.env.VSCODE_LOGS = sharedData.logPath; - this._appData = data.dataDirectory; - this._defaultUserData = data.dataDirectory; - this._socketPath = sharedData.socketPath; - this._extensionsDirectory = data.extensionsDirectory; - this._builtInExtensionsDirectory = data.builtInExtensionsDirectory; - this._workingDirectory = data.workingDirectory; - this._extraExtensionDirectories = data.extraExtensionDirectories; - this._extraBuiltinExtensionDirectories = data.extraBuiltinExtensionDirectories; - } -} - -export const _paths = new Paths(); -export const getAppDataPath = (): string => _paths.appData; -export const getDefaultUserDataPath = (): string => _paths.defaultUserData; -export const getWorkingDirectory = (): string => _paths.workingDirectory; -export const getExtensionsDirectory = (): string => _paths.extensionsDirectory; -export const getBuiltInExtensionsDirectory = (): string => _paths.builtInExtensionsDirectory; -export const getExtraExtensionDirectories = (): string[] => _paths.extraExtensionDirectories; -export const getExtraBuiltinExtensionDirectories = (): string[] => _paths.extraBuiltinExtensionDirectories; -export const getSocketPath = (): string => _paths.socketPath; diff --git a/packages/vscode/src/fill/platform.ts b/packages/vscode/src/fill/platform.ts deleted file mode 100644 index efe98c75..00000000 --- a/packages/vscode/src/fill/platform.ts +++ /dev/null @@ -1,27 +0,0 @@ -import * as os from "os"; -import * as platform from "vs/base/common/platform"; -import * as browser from "vs/base/browser/browser"; - -// tslint:disable no-any to override const - -// Use en instead of en-US since that's vscode default and it uses -// that to determine whether to output aliases which will be redundant. -if (platform.locale === "en-US") { - (platform as any).locale = "en"; -} -if (platform.language === "en-US") { - (platform as any).language = "en"; -} - -// Use the server's platform instead of the client's. For example, this affects -// how VS Code handles paths (and more) because different platforms give -// different results. We'll have to counter for things that shouldn't change, -// like keybindings. -(platform as any).isLinux = os.platform() === "linux"; -(platform as any).isWindows = os.platform() === "win32"; -(platform as any).isMacintosh = os.platform() === "darwin"; -(platform as any).platform = os.platform() === "linux" ? platform.Platform.Linux : os.platform() === "win32" ? platform.Platform.Windows : platform.Platform.Mac; - -// This is used for keybindings, and in one place to choose between \r\n and \n -// (which we change to use platform.isWindows instead). -(platform as any).OS = (browser.isMacintosh ? platform.OperatingSystem.Macintosh : (browser.isWindows ? platform.OperatingSystem.Windows : platform.OperatingSystem.Linux)); diff --git a/packages/vscode/src/fill/product.ts b/packages/vscode/src/fill/product.ts deleted file mode 100644 index 19460896..00000000 --- a/packages/vscode/src/fill/product.ts +++ /dev/null @@ -1,57 +0,0 @@ -import { InitData } from "@coder/protocol"; -import { IProductConfiguration } from "vs/platform/product/node/product"; - -class Product implements IProductConfiguration { - public nameShort = "code-server"; - public nameLong = "code-server"; - public documentationUrl = "https://code.visualstudio.com/docs"; - public keyboardShortcutsUrlMac = "https://code.visualstudio.com/shortcuts/keyboard-shortcuts-macos.pdf"; - public keyboardShortcutsUrlLinux = "https://code.visualstudio.com/shortcuts/keyboard-shortcuts-linux.pdf"; - public keyboardShortcutsUrlWin = "https://code.visualstudio.com/shortcuts/keyboard-shortcuts-windows.pdf"; - public introductoryVideosUrl = "https://code.visualstudio.com/docs/getstarted/introvideos"; - public tipsAndTricksUrl = "https://code.visualstudio.com/docs/getstarted/tips-and-tricks"; - public twitterUrl = "https://twitter.com/code"; - public licenseUrl = "https://github.com/cdr/code-server/blob/master/LICENSE"; - public aiConfig = process.env.DISABLE_TELEMETRY ? undefined! : { - // Only needed so vscode can see that content exists for this value. - // We override the application insights module. - asimovKey: "content", - }; - public enableTelemetry = process.env.DISABLE_TELEMETRY ? false : true; - - private _dataFolderName: string | undefined; - public get dataFolderName(): string { - if (!this._dataFolderName) { - throw new Error("trying to access data folder name before it has been set"); - } - - return this._dataFolderName; - } - - // tslint:disable-next-line:no-any - public extensionsGallery: any = { - get serviceUrl(): string { - return process.env.SERVICE_URL || "https://v1.extapi.coder.com"; - }, - - get itemUrl(): string { - return process.env.ITEM_URL || ""; - }, - - }; - - public extensionExecutionEnvironments = { - "wayou.vscode-todo-highlight": "worker", - "vscodevim.vim": "worker", - "coenraads.bracket-pair-colorizer": "worker", - }; - - public fetchUrl = ""; - - public initialize(_data: InitData): void { - // Nothing at the moment; dataFolderName isn't used since we override the - // extension path. - } -} - -export default new Product(); diff --git a/packages/vscode/src/fill/ripgrep.ts b/packages/vscode/src/fill/ripgrep.ts deleted file mode 100644 index 0e023e74..00000000 --- a/packages/vscode/src/fill/ripgrep.ts +++ /dev/null @@ -1,4 +0,0 @@ -import * as path from "path"; - -// tslint:disable-next-line:no-any -module.exports.rgPath = (global).RIPGREP_LOCATION || path.join(__dirname, "../bin/rg"); diff --git a/packages/vscode/src/fill/spdlog.ts b/packages/vscode/src/fill/spdlog.ts deleted file mode 100644 index 3b98204d..00000000 --- a/packages/vscode/src/fill/spdlog.ts +++ /dev/null @@ -1,4 +0,0 @@ -import { Module } from "@coder/protocol"; -import { client } from "@coder/ide/src/fill/client"; - -export = client.modules[Module.Spdlog]; diff --git a/packages/vscode/src/fill/stdioElectron.ts b/packages/vscode/src/fill/stdioElectron.ts deleted file mode 100644 index f9944539..00000000 --- a/packages/vscode/src/fill/stdioElectron.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { StdioIpcHandler } from "@coder/server/src/ipc"; -import { IpcRenderer } from "electron"; - -// TODO: Commenting out for now since the electron fill includes the client code -// and tries to connect to the web socket. The fill also likely wouldn't work -// since it assumes it is running on the client. Could we proxy all methods to -// the client? It might not matter since we intercept everything before sending -// to the shared process. -// export * from "@coder/ide/src/fill/electron"; - -class StdioIpcRenderer extends StdioIpcHandler implements IpcRenderer { - // tslint:disable-next-line no-any - public sendTo(_windowId: number, _channel: string, ..._args: any[]): void { - throw new Error("Method not implemented."); - } - - // tslint:disable-next-line no-any - public sendToHost(_channel: string, ..._args: any[]): void { - throw new Error("Method not implemented."); - } - - public eventNames(): string[] { - return super.eventNames() as string[]; - } -} - -export const ipcRenderer = new StdioIpcRenderer(); diff --git a/packages/vscode/src/fill/storageDatabase.ts b/packages/vscode/src/fill/storageDatabase.ts deleted file mode 100644 index 94343e18..00000000 --- a/packages/vscode/src/fill/storageDatabase.ts +++ /dev/null @@ -1,132 +0,0 @@ -import { readFile, writeFile } from "fs"; -import { mkdirp } from "fs-extra"; -import * as path from "path"; -import { promisify } from "util"; -import { IDisposable } from "@coder/disposable"; -import { logger, field } from "@coder/logger"; -import { Event } from "vs/base/common/event"; -import * as workspaceStorage from "vs/base/node/storage"; -import * as globalStorage from "vs/platform/storage/node/storageIpc"; -import { IStorageService, WillSaveStateReason } from "vs/platform/storage/common/storage"; -import * as paths from "./paths"; -import { workbench } from "../workbench"; - -// tslint:disable completed-docs - -class StorageDatabase implements workspaceStorage.IStorageDatabase { - public readonly onDidChangeItemsExternal = Event.None; - private readonly items = new Map(); - private fetched: boolean = false; - private readonly path: string; - - public constructor(path: string) { - this.path = path.replace(/\.vscdb$/, ".json"); - logger.debug("Setting up storage", field("path", this.path)); - window.addEventListener("unload", () => { - if (!navigator.sendBeacon) { - throw new Error("cannot save state"); - } - - this.triggerFlush(WillSaveStateReason.SHUTDOWN); - const resourceBaseUrl = location.pathname.replace(/\/$/, "") + "/resource"; - navigator.sendBeacon(`${resourceBaseUrl}/${this.path}`, this.content); - }); - } - - public async getItems(): Promise> { - if (this.fetched) { - return this.items; - } - try { - const contents = await promisify(readFile)(this.path, "utf8"); - const json = JSON.parse(contents); - Object.keys(json).forEach((key) => { - this.items.set(key, json[key]); - }); - } catch (error) { - if (error.code !== "ENOENT") { - throw error; - } - } - - this.fetched = true; - - return this.items; - } - - public updateItems(request: workspaceStorage.IUpdateRequest): Promise { - if (request.insert) { - request.insert.forEach((value, key) => { - if (key === "colorThemeData") { - localStorage.setItem("colorThemeData", value); - } - - this.items.set(key, value); - }); - } - - if (request.delete) { - request.delete.forEach(key => this.items.delete(key)); - } - - return this.save(); - } - - public close(): Promise { - return Promise.resolve(); - } - - public checkIntegrity(): Promise { - return Promise.resolve("ok"); - } - - private async save(): Promise { - await mkdirp(path.dirname(this.path)); - - return promisify(writeFile)(this.path, this.content); - } - - private triggerFlush(reason: WillSaveStateReason = WillSaveStateReason.NONE): boolean { - // tslint:disable-next-line:no-any - const storageService = workbench.serviceCollection.get(IStorageService) as any; - if (reason === WillSaveStateReason.SHUTDOWN && storageService.close) { - storageService.close(); - - return true; - } - if (storageService._onWillSaveState) { - storageService._onWillSaveState.fire({ reason }); - - return true; - } - - return false; - } - - private get content(): string { - const json: { [key: string]: string } = {}; - this.items.forEach((value, key) => { - json[key] = value; - }); - - return JSON.stringify(json); - } -} - -class GlobalStorageDatabase extends StorageDatabase implements IDisposable { - public constructor() { - super(path.join(paths.getAppDataPath(), "globalStorage", "state.vscdb")); - } - - public dispose(): void { - // Nothing to do. - } -} - -const workspaceTarget = workspaceStorage as typeof workspaceStorage; -// @ts-ignore TODO: don't ignore it. -workspaceTarget.SQLiteStorageDatabase = StorageDatabase; - -const globalTarget = globalStorage as typeof globalStorage; -// @ts-ignore TODO: don't ignore it. -globalTarget.GlobalStorageDatabaseChannelClient = GlobalStorageDatabase; diff --git a/packages/vscode/src/fill/vscodeTextmate.ts b/packages/vscode/src/fill/vscodeTextmate.ts deleted file mode 100644 index 47b3cae6..00000000 --- a/packages/vscode/src/fill/vscodeTextmate.ts +++ /dev/null @@ -1,54 +0,0 @@ -import * as vscodeTextmate from "../../../../lib/vscode/node_modules/vscode-textmate"; - -const target = vscodeTextmate as typeof vscodeTextmate; - -const ctx = (require as any).context("../../../../lib/extensions", true, /.*\.tmLanguage.json$/); -// Maps grammar scope to loaded grammar -const scopeToGrammar = {} as any; - -ctx.keys().forEach((key: string) => { - const value = ctx(key); - if (value.scopeName) { - scopeToGrammar[value.scopeName] = value; - } -}); - -target.Registry = class Registry extends vscodeTextmate.Registry { - public constructor(opts: vscodeTextmate.RegistryOptions) { - super({ - ...opts, - getOnigLib: (): Promise => { - return new Promise((res, rej) => { - const onigasm = require("onigasm"); - const wasmUrl = require("!!file-loader!onigasm/lib/onigasm.wasm"); - - return fetch(wasmUrl).then(resp => resp.arrayBuffer()).then(buffer => { - return onigasm.loadWASM(buffer); - }).then(() => { - res({ - createOnigScanner: function (patterns) { return new onigasm.OnigScanner(patterns); }, - createOnigString: function (s) { return new onigasm.OnigString(s); }, - }); - }).catch(reason => rej(reason)); - }); - }, - loadGrammar: async (scopeName: string) => { - if (scopeToGrammar[scopeName]) { - return scopeToGrammar[scopeName]; - } - - return opts.loadGrammar(scopeName); - }, - }); - } -}; - -enum StandardTokenType { - Other = 0, - Comment = 1, - String = 2, - RegEx = 4, -} - -// tslint:disable-next-line no-any to override const -(target as any).StandardTokenType = StandardTokenType; diff --git a/packages/vscode/src/fill/windowsService.ts b/packages/vscode/src/fill/windowsService.ts deleted file mode 100644 index d89c8420..00000000 --- a/packages/vscode/src/fill/windowsService.ts +++ /dev/null @@ -1,360 +0,0 @@ -import * as electron from "electron"; -import { Emitter } from "@coder/events"; -import { logger } from "@coder/logger"; -import { IWindowsService, INativeOpenDialogOptions, MessageBoxOptions, SaveDialogOptions, OpenDialogOptions, IMessageBoxResult, IDevToolsOptions, IEnterWorkspaceResult, CrashReporterStartOptions, INewWindowOptions, IOpenFileRequest, IAddFoldersRequest, IURIToOpen, IOpenSettings } from "vs/platform/windows/common/windows"; -import { ParsedArgs } from "vs/platform/environment/common/environment"; -import { IWorkspaceIdentifier, IWorkspaceFolderCreationData, ISingleFolderWorkspaceIdentifier } from "vs/platform/workspaces/common/workspaces"; -import { URI } from "vs/base/common/uri"; -import { IRecentlyOpened, IRecent } from "vs/platform/history/common/history"; -import { ISerializableCommandAction } from "vs/platform/actions/common/actions"; -import { client } from "../client"; -import { showOpenDialog } from "../dialog"; -import { workbench } from "../workbench"; - -// tslint:disable completed-docs - -// VS Code overrides window.open to call openExternal, but we then call -// window.open which results in an infinite loop. Store the function but also -// make it unable to be set (doesn't work otherwise). -const windowOpen = window.open; -Object.defineProperty(window, "open", { - set: (): void => { /* Not allowed. */ }, - get: (): Function => windowOpen, -}); - -/** - * Instead of going to the shared process, we'll directly run these methods on - * the client. This setup means we can only control the current window. - */ -export class WindowsService implements IWindowsService { - // tslint:disable-next-line no-any - public _serviceBrand: any; - - private readonly openEmitter = new Emitter(); - private readonly focusEmitter = new Emitter(); - private readonly blurEmitter = new Emitter(); - private readonly maximizeEmitter = new Emitter(); - private readonly unmaximizeEmitter = new Emitter(); - private readonly recentlyOpenedChangeEmitter = new Emitter(); - - public readonly onWindowOpen = this.openEmitter.event; - public readonly onWindowFocus = this.focusEmitter.event; - public readonly onWindowBlur = this.blurEmitter.event; - public readonly onWindowMaximize = this.maximizeEmitter.event; - public readonly onWindowUnmaximize = this.unmaximizeEmitter.event; - public readonly onRecentlyOpenedChange = this.recentlyOpenedChangeEmitter.event; - - private readonly window = new electron.BrowserWindow(); - - // Dialogs - public async pickFileFolderAndOpen(options: INativeOpenDialogOptions): Promise { - showOpenDialog({ - ...(options.dialogOptions || {}), - properties: { - openFile: true, - openDirectory: true, - }, - }).then((path) => { - // tslint:disable-next-line:no-any - (electron.ipcMain).send("vscode:openFiles", { - filesToOpen: [{ - fileUri: URI.file(path), - }], - } as IOpenFileRequest); - }).catch((ex) => { - logger.error(ex.message); - }); - } - - public async pickFileAndOpen(options: INativeOpenDialogOptions): Promise { - showOpenDialog({ - ...(options.dialogOptions || {}), - properties: { - openFile: true, - }, - }).then((path) => { - // tslint:disable-next-line:no-any - (electron.ipcMain).send("vscode:openFiles", { - filesToOpen: [{ - fileUri: URI.file(path), - }], - } as IOpenFileRequest); - }).catch((ex) => { - logger.error(ex.message); - }); - } - - public async pickFolderAndOpen(options: INativeOpenDialogOptions): Promise { - if (!options.dialogOptions) { - options.dialogOptions = {}; - } - if (!options.dialogOptions.title) { - options.dialogOptions.title = "Open Folder"; - } - showOpenDialog({ - ...(options.dialogOptions || {}), - properties: { - openDirectory: true, - }, - }).then((path) => { - workbench.workspace = URI.file(path); - }).catch((ex) => { - logger.error(ex.message); - }); - } - - public async pickWorkspaceAndOpen(options: INativeOpenDialogOptions): Promise { - showOpenDialog({ - ...(options.dialogOptions || {}), - properties: { - openDirectory: true, - }, - }).then((path) => { - // tslint:disable-next-line:no-any - (electron.ipcMain).send("vscode:addFolders", { - foldersToAdd: [URI.file(path)], - } as IAddFoldersRequest); - }).catch((ex) => { - logger.error(ex.message); - }); - } - - public showMessageBox(windowId: number, options: MessageBoxOptions): Promise { - return new Promise((resolve): void => { - electron.dialog.showMessageBox(this.getWindowById(windowId), options, (response, checkboxChecked) => { - resolve({ - button: response, - checkboxChecked, - }); - }); - }); - } - - public showSaveDialog(windowId: number, options: SaveDialogOptions): Promise { - return new Promise((resolve): void => { - electron.dialog.showSaveDialog(this.getWindowById(windowId), options, (filename, _bookmark) => { - resolve(filename); - }); - }); - } - - public async showOpenDialog(_windowId: number, options: OpenDialogOptions): Promise { - return [await showOpenDialog({ - ...(options || {}), - properties: { - openDirectory: options && options.properties && options.properties.includes("openDirectory") || false, - openFile: options && options.properties && options.properties.includes("openFile") || false, - }, - })]; - } - - public reloadWindow(windowId: number, _args?: ParsedArgs): Promise { - return Promise.resolve(this.getWindowById(windowId).reload()); - } - - public openDevTools(_windowId: number, _options?: IDevToolsOptions): Promise { - throw new Error("not implemented"); - } - - public toggleDevTools(_windowId: number): Promise { - throw new Error("Toggling developer tools from JavaScript is not supported."); - } - - public closeWorkspace(_windowId: number): Promise { - throw new Error("not implemented"); - } - - public enterWorkspace(_windowId: number, uri: URI): Promise { - if (uri.path.endsWith(".json")) { - workbench.workspace = { - id: "Untitled", - configPath: uri, - }; - } else { - workbench.workspace = uri; - } - - return undefined!; - } - - public createAndEnterWorkspace(_windowId: number, _folders?: IWorkspaceFolderCreationData[], _path?: string): Promise { - throw new Error("not implemented"); - } - - public saveAndEnterWorkspace(_windowId: number, _path: string): Promise { - throw new Error("not implemented"); - } - - public toggleFullScreen(windowId: number): Promise { - const win = this.getWindowById(windowId); - - return Promise.resolve(win.setFullScreen(!win.isFullScreen())); - } - - public setRepresentedFilename(windowId: number, fileName: string): Promise { - return Promise.resolve(this.getWindowById(windowId).setRepresentedFilename(fileName)); - } - - public addRecentlyOpened(_files: IRecent[]): Promise { - throw new Error("not implemented"); - } - - public removeFromRecentlyOpened(_paths: (IWorkspaceIdentifier | ISingleFolderWorkspaceIdentifier | URI | string)[]): Promise { - throw new Error("not implemented"); - } - - public clearRecentlyOpened(): Promise { - throw new Error("not implemented"); - } - - public getRecentlyOpened(_windowId: number): Promise { - // TODO: properly implement. - return Promise.resolve({ - workspaces: [], - files: [], - }); - } - - public focusWindow(windowId: number): Promise { - return Promise.resolve(this.getWindowById(windowId).focus()); - } - - public closeWindow(_windowId: number): Promise { - throw new Error("not implemented"); - } - - public isFocused(windowId: number): Promise { - return Promise.resolve(this.getWindowById(windowId).isFocused()); - } - - public isMaximized(_windowId: number): Promise { - throw new Error("not implemented"); - } - - public maximizeWindow(_windowId: number): Promise { - throw new Error("not implemented"); - } - - public unmaximizeWindow(_windowId: number): Promise { - throw new Error("not implemented"); - } - - public minimizeWindow(_windowId: number): Promise { - throw new Error("not implemented"); - } - - public onWindowTitleDoubleClick(_windowId: number): Promise { - throw new Error("not implemented"); - } - - public setDocumentEdited(_windowId: number, _flag: boolean): Promise { - throw new Error("not implemented"); - } - - public quit(): Promise { - throw new Error("not implemented"); - } - - public relaunch(_options: { addArgs?: string[], removeArgs?: string[] }): Promise { - throw new Error("not implemented"); - } - - // macOS Native Tabs - public newWindowTab(): Promise { - throw new Error("not implemented"); - } - - public showPreviousWindowTab(): Promise { - throw new Error("not implemented"); - } - - public showNextWindowTab(): Promise { - throw new Error("not implemented"); - } - - public moveWindowTabToNewWindow(): Promise { - throw new Error("not implemented"); - } - - public mergeAllWindowTabs(): Promise { - throw new Error("not implemented"); - } - - public toggleWindowTabsBar(): Promise { - throw new Error("not implemented"); - } - - // macOS TouchBar - public updateTouchBar(_windowId: number, _items: ISerializableCommandAction[][]): Promise { - throw new Error("not implemented"); - } - - // Shared process - public async whenSharedProcessReady(): Promise { - await client.sharedProcessData; - } - - public toggleSharedProcess(): Promise { - throw new Error("not implemented"); - } - - // Global methods - public openWindow(_windowId: number, _uris: IURIToOpen[], _options?: IOpenSettings): Promise { - throw new Error("not implemented"); - } - - public openNewWindow(_options?: INewWindowOptions): Promise { - throw new Error("not implemented"); - } - - public showWindow(windowId: number): Promise { - return Promise.resolve(this.getWindowById(windowId).show()); - } - - public getWindows(): Promise<{ id: number; workspace?: IWorkspaceIdentifier; folderUri?: ISingleFolderWorkspaceIdentifier; title: string; filename?: string; }[]> { - throw new Error("not implemented"); - } - - public getWindowCount(): Promise { - return Promise.resolve(1); - } - - public log(_severity: string, ..._messages: string[]): Promise { - throw new Error("not implemented"); - } - - public async showItemInFolder(uri: URI): Promise { - workbench.workspace = uri; - } - - public getActiveWindowId(): Promise { - return Promise.resolve(1); - } - - public async openExternal(_url: string): Promise { - return typeof window.open(_url, "_blank") !== "undefined"; - } - - public startCrashReporter(_config: CrashReporterStartOptions): Promise { - throw new Error("not implemented"); - } - - public openAboutDialog(): Promise { - throw new Error("not implemented"); - } - - public resolveProxy(windowId: number, url: string): Promise { - return new Promise((resolve): void => { - this.getWindowById(windowId).webContents.session.resolveProxy(url, (proxy) => { - resolve(proxy); - }); - }); - } - - /** - * Get window by ID. For now this is always the current window. - */ - private getWindowById(_windowId: number): electron.BrowserWindow { - return this.window; - } -} diff --git a/packages/vscode/src/fill/workbenchRegistry.ts b/packages/vscode/src/fill/workbenchRegistry.ts deleted file mode 100644 index 69f8e5f2..00000000 --- a/packages/vscode/src/fill/workbenchRegistry.ts +++ /dev/null @@ -1,39 +0,0 @@ -import { logger } from "@coder/logger"; -import { IDisposable } from "vs/base/common/lifecycle"; -import { Registry } from "vs/platform/registry/common/platform"; -import { IWorkbenchActionRegistry, Extensions } from "vs/workbench/common/actions"; -import { SyncActionDescriptor } from "vs/platform/actions/common/actions"; -import { ContextKeyExpr } from "vs/platform/contextkey/common/contextkey"; -import { ToggleDevToolsAction } from "vs/workbench/electron-browser/actions/developerActions"; -import { TerminalPasteAction } from "vs/workbench/contrib/terminal/browser/terminalActions"; -import { KEYBINDING_CONTEXT_TERMINAL_FOCUS } from "vs/workbench/contrib/terminal/common/terminal"; -import { KeyCode, KeyMod } from "vs/base/common/keyCodes"; -import { workbench } from "../workbench"; - -// Intercept adding workbench actions so we can skip actions that won't work or -// modify actions that need different conditions, keybindings, etc. -const registry = Registry.as(Extensions.WorkbenchActions); -const originalRegister = registry.registerWorkbenchAction.bind(registry); -registry.registerWorkbenchAction = (descriptor: SyncActionDescriptor, alias: string, category?: string, when?: ContextKeyExpr): IDisposable => { - switch (descriptor.id) { - case ToggleDevToolsAction.ID: // There appears to be no way to toggle this programmatically. - logger.debug(`Skipping unsupported workbench action ${descriptor.id}`); - - return { - dispose: (): void => undefined, - }; - - case TerminalPasteAction.ID: // Modify the Windows keybinding and add our context key. - // tslint:disable-next-line no-any override private - (descriptor as any)._keybindings = { - primary: KeyMod.CtrlCmd | KeyCode.KEY_V, - linux: { primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KEY_V }, - win: { primary: KeyMod.CtrlCmd | KeyCode.KEY_V }, - mac: { primary: 0 }, - }; - // tslint:disable-next-line no-any override private - (descriptor as any)._keybindingContext = ContextKeyExpr.and(KEYBINDING_CONTEXT_TERMINAL_FOCUS, workbench.clipboardContextKey); - } - - return originalRegister(descriptor, alias, category, when); -}; diff --git a/packages/vscode/src/fill/workspacesService.ts b/packages/vscode/src/fill/workspacesService.ts deleted file mode 100644 index 3456aab5..00000000 --- a/packages/vscode/src/fill/workspacesService.ts +++ /dev/null @@ -1,40 +0,0 @@ -import { URI } from "vs/base/common/uri"; -import { IEnvironmentService } from "vs/platform/environment/common/environment"; -import { ILogService } from "vs/platform/log/common/log"; -import { IWorkspaceFolderCreationData, IWorkspaceIdentifier, IWorkspacesService } from "vs/platform/workspaces/common/workspaces"; -import { WorkspacesMainService } from "vs/platform/workspaces/electron-main/workspacesMainService"; -import * as workspacesIpc from "vs/platform/workspaces/node/workspacesIpc"; -import { workbench } from "../workbench"; - -/** - * Instead of going to the shared process, we'll directly run these methods on - * the client. This setup means we can only control the current window. - */ -class WorkspacesService implements IWorkspacesService { - // tslint:disable-next-line:no-any - public _serviceBrand: any; - - public createUntitledWorkspace(folders?: IWorkspaceFolderCreationData[] | undefined): Promise { - const mainService = new WorkspacesMainService( - workbench.serviceCollection.get(IEnvironmentService) as IEnvironmentService, - workbench.serviceCollection.get(ILogService) as ILogService, - ); - - // lib/vscode/src/vs/platform/workspaces/node/workspacesIpc.ts - const rawFolders: IWorkspaceFolderCreationData[] = folders!; - if (Array.isArray(rawFolders)) { - folders = rawFolders.map(rawFolder => { - return { - uri: URI.revive(rawFolder.uri), // convert raw URI back to real URI - name: rawFolder.name!, - } as IWorkspaceFolderCreationData; - }); - } - - return mainService.createUntitledWorkspace(folders); - } -} - -const target = workspacesIpc as typeof workspacesIpc; -// @ts-ignore TODO: don't ignore it. -target.WorkspacesChannelClient = WorkspacesService; diff --git a/packages/vscode/src/index.ts b/packages/vscode/src/index.ts deleted file mode 100644 index 5ec76921..00000000 --- a/packages/vscode/src/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "./client"; diff --git a/packages/vscode/src/vscode-coder.svg b/packages/vscode/src/vscode-coder.svg deleted file mode 100644 index d938d39e..00000000 --- a/packages/vscode/src/vscode-coder.svg +++ /dev/null @@ -1,120 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/vscode/src/vscode.scss b/packages/vscode/src/vscode.scss deleted file mode 100644 index 9b40371a..00000000 --- a/packages/vscode/src/vscode.scss +++ /dev/null @@ -1,59 +0,0 @@ -// These use -webkit-margin-before/after which don't work. -.monaco-workbench > .part > .title > .title-label h2, -.monaco-panel-view .panel > .panel-header h3.title { - margin-top: 0; - margin-bottom: 0; -} - -.monaco-icon-label > .monaco-icon-label-description-container { - margin-right: auto; -} - -.monaco-icon-label > .decorations-wrapper { - display: flex; - flex-direction: row; - padding-right: 12px; -} - -.monaco-icon-label::after { - margin-left: initial; -} - -// We don't have rating data. -.extension-ratings { - display: none !important; -} - -// Using @supports to keep the Firefox fixes completely separate from vscode's -// CSS that is tailored for Chrome. -@supports (-moz-appearance:none) { - // Fix buttons getting cut off on notifications. - .monaco-workbench .notifications-list-container .notification-list-item .notification-list-item-buttons-container .monaco-button.monaco-text-button { - max-width: 100%; - width: auto; - } - - .monaco-shell .screen-reader-detected-explanation .buttons a, - .monaco-workbench > .part.editor > .content .editor-group-container > .title .tabs-container > .tab.sizing-shrink, - .monaco-workbench .notifications-list-container .notification-list-item .notification-list-item-buttons-container .monaco-button { - max-width: -moz-fit-content; - } - - .monaco-workbench > .part.editor > .content .editor-group-container > .title .tabs-container > .tab.sizing-fit, - .explorer-viewlet .panel-header .count, - .extensions-viewlet > .extensions .extension > .details > .header-container > .header > .version, - .debug-viewlet .debug-call-stack .stack-frame .label { - min-width: -moz-fit-content; - } -} - -.window-appicon { - background-image: url(./vscode-coder.svg) !important; - background-size: 56px !important; - width: 56px !important; - margin-right: 4px; -} - -.window-controls-container { - display: none !important; -} \ No newline at end of file diff --git a/packages/vscode/src/workbench.ts b/packages/vscode/src/workbench.ts deleted file mode 100644 index c2499e87..00000000 --- a/packages/vscode/src/workbench.ts +++ /dev/null @@ -1,240 +0,0 @@ -import * as os from "os"; -import { IProgress, INotificationHandle } from "@coder/ide"; -import { logger } from "@coder/logger"; -import { client } from "./client"; - -import "./fill/platform"; -import "./fill/dom"; -import "./fill/codeEditor"; -import "./fill/environmentService"; -import "./fill/labels"; -import "./fill/menuRegistry"; -import "./fill/mouseEvent"; -import "./fill/storageDatabase"; -import "./fill/vscodeTextmate"; -import "./fill/windowsService"; -import "./fill/workbenchRegistry"; -import "./fill/workspacesService"; -import * as paths from "./fill/paths"; -import { PasteAction } from "./fill/paste"; - -import { ExplorerItem, ExplorerModel } from "vs/workbench/contrib/files/common/explorerModel"; -import { IEditorGroup } from "vs/workbench/services/editor/common/editorGroupsService"; -import { IEditorService, IResourceEditor } from "vs/workbench/services/editor/common/editorService"; -import { INotificationService } from "vs/platform/notification/common/notification"; -import { IProgressService2, ProgressLocation } from "vs/platform/progress/common/progress"; -import { ISingleFolderWorkspaceIdentifier, IWorkspaceIdentifier } from "vs/platform/workspaces/common/workspaces"; -import { IWindowsService, IWindowConfiguration } from "vs/platform/windows/common/windows"; -import { LogLevel } from "vs/platform/log/common/log"; -import { RawContextKey, IContextKeyService } from "vs/platform/contextkey/common/contextkey"; -import { ServiceCollection } from "vs/platform/instantiation/common/serviceCollection"; -import { URI } from "vs/base/common/uri"; - -/** - * Initializes VS Code and provides a way to call into general client - * functionality. - */ -export class Workbench { - public readonly retry = client.retry; - - private readonly windowId = parseInt(new Date().toISOString().replace(/[-:.TZ]/g, ""), 10); - private _serviceCollection: ServiceCollection | undefined; - private _clipboardContextKey: RawContextKey | undefined; - - /** - * Handle a drop event on the file explorer. - */ - public async handleExternalDrop(target: ExplorerItem | ExplorerModel, originalEvent: DragEvent): Promise { - await client.upload.uploadDropped( - originalEvent, - (target instanceof ExplorerItem ? target : target.roots[0]).resource, - ); - } - - /** - * Handle a drop event on the editor. - */ - public handleDrop(event: DragEvent, resolveTargetGroup: () => IEditorGroup, afterDrop: (targetGroup: IEditorGroup) => void, targetIndex?: number): void { - client.upload.uploadDropped(event, URI.file(paths.getWorkingDirectory())).then(async (paths) => { - const uris = paths.map((p) => URI.file(p)); - if (uris.length) { - await (this.serviceCollection.get(IWindowsService) as IWindowsService).addRecentlyOpened(uris); - } - - const editors: IResourceEditor[] = uris.map(uri => ({ - resource: uri, - options: { - pinned: true, - index: targetIndex, - }, - })); - - const targetGroup = resolveTargetGroup(); - await (this.serviceCollection.get(IEditorService) as IEditorService).openEditors(editors, targetGroup); - afterDrop(targetGroup); - }).catch((error) => { - logger.error(error.message); - }); - } - - /** - * Use to toggle the paste option inside editors based on the native clipboard. - */ - public get clipboardContextKey(): RawContextKey { - if (!this._clipboardContextKey) { - throw new Error("Trying to access clipboard context key before it has been set"); - } - - return this._clipboardContextKey; - } - - public get clipboardText(): Promise { - return client.clipboard.readText(); - } - - /** - * Create a paste action for use in text inputs. - */ - public get pasteAction(): PasteAction { - return new PasteAction(); - } - - public set workspace(ws: IWorkspaceIdentifier | ISingleFolderWorkspaceIdentifier | undefined) { - if (typeof ws === "undefined") { - window.localStorage.removeItem("workspace"); - } else { - window.localStorage.setItem("workspace", JSON.stringify(ws)); - } - - location.reload(); - } - - public get workspace(): undefined | IWorkspaceIdentifier | ISingleFolderWorkspaceIdentifier { - const ws = window.localStorage.getItem("workspace"); - try { - return JSON.parse(ws!); - } catch (ex) { - return undefined; - } - } - - public get serviceCollection(): ServiceCollection { - if (!this._serviceCollection) { - throw new Error("Trying to access service collection before it has been set"); - } - - return this._serviceCollection; - } - - public set serviceCollection(collection: ServiceCollection) { - this._serviceCollection = collection; - - const contextKeys = this.serviceCollection.get(IContextKeyService) as IContextKeyService; - const bounded = this.clipboardContextKey.bindTo(contextKeys); - client.clipboard.onPermissionChange((enabled) => { - bounded.set(enabled); - }); - client.clipboard.initialize(); - - client.progressService = { - start: (title: string, task: (progress: IProgress) => Promise, onCancel: () => void): Promise => { - let lastProgress = 0; - - return (this.serviceCollection.get(IProgressService2) as IProgressService2).withProgress({ - location: ProgressLocation.Notification, - title, - cancellable: true, - }, (progress) => { - return task({ - report: (p): void => { - progress.report({ increment: p - lastProgress }); - lastProgress = p; - }, - }); - }, () => { - onCancel(); - }); - }, - }; - - client.notificationService = { - error: (error: Error): void => (this.serviceCollection.get(INotificationService) as INotificationService).error(error), - prompt: (severity, message, buttons, onCancel): INotificationHandle => { - const handle = (this.serviceCollection.get(INotificationService) as INotificationService).prompt( - severity, message, buttons, { onCancel }, - ); - - return { - close: (): void => handle.close(), - updateMessage: (message): void => handle.updateMessage(message), - updateButtons: (buttons): void => handle.updateActions({ - primary: buttons.map((button) => ({ - id: "", - label: button.label, - tooltip: "", - class: undefined, - enabled: true, - checked: false, - radio: false, - dispose: (): void => undefined, - run: (): Promise => Promise.resolve(button.run()), - })), - }), - }; - }, - }; - } - - /** - * Start VS Code. - */ - public async initialize(): Promise { - this._clipboardContextKey = new RawContextKey("nativeClipboard", client.clipboard.isEnabled); - - const workspace = this.workspace || URI.file(paths.getWorkingDirectory()); - // If we try to import this above, workbench will be undefined due to - // circular imports. - require("vs/workbench/workbench.main"); - const { main } = require("vs/workbench/electron-browser/main"); - const config: IWindowConfiguration = { - machineId: "1", - windowId: this.windowId, - logLevel: LogLevel.Info, - mainPid: 1, - appRoot: paths.getDefaultUserDataPath(), - execPath: os.tmpdir(), - userEnv: {}, - nodeCachedDataDir: os.tmpdir(), - perfEntries: [], - _: [], - }; - if ((workspace as IWorkspaceIdentifier).configPath) { - // tslint:disable-next-line:no-any - let wid: IWorkspaceIdentifier = (Object).assign({}, workspace); - if (!URI.isUri(wid.configPath)) { - // Ensure that the configPath is a valid URI. - wid.configPath = URI.file(wid.configPath); - } - config.workspace = wid; - } else { - config.folderUri = workspace as URI; - } - try { - await main(config); - } catch (ex) { - if (ex.toString().indexOf("UriError") !== -1 || ex.toString().indexOf("backupPath") !== -1) { - /** - * Resolves the error of the workspace identifier being invalid. - */ - // tslint:disable-next-line:no-console - console.error(ex); - this.workspace = undefined; - location.reload(); - - return; - } - } - } -} - -export const workbench = new Workbench(); diff --git a/packages/vscode/test/test-extension.tar b/packages/vscode/test/test-extension.tar deleted file mode 100644 index bd1f69c3..00000000 Binary files a/packages/vscode/test/test-extension.tar and /dev/null differ diff --git a/packages/vscode/test/test-extension.vsix b/packages/vscode/test/test-extension.vsix deleted file mode 100644 index 3c133799..00000000 Binary files a/packages/vscode/test/test-extension.vsix and /dev/null differ diff --git a/packages/vscode/test/zip.test.ts b/packages/vscode/test/zip.test.ts deleted file mode 100644 index e7685dc4..00000000 --- a/packages/vscode/test/zip.test.ts +++ /dev/null @@ -1,59 +0,0 @@ -import * as zip from "../src/fill/zip"; -import * as path from "path"; -import * as fs from "fs"; -import * as cp from "child_process"; -import { CancellationToken } from "vs/base/common/cancellation"; - -// tslint:disable-next-line:no-any -jest.mock("vs/nls", () => ({ "localize": (...args: any): string => `${JSON.stringify(args)}` })); - -describe("zip", () => { - const tarPath = path.resolve(__dirname, "./test-extension.tar"); - const vsixPath = path.resolve(__dirname, "./test-extension.vsix"); - const extractPath = path.resolve(__dirname, "./.test-extension"); - - beforeEach(() => { - if (!fs.existsSync(extractPath) || path.dirname(extractPath) !== __dirname) { - return; - } - cp.execSync(`rm -rf '${extractPath}'`); - }); - - const resolveExtract = async (archivePath: string): Promise => { - expect(fs.existsSync(archivePath)).toEqual(true); - await expect(zip.extract( - archivePath, - extractPath, - { sourcePath: "extension", overwrite: true }, - CancellationToken.None, - )).resolves.toBe(undefined); - expect(fs.existsSync(extractPath)).toEqual(true); - }; - - // tslint:disable-next-line:no-any - const extract = (archivePath: string): () => any => { - // tslint:disable-next-line:no-any - return async (): Promise => { - await resolveExtract(archivePath); - expect(fs.existsSync(path.resolve(extractPath, ".vsixmanifest"))).toEqual(true); - expect(fs.existsSync(path.resolve(extractPath, "package.json"))).toEqual(true); - }; - }; - it("should extract from tarred VSIX", extract(tarPath), 2000); - it("should extract from zipped VSIX", extract(vsixPath), 2000); - - // tslint:disable-next-line:no-any - const buffer = (archivePath: string): () => any => { - // tslint:disable-next-line:no-any - return async (): Promise => { - await resolveExtract(archivePath); - const manifestPath = path.resolve(extractPath, ".vsixmanifest"); - expect(fs.existsSync(manifestPath)).toEqual(true); - const manifestBuf = fs.readFileSync(manifestPath); - expect(manifestBuf.length).toBeGreaterThan(0); - await expect(zip.buffer(archivePath, "extension.vsixmanifest")).resolves.toEqual(manifestBuf); - }; - }; - it("should buffer tarred VSIX", buffer(tarPath), 2000); - it("should buffer zipped VSIX", buffer(vsixPath), 2000); -}); diff --git a/packages/vscode/webpack.bootstrap.config.js b/packages/vscode/webpack.bootstrap.config.js deleted file mode 100644 index c3d667fa..00000000 --- a/packages/vscode/webpack.bootstrap.config.js +++ /dev/null @@ -1,78 +0,0 @@ -const path = require("path"); -const merge = require("webpack-merge"); - -const root = path.resolve(__dirname, "../.."); -const fills = path.join(root, "packages/ide/src/fill"); -const vsFills = path.join(root, "packages/vscode/src/fill"); - -module.exports = merge( - require(path.join(root, "scripts/webpack.node.config.js"))({ - dirname: __dirname, - typescriptCompilerOptions: { - target: "es6", - }, - }), { - entry: path.join(root, "lib/vscode/src/bootstrap-fork.js"), - mode: "development", - output: { - chunkFilename: "[name].bundle.js", - publicPath: "/", - filename: "bootstrap-fork.js", - libraryTarget: "commonjs", - globalObject: "this", - }, - // Due to the dynamic `require.context` we add to `loader.js` Webpack tries - // to include way too much. We can modify what Webpack imports in this case - // (I believe), but for now ignore some things. - module: { - rules: [{ - test: /\.(txt|d\.ts|perf\.data\.js|jxs|scpt|exe|sh|less|html|s?css|qwoff|md|svg|png|ttf|woff|eot|woff2)$/, - use: [{ - loader: "ignore-loader", - }], - }, { - test: /test|tsconfig/, - use: [{ - loader: "ignore-loader", - }], - }, { - // The only thing we need in electron-browser is the shared process (including contrib). - test: /((\\|\/)vs(\\|\/)code(\\|\/)electron-main(\\|\/))|((\\|\/)test(\\|\/))|(OSSREADME\.json$)|\/browser\/|\/electron-browser\/(?!sharedProcess\/).+\//, - use: [{ - loader: "ignore-loader", - }], - }], - noParse: /(\\|\/)test(\\|\/)|\.test\.jsx?|\.test\.tsx?|tsconfig.+\.json$/, - }, - resolve: { - alias: { - "gc-signals": path.join(fills, "empty.ts"), - "node-pty": path.resolve(fills, "empty.ts"), - "windows-mutex": path.resolve(fills, "empty.ts"), - "windows-process-tree": path.resolve(fills, "empty.ts"), - "vscode-windows-registry": path.resolve(fills, "empty.ts"), - "vscode-windows-ca-certs": path.resolve(fills, "empty.ts"), - "vscode-sqlite3": path.resolve(fills, "empty.ts"), - "vs/base/browser/browser": path.resolve(fills, "empty.ts"), - - "applicationinsights": path.join(vsFills, "applicationInsights.ts"), - "electron": path.join(vsFills, "stdioElectron.ts"), - "vscode-ripgrep": path.join(vsFills, "ripgrep.ts"), - "native-keymap": path.join(vsFills, "native-keymap.ts"), - "native-watchdog": path.join(vsFills, "native-watchdog.ts"), - "vs/base/common/amd": path.resolve(vsFills, "amd.ts"), - "vs/base/node/paths": path.join(vsFills, "paths.ts"), - "vs/platform/product/node/package": path.resolve(vsFills, "package.ts"), - "vs/platform/product/node/product": path.resolve(vsFills, "product.ts"), - "vs/base/node/zip": path.resolve(vsFills, "zip.ts"), - "vszip": path.resolve(root, "lib/vscode/src/vs/base/node/zip.ts"), - "vs": path.resolve(root, "lib/vscode/src/vs"), - }, - }, - resolveLoader: { - alias: { - "vs/css": path.resolve(vsFills, "css.js"), - }, - }, - } -); diff --git a/packages/vscode/yarn.lock b/packages/vscode/yarn.lock deleted file mode 100644 index 635b9297..00000000 --- a/packages/vscode/yarn.lock +++ /dev/null @@ -1,233 +0,0 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. -# yarn lockfile v1 - - -"@types/node@*": - version "11.9.6" - resolved "https://registry.yarnpkg.com/@types/node/-/node-11.9.6.tgz#c632bbcc780a1349673a6e2e9b9dfa8c369d3c74" - integrity sha512-4hS2K4gwo9/aXIcoYxCtHpdgd8XUeDmo1siRCAH3RziXB65JlPqUFMtfy9VPj+og7dp3w1TFjGwYga4e0m9GwA== - -"@types/tar-stream@^1.6.0": - version "1.6.0" - resolved "https://registry.yarnpkg.com/@types/tar-stream/-/tar-stream-1.6.0.tgz#e19893886625c4ec1c7c30a353b8dc10e205c742" - integrity sha512-XG7FGVmxUvC5NW4h63K3PbB0xdC21xZBfoqmEz7YP2DdiTeYKmYAg8quSHMndNP3iXfs7C73rg4Q0W1dOPHBXQ== - dependencies: - "@types/node" "*" - -ajv-keywords@^3.1.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-3.2.0.tgz#e86b819c602cf8821ad637413698f1dec021847a" - integrity sha1-6GuBnGAs+IIa1jdBNpjx3sAhhHo= - -ajv@^6.1.0: - version "6.7.0" - resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.7.0.tgz#e3ce7bb372d6577bb1839f1dfdfcbf5ad2948d96" - integrity sha512-RZXPviBTtfmtka9n9sy1N5M5b82CbxWIR6HIis4s3WQTXDJamc/0gpCWNGz6EWdWp4DOfjzJfhz/AS9zVPjjWg== - dependencies: - fast-deep-equal "^2.0.1" - fast-json-stable-stringify "^2.0.0" - json-schema-traverse "^0.4.1" - uri-js "^4.2.2" - -big.js@^5.2.2: - version "5.2.2" - resolved "https://registry.yarnpkg.com/big.js/-/big.js-5.2.2.tgz#65f0af382f578bcdc742bd9c281e9cb2d7768328" - integrity sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ== - -bl@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/bl/-/bl-3.0.0.tgz#3611ec00579fd18561754360b21e9f784500ff88" - integrity sha512-EUAyP5UHU5hxF8BPT0LKW8gjYLhq1DQIcneOX/pL/m2Alo+OYDQAJlHq+yseMP50Os2nHXOSic6Ss3vSQeyf4A== - dependencies: - readable-stream "^3.0.1" - -emojis-list@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/emojis-list/-/emojis-list-2.1.0.tgz#4daa4d9db00f9819880c79fa457ae5b09a1fd389" - integrity sha1-TapNnbAPmBmIDHn6RXrlsJof04k= - -end-of-stream@^1.4.1: - version "1.4.1" - resolved "https://registry.yarnpkg.com/end-of-stream/-/end-of-stream-1.4.1.tgz#ed29634d19baba463b6ce6b80a37213eab71ec43" - integrity sha512-1MkrZNvWTKCaigbn+W15elq2BB/L22nqrSY5DKlo3X6+vclJm8Bb5djXJBmEX6fS3+zCh/F4VBK5Z2KxJt4s2Q== - dependencies: - once "^1.4.0" - -fast-deep-equal@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz#7b05218ddf9667bf7f370bf7fdb2cb15fdd0aa49" - integrity sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk= - -fast-json-stable-stringify@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz#d5142c0caee6b1189f87d3a76111064f86c8bbf2" - integrity sha1-1RQsDK7msRifh9OnYREGT4bIu/I= - -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== - -iconv-lite@^0.4.24: - version "0.4.24" - resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b" - integrity sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA== - dependencies: - safer-buffer ">= 2.1.2 < 3" - -inherits@^2.0.3: - version "2.0.3" - resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" - integrity sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4= - -json-schema-traverse@^0.4.1: - version "0.4.1" - resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660" - integrity sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg== - -json5@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/json5/-/json5-1.0.1.tgz#779fb0018604fa854eacbf6252180d83543e3dbe" - integrity sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow== - dependencies: - minimist "^1.2.0" - -loader-utils@^1.1.0: - version "1.2.3" - resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-1.2.3.tgz#1ff5dc6911c9f0a062531a4c04b609406108c2c7" - integrity sha512-fkpz8ejdnEMG3s37wGL07iSBDg99O9D5yflE9RGNH3hRdx9SOwYfnGYdZOUIZitN8E+E2vkq3MUMYMvPYl5ZZA== - dependencies: - big.js "^5.2.2" - emojis-list "^2.0.0" - json5 "^1.0.1" - -lru-cache@^4.1.1: - version "4.1.5" - resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-4.1.5.tgz#8bbe50ea85bed59bc9e33dcab8235ee9bcf443cd" - integrity sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g== - dependencies: - pseudomap "^1.0.2" - yallist "^2.1.2" - -minimist@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284" - integrity sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ= - -nan@^2.10.0: - version "2.12.1" - resolved "https://registry.yarnpkg.com/nan/-/nan-2.12.1.tgz#7b1aa193e9aa86057e3c7bbd0ac448e770925552" - integrity sha512-JY7V6lRkStKcKTvHO5NVSQRv+RV+FIL5pvDoLiAtSL9pKlC5x9PKQcZDsq7m4FO4d57mkhC6Z+QhAh3Jdk5JFw== - -once@^1.4.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" - integrity sha1-WDsap3WWHUsROsF9nFC6753Xa9E= - dependencies: - wrappy "1" - -onigasm@^2.2.1: - version "2.2.1" - resolved "https://registry.yarnpkg.com/onigasm/-/onigasm-2.2.1.tgz#d56da809d63d3bb25510e8b8e447ffe98e56bebb" - integrity sha512-pa361CpVfsWOk0MQ1jLuJ1GvEJMHEHgZmaBpOIfBbvbp2crkDHacXB6mA4vgEfO7fL0OEMUSuZjX0Q9yTx6jTg== - dependencies: - lru-cache "^4.1.1" - -oniguruma@^7.0.0: - version "7.0.2" - resolved "https://registry.yarnpkg.com/oniguruma/-/oniguruma-7.0.2.tgz#a5c922cf7066da1dbcc60f6385a90437a83f8d0b" - integrity sha512-zCsdNxTrrB4yVPMxhcIODGv1p4NVBu9WvsWnIGhMpu5djO4MQWXrC7YKjtza+OyoRqqgy27CqYWa1h5e2DDbig== - dependencies: - nan "^2.10.0" - -pseudomap@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/pseudomap/-/pseudomap-1.0.2.tgz#f052a28da70e618917ef0a8ac34c1ae5a68286b3" - integrity sha1-8FKijacOYYkX7wqKw0wa5aaChrM= - -punycode@^2.1.0: - version "2.1.1" - resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec" - integrity sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A== - -readable-stream@^3.0.1, readable-stream@^3.1.1: - version "3.2.0" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.2.0.tgz#de17f229864c120a9f56945756e4f32c4045245d" - integrity sha512-RV20kLjdmpZuTF1INEb9IA3L68Nmi+Ri7ppZqo78wj//Pn62fCoJyV9zalccNzDD/OuJpMG4f+pfMl8+L6QdGw== - dependencies: - inherits "^2.0.3" - string_decoder "^1.1.1" - util-deprecate "^1.0.1" - -safe-buffer@~5.1.0: - version "5.1.2" - resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" - integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== - -"safer-buffer@>= 2.1.2 < 3": - version "2.1.2" - resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" - integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== - -schema-utils@^0.4.5: - version "0.4.7" - resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-0.4.7.tgz#ba74f597d2be2ea880131746ee17d0a093c68187" - integrity sha512-v/iwU6wvwGK8HbU9yi3/nhGzP0yGSuhQMzL6ySiec1FSrZZDkhm4noOSWzrNFo/jEc+SJY6jRTwuwbSXJPDUnQ== - dependencies: - ajv "^6.1.0" - ajv-keywords "^3.1.0" - -string-replace-loader@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/string-replace-loader/-/string-replace-loader-2.1.1.tgz#b72e7b57b6ef04efe615aff0ad989b5c14ca63d1" - integrity sha512-0Nvw1LDclF45AFNuYPcD2Jvkv0mwb/dQSnJZMvhqGrT+zzmrpG3OJFD600qfQfNUd5aqfp7fCm2mQMfF7zLbyQ== - dependencies: - loader-utils "^1.1.0" - schema-utils "^0.4.5" - -string_decoder@^1.1.1: - version "1.2.0" - resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.2.0.tgz#fe86e738b19544afe70469243b2a1ee9240eae8d" - integrity sha512-6YqyX6ZWEYguAxgZzHGL7SsCeGx3V2TtOTqZz1xSTSWnqsbWwbptafNyvf/ACquZUXV3DANr5BDIwNYe1mN42w== - dependencies: - safe-buffer "~5.1.0" - -tar-stream@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/tar-stream/-/tar-stream-2.0.1.tgz#42fbe41cd1cc5e6657c813e7d98e7afca2858a8c" - integrity sha512-I6OJF7wE62BC6zNPdHDtseK0D0187PBjbKSLYY4ffvVkBM6tyBn2O9plDvVM2229/mozfEL/X3++qSvYYQE2xw== - dependencies: - bl "^3.0.0" - end-of-stream "^1.4.1" - fs-constants "^1.0.0" - inherits "^2.0.3" - readable-stream "^3.1.1" - -uri-js@^4.2.2: - version "4.2.2" - resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.2.2.tgz#94c540e1ff772956e2299507c010aea6c8838eb0" - integrity sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ== - dependencies: - punycode "^2.1.0" - -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= - -vscode-textmate@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/vscode-textmate/-/vscode-textmate-4.0.1.tgz#6c36f28e9059ce12bc34907f7a33ea43166b26a8" - integrity sha512-gHTXTj04TUgbjB8y7pkVwxOiuCuD6aU5gnFzIByQuqdgFpe/bJaaEIS4geGjbjWbd1XJh6zG1EthLfpNaXEqUw== - dependencies: - oniguruma "^7.0.0" - -wrappy@1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" - integrity sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8= - -yallist@^2.1.2: - version "2.1.2" - resolved "https://registry.yarnpkg.com/yallist/-/yallist-2.1.2.tgz#1c11f9218f076089a47dd512f93c6699a6a81d52" - integrity sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI= diff --git a/packages/web/.gitignore b/packages/web/.gitignore deleted file mode 100644 index c585e193..00000000 --- a/packages/web/.gitignore +++ /dev/null @@ -1 +0,0 @@ -out \ No newline at end of file diff --git a/packages/web/assets/logo.png b/packages/web/assets/logo.png deleted file mode 100644 index c0f9acf0..00000000 Binary files a/packages/web/assets/logo.png and /dev/null differ diff --git a/packages/web/package.json b/packages/web/package.json deleted file mode 100644 index e823d817..00000000 --- a/packages/web/package.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "name": "@coder/web", - "scripts": { - "build": "../../node_modules/.bin/cross-env UV_THREADPOOL_SIZE=100 node --max-old-space-size=32384 ../../node_modules/webpack/bin/webpack.js --config ./webpack.config.js" - } -} diff --git a/packages/web/src/index.html b/packages/web/src/index.html deleted file mode 100644 index 7928be13..00000000 --- a/packages/web/src/index.html +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - code-server - - - - - - diff --git a/packages/web/src/index.scss b/packages/web/src/index.scss deleted file mode 100644 index 87924a46..00000000 --- a/packages/web/src/index.scss +++ /dev/null @@ -1,152 +0,0 @@ -html, body { - height: 100%; - margin: 0; - width: 100%; -} - -#overlay { - background: rgba(0, 0, 0, 0.2); - bottom: 0; - left: 0; - position: absolute; - right: 0; - top: 0; -} - -#overlay { - align-items: center; - background-color: #252526; - bottom: 0; - display: flex; - flex-direction: column; - font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif; - justify-content: center; - left: 0; - opacity: 1; - position: absolute; - right: 0; - top: 0; - transition: 150ms opacity ease; - z-index: 2; -} - -#overlay > .message { - color: white; - margin-top: 10px; - opacity: 0.5; -} - -#overlay.error > .message { - color: white; - opacity: 0.3; -} - -#overlay > .activitybar { - background-color: rgb(44, 44, 44); - bottom: 0; - height: 100%; - left: 0; - position: absolute; - top: 0; - width: 50px; -} - -#overlay > .activitybar svg { - fill: white; - margin-left: 2px; - margin-top: 2px; - opacity: 0.3; -} - -#overlay.error > #status { - opacity: 0; -} - -#overlay>.statusbar { - background-color: rgb(0, 122, 204); - bottom: 0; - cursor: default; - height: 22px; - left: 0; - position: absolute; - right: 0; -} - -#logo { - transform-style: preserve-3d; -} - -#logo > svg { - fill: rgb(0, 122, 204); - opacity: 1; - width: 100px; -} - -#status { - background: rgba(255, 255, 255, 0.1); - border-radius: 5px; - box-shadow: 0px 2px 10px -2px rgba(0, 0, 0, 0.75); - color: white; - font-size: 0.9em; - margin-top: 15px; - min-width: 100px; - position: relative; - transition: 300ms opacity ease; -} - -#progress { - background: rgba(0, 0, 0, 0.2); - border-bottom-left-radius: 5px; - border-bottom-right-radius: 5px; - bottom: 0; - height: 3px; - left: 0; - overflow: hidden; - position: absolute; - right: 0; -} - -@-moz-keyframes statusProgress { - 0% { - background-position: 0% 50% - } - - 50% { - background-position: 100% 50% - } - - 100% { - background-position: 0% 50% - } -} - -@keyframes statusProgress { - 0% { - background-position: 0% 50% - } - - 50% { - background-position: 100% 50% - } - - 100% { - background-position: 0% 50% - } -} - -#fill { - animation: statusProgress 2s ease infinite; - background-size: 400% 400%; - background: linear-gradient(270deg, #007acc, #0016cc); - height: 100%; - transition: 500ms width ease; - width: 0%; -} - -.reload-button { - background-color: #007acc; - border-radius: 2px; - cursor: pointer; - margin-top: 10px; - padding: 6px 10px; -} diff --git a/packages/web/src/index.ts b/packages/web/src/index.ts deleted file mode 100644 index 6dea3165..00000000 --- a/packages/web/src/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -import "./index.scss"; -import "@coder/vscode"; diff --git a/packages/web/webpack.config.js b/packages/web/webpack.config.js deleted file mode 100644 index 7d312035..00000000 --- a/packages/web/webpack.config.js +++ /dev/null @@ -1,85 +0,0 @@ -const path = require("path"); -const merge = require("webpack-merge"); - -const root = path.resolve(__dirname, "../.."); -const fills = path.join(root, "packages/ide/src/fill"); -const vsFills = path.join(root, "packages/vscode/src/fill"); - -module.exports = merge( - require(path.join(root, "scripts/webpack.client.config.js"))({ - dirname: __dirname, - entry: path.join(root, "packages/web/src/index.ts"), - name: "ide", - template: path.join(root, "packages/web/src/index.html"), - typescriptCompilerOptions: { - "target": "es5", - "lib": ["dom", "esnext"], - }, - }, -), { - node: { - module: "empty", - crypto: "empty", - tls: "empty", - }, - resolve: { - alias: { - "gc-signals": path.join(fills, "empty.ts"), - "selenium-webdriver": path.join(fills, "empty.ts"), - "vscode": path.join(fills, "empty.ts"), - "vscode-fsevents": path.join(fills, "empty.ts"), - "vscode-windows-registry": path.resolve(fills, "empty.ts"), - "vsda": path.join(fills, "empty.ts"), - "windows-foreground-love": path.join(fills, "empty.ts"), - "windows-mutex": path.join(fills, "empty.ts"), - "windows-process-tree": path.join(fills, "empty.ts"), - "vscode-sqlite3": path.join(fills, "empty.ts"), - "tls": path.join(fills, "empty.ts"), - "native-is-elevated": path.join(fills, "empty.ts"), - "dns": path.join(fills, "empty.ts"), - "console": path.join(fills, "empty.ts"), - "readline": path.join(fills, "empty.ts"), - "oniguruma": path.join(fills, "empty.ts"), - - // Webpack includes path-browserify but not the latest version, so - // path.posix and path.parse are undefined (among other things possibly). - // Also if we don't provide the full path, the code in vscode will import - // from vscode's node_modules which is the wrong version. - "path": path.join(fills, "path.js"), - "crypto": "crypto-browserify", - "http": "http-browserify", - - "child_process": path.join(fills, "child_process.ts"), - "os": path.join(fills, "os.ts"), - "fs": path.join(fills, "fs.ts"), - "net": path.join(fills, "net.ts"), - "util": path.join(fills, "util.ts"), - "trash": path.join(fills, "trash.ts"), - "electron": path.join(fills, "electron.ts"), - - "native-keymap": path.join(vsFills, "native-keymap.ts"), - "node-pty": path.join(vsFills, "node-pty.ts"), - "graceful-fs": path.join(vsFills, "graceful-fs.ts"), - "spdlog": path.join(vsFills, "spdlog.ts"), - "native-watchdog": path.join(vsFills, "native-watchdog.ts"), - "iconv-lite": path.join(vsFills, "iconv-lite.ts"), - - // This seems to be in the wrong place? - "vs/workbench/contrib/codeEditor/electron-browser/media/WordWrap_16x.svg": "vs/workbench/contrib/codeEditor/browser/suggestEnabledInput/WordWrap_16x.svg", - - "vs/platform/windows/electron-browser/windowsService": path.join(vsFills, "windowsService.ts"), - "vs/base/node/paths": path.join(vsFills, "paths.ts"), - "vs/base/common/amd": path.join(vsFills, "amd.ts"), - "vs/platform/product/node/package": path.resolve(vsFills, "package.ts"), - "vs/platform/product/node/product": path.resolve(vsFills, "product.ts"), - "vs/base/node/zip": path.resolve(vsFills, "zip.ts"), - "vszip": path.resolve(root, "lib/vscode/src/vs/base/node/zip.ts"), - "vs": path.join(root, "lib", "vscode", "src", "vs"), - }, - }, - resolveLoader: { - alias: { - "vs/css": path.join(vsFills, "css.js"), - }, - }, -}); diff --git a/packages/web/yarn.lock b/packages/web/yarn.lock deleted file mode 100644 index fb57ccd1..00000000 --- a/packages/web/yarn.lock +++ /dev/null @@ -1,4 +0,0 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. -# yarn lockfile v1 - - diff --git a/packages/yarn.lock b/packages/yarn.lock deleted file mode 100644 index 1e60eae3..00000000 --- a/packages/yarn.lock +++ /dev/null @@ -1,3692 +0,0 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. -# yarn lockfile v1 - - -"@babel/code-frame@^7.0.0-beta.35": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.0.0.tgz#06e2ab19bdb535385559aabb5ba59729482800f8" - integrity sha512-OfC2uemaknXr87bdLUkWog7nYuliM9Ij5HUcajsVcMCpQrcLmtxRbVFTIqmcSkSeYRBFBRxs2FiUqFJDLdiebA== - dependencies: - "@babel/highlight" "^7.0.0" - -"@babel/highlight@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.0.0.tgz#f710c38c8d458e6dd9a201afb637fcb781ce99e4" - integrity sha512-UFMC4ZeFC48Tpvj7C8UgLvtkaUuovQX+5xNWrsIoMG8o2z+XFKjKaN9iVmS84dPwVN00W4wPmqvYoZF3EGAsfw== - dependencies: - chalk "^2.0.0" - esutils "^2.0.2" - js-tokens "^4.0.0" - -"@types/jest@^23.3.12": - version "23.3.12" - resolved "https://registry.yarnpkg.com/@types/jest/-/jest-23.3.12.tgz#7e0ced251fa94c3bc2d1023d4b84b2992fa06376" - integrity sha512-/kQvbVzdEpOq4tEWT79yAHSM4nH4xMlhJv2GrLVQt4Qmo8yYsPdioBM1QpN/2GX1wkfMnyXvdoftvLUr0LBj7Q== - -abab@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/abab/-/abab-2.0.0.tgz#aba0ab4c5eee2d4c79d3487d85450fb2376ebb0f" - integrity sha512-sY5AXXVZv4Y1VACTtR11UJCPHHudgY5i26Qj5TypE6DKlIApbwb5uqhXcJ5UUGbvZNRh7EeIoW+LrJumBsKp7w== - -abbrev@1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.1.tgz#f8f2c887ad10bf67f634f005b6987fed3179aac8" - integrity sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q== - -acorn-globals@^4.1.0: - version "4.3.0" - resolved "https://registry.yarnpkg.com/acorn-globals/-/acorn-globals-4.3.0.tgz#e3b6f8da3c1552a95ae627571f7dd6923bb54103" - integrity sha512-hMtHj3s5RnuhvHPowpBYvJVj3rAar82JiDQHvGs1zO0l10ocX/xEdBShNHTJaboucJUsScghp74pH3s7EnHHQw== - dependencies: - acorn "^6.0.1" - acorn-walk "^6.0.1" - -acorn-walk@^6.0.1: - version "6.1.1" - resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-6.1.1.tgz#d363b66f5fac5f018ff9c3a1e7b6f8e310cc3913" - integrity sha512-OtUw6JUTgxA2QoqqmrmQ7F2NYqiBPi/L2jqHyFtllhOUvXYQXf0Z1CYUinIfyT4bTCGmrA7gX9FvHA81uzCoVw== - -acorn@^5.5.3: - version "5.7.3" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-5.7.3.tgz#67aa231bf8812974b85235a96771eb6bd07ea279" - integrity sha512-T/zvzYRfbVojPWahDsE5evJdHb3oJoQfFbsrKM7w5Zcs++Tr257tia3BmMP8XYVjp1S9RZXQMh7gao96BlqZOw== - -acorn@^6.0.1: - version "6.0.5" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-6.0.5.tgz#81730c0815f3f3b34d8efa95cb7430965f4d887a" - integrity sha512-i33Zgp3XWtmZBMNvCr4azvOFeWVw1Rk6p3hfi3LUDvIFraOMywb1kAtrbi+med14m4Xfpqm3zRZMT+c0FNE7kg== - -ajv@^6.5.5: - version "6.6.2" - resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.6.2.tgz#caceccf474bf3fc3ce3b147443711a24063cc30d" - integrity sha512-FBHEW6Jf5TB9MGBgUUA9XHkTbjXYfAUjY43ACMfmdMRHniyoMHjHjzD50OK8LGDWQwp4rWEsIq5kEqq7rvIM1g== - dependencies: - fast-deep-equal "^2.0.1" - fast-json-stable-stringify "^2.0.0" - json-schema-traverse "^0.4.1" - uri-js "^4.2.2" - -ansi-escapes@^3.0.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-3.1.0.tgz#f73207bb81207d75fd6c83f125af26eea378ca30" - integrity sha512-UgAb8H9D41AQnu/PbWlCofQVcnV4Gs2bBJi9eZPxfU/hgglFh3SMDMENRIqdr7H6XFnXdoknctFByVsCOotTVw== - -ansi-regex@^2.0.0: - version "2.1.1" - resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df" - integrity sha1-w7M6te42DYbg5ijwRorn7yfWVN8= - -ansi-regex@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-3.0.0.tgz#ed0317c322064f79466c02966bddb605ab37d998" - integrity sha1-7QMXwyIGT3lGbAKWa922Bas32Zg= - -ansi-styles@^2.2.1: - version "2.2.1" - resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe" - integrity sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4= - -ansi-styles@^3.2.0, ansi-styles@^3.2.1: - version "3.2.1" - resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d" - integrity sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA== - dependencies: - color-convert "^1.9.0" - -anymatch@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-2.0.0.tgz#bcb24b4f37934d9aa7ac17b4adaf89e7c76ef2eb" - integrity sha512-5teOsQWABXHHBFP9y3skS5P3d/WfWXpv3FUpy+LorMrNYaT9pI4oLMQX7jzQ2KklNpGpWHzdCXTDT2Y3XGlZBw== - dependencies: - micromatch "^3.1.4" - normalize-path "^2.1.1" - -append-transform@^0.4.0: - version "0.4.0" - resolved "https://registry.yarnpkg.com/append-transform/-/append-transform-0.4.0.tgz#d76ebf8ca94d276e247a36bad44a4b74ab611991" - integrity sha1-126/jKlNJ24keja61EpLdKthGZE= - dependencies: - default-require-extensions "^1.0.0" - -aproba@^1.0.3: - version "1.2.0" - resolved "https://registry.yarnpkg.com/aproba/-/aproba-1.2.0.tgz#6802e6264efd18c790a1b0d517f0f2627bf2c94a" - integrity sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw== - -are-we-there-yet@~1.1.2: - version "1.1.5" - resolved "https://registry.yarnpkg.com/are-we-there-yet/-/are-we-there-yet-1.1.5.tgz#4b35c2944f062a8bfcda66410760350fe9ddfc21" - integrity sha512-5hYdAkZlcG8tOLujVDTgCT+uPX0VnpAH28gWsLfzpXYm7wP6mp5Q/gYyR7YQ0cKVJcXJnl3j2kpBan13PtQf6w== - dependencies: - delegates "^1.0.0" - readable-stream "^2.0.6" - -argparse@^1.0.7: - version "1.0.10" - resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911" - integrity sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg== - dependencies: - sprintf-js "~1.0.2" - -arr-diff@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/arr-diff/-/arr-diff-2.0.0.tgz#8f3b827f955a8bd669697e4a4256ac3ceae356cf" - integrity sha1-jzuCf5Vai9ZpaX5KQlasPOrjVs8= - dependencies: - arr-flatten "^1.0.1" - -arr-diff@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/arr-diff/-/arr-diff-4.0.0.tgz#d6461074febfec71e7e15235761a329a5dc7c520" - integrity sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA= - -arr-flatten@^1.0.1, arr-flatten@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/arr-flatten/-/arr-flatten-1.1.0.tgz#36048bbff4e7b47e136644316c99669ea5ae91f1" - integrity sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg== - -arr-union@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/arr-union/-/arr-union-3.1.0.tgz#e39b09aea9def866a8f206e288af63919bae39c4" - integrity sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ= - -array-equal@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/array-equal/-/array-equal-1.0.0.tgz#8c2a5ef2472fd9ea742b04c77a75093ba2757c93" - integrity sha1-jCpe8kcv2ep0KwTHenUJO6J1fJM= - -array-unique@^0.2.1: - version "0.2.1" - resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.2.1.tgz#a1d97ccafcbc2625cc70fadceb36a50c58b01a53" - integrity sha1-odl8yvy8JiXMcPrc6zalDFiwGlM= - -array-unique@^0.3.2: - version "0.3.2" - resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.3.2.tgz#a894b75d4bc4f6cd679ef3244a9fd8f46ae2d428" - integrity sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg= - -arrify@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/arrify/-/arrify-1.0.1.tgz#898508da2226f380df904728456849c1501a4b0d" - integrity sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0= - -asn1@~0.2.3: - version "0.2.4" - resolved "https://registry.yarnpkg.com/asn1/-/asn1-0.2.4.tgz#8d2475dfab553bb33e77b54e59e880bb8ce23136" - integrity sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg== - dependencies: - safer-buffer "~2.1.0" - -assert-plus@1.0.0, assert-plus@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-1.0.0.tgz#f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525" - integrity sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU= - -assign-symbols@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/assign-symbols/-/assign-symbols-1.0.0.tgz#59667f41fadd4f20ccbc2bb96b8d4f7f78ec0367" - integrity sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c= - -astral-regex@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/astral-regex/-/astral-regex-1.0.0.tgz#6c8c3fb827dd43ee3918f27b82782ab7658a6fd9" - integrity sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg== - -async-limiter@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/async-limiter/-/async-limiter-1.0.0.tgz#78faed8c3d074ab81f22b4e985d79e8738f720f8" - integrity sha512-jp/uFnooOiO+L211eZOoSyzpOITMXx1rBITauYykG3BRYPu8h0UcxsPNB04RR5vo4Tyz3+ay17tR6JVf9qzYWg== - -async@^2.1.4, async@^2.5.0: - version "2.6.1" - resolved "https://registry.yarnpkg.com/async/-/async-2.6.1.tgz#b245a23ca71930044ec53fa46aa00a3e87c6a610" - integrity sha512-fNEiL2+AZt6AlAw/29Cr0UDe4sRAHCpEHh54WMz+Bb7QfNcFw4h3loofyJpLeQs4Yx7yuqu/2dLgM5hKOs6HlQ== - dependencies: - lodash "^4.17.10" - -asynckit@^0.4.0: - version "0.4.0" - resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" - integrity sha1-x57Zf380y48robyXkLzDZkdLS3k= - -atob@^2.1.1: - version "2.1.2" - resolved "https://registry.yarnpkg.com/atob/-/atob-2.1.2.tgz#6d9517eb9e030d2436666651e86bd9f6f13533c9" - integrity sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg== - -aws-sign2@~0.7.0: - version "0.7.0" - resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.7.0.tgz#b46e890934a9591f2d2f6f86d7e6a9f1b3fe76a8" - integrity sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg= - -aws4@^1.8.0: - version "1.8.0" - resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.8.0.tgz#f0e003d9ca9e7f59c7a508945d7b2ef9a04a542f" - integrity sha512-ReZxvNHIOv88FlT7rxcXIIC0fPt4KZqZbOlivyWtXLt8ESx84zd3kMC6iK5jVeS2qt+g7ftS7ye4fi06X5rtRQ== - -babel-code-frame@^6.26.0: - version "6.26.0" - resolved "https://registry.yarnpkg.com/babel-code-frame/-/babel-code-frame-6.26.0.tgz#63fd43f7dc1e3bb7ce35947db8fe369a3f58c74b" - integrity sha1-Y/1D99weO7fONZR9uP42mj9Yx0s= - dependencies: - chalk "^1.1.3" - esutils "^2.0.2" - js-tokens "^3.0.2" - -babel-core@^6.0.0, babel-core@^6.26.0: - version "6.26.3" - resolved "https://registry.yarnpkg.com/babel-core/-/babel-core-6.26.3.tgz#b2e2f09e342d0f0c88e2f02e067794125e75c207" - integrity sha512-6jyFLuDmeidKmUEb3NM+/yawG0M2bDZ9Z1qbZP59cyHLz8kYGKYwpJP0UwUKKUiTRNvxfLesJnTedqczP7cTDA== - dependencies: - babel-code-frame "^6.26.0" - babel-generator "^6.26.0" - babel-helpers "^6.24.1" - babel-messages "^6.23.0" - babel-register "^6.26.0" - babel-runtime "^6.26.0" - babel-template "^6.26.0" - babel-traverse "^6.26.0" - babel-types "^6.26.0" - babylon "^6.18.0" - convert-source-map "^1.5.1" - debug "^2.6.9" - json5 "^0.5.1" - lodash "^4.17.4" - minimatch "^3.0.4" - path-is-absolute "^1.0.1" - private "^0.1.8" - slash "^1.0.0" - source-map "^0.5.7" - -babel-generator@^6.18.0, babel-generator@^6.26.0: - version "6.26.1" - resolved "https://registry.yarnpkg.com/babel-generator/-/babel-generator-6.26.1.tgz#1844408d3b8f0d35a404ea7ac180f087a601bd90" - integrity sha512-HyfwY6ApZj7BYTcJURpM5tznulaBvyio7/0d4zFOeMPUmfxkCjHocCuoLa2SAGzBI8AREcH3eP3758F672DppA== - dependencies: - babel-messages "^6.23.0" - babel-runtime "^6.26.0" - babel-types "^6.26.0" - detect-indent "^4.0.0" - jsesc "^1.3.0" - lodash "^4.17.4" - source-map "^0.5.7" - trim-right "^1.0.1" - -babel-helpers@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-helpers/-/babel-helpers-6.24.1.tgz#3471de9caec388e5c850e597e58a26ddf37602b2" - integrity sha1-NHHenK7DiOXIUOWX5Yom3fN2ArI= - dependencies: - babel-runtime "^6.22.0" - babel-template "^6.24.1" - -babel-jest@^23.6.0: - version "23.6.0" - resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-23.6.0.tgz#a644232366557a2240a0c083da6b25786185a2f1" - integrity sha512-lqKGG6LYXYu+DQh/slrQ8nxXQkEkhugdXsU6St7GmhVS7Ilc/22ArwqXNJrf0QaOBjZB0360qZMwXqDYQHXaew== - dependencies: - babel-plugin-istanbul "^4.1.6" - babel-preset-jest "^23.2.0" - -babel-messages@^6.23.0: - version "6.23.0" - resolved "https://registry.yarnpkg.com/babel-messages/-/babel-messages-6.23.0.tgz#f3cdf4703858035b2a2951c6ec5edf6c62f2630e" - integrity sha1-8830cDhYA1sqKVHG7F7fbGLyYw4= - dependencies: - babel-runtime "^6.22.0" - -babel-plugin-istanbul@^4.1.6: - version "4.1.6" - resolved "https://registry.yarnpkg.com/babel-plugin-istanbul/-/babel-plugin-istanbul-4.1.6.tgz#36c59b2192efce81c5b378321b74175add1c9a45" - integrity sha512-PWP9FQ1AhZhS01T/4qLSKoHGY/xvkZdVBGlKM/HuxxS3+sC66HhTNR7+MpbO/so/cz/wY94MeSWJuP1hXIPfwQ== - dependencies: - babel-plugin-syntax-object-rest-spread "^6.13.0" - find-up "^2.1.0" - istanbul-lib-instrument "^1.10.1" - test-exclude "^4.2.1" - -babel-plugin-jest-hoist@^23.2.0: - version "23.2.0" - resolved "https://registry.yarnpkg.com/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-23.2.0.tgz#e61fae05a1ca8801aadee57a6d66b8cefaf44167" - integrity sha1-5h+uBaHKiAGq3uV6bWa4zvr0QWc= - -babel-plugin-syntax-object-rest-spread@^6.13.0: - version "6.13.0" - resolved "https://registry.yarnpkg.com/babel-plugin-syntax-object-rest-spread/-/babel-plugin-syntax-object-rest-spread-6.13.0.tgz#fd6536f2bce13836ffa3a5458c4903a597bb3bf5" - integrity sha1-/WU28rzhODb/o6VFjEkDpZe7O/U= - -babel-preset-jest@^23.2.0: - version "23.2.0" - resolved "https://registry.yarnpkg.com/babel-preset-jest/-/babel-preset-jest-23.2.0.tgz#8ec7a03a138f001a1a8fb1e8113652bf1a55da46" - integrity sha1-jsegOhOPABoaj7HoETZSvxpV2kY= - dependencies: - babel-plugin-jest-hoist "^23.2.0" - babel-plugin-syntax-object-rest-spread "^6.13.0" - -babel-register@^6.26.0: - version "6.26.0" - resolved "https://registry.yarnpkg.com/babel-register/-/babel-register-6.26.0.tgz#6ed021173e2fcb486d7acb45c6009a856f647071" - integrity sha1-btAhFz4vy0htestFxgCahW9kcHE= - dependencies: - babel-core "^6.26.0" - babel-runtime "^6.26.0" - core-js "^2.5.0" - home-or-tmp "^2.0.0" - lodash "^4.17.4" - mkdirp "^0.5.1" - source-map-support "^0.4.15" - -babel-runtime@^6.22.0, babel-runtime@^6.26.0: - version "6.26.0" - resolved "https://registry.yarnpkg.com/babel-runtime/-/babel-runtime-6.26.0.tgz#965c7058668e82b55d7bfe04ff2337bc8b5647fe" - integrity sha1-llxwWGaOgrVde/4E/yM3vItWR/4= - dependencies: - core-js "^2.4.0" - regenerator-runtime "^0.11.0" - -babel-template@^6.16.0, babel-template@^6.24.1, babel-template@^6.26.0: - version "6.26.0" - resolved "https://registry.yarnpkg.com/babel-template/-/babel-template-6.26.0.tgz#de03e2d16396b069f46dd9fff8521fb1a0e35e02" - integrity sha1-3gPi0WOWsGn0bdn/+FIfsaDjXgI= - dependencies: - babel-runtime "^6.26.0" - babel-traverse "^6.26.0" - babel-types "^6.26.0" - babylon "^6.18.0" - lodash "^4.17.4" - -babel-traverse@^6.0.0, babel-traverse@^6.18.0, babel-traverse@^6.26.0: - version "6.26.0" - resolved "https://registry.yarnpkg.com/babel-traverse/-/babel-traverse-6.26.0.tgz#46a9cbd7edcc62c8e5c064e2d2d8d0f4035766ee" - integrity sha1-RqnL1+3MYsjlwGTi0tjQ9ANXZu4= - dependencies: - babel-code-frame "^6.26.0" - babel-messages "^6.23.0" - babel-runtime "^6.26.0" - babel-types "^6.26.0" - babylon "^6.18.0" - debug "^2.6.8" - globals "^9.18.0" - invariant "^2.2.2" - lodash "^4.17.4" - -babel-types@^6.0.0, babel-types@^6.18.0, babel-types@^6.26.0: - version "6.26.0" - resolved "https://registry.yarnpkg.com/babel-types/-/babel-types-6.26.0.tgz#a3b073f94ab49eb6fa55cd65227a334380632497" - integrity sha1-o7Bz+Uq0nrb6Vc1lInozQ4BjJJc= - dependencies: - babel-runtime "^6.26.0" - esutils "^2.0.2" - lodash "^4.17.4" - to-fast-properties "^1.0.3" - -babylon@^6.18.0: - version "6.18.0" - resolved "https://registry.yarnpkg.com/babylon/-/babylon-6.18.0.tgz#af2f3b88fa6f5c1e4c634d1a0f8eac4f55b395e3" - integrity sha512-q/UEjfGJ2Cm3oKV71DJz9d25TPnq5rhBVL2Q4fA5wcC3jcrdn7+SssEybFIxwAvvP+YCsCYNKughoF33GxgycQ== - -balanced-match@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767" - integrity sha1-ibTRmasr7kneFk6gK4nORi1xt2c= - -base@^0.11.1: - version "0.11.2" - resolved "https://registry.yarnpkg.com/base/-/base-0.11.2.tgz#7bde5ced145b6d551a90db87f83c558b4eb48a8f" - integrity sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg== - dependencies: - cache-base "^1.0.1" - class-utils "^0.3.5" - component-emitter "^1.2.1" - define-property "^1.0.0" - isobject "^3.0.1" - mixin-deep "^1.2.0" - pascalcase "^0.1.1" - -bcrypt-pbkdf@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz#a4301d389b6a43f9b67ff3ca11a3f6637e360e9e" - integrity sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4= - dependencies: - tweetnacl "^0.14.3" - -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" - -braces@^1.8.2: - version "1.8.5" - resolved "https://registry.yarnpkg.com/braces/-/braces-1.8.5.tgz#ba77962e12dff969d6b76711e914b737857bf6a7" - integrity sha1-uneWLhLf+WnWt2cR6RS3N4V79qc= - dependencies: - expand-range "^1.8.1" - preserve "^0.2.0" - repeat-element "^1.1.2" - -braces@^2.3.1: - version "2.3.2" - resolved "https://registry.yarnpkg.com/braces/-/braces-2.3.2.tgz#5979fd3f14cd531565e5fa2df1abfff1dfaee729" - integrity sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w== - dependencies: - arr-flatten "^1.1.0" - array-unique "^0.3.2" - extend-shallow "^2.0.1" - fill-range "^4.0.0" - isobject "^3.0.1" - repeat-element "^1.1.2" - snapdragon "^0.8.1" - snapdragon-node "^2.0.1" - split-string "^3.0.2" - to-regex "^3.0.1" - -browser-process-hrtime@^0.1.2: - version "0.1.3" - resolved "https://registry.yarnpkg.com/browser-process-hrtime/-/browser-process-hrtime-0.1.3.tgz#616f00faef1df7ec1b5bf9cfe2bdc3170f26c7b4" - integrity sha512-bRFnI4NnjO6cnyLmOV/7PVoDEMJChlcfN0z4s1YMBY989/SvlfMI1lgCnkFUs53e9gQF+w7qu7XdllSTiSl8Aw== - -browser-resolve@^1.11.3: - version "1.11.3" - resolved "https://registry.yarnpkg.com/browser-resolve/-/browser-resolve-1.11.3.tgz#9b7cbb3d0f510e4cb86bdbd796124d28b5890af6" - integrity sha512-exDi1BYWB/6raKHmDTCicQfTkqwN5fioMFV4j8BsfMU4R2DK/QfZfK7kOVkmWCNANf0snkBzqGqAJBao9gZMdQ== - dependencies: - resolve "1.1.7" - -bs-logger@0.x: - version "0.2.6" - resolved "https://registry.yarnpkg.com/bs-logger/-/bs-logger-0.2.6.tgz#eb7d365307a72cf974cc6cda76b68354ad336bd8" - integrity sha512-pd8DCoxmbgc7hyPKOvxtqNcjYoOsABPQdcCUjGp3d42VR2CX1ORhk2A87oqqu5R1kk+76nsxZupkmyd+MVtCog== - dependencies: - fast-json-stable-stringify "2.x" - -bser@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/bser/-/bser-2.0.0.tgz#9ac78d3ed5d915804fd87acb158bc797147a1719" - integrity sha1-mseNPtXZFYBP2HrLFYvHlxR6Fxk= - dependencies: - node-int64 "^0.4.0" - -buffer-from@1.x, buffer-from@^1.0.0: - version "1.1.1" - resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.1.tgz#32713bc028f75c02fdb710d7c7bcec1f2c6070ef" - integrity sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A== - -builtin-modules@^1.0.0: - version "1.1.1" - resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-1.1.1.tgz#270f076c5a72c02f5b65a47df94c5fe3a278892f" - integrity sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8= - -cache-base@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/cache-base/-/cache-base-1.0.1.tgz#0a7f46416831c8b662ee36fe4e7c59d76f666ab2" - integrity sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ== - dependencies: - collection-visit "^1.0.0" - component-emitter "^1.2.1" - get-value "^2.0.6" - has-value "^1.0.0" - isobject "^3.0.1" - set-value "^2.0.0" - to-object-path "^0.3.0" - union-value "^1.0.0" - unset-value "^1.0.0" - -callsites@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/callsites/-/callsites-2.0.0.tgz#06eb84f00eea413da86affefacbffb36093b3c50" - integrity sha1-BuuE8A7qQT2oav/vrL/7Ngk7PFA= - -camelcase@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-4.1.0.tgz#d545635be1e33c542649c69173e5de6acfae34dd" - integrity sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0= - -capture-exit@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/capture-exit/-/capture-exit-1.2.0.tgz#1c5fcc489fd0ab00d4f1ac7ae1072e3173fbab6f" - integrity sha1-HF/MSJ/QqwDU8ax64QcuMXP7q28= - dependencies: - rsvp "^3.3.3" - -caseless@~0.12.0: - version "0.12.0" - resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc" - integrity sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw= - -chalk@^1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98" - integrity sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg= - dependencies: - ansi-styles "^2.2.1" - escape-string-regexp "^1.0.2" - has-ansi "^2.0.0" - strip-ansi "^3.0.0" - supports-color "^2.0.0" - -chalk@^2.0.0, chalk@^2.0.1: - version "2.4.2" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" - 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" - -chownr@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/chownr/-/chownr-1.1.1.tgz#54726b8b8fff4df053c42187e801fb4412df1494" - integrity sha512-j38EvO5+LHX84jlo6h4UzmOwi0UgW61WRyPtJz4qaadK5eY3BTS5TY/S1Stc3Uk2lIM6TPevAlULiEJwie860g== - -ci-info@^1.5.0: - version "1.6.0" - resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-1.6.0.tgz#2ca20dbb9ceb32d4524a683303313f0304b1e497" - integrity sha512-vsGdkwSCDpWmP80ncATX7iea5DWQemg1UgCW5J8tqjU3lYw4FBYuj89J0CTVomA7BEfvSZd84GmHko+MxFQU2A== - -class-utils@^0.3.5: - version "0.3.6" - resolved "https://registry.yarnpkg.com/class-utils/-/class-utils-0.3.6.tgz#f93369ae8b9a7ce02fd41faad0ca83033190c463" - integrity sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg== - dependencies: - arr-union "^3.1.0" - define-property "^0.2.5" - isobject "^3.0.0" - static-extend "^0.1.1" - -cliui@^4.0.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/cliui/-/cliui-4.1.0.tgz#348422dbe82d800b3022eef4f6ac10bf2e4d1b49" - integrity sha512-4FG+RSG9DL7uEwRUZXZn3SS34DiDPfzP0VOiEwtUWlE+AR2EIg+hSyvrIgUUfhdgR/UkAeW2QHgeP+hWrXs7jQ== - dependencies: - string-width "^2.1.1" - strip-ansi "^4.0.0" - wrap-ansi "^2.0.0" - -co@^4.6.0: - version "4.6.0" - resolved "https://registry.yarnpkg.com/co/-/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184" - integrity sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ= - -code-point-at@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77" - integrity sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c= - -collection-visit@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/collection-visit/-/collection-visit-1.0.0.tgz#4bc0373c164bc3291b4d368c829cf1a80a59dca0" - integrity sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA= - dependencies: - map-visit "^1.0.0" - object-visit "^1.0.0" - -color-convert@^1.9.0: - version "1.9.3" - resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8" - integrity sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg== - dependencies: - color-name "1.1.3" - -color-name@1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" - integrity sha1-p9BVi9icQveV3UIyj3QIMcpTvCU= - -combined-stream@^1.0.6, combined-stream@~1.0.6: - version "1.0.7" - resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.7.tgz#2d1d24317afb8abe95d6d2c0b07b57813539d828" - integrity sha512-brWl9y6vOB1xYPZcpZde3N9zDByXTosAeMDo4p1wzo6UMOX4vumB+TP1RZ76sfE6Md68Q0NJSrE/gbezd4Ul+w== - dependencies: - delayed-stream "~1.0.0" - -commander@~2.17.1: - version "2.17.1" - resolved "https://registry.yarnpkg.com/commander/-/commander-2.17.1.tgz#bd77ab7de6de94205ceacc72f1716d29f20a77bf" - integrity sha512-wPMUt6FnH2yzG95SA6mzjQOEKUU3aLaDEmzs1ti+1E9h+CsrZghRlqEM/EJ4KscsQVG8uNN4uVreUeT8+drlgg== - -component-emitter@^1.2.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/component-emitter/-/component-emitter-1.2.1.tgz#137918d6d78283f7df7a6b7c5a63e140e69425e6" - integrity sha1-E3kY1teCg/ffemt8WmPhQOaUJeY= - -concat-map@0.0.1: - version "0.0.1" - resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" - integrity sha1-2Klr13/Wjfd5OnMDajug1UBdR3s= - -console-control-strings@^1.0.0, console-control-strings@~1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/console-control-strings/-/console-control-strings-1.1.0.tgz#3d7cf4464db6446ea644bf4b39507f9851008e8e" - integrity sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4= - -convert-source-map@^1.4.0, convert-source-map@^1.5.1: - version "1.6.0" - resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.6.0.tgz#51b537a8c43e0f04dec1993bffcdd504e758ac20" - integrity sha512-eFu7XigvxdZ1ETfbgPBohgyQ/Z++C0eEhTor0qRwBw9unw+L0/6V8wkSuGgzdThkiS5lSpdptOQPD8Ak40a+7A== - dependencies: - safe-buffer "~5.1.1" - -copy-descriptor@^0.1.0: - version "0.1.1" - resolved "https://registry.yarnpkg.com/copy-descriptor/-/copy-descriptor-0.1.1.tgz#676f6eb3c39997c2ee1ac3a924fd6124748f578d" - integrity sha1-Z29us8OZl8LuGsOpJP1hJHSPV40= - -core-js@^2.4.0, core-js@^2.5.0: - version "2.6.1" - resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.6.1.tgz#87416ae817de957a3f249b3b5ca475d4aaed6042" - integrity sha512-L72mmmEayPJBejKIWe2pYtGis5r0tQ5NaJekdhyXgeMQTpJoBsH0NL4ElY2LfSoV15xeQWKQ+XTTOZdyero5Xg== - -core-util-is@1.0.2, core-util-is@~1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" - integrity sha1-tf1UIgqivFq1eqtxQMlAdUUDwac= - -cross-spawn@^5.0.1: - version "5.1.0" - resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-5.1.0.tgz#e8bd0efee58fcff6f8f94510a0a554bbfa235449" - integrity sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk= - dependencies: - lru-cache "^4.0.1" - shebang-command "^1.2.0" - which "^1.2.9" - -cssom@0.3.x, "cssom@>= 0.3.2 < 0.4.0": - version "0.3.4" - resolved "https://registry.yarnpkg.com/cssom/-/cssom-0.3.4.tgz#8cd52e8a3acfd68d3aed38ee0a640177d2f9d797" - integrity sha512-+7prCSORpXNeR4/fUP3rL+TzqtiFfhMvTd7uEqMdgPvLPt4+uzFUeufx5RHjGTACCargg/DiEt/moMQmvnfkog== - -cssstyle@^1.0.0: - version "1.1.1" - resolved "https://registry.yarnpkg.com/cssstyle/-/cssstyle-1.1.1.tgz#18b038a9c44d65f7a8e428a653b9f6fe42faf5fb" - integrity sha512-364AI1l/M5TYcFH83JnOH/pSqgaNnKmYgKrm0didZMGKWjQB60dymwWy1rKUgL3J1ffdq9xVi2yGLHdSjjSNog== - dependencies: - cssom "0.3.x" - -dashdash@^1.12.0: - version "1.14.1" - resolved "https://registry.yarnpkg.com/dashdash/-/dashdash-1.14.1.tgz#853cfa0f7cbe2fed5de20326b8dd581035f6e2f0" - integrity sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA= - dependencies: - assert-plus "^1.0.0" - -data-urls@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/data-urls/-/data-urls-1.1.0.tgz#15ee0582baa5e22bb59c77140da8f9c76963bbfe" - integrity sha512-YTWYI9se1P55u58gL5GkQHW4P6VJBJ5iBT+B5a7i2Tjadhv52paJG0qHX4A0OR6/t52odI64KP2YvFpkDOi3eQ== - dependencies: - abab "^2.0.0" - whatwg-mimetype "^2.2.0" - whatwg-url "^7.0.0" - -debug@^2.1.2, debug@^2.2.0, debug@^2.3.3, debug@^2.6.8, debug@^2.6.9: - version "2.6.9" - resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" - integrity sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA== - dependencies: - ms "2.0.0" - -debug@^3.1.0: - version "3.2.6" - resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.6.tgz#e83d17de16d8a7efb7717edbe5fb10135eee629b" - integrity sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ== - dependencies: - ms "^2.1.1" - -decamelize@^1.1.1: - version "1.2.0" - resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" - integrity sha1-9lNNFRSCabIDUue+4m9QH5oZEpA= - -decode-uri-component@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/decode-uri-component/-/decode-uri-component-0.2.0.tgz#eb3913333458775cb84cd1a1fae062106bb87545" - integrity sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU= - -deep-extend@^0.6.0: - version "0.6.0" - resolved "https://registry.yarnpkg.com/deep-extend/-/deep-extend-0.6.0.tgz#c4fa7c95404a17a9c3e8ca7e1537312b736330ac" - integrity sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA== - -deep-is@~0.1.3: - version "0.1.3" - resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.3.tgz#b369d6fb5dbc13eecf524f91b070feedc357cf34" - integrity sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ= - -default-require-extensions@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/default-require-extensions/-/default-require-extensions-1.0.0.tgz#f37ea15d3e13ffd9b437d33e1a75b5fb97874cb8" - integrity sha1-836hXT4T/9m0N9M+GnW1+5eHTLg= - dependencies: - strip-bom "^2.0.0" - -define-properties@^1.1.2: - version "1.1.3" - resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.1.3.tgz#cf88da6cbee26fe6db7094f61d870cbd84cee9f1" - integrity sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ== - dependencies: - object-keys "^1.0.12" - -define-property@^0.2.5: - version "0.2.5" - resolved "https://registry.yarnpkg.com/define-property/-/define-property-0.2.5.tgz#c35b1ef918ec3c990f9a5bc57be04aacec5c8116" - integrity sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY= - dependencies: - is-descriptor "^0.1.0" - -define-property@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/define-property/-/define-property-1.0.0.tgz#769ebaaf3f4a63aad3af9e8d304c9bbe79bfb0e6" - integrity sha1-dp66rz9KY6rTr56NMEybvnm/sOY= - dependencies: - is-descriptor "^1.0.0" - -define-property@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/define-property/-/define-property-2.0.2.tgz#d459689e8d654ba77e02a817f8710d702cb16e9d" - integrity sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ== - dependencies: - is-descriptor "^1.0.2" - isobject "^3.0.1" - -delayed-stream@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" - integrity sha1-3zrhmayt+31ECqrgsp4icrJOxhk= - -delegates@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/delegates/-/delegates-1.0.0.tgz#84c6e159b81904fdca59a0ef44cd870d31250f9a" - integrity sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o= - -detect-indent@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/detect-indent/-/detect-indent-4.0.0.tgz#f76d064352cdf43a1cb6ce619c4ee3a9475de208" - integrity sha1-920GQ1LN9Docts5hnE7jqUdd4gg= - dependencies: - repeating "^2.0.0" - -detect-libc@^1.0.2: - version "1.0.3" - resolved "https://registry.yarnpkg.com/detect-libc/-/detect-libc-1.0.3.tgz#fa137c4bd698edf55cd5cd02ac559f91a4c4ba9b" - integrity sha1-+hN8S9aY7fVc1c0CrFWfkaTEups= - -detect-newline@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/detect-newline/-/detect-newline-2.1.0.tgz#f41f1c10be4b00e87b5f13da680759f2c5bfd3e2" - integrity sha1-9B8cEL5LAOh7XxPaaAdZ8sW/0+I= - -diff@^3.2.0: - version "3.5.0" - resolved "https://registry.yarnpkg.com/diff/-/diff-3.5.0.tgz#800c0dd1e0a8bfbc95835c202ad220fe317e5a12" - integrity sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA== - -domexception@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/domexception/-/domexception-1.0.1.tgz#937442644ca6a31261ef36e3ec677fe805582c90" - integrity sha512-raigMkn7CJNNo6Ihro1fzG7wr3fHuYVytzquZKX5n0yizGsTcYgzdIUwj1X9pK0VvjeihV+XiclP+DjwbsSKug== - dependencies: - webidl-conversions "^4.0.2" - -ecc-jsbn@~0.1.1: - version "0.1.2" - resolved "https://registry.yarnpkg.com/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz#3a83a904e54353287874c564b7549386849a98c9" - integrity sha1-OoOpBOVDUyh4dMVkt1SThoSamMk= - dependencies: - jsbn "~0.1.0" - safer-buffer "^2.1.0" - -error-ex@^1.2.0: - version "1.3.2" - resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.2.tgz#b4ac40648107fdcdcfae242f428bea8a14d4f1bf" - integrity sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g== - dependencies: - is-arrayish "^0.2.1" - -es-abstract@^1.5.1: - version "1.13.0" - resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.13.0.tgz#ac86145fdd5099d8dd49558ccba2eaf9b88e24e9" - integrity sha512-vDZfg/ykNxQVwup/8E1BZhVzFfBxs9NqMzGcvIJrqg5k2/5Za2bWo40dK2J1pgLngZ7c+Shh8lwYtLGyrwPutg== - dependencies: - es-to-primitive "^1.2.0" - function-bind "^1.1.1" - has "^1.0.3" - is-callable "^1.1.4" - is-regex "^1.0.4" - object-keys "^1.0.12" - -es-to-primitive@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/es-to-primitive/-/es-to-primitive-1.2.0.tgz#edf72478033456e8dda8ef09e00ad9650707f377" - integrity sha512-qZryBOJjV//LaxLTV6UC//WewneB3LcXOL9NP++ozKVXsIIIpm/2c13UDiD9Jp2eThsecw9m3jPqDwTyobcdbg== - dependencies: - is-callable "^1.1.4" - is-date-object "^1.0.1" - is-symbol "^1.0.2" - -escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" - integrity sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ= - -escodegen@^1.9.1: - version "1.11.0" - resolved "https://registry.yarnpkg.com/escodegen/-/escodegen-1.11.0.tgz#b27a9389481d5bfd5bec76f7bb1eb3f8f4556589" - integrity sha512-IeMV45ReixHS53K/OmfKAIztN/igDHzTJUhZM3k1jMhIZWjk45SMwAtBsEXiJp3vSPmTcu6CXn7mDvFHRN66fw== - dependencies: - esprima "^3.1.3" - estraverse "^4.2.0" - esutils "^2.0.2" - optionator "^0.8.1" - optionalDependencies: - source-map "~0.6.1" - -esprima@^3.1.3: - version "3.1.3" - resolved "https://registry.yarnpkg.com/esprima/-/esprima-3.1.3.tgz#fdca51cee6133895e3c88d535ce49dbff62a4633" - integrity sha1-/cpRzuYTOJXjyI1TXOSdv/YqRjM= - -esprima@^4.0.0: - version "4.0.1" - resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71" - integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A== - -estraverse@^4.2.0: - version "4.2.0" - resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.2.0.tgz#0dee3fed31fcd469618ce7342099fc1afa0bdb13" - integrity sha1-De4/7TH81GlhjOc0IJn8GvoL2xM= - -esutils@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.2.tgz#0abf4f1caa5bcb1f7a9d8acc6dea4faaa04bac9b" - integrity sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs= - -exec-sh@^0.2.0: - version "0.2.2" - resolved "https://registry.yarnpkg.com/exec-sh/-/exec-sh-0.2.2.tgz#2a5e7ffcbd7d0ba2755bdecb16e5a427dfbdec36" - integrity sha512-FIUCJz1RbuS0FKTdaAafAByGS0CPvU3R0MeHxgtl+djzCc//F8HakL8GzmVNZanasTbTAY/3DRFA0KpVqj/eAw== - dependencies: - merge "^1.2.0" - -execa@^0.7.0: - version "0.7.0" - resolved "https://registry.yarnpkg.com/execa/-/execa-0.7.0.tgz#944becd34cc41ee32a63a9faf27ad5a65fc59777" - integrity sha1-lEvs00zEHuMqY6n68nrVpl/Fl3c= - dependencies: - cross-spawn "^5.0.1" - get-stream "^3.0.0" - is-stream "^1.1.0" - npm-run-path "^2.0.0" - p-finally "^1.0.0" - signal-exit "^3.0.0" - strip-eof "^1.0.0" - -exit@^0.1.2: - version "0.1.2" - resolved "https://registry.yarnpkg.com/exit/-/exit-0.1.2.tgz#0632638f8d877cc82107d30a0fff1a17cba1cd0c" - integrity sha1-BjJjj42HfMghB9MKD/8aF8uhzQw= - -expand-brackets@^0.1.4: - version "0.1.5" - resolved "https://registry.yarnpkg.com/expand-brackets/-/expand-brackets-0.1.5.tgz#df07284e342a807cd733ac5af72411e581d1177b" - integrity sha1-3wcoTjQqgHzXM6xa9yQR5YHRF3s= - dependencies: - is-posix-bracket "^0.1.0" - -expand-brackets@^2.1.4: - version "2.1.4" - resolved "https://registry.yarnpkg.com/expand-brackets/-/expand-brackets-2.1.4.tgz#b77735e315ce30f6b6eff0f83b04151a22449622" - integrity sha1-t3c14xXOMPa27/D4OwQVGiJEliI= - dependencies: - debug "^2.3.3" - define-property "^0.2.5" - extend-shallow "^2.0.1" - posix-character-classes "^0.1.0" - regex-not "^1.0.0" - snapdragon "^0.8.1" - to-regex "^3.0.1" - -expand-range@^1.8.1: - version "1.8.2" - resolved "https://registry.yarnpkg.com/expand-range/-/expand-range-1.8.2.tgz#a299effd335fe2721ebae8e257ec79644fc85337" - integrity sha1-opnv/TNf4nIeuujiV+x5ZE/IUzc= - dependencies: - fill-range "^2.1.0" - -expect@^23.6.0: - version "23.6.0" - resolved "https://registry.yarnpkg.com/expect/-/expect-23.6.0.tgz#1e0c8d3ba9a581c87bd71fb9bc8862d443425f98" - integrity sha512-dgSoOHgmtn/aDGRVFWclQyPDKl2CQRq0hmIEoUAuQs/2rn2NcvCWcSCovm6BLeuB/7EZuLGu2QfnR+qRt5OM4w== - dependencies: - ansi-styles "^3.2.0" - jest-diff "^23.6.0" - jest-get-type "^22.1.0" - jest-matcher-utils "^23.6.0" - jest-message-util "^23.4.0" - jest-regex-util "^23.3.0" - -extend-shallow@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/extend-shallow/-/extend-shallow-2.0.1.tgz#51af7d614ad9a9f610ea1bafbb989d6b1c56890f" - integrity sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8= - dependencies: - is-extendable "^0.1.0" - -extend-shallow@^3.0.0, extend-shallow@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/extend-shallow/-/extend-shallow-3.0.2.tgz#26a71aaf073b39fb2127172746131c2704028db8" - integrity sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg= - dependencies: - assign-symbols "^1.0.0" - is-extendable "^1.0.1" - -extend@~3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.2.tgz#f8b1136b4071fbd8eb140aff858b1019ec2915fa" - integrity sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g== - -extglob@^0.3.1: - version "0.3.2" - resolved "https://registry.yarnpkg.com/extglob/-/extglob-0.3.2.tgz#2e18ff3d2f49ab2765cec9023f011daa8d8349a1" - integrity sha1-Lhj/PS9JqydlzskCPwEdqo2DSaE= - dependencies: - is-extglob "^1.0.0" - -extglob@^2.0.4: - version "2.0.4" - resolved "https://registry.yarnpkg.com/extglob/-/extglob-2.0.4.tgz#ad00fe4dc612a9232e8718711dc5cb5ab0285543" - integrity sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw== - dependencies: - array-unique "^0.3.2" - define-property "^1.0.0" - expand-brackets "^2.1.4" - extend-shallow "^2.0.1" - fragment-cache "^0.2.1" - regex-not "^1.0.0" - snapdragon "^0.8.1" - to-regex "^3.0.1" - -extsprintf@1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.3.0.tgz#96918440e3041a7a414f8c52e3c574eb3c3e1e05" - integrity sha1-lpGEQOMEGnpBT4xS48V06zw+HgU= - -extsprintf@^1.2.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.4.0.tgz#e2689f8f356fad62cca65a3a91c5df5f9551692f" - integrity sha1-4mifjzVvrWLMplo6kcXfX5VRaS8= - -fast-deep-equal@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz#7b05218ddf9667bf7f370bf7fdb2cb15fdd0aa49" - integrity sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk= - -fast-json-stable-stringify@2.x, fast-json-stable-stringify@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz#d5142c0caee6b1189f87d3a76111064f86c8bbf2" - integrity sha1-1RQsDK7msRifh9OnYREGT4bIu/I= - -fast-levenshtein@~2.0.4: - version "2.0.6" - resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" - integrity sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc= - -fb-watchman@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/fb-watchman/-/fb-watchman-2.0.0.tgz#54e9abf7dfa2f26cd9b1636c588c1afc05de5d58" - integrity sha1-VOmr99+i8mzZsWNsWIwa/AXeXVg= - dependencies: - bser "^2.0.0" - -filename-regex@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/filename-regex/-/filename-regex-2.0.1.tgz#c1c4b9bee3e09725ddb106b75c1e301fe2f18b26" - integrity sha1-wcS5vuPglyXdsQa3XB4wH+LxiyY= - -fileset@^2.0.2: - version "2.0.3" - resolved "https://registry.yarnpkg.com/fileset/-/fileset-2.0.3.tgz#8e7548a96d3cc2327ee5e674168723a333bba2a0" - integrity sha1-jnVIqW08wjJ+5eZ0FocjozO7oqA= - dependencies: - glob "^7.0.3" - minimatch "^3.0.3" - -fill-range@^2.1.0: - version "2.2.4" - resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-2.2.4.tgz#eb1e773abb056dcd8df2bfdf6af59b8b3a936565" - integrity sha512-cnrcCbj01+j2gTG921VZPnHbjmdAf8oQV/iGeV2kZxGSyfYjjTyY79ErsK1WJWMpw6DaApEX72binqJE+/d+5Q== - dependencies: - is-number "^2.1.0" - isobject "^2.0.0" - randomatic "^3.0.0" - repeat-element "^1.1.2" - repeat-string "^1.5.2" - -fill-range@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-4.0.0.tgz#d544811d428f98eb06a63dc402d2403c328c38f7" - integrity sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc= - dependencies: - extend-shallow "^2.0.1" - is-number "^3.0.0" - repeat-string "^1.6.1" - to-regex-range "^2.1.0" - -find-up@^1.0.0: - version "1.1.2" - resolved "https://registry.yarnpkg.com/find-up/-/find-up-1.1.2.tgz#6b2e9822b1a2ce0a60ab64d610eccad53cb24d0f" - integrity sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8= - dependencies: - path-exists "^2.0.0" - pinkie-promise "^2.0.0" - -find-up@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/find-up/-/find-up-2.1.0.tgz#45d1b7e506c717ddd482775a2b77920a3c0c57a7" - integrity sha1-RdG35QbHF93UgndaK3eSCjwMV6c= - dependencies: - locate-path "^2.0.0" - -for-in@^1.0.1, for-in@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/for-in/-/for-in-1.0.2.tgz#81068d295a8142ec0ac726c6e2200c30fb6d5e80" - integrity sha1-gQaNKVqBQuwKxybG4iAMMPttXoA= - -for-own@^0.1.4: - version "0.1.5" - resolved "https://registry.yarnpkg.com/for-own/-/for-own-0.1.5.tgz#5265c681a4f294dabbf17c9509b6763aa84510ce" - integrity sha1-UmXGgaTylNq78XyVCbZ2OqhFEM4= - dependencies: - for-in "^1.0.1" - -forever-agent@~0.6.1: - version "0.6.1" - resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91" - integrity sha1-+8cfDEGt6zf5bFd60e1C2P2sypE= - -form-data@~2.3.2: - version "2.3.3" - resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.3.3.tgz#dcce52c05f644f298c6a7ab936bd724ceffbf3a6" - integrity sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ== - dependencies: - asynckit "^0.4.0" - combined-stream "^1.0.6" - mime-types "^2.1.12" - -fragment-cache@^0.2.1: - version "0.2.1" - resolved "https://registry.yarnpkg.com/fragment-cache/-/fragment-cache-0.2.1.tgz#4290fad27f13e89be7f33799c6bc5a0abfff0d19" - integrity sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk= - dependencies: - map-cache "^0.2.2" - -fs-minipass@^1.2.5: - version "1.2.5" - resolved "https://registry.yarnpkg.com/fs-minipass/-/fs-minipass-1.2.5.tgz#06c277218454ec288df77ada54a03b8702aacb9d" - integrity sha512-JhBl0skXjUPCFH7x6x61gQxrKyXsxB5gcgePLZCwfyCGGsTISMoIeObbrvVeP6Xmyaudw4TT43qV2Gz+iyd2oQ== - dependencies: - minipass "^2.2.1" - -fs.realpath@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" - integrity sha1-FQStJSMVjKpA20onh8sBQRmU6k8= - -fsevents@^1.2.3: - version "1.2.4" - resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-1.2.4.tgz#f41dcb1af2582af3692da36fc55cbd8e1041c426" - integrity sha512-z8H8/diyk76B7q5wg+Ud0+CqzcAF3mBBI/bA5ne5zrRUUIvNkJY//D3BqyH571KuAC4Nr7Rw7CjWX4r0y9DvNg== - dependencies: - nan "^2.9.2" - node-pre-gyp "^0.10.0" - -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== - -gauge@~2.7.3: - version "2.7.4" - resolved "https://registry.yarnpkg.com/gauge/-/gauge-2.7.4.tgz#2c03405c7538c39d7eb37b317022e325fb018bf7" - integrity sha1-LANAXHU4w51+s3sxcCLjJfsBi/c= - dependencies: - aproba "^1.0.3" - console-control-strings "^1.0.0" - has-unicode "^2.0.0" - object-assign "^4.1.0" - signal-exit "^3.0.0" - string-width "^1.0.1" - strip-ansi "^3.0.1" - wide-align "^1.1.0" - -get-caller-file@^1.0.1: - version "1.0.3" - resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-1.0.3.tgz#f978fa4c90d1dfe7ff2d6beda2a515e713bdcf4a" - integrity sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w== - -get-stream@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-3.0.0.tgz#8e943d1358dc37555054ecbe2edb05aa174ede14" - integrity sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ= - -get-value@^2.0.3, get-value@^2.0.6: - version "2.0.6" - resolved "https://registry.yarnpkg.com/get-value/-/get-value-2.0.6.tgz#dc15ca1c672387ca76bd37ac0a395ba2042a2c28" - integrity sha1-3BXKHGcjh8p2vTesCjlbogQqLCg= - -getpass@^0.1.1: - version "0.1.7" - resolved "https://registry.yarnpkg.com/getpass/-/getpass-0.1.7.tgz#5eff8e3e684d569ae4cb2b1282604e8ba62149fa" - integrity sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo= - dependencies: - assert-plus "^1.0.0" - -glob-base@^0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/glob-base/-/glob-base-0.3.0.tgz#dbb164f6221b1c0b1ccf82aea328b497df0ea3c4" - integrity sha1-27Fk9iIbHAscz4Kuoyi0l98Oo8Q= - dependencies: - glob-parent "^2.0.0" - is-glob "^2.0.0" - -glob-parent@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-2.0.0.tgz#81383d72db054fcccf5336daa902f182f6edbb28" - integrity sha1-gTg9ctsFT8zPUzbaqQLxgvbtuyg= - dependencies: - is-glob "^2.0.0" - -glob@^7.0.3, glob@^7.1.1, glob@^7.1.2, glob@^7.1.3: - version "7.1.3" - resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.3.tgz#3960832d3f1574108342dafd3a67b332c0969df1" - integrity sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ== - dependencies: - fs.realpath "^1.0.0" - inflight "^1.0.4" - inherits "2" - minimatch "^3.0.4" - once "^1.3.0" - path-is-absolute "^1.0.0" - -globals@^9.18.0: - version "9.18.0" - resolved "https://registry.yarnpkg.com/globals/-/globals-9.18.0.tgz#aa3896b3e69b487f17e31ed2143d69a8e30c2d8a" - integrity sha512-S0nG3CLEQiY/ILxqtztTWH/3iRRdyBLw6KMDxnKMchrtbj2OFmehVh0WUCfW3DUrIgx/qFrJPICrq4Z4sTR9UQ== - -graceful-fs@^4.1.11, graceful-fs@^4.1.2: - version "4.1.15" - resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.15.tgz#ffb703e1066e8a0eeaa4c8b80ba9253eeefbfb00" - integrity sha512-6uHUhOPEBgQ24HM+r6b/QwWfZq+yiFcipKFrOFiBEnWdy5sdzYoi+pJeQaPI5qOLRFqWmAXUPQNsielzdLoecA== - -growly@^1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/growly/-/growly-1.3.0.tgz#f10748cbe76af964b7c96c93c6bcc28af120c081" - integrity sha1-8QdIy+dq+WS3yWyTxrzCivEgwIE= - -handlebars@^4.0.3: - version "4.0.12" - resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.0.12.tgz#2c15c8a96d46da5e266700518ba8cb8d919d5bc5" - integrity sha512-RhmTekP+FZL+XNhwS1Wf+bTTZpdLougwt5pcgA1tuz6Jcx0fpH/7z0qd71RKnZHBCxIRBHfBOnio4gViPemNzA== - dependencies: - async "^2.5.0" - optimist "^0.6.1" - source-map "^0.6.1" - optionalDependencies: - uglify-js "^3.1.4" - -har-schema@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/har-schema/-/har-schema-2.0.0.tgz#a94c2224ebcac04782a0d9035521f24735b7ec92" - integrity sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI= - -har-validator@~5.1.0: - version "5.1.3" - resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-5.1.3.tgz#1ef89ebd3e4996557675eed9893110dc350fa080" - integrity sha512-sNvOCzEQNr/qrvJgc3UG/kD4QtlHycrzwS+6mfTrrSq97BvaYcPZZI1ZSqGSPR73Cxn4LKTD4PttRwfU7jWq5g== - dependencies: - ajv "^6.5.5" - har-schema "^2.0.0" - -has-ansi@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/has-ansi/-/has-ansi-2.0.0.tgz#34f5049ce1ecdf2b0649af3ef24e45ed35416d91" - integrity sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE= - dependencies: - ansi-regex "^2.0.0" - -has-flag@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-1.0.0.tgz#9d9e793165ce017a00f00418c43f942a7b1d11fa" - integrity sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo= - -has-flag@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" - integrity sha1-tdRU3CGZriJWmfNGfloH87lVuv0= - -has-symbols@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.0.tgz#ba1a8f1af2a0fc39650f5c850367704122063b44" - integrity sha1-uhqPGvKg/DllD1yFA2dwQSIGO0Q= - -has-unicode@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/has-unicode/-/has-unicode-2.0.1.tgz#e0e6fe6a28cf51138855e086d1691e771de2a8b9" - integrity sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk= - -has-value@^0.3.1: - version "0.3.1" - resolved "https://registry.yarnpkg.com/has-value/-/has-value-0.3.1.tgz#7b1f58bada62ca827ec0a2078025654845995e1f" - integrity sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8= - dependencies: - get-value "^2.0.3" - has-values "^0.1.4" - isobject "^2.0.0" - -has-value@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/has-value/-/has-value-1.0.0.tgz#18b281da585b1c5c51def24c930ed29a0be6b177" - integrity sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc= - dependencies: - get-value "^2.0.6" - has-values "^1.0.0" - isobject "^3.0.0" - -has-values@^0.1.4: - version "0.1.4" - resolved "https://registry.yarnpkg.com/has-values/-/has-values-0.1.4.tgz#6d61de95d91dfca9b9a02089ad384bff8f62b771" - integrity sha1-bWHeldkd/Km5oCCJrThL/49it3E= - -has-values@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/has-values/-/has-values-1.0.0.tgz#95b0b63fec2146619a6fe57fe75628d5a39efe4f" - integrity sha1-lbC2P+whRmGab+V/51Yo1aOe/k8= - dependencies: - is-number "^3.0.0" - kind-of "^4.0.0" - -has@^1.0.1, 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" - -home-or-tmp@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/home-or-tmp/-/home-or-tmp-2.0.0.tgz#e36c3f2d2cae7d746a857e38d18d5f32a7882db8" - integrity sha1-42w/LSyufXRqhX440Y1fMqeILbg= - dependencies: - os-homedir "^1.0.0" - os-tmpdir "^1.0.1" - -hosted-git-info@^2.1.4: - version "2.7.1" - resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.7.1.tgz#97f236977bd6e125408930ff6de3eec6281ec047" - integrity sha512-7T/BxH19zbcCTa8XkMlbK5lTo1WtgkFi3GvdWEyNuc4Vex7/9Dqbnpsf4JMydcfj9HCg4zUWFTL3Za6lapg5/w== - -html-encoding-sniffer@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/html-encoding-sniffer/-/html-encoding-sniffer-1.0.2.tgz#e70d84b94da53aa375e11fe3a351be6642ca46f8" - integrity sha512-71lZziiDnsuabfdYiUeWdCVyKuqwWi23L8YeIgV9jSSZHCtb6wB1BKWooH7L3tn4/FuZJMVWyNaIDr4RGmaSYw== - dependencies: - whatwg-encoding "^1.0.1" - -http-signature@~1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-1.2.0.tgz#9aecd925114772f3d95b65a60abb8f7c18fbace1" - integrity sha1-muzZJRFHcvPZW2WmCruPfBj7rOE= - dependencies: - assert-plus "^1.0.0" - jsprim "^1.2.2" - sshpk "^1.7.0" - -iconv-lite@0.4.24, iconv-lite@^0.4.4: - version "0.4.24" - resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b" - integrity sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA== - dependencies: - safer-buffer ">= 2.1.2 < 3" - -ignore-walk@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/ignore-walk/-/ignore-walk-3.0.1.tgz#a83e62e7d272ac0e3b551aaa82831a19b69f82f8" - integrity sha512-DTVlMx3IYPe0/JJcYP7Gxg7ttZZu3IInhuEhbchuqneY9wWe5Ojy2mXLBaQFUQmo0AW2r3qG7m1mg86js+gnlQ== - dependencies: - minimatch "^3.0.4" - -import-local@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/import-local/-/import-local-1.0.0.tgz#5e4ffdc03f4fe6c009c6729beb29631c2f8227bc" - integrity sha512-vAaZHieK9qjGo58agRBg+bhHX3hoTZU/Oa3GESWLz7t1U62fk63aHuDJJEteXoDeTCcPmUT+z38gkHPZkkmpmQ== - dependencies: - pkg-dir "^2.0.0" - resolve-cwd "^2.0.0" - -imurmurhash@^0.1.4: - version "0.1.4" - resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" - integrity sha1-khi5srkoojixPcT7a21XbyMUU+o= - -inflight@^1.0.4: - version "1.0.6" - resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" - integrity sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk= - dependencies: - once "^1.3.0" - wrappy "1" - -inherits@2, inherits@~2.0.3: - version "2.0.3" - resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" - integrity sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4= - -ini@~1.3.0: - version "1.3.5" - resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.5.tgz#eee25f56db1c9ec6085e0c22778083f596abf927" - integrity sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw== - -invariant@^2.2.2, invariant@^2.2.4: - version "2.2.4" - resolved "https://registry.yarnpkg.com/invariant/-/invariant-2.2.4.tgz#610f3c92c9359ce1db616e538008d23ff35158e6" - integrity sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA== - dependencies: - loose-envify "^1.0.0" - -invert-kv@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/invert-kv/-/invert-kv-1.0.0.tgz#104a8e4aaca6d3d8cd157a8ef8bfab2d7a3ffdb6" - integrity sha1-EEqOSqym09jNFXqO+L+rLXo//bY= - -ip-regex@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/ip-regex/-/ip-regex-3.0.0.tgz#0a934694b4066558c46294244a23cc33116bf732" - integrity sha512-T8wDtjy+Qf2TAPDQmBp0eGKJ8GavlWlUnamr3wRn6vvdZlKVuJXXMlSncYFRYgVHOM3If5NR1H4+OvVQU9Idvg== - -is-accessor-descriptor@^0.1.6: - version "0.1.6" - resolved "https://registry.yarnpkg.com/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz#a9e12cb3ae8d876727eeef3843f8a0897b5c98d6" - integrity sha1-qeEss66Nh2cn7u84Q/igiXtcmNY= - dependencies: - kind-of "^3.0.2" - -is-accessor-descriptor@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz#169c2f6d3df1f992618072365c9b0ea1f6878656" - integrity sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ== - dependencies: - kind-of "^6.0.0" - -is-arrayish@^0.2.1: - version "0.2.1" - resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" - integrity sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0= - -is-buffer@^1.1.5: - version "1.1.6" - resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.6.tgz#efaa2ea9daa0d7ab2ea13a97b2b8ad51fefbe8be" - integrity sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w== - -is-builtin-module@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-builtin-module/-/is-builtin-module-1.0.0.tgz#540572d34f7ac3119f8f76c30cbc1b1e037affbe" - integrity sha1-VAVy0096wxGfj3bDDLwbHgN6/74= - dependencies: - builtin-modules "^1.0.0" - -is-callable@^1.1.4: - version "1.1.4" - resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.1.4.tgz#1e1adf219e1eeb684d691f9d6a05ff0d30a24d75" - integrity sha512-r5p9sxJjYnArLjObpjA4xu5EKI3CuKHkJXMhT7kwbpUyIFD1n5PMAsoPvWnvtZiNz7LjkYDRZhd7FlI0eMijEA== - -is-ci@^1.0.10: - version "1.2.1" - resolved "https://registry.yarnpkg.com/is-ci/-/is-ci-1.2.1.tgz#e3779c8ee17fccf428488f6e281187f2e632841c" - integrity sha512-s6tfsaQaQi3JNciBH6shVqEDvhGut0SUXr31ag8Pd8BBbVVlcGfWhpPmEOoM6RJ5TFhbypvf5yyRw/VXW1IiWg== - dependencies: - ci-info "^1.5.0" - -is-data-descriptor@^0.1.4: - version "0.1.4" - resolved "https://registry.yarnpkg.com/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz#0b5ee648388e2c860282e793f1856fec3f301b56" - integrity sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y= - dependencies: - kind-of "^3.0.2" - -is-data-descriptor@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz#d84876321d0e7add03990406abbbbd36ba9268c7" - integrity sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ== - dependencies: - kind-of "^6.0.0" - -is-date-object@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/is-date-object/-/is-date-object-1.0.1.tgz#9aa20eb6aeebbff77fbd33e74ca01b33581d3a16" - integrity sha1-mqIOtq7rv/d/vTPnTKAbM1gdOhY= - -is-descriptor@^0.1.0: - version "0.1.6" - resolved "https://registry.yarnpkg.com/is-descriptor/-/is-descriptor-0.1.6.tgz#366d8240dde487ca51823b1ab9f07a10a78251ca" - integrity sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg== - dependencies: - is-accessor-descriptor "^0.1.6" - is-data-descriptor "^0.1.4" - kind-of "^5.0.0" - -is-descriptor@^1.0.0, is-descriptor@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/is-descriptor/-/is-descriptor-1.0.2.tgz#3b159746a66604b04f8c81524ba365c5f14d86ec" - integrity sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg== - dependencies: - is-accessor-descriptor "^1.0.0" - is-data-descriptor "^1.0.0" - kind-of "^6.0.2" - -is-dotfile@^1.0.0: - version "1.0.3" - resolved "https://registry.yarnpkg.com/is-dotfile/-/is-dotfile-1.0.3.tgz#a6a2f32ffd2dfb04f5ca25ecd0f6b83cf798a1e1" - integrity sha1-pqLzL/0t+wT1yiXs0Pa4PPeYoeE= - -is-equal-shallow@^0.1.3: - version "0.1.3" - resolved "https://registry.yarnpkg.com/is-equal-shallow/-/is-equal-shallow-0.1.3.tgz#2238098fc221de0bcfa5d9eac4c45d638aa1c534" - integrity sha1-IjgJj8Ih3gvPpdnqxMRdY4qhxTQ= - dependencies: - is-primitive "^2.0.0" - -is-extendable@^0.1.0, is-extendable@^0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-0.1.1.tgz#62b110e289a471418e3ec36a617d472e301dfc89" - integrity sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik= - -is-extendable@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-1.0.1.tgz#a7470f9e426733d81bd81e1155264e3a3507cab4" - integrity sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA== - dependencies: - is-plain-object "^2.0.4" - -is-extglob@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-1.0.0.tgz#ac468177c4943405a092fc8f29760c6ffc6206c0" - integrity sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA= - -is-finite@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/is-finite/-/is-finite-1.0.2.tgz#cc6677695602be550ef11e8b4aa6305342b6d0aa" - integrity sha1-zGZ3aVYCvlUO8R6LSqYwU0K20Ko= - dependencies: - number-is-nan "^1.0.0" - -is-fullwidth-code-point@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz#ef9e31386f031a7f0d643af82fde50c457ef00cb" - integrity sha1-754xOG8DGn8NZDr4L95QxFfvAMs= - dependencies: - number-is-nan "^1.0.0" - -is-fullwidth-code-point@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz#a3b30a5c4f199183167aaab93beefae3ddfb654f" - integrity sha1-o7MKXE8ZkYMWeqq5O+764937ZU8= - -is-generator-fn@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-generator-fn/-/is-generator-fn-1.0.0.tgz#969d49e1bb3329f6bb7f09089be26578b2ddd46a" - integrity sha1-lp1J4bszKfa7fwkIm+JleLLd1Go= - -is-glob@^2.0.0, is-glob@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-2.0.1.tgz#d096f926a3ded5600f3fdfd91198cb0888c2d863" - integrity sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM= - dependencies: - is-extglob "^1.0.0" - -is-number@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/is-number/-/is-number-2.1.0.tgz#01fcbbb393463a548f2f466cce16dece49db908f" - integrity sha1-Afy7s5NGOlSPL0ZszhbezknbkI8= - dependencies: - kind-of "^3.0.2" - -is-number@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/is-number/-/is-number-3.0.0.tgz#24fd6201a4782cf50561c810276afc7d12d71195" - integrity sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU= - dependencies: - kind-of "^3.0.2" - -is-number@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/is-number/-/is-number-4.0.0.tgz#0026e37f5454d73e356dfe6564699867c6a7f0ff" - integrity sha512-rSklcAIlf1OmFdyAqbnWTLVelsQ58uvZ66S/ZyawjWqIviTWCjg2PzVGw8WUA+nNuPTqb4wgA+NszrJ+08LlgQ== - -is-plain-object@^2.0.1, is-plain-object@^2.0.3, is-plain-object@^2.0.4: - version "2.0.4" - resolved "https://registry.yarnpkg.com/is-plain-object/-/is-plain-object-2.0.4.tgz#2c163b3fafb1b606d9d17928f05c2a1c38e07677" - integrity sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og== - dependencies: - isobject "^3.0.1" - -is-posix-bracket@^0.1.0: - version "0.1.1" - resolved "https://registry.yarnpkg.com/is-posix-bracket/-/is-posix-bracket-0.1.1.tgz#3334dc79774368e92f016e6fbc0a88f5cd6e6bc4" - integrity sha1-MzTceXdDaOkvAW5vvAqI9c1ua8Q= - -is-primitive@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/is-primitive/-/is-primitive-2.0.0.tgz#207bab91638499c07b2adf240a41a87210034575" - integrity sha1-IHurkWOEmcB7Kt8kCkGochADRXU= - -is-regex@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.0.4.tgz#5517489b547091b0930e095654ced25ee97e9491" - integrity sha1-VRdIm1RwkbCTDglWVM7SXul+lJE= - dependencies: - has "^1.0.1" - -is-stream@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-1.1.0.tgz#12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44" - integrity sha1-EtSj3U5o4Lec6428hBc66A2RykQ= - -is-symbol@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/is-symbol/-/is-symbol-1.0.2.tgz#a055f6ae57192caee329e7a860118b497a950f38" - integrity sha512-HS8bZ9ox60yCJLH9snBpIwv9pYUAkcuLhSA1oero1UB5y9aiQpRA8y2ex945AOtCZL1lJDeIk3G5LthswI46Lw== - dependencies: - has-symbols "^1.0.0" - -is-typedarray@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a" - integrity sha1-5HnICFjfDBsR3dppQPlgEfzaSpo= - -is-utf8@^0.2.0: - version "0.2.1" - resolved "https://registry.yarnpkg.com/is-utf8/-/is-utf8-0.2.1.tgz#4b0da1442104d1b336340e80797e865cf39f7d72" - integrity sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI= - -is-windows@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/is-windows/-/is-windows-1.0.2.tgz#d1850eb9791ecd18e6182ce12a30f396634bb19d" - integrity sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA== - -isarray@1.0.0, isarray@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" - integrity sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE= - -isexe@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" - integrity sha1-6PvzdNxVb/iUehDcsFctYz8s+hA= - -isobject@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/isobject/-/isobject-2.1.0.tgz#f065561096a3f1da2ef46272f815c840d87e0c89" - integrity sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk= - dependencies: - isarray "1.0.0" - -isobject@^3.0.0, isobject@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/isobject/-/isobject-3.0.1.tgz#4e431e92b11a9731636aa1f9c8d1ccbcfdab78df" - integrity sha1-TkMekrEalzFjaqH5yNHMvP2reN8= - -isstream@~0.1.2: - version "0.1.2" - resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a" - integrity sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo= - -istanbul-api@^1.3.1: - version "1.3.7" - resolved "https://registry.yarnpkg.com/istanbul-api/-/istanbul-api-1.3.7.tgz#a86c770d2b03e11e3f778cd7aedd82d2722092aa" - integrity sha512-4/ApBnMVeEPG3EkSzcw25wDe4N66wxwn+KKn6b47vyek8Xb3NBAcg4xfuQbS7BqcZuTX4wxfD5lVagdggR3gyA== - dependencies: - async "^2.1.4" - fileset "^2.0.2" - istanbul-lib-coverage "^1.2.1" - istanbul-lib-hook "^1.2.2" - istanbul-lib-instrument "^1.10.2" - istanbul-lib-report "^1.1.5" - istanbul-lib-source-maps "^1.2.6" - istanbul-reports "^1.5.1" - js-yaml "^3.7.0" - mkdirp "^0.5.1" - once "^1.4.0" - -istanbul-lib-coverage@^1.2.0, istanbul-lib-coverage@^1.2.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/istanbul-lib-coverage/-/istanbul-lib-coverage-1.2.1.tgz#ccf7edcd0a0bb9b8f729feeb0930470f9af664f0" - integrity sha512-PzITeunAgyGbtY1ibVIUiV679EFChHjoMNRibEIobvmrCRaIgwLxNucOSimtNWUhEib/oO7QY2imD75JVgCJWQ== - -istanbul-lib-hook@^1.2.2: - version "1.2.2" - resolved "https://registry.yarnpkg.com/istanbul-lib-hook/-/istanbul-lib-hook-1.2.2.tgz#bc6bf07f12a641fbf1c85391d0daa8f0aea6bf86" - integrity sha512-/Jmq7Y1VeHnZEQ3TL10VHyb564mn6VrQXHchON9Jf/AEcmQ3ZIiyD1BVzNOKTZf/G3gE+kiGK6SmpF9y3qGPLw== - dependencies: - append-transform "^0.4.0" - -istanbul-lib-instrument@^1.10.1, istanbul-lib-instrument@^1.10.2: - version "1.10.2" - resolved "https://registry.yarnpkg.com/istanbul-lib-instrument/-/istanbul-lib-instrument-1.10.2.tgz#1f55ed10ac3c47f2bdddd5307935126754d0a9ca" - integrity sha512-aWHxfxDqvh/ZlxR8BBaEPVSWDPUkGD63VjGQn3jcw8jCp7sHEMKcrj4xfJn/ABzdMEHiQNyvDQhqm5o8+SQg7A== - dependencies: - babel-generator "^6.18.0" - babel-template "^6.16.0" - babel-traverse "^6.18.0" - babel-types "^6.18.0" - babylon "^6.18.0" - istanbul-lib-coverage "^1.2.1" - semver "^5.3.0" - -istanbul-lib-report@^1.1.5: - version "1.1.5" - resolved "https://registry.yarnpkg.com/istanbul-lib-report/-/istanbul-lib-report-1.1.5.tgz#f2a657fc6282f96170aaf281eb30a458f7f4170c" - integrity sha512-UsYfRMoi6QO/doUshYNqcKJqVmFe9w51GZz8BS3WB0lYxAllQYklka2wP9+dGZeHYaWIdcXUx8JGdbqaoXRXzw== - dependencies: - istanbul-lib-coverage "^1.2.1" - mkdirp "^0.5.1" - path-parse "^1.0.5" - supports-color "^3.1.2" - -istanbul-lib-source-maps@^1.2.4, istanbul-lib-source-maps@^1.2.6: - version "1.2.6" - resolved "https://registry.yarnpkg.com/istanbul-lib-source-maps/-/istanbul-lib-source-maps-1.2.6.tgz#37b9ff661580f8fca11232752ee42e08c6675d8f" - integrity sha512-TtbsY5GIHgbMsMiRw35YBHGpZ1DVFEO19vxxeiDMYaeOFOCzfnYVxvl6pOUIZR4dtPhAGpSMup8OyF8ubsaqEg== - dependencies: - debug "^3.1.0" - istanbul-lib-coverage "^1.2.1" - mkdirp "^0.5.1" - rimraf "^2.6.1" - source-map "^0.5.3" - -istanbul-reports@^1.5.1: - version "1.5.1" - resolved "https://registry.yarnpkg.com/istanbul-reports/-/istanbul-reports-1.5.1.tgz#97e4dbf3b515e8c484caea15d6524eebd3ff4e1a" - integrity sha512-+cfoZ0UXzWjhAdzosCPP3AN8vvef8XDkWtTfgaN+7L3YTpNYITnCaEkceo5SEYy644VkHka/P1FvkWvrG/rrJw== - dependencies: - handlebars "^4.0.3" - -jest-changed-files@^23.4.2: - version "23.4.2" - resolved "https://registry.yarnpkg.com/jest-changed-files/-/jest-changed-files-23.4.2.tgz#1eed688370cd5eebafe4ae93d34bb3b64968fe83" - integrity sha512-EyNhTAUWEfwnK0Is/09LxoqNDOn7mU7S3EHskG52djOFS/z+IT0jT3h3Ql61+dklcG7bJJitIWEMB4Sp1piHmA== - dependencies: - throat "^4.0.0" - -jest-cli@^23.6.0: - version "23.6.0" - resolved "https://registry.yarnpkg.com/jest-cli/-/jest-cli-23.6.0.tgz#61ab917744338f443ef2baa282ddffdd658a5da4" - integrity sha512-hgeD1zRUp1E1zsiyOXjEn4LzRLWdJBV//ukAHGlx6s5mfCNJTbhbHjgxnDUXA8fsKWN/HqFFF6X5XcCwC/IvYQ== - dependencies: - ansi-escapes "^3.0.0" - chalk "^2.0.1" - exit "^0.1.2" - glob "^7.1.2" - graceful-fs "^4.1.11" - import-local "^1.0.0" - is-ci "^1.0.10" - istanbul-api "^1.3.1" - istanbul-lib-coverage "^1.2.0" - istanbul-lib-instrument "^1.10.1" - istanbul-lib-source-maps "^1.2.4" - jest-changed-files "^23.4.2" - jest-config "^23.6.0" - jest-environment-jsdom "^23.4.0" - jest-get-type "^22.1.0" - jest-haste-map "^23.6.0" - jest-message-util "^23.4.0" - jest-regex-util "^23.3.0" - jest-resolve-dependencies "^23.6.0" - jest-runner "^23.6.0" - jest-runtime "^23.6.0" - jest-snapshot "^23.6.0" - jest-util "^23.4.0" - jest-validate "^23.6.0" - jest-watcher "^23.4.0" - jest-worker "^23.2.0" - micromatch "^2.3.11" - node-notifier "^5.2.1" - prompts "^0.1.9" - realpath-native "^1.0.0" - rimraf "^2.5.4" - slash "^1.0.0" - string-length "^2.0.0" - strip-ansi "^4.0.0" - which "^1.2.12" - yargs "^11.0.0" - -jest-config@^23.6.0: - version "23.6.0" - resolved "https://registry.yarnpkg.com/jest-config/-/jest-config-23.6.0.tgz#f82546a90ade2d8c7026fbf6ac5207fc22f8eb1d" - integrity sha512-i8V7z9BeDXab1+VNo78WM0AtWpBRXJLnkT+lyT+Slx/cbP5sZJ0+NDuLcmBE5hXAoK0aUp7vI+MOxR+R4d8SRQ== - dependencies: - babel-core "^6.0.0" - babel-jest "^23.6.0" - chalk "^2.0.1" - glob "^7.1.1" - jest-environment-jsdom "^23.4.0" - jest-environment-node "^23.4.0" - jest-get-type "^22.1.0" - jest-jasmine2 "^23.6.0" - jest-regex-util "^23.3.0" - jest-resolve "^23.6.0" - jest-util "^23.4.0" - jest-validate "^23.6.0" - micromatch "^2.3.11" - pretty-format "^23.6.0" - -jest-diff@^23.6.0: - version "23.6.0" - resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-23.6.0.tgz#1500f3f16e850bb3d71233408089be099f610c7d" - integrity sha512-Gz9l5Ov+X3aL5L37IT+8hoCUsof1CVYBb2QEkOupK64XyRR3h+uRpYIm97K7sY8diFxowR8pIGEdyfMKTixo3g== - dependencies: - chalk "^2.0.1" - diff "^3.2.0" - jest-get-type "^22.1.0" - pretty-format "^23.6.0" - -jest-docblock@^23.2.0: - version "23.2.0" - resolved "https://registry.yarnpkg.com/jest-docblock/-/jest-docblock-23.2.0.tgz#f085e1f18548d99fdd69b20207e6fd55d91383a7" - integrity sha1-8IXh8YVI2Z/dabICB+b9VdkTg6c= - dependencies: - detect-newline "^2.1.0" - -jest-each@^23.6.0: - version "23.6.0" - resolved "https://registry.yarnpkg.com/jest-each/-/jest-each-23.6.0.tgz#ba0c3a82a8054387016139c733a05242d3d71575" - integrity sha512-x7V6M/WGJo6/kLoissORuvLIeAoyo2YqLOoCDkohgJ4XOXSqOtyvr8FbInlAWS77ojBsZrafbozWoKVRdtxFCg== - dependencies: - chalk "^2.0.1" - pretty-format "^23.6.0" - -jest-environment-jsdom@^23.4.0: - version "23.4.0" - resolved "https://registry.yarnpkg.com/jest-environment-jsdom/-/jest-environment-jsdom-23.4.0.tgz#056a7952b3fea513ac62a140a2c368c79d9e6023" - integrity sha1-BWp5UrP+pROsYqFAosNox52eYCM= - dependencies: - jest-mock "^23.2.0" - jest-util "^23.4.0" - jsdom "^11.5.1" - -jest-environment-node@^23.4.0: - version "23.4.0" - resolved "https://registry.yarnpkg.com/jest-environment-node/-/jest-environment-node-23.4.0.tgz#57e80ed0841dea303167cce8cd79521debafde10" - integrity sha1-V+gO0IQd6jAxZ8zozXlSHeuv3hA= - dependencies: - jest-mock "^23.2.0" - jest-util "^23.4.0" - -jest-get-type@^22.1.0: - version "22.4.3" - resolved "https://registry.yarnpkg.com/jest-get-type/-/jest-get-type-22.4.3.tgz#e3a8504d8479342dd4420236b322869f18900ce4" - integrity sha512-/jsz0Y+V29w1chdXVygEKSz2nBoHoYqNShPe+QgxSNjAuP1i8+k4LbQNrfoliKej0P45sivkSCh7yiD6ubHS3w== - -jest-haste-map@^23.6.0: - version "23.6.0" - resolved "https://registry.yarnpkg.com/jest-haste-map/-/jest-haste-map-23.6.0.tgz#2e3eb997814ca696d62afdb3f2529f5bbc935e16" - integrity sha512-uyNhMyl6dr6HaXGHp8VF7cK6KpC6G9z9LiMNsst+rJIZ8l7wY0tk8qwjPmEghczojZ2/ZhtEdIabZ0OQRJSGGg== - dependencies: - fb-watchman "^2.0.0" - graceful-fs "^4.1.11" - invariant "^2.2.4" - jest-docblock "^23.2.0" - jest-serializer "^23.0.1" - jest-worker "^23.2.0" - micromatch "^2.3.11" - sane "^2.0.0" - -jest-jasmine2@^23.6.0: - version "23.6.0" - resolved "https://registry.yarnpkg.com/jest-jasmine2/-/jest-jasmine2-23.6.0.tgz#840e937f848a6c8638df24360ab869cc718592e0" - integrity sha512-pe2Ytgs1nyCs8IvsEJRiRTPC0eVYd8L/dXJGU08GFuBwZ4sYH/lmFDdOL3ZmvJR8QKqV9MFuwlsAi/EWkFUbsQ== - dependencies: - babel-traverse "^6.0.0" - chalk "^2.0.1" - co "^4.6.0" - expect "^23.6.0" - is-generator-fn "^1.0.0" - jest-diff "^23.6.0" - jest-each "^23.6.0" - jest-matcher-utils "^23.6.0" - jest-message-util "^23.4.0" - jest-snapshot "^23.6.0" - jest-util "^23.4.0" - pretty-format "^23.6.0" - -jest-leak-detector@^23.6.0: - version "23.6.0" - resolved "https://registry.yarnpkg.com/jest-leak-detector/-/jest-leak-detector-23.6.0.tgz#e4230fd42cf381a1a1971237ad56897de7e171de" - integrity sha512-f/8zA04rsl1Nzj10HIyEsXvYlMpMPcy0QkQilVZDFOaPbv2ur71X5u2+C4ZQJGyV/xvVXtCCZ3wQ99IgQxftCg== - dependencies: - pretty-format "^23.6.0" - -jest-matcher-utils@^23.6.0: - version "23.6.0" - resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-23.6.0.tgz#726bcea0c5294261a7417afb6da3186b4b8cac80" - integrity sha512-rosyCHQfBcol4NsckTn01cdelzWLU9Cq7aaigDf8VwwpIRvWE/9zLgX2bON+FkEW69/0UuYslUe22SOdEf2nog== - dependencies: - chalk "^2.0.1" - jest-get-type "^22.1.0" - pretty-format "^23.6.0" - -jest-message-util@^23.4.0: - version "23.4.0" - resolved "https://registry.yarnpkg.com/jest-message-util/-/jest-message-util-23.4.0.tgz#17610c50942349508d01a3d1e0bda2c079086a9f" - integrity sha1-F2EMUJQjSVCNAaPR4L2iwHkIap8= - dependencies: - "@babel/code-frame" "^7.0.0-beta.35" - chalk "^2.0.1" - micromatch "^2.3.11" - slash "^1.0.0" - stack-utils "^1.0.1" - -jest-mock@^23.2.0: - version "23.2.0" - resolved "https://registry.yarnpkg.com/jest-mock/-/jest-mock-23.2.0.tgz#ad1c60f29e8719d47c26e1138098b6d18b261134" - integrity sha1-rRxg8p6HGdR8JuETgJi20YsmETQ= - -jest-regex-util@^23.3.0: - version "23.3.0" - resolved "https://registry.yarnpkg.com/jest-regex-util/-/jest-regex-util-23.3.0.tgz#5f86729547c2785c4002ceaa8f849fe8ca471bc5" - integrity sha1-X4ZylUfCeFxAAs6qj4Sf6MpHG8U= - -jest-resolve-dependencies@^23.6.0: - version "23.6.0" - resolved "https://registry.yarnpkg.com/jest-resolve-dependencies/-/jest-resolve-dependencies-23.6.0.tgz#b4526af24c8540d9a3fab102c15081cf509b723d" - integrity sha512-EkQWkFWjGKwRtRyIwRwI6rtPAEyPWlUC2MpzHissYnzJeHcyCn1Hc8j7Nn1xUVrS5C6W5+ZL37XTem4D4pLZdA== - dependencies: - jest-regex-util "^23.3.0" - jest-snapshot "^23.6.0" - -jest-resolve@^23.6.0: - version "23.6.0" - resolved "https://registry.yarnpkg.com/jest-resolve/-/jest-resolve-23.6.0.tgz#cf1d1a24ce7ee7b23d661c33ba2150f3aebfa0ae" - integrity sha512-XyoRxNtO7YGpQDmtQCmZjum1MljDqUCob7XlZ6jy9gsMugHdN2hY4+Acz9Qvjz2mSsOnPSH7skBmDYCHXVZqkA== - dependencies: - browser-resolve "^1.11.3" - chalk "^2.0.1" - realpath-native "^1.0.0" - -jest-runner@^23.6.0: - version "23.6.0" - resolved "https://registry.yarnpkg.com/jest-runner/-/jest-runner-23.6.0.tgz#3894bd219ffc3f3cb94dc48a4170a2e6f23a5a38" - integrity sha512-kw0+uj710dzSJKU6ygri851CObtCD9cN8aNkg8jWJf4ewFyEa6kwmiH/r/M1Ec5IL/6VFa0wnAk6w+gzUtjJzA== - dependencies: - exit "^0.1.2" - graceful-fs "^4.1.11" - jest-config "^23.6.0" - jest-docblock "^23.2.0" - jest-haste-map "^23.6.0" - jest-jasmine2 "^23.6.0" - jest-leak-detector "^23.6.0" - jest-message-util "^23.4.0" - jest-runtime "^23.6.0" - jest-util "^23.4.0" - jest-worker "^23.2.0" - source-map-support "^0.5.6" - throat "^4.0.0" - -jest-runtime@^23.6.0: - version "23.6.0" - resolved "https://registry.yarnpkg.com/jest-runtime/-/jest-runtime-23.6.0.tgz#059e58c8ab445917cd0e0d84ac2ba68de8f23082" - integrity sha512-ycnLTNPT2Gv+TRhnAYAQ0B3SryEXhhRj1kA6hBPSeZaNQkJ7GbZsxOLUkwg6YmvWGdX3BB3PYKFLDQCAE1zNOw== - dependencies: - babel-core "^6.0.0" - babel-plugin-istanbul "^4.1.6" - chalk "^2.0.1" - convert-source-map "^1.4.0" - exit "^0.1.2" - fast-json-stable-stringify "^2.0.0" - graceful-fs "^4.1.11" - jest-config "^23.6.0" - jest-haste-map "^23.6.0" - jest-message-util "^23.4.0" - jest-regex-util "^23.3.0" - jest-resolve "^23.6.0" - jest-snapshot "^23.6.0" - jest-util "^23.4.0" - jest-validate "^23.6.0" - micromatch "^2.3.11" - realpath-native "^1.0.0" - slash "^1.0.0" - strip-bom "3.0.0" - write-file-atomic "^2.1.0" - yargs "^11.0.0" - -jest-serializer@^23.0.1: - version "23.0.1" - resolved "https://registry.yarnpkg.com/jest-serializer/-/jest-serializer-23.0.1.tgz#a3776aeb311e90fe83fab9e533e85102bd164165" - integrity sha1-o3dq6zEekP6D+rnlM+hRAr0WQWU= - -jest-snapshot@^23.6.0: - version "23.6.0" - resolved "https://registry.yarnpkg.com/jest-snapshot/-/jest-snapshot-23.6.0.tgz#f9c2625d1b18acda01ec2d2b826c0ce58a5aa17a" - integrity sha512-tM7/Bprftun6Cvj2Awh/ikS7zV3pVwjRYU2qNYS51VZHgaAMBs5l4o/69AiDHhQrj5+LA2Lq4VIvK7zYk/bswg== - dependencies: - babel-types "^6.0.0" - chalk "^2.0.1" - jest-diff "^23.6.0" - jest-matcher-utils "^23.6.0" - jest-message-util "^23.4.0" - jest-resolve "^23.6.0" - mkdirp "^0.5.1" - natural-compare "^1.4.0" - pretty-format "^23.6.0" - semver "^5.5.0" - -jest-util@^23.4.0: - version "23.4.0" - resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-23.4.0.tgz#4d063cb927baf0a23831ff61bec2cbbf49793561" - integrity sha1-TQY8uSe68KI4Mf9hvsLLv0l5NWE= - dependencies: - callsites "^2.0.0" - chalk "^2.0.1" - graceful-fs "^4.1.11" - is-ci "^1.0.10" - jest-message-util "^23.4.0" - mkdirp "^0.5.1" - slash "^1.0.0" - source-map "^0.6.0" - -jest-validate@^23.6.0: - version "23.6.0" - resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-23.6.0.tgz#36761f99d1ed33fcd425b4e4c5595d62b6597474" - integrity sha512-OFKapYxe72yz7agrDAWi8v2WL8GIfVqcbKRCLbRG9PAxtzF9b1SEDdTpytNDN12z2fJynoBwpMpvj2R39plI2A== - dependencies: - chalk "^2.0.1" - jest-get-type "^22.1.0" - leven "^2.1.0" - pretty-format "^23.6.0" - -jest-watcher@^23.4.0: - version "23.4.0" - resolved "https://registry.yarnpkg.com/jest-watcher/-/jest-watcher-23.4.0.tgz#d2e28ce74f8dad6c6afc922b92cabef6ed05c91c" - integrity sha1-0uKM50+NrWxq/JIrksq+9u0FyRw= - dependencies: - ansi-escapes "^3.0.0" - chalk "^2.0.1" - string-length "^2.0.0" - -jest-worker@^23.2.0: - version "23.2.0" - resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-23.2.0.tgz#faf706a8da36fae60eb26957257fa7b5d8ea02b9" - integrity sha1-+vcGqNo2+uYOsmlXJX+ntdjqArk= - dependencies: - merge-stream "^1.0.1" - -jest@^23.6.0: - version "23.6.0" - resolved "https://registry.yarnpkg.com/jest/-/jest-23.6.0.tgz#ad5835e923ebf6e19e7a1d7529a432edfee7813d" - integrity sha512-lWzcd+HSiqeuxyhG+EnZds6iO3Y3ZEnMrfZq/OTGvF/C+Z4fPMCdhWTGSAiO2Oym9rbEXfwddHhh6jqrTF3+Lw== - dependencies: - import-local "^1.0.0" - jest-cli "^23.6.0" - -"js-tokens@^3.0.0 || ^4.0.0", js-tokens@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" - integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== - -js-tokens@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.2.tgz#9866df395102130e38f7f996bceb65443209c25b" - integrity sha1-mGbfOVECEw449/mWvOtlRDIJwls= - -js-yaml@^3.7.0: - version "3.12.1" - resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.12.1.tgz#295c8632a18a23e054cf5c9d3cecafe678167600" - integrity sha512-um46hB9wNOKlwkHgiuyEVAybXBjwFUV0Z/RaHJblRd9DXltue9FTYvzCr9ErQrK9Adz5MU4gHWVaNUfdmrC8qA== - dependencies: - argparse "^1.0.7" - esprima "^4.0.0" - -jsbn@~0.1.0: - version "0.1.1" - resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513" - integrity sha1-peZUwuWi3rXyAdls77yoDA7y9RM= - -jsdom@^11.5.1: - version "11.12.0" - resolved "https://registry.yarnpkg.com/jsdom/-/jsdom-11.12.0.tgz#1a80d40ddd378a1de59656e9e6dc5a3ba8657bc8" - integrity sha512-y8Px43oyiBM13Zc1z780FrfNLJCXTL40EWlty/LXUtcjykRBNgLlCjWXpfSPBl2iv+N7koQN+dvqszHZgT/Fjw== - dependencies: - abab "^2.0.0" - acorn "^5.5.3" - acorn-globals "^4.1.0" - array-equal "^1.0.0" - cssom ">= 0.3.2 < 0.4.0" - cssstyle "^1.0.0" - data-urls "^1.0.0" - domexception "^1.0.1" - escodegen "^1.9.1" - html-encoding-sniffer "^1.0.2" - left-pad "^1.3.0" - nwsapi "^2.0.7" - parse5 "4.0.0" - pn "^1.1.0" - request "^2.87.0" - request-promise-native "^1.0.5" - sax "^1.2.4" - symbol-tree "^3.2.2" - tough-cookie "^2.3.4" - w3c-hr-time "^1.0.1" - webidl-conversions "^4.0.2" - whatwg-encoding "^1.0.3" - whatwg-mimetype "^2.1.0" - whatwg-url "^6.4.1" - ws "^5.2.0" - xml-name-validator "^3.0.0" - -jsesc@^1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-1.3.0.tgz#46c3fec8c1892b12b0833db9bc7622176dbab34b" - integrity sha1-RsP+yMGJKxKwgz25vHYiF226s0s= - -json-schema-traverse@^0.4.1: - version "0.4.1" - resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660" - integrity sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg== - -json-schema@0.2.3: - version "0.2.3" - resolved "https://registry.yarnpkg.com/json-schema/-/json-schema-0.2.3.tgz#b480c892e59a2f05954ce727bd3f2a4e882f9e13" - integrity sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM= - -json-stringify-safe@~5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb" - integrity sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus= - -json5@2.x: - version "2.1.0" - resolved "https://registry.yarnpkg.com/json5/-/json5-2.1.0.tgz#e7a0c62c48285c628d20a10b85c89bb807c32850" - integrity sha512-8Mh9h6xViijj36g7Dxi+Y4S6hNGV96vcJZr/SrlHh1LR/pEn/8j/+qIBbs44YKl69Lrfctp4QD+AdWLTMqEZAQ== - dependencies: - minimist "^1.2.0" - -json5@^0.5.1: - version "0.5.1" - resolved "https://registry.yarnpkg.com/json5/-/json5-0.5.1.tgz#1eade7acc012034ad84e2396767ead9fa5495821" - integrity sha1-Hq3nrMASA0rYTiOWdn6tn6VJWCE= - -jsprim@^1.2.2: - version "1.4.1" - resolved "https://registry.yarnpkg.com/jsprim/-/jsprim-1.4.1.tgz#313e66bc1e5cc06e438bc1b7499c2e5c56acb6a2" - integrity sha1-MT5mvB5cwG5Di8G3SZwuXFastqI= - dependencies: - assert-plus "1.0.0" - extsprintf "1.3.0" - json-schema "0.2.3" - verror "1.10.0" - -kind-of@^3.0.2, kind-of@^3.0.3, kind-of@^3.2.0: - version "3.2.2" - resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-3.2.2.tgz#31ea21a734bab9bbb0f32466d893aea51e4a3c64" - integrity sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ= - dependencies: - is-buffer "^1.1.5" - -kind-of@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-4.0.0.tgz#20813df3d712928b207378691a45066fae72dd57" - integrity sha1-IIE989cSkosgc3hpGkUGb65y3Vc= - dependencies: - is-buffer "^1.1.5" - -kind-of@^5.0.0: - version "5.1.0" - resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-5.1.0.tgz#729c91e2d857b7a419a1f9aa65685c4c33f5845d" - integrity sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw== - -kind-of@^6.0.0, kind-of@^6.0.2: - version "6.0.2" - resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-6.0.2.tgz#01146b36a6218e64e58f3a8d66de5d7fc6f6d051" - integrity sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA== - -kleur@^2.0.1: - version "2.0.2" - resolved "https://registry.yarnpkg.com/kleur/-/kleur-2.0.2.tgz#b704f4944d95e255d038f0cb05fb8a602c55a300" - integrity sha512-77XF9iTllATmG9lSlIv0qdQ2BQ/h9t0bJllHlbvsQ0zUWfU7Yi0S8L5JXzPZgkefIiajLmBJJ4BsMJmqcf7oxQ== - -lcid@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/lcid/-/lcid-1.0.0.tgz#308accafa0bc483a3867b4b6f2b9506251d1b835" - integrity sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU= - dependencies: - invert-kv "^1.0.0" - -left-pad@^1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/left-pad/-/left-pad-1.3.0.tgz#5b8a3a7765dfe001261dde915589e782f8c94d1e" - integrity sha512-XI5MPzVNApjAyhQzphX8BkmKsKUxD4LdyK24iZeQGinBN9yTQT3bFlCBy/aVx2HrNcqQGsdot8ghrjyrvMCoEA== - -leven@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/leven/-/leven-2.1.0.tgz#c2e7a9f772094dee9d34202ae8acce4687875580" - integrity sha1-wuep93IJTe6dNCAq6KzORoeHVYA= - -levn@~0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/levn/-/levn-0.3.0.tgz#3b09924edf9f083c0490fdd4c0bc4421e04764ee" - integrity sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4= - dependencies: - prelude-ls "~1.1.2" - type-check "~0.3.2" - -load-json-file@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-1.1.0.tgz#956905708d58b4bab4c2261b04f59f31c99374c0" - integrity sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA= - dependencies: - graceful-fs "^4.1.2" - parse-json "^2.2.0" - pify "^2.0.0" - pinkie-promise "^2.0.0" - strip-bom "^2.0.0" - -locate-path@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-2.0.0.tgz#2b568b265eec944c6d9c0de9c3dbbbca0354cd8e" - integrity sha1-K1aLJl7slExtnA3pw9u7ygNUzY4= - dependencies: - p-locate "^2.0.0" - path-exists "^3.0.0" - -lodash.sortby@^4.7.0: - version "4.7.0" - resolved "https://registry.yarnpkg.com/lodash.sortby/-/lodash.sortby-4.7.0.tgz#edd14c824e2cc9c1e0b0a1b42bb5210516a42438" - integrity sha1-7dFMgk4sycHgsKG0K7UhBRakJDg= - -lodash@^4.13.1, lodash@^4.17.10, lodash@^4.17.4: - version "4.17.11" - resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.11.tgz#b39ea6229ef607ecd89e2c8df12536891cac9b8d" - integrity sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg== - -loose-envify@^1.0.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.4.0.tgz#71ee51fa7be4caec1a63839f7e682d8132d30caf" - integrity sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q== - dependencies: - js-tokens "^3.0.0 || ^4.0.0" - -lru-cache@^4.0.1: - version "4.1.5" - resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-4.1.5.tgz#8bbe50ea85bed59bc9e33dcab8235ee9bcf443cd" - integrity sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g== - dependencies: - pseudomap "^1.0.2" - yallist "^2.1.2" - -make-error@1.x: - version "1.3.5" - resolved "https://registry.yarnpkg.com/make-error/-/make-error-1.3.5.tgz#efe4e81f6db28cadd605c70f29c831b58ef776c8" - integrity sha512-c3sIjNUow0+8swNwVpqoH4YCShKNFkMaw6oH1mNS2haDZQqkeZFlHS3dhoeEbKKmJB4vXpJucU6oH75aDYeE9g== - -makeerror@1.0.x: - version "1.0.11" - resolved "https://registry.yarnpkg.com/makeerror/-/makeerror-1.0.11.tgz#e01a5c9109f2af79660e4e8b9587790184f5a96c" - integrity sha1-4BpckQnyr3lmDk6LlYd5AYT1qWw= - dependencies: - tmpl "1.0.x" - -map-cache@^0.2.2: - version "0.2.2" - resolved "https://registry.yarnpkg.com/map-cache/-/map-cache-0.2.2.tgz#c32abd0bd6525d9b051645bb4f26ac5dc98a0dbf" - integrity sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8= - -map-visit@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/map-visit/-/map-visit-1.0.0.tgz#ecdca8f13144e660f1b5bd41f12f3479d98dfb8f" - integrity sha1-7Nyo8TFE5mDxtb1B8S80edmN+48= - dependencies: - object-visit "^1.0.0" - -math-random@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/math-random/-/math-random-1.0.1.tgz#8b3aac588b8a66e4975e3cdea67f7bb329601fac" - integrity sha1-izqsWIuKZuSXXjzepn97sylgH6w= - -mem@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/mem/-/mem-1.1.0.tgz#5edd52b485ca1d900fe64895505399a0dfa45f76" - integrity sha1-Xt1StIXKHZAP5kiVUFOZoN+kX3Y= - dependencies: - mimic-fn "^1.0.0" - -merge-stream@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/merge-stream/-/merge-stream-1.0.1.tgz#4041202d508a342ba00174008df0c251b8c135e1" - integrity sha1-QEEgLVCKNCugAXQAjfDCUbjBNeE= - dependencies: - readable-stream "^2.0.1" - -merge@^1.2.0: - version "1.2.1" - resolved "https://registry.yarnpkg.com/merge/-/merge-1.2.1.tgz#38bebf80c3220a8a487b6fcfb3941bb11720c145" - integrity sha512-VjFo4P5Whtj4vsLzsYBu5ayHhoHJ0UqNm7ibvShmbmoz7tGi0vXaoJbGdB+GmDMLUdg8DpQXEIeVDAe8MaABvQ== - -micromatch@^2.3.11: - version "2.3.11" - resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-2.3.11.tgz#86677c97d1720b363431d04d0d15293bd38c1565" - integrity sha1-hmd8l9FyCzY0MdBNDRUpO9OMFWU= - dependencies: - arr-diff "^2.0.0" - array-unique "^0.2.1" - braces "^1.8.2" - expand-brackets "^0.1.4" - extglob "^0.3.1" - filename-regex "^2.0.0" - is-extglob "^1.0.0" - is-glob "^2.0.1" - kind-of "^3.0.2" - normalize-path "^2.0.1" - object.omit "^2.0.0" - parse-glob "^3.0.4" - regex-cache "^0.4.2" - -micromatch@^3.1.4: - version "3.1.10" - resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-3.1.10.tgz#70859bc95c9840952f359a068a3fc49f9ecfac23" - integrity sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg== - dependencies: - arr-diff "^4.0.0" - array-unique "^0.3.2" - braces "^2.3.1" - define-property "^2.0.2" - extend-shallow "^3.0.2" - extglob "^2.0.4" - fragment-cache "^0.2.1" - kind-of "^6.0.2" - nanomatch "^1.2.9" - object.pick "^1.3.0" - regex-not "^1.0.0" - snapdragon "^0.8.1" - to-regex "^3.0.2" - -mime-db@~1.37.0: - version "1.37.0" - resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.37.0.tgz#0b6a0ce6fdbe9576e25f1f2d2fde8830dc0ad0d8" - integrity sha512-R3C4db6bgQhlIhPU48fUtdVmKnflq+hRdad7IyKhtFj06VPNVdk2RhiYL3UjQIlso8L+YxAtFkobT0VK+S/ybg== - -mime-types@^2.1.12, mime-types@~2.1.19: - version "2.1.21" - resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.21.tgz#28995aa1ecb770742fe6ae7e58f9181c744b3f96" - integrity sha512-3iL6DbwpyLzjR3xHSFNFeb9Nz/M8WDkX33t1GFQnFOllWk8pOrh/LSrB5OXlnlW5P9LH73X6loW/eogc+F5lJg== - dependencies: - mime-db "~1.37.0" - -mimic-fn@^1.0.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-1.2.0.tgz#820c86a39334640e99516928bd03fca88057d022" - integrity sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ== - -minimatch@^3.0.3, minimatch@^3.0.4: - version "3.0.4" - resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" - integrity sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA== - dependencies: - brace-expansion "^1.1.7" - -minimist@0.0.8: - version "0.0.8" - resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d" - integrity sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0= - -minimist@^1.1.1, minimist@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284" - integrity sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ= - -minimist@~0.0.1: - version "0.0.10" - resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.10.tgz#de3f98543dbf96082be48ad1a0c7cda836301dcf" - integrity sha1-3j+YVD2/lggr5IrRoMfNqDYwHc8= - -minipass@^2.2.1, minipass@^2.3.4: - version "2.3.5" - resolved "https://registry.yarnpkg.com/minipass/-/minipass-2.3.5.tgz#cacebe492022497f656b0f0f51e2682a9ed2d848" - integrity sha512-Gi1W4k059gyRbyVUZQ4mEqLm0YIUiGYfvxhF6SIlk3ui1WVxMTGfGdQ2SInh3PDrRTVvPKgULkpJtT4RH10+VA== - dependencies: - safe-buffer "^5.1.2" - yallist "^3.0.0" - -minizlib@^1.1.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/minizlib/-/minizlib-1.2.1.tgz#dd27ea6136243c7c880684e8672bb3a45fd9b614" - integrity sha512-7+4oTUOWKg7AuL3vloEWekXY2/D20cevzsrNT2kGWm+39J9hGTCBv8VI5Pm5lXZ/o3/mdR4f8rflAPhnQb8mPA== - dependencies: - minipass "^2.2.1" - -mixin-deep@^1.2.0: - version "1.3.1" - resolved "https://registry.yarnpkg.com/mixin-deep/-/mixin-deep-1.3.1.tgz#a49e7268dce1a0d9698e45326c5626df3543d0fe" - integrity sha512-8ZItLHeEgaqEvd5lYBXfm4EZSFCX29Jb9K+lAHhDKzReKBQKj3R+7NOF6tjqYi9t4oI8VUfaWITJQm86wnXGNQ== - dependencies: - for-in "^1.0.2" - is-extendable "^1.0.1" - -mkdirp@0.x, mkdirp@^0.5.0, mkdirp@^0.5.1: - version "0.5.1" - resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903" - integrity sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM= - dependencies: - minimist "0.0.8" - -ms@2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" - integrity sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g= - -ms@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.1.tgz#30a5864eb3ebb0a66f2ebe6d727af06a09d86e0a" - integrity sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg== - -nan@^2.9.2: - version "2.12.1" - resolved "https://registry.yarnpkg.com/nan/-/nan-2.12.1.tgz#7b1aa193e9aa86057e3c7bbd0ac448e770925552" - integrity sha512-JY7V6lRkStKcKTvHO5NVSQRv+RV+FIL5pvDoLiAtSL9pKlC5x9PKQcZDsq7m4FO4d57mkhC6Z+QhAh3Jdk5JFw== - -nanomatch@^1.2.9: - version "1.2.13" - resolved "https://registry.yarnpkg.com/nanomatch/-/nanomatch-1.2.13.tgz#b87a8aa4fc0de8fe6be88895b38983ff265bd119" - integrity sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA== - dependencies: - arr-diff "^4.0.0" - array-unique "^0.3.2" - define-property "^2.0.2" - extend-shallow "^3.0.2" - fragment-cache "^0.2.1" - is-windows "^1.0.2" - kind-of "^6.0.2" - object.pick "^1.3.0" - regex-not "^1.0.0" - snapdragon "^0.8.1" - to-regex "^3.0.1" - -natural-compare@^1.4.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" - integrity sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc= - -needle@^2.2.1: - version "2.2.4" - resolved "https://registry.yarnpkg.com/needle/-/needle-2.2.4.tgz#51931bff82533b1928b7d1d69e01f1b00ffd2a4e" - integrity sha512-HyoqEb4wr/rsoaIDfTH2aVL9nWtQqba2/HvMv+++m8u0dz808MaagKILxtfeSN7QU7nvbQ79zk3vYOJp9zsNEA== - dependencies: - debug "^2.1.2" - iconv-lite "^0.4.4" - sax "^1.2.4" - -node-int64@^0.4.0: - version "0.4.0" - resolved "https://registry.yarnpkg.com/node-int64/-/node-int64-0.4.0.tgz#87a9065cdb355d3182d8f94ce11188b825c68a3b" - integrity sha1-h6kGXNs1XTGC2PlM4RGIuCXGijs= - -node-notifier@^5.2.1: - version "5.3.0" - resolved "https://registry.yarnpkg.com/node-notifier/-/node-notifier-5.3.0.tgz#c77a4a7b84038733d5fb351aafd8a268bfe19a01" - integrity sha512-AhENzCSGZnZJgBARsUjnQ7DnZbzyP+HxlVXuD0xqAnvL8q+OqtSX7lGg9e8nHzwXkMMXNdVeqq4E2M3EUAqX6Q== - dependencies: - growly "^1.3.0" - semver "^5.5.0" - shellwords "^0.1.1" - which "^1.3.0" - -node-pre-gyp@^0.10.0: - version "0.10.3" - resolved "https://registry.yarnpkg.com/node-pre-gyp/-/node-pre-gyp-0.10.3.tgz#3070040716afdc778747b61b6887bf78880b80fc" - integrity sha512-d1xFs+C/IPS8Id0qPTZ4bUT8wWryfR/OzzAFxweG+uLN85oPzyo2Iw6bVlLQ/JOdgNonXLCoRyqDzDWq4iw72A== - dependencies: - detect-libc "^1.0.2" - mkdirp "^0.5.1" - needle "^2.2.1" - nopt "^4.0.1" - npm-packlist "^1.1.6" - npmlog "^4.0.2" - rc "^1.2.7" - rimraf "^2.6.1" - semver "^5.3.0" - tar "^4" - -nopt@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/nopt/-/nopt-4.0.1.tgz#d0d4685afd5415193c8c7505602d0d17cd64474d" - integrity sha1-0NRoWv1UFRk8jHUFYC0NF81kR00= - dependencies: - abbrev "1" - osenv "^0.1.4" - -normalize-package-data@^2.3.2: - version "2.4.0" - resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.4.0.tgz#12f95a307d58352075a04907b84ac8be98ac012f" - integrity sha512-9jjUFbTPfEy3R/ad/2oNbKtW9Hgovl5O1FvFWKkKblNXoN/Oou6+9+KKohPK13Yc3/TyunyWhJp6gvRNR/PPAw== - dependencies: - hosted-git-info "^2.1.4" - is-builtin-module "^1.0.0" - semver "2 || 3 || 4 || 5" - validate-npm-package-license "^3.0.1" - -normalize-path@^2.0.1, normalize-path@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-2.1.1.tgz#1ab28b556e198363a8c1a6f7e6fa20137fe6aed9" - integrity sha1-GrKLVW4Zg2Oowab35vogE3/mrtk= - dependencies: - remove-trailing-separator "^1.0.1" - -npm-bundled@^1.0.1: - version "1.0.5" - resolved "https://registry.yarnpkg.com/npm-bundled/-/npm-bundled-1.0.5.tgz#3c1732b7ba936b3a10325aef616467c0ccbcc979" - integrity sha512-m/e6jgWu8/v5niCUKQi9qQl8QdeEduFA96xHDDzFGqly0OOjI7c+60KM/2sppfnUU9JJagf+zs+yGhqSOFj71g== - -npm-packlist@^1.1.6: - version "1.2.0" - resolved "https://registry.yarnpkg.com/npm-packlist/-/npm-packlist-1.2.0.tgz#55a60e793e272f00862c7089274439a4cc31fc7f" - integrity sha512-7Mni4Z8Xkx0/oegoqlcao/JpPCPEMtUvsmB0q7mgvlMinykJLSRTYuFqoQLYgGY8biuxIeiHO+QNJKbCfljewQ== - dependencies: - ignore-walk "^3.0.1" - npm-bundled "^1.0.1" - -npm-run-path@^2.0.0: - version "2.0.2" - resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-2.0.2.tgz#35a9232dfa35d7067b4cb2ddf2357b1871536c5f" - integrity sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8= - dependencies: - path-key "^2.0.0" - -npmlog@^4.0.2: - version "4.1.2" - resolved "https://registry.yarnpkg.com/npmlog/-/npmlog-4.1.2.tgz#08a7f2a8bf734604779a9efa4ad5cc717abb954b" - integrity sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg== - dependencies: - are-we-there-yet "~1.1.2" - console-control-strings "~1.1.0" - gauge "~2.7.3" - set-blocking "~2.0.0" - -number-is-nan@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/number-is-nan/-/number-is-nan-1.0.1.tgz#097b602b53422a522c1afb8790318336941a011d" - integrity sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0= - -nwsapi@^2.0.7: - version "2.0.9" - resolved "https://registry.yarnpkg.com/nwsapi/-/nwsapi-2.0.9.tgz#77ac0cdfdcad52b6a1151a84e73254edc33ed016" - integrity sha512-nlWFSCTYQcHk/6A9FFnfhKc14c3aFhfdNBXgo8Qgi9QTBu/qg3Ww+Uiz9wMzXd1T8GFxPc2QIHB6Qtf2XFryFQ== - -oauth-sign@~0.9.0: - version "0.9.0" - resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.9.0.tgz#47a7b016baa68b5fa0ecf3dee08a85c679ac6455" - integrity sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ== - -object-assign@^4.1.0: - version "4.1.1" - resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" - integrity sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM= - -object-copy@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/object-copy/-/object-copy-0.1.0.tgz#7e7d858b781bd7c991a41ba975ed3812754e998c" - integrity sha1-fn2Fi3gb18mRpBupde04EnVOmYw= - dependencies: - copy-descriptor "^0.1.0" - define-property "^0.2.5" - kind-of "^3.0.3" - -object-keys@^1.0.12: - version "1.0.12" - resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.0.12.tgz#09c53855377575310cca62f55bb334abff7b3ed2" - integrity sha512-FTMyFUm2wBcGHnH2eXmz7tC6IwlqQZ6mVZ+6dm6vZ4IQIHjs6FdNsQBuKGPuUUUY6NfJw2PshC08Tn6LzLDOag== - -object-visit@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/object-visit/-/object-visit-1.0.1.tgz#f79c4493af0c5377b59fe39d395e41042dd045bb" - integrity sha1-95xEk68MU3e1n+OdOV5BBC3QRbs= - dependencies: - isobject "^3.0.0" - -object.getownpropertydescriptors@^2.0.3: - version "2.0.3" - resolved "https://registry.yarnpkg.com/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.0.3.tgz#8758c846f5b407adab0f236e0986f14b051caa16" - integrity sha1-h1jIRvW0B62rDyNuCYbxSwUcqhY= - dependencies: - define-properties "^1.1.2" - es-abstract "^1.5.1" - -object.omit@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/object.omit/-/object.omit-2.0.1.tgz#1a9c744829f39dbb858c76ca3579ae2a54ebd1fa" - integrity sha1-Gpx0SCnznbuFjHbKNXmuKlTr0fo= - dependencies: - for-own "^0.1.4" - is-extendable "^0.1.1" - -object.pick@^1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/object.pick/-/object.pick-1.3.0.tgz#87a10ac4c1694bd2e1cbf53591a66141fb5dd747" - integrity sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c= - dependencies: - isobject "^3.0.1" - -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= - dependencies: - wrappy "1" - -optimist@^0.6.1: - version "0.6.1" - resolved "https://registry.yarnpkg.com/optimist/-/optimist-0.6.1.tgz#da3ea74686fa21a19a111c326e90eb15a0196686" - integrity sha1-2j6nRob6IaGaERwybpDrFaAZZoY= - dependencies: - minimist "~0.0.1" - wordwrap "~0.0.2" - -optionator@^0.8.1: - version "0.8.2" - resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.8.2.tgz#364c5e409d3f4d6301d6c0b4c05bba50180aeb64" - integrity sha1-NkxeQJ0/TWMB1sC0wFu6UBgK62Q= - dependencies: - deep-is "~0.1.3" - fast-levenshtein "~2.0.4" - levn "~0.3.0" - prelude-ls "~1.1.2" - type-check "~0.3.2" - wordwrap "~1.0.0" - -os-homedir@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/os-homedir/-/os-homedir-1.0.2.tgz#ffbc4988336e0e833de0c168c7ef152121aa7fb3" - integrity sha1-/7xJiDNuDoM94MFox+8VISGqf7M= - -os-locale@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/os-locale/-/os-locale-2.1.0.tgz#42bc2900a6b5b8bd17376c8e882b65afccf24bf2" - integrity sha512-3sslG3zJbEYcaC4YVAvDorjGxc7tv6KVATnLPZONiljsUncvihe9BQoVCEs0RZ1kmf4Hk9OBqlZfJZWI4GanKA== - dependencies: - execa "^0.7.0" - lcid "^1.0.0" - mem "^1.1.0" - -os-tmpdir@^1.0.0, os-tmpdir@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" - integrity sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ= - -osenv@^0.1.4: - version "0.1.5" - resolved "https://registry.yarnpkg.com/osenv/-/osenv-0.1.5.tgz#85cdfafaeb28e8677f416e287592b5f3f49ea410" - integrity sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g== - dependencies: - os-homedir "^1.0.0" - os-tmpdir "^1.0.0" - -p-finally@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/p-finally/-/p-finally-1.0.0.tgz#3fbcfb15b899a44123b34b6dcc18b724336a2cae" - integrity sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4= - -p-limit@^1.1.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-1.3.0.tgz#b86bd5f0c25690911c7590fcbfc2010d54b3ccb8" - integrity sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q== - dependencies: - p-try "^1.0.0" - -p-locate@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-2.0.0.tgz#20a0103b222a70c8fd39cc2e580680f3dde5ec43" - integrity sha1-IKAQOyIqcMj9OcwuWAaA893l7EM= - dependencies: - p-limit "^1.1.0" - -p-try@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/p-try/-/p-try-1.0.0.tgz#cbc79cdbaf8fd4228e13f621f2b1a237c1b207b3" - integrity sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M= - -parse-glob@^3.0.4: - version "3.0.4" - resolved "https://registry.yarnpkg.com/parse-glob/-/parse-glob-3.0.4.tgz#b2c376cfb11f35513badd173ef0bb6e3a388391c" - integrity sha1-ssN2z7EfNVE7rdFz7wu246OIORw= - dependencies: - glob-base "^0.3.0" - is-dotfile "^1.0.0" - is-extglob "^1.0.0" - is-glob "^2.0.0" - -parse-json@^2.2.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-2.2.0.tgz#f480f40434ef80741f8469099f8dea18f55a4dc9" - integrity sha1-9ID0BDTvgHQfhGkJn43qGPVaTck= - dependencies: - error-ex "^1.2.0" - -parse5@4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/parse5/-/parse5-4.0.0.tgz#6d78656e3da8d78b4ec0b906f7c08ef1dfe3f608" - integrity sha512-VrZ7eOd3T1Fk4XWNXMgiGBK/z0MG48BWG2uQNU4I72fkQuKUTZpl+u9k+CxEG0twMVzSmXEEz12z5Fnw1jIQFA== - -pascalcase@^0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/pascalcase/-/pascalcase-0.1.1.tgz#b363e55e8006ca6fe21784d2db22bd15d7917f14" - integrity sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ= - -path-exists@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-2.1.0.tgz#0feb6c64f0fc518d9a754dd5efb62c7022761f4b" - integrity sha1-D+tsZPD8UY2adU3V77YscCJ2H0s= - dependencies: - pinkie-promise "^2.0.0" - -path-exists@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-3.0.0.tgz#ce0ebeaa5f78cb18925ea7d810d7b59b010fd515" - integrity sha1-zg6+ql94yxiSXqfYENe1mwEP1RU= - -path-is-absolute@^1.0.0, path-is-absolute@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" - integrity sha1-F0uSaHNVNP+8es5r9TpanhtcX18= - -path-key@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/path-key/-/path-key-2.0.1.tgz#411cadb574c5a140d3a4b1910d40d80cc9f40b40" - integrity sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A= - -path-parse@^1.0.5, path-parse@^1.0.6: - version "1.0.6" - resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.6.tgz#d62dbb5679405d72c4737ec58600e9ddcf06d24c" - integrity sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw== - -path-type@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/path-type/-/path-type-1.1.0.tgz#59c44f7ee491da704da415da5a4070ba4f8fe441" - integrity sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE= - dependencies: - graceful-fs "^4.1.2" - pify "^2.0.0" - pinkie-promise "^2.0.0" - -performance-now@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b" - integrity sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns= - -pify@^2.0.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c" - integrity sha1-7RQaasBDqEnqWISY59yosVMw6Qw= - -pinkie-promise@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/pinkie-promise/-/pinkie-promise-2.0.1.tgz#2135d6dfa7a358c069ac9b178776288228450ffa" - integrity sha1-ITXW36ejWMBprJsXh3YogihFD/o= - dependencies: - pinkie "^2.0.0" - -pinkie@^2.0.0: - version "2.0.4" - resolved "https://registry.yarnpkg.com/pinkie/-/pinkie-2.0.4.tgz#72556b80cfa0d48a974e80e77248e80ed4f7f870" - integrity sha1-clVrgM+g1IqXToDnckjoDtT3+HA= - -pkg-dir@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-2.0.0.tgz#f6d5d1109e19d63edf428e0bd57e12777615334b" - integrity sha1-9tXREJ4Z1j7fQo4L1X4Sd3YVM0s= - dependencies: - find-up "^2.1.0" - -pn@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/pn/-/pn-1.1.0.tgz#e2f4cef0e219f463c179ab37463e4e1ecdccbafb" - integrity sha512-2qHaIQr2VLRFoxe2nASzsV6ef4yOOH+Fi9FBOVH6cqeSgUnoyySPZkxzLuzd+RYOQTRpROA0ztTMqxROKSb/nA== - -posix-character-classes@^0.1.0: - version "0.1.1" - resolved "https://registry.yarnpkg.com/posix-character-classes/-/posix-character-classes-0.1.1.tgz#01eac0fe3b5af71a2a6c02feabb8c1fef7e00eab" - integrity sha1-AerA/jta9xoqbAL+q7jB/vfgDqs= - -prelude-ls@~1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54" - integrity sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ= - -preserve@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/preserve/-/preserve-0.2.0.tgz#815ed1f6ebc65926f865b310c0713bcb3315ce4b" - integrity sha1-gV7R9uvGWSb4ZbMQwHE7yzMVzks= - -pretty-format@^23.6.0: - version "23.6.0" - resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-23.6.0.tgz#5eaac8eeb6b33b987b7fe6097ea6a8a146ab5760" - integrity sha512-zf9NV1NSlDLDjycnwm6hpFATCGl/K1lt0R/GdkAK2O5LN/rwJoB+Mh93gGJjut4YbmecbfgLWVGSTCr0Ewvvbw== - dependencies: - ansi-regex "^3.0.0" - ansi-styles "^3.2.0" - -private@^0.1.8: - version "0.1.8" - resolved "https://registry.yarnpkg.com/private/-/private-0.1.8.tgz#2381edb3689f7a53d653190060fcf822d2f368ff" - integrity sha512-VvivMrbvd2nKkiG38qjULzlc+4Vx4wm/whI9pQD35YrARNnhxeiRktSOhSukRLFNlzg6Br/cJPet5J/u19r/mg== - -process-nextick-args@~2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.0.tgz#a37d732f4271b4ab1ad070d35508e8290788ffaa" - integrity sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw== - -prompts@^0.1.9: - version "0.1.14" - resolved "https://registry.yarnpkg.com/prompts/-/prompts-0.1.14.tgz#a8e15c612c5c9ec8f8111847df3337c9cbd443b2" - integrity sha512-rxkyiE9YH6zAz/rZpywySLKkpaj0NMVyNw1qhsubdbjjSgcayjTShDreZGlFMcGSu5sab3bAKPfFk78PB90+8w== - dependencies: - kleur "^2.0.1" - sisteransi "^0.1.1" - -pseudomap@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/pseudomap/-/pseudomap-1.0.2.tgz#f052a28da70e618917ef0a8ac34c1ae5a68286b3" - integrity sha1-8FKijacOYYkX7wqKw0wa5aaChrM= - -psl@^1.1.24, psl@^1.1.28: - version "1.1.31" - resolved "https://registry.yarnpkg.com/psl/-/psl-1.1.31.tgz#e9aa86d0101b5b105cbe93ac6b784cd547276184" - integrity sha512-/6pt4+C+T+wZUieKR620OpzN/LlnNKuWjy1iFLQ/UG35JqHlR/89MP1d96dUfkf6Dne3TuLQzOYEYshJ+Hx8mw== - -punycode@^1.4.1: - version "1.4.1" - resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.4.1.tgz#c0d5a63b2718800ad8e1eb0fa5269c84dd41845e" - integrity sha1-wNWmOycYgArY4esPpSachN1BhF4= - -punycode@^2.1.0, punycode@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec" - integrity sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A== - -qs@~6.5.2: - version "6.5.2" - resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.2.tgz#cb3ae806e8740444584ef154ce8ee98d403f3e36" - integrity sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA== - -randomatic@^3.0.0: - version "3.1.1" - resolved "https://registry.yarnpkg.com/randomatic/-/randomatic-3.1.1.tgz#b776efc59375984e36c537b2f51a1f0aff0da1ed" - integrity sha512-TuDE5KxZ0J461RVjrJZCJc+J+zCkTb1MbH9AQUq68sMhOMcy9jLcb3BrZKgp9q9Ncltdg4QVqWrH02W2EFFVYw== - dependencies: - is-number "^4.0.0" - kind-of "^6.0.0" - math-random "^1.0.1" - -rc@^1.2.7: - version "1.2.8" - resolved "https://registry.yarnpkg.com/rc/-/rc-1.2.8.tgz#cd924bf5200a075b83c188cd6b9e211b7fc0d3ed" - integrity sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw== - dependencies: - deep-extend "^0.6.0" - ini "~1.3.0" - minimist "^1.2.0" - strip-json-comments "~2.0.1" - -read-pkg-up@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-1.0.1.tgz#9d63c13276c065918d57f002a57f40a1b643fb02" - integrity sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI= - dependencies: - find-up "^1.0.0" - read-pkg "^1.0.0" - -read-pkg@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-1.1.0.tgz#f5ffaa5ecd29cb31c0474bca7d756b6bb29e3f28" - integrity sha1-9f+qXs0pyzHAR0vKfXVra7KePyg= - dependencies: - load-json-file "^1.0.0" - normalize-package-data "^2.3.2" - path-type "^1.0.0" - -readable-stream@^2.0.1, readable-stream@^2.0.6: - version "2.3.6" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.6.tgz#b11c27d88b8ff1fbe070643cf94b0c79ae1b0aaf" - integrity sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw== - dependencies: - core-util-is "~1.0.0" - inherits "~2.0.3" - isarray "~1.0.0" - process-nextick-args "~2.0.0" - safe-buffer "~5.1.1" - string_decoder "~1.1.1" - util-deprecate "~1.0.1" - -realpath-native@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/realpath-native/-/realpath-native-1.0.2.tgz#cd51ce089b513b45cf9b1516c82989b51ccc6560" - integrity sha512-+S3zTvVt9yTntFrBpm7TQmQ3tzpCrnA1a/y+3cUHAc9ZR6aIjG0WNLR+Rj79QpJktY+VeW/TQtFlQ1bzsehI8g== - dependencies: - util.promisify "^1.0.0" - -regenerator-runtime@^0.11.0: - version "0.11.1" - resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz#be05ad7f9bf7d22e056f9726cee5017fbf19e2e9" - integrity sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg== - -regex-cache@^0.4.2: - version "0.4.4" - resolved "https://registry.yarnpkg.com/regex-cache/-/regex-cache-0.4.4.tgz#75bdc58a2a1496cec48a12835bc54c8d562336dd" - integrity sha512-nVIZwtCjkC9YgvWkpM55B5rBhBYRZhAaJbgcFYXXsHnbZ9UZI9nnVWYZpBlCqv9ho2eZryPnWrZGsOdPwVWXWQ== - dependencies: - is-equal-shallow "^0.1.3" - -regex-not@^1.0.0, regex-not@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/regex-not/-/regex-not-1.0.2.tgz#1f4ece27e00b0b65e0247a6810e6a85d83a5752c" - integrity sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A== - dependencies: - extend-shallow "^3.0.2" - safe-regex "^1.1.0" - -remove-trailing-separator@^1.0.1: - version "1.1.0" - resolved "https://registry.yarnpkg.com/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz#c24bce2a283adad5bc3f58e0d48249b92379d8ef" - integrity sha1-wkvOKig62tW8P1jg1IJJuSN52O8= - -repeat-element@^1.1.2: - version "1.1.3" - resolved "https://registry.yarnpkg.com/repeat-element/-/repeat-element-1.1.3.tgz#782e0d825c0c5a3bb39731f84efee6b742e6b1ce" - integrity sha512-ahGq0ZnV5m5XtZLMb+vP76kcAM5nkLqk0lpqAuojSKGgQtn4eRi4ZZGm2olo2zKFH+sMsWaqOCW1dqAnOru72g== - -repeat-string@^1.5.2, repeat-string@^1.6.1: - version "1.6.1" - resolved "https://registry.yarnpkg.com/repeat-string/-/repeat-string-1.6.1.tgz#8dcae470e1c88abc2d600fff4a776286da75e637" - integrity sha1-jcrkcOHIirwtYA//Sndihtp15jc= - -repeating@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/repeating/-/repeating-2.0.1.tgz#5214c53a926d3552707527fbab415dbc08d06dda" - integrity sha1-UhTFOpJtNVJwdSf7q0FdvAjQbdo= - dependencies: - is-finite "^1.0.0" - -request-promise-core@1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/request-promise-core/-/request-promise-core-1.1.1.tgz#3eee00b2c5aa83239cfb04c5700da36f81cd08b6" - integrity sha1-Pu4AssWqgyOc+wTFcA2jb4HNCLY= - dependencies: - lodash "^4.13.1" - -request-promise-native@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/request-promise-native/-/request-promise-native-1.0.5.tgz#5281770f68e0c9719e5163fd3fab482215f4fda5" - integrity sha1-UoF3D2jgyXGeUWP9P6tIIhX0/aU= - dependencies: - request-promise-core "1.1.1" - stealthy-require "^1.1.0" - tough-cookie ">=2.3.3" - -request@^2.87.0: - version "2.88.0" - resolved "https://registry.yarnpkg.com/request/-/request-2.88.0.tgz#9c2fca4f7d35b592efe57c7f0a55e81052124fef" - integrity sha512-NAqBSrijGLZdM0WZNsInLJpkJokL72XYjUpnB0iwsRgxh7dB6COrHnTBNwN0E+lHDAJzu7kLAkDeY08z2/A0hg== - dependencies: - aws-sign2 "~0.7.0" - aws4 "^1.8.0" - caseless "~0.12.0" - combined-stream "~1.0.6" - extend "~3.0.2" - forever-agent "~0.6.1" - form-data "~2.3.2" - har-validator "~5.1.0" - http-signature "~1.2.0" - is-typedarray "~1.0.0" - isstream "~0.1.2" - json-stringify-safe "~5.0.1" - mime-types "~2.1.19" - oauth-sign "~0.9.0" - performance-now "^2.1.0" - qs "~6.5.2" - safe-buffer "^5.1.2" - tough-cookie "~2.4.3" - tunnel-agent "^0.6.0" - uuid "^3.3.2" - -require-directory@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" - integrity sha1-jGStX9MNqxyXbiNE/+f3kqam30I= - -require-main-filename@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-1.0.1.tgz#97f717b69d48784f5f526a6c5aa8ffdda055a4d1" - integrity sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE= - -resolve-cwd@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/resolve-cwd/-/resolve-cwd-2.0.0.tgz#00a9f7387556e27038eae232caa372a6a59b665a" - integrity sha1-AKn3OHVW4nA46uIyyqNypqWbZlo= - dependencies: - resolve-from "^3.0.0" - -resolve-from@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-3.0.0.tgz#b22c7af7d9d6881bc8b6e653335eebcb0a188748" - integrity sha1-six699nWiBvItuZTM17rywoYh0g= - -resolve-url@^0.2.1: - version "0.2.1" - resolved "https://registry.yarnpkg.com/resolve-url/-/resolve-url-0.2.1.tgz#2c637fe77c893afd2a663fe21aa9080068e2052a" - integrity sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo= - -resolve@1.1.7: - version "1.1.7" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.1.7.tgz#203114d82ad2c5ed9e8e0411b3932875e889e97b" - integrity sha1-IDEU2CrSxe2ejgQRs5ModeiJ6Xs= - -resolve@1.x: - version "1.9.0" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.9.0.tgz#a14c6fdfa8f92a7df1d996cb7105fa744658ea06" - integrity sha512-TZNye00tI67lwYvzxCxHGjwTNlUV70io54/Ed4j6PscB8xVfuBJpRenI/o6dVk0cY0PYTY27AgCoGGxRnYuItQ== - dependencies: - path-parse "^1.0.6" - -ret@~0.1.10: - version "0.1.15" - resolved "https://registry.yarnpkg.com/ret/-/ret-0.1.15.tgz#b8a4825d5bdb1fc3f6f53c2bc33f81388681c7bc" - integrity sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg== - -rimraf@^2.5.4, rimraf@^2.6.1: - version "2.6.3" - resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.3.tgz#b2d104fe0d8fb27cf9e0a1cda8262dd3833c6cab" - integrity sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA== - dependencies: - glob "^7.1.3" - -rsvp@^3.3.3: - version "3.6.2" - resolved "https://registry.yarnpkg.com/rsvp/-/rsvp-3.6.2.tgz#2e96491599a96cde1b515d5674a8f7a91452926a" - integrity sha512-OfWGQTb9vnwRjwtA2QwpG2ICclHC3pgXZO5xt8H2EfgDquO0qVdSb5T88L4qJVAEugbS56pAuV4XZM58UX8ulw== - -safe-buffer@^5.0.1, safe-buffer@^5.1.2, safe-buffer@~5.1.0, safe-buffer@~5.1.1: - version "5.1.2" - resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" - integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== - -safe-regex@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/safe-regex/-/safe-regex-1.1.0.tgz#40a3669f3b077d1e943d44629e157dd48023bf2e" - integrity sha1-QKNmnzsHfR6UPURinhV91IAjvy4= - dependencies: - ret "~0.1.10" - -"safer-buffer@>= 2.1.2 < 3", safer-buffer@^2.0.2, safer-buffer@^2.1.0, safer-buffer@~2.1.0: - version "2.1.2" - resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" - integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== - -sane@^2.0.0: - version "2.5.2" - resolved "https://registry.yarnpkg.com/sane/-/sane-2.5.2.tgz#b4dc1861c21b427e929507a3e751e2a2cb8ab3fa" - integrity sha1-tNwYYcIbQn6SlQej51HiosuKs/o= - dependencies: - anymatch "^2.0.0" - capture-exit "^1.2.0" - exec-sh "^0.2.0" - fb-watchman "^2.0.0" - micromatch "^3.1.4" - minimist "^1.1.1" - walker "~1.0.5" - watch "~0.18.0" - optionalDependencies: - fsevents "^1.2.3" - -sax@^1.2.4: - version "1.2.4" - resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.4.tgz#2816234e2378bddc4e5354fab5caa895df7100d9" - integrity sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw== - -"semver@2 || 3 || 4 || 5", semver@^5.3.0, semver@^5.5, semver@^5.5.0: - version "5.6.0" - resolved "https://registry.yarnpkg.com/semver/-/semver-5.6.0.tgz#7e74256fbaa49c75aa7c7a205cc22799cac80004" - integrity sha512-RS9R6R35NYgQn++fkDWaOmqGoj4Ek9gGs+DPxNUZKuwE183xjJroKvyo1IzVFeXvUrvmALy6FWD5xrdJT25gMg== - -set-blocking@^2.0.0, set-blocking@~2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" - integrity sha1-BF+XgtARrppoA93TgrJDkrPYkPc= - -set-value@^0.4.3: - version "0.4.3" - resolved "https://registry.yarnpkg.com/set-value/-/set-value-0.4.3.tgz#7db08f9d3d22dc7f78e53af3c3bf4666ecdfccf1" - integrity sha1-fbCPnT0i3H945Trzw79GZuzfzPE= - dependencies: - extend-shallow "^2.0.1" - is-extendable "^0.1.1" - is-plain-object "^2.0.1" - to-object-path "^0.3.0" - -set-value@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/set-value/-/set-value-2.0.0.tgz#71ae4a88f0feefbbf52d1ea604f3fb315ebb6274" - integrity sha512-hw0yxk9GT/Hr5yJEYnHNKYXkIA8mVJgd9ditYZCe16ZczcaELYYcfvaXesNACk2O8O0nTiPQcQhGUQj8JLzeeg== - dependencies: - extend-shallow "^2.0.1" - is-extendable "^0.1.1" - is-plain-object "^2.0.3" - split-string "^3.0.1" - -shebang-command@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-1.2.0.tgz#44aac65b695b03398968c39f363fee5deafdf1ea" - integrity sha1-RKrGW2lbAzmJaMOfNj/uXer98eo= - dependencies: - shebang-regex "^1.0.0" - -shebang-regex@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-1.0.0.tgz#da42f49740c0b42db2ca9728571cb190c98efea3" - integrity sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM= - -shellwords@^0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/shellwords/-/shellwords-0.1.1.tgz#d6b9181c1a48d397324c84871efbcfc73fc0654b" - integrity sha512-vFwSUfQvqybiICwZY5+DAWIPLKsWO31Q91JSKl3UYv+K5c2QRPzn0qzec6QPu1Qc9eHYItiP3NdJqNVqetYAww== - -signal-exit@^3.0.0, signal-exit@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.2.tgz#b5fdc08f1287ea1178628e415e25132b73646c6d" - integrity sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0= - -sisteransi@^0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/sisteransi/-/sisteransi-0.1.1.tgz#5431447d5f7d1675aac667ccd0b865a4994cb3ce" - integrity sha512-PmGOd02bM9YO5ifxpw36nrNMBTptEtfRl4qUYl9SndkolplkrZZOW7PGHjrZL53QvMVj9nQ+TKqUnRsw4tJa4g== - -slash@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/slash/-/slash-1.0.0.tgz#c41f2f6c39fc16d1cd17ad4b5d896114ae470d55" - integrity sha1-xB8vbDn8FtHNF61LXYlhFK5HDVU= - -snapdragon-node@^2.0.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/snapdragon-node/-/snapdragon-node-2.1.1.tgz#6c175f86ff14bdb0724563e8f3c1b021a286853b" - integrity sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw== - dependencies: - define-property "^1.0.0" - isobject "^3.0.0" - snapdragon-util "^3.0.1" - -snapdragon-util@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/snapdragon-util/-/snapdragon-util-3.0.1.tgz#f956479486f2acd79700693f6f7b805e45ab56e2" - integrity sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ== - dependencies: - kind-of "^3.2.0" - -snapdragon@^0.8.1: - version "0.8.2" - resolved "https://registry.yarnpkg.com/snapdragon/-/snapdragon-0.8.2.tgz#64922e7c565b0e14204ba1aa7d6964278d25182d" - integrity sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg== - dependencies: - base "^0.11.1" - debug "^2.2.0" - define-property "^0.2.5" - extend-shallow "^2.0.1" - map-cache "^0.2.2" - source-map "^0.5.6" - source-map-resolve "^0.5.0" - use "^3.1.0" - -source-map-resolve@^0.5.0: - version "0.5.2" - resolved "https://registry.yarnpkg.com/source-map-resolve/-/source-map-resolve-0.5.2.tgz#72e2cc34095543e43b2c62b2c4c10d4a9054f259" - integrity sha512-MjqsvNwyz1s0k81Goz/9vRBe9SZdB09Bdw+/zYyO+3CuPk6fouTaxscHkgtE8jKvf01kVfl8riHzERQ/kefaSA== - dependencies: - atob "^2.1.1" - decode-uri-component "^0.2.0" - resolve-url "^0.2.1" - source-map-url "^0.4.0" - urix "^0.1.0" - -source-map-support@^0.4.15: - version "0.4.18" - resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.4.18.tgz#0286a6de8be42641338594e97ccea75f0a2c585f" - integrity sha512-try0/JqxPLF9nOjvSta7tVondkP5dwgyLDjVoyMDlmjugT2lRZ1OfsrYTkCd2hkDnJTKRbO/Rl3orm8vlsUzbA== - dependencies: - source-map "^0.5.6" - -source-map-support@^0.5.6: - version "0.5.9" - resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.9.tgz#41bc953b2534267ea2d605bccfa7bfa3111ced5f" - integrity sha512-gR6Rw4MvUlYy83vP0vxoVNzM6t8MUXqNuRsuBmBHQDu1Fh6X015FrLdgoDKcNdkwGubozq0P4N0Q37UyFVr1EA== - dependencies: - buffer-from "^1.0.0" - source-map "^0.6.0" - -source-map-url@^0.4.0: - version "0.4.0" - resolved "https://registry.yarnpkg.com/source-map-url/-/source-map-url-0.4.0.tgz#3e935d7ddd73631b97659956d55128e87b5084a3" - integrity sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM= - -source-map@^0.5.3, source-map@^0.5.6, source-map@^0.5.7: - version "0.5.7" - resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc" - integrity sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w= - -source-map@^0.6.0, source-map@^0.6.1, source-map@~0.6.1: - version "0.6.1" - resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" - integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== - -spdx-correct@^3.0.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/spdx-correct/-/spdx-correct-3.1.0.tgz#fb83e504445268f154b074e218c87c003cd31df4" - integrity sha512-lr2EZCctC2BNR7j7WzJ2FpDznxky1sjfxvvYEyzxNyb6lZXHODmEoJeFu4JupYlkfha1KZpJyoqiJ7pgA1qq8Q== - dependencies: - spdx-expression-parse "^3.0.0" - spdx-license-ids "^3.0.0" - -spdx-exceptions@^2.1.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/spdx-exceptions/-/spdx-exceptions-2.2.0.tgz#2ea450aee74f2a89bfb94519c07fcd6f41322977" - integrity sha512-2XQACfElKi9SlVb1CYadKDXvoajPgBVPn/gOQLrTvHdElaVhr7ZEbqJaRnJLVNeaI4cMEAgVCeBMKF6MWRDCRA== - -spdx-expression-parse@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/spdx-expression-parse/-/spdx-expression-parse-3.0.0.tgz#99e119b7a5da00e05491c9fa338b7904823b41d0" - integrity sha512-Yg6D3XpRD4kkOmTpdgbUiEJFKghJH03fiC1OPll5h/0sO6neh2jqRDVHOQ4o/LMea0tgCkbMgea5ip/e+MkWyg== - dependencies: - spdx-exceptions "^2.1.0" - spdx-license-ids "^3.0.0" - -spdx-license-ids@^3.0.0: - version "3.0.3" - resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-3.0.3.tgz#81c0ce8f21474756148bbb5f3bfc0f36bf15d76e" - integrity sha512-uBIcIl3Ih6Phe3XHK1NqboJLdGfwr1UN3k6wSD1dZpmPsIkb8AGNbZYJ1fOBk834+Gxy8rpfDxrS6XLEMZMY2g== - -split-string@^3.0.1, split-string@^3.0.2: - version "3.1.0" - resolved "https://registry.yarnpkg.com/split-string/-/split-string-3.1.0.tgz#7cb09dda3a86585705c64b39a6466038682e8fe2" - integrity sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw== - dependencies: - extend-shallow "^3.0.0" - -sprintf-js@~1.0.2: - version "1.0.3" - resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" - integrity sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw= - -sshpk@^1.7.0: - version "1.16.0" - resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.16.0.tgz#1d4963a2fbffe58050aa9084ca20be81741c07de" - integrity sha512-Zhev35/y7hRMcID/upReIvRse+I9SVhyVre/KTJSJQWMz3C3+G+HpO7m1wK/yckEtujKZ7dS4hkVxAnmHaIGVQ== - dependencies: - asn1 "~0.2.3" - assert-plus "^1.0.0" - bcrypt-pbkdf "^1.0.0" - dashdash "^1.12.0" - ecc-jsbn "~0.1.1" - getpass "^0.1.1" - jsbn "~0.1.0" - safer-buffer "^2.0.2" - tweetnacl "~0.14.0" - -stack-utils@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/stack-utils/-/stack-utils-1.0.2.tgz#33eba3897788558bebfc2db059dc158ec36cebb8" - integrity sha512-MTX+MeG5U994cazkjd/9KNAapsHnibjMLnfXodlkXw76JEea0UiNzrqidzo1emMwk7w5Qhc9jd4Bn9TBb1MFwA== - -static-extend@^0.1.1: - version "0.1.2" - resolved "https://registry.yarnpkg.com/static-extend/-/static-extend-0.1.2.tgz#60809c39cbff55337226fd5e0b520f341f1fb5c6" - integrity sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY= - dependencies: - define-property "^0.2.5" - object-copy "^0.1.0" - -stealthy-require@^1.1.0: - version "1.1.1" - resolved "https://registry.yarnpkg.com/stealthy-require/-/stealthy-require-1.1.1.tgz#35b09875b4ff49f26a777e509b3090a3226bf24b" - integrity sha1-NbCYdbT/SfJqd35QmzCQoyJr8ks= - -string-length@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/string-length/-/string-length-2.0.0.tgz#d40dbb686a3ace960c1cffca562bf2c45f8363ed" - integrity sha1-1A27aGo6zpYMHP/KVivyxF+DY+0= - dependencies: - astral-regex "^1.0.0" - strip-ansi "^4.0.0" - -string-width@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/string-width/-/string-width-1.0.2.tgz#118bdf5b8cdc51a2a7e70d211e07e2b0b9b107d3" - integrity sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M= - dependencies: - code-point-at "^1.0.0" - is-fullwidth-code-point "^1.0.0" - strip-ansi "^3.0.0" - -"string-width@^1.0.2 || 2", string-width@^2.0.0, string-width@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/string-width/-/string-width-2.1.1.tgz#ab93f27a8dc13d28cac815c462143a6d9012ae9e" - integrity sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw== - dependencies: - is-fullwidth-code-point "^2.0.0" - strip-ansi "^4.0.0" - -string_decoder@~1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.1.1.tgz#9cf1611ba62685d7030ae9e4ba34149c3af03fc8" - integrity sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg== - dependencies: - safe-buffer "~5.1.0" - -strip-ansi@^3.0.0, strip-ansi@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf" - integrity sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8= - dependencies: - ansi-regex "^2.0.0" - -strip-ansi@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-4.0.0.tgz#a8479022eb1ac368a871389b635262c505ee368f" - integrity sha1-qEeQIusaw2iocTibY1JixQXuNo8= - dependencies: - ansi-regex "^3.0.0" - -strip-bom@3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-3.0.0.tgz#2334c18e9c759f7bdd56fdef7e9ae3d588e68ed3" - integrity sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM= - -strip-bom@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-2.0.0.tgz#6219a85616520491f35788bdbf1447a99c7e6b0e" - integrity sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4= - dependencies: - is-utf8 "^0.2.0" - -strip-eof@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/strip-eof/-/strip-eof-1.0.0.tgz#bb43ff5598a6eb05d89b59fcd129c983313606bf" - integrity sha1-u0P/VZim6wXYm1n80SnJgzE2Br8= - -strip-json-comments@~2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" - integrity sha1-PFMZQukIwml8DsNEhYwobHygpgo= - -supports-color@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7" - integrity sha1-U10EXOa2Nj+kARcIRimZXp3zJMc= - -supports-color@^3.1.2: - version "3.2.3" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-3.2.3.tgz#65ac0504b3954171d8a64946b2ae3cbb8a5f54f6" - integrity sha1-ZawFBLOVQXHYpklGsq48u4pfVPY= - dependencies: - has-flag "^1.0.0" - -supports-color@^5.3.0: - version "5.5.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f" - integrity sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow== - dependencies: - has-flag "^3.0.0" - -symbol-tree@^3.2.2: - version "3.2.2" - resolved "https://registry.yarnpkg.com/symbol-tree/-/symbol-tree-3.2.2.tgz#ae27db38f660a7ae2e1c3b7d1bc290819b8519e6" - integrity sha1-rifbOPZgp64uHDt9G8KQgZuFGeY= - -tar@^4: - version "4.4.8" - resolved "https://registry.yarnpkg.com/tar/-/tar-4.4.8.tgz#b19eec3fde2a96e64666df9fdb40c5ca1bc3747d" - integrity sha512-LzHF64s5chPQQS0IYBn9IN5h3i98c12bo4NCO7e0sGM2llXQ3p2FGC5sdENN4cTW48O915Sh+x+EXx7XW96xYQ== - dependencies: - chownr "^1.1.1" - fs-minipass "^1.2.5" - minipass "^2.3.4" - minizlib "^1.1.1" - mkdirp "^0.5.0" - safe-buffer "^5.1.2" - yallist "^3.0.2" - -test-exclude@^4.2.1: - version "4.2.3" - resolved "https://registry.yarnpkg.com/test-exclude/-/test-exclude-4.2.3.tgz#a9a5e64474e4398339245a0a769ad7c2f4a97c20" - integrity sha512-SYbXgY64PT+4GAL2ocI3HwPa4Q4TBKm0cwAVeKOt/Aoc0gSpNRjJX8w0pA1LMKZ3LBmd8pYBqApFNQLII9kavA== - dependencies: - arrify "^1.0.1" - micromatch "^2.3.11" - object-assign "^4.1.0" - read-pkg-up "^1.0.1" - require-main-filename "^1.0.1" - -throat@^4.0.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/throat/-/throat-4.1.0.tgz#89037cbc92c56ab18926e6ba4cbb200e15672a6a" - integrity sha1-iQN8vJLFarGJJua6TLsgDhVnKmo= - -tmpl@1.0.x: - version "1.0.4" - resolved "https://registry.yarnpkg.com/tmpl/-/tmpl-1.0.4.tgz#23640dd7b42d00433911140820e5cf440e521dd1" - integrity sha1-I2QN17QtAEM5ERQIIOXPRA5SHdE= - -to-fast-properties@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-1.0.3.tgz#b83571fa4d8c25b82e231b06e3a3055de4ca1a47" - integrity sha1-uDVx+k2MJbguIxsG46MFXeTKGkc= - -to-object-path@^0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/to-object-path/-/to-object-path-0.3.0.tgz#297588b7b0e7e0ac08e04e672f85c1f4999e17af" - integrity sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68= - dependencies: - kind-of "^3.0.2" - -to-regex-range@^2.1.0: - version "2.1.1" - resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-2.1.1.tgz#7c80c17b9dfebe599e27367e0d4dd5590141db38" - integrity sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg= - dependencies: - is-number "^3.0.0" - repeat-string "^1.6.1" - -to-regex@^3.0.1, to-regex@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/to-regex/-/to-regex-3.0.2.tgz#13cfdd9b336552f30b51f33a8ae1b42a7a7599ce" - integrity sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw== - dependencies: - define-property "^2.0.2" - extend-shallow "^3.0.2" - regex-not "^1.0.2" - safe-regex "^1.1.0" - -tough-cookie@>=2.3.3: - version "3.0.0" - resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-3.0.0.tgz#d2bceddebde633153ff20a52fa844a0dc71dacef" - integrity sha512-LHMvg+RBP/mAVNqVbOX8t+iJ+tqhBA/t49DuI7+IDAWHrASnesqSu1vWbKB7UrE2yk+HMFUBMadRGMkB4VCfog== - dependencies: - ip-regex "^3.0.0" - psl "^1.1.28" - punycode "^2.1.1" - -tough-cookie@^2.3.4: - version "2.5.0" - resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.5.0.tgz#cd9fb2a0aa1d5a12b473bd9fb96fa3dcff65ade2" - integrity sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g== - dependencies: - psl "^1.1.28" - punycode "^2.1.1" - -tough-cookie@~2.4.3: - version "2.4.3" - resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.4.3.tgz#53f36da3f47783b0925afa06ff9f3b165280f781" - integrity sha512-Q5srk/4vDM54WJsJio3XNn6K2sCG+CQ8G5Wz6bZhRZoAe/+TxjWB/GlFAnYEbkYVlON9FMk/fE3h2RLpPXo4lQ== - dependencies: - psl "^1.1.24" - punycode "^1.4.1" - -tr46@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/tr46/-/tr46-1.0.1.tgz#a8b13fd6bfd2489519674ccde55ba3693b706d09" - integrity sha1-qLE/1r/SSJUZZ0zN5VujaTtwbQk= - dependencies: - punycode "^2.1.0" - -trim-right@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/trim-right/-/trim-right-1.0.1.tgz#cb2e1203067e0c8de1f614094b9fe45704ea6003" - integrity sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM= - -ts-jest@^23.10.5: - version "23.10.5" - resolved "https://registry.yarnpkg.com/ts-jest/-/ts-jest-23.10.5.tgz#cdb550df4466a30489bf70ba867615799f388dd5" - integrity sha512-MRCs9qnGoyKgFc8adDEntAOP64fWK1vZKnOYU1o2HxaqjdJvGqmkLCPCnVq1/If4zkUmEjKPnCiUisTrlX2p2A== - dependencies: - bs-logger "0.x" - buffer-from "1.x" - fast-json-stable-stringify "2.x" - json5 "2.x" - make-error "1.x" - mkdirp "0.x" - resolve "1.x" - semver "^5.5" - yargs-parser "10.x" - -tunnel-agent@^0.6.0: - version "0.6.0" - resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.6.0.tgz#27a5dea06b36b04a0a9966774b290868f0fc40fd" - integrity sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0= - dependencies: - safe-buffer "^5.0.1" - -tweetnacl@^0.14.3, tweetnacl@~0.14.0: - version "0.14.5" - resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-0.14.5.tgz#5ae68177f192d4456269d108afa93ff8743f4f64" - integrity sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q= - -type-check@~0.3.2: - version "0.3.2" - resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.3.2.tgz#5884cab512cf1d355e3fb784f30804b2b520db72" - integrity sha1-WITKtRLPHTVeP7eE8wgEsrUg23I= - dependencies: - prelude-ls "~1.1.2" - -uglify-js@^3.1.4: - version "3.4.9" - resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.4.9.tgz#af02f180c1207d76432e473ed24a28f4a782bae3" - integrity sha512-8CJsbKOtEbnJsTyv6LE6m6ZKniqMiFWmm9sRbopbkGs3gMPPfd3Fh8iIA4Ykv5MgaTbqHr4BaoGLJLZNhsrW1Q== - dependencies: - commander "~2.17.1" - source-map "~0.6.1" - -union-value@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/union-value/-/union-value-1.0.0.tgz#5c71c34cb5bad5dcebe3ea0cd08207ba5aa1aea4" - integrity sha1-XHHDTLW61dzr4+oM0IIHulqhrqQ= - dependencies: - arr-union "^3.1.0" - get-value "^2.0.6" - is-extendable "^0.1.1" - set-value "^0.4.3" - -unset-value@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/unset-value/-/unset-value-1.0.0.tgz#8376873f7d2335179ffb1e6fc3a8ed0dfc8ab559" - integrity sha1-g3aHP30jNRef+x5vw6jtDfyKtVk= - dependencies: - has-value "^0.3.1" - isobject "^3.0.0" - -uri-js@^4.2.2: - version "4.2.2" - resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.2.2.tgz#94c540e1ff772956e2299507c010aea6c8838eb0" - integrity sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ== - dependencies: - punycode "^2.1.0" - -urix@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/urix/-/urix-0.1.0.tgz#da937f7a62e21fec1fd18d49b35c2935067a6c72" - integrity sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI= - -use@^3.1.0: - version "3.1.1" - resolved "https://registry.yarnpkg.com/use/-/use-3.1.1.tgz#d50c8cac79a19fbc20f2911f56eb973f4e10070f" - integrity sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ== - -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= - -util.promisify@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/util.promisify/-/util.promisify-1.0.0.tgz#440f7165a459c9a16dc145eb8e72f35687097030" - integrity sha512-i+6qA2MPhvoKLuxnJNpXAGhg7HphQOSUq2LKMZD0m15EiskXUkMvKdF4Uui0WYeCUGea+o2cw/ZuwehtfsrNkA== - dependencies: - define-properties "^1.1.2" - object.getownpropertydescriptors "^2.0.3" - -uuid@^3.3.2: - version "3.3.2" - resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.3.2.tgz#1b4af4955eb3077c501c23872fc6513811587131" - integrity sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA== - -validate-npm-package-license@^3.0.1: - version "3.0.4" - resolved "https://registry.yarnpkg.com/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz#fc91f6b9c7ba15c857f4cb2c5defeec39d4f410a" - integrity sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew== - dependencies: - spdx-correct "^3.0.0" - spdx-expression-parse "^3.0.0" - -verror@1.10.0: - version "1.10.0" - resolved "https://registry.yarnpkg.com/verror/-/verror-1.10.0.tgz#3a105ca17053af55d6e270c1f8288682e18da400" - integrity sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA= - dependencies: - assert-plus "^1.0.0" - core-util-is "1.0.2" - extsprintf "^1.2.0" - -w3c-hr-time@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/w3c-hr-time/-/w3c-hr-time-1.0.1.tgz#82ac2bff63d950ea9e3189a58a65625fedf19045" - integrity sha1-gqwr/2PZUOqeMYmlimViX+3xkEU= - dependencies: - browser-process-hrtime "^0.1.2" - -walker@~1.0.5: - version "1.0.7" - resolved "https://registry.yarnpkg.com/walker/-/walker-1.0.7.tgz#2f7f9b8fd10d677262b18a884e28d19618e028fb" - integrity sha1-L3+bj9ENZ3JisYqITijRlhjgKPs= - dependencies: - makeerror "1.0.x" - -watch@~0.18.0: - version "0.18.0" - resolved "https://registry.yarnpkg.com/watch/-/watch-0.18.0.tgz#28095476c6df7c90c963138990c0a5423eb4b986" - integrity sha1-KAlUdsbffJDJYxOJkMClQj60uYY= - dependencies: - exec-sh "^0.2.0" - minimist "^1.2.0" - -webidl-conversions@^4.0.2: - version "4.0.2" - resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-4.0.2.tgz#a855980b1f0b6b359ba1d5d9fb39ae941faa63ad" - integrity sha512-YQ+BmxuTgd6UXZW3+ICGfyqRyHXVlD5GtQr5+qjiNW7bF0cqrzX500HVXPBOvgXb5YnzDd+h0zqyv61KUD7+Sg== - -whatwg-encoding@^1.0.1, whatwg-encoding@^1.0.3: - version "1.0.5" - resolved "https://registry.yarnpkg.com/whatwg-encoding/-/whatwg-encoding-1.0.5.tgz#5abacf777c32166a51d085d6b4f3e7d27113ddb0" - integrity sha512-b5lim54JOPN9HtzvK9HFXvBma/rnfFeqsic0hSpjtDbVxR3dJKLc+KB4V6GgiGOvl7CY/KNh8rxSo9DKQrnUEw== - dependencies: - iconv-lite "0.4.24" - -whatwg-mimetype@^2.1.0, whatwg-mimetype@^2.2.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/whatwg-mimetype/-/whatwg-mimetype-2.3.0.tgz#3d4b1e0312d2079879f826aff18dbeeca5960fbf" - integrity sha512-M4yMwr6mAnQz76TbJm914+gPpB/nCwvZbJU28cUD6dR004SAxDLOOSUaB1JDRqLtaOV/vi0IC5lEAGFgrjGv/g== - -whatwg-url@^6.4.1: - version "6.5.0" - resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-6.5.0.tgz#f2df02bff176fd65070df74ad5ccbb5a199965a8" - integrity sha512-rhRZRqx/TLJQWUpQ6bmrt2UV4f0HCQ463yQuONJqC6fO2VoEb1pTYddbe59SkYq87aoM5A3bdhMZiUiVws+fzQ== - dependencies: - lodash.sortby "^4.7.0" - tr46 "^1.0.1" - webidl-conversions "^4.0.2" - -whatwg-url@^7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-7.0.0.tgz#fde926fa54a599f3adf82dff25a9f7be02dc6edd" - integrity sha512-37GeVSIJ3kn1JgKyjiYNmSLP1yzbpb29jdmwBSgkD9h40/hyrR/OifpVUndji3tmwGgD8qpw7iQu3RSbCrBpsQ== - dependencies: - lodash.sortby "^4.7.0" - tr46 "^1.0.1" - webidl-conversions "^4.0.2" - -which-module@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/which-module/-/which-module-2.0.0.tgz#d9ef07dce77b9902b8a3a8fa4b31c3e3f7e6e87a" - integrity sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho= - -which@^1.2.12, which@^1.2.9, which@^1.3.0: - version "1.3.1" - resolved "https://registry.yarnpkg.com/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a" - integrity sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ== - dependencies: - isexe "^2.0.0" - -wide-align@^1.1.0: - version "1.1.3" - resolved "https://registry.yarnpkg.com/wide-align/-/wide-align-1.1.3.tgz#ae074e6bdc0c14a431e804e624549c633b000457" - integrity sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA== - dependencies: - string-width "^1.0.2 || 2" - -wordwrap@~0.0.2: - version "0.0.3" - resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.3.tgz#a3d5da6cd5c0bc0008d37234bbaf1bed63059107" - integrity sha1-o9XabNXAvAAI03I0u68b7WMFkQc= - -wordwrap@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-1.0.0.tgz#27584810891456a4171c8d0226441ade90cbcaeb" - integrity sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus= - -wrap-ansi@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-2.1.0.tgz#d8fc3d284dd05794fe84973caecdd1cf824fdd85" - integrity sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU= - dependencies: - string-width "^1.0.1" - strip-ansi "^3.0.1" - -wrappy@1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" - integrity sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8= - -write-file-atomic@^2.1.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/write-file-atomic/-/write-file-atomic-2.3.0.tgz#1ff61575c2e2a4e8e510d6fa4e243cce183999ab" - integrity sha512-xuPeK4OdjWqtfi59ylvVL0Yn35SF3zgcAcv7rBPFHVaEapaDr4GdGgm3j7ckTwH9wHL7fGmgfAnb0+THrHb8tA== - dependencies: - graceful-fs "^4.1.11" - imurmurhash "^0.1.4" - signal-exit "^3.0.2" - -ws@^5.2.0: - version "5.2.2" - resolved "https://registry.yarnpkg.com/ws/-/ws-5.2.2.tgz#dffef14866b8e8dc9133582514d1befaf96e980f" - integrity sha512-jaHFD6PFv6UgoIVda6qZllptQsMlDEJkTQcybzzXDYM1XO9Y8em691FGMPmM46WGyLU4z9KMgQN+qrux/nhlHA== - dependencies: - async-limiter "~1.0.0" - -xml-name-validator@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/xml-name-validator/-/xml-name-validator-3.0.0.tgz#6ae73e06de4d8c6e47f9fb181f78d648ad457c6a" - integrity sha512-A5CUptxDsvxKJEU3yO6DuWBSJz/qizqzJKOMIfUJHETbBw/sFaDxgd6fxm1ewUaM0jZ444Fc5vC5ROYurg/4Pw== - -xmlhttprequest@1.8.0: - version "1.8.0" - resolved "https://registry.yarnpkg.com/xmlhttprequest/-/xmlhttprequest-1.8.0.tgz#67fe075c5c24fef39f9d65f5f7b7fe75171968fc" - integrity sha1-Z/4HXFwk/vOfnWX197f+dRcZaPw= - -y18n@^3.2.1: - version "3.2.1" - resolved "https://registry.yarnpkg.com/y18n/-/y18n-3.2.1.tgz#6d15fba884c08679c0d77e88e7759e811e07fa41" - integrity sha1-bRX7qITAhnnA136I53WegR4H+kE= - -yallist@^2.1.2: - version "2.1.2" - resolved "https://registry.yarnpkg.com/yallist/-/yallist-2.1.2.tgz#1c11f9218f076089a47dd512f93c6699a6a81d52" - integrity sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI= - -yallist@^3.0.0, yallist@^3.0.2: - version "3.0.3" - resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.0.3.tgz#b4b049e314be545e3ce802236d6cd22cd91c3de9" - integrity sha512-S+Zk8DEWE6oKpV+vI3qWkaK+jSbIK86pCwe2IF/xwIpQ8jEuxpw9NyaGjmp9+BoJv5FV2piqCDcoCtStppiq2A== - -yargs-parser@10.x: - version "10.1.0" - resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-10.1.0.tgz#7202265b89f7e9e9f2e5765e0fe735a905edbaa8" - integrity sha512-VCIyR1wJoEBZUqk5PA+oOBF6ypbwh5aNB3I50guxAL/quggdfs4TtNHQrSazFA3fYZ+tEqfs0zIGlv0c/rgjbQ== - dependencies: - camelcase "^4.1.0" - -yargs-parser@^9.0.2: - version "9.0.2" - resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-9.0.2.tgz#9ccf6a43460fe4ed40a9bb68f48d43b8a68cc077" - integrity sha1-nM9qQ0YP5O1Aqbto9I1DuKaMwHc= - dependencies: - camelcase "^4.1.0" - -yargs@^11.0.0: - version "11.1.0" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-11.1.0.tgz#90b869934ed6e871115ea2ff58b03f4724ed2d77" - integrity sha512-NwW69J42EsCSanF8kyn5upxvjp5ds+t3+udGBeTbFnERA+lF541DDpMawzo4z6W/QrzNM18D+BPMiOBibnFV5A== - dependencies: - cliui "^4.0.0" - decamelize "^1.1.1" - find-up "^2.1.0" - get-caller-file "^1.0.1" - os-locale "^2.0.0" - require-directory "^2.1.1" - require-main-filename "^1.0.1" - set-blocking "^2.0.0" - string-width "^2.0.0" - which-module "^2.0.0" - y18n "^3.2.1" - yargs-parser "^9.0.2" diff --git a/rules/src/curlyStatementNewlinesRule.ts b/rules/src/curlyStatementNewlinesRule.ts deleted file mode 100644 index 317eba63..00000000 --- a/rules/src/curlyStatementNewlinesRule.ts +++ /dev/null @@ -1,33 +0,0 @@ -import * as ts from "typescript"; -import * as Lint from "tslint"; - -/** - * Curly statement newlines rule. - */ -export class Rule extends Lint.Rules.AbstractRule { - public static FAILURE_STRING = "Curly statements must separate with newlines"; - - /** - * Apply the rule. - */ - public apply(sourceFile: ts.SourceFile): Lint.RuleFailure[] { - return this.applyWithWalker(new CurlyStatementNewlinesWalker(sourceFile, this.getOptions())); - } -} - -/** - * Curly statement newlines walker. - */ -class CurlyStatementNewlinesWalker extends Lint.RuleWalker { - /** - * Visit if statements. - */ - public visitIfStatement(node: ts.IfStatement): void { - const splitLength = node.getFullText().trim().split("\n").length; - if (splitLength <= 2) { - this.addFailureAt(node.getStart(), node.getWidth(), Rule.FAILURE_STRING); - } - - super.visitIfStatement(node); - } -} diff --git a/rules/src/noBlockPaddingRule.ts b/rules/src/noBlockPaddingRule.ts deleted file mode 100644 index cd41b179..00000000 --- a/rules/src/noBlockPaddingRule.ts +++ /dev/null @@ -1,89 +0,0 @@ -import * as ts from "typescript"; -import * as Lint from "tslint"; - -/** - * Rule for disallowing blank lines around the content of blocks. - */ -export class Rule extends Lint.Rules.AbstractRule { - public static BEFORE_FAILURE_STRING = "Blocks must not start with blank lines"; - public static AFTER_FAILURE_STRING = "Blocks must not end with blank lines"; - - /** - * Apply the rule. - */ - public apply(sourceFile: ts.SourceFile): Lint.RuleFailure[] { - return this.applyWithWalker(new NoBlockPaddingWalker(sourceFile, this.getOptions())); - } -} - -/** - * Walker for checking block padding. - */ -class NoBlockPaddingWalker extends Lint.RuleWalker { - /** - * Apply this rule to interfaces. - */ - public visitInterfaceDeclaration(node: ts.InterfaceDeclaration): void { - this.visitBlockNode(node); - super.visitInterfaceDeclaration(node); - } - - /** - * Apply this rule to classes. - */ - public visitClassDeclaration(node: ts.ClassDeclaration): void { - this.visitBlockNode(node); - super.visitClassDeclaration(node); - } - - /** - * Add failures to blank lines surrounding a block's content. - */ - private visitBlockNode(node: ts.ClassDeclaration | ts.InterfaceDeclaration): void { - const sourceFile = node.getSourceFile(); - const children = node.getChildren(); - - const openBraceIndex = children.findIndex((n) => n.kind === ts.SyntaxKind.OpenBraceToken); - if (openBraceIndex !== -1) { - const nextToken = children[openBraceIndex + 1]; - if (nextToken) { - const startLine = this.getStartIncludingComments(sourceFile, nextToken); - const openBraceToken = children[openBraceIndex]; - if (ts.getLineAndCharacterOfPosition(sourceFile, openBraceToken.getEnd()).line + 1 < startLine) { - this.addFailureAt(openBraceToken.getEnd(), openBraceToken.getEnd(), Rule.BEFORE_FAILURE_STRING); - } - } - } - - const closeBraceIndex = children.findIndex((n) => n.kind === ts.SyntaxKind.CloseBraceToken); - if (closeBraceIndex >= 2) { - const previousToken = children[closeBraceIndex - 1]; - if (previousToken) { - let endLine = ts.getLineAndCharacterOfPosition(sourceFile, previousToken.getEnd()).line; - const closeBraceToken = children[closeBraceIndex]; - if (this.getStartIncludingComments(sourceFile, closeBraceToken) > endLine + 1) { - this.addFailureAt(closeBraceToken.getStart(), closeBraceToken.getStart(), Rule.AFTER_FAILURE_STRING); - } - } - } - } - - /** - * getStart() doesn't account for comments while this does. - */ - private getStartIncludingComments(sourceFile: ts.SourceFile, node: ts.Node): number { - // This gets the line the node starts on without counting comments. - let startLine = ts.getLineAndCharacterOfPosition(sourceFile, node.getStart()).line; - - // Adjust the start line for the comments. - const comments = ts.getLeadingCommentRanges(sourceFile.text, node.pos) || []; - comments.forEach((c) => { - const commentStartLine = ts.getLineAndCharacterOfPosition(sourceFile, c.pos).line; - if (commentStartLine < startLine) { - startLine = commentStartLine; - } - }); - - return startLine; - } -} diff --git a/rules/tsconfig.json b/rules/tsconfig.json deleted file mode 100644 index 8d508dac..00000000 --- a/rules/tsconfig.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "extends": "../tsconfig.json", - "compilerOptions": { - "sourceMap": false, - "declaration": false, - "rootDir": "./src", - "outDir": "./dist" - }, - "include": [ - "." - ] -} diff --git a/scripts/dummy.js b/scripts/dummy.js deleted file mode 100644 index 22ec6f75..00000000 --- a/scripts/dummy.js +++ /dev/null @@ -1 +0,0 @@ -// This is for ignoring CSS and images when running tests with Jest. diff --git a/scripts/install-packages.ts b/scripts/install-packages.ts deleted file mode 100644 index 9517c9c1..00000000 --- a/scripts/install-packages.ts +++ /dev/null @@ -1,51 +0,0 @@ -import { exec, execSync } from "child_process"; -import { existsSync, readdirSync } from "fs"; -import * as os from "os"; -import { join, resolve } from "path"; -import { logger, field } from "../packages/logger/src/logger"; - -/** - * Install dependencies for a single package. - */ -const doInstall = (pkg: string, path: string): Promise => { - logger.info(`Installing "${pkg}" dependencies...`); - - return new Promise((resolve): void => { - exec("yarn --network-concurrency 1", { - cwd: path, - maxBuffer: 1024 * 1024 * 10, - }, (error, stdout, stderr) => { - if (error) { - logger.error( - `Failed to install "${pkg}" dependencies`, - field("error", error), - field("stdout", stdout), - field("stderr", stderr), - ); - process.exit(1); - } - - logger.info(`Successfully grabbed \"${pkg}\" dependencies!`); - resolve(); - }); - }); -}; - -/** - * Install dependencies for all packages. - */ -const handlePackages = async (dir: string): Promise => { - const dirs = readdirSync(dir); - for (let i = 0; i < dirs.length; i++) { - const pkg = dirs[i]; - const pkgDir = join(dir, pkg); - const pkgJsonPath = join(pkgDir, "package.json"); - if (existsSync(pkgJsonPath)) { - const ip = await doInstall(pkg, pkgDir); - } - } -}; - -handlePackages(resolve(__dirname, "..", "packages")).then(() => { - return handlePackages(resolve(__dirname, "..", "packages", "app")); -}); diff --git a/scripts/test-setup.js b/scripts/test-setup.js deleted file mode 100644 index bc070348..00000000 --- a/scripts/test-setup.js +++ /dev/null @@ -1,35 +0,0 @@ -const fs = require("fs"); -const util = require("util"); - -// This isn't properly promisified in Jest. -Object.defineProperty(fs.read, util.promisify.custom, { - configurable: true, - value: (...args) => { - return new Promise((resolve, reject) => { - args.push((error, bytesRead, buffer) => { - if (error) { - reject(error); - } else { - resolve({ bytesRead, buffer }); - } - }); - fs.read(...args); - }); - }, -}); - -global.requestAnimationFrame = (cb) => { - setTimeout(cb, 0); -}; - -// lchmod might not be available. Jest runs graceful-fs which makes this a no-op -// when it doesn't exist but that doesn't seem to always run when running -// multiple tests (or maybe it gets undone after a test). -if (!fs.lchmod) { - fs.lchmod = function (path, mode, cb) { - if (cb) { - process.nextTick(cb); - } - }; - fs.lchmodSync = function () {}; -} diff --git a/scripts/webpack.client.config.js b/scripts/webpack.client.config.js deleted file mode 100644 index 61481a18..00000000 --- a/scripts/webpack.client.config.js +++ /dev/null @@ -1,90 +0,0 @@ -const webpack = require("webpack"); -const path = require("path"); -const merge = require("webpack-merge"); -const MiniCssExtractPlugin = require("mini-css-extract-plugin"); -const PreloadWebpackPlugin = require("preload-webpack-plugin"); -const HtmlWebpackPlugin = require("html-webpack-plugin"); -const WebpackPwaManifest = require("webpack-pwa-manifest"); -const { GenerateSW } = require("workbox-webpack-plugin"); - -const root = path.join(__dirname, ".."); -const prod = process.env.NODE_ENV === "production" || process.env.CI === "true"; -const cachePattern = /\.(?:png|jpg|jpeg|svg|css|js|ttf|woff|eot|woff2|wasm)$/; - -module.exports = (options = {}) => merge( - require("./webpack.general.config")(options), { - devtool: prod ? "none" : "cheap-module-eval-source-map", - mode: prod ? "production" : "development", - entry: prod ? options.entry : [ - "webpack-hot-middleware/client?reload=true&quiet=true", - options.entry, - ], - module: { - rules: [{ - test: /\.s?css$/, - // This is required otherwise it'll fail to resolve CSS in common. - include: root, - use: [{ - loader: MiniCssExtractPlugin.loader, - }, { - loader: "css-loader", - }, { - loader: "sass-loader", - }], - }, { - test: /\.(png|ttf|woff|eot|woff2)$/, - use: [{ - loader: "file-loader", - options: { - name: "[path][name].[ext]", - }, - }], - }, { - test: /\.svg$/, - loader: 'url-loader' - }], - }, - plugins: [ - new MiniCssExtractPlugin({ - chunkFilename: `${options.name || "client"}.[name].[hash:6].css`, - filename: `${options.name || "client"}.[name].[hash:6].css` - }), - new HtmlWebpackPlugin({ - template: options.template - }), - new PreloadWebpackPlugin({ - rel: "preload", - as: "script" - }), - new WebpackPwaManifest({ - name: "Coder", - short_name: "Coder", - description: "Run VS Code on a remote server", - background_color: "#e5e5e5", - crossorigin: "use-credentials", - icons: [{ - src: path.join(root, "packages/web/assets/logo.png"), - sizes: [96, 128, 192, 256, 384], - }], - }) - ].concat(prod ? [ - new GenerateSW({ - importWorkboxFrom: "local", - include: [cachePattern], - runtimeCaching: [{ - urlPattern: cachePattern, - handler: "StaleWhileRevalidate", - options: { - cacheName: "code-server", - expiration: { - maxAgeSeconds: 86400, - }, - cacheableResponse: { - statuses: [0, 200], - }, - }, - }, - ]}), - ] : [new webpack.HotModuleReplacementPlugin()]), - target: "web" -}); diff --git a/scripts/webpack.general.config.js b/scripts/webpack.general.config.js deleted file mode 100644 index 4cfcb93a..00000000 --- a/scripts/webpack.general.config.js +++ /dev/null @@ -1,109 +0,0 @@ -const path = require("path"); -const os = require("os"); -const environment = process.env.NODE_ENV || "development"; -const HappyPack = require("happypack"); -const webpack = require("webpack"); -const TerserPlugin = require("terser-webpack-plugin"); - -const root = path.join(__dirname, ".."); - -module.exports = (options = {}) => ({ - context: root, - devtool: "none", - externals: { - fsevents: "fsevents", - }, - output: { - path: path.join(options.dirname || __dirname, "out"), - chunkFilename: `${options.name || "general"}.[name].[hash:6].js`, - filename: `${options.name || "general"}.[name].[hash:6].js` - }, - module: { - rules: [{ - loader: "string-replace-loader", - test: /\.(j|t)s/, - options: { - multiple: [{ - // These will be handled by file-loader. Must be a fully formed URI. - // The !! prefix causes it to ignore other loaders. - search: "require\\.toUrl\\(", - replace: `${ - options.node - ? "'file://'" - : "location.protocol + '//' + location.host + location.pathname.replace(/\\/$/,'')" - } + '/' + require('!!file-loader?name=[path][name].[ext]!' + `, - flags: "g", - }, { - search: "require\\.__\\$__nodeRequire", - replace: "require", - flags: "g", - }, { - search: "\\.attributes\\[([^\\]]+)\\] = ([^;]+)", - replace: ".setAttribute($1, $2)", - flags: "g", - }], - }, - }, { - test: /\.node$/, - use: "node-loader", - }, { - use: [{ - loader: "happypack/loader?id=ts", - }], - test: /(^.?|\.[^d]|[^.]d|[^.][^d])\.tsx?$/, - }, { - test: /\.wasm$/, - type: "javascript/auto", - }], - }, - resolve: { - alias: { - "@coder": path.join(root, "packages"), - }, - extensions: [".js", ".jsx", ".ts", ".tsx", ".json", ".css"], - mainFiles: [ - "index", - "src/index", - ], - }, - resolveLoader: { - modules: [ - path.join(root, "node_modules"), - ], - }, - plugins: [ - new HappyPack({ - id: "ts", - threads: Math.max(os.cpus().length - 1, 1), - loaders: [{ - path: "cache-loader", - query: { - cacheDirectory: path.join(__dirname, "..", ".cache"), - }, - }, { - path: "ts-loader", - query: { - happyPackMode: true, - compilerOptions: options.typescriptCompilerOptions, - }, - }], - }), - new webpack.DefinePlugin({ - "process.env.NODE_ENV": `"${environment}"`, - "process.env.VERSION": `"${process.env.VERSION || ""}"`, - }), - ], - optimization: { - minimizer: [ - new TerserPlugin({ - cache: path.join(__dirname, "..", ".cache", "terser"), - parallel: true, - }), - ], - }, - stats: { - all: false, // Fallback for options not defined. - errors: true, - warnings: true, - }, -}); diff --git a/scripts/webpack.node.config.js b/scripts/webpack.node.config.js deleted file mode 100644 index 559321aa..00000000 --- a/scripts/webpack.node.config.js +++ /dev/null @@ -1,15 +0,0 @@ -const merge = require("webpack-merge"); - -module.exports = (options = {}) => merge( - require("./webpack.general.config")({ - ...options, - node: true, - }), { - devtool: "none", - mode: "production", - target: "node", - externals: { - spdlog: "commonjs spdlog", - "node-pty": "commonjs node-pty", - } -}); diff --git a/packages/vscode/src/fill/zip.ts b/tar.ts similarity index 100% rename from packages/vscode/src/fill/zip.ts rename to tar.ts diff --git a/tsconfig.json b/tsconfig.json deleted file mode 100644 index bf78456c..00000000 --- a/tsconfig.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "compilerOptions": { - "target": "esnext", - "module": "commonjs", - "baseUrl": ".", - "rootDir": ".", - "jsx": "react", - "outDir": "dist", - "declaration": true, - "sourceMap": true, - "strict": true, - "resolveJsonModule": true, - "experimentalDecorators": true, - "importHelpers": true, - "plugins": [ - { - "name": "typescript-tslint-plugin" - } - ], - "paths": { - "@coder/*": [ - "./packages/*" - ], - "vs/*": [ - "./lib/vscode/src/vs/*" - ] - } - } -} diff --git a/packages/ide/src/upload.ts b/upload.ts similarity index 100% rename from packages/ide/src/upload.ts rename to upload.ts