diff --git a/.changeset/shy-snails-jump.md b/.changeset/shy-snails-jump.md new file mode 100644 index 0000000..21b5f92 --- /dev/null +++ b/.changeset/shy-snails-jump.md @@ -0,0 +1,5 @@ +--- +"terminal-keeper": patch +--- + +feat: Allow the import of commands from another source that exists in the workspace. diff --git a/.vscode/settings.json b/.vscode/settings.json index 1dee34d..42f3807 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -26,13 +26,26 @@ "gitlens.hovers.currentLine.over": "line", "gitlens.codeLens.enabled": false, "cSpell.words": [ + "bombadil", "callhierarchy", + "gradlew", + "GRUNTFILE", + "gulpfile", "Ngoc", "nguyenngoclong", + "nmake", + "nodir", + "NOTPARALLEL", + "ONESHELL", "outdir", "outfile", + "pipenv", + "pipfile", "posttest", "pree", + "registertask", + "SECONDEXPANSION", + "sgarciac", "vscommands", "vsix", "wslpath" diff --git a/package-lock.json b/package-lock.json index 489da7b..c323598 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,8 +9,11 @@ "version": "1.1.40", "license": "MIT", "dependencies": { + "@sgarciac/bombadil": "^2.3.0", "@vscode-utility/fs-browserify": "^1.0.8", - "@vscode-utility/terminal-browserify": "^1.0.2" + "@vscode-utility/terminal-browserify": "^1.0.2", + "glob": "11.0.0", + "xml2js": "^0.6.2" }, "devDependencies": { "@changesets/cli": "^2.26.1", @@ -19,6 +22,7 @@ "@types/node": "^20.2.5", "@types/vscode": "^1.64.0", "@types/webpack-env": "^1.18.1", + "@types/xml2js": "^0.4.14", "@typescript-eslint/eslint-plugin": "^5.59.8", "@typescript-eslint/parser": "^5.59.8", "@vscode/test-electron": "^2.3.2", @@ -34,6 +38,7 @@ "path-browserify": "^1.0.1", "process": "^0.11.10", "stream-browserify": "^3.0.0", + "timers-browserify": "^2.0.12", "ts-loader": "^9.4.3", "typescript": "^5.0.4", "webpack": "^5.84.1", @@ -553,74 +558,61 @@ } }, "node_modules/@jridgewell/gen-mapping": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.3.tgz", - "integrity": "sha512-HLhSWOLRi875zjjMG/r+Nv0oCW8umGb0BgEhyX3dDX3egwZtB8PqLnjz3yedt8R5StBrzcg4aBpnh8UA9D1BoQ==", + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz", + "integrity": "sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg==", "dev": true, - "license": "MIT", "dependencies": { - "@jridgewell/set-array": "^1.0.1", + "@jridgewell/set-array": "^1.2.1", "@jridgewell/sourcemap-codec": "^1.4.10", - "@jridgewell/trace-mapping": "^0.3.9" + "@jridgewell/trace-mapping": "^0.3.24" }, "engines": { "node": ">=6.0.0" } }, - "node_modules/@jridgewell/gen-mapping/node_modules/@jridgewell/sourcemap-codec": { - "version": "1.4.15", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", - "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==", - "dev": true, - "license": "MIT" - }, "node_modules/@jridgewell/resolve-uri": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz", - "integrity": "sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w==", + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", + "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", "dev": true, - "license": "MIT", "engines": { "node": ">=6.0.0" } }, "node_modules/@jridgewell/set-array": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.2.tgz", - "integrity": "sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.2.1.tgz", + "integrity": "sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==", "dev": true, - "license": "MIT", "engines": { "node": ">=6.0.0" } }, "node_modules/@jridgewell/source-map": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.3.tgz", - "integrity": "sha512-b+fsZXeLYi9fEULmfBrhxn4IrPlINf8fiNarzTof004v3lFdntdwa9PF7vFJqm3mg7s+ScJMxXaE3Acp1irZcg==", + "version": "0.3.6", + "resolved": "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.6.tgz", + "integrity": "sha512-1ZJTZebgqllO79ue2bm3rIGud/bOe0pP5BjSRCRxxYkEZS8STV7zN84UBbiYu7jy+eCKSnVIUgoWWE/tt+shMQ==", "dev": true, - "license": "MIT", "dependencies": { - "@jridgewell/gen-mapping": "^0.3.0", - "@jridgewell/trace-mapping": "^0.3.9" + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.25" } }, "node_modules/@jridgewell/sourcemap-codec": { - "version": "1.4.14", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz", - "integrity": "sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==", - "dev": true, - "license": "MIT" + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz", + "integrity": "sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==", + "dev": true }, "node_modules/@jridgewell/trace-mapping": { - "version": "0.3.18", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.18.tgz", - "integrity": "sha512-w+niJYzMHdd7USdiH2U6869nqhD2nbfZXND5Yp93qIbEmnDNk7PD48o+YchRVpzMU7M6jVCbenTR7PA1FLQ9pA==", + "version": "0.3.25", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz", + "integrity": "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==", "dev": true, - "license": "MIT", "dependencies": { - "@jridgewell/resolve-uri": "3.1.0", - "@jridgewell/sourcemap-codec": "1.4.14" + "@jridgewell/resolve-uri": "^3.1.0", + "@jridgewell/sourcemap-codec": "^1.4.14" } }, "node_modules/@manypkg/find-root": { @@ -744,34 +736,23 @@ "node": ">=14" } }, - "node_modules/@types/eslint": { - "version": "8.40.0", - "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-8.40.0.tgz", - "integrity": "sha512-nbq2mvc/tBrK9zQQuItvjJl++GTN5j06DaPtp3hZCpngmG6Q3xoyEmd0TwZI0gAy/G1X0zhGBbr2imsGFdFV0g==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/estree": "*", - "@types/json-schema": "*" - } - }, - "node_modules/@types/eslint-scope": { - "version": "3.7.4", - "resolved": "https://registry.npmjs.org/@types/eslint-scope/-/eslint-scope-3.7.4.tgz", - "integrity": "sha512-9K4zoImiZc3HlIp6AVUDE4CWYx22a+lhSZMYNpbjW04+YF0KWj4pJXnEMjdnFTiQibFFmElcsasJXDbdI/EPhA==", - "dev": true, - "license": "MIT", + "node_modules/@sgarciac/bombadil": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/@sgarciac/bombadil/-/bombadil-2.3.0.tgz", + "integrity": "sha512-jet+J1Dr2NPgVrILO43B6OIFp5v1uyBLGS7pWfQ97YL/zQafayFVCVtSgrRr/gJcyU2Qo3mcqPs4qvvBOydApA==", "dependencies": { - "@types/eslint": "*", - "@types/estree": "*" + "chevrotain": "^4.3.1", + "lodash.every": "^4.6.0", + "lodash.includes": "^4.3.0", + "lodash.last": "^3.0.0", + "moment": "^2.18.1" } }, "node_modules/@types/estree": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.1.tgz", - "integrity": "sha512-LG4opVs2ANWZ1TJoKc937iMmNstM/d0ae1vNbnBvBhqCSezgVUOzcLCqbI5elV8Vy6WKwKjaqR+zO9VKirBBCA==", - "dev": true, - "license": "MIT" + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.6.tgz", + "integrity": "sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==", + "dev": true }, "node_modules/@types/glob": { "version": "8.1.0", @@ -857,6 +838,15 @@ "dev": true, "license": "MIT" }, + "node_modules/@types/xml2js": { + "version": "0.4.14", + "resolved": "https://registry.npmjs.org/@types/xml2js/-/xml2js-0.4.14.tgz", + "integrity": "sha512-4YnrRemBShWRO2QjvUin8ESA41rH+9nQGLUGZV/1IDhi3SL9OhdpNC/MrulTWuptXKwhx/aDxE7toV0f/ypIXQ==", + "dev": true, + "dependencies": { + "@types/node": "*" + } + }, "node_modules/@typescript-eslint/eslint-plugin": { "version": "5.59.8", "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.59.8.tgz", @@ -892,14 +882,10 @@ } }, "node_modules/@typescript-eslint/eslint-plugin/node_modules/semver": { - "version": "7.5.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.1.tgz", - "integrity": "sha512-Wvss5ivl8TMRZXXESstBA4uR5iXgEN/VC5/sOcuXdVLzcdkz4HWetIoRfG5gb5X+ij/G9rw9YoGn3QoQ8OCSpw==", + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", + "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", "dev": true, - "license": "ISC", - "dependencies": { - "lru-cache": "^6.0.0" - }, "bin": { "semver": "bin/semver.js" }, @@ -1019,13 +1005,10 @@ } }, "node_modules/@typescript-eslint/typescript-estree/node_modules/semver": { - "version": "7.5.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.1.tgz", - "integrity": "sha512-Wvss5ivl8TMRZXXESstBA4uR5iXgEN/VC5/sOcuXdVLzcdkz4HWetIoRfG5gb5X+ij/G9rw9YoGn3QoQ8OCSpw==", + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", + "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", "dev": true, - "dependencies": { - "lru-cache": "^6.0.0" - }, "bin": { "semver": "bin/semver.js" }, @@ -1066,13 +1049,10 @@ "dev": true }, "node_modules/@typescript-eslint/utils/node_modules/semver": { - "version": "7.5.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.1.tgz", - "integrity": "sha512-Wvss5ivl8TMRZXXESstBA4uR5iXgEN/VC5/sOcuXdVLzcdkz4HWetIoRfG5gb5X+ij/G9rw9YoGn3QoQ8OCSpw==", + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", + "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", "dev": true, - "dependencies": { - "lru-cache": "^6.0.0" - }, "bin": { "semver": "bin/semver.js" }, @@ -1172,11 +1152,10 @@ } }, "node_modules/@webassemblyjs/ast": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.11.6.tgz", - "integrity": "sha512-IN1xI7PwOvLPgjcf180gC1bqn3q/QaOCwYUahIOhbYUu8KA/3tw2RT/T0Gidi1l7Hhj5D/INhJxiICObqpMu4Q==", + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.12.1.tgz", + "integrity": "sha512-EKfMUOPRRUTy5UII4qJDGPpqfwjOmZ5jeGFwid9mnoqIFK+e0vqoi1qH56JpmZSzEL53jKnNzScdmftJyG5xWg==", "dev": true, - "license": "MIT", "dependencies": { "@webassemblyjs/helper-numbers": "1.11.6", "@webassemblyjs/helper-wasm-bytecode": "1.11.6" @@ -1186,29 +1165,25 @@ "version": "1.11.6", "resolved": "https://registry.npmjs.org/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.11.6.tgz", "integrity": "sha512-ejAj9hfRJ2XMsNHk/v6Fu2dGS+i4UaXBXGemOfQ/JfQ6mdQg/WXtwleQRLLS4OvfDhv8rYnVwH27YJLMyYsxhw==", - "dev": true, - "license": "MIT" + "dev": true }, "node_modules/@webassemblyjs/helper-api-error": { "version": "1.11.6", "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-api-error/-/helper-api-error-1.11.6.tgz", "integrity": "sha512-o0YkoP4pVu4rN8aTJgAyj9hC2Sv5UlkzCHhxqWj8butaLvnpdc2jOwh4ewE6CX0txSfLn/UYaV/pheS2Txg//Q==", - "dev": true, - "license": "MIT" + "dev": true }, "node_modules/@webassemblyjs/helper-buffer": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.11.6.tgz", - "integrity": "sha512-z3nFzdcp1mb8nEOFFk8DrYLpHvhKC3grJD2ardfKOzmbmJvEf/tPIqCY+sNcwZIY8ZD7IkB2l7/pqhUhqm7hLA==", - "dev": true, - "license": "MIT" + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.12.1.tgz", + "integrity": "sha512-nzJwQw99DNDKr9BVCOZcLuJJUlqkJh+kVzVl6Fmq/tI5ZtEyWT1KZMyOXltXLZJmDtvLCDgwsyrkohEtopTXCw==", + "dev": true }, "node_modules/@webassemblyjs/helper-numbers": { "version": "1.11.6", "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-numbers/-/helper-numbers-1.11.6.tgz", "integrity": "sha512-vUIhZ8LZoIWHBohiEObxVm6hwP034jwmc9kuq5GdHZH0wiLVLIPcMCdpJzG4C11cHoQ25TFIQj9kaVADVX7N3g==", "dev": true, - "license": "MIT", "dependencies": { "@webassemblyjs/floating-point-hex-parser": "1.11.6", "@webassemblyjs/helper-api-error": "1.11.6", @@ -1219,20 +1194,18 @@ "version": "1.11.6", "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.11.6.tgz", "integrity": "sha512-sFFHKwcmBprO9e7Icf0+gddyWYDViL8bpPjJJl0WHxCdETktXdmtWLGVzoHbqUcY4Be1LkNfwTmXOJUFZYSJdA==", - "dev": true, - "license": "MIT" + "dev": true }, "node_modules/@webassemblyjs/helper-wasm-section": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.11.6.tgz", - "integrity": "sha512-LPpZbSOwTpEC2cgn4hTydySy1Ke+XEu+ETXuoyvuyezHO3Kjdu90KK95Sh9xTbmjrCsUwvWwCOQQNta37VrS9g==", + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.12.1.tgz", + "integrity": "sha512-Jif4vfB6FJlUlSbgEMHUyk1j234GTNG9dBJ4XJdOySoj518Xj0oGsNi59cUQF4RRMS9ouBUxDDdyBVfPTypa5g==", "dev": true, - "license": "MIT", "dependencies": { - "@webassemblyjs/ast": "1.11.6", - "@webassemblyjs/helper-buffer": "1.11.6", + "@webassemblyjs/ast": "1.12.1", + "@webassemblyjs/helper-buffer": "1.12.1", "@webassemblyjs/helper-wasm-bytecode": "1.11.6", - "@webassemblyjs/wasm-gen": "1.11.6" + "@webassemblyjs/wasm-gen": "1.12.1" } }, "node_modules/@webassemblyjs/ieee754": { @@ -1240,7 +1213,6 @@ "resolved": "https://registry.npmjs.org/@webassemblyjs/ieee754/-/ieee754-1.11.6.tgz", "integrity": "sha512-LM4p2csPNvbij6U1f19v6WR56QZ8JcHg3QIJTlSwzFcmx6WSORicYj6I63f9yU1kEUtrpG+kjkiIAkevHpDXrg==", "dev": true, - "license": "MIT", "dependencies": { "@xtuc/ieee754": "^1.2.0" } @@ -1250,7 +1222,6 @@ "resolved": "https://registry.npmjs.org/@webassemblyjs/leb128/-/leb128-1.11.6.tgz", "integrity": "sha512-m7a0FhE67DQXgouf1tbN5XQcdWoNgaAuoULHIfGFIEVKA6tu/edls6XnIlkmS6FrXAquJRPni3ZZKjw6FSPjPQ==", "dev": true, - "license": "Apache-2.0", "dependencies": { "@xtuc/long": "4.2.2" } @@ -1259,34 +1230,31 @@ "version": "1.11.6", "resolved": "https://registry.npmjs.org/@webassemblyjs/utf8/-/utf8-1.11.6.tgz", "integrity": "sha512-vtXf2wTQ3+up9Zsg8sa2yWiQpzSsMyXj0qViVP6xKGCUT8p8YJ6HqI7l5eCnWx1T/FYdsv07HQs2wTFbbof/RA==", - "dev": true, - "license": "MIT" + "dev": true }, "node_modules/@webassemblyjs/wasm-edit": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.11.6.tgz", - "integrity": "sha512-Ybn2I6fnfIGuCR+Faaz7YcvtBKxvoLV3Lebn1tM4o/IAJzmi9AWYIPWpyBfU8cC+JxAO57bk4+zdsTjJR+VTOw==", + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.12.1.tgz", + "integrity": "sha512-1DuwbVvADvS5mGnXbE+c9NfA8QRcZ6iKquqjjmR10k6o+zzsRVesil54DKexiowcFCPdr/Q0qaMgB01+SQ1u6g==", "dev": true, - "license": "MIT", "dependencies": { - "@webassemblyjs/ast": "1.11.6", - "@webassemblyjs/helper-buffer": "1.11.6", + "@webassemblyjs/ast": "1.12.1", + "@webassemblyjs/helper-buffer": "1.12.1", "@webassemblyjs/helper-wasm-bytecode": "1.11.6", - "@webassemblyjs/helper-wasm-section": "1.11.6", - "@webassemblyjs/wasm-gen": "1.11.6", - "@webassemblyjs/wasm-opt": "1.11.6", - "@webassemblyjs/wasm-parser": "1.11.6", - "@webassemblyjs/wast-printer": "1.11.6" + "@webassemblyjs/helper-wasm-section": "1.12.1", + "@webassemblyjs/wasm-gen": "1.12.1", + "@webassemblyjs/wasm-opt": "1.12.1", + "@webassemblyjs/wasm-parser": "1.12.1", + "@webassemblyjs/wast-printer": "1.12.1" } }, "node_modules/@webassemblyjs/wasm-gen": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.11.6.tgz", - "integrity": "sha512-3XOqkZP/y6B4F0PBAXvI1/bky7GryoogUtfwExeP/v7Nzwo1QLcq5oQmpKlftZLbT+ERUOAZVQjuNVak6UXjPA==", + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.12.1.tgz", + "integrity": "sha512-TDq4Ojh9fcohAw6OIMXqiIcTq5KUXTGRkVxbSo1hQnSy6lAM5GSdfwWeSxpAo0YzgsgF182E/U0mDNhuA0tW7w==", "dev": true, - "license": "MIT", "dependencies": { - "@webassemblyjs/ast": "1.11.6", + "@webassemblyjs/ast": "1.12.1", "@webassemblyjs/helper-wasm-bytecode": "1.11.6", "@webassemblyjs/ieee754": "1.11.6", "@webassemblyjs/leb128": "1.11.6", @@ -1294,26 +1262,24 @@ } }, "node_modules/@webassemblyjs/wasm-opt": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.11.6.tgz", - "integrity": "sha512-cOrKuLRE7PCe6AsOVl7WasYf3wbSo4CeOk6PkrjS7g57MFfVUF9u6ysQBBODX0LdgSvQqRiGz3CXvIDKcPNy4g==", + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.12.1.tgz", + "integrity": "sha512-Jg99j/2gG2iaz3hijw857AVYekZe2SAskcqlWIZXjji5WStnOpVoat3gQfT/Q5tb2djnCjBtMocY/Su1GfxPBg==", "dev": true, - "license": "MIT", "dependencies": { - "@webassemblyjs/ast": "1.11.6", - "@webassemblyjs/helper-buffer": "1.11.6", - "@webassemblyjs/wasm-gen": "1.11.6", - "@webassemblyjs/wasm-parser": "1.11.6" + "@webassemblyjs/ast": "1.12.1", + "@webassemblyjs/helper-buffer": "1.12.1", + "@webassemblyjs/wasm-gen": "1.12.1", + "@webassemblyjs/wasm-parser": "1.12.1" } }, "node_modules/@webassemblyjs/wasm-parser": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.11.6.tgz", - "integrity": "sha512-6ZwPeGzMJM3Dqp3hCsLgESxBGtT/OeCvCZ4TA1JUPYgmhAx38tTPR9JaKy0S5H3evQpO/h2uWs2j6Yc/fjkpTQ==", + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.12.1.tgz", + "integrity": "sha512-xikIi7c2FHXysxXe3COrVUPSheuBtpcfhbpFj4gmu7KRLYOzANztwUU0IbsqvMqzuNK2+glRGWCEqZo1WCLyAQ==", "dev": true, - "license": "MIT", "dependencies": { - "@webassemblyjs/ast": "1.11.6", + "@webassemblyjs/ast": "1.12.1", "@webassemblyjs/helper-api-error": "1.11.6", "@webassemblyjs/helper-wasm-bytecode": "1.11.6", "@webassemblyjs/ieee754": "1.11.6", @@ -1322,13 +1288,12 @@ } }, "node_modules/@webassemblyjs/wast-printer": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.11.6.tgz", - "integrity": "sha512-JM7AhRcE+yW2GWYaKeHL5vt4xqee5N2WcezptmgyhNS+ScggqcT1OtXykhAb13Sn5Yas0j2uv9tHgrjwvzAP4A==", + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.12.1.tgz", + "integrity": "sha512-+X4WAlOisVWQMikjbcvY2e0rwPsKQ9F688lksZhBcPycBBuii3O7m8FACbDMWDojpAqvjIncrG8J0XHKyQfVeA==", "dev": true, - "license": "MIT", "dependencies": { - "@webassemblyjs/ast": "1.11.6", + "@webassemblyjs/ast": "1.12.1", "@xtuc/long": "4.2.2" } }, @@ -1383,15 +1348,13 @@ "version": "1.2.0", "resolved": "https://registry.npmjs.org/@xtuc/ieee754/-/ieee754-1.2.0.tgz", "integrity": "sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA==", - "dev": true, - "license": "BSD-3-Clause" + "dev": true }, "node_modules/@xtuc/long": { "version": "4.2.2", "resolved": "https://registry.npmjs.org/@xtuc/long/-/long-4.2.2.tgz", "integrity": "sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ==", - "dev": true, - "license": "Apache-2.0" + "dev": true }, "node_modules/acorn": { "version": "8.8.2", @@ -1406,12 +1369,11 @@ "node": ">=0.4.0" } }, - "node_modules/acorn-import-assertions": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/acorn-import-assertions/-/acorn-import-assertions-1.9.0.tgz", - "integrity": "sha512-cmMwop9x+8KFhxvKrKfPYmN6/pKTYYHBqLa0DfvVZcKMJWNyWLnaqND7dx/qn66R7ewM1UX5XMaDVP5wlVTaVA==", + "node_modules/acorn-import-attributes": { + "version": "1.9.5", + "resolved": "https://registry.npmjs.org/acorn-import-attributes/-/acorn-import-attributes-1.9.5.tgz", + "integrity": "sha512-n02Vykv5uA3eHGM/Z2dQrcD56kL8TyDb2p1+0P83PClMnC/nc+anbQRhIOWnSq4Ke/KvDPrY3C9hDtC/A3eHnQ==", "dev": true, - "license": "MIT", "peerDependencies": { "acorn": "^8" } @@ -1460,7 +1422,6 @@ "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz", "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==", "dev": true, - "license": "MIT", "peerDependencies": { "ajv": "^6.9.1" } @@ -1578,15 +1539,14 @@ } }, "node_modules/asn1.js": { - "version": "5.4.1", - "resolved": "https://registry.npmjs.org/asn1.js/-/asn1.js-5.4.1.tgz", - "integrity": "sha512-+I//4cYPccV8LdmBLiX8CYvf9Sp3vQsrqu2QNXRcrbiWvcx/UdlFiqUJJzxRQxgsZmvhXhn4cSKeSmoFjVdupA==", + "version": "4.10.1", + "resolved": "https://registry.npmjs.org/asn1.js/-/asn1.js-4.10.1.tgz", + "integrity": "sha512-p32cOF5q0Zqs9uBiONKYLm6BClCoBCM5O9JfeUSlnQLBTxYdTK+pW+nXflm8UkKd2UYlEbYz5qEi0JuZR9ckSw==", "dev": true, "dependencies": { "bn.js": "^4.0.0", "inherits": "^2.0.1", - "minimalistic-assert": "^1.0.0", - "safer-buffer": "^2.1.0" + "minimalistic-assert": "^1.0.0" } }, "node_modules/asn1.js/node_modules/bn.js": { @@ -1701,13 +1661,12 @@ } }, "node_modules/braces": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", "dev": true, - "license": "MIT", "dependencies": { - "fill-range": "^7.0.1" + "fill-range": "^7.1.1" }, "engines": { "node": ">=8" @@ -1783,26 +1742,79 @@ } }, "node_modules/browserify-sign": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/browserify-sign/-/browserify-sign-4.2.1.tgz", - "integrity": "sha512-/vrA5fguVAKKAVTNJjgSm1tRQDHUU6DbwO9IROu/0WAzC8PKhucDSh18J0RMvVeHAn5puMd+QHC2erPRNf8lmg==", + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/browserify-sign/-/browserify-sign-4.2.3.tgz", + "integrity": "sha512-JWCZW6SKhfhjJxO8Tyiiy+XYB7cqd2S5/+WeYHsKdNKFlCBhKbblba1A/HN/90YwtxKc8tCErjffZl++UNmGiw==", "dev": true, "dependencies": { - "bn.js": "^5.1.1", - "browserify-rsa": "^4.0.1", + "bn.js": "^5.2.1", + "browserify-rsa": "^4.1.0", "create-hash": "^1.2.0", "create-hmac": "^1.1.7", - "elliptic": "^6.5.3", + "elliptic": "^6.5.5", + "hash-base": "~3.0", "inherits": "^2.0.4", - "parse-asn1": "^5.1.5", - "readable-stream": "^3.6.0", - "safe-buffer": "^5.2.0" + "parse-asn1": "^5.1.7", + "readable-stream": "^2.3.8", + "safe-buffer": "^5.2.1" + }, + "engines": { + "node": ">= 0.12" } }, + "node_modules/browserify-sign/node_modules/hash-base": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.0.4.tgz", + "integrity": "sha512-EeeoJKjTyt868liAlVmcv2ZsUfGHlE3Q+BICOXcZiwN3osr5Q/zFGYmTJpoIzuaSTAwndFy+GqhEwlU4L3j4Ow==", + "dev": true, + "dependencies": { + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/browserify-sign/node_modules/readable-stream": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz", + "integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==", + "dev": true, + "dependencies": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "node_modules/browserify-sign/node_modules/readable-stream/node_modules/safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true + }, + "node_modules/browserify-sign/node_modules/string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "dependencies": { + "safe-buffer": "~5.1.0" + } + }, + "node_modules/browserify-sign/node_modules/string_decoder/node_modules/safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true + }, "node_modules/browserslist": { - "version": "4.21.7", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.21.7.tgz", - "integrity": "sha512-BauCXrQ7I2ftSqd2mvKHGo85XR0u7Ru3C/Hxsy/0TkfCtjrmAbPdzLGasmoiBxplpDXlPvdjX9u7srIMfgasNA==", + "version": "4.24.0", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.24.0.tgz", + "integrity": "sha512-Rmb62sR1Zpjql25eSanFGEhAxcFwfA1K0GuQcLoaJBAcENegrQut3hYdhXFF1obQfiDyqIW/cLM5HSJ/9k884A==", "dev": true, "funding": [ { @@ -1818,12 +1830,11 @@ "url": "https://github.com/sponsors/ai" } ], - "license": "MIT", "dependencies": { - "caniuse-lite": "^1.0.30001489", - "electron-to-chromium": "^1.4.411", - "node-releases": "^2.0.12", - "update-browserslist-db": "^1.0.11" + "caniuse-lite": "^1.0.30001663", + "electron-to-chromium": "^1.5.28", + "node-releases": "^2.0.18", + "update-browserslist-db": "^1.1.0" }, "bin": { "browserslist": "cli.js" @@ -1860,8 +1871,7 @@ "version": "1.1.2", "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", - "dev": true, - "license": "MIT" + "dev": true }, "node_modules/buffer-xor": { "version": "1.0.3", @@ -1935,9 +1945,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001491", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001491.tgz", - "integrity": "sha512-17EYIi4TLnPiTzVKMveIxU5ETlxbSO3B6iPvMbprqnKh4qJsQGk5Nh1Lp4jIMAE0XfrujsJuWZAM3oJdMHaKBA==", + "version": "1.0.30001667", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001667.tgz", + "integrity": "sha512-7LTwJjcRkzKFmtqGsibMeuXmvFDfZq/nzIjnmgCGzKKRVzjD72selLDK1oPF/Oxzmt4fNcPvTDvGqSDG4tCALw==", "dev": true, "funding": [ { @@ -1952,8 +1962,7 @@ "type": "github", "url": "https://github.com/sponsors/ai" } - ], - "license": "CC-BY-4.0" + ] }, "node_modules/chalk": { "version": "2.4.2", @@ -2040,6 +2049,14 @@ "dev": true, "license": "MIT" }, + "node_modules/chevrotain": { + "version": "4.8.1", + "resolved": "https://registry.npmjs.org/chevrotain/-/chevrotain-4.8.1.tgz", + "integrity": "sha512-Dd2oHFdscdm8MSmG0ejTXdMlqKR5ryeKuwLpsf1ZOs3l8HD/jPfIY0MYs9Eh4X3gm9h0CR155zpVYFK+uAI3tA==", + "dependencies": { + "regexp-to-ast": "0.4.0" + } + }, "node_modules/chokidar": { "version": "3.6.0", "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz", @@ -2522,16 +2539,15 @@ "license": "MIT" }, "node_modules/electron-to-chromium": { - "version": "1.4.414", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.414.tgz", - "integrity": "sha512-RRuCvP6ekngVh2SAJaOKT/hxqc9JAsK+Pe0hP5tGQIfonU2Zy9gMGdJ+mBdyl/vNucMG6gkXYtuM4H/1giws5w==", - "dev": true, - "license": "ISC" + "version": "1.5.33", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.33.tgz", + "integrity": "sha512-+cYTcFB1QqD4j4LegwLfpCNxifb6dDFUAwk6RsLusCwIaZI6or2f+q8rs5tTB2YC53HhOlIbEaqHMAAC8IOIwA==", + "dev": true }, "node_modules/elliptic": { - "version": "6.5.4", - "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.4.tgz", - "integrity": "sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ==", + "version": "6.5.7", + "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.7.tgz", + "integrity": "sha512-ESVCtTwiA+XhY3wyh24QqRGBoP3rEdDUl3EDUUo9tft074fi19IrdpH7hLCMMP3CIj7jb3W96rn8lt/BqIlt5Q==", "dev": true, "dependencies": { "bn.js": "^4.11.9", @@ -2557,11 +2573,10 @@ "license": "MIT" }, "node_modules/enhanced-resolve": { - "version": "5.14.1", - "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.14.1.tgz", - "integrity": "sha512-Vklwq2vDKtl0y/vtwjSesgJ5MYS7Etuk5txS8VdKL4AOS1aUlD96zqIfsOSLQsdv3xgMRbtkWM8eG9XDfKUPow==", + "version": "5.17.1", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.17.1.tgz", + "integrity": "sha512-LMHl3dXhTcfv8gM4kEzIUeTQ+7fpdA0l2tUf34BddXPkz2A5xJ5L/Pchd5BL6rdccM9QGvu0sWZzK1Z1t4wwyg==", "dev": true, - "license": "MIT", "dependencies": { "graceful-fs": "^4.2.4", "tapable": "^2.2.0" @@ -2751,11 +2766,10 @@ } }, "node_modules/escalade": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", - "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz", + "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==", "dev": true, - "license": "MIT", "engines": { "node": ">=6" } @@ -3203,11 +3217,10 @@ } }, "node_modules/fill-range": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", "dev": true, - "license": "MIT", "dependencies": { "to-regex-range": "^5.0.1" }, @@ -3464,8 +3477,7 @@ "version": "0.4.1", "resolved": "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz", "integrity": "sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==", - "dev": true, - "license": "BSD-2-Clause" + "dev": true }, "node_modules/glob/node_modules/minimatch": { "version": "9.0.1", @@ -4154,7 +4166,6 @@ "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", "dev": true, - "license": "MIT", "engines": { "node": ">=0.12.0" } @@ -4384,7 +4395,6 @@ "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-27.5.1.tgz", "integrity": "sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg==", "dev": true, - "license": "MIT", "dependencies": { "@types/node": "*", "merge-stream": "^2.0.0", @@ -4577,6 +4587,21 @@ "node": ">=8" } }, + "node_modules/lodash.every": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/lodash.every/-/lodash.every-4.6.0.tgz", + "integrity": "sha512-isF82d+65/sNvQ3aaQAW7LLHnnTxSN/2fm4rhYyuufLzA4VtHz6y6S5vFwe6PQVr2xdqUOyxBbTNKDpnmeu50w==" + }, + "node_modules/lodash.includes": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/lodash.includes/-/lodash.includes-4.3.0.tgz", + "integrity": "sha512-W3Bx6mdkRTGtlJISOvVD/lbqjTlPPUDTMnlXZFnVwi9NKJ6tiAk6LVdlhZMm17VZisqhKcgzpO5Wz91PCt5b0w==" + }, + "node_modules/lodash.last": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/lodash.last/-/lodash.last-3.0.0.tgz", + "integrity": "sha512-14mq7rSkCxG4XMy9lF2FbIOqqgF0aH0NfPuQ3LPR3vIh0kHnUvIYP70dqa1Hf47zyXfQ8FzAg0MYOQeSuE1R7A==" + }, "node_modules/lodash.merge": { "version": "4.6.2", "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", @@ -4635,19 +4660,6 @@ "node": ">=8" } }, - "node_modules/lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "dev": true, - "license": "ISC", - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/map-obj": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-1.0.1.tgz", @@ -4699,8 +4711,7 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", - "dev": true, - "license": "MIT" + "dev": true }, "node_modules/merge2": { "version": "1.4.1", @@ -4713,13 +4724,12 @@ } }, "node_modules/micromatch": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", - "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", + "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", "dev": true, - "license": "MIT", "dependencies": { - "braces": "^3.0.2", + "braces": "^3.0.3", "picomatch": "^2.3.1" }, "engines": { @@ -5023,6 +5033,14 @@ "node": ">=10" } }, + "node_modules/moment": { + "version": "2.30.1", + "resolved": "https://registry.npmjs.org/moment/-/moment-2.30.1.tgz", + "integrity": "sha512-uEmtNhbDOrWPFS+hdjFCBfy9f2YoyzRpwcl+DqpC6taX21FzsTLQVbMV/W7PzNSX6x/bhC1zA3c2UQ5NzH6how==", + "engines": { + "node": "*" + } + }, "node_modules/ms": { "version": "2.1.3", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", @@ -5051,11 +5069,10 @@ "license": "MIT" }, "node_modules/node-releases": { - "version": "2.0.12", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.12.tgz", - "integrity": "sha512-QzsYKWhXTWx8h1kIvqfnC++o0pEmpRQA/aenALsL2F4pqNVr7YzcdMlDij5WBnwftRbJCNJL/O7zdKaxKPHqgQ==", - "dev": true, - "license": "MIT" + "version": "2.0.18", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.18.tgz", + "integrity": "sha512-d9VeXT4SJ7ZeOqGX6R5EM022wpL+eWPooLI+5UpWn2jCT1aosUQEhQP214x33Wkwx3JQMvIm+tIoVOdodFS40g==", + "dev": true }, "node_modules/normalize-package-data": { "version": "2.5.0", @@ -5396,16 +5413,33 @@ } }, "node_modules/parse-asn1": { - "version": "5.1.6", - "resolved": "https://registry.npmjs.org/parse-asn1/-/parse-asn1-5.1.6.tgz", - "integrity": "sha512-RnZRo1EPU6JBnra2vGHj0yhp6ebyjBZpmUCLHWiFhxlzvBCCpAuZ7elsBp1PVAbQN0/04VD/19rfzlBSwLstMw==", + "version": "5.1.7", + "resolved": "https://registry.npmjs.org/parse-asn1/-/parse-asn1-5.1.7.tgz", + "integrity": "sha512-CTM5kuWR3sx9IFamcl5ErfPl6ea/N8IYwiJ+vpeB2g+1iknv7zBl5uPwbMbRVznRVbrNY6lGuDoE5b30grmbqg==", "dev": true, "dependencies": { - "asn1.js": "^5.2.0", - "browserify-aes": "^1.0.0", - "evp_bytestokey": "^1.0.0", - "pbkdf2": "^3.0.3", - "safe-buffer": "^5.1.1" + "asn1.js": "^4.10.1", + "browserify-aes": "^1.2.0", + "evp_bytestokey": "^1.0.3", + "hash-base": "~3.0", + "pbkdf2": "^3.1.2", + "safe-buffer": "^5.2.1" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/parse-asn1/node_modules/hash-base": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.0.4.tgz", + "integrity": "sha512-EeeoJKjTyt868liAlVmcv2ZsUfGHlE3Q+BICOXcZiwN3osr5Q/zFGYmTJpoIzuaSTAwndFy+GqhEwlU4L3j4Ow==", + "dev": true, + "dependencies": { + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + }, + "engines": { + "node": ">=4" } }, "node_modules/parse-json": { @@ -5525,11 +5559,10 @@ } }, "node_modules/picocolors": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", - "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==", - "dev": true, - "license": "ISC" + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.0.tgz", + "integrity": "sha512-TQ92mBOW0l3LeMeyLV6mzy/kWr8lkd/hp3mTg7wYK7zJhuBStmGMBG0BdeDZS/dZx1IukaX6Bk11zcln25o1Aw==", + "dev": true }, "node_modules/picomatch": { "version": "2.3.1", @@ -5908,6 +5941,11 @@ "dev": true, "license": "MIT" }, + "node_modules/regexp-to-ast": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/regexp-to-ast/-/regexp-to-ast-0.4.0.tgz", + "integrity": "sha512-4qf/7IsIKfSNHQXSwial1IFmfM1Cc/whNBQqRwe0V2stPe7KmN1U0tWQiIx6JiirgSrisjE0eECdNf7Tav1Ntw==" + }, "node_modules/regexp.prototype.flags": { "version": "1.5.0", "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.0.tgz", @@ -6125,12 +6163,16 @@ "dev": true, "license": "MIT" }, + "node_modules/sax": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/sax/-/sax-1.4.1.tgz", + "integrity": "sha512-+aWOz7yVScEGoKNd4PA10LZ8sk0A/z5+nXQG5giUO5rprX9jgYsTdov9qCchZiPIZezbZH+jRut8nPodFAX4Jg==" + }, "node_modules/schema-utils": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.1.2.tgz", - "integrity": "sha512-pvjEHOgWc9OWA/f/DE3ohBWTD6EleVLf7iFUkoSwAxttdBhB9QUebQgxER2kWueOvRJXPHNnyrvvh9eZINB8Eg==", + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.3.0.tgz", + "integrity": "sha512-pN/yOAvcC+5rQ5nERGuwrjLlYvLTbCibnZ1I7B1LaiAz9BRBlE9GMgE/eqV30P7aJQUf7Ddimy/RsbYO/GrVGg==", "dev": true, - "license": "MIT", "dependencies": { "@types/json-schema": "^7.0.8", "ajv": "^6.12.5", @@ -6145,11 +6187,10 @@ } }, "node_modules/semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", "dev": true, - "license": "ISC", "bin": { "semver": "bin/semver" } @@ -6340,7 +6381,6 @@ "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", "dev": true, - "license": "BSD-3-Clause", "engines": { "node": ">=0.10.0" } @@ -6350,7 +6390,6 @@ "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz", "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==", "dev": true, - "license": "MIT", "dependencies": { "buffer-from": "^1.0.0", "source-map": "^0.6.0" @@ -6715,14 +6754,13 @@ } }, "node_modules/terser": { - "version": "5.17.6", - "resolved": "https://registry.npmjs.org/terser/-/terser-5.17.6.tgz", - "integrity": "sha512-V8QHcs8YuyLkLHsJO5ucyff1ykrLVsR4dNnS//L5Y3NiSXpbK1J+WMVUs67eI0KTxs9JtHhgEQpXQVHlHI92DQ==", + "version": "5.34.1", + "resolved": "https://registry.npmjs.org/terser/-/terser-5.34.1.tgz", + "integrity": "sha512-FsJZ7iZLd/BXkz+4xrRTGJ26o/6VTjQytUk8b8OxkwcD2I+79VPJlz7qss1+zE7h8GNIScFqXcDyJ/KqBYZFVA==", "dev": true, - "license": "BSD-2-Clause", "dependencies": { - "@jridgewell/source-map": "^0.3.2", - "acorn": "^8.5.0", + "@jridgewell/source-map": "^0.3.3", + "acorn": "^8.8.2", "commander": "^2.20.0", "source-map-support": "~0.5.20" }, @@ -6734,17 +6772,16 @@ } }, "node_modules/terser-webpack-plugin": { - "version": "5.3.9", - "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-5.3.9.tgz", - "integrity": "sha512-ZuXsqE07EcggTWQjXUj+Aot/OMcD0bMKGgF63f7UxYcu5/AJF53aIpK1YoP5xR9l6s/Hy2b+t1AM0bLNPRuhwA==", + "version": "5.3.10", + "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-5.3.10.tgz", + "integrity": "sha512-BKFPWlPDndPs+NGGCr1U59t0XScL5317Y0UReNrHaw9/FwhPENlq6bfgs+4yPfyP51vqC1bQ4rp1EfXW5ZSH9w==", "dev": true, - "license": "MIT", "dependencies": { - "@jridgewell/trace-mapping": "^0.3.17", + "@jridgewell/trace-mapping": "^0.3.20", "jest-worker": "^27.4.5", "schema-utils": "^3.1.1", "serialize-javascript": "^6.0.1", - "terser": "^5.16.8" + "terser": "^5.26.0" }, "engines": { "node": ">= 10.13.0" @@ -6772,8 +6809,7 @@ "version": "2.20.3", "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", - "dev": true, - "license": "MIT" + "dev": true }, "node_modules/text-table": { "version": "0.2.0", @@ -6782,6 +6818,18 @@ "dev": true, "license": "MIT" }, + "node_modules/timers-browserify": { + "version": "2.0.12", + "resolved": "https://registry.npmjs.org/timers-browserify/-/timers-browserify-2.0.12.tgz", + "integrity": "sha512-9phl76Cqm6FhSX9Xe1ZUAMLtm1BLkKj2Qd5ApyWkXzsMRaA7dgr81kf4wJmQf/hAvg8EEyJxDo3du/0KlhPiKQ==", + "dev": true, + "dependencies": { + "setimmediate": "^1.0.4" + }, + "engines": { + "node": ">=0.6.0" + } + }, "node_modules/tmp": { "version": "0.0.33", "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", @@ -6800,7 +6848,6 @@ "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", "dev": true, - "license": "MIT", "dependencies": { "is-number": "^7.0.0" }, @@ -6855,14 +6902,10 @@ } }, "node_modules/ts-loader/node_modules/semver": { - "version": "7.5.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.1.tgz", - "integrity": "sha512-Wvss5ivl8TMRZXXESstBA4uR5iXgEN/VC5/sOcuXdVLzcdkz4HWetIoRfG5gb5X+ij/G9rw9YoGn3QoQ8OCSpw==", + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", + "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", "dev": true, - "license": "ISC", - "dependencies": { - "lru-cache": "^6.0.0" - }, "bin": { "semver": "bin/semver.js" }, @@ -7107,9 +7150,9 @@ } }, "node_modules/update-browserslist-db": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.11.tgz", - "integrity": "sha512-dCwEFf0/oT85M1fHBg4F0jtLwJrutGoHSQXCh7u4o2t1drG+c0a9Flnqww6XUKSfQMPpJBRjU8d4RXB09qtvaA==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.1.1.tgz", + "integrity": "sha512-R8UzCaa9Az+38REPiJ1tXlImTJXlVfgHZsglwBD/k6nj76ctsH1E3q4doGrukiLQd3sGQYu56r5+lo5r94l29A==", "dev": true, "funding": [ { @@ -7125,10 +7168,9 @@ "url": "https://github.com/sponsors/ai" } ], - "license": "MIT", "dependencies": { - "escalade": "^3.1.1", - "picocolors": "^1.0.0" + "escalade": "^3.2.0", + "picocolors": "^1.1.0" }, "bin": { "update-browserslist-db": "cli.js" @@ -7179,11 +7221,10 @@ } }, "node_modules/watchpack": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.4.0.tgz", - "integrity": "sha512-Lcvm7MGST/4fup+ifyKi2hjyIAwcdI4HRgtvTpIUxBRhB+RFtUh8XtDOxUfctVCnhVi+QQj49i91OyvzkJl6cg==", + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.4.2.tgz", + "integrity": "sha512-TnbFSbcOCcDgjZ4piURLCbJ3nJhznVh9kw6F6iokjiFPl8ONxe9A6nMDVXDiNbrSfLILs6vB07F7wLBrwPYzJw==", "dev": true, - "license": "MIT", "dependencies": { "glob-to-regexp": "^0.4.1", "graceful-fs": "^4.1.2" @@ -7203,35 +7244,33 @@ } }, "node_modules/webpack": { - "version": "5.84.1", - "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.84.1.tgz", - "integrity": "sha512-ZP4qaZ7vVn/K8WN/p990SGATmrL1qg4heP/MrVneczYtpDGJWlrgZv55vxaV2ul885Kz+25MP2kSXkPe3LZfmg==", + "version": "5.95.0", + "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.95.0.tgz", + "integrity": "sha512-2t3XstrKULz41MNMBF+cJ97TyHdyQ8HCt//pqErqDvNjU9YQBnZxIHa11VXsi7F3mb5/aO2tuDxdeTPdU7xu9Q==", "dev": true, - "license": "MIT", "dependencies": { - "@types/eslint-scope": "^3.7.3", - "@types/estree": "^1.0.0", - "@webassemblyjs/ast": "^1.11.5", - "@webassemblyjs/wasm-edit": "^1.11.5", - "@webassemblyjs/wasm-parser": "^1.11.5", + "@types/estree": "^1.0.5", + "@webassemblyjs/ast": "^1.12.1", + "@webassemblyjs/wasm-edit": "^1.12.1", + "@webassemblyjs/wasm-parser": "^1.12.1", "acorn": "^8.7.1", - "acorn-import-assertions": "^1.9.0", - "browserslist": "^4.14.5", + "acorn-import-attributes": "^1.9.5", + "browserslist": "^4.21.10", "chrome-trace-event": "^1.0.2", - "enhanced-resolve": "^5.14.1", + "enhanced-resolve": "^5.17.1", "es-module-lexer": "^1.2.1", "eslint-scope": "5.1.1", "events": "^3.2.0", "glob-to-regexp": "^0.4.1", - "graceful-fs": "^4.2.9", + "graceful-fs": "^4.2.11", "json-parse-even-better-errors": "^2.3.1", "loader-runner": "^4.2.0", "mime-types": "^2.1.27", "neo-async": "^2.6.2", - "schema-utils": "^3.1.2", + "schema-utils": "^3.2.0", "tapable": "^2.1.1", - "terser-webpack-plugin": "^5.3.7", - "watchpack": "^2.4.0", + "terser-webpack-plugin": "^5.3.10", + "watchpack": "^2.4.1", "webpack-sources": "^3.2.3" }, "bin": { @@ -7403,11 +7442,10 @@ "license": "MIT" }, "node_modules/word-wrap": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", - "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz", + "integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==", "dev": true, - "license": "MIT", "engines": { "node": ">=0.10.0" } @@ -7529,6 +7567,26 @@ "dev": true, "license": "ISC" }, + "node_modules/xml2js": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.6.2.tgz", + "integrity": "sha512-T4rieHaC1EXcES0Kxxj4JWgaUQHDk+qwHcYOCFHfiwKz7tOVPLq7Hjq9dM1WCMhylqMEfP7hMcOIChvotiZegA==", + "dependencies": { + "sax": ">=0.6.0", + "xmlbuilder": "~11.0.0" + }, + "engines": { + "node": ">=4.0.0" + } + }, + "node_modules/xmlbuilder": { + "version": "11.0.1", + "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-11.0.1.tgz", + "integrity": "sha512-fDlsI/kFEx7gLvbecc0/ohLG50fugQp8ryHzMTuW9vSa1GJ0XYWKnhsUx7oie3G98+r56aTQIUB4kht42R3JvA==", + "engines": { + "node": ">=4.0" + } + }, "node_modules/y18n": { "version": "5.0.8", "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", @@ -7539,13 +7597,6 @@ "node": ">=10" } }, - "node_modules/yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true, - "license": "ISC" - }, "node_modules/yargs": { "version": "16.2.0", "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", diff --git a/package.json b/package.json index 0dbef54..1861ade 100644 --- a/package.json +++ b/package.json @@ -95,6 +95,12 @@ } ] }, + "submenus": [ + { + "id": "import.submenu", + "label": "Import Session" + } + ], "commands": [ { "command": "terminal-keeper.generate", @@ -170,9 +176,81 @@ { "command": "terminal-keeper.help-and-feedback-activity", "title": "Help & Feedback" + }, + { + "command": "terminal-keeper.import-from-npm", + "title": "From npm (e.g. package.json)" + }, + { + "command": "terminal-keeper.import-from-composer", + "title": "From composer (e.g. composer.json)" + }, + { + "command": "terminal-keeper.import-from-make", + "title": "From makefile (e.g. Makefile, makefile)" + }, + { + "command": "terminal-keeper.import-from-gradle", + "title": "From gradle (e.g. build.gradle, test.gradle)" + }, + { + "command": "terminal-keeper.import-from-pipenv", + "title": "From pipenv (e.g. Pipfile, pipfile)" + }, + { + "command": "terminal-keeper.import-from-ant", + "title": "From ant (e.g. build.xml)" + }, + { + "command": "terminal-keeper.import-from-grunt", + "title": "From grunt (e.g. GRUNTFILE.JS)" + }, + { + "command": "terminal-keeper.import-from-gulp", + "title": "From gulp (e.g. gulpfile.mjs, gulpfile.js, GULPFILE.js)" } ], "menus": { + "import.submenu": [ + { + "command": "terminal-keeper.import-from-npm", + "group": "source@1" + }, + { + "command": "terminal-keeper.import-from-composer", + "group": "source@2" + }, + { + "command": "terminal-keeper.import-from-make", + "group": "source@3" + }, + { + "command": "terminal-keeper.import-from-gradle", + "group": "source@4" + }, + { + "command": "terminal-keeper.import-from-pipenv", + "group": "source@5" + }, + { + "command": "terminal-keeper.import-from-ant", + "group": "source@6" + }, + { + "command": "terminal-keeper.import-from-grunt", + "group": "source@7" + }, + { + "command": "terminal-keeper.import-from-gulp", + "group": "source@8" + } + ], + "editor/context": [ + { + "submenu": "import.submenu", + "group": "import" + } + ], "view/title": [ { "command": "terminal-keeper.active", @@ -210,15 +288,20 @@ "group": "activity@4" }, { - "command": "terminal-keeper.save", + "submenu": "import.submenu", "when": "view == terminalKeeperActivityView", "group": "tk1@1" }, { - "command": "terminal-keeper.remove", + "command": "terminal-keeper.save", "when": "view == terminalKeeperActivityView", "group": "tk1@2" }, + { + "command": "terminal-keeper.remove", + "when": "view == terminalKeeperActivityView", + "group": "tk1@3" + }, { "command": "terminal-keeper.help-and-feedback-activity", "when": "view == terminalKeeperActivityView", @@ -335,6 +418,7 @@ "@types/mocha": "^10.0.1", "@types/node": "^20.2.5", "@types/vscode": "^1.64.0", + "@types/xml2js": "^0.4.14", "@types/webpack-env": "^1.18.1", "@typescript-eslint/eslint-plugin": "^5.59.8", "@typescript-eslint/parser": "^5.59.8", @@ -351,6 +435,7 @@ "path-browserify": "^1.0.1", "process": "^0.11.10", "stream-browserify": "^3.0.0", + "timers-browserify": "^2.0.12", "ts-loader": "^9.4.3", "typescript": "^5.0.4", "webpack": "^5.84.1", @@ -358,7 +443,10 @@ }, "dependencies": { "@vscode-utility/fs-browserify": "^1.0.8", - "@vscode-utility/terminal-browserify": "^1.0.2" + "@vscode-utility/terminal-browserify": "^1.0.2", + "@sgarciac/bombadil": "^2.3.0", + "glob": "11.0.0", + "xml2js": "^0.6.2" }, "author": { "name": "Nguyen Ngoc Long", diff --git a/src/commands/importAsync.ts b/src/commands/importAsync.ts new file mode 100644 index 0000000..cae2874 --- /dev/null +++ b/src/commands/importAsync.ts @@ -0,0 +1,212 @@ +import { TerminalItem } from '@vscode-utility/terminal-browserify'; +import { glob } from 'glob'; +import path from 'path/posix'; +import { QuickPickItem, window, workspace, WorkspaceFolder } from 'vscode'; +import { Configuration } from '../configuration/configuration'; +import { configurationTemplate } from '../configuration/template'; +import { constants } from '../utils/constants'; +import { getSessionQuickPickItems, showErrorMessageWithDetail } from '../utils/utils'; +import { extractAntCommands } from './modules/antParse'; +import { extractGradleCommands } from './modules/gradleParse'; +import { extractGruntCommands } from './modules/gruntParse'; +import { extractGulpCommands } from './modules/gulpParse'; +import { extractJsonScriptCommands } from './modules/jsonScriptParse'; +import { extractMakeCommands } from './modules/makeParse'; +import { extractPipenvCommands } from './modules/pipenvParse'; + +export type ImportFileType = 'npm' | 'composer' | 'make' | 'gradle' | 'pipenv' | 'ant' | 'grunt' | 'gulp'; + +const getFilenames = (fileType: ImportFileType): Array | undefined => { + switch (fileType) { + case 'npm': + return ['package.json']; + case 'composer': + return ['composer.json']; + case 'make': + return ['Makefile', 'makefile']; + case 'gradle': + return ['build.gradle', 'test.gradle']; + case 'pipenv': + return ['Pipfile', 'pipfile']; + case 'ant': + return ['build.xml']; + case 'grunt': + return ['GRUNTFILE.JS']; + case 'gulp': + return ['GULPFILE.js', 'GULPFILE.mjs', 'gulpfile.js', 'gulpfile.mjs']; + default: + return undefined; + } +}; + +const getCommands = async (fileType: ImportFileType, filePath: string): Promise | undefined> => { + switch (fileType) { + case 'npm': + return extractJsonScriptCommands(filePath); + case 'composer': + return extractJsonScriptCommands(filePath); + case 'make': + return extractMakeCommands(filePath); + case 'gradle': + return extractGradleCommands(filePath); + case 'pipenv': + return extractPipenvCommands(filePath); + case 'ant': + return extractAntCommands(filePath); + case 'grunt': + return extractGruntCommands(filePath); + case 'gulp': + return extractGulpCommands(filePath); + default: + return undefined; + } +}; + +const getFilePaths = async (workspaceFolders: readonly WorkspaceFolder[], filenames: string[]): Promise => { + const filePaths: string[] = []; + for (let i = 0; i < workspaceFolders.length; i++) { + const wsFolder = workspaceFolders[i]; + for (let j = 0; j < filenames.length; j++) { + const filename = filenames[j]; + const files = await glob(`**/${filename}`, { cwd: wsFolder.uri.fsPath, nodir: true, absolute: true }); + filePaths.push(...files); + } + } + return filePaths; +}; + +const chooseFilePath = async (filePaths: string[]): Promise => { + let selectedFilePath = filePaths[0]; + if (filePaths.length >= 1) { + const options = filePaths.map((filePath): QuickPickItem => { + const filename = path.basename(filePath); + return { label: filename, detail: filePath.replace(filename, '') }; + }); + const quickPickItem = await window.showQuickPick(options, { + title: constants.selectFileTitle, + placeHolder: constants.selectFilePlaceHolder, + canPickMany: false, + ignoreFocusOut: true + }); + return quickPickItem ? path.join(quickPickItem.detail || '', quickPickItem.label) : undefined; + } + return selectedFilePath; +}; + +const chooseSessionName = async (): Promise => { + // Show choose session name box + const config = await Configuration.load(); + const sessionsWithDescription: QuickPickItem[] = getSessionQuickPickItems(config.sessions); + sessionsWithDescription.forEach((sessionItem) => { + sessionItem.detail = `Overwrites scripts to session ${sessionItem.label}`; + }); + const addNewSession: QuickPickItem = { + label: 'Add new session...', + detail: 'Create new session, and save scripts to it.', + alwaysShow: true + }; + const quickPickItem = await window.showQuickPick([addNewSession].concat(sessionsWithDescription), { + title: 'Select the session you want to override or add new session', + placeHolder: 'Session name...', + ignoreFocusOut: true + }); + if (!quickPickItem) { + return undefined; + } + + // Show input box if select add new + let sessionName = quickPickItem.label; + if (sessionName === addNewSession.label) { + const sessionNameInput = await window.showInputBox({ + title: 'Please enter the session name.', + placeHolder: 'e.g. build, migrate, start, deploy', + ignoreFocusOut: true, + validateInput: (value: string) => { + if (!value) { + return 'The session name cannot be null or empty.'; + } + if (sessionsWithDescription.some((s) => s.label === value)) { + return 'The session name already exists.'; + } + return ''; // input valid is OK + } + }); + return sessionNameInput ? sessionNameInput : undefined; + } + return sessionName; +}; + +export const importAsync = async (fileType: ImportFileType): Promise => { + try { + const { workspaceFolders } = workspace; + if (!workspaceFolders || workspaceFolders.length <= 0) { + window.showWarningMessage(constants.openWorkspace); + return; + } + + // Get filename by fileType + const filenames = getFilenames(fileType); + if (!filenames || filenames.length <= 0) { + window.showWarningMessage(constants.notSupportFileType.replace('{fileType}', fileType)); + return; + } + + // Get all filepaths + const filePaths = await getFilePaths(workspaceFolders, filenames); + if (!filePaths || filePaths.length <= 0) { + window.showWarningMessage( + constants.notExistImportFile + .replace('{filename}', filenames.join(', ')) + .replace('{workspace}', workspaceFolders.map((w) => w.uri.fsPath).join(', ')) + ); + return; + } + + // Choose the file if more than one + let selectedFilePath = await chooseFilePath(filePaths); + if (!selectedFilePath) { + return; + } + + // Read the script of file + const scripts = await getCommands(fileType, selectedFilePath); + if (!scripts) { + window.showWarningMessage(constants.notExistAnyCommands.replace('{filePath}', selectedFilePath)); + return; + } + + // Parse to terminal item from scripts + const terminalItems = Object.entries(scripts).map(([key, value]) => { + const item: TerminalItem = { + name: key, + commands: [value] + }; + return item; + }); + + // Select name of sessions to override or add new session + let sessionName = await chooseSessionName(); + if (!sessionName) { + return; + } + + // Create new sessions.json if not exist, otherwise save to existing file + const isDefinedSessionFile = await Configuration.isDefinedSessionFile(); + if (!isDefinedSessionFile) { + const content = configurationTemplate; + content.sessions = { default: [] }; + await Configuration.save(content); + } + + // Save scripts to sessions.json + const configSaved = await Configuration.load(); + if (!configSaved.sessions) { + configSaved.sessions = { default: [] }; + } + const previousTerminalItems = configSaved.sessions[sessionName] || []; + configSaved.sessions[sessionName] = previousTerminalItems.concat(terminalItems); + await Configuration.save(configSaved); + } catch (error) { + showErrorMessageWithDetail(constants.importFileFailed.replace('{fileType}', fileType), error); + } +}; diff --git a/src/commands/modules/antParse.ts b/src/commands/modules/antParse.ts new file mode 100644 index 0000000..e978797 --- /dev/null +++ b/src/commands/modules/antParse.ts @@ -0,0 +1,36 @@ +import { workspace } from 'vscode'; +import { parseStringPromise } from 'xml2js'; + +const getFileContent = async (filePath: string): Promise => { + const document = await workspace.openTextDocument(filePath); + return document.getText(); +}; + +const getCommand = (): string => { + let ant = 'ant'; + if (process.platform === 'win32') { + ant = 'ant.bat'; + } + return ant; +}; + +const buildCommands = async (contents: string): Promise> => { + const scripts: Record = {}; + const cmd = getCommand(); + const text = await parseStringPromise(contents); + if (text && text.project && text.project.target) { + const defaultTask = text.project.$.default; + const targets = text.project.target; + for (const tgt of targets) { + if (tgt.$ && tgt.$.name) { + scripts[defaultTask === tgt.$.name ? tgt.$.name + ' - Default' : tgt.$.name] = `${cmd} ${tgt.$.name}`; + } + } + } + return scripts; +}; + +export const extractAntCommands = async (filePath: string): Promise | undefined> => { + const content = await getFileContent(filePath); + return await buildCommands(content); +}; diff --git a/src/commands/modules/gradleParse.ts b/src/commands/modules/gradleParse.ts new file mode 100644 index 0000000..7667d23 --- /dev/null +++ b/src/commands/modules/gradleParse.ts @@ -0,0 +1,48 @@ +import { workspace } from 'vscode'; + +const getFileContent = async (filePath: string): Promise => { + const document = await workspace.openTextDocument(filePath); + return document.getText(); +}; + +const getCommand = (): string => { + let gradle = 'gradlew'; + if (process.platform === 'win32') { + gradle = 'gradlew.bat'; + } + return gradle; +}; + +const buildCommands = (contents: string): Record => { + const scripts: Record = {}; + const cmd = getCommand(); + let idx = 0; + let eol = contents.indexOf('\n', 0); + while (eol !== -1) { + const line: string = contents.substring(idx, eol).trim(); + if (line.length > 0 && line.toLowerCase().trimStart().startsWith('task ')) { + let idx1 = line.trimStart().indexOf(' '); + if (idx1 !== -1) { + idx1++; + let idx2 = line.indexOf('(', idx1); + if (idx2 === -1) { + idx2 = line.indexOf('{', idx1); + } + if (idx2 !== -1) { + const tgtName = line.substring(idx1, idx2).trim(); + if (tgtName) { + scripts[tgtName] = `${cmd} ${tgtName}`; + } + } + } + } + idx = eol + 1; + eol = contents.indexOf('\n', idx); + } + return scripts; +}; + +export const extractGradleCommands = async (filePath: string): Promise | undefined> => { + const content = await getFileContent(filePath); + return buildCommands(content); +}; diff --git a/src/commands/modules/gruntParse.ts b/src/commands/modules/gruntParse.ts new file mode 100644 index 0000000..8272d0f --- /dev/null +++ b/src/commands/modules/gruntParse.ts @@ -0,0 +1,65 @@ +import { workspace } from 'vscode'; + +const getFileContent = async (filePath: string): Promise => { + const document = await workspace.openTextDocument(filePath); + return document.getText(); +}; + +const getCommand = (): string => { + return 'npm grunt'; +}; + +const buildCommands = (contents: string): Record => { + const scripts: Record = {}; + const cmd = getCommand(); + let idx = 0; + let eol = contents.indexOf('\n', 0); + + while (eol !== -1) { + let line: string = contents.substring(idx, eol).trim(); + if (line.length > 0 && line.toLowerCase().trimStart().startsWith('grunt.registertask')) { + let idx1 = line.indexOf("'"); + if (idx1 === -1) { + idx1 = line.indexOf('"'); + } + + if (idx1 === -1) { + let eol2 = eol + 1; + eol2 = contents.indexOf('\n', eol2); + line = contents.substring(eol + 1, eol2).trim(); + if (line.startsWith("'") || line.startsWith('"')) { + idx1 = line.indexOf("'"); + if (idx1 === -1) { + idx1 = line.indexOf('"'); + } + if (idx1 !== -1) { + eol = eol2; + } + } + } + + if (idx1 !== -1) { + idx1++; + let idx2 = line.indexOf("'", idx1); + if (idx2 === -1) { + idx2 = line.indexOf('"', idx1); + } + if (idx2 !== -1) { + const tgtName = line.substring(idx1, idx2).trim(); + if (tgtName) { + scripts[tgtName] = `${cmd} ${tgtName}`; + } + } + } + } + + idx = eol + 1; + eol = contents.indexOf('\n', idx); + } + return scripts; +}; + +export const extractGruntCommands = async (filePath: string): Promise | undefined> => { + const content = await getFileContent(filePath); + return buildCommands(content); +}; diff --git a/src/commands/modules/gulpParse.ts b/src/commands/modules/gulpParse.ts new file mode 100644 index 0000000..dde0d4c --- /dev/null +++ b/src/commands/modules/gulpParse.ts @@ -0,0 +1,111 @@ +import { workspace } from 'vscode'; + +const getFileContent = async (filePath: string): Promise => { + const document = await workspace.openTextDocument(filePath); + return document.getText(); +}; + +const getCommand = (): string => { + return 'npx gulp'; +}; + +const parseGulpExport = (line: string) => { + let idx1: number, idx2: number; + let tgtName: string | undefined; + + if (line.toLowerCase().trimLeft().startsWith('exports.')) { + idx1 = line.indexOf('.') + 1; + idx2 = line.indexOf(' ', idx1); + /* istanbul ignore if */ + if (idx2 === -1) { + idx2 = line.indexOf('=', idx1); + } + /* istanbul ignore else */ + if (idx1 !== -1) { + tgtName = line.substring(idx1, idx2).trim(); + } + } else if (line.toLowerCase().trimLeft().startsWith('exports[')) { + /* istanbul ignore else */ + idx1 = line.indexOf('[') + 2; // skip past [ and '/" + idx2 = line.indexOf(']', idx1) - 1; // move up to "/' + /* istanbul ignore else */ + if (idx1 !== -1) { + tgtName = line.substring(idx1, idx2).trim(); + } + } + + return tgtName; +}; + +const parseGulpTask = (line: string, contents: string, eol: number) => { + let idx1: number; + let tgtName: string | undefined; + + idx1 = line.indexOf("'"); + if (idx1 === -1) { + idx1 = line.indexOf('"'); + } + + if (idx1 === -1) { + // check next line for task name + let eol2 = eol + 1; + eol2 = contents.indexOf('\n', eol2); + line = contents.substring(eol + 1, eol2).trim(); + /* istanbul ignore else */ + if (line.startsWith("'") || line.startsWith('"')) { + idx1 = line.indexOf("'"); + if (idx1 === -1) { + idx1 = line.indexOf('"'); + } + /* istanbul ignore else */ + if (idx1 !== -1) { + eol = eol2; + } + } + } + + /* istanbul ignore else */ + if (idx1 !== -1) { + idx1++; + let idx2 = line.indexOf("'", idx1); + if (idx2 === -1) { + idx2 = line.indexOf('"', idx1); + } + /* istanbul ignore else */ + if (idx2 !== -1) { + tgtName = line.substring(idx1, idx2).trim(); + } + } + + return tgtName; +}; + +const buildCommands = (contents: string): Record => { + const scripts: Record = {}; + const cmd = getCommand(); + let idx = 0; + let eol = contents.indexOf('\n', 0); + while (eol !== -1) { + let tgtName: string | undefined; + const line = contents.substring(idx, eol).trim(); + + if (line.length > 0) { + if (line.toLowerCase().trimStart().startsWith('exports')) { + tgtName = parseGulpExport(line); + } else if (line.toLowerCase().trimStart().startsWith('gulp.task')) { + tgtName = parseGulpTask(line, contents, eol); + } + if (tgtName) { + scripts[tgtName] = `${cmd} ${tgtName}`; + } + } + idx = eol + 1; + eol = contents.indexOf('\n', idx); + } + return scripts; +}; + +export const extractGulpCommands = async (filePath: string): Promise | undefined> => { + const content = await getFileContent(filePath); + return buildCommands(content); +}; diff --git a/src/commands/modules/jsonScriptParse.ts b/src/commands/modules/jsonScriptParse.ts new file mode 100644 index 0000000..d16f209 --- /dev/null +++ b/src/commands/modules/jsonScriptParse.ts @@ -0,0 +1,16 @@ +import { fs } from '@vscode-utility/fs-browserify'; + +const getFileContent = async (filePath: string): Promise => { + return await fs.readFileAsync(filePath); +}; + +const buildCommands = (contents: string): Record => { + const packageJson = JSON.parse(contents); + const { scripts } = packageJson || {}; + return scripts; +}; + +export const extractJsonScriptCommands = async (filePath: string): Promise | undefined> => { + const content = await getFileContent(filePath); + return buildCommands(content); +}; diff --git a/src/commands/modules/makeParse.ts b/src/commands/modules/makeParse.ts new file mode 100644 index 0000000..f7611e2 --- /dev/null +++ b/src/commands/modules/makeParse.ts @@ -0,0 +1,71 @@ +import { workspace } from 'vscode'; + +const getFileContent = async (filePath: string): Promise => { + const document = await workspace.openTextDocument(filePath); + return document.getText(); +}; + +const suffixRuleTargets = /^(\.\w+|\.\w+\.\w+)$/; +const patternRuleTargets = /^(%\.\w+|%)$/; +const ruleTargetExp = /^([\w-.\/ ]+)\s*:[^=]/gm; +const specialTargets = new Set([ + // https://www.gnu.org/software/make/manual/html_node/Special-Targets.html + '.PHONY', + '.SUFFIXES', + '.DEFAULT', + '.PRECIOUS', + '.INTERMEDIATE', + '.SECONDARY', + '.SECONDEXPANSION', + '.DELETE_ON_ERROR', + '.IGNORE', + '.LOW_RESOLUTION_TIME', + '.SILENT', + '.EXPORT_ALL_VARIABLES', + '.NOTPARALLEL', + '.ONESHELL', + '.POSIX', + '.MAKE' +]); + +const isNormalTarget = (target: string): boolean => { + if (specialTargets.has(target)) { + return false; + } + if (suffixRuleTargets.test(target)) { + return false; + } + if (patternRuleTargets.test(target)) { + return false; + } + return true; +}; + +const getCommand = (): string => { + let make = 'make'; + if (process.platform === 'win32') { + make = 'nmake'; + } + return make; +}; + +const buildCommands = (contents: string): Record => { + const scripts: Record = {}; + const cmd = getCommand(); + let match; + while ((match = ruleTargetExp.exec(contents))) { + const tgtName = match[1]; + if (tgtName.startsWith('.')) { + continue; + } + if (isNormalTarget(tgtName)) { + scripts[tgtName] = `${cmd} ${tgtName}`; + } + } + return scripts; +}; + +export const extractMakeCommands = async (filePath: string): Promise | undefined> => { + const content = await getFileContent(filePath); + return buildCommands(content); +}; diff --git a/src/commands/modules/pipenvParse.ts b/src/commands/modules/pipenvParse.ts new file mode 100644 index 0000000..5a08454 --- /dev/null +++ b/src/commands/modules/pipenvParse.ts @@ -0,0 +1,29 @@ +import { TomlReader } from '@sgarciac/bombadil'; +import { workspace } from 'vscode'; + +const getFileContent = async (filePath: string): Promise => { + const document = await workspace.openTextDocument(filePath); + return document.getText(); +}; + +const getCommand = (): string => { + const pythonPath = workspace.getConfiguration('python').get('pythonPath', 'python'); + const gradle = `${pythonPath} -m pipenv run`; + return gradle; +}; + +const buildCommands = (contents: string): Record => { + const scripts: Record = {}; + const cmd = getCommand(); + const pipfile = new TomlReader(); + pipfile.readToml(contents); + Object.entries(pipfile.result?.scripts ?? {}).forEach(([scriptName, _scriptCmd]) => { + scripts[scriptName] = `${cmd} ${scriptName}`; + }); + return scripts; +}; + +export const extractPipenvCommands = async (filePath: string): Promise | undefined> => { + const content = await getFileContent(filePath); + return buildCommands(content); +}; diff --git a/src/extension.ts b/src/extension.ts index 45c1fe0..af3f247 100644 --- a/src/extension.ts +++ b/src/extension.ts @@ -5,6 +5,7 @@ import { activeBySessionAsync } from './commands/activeBySessionAsync'; import { activeByTerminalAsync } from './commands/activeByTerminalAsync'; import { clearAllAsync } from './commands/clearAllAsync'; import { generateAsync } from './commands/generateAsync'; +import { importAsync } from './commands/importAsync'; import { killAllAsync } from './commands/killAllAsync'; import { migrateAsync } from './commands/migrateAsync'; import { openAsync } from './commands/openAsync'; @@ -96,6 +97,30 @@ export async function activate(context: ExtensionContext) { commands.registerCommand(extCommands.copyCommandActivity, async (sessionTreeItem: TKTreeItem) => { const { description } = sessionTreeItem; env.clipboard.writeText(`${description || ''}`); + }), + commands.registerCommand(extCommands.importFromNPMActivity, async () => { + await importAsync('npm'); + }), + commands.registerCommand(extCommands.importFromComposerActivity, async () => { + await importAsync('composer'); + }), + commands.registerCommand(extCommands.importFromMakeActivity, async () => { + await importAsync('make'); + }), + commands.registerCommand(extCommands.importFromGradleActivity, async () => { + await importAsync('gradle'); + }), + commands.registerCommand(extCommands.importFromPipenvActivity, async () => { + await importAsync('pipenv'); + }), + commands.registerCommand(extCommands.importFromAntActivity, async () => { + await importAsync('ant'); + }), + commands.registerCommand(extCommands.importFromGruntActivity, async () => { + await importAsync('grunt'); + }), + commands.registerCommand(extCommands.importFromGulpActivity, async () => { + await importAsync('gulp'); }) ); diff --git a/src/utils/constants.ts b/src/utils/constants.ts index b3e80d1..2e2ceb3 100644 --- a/src/utils/constants.ts +++ b/src/utils/constants.ts @@ -10,6 +10,14 @@ export const extCommands = { killAll: 'terminal-keeper.kill-all', refresh: 'terminal-keeper.refresh-activity', activeSessionActivity: 'terminal-keeper.active-session-activity', + importFromNPMActivity: 'terminal-keeper.import-from-npm', + importFromComposerActivity: 'terminal-keeper.import-from-composer', + importFromMakeActivity: 'terminal-keeper.import-from-make', + importFromGradleActivity: 'terminal-keeper.import-from-gradle', + importFromPipenvActivity: 'terminal-keeper.import-from-pipenv', + importFromAntActivity: 'terminal-keeper.import-from-ant', + importFromGruntActivity: 'terminal-keeper.import-from-grunt', + importFromGulpActivity: 'terminal-keeper.import-from-gulp', sendToNewTerminalActivity: 'terminal-keeper.send-to-new-terminal-activity', sendToCurrentTerminalActivity: 'terminal-keeper.send-to-current-terminal-activity', copyCommandActivity: 'terminal-keeper.copy-command-activity', @@ -45,6 +53,8 @@ export const constants = { // Active terminal session selectSessionActiveTitle: 'Select a session to activate', selectSessionActivePlaceHolder: 'Select session...', + selectFileTitle: 'Select a file to import', + selectFilePlaceHolder: 'Select file...', activeSessionFailed: 'Failed to activate the session.', activeTerminalFailed: 'Failed to activate the terminal.', killTerminalFailed: 'Failed to kill the terminals.', @@ -77,6 +87,12 @@ export const constants = { saveSessionSuccess: 'The session was successfully saved!', saveSessionFailed: 'Failed to save the session.', + // Import commands + importFileFailed: 'Failed to import the command from file type {fileType}.', + notSupportFileType: 'The file type {fileType} is not supported!', + notExistImportFile: 'The file {filename} does not exist in any workspace {workspace}.', + notExistAnyCommands: 'There are no definition commands in the {filePath}.', + // Migrate the configuration file migrateConfigurationFailed: 'The attempt to upgrade to the most recent configuration file schema was unsuccessful!', diff --git a/webpack.config.js b/webpack.config.js index 4cf00fb..d614c45 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -48,8 +48,10 @@ const webExtensionConfig = { stream: require.resolve('stream-browserify'), os: require.resolve('os-browserify/browser'), constants: require.resolve("constants-browserify"), + timers: require.resolve('timers-browserify'), child_process: false, - fs: false + fs: false, + url: false } }, module: {