From 42b71a0ccfdbcc49f2c359a28303e58887aae458 Mon Sep 17 00:00:00 2001 From: Melissa Barca <5323711+melissa-barca@users.noreply.github.com> Date: Tue, 25 Feb 2025 10:07:13 -0500 Subject: [PATCH] add complete list of bootstrap extensions and make shiny server only --- build/lib/bootstrapExtensions.js | 13 +++--- build/lib/bootstrapExtensions.ts | 8 ++++ build/secrets/.secrets.baseline | 4 +- product.json | 72 ++++++++++++++++---------------- 4 files changed, 53 insertions(+), 44 deletions(-) diff --git a/build/lib/bootstrapExtensions.js b/build/lib/bootstrapExtensions.js index b1acb27c465..6ba10faeac6 100644 --- a/build/lib/bootstrapExtensions.js +++ b/build/lib/bootstrapExtensions.js @@ -82,20 +82,14 @@ function syncExtension(extension, controlState) { log(ansiColors.blue('[disabled]'), ansiColors.gray(extension.name)); return es.readArray([]); case 'marketplace': - // --- Start Positron --- return syncMarketplaceExtension(extension); - // --- End Positron --- default: if (!fs.existsSync(controlState)) { - // --- Start Positron --- log(ansiColors.red(`Error: Bootstrap extension '${extension.name}' is configured to run from '${controlState}' but that path does not exist.`)); - // --- End Positron --- return es.readArray([]); } else if (!fs.existsSync(path.join(controlState, 'package.json'))) { - // --- Start Positron --- log(ansiColors.red(`Error: Bootstrap extension '${extension.name}' is configured to run from '${controlState}' but there is no 'package.json' file in that directory.`)); - // --- End Positron --- return es.readArray([]); } log(ansiColors.blue('[local]'), `${extension.name}: ${ansiColors.cyan(controlState)}`, ansiColors.green('✔︎')); @@ -120,6 +114,13 @@ function getBootstrapExtensions() { for (const extension of [...bootstrapExtensions]) { const controlState = control[extension.name] || 'marketplace'; control[extension.name] = controlState; + // Discard extensions intended for the web. The 'type' field isn't a + // formal part of the extension definition but a custom field we use to + // filter out web-only extensions (i.e. Posit Workbench) + // @ts-ignore + if (extension.type === 'reh-web') { + continue; + } streams.push(syncExtension(extension, controlState)); } writeControlFile(control, controlFilePath); diff --git a/build/lib/bootstrapExtensions.ts b/build/lib/bootstrapExtensions.ts index b6fb1e111b5..6410f807d3f 100644 --- a/build/lib/bootstrapExtensions.ts +++ b/build/lib/bootstrapExtensions.ts @@ -141,6 +141,14 @@ export function getBootstrapExtensions(): Promise { const controlState = control[extension.name] || 'marketplace'; control[extension.name] = controlState; + // Discard extensions intended for the web. The 'type' field isn't a + // formal part of the extension definition but a custom field we use to + // filter out web-only extensions (i.e. Posit Workbench) + // @ts-ignore + if (extension.type === 'reh-web') { + continue; + } + streams.push(syncExtension(extension, controlState)); } diff --git a/build/secrets/.secrets.baseline b/build/secrets/.secrets.baseline index f1a33e04605..f79022ad005 100644 --- a/build/secrets/.secrets.baseline +++ b/build/secrets/.secrets.baseline @@ -604,7 +604,7 @@ "filename": "product.json", "hashed_secret": "4762b62a1d96fce4a3071114c8e0223be11d1fda", "is_verified": false, - "line_number": 202, + "line_number": 95, "is_secret": false } ], @@ -1951,5 +1951,5 @@ } ] }, - "generated_at": "2025-02-19T20:56:35Z" + "generated_at": "2025-02-25T15:07:15Z" } diff --git a/product.json b/product.json index 324bb65b147..f9124d4db59 100644 --- a/product.json +++ b/product.json @@ -88,18 +88,30 @@ } }, { - "name": "ms-toolsai.jupyter-keymap", - "version": "1.1.2", - "repo": "https://github.com/Microsoft/vscode-jupyter-keymap", + "name": "rstudio.rstudio-workbench", + "version": "1.5.28", + "positUrl": "https://cdn.posit.co/pwb-components/extension", + "type": "reh-web", + "sha256": "a1052e6cf884977b68883950360d29b394acdbdd2a84f0b17a7cc9887436918f", "metadata": { - "id": "9f6dc8db-620c-4844-b8c5-e74914f1be27", + "publisherDisplayName": "Posit Software, PBC" + } + } + ], + "bootstrapExtensions": [ + { + "name": "ms-python.black-formatter", + "version": "2024.2.0", + "repo": "https://github.com/microsoft/vscode-black-formatter", + "metadata": { + "id": "859e640c-c157-47da-8699-9080b81c8371", "publisherId": { - "publisherId": "ac8eb7c9-3e59-4b39-8040-f0484d8170ce", - "publisherName": "ms-toolsai", - "displayName": "Jupyter Keymap", + "publisherId": "998b010b-e2af-44a5-a6cd-0b5fd3b9b6f8", + "publisherName": "ms-python", + "displayName": "Black Formatter", "flags": "verified" }, - "publisherDisplayName": "ms-toolsai" + "publisherDisplayName": "ms-python" } }, { @@ -117,6 +129,21 @@ "publisherDisplayName": "ms-toolsai" } }, + { + "name": "ms-toolsai.jupyter-keymap", + "version": "1.1.2", + "repo": "https://github.com/Microsoft/vscode-jupyter-keymap", + "metadata": { + "id": "9f6dc8db-620c-4844-b8c5-e74914f1be27", + "publisherId": { + "publisherId": "ac8eb7c9-3e59-4b39-8040-f0484d8170ce", + "publisherName": "ms-toolsai", + "displayName": "Jupyter Keymap", + "flags": "verified" + }, + "publisherDisplayName": "ms-toolsai" + } + }, { "name": "ms-toolsai.vscode-jupyter-slideshow", "version": "0.1.6", @@ -177,7 +204,6 @@ "publisherDisplayName": "ms-pyright" } }, - { "name": "ms-python.debugpy", "version": "2024.8.0", @@ -194,33 +220,6 @@ "multiPlatformServiceUrl": "https://open-vsx.org/api" } }, - { - "name": "rstudio.rstudio-workbench", - "version": "1.5.28", - "positUrl": "https://cdn.posit.co/pwb-components/extension", - "type": "reh-web", - "sha256": "a1052e6cf884977b68883950360d29b394acdbdd2a84f0b17a7cc9887436918f", - "metadata": { - "publisherDisplayName": "Posit Software, PBC" - } - } - ], - "bootstrapExtensions": [ - { - "name": "ms-python.black-formatter", - "version": "2024.2.0", - "repo": "https://github.com/microsoft/vscode-black-formatter", - "metadata": { - "id": "859e640c-c157-47da-8699-9080b81c8371", - "publisherId": { - "publisherId": "998b010b-e2af-44a5-a6cd-0b5fd3b9b6f8", - "publisherName": "ms-python", - "displayName": "Black Formatter", - "flags": "verified" - }, - "publisherDisplayName": "ms-python" - } - }, { "name": "posit.publisher", "version": "1.10.0", @@ -237,6 +236,7 @@ "name": "posit.shiny", "version": "1.1.2", "repo": "http://github.com/posit-dev/shiny-vscode", + "type": "reh-web", "metadata": { "id": "f1b3b3b4-3b3b-4b3b-8b3b-3b3b3b3b3b3b", "publisherId": "090804ff-7eb2-4fbd-bb61-583e34f2b070",