From 98d626ea7b275cf694abc9dac7cd35d935294b80 Mon Sep 17 00:00:00 2001 From: Paul Marechal Date: Tue, 12 Oct 2021 18:09:36 -0400 Subject: [PATCH] initial implementation of an executable server The goal of this PR is to setup a browser version of Blueprint packaged as a "drag and drop" that's easy to deploy. The setup is a bit tricky and might not apply well to every kind of product made using the Theia framework, but it should work for most usages. Add `theia-blueprint-browser` Theia extension that contributes the required customizations to run in the packaged environment (mostly to accommodate to the new file layout). Use a `node`-specific Webpack configuration to bundle the backend along with the browser-specific customizations. Use a forked `pkg` package to support forking child processes with `execArgv` options. The fork is setup as a git submodule. --- .github/workflows/build.yml | 1 + .gitignore | 18 +- Jenkinsfile | 34 +- README.md | 13 +- applications/browser/.gitignore | 3 + applications/browser/node-webpack.config.js | 117 ++++++ applications/browser/package.json | 116 ++++++ applications/browser/replacements/bindings.js | 26 ++ .../browser/replacements/plugin-host-rpc.js | 164 ++++++++ .../browser/replacements/vscode-ripgrep.js | 19 + .../scripts/collect-theia-extensions.js | 30 ++ .../browser/scripts/package-ripgrep.js | 23 ++ applications/browser/scripts/run-pkg.js | 29 ++ applications/browser/webpack.config.js | 17 + applications/electron/electron-builder.yml | 11 +- applications/electron/package.json | 28 +- applications/electron/scripts/notarize.sh | 0 applications/electron/scripts/sign.sh | 0 .../electron/scripts/update-checksum.ts | 58 ++- package.json | 27 +- patches/pkg+5.5.2.patch | 60 +++ scripts/fix-missing-i18n.js | 50 +++ .../theia-blueprint-browser/.eslintrc.js | 10 + .../theia-blueprint-browser/package.json | 41 ++ .../src/node/theia-blueprint-application.ts | 29 ++ .../node/theia-blueprint-backend-module.ts | 68 ++++ .../src/node/theia-blueprint-ripgrep.ts | 23 ++ .../src/node/webpack-extension-packages.d.ts | 23 ++ .../theia-blueprint-browser/tsconfig.json | 11 + .../theia-blueprint-product/package.json | 5 +- .../theia-blueprint-updater/package.json | 5 +- yarn.lock | 355 ++++++++++++++---- 32 files changed, 1247 insertions(+), 167 deletions(-) create mode 100644 applications/browser/.gitignore create mode 100644 applications/browser/node-webpack.config.js create mode 100644 applications/browser/package.json create mode 100644 applications/browser/replacements/bindings.js create mode 100644 applications/browser/replacements/plugin-host-rpc.js create mode 100644 applications/browser/replacements/vscode-ripgrep.js create mode 100644 applications/browser/scripts/collect-theia-extensions.js create mode 100644 applications/browser/scripts/package-ripgrep.js create mode 100644 applications/browser/scripts/run-pkg.js create mode 100644 applications/browser/webpack.config.js mode change 100755 => 100644 applications/electron/scripts/notarize.sh mode change 100755 => 100644 applications/electron/scripts/sign.sh create mode 100644 patches/pkg+5.5.2.patch create mode 100644 scripts/fix-missing-i18n.js create mode 100644 theia-extensions/theia-blueprint-browser/.eslintrc.js create mode 100644 theia-extensions/theia-blueprint-browser/package.json create mode 100644 theia-extensions/theia-blueprint-browser/src/node/theia-blueprint-application.ts create mode 100644 theia-extensions/theia-blueprint-browser/src/node/theia-blueprint-backend-module.ts create mode 100644 theia-extensions/theia-blueprint-browser/src/node/theia-blueprint-ripgrep.ts create mode 100644 theia-extensions/theia-blueprint-browser/src/node/webpack-extension-packages.d.ts create mode 100644 theia-extensions/theia-blueprint-browser/tsconfig.json diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 078d757f2..2a70008b4 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -46,6 +46,7 @@ jobs: shell: bash run: | yarn --skip-integrity-check --network-timeout 100000 + yarn electron bundle yarn electron package env: NODE_OPTIONS: --max_old_space_size=4096 diff --git a/.gitignore b/.gitignore index eafa360eb..a7cdce7dd 100644 --- a/.gitignore +++ b/.gitignore @@ -1,10 +1,10 @@ .DS_Store -**/node_modules -**/.browser_modules -**/dist -**/lib -**/src-gen -**/gen-webpack.config.js -**/plugins -**/tsconfig.tsbuildinfo -*.log \ No newline at end of file +node_modules +.browser_modules +dist +lib +src-gen +gen-webpack.config.js +plugins +tsconfig.tsbuildinfo +*.log diff --git a/Jenkinsfile b/Jenkinsfile index 4bf63e1d4..4813c02dd 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -5,8 +5,8 @@ import groovy.json.JsonSlurper distFolder = "applications/electron/dist" releaseBranch = "master" -// Attempt to detect that a PR is Jenkins-related, by looking-for -// the word "jenkins" (case insensitive) in PR branch name and/or +// Attempt to detect that a PR is Jenkins-related, by looking-for +// the word "jenkins" (case insensitive) in PR branch name and/or // the PR title jenkinsRelatedRegex = "(?i).*jenkins.*" @@ -21,15 +21,15 @@ pipeline { } stages { stage('Build') { - // only proceed when merging on the release branch or if the + // only proceed when merging on the release branch or if the // PR seems Jenkins-related when { anyOf { expression { env.JOB_BASE_NAME ==~ /$releaseBranch/ } - expression { - env.CHANGE_BRANCH ==~ /$jenkinsRelatedRegex/ + expression { + env.CHANGE_BRANCH ==~ /$jenkinsRelatedRegex/ } expression { env.CHANGE_TITLE ==~ /$jenkinsRelatedRegex/ @@ -61,9 +61,9 @@ spec: - name: global-cache mountPath: /.cache - name: global-yarn - mountPath: /.yarn + mountPath: /.yarn - name: global-npm - mountPath: /.npm + mountPath: /.npm - name: electron-cache mountPath: /.electron-gyp volumes: @@ -128,15 +128,15 @@ spec: } } stage('Sign and Upload') { - // only proceed when merging on the release branch or if the + // only proceed when merging on the release branch or if the // PR seems Jenkins-related when { anyOf { expression { env.JOB_BASE_NAME ==~ /$releaseBranch/ } - expression { - env.CHANGE_BRANCH ==~ /$jenkinsRelatedRegex/ + expression { + env.CHANGE_BRANCH ==~ /$jenkinsRelatedRegex/ } expression { env.CHANGE_TITLE ==~ /$jenkinsRelatedRegex/ @@ -188,9 +188,9 @@ spec: - name: global-cache mountPath: /.cache - name: global-yarn - mountPath: /.yarn + mountPath: /.yarn - name: global-npm - mountPath: /.npm + mountPath: /.npm - name: electron-cache mountPath: /.electron-gyp - name: jnlp @@ -239,14 +239,10 @@ def buildInstaller() { checkout scm sh "printenv && yarn cache dir" sh "yarn cache clean" - try { + retry(MAX_RETRY) { sh(script: 'yarn --frozen-lockfile --force') - } catch(error) { - retry(MAX_RETRY) { - echo "yarn failed - Retrying" - sh(script: 'yarn --frozen-lockfile --force') - } } + sh(script: 'yarn electron bundle') sh "rm -rf ./${distFolder}" sshagent(['projects-storage.eclipse.org-bot-ssh']) { @@ -256,7 +252,7 @@ def buildInstaller() { def signInstaller(String ext, String os) { List installers = findFiles(glob: "${distFolder}/*.${ext}") - + // https://wiki.eclipse.org/IT_Infrastructure_Doc#Web_service if (os == 'mac') { url = 'https://cbi.eclipse.org/macos/codesign/sign' diff --git a/README.md b/README.md index ca05110a6..229b64380 100644 --- a/README.md +++ b/README.md @@ -40,7 +40,10 @@ Eclipse Theia Blueprint is ***not*** **a production-ready product**. Therefore, ## Development ### Requirements -Please check Theia's [prerequisites](https://github.com/eclipse-theia/theia/blob/master/doc/Developing.md#prerequisites), and keep node versions aligned between Theia Blueprint and that of the referenced Theia version. + +Please check Theia's [prerequisites](https://github.com/eclipse-theia/theia/blob/master/doc/Developing.md#prerequisites). + +We recommend using Node.js 16, but you might still be able to build this repository using Node.js 12. ### Documentation @@ -51,9 +54,11 @@ Documentation on how to package Theia as a Desktop Product may be found [here](h - Root level configures mono-repo build with lerna - `applications` groups the different app targets - `electron` contains app to package, packaging configuration, and E2E tests for the electron target. -- `theia-extensions` groups the various custom theia extensions for Blueprint - - `theia-blueprint-product` contains a Theia extension contributing the product branding (about dialogue and welcome page). - - `theia-blueprint-updater` contains a Theia extension contributing the update mechanism and corresponding UI elements (based on the electron updater). + - `browser` contains app to package, webpack configurations, and packaging configuration for the browser target. +- `theia-extensions` groups the various custom Theia Extensions for Blueprint + - `theia-blueprint-browser` contributes the necessary customizations for the backend to be packaged. + - `theia-blueprint-product` contributes the product branding (about dialogue and welcome page). + - `theia-blueprint-updater` contributes the update mechanism and corresponding UI elements (based on the electron updater). ### Build diff --git a/applications/browser/.gitignore b/applications/browser/.gitignore new file mode 100644 index 000000000..291e7a827 --- /dev/null +++ b/applications/browser/.gitignore @@ -0,0 +1,3 @@ +/bundled +/builtins +/packaged diff --git a/applications/browser/node-webpack.config.js b/applications/browser/node-webpack.config.js new file mode 100644 index 000000000..0a054ccc2 --- /dev/null +++ b/applications/browser/node-webpack.config.js @@ -0,0 +1,117 @@ +const path = require('path'); +const webpack = require('webpack'); +const TerserPlugin = require('terser-webpack-plugin'); + +/** @type {import('webpack').Configuration['mode']} */ +const mode = 'production'; + +/** @type {import('webpack').EntryObject} */ +const commonJsLibraries = {}; +for (const [entryPointName, entryPointPath] of Object.entries({ + 'backend-init-theia': '@theia/plugin-ext/lib/hosted/node/scanners/backend-init-theia', + 'nsfw-watcher': '@theia/filesystem/lib/node/nsfw-watcher', + 'plugin-vscode-init': '@theia/plugin-ext-vscode/lib/node/plugin-vscode-init', +})) { + commonJsLibraries[entryPointName] = { + import: require.resolve(entryPointPath), + library: { + type: 'commonjs2', + }, + }; +} + +const ignoredResources = new Set([ + 'node-ssh', + 'vertx' +]); + +/** @type {import('webpack').Configuration} */ +module.exports = { + mode, + devtool: mode === 'development' ? 'source-map' : false, + target: 'node', + node: { + global: false, + __filename: false, + __dirname: false + }, + output: { + filename: '[name].js', + path: path.resolve(__dirname, 'bundled') + }, + entry: { + // Main entry point of the Theia application backend: + 'blueprint': require.resolve('./src-gen/backend/main'), + // Theia's IPC mechanism: + 'ipc-bootstrap': require.resolve('@theia/core/lib/node/messaging/ipc-bootstrap'), + // VS Code extension support: + 'plugin-host': require.resolve('@theia/plugin-ext/lib/hosted/node/plugin-host'), + // Make sure the node-pty thread worker can be executed: + 'worker/conoutSocketWorker': require.resolve('node-pty/lib/worker/conoutSocketWorker'), + ...commonJsLibraries + }, + externals: { + child_process: 'commonjs2 child_process' + }, + module: { + parser: { + javascript: { + // `@theia/core` `dynamicRequire` function requires Webpack's magic comments + // to allow dynamic requires. Otherwise Webpack will replace any dynamic require + // call by a hardcoded function that throws an error when invoked. + commonjsMagicComments: true, + }, + }, + rules: [ + // Make sure we can still find and load our native addons. + { + test: /\.node$/, + loader: 'node-loader', + options: { + name: 'native/[name].[ext]' + } + }, + // jsonc-parser exposes its UMD implementation by default, which + // confuses Webpack leading to missing js in the bundles. + { + test: /node_modules[\\/](jsonc-parser)/, + loader: 'umd-compat-loader' + } + ] + }, + plugins: [ + // The bindings module does a lot of disk crawling which breaks when bundled. + // Instead we'll hardcode the native imports so that it can be statically analyzed. + new webpack.NormalModuleReplacementPlugin(/^bindings$/, path.resolve('replacements/bindings.js')), + // The ripgrep binary is in a different location once bundled. + new webpack.NormalModuleReplacementPlugin(/^vscode-ripgrep$/, path.resolve('replacements/vscode-ripgrep.js')), + // The ApplicationPackage's logic tries to find the Theia Extensions on disk, but when bundled+packaged this breaks. + // The idea is to pre-compute what's included in the application into a JSON and use this information instead. + new webpack.NormalModuleReplacementPlugin(/\/webpack-extension-packages$/, path.resolve('src-gen/backend/extension-packages.json')), + // Something in the plugin-host-rpc logic doesn't work with Webpack's numerical module IDs. + new webpack.NormalModuleReplacementPlugin(/\/plugin-host-rpc$/, resource => { + if (/[/\\]plugin-ext[/\\]/.test(resource.context)) { + resource.request = path.resolve('replacements/plugin-host-rpc.js'); + } + }), + // Webpack trips on the places where those modules are required. + // Since we'll never reach the code paths where they actually are required at runtime, + // it is safe to completely ignore them. Webpack will throw an error if they are required. + new webpack.IgnorePlugin({ + checkResource: resource => ignoredResources.has(resource) + }) + ], + optimization: { + // Split and reuse code across the various entry points + splitChunks: { + chunks: 'all' + }, + // Only minimize if we run webpack in production mode + minimize: mode === 'production', + minimizer: [ + new TerserPlugin({ + exclude: /^(lib|builtins)\// + }) + ] + }, +}; diff --git a/applications/browser/package.json b/applications/browser/package.json new file mode 100644 index 000000000..94d930c77 --- /dev/null +++ b/applications/browser/package.json @@ -0,0 +1,116 @@ +{ + "private": true, + "name": "theia-blueprint-server", + "description": "Eclipse Theia blueprint product", + "productName": "Theia Blueprint", + "version": "1.23.0", + "main": "scripts/theia-electron-main.js", + "license": "EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0", + "author": "Eclipse Theia ", + "homepage": "https://github.com/eclipse-theia/theia-blueprint#readme", + "bugs": { + "url": "https://github.com/eclipse-theia/theia/issues" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/eclipse-theia/theia-blueprint.git" + }, + "engines": { + "yarn": "1.0.x || >=1.2.1" + }, + "scripts": { + "bundle": "yarn -s bundle:frontend && yarn -s bundle:backend", + "bundle:frontend": "theia build --mode=production", + "bundle:backend": "yarn -s rebuild && node scripts/collect-theia-extensions > src-gen/backend/extension-packages.json && webpack --config node-webpack.config.js", + "clean": "theia clean && rimraf bundled packaged", + "package": "yarn -s package:clean && yarn -s package:pkg && yarn -s package:copy", + "package:clean": "rimraf packaged", + "package:copy": "cp -r builtins lib packaged && node scripts/package-ripgrep.js packaged", + "package:pkg": "node scripts/run-pkg.js --public --public-packages \"*\" --no-bytecode -t node16 -c package.json -o packaged/{{binaryName=blueprint}} bundled/blueprint.js", + "prepare": "theia download:plugins", + "rebuild": "theia rebuild:browser --cacheRoot ../.." + }, + "theia": { + "target": "browser", + "frontend": { + "config": { + "applicationName": "Theia Blueprint (Web)" + } + }, + "backend": { + "config": { + "startupTimeout": -1, + "resolveSystemPlugins": false + } + } + }, + "pkg": { + "bin": "bundled/blueprint.js", + "outputPath": "packaged", + "assets": [ + "package.json", + "bundled/**/*.js", + "bundled/native/*.node" + ] + }, + "dependencies": { + "@theia/bulk-edit": "1.23.0", + "@theia/callhierarchy": "1.23.0", + "@theia/console": "1.23.0", + "@theia/core": "1.23.0", + "@theia/debug": "1.23.0", + "@theia/editor": "1.23.0", + "@theia/editor-preview": "1.23.0", + "@theia/external-terminal": "1.23.0", + "@theia/file-search": "1.23.0", + "@theia/filesystem": "1.23.0", + "@theia/getting-started": "1.23.0", + "@theia/keymaps": "1.23.0", + "@theia/markers": "1.23.0", + "@theia/messages": "1.23.0", + "@theia/metrics": "1.23.0", + "@theia/mini-browser": "1.23.0", + "@theia/monaco": "1.23.0", + "@theia/navigator": "1.23.0", + "@theia/outline-view": "1.23.0", + "@theia/output": "1.23.0", + "@theia/plugin-dev": "1.23.0", + "@theia/plugin-ext": "1.23.0", + "@theia/plugin-ext-vscode": "1.23.0", + "@theia/preferences": "1.23.0", + "@theia/process": "1.23.0", + "@theia/property-view": "1.23.0", + "@theia/scm": "1.23.0", + "@theia/scm-extra": "1.23.0", + "@theia/search-in-workspace": "1.23.0", + "@theia/task": "1.23.0", + "@theia/terminal": "1.23.0", + "@theia/timeline": "1.23.0", + "@theia/toolbar": "1.23.0", + "@theia/typehierarchy": "1.23.0", + "@theia/userstorage": "1.23.0", + "@theia/variable-resolver": "1.23.0", + "@theia/vsx-registry": "1.23.0", + "@theia/workspace": "1.23.0", + "theia-blueprint-product": "1.23.0", + "theia-blueprint-browser": "1.23.0" + }, + "devDependencies": { + "node-loader": "^2.0.0" + }, + "theiaPluginsDir": "builtins", + "theiaPlugins": { + "vscode.git": "https://open-vsx.org/api/vscode/git/1.52.1/file/vscode.git-1.52.1.vsix", + "vscode.markdown-language-features": "https://open-vsx.org/api/vscode/markdown-language-features/1.39.2/file/vscode.markdown-language-features-1.39.2.vsix", + "vscode-builtin-extensions-pack": "https://open-vsx.org/api/eclipse-theia/builtin-extension-pack/1.50.1/file/eclipse-theia.builtin-extension-pack-1.50.1.vsix", + "redhat.java": "https://open-vsx.org/api/redhat/java/0.73.0/file/redhat.java-0.73.0.vsix", + "vscjava.vscode-java-debug": "https://open-vsx.org/api/vscjava/vscode-java-debug/0.30.0/file/vscjava.vscode-java-debug-0.30.0.vsix", + "vscjava.vscode-java-test": "https://open-vsx.org/api/vscjava/vscode-java-test/0.26.1/file/vscjava.vscode-java-test-0.26.1.vsix", + "vscjava.vscode-maven": "https://open-vsx.org/api/vscjava/vscode-maven/0.21.2/file/vscjava.vscode-maven-0.21.2.vsix", + "vscjava.vscode-java-dependency": "https://open-vsx.org/api/vscjava/vscode-java-dependency/0.16.0/file/vscjava.vscode-java-dependency-0.16.0.vsix" + }, + "theiaPluginsExcludeIds": [ + "vscode.extension-editing", + "vscode.microsoft-authentication" + ] +} diff --git a/applications/browser/replacements/bindings.js b/applications/browser/replacements/bindings.js new file mode 100644 index 000000000..9758a1048 --- /dev/null +++ b/applications/browser/replacements/bindings.js @@ -0,0 +1,26 @@ +/******************************************************************************** + * Copyright (C) 2020 Ericsson and others. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0 which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the Eclipse + * Public License v. 2.0 are satisfied: GNU General Public License, version 2 + * with the GNU Classpath Exception which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + ********************************************************************************/ + +/** + * @file Re-implement the `bindings` package to be Webpack-friendly. + */ + + module.exports = function (jsModule) { + switch (jsModule) { + case 'drivelist': return require('drivelist/build/Release/drivelist.node'); + } + throw new Error(`unhandled module: "${jsModule}"`); +} diff --git a/applications/browser/replacements/plugin-host-rpc.js b/applications/browser/replacements/plugin-host-rpc.js new file mode 100644 index 000000000..aa847469b --- /dev/null +++ b/applications/browser/replacements/plugin-host-rpc.js @@ -0,0 +1,164 @@ +/******************************************************************************** + * Copyright (C) 2021 Ericsson and others. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0 which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the Eclipse + * Public License v. 2.0 are satisfied: GNU General Public License, version 2 + * with the GNU Classpath Exception which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + ********************************************************************************/ + +const { PluginHostRPC: OriginalPluginHostRPC } = require('@theia/plugin-ext/lib/hosted/node/plugin-host-rpc'); +const { dynamicRequire } = require('@theia/core/lib/node/dynamic-require'); +const { PluginManagerExtImpl } = require('@theia/plugin-ext/lib/plugin/plugin-manager'); +const { loadManifest } = require('@theia/plugin-ext/lib/hosted/node/plugin-manifest-loader'); + +exports.PluginHostRPC = class extends OriginalPluginHostRPC { + createPluginManager(envExt, terminalService, storageProxy, preferencesManager, webview, secretsExt, rpc) { + const { extensionTestsPath } = process.env; + /** @type {import('@theia/plugin-ext/lib/plugin/plugin-manager').PluginHost} */ + const pluginHost = { + loadPlugin: plugin => { + console.log('PLUGIN_HOST(' + process.pid + '): PluginManagerExtImpl/loadPlugin(' + plugin.pluginPath + ')'); + // cleaning the cache for all files of that plug-in. + for (const [key, mod] of Object.entries(require.cache)) { + // attempting to reload a native module will throw an error, so skip them + if (typeof mod.id === 'string' && mod.id.endsWith('.node')) { + return; + } + // remove children that are part of the plug-in + if (Array.isArray(mod.children)) { + let i = mod.children.length; + while (i--) { + const childMod = mod.children[i]; + // ensure the child module is not null, is in the plug-in folder, and is not a native module (see above) + if (childMod && typeof childMod.id === 'string' && childMod.id.startsWith(plugin.pluginFolder) && !childMod.id.endsWith('.node')) { + // cleanup exports - note that some modules (e.g. ansi-styles) define their + // exports in an immutable manner, so overwriting the exports throws an error + delete childMod.exports; + mod.children.splice(i, 1); + for (let j = 0; j < childMod.children.length; j++) { + delete childMod.children[j]; + } + } + } + } + if (mod.parent && key.startsWith(plugin.pluginFolder)) { + // delete entry + delete __webpack_require__.c[key]; + const ix = mod.parent.children.indexOf(mod); + if (ix >= 0) { + mod.parent.children.splice(ix, 1); + } + } + } + if (plugin.pluginPath) { + return dynamicRequire(plugin.pluginPath); + } + }, + init: async raw => { + console.log('PLUGIN_HOST(' + process.pid + '): PluginManagerExtImpl/init()'); + const result = []; + const foreign = []; + for (const plg of raw) { + try { + const pluginModel = plg.model; + const pluginLifecycle = plg.lifecycle; + const rawModel = await loadManifest(pluginModel.packagePath); + rawModel.packagePath = pluginModel.packagePath; + if (pluginModel.entryPoint.frontend) { + foreign.push({ + pluginPath: pluginModel.entryPoint.frontend, + pluginFolder: pluginModel.packagePath, + pluginUri: pluginModel.packageUri, + model: pluginModel, + lifecycle: pluginLifecycle, + rawModel + }); + } + else { + let backendInitPath = pluginLifecycle.backendInitPath; + // if no init path, try to init as regular Theia plugin + if (!backendInitPath) { + backendInitPath = __dirname + '/scanners/backend-init-theia.js'; + } + const plugin = { + pluginPath: pluginModel.entryPoint.backend, + pluginFolder: pluginModel.packagePath, + pluginUri: pluginModel.packageUri, + model: pluginModel, + lifecycle: pluginLifecycle, + rawModel + }; + this.initContext(backendInitPath, plugin); + result.push(plugin); + } + } + catch (e) { + console.error(`Failed to initialize ${plg.model.id} plugin.`, e); + } + } + return [result, foreign]; + }, + initExtApi: extApi => { + for (const api of extApi) { + if (api.backendInitPath) { + try { + const extApiInit = dynamicRequire(api.backendInitPath); + extApiInit.provideApi(rpc, pluginManager); + } + catch (e) { + console.error(e); + } + } + } + }, + }; + if (extensionTestsPath) { + pluginHost.loadTests = async () => { + /* eslint-disable @typescript-eslint/no-explicit-any */ + // Require the test runner via node require from the provided path + let testRunner; + let requireError; + try { + testRunner = dynamicRequire(extensionTestsPath); + } + catch (error) { + requireError = error; + } + // Execute the runner if it follows our spec + if (testRunner && typeof testRunner.run === 'function') { + return new Promise((resolve, reject) => { + testRunner.run(extensionTestsPath, (error) => { + if (error) { + reject(error.toString()); + } + else { + resolve(undefined); + } + }); + }); + } + throw new Error(requireError ? + requireError.toString() : + `Path ${extensionTestsPath} does not point to a valid extension test runner.`); + }; + } + return new PluginManagerExtImpl( + pluginHost, + envExt, + terminalService, + storageProxy, + secretsExt, + preferencesManager, + webview, + rpc + ); + } +} diff --git a/applications/browser/replacements/vscode-ripgrep.js b/applications/browser/replacements/vscode-ripgrep.js new file mode 100644 index 000000000..58626231b --- /dev/null +++ b/applications/browser/replacements/vscode-ripgrep.js @@ -0,0 +1,19 @@ +/******************************************************************************** + * Copyright (C) 2021 Ericsson and others. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0 which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the Eclipse + * Public License v. 2.0 are satisfied: GNU General Public License, version 2 + * with the GNU Classpath Exception which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + ********************************************************************************/ + +const { rgPath } = require('theia-blueprint-browser/lib/node/theia-blueprint-ripgrep'); + +exports.rgPath = rgPath; diff --git a/applications/browser/scripts/collect-theia-extensions.js b/applications/browser/scripts/collect-theia-extensions.js new file mode 100644 index 000000000..e9bcb5d7c --- /dev/null +++ b/applications/browser/scripts/collect-theia-extensions.js @@ -0,0 +1,30 @@ +/******************************************************************************** + * Copyright (C) 2022 Ericsson and others. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0 which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the Eclipse + * Public License v. 2.0 are satisfied: GNU General Public License, version 2 + * with the GNU Classpath Exception which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + ********************************************************************************/ + +const { resolve } = require('path'); +const { ApplicationPackage } = require('@theia/application-package'); +const { deepClone } = require('@theia/core/lib/common/objects'); + +const app = new ApplicationPackage({ + projectPath: resolve(__dirname, '..'), + appTarget: 'browser', +}); +const packages = app.extensionPackages.map(extensionPackage => { + const packageJson = deepClone(require(`${extensionPackage.name}/package.json`)); + packageJson.name = extensionPackage.name; // use potential alias + return packageJson; +}); +console.log(JSON.stringify(packages, undefined, 2)); diff --git a/applications/browser/scripts/package-ripgrep.js b/applications/browser/scripts/package-ripgrep.js new file mode 100644 index 000000000..2243ba220 --- /dev/null +++ b/applications/browser/scripts/package-ripgrep.js @@ -0,0 +1,23 @@ +/******************************************************************************** + * Copyright (C) 2021 Ericsson and others. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0 which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the Eclipse + * Public License v. 2.0 are satisfied: GNU General Public License, version 2 + * with the GNU Classpath Exception which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + ********************************************************************************/ + +const { spawnSync } = require('child_process'); +const { resolve, dirname } = require('path'); + +// Copy ripgrep at the specified location on the command line +const destination = resolve(process.argv[2].trim()); +const ripgrepBinFolder = resolve(dirname(require.resolve('vscode-ripgrep/package.json')), 'bin'); +spawnSync('cp', ['-r', ripgrepBinFolder, destination ], { stdio: 'inherit' }); diff --git a/applications/browser/scripts/run-pkg.js b/applications/browser/scripts/run-pkg.js new file mode 100644 index 000000000..b323b4729 --- /dev/null +++ b/applications/browser/scripts/run-pkg.js @@ -0,0 +1,29 @@ +/******************************************************************************** + * Copyright (C) 2022 Ericsson and others. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0 which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the Eclipse + * Public License v. 2.0 are satisfied: GNU General Public License, version 2 + * with the GNU Classpath Exception which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + ********************************************************************************/ + +const { exec } = require('pkg'); + +const executableExtension = process.platform === 'win32' ? '.exe' : '' + +exec(process.argv.slice(2).map( + arg => arg.replace( + /\{\{binaryName=(?.+)\}\}/g, + '$' + executableExtension + ) +)).catch(error => { + console.log(error); + process.exitCode = 1; +}); diff --git a/applications/browser/webpack.config.js b/applications/browser/webpack.config.js new file mode 100644 index 000000000..8bd02af31 --- /dev/null +++ b/applications/browser/webpack.config.js @@ -0,0 +1,17 @@ +/** + * This file can be edited to customize webpack configuration. + * To reset delete this file and rerun theia build again. + */ +// @ts-check +const config = require('./gen-webpack.config.js'); + +/** + * Expose bundled modules on window.theia.moduleName namespace, e.g. + * window['theia']['@theia/core/lib/common/uri']. + * Such syntax can be used by external code, for instance, for testing. +config.module.rules.push({ + test: /\.js$/, + loader: require.resolve('@theia/application-manager/lib/expose-loader') +}); */ + +module.exports = config; \ No newline at end of file diff --git a/applications/electron/electron-builder.yml b/applications/electron/electron-builder.yml index 3f7b88d74..04ed61528 100644 --- a/applications/electron/electron-builder.yml +++ b/applications/electron/electron-builder.yml @@ -4,8 +4,7 @@ copyright: Copyright © 2020 Eclipse Foundation, Inc electronDist: ../../node_modules/electron/dist electronVersion: 15.3.7 # Although it is generally not recommended to disable asar, it is required for Theia. -# Enabling this leads to: process ERROR Error: spawn ENOTDIR -# because binaries can not be executed from the asar archive. +# Enabling this leads to `process ERROR Error: spawn ENOTDIR` because JS scripts cannot be executed from the asar archive. # See asar file API limitations: https://www.electronjs.org/docs/tutorial/application-packaging#limitations-of-the-node-api asar: false @@ -14,12 +13,16 @@ directories: # node_modules and package.json are copied automatically # Copying node_modules must be automatic for correct resolvement of binaries. -# Furthermore, This reduces bundle sizes significantly because it avoids duplicates of the electron runtime. files: - src-gen - lib - scripts - - "!**node_modules/electron/**" + # Exclude Electron's development files + - "!**/node_modules/electron${/*}" + # Exclude TS sources and maps + - "!**/node_modules/@theia/*/src${/*}" + - "!**/node_modules/**/*.{ts,tsx,js.map,d.ts,d.ts.map,eslintrc,eslintcache,tsbuildinfo}" + - "!**/node_modules/*/tsconfig.json" extraResources: - from: plugins to: app/plugins diff --git a/applications/electron/package.json b/applications/electron/package.json index 51ce52ba4..1922c9d0d 100644 --- a/applications/electron/package.json +++ b/applications/electron/package.json @@ -16,8 +16,7 @@ "url": "git+https://github.com/eclipse-theia/theia-blueprint.git" }, "engines": { - "yarn": "1.0.x || >=1.2.1", - "node": ">=12.14.1 <13" + "yarn": "1.0.x || >=1.2.1" }, "theia": { "target": "electron", @@ -81,14 +80,13 @@ "@theia/variable-resolver": "1.23.0", "@theia/vsx-registry": "1.23.0", "@theia/workspace": "1.23.0", - "fs-extra": "^9.0.1", "theia-blueprint-updater": "1.23.0", "theia-blueprint-product": "1.23.0" }, "devDependencies": { - "@theia/cli": "1.23.0", "@types/js-yaml": "^3.12.0", "@types/yargs": "17.0.7", + "@types/node": "12", "@wdio/cli": "^6.10.2", "@wdio/local-runner": "^6.10.2", "@wdio/mocha-framework": "^6.8.0", @@ -109,21 +107,21 @@ "yargs": "17.2.1" }, "scripts": { - "prepare": "yarn build && yarn download:plugins", + "bundle": "theia build", "clean": "theia clean && rimraf node_modules", "clean:dist": "rimraf dist", - "build": "theia rebuild:electron && yarn bundle", - "bundle": "theia build", - "watch": "concurrently -n compile,bundle \"theiaext watch --preserveWatchOutput\" \"theia build --watch --mode development\"", - "start": "electron scripts/theia-electron-main.js", - "start:debug": "yarn start --log-level=debug", - "package": "yarn clean:dist && electron-builder -c.mac.identity=null --publish never", - "deploy": "yarn clean:dist && electron-builder -c.mac.identity=null --publish always", - "package:preview": "yarn clean:dist && electron-builder -c.mac.identity=null --dir", + "deploy": "yarn -s clean:dist && yarn -s rebuild && electron-builder -c.mac.identity=null --publish always", + "download:plugins": "theia download:plugins", + "package": "yarn -s clean:dist && yarn -s rebuild && electron-builder -c.mac.identity=null --publish never", + "package:preview": "yarn -s clean:dist && electron-builder -c.mac.identity=null --dir", + "prepare": "yarn -s download:plugins && yarn -s bundle", + "rebuild": "theia rebuild:electron --cacheRoot ../..", + "start": "yarn -s rebuild && electron scripts/theia-electron-main.js", + "start:debug": "yarn -s start --log-level=debug", + "test": "yarn -s rebuild && mocha --timeout 60000 \"./test/*.spec.js\"", "update:checksum": "ts-node scripts/update-checksum.ts", "update:next": "ts-node ../../scripts/update-theia-to-next.ts", - "download:plugins": "theia download:plugins", - "test": "mocha --timeout 60000 \"./test/*.spec.js\"" + "watch": "concurrently -n compile,bundle \"theiaext watch --preserveWatchOutput\" \"theia build --watch --mode development\"" }, "theiaPluginsDir": "plugins", "theiaPlugins": { diff --git a/applications/electron/scripts/notarize.sh b/applications/electron/scripts/notarize.sh old mode 100755 new mode 100644 diff --git a/applications/electron/scripts/sign.sh b/applications/electron/scripts/sign.sh old mode 100755 new mode 100644 diff --git a/applications/electron/scripts/update-checksum.ts b/applications/electron/scripts/update-checksum.ts index ed92bb2f0..593a0f01e 100644 --- a/applications/electron/scripts/update-checksum.ts +++ b/applications/electron/scripts/update-checksum.ts @@ -13,13 +13,17 @@ * * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ + import * as crypto from 'crypto'; import * as fs from 'fs'; import * as jsyaml from 'js-yaml'; import * as path from 'path'; +import * as stream from 'stream' +import { promisify } from 'util'; import { hideBin } from 'yargs/helpers'; import yargs from 'yargs/yargs'; +const pipeline = promisify(stream.pipeline); const argv = yargs(hideBin(process.argv)) .option('executable', { alias: 'e', type: 'string', default: 'TheiaBlueprint.AppImage', desription: 'The executable for which the checksum needs to be updated' }) @@ -48,7 +52,7 @@ async function execute(): Promise { console.log('Exe: ' + executablePath + '; Yaml: ' + yamlPath) - const hash = await hashFile(executablePath, 'sha512', 'base64', {}); + const hash = await hashFile(executablePath, 'sha512', 'base64'); const size = fs.statSync(executablePath).size const yamlContents: string = fs.readFileSync(yamlPath, { encoding: 'utf8' }) @@ -66,38 +70,26 @@ async function execute(): Promise { fs.writeFileSync(yamlPath, newYamlContents); } -function hashFile(file: fs.PathLike, algorithm = 'sha512', encoding: BufferEncoding = 'base64', options: string | { - flags?: string; - encoding?: BufferEncoding; - fd?: number; - mode?: number; - autoClose?: boolean; - emitClose?: boolean; - start?: number; - end?: number; - highWaterMark?: number; -}): Promise { - return new Promise((resolve, reject) => { - const hash = crypto.createHash(algorithm); - hash.on('error', reject).setEncoding(encoding); - fs.createReadStream( - file, - Object.assign({}, options, { - highWaterMark: 1024 * 1024, - }) - ) - .on('error', reject) - .on('end', () => { - hash.end(); - resolve(hash.read()); - }) - .pipe( - hash, - { - end: false, - } - ); - }); +interface HashFileOptions { + flags?: string + encoding?: BufferEncoding + fd?: number + mode?: number + autoClose?: boolean + emitClose?: boolean + start?: number + end?: number + highWaterMark?: number +} +async function hashFile(file: fs.PathLike, algorithm: string, encoding?: undefined, options?: HashFileOptions): Promise +async function hashFile(file: fs.PathLike, algorithm: string, encoding: crypto.BinaryToTextEncoding, options?: HashFileOptions): Promise +async function hashFile(file: fs.PathLike, algorithm = 'sha512', encoding: crypto.BinaryToTextEncoding = 'base64', options: HashFileOptions = {}): Promise { + const hash = crypto.createHash(algorithm); + await pipeline( + fs.createReadStream(file, { ...options, highWaterMark: 1024 * 1024 }), + hash, + ); + return hash.digest(encoding); } function updatedPath(path: string, version: string): string { diff --git a/package.json b/package.json index 57ac87acd..036d16c5a 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,7 @@ }, "engines": { "yarn": "1.0.x || >=1.2.1", - "node": ">=12.14.1 <13" + "node": ">=12.14.1" }, "devDependencies": { "@theia/cli": "1.23.0", @@ -27,25 +27,34 @@ "eslint-plugin-no-unsanitized": "^3.1.5", "eslint-plugin-react": "^7.23.2", "lerna": "^4.0.0", + "node-fetch": "cjs", + "patch-package": "^6.4.7", + "pkg": "5.5.2", + "postinstall-postinstall": "^2.1.0", "rimraf": "^2.7.1", "ts-node": "^10.0.0", "type-fest": "^0.20.2", + "typescript": "~4.5.5", "yargs": "17.2.1" }, "scripts": { - "prepare": "lerna run prepare", + "browser": "yarn --cwd applications/browser", + "build": "lerna run build", + "clean": "lerna run clean && rimraf node_modules", + "electron": "yarn --cwd applications/electron", "lint": "lerna run lint", "lint:fix": "lerna run lint:fix", - "clean": "lerna run clean && rimraf node_modules", - "build": "lerna run build", - "bundle": "lerna run bundle", - "watch": "lerna run --parallel watch", + "postinstall": "patch-package", + "prepare": "node scripts/fix-missing-i18n.js && lerna run prepare", "test": "lerna run test", - "electron": "yarn --cwd applications/electron", - "update:next": "ts-node scripts/update-theia-to-next.ts && lerna run update:next" + "update:next": "ts-node scripts/update-theia-to-next.ts && lerna run update:next", + "watch": "lerna run --parallel watch" }, "workspaces": [ "applications/*", "theia-extensions/*" - ] + ], + "resolutions": { + "**/@types/react": "16.14.23" + } } diff --git a/patches/pkg+5.5.2.patch b/patches/pkg+5.5.2.patch new file mode 100644 index 000000000..349e6ae60 --- /dev/null +++ b/patches/pkg+5.5.2.patch @@ -0,0 +1,60 @@ +diff --git a/node_modules/pkg/prelude/bootstrap.js b/node_modules/pkg/prelude/bootstrap.js +index 7285b7c..b1f1774 100644 +--- a/node_modules/pkg/prelude/bootstrap.js ++++ b/node_modules/pkg/prelude/bootstrap.js +@@ -1859,6 +1859,7 @@ function payloadFileSync(pointer) { + execFileSync: childProcess.execFileSync, + exec: childProcess.exec, + execSync: childProcess.execSync, ++ fork: childProcess.fork, + }; + + function setOptsEnv(args) { +@@ -1870,6 +1871,16 @@ function payloadFileSync(pointer) { + } + const opts = args[pos]; + if (!opts.env) opts.env = _extend({}, process.env); ++ if (Array.isArray(opts.execArgv)) { ++ // fork: The patched Node.js binary prevents us from passing execArgv on ++ // the cli. Instead we'll pass those options through the environment. ++ // https://nodejs.org/docs/latest/api/cli.html#cli_node_options_options ++ opts.env.NODE_OPTIONS = ++ typeof opts.env.NODE_OPTIONS === 'string' ++ ? `${opts.env.NODE_OPTIONS} ${opts.execArgv.join(' ')}` ++ : opts.execArgv.join(' '); ++ delete opts.execArgv; ++ } + if (opts.env.PKG_EXECPATH === 'PKG_INVOKE_NODEJS') return; + opts.env.PKG_EXECPATH = EXECPATH; + } +@@ -1977,6 +1988,12 @@ function payloadFileSync(pointer) { + modifyLong(args, 0); + return ancestor.execSync.apply(childProcess, args); + }; ++ ++ childProcess.fork = function fork() { ++ var args = cloneArgs(arguments); ++ setOptsEnv(args); ++ return ancestor.fork.apply(childProcess, args); ++ }; + })(); + + // ///////////////////////////////////////////////////////////////// +@@ -2102,8 +2119,15 @@ function payloadFileSync(pointer) { + // Example: /tmp/pkg//sharp/build/Release/sharp.node + newPath = path.join(tmpFolder, modulePackagePath, moduleBaseName); + } else { +- // simple load the file in the temporary folder +- newPath = path.join(tmpFolder, moduleBaseName); ++ const tmpModulePath = path.join(tmpFolder, moduleBaseName); ++ ++ if (!fs.existsSync(tmpModulePath)) { ++ fs.mkdirSync(path.dirname(tmpModulePath), { recursive: true }); ++ copyFileSync(modulePath, tmpModulePath); ++ } ++ ++ // load the copied file in the temporary folder ++ newPath = tmpModulePath; + } + + // replace the path with the new module path diff --git a/scripts/fix-missing-i18n.js b/scripts/fix-missing-i18n.js new file mode 100644 index 000000000..0ddb37894 --- /dev/null +++ b/scripts/fix-missing-i18n.js @@ -0,0 +1,50 @@ +/******************************************************************************** + * Copyright (C) 2022 Ericsson and others. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0 which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the Eclipse + * Public License v. 2.0 are satisfied: GNU General Public License, version 2 + * with the GNU Classpath Exception which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + ********************************************************************************/ + +const assert = require('assert'); +const fetch = require('node-fetch'); +const fs = require('fs').promises; +const path = require('path'); + +fix(); + +/** + * Theia 1.23.0 does not publish its `i18n` folder. + * This will be fixed in 1.24.0. + */ +async function fix() { + const corePackageJsonPath = require.resolve('@theia/core/package.json'); + const corePackageJson = JSON.parse(await fs.readFile(corePackageJsonPath, 'utf8')); + const corePath = path.dirname(corePackageJsonPath); + if (corePackageJson.version !== '1.23.0') { + console.warn(`${__filename}: Found @theia/core@${corePackageJson.version}`); + console.warn(`${__filename}: Running this script might no longer be required!`); + return; + } + // Use GitHub's API to fetch contents of the core/i18n folder for the 1.23.0 tag/release + const i18nReq = await fetch('https://api.github.com/repos/eclipse-theia/theia/contents/packages/core/i18n?ref=v1.23.0'); + const i18n = await i18nReq.json(); + assert(Array.isArray(i18n)); + await fs.mkdir(path.resolve(corePath, 'i18n'), { recursive: true }); + await Promise.all(i18n.map(async file => { + if (!file.type === 'file') { + return; + } + const contentReq = await fetch(file.download_url); + const content = await contentReq.text(); + await fs.writeFile(path.resolve(corePath, 'i18n', file.name), content); + })); +} diff --git a/theia-extensions/theia-blueprint-browser/.eslintrc.js b/theia-extensions/theia-blueprint-browser/.eslintrc.js new file mode 100644 index 000000000..130899435 --- /dev/null +++ b/theia-extensions/theia-blueprint-browser/.eslintrc.js @@ -0,0 +1,10 @@ +/** @type {import('eslint').Linter.Config} */ +module.exports = { + extends: [ + '../../configs/build.eslintrc.json' + ], + parserOptions: { + tsconfigRootDir: __dirname, + project: 'tsconfig.json' + } +}; diff --git a/theia-extensions/theia-blueprint-browser/package.json b/theia-extensions/theia-blueprint-browser/package.json new file mode 100644 index 000000000..49727f09c --- /dev/null +++ b/theia-extensions/theia-blueprint-browser/package.json @@ -0,0 +1,41 @@ +{ + "private": true, + "name": "theia-blueprint-browser", + "version": "1.23.0", + "description": "Eclipse Theia Blueprint Product Branding", + "dependencies": { + "@theia/core": "1.23.0", + "@theia/plugin-ext": "1.23.0", + "@theia/search-in-workspace": "1.23.0" + }, + "devDependencies": { + "rimraf": "^2.7.1", + "tslint": "^5.12.0" + }, + "theiaExtensions": [ + { + "backend": "lib/node/theia-blueprint-backend-module" + } + ], + "keywords": [ + "theia-extension" + ], + "license": "EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0", + "repository": { + "type": "git", + "url": "https://github.com/eclipse-theia/theia-blueprint.git" + }, + "bugs": { + "url": "https://github.com/eclipse-theia/theia-blueprint/issues" + }, + "homepage": "https://github.com/eclipse-theia/theia-blueprint", + "files": [ + "lib", + "src" + ], + "scripts": { + "prepare": "yarn build", + "clean": "rimraf lib tsconfig.tsbuildinfo", + "build": "tsc -b" + } +} diff --git a/theia-extensions/theia-blueprint-browser/src/node/theia-blueprint-application.ts b/theia-extensions/theia-blueprint-browser/src/node/theia-blueprint-application.ts new file mode 100644 index 000000000..fa8e8a142 --- /dev/null +++ b/theia-extensions/theia-blueprint-browser/src/node/theia-blueprint-application.ts @@ -0,0 +1,29 @@ +/******************************************************************************** + * Copyright (C) 2020 Ericsson and others. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0 which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the Eclipse + * Public License v. 2.0 are satisfied: GNU General Public License, version 2 + * with the GNU Classpath Exception which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + ********************************************************************************/ + +import * as path from 'path'; + +/** + * When packaged as an executable, this is the folder where the exe is located. + */ +export const installationPath = path.dirname(process.execPath); + +/** + * Get a path relative to the installation folder's path. + */ +export function getAppResourcePath(...parts: string[]): string { + return path.resolve(installationPath, ...parts); +} diff --git a/theia-extensions/theia-blueprint-browser/src/node/theia-blueprint-backend-module.ts b/theia-extensions/theia-blueprint-browser/src/node/theia-blueprint-backend-module.ts new file mode 100644 index 000000000..300ef3b78 --- /dev/null +++ b/theia-extensions/theia-blueprint-browser/src/node/theia-blueprint-backend-module.ts @@ -0,0 +1,68 @@ +/******************************************************************************** + * Copyright (C) 2021 Ericsson and others. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0 which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the Eclipse + * Public License v. 2.0 are satisfied: GNU General Public License, version 2 + * with the GNU Classpath Exception which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + ********************************************************************************/ + +import { BackendApplicationCliContribution, BackendApplicationServer } from '@theia/core/lib/node'; +import { ApplicationPackage, ExtensionPackage } from '@theia/core/shared/@theia/application-package'; +import { ContainerModule, injectable } from '@theia/core/shared/inversify'; +import { PluginDeployerParticipant, PluginDeployerStartContext } from '@theia/plugin-ext'; +import { RgPath } from '@theia/search-in-workspace/lib/node/ripgrep-search-in-workspace-server'; +import { rgPath } from './theia-blueprint-ripgrep'; +import { getAppResourcePath, installationPath } from './theia-blueprint-application'; +import rawExtensionPackages = require('./webpack-extension-packages'); +import express = require('express'); +import path = require('path'); + +export default new ContainerModule((bind, unbind, isBound, rebind) => { + bind(PluginDeployerParticipant).to(BlueprintBuiltinPlugins).inSingletonScope(); + bind(BackendApplicationServer).to(BlueprintApplicationServer).inSingletonScope(); + rebind(ApplicationPackage).toConstantValue(new BlueprintApplicationPackage({ projectPath: installationPath })); + rebind(BackendApplicationCliContribution).to(BlueprintBackendApplicationCliContribution).inSingletonScope(); + rebind(RgPath).toConstantValue(rgPath); +}); + +@injectable() +class BlueprintBuiltinPlugins implements PluginDeployerParticipant { + async onWillStart(context: PluginDeployerStartContext): Promise { + context.systemEntries.push(`local-dir:${getAppResourcePath('builtins')}`); + } +} + +@injectable() +class BlueprintApplicationServer implements BackendApplicationServer { + configure(app: express.Application): void { + app.use(express.static(getAppResourcePath('lib'))); + } +} + +@injectable() +export class BlueprintApplicationPackage extends ApplicationPackage { + protected _applicationPackages: ExtensionPackage[] = rawExtensionPackages.map( + raw => new ExtensionPackage(raw, this.registry) + ); + get packagePath(): string { + return path.join(__dirname, '../package.json'); + } + get extensionPackages(): ExtensionPackage[] { + return this._applicationPackages; + } +} + +@injectable() +class BlueprintBackendApplicationCliContribution extends BackendApplicationCliContribution { + protected appProjectPath(): string { + return installationPath; + } +} diff --git a/theia-extensions/theia-blueprint-browser/src/node/theia-blueprint-ripgrep.ts b/theia-extensions/theia-blueprint-browser/src/node/theia-blueprint-ripgrep.ts new file mode 100644 index 000000000..1b182b35c --- /dev/null +++ b/theia-extensions/theia-blueprint-browser/src/node/theia-blueprint-ripgrep.ts @@ -0,0 +1,23 @@ +/******************************************************************************** + * Copyright (C) 2021 Ericsson and others. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0 which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the Eclipse + * Public License v. 2.0 are satisfied: GNU General Public License, version 2 + * with the GNU Classpath Exception which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + ********************************************************************************/ + +import { getAppResourcePath } from './theia-blueprint-application'; + +export const rgName = process.platform === 'win32' + ? 'rg.exe' + : 'rg'; + +export const rgPath = getAppResourcePath(`bin/${rgName}`); diff --git a/theia-extensions/theia-blueprint-browser/src/node/webpack-extension-packages.d.ts b/theia-extensions/theia-blueprint-browser/src/node/webpack-extension-packages.d.ts new file mode 100644 index 000000000..39ac9565d --- /dev/null +++ b/theia-extensions/theia-blueprint-browser/src/node/webpack-extension-packages.d.ts @@ -0,0 +1,23 @@ +/******************************************************************************** + * Copyright (C) 2022 Ericsson and others. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0 which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the Eclipse + * Public License v. 2.0 are satisfied: GNU General Public License, version 2 + * with the GNU Classpath Exception which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + ********************************************************************************/ + +// This module is for TypeScript to understand typings. +// It should be replaced using Webpack during the bundling to provide +// the actual JSON data, in this case the serialized ExtensionPackage array. + +import { RawExtensionPackage } from '@theia/core/shared/@theia/application-package'; +declare const extensionPackages: RawExtensionPackage[]; +declare export = extensionPackages; diff --git a/theia-extensions/theia-blueprint-browser/tsconfig.json b/theia-extensions/theia-blueprint-browser/tsconfig.json new file mode 100644 index 000000000..c8e704ded --- /dev/null +++ b/theia-extensions/theia-blueprint-browser/tsconfig.json @@ -0,0 +1,11 @@ +{ + "extends": "../../configs/base.tsconfig", + "compilerOptions": { + "rootDir": "src", + "outDir": "lib", + "baseUrl": "." + }, + "include": [ + "src", + ] +} diff --git a/theia-extensions/theia-blueprint-product/package.json b/theia-extensions/theia-blueprint-product/package.json index 9694b35ce..002f18d71 100644 --- a/theia-extensions/theia-blueprint-product/package.json +++ b/theia-extensions/theia-blueprint-product/package.json @@ -12,8 +12,7 @@ }, "devDependencies": { "rimraf": "^2.7.1", - "tslint": "^5.12.0", - "typescript": "^3.9.2" + "tslint": "^5.12.0" }, "theiaExtensions": [ { @@ -39,7 +38,7 @@ "src" ], "scripts": { - "prepare": "yarn clean && yarn build", + "prepare": "yarn build", "clean": "rimraf lib *.tsbuildinfo", "build": "tsc -b", "lint": "eslint --ext js,jsx,ts,tsx src", diff --git a/theia-extensions/theia-blueprint-updater/package.json b/theia-extensions/theia-blueprint-updater/package.json index c31654922..caef2d301 100644 --- a/theia-extensions/theia-blueprint-updater/package.json +++ b/theia-extensions/theia-blueprint-updater/package.json @@ -14,8 +14,7 @@ }, "devDependencies": { "rimraf": "^2.7.1", - "tslint": "^5.12.0", - "typescript": "^3.9.2" + "tslint": "^5.12.0" }, "theiaExtensions": [ { @@ -40,7 +39,7 @@ "src" ], "scripts": { - "prepare": "yarn clean && yarn build", + "prepare": "yarn build", "clean": "rimraf lib *.tsbuildinfo", "build": "tsc -b", "lint": "eslint --ext js,jsx,ts,tsx src", diff --git a/yarn.lock b/yarn.lock index 49a65a068..c8544e1c7 100644 --- a/yarn.lock +++ b/yarn.lock @@ -241,7 +241,7 @@ dependencies: "@babel/types" "^7.16.7" -"@babel/helper-validator-identifier@^7.16.7": +"@babel/helper-validator-identifier@^7.15.7", "@babel/helper-validator-identifier@^7.16.7": version "7.16.7" resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.16.7.tgz#e8c602438c4a8195751243da9031d1607d247cad" integrity sha512-hsEnFemeiW4D08A5gUAZxLBTXpZ39P+a+DGDsHw1yxqyQ/jzFEnxf5uTEGp+3bzAbNOxU1paTgYS4ECU/IgfDw== @@ -279,6 +279,11 @@ chalk "^2.0.0" js-tokens "^4.0.0" +"@babel/parser@7.16.2": + version "7.16.2" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.16.2.tgz#3723cd5c8d8773eef96ce57ea1d9b7faaccd12ac" + integrity sha512-RUVpT0G2h6rOZwqLDTrKk7ksNv7YpAilTnYe1/Q+eDjxEceRMKVWbCsX7t8h6C1qCFi/1Y8WZjcEPBAFG27GPw== + "@babel/parser@^7.16.7", "@babel/parser@^7.17.3": version "7.17.3" resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.17.3.tgz#b07702b982990bf6fdc1da5049a23fece4c5c3d0" @@ -911,6 +916,14 @@ debug "^4.1.0" globals "^11.1.0" +"@babel/types@7.16.0": + version "7.16.0" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.16.0.tgz#db3b313804f96aadd0b776c4823e127ad67289ba" + integrity sha512-PJgg/k3SdLsGb3hhisFvtLOw5ts113klrpLuIPtCJIU+BB24fqq6lf8RWqKJEjzqXR9AEH1rIb5XTqwBHB+kQg== + dependencies: + "@babel/helper-validator-identifier" "^7.15.7" + to-fast-properties "^2.0.0" + "@babel/types@^7.16.0", "@babel/types@^7.16.7", "@babel/types@^7.16.8", "@babel/types@^7.17.0", "@babel/types@^7.4.4": version "7.17.0" resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.17.0.tgz#a826e368bccb6b3d84acd76acad5c0d87342390b" @@ -2045,9 +2058,9 @@ integrity sha512-9NET910DNaIPngYnLLPeg+Ogzqsi9uM4mSboU5y6p8S5DzMTVEsJZrawi+BoDNUVBa2DhJqQYUFvMDfgU062LQ== "@sindresorhus/is@^4.0.0": - version "4.5.0" - resolved "https://registry.yarnpkg.com/@sindresorhus/is/-/is-4.5.0.tgz#7c8293e2268de42d7037249a9e4f905dc890539b" - integrity sha512-ZzlL5VTnHZJl8wMWEaYk/13hwMNKLylTSPZRz8+0HIwfRTQMnFgUahDNRRV+rTmPADxQZYxna/nQcStNSCccKg== + version "4.6.0" + resolved "https://registry.yarnpkg.com/@sindresorhus/is/-/is-4.6.0.tgz#3c7c9c46e678feefe7a2e5bb609d3dbd665ffb3f" + integrity sha512-t09vSN3MdfsyCHoFcTRCH/iUtG7OJ0CsjzB8cjAmKc/va/kIgeDI/TxsigdncE/4be734m0cvIYwNaV4i2XqAw== "@socket.io/base64-arraybuffer@~1.0.2": version "1.0.2" @@ -3044,9 +3057,9 @@ "@types/lodash" "*" "@types/lodash@*": - version "4.14.178" - resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.178.tgz#341f6d2247db528d4a13ddbb374bcdc80406f4f8" - integrity sha512-0d5Wd09ItQWH1qFbEyQ7oTQ3GZrMfth5JkbN3EvTKLXcHLRDSXeLnlvlOn0wvxVIwK5o2M8JzP/OWz7T3NRsbw== + version "4.14.179" + resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.179.tgz#490ec3288088c91295780237d2497a3aa9dfb5c5" + integrity sha512-uwc1x90yCKqGcIOAT6DwOSuxnrAbpkdPsUOZtwrXb4D/6wZs+6qG7QnIawDuZWg0sWpxl+ltIKCaLoMlna678w== "@types/markdown-it@^12.2.3": version "12.2.3" @@ -3121,6 +3134,11 @@ resolved "https://registry.yarnpkg.com/@types/node/-/node-17.0.21.tgz#864b987c0c68d07b4345845c3e63b75edd143644" integrity sha512-DBZCJbhII3r90XbQxI8Y9IjjiiOGlZ0Hr32omXIZvwwZ7p4DMMXGrKXVyPfuoBOri9XNtL0UK69jYIBIsRX3QQ== +"@types/node@12": + version "12.20.46" + resolved "https://registry.yarnpkg.com/@types/node/-/node-12.20.46.tgz#7e49dee4c54fd19584e6a9e0da5f3dc2e9136bc7" + integrity sha512-cPjLXj8d6anFPzFvOPxS3fvly3Shm5nTfl6g8X5smexixbuGUf7hfr21J5tX9JW+UPStp/5P5R8qrKL5IyVJ+A== + "@types/node@^14.6.2": version "14.18.12" resolved "https://registry.yarnpkg.com/@types/node/-/node-14.18.12.tgz#0d4557fd3b94497d793efd4e7d92df2f83b4ef24" @@ -3200,16 +3218,7 @@ "@types/prop-types" "*" "@types/react" "*" -"@types/react@*": - version "17.0.39" - resolved "https://registry.yarnpkg.com/@types/react/-/react-17.0.39.tgz#d0f4cde092502a6db00a1cded6e6bf2abb7633ce" - integrity sha512-UVavlfAxDd/AgAacMa60Azl7ygyQNRwC/DsHZmKgNvPmRR5p70AJ5Q9EAmL2NWOJmeV+vVUI4IAP7GZrN8h8Ug== - dependencies: - "@types/prop-types" "*" - "@types/scheduler" "*" - csstype "^3.0.2" - -"@types/react@^16", "@types/react@^16.8.0": +"@types/react@*", "@types/react@16.14.23", "@types/react@^16", "@types/react@^16.8.0": version "16.14.23" resolved "https://registry.yarnpkg.com/@types/react/-/react-16.14.23.tgz#37201b9f2324c5ff8fa4600dbf19079dfdffc880" integrity sha512-WngBZLuSkP4IAgPi0HOsGCHo6dn3CcuLQnCfC17VbA7YBgipZiZoTOhObwl/93DsFW0Y2a/ZXeonpW4DxirEJg== @@ -3794,6 +3803,11 @@ resolved "https://registry.yarnpkg.com/@xtuc/long/-/long-4.2.2.tgz#d291c6a4e97989b5c61d9acf396ae4fe133a718d" integrity sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ== +"@yarnpkg/lockfile@^1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@yarnpkg/lockfile/-/lockfile-1.1.0.tgz#e77a97fbd345b76d83245edcd17d393b1b41fb31" + integrity sha512-GpSwvyXOcOOlV70vbnzjj4fW5xW/FdUF6nQEt1ENy7m4ZCczi1+/buVUPAqmGfqznsORNFzUMjctTIp8a9tuCQ== + JSONStream@^1.0.4: version "1.3.5" resolved "https://registry.yarnpkg.com/JSONStream/-/JSONStream-1.3.5.tgz#3208c1f08d3a4d99261ab64f92302bc15e111ca0" @@ -4828,7 +4842,7 @@ chalk@^2.0.0, chalk@^2.3.0, chalk@^2.4.2: escape-string-regexp "^1.0.5" supports-color "^5.3.0" -chalk@^4.0.0, chalk@^4.1.0: +chalk@^4.0.0, chalk@^4.1.0, chalk@^4.1.2: version "4.1.2" resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.2.tgz#aac4e2b7734a740867aeb16bf02aad556a1e7a01" integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA== @@ -5444,6 +5458,17 @@ cross-spawn@^4.0.0, cross-spawn@^4.0.2: lru-cache "^4.0.1" which "^1.2.9" +cross-spawn@^6.0.5: + 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" + cross-spawn@^7.0.1, cross-spawn@^7.0.2, cross-spawn@^7.0.3: version "7.0.3" resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.3.tgz#f73a85b9d5d41d045551c177e2882d4ac85728a6" @@ -5670,7 +5695,7 @@ deep-extend@^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: +deep-is@^0.1.3, deep-is@~0.1.3: version "0.1.4" resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.4.tgz#a6f2dce612fadd2ef1f519b73551f17e85199831" integrity sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ== @@ -6066,9 +6091,9 @@ electron-store@^8.0.0: type-fest "^1.0.2" electron-to-chromium@^1.4.71: - version "1.4.73" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.73.tgz#422f6f514315bcace9615903e4a9b6b9fa283137" - integrity sha512-RlCffXkE/LliqfA5m29+dVDPB2r72y2D2egMMfIy3Le8ODrxjuZNVo4NIC2yPL01N4xb4nZQLwzi6Z5tGIGLnA== + version "1.4.74" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.74.tgz#f444036a90ffe75f6423b635e77edd4cc9e6cb2f" + integrity sha512-DvQ20M0I4dIH8KcAo7n7E4OEeNafZ1N8z6g6ck+ALCM0ZoV6mpjaX6ekjs31zKlqPzacU3lmjG9PZEa1mQhEpQ== electron-updater@4.3.9: version "4.3.9" @@ -6301,6 +6326,18 @@ escape-string-regexp@^2.0.0: resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz#a30304e99daa32e23b2fd20f51babd07cffca344" integrity sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w== +escodegen@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/escodegen/-/escodegen-2.0.0.tgz#5e32b12833e8aa8fa35e1bf0befa89380484c7dd" + integrity sha512-mmHKys/C8BFUGI+MAWNcSYoORYLMdPzjrknd2Vc+bUsjN5bXcr8EhrNB+UTqfL1y3I9c4fw2ihgtMPQLBRiQxw== + dependencies: + esprima "^4.0.1" + estraverse "^5.2.0" + esutils "^2.0.2" + optionator "^0.8.1" + optionalDependencies: + source-map "~0.6.1" + eslint-import-resolver-node@^0.3.6: version "0.3.6" resolved "https://registry.yarnpkg.com/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.6.tgz#4048b958395da89668252001dbd9eca6b83bacbd" @@ -6356,9 +6393,9 @@ eslint-plugin-no-unsanitized@^3.1.5: integrity sha512-92opuXbjWmXcod94EyCKhp36V1QHLM/ArAST2ssgKOojALne0eZvSPfrg4oyr0EwTXvy0RJNe/Tkm33VkDUrKQ== eslint-plugin-react@^7.23.2: - version "7.29.0" - resolved "https://registry.yarnpkg.com/eslint-plugin-react/-/eslint-plugin-react-7.29.0.tgz#51921b7e9b706398e3002cb07ff1654a5d0a78a4" - integrity sha512-lwbGCO4cEotwl+Wo0zkkjzbhxEzFcG6lv4mpWXfxKzXNZMF5wDEQqykPetB4mi3uTLGVSXxmgVlBMzHTHue6cA== + version "7.29.2" + resolved "https://registry.yarnpkg.com/eslint-plugin-react/-/eslint-plugin-react-7.29.2.tgz#2d4da69d30d0a736efd30890dc6826f3e91f3f7c" + integrity sha512-ypEBTKOy5liFQXZWMchJ3LN0JX1uPI6n7MN7OPHKacqXAxq5gYC30TdO7wqGYQyxD1OrzpobdHC3hDmlRWDg9w== dependencies: array-includes "^3.1.4" array.prototype.flatmap "^1.2.5" @@ -6462,7 +6499,7 @@ espree@^7.3.0, espree@^7.3.1: acorn-jsx "^5.3.1" eslint-visitor-keys "^1.3.0" -esprima@^4.0.0: +esprima@^4.0.0, esprima@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71" integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A== @@ -6705,7 +6742,7 @@ fast-json-stable-stringify@^2.0.0: resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633" integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw== -fast-levenshtein@^2.0.6: +fast-levenshtein@^2.0.6, fast-levenshtein@~2.0.6: version "2.0.6" resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" integrity sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc= @@ -6873,6 +6910,13 @@ find-up@^4.0.0, find-up@^4.1.0: locate-path "^5.0.0" path-exists "^4.0.0" +find-yarn-workspace-root@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/find-yarn-workspace-root/-/find-yarn-workspace-root-2.0.0.tgz#f47fb8d239c900eb78179aa81b66673eac88f7bd" + integrity sha512-1IMnbjt4KzsQfnhnzNd8wUEgXZ44IzZaZmnLYx7D5FZlaHt2gW20Cri8Q+E/t5tIj4+epTBub+2Zxu/vNILzqQ== + dependencies: + micromatch "^4.0.2" + fix-path@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/fix-path/-/fix-path-3.0.0.tgz#c6b82fd5f5928e520b392a63565ebfef0ddf037e" @@ -6957,6 +7001,14 @@ fresh@0.5.2: resolved "https://registry.yarnpkg.com/fresh/-/fresh-0.5.2.tgz#3d8cadd90d976569fa835ab1f8e4b23a105605a7" integrity sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac= +from2@^2.3.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/from2/-/from2-2.3.0.tgz#8bfb5502bde4a4d36cfdeea007fcca21d7e382af" + integrity sha1-i/tVAr3kpNNs/e6gB/zKIdfjgq8= + dependencies: + inherits "^2.0.1" + readable-stream "^2.0.0" + from@~0: version "0.1.7" resolved "https://registry.yarnpkg.com/from/-/from-0.1.7.tgz#83c60afc58b9c56997007ed1a768b3ab303a44fe" @@ -6985,6 +7037,15 @@ fs-extra@^4.0.2: jsonfile "^4.0.0" universalify "^0.1.0" +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-extra@^8.1.0: version "8.1.0" resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-8.1.0.tgz#49d43c45a88cd9677668cb7be1b46efdb8d2e1c0" @@ -7337,7 +7398,7 @@ globalthis@^1.0.1: dependencies: define-properties "^1.1.3" -globby@^11.0.2, globby@^11.0.3: +globby@^11.0.2, globby@^11.0.3, globby@^11.0.4: version "11.1.0" resolved "https://registry.yarnpkg.com/globby/-/globby-11.1.0.tgz#bd4be98bb042f83d796f7e3811991fbe82a0d34b" integrity sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g== @@ -7727,7 +7788,7 @@ inflight@^1.0.4: once "^1.3.0" wrappy "1" -inherits@2, inherits@2.0.4, inherits@^2.0.3, inherits@^2.0.4, inherits@~2.0.0, inherits@~2.0.1, inherits@~2.0.3: +inherits@2, inherits@2.0.4, inherits@^2.0.1, inherits@^2.0.3, inherits@^2.0.4, inherits@~2.0.0, inherits@~2.0.1, inherits@~2.0.3: version "2.0.4" resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== @@ -7788,6 +7849,14 @@ interpret@^2.2.0: resolved "https://registry.yarnpkg.com/interpret/-/interpret-2.2.0.tgz#1a78a0b5965c40a5416d007ad6f50ad27c417df9" integrity sha512-Ju0Bz/cEia55xDwUWEa8+olFpCiQoypjnQySseKtmjNrnps3P+xfpUmGr90T7yjlVJmOtybRvPXhKMbHr+fWnw== +into-stream@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/into-stream/-/into-stream-6.0.0.tgz#4bfc1244c0128224e18b8870e85b2de8e66c6702" + integrity sha512-XHbaOAvP+uFKUFsOgoNPRjLkwB+I22JFPFe5OjTkQ0nwgj6+pSjb4NmB6VMxaPshLiOf+zcpOCBQuLwC1KHhZA== + dependencies: + from2 "^2.3.0" + p-is-promise "^3.0.0" + inversify@^5.1.1: version "5.1.1" resolved "https://registry.yarnpkg.com/inversify/-/inversify-5.1.1.tgz#6fbd668c591337404e005a1946bfe0d802c08730" @@ -8065,7 +8134,7 @@ is-what@^3.14.1: resolved "https://registry.yarnpkg.com/is-what/-/is-what-3.14.1.tgz#e1222f46ddda85dead0fd1c9df131760e77755c1" integrity sha512-sNxgpk9793nzSs7bA6JQJGeIuRBQhAaNGG77kzYQgMkrID+lS6SlK07K5LaptscDlSaIgH+GPFzf+d75FVxozA== -is-wsl@^2.2.0: +is-wsl@^2.1.1, is-wsl@^2.2.0: version "2.2.0" resolved "https://registry.yarnpkg.com/is-wsl/-/is-wsl-2.2.0.tgz#74a4c76e77ca9fd3f932f290c17ea326cd157271" integrity sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww== @@ -8364,6 +8433,13 @@ kind-of@^6.0.2, kind-of@^6.0.3: resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-6.0.3.tgz#07c05034a6c349fa06e24fa35aa76db4580ce4dd" integrity sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw== +klaw-sync@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/klaw-sync/-/klaw-sync-6.0.0.tgz#1fd2cfd56ebb6250181114f0a581167099c2b28c" + integrity sha512-nIeuVSzdCCs6TDPTqI8w1Yre34sSq7AkZ4B3sfOBbI2CgVSB4Du4aLQijFU2+lhAFCwt9+42Hel6lQNIv6AntQ== + dependencies: + graceful-fs "^4.1.11" + latest-version@^5.1.0: version "5.1.0" resolved "https://registry.yarnpkg.com/latest-version/-/latest-version-5.1.0.tgz#119dfe908fe38d15dfa43ecd13fa12ec8832face" @@ -8431,6 +8507,14 @@ levn@^0.4.1: prelude-ls "^1.2.1" type-check "~0.4.0" +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" + libnpmaccess@^4.0.1: version "4.0.3" resolved "https://registry.yarnpkg.com/libnpmaccess/-/libnpmaccess-4.0.3.tgz#dfb0e5b0a53c315a2610d300e46b4ddeb66e7eec" @@ -9252,6 +9336,14 @@ multimatch@^5.0.0: arrify "^2.0.1" minimatch "^3.0.4" +multistream@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/multistream/-/multistream-4.1.0.tgz#7bf00dfd119556fbc153cff3de4c6d477909f5a8" + integrity sha512-J1XDiAmmNpRCBfIWJv+n0ymC4ABcf/Pl+5YvC5B/D2f/2+8PtHvCNxMPKiQcZyi922Hq69J2YOpb1pTywfifyw== + dependencies: + once "^1.4.0" + readable-stream "^3.6.0" + mute-stream@0.0.8, mute-stream@~0.0.4: version "0.0.8" resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.8.tgz#1630c42b2251ff81e2a283de96a5497ea92e5e0d" @@ -9318,6 +9410,11 @@ nested-error-stacks@^2.0.0: resolved "https://registry.yarnpkg.com/nested-error-stacks/-/nested-error-stacks-2.1.0.tgz#0fbdcf3e13fe4994781280524f8b96b0cdff9c61" integrity sha512-AO81vsIO1k1sM4Zrd6Hu7regmJN1NSiAja10gc4bX3F0wd+9rQmcuHQaHVQCYIEC8iFXnE+mavh23GOt7wBgug== +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== + node-abi@*, node-abi@^3.0.0: version "3.8.0" resolved "https://registry.yarnpkg.com/node-abi/-/node-abi-3.8.0.tgz#679957dc8e7aa47b0a02589dbfde4f77b29ccb32" @@ -9362,7 +9459,7 @@ node-environment-flags@1.0.6: object.getownpropertydescriptors "^2.0.3" semver "^5.7.0" -node-fetch@^2.6.1, node-fetch@^2.6.7: +node-fetch@^2.6.1, node-fetch@^2.6.6, node-fetch@^2.6.7, node-fetch@cjs: version "2.6.7" resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.7.tgz#24de9fba827e3b4ae44dc8b20256a379160052ad" integrity sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ== @@ -9423,6 +9520,13 @@ node-gyp@^8.4.0: tar "^6.1.2" which "^2.0.2" +node-loader@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/node-loader/-/node-loader-2.0.0.tgz#9109a6d828703fd3e0aa03c1baec12a798071562" + integrity sha512-I5VN34NO4/5UYJaUBtkrODPWxbobrE4hgDqPrjB25yPkonFhCmZ146vTH+Zg417E9Iwoh1l/MbRs1apc5J295Q== + dependencies: + loader-utils "^2.0.0" + node-pty@0.11.0-beta17: version "0.11.0-beta17" resolved "https://registry.yarnpkg.com/node-pty/-/node-pty-0.11.0-beta17.tgz#7df6a60dced6bf7a3a282b65cf51980c68954af6" @@ -9765,6 +9869,26 @@ oniguruma@^7.2.0: dependencies: nan "^2.14.0" +open@^7.4.2: + version "7.4.2" + resolved "https://registry.yarnpkg.com/open/-/open-7.4.2.tgz#b8147e26dcf3e426316c730089fd71edd29c2321" + integrity sha512-MVHddDVweXZF3awtlAS+6pgKLlm/JgxZ90+/NBurBoQctVOOB/zDdVjcyPzQ+0laDGbsWgrRkflI65sQeOgT9Q== + dependencies: + is-docker "^2.0.0" + is-wsl "^2.1.1" + +optionator@^0.8.1: + version "0.8.3" + resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.8.3.tgz#84fa1d036fe9d3c7e21d99884b601167ec8fb495" + integrity sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA== + dependencies: + deep-is "~0.1.3" + fast-levenshtein "~2.0.6" + levn "~0.3.0" + prelude-ls "~1.1.2" + type-check "~0.3.2" + word-wrap "~1.2.3" + optionator@^0.9.1: version "0.9.1" resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.9.1.tgz#4f236a6373dae0566a6d43e1326674f50c291499" @@ -9830,6 +9954,11 @@ p-finally@^1.0.0: resolved "https://registry.yarnpkg.com/p-finally/-/p-finally-1.0.0.tgz#3fbcfb15b899a44123b34b6dcc18b724336a2cae" integrity sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4= +p-is-promise@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/p-is-promise/-/p-is-promise-3.0.0.tgz#58e78c7dfe2e163cf2a04ff869e7c1dba64a5971" + integrity sha512-Wo8VsW4IRQSKVXsJCn7TomUaVtyfjVDn3nUP7kE967BQk0CwFpdbZs0X0uk5sW9mkBa9eNM7hCMaG93WUAwxYQ== + p-limit@^1.1.0: version "1.3.0" resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-1.3.0.tgz#b86bd5f0c25690911c7590fcbfc2010d54b3ccb8" @@ -10052,6 +10181,25 @@ parseurl@~1.3.3: resolved "https://registry.yarnpkg.com/parseurl/-/parseurl-1.3.3.tgz#9da19e7bee8d12dff0513ed5b76957793bc2e8d4" integrity sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ== +patch-package@^6.4.7: + version "6.4.7" + resolved "https://registry.yarnpkg.com/patch-package/-/patch-package-6.4.7.tgz#2282d53c397909a0d9ef92dae3fdeb558382b148" + integrity sha512-S0vh/ZEafZ17hbhgqdnpunKDfzHQibQizx9g8yEf5dcVk3KOflOfdufRXQX8CSEkyOQwuM/bNz1GwKvFj54kaQ== + dependencies: + "@yarnpkg/lockfile" "^1.1.0" + chalk "^2.4.2" + cross-spawn "^6.0.5" + find-yarn-workspace-root "^2.0.0" + fs-extra "^7.0.1" + is-ci "^2.0.0" + klaw-sync "^6.0.0" + minimist "^1.2.0" + open "^7.4.2" + rimraf "^2.6.3" + semver "^5.6.0" + slash "^2.0.0" + tmp "^0.0.33" + path-browserify@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/path-browserify/-/path-browserify-1.0.1.tgz#d98454a9c3753d5790860f16f68867b9e46be1fd" @@ -10084,7 +10232,7 @@ path-key@^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.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= @@ -10206,6 +10354,20 @@ pkg-dir@^4.1.0, pkg-dir@^4.2.0: dependencies: find-up "^4.0.0" +pkg-fetch@3.2.6: + version "3.2.6" + resolved "https://registry.yarnpkg.com/pkg-fetch/-/pkg-fetch-3.2.6.tgz#8473e1da5763522c4c3c051917db7274b75836fa" + integrity sha512-Q8fx6SIT022g0cdSE4Axv/xpfHeltspo2gg1KsWRinLQZOTRRAtOOaEFghA1F3jJ8FVsh8hGrL/Pb6Ea5XHIFw== + dependencies: + chalk "^4.1.2" + fs-extra "^9.1.0" + https-proxy-agent "^5.0.0" + node-fetch "^2.6.6" + progress "^2.0.3" + semver "^7.3.5" + tar-fs "^2.1.1" + yargs "^16.2.0" + pkg-up@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/pkg-up/-/pkg-up-3.1.0.tgz#100ec235cc150e4fd42519412596a28512a0def5" @@ -10213,6 +10375,27 @@ pkg-up@^3.1.0: dependencies: find-up "^3.0.0" +pkg@5.5.2: + version "5.5.2" + resolved "https://registry.yarnpkg.com/pkg/-/pkg-5.5.2.tgz#c21ca9b5cb48feceb3b158c17df855ada350086d" + integrity sha512-pD0UB2ud01C6pVv2wpGsTYJrXI/bnvGRYvMLd44wFzA1p+A2jrlTGFPAYa7YEYzmitXhx23PqalaG1eUEnSwcA== + dependencies: + "@babel/parser" "7.16.2" + "@babel/types" "7.16.0" + chalk "^4.1.2" + escodegen "^2.0.0" + fs-extra "^9.1.0" + globby "^11.0.4" + into-stream "^6.0.0" + minimist "^1.2.5" + multistream "^4.1.0" + pkg-fetch "3.2.6" + prebuild-install "6.1.4" + progress "^2.0.3" + resolve "^1.20.0" + stream-meter "^1.0.4" + tslib "2.3.1" + plist@^3.0.4: version "3.0.4" resolved "https://registry.yarnpkg.com/plist/-/plist-3.0.4.tgz#a62df837e3aed2bb3b735899d510c4f186019cbe" @@ -10271,10 +10454,15 @@ postcss@^8.4.5: picocolors "^1.0.0" source-map-js "^1.0.2" -prebuild-install@^5.2.4: - version "5.3.6" - resolved "https://registry.yarnpkg.com/prebuild-install/-/prebuild-install-5.3.6.tgz#7c225568d864c71d89d07f8796042733a3f54291" - integrity sha512-s8Aai8++QQGi4sSbs/M1Qku62PFK49Jm1CbgXklGz4nmHveDq0wzJkg7Na5QbnO1uNH8K7iqx2EQ/mV0MZEmOg== +postinstall-postinstall@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/postinstall-postinstall/-/postinstall-postinstall-2.1.0.tgz#4f7f77441ef539d1512c40bd04c71b06a4704ca3" + integrity sha512-7hQX6ZlZXIoRiWNrbMQaLzUUfH+sSx39u8EJ9HYuDc1kLo9IXKWjM5RSquZN1ad5GnH8CGFM78fsAAQi3OKEEQ== + +prebuild-install@6.1.4, prebuild-install@^6.0.0: + version "6.1.4" + resolved "https://registry.yarnpkg.com/prebuild-install/-/prebuild-install-6.1.4.tgz#ae3c0142ad611d58570b89af4986088a4937e00f" + integrity sha512-Z4vpywnK1lBg+zdPCVCsKq0xO66eEV9rWo2zrROGGiRS4JtueBOdlB1FnY8lcy7JsUud/Q3ijUxyWN26Ika0vQ== dependencies: detect-libc "^1.0.3" expand-template "^2.0.3" @@ -10282,20 +10470,18 @@ prebuild-install@^5.2.4: minimist "^1.2.3" mkdirp-classic "^0.5.3" napi-build-utils "^1.0.1" - node-abi "^2.7.0" - noop-logger "^0.1.1" + node-abi "^2.21.0" npmlog "^4.0.1" pump "^3.0.0" rc "^1.2.7" simple-get "^3.0.3" tar-fs "^2.0.0" tunnel-agent "^0.6.0" - which-pm-runs "^1.0.0" -prebuild-install@^6.0.0: - version "6.1.4" - resolved "https://registry.yarnpkg.com/prebuild-install/-/prebuild-install-6.1.4.tgz#ae3c0142ad611d58570b89af4986088a4937e00f" - integrity sha512-Z4vpywnK1lBg+zdPCVCsKq0xO66eEV9rWo2zrROGGiRS4JtueBOdlB1FnY8lcy7JsUud/Q3ijUxyWN26Ika0vQ== +prebuild-install@^5.2.4: + version "5.3.6" + resolved "https://registry.yarnpkg.com/prebuild-install/-/prebuild-install-5.3.6.tgz#7c225568d864c71d89d07f8796042733a3f54291" + integrity sha512-s8Aai8++QQGi4sSbs/M1Qku62PFK49Jm1CbgXklGz4nmHveDq0wzJkg7Na5QbnO1uNH8K7iqx2EQ/mV0MZEmOg== dependencies: detect-libc "^1.0.3" expand-template "^2.0.3" @@ -10303,19 +10489,26 @@ prebuild-install@^6.0.0: minimist "^1.2.3" mkdirp-classic "^0.5.3" napi-build-utils "^1.0.1" - node-abi "^2.21.0" + node-abi "^2.7.0" + noop-logger "^0.1.1" npmlog "^4.0.1" pump "^3.0.0" rc "^1.2.7" simple-get "^3.0.3" tar-fs "^2.0.0" tunnel-agent "^0.6.0" + which-pm-runs "^1.0.0" prelude-ls@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.2.1.tgz#debc6489d7a6e6b0e7611888cec880337d316396" integrity sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g== +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= + prepend-http@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/prepend-http/-/prepend-http-2.0.0.tgz#e92434bfa5ea8c19f41cdfd401d741a3c819d897" @@ -10803,7 +10996,7 @@ readable-stream@3, readable-stream@^3.0.0, readable-stream@^3.0.2, readable-stre string_decoder "^1.1.1" util-deprecate "^1.0.1" -readable-stream@^2.0.0, readable-stream@^2.0.2, readable-stream@^2.0.5, readable-stream@^2.0.6, readable-stream@^2.2.2, readable-stream@^2.3.0, readable-stream@^2.3.5, readable-stream@~2.3.6: +readable-stream@^2.0.0, readable-stream@^2.0.2, readable-stream@^2.0.5, readable-stream@^2.0.6, readable-stream@^2.1.4, readable-stream@^2.2.2, readable-stream@^2.3.0, readable-stream@^2.3.5, readable-stream@~2.3.6: version "2.3.7" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.7.tgz#1eca1cf711aef814c04f62252a36a62f6cb23b57" integrity sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw== @@ -11243,7 +11436,7 @@ semver-diff@^3.1.1: dependencies: semver "^6.3.0" -"semver@2 || 3 || 4 || 5", semver@^5.3.0, semver@^5.4.1, semver@^5.6.0, semver@^5.7.0, semver@^5.7.1: +"semver@2 || 3 || 4 || 5", semver@^5.3.0, semver@^5.4.1, semver@^5.5.0, semver@^5.6.0, semver@^5.7.0, semver@^5.7.1: version "5.7.1" resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7" integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ== @@ -11344,6 +11537,13 @@ shallow-clone@^3.0.0: dependencies: kind-of "^6.0.2" +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-command@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-2.0.0.tgz#ccd0af4f8835fbdc265b82461aaf0c36663f34ea" @@ -11351,6 +11551,11 @@ shebang-command@^2.0.0: dependencies: shebang-regex "^3.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= + shebang-regex@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-3.0.0.tgz#ae16f1644d873ecad843b0307b143362d4c42172" @@ -11412,6 +11617,11 @@ slash@^1.0.0: resolved "https://registry.yarnpkg.com/slash/-/slash-1.0.0.tgz#c41f2f6c39fc16d1cd17ad4b5d896114ae470d55" integrity sha1-xB8vbDn8FtHNF61LXYlhFK5HDVU= +slash@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/slash/-/slash-2.0.0.tgz#de552851a1759df3a8f206535442f5ec4ddeab44" + integrity sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A== + slash@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/slash/-/slash-3.0.0.tgz#6539be870c165adbd5240220dbe361f1bc4d4634" @@ -11563,7 +11773,7 @@ source-map@^0.5.0, source-map@~0.5.0: 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.0: +source-map@^0.6.0, source-map@^0.6.1, source-map@~0.6.0, 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== @@ -11686,6 +11896,13 @@ stream-combiner@~0.0.4: dependencies: duplexer "~0.1.1" +stream-meter@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/stream-meter/-/stream-meter-1.0.4.tgz#52af95aa5ea760a2491716704dbff90f73afdd1d" + integrity sha1-Uq+Vql6nYKJJFxZwTb/5D3Ov3R0= + dependencies: + readable-stream "^2.1.4" + streamsearch@0.1.2: version "0.1.2" resolved "https://registry.yarnpkg.com/streamsearch/-/streamsearch-0.1.2.tgz#808b9d0e56fc273d809ba57338e929919a1a9f1a" @@ -11964,7 +12181,7 @@ tar-fs@^1.16.2: pump "^1.0.0" tar-stream "^1.1.2" -tar-fs@^2.0.0: +tar-fs@^2.0.0, tar-fs@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/tar-fs/-/tar-fs-2.1.1.tgz#489a15ab85f1f0befabb370b7de4f9eb5cbe8784" integrity sha512-V0r2Y9scmbDRLCNex/+hYzvp/zyYjvFbHPNgVTKfQvVrb6guiE/fxP+XblDNR011utopbkex2nM4dHNV6GDsng== @@ -12254,16 +12471,16 @@ tsconfig-paths@^3.12.0: minimist "^1.2.0" strip-bom "^3.0.0" +tslib@2.3.1, tslib@^2.3.1: + version "2.3.1" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.3.1.tgz#e8a335add5ceae51aa261d32a490158ef042ef01" + integrity sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw== + tslib@^1.10.0, tslib@^1.8.0, tslib@^1.8.1, tslib@^1.9.0: version "1.14.1" resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00" integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== -tslib@^2.3.1: - version "2.3.1" - resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.3.1.tgz#e8a335add5ceae51aa261d32a490158ef042ef01" - integrity sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw== - tslint@^5.12.0: version "5.20.1" resolved "https://registry.yarnpkg.com/tslint/-/tslint-5.20.1.tgz#e401e8aeda0152bc44dd07e614034f3f80c67b7d" @@ -12321,6 +12538,13 @@ type-check@^0.4.0, type-check@~0.4.0: dependencies: prelude-ls "^1.2.1" +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" + type-detect@^4.0.0, type-detect@^4.0.5: version "4.0.8" resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-4.0.8.tgz#7646fb5f18871cfbb7749e69bd39a6388eb7450c" @@ -12386,11 +12610,6 @@ typedarray@^0.0.6: resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c= -typescript@^3.9.2: - version "3.9.10" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.9.10.tgz#70f3910ac7a51ed6bef79da7800690b19bf778b8" - integrity sha512-w6fIxVE/H1PkLKcCPsFqKE7Kv7QUwhU8qQY2MueZXWx5cPZdwFupLgKK3vntcK98BtNHZtAF4LA/yl2a7k8R6Q== - typescript@~4.5.5: version "4.5.5" resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.5.5.tgz#d8c953832d28924a9e3d37c73d729c846c5896f3" @@ -12407,9 +12626,9 @@ uc.micro@^1.0.1, uc.micro@^1.0.5: integrity sha512-8Y75pvTYkLJW2hWQHXxoqRgV7qb9B+9vFEtidML+7koHUFapnVJAZ6cKs+Qjz5Aw3aZWHMC6u0wJE3At+nSGwA== uglify-js@^3.1.4: - version "3.15.1" - resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.15.1.tgz#9403dc6fa5695a6172a91bc983ea39f0f7c9086d" - integrity sha512-FAGKF12fWdkpvNJZENacOH0e/83eG6JyVQyanIJaBXCN1J11TUQv1T1/z8S+Z0CG0ZPk1nPcreF/c7lrTd0TEQ== + version "3.15.2" + resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.15.2.tgz#1ed2c976f448063b1f87adb68c741be79959f951" + integrity sha512-peeoTk3hSwYdoc9nrdiEJk+gx1ALCtTjdYuKSXMTDqq7n1W7dHPqWDdSi+BPL0ni2YMeHD7hKUSdbj3TZauY2A== uid-number@0.0.6: version "0.0.6" @@ -12956,7 +13175,7 @@ wildcard@^2.0.0: resolved "https://registry.yarnpkg.com/wildcard/-/wildcard-2.0.0.tgz#a77d20e5200c6faaac979e4b3aadc7b3dd7f8fec" integrity sha512-JcKqAHLPxcdb9KM49dufGXn2x3ssnfjbcaQdLlfZsL9rH9wgDQjUtDxbo8NE0F6SFvydeu1VhZe7hZuHsB2/pw== -word-wrap@^1.2.3: +word-wrap@^1.2.3, word-wrap@~1.2.3: version "1.2.3" resolved "https://registry.yarnpkg.com/word-wrap/-/word-wrap-1.2.3.tgz#610636f6b1f703891bd34771ccb17fb93b47079c" integrity sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ== @@ -13146,9 +13365,9 @@ xterm-addon-search@^0.8.2: integrity sha512-I1863mjn8P6uVrqm/X+btalVsqjAKLhnhpbP7SavAOpEkI1jJhbHU2UTp7NjeRtcKTks6UWk/ycgds5snDSejg== xterm@^4.16.0: - version "4.17.0" - resolved "https://registry.yarnpkg.com/xterm/-/xterm-4.17.0.tgz#e48ba6eeb83e118ec163f5512c3cfe9dbbf3f838" - integrity sha512-WGXlIHvLvZKtwMdFaL6kUwp+c9abd2Pcakp/GmuefBuOtGCu9fP9tBDPKyL/A17N+5tt44EYk3YsBbvkPBubMw== + version "4.18.0" + resolved "https://registry.yarnpkg.com/xterm/-/xterm-4.18.0.tgz#a1f6ab2c330c3918fb094ae5f4c2562987398ea1" + integrity sha512-JQoc1S0dti6SQfI0bK1AZvGnAxH4MVw45ZPFSO6FHTInAiau3Ix77fSxNx3mX4eh9OL4AYa8+4C8f5UvnSfppQ== y18n@^4.0.0: version "4.0.3" @@ -13215,9 +13434,9 @@ yargs-parser@^20.2.2, yargs-parser@^20.2.3: integrity sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w== yargs-parser@^21.0.0: - version "21.0.0" - resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-21.0.0.tgz#a485d3966be4317426dd56bdb6a30131b281dc55" - integrity sha512-z9kApYUOCwoeZ78rfRYYWdiU/iNL6mwwYlkkZfJoyMR1xps+NEBX5X7XmRpxkZHhXJ6+Ey00IwKxBBSW9FIjyA== + version "21.0.1" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-21.0.1.tgz#0267f286c877a4f0f728fceb6f8a3e4cb95c6e35" + integrity sha512-9BK1jFpLzJROCI5TzwZL/TU4gqjK5xiHV/RfWLOahrjAko/e4DJkRDZQXfvqAsiZzzYhgAzbgz6lg48jcm4GLg== yargs-unparser@1.6.0: version "1.6.0"