Skip to content

Commit c550bb2

Browse files
committed
Move extension marketplace source list to its own file
This is mostly so that we could exclude that file from the spell checker. There is no code to update that file automatically yet. Signed-off-by: Mark Yen <mark.yen@suse.com>
1 parent a0bffc3 commit c550bb2

File tree

4 files changed

+41
-27
lines changed

4 files changed

+41
-27
lines changed

.github/actions/spelling/excludes.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,12 +93,12 @@
9393
ignore$
9494
/translations/(?!en)
9595
^\Qpkg/rancher-desktop/router.js\E$
96-
^\Qpkg/rancher-desktop/utils/_demo_marketplace_items.js\E$
97-
^\Qpkg/rancher-desktop/utils/_demo_metadata.js\E$
9896
(?:^|/)pkg/rancher-desktop/nuxt/
9997
^\Qsrc/disk-images/github-runner-linux/root/etc/sysconfig/network/ifcfg-\E
10098
^\Qsrc/go/nerdctl-stub/nerdctl_commands_generated.go\E$
10199
^\Q.github/workflows/config/.golangci.yaml\E$
102100
^\Qsrc/go/networking/.golangci.yml\E$
103101
# Generated file
104102
^\Qpkg/rancher-desktop/assets/extension-data.yaml\E$
103+
# Mostly image names
104+
^\Qscripts/assets/extension-data.yaml\E$

pkg/rancher-desktop/assets/extension-data.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
org.opencontainers.image.title: Open WebUI
1616
org.opencontainers.image.vendor: SUSE LLC
1717
title: Open WebUI
18-
logo: ""
18+
logo: https://raw.githubusercontent.com/rancher-sandbox/rancher-desktop-rdx-open-webui/refs/tags/v0.0.4/open-webui.svg
1919
publisher: SUSE LLC
2020
short_description: Open WebUI on Rancher Desktop
2121
- slug: ghcr.io/rancher-sandbox/epinio-desktop-extension

scripts/assets/extension-data.yaml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# This file contains the extension versions we list in the marketplace.
2+
# This is processed by `yarn generate:extension-data` to produce
3+
# pkg/rancher-desktop/assets/extension-data.yaml
4+
5+
# Each top level key is the extension image + version.
6+
# They may have properties; the current known properties are:
7+
# - `containerd_compatible`: defaults to true.
8+
# - `logo`: Overrides the logo URL.
9+
10+
ghcr.io/rancher-sandbox/rancher-desktop-rdx-open-webui:v0.0.4:
11+
logo: https://raw.githubusercontent.com/rancher-sandbox/rancher-desktop-rdx-open-webui/refs/tags/v0.0.4/open-webui.svg
12+
ghcr.io/rancher-sandbox/epinio-desktop-extension:0.0.23.5: {}
13+
julianb90/tachometer:0.0.3: {}
14+
docker/logs-explorer-extension:0.2.2: {}
15+
prakhar1989/dive-in:0.0.8:
16+
containerd_compatible: false
17+
joycelin79/newman-extension:0.0.7: {}
18+
docker/resource-usage-extension:1.0.3: {}
19+
anchore/docker-desktop-extension:0.5.1:
20+
containerd_compatible: false
21+
ignatandrei/blockly-automation:0.0.7: {}
22+
docker/disk-usage-extension:0.2.7:
23+
containerd_compatible: false
24+
harpooncorp/harpoon-ext:0.0.4: {}
25+
vklokun/docker-desktop-extension:0.1.0: {}
26+
caretdev/intersystems-extension:0.1.7: {}

scripts/extension-data.ts

Lines changed: 12 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -10,31 +10,19 @@ import util from 'util';
1010

1111
import yaml from 'yaml';
1212

13-
/**
14-
* This is a fixed list of extension image names, mapping to whether this
15-
* extension is compatible with containerd. Only these extensions will be
16-
* scanned.
17-
*/
18-
const extensionInfo = {
19-
'ghcr.io/rancher-sandbox/rancher-desktop-rdx-open-webui:v0.0.4': true,
20-
'ghcr.io/rancher-sandbox/epinio-desktop-extension:0.0.23.5': true,
21-
'julianb90/tachometer:0.0.3': true,
22-
'docker/logs-explorer-extension:0.2.2': true,
23-
'prakhar1989/dive-in:0.0.8': false,
24-
'joycelin79/newman-extension:0.0.7': true,
25-
'docker/resource-usage-extension:1.0.3': true,
26-
'anchore/docker-desktop-extension:0.5.1': false,
27-
'ignatandrei/blockly-automation:0.0.7': true,
28-
'docker/disk-usage-extension:0.2.7': false,
29-
'harpooncorp/harpoon-ext:0.0.4': true,
30-
'vklokun/docker-desktop-extension:0.1.0': true,
31-
'caretdev/intersystems-extension:0.1.7': true,
32-
};
13+
interface extensionInfo {
14+
/** Whether this extension is compatible with containerd; defaults to true. */
15+
containerd_compatible?: boolean;
16+
/** Override for the logo. */
17+
logo?: string;
18+
}
19+
const EXTENSION_PATH = './scripts/assets/extension-data.yaml';
20+
const EXTENSION_INFO: extensionInfo[] = yaml.parse(fs.readFileSync(EXTENSION_PATH, 'utf-8'));
3321

3422
const warningString =
3523
'# Data generated by running `yarn generate:extension-data`. DO NOT EDIT.';
3624

37-
async function processExtension(imageName: string, containerd: boolean) {
25+
async function processExtension(imageName: string, info: extensionInfo) {
3826
const [slug, version] = imageName.split(':', 2);
3927
const execFile = util.promisify(childProcess.execFile);
4028
const { stdout:out } = await execFile('docker', ['image', 'list', '--format=json', imageName]);
@@ -51,18 +39,18 @@ async function processExtension(imageName: string, containerd: boolean) {
5139
return {
5240
slug,
5341
version,
54-
containerd_compatible: containerd,
42+
containerd_compatible: info.containerd_compatible ?? true,
5543
labels,
5644
title: labels['org.opencontainers.image.title'],
57-
logo: labels['com.docker.desktop.extension.icon'],
45+
logo: info.logo ?? labels['com.docker.desktop.extension.icon'],
5846
publisher: labels['org.opencontainers.image.vendor'],
5947
short_description: labels['org.opencontainers.image.description'],
6048
};
6149
}
6250

6351
async function run() {
6452
const fileName = 'pkg/rancher-desktop/assets/extension-data.yaml';
65-
const promises = Object.entries(extensionInfo).map(info => processExtension(...info));
53+
const promises = Object.entries(EXTENSION_INFO).map(info => processExtension(...info));
6654
const data = await Promise.all(promises);
6755
const result = `${ warningString }\n${ yaml.stringify(data) }`;
6856

0 commit comments

Comments
 (0)