@mnci/cli 4.17.2 → 4.17.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.js +10 -10
- package/dist/cli.js.map +1 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -4560,6 +4560,7 @@ function addReactInternalLib(workspaceRoot, name, stack) {
|
|
|
4560
4560
|
var import_node_fs15 = require("fs");
|
|
4561
4561
|
var import_node_path19 = require("path");
|
|
4562
4562
|
var VSCODE_EXTENSION_SCRIPT_PATH = "tools/vscode-extension.cjs";
|
|
4563
|
+
var VSCODE_ENGINE_FLOOR = "1.96.0";
|
|
4563
4564
|
var VSCODE_SIDECAR_TARGETS = {
|
|
4564
4565
|
"win32-x64": "windows-amd64",
|
|
4565
4566
|
"win32-arm64": "windows-arm64",
|
|
@@ -4753,20 +4754,20 @@ function mapVscodeToStub(projectRoot, testRunner) {
|
|
|
4753
4754
|
${indent}${mapping}`));
|
|
4754
4755
|
}
|
|
4755
4756
|
function ensureVscodeToolchain(workspaceRoot) {
|
|
4756
|
-
const
|
|
4757
|
-
if (
|
|
4758
|
-
|
|
4757
|
+
const toInstall = [`@types/vscode@~${VSCODE_ENGINE_FLOOR}`];
|
|
4758
|
+
if (!hasPlugin(workspaceRoot, "@vscode/vsce")) {
|
|
4759
|
+
toInstall.push("@vscode/vsce");
|
|
4759
4760
|
}
|
|
4760
|
-
logger.step(`Installing the VS Code extension toolchain (${
|
|
4761
|
-
if (runShell("npm", ["install", "--save-dev", ...
|
|
4762
|
-
throw new Error(`npm install of ${
|
|
4761
|
+
logger.step(`Installing the VS Code extension toolchain (${toInstall.join(", ")})`);
|
|
4762
|
+
if (runShell("npm", ["install", "--save-dev", ...toInstall, "--no-audit", "--no-fund"], workspaceRoot) !== 0) {
|
|
4763
|
+
throw new Error(`npm install of ${toInstall.join(", ")} failed`);
|
|
4763
4764
|
}
|
|
4764
4765
|
}
|
|
4765
4766
|
function defaultPublisher(workspaceRoot) {
|
|
4766
4767
|
const { name } = readJson((0, import_node_path19.join)(workspaceRoot, "package.json"));
|
|
4767
4768
|
return (name ?? "publisher").replace(/^@/, "").split("/", 1)[0];
|
|
4768
4769
|
}
|
|
4769
|
-
function reshapeManifest(projectRoot, name, publisher
|
|
4770
|
+
function reshapeManifest(projectRoot, name, publisher) {
|
|
4770
4771
|
const manifestPath = (0, import_node_path19.join)(projectRoot, "package.json");
|
|
4771
4772
|
const manifest = readJson(manifestPath);
|
|
4772
4773
|
const { nx = {}, ...rest } = manifest;
|
|
@@ -4793,7 +4794,7 @@ function reshapeManifest(projectRoot, name, publisher, typesVersion) {
|
|
|
4793
4794
|
displayName: name,
|
|
4794
4795
|
version: rest.version ?? "0.0.1",
|
|
4795
4796
|
publisher,
|
|
4796
|
-
engines: { vscode: `^${
|
|
4797
|
+
engines: { vscode: `^${VSCODE_ENGINE_FLOOR}` },
|
|
4797
4798
|
categories: ["Other"],
|
|
4798
4799
|
main: "./dist/main.js",
|
|
4799
4800
|
activationEvents: [],
|
|
@@ -4926,8 +4927,7 @@ function addVscodeExtension(workspaceRoot, name, stack, options = {}) {
|
|
|
4926
4927
|
runNodeApp(workspaceRoot, name, stack, "none");
|
|
4927
4928
|
ensureVscodeToolchain(workspaceRoot);
|
|
4928
4929
|
const projectRoot = (0, import_node_path19.join)(workspaceRoot, "apps", name);
|
|
4929
|
-
|
|
4930
|
-
reshapeManifest(projectRoot, name, options.publisher ?? defaultPublisher(workspaceRoot), typesVersion);
|
|
4930
|
+
reshapeManifest(projectRoot, name, options.publisher ?? defaultPublisher(workspaceRoot));
|
|
4931
4931
|
addVscodeTypes((0, import_node_path19.join)(projectRoot, "tsconfig.app.json"));
|
|
4932
4932
|
addVscodeTypes((0, import_node_path19.join)(projectRoot, "tsconfig.spec.json"));
|
|
4933
4933
|
writeFileEnsured((0, import_node_path19.join)(projectRoot, "src/main.ts"), vscodeExtensionMain(name));
|