diff --git a/.github/workflows/nx-run/action.yml b/.github/workflows/nx-run/action.yml index 3b434a8b5d..f5de81117c 100644 --- a/.github/workflows/nx-run/action.yml +++ b/.github/workflows/nx-run/action.yml @@ -13,9 +13,6 @@ runs: - name: Test run: yarn nx run-many --all --parallel --target=test --max-parallel=3 shell: bash - - name: Build - run: yarn nx run-many --all --parallel --target=build --max-parallel=3 - shell: bash - name: Stopping nx-cloud ci agents run: npx nx-cloud stop-all-agents shell: bash diff --git a/.vscode/launch.json b/.vscode/launch.json index 0ac20f77df..bc7a1e6190 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -21,11 +21,11 @@ "/**", "/Applications/Visual Studio Code.app/**" ], - "type": "pwa-extensionHost" + "type": "extensionHost" }, { "name": "Run Extension In Dev Mode", - "type": "pwa-extensionHost", + "type": "extensionHost", "request": "launch", "runtimeExecutable": "${execPath}", "args": [ @@ -37,9 +37,29 @@ "outFiles": [ "${workspaceFolder}/dist/apps/vscode", "${workspaceFolder}/dist/apps/vscode/assets/public", + "!${workspaceFolder}/dist/apps/vscode/lsp", "${workspaceFolder}/node_modules" ], "preLaunchTask": "npm: watch" + }, + { + "type": "node", + "request": "attach", + "name": "Attach to LSP Server", + "port": 6009, + "restart": true, + "sourceMaps": true, + "skipFiles": [ + "/**", + "/Applications/Visual Studio Code.app/**" + ] + // "outFiles": ["${workspaceFolder}/dist/vscode/lsp/**/*.js"] + } + ], + "compounds": [ + { + "name": "Launch Client + Server", + "configurations": ["Launch Extension", "Attach to LSP Server"] } ] } diff --git a/apps/nxls/.eslintrc.json b/apps/nxls/.eslintrc.json new file mode 100644 index 0000000000..9d9c0db55b --- /dev/null +++ b/apps/nxls/.eslintrc.json @@ -0,0 +1,18 @@ +{ + "extends": ["../../.eslintrc.json"], + "ignorePatterns": ["!**/*"], + "overrides": [ + { + "files": ["*.ts", "*.tsx", "*.js", "*.jsx"], + "rules": {} + }, + { + "files": ["*.ts", "*.tsx"], + "rules": {} + }, + { + "files": ["*.js", "*.jsx"], + "rules": {} + } + ] +} diff --git a/apps/nxls/jest.config.ts b/apps/nxls/jest.config.ts new file mode 100644 index 0000000000..25bc0c691f --- /dev/null +++ b/apps/nxls/jest.config.ts @@ -0,0 +1,16 @@ +/* eslint-disable */ +export default { + displayName: 'nxls', + preset: '../../jest.preset.js', + globals: { + 'ts-jest': { + tsconfig: '/tsconfig.spec.json', + }, + }, + testEnvironment: 'node', + transform: { + '^.+\\.[tj]s$': 'ts-jest', + }, + moduleFileExtensions: ['ts', 'js', 'html'], + coverageDirectory: '../../coverage/apps/nxls', +}; diff --git a/apps/nxls/package.json b/apps/nxls/package.json new file mode 100644 index 0000000000..adb02de6a0 --- /dev/null +++ b/apps/nxls/package.json @@ -0,0 +1,18 @@ +{ + "name": "nxls", + "version": "0.0.1", + "main": "main.js", + "bin": "bin/nxls", + "license": "MIT", + "repository": { + "type": "git", + "url": "https://github.com/nrwl/nx-console.git" + }, + "author": { + "name": "Narwhal Technologies Inc", + "email": "hello@nrwl.io" + }, + "dependencies": { + "@nrwl/devkit": "14.4.1" + } +} diff --git a/apps/nxls/project.json b/apps/nxls/project.json new file mode 100644 index 0000000000..bf31ac66c4 --- /dev/null +++ b/apps/nxls/project.json @@ -0,0 +1,64 @@ +{ + "sourceRoot": "apps/nxls/src", + "projectType": "application", + "targets": { + "watch": { + "executor": "@nrwl/node:webpack", + "outputs": ["{options.outputPath}"], + "options": { + "outputPath": "dist/apps/vscode/nxls", + "main": "apps/nxls/src/main.ts", + "tsConfig": "apps/nxls/tsconfig.app.json", + "assets": ["apps/nxls/src/assets"], + "watch": true + } + }, + "package": { + "executor": "@nrwl/node:webpack", + "options": { + "main": "apps/nxls/src/main.ts", + "tsConfig": "apps/nxls/tsconfig.app.json", + "outputPath": "dist/packages/nxls", + "assets": ["apps/nxls/src/bin"], + "generatePackageJson": true, + "externalDependencies": "all", + "optimization": true, + "extractLicenses": true + } + }, + "build": { + "executor": "nx:run-commands", + "outputs": ["dist/apps/vscode/nxls"], + "options": { + "commands": [ + "export NODE_OPTIONS=--max-old-space-size=4096 && yarn rollup -c ./apps/nxls/rollup.config.ts" + ] + } + }, + "lint": { + "executor": "@nrwl/linter:eslint", + "outputs": ["{options.outputFile}"], + "options": { + "lintFilePatterns": ["apps/nxls/**/*.ts"] + } + }, + "test": { + "executor": "@nrwl/jest:jest", + "outputs": ["coverage/apps/nxls"], + "options": { + "jestConfig": "apps/nxls/jest.config.ts", + "passWithNoTests": true + } + }, + "semantic-release": { + "executor": "@theunderscorer/nx-semantic-release:semantic-release", + "options": { + "buildTarget": "nxls:package", + "outputPath": "dist/packages/nxls", + "packageJsonDir": "apps/nxls", + "ci": false + } + } + }, + "tags": [] +} diff --git a/apps/nxls/rollup.config.ts b/apps/nxls/rollup.config.ts new file mode 100644 index 0000000000..c687308d47 --- /dev/null +++ b/apps/nxls/rollup.config.ts @@ -0,0 +1,31 @@ +import ts from '@rollup/plugin-typescript'; +import cjs from '@rollup/plugin-commonjs'; +import nodeResolve from '@rollup/plugin-node-resolve'; +import json from '@rollup/plugin-json'; +import replace from '@rollup/plugin-replace'; +import { terser } from 'rollup-plugin-terser'; +import { defineConfig } from 'rollup'; + +export default defineConfig({ + input: './apps/nxls/src/main.ts', + output: { + file: './dist/apps/vscode/nxls/main.js', + format: 'cjs', + plugins: [terser()], + }, + plugins: [ + replace({ + values: { + "'string_decoder/'": "'string_decoder'", + }, + delimiters: ['', ''], + preventAssignment: true, + }), + nodeResolve({ preferBuiltins: true, exportConditions: ['node'] }), + json(), + cjs(), + ts({ + tsconfig: './apps/nxls/tsconfig.app.json', + }), + ], +}); diff --git a/apps/nxls/src/assets/.gitkeep b/apps/nxls/src/assets/.gitkeep new file mode 100644 index 0000000000..e69de29bb2 diff --git a/apps/nxls/src/bin/nxls b/apps/nxls/src/bin/nxls new file mode 100644 index 0000000000..b4a43d8822 --- /dev/null +++ b/apps/nxls/src/bin/nxls @@ -0,0 +1,3 @@ +#!/usr/bin/env node + +require('../main.js'); diff --git a/apps/nxls/src/environments/environment.prod.ts b/apps/nxls/src/environments/environment.prod.ts new file mode 100644 index 0000000000..c9669790be --- /dev/null +++ b/apps/nxls/src/environments/environment.prod.ts @@ -0,0 +1,3 @@ +export const environment = { + production: true, +}; diff --git a/apps/nxls/src/environments/environment.ts b/apps/nxls/src/environments/environment.ts new file mode 100644 index 0000000000..a20cfe5573 --- /dev/null +++ b/apps/nxls/src/environments/environment.ts @@ -0,0 +1,3 @@ +export const environment = { + production: false, +}; diff --git a/apps/nxls/src/global-polyfills.ts b/apps/nxls/src/global-polyfills.ts new file mode 100644 index 0000000000..5b6332a5dc --- /dev/null +++ b/apps/nxls/src/global-polyfills.ts @@ -0,0 +1,7 @@ +/* eslint-disable */ + +// needed for rollup builds because one of the dependent libraries have a non_webpack_require (essentially the nx package resolve util) +declare var __non_webpack_require__: typeof require; +if (!globalThis.__non_webpack_require__) { + globalThis.__non_webpack_require__ = require; +} diff --git a/apps/nxls/src/languageModelCache.ts b/apps/nxls/src/languageModelCache.ts new file mode 100644 index 0000000000..1ef2ad908c --- /dev/null +++ b/apps/nxls/src/languageModelCache.ts @@ -0,0 +1,118 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// https://github.com/microsoft/vscode/blob/89c30e1b86f941db095d9f52b128287e5039e004/extensions/json-language-features/server/src/languageModelCache.ts + +import { JSONDocument } from 'vscode-json-languageservice'; +import { TextDocument } from 'vscode-languageserver-textdocument'; + +export interface LanguageModelCache { + get(document: TextDocument): { jsonAst: T; document: TextDocument }; + onDocumentRemoved(document: TextDocument): void; + dispose(): void; +} + +export function getLanguageModelCache( + maxEntries: number, + cleanupIntervalTimeInSec: number, + parse: (document: TextDocument) => JSONDocument +): LanguageModelCache { + let languageModels: { + [uri: string]: { + version: number; + languageId: string; + cTime: number; + languageModel: JSONDocument; + document: TextDocument; + }; + } = {}; + let nModels = 0; + + let cleanupInterval: NodeJS.Timer | undefined = undefined; + if (cleanupIntervalTimeInSec > 0) { + cleanupInterval = setInterval(() => { + const cutoffTime = Date.now() - cleanupIntervalTimeInSec * 1000; + const uris = Object.keys(languageModels); + for (const uri of uris) { + const languageModelInfo = languageModels[uri]; + if (languageModelInfo.cTime < cutoffTime) { + delete languageModels[uri]; + nModels--; + } + } + }, cleanupIntervalTimeInSec * 1000); + } + + return { + get(document: TextDocument): { + jsonAst: JSONDocument; + document: TextDocument; + } { + const version = document.version; + const languageId = document.languageId; + const languageModelInfo = languageModels[document.uri]; + if ( + languageModelInfo && + languageModelInfo.version === version && + languageModelInfo.languageId === languageId + ) { + languageModelInfo.cTime = Date.now(); + return { + jsonAst: languageModelInfo.languageModel, + document: languageModelInfo.document, + }; + } + const newDocument = TextDocument.create( + document.uri, + document.languageId, + document.version, + document.getText().replace(/"\$schema":\s".+",/, '') + ); + const languageModel = parse(newDocument); + + languageModels[document.uri] = { + languageModel, + version, + languageId, + document: newDocument, + cTime: Date.now(), + }; + if (!languageModelInfo) { + nModels++; + } + + if (nModels === maxEntries) { + let oldestTime = Number.MAX_VALUE; + let oldestUri = null; + for (const uri in languageModels) { + const languageModelInfo = languageModels[uri]; + if (languageModelInfo.cTime < oldestTime) { + oldestUri = uri; + oldestTime = languageModelInfo.cTime; + } + } + if (oldestUri) { + delete languageModels[oldestUri]; + nModels--; + } + } + return { jsonAst: languageModel, document: newDocument }; + }, + onDocumentRemoved(document: TextDocument) { + const uri = document.uri; + if (languageModels[uri]) { + delete languageModels[uri]; + nModels--; + } + }, + dispose() { + if (typeof cleanupInterval !== 'undefined') { + clearInterval(cleanupInterval); + cleanupInterval = undefined; + languageModels = {}; + nModels = 0; + } + }, + }; +} diff --git a/apps/nxls/src/main.ts b/apps/nxls/src/main.ts new file mode 100644 index 0000000000..7ad0e55054 --- /dev/null +++ b/apps/nxls/src/main.ts @@ -0,0 +1,134 @@ +import './global-polyfills'; + +import { getExecutors } from '@nx-console/collections'; +import { + getProjectJsonSchema, + getWorkspaceJsonSchema, +} from '@nx-console/json-schema'; +import { + ClientCapabilities, + getLanguageService, + TextDocument, +} from 'vscode-json-languageservice'; +import { + createConnection, + InitializeResult, + ProposedFeatures, + TextDocuments, + TextDocumentSyncKind, +} from 'vscode-languageserver/node'; +import { URI, Utils } from 'vscode-uri'; +import { getLanguageModelCache } from './languageModelCache'; +import { getSchemaRequestService } from './runtime'; + +const workspaceContext = { + resolveRelativePath: (relativePath: string, resource: string) => { + const base = resource.substring(0, resource.lastIndexOf('/') + 1); + return Utils.resolvePath(URI.parse(base), relativePath).toString(); + }, +}; + +const connection = createConnection(ProposedFeatures.all); + +let languageService = getLanguageService({ + workspaceContext, + contributions: [], + clientCapabilities: ClientCapabilities.LATEST, +}); + +// Create a text document manager. +const documents = new TextDocuments(TextDocument); + +// Make the text document manager listen on the connection +// for open, change and close text document events +documents.listen(connection); + +connection.onInitialize(async (params) => { + const { workspacePath, projects } = params.initializationOptions ?? {}; + + languageService = getLanguageService({ + schemaRequestService: getSchemaRequestService(['file']), + workspaceContext, + contributions: [], + clientCapabilities: params.capabilities, + }); + + // get schemas + const collections = await getExecutors( + workspacePath ?? params.rootPath, + projects, + false + ); + const workspaceSchema = getWorkspaceJsonSchema(collections); + const projectSchema = getProjectJsonSchema(collections); + languageService.configure({ + schemas: [ + { + uri: 'nx://schemas/workspace', + fileMatch: ['**/workspace.json', '**/angular.json'], + schema: workspaceSchema, + }, + { + uri: 'nx://schemas/project', + fileMatch: ['**/project.json'], + schema: projectSchema, + }, + ], + }); + + const result: InitializeResult = { + capabilities: { + textDocumentSync: TextDocumentSyncKind.Incremental, + completionProvider: { + resolveProvider: false, + triggerCharacters: ['"', ':'], + }, + hoverProvider: true, + }, + }; + + return result; +}); + +connection.onCompletion(async (completionParams) => { + const changedDocument = documents.get(completionParams.textDocument.uri); + if (!changedDocument) { + return null; + } + + const { jsonAst, document } = getJsonDocument(changedDocument); + return languageService.doComplete( + document, + completionParams.position, + jsonAst + ); +}); + +connection.onHover(async (hoverParams) => { + const hoverDocument = documents.get(hoverParams.textDocument.uri); + + if (!hoverDocument) { + return null; + } + + const { jsonAst, document } = getJsonDocument(hoverDocument); + return languageService.doHover(document, hoverParams.position, jsonAst); +}); + +const jsonDocumentMapper = getLanguageModelCache(10, 60, (document) => + languageService.parseJSONDocument(document) +); + +documents.onDidClose((e) => { + jsonDocumentMapper.onDocumentRemoved(e.document); +}); + +connection.onShutdown(() => { + jsonDocumentMapper.dispose(); +}); + +function getJsonDocument(document: TextDocument) { + return jsonDocumentMapper.get(document); +} + +connection.listen(); diff --git a/apps/nxls/src/runtime.ts b/apps/nxls/src/runtime.ts new file mode 100644 index 0000000000..b22fa5e4bc --- /dev/null +++ b/apps/nxls/src/runtime.ts @@ -0,0 +1,71 @@ +import { + xhr, + XHRResponse, + configure as configureHttpRequests, + getErrorStatusDescription, +} from 'request-light'; +import { URI } from 'vscode-uri'; +import * as fs from 'fs'; + +export interface RequestService { + getContent(uri: string): Promise; +} + +function getHTTPRequestService(): RequestService { + return { + getContent(uri: string, _encoding?: string) { + const headers = { 'Accept-Encoding': 'gzip, deflate' }; + return xhr({ url: uri, followRedirects: 5, headers }).then( + (response) => { + return response.responseText; + }, + (error: XHRResponse) => { + return Promise.reject( + error.responseText || + getErrorStatusDescription(error.status) || + error.toString() + ); + } + ); + }, + }; +} + +function getFileRequestService(): RequestService { + return { + getContent(location: string, encoding?: BufferEncoding) { + return new Promise((c, e) => { + const uri = URI.parse(location); + fs.readFile(uri.fsPath, encoding, (err, buf) => { + if (err) { + return e(err); + } + c(buf.toString()); + }); + }); + }, + }; +} + +export function getSchemaRequestService( + handledSchemas: string[] = ['https', 'http', 'file'] +) { + const builtInHandlers: { [protocol: string]: RequestService | undefined } = + {}; + for (const protocol of handledSchemas) { + if (protocol === 'file') { + builtInHandlers[protocol] = getFileRequestService(); + } else if (protocol === 'http' || protocol === 'https') { + builtInHandlers[protocol] = getHTTPRequestService(); + } + } + return (uri: string): Thenable => { + const protocol = uri.substr(0, uri.indexOf(':')); + + const builtInHandler = builtInHandlers[protocol]; + if (builtInHandler) { + return builtInHandler.getContent(uri); + } + return Promise.reject('Unable to retrieve schema'); + }; +} diff --git a/apps/nxls/tsconfig.app.json b/apps/nxls/tsconfig.app.json new file mode 100644 index 0000000000..908dff6b33 --- /dev/null +++ b/apps/nxls/tsconfig.app.json @@ -0,0 +1,10 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "outDir": "../../dist/out-tsc", + "module": "ESNext", + "types": ["node"] + }, + "exclude": ["jest.config.ts", "**/*.spec.ts", "**/*.test.ts"], + "include": ["**/*.ts"] +} diff --git a/apps/nxls/tsconfig.json b/apps/nxls/tsconfig.json new file mode 100644 index 0000000000..63dbe35fb2 --- /dev/null +++ b/apps/nxls/tsconfig.json @@ -0,0 +1,13 @@ +{ + "extends": "../../tsconfig.base.json", + "files": [], + "include": [], + "references": [ + { + "path": "./tsconfig.app.json" + }, + { + "path": "./tsconfig.spec.json" + } + ] +} diff --git a/apps/nxls/tsconfig.spec.json b/apps/nxls/tsconfig.spec.json new file mode 100644 index 0000000000..546f12877f --- /dev/null +++ b/apps/nxls/tsconfig.spec.json @@ -0,0 +1,9 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "outDir": "../../dist/out-tsc", + "module": "commonjs", + "types": ["jest", "node"] + }, + "include": ["jest.config.ts", "**/*.test.ts", "**/*.spec.ts", "**/*.d.ts"] +} diff --git a/apps/vscode-ui/project.json b/apps/vscode-ui/project.json index 0382c0f4df..56e00a1367 100644 --- a/apps/vscode-ui/project.json +++ b/apps/vscode-ui/project.json @@ -37,7 +37,8 @@ "stylePreprocessorOptions": { "includePaths": ["libs/vscode-ui/styles/src/lib"] }, - "allowedCommonJsDependencies": ["zone.js"] + "allowedCommonJsDependencies": ["zone.js"], + "deleteOutputPath": false }, "configurations": { "production": { diff --git a/apps/vscode/project.json b/apps/vscode/project.json index 3d20f9fd68..08feb18832 100644 --- a/apps/vscode/project.json +++ b/apps/vscode/project.json @@ -1,10 +1,9 @@ { - "$schema": "../../node_modules/nx/schemas/project-schema.json", "sourceRoot": "apps/vscode/src", "projectType": "application", "prefix": "vscode", "generators": {}, - "implicitDependencies": ["vscode-ui"], + "implicitDependencies": ["vscode-ui", "nxls"], "targets": { "watch-all": { "executor": "@nrwl/workspace:run-commands", @@ -19,6 +18,11 @@ "command": "yarn nx watch vscode-ui", "prefix": "vscode-ui", "color": "green" + }, + { + "command": "yarn nx watch nxls", + "prefix": "lsp", + "color": "magenta" } ], "parallel": true @@ -72,7 +76,8 @@ "output": "/" } ], - "buildLibsFromSource": true + "buildLibsFromSource": true, + "deleteOutputPath": false }, "configurations": { "production": { @@ -106,7 +111,6 @@ }, "package": { "executor": "@nrwl/workspace:run-commands", - "dependsOn": ["build"], "options": { "commands": [ "yarn nx run vscode:build:production", diff --git a/apps/vscode/src/main.ts b/apps/vscode/src/main.ts index 7ace82b5a6..357193c685 100644 --- a/apps/vscode/src/main.ts +++ b/apps/vscode/src/main.ts @@ -21,12 +21,10 @@ import { getOutputChannel, getTelemetry, initTelemetry, - getGenerators, teardownTelemetry, watchFile, - fileExists, checkIsNxWorkspace, -} from '@nx-console/server'; +} from '@nx-console/utils'; import { GlobalConfigurationStore, WorkspaceConfigurationStore, @@ -47,10 +45,6 @@ import { } from '@nx-console/vscode/nx-project-view'; import { environment } from './environments/environment'; -import { - WorkspaceJsonSchema, - ProjectJsonSchema, -} from '@nx-console/vscode/json-schema'; import { enableTypeScriptPlugin } from '@nx-console/typescript-plugin'; import { NxConversion } from '@nx-console/vscode/nx-conversion'; import { @@ -58,6 +52,10 @@ import { REFRESH_WORKSPACE, } from './commands/refresh-workspace'; import { projectGraph } from '@nx-console/vscode/project-graph'; +import { fileExists } from '@nx-console/file-system'; +import { getGenerators } from '@nx-console/collections'; +import { nxVersion } from '@nx-console/npm'; +import { configureLspClient } from '@nx-console/vscode/lsp-client'; let runTargetTreeView: TreeView; let nxProjectTreeView: TreeView; @@ -118,7 +116,8 @@ export async function activate(c: ExtensionContext) { revealWebViewPanelCommand, manuallySelectWorkspaceDefinitionCommand, refreshWorkspace(), - projectGraph() + projectGraph(), + await configureLspClient(context) ); // registers itself as a CodeLensProvider and watches config to dispose/re-register @@ -127,8 +126,6 @@ export async function activate(c: ExtensionContext) { '@nx-console/vscode/nx-workspace' ); new WorkspaceCodeLensProvider(context); - new WorkspaceJsonSchema(context); - new ProjectJsonSchema(context); NxConversion.createInstance(context); @@ -268,10 +265,11 @@ async function setWorkspace(workspacePath: string) { workspaceType = 'angular'; } - const { nxVersion } = await import('@nx-console/vscode/nx-workspace'); - WorkspaceConfigurationStore.instance.set('workspaceType', workspaceType); - WorkspaceConfigurationStore.instance.set('nxVersion', await nxVersion()); + WorkspaceConfigurationStore.instance.set( + 'nxVersion', + await nxVersion(workspacePath) + ); getTelemetry().record('WorkspaceType', { workspaceType }); } diff --git a/apps/vscode/src/package.json b/apps/vscode/src/package.json index b9c9978ee9..98e6b55ffb 100644 --- a/apps/vscode/src/package.json +++ b/apps/vscode/src/package.json @@ -884,18 +884,6 @@ ] }, "jsonValidation": [ - { - "fileMatch": "workspace.json", - "url": "./workspace-schema.json" - }, - { - "fileMatch": "angular.json", - "url": "./workspace-schema.json" - }, - { - "fileMatch": "project.json", - "url": "./project-schema.json" - }, { "fileMatch": "nx.json", "url": "./nx-schema.json" diff --git a/libs/collections/.babelrc b/libs/collections/.babelrc new file mode 100644 index 0000000000..cf7ddd99c6 --- /dev/null +++ b/libs/collections/.babelrc @@ -0,0 +1,3 @@ +{ + "presets": [["@nrwl/web/babel", { "useBuiltIns": "usage" }]] +} diff --git a/libs/collections/.eslintrc.json b/libs/collections/.eslintrc.json new file mode 100644 index 0000000000..9d9c0db55b --- /dev/null +++ b/libs/collections/.eslintrc.json @@ -0,0 +1,18 @@ +{ + "extends": ["../../.eslintrc.json"], + "ignorePatterns": ["!**/*"], + "overrides": [ + { + "files": ["*.ts", "*.tsx", "*.js", "*.jsx"], + "rules": {} + }, + { + "files": ["*.ts", "*.tsx"], + "rules": {} + }, + { + "files": ["*.js", "*.jsx"], + "rules": {} + } + ] +} diff --git a/libs/collections/README.md b/libs/collections/README.md new file mode 100644 index 0000000000..05e0fe2aa5 --- /dev/null +++ b/libs/collections/README.md @@ -0,0 +1,11 @@ +# collections + +This library was generated with [Nx](https://nx.dev). + +## Running unit tests + +Run `nx test collections` to execute the unit tests via [Jest](https://jestjs.io). + +## Running lint + +Run `nx lint collections` to execute the lint via [ESLint](https://eslint.org/). diff --git a/libs/collections/jest.config.ts b/libs/collections/jest.config.ts new file mode 100644 index 0000000000..07989a92f3 --- /dev/null +++ b/libs/collections/jest.config.ts @@ -0,0 +1,16 @@ +/* eslint-disable */ +export default { + displayName: 'collections', + preset: '../../jest.preset.js', + globals: { + 'ts-jest': { + tsconfig: '/tsconfig.spec.json', + }, + }, + testEnvironment: 'node', + transform: { + '^.+\\.[tj]sx?$': 'ts-jest', + }, + moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx'], + coverageDirectory: '../../coverage/libs/collections', +}; diff --git a/libs/collections/project.json b/libs/collections/project.json new file mode 100644 index 0000000000..7a08928d91 --- /dev/null +++ b/libs/collections/project.json @@ -0,0 +1,23 @@ +{ + "$schema": "../../node_modules/nx/schemas/project-schema.json", + "sourceRoot": "libs/collections/src", + "projectType": "library", + "targets": { + "lint": { + "executor": "@nrwl/linter:eslint", + "outputs": ["{options.outputFile}"], + "options": { + "lintFilePatterns": ["libs/collections/**/*.ts"] + } + }, + "test": { + "executor": "@nrwl/jest:jest", + "outputs": ["coverage/libs/collections"], + "options": { + "jestConfig": "libs/collections/jest.config.ts", + "passWithNoTests": true + } + } + }, + "tags": [] +} diff --git a/libs/collections/src/index.ts b/libs/collections/src/index.ts new file mode 100644 index 0000000000..b66c1cc362 --- /dev/null +++ b/libs/collections/src/index.ts @@ -0,0 +1,3 @@ +export * from './lib/get-executors'; +export * from './lib/get-generators'; +export * from './lib/read-collections'; diff --git a/libs/server/src/lib/utils/get-executors.ts b/libs/collections/src/lib/get-executors.ts similarity index 100% rename from libs/server/src/lib/utils/get-executors.ts rename to libs/collections/src/lib/get-executors.ts diff --git a/libs/server/src/lib/utils/get-generators.ts b/libs/collections/src/lib/get-generators.ts similarity index 96% rename from libs/server/src/lib/utils/get-generators.ts rename to libs/collections/src/lib/get-generators.ts index 4aebf80aa9..8d86ff8738 100644 --- a/libs/server/src/lib/utils/get-generators.ts +++ b/libs/collections/src/lib/get-generators.ts @@ -3,16 +3,16 @@ import { GeneratorType, WorkspaceProjects, } from '@nx-console/schema'; +import { normalizeSchema } from '@nx-console/schema/normalize'; import { basename, join } from 'path'; import { getCollectionInfo, readCollections } from './read-collections'; import { directoryExists, fileExists, - listFiles, - normalizeSchema, readAndCacheJsonFile, -} from './utils'; + listFiles, +} from '@nx-console/file-system'; export async function getGenerators( workspacePath: string, diff --git a/libs/server/src/lib/utils/read-collections.ts b/libs/collections/src/lib/read-collections.ts similarity index 98% rename from libs/server/src/lib/utils/read-collections.ts rename to libs/collections/src/lib/read-collections.ts index 2fc94c119e..3a9dd8a6ce 100644 --- a/libs/server/src/lib/utils/read-collections.ts +++ b/libs/collections/src/lib/read-collections.ts @@ -10,7 +10,7 @@ import { } from '@nx-console/schema'; import { platform } from 'os'; import { dirname, join, resolve } from 'path'; -import { clearJsonCache, readAndCacheJsonFile } from './utils'; +import { clearJsonCache, readAndCacheJsonFile } from '@nx-console/file-system'; export async function readCollections( workspacePath: string, diff --git a/libs/collections/tsconfig.json b/libs/collections/tsconfig.json new file mode 100644 index 0000000000..62ebbd9464 --- /dev/null +++ b/libs/collections/tsconfig.json @@ -0,0 +1,13 @@ +{ + "extends": "../../tsconfig.base.json", + "files": [], + "include": [], + "references": [ + { + "path": "./tsconfig.lib.json" + }, + { + "path": "./tsconfig.spec.json" + } + ] +} diff --git a/libs/collections/tsconfig.lib.json b/libs/collections/tsconfig.lib.json new file mode 100644 index 0000000000..0e2a172abd --- /dev/null +++ b/libs/collections/tsconfig.lib.json @@ -0,0 +1,11 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "module": "commonjs", + "outDir": "../../dist/out-tsc", + "declaration": true, + "types": ["node"] + }, + "exclude": ["jest.config.ts", "**/*.spec.ts", "**/*.test.ts"], + "include": ["**/*.ts"] +} diff --git a/libs/collections/tsconfig.spec.json b/libs/collections/tsconfig.spec.json new file mode 100644 index 0000000000..ff08addd60 --- /dev/null +++ b/libs/collections/tsconfig.spec.json @@ -0,0 +1,20 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "outDir": "../../dist/out-tsc", + "module": "commonjs", + "types": ["jest", "node"] + }, + "include": [ + "jest.config.ts", + "**/*.test.ts", + "**/*.spec.ts", + "**/*.test.tsx", + "**/*.spec.tsx", + "**/*.test.js", + "**/*.spec.js", + "**/*.test.jsx", + "**/*.spec.jsx", + "**/*.d.ts" + ] +} diff --git a/libs/file-system/.babelrc b/libs/file-system/.babelrc new file mode 100644 index 0000000000..cf7ddd99c6 --- /dev/null +++ b/libs/file-system/.babelrc @@ -0,0 +1,3 @@ +{ + "presets": [["@nrwl/web/babel", { "useBuiltIns": "usage" }]] +} diff --git a/libs/file-system/.eslintrc.json b/libs/file-system/.eslintrc.json new file mode 100644 index 0000000000..9d9c0db55b --- /dev/null +++ b/libs/file-system/.eslintrc.json @@ -0,0 +1,18 @@ +{ + "extends": ["../../.eslintrc.json"], + "ignorePatterns": ["!**/*"], + "overrides": [ + { + "files": ["*.ts", "*.tsx", "*.js", "*.jsx"], + "rules": {} + }, + { + "files": ["*.ts", "*.tsx"], + "rules": {} + }, + { + "files": ["*.js", "*.jsx"], + "rules": {} + } + ] +} diff --git a/libs/file-system/README.md b/libs/file-system/README.md new file mode 100644 index 0000000000..75dcd7b536 --- /dev/null +++ b/libs/file-system/README.md @@ -0,0 +1,11 @@ +# file-system + +This library was generated with [Nx](https://nx.dev). + +## Running unit tests + +Run `nx test file-system` to execute the unit tests via [Jest](https://jestjs.io). + +## Running lint + +Run `nx lint file-system` to execute the lint via [ESLint](https://eslint.org/). diff --git a/libs/file-system/jest.config.ts b/libs/file-system/jest.config.ts new file mode 100644 index 0000000000..2800d47d00 --- /dev/null +++ b/libs/file-system/jest.config.ts @@ -0,0 +1,16 @@ +/* eslint-disable */ +export default { + displayName: 'file-system', + preset: '../../jest.preset.js', + globals: { + 'ts-jest': { + tsconfig: '/tsconfig.spec.json', + }, + }, + testEnvironment: 'node', + transform: { + '^.+\\.[tj]sx?$': 'ts-jest', + }, + moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx'], + coverageDirectory: '../../coverage/libs/file-system', +}; diff --git a/libs/file-system/project.json b/libs/file-system/project.json new file mode 100644 index 0000000000..efec285fa7 --- /dev/null +++ b/libs/file-system/project.json @@ -0,0 +1,23 @@ +{ + "$schema": "../../node_modules/nx/schemas/project-schema.json", + "sourceRoot": "libs/file-system/src", + "projectType": "library", + "targets": { + "lint": { + "executor": "@nrwl/linter:eslint", + "outputs": ["{options.outputFile}"], + "options": { + "lintFilePatterns": ["libs/file-system/**/*.ts"] + } + }, + "test": { + "executor": "@nrwl/jest:jest", + "outputs": ["coverage/libs/file-system"], + "options": { + "jestConfig": "libs/file-system/jest.config.ts", + "passWithNoTests": true + } + } + }, + "tags": [] +} diff --git a/libs/file-system/src/index.ts b/libs/file-system/src/index.ts new file mode 100644 index 0000000000..ab014ae261 --- /dev/null +++ b/libs/file-system/src/index.ts @@ -0,0 +1,7 @@ +export { fileExists } from './lib/file-exists'; +export { directoryExists } from './lib/directory-exists'; +export { cacheJson } from './lib/cache-json'; +export { readAndCacheJsonFile } from './lib/cache-json'; +export { clearJsonCache } from './lib/cache-json'; +export { readAndParseJson } from './lib/cache-json'; +export { listFiles } from './lib/list-files'; diff --git a/libs/file-system/src/lib/cache-json.ts b/libs/file-system/src/lib/cache-json.ts new file mode 100644 index 0000000000..cc0bcb97b8 --- /dev/null +++ b/libs/file-system/src/lib/cache-json.ts @@ -0,0 +1,93 @@ +import * as path from 'path'; +import { PosixFS, ZipOpenFS } from '@yarnpkg/fslib'; +import { getLibzipSync as libzip } from '@yarnpkg/libzip'; + +import { parse as parseJson, ParseError } from 'jsonc-parser'; + +const zipOpenFs = new ZipOpenFS({ libzip }); +export const crossFs = new PosixFS(zipOpenFs); +export const files: { [path: string]: string[] } = {}; +export const fileContents: { [path: string]: any } = {}; + +export async function readAndParseJson(filePath: string) { + const content = await crossFs.readFilePromise(filePath, 'utf8'); + try { + return JSON.parse(content); + } catch { + const errors: ParseError[] = []; + const result = parseJson(content, errors); + + if (errors.length > 0) { + for (const { error, offset } of errors) { + // TODO(cammisuli): output this generically + // getOutputChannel().appendLine( + // `${printParseErrorCode( + // error + // )} in JSON at position ${offset} in ${filePath}` + // ); + } + } + + return result; + } +} + +export function clearJsonCache(filePath: string, basedir = '') { + const fullFilePath = path.join(basedir, filePath); + return delete fileContents[fullFilePath]; +} + +export async function readAndCacheJsonFile( + filePath: string | undefined, + basedir = '' +): Promise<{ path: string; json: any }> { + if (!filePath) { + return { + path: '', + json: {}, + }; + } + let fullFilePath = path.join(basedir, filePath); + if (fullFilePath.startsWith('file:\\')) { + fullFilePath = fullFilePath.replace('file:\\', ''); + } + try { + const stats = await crossFs.statPromise(fullFilePath); + if (fileContents[fullFilePath] || stats.isFile()) { + fileContents[fullFilePath] ||= await readAndParseJson(fullFilePath); + return { + path: fullFilePath, + json: fileContents[fullFilePath], + }; + } + } catch (e) { + // TODO(cammisuli): output this generically + // getOutputChannel().appendLine(`${fullFilePath} does not exist`); + } + + return { + path: fullFilePath, + json: {}, + }; +} + +/** + * Caches already created json contents to a file path + */ +export function cacheJson(filePath: string, basedir = '', content?: any) { + const fullFilePath = path.join(basedir, filePath); + if (fileContents[fullFilePath]) { + return { + json: fileContents[fullFilePath], + path: fullFilePath, + }; + } + + if (content) { + fileContents[fullFilePath] = content; + } + return { + json: content, + path: fullFilePath, + }; +} diff --git a/libs/file-system/src/lib/directory-exists.ts b/libs/file-system/src/lib/directory-exists.ts new file mode 100644 index 0000000000..eff690f7eb --- /dev/null +++ b/libs/file-system/src/lib/directory-exists.ts @@ -0,0 +1,9 @@ +import { stat } from 'fs/promises'; + +export async function directoryExists(filePath: string): Promise { + try { + return (await stat(filePath)).isDirectory(); + } catch { + return false; + } +} diff --git a/libs/file-system/src/lib/file-exists.ts b/libs/file-system/src/lib/file-exists.ts new file mode 100644 index 0000000000..96e106c452 --- /dev/null +++ b/libs/file-system/src/lib/file-exists.ts @@ -0,0 +1,9 @@ +import { stat } from 'fs/promises'; + +export async function fileExists(filePath: string): Promise { + try { + return (await stat(filePath)).isFile(); + } catch { + return false; + } +} diff --git a/libs/file-system/src/lib/list-files.ts b/libs/file-system/src/lib/list-files.ts new file mode 100644 index 0000000000..85827ff311 --- /dev/null +++ b/libs/file-system/src/lib/list-files.ts @@ -0,0 +1,29 @@ +import { readdirSync, statSync } from 'fs'; +import * as path from 'path'; + +export function listFiles(dirName: string): string[] { + // TODO use .gitignore to skip files + if (dirName.indexOf('node_modules') > -1) return []; + if (dirName.indexOf('dist') > -1) return []; + + const res = [dirName]; + // the try-catch here is intentional. It's only used in auto-completion. + // If it doesn't work, we don't want the process to exit + try { + readdirSync(dirName).forEach((c) => { + const child = path.join(dirName, c); + try { + if (!statSync(child).isDirectory()) { + res.push(child); + } else if (statSync(child).isDirectory()) { + res.push(...listFiles(child)); + } + } catch { + // noop + } + }); + } catch { + // noop + } + return res; +} diff --git a/libs/file-system/tsconfig.json b/libs/file-system/tsconfig.json new file mode 100644 index 0000000000..62ebbd9464 --- /dev/null +++ b/libs/file-system/tsconfig.json @@ -0,0 +1,13 @@ +{ + "extends": "../../tsconfig.base.json", + "files": [], + "include": [], + "references": [ + { + "path": "./tsconfig.lib.json" + }, + { + "path": "./tsconfig.spec.json" + } + ] +} diff --git a/libs/file-system/tsconfig.lib.json b/libs/file-system/tsconfig.lib.json new file mode 100644 index 0000000000..0e2a172abd --- /dev/null +++ b/libs/file-system/tsconfig.lib.json @@ -0,0 +1,11 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "module": "commonjs", + "outDir": "../../dist/out-tsc", + "declaration": true, + "types": ["node"] + }, + "exclude": ["jest.config.ts", "**/*.spec.ts", "**/*.test.ts"], + "include": ["**/*.ts"] +} diff --git a/libs/file-system/tsconfig.spec.json b/libs/file-system/tsconfig.spec.json new file mode 100644 index 0000000000..ff08addd60 --- /dev/null +++ b/libs/file-system/tsconfig.spec.json @@ -0,0 +1,20 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "outDir": "../../dist/out-tsc", + "module": "commonjs", + "types": ["jest", "node"] + }, + "include": [ + "jest.config.ts", + "**/*.test.ts", + "**/*.spec.ts", + "**/*.test.tsx", + "**/*.spec.tsx", + "**/*.test.js", + "**/*.spec.js", + "**/*.test.jsx", + "**/*.spec.jsx", + "**/*.d.ts" + ] +} diff --git a/libs/json-schema/.eslintrc.json b/libs/json-schema/.eslintrc.json new file mode 100644 index 0000000000..9d9c0db55b --- /dev/null +++ b/libs/json-schema/.eslintrc.json @@ -0,0 +1,18 @@ +{ + "extends": ["../../.eslintrc.json"], + "ignorePatterns": ["!**/*"], + "overrides": [ + { + "files": ["*.ts", "*.tsx", "*.js", "*.jsx"], + "rules": {} + }, + { + "files": ["*.ts", "*.tsx"], + "rules": {} + }, + { + "files": ["*.js", "*.jsx"], + "rules": {} + } + ] +} diff --git a/libs/json-schema/README.md b/libs/json-schema/README.md new file mode 100644 index 0000000000..a0e48c9253 --- /dev/null +++ b/libs/json-schema/README.md @@ -0,0 +1,7 @@ +# json-schema + +This library was generated with [Nx](https://nx.dev). + +## Running unit tests + +Run `nx test json-schema` to execute the unit tests via [Jest](https://jestjs.io). diff --git a/libs/vscode/json-schema/jest.config.ts b/libs/json-schema/jest.config.ts similarity index 62% rename from libs/vscode/json-schema/jest.config.ts rename to libs/json-schema/jest.config.ts index c3ab345cca..c67127b15d 100644 --- a/libs/vscode/json-schema/jest.config.ts +++ b/libs/json-schema/jest.config.ts @@ -1,5 +1,5 @@ export default { - displayName: 'vscode-json-schema', + displayName: 'json-schema', globals: { 'ts-jest': { tsconfig: '/tsconfig.spec.json' }, @@ -8,7 +8,7 @@ export default { '^.+\\.[tj]sx?$': 'ts-jest', }, moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx'], - coverageDirectory: '../../../coverage/libs/vscode/json-schema', + coverageDirectory: '../../coverage/libs/json-schema', testEnvironment: 'node', - preset: '../../../jest.preset.js', + preset: '../../jest.preset.js', }; diff --git a/libs/json-schema/package.json b/libs/json-schema/package.json new file mode 100644 index 0000000000..9196749f42 --- /dev/null +++ b/libs/json-schema/package.json @@ -0,0 +1,4 @@ +{ + "name": "@nx-console/json-schema", + "version": "0.0.1" +} diff --git a/libs/json-schema/project.json b/libs/json-schema/project.json new file mode 100644 index 0000000000..59063ff380 --- /dev/null +++ b/libs/json-schema/project.json @@ -0,0 +1,22 @@ +{ + "$schema": "../../node_modules/nx/schemas/project-schema.json", + "sourceRoot": "libs/json-schema/src", + "projectType": "library", + "targets": { + "lint": { + "executor": "@nrwl/linter:eslint", + "options": { + "lintFilePatterns": ["libs/json-schema/**/*.ts"] + } + }, + "test": { + "executor": "@nrwl/jest:jest", + "outputs": ["coverage/libs/json-schema"], + "options": { + "jestConfig": "libs/json-schema/jest.config.ts", + "passWithNoTests": true + } + } + }, + "tags": [] +} diff --git a/libs/vscode/json-schema/src/index.ts b/libs/json-schema/src/index.ts similarity index 100% rename from libs/vscode/json-schema/src/index.ts rename to libs/json-schema/src/index.ts diff --git a/libs/json-schema/src/lib/create-builders-and-executors-schema.ts b/libs/json-schema/src/lib/create-builders-and-executors-schema.ts new file mode 100644 index 0000000000..2985c22df7 --- /dev/null +++ b/libs/json-schema/src/lib/create-builders-and-executors-schema.ts @@ -0,0 +1,60 @@ +import { CollectionInfo } from '@nx-console/schema'; +import { JSONSchema } from 'vscode-json-languageservice'; + +type BuildersSchema = JSONSchema; +type ExecutorsSchema = JSONSchema; + +/** + * Builds the schema for builders and executors. + * + * @param collections + * @returns [BuildersSchema[], ExecutorsSchema[]] + */ +export function createBuildersAndExecutorsSchema( + collections: CollectionInfo[] +): [BuildersSchema[], ExecutorsSchema[]] { + return collections.reduce<[BuildersSchema[], ExecutorsSchema[]]>( + (acc, collection) => { + acc[0].push({ + if: { + properties: { builder: { const: collection.name } }, + required: ['builder'], + }, + then: { + properties: { + options: { + $ref: `file://${collection.path}`, + }, + configurations: { + additionalProperties: { + $ref: `file://${collection.path}`, + required: [], + }, + }, + }, + }, + }); + acc[1].push({ + if: { + properties: { executor: { const: collection.name } }, + required: ['executor'], + }, + then: { + properties: { + options: { + $ref: `file://${collection.path}`, + }, + configurations: { + additionalProperties: { + $ref: `file://${collection.path}`, + required: [], + }, + }, + }, + }, + }); + return acc; + }, + [[], []] + ); +} diff --git a/libs/json-schema/src/lib/project-json-schema.ts b/libs/json-schema/src/lib/project-json-schema.ts new file mode 100644 index 0000000000..4f49db6c7a --- /dev/null +++ b/libs/json-schema/src/lib/project-json-schema.ts @@ -0,0 +1,33 @@ +import { CollectionInfo } from '@nx-console/schema'; +import { JSONSchema } from 'vscode-json-languageservice'; +import { createBuildersAndExecutorsSchema } from './create-builders-and-executors-schema'; + +export function getProjectJsonSchema(collections: CollectionInfo[]) { + const [, executors] = createBuildersAndExecutorsSchema(collections); + const contents = createJsonSchema(executors); + return contents; +} + +function createJsonSchema(executors: JSONSchema[]): JSONSchema { + return { + type: 'object', + properties: { + targets: { + additionalProperties: { + type: 'object', + properties: { + executor: { + type: 'string', + }, + configurations: { + additionalProperties: { + type: 'object', + }, + }, + }, + allOf: executors, + }, + }, + }, + }; +} diff --git a/libs/json-schema/src/lib/workspace-json-schema.ts b/libs/json-schema/src/lib/workspace-json-schema.ts new file mode 100644 index 0000000000..ab5a7d489a --- /dev/null +++ b/libs/json-schema/src/lib/workspace-json-schema.ts @@ -0,0 +1,121 @@ +import { CollectionInfo } from '@nx-console/schema'; +import { JSONSchema } from 'vscode-json-languageservice'; +import { createBuildersAndExecutorsSchema } from './create-builders-and-executors-schema'; + +export function getWorkspaceJsonSchema(collections: CollectionInfo[]) { + const [builders, executors] = createBuildersAndExecutorsSchema(collections); + const contents = createJsonSchema(builders, executors); + return contents; +} + +function createJsonSchema( + builders: JSONSchema[], + executors: JSONSchema[] +): JSONSchema { + return { + title: 'JSON schema for Nx workspaces', + id: 'https://nx.dev', + type: 'object', + properties: { + version: { + type: 'number', + enum: [1, 2], + }, + }, + allOf: [ + { + if: { + properties: { version: { const: 1 } }, + required: ['version'], + }, + then: { + properties: { + projects: { + type: 'object', + additionalProperties: { + type: 'object', + properties: { + architect: { + description: + 'Configures all the targets which define what tasks you can run against the project', + additionalProperties: { + type: 'object', + properties: { + builder: { + description: + 'The function that Nx will invoke when you run this architect', + type: 'string', + }, + options: { + type: 'object', + }, + configurations: { + description: + 'provides extra sets of values that will be merged into the options map', + additionalProperties: { + type: 'object', + }, + }, + }, + allOf: builders, + }, + }, + }, + }, + }, + }, + }, + }, + { + if: { + properties: { version: { const: 2 } }, + required: ['version'], + }, + then: { + properties: { + projects: { + type: 'object', + additionalProperties: { + oneOf: [ + { + type: 'string', + }, + { + type: 'object', + properties: { + targets: { + description: + 'Configures all the targets which define what tasks you can run against the project', + additionalProperties: { + type: 'object', + properties: { + executor: { + description: + 'The function that Nx will invoke when you run this target', + type: 'string', + }, + options: { + type: 'object', + }, + configurations: { + description: + 'provides extra sets of values that will be merged into the options map', + additionalProperties: { + type: 'object', + }, + }, + }, + allOf: executors, + }, + }, + }, + }, + ], + }, + }, + }, + }, + }, + ], + }; +} diff --git a/libs/json-schema/tsconfig.json b/libs/json-schema/tsconfig.json new file mode 100644 index 0000000000..62ebbd9464 --- /dev/null +++ b/libs/json-schema/tsconfig.json @@ -0,0 +1,13 @@ +{ + "extends": "../../tsconfig.base.json", + "files": [], + "include": [], + "references": [ + { + "path": "./tsconfig.lib.json" + }, + { + "path": "./tsconfig.spec.json" + } + ] +} diff --git a/libs/server/tsconfig.lib.json b/libs/json-schema/tsconfig.lib.json similarity index 100% rename from libs/server/tsconfig.lib.json rename to libs/json-schema/tsconfig.lib.json diff --git a/libs/json-schema/tsconfig.spec.json b/libs/json-schema/tsconfig.spec.json new file mode 100644 index 0000000000..46f9467f3b --- /dev/null +++ b/libs/json-schema/tsconfig.spec.json @@ -0,0 +1,20 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "outDir": "../../dist/out-tsc", + "module": "commonjs", + "types": ["jest", "node"] + }, + "include": [ + "**/*.spec.ts", + "**/*.test.ts", + "**/*.spec.tsx", + "**/*.test.tsx", + "**/*.spec.js", + "**/*.test.js", + "**/*.spec.jsx", + "**/*.test.jsx", + "**/*.d.ts", + "jest.config.ts" + ] +} diff --git a/libs/npm/src/index.ts b/libs/npm/src/index.ts index 841cbe1a6a..ae950a78ac 100644 --- a/libs/npm/src/index.ts +++ b/libs/npm/src/index.ts @@ -1 +1,4 @@ export * from './lib/workspace-dependencies'; +export * from './lib/find-nx-package-path'; +export * from './lib/ng-version'; +export * from './lib/nx-version'; diff --git a/libs/npm/src/lib/find-nx-package-path.ts b/libs/npm/src/lib/find-nx-package-path.ts new file mode 100644 index 0000000000..7ac3c24d53 --- /dev/null +++ b/libs/npm/src/lib/find-nx-package-path.ts @@ -0,0 +1,36 @@ +import { join } from 'path'; +import { fileExists } from '@nx-console/file-system'; +import { workspaceDependencyPath } from './workspace-dependencies'; + +/** + * Finds the local Nx package in the workspace. + * + * It will try to look for the `nx` package, with the specific file. If it does not exist, it will try to look for the `@nrwl/workspace` package, with the specific file + * @param workspacePath + * @returns + */ +export async function findNxPackagePath( + workspacePath: string, + filePath: string +): Promise { + const buildPath = (base: string) => join(base, filePath); + + const nxWorkspaceDepPath = await workspaceDependencyPath(workspacePath, 'nx'); + if (nxWorkspaceDepPath) { + const path = buildPath(nxWorkspaceDepPath); + if (await fileExists(path)) { + return path; + } + } + + const nrwlWorkspaceDepPath = await workspaceDependencyPath( + workspacePath, + '@nrwl/workspace' + ); + if (nrwlWorkspaceDepPath) { + const path = buildPath(nrwlWorkspaceDepPath); + if (await fileExists(path)) { + return path; + } + } +} diff --git a/libs/server/src/lib/utils/ng-version.ts b/libs/npm/src/lib/ng-version.ts similarity index 68% rename from libs/server/src/lib/utils/ng-version.ts rename to libs/npm/src/lib/ng-version.ts index 08c739542c..91edc3783a 100644 --- a/libs/server/src/lib/utils/ng-version.ts +++ b/libs/npm/src/lib/ng-version.ts @@ -1,17 +1,12 @@ -import { workspaceDependencyPath } from '@nx-console/npm'; -import { WorkspaceConfigurationStore } from '@nx-console/vscode/configuration'; +import { workspaceDependencyPath } from './workspace-dependencies'; declare function __non_webpack_require__(importPath: string): any; let ngPackageJson: { version: string }; let loadedNgPackage = false; -export async function ngVersion(): Promise { - if (!loadedNgPackage) { - const workspacePath = WorkspaceConfigurationStore.instance.get( - 'nxWorkspacePath', - '' - ); +export async function ngVersion(workspacePath: string): Promise { + if (!loadedNgPackage) { const packagePath = await workspaceDependencyPath( workspacePath, '@angular/cli' diff --git a/libs/vscode/nx-workspace/src/lib/nx-version.ts b/libs/npm/src/lib/nx-version.ts similarity index 67% rename from libs/vscode/nx-workspace/src/lib/nx-version.ts rename to libs/npm/src/lib/nx-version.ts index aea18aa4a6..8b78959a95 100644 --- a/libs/vscode/nx-workspace/src/lib/nx-version.ts +++ b/libs/npm/src/lib/nx-version.ts @@ -1,17 +1,11 @@ -import { WorkspaceConfigurationStore } from '@nx-console/vscode/configuration'; -import { findNxPackagePath } from './get-nx-workspace-package'; +import { findNxPackagePath } from './find-nx-package-path'; declare function __non_webpack_require__(importPath: string): any; let nxWorkspacePackageJson: { version: string }; let loadedNxPackage = false; -export async function nxVersion(): Promise { +export async function nxVersion(workspacePath: string): Promise { if (!loadedNxPackage) { - const workspacePath = WorkspaceConfigurationStore.instance.get( - 'nxWorkspacePath', - '' - ); - const packagePath = await findNxPackagePath(workspacePath, 'package.json'); if (!packagePath) { diff --git a/libs/npm/src/lib/pnp-dependencies.ts b/libs/npm/src/lib/pnp-dependencies.ts index 991806077b..4e8bf58801 100644 --- a/libs/npm/src/lib/pnp-dependencies.ts +++ b/libs/npm/src/lib/pnp-dependencies.ts @@ -1,6 +1,6 @@ -import { join } from 'path'; -import { Uri, workspace } from 'vscode'; import type { PnpApi } from '@yarnpkg/pnp'; +import { join } from 'path'; +import { fileExists } from '@nx-console/file-system'; declare function __non_webpack_require__(importPath: string): any; let PNP_API: PnpApi; @@ -11,8 +11,9 @@ async function getPnpFile(workspacePath: string) { try { const fileName = `.pnp${ext}`; const pnpFile = join(workspacePath, fileName); - await workspace.fs.stat(Uri.file(pnpFile)); - return pnpFile; + if (await fileExists(pnpFile)) { + return pnpFile; + } } catch { return; } diff --git a/libs/npm/src/lib/workspace-dependencies.spec.ts b/libs/npm/src/lib/workspace-dependencies.spec.ts index 766723fb98..e33defc1c0 100644 --- a/libs/npm/src/lib/workspace-dependencies.spec.ts +++ b/libs/npm/src/lib/workspace-dependencies.spec.ts @@ -1,6 +1,5 @@ import { PartialDeep } from 'type-fest'; -import { mocked } from 'ts-jest/utils'; - +import { mocked } from 'jest-mock'; import { workspaceDependencyPath } from './workspace-dependencies'; import * as pnpDependencies from './pnp-dependencies'; @@ -15,31 +14,15 @@ jest.mock( ); const mockedPnpDependencies = mocked(pnpDependencies); -import * as vscode from 'vscode'; -jest.mock('vscode', (): PartialDeep => { +import * as fs from '@nx-console/file-system'; +jest.mock('@nx-console/file-system', (): Partial => { + const original = jest.requireActual('@nx-console/file-system'); return { - FileType: { - Directory: 2, - SymbolicLink: 64, - }, - Uri: { - file: jest.fn((path) => path as any), - }, - workspace: { - fs: { - stat: jest.fn(() => - Promise.resolve({ - ctime: 0, - mtime: 0, - size: 0, - type: 2, - }) - ), - }, - }, + ...original, + fileExists: jest.fn(() => Promise.resolve(true)), + directoryExists: jest.fn(() => Promise.resolve(true)), }; }); -const mockedVsCode = mocked(vscode, true); describe('workspace-dependencies path', () => { it('should return a path to a workspace dependency when using node_modules', async () => { @@ -74,23 +57,4 @@ describe('workspace-dependencies path', () => { `"/workspace/tools/local/executor"` ); }); - - it('should support symbolic directory links', async () => { - mockedVsCode.workspace.fs.stat.mockImplementationOnce(() => { - return Promise.resolve({ - ctime: 0, - mtime: 0, - size: 0, - type: 66, - }); - }); - - const dependencyPath = await workspaceDependencyPath( - '/workspace', - '@nrwl/nx' - ); - expect(dependencyPath).toMatchInlineSnapshot( - `"/workspace/node_modules/@nrwl/nx"` - ); - }); }); diff --git a/libs/npm/src/lib/workspace-dependencies.ts b/libs/npm/src/lib/workspace-dependencies.ts index 6eff97961a..a35bf9e2a6 100644 --- a/libs/npm/src/lib/workspace-dependencies.ts +++ b/libs/npm/src/lib/workspace-dependencies.ts @@ -1,14 +1,14 @@ import { WorkspaceProjects } from '@nx-console/schema'; -import { WorkspaceConfigurationStore } from '@nx-console/vscode/configuration'; import { stat } from 'fs/promises'; import { join } from 'path'; -import { FileType, Uri, workspace } from 'vscode'; import { npmDependencies } from './npm-dependencies'; import { isWorkspaceInPnp, pnpDependencies, pnpDependencyPath, } from './pnp-dependencies'; +import { directoryExists } from '@nx-console/file-system'; +import { nxVersion } from './nx-version'; /** * Get dependencies for the current workspace. @@ -49,10 +49,7 @@ export async function workspaceDependencyPath( const path = join(workspacePath, 'node_modules', workspaceDependencyName); try { - const directoryType = (await workspace.fs.stat(Uri.file(path))).type; - return (directoryType & FileType.Directory) === FileType.Directory - ? path - : undefined; + return (await directoryExists(path)) ? path : undefined; } catch { return; } @@ -66,9 +63,8 @@ async function localDependencies( return []; } - const nxVersion = WorkspaceConfigurationStore.instance.get('nxVersion', null); - - if (nxVersion && nxVersion < 13) { + // Local plugins do not work with nxVersion less than 13 + if ((await nxVersion(workspacePath)) < 13) { return []; } diff --git a/libs/server/jest.config.ts b/libs/schema/jest.config.ts similarity index 66% rename from libs/server/jest.config.ts rename to libs/schema/jest.config.ts index d1ce8c4631..ae91765cb0 100644 --- a/libs/server/jest.config.ts +++ b/libs/schema/jest.config.ts @@ -1,7 +1,7 @@ export default { - coverageDirectory: '../../coverage/libs/server', + coverageDirectory: '../../coverage/libs/schema', globals: { 'ts-jest': { tsconfig: '/tsconfig.spec.json' } }, - displayName: 'server', + displayName: 'schema', testEnvironment: 'node', preset: '../../jest.preset.js', }; diff --git a/libs/schema/project.json b/libs/schema/project.json index 1d305dad7d..1018ad3ca4 100644 --- a/libs/schema/project.json +++ b/libs/schema/project.json @@ -8,6 +8,14 @@ "options": { "lintFilePatterns": ["libs/schema/**/*.ts"] } + }, + "test": { + "executor": "@nrwl/jest:jest", + "options": { + "jestConfig": "libs/schema/jest.config.ts", + "passWithNoTests": true + }, + "outputs": ["coverage/libs/schema"] } }, "tags": [] diff --git a/libs/schema/src/index.ts b/libs/schema/src/index.ts index 97c6e6fce7..5c67c1d60d 100644 --- a/libs/schema/src/index.ts +++ b/libs/schema/src/index.ts @@ -114,4 +114,4 @@ export const WORKSPACE_GENERATOR_NAME_REGEX = export type WorkspaceProjects = ProjectsConfigurations['projects']; -export { Store } from './store'; +export type { Store } from './store'; diff --git a/libs/server/src/lib/utils/utils.spec.ts b/libs/schema/src/normalize-schema.spec.ts similarity index 98% rename from libs/server/src/lib/utils/utils.spec.ts rename to libs/schema/src/normalize-schema.spec.ts index 079d67f663..ccb3511107 100644 --- a/libs/server/src/lib/utils/utils.spec.ts +++ b/libs/schema/src/normalize-schema.spec.ts @@ -1,11 +1,11 @@ -import { normalizeSchema } from './utils'; +import { Schema } from 'nx/src/utils/params'; import { LongFormXPrompt, - Option, - OptionType, OptionPropertyDescription, -} from '@nx-console/schema'; -import { Schema } from 'nx/src/utils/params'; + OptionType, + Option, +} from './index'; +import { normalizeSchema } from './normalize-schema'; describe('utils', () => { describe('normalizeSchema', () => { diff --git a/libs/server/src/lib/utils/utils.ts b/libs/schema/src/normalize-schema.ts similarity index 55% rename from libs/server/src/lib/utils/utils.ts rename to libs/schema/src/normalize-schema.ts index 46f25a9850..0944fcc07a 100644 --- a/libs/server/src/lib/utils/utils.ts +++ b/libs/schema/src/normalize-schema.ts @@ -1,45 +1,20 @@ -import { Schema } from 'nx/src/utils/params'; -import * as path from 'path'; -import type { - WorkspaceJsonConfiguration, - NxJsonConfiguration, -} from '@nrwl/devkit'; -import { names } from '@nrwl/devkit'; - import { + CliOption, ItemsWithEnum, ItemTooltips, LongFormXPrompt, Option, OptionItemLabelValue, - XPrompt, - CliOption, OptionPropertyDescription, -} from '@nx-console/schema'; - -import { readdirSync, statSync } from 'fs'; -import { readFile, stat } from 'fs/promises'; -import { - parse as parseJson, - ParseError, - printParseErrorCode, -} from 'jsonc-parser'; -import { getOutputChannel } from './output-channel'; -import { toNewFormat } from 'nx/src/config/workspaces'; -import { PosixFS, ZipOpenFS } from '@yarnpkg/fslib'; -import { getLibzipSync as libzip } from '@yarnpkg/libzip'; -import { ngVersion } from './ng-version'; - -const zipOpenFs = new ZipOpenFS({ libzip }); -export const crossFs = new PosixFS(zipOpenFs); + XPrompt, +} from './index'; +import { Schema } from 'nx/src/utils/params'; +import { names } from '@nrwl/devkit'; export interface GeneratorDefaults { [name: string]: string; } -export const files: { [path: string]: string[] } = {}; -export const fileContents: { [path: string]: any } = {}; - const IMPORTANT_FIELD_NAMES = [ 'name', 'project', @@ -51,136 +26,13 @@ const IMPORTANT_FIELD_NAMES = [ ]; const IMPORTANT_FIELDS_SET = new Set(IMPORTANT_FIELD_NAMES); -export function listFiles(dirName: string): string[] { - // TODO use .gitignore to skip files - if (dirName.indexOf('node_modules') > -1) return []; - if (dirName.indexOf('dist') > -1) return []; - - const res = [dirName]; - // the try-catch here is intentional. It's only used in auto-completion. - // If it doesn't work, we don't want the process to exit - try { - readdirSync(dirName).forEach((c) => { - const child = path.join(dirName, c); - try { - if (!statSync(child).isDirectory()) { - res.push(child); - } else if (statSync(child).isDirectory()) { - res.push(...listFiles(child)); - } - } catch { - // noop - } - }); - } catch { - // noop - } - return res; -} - -export async function directoryExists(filePath: string): Promise { - try { - return (await stat(filePath)).isDirectory(); - } catch { - return false; - } -} - -export async function fileExists(filePath: string): Promise { - try { - return (await stat(filePath)).isFile(); - } catch { - return false; - } -} - -export async function readAndParseJson(filePath: string) { - const content = await crossFs.readFilePromise(filePath, 'utf8'); - try { - return JSON.parse(content); - } catch { - const errors: ParseError[] = []; - const result = parseJson(content, errors); - - if (errors.length > 0) { - for (const { error, offset } of errors) { - getOutputChannel().appendLine( - `${printParseErrorCode( - error - )} in JSON at position ${offset} in ${filePath}` - ); - } - } - - return result; - } -} - -export function clearJsonCache(filePath: string, basedir = '') { - const fullFilePath = path.join(basedir, filePath); - return delete fileContents[fullFilePath]; -} - -/** - * Caches already created json contents to a file path - */ -export function cacheJson(filePath: string, basedir = '', content?: any) { - const fullFilePath = path.join(basedir, filePath); - if (fileContents[fullFilePath]) { - return { - json: fileContents[fullFilePath], - path: fullFilePath, - }; - } - - if (content) { - fileContents[fullFilePath] = content; - } - return { - json: content, - path: fullFilePath, - }; -} - -export async function readAndCacheJsonFile( - filePath: string | undefined, - basedir = '' -): Promise<{ path: string; json: any }> { - if (!filePath) { - return { - path: '', - json: {}, - }; - } - let fullFilePath = path.join(basedir, filePath); - if (fullFilePath.startsWith('file:\\')) { - fullFilePath = fullFilePath.replace('file:\\', ''); - } - try { - const stats = await crossFs.statPromise(fullFilePath); - if (fileContents[fullFilePath] || stats.isFile()) { - fileContents[fullFilePath] ||= await readAndParseJson(fullFilePath); - return { - path: fullFilePath, - json: fileContents[fullFilePath], - }; - } - } catch (e) { - getOutputChannel().appendLine(`${fullFilePath} does not exist`); - } - - return { - path: fullFilePath, - json: {}, - }; -} - export async function normalizeSchema( s: Schema, workspaceType: 'ng' | 'nx', projectDefaults?: GeneratorDefaults ): Promise { - const hyphenate = workspaceType === 'ng' && (await ngVersion()) >= 14; + // TODO(cammisuli): check what version ng supports hyphenated args + const hyphenate = workspaceType === 'ng'; const options = schemaToOptions(s, { hyphenate }); const requiredFields = new Set(s.required || []); @@ -303,30 +155,6 @@ function isOptionItemLabelValue( ); } -export function getPrimitiveValue(value: any): string | undefined { - if ( - typeof value === 'string' || - typeof value === 'number' || - typeof value === 'boolean' - ) { - return value.toString(); - } else { - return undefined; - } -} - -export function toWorkspaceFormat( - w: any -): WorkspaceJsonConfiguration & NxJsonConfiguration { - const newFormat = toNewFormat(w) as WorkspaceJsonConfiguration & - NxJsonConfiguration; - const sortedProjects = Object.entries(newFormat.projects || {}).sort( - (projectA, projectB) => projectA[0].localeCompare(projectB[0]) - ); - newFormat.projects = Object.fromEntries(sortedProjects); - return newFormat; -} - function schemaToOptions( schema: Schema, config?: { hyphenate: boolean } diff --git a/libs/server/tsconfig.spec.json b/libs/schema/tsconfig.spec.json similarity index 100% rename from libs/server/tsconfig.spec.json rename to libs/schema/tsconfig.spec.json diff --git a/libs/server/package.json b/libs/server/package.json deleted file mode 100644 index 3ce2b0e9ac..0000000000 --- a/libs/server/package.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "name": "@nx-console/server", - "version": "0.0.1" -} diff --git a/libs/typescript-plugin/src/lib/typescript-plugin.ts b/libs/typescript-plugin/src/lib/typescript-plugin.ts index 569dbbd20d..6df93f5c05 100644 --- a/libs/typescript-plugin/src/lib/typescript-plugin.ts +++ b/libs/typescript-plugin/src/lib/typescript-plugin.ts @@ -1,15 +1,11 @@ -import { - clearJsonCache, - findConfig, - readAndCacheJsonFile, - watchFile, -} from '@nx-console/server'; +import { findConfig, watchFile } from '@nx-console/utils'; import { GlobalConfigurationStore, WorkspaceConfigurationStore, } from '@nx-console/vscode/configuration'; import { dirname, join } from 'path'; import * as vscode from 'vscode'; +import { clearJsonCache, readAndCacheJsonFile } from '@nx-console/file-system'; const TSCONFIG_BASE = 'tsconfig.base.json'; const TSCONFIG_LIB = 'tsconfig.lib.json'; diff --git a/libs/server/.eslintrc.json b/libs/utils/.eslintrc.json similarity index 100% rename from libs/server/.eslintrc.json rename to libs/utils/.eslintrc.json diff --git a/libs/utils/jest.config.ts b/libs/utils/jest.config.ts new file mode 100644 index 0000000000..597c82da94 --- /dev/null +++ b/libs/utils/jest.config.ts @@ -0,0 +1,7 @@ +export default { + coverageDirectory: '../../coverage/libs/utils', + globals: { 'ts-jest': { tsconfig: '/tsconfig.spec.json' } }, + displayName: 'utils', + testEnvironment: 'node', + preset: '../../jest.preset.js', +}; diff --git a/libs/utils/package.json b/libs/utils/package.json new file mode 100644 index 0000000000..8788b4ea0a --- /dev/null +++ b/libs/utils/package.json @@ -0,0 +1,4 @@ +{ + "name": "@nx-console/utils", + "version": "0.0.1" +} diff --git a/libs/server/project.json b/libs/utils/project.json similarity index 65% rename from libs/server/project.json rename to libs/utils/project.json index c1402177d2..cecb215768 100644 --- a/libs/server/project.json +++ b/libs/utils/project.json @@ -1,15 +1,15 @@ { "$schema": "../../node_modules/nx/schemas/project-schema.json", - "sourceRoot": "libs/server/src", + "sourceRoot": "libs/utils/src", "projectType": "library", "targets": { "test": { "executor": "@nrwl/jest:jest", "options": { - "jestConfig": "libs/server/jest.config.ts", + "jestConfig": "libs/utils/jest.config.ts", "passWithNoTests": true }, - "outputs": ["coverage/libs/server"] + "outputs": ["coverage/libs/utils"] } }, "tags": [] diff --git a/libs/server/src/index.ts b/libs/utils/src/index.ts similarity index 60% rename from libs/server/src/index.ts rename to libs/utils/src/index.ts index f33615cfdd..d00b115a2d 100644 --- a/libs/server/src/index.ts +++ b/libs/utils/src/index.ts @@ -2,19 +2,7 @@ export * from './lib/abstract-tree-provider'; export * from './lib/telemetry'; export * from './lib/utils/output-channel'; export * from './lib/utils/read-projects'; -export * from './lib/utils/get-generators'; -export * from './lib/utils/get-executors'; -export * from './lib/utils/read-collections'; -export { - fileExists, - directoryExists, - readAndParseJson, - readAndCacheJsonFile, - normalizeSchema, - cacheJson, - clearJsonCache, - toWorkspaceFormat, -} from './lib/utils/utils'; +export { toWorkspaceFormat } from './lib/utils/utils'; export { watchFile } from './lib/utils/watch-file'; export { buildProjectPath } from './lib/utils/build-project-path'; export { findConfig } from './lib/utils/find-config'; diff --git a/libs/server/src/lib/abstract-tree-provider.ts b/libs/utils/src/lib/abstract-tree-provider.ts similarity index 100% rename from libs/server/src/lib/abstract-tree-provider.ts rename to libs/utils/src/lib/abstract-tree-provider.ts diff --git a/libs/server/src/lib/check-is-nx-workspace.ts b/libs/utils/src/lib/check-is-nx-workspace.ts similarity index 82% rename from libs/server/src/lib/check-is-nx-workspace.ts rename to libs/utils/src/lib/check-is-nx-workspace.ts index 5aeec499d4..940cf17d01 100644 --- a/libs/server/src/lib/check-is-nx-workspace.ts +++ b/libs/utils/src/lib/check-is-nx-workspace.ts @@ -1,5 +1,5 @@ import { join } from 'path'; -import { fileExists, readAndCacheJsonFile } from './utils/utils'; +import { fileExists, readAndCacheJsonFile } from '@nx-console/file-system'; export async function checkIsNxWorkspace( workspacePath: string diff --git a/libs/server/src/lib/telemetry/index.ts b/libs/utils/src/lib/telemetry/index.ts similarity index 54% rename from libs/server/src/lib/telemetry/index.ts rename to libs/utils/src/lib/telemetry/index.ts index 99547df1e6..6749287db2 100644 --- a/libs/server/src/lib/telemetry/index.ts +++ b/libs/utils/src/lib/telemetry/index.ts @@ -1,2 +1,2 @@ export * from './telemetry'; -export * from './init' +export * from './init'; diff --git a/libs/server/src/lib/telemetry/init.ts b/libs/utils/src/lib/telemetry/init.ts similarity index 100% rename from libs/server/src/lib/telemetry/init.ts rename to libs/utils/src/lib/telemetry/init.ts diff --git a/libs/server/src/lib/telemetry/message-builder.ts b/libs/utils/src/lib/telemetry/message-builder.ts similarity index 100% rename from libs/server/src/lib/telemetry/message-builder.ts rename to libs/utils/src/lib/telemetry/message-builder.ts diff --git a/libs/server/src/lib/telemetry/record.ts b/libs/utils/src/lib/telemetry/record.ts similarity index 100% rename from libs/server/src/lib/telemetry/record.ts rename to libs/utils/src/lib/telemetry/record.ts diff --git a/libs/server/src/lib/telemetry/sink.ts b/libs/utils/src/lib/telemetry/sink.ts similarity index 100% rename from libs/server/src/lib/telemetry/sink.ts rename to libs/utils/src/lib/telemetry/sink.ts diff --git a/libs/server/src/lib/telemetry/sinks/google-analytics-sink.ts b/libs/utils/src/lib/telemetry/sinks/google-analytics-sink.ts similarity index 100% rename from libs/server/src/lib/telemetry/sinks/google-analytics-sink.ts rename to libs/utils/src/lib/telemetry/sinks/google-analytics-sink.ts diff --git a/libs/server/src/lib/telemetry/sinks/index.ts b/libs/utils/src/lib/telemetry/sinks/index.ts similarity index 100% rename from libs/server/src/lib/telemetry/sinks/index.ts rename to libs/utils/src/lib/telemetry/sinks/index.ts diff --git a/libs/server/src/lib/telemetry/sinks/logger-sink.spec.ts b/libs/utils/src/lib/telemetry/sinks/logger-sink.spec.ts similarity index 100% rename from libs/server/src/lib/telemetry/sinks/logger-sink.spec.ts rename to libs/utils/src/lib/telemetry/sinks/logger-sink.spec.ts diff --git a/libs/server/src/lib/telemetry/sinks/logger-sink.ts b/libs/utils/src/lib/telemetry/sinks/logger-sink.ts similarity index 100% rename from libs/server/src/lib/telemetry/sinks/logger-sink.ts rename to libs/utils/src/lib/telemetry/sinks/logger-sink.ts diff --git a/libs/server/src/lib/telemetry/sinks/memory-sink.spec.ts b/libs/utils/src/lib/telemetry/sinks/memory-sink.spec.ts similarity index 100% rename from libs/server/src/lib/telemetry/sinks/memory-sink.spec.ts rename to libs/utils/src/lib/telemetry/sinks/memory-sink.spec.ts diff --git a/libs/server/src/lib/telemetry/sinks/memory-sink.ts b/libs/utils/src/lib/telemetry/sinks/memory-sink.ts similarity index 100% rename from libs/server/src/lib/telemetry/sinks/memory-sink.ts rename to libs/utils/src/lib/telemetry/sinks/memory-sink.ts diff --git a/libs/server/src/lib/telemetry/sinks/telemetry-parameters.ts b/libs/utils/src/lib/telemetry/sinks/telemetry-parameters.ts similarity index 100% rename from libs/server/src/lib/telemetry/sinks/telemetry-parameters.ts rename to libs/utils/src/lib/telemetry/sinks/telemetry-parameters.ts diff --git a/libs/server/src/lib/telemetry/telemetry.spec.ts b/libs/utils/src/lib/telemetry/telemetry.spec.ts similarity index 100% rename from libs/server/src/lib/telemetry/telemetry.spec.ts rename to libs/utils/src/lib/telemetry/telemetry.spec.ts diff --git a/libs/server/src/lib/telemetry/telemetry.ts b/libs/utils/src/lib/telemetry/telemetry.ts similarity index 100% rename from libs/server/src/lib/telemetry/telemetry.ts rename to libs/utils/src/lib/telemetry/telemetry.ts diff --git a/libs/server/src/lib/telemetry/user.spec.ts b/libs/utils/src/lib/telemetry/user.spec.ts similarity index 100% rename from libs/server/src/lib/telemetry/user.spec.ts rename to libs/utils/src/lib/telemetry/user.spec.ts diff --git a/libs/server/src/lib/telemetry/user.ts b/libs/utils/src/lib/telemetry/user.ts similarity index 100% rename from libs/server/src/lib/telemetry/user.ts rename to libs/utils/src/lib/telemetry/user.ts diff --git a/libs/server/src/lib/utils/build-project-path.ts b/libs/utils/src/lib/utils/build-project-path.ts similarity index 93% rename from libs/server/src/lib/utils/build-project-path.ts rename to libs/utils/src/lib/utils/build-project-path.ts index 7bb20ff097..58eb15aaa5 100644 --- a/libs/server/src/lib/utils/build-project-path.ts +++ b/libs/utils/src/lib/utils/build-project-path.ts @@ -1,5 +1,5 @@ import { join } from 'path'; -import { fileExists } from './utils'; +import { fileExists } from '@nx-console/file-system'; /** * Builds the project path from the given project name. diff --git a/libs/server/src/lib/utils/find-config.ts b/libs/utils/src/lib/utils/find-config.ts similarity index 100% rename from libs/server/src/lib/utils/find-config.ts rename to libs/utils/src/lib/utils/find-config.ts diff --git a/libs/server/src/lib/utils/output-channel.ts b/libs/utils/src/lib/utils/output-channel.ts similarity index 100% rename from libs/server/src/lib/utils/output-channel.ts rename to libs/utils/src/lib/utils/output-channel.ts diff --git a/libs/server/src/lib/utils/read-projects.ts b/libs/utils/src/lib/utils/read-projects.ts similarity index 94% rename from libs/server/src/lib/utils/read-projects.ts rename to libs/utils/src/lib/utils/read-projects.ts index c53e7f7efe..84d5ce5891 100644 --- a/libs/server/src/lib/utils/read-projects.ts +++ b/libs/utils/src/lib/utils/read-projects.ts @@ -7,14 +7,12 @@ import { import * as path from 'path'; import { TargetConfiguration as NxTargetConfiguration } from '@nrwl/devkit'; -import { - getPrimitiveValue, - normalizeSchema, - readAndCacheJsonFile, -} from '../utils/utils'; +import { getPrimitiveValue } from './utils'; import { getTelemetry } from '../telemetry'; import { getOutputChannel } from './output-channel'; import { workspaceDependencyPath } from '@nx-console/npm'; +import { readAndCacheJsonFile } from '@nx-console/file-system'; +import { normalizeSchema } from '@nx-console/schema/normalize'; export function readTargetDef( targetName: string, diff --git a/libs/server/src/lib/utils/shell-execution.ts b/libs/utils/src/lib/utils/shell-execution.ts similarity index 100% rename from libs/server/src/lib/utils/shell-execution.ts rename to libs/utils/src/lib/utils/shell-execution.ts diff --git a/libs/utils/src/lib/utils/utils.ts b/libs/utils/src/lib/utils/utils.ts new file mode 100644 index 0000000000..a65b19d478 --- /dev/null +++ b/libs/utils/src/lib/utils/utils.ts @@ -0,0 +1,29 @@ +import type { + NxJsonConfiguration, + WorkspaceJsonConfiguration, +} from '@nrwl/devkit'; +import { toNewFormat } from 'nx/src/config/workspaces'; + +export function getPrimitiveValue(value: any): string | undefined { + if ( + typeof value === 'string' || + typeof value === 'number' || + typeof value === 'boolean' + ) { + return value.toString(); + } else { + return undefined; + } +} + +export function toWorkspaceFormat( + w: any +): WorkspaceJsonConfiguration & NxJsonConfiguration { + const newFormat = toNewFormat(w) as WorkspaceJsonConfiguration & + NxJsonConfiguration; + const sortedProjects = Object.entries(newFormat.projects || {}).sort( + (projectA, projectB) => projectA[0].localeCompare(projectB[0]) + ); + newFormat.projects = Object.fromEntries(sortedProjects); + return newFormat; +} diff --git a/libs/server/src/lib/utils/watch-file.ts b/libs/utils/src/lib/utils/watch-file.ts similarity index 100% rename from libs/server/src/lib/utils/watch-file.ts rename to libs/utils/src/lib/utils/watch-file.ts diff --git a/libs/server/tsconfig.json b/libs/utils/tsconfig.json similarity index 100% rename from libs/server/tsconfig.json rename to libs/utils/tsconfig.json diff --git a/libs/vscode/json-schema/tsconfig.lib.json b/libs/utils/tsconfig.lib.json similarity index 85% rename from libs/vscode/json-schema/tsconfig.lib.json rename to libs/utils/tsconfig.lib.json index ff64bb51cf..5c589aef9e 100644 --- a/libs/vscode/json-schema/tsconfig.lib.json +++ b/libs/utils/tsconfig.lib.json @@ -2,7 +2,7 @@ "extends": "./tsconfig.json", "compilerOptions": { "module": "commonjs", - "outDir": "../../../dist/out-tsc", + "outDir": "../../dist/out-tsc", "declaration": true, "types": ["node"] }, diff --git a/libs/utils/tsconfig.spec.json b/libs/utils/tsconfig.spec.json new file mode 100644 index 0000000000..148da8555f --- /dev/null +++ b/libs/utils/tsconfig.spec.json @@ -0,0 +1,9 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "outDir": "../../dist/out-tsc", + "module": "commonjs", + "types": ["jest", "node"] + }, + "include": ["**/*.spec.ts", "**/*.test.ts", "**/*.d.ts", "jest.config.ts"] +} diff --git a/libs/vscode/json-schema/README.md b/libs/vscode/json-schema/README.md deleted file mode 100644 index a4c92ccd9f..0000000000 --- a/libs/vscode/json-schema/README.md +++ /dev/null @@ -1,7 +0,0 @@ -# vscode-json-schema - -This library was generated with [Nx](https://nx.dev). - -## Running unit tests - -Run `nx test vscode-json-schema` to execute the unit tests via [Jest](https://jestjs.io). diff --git a/libs/vscode/json-schema/package.json b/libs/vscode/json-schema/package.json deleted file mode 100644 index 803d8c9849..0000000000 --- a/libs/vscode/json-schema/package.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "name": "@nx-console/vscode/json-schema", - "version": "0.0.1" -} diff --git a/libs/vscode/json-schema/src/lib/project-json-schema.ts b/libs/vscode/json-schema/src/lib/project-json-schema.ts deleted file mode 100644 index fc40e0107a..0000000000 --- a/libs/vscode/json-schema/src/lib/project-json-schema.ts +++ /dev/null @@ -1,150 +0,0 @@ -import { CollectionInfo } from '@nx-console/schema'; -import { getExecutors, watchFile } from '@nx-console/server'; -import { WorkspaceConfigurationStore } from '@nx-console/vscode/configuration'; -import { nxWorkspace } from '@nx-console/vscode/nx-workspace'; -import { join } from 'path'; -import * as vscode from 'vscode'; - -let FILE_WATCHER: vscode.FileSystemWatcher; - -export class ProjectJsonSchema { - constructor(context: vscode.ExtensionContext) { - const workspacePath = WorkspaceConfigurationStore.instance.get( - 'nxWorkspacePath', - '' - ); - - if (FILE_WATCHER) { - FILE_WATCHER.dispose(); - } - - /** - * Whenever a new package is added to the package.json, we recreate the schema. - * This allows newly added plugins to be added - */ - FILE_WATCHER = watchFile(join(workspacePath, 'package.json'), () => { - this.setupSchema(workspacePath, context.extensionUri, true); - }); - context.subscriptions.push(FILE_WATCHER); - - this.setupSchema(workspacePath, context.extensionUri); - } - - async setupSchema( - workspacePath: string, - extensionUri: vscode.Uri, - clearPackageJsonCache = false - ) { - const filePath = vscode.Uri.joinPath(extensionUri, 'project-schema.json'); - const { workspace } = await nxWorkspace(); - const collections = await getExecutors( - workspacePath, - workspace.projects, - clearPackageJsonCache - ); - const contents = getProjectJsonSchema(collections); - vscode.workspace.fs.writeFile( - filePath, - new Uint8Array(Buffer.from(contents, 'utf8')) - ); - } -} - -function getProjectJsonSchema(collections: CollectionInfo[]) { - const [builders, executors] = createBuildersAndExecutorsSchema(collections); - const contents = createJsonSchema(builders, executors); - return contents; -} - -function createBuildersAndExecutorsSchema( - collections: CollectionInfo[] -): [string, string] { - const builders = collections - .map( - (collection) => ` -{ - "if": { - "properties": { "builder": { "const": "${collection.name}" } }, - "required": ["builder"] - }, - "then": { - "properties": { - "options": { - "$ref": "${collection.path}" - }, - "configurations": { - "additionalProperties": { - "$ref": "${collection.path}", - "required": [] - } - } - } - } -} -` - ) - .join(','); - - const executors = collections - .map( - (collection) => ` -{ - "if": { - "properties": { "executor": { "const": "${collection.name}" } }, - "required": ["executor"] - }, - "then": { - "properties": { - "options": { - "$ref": "${collection.path}" - }, - "configurations": { - "additionalProperties": { - "$ref": "${collection.path}", - "required": [] - } - } - } - } -} -` - ) - .join(','); - - return [builders, executors]; -} - -function createJsonSchema(builders: string, executors: string) { - return ` - { - "title": "JSON schema for Nx projects", - "id": "https://nx.dev/project-schema", - "type": "object", - "properties": { - "targets": { - "description": "Configures all the targets which define what tasks you can run against the project", - "additionalProperties": { - "type": "object", - "properties": { - "executor": { - "description": "The function that Nx will invoke when you run this target", - "type": "string" - }, - "options": { - "type": "object" - }, - "configurations": { - "description": "provides extra sets of values that will be merged into the options map", - "additionalProperties": { - "type": "object" - } - } - }, - "allOf": [ - ${executors} - ] - } - } - } - }`; -} diff --git a/libs/vscode/json-schema/src/lib/workspace-json-schema.ts b/libs/vscode/json-schema/src/lib/workspace-json-schema.ts deleted file mode 100644 index c7d87c6bca..0000000000 --- a/libs/vscode/json-schema/src/lib/workspace-json-schema.ts +++ /dev/null @@ -1,223 +0,0 @@ -import { CollectionInfo } from '@nx-console/schema'; -import { getExecutors, watchFile } from '@nx-console/server'; -import { WorkspaceConfigurationStore } from '@nx-console/vscode/configuration'; -import { nxWorkspace } from '@nx-console/vscode/nx-workspace'; -import { dirname, join } from 'path'; -import * as vscode from 'vscode'; - -let FILE_WATCHER: vscode.FileSystemWatcher; - -export class WorkspaceJsonSchema { - constructor(context: vscode.ExtensionContext) { - const workspacePath = WorkspaceConfigurationStore.instance.get( - 'nxWorkspacePath', - '' - ); - - if (FILE_WATCHER) { - FILE_WATCHER.dispose(); - } - - /** - * Whenever a new package is added to the package.json, we recreate the schema. - * This allows newly added plugins to be added - */ - FILE_WATCHER = watchFile(join(workspacePath, 'package.json'), () => { - this.setupSchema(workspacePath, context.extensionUri, true); - }); - context.subscriptions.push(FILE_WATCHER); - - this.setupSchema(workspacePath, context.extensionUri); - } - - async setupSchema( - workspacePath: string, - extensionUri: vscode.Uri, - clearPackageJsonCache = false - ) { - const filePath = vscode.Uri.joinPath(extensionUri, 'workspace-schema.json'); - const { workspace } = await nxWorkspace(); - const collections = await getExecutors( - workspacePath, - workspace.projects, - clearPackageJsonCache - ); - const contents = await getWorkspaceJsonSchema(collections); - vscode.workspace.fs.writeFile( - filePath, - new Uint8Array(Buffer.from(contents, 'utf8')) - ); - } -} - -function getWorkspaceJsonSchema(collections: CollectionInfo[]) { - const [builders, executors] = createBuildersAndExecutorsSchema(collections); - const contents = createJsonSchema(builders, executors); - return contents; -} - -function createBuildersAndExecutorsSchema( - collections: CollectionInfo[] -): [string, string] { - const builders = collections - .map( - (collection) => ` -{ - "if": { - "properties": { "builder": { "const": "${collection.name}" } }, - "required": ["builder"] - }, - "then": { - "properties": { - "options": { - "$ref": "${collection.path}" - }, - "configurations": { - "additionalProperties": { - "$ref": "${collection.path}", - "required": [] - } - } - } - } -} -` - ) - .join(','); - - const executors = collections - .map( - (collection) => ` -{ - "if": { - "properties": { "executor": { "const": "${collection.name}" } }, - "required": ["executor"] - }, - "then": { - "properties": { - "options": { - "$ref": "${collection.path}" - }, - "configurations": { - "additionalProperties": { - "$ref": "${collection.path}", - "required": [] - } - } - } - } -} -` - ) - .join(','); - - return [builders, executors]; -} - -function createJsonSchema(builders: string, executors: string) { - return ` - { - "title": "JSON schema for Nx workspaces", - "id": "https://nx.dev", - "type": "object", - "properties": { - "version": { - "type": "number", - "enum": [1, 2] - } - }, - "allOf": [ - { - "if": { - "properties": { "version": { "const": 1 } }, - "required": ["version"] - }, - "then": { - "properties": { - "projects": { - "type": "object", - "additionalProperties": { - "type": "object", - "properties": { - "architect": { - "description": "Configures all the targets which define what tasks you can run against the project", - "additionalProperties": { - "type": "object", - "properties": { - "builder": { - "description": "The function that Nx will invoke when you run this architect", - "type": "string" - }, - "options": { - "type": "object" - }, - "configurations": { - "description": "provides extra sets of values that will be merged into the options map", - "additionalProperties": { - "type": "object" - } - } - }, - "allOf": [ - ${builders} - ] - } - } - } - } - } - } - } - }, - { - "if": { - "properties": { "version": { "const": 2 } }, - "required": ["version"] - }, - "then": { - "properties": { - "projects": { - "type": "object", - "additionalProperties": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "object", - "properties": { - "targets": { - "description": "Configures all the targets which define what tasks you can run against the project", - "additionalProperties": { - "type": "object", - "properties": { - "executor": { - "description": "The function that Nx will invoke when you run this target", - "type": "string" - }, - "options": { - "type": "object" - }, - "configurations": { - "description": "provides extra sets of values that will be merged into the options map", - "additionalProperties": { - "type": "object" - } - } - }, - "allOf": [ - ${executors} - ] - } - } - } - } - ] - } - } - } - } - } - ] - }`; -} diff --git a/libs/vscode/lsp-client/.babelrc b/libs/vscode/lsp-client/.babelrc new file mode 100644 index 0000000000..cf7ddd99c6 --- /dev/null +++ b/libs/vscode/lsp-client/.babelrc @@ -0,0 +1,3 @@ +{ + "presets": [["@nrwl/web/babel", { "useBuiltIns": "usage" }]] +} diff --git a/libs/vscode/json-schema/.eslintrc.json b/libs/vscode/lsp-client/.eslintrc.json similarity index 100% rename from libs/vscode/json-schema/.eslintrc.json rename to libs/vscode/lsp-client/.eslintrc.json diff --git a/libs/vscode/lsp-client/README.md b/libs/vscode/lsp-client/README.md new file mode 100644 index 0000000000..1d0151c967 --- /dev/null +++ b/libs/vscode/lsp-client/README.md @@ -0,0 +1,11 @@ +# vscode-lsp-client + +This library was generated with [Nx](https://nx.dev). + +## Running unit tests + +Run `nx test vscode-lsp-client` to execute the unit tests via [Jest](https://jestjs.io). + +## Running lint + +Run `nx lint vscode-lsp-client` to execute the lint via [ESLint](https://eslint.org/). diff --git a/libs/vscode/lsp-client/jest.config.ts b/libs/vscode/lsp-client/jest.config.ts new file mode 100644 index 0000000000..e122323b16 --- /dev/null +++ b/libs/vscode/lsp-client/jest.config.ts @@ -0,0 +1,16 @@ +/* eslint-disable */ +export default { + displayName: 'vscode-lsp-client', + preset: '../../../jest.preset.js', + globals: { + 'ts-jest': { + tsconfig: '/tsconfig.spec.json', + }, + }, + testEnvironment: 'node', + transform: { + '^.+\\.[tj]sx?$': 'ts-jest', + }, + moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx'], + coverageDirectory: '../../../coverage/libs/vscode/lsp-client', +}; diff --git a/libs/vscode/json-schema/project.json b/libs/vscode/lsp-client/project.json similarity index 55% rename from libs/vscode/json-schema/project.json rename to libs/vscode/lsp-client/project.json index efc68ef180..8da5ee7f5d 100644 --- a/libs/vscode/json-schema/project.json +++ b/libs/vscode/lsp-client/project.json @@ -1,19 +1,20 @@ { "$schema": "../../../node_modules/nx/schemas/project-schema.json", - "sourceRoot": "libs/vscode/json-schema/src", + "sourceRoot": "libs/vscode/lsp-client/src", "projectType": "library", "targets": { "lint": { "executor": "@nrwl/linter:eslint", + "outputs": ["{options.outputFile}"], "options": { - "lintFilePatterns": ["libs/vscode/json-schema/**/*.ts"] + "lintFilePatterns": ["libs/vscode/lsp-client/**/*.ts"] } }, "test": { "executor": "@nrwl/jest:jest", - "outputs": ["coverage/libs/vscode/json-schema"], + "outputs": ["coverage/libs/vscode/lsp-client"], "options": { - "jestConfig": "libs/vscode/json-schema/jest.config.ts", + "jestConfig": "libs/vscode/lsp-client/jest.config.ts", "passWithNoTests": true } } diff --git a/libs/vscode/lsp-client/src/index.ts b/libs/vscode/lsp-client/src/index.ts new file mode 100644 index 0000000000..f72d777ac7 --- /dev/null +++ b/libs/vscode/lsp-client/src/index.ts @@ -0,0 +1 @@ +export * from './lib/configure-lsp-client'; diff --git a/libs/vscode/lsp-client/src/lib/configure-lsp-client.ts b/libs/vscode/lsp-client/src/lib/configure-lsp-client.ts new file mode 100644 index 0000000000..6a029dbe2f --- /dev/null +++ b/libs/vscode/lsp-client/src/lib/configure-lsp-client.ts @@ -0,0 +1,64 @@ +import { nxWorkspace } from '@nx-console/vscode/nx-workspace'; +import { join } from 'path'; +import { Disposable, ExtensionContext } from 'vscode'; +import { + LanguageClient, + LanguageClientOptions, + ServerOptions, + TransportKind, +} from 'vscode-languageclient/node'; + +let client: LanguageClient; + +export async function configureLspClient( + context: ExtensionContext +): Promise { + const { workspacePath, workspace } = await nxWorkspace(); + + const serverModule = context.asAbsolutePath(join('nxls', 'main.js')); + + const debugOptions = { execArgv: ['--nolazy', '--inspect=6009'] }; + const serverOptions: ServerOptions = { + run: { module: serverModule, transport: TransportKind.ipc }, + + debug: { + module: serverModule, + transport: TransportKind.ipc, + options: debugOptions, + }, + }; + + // Options to control the language client + const clientOptions: LanguageClientOptions = { + // Register the server for plain text documents + initializationOptions: { + workspacePath, + projects: workspace.projects, + }, + documentSelector: [ + { scheme: 'file', language: 'json', pattern: '**/nx.json' }, + { scheme: 'file', language: 'json', pattern: '**/project.json' }, + { scheme: 'file', language: 'json', pattern: '**/workspace.json' }, + ], + synchronize: {}, + }; + + client = new LanguageClient( + 'NxConsoleClient', + 'Nx Console Client', + serverOptions, + clientOptions + ); + + client.start(); + + return { + dispose() { + if (!client) { + return; + } + + return client.stop(); + }, + }; +} diff --git a/libs/vscode/json-schema/tsconfig.json b/libs/vscode/lsp-client/tsconfig.json similarity index 100% rename from libs/vscode/json-schema/tsconfig.json rename to libs/vscode/lsp-client/tsconfig.json diff --git a/libs/vscode/lsp-client/tsconfig.lib.json b/libs/vscode/lsp-client/tsconfig.lib.json new file mode 100644 index 0000000000..a80995bf42 --- /dev/null +++ b/libs/vscode/lsp-client/tsconfig.lib.json @@ -0,0 +1,11 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "module": "commonjs", + "outDir": "../../../dist/out-tsc", + "declaration": true, + "types": ["node"] + }, + "exclude": ["jest.config.ts", "**/*.spec.ts", "**/*.test.ts"], + "include": ["**/*.ts"] +} diff --git a/libs/vscode/json-schema/tsconfig.spec.json b/libs/vscode/lsp-client/tsconfig.spec.json similarity index 90% rename from libs/vscode/json-schema/tsconfig.spec.json rename to libs/vscode/lsp-client/tsconfig.spec.json index e1535ba9d0..0be00e2681 100644 --- a/libs/vscode/json-schema/tsconfig.spec.json +++ b/libs/vscode/lsp-client/tsconfig.spec.json @@ -6,15 +6,15 @@ "types": ["jest", "node"] }, "include": [ - "**/*.spec.ts", + "jest.config.ts", "**/*.test.ts", - "**/*.spec.tsx", + "**/*.spec.ts", "**/*.test.tsx", - "**/*.spec.js", + "**/*.spec.tsx", "**/*.test.js", - "**/*.spec.jsx", + "**/*.spec.js", "**/*.test.jsx", - "**/*.d.ts", - "jest.config.ts" + "**/*.spec.jsx", + "**/*.d.ts" ] } diff --git a/libs/vscode/nx-commands-view/src/lib/nx-commands-provider.ts b/libs/vscode/nx-commands-view/src/lib/nx-commands-provider.ts index 7369d1c354..a6ca80ec30 100644 --- a/libs/vscode/nx-commands-view/src/lib/nx-commands-provider.ts +++ b/libs/vscode/nx-commands-view/src/lib/nx-commands-provider.ts @@ -1,4 +1,4 @@ -import { AbstractTreeProvider } from '@nx-console/server'; +import { AbstractTreeProvider } from '@nx-console/utils'; import { NxCommandsTreeItem } from './nx-commands-tree-item'; import { ExtensionContext } from 'vscode'; diff --git a/libs/vscode/nx-conversion/src/lib/vscode-nx-conversion.ts b/libs/vscode/nx-conversion/src/lib/vscode-nx-conversion.ts index 8e22aac8e3..8220590b23 100644 --- a/libs/vscode/nx-conversion/src/lib/vscode-nx-conversion.ts +++ b/libs/vscode/nx-conversion/src/lib/vscode-nx-conversion.ts @@ -1,4 +1,4 @@ -import { getShellExecutionForConfig, getTelemetry } from '@nx-console/server'; +import { getShellExecutionForConfig, getTelemetry } from '@nx-console/utils'; import { WorkspaceConfigurationStore } from '@nx-console/vscode/configuration'; import { pipe, Subject } from 'rxjs'; import { filter, scan, tap } from 'rxjs/operators'; diff --git a/libs/vscode/nx-project-view/src/lib/nx-project-tree-provider.ts b/libs/vscode/nx-project-view/src/lib/nx-project-tree-provider.ts index 132575da34..9dcb1a55ca 100644 --- a/libs/vscode/nx-project-view/src/lib/nx-project-tree-provider.ts +++ b/libs/vscode/nx-project-view/src/lib/nx-project-tree-provider.ts @@ -1,8 +1,4 @@ -import { - AbstractTreeProvider, - clearJsonCache, - getOutputChannel, -} from '@nx-console/server'; +import { AbstractTreeProvider, getOutputChannel } from '@nx-console/utils'; import { WorkspaceConfigurationStore } from '@nx-console/vscode/configuration'; import { revealNxProject } from '@nx-console/vscode/nx-workspace'; import { CliTaskProvider } from '@nx-console/vscode/tasks'; @@ -14,6 +10,7 @@ import { Uri, } from 'vscode'; import { NxProject, NxProjectTreeItem } from './nx-project-tree-item'; +import { clearJsonCache } from '@nx-console/file-system'; /** * Provides data for the "Projects" tree view diff --git a/libs/vscode/nx-run-target-view/src/lib/run-target-tree-provider.ts b/libs/vscode/nx-run-target-view/src/lib/run-target-tree-provider.ts index ea1030b3b3..ecc6da3159 100644 --- a/libs/vscode/nx-run-target-view/src/lib/run-target-tree-provider.ts +++ b/libs/vscode/nx-run-target-view/src/lib/run-target-tree-provider.ts @@ -1,8 +1,9 @@ -import { AbstractTreeProvider, clearJsonCache } from '@nx-console/server'; +import { AbstractTreeProvider } from '@nx-console/utils'; import { WorkspaceConfigurationStore } from '@nx-console/vscode/configuration'; import { join } from 'path'; import { commands, ExtensionContext, TreeItem } from 'vscode'; import { commandList, RunTargetTreeItem } from './run-target-tree-item'; +import { clearJsonCache } from '@nx-console/file-system'; const SCANNING_FOR_WORKSPACE = new TreeItem( 'Scanning for your Nx Workspace...' diff --git a/libs/vscode/nx-workspace/src/index.ts b/libs/vscode/nx-workspace/src/index.ts index 3054cef12c..6a1d080c6e 100644 --- a/libs/vscode/nx-workspace/src/index.ts +++ b/libs/vscode/nx-workspace/src/index.ts @@ -2,5 +2,4 @@ export * from './lib/find-workspace-json-target'; export * from './lib/reveal-workspace-json'; export * from './lib/workspace-codelens-provider'; export * from './lib/nx-workspace'; -export * from './lib/nx-version'; export * from './lib/find-project-with-path'; diff --git a/libs/vscode/nx-workspace/src/lib/get-nx-workspace-config.ts b/libs/vscode/nx-workspace/src/lib/get-nx-workspace-config.ts index 9634995857..735f10dfe2 100644 --- a/libs/vscode/nx-workspace/src/lib/get-nx-workspace-config.ts +++ b/libs/vscode/nx-workspace/src/lib/get-nx-workspace-config.ts @@ -3,13 +3,13 @@ import type { ProjectGraph, ProjectsConfigurations, } from '@nrwl/devkit'; -import { readAndCacheJsonFile } from '@nx-console/server'; import { join } from 'path'; import { getNxProjectGraph, getNxWorkspacePackageFileUtils, } from './get-nx-workspace-package'; -import { nxVersion } from './nx-version'; +import { readAndCacheJsonFile } from '@nx-console/file-system'; +import { nxVersion } from '@nx-console/npm'; export type NxWorkspaceConfiguration = ProjectsConfigurations & NxJsonConfiguration; @@ -24,17 +24,17 @@ export type NxWorkspaceConfiguration = ProjectsConfigurations & * */ export async function getNxWorkspaceConfig( - basedir: string, + workspacePath: string, format: 'nx' | 'angularCli', isNxWorkspace: boolean ): Promise<{ workspaceConfiguration: NxWorkspaceConfiguration; configPath: string; }> { - const version = await nxVersion(); + const version = await nxVersion(workspacePath); if (version < 12) { - return readWorkspaceConfigs(format, basedir); + return readWorkspaceConfigs(format, workspacePath); } try { @@ -48,11 +48,12 @@ export async function getNxWorkspaceConfig( try { workspaceConfiguration = nxWorkspacePackage.readWorkspaceConfig({ format, - path: basedir, + path: workspacePath, }); } catch { - workspaceConfiguration = (await readWorkspaceConfigs(format, basedir)) - .workspaceConfiguration; + workspaceConfiguration = ( + await readWorkspaceConfigs(format, workspacePath) + ).workspaceConfiguration; } let projectGraph: ProjectGraph | null = null; @@ -74,10 +75,10 @@ export async function getNxWorkspaceConfig( return { workspaceConfiguration, - configPath: join(basedir, configFile), + configPath: join(workspacePath, configFile), }; } catch (e) { - return readWorkspaceConfigs(format, basedir); + return readWorkspaceConfigs(format, workspacePath); } } diff --git a/libs/vscode/nx-workspace/src/lib/get-nx-workspace-package.ts b/libs/vscode/nx-workspace/src/lib/get-nx-workspace-package.ts index a69d1f8244..3f71069656 100644 --- a/libs/vscode/nx-workspace/src/lib/get-nx-workspace-package.ts +++ b/libs/vscode/nx-workspace/src/lib/get-nx-workspace-package.ts @@ -1,10 +1,10 @@ -import { workspaceDependencyPath } from '@nx-console/npm'; -import { fileExists, getOutputChannel } from '@nx-console/server'; +import { getOutputChannel } from '@nx-console/utils'; import { WorkspaceConfigurationStore } from '@nx-console/vscode/configuration'; import type * as NxFileUtils from 'nx/src/project-graph/file-utils'; import type * as NxProjectGraph from 'nx/src/project-graph/project-graph'; import { platform } from 'os'; import { join } from 'path'; +import { findNxPackagePath } from '@nx-console/npm'; declare function __non_webpack_require__(importPath: string): any; @@ -97,36 +97,3 @@ ${error} return backupPackage; } } - -/** - * Finds the local Nx package in the workspace. - * - * It will try to look for the `nx` package, with the specific file. If it does not exist, it will try to look for the `@nrwl/workspace` package, with the specific file - * @param workspacePath - * @returns - */ -export async function findNxPackagePath( - workspacePath: string, - filePath: string -): Promise { - const buildPath = (base: string) => join(base, filePath); - - const nxWorkspaceDepPath = await workspaceDependencyPath(workspacePath, 'nx'); - if (nxWorkspaceDepPath) { - const path = buildPath(nxWorkspaceDepPath); - if (await fileExists(path)) { - return path; - } - } - - const nrwlWorkspaceDepPath = await workspaceDependencyPath( - workspacePath, - '@nrwl/workspace' - ); - if (nrwlWorkspaceDepPath) { - const path = buildPath(nrwlWorkspaceDepPath); - if (await fileExists(path)) { - return path; - } - } -} diff --git a/libs/vscode/nx-workspace/src/lib/nx-workspace.spec.ts b/libs/vscode/nx-workspace/src/lib/nx-workspace.spec.ts index 86829931d6..993ea9bae3 100644 --- a/libs/vscode/nx-workspace/src/lib/nx-workspace.spec.ts +++ b/libs/vscode/nx-workspace/src/lib/nx-workspace.spec.ts @@ -1,8 +1,8 @@ import { nxWorkspace } from './nx-workspace'; import { WorkspaceConfigurationStore } from '@nx-console/vscode/configuration'; -import * as server from '@nx-console/server'; -import { getOutputChannel, getTelemetry, fileExists } from '@nx-console/server'; -import { mocked } from 'ts-jest/utils'; +import * as server from '@nx-console/utils'; +import { getOutputChannel, getTelemetry } from '@nx-console/utils'; +import { mocked } from 'jest-mock'; import type { NxJsonConfiguration, WorkspaceJsonConfiguration, @@ -11,6 +11,7 @@ import * as vscode from 'vscode'; import type { AsyncReturnType } from 'type-fest'; import { getNxWorkspaceConfig } from './get-nx-workspace-config'; + jest.mock('./get-nx-workspace-config', () => { const originalModule = jest.requireActual('./get-nx-workspace-config'); return { @@ -27,19 +28,19 @@ jest.mock('./get-nx-workspace-config', () => { }); const getNxWorkspaceConfigMock = mocked(getNxWorkspaceConfig); -const mockFileExistsFn = fileExists as jest.MockedFunction< - typeof server.fileExists ->; -mockFileExistsFn.mockImplementation(async () => false); +import * as fs from '@nx-console/file-system'; +jest.mock('@nx-console/file-system', (): Partial => { + const original = jest.requireActual('@nx-console/file-system'); + return { + ...original, + fileExists: jest.fn(() => Promise.resolve(true)), + }; +}); const mockStoreInstanceGetFn = WorkspaceConfigurationStore.instance .get as jest.MockedFunction; mockStoreInstanceGetFn.mockImplementation(() => workspacePath); -const originalNxConsoleServerModule = jest.requireActual('@nx-console/server'); -(server.toWorkspaceFormat as unknown) = - originalNxConsoleServerModule.toWorkspaceFormat; - const mockWorkspace: WorkspaceJsonConfiguration & NxJsonConfiguration = { version: 2, npmScope: '@test', @@ -103,7 +104,6 @@ xdescribe('verifyWorkspace', () => { describe('when Ng workspace exists', () => { it('returns information about Ng workspace', async () => { // arrange - mockFileExistsFn.mockImplementationOnce(async () => true); getNxWorkspaceConfigMock.mockImplementationOnce(async () => { return { workspaceConfiguration: mockWorkspace, diff --git a/libs/vscode/nx-workspace/src/lib/nx-workspace.ts b/libs/vscode/nx-workspace/src/lib/nx-workspace.ts index f58f5b3536..9283afe0d1 100644 --- a/libs/vscode/nx-workspace/src/lib/nx-workspace.ts +++ b/libs/vscode/nx-workspace/src/lib/nx-workspace.ts @@ -1,11 +1,9 @@ import { checkIsNxWorkspace, - clearJsonCache, - fileExists, getOutputChannel, getTelemetry, toWorkspaceFormat, -} from '@nx-console/server'; +} from '@nx-console/utils'; import { WorkspaceConfigurationStore } from '@nx-console/vscode/configuration'; import { join } from 'path'; import { @@ -22,6 +20,7 @@ import { getNxWorkspaceConfig, NxWorkspaceConfiguration, } from './get-nx-workspace-config'; +import { clearJsonCache, fileExists } from '@nx-console/file-system'; interface NxWorkspace { validWorkspaceJson: boolean; diff --git a/libs/vscode/nx-workspace/src/lib/reveal-workspace-json.ts b/libs/vscode/nx-workspace/src/lib/reveal-workspace-json.ts index 44fa8e46dc..bc026b5dcf 100644 --- a/libs/vscode/nx-workspace/src/lib/reveal-workspace-json.ts +++ b/libs/vscode/nx-workspace/src/lib/reveal-workspace-json.ts @@ -1,9 +1,10 @@ -import { buildProjectPath, fileExists } from '@nx-console/server'; +import { buildProjectPath } from '@nx-console/utils'; import { WorkspaceConfigurationStore } from '@nx-console/vscode/configuration'; import { join } from 'path'; import { Selection, TextDocument, Uri, window, workspace } from 'vscode'; import { getProjectLocations } from './find-workspace-json-target'; +import { fileExists } from '@nx-console/file-system'; export async function revealNxProject( projectName: string, diff --git a/libs/vscode/nx-workspace/src/lib/workspace-codelens-provider.ts b/libs/vscode/nx-workspace/src/lib/workspace-codelens-provider.ts index 90e797f6bd..e3f577763a 100644 --- a/libs/vscode/nx-workspace/src/lib/workspace-codelens-provider.ts +++ b/libs/vscode/nx-workspace/src/lib/workspace-codelens-provider.ts @@ -20,7 +20,7 @@ import { GlobalConfigurationStore, WorkspaceConfigurationStore, } from '@nx-console/vscode/configuration'; -import { buildProjectPath } from '@nx-console/server'; +import { buildProjectPath } from '@nx-console/utils'; export class TargetCodeLens extends CodeLens { constructor( diff --git a/libs/vscode/project-graph/src/lib/create-project-graph.ts b/libs/vscode/project-graph/src/lib/create-project-graph.ts index addeeccd05..3de3605ae2 100644 --- a/libs/vscode/project-graph/src/lib/create-project-graph.ts +++ b/libs/vscode/project-graph/src/lib/create-project-graph.ts @@ -1,5 +1,5 @@ import { detectPackageManager, getPackageManagerCommand } from '@nrwl/devkit'; -import { getOutputChannel } from '@nx-console/server'; +import { getOutputChannel } from '@nx-console/utils'; import { WorkspaceConfigurationStore } from '@nx-console/vscode/configuration'; import { execSync } from 'child_process'; import * as cacheDir from 'find-cache-dir'; diff --git a/libs/vscode/tasks/src/lib/cli-task-commands.ts b/libs/vscode/tasks/src/lib/cli-task-commands.ts index 91cf6b4fae..88c6a8917b 100644 --- a/libs/vscode/tasks/src/lib/cli-task-commands.ts +++ b/libs/vscode/tasks/src/lib/cli-task-commands.ts @@ -1,19 +1,19 @@ -import { commands, ExtensionContext, window, Uri } from 'vscode'; +import { commands, ExtensionContext, Uri, window } from 'vscode'; +import { WorkspaceJsonConfiguration } from '@nrwl/devkit'; +import { getGenerators } from '@nx-console/collections'; +import { nxVersion } from '@nx-console/npm'; +import { GeneratorType, Option, OptionType } from '@nx-console/schema'; +import { RunTargetTreeItem } from '@nx-console/vscode/nx-run-target-view'; import { findProjectWithPath, - nxVersion, nxWorkspace, } from '@nx-console/vscode/nx-workspace'; import { verifyBuilderDefinition } from '@nx-console/vscode/verify'; -import { RunTargetTreeItem } from '@nx-console/vscode/nx-run-target-view'; import { CliTaskProvider } from './cli-task-provider'; import { CliTaskQuickPickItem } from './cli-task-quick-pick-item'; import { selectFlags } from './select-flags'; -import { GeneratorType, Option, OptionType } from '@nx-console/schema'; -import { WorkspaceJsonConfiguration } from '@nrwl/devkit'; import { selectGenerator } from './select-generator'; -import { getGenerators } from '@nx-console/server'; const CLI_COMMAND_LIST = [ 'build', @@ -75,8 +75,8 @@ export function registerCliTaskCommands( /** * move and remove were release in patch 8.11 */ - const version = await nxVersion(); - if (version && version >= 8) { + const version = await nxVersion(cliTaskProvider.getWorkspacePath()); + if (version >= 8) { commands.registerCommand(`${cli}.move.fileexplorer`, async (uri: Uri) => { /** * Bit of a hack - always runs angular/move if it is installed. diff --git a/libs/vscode/tasks/src/lib/cli-task-provider.ts b/libs/vscode/tasks/src/lib/cli-task-provider.ts index 169b8bd64d..89ee09d0ff 100644 --- a/libs/vscode/tasks/src/lib/cli-task-provider.ts +++ b/libs/vscode/tasks/src/lib/cli-task-provider.ts @@ -3,7 +3,7 @@ import { WorkspaceProjects, WORKSPACE_GENERATOR_NAME_REGEX, } from '@nx-console/schema'; -import { getTelemetry } from '@nx-console/server'; +import { getTelemetry } from '@nx-console/utils'; import { WorkspaceConfigurationStore } from '@nx-console/vscode/configuration'; import { NxConversion } from '@nx-console/vscode/nx-conversion'; import { nxWorkspace } from '@nx-console/vscode/nx-workspace'; diff --git a/libs/vscode/tasks/src/lib/cli-task.ts b/libs/vscode/tasks/src/lib/cli-task.ts index 2906b44686..02149c2376 100644 --- a/libs/vscode/tasks/src/lib/cli-task.ts +++ b/libs/vscode/tasks/src/lib/cli-task.ts @@ -1,7 +1,7 @@ import { checkIsNxWorkspace, getShellExecutionForConfig, -} from '@nx-console/server'; +} from '@nx-console/utils'; import { Task, TaskGroup, TaskScope } from 'vscode'; import { CliTaskDefinition } from './cli-task-definition'; diff --git a/libs/vscode/tasks/src/lib/nx-task-commands.ts b/libs/vscode/tasks/src/lib/nx-task-commands.ts index a81f0ba32e..8fd43ab2b6 100644 --- a/libs/vscode/tasks/src/lib/nx-task-commands.ts +++ b/libs/vscode/tasks/src/lib/nx-task-commands.ts @@ -4,7 +4,7 @@ import { commands, ExtensionContext, window, tasks } from 'vscode'; import { CliTaskProvider } from './cli-task-provider'; import { selectFlags } from './select-flags'; import { nxWorkspace } from '@nx-console/vscode/nx-workspace'; -import { getTelemetry } from '@nx-console/server'; +import { getTelemetry } from '@nx-console/utils'; import { NxTask } from './nx-task'; let cliTaskProvider: CliTaskProvider; diff --git a/libs/vscode/tasks/src/lib/nx-task.ts b/libs/vscode/tasks/src/lib/nx-task.ts index 3d734cafdb..48e8754271 100644 --- a/libs/vscode/tasks/src/lib/nx-task.ts +++ b/libs/vscode/tasks/src/lib/nx-task.ts @@ -1,4 +1,4 @@ -import { getShellExecutionForConfig } from '@nx-console/server'; +import { getShellExecutionForConfig } from '@nx-console/utils'; import { Task, TaskScope } from 'vscode'; export interface NxTaskDefinition { diff --git a/libs/vscode/tasks/src/lib/select-generator.ts b/libs/vscode/tasks/src/lib/select-generator.ts index 5887d1cd68..48cae8a446 100644 --- a/libs/vscode/tasks/src/lib/select-generator.ts +++ b/libs/vscode/tasks/src/lib/select-generator.ts @@ -4,14 +4,12 @@ import { Option, TaskExecutionSchema, } from '@nx-console/schema'; -import { - getGenerators, - normalizeSchema, - readAndCacheJsonFile, -} from '@nx-console/server'; import { GlobalConfigurationStore } from '@nx-console/vscode/configuration'; import { nxWorkspace } from '@nx-console/vscode/nx-workspace'; import { QuickPickItem, window } from 'vscode'; +import { readAndCacheJsonFile } from '@nx-console/file-system'; +import { getGenerators } from '@nx-console/collections'; +import { normalizeSchema } from '@nx-console/schema/normalize'; async function readWorkspaceJsonDefaults(): Promise { const { workspace } = await nxWorkspace(); diff --git a/libs/vscode/verify/src/lib/verify-builder-definition.ts b/libs/vscode/verify/src/lib/verify-builder-definition.ts index 6d3a0058f5..aaece7391f 100644 --- a/libs/vscode/verify/src/lib/verify-builder-definition.ts +++ b/libs/vscode/verify/src/lib/verify-builder-definition.ts @@ -1,13 +1,10 @@ import { Option, OptionType } from '@nx-console/schema'; import { WorkspaceJsonConfiguration } from '@nrwl/devkit'; -import { - fileExists, - getTelemetry, - readBuilderSchema, -} from '@nx-console/server'; +import { getTelemetry, readBuilderSchema } from '@nx-console/utils'; import { WorkspaceConfigurationStore } from '@nx-console/vscode/configuration'; import { join } from 'path'; import { window } from 'vscode'; +import { fileExists } from '@nx-console/file-system'; const RUN_ONE_OPTIONS = [ { diff --git a/libs/vscode/webview/src/lib/get-task-execution-schema.ts b/libs/vscode/webview/src/lib/get-task-execution-schema.ts index c676fccd65..ceb2e080f0 100644 --- a/libs/vscode/webview/src/lib/get-task-execution-schema.ts +++ b/libs/vscode/webview/src/lib/get-task-execution-schema.ts @@ -3,7 +3,7 @@ import { getOutputChannel, getTelemetry, readTargetDef, -} from '@nx-console/server'; +} from '@nx-console/utils'; import { findProjectWithPath, nxWorkspace, diff --git a/libs/vscode/webview/src/lib/webview.ts b/libs/vscode/webview/src/lib/webview.ts index 505df9c355..764a54de63 100644 --- a/libs/vscode/webview/src/lib/webview.ts +++ b/libs/vscode/webview/src/lib/webview.ts @@ -13,7 +13,7 @@ import { import { CliTaskProvider } from '@nx-console/vscode/tasks'; import { RunTargetTreeItem } from '@nx-console/vscode/nx-run-target-view'; -import { getTelemetry } from '@nx-console/server'; +import { getTelemetry } from '@nx-console/utils'; import { TaskExecutionSchema, TaskExecutionMessage } from '@nx-console/schema'; import { getTaskExecutionSchema } from './get-task-execution-schema'; import { watch } from 'fs'; diff --git a/package.json b/package.json index e4ca264978..fc81a8bea1 100644 --- a/package.json +++ b/package.json @@ -9,19 +9,24 @@ }, "license": "MIT", "scripts": { - "nx": "nx", + "nx": "export NODE_OPTIONS=--max-old-space-size=4096 && nx", "watch": "nx watch-all vscode", - "package": "export NODE_OPTIONS=--max-old-space-size=4096 && nx package vscode", + "package": "nx package vscode", "release": "standard-version", "update": "nx migrate latest" }, "dependencies": { "@monodon/typescript-nx-imports-plugin": "0.2.0", + "@nrwl/devkit": "14.4.1", "@yarnpkg/fslib": "2.6.1-rc.5", "@yarnpkg/libzip": "2.2.3-rc.5", "find-cache-dir": "^3.3.2", "jsonc-parser": "^3.0.0", + "request-light": "^0.5.8", "tslib": "^2.0.0", + "vscode-json-languageservice": "^5.1.0", + "vscode-languageclient": "^8.0.2", + "vscode-languageserver": "^8.0.2", "xstate": "^4.32.1" }, "devDependencies": { @@ -48,6 +53,11 @@ "@nrwl/nx-cloud": "14.2.0", "@nrwl/storybook": "14.4.1", "@nrwl/workspace": "14.4.1", + "@rollup/plugin-commonjs": "^22.0.2", + "@rollup/plugin-json": "^4.1.0", + "@rollup/plugin-node-resolve": "^13.3.0", + "@rollup/plugin-replace": "^4.0.0", + "@rollup/plugin-typescript": "^8.3.4", "@storybook/addon-essentials": "6.5.9", "@storybook/addon-knobs": "~6.4.0", "@storybook/angular": "6.5.9", @@ -74,6 +84,8 @@ "ovsx": "^0.3.0", "prettier": "2.7.1", "rimraf": "^3.0.2", + "rollup": "^2.77.2", + "rollup-plugin-terser": "^7.0.2", "rxjs": "~7.5.5", "standard-version": "^9.1.1", "ts-jest": "27.1.4", diff --git a/tsconfig.base.json b/tsconfig.base.json index fc9851cab5..518a2337cf 100644 --- a/tsconfig.base.json +++ b/tsconfig.base.json @@ -21,10 +21,14 @@ "baseUrl": ".", "rootDir": ".", "paths": { + "@nx-console/collections": ["libs/collections/src/index.ts"], + "@nx-console/file-system": ["libs/file-system/src/index.ts"], + "@nx-console/json-schema": ["libs/json-schema/src/index.ts"], "@nx-console/npm": ["libs/npm/src/index.ts"], "@nx-console/schema": ["libs/schema/src/index.ts"], - "@nx-console/server": ["libs/server/src/index.ts"], + "@nx-console/schema/normalize": ["libs/schema/src/normalize-schema.ts"], "@nx-console/typescript-plugin": ["libs/typescript-plugin/src/index.ts"], + "@nx-console/utils": ["libs/utils/src/index.ts"], "@nx-console/vscode-ui/argument-list": [ "libs/vscode-ui/argument-list/src/index.ts" ], @@ -37,9 +41,7 @@ "@nx-console/vscode/configuration": [ "libs/vscode/configuration/src/index.ts" ], - "@nx-console/vscode/json-schema": [ - "libs/vscode/json-schema/src/index.ts" - ], + "@nx-console/vscode/lsp-client": ["libs/vscode/lsp-client/src/index.ts"], "@nx-console/vscode/nx-commands-view": [ "libs/vscode/nx-commands-view/src/index.ts" ], diff --git a/workspace.json b/workspace.json index 12cb8f1cf2..838fb6f369 100644 --- a/workspace.json +++ b/workspace.json @@ -1,13 +1,17 @@ { "version": 2, "projects": { + "collections": "libs/collections", + "file-system": "libs/file-system", + "json-schema": "libs/json-schema", "npm": "libs/npm", + "nxls": "apps/nxls", "schema": "libs/schema", - "server": "libs/server", "typescript-plugin": "libs/typescript-plugin", + "utils": "libs/utils", "vscode": "apps/vscode", "vscode-configuration": "libs/vscode/configuration", - "vscode-json-schema": "libs/vscode/json-schema", + "vscode-lsp-client": "libs/vscode/lsp-client", "vscode-nx-commands-view": "libs/vscode/nx-commands-view", "vscode-nx-conversion": "libs/vscode/nx-conversion", "vscode-nx-project-view": "libs/vscode/nx-project-view", diff --git a/yarn.lock b/yarn.lock index 00940e7cc3..84713bb37e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -103,6 +103,18 @@ "@angular-devkit/architect" "0.1400.2" rxjs "6.6.7" +"@angular-devkit/core@13.3.9": + version "13.3.9" + resolved "https://registry.yarnpkg.com/@angular-devkit/core/-/core-13.3.9.tgz#71a662feb2c3f6f79a1f27db31cb2f7021195c77" + integrity sha512-XqCuIWyoqIsLABjV3GQL/+EiBCt3xVPPtNp3Mg4gjBsDLW7PEnvbb81yGkiZQmIsq4EIyQC/6fQa3VdjsCshGg== + dependencies: + ajv "8.9.0" + ajv-formats "2.1.1" + fast-json-stable-stringify "2.1.0" + magic-string "0.25.7" + rxjs "6.6.7" + source-map "0.7.3" + "@angular-devkit/core@14.0.2": version "14.0.2" resolved "https://registry.yarnpkg.com/@angular-devkit/core/-/core-14.0.2.tgz#47f62a57cf36a2e102188a89ae00f5e5a05d837d" @@ -125,6 +137,17 @@ ora "5.4.1" rxjs "6.6.7" +"@angular-devkit/schematics@^13.2.5": + version "13.3.9" + resolved "https://registry.yarnpkg.com/@angular-devkit/schematics/-/schematics-13.3.9.tgz#72df522e1737fb727359e60e4d7df0fd8310b2e8" + integrity sha512-oNHLNtwbtEJ0dYPPXy1NpfRdSiFsYBl7+ozJklLgNV/AEOxlSi2qlVx6DoxNVjz5XgQ7Z+eoVDMw7ewGPnGSyA== + dependencies: + "@angular-devkit/core" "13.3.9" + jsonc-parser "3.0.0" + magic-string "0.25.7" + ora "5.4.1" + rxjs "6.6.7" + "@angular-eslint/bundled-angular-compiler@14.0.0": version "14.0.0" resolved "https://registry.yarnpkg.com/@angular-eslint/bundled-angular-compiler/-/bundled-angular-compiler-14.0.0.tgz#82147b128e2a90bada7832f9098778bf80ffbf2d" @@ -3354,6 +3377,11 @@ resolved "https://registry.yarnpkg.com/@csstools/selector-specificity/-/selector-specificity-2.0.1.tgz#b6b8d81780b9a9f6459f4bfe9226ac6aefaefe87" integrity sha512-aG20vknL4/YjQF9BSV7ts4EWm/yrjagAN7OWBNmlbEOUiu0llj4OGrFoOKK3g2vey4/p2omKCoHrWtPxSwV3HA== +"@cush/relative@^1.0.0": + version "1.0.0" + resolved "https://registry.yarnpkg.com/@cush/relative/-/relative-1.0.0.tgz#8cd1769bf9bde3bb27dac356b1bc94af40f6cc16" + integrity sha512-RpfLEtTlyIxeNPGKcokS+p3BZII/Q3bYxryFRglh5H3A3T8q9fsLYm72VYAMEOOIBLEa8o93kFLiBDUWKrwXZA== + "@cypress/listr-verbose-renderer@^0.4.1": version "0.4.1" resolved "https://registry.yarnpkg.com/@cypress/listr-verbose-renderer/-/listr-verbose-renderer-0.4.1.tgz#a77492f4b11dcc7c446a34b3e28721afd33c642a" @@ -3494,6 +3522,16 @@ resolved "https://registry.yarnpkg.com/@emotion/weak-memoize/-/weak-memoize-0.2.5.tgz#8eed982e2ee6f7f4e44c253e12962980791efd46" integrity sha512-6U71C2Wp7r5XtFtQzYrW5iKFT67OixrSxjI4MptCHzdSVlgabczzqLe0ZSgnub/5Kp4hSbpDB1tMytZY9pwxxA== +"@esbuild/linux-loong64@0.14.53": + version "0.14.53" + resolved "https://registry.yarnpkg.com/@esbuild/linux-loong64/-/linux-loong64-0.14.53.tgz#251b4cd6760fadb4d68a05815e6dc5e432d69cd6" + integrity sha512-W2dAL6Bnyn4xa/QRSU3ilIK4EzD5wgYXKXJiS1HDF5vU3675qc2bvFyLwbUcdmssDveyndy7FbitrCoiV/eMLg== + +"@esbuild/linux-loong64@0.14.54": + version "0.14.54" + resolved "https://registry.yarnpkg.com/@esbuild/linux-loong64/-/linux-loong64-0.14.54.tgz#de2a4be678bd4d0d1ffbb86e6de779cde5999028" + integrity sha512-bZBrLAIX1kpWelV0XemxBZllyRmM6vgFQQG2GdNb+r3Fkp0FOh1NJSvekXDs7jq70k4euu1cryLMfU+mTXlEpw== + "@eslint/eslintrc@^1.2.3": version "1.3.0" resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-1.3.0.tgz#29f92c30bb3e771e4a2048c95fa6855392dfac4f" @@ -3805,6 +3843,14 @@ resolved "https://registry.yarnpkg.com/@jridgewell/set-array/-/set-array-1.1.1.tgz#36a6acc93987adcf0ba50c66908bd0b70de8afea" integrity sha512-Ct5MqZkLGEXTVmQYbGtx9SVqD2fqwvdubdps5D3djjAkgkKwT918VNOz65pEHFaYTeWcukmJmH5SwsA9Tn2ObQ== +"@jridgewell/source-map@^0.3.2": + version "0.3.2" + resolved "https://registry.yarnpkg.com/@jridgewell/source-map/-/source-map-0.3.2.tgz#f45351aaed4527a298512ec72f81040c998580fb" + integrity sha512-m7O9o2uR8k2ObDysZYzdfhb08VuEml5oWGiosa1VdaPZ/A6QyPkAJuwN0Q1lhULOf6B7MtQmHENS743hWtCrgw== + dependencies: + "@jridgewell/gen-mapping" "^0.3.0" + "@jridgewell/trace-mapping" "^0.3.9" + "@jridgewell/sourcemap-codec@^1.4.10": version "1.4.11" resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.11.tgz#771a1d8d744eeb71b6adb35808e1a6c7b9b8c8ec" @@ -4303,6 +4349,19 @@ magic-string "^0.25.7" resolve "^1.17.0" +"@rollup/plugin-commonjs@^22.0.2": + version "22.0.2" + resolved "https://registry.yarnpkg.com/@rollup/plugin-commonjs/-/plugin-commonjs-22.0.2.tgz#ee8ca8415cda30d383b4096aad5222435b4b69b6" + integrity sha512-//NdP6iIwPbMTcazYsiBMbJW7gfmpHom33u1beiIoHDEM0Q9clvtQB1T0efvMqHeKsGohiHo97BCPCkBXdscwg== + dependencies: + "@rollup/pluginutils" "^3.1.0" + commondir "^1.0.1" + estree-walker "^2.0.1" + glob "^7.1.6" + is-reference "^1.2.1" + magic-string "^0.25.7" + resolve "^1.17.0" + "@rollup/plugin-image@^2.1.0": version "2.1.1" resolved "https://registry.yarnpkg.com/@rollup/plugin-image/-/plugin-image-2.1.1.tgz#898d6b59ac0025d7971ef45640ab330cb0663b0c" @@ -4318,7 +4377,7 @@ dependencies: "@rollup/pluginutils" "^3.0.8" -"@rollup/plugin-node-resolve@^13.0.4": +"@rollup/plugin-node-resolve@^13.0.4", "@rollup/plugin-node-resolve@^13.3.0": version "13.3.0" resolved "https://registry.yarnpkg.com/@rollup/plugin-node-resolve/-/plugin-node-resolve-13.3.0.tgz#da1c5c5ce8316cef96a2f823d111c1e4e498801c" integrity sha512-Lus8rbUo1eEcnS4yTFKLZrVumLPY+YayBdWXgFSHYhTT2iJbMhoaaBL3xl5NCdeRytErGr8tZ0L71BMRmnlwSw== @@ -4330,6 +4389,22 @@ is-module "^1.0.0" resolve "^1.19.0" +"@rollup/plugin-replace@^4.0.0": + version "4.0.0" + resolved "https://registry.yarnpkg.com/@rollup/plugin-replace/-/plugin-replace-4.0.0.tgz#e34c457d6a285f0213359740b43f39d969b38a67" + integrity sha512-+rumQFiaNac9y64OHtkHGmdjm7us9bo1PlbgQfdihQtuNxzjpaB064HbRnewUOggLQxVCCyINfStkgmBeQpv1g== + dependencies: + "@rollup/pluginutils" "^3.1.0" + magic-string "^0.25.7" + +"@rollup/plugin-typescript@^8.3.4": + version "8.3.4" + resolved "https://registry.yarnpkg.com/@rollup/plugin-typescript/-/plugin-typescript-8.3.4.tgz#45cdc0787b658b37d0362c705d8de86bc8bc040e" + integrity sha512-wt7JnYE9antX6BOXtsxGoeVSu4dZfw0dU3xykfOQ4hC3EddxRbVG/K0xiY1Wup7QOHJcjLYXWAn0Kx9Z1SBHHg== + dependencies: + "@rollup/pluginutils" "^3.1.0" + resolve "^1.17.0" + "@rollup/pluginutils@^3.0.8", "@rollup/pluginutils@^3.1.0": version "3.1.0" resolved "https://registry.yarnpkg.com/@rollup/pluginutils/-/pluginutils-3.1.0.tgz#706b4524ee6dc8b103b3c995533e5ad680c02b9b" @@ -6615,6 +6690,16 @@ ajv@8.11.0: require-from-string "^2.0.2" uri-js "^4.2.2" +ajv@8.9.0: + version "8.9.0" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-8.9.0.tgz#738019146638824dea25edcf299dcba1b0e7eb18" + integrity sha512-qOKJyNj/h+OWx7s5DePL6Zu1KeM9jPZhwBqs+7DzP6bGOvqzVCSf0xueYmVuaC/oQ/VtS2zLMLHdQFbkka+XDQ== + dependencies: + fast-deep-equal "^3.1.1" + json-schema-traverse "^1.0.0" + require-from-string "^2.0.2" + uri-js "^4.2.2" + ajv@^6.1.0, ajv@^6.10.0, ajv@^6.10.2, ajv@^6.12.2, ajv@^6.12.3, ajv@^6.12.4, ajv@^6.12.5: version "6.12.6" resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.6.tgz#baf5a62e802b07d977034586f8c3baf5adf26df4" @@ -8446,6 +8531,11 @@ connect-history-api-fallback@^1.6.0: resolved "https://registry.yarnpkg.com/connect-history-api-fallback/-/connect-history-api-fallback-1.6.0.tgz#8b32089359308d111115d81cad3fceab888f97bc" integrity sha512-e54B99q/OUoH64zYYRf3HBP5z24G38h5D3qXu23JGRoigpX5Ss4r9ZnDk3g0Z8uQC2x2lPaJ+UlWBc1ZWBWdLg== +consola@^2.15.3: + version "2.15.3" + resolved "https://registry.yarnpkg.com/consola/-/consola-2.15.3.tgz#2e11f98d6a4be71ff72e0bdf07bd23e12cb61550" + integrity sha512-9vAdYbHj6x2fLKC4+oPH0kFzY/orMZyG2Aj+kNylHxKGJ/Ed4dpNyAQYwJOdqO4zdM7XpVHmyejQDcQHrnuXbw== + console-browserify@^1.1.0: version "1.2.0" resolved "https://registry.yarnpkg.com/console-browserify/-/console-browserify-1.2.0.tgz#67063cef57ceb6cf4993a2ab3a55840ae8c49336" @@ -9457,7 +9547,7 @@ detect-libc@^1.0.3: resolved "https://registry.yarnpkg.com/detect-libc/-/detect-libc-1.0.3.tgz#fa137c4bd698edf55cd5cd02ac559f91a4c4ba9b" integrity sha1-+hN8S9aY7fVc1c0CrFWfkaTEups= -detect-newline@^3.0.0, detect-newline@^3.1.0: +detect-newline@3.1.0, detect-newline@^3.0.0, detect-newline@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/detect-newline/-/detect-newline-3.1.0.tgz#576f5dfc63ae1a192ff192d8ad3af6308991b651" integrity sha512-TLz+x/vEXm/Y7P7wn1EJFNLxYpUD4TgMosxY6fAVJUnJMbupHBOncxyWUG9OpTaH9EBD7uFI5LfEgmMOc54DsA== @@ -9869,6 +9959,11 @@ entities@~2.0.0: resolved "https://registry.yarnpkg.com/entities/-/entities-2.0.3.tgz#5c487e5742ab93c15abb5da22759b8590ec03b7f" integrity sha512-MyoZ0jgnLvB2X3Lg5HqpFmn1kybDiIfEQmKzTb5apr51Rb+T3KdmMiqa70T+bhGnyv7bQ6WMj2QMHpGMmlrUYQ== +envinfo@^7.8.1: + version "7.8.1" + resolved "https://registry.yarnpkg.com/envinfo/-/envinfo-7.8.1.tgz#06377e3e5f4d379fea7ac592d5ad8927e0c4d475" + integrity sha512-/o+BXHmB7ocbHEAs6F2EnG0ogybVVUdkRunTT2glZU9XAaGmhqskrvKwqXuDfNjEO0LZKWdejEEpnq8aM0tOaw== + errno@^0.1.1, errno@^0.1.3, errno@~0.1.7: version "0.1.8" resolved "https://registry.yarnpkg.com/errno/-/errno-0.1.8.tgz#8bb3e9c7d463be4976ff888f76b4809ebc2e811f" @@ -9980,6 +10075,16 @@ esbuild-android-64@0.14.38: resolved "https://registry.yarnpkg.com/esbuild-android-64/-/esbuild-android-64-0.14.38.tgz#5b94a1306df31d55055f64a62ff6b763a47b7f64" integrity sha512-aRFxR3scRKkbmNuGAK+Gee3+yFxkTJO/cx83Dkyzo4CnQl/2zVSurtG6+G86EQIZ+w+VYngVyK7P3HyTBKu3nw== +esbuild-android-64@0.14.53: + version "0.14.53" + resolved "https://registry.yarnpkg.com/esbuild-android-64/-/esbuild-android-64-0.14.53.tgz#259bc3ef1399a3cad8f4f67c40ee20779c4de675" + integrity sha512-fIL93sOTnEU+NrTAVMIKiAw0YH22HWCAgg4N4Z6zov2t0kY9RAJ50zY9ZMCQ+RT6bnOfDt8gCTnt/RaSNA2yRA== + +esbuild-android-64@0.14.54: + version "0.14.54" + resolved "https://registry.yarnpkg.com/esbuild-android-64/-/esbuild-android-64-0.14.54.tgz#505f41832884313bbaffb27704b8bcaa2d8616be" + integrity sha512-Tz2++Aqqz0rJ7kYBfz+iqyE3QMycD4vk7LBRyWaAVFgFtQ/O8EJOnVmTOiDWYZ/uYzB4kvP+bqejYdVKzE5lAQ== + esbuild-android-arm64@0.14.11: version "0.14.11" resolved "https://registry.yarnpkg.com/esbuild-android-arm64/-/esbuild-android-arm64-0.14.11.tgz#b8b34e35a5b43880664ac7a3fbc70243d7ed894f" @@ -9990,6 +10095,16 @@ esbuild-android-arm64@0.14.38: resolved "https://registry.yarnpkg.com/esbuild-android-arm64/-/esbuild-android-arm64-0.14.38.tgz#78acc80773d16007de5219ccce544c036abd50b8" integrity sha512-L2NgQRWuHFI89IIZIlpAcINy9FvBk6xFVZ7xGdOwIm8VyhX1vNCEqUJO3DPSSy945Gzdg98cxtNt8Grv1CsyhA== +esbuild-android-arm64@0.14.53: + version "0.14.53" + resolved "https://registry.yarnpkg.com/esbuild-android-arm64/-/esbuild-android-arm64-0.14.53.tgz#2158253d4e8f9fdd2a081bbb4f73b8806178841e" + integrity sha512-PC7KaF1v0h/nWpvlU1UMN7dzB54cBH8qSsm7S9mkwFA1BXpaEOufCg8hdoEI1jep0KeO/rjZVWrsH8+q28T77A== + +esbuild-android-arm64@0.14.54: + version "0.14.54" + resolved "https://registry.yarnpkg.com/esbuild-android-arm64/-/esbuild-android-arm64-0.14.54.tgz#8ce69d7caba49646e009968fe5754a21a9871771" + integrity sha512-F9E+/QDi9sSkLaClO8SOV6etqPd+5DgJje1F9lOWoNncDdOBL2YF59IhsWATSt0TLZbYCf3pNlTHvVV5VfHdvg== + esbuild-darwin-64@0.14.11: version "0.14.11" resolved "https://registry.yarnpkg.com/esbuild-darwin-64/-/esbuild-darwin-64-0.14.11.tgz#ba805de98c0412e50fcd0636451797da157b0625" @@ -10000,6 +10115,16 @@ esbuild-darwin-64@0.14.38: resolved "https://registry.yarnpkg.com/esbuild-darwin-64/-/esbuild-darwin-64-0.14.38.tgz#e02b1291f629ebdc2aa46fabfacc9aa28ff6aa46" integrity sha512-5JJvgXkX87Pd1Og0u/NJuO7TSqAikAcQQ74gyJ87bqWRVeouky84ICoV4sN6VV53aTW+NE87qLdGY4QA2S7KNA== +esbuild-darwin-64@0.14.53: + version "0.14.53" + resolved "https://registry.yarnpkg.com/esbuild-darwin-64/-/esbuild-darwin-64-0.14.53.tgz#b4681831fd8f8d06feb5048acbe90d742074cc2a" + integrity sha512-gE7P5wlnkX4d4PKvLBUgmhZXvL7lzGRLri17/+CmmCzfncIgq8lOBvxGMiQ4xazplhxq+72TEohyFMZLFxuWvg== + +esbuild-darwin-64@0.14.54: + version "0.14.54" + resolved "https://registry.yarnpkg.com/esbuild-darwin-64/-/esbuild-darwin-64-0.14.54.tgz#24ba67b9a8cb890a3c08d9018f887cc221cdda25" + integrity sha512-jtdKWV3nBviOd5v4hOpkVmpxsBy90CGzebpbO9beiqUYVMBtSc0AL9zGftFuBon7PNDcdvNCEuQqw2x0wP9yug== + esbuild-darwin-arm64@0.14.11: version "0.14.11" resolved "https://registry.yarnpkg.com/esbuild-darwin-arm64/-/esbuild-darwin-arm64-0.14.11.tgz#4d3573e448af76ce33e16231f3d9f878542d6fe8" @@ -10010,6 +10135,16 @@ esbuild-darwin-arm64@0.14.38: resolved "https://registry.yarnpkg.com/esbuild-darwin-arm64/-/esbuild-darwin-arm64-0.14.38.tgz#01eb6650ec010b18c990e443a6abcca1d71290a9" integrity sha512-eqF+OejMI3mC5Dlo9Kdq/Ilbki9sQBw3QlHW3wjLmsLh+quNfHmGMp3Ly1eWm981iGBMdbtSS9+LRvR2T8B3eQ== +esbuild-darwin-arm64@0.14.53: + version "0.14.53" + resolved "https://registry.yarnpkg.com/esbuild-darwin-arm64/-/esbuild-darwin-arm64-0.14.53.tgz#d267d957852d121b261b3f76ead86e5b5463acc9" + integrity sha512-otJwDU3hnI15Q98PX4MJbknSZ/WSR1I45il7gcxcECXzfN4Mrpft5hBDHXNRnCh+5858uPXBXA1Vaz2jVWLaIA== + +esbuild-darwin-arm64@0.14.54: + version "0.14.54" + resolved "https://registry.yarnpkg.com/esbuild-darwin-arm64/-/esbuild-darwin-arm64-0.14.54.tgz#3f7cdb78888ee05e488d250a2bdaab1fa671bf73" + integrity sha512-OPafJHD2oUPyvJMrsCvDGkRrVCar5aVyHfWGQzY1dWnzErjrDuSETxwA2HSsyg2jORLY8yBfzc1MIpUkXlctmw== + esbuild-freebsd-64@0.14.11: version "0.14.11" resolved "https://registry.yarnpkg.com/esbuild-freebsd-64/-/esbuild-freebsd-64-0.14.11.tgz#9294e6ab359ec93590ab097b0f2017de7c78ab4d" @@ -10020,6 +10155,16 @@ esbuild-freebsd-64@0.14.38: resolved "https://registry.yarnpkg.com/esbuild-freebsd-64/-/esbuild-freebsd-64-0.14.38.tgz#790b8786729d4aac7be17648f9ea8e0e16475b5e" integrity sha512-epnPbhZUt93xV5cgeY36ZxPXDsQeO55DppzsIgWM8vgiG/Rz+qYDLmh5ts3e+Ln1wA9dQ+nZmVHw+RjaW3I5Ig== +esbuild-freebsd-64@0.14.53: + version "0.14.53" + resolved "https://registry.yarnpkg.com/esbuild-freebsd-64/-/esbuild-freebsd-64-0.14.53.tgz#aca2af6d72b537fe66a38eb8f374fb66d4c98ca0" + integrity sha512-WkdJa8iyrGHyKiPF4lk0MiOF87Q2SkE+i+8D4Cazq3/iqmGPJ6u49je300MFi5I2eUsQCkaOWhpCVQMTKGww2w== + +esbuild-freebsd-64@0.14.54: + version "0.14.54" + resolved "https://registry.yarnpkg.com/esbuild-freebsd-64/-/esbuild-freebsd-64-0.14.54.tgz#09250f997a56ed4650f3e1979c905ffc40bbe94d" + integrity sha512-OKwd4gmwHqOTp4mOGZKe/XUlbDJ4Q9TjX0hMPIDBUWWu/kwhBAudJdBoxnjNf9ocIB6GN6CPowYpR/hRCbSYAg== + esbuild-freebsd-arm64@0.14.11: version "0.14.11" resolved "https://registry.yarnpkg.com/esbuild-freebsd-arm64/-/esbuild-freebsd-arm64-0.14.11.tgz#ae3e0b09173350b66cf8321583c9a1c1fcb8bb55" @@ -10030,6 +10175,16 @@ esbuild-freebsd-arm64@0.14.38: resolved "https://registry.yarnpkg.com/esbuild-freebsd-arm64/-/esbuild-freebsd-arm64-0.14.38.tgz#b66340ab28c09c1098e6d9d8ff656db47d7211e6" integrity sha512-/9icXUYJWherhk+y5fjPI5yNUdFPtXHQlwP7/K/zg8t8lQdHVj20SqU9/udQmeUo5pDFHMYzcEFfJqgOVeKNNQ== +esbuild-freebsd-arm64@0.14.53: + version "0.14.53" + resolved "https://registry.yarnpkg.com/esbuild-freebsd-arm64/-/esbuild-freebsd-arm64-0.14.53.tgz#76282e19312d914c34343c8a7da6cc5f051580b9" + integrity sha512-9T7WwCuV30NAx0SyQpw8edbKvbKELnnm1FHg7gbSYaatH+c8WJW10g/OdM7JYnv7qkimw2ZTtSA+NokOLd2ydQ== + +esbuild-freebsd-arm64@0.14.54: + version "0.14.54" + resolved "https://registry.yarnpkg.com/esbuild-freebsd-arm64/-/esbuild-freebsd-arm64-0.14.54.tgz#bafb46ed04fc5f97cbdb016d86947a79579f8e48" + integrity sha512-sFwueGr7OvIFiQT6WeG0jRLjkjdqWWSrfbVwZp8iMP+8UHEHRBvlaxL6IuKNDwAozNUmbb8nIMXa7oAOARGs1Q== + esbuild-linux-32@0.14.11: version "0.14.11" resolved "https://registry.yarnpkg.com/esbuild-linux-32/-/esbuild-linux-32-0.14.11.tgz#ddadbc7038aa5a6b1675bb1503cf79a0cbf1229a" @@ -10040,6 +10195,16 @@ esbuild-linux-32@0.14.38: resolved "https://registry.yarnpkg.com/esbuild-linux-32/-/esbuild-linux-32-0.14.38.tgz#7927f950986fd39f0ff319e92839455912b67f70" integrity sha512-QfgfeNHRFvr2XeHFzP8kOZVnal3QvST3A0cgq32ZrHjSMFTdgXhMhmWdKzRXP/PKcfv3e2OW9tT9PpcjNvaq6g== +esbuild-linux-32@0.14.53: + version "0.14.53" + resolved "https://registry.yarnpkg.com/esbuild-linux-32/-/esbuild-linux-32-0.14.53.tgz#1045d34cf7c5faaf2af3b29cc1573b06580c37e5" + integrity sha512-VGanLBg5en2LfGDgLEUxQko2lqsOS7MTEWUi8x91YmsHNyzJVT/WApbFFx3MQGhkf+XdimVhpyo5/G0PBY91zg== + +esbuild-linux-32@0.14.54: + version "0.14.54" + resolved "https://registry.yarnpkg.com/esbuild-linux-32/-/esbuild-linux-32-0.14.54.tgz#e2a8c4a8efdc355405325033fcebeb941f781fe5" + integrity sha512-1ZuY+JDI//WmklKlBgJnglpUL1owm2OX+8E1syCD6UAxcMM/XoWd76OHSjl/0MR0LisSAXDqgjT3uJqT67O3qw== + esbuild-linux-64@0.14.11: version "0.14.11" resolved "https://registry.yarnpkg.com/esbuild-linux-64/-/esbuild-linux-64-0.14.11.tgz#d698e3ce3a231ddfeec6b5df8c546ae8883fcd88" @@ -10050,6 +10215,16 @@ esbuild-linux-64@0.14.38: resolved "https://registry.yarnpkg.com/esbuild-linux-64/-/esbuild-linux-64-0.14.38.tgz#4893d07b229d9cfe34a2b3ce586399e73c3ac519" integrity sha512-uuZHNmqcs+Bj1qiW9k/HZU3FtIHmYiuxZ/6Aa+/KHb/pFKr7R3aVqvxlAudYI9Fw3St0VCPfv7QBpUITSmBR1Q== +esbuild-linux-64@0.14.53: + version "0.14.53" + resolved "https://registry.yarnpkg.com/esbuild-linux-64/-/esbuild-linux-64-0.14.53.tgz#ab3f2ee2ebb5a6930c72d9539cb34b428808cbe4" + integrity sha512-pP/FA55j/fzAV7N9DF31meAyjOH6Bjuo3aSKPh26+RW85ZEtbJv9nhoxmGTd9FOqjx59Tc1ZbrJabuiXlMwuZQ== + +esbuild-linux-64@0.14.54: + version "0.14.54" + resolved "https://registry.yarnpkg.com/esbuild-linux-64/-/esbuild-linux-64-0.14.54.tgz#de5fdba1c95666cf72369f52b40b03be71226652" + integrity sha512-EgjAgH5HwTbtNsTqQOXWApBaPVdDn7XcK+/PtJwZLT1UmpLoznPd8c5CxqsH2dQK3j05YsB3L17T8vE7cp4cCg== + esbuild-linux-arm64@0.14.11: version "0.14.11" resolved "https://registry.yarnpkg.com/esbuild-linux-arm64/-/esbuild-linux-arm64-0.14.11.tgz#85faea9fa99ad355b5e3b283197a4dfd0a110fe7" @@ -10060,6 +10235,16 @@ esbuild-linux-arm64@0.14.38: resolved "https://registry.yarnpkg.com/esbuild-linux-arm64/-/esbuild-linux-arm64-0.14.38.tgz#8442402e37d0b8ae946ac616784d9c1a2041056a" integrity sha512-HlMGZTEsBrXrivr64eZ/EO0NQM8H8DuSENRok9d+Jtvq8hOLzrxfsAT9U94K3KOGk2XgCmkaI2KD8hX7F97lvA== +esbuild-linux-arm64@0.14.53: + version "0.14.53" + resolved "https://registry.yarnpkg.com/esbuild-linux-arm64/-/esbuild-linux-arm64-0.14.53.tgz#1f5530412f6690949e78297122350488d3266cfe" + integrity sha512-GDmWITT+PMsjCA6/lByYk7NyFssW4Q6in32iPkpjZ/ytSyH+xeEx8q7HG3AhWH6heemEYEWpTll/eui3jwlSnw== + +esbuild-linux-arm64@0.14.54: + version "0.14.54" + resolved "https://registry.yarnpkg.com/esbuild-linux-arm64/-/esbuild-linux-arm64-0.14.54.tgz#dae4cd42ae9787468b6a5c158da4c84e83b0ce8b" + integrity sha512-WL71L+0Rwv+Gv/HTmxTEmpv0UgmxYa5ftZILVi2QmZBgX3q7+tDeOQNqGtdXSdsL8TQi1vIaVFHUPDe0O0kdig== + esbuild-linux-arm@0.14.11: version "0.14.11" resolved "https://registry.yarnpkg.com/esbuild-linux-arm/-/esbuild-linux-arm-0.14.11.tgz#74cbcf0b8a22c8401bcbcd6ebd4cbf2baca8b7b4" @@ -10070,6 +10255,16 @@ esbuild-linux-arm@0.14.38: resolved "https://registry.yarnpkg.com/esbuild-linux-arm/-/esbuild-linux-arm-0.14.38.tgz#d5dbf32d38b7f79be0ec6b5fb2f9251fd9066986" integrity sha512-FiFvQe8J3VKTDXG01JbvoVRXQ0x6UZwyrU4IaLBZeq39Bsbatd94Fuc3F1RGqPF5RbIWW7RvkVQjn79ejzysnA== +esbuild-linux-arm@0.14.53: + version "0.14.53" + resolved "https://registry.yarnpkg.com/esbuild-linux-arm/-/esbuild-linux-arm-0.14.53.tgz#a44ec9b5b42007ab6c0d65a224ccc6bbd97c54cf" + integrity sha512-/u81NGAVZMopbmzd21Nu/wvnKQK3pT4CrvQ8BTje1STXcQAGnfyKgQlj3m0j2BzYbvQxSy+TMck4TNV2onvoPA== + +esbuild-linux-arm@0.14.54: + version "0.14.54" + resolved "https://registry.yarnpkg.com/esbuild-linux-arm/-/esbuild-linux-arm-0.14.54.tgz#a2c1dff6d0f21dbe8fc6998a122675533ddfcd59" + integrity sha512-qqz/SjemQhVMTnvcLGoLOdFpCYbz4v4fUo+TfsWG+1aOu70/80RV6bgNpR2JCrppV2moUQkww+6bWxXRL9YMGw== + esbuild-linux-mips64le@0.14.11: version "0.14.11" resolved "https://registry.yarnpkg.com/esbuild-linux-mips64le/-/esbuild-linux-mips64le-0.14.11.tgz#490429211a3233f5cbbd8575b7758b897e42979a" @@ -10080,6 +10275,16 @@ esbuild-linux-mips64le@0.14.38: resolved "https://registry.yarnpkg.com/esbuild-linux-mips64le/-/esbuild-linux-mips64le-0.14.38.tgz#95081e42f698bbe35d8ccee0e3a237594b337eb5" integrity sha512-qd1dLf2v7QBiI5wwfil9j0HG/5YMFBAmMVmdeokbNAMbcg49p25t6IlJFXAeLzogv1AvgaXRXvgFNhScYEUXGQ== +esbuild-linux-mips64le@0.14.53: + version "0.14.53" + resolved "https://registry.yarnpkg.com/esbuild-linux-mips64le/-/esbuild-linux-mips64le-0.14.53.tgz#a4d0b6b17cfdeea4e41b0b085a5f73d99311be9f" + integrity sha512-d6/XHIQW714gSSp6tOOX2UscedVobELvQlPMkInhx1NPz4ThZI9uNLQ4qQJHGBGKGfu+rtJsxM4NVHLhnNRdWQ== + +esbuild-linux-mips64le@0.14.54: + version "0.14.54" + resolved "https://registry.yarnpkg.com/esbuild-linux-mips64le/-/esbuild-linux-mips64le-0.14.54.tgz#d9918e9e4cb972f8d6dae8e8655bf9ee131eda34" + integrity sha512-qTHGQB8D1etd0u1+sB6p0ikLKRVuCWhYQhAHRPkO+OF3I/iSlTKNNS0Lh2Oc0g0UFGguaFZZiPJdJey3AGpAlw== + esbuild-linux-ppc64le@0.14.11: version "0.14.11" resolved "https://registry.yarnpkg.com/esbuild-linux-ppc64le/-/esbuild-linux-ppc64le-0.14.11.tgz#fc79d60710213b5b98345f5b138d48245616827a" @@ -10090,11 +10295,31 @@ esbuild-linux-ppc64le@0.14.38: resolved "https://registry.yarnpkg.com/esbuild-linux-ppc64le/-/esbuild-linux-ppc64le-0.14.38.tgz#dceb0a1b186f5df679618882a7990bd422089b47" integrity sha512-mnbEm7o69gTl60jSuK+nn+pRsRHGtDPfzhrqEUXyCl7CTOCLtWN2bhK8bgsdp6J/2NyS/wHBjs1x8aBWwP2X9Q== +esbuild-linux-ppc64le@0.14.53: + version "0.14.53" + resolved "https://registry.yarnpkg.com/esbuild-linux-ppc64le/-/esbuild-linux-ppc64le-0.14.53.tgz#8c331822c85465434e086e3e6065863770c38139" + integrity sha512-ndnJmniKPCB52m+r6BtHHLAOXw+xBCWIxNnedbIpuREOcbSU/AlyM/2dA3BmUQhsHdb4w3amD5U2s91TJ3MzzA== + +esbuild-linux-ppc64le@0.14.54: + version "0.14.54" + resolved "https://registry.yarnpkg.com/esbuild-linux-ppc64le/-/esbuild-linux-ppc64le-0.14.54.tgz#3f9a0f6d41073fb1a640680845c7de52995f137e" + integrity sha512-j3OMlzHiqwZBDPRCDFKcx595XVfOfOnv68Ax3U4UKZ3MTYQB5Yz3X1mn5GnodEVYzhtZgxEBidLWeIs8FDSfrQ== + esbuild-linux-riscv64@0.14.38: version "0.14.38" resolved "https://registry.yarnpkg.com/esbuild-linux-riscv64/-/esbuild-linux-riscv64-0.14.38.tgz#61fb8edb75f475f9208c4a93ab2bfab63821afd2" integrity sha512-+p6YKYbuV72uikChRk14FSyNJZ4WfYkffj6Af0/Tw63/6TJX6TnIKE+6D3xtEc7DeDth1fjUOEqm+ApKFXbbVQ== +esbuild-linux-riscv64@0.14.53: + version "0.14.53" + resolved "https://registry.yarnpkg.com/esbuild-linux-riscv64/-/esbuild-linux-riscv64-0.14.53.tgz#36fd75543401304bea8a2d63bf8ea18aaa508e00" + integrity sha512-yG2sVH+QSix6ct4lIzJj329iJF3MhloLE6/vKMQAAd26UVPVkhMFqFopY+9kCgYsdeWvXdPgmyOuKa48Y7+/EQ== + +esbuild-linux-riscv64@0.14.54: + version "0.14.54" + resolved "https://registry.yarnpkg.com/esbuild-linux-riscv64/-/esbuild-linux-riscv64-0.14.54.tgz#618853c028178a61837bc799d2013d4695e451c8" + integrity sha512-y7Vt7Wl9dkOGZjxQZnDAqqn+XOqFD7IMWiewY5SPlNlzMX39ocPQlOaoxvT4FllA5viyV26/QzHtvTjVNOxHZg== + esbuild-linux-s390x@0.14.11: version "0.14.11" resolved "https://registry.yarnpkg.com/esbuild-linux-s390x/-/esbuild-linux-s390x-0.14.11.tgz#ca4b93556bbba6cc95b0644f2ee93c982165ba07" @@ -10105,6 +10330,16 @@ esbuild-linux-s390x@0.14.38: resolved "https://registry.yarnpkg.com/esbuild-linux-s390x/-/esbuild-linux-s390x-0.14.38.tgz#34c7126a4937406bf6a5e69100185fd702d12fe0" integrity sha512-0zUsiDkGJiMHxBQ7JDU8jbaanUY975CdOW1YDrurjrM0vWHfjv9tLQsW9GSyEb/heSK1L5gaweRjzfUVBFoybQ== +esbuild-linux-s390x@0.14.53: + version "0.14.53" + resolved "https://registry.yarnpkg.com/esbuild-linux-s390x/-/esbuild-linux-s390x-0.14.53.tgz#1622677ab6824123f48f75d3afc031cd41936129" + integrity sha512-OCJlgdkB+XPYndHmw6uZT7jcYgzmx9K+28PVdOa/eLjdoYkeAFvH5hTwX4AXGLZLH09tpl4bVsEtvuyUldaNCg== + +esbuild-linux-s390x@0.14.54: + version "0.14.54" + resolved "https://registry.yarnpkg.com/esbuild-linux-s390x/-/esbuild-linux-s390x-0.14.54.tgz#d1885c4c5a76bbb5a0fe182e2c8c60eb9e29f2a6" + integrity sha512-zaHpW9dziAsi7lRcyV4r8dhfG1qBidQWUXweUjnw+lliChJqQr+6XD71K41oEIC3Mx1KStovEmlzm+MkGZHnHA== + esbuild-netbsd-64@0.14.11: version "0.14.11" resolved "https://registry.yarnpkg.com/esbuild-netbsd-64/-/esbuild-netbsd-64-0.14.11.tgz#edb340bc6653c88804cac2253e21b74258fce165" @@ -10115,6 +10350,16 @@ esbuild-netbsd-64@0.14.38: resolved "https://registry.yarnpkg.com/esbuild-netbsd-64/-/esbuild-netbsd-64-0.14.38.tgz#322ea9937d9e529183ee281c7996b93eb38a5d95" integrity sha512-cljBAApVwkpnJZfnRVThpRBGzCi+a+V9Ofb1fVkKhtrPLDYlHLrSYGtmnoTVWDQdU516qYI8+wOgcGZ4XIZh0Q== +esbuild-netbsd-64@0.14.53: + version "0.14.53" + resolved "https://registry.yarnpkg.com/esbuild-netbsd-64/-/esbuild-netbsd-64-0.14.53.tgz#e86d0efd0116658be335492ed12e66b26b4baf52" + integrity sha512-gp2SB+Efc7MhMdWV2+pmIs/Ja/Mi5rjw+wlDmmbIn68VGXBleNgiEZG+eV2SRS0kJEUyHNedDtwRIMzaohWedQ== + +esbuild-netbsd-64@0.14.54: + version "0.14.54" + resolved "https://registry.yarnpkg.com/esbuild-netbsd-64/-/esbuild-netbsd-64-0.14.54.tgz#69ae917a2ff241b7df1dbf22baf04bd330349e81" + integrity sha512-PR01lmIMnfJTgeU9VJTDY9ZerDWVFIUzAtJuDHwwceppW7cQWjBBqP48NdeRtoP04/AtO9a7w3viI+PIDr6d+w== + esbuild-openbsd-64@0.14.11: version "0.14.11" resolved "https://registry.yarnpkg.com/esbuild-openbsd-64/-/esbuild-openbsd-64-0.14.11.tgz#caeff5f946f79a60ce7bcf88871ca4c71d3476e8" @@ -10125,6 +10370,16 @@ esbuild-openbsd-64@0.14.38: resolved "https://registry.yarnpkg.com/esbuild-openbsd-64/-/esbuild-openbsd-64-0.14.38.tgz#1ca29bb7a2bf09592dcc26afdb45108f08a2cdbd" integrity sha512-CDswYr2PWPGEPpLDUO50mL3WO/07EMjnZDNKpmaxUPsrW+kVM3LoAqr/CE8UbzugpEiflYqJsGPLirThRB18IQ== +esbuild-openbsd-64@0.14.53: + version "0.14.53" + resolved "https://registry.yarnpkg.com/esbuild-openbsd-64/-/esbuild-openbsd-64-0.14.53.tgz#9bcbbe6f86304872c6e91f64c8eb73fc29c3588b" + integrity sha512-eKQ30ZWe+WTZmteDYg8S+YjHV5s4iTxeSGhJKJajFfQx9TLZJvsJX0/paqwP51GicOUruFpSUAs2NCc0a4ivQQ== + +esbuild-openbsd-64@0.14.54: + version "0.14.54" + resolved "https://registry.yarnpkg.com/esbuild-openbsd-64/-/esbuild-openbsd-64-0.14.54.tgz#db4c8495287a350a6790de22edea247a57c5d47b" + integrity sha512-Qyk7ikT2o7Wu76UsvvDS5q0amJvmRzDyVlL0qf5VLsLchjCa1+IAvd8kTBgUxD7VBUUVgItLkk609ZHUc1oCaw== + esbuild-sunos-64@0.14.11: version "0.14.11" resolved "https://registry.yarnpkg.com/esbuild-sunos-64/-/esbuild-sunos-64-0.14.11.tgz#90ce7e1749c2958a53509b4bae7b8f7d98f276d6" @@ -10135,6 +10390,16 @@ esbuild-sunos-64@0.14.38: resolved "https://registry.yarnpkg.com/esbuild-sunos-64/-/esbuild-sunos-64-0.14.38.tgz#c9446f7d8ebf45093e7bb0e7045506a88540019b" integrity sha512-2mfIoYW58gKcC3bck0j7lD3RZkqYA7MmujFYmSn9l6TiIcAMpuEvqksO+ntBgbLep/eyjpgdplF7b+4T9VJGOA== +esbuild-sunos-64@0.14.53: + version "0.14.53" + resolved "https://registry.yarnpkg.com/esbuild-sunos-64/-/esbuild-sunos-64-0.14.53.tgz#f7a872f7460bfb7b131f7188a95fbce3d1c577e8" + integrity sha512-OWLpS7a2FrIRukQqcgQqR1XKn0jSJoOdT+RlhAxUoEQM/IpytS3FXzCJM6xjUYtpO5GMY0EdZJp+ur2pYdm39g== + +esbuild-sunos-64@0.14.54: + version "0.14.54" + resolved "https://registry.yarnpkg.com/esbuild-sunos-64/-/esbuild-sunos-64-0.14.54.tgz#54287ee3da73d3844b721c21bc80c1dc7e1bf7da" + integrity sha512-28GZ24KmMSeKi5ueWzMcco6EBHStL3B6ubM7M51RmPwXQGLe0teBGJocmWhgwccA1GeFXqxzILIxXpHbl9Q/Kw== + esbuild-wasm@0.14.11: version "0.14.11" resolved "https://registry.yarnpkg.com/esbuild-wasm/-/esbuild-wasm-0.14.11.tgz#bd09f4c42969cddcae39007d284f8ef747aae85d" @@ -10155,6 +10420,16 @@ esbuild-windows-32@0.14.38: resolved "https://registry.yarnpkg.com/esbuild-windows-32/-/esbuild-windows-32-0.14.38.tgz#f8e9b4602fd0ccbd48e5c8d117ec0ba4040f2ad1" integrity sha512-L2BmEeFZATAvU+FJzJiRLFUP+d9RHN+QXpgaOrs2klshoAm1AE6Us4X6fS9k33Uy5SzScn2TpcgecbqJza1Hjw== +esbuild-windows-32@0.14.53: + version "0.14.53" + resolved "https://registry.yarnpkg.com/esbuild-windows-32/-/esbuild-windows-32-0.14.53.tgz#c5e3ca50e2d1439cc2c9fe4defa63bcd474ce709" + integrity sha512-m14XyWQP5rwGW0tbEfp95U6A0wY0DYPInWBB7D69FAXUpBpBObRoGTKRv36lf2RWOdE4YO3TNvj37zhXjVL5xg== + +esbuild-windows-32@0.14.54: + version "0.14.54" + resolved "https://registry.yarnpkg.com/esbuild-windows-32/-/esbuild-windows-32-0.14.54.tgz#f8aaf9a5667630b40f0fb3aa37bf01bbd340ce31" + integrity sha512-T+rdZW19ql9MjS7pixmZYVObd9G7kcaZo+sETqNH4RCkuuYSuv9AGHUVnPoP9hhuE1WM1ZimHz1CIBHBboLU7w== + esbuild-windows-64@0.14.11: version "0.14.11" resolved "https://registry.yarnpkg.com/esbuild-windows-64/-/esbuild-windows-64-0.14.11.tgz#13e86dd37a6cd61a5276fa2d271342d0f74da864" @@ -10165,6 +10440,16 @@ esbuild-windows-64@0.14.38: resolved "https://registry.yarnpkg.com/esbuild-windows-64/-/esbuild-windows-64-0.14.38.tgz#280f58e69f78535f470905ce3e43db1746518107" integrity sha512-Khy4wVmebnzue8aeSXLC+6clo/hRYeNIm0DyikoEqX+3w3rcvrhzpoix0S+MF9vzh6JFskkIGD7Zx47ODJNyCw== +esbuild-windows-64@0.14.53: + version "0.14.53" + resolved "https://registry.yarnpkg.com/esbuild-windows-64/-/esbuild-windows-64-0.14.53.tgz#ec2ab4a60c5215f092ffe1eab6d01319e88238af" + integrity sha512-s9skQFF0I7zqnQ2K8S1xdLSfZFsPLuOGmSx57h2btSEswv0N0YodYvqLcJMrNMXh6EynOmWD7rz+0rWWbFpIHQ== + +esbuild-windows-64@0.14.54: + version "0.14.54" + resolved "https://registry.yarnpkg.com/esbuild-windows-64/-/esbuild-windows-64-0.14.54.tgz#bf54b51bd3e9b0f1886ffdb224a4176031ea0af4" + integrity sha512-AoHTRBUuYwXtZhjXZbA1pGfTo8cJo3vZIcWGLiUcTNgHpJJMC1rVA44ZereBHMJtotyN71S8Qw0npiCIkW96cQ== + esbuild-windows-arm64@0.14.11: version "0.14.11" resolved "https://registry.yarnpkg.com/esbuild-windows-arm64/-/esbuild-windows-arm64-0.14.11.tgz#e8edfdf1d712085e6dc3fba18a0c225aaae32b75" @@ -10175,6 +10460,16 @@ esbuild-windows-arm64@0.14.38: resolved "https://registry.yarnpkg.com/esbuild-windows-arm64/-/esbuild-windows-arm64-0.14.38.tgz#d97e9ac0f95a4c236d9173fa9f86c983d6a53f54" integrity sha512-k3FGCNmHBkqdJXuJszdWciAH77PukEyDsdIryEHn9cKLQFxzhT39dSumeTuggaQcXY57UlmLGIkklWZo2qzHpw== +esbuild-windows-arm64@0.14.53: + version "0.14.53" + resolved "https://registry.yarnpkg.com/esbuild-windows-arm64/-/esbuild-windows-arm64-0.14.53.tgz#f71d403806bdf9f4a1f9d097db9aec949bd675c8" + integrity sha512-E+5Gvb+ZWts+00T9II6wp2L3KG2r3iGxByqd/a1RmLmYWVsSVUjkvIxZuJ3hYTIbhLkH5PRwpldGTKYqVz0nzQ== + +esbuild-windows-arm64@0.14.54: + version "0.14.54" + resolved "https://registry.yarnpkg.com/esbuild-windows-arm64/-/esbuild-windows-arm64-0.14.54.tgz#937d15675a15e4b0e4fafdbaa3a01a776a2be982" + integrity sha512-M0kuUvXhot1zOISQGXwWn6YtS+Y/1RT9WrVIOywZnJHo3jCDyewAc79aKNQWFCQm+xNHVTq9h8dZKvygoXQQRg== + esbuild@0.14.11: version "0.14.11" resolved "https://registry.yarnpkg.com/esbuild/-/esbuild-0.14.11.tgz#ac4acb78907874832afb704c3afe58ad37715c27" @@ -10225,6 +10520,60 @@ esbuild@0.14.38: esbuild-windows-64 "0.14.38" esbuild-windows-arm64 "0.14.38" +esbuild@^0.14.47: + version "0.14.53" + resolved "https://registry.yarnpkg.com/esbuild/-/esbuild-0.14.53.tgz#20b1007f686e8584f2a01a1bec5a37aac9498ce4" + integrity sha512-ohO33pUBQ64q6mmheX1mZ8mIXj8ivQY/L4oVuAshr+aJI+zLl+amrp3EodrUNDNYVrKJXGPfIHFGhO8slGRjuw== + optionalDependencies: + "@esbuild/linux-loong64" "0.14.53" + esbuild-android-64 "0.14.53" + esbuild-android-arm64 "0.14.53" + esbuild-darwin-64 "0.14.53" + esbuild-darwin-arm64 "0.14.53" + esbuild-freebsd-64 "0.14.53" + esbuild-freebsd-arm64 "0.14.53" + esbuild-linux-32 "0.14.53" + esbuild-linux-64 "0.14.53" + esbuild-linux-arm "0.14.53" + esbuild-linux-arm64 "0.14.53" + esbuild-linux-mips64le "0.14.53" + esbuild-linux-ppc64le "0.14.53" + esbuild-linux-riscv64 "0.14.53" + esbuild-linux-s390x "0.14.53" + esbuild-netbsd-64 "0.14.53" + esbuild-openbsd-64 "0.14.53" + esbuild-sunos-64 "0.14.53" + esbuild-windows-32 "0.14.53" + esbuild-windows-64 "0.14.53" + esbuild-windows-arm64 "0.14.53" + +esbuild@^0.14.54: + version "0.14.54" + resolved "https://registry.yarnpkg.com/esbuild/-/esbuild-0.14.54.tgz#8b44dcf2b0f1a66fc22459943dccf477535e9aa2" + integrity sha512-Cy9llcy8DvET5uznocPyqL3BFRrFXSVqbgpMJ9Wz8oVjZlh/zUSNbPRbov0VX7VxN2JH1Oa0uNxZ7eLRb62pJA== + optionalDependencies: + "@esbuild/linux-loong64" "0.14.54" + esbuild-android-64 "0.14.54" + esbuild-android-arm64 "0.14.54" + esbuild-darwin-64 "0.14.54" + esbuild-darwin-arm64 "0.14.54" + esbuild-freebsd-64 "0.14.54" + esbuild-freebsd-arm64 "0.14.54" + esbuild-linux-32 "0.14.54" + esbuild-linux-64 "0.14.54" + esbuild-linux-arm "0.14.54" + esbuild-linux-arm64 "0.14.54" + esbuild-linux-mips64le "0.14.54" + esbuild-linux-ppc64le "0.14.54" + esbuild-linux-riscv64 "0.14.54" + esbuild-linux-s390x "0.14.54" + esbuild-netbsd-64 "0.14.54" + esbuild-openbsd-64 "0.14.54" + esbuild-sunos-64 "0.14.54" + esbuild-windows-32 "0.14.54" + esbuild-windows-64 "0.14.54" + esbuild-windows-arm64 "0.14.54" + escalade@^3.1.1: version "3.1.1" resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.1.tgz#d8cfdc7000965c5a0174b4a82eaa5c0552742e40" @@ -10725,7 +11074,7 @@ fast-glob@^3.1.1: micromatch "^4.0.2" picomatch "^2.2.1" -fast-json-stable-stringify@2.x, fast-json-stable-stringify@^2.0.0: +fast-json-stable-stringify@2.1.0, fast-json-stable-stringify@2.x, fast-json-stable-stringify@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633" integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw== @@ -11147,7 +11496,7 @@ fs-extra@^8.1.0: jsonfile "^4.0.0" universalify "^0.1.0" -fs-extra@^9.0.0, fs-extra@^9.0.1: +fs-extra@^9.0.0, fs-extra@^9.0.1, fs-extra@^9.1.0: version "9.1.0" resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-9.1.0.tgz#5954460c764a8da2094ba3554bf839e6b9a7c86d" integrity sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ== @@ -11336,6 +11685,11 @@ getpass@^0.1.1: dependencies: assert-plus "^1.0.0" +git-hooks-list@1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/git-hooks-list/-/git-hooks-list-1.0.3.tgz#be5baaf78203ce342f2f844a9d2b03dba1b45156" + integrity sha512-Y7wLWcrLUXwk2noSka166byGCvhMtDRpgHdzCno1UQv/n/Hegp++a2xBWJL1lJarnKD3SWaljD+0z1ztqxuKyQ== + git-raw-commits@^2.0.8: version "2.0.10" resolved "https://registry.yarnpkg.com/git-raw-commits/-/git-raw-commits-2.0.10.tgz#e2255ed9563b1c9c3ea6bd05806410290297bbc1" @@ -11425,6 +11779,11 @@ glob-promise@^3.4.0: dependencies: "@types/glob" "*" +glob-regex@^0.3.0: + version "0.3.2" + resolved "https://registry.yarnpkg.com/glob-regex/-/glob-regex-0.3.2.tgz#27348f2f60648ec32a4a53137090b9fb934f3425" + integrity sha512-m5blUd3/OqDTWwzBBtWBPrGlAzatRywHameHeekAZyZrskYouOGdNB8T/q6JucucvJXtOuyHIn0/Yia7iDasDw== + glob-to-regexp@^0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/glob-to-regexp/-/glob-to-regexp-0.3.0.tgz#8c5a1494d2066c570cc3bfe4496175acc4d502ab" @@ -11523,6 +11882,20 @@ globalthis@^1.0.0: dependencies: define-properties "^1.1.3" +globby@10.0.0: + version "10.0.0" + resolved "https://registry.yarnpkg.com/globby/-/globby-10.0.0.tgz#abfcd0630037ae174a88590132c2f6804e291072" + integrity sha512-3LifW9M4joGZasyYPz2A1U74zbC/45fvpXUvO/9KbSa+VV0aGZarWkfdgKyR9sExNP0t0x0ss/UMJpNpcaTspw== + dependencies: + "@types/glob" "^7.1.1" + array-union "^2.1.0" + dir-glob "^3.0.1" + fast-glob "^3.0.3" + glob "^7.1.3" + ignore "^5.1.1" + merge2 "^1.2.3" + slash "^3.0.0" + globby@10.0.1: version "10.0.1" resolved "https://registry.yarnpkg.com/globby/-/globby-10.0.1.tgz#4782c34cb75dd683351335c5829cc3420e606b22" @@ -11587,6 +11960,11 @@ globby@^9.2.0: pify "^4.0.1" slash "^2.0.0" +globrex@^0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/globrex/-/globrex-0.1.2.tgz#dd5d9ec826232730cd6793a5e33a9302985e6098" + integrity sha512-uHJgbwAMwNFf5mLst7IWLNg14x1CkeqglJb/K3doi4dw6q2IvAAmM/Y81kevy83wP+Sst+nutFTYOGg3d1lsxg== + graceful-fs@^4.1.11, graceful-fs@^4.1.15, graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.1.9, graceful-fs@^4.2.0, graceful-fs@^4.2.4: version "4.2.6" resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.6.tgz#ff040b2b0853b23c3d31027523706f1885d76bee" @@ -12433,6 +12811,13 @@ is-core-module@^2.2.0: dependencies: has "^1.0.3" +is-core-module@^2.9.0: + version "2.10.0" + resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.10.0.tgz#9012ede0a91c69587e647514e1d5277019e728ed" + integrity sha512-Erxj2n/LDAZ7H8WNJXd9tw38GYM3dv8rk8Zcs+jJuxYTW7sozH+SS8NtrSjVL1/vpLvWi1hxy96IzjJ3EHTJJg== + dependencies: + has "^1.0.3" + 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" @@ -12630,16 +13015,16 @@ is-path-inside@^3.0.1: resolved "https://registry.yarnpkg.com/is-path-inside/-/is-path-inside-3.0.2.tgz#f5220fc82a3e233757291dddc9c5877f2a1f3017" integrity sha512-/2UGPSgmtqwo1ktx8NDHjuPwZWmHhO+gj0f93EkhLB5RgW9RZevWYYlIkS6zePc6U2WpOdQYIwHe9YC4DWEBVg== +is-plain-obj@2.1.0, is-plain-obj@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-2.1.0.tgz#45e42e37fccf1f40da8e5f76ee21515840c09287" + integrity sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA== + is-plain-obj@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-1.1.0.tgz#71a50c8429dfca773c92a390a4a03b39fcd51d3e" integrity sha1-caUMhCnfync8kqOQpKA7OfzVHT4= -is-plain-obj@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-2.1.0.tgz#45e42e37fccf1f40da8e5f76ee21515840c09287" - integrity sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA== - is-plain-obj@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-3.0.0.tgz#af6f2ea14ac5a646183a5bbdb5baabbc156ad9d7" @@ -13402,7 +13787,7 @@ jest-watcher@^27.5.1: jest-util "^27.5.1" string-length "^4.0.1" -jest-worker@^26.5.0, jest-worker@^26.6.2: +jest-worker@^26.2.1, jest-worker@^26.5.0, jest-worker@^26.6.2: version "26.6.2" resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-26.6.2.tgz#7f72cbc4d643c365e27b9fd775f9d0eaa9c7a8ed" integrity sha512-KWYVV1c4i+jbMpaBC+U++4Va0cp8OisU185o73T1vo99hqi7w8tSJfUXYswwqqrjzwxa6KpRK54WhPvwf5w6PQ== @@ -13570,6 +13955,11 @@ jsonc-parser@3.0.0, jsonc-parser@^3.0.0: resolved "https://registry.yarnpkg.com/jsonc-parser/-/jsonc-parser-3.0.0.tgz#abdd785701c7e7eaca8a9ec8cf070ca51a745a22" integrity sha512-fQzRfAbIBnR0IQvftw9FJveWiHp72Fg20giDrHz6TdfB12UH/uue0D3hm57UB5KgAVuniLMCaS8P1IMj9NR7cA== +jsonc-parser@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/jsonc-parser/-/jsonc-parser-3.1.0.tgz#73b8f0e5c940b83d03476bc2e51a20ef0932615d" + integrity sha512-DRf0QjnNeCUds3xTjKlQQ3DpJD51GvDjJfnxUVWg6PZTo2otSm+slzNAxU/35hF8/oJIKoG9slq30JYOsF2azg== + jsonfile@^2.1.0: version "2.4.0" resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-2.4.0.tgz#3736a2b428b87bbda0cc83b53fa3d633a35c2ae8" @@ -14041,6 +14431,13 @@ lru-cache@^7.7.1: resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-7.10.1.tgz#db577f42a94c168f676b638d15da8fb073448cab" integrity sha512-BQuhQxPuRl79J5zSXRP+uNzPOyZw2oFI9JLRQ80XswSvg21KMKNtQza9eF42rfI/3Z40RvzBdXgziEkudzjo8A== +magic-string@0.25.7: + version "0.25.7" + resolved "https://registry.yarnpkg.com/magic-string/-/magic-string-0.25.7.tgz#3f497d6fd34c669c6798dcb821f2ef31f5445051" + integrity sha512-4CrMT5DOHTDk4HYDlzmwu4FVCcIYI8gauveasrdCu2IKIFOJ3f0v/8MDGJCDL9oD2ppz/Av1b0Nj345H9M+XIA== + dependencies: + sourcemap-codec "^1.4.4" + magic-string@0.26.1, magic-string@^0.26.0: version "0.26.1" resolved "https://registry.yarnpkg.com/magic-string/-/magic-string-0.26.1.tgz#ba9b651354fa9512474199acecf9c6dbe93f97fd" @@ -14515,6 +14912,11 @@ minimist@^1.1.1, minimist@^1.1.3, minimist@^1.2.0, minimist@^1.2.3, minimist@^1. resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.5.tgz#67d66014b66a6a8aaa0c083c5fd58df4e4e97602" integrity sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw== +minimist@^1.2.6: + version "1.2.6" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.6.tgz#8637a5b759ea0d6e98702cfb3a9283323c93af44" + integrity sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q== + minipass-collect@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/minipass-collect/-/minipass-collect-1.0.2.tgz#22b813bf745dc6edba2576b940022ad6edc8c617" @@ -14990,6 +15392,38 @@ nwsapi@^2.2.0: resolved "https://registry.yarnpkg.com/nwsapi/-/nwsapi-2.2.0.tgz#204879a9e3d068ff2a55139c2c772780681a38b7" integrity sha512-h2AatdwYH+JHiZpv7pt/gSX1XoRGb7L/qSIeuqA6GwYoF9w1vP1cw42TO0aI2pNyshRK5893hNSl+1//vHK7hQ== +nx-plugin-devkit@^1.3.1: + version "1.3.1" + resolved "https://registry.yarnpkg.com/nx-plugin-devkit/-/nx-plugin-devkit-1.3.1.tgz#bf6db10dca297943f4014d7c19bfcb3de7a64807" + integrity sha512-HV++hUDaeShTve9ympUuemxFhV1u/MvLDMUG3rJBcSGO2mbkhdfFZTeHL11+dKou/xMITZgbH37Mcf6PWoIiAQ== + dependencies: + chalk "^4.1.2" + consola "^2.15.3" + dotenv "~10.0.0" + envinfo "^7.8.1" + execa "^5.1.1" + fs-extra "^9.1.0" + glob "^7.1.6" + jsonc-parser "^3.0.0" + prettier "^2.3.1" + rxjs "6.6.7" + sort-package-json "^1.50.0" + yargs-parser "^20.2.7" + +nx-plugin-vite@^2.2.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/nx-plugin-vite/-/nx-plugin-vite-2.2.1.tgz#c02dd28d58cb5a65e50d4572ab69dcc7c0b2b841" + integrity sha512-yK43i3jWHoKgOkWlnikoKZQNzpa00NcTNvMp/UPlDieY9Aux7Vml+M7lavO760E0qlLkjEH61znyFnHWBF4/Fw== + dependencies: + "@angular-devkit/schematics" "^13.2.5" + chalk "^4.1.2" + consola "^2.15.3" + dotenv "~10.0.0" + execa "^5.1.1" + nx-plugin-devkit "^1.3.1" + rxjs "6.6.7" + rxjs-for-await "^0.0.2" + nx@14.4.1: version "14.4.1" resolved "https://registry.yarnpkg.com/nx/-/nx-14.4.1.tgz#80495deafd6bc558a2db2acd0140597bfe1d9587" @@ -15601,6 +16035,11 @@ path-parse@^1.0.6: resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.6.tgz#d62dbb5679405d72c4737ec58600e9ddcf06d24c" integrity sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw== +path-parse@^1.0.7: + version "1.0.7" + resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.7.tgz#fbc114b60ca42b30d9daf5858e4bd68bbedb6735" + integrity sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw== + path-strip-sep@^1.0.12: version "1.0.12" resolved "https://registry.yarnpkg.com/path-strip-sep/-/path-strip-sep-1.0.12.tgz#e395568764c3a21eb7e879d7573a6eb4619e8bcf" @@ -16424,6 +16863,15 @@ postcss@^8.3.7: picocolors "^1.0.0" source-map-js "^0.6.2" +postcss@^8.4.14: + version "8.4.16" + resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.16.tgz#33a1d675fac39941f5f445db0de4db2b6e01d43c" + integrity sha512-ipHE1XBvKzm5xI7hiHCZJCSugxvsdq2mPnsq5+UF+VHCjiBvtDrlxJfMBToWaP9D5XlgNmcFGqoHmUn0EYEaRQ== + dependencies: + nanoid "^3.3.4" + picocolors "^1.0.0" + source-map-js "^1.0.2" + prebuild-install@^6.0.0: version "6.1.4" resolved "https://registry.yarnpkg.com/prebuild-install/-/prebuild-install-6.1.4.tgz#ae3c0142ad611d58570b89af4986088a4937e00f" @@ -16453,7 +16901,7 @@ prelude-ls@~1.1.2: resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54" integrity sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ= -prettier@2.7.1: +prettier@2.7.1, prettier@^2.3.1: version "2.7.1" resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.7.1.tgz#e235806850d057f97bb08368a4f7d899f7760c64" integrity sha512-ujppO+MkdPqoVINuDFDRLClm7D78qbDt0/NR+wp5FqEZOoTNAjPHWj17QRhu7geIHJfcNhRk1XVQmF8Bp3ye+g== @@ -17000,6 +17448,16 @@ rechoir@^0.6.2: dependencies: resolve "^1.1.6" +recrawl-sync@^2.0.3: + version "2.2.2" + resolved "https://registry.yarnpkg.com/recrawl-sync/-/recrawl-sync-2.2.2.tgz#a5a8664c77267d603d601825af544d6716d69e15" + integrity sha512-E2sI4F25Fu2nrfV+KsnC7/qfk/spQIYXlonfQoS4rwxeNK5BjxnLPbWiRXHVXPwYBOTWtPX5765kTm/zJiL+LQ== + dependencies: + "@cush/relative" "^1.0.0" + glob-regex "^0.3.0" + slash "^3.0.0" + tslib "^1.9.3" + redent@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/redent/-/redent-1.0.0.tgz#cf916ab1fd5f1f16dfb20822dd6ec7f730c2afde" @@ -17264,6 +17722,11 @@ repeating@^2.0.0: dependencies: is-finite "^1.0.0" +request-light@^0.5.8: + version "0.5.8" + resolved "https://registry.yarnpkg.com/request-light/-/request-light-0.5.8.tgz#8bf73a07242b9e7b601fac2fa5dc22a094abcc27" + integrity sha512-3Zjgh+8b5fhRJBQZoy+zbVKpAQGLyka0MPgW3zruTF4dFFJ8Fqcfu9YsAvi/rvdcaTeWG3MkbZv4WKxAn/84Lg== + request-progress@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/request-progress/-/request-progress-3.0.0.tgz#4ca754081c7fec63f505e4faa825aa06cd669dbe" @@ -17332,6 +17795,15 @@ resolve@^1.1.6, resolve@^1.1.7, resolve@^1.10.0, resolve@^1.12.0, resolve@^1.14. is-core-module "^2.2.0" path-parse "^1.0.6" +resolve@^1.22.1: + version "1.22.1" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.1.tgz#27cb2ebb53f91abb49470a928bba7558066ac177" + integrity sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw== + dependencies: + is-core-module "^2.9.0" + path-parse "^1.0.7" + supports-preserve-symlinks-flag "^1.0.0" + restore-cursor@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-1.0.1.tgz#34661f46886327fed2991479152252df92daa541" @@ -17428,6 +17900,16 @@ rollup-plugin-postcss@^4.0.1: safe-identifier "^0.4.2" style-inject "^0.3.0" +rollup-plugin-terser@^7.0.2: + version "7.0.2" + resolved "https://registry.yarnpkg.com/rollup-plugin-terser/-/rollup-plugin-terser-7.0.2.tgz#e8fbba4869981b2dc35ae7e8a502d5c6c04d324d" + integrity sha512-w3iIaU4OxcF52UUXiZNsNeuXIMDvFrr+ZXK6bFZ0Q60qyVfq4uLptoS4bbq3paG3x216eQllFZX7zt6TIImguQ== + dependencies: + "@babel/code-frame" "^7.10.4" + jest-worker "^26.2.1" + serialize-javascript "^4.0.0" + terser "^5.0.0" + rollup-plugin-typescript2@^0.31.1: version "0.31.2" resolved "https://registry.yarnpkg.com/rollup-plugin-typescript2/-/rollup-plugin-typescript2-0.31.2.tgz#463aa713a7e2bf85b92860094b9f7fb274c5a4d8" @@ -17454,6 +17936,13 @@ rollup@^2.56.2: optionalDependencies: fsevents "~2.3.2" +rollup@^2.75.6, rollup@^2.77.2: + version "2.77.2" + resolved "https://registry.yarnpkg.com/rollup/-/rollup-2.77.2.tgz#6b6075c55f9cc2040a5912e6e062151e42e2c4e3" + integrity sha512-m/4YzYgLcpMQbxX3NmAqDvwLATZzxt8bIegO78FZLl+lAgKJBd1DRAOeEiZcKOIOPjxE6ewHWHNgGEalFXuz1g== + optionalDependencies: + fsevents "~2.3.2" + rsvp@^4.8.4: version "4.8.5" resolved "https://registry.yarnpkg.com/rsvp/-/rsvp-4.8.5.tgz#c8f155311d167f68f21e168df71ec5b083113734" @@ -17478,7 +17967,7 @@ run-queue@^1.0.0, run-queue@^1.0.3: dependencies: aproba "^1.1.1" -rxjs-for-await@0.0.2: +rxjs-for-await@0.0.2, rxjs-for-await@^0.0.2: version "0.0.2" resolved "https://registry.yarnpkg.com/rxjs-for-await/-/rxjs-for-await-0.0.2.tgz#26598a1d6167147cc192172970e7eed4e620384b" integrity sha512-IJ8R/ZCFMHOcDIqoABs82jal00VrZx8Xkgfe7TOKoaRPAW5nH/VFlG23bXpeGdrmtqI9UobFPgUKgCuFc7Lncw== @@ -18003,6 +18492,23 @@ sockjs@^0.3.24: uuid "^8.3.2" websocket-driver "^0.7.4" +sort-object-keys@^1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/sort-object-keys/-/sort-object-keys-1.1.3.tgz#bff833fe85cab147b34742e45863453c1e190b45" + integrity sha512-855pvK+VkU7PaKYPc+Jjnmt4EzejQHyhhF33q31qG8x7maDzkeFhAAThdCYay11CISO+qAMwjOBP+fPZe0IPyg== + +sort-package-json@^1.50.0: + version "1.57.0" + resolved "https://registry.yarnpkg.com/sort-package-json/-/sort-package-json-1.57.0.tgz#e95fb44af8ede0bb6147e3f39258102d4bb23fc4" + integrity sha512-FYsjYn2dHTRb41wqnv+uEqCUvBpK3jZcTp9rbz2qDTmel7Pmdtf+i2rLaaPMRZeSVM60V3Se31GyWFpmKs4Q5Q== + dependencies: + detect-indent "^6.0.0" + detect-newline "3.1.0" + git-hooks-list "1.0.3" + globby "10.0.0" + is-plain-obj "2.1.0" + sort-object-keys "^1.1.3" + source-list-map@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/source-list-map/-/source-list-map-2.0.1.tgz#3993bd873bfc48479cca9ea3a547835c7c154b34" @@ -18089,7 +18595,7 @@ source-map@~0.8.0-beta.0: dependencies: whatwg-url "^7.0.0" -sourcemap-codec@^1.4.8: +sourcemap-codec@^1.4.4, sourcemap-codec@^1.4.8: version "1.4.8" resolved "https://registry.yarnpkg.com/sourcemap-codec/-/sourcemap-codec-1.4.8.tgz#ea804bd94857402e6992d05a38ef1ae35a9ab4c4" integrity sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA== @@ -18634,6 +19140,11 @@ supports-hyperlinks@^2.0.0: has-flag "^4.0.0" supports-color "^7.0.0" +supports-preserve-symlinks-flag@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz#6eda4bd344a3c94aea376d4cc31bc77311039e09" + integrity sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w== + svgo@^2.7.0: version "2.8.0" resolved "https://registry.yarnpkg.com/svgo/-/svgo-2.8.0.tgz#4ff80cce6710dc2795f0c7c74101e6764cfccd24" @@ -18821,6 +19332,16 @@ terser@^4.1.2, terser@^4.6.3: source-map "~0.6.1" source-map-support "~0.5.12" +terser@^5.0.0: + version "5.14.2" + resolved "https://registry.yarnpkg.com/terser/-/terser-5.14.2.tgz#9ac9f22b06994d736174f4091aa368db896f1c10" + integrity sha512-oL0rGeM/WFQCUd0y2QrWxYnq7tfSuKBiqTjRPWrRgB46WD/kiwHwF8T23z78H6Q6kGCuuHcPB+KULHRdxvVGQA== + dependencies: + "@jridgewell/source-map" "^0.3.2" + acorn "^8.5.0" + commander "^2.20.0" + source-map-support "~0.5.20" + terser@^5.3.4, terser@^5.7.0: version "5.7.1" resolved "https://registry.yarnpkg.com/terser/-/terser-5.7.1.tgz#2dc7a61009b66bb638305cb2a824763b116bf784" @@ -19160,12 +19681,21 @@ tsconfig-paths@^3.9.0: minimist "^1.2.0" strip-bom "^3.0.0" +tsconfig-paths@^4.0.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/tsconfig-paths/-/tsconfig-paths-4.1.0.tgz#f8ef7d467f08ae3a695335bf1ece088c5538d2c1" + integrity sha512-AHx4Euop/dXFC+Vx589alFba8QItjF+8hf8LtmuiCwHyI4rHXQtOOENaM8kvYf5fR0dRChy3wzWIZ9WbB7FWow== + dependencies: + json5 "^2.2.1" + minimist "^1.2.6" + strip-bom "^3.0.0" + tslib@2.4.0, tslib@^2, tslib@^2.1.0, tslib@^2.4.0: version "2.4.0" resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.4.0.tgz#7cecaa7f073ce680a05847aa77be941098f36dc3" integrity sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ== -tslib@^1.10.0, tslib@^1.13.0, tslib@^1.8.1, tslib@^1.9.0: +tslib@^1.10.0, tslib@^1.13.0, tslib@^1.8.1, tslib@^1.9.0, tslib@^1.9.3: version "1.14.1" resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00" integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== @@ -19690,6 +20220,28 @@ vfile@^4.0.0: unist-util-stringify-position "^2.0.0" vfile-message "^2.0.0" +vite-tsconfig-paths@^3.5.0: + version "3.5.0" + resolved "https://registry.yarnpkg.com/vite-tsconfig-paths/-/vite-tsconfig-paths-3.5.0.tgz#bfdf93f8072eff04125112ea9602fd50ae8cdad9" + integrity sha512-NKIubr7gXgh/3uniQaOytSg+aKWPrjquP6anAy+zCWEn6h9fB8z2/qdlfQrTgZWaXJ2pHVlllrSdRZltHn9P4g== + dependencies: + debug "^4.1.1" + globrex "^0.1.2" + recrawl-sync "^2.0.3" + tsconfig-paths "^4.0.0" + +vite@^3.0.4: + version "3.0.4" + resolved "https://registry.yarnpkg.com/vite/-/vite-3.0.4.tgz#c61688d6b97573e96cf5ac25f2d68597b5ce68e8" + integrity sha512-NU304nqnBeOx2MkQnskBQxVsa0pRAH5FphokTGmyy8M3oxbvw7qAXts2GORxs+h/2vKsD+osMhZ7An6yK6F1dA== + dependencies: + esbuild "^0.14.47" + postcss "^8.4.14" + resolve "^1.22.1" + rollup "^2.75.6" + optionalDependencies: + fsevents "~2.3.2" + vm-browserify@^1.0.1: version "1.1.2" resolved "https://registry.yarnpkg.com/vm-browserify/-/vm-browserify-1.1.2.tgz#78641c488b8e6ca91a75f511e7a3b32a86e5dda0" @@ -19721,6 +20273,66 @@ vsce@^2.6.3: yauzl "^2.3.1" yazl "^2.2.2" +vscode-json-languageservice@^5.1.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/vscode-json-languageservice/-/vscode-json-languageservice-5.1.0.tgz#b1f197a60338cb378189fcb41489a84846724dd9" + integrity sha512-D5612D7h/Gh4A0JmdttPveWzT9dur21WXvBHWKPdOt0sLO6ILz8vN6+IzWnvwDOVAEFTpzIAMVMZwbKZkwGGiA== + dependencies: + jsonc-parser "^3.1.0" + vscode-languageserver-textdocument "^1.0.4" + vscode-languageserver-types "^3.17.1" + vscode-nls "^5.0.1" + vscode-uri "^3.0.3" + +vscode-jsonrpc@8.0.2: + version "8.0.2" + resolved "https://registry.yarnpkg.com/vscode-jsonrpc/-/vscode-jsonrpc-8.0.2.tgz#f239ed2cd6004021b6550af9fd9d3e47eee3cac9" + integrity sha512-RY7HwI/ydoC1Wwg4gJ3y6LpU9FJRZAUnTYMXthqhFXXu77ErDd/xkREpGuk4MyYkk4a+XDWAMqe0S3KkelYQEQ== + +vscode-languageclient@^8.0.2: + version "8.0.2" + resolved "https://registry.yarnpkg.com/vscode-languageclient/-/vscode-languageclient-8.0.2.tgz#f1f23ce8c8484aa11e4b7dfb24437d3e59bb61c6" + integrity sha512-lHlthJtphG9gibGb/y72CKqQUxwPsMXijJVpHEC2bvbFqxmkj9LwQ3aGU9dwjBLqsX1S4KjShYppLvg1UJDF/Q== + dependencies: + minimatch "^3.0.4" + semver "^7.3.5" + vscode-languageserver-protocol "3.17.2" + +vscode-languageserver-protocol@3.17.2: + version "3.17.2" + resolved "https://registry.yarnpkg.com/vscode-languageserver-protocol/-/vscode-languageserver-protocol-3.17.2.tgz#beaa46aea06ed061576586c5e11368a9afc1d378" + integrity sha512-8kYisQ3z/SQ2kyjlNeQxbkkTNmVFoQCqkmGrzLH6A9ecPlgTbp3wDTnUNqaUxYr4vlAcloxx8zwy7G5WdguYNg== + dependencies: + vscode-jsonrpc "8.0.2" + vscode-languageserver-types "3.17.2" + +vscode-languageserver-textdocument@^1.0.4: + version "1.0.5" + resolved "https://registry.yarnpkg.com/vscode-languageserver-textdocument/-/vscode-languageserver-textdocument-1.0.5.tgz#838769940ece626176ec5d5a2aa2d0aa69f5095c" + integrity sha512-1ah7zyQjKBudnMiHbZmxz5bYNM9KKZYz+5VQLj+yr8l+9w3g+WAhCkUkWbhMEdC5u0ub4Ndiye/fDyS8ghIKQg== + +vscode-languageserver-types@3.17.2, vscode-languageserver-types@^3.17.1: + version "3.17.2" + resolved "https://registry.yarnpkg.com/vscode-languageserver-types/-/vscode-languageserver-types-3.17.2.tgz#b2c2e7de405ad3d73a883e91989b850170ffc4f2" + integrity sha512-zHhCWatviizPIq9B7Vh9uvrH6x3sK8itC84HkamnBWoDFJtzBf7SWlpLCZUit72b3os45h6RWQNC9xHRDF8dRA== + +vscode-languageserver@^8.0.2: + version "8.0.2" + resolved "https://registry.yarnpkg.com/vscode-languageserver/-/vscode-languageserver-8.0.2.tgz#cfe2f0996d9dfd40d3854e786b2821604dfec06d" + integrity sha512-bpEt2ggPxKzsAOZlXmCJ50bV7VrxwCS5BI4+egUmure/oI/t4OlFzi/YNtVvY24A2UDOZAgwFGgnZPwqSJubkA== + dependencies: + vscode-languageserver-protocol "3.17.2" + +vscode-nls@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/vscode-nls/-/vscode-nls-5.0.1.tgz#ba23fc4d4420d25e7f886c8e83cbdcec47aa48b2" + integrity sha512-hHQV6iig+M21lTdItKPkJAaWrxALQb/nqpVffakO4knJOh3DrU2SXOMzUzNgo1eADPzu3qSsJY1weCzvR52q9A== + +vscode-uri@^3.0.3: + version "3.0.3" + resolved "https://registry.yarnpkg.com/vscode-uri/-/vscode-uri-3.0.3.tgz#a95c1ce2e6f41b7549f86279d19f47951e4f4d84" + integrity sha512-EcswR2S8bpR7fD0YPeS7r2xXExrScVMxg4MedACaWHEtx9ftCF/qHG1xGkolzTPcEmjTavCQgbVzHUIdTMzFGA== + w3c-hr-time@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/w3c-hr-time/-/w3c-hr-time-1.0.2.tgz#0a89cdf5cc15822df9c360543676963e0cc308cd" @@ -20421,6 +21033,11 @@ yargs-parser@^20.2.3: resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.7.tgz#61df85c113edfb5a7a4e36eb8aa60ef423cbc90a" integrity sha512-FiNkvbeHzB/syOjIUxFDCnhSfzAL8R5vs40MgLFBorXACCOAEaWu0gRZl14vG8MR9AOJIZbmkjhusqBYZ3HTHw== +yargs-parser@^20.2.7: + version "20.2.9" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.9.tgz#2eb7dc3b0289718fc295f362753845c41a0c94ee" + 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"