@@ -5,8 +5,8 @@ Marketplace for use in editors like
55[ code-server] ( https://github.com/cdr/code-server ) .
66
77This marketplace reads extensions from file storage and provides an API for
8- editors to consume. It does not have a frontend or any mechanisms for adding or
9- updating extensions in the marketplace.
8+ editors to consume. It does not have a frontend or any mechanisms for extension
9+ authors to add or update extensions in the marketplace.
1010
1111## Deployment
1212
@@ -26,34 +26,6 @@ reject connecting to the API.
2626The ` /healthz ` endpoint can be used to determine if the marketplace is ready to
2727receive requests.
2828
29- ## File Storage
30-
31- Extensions must be both copied as a vsix and extracted to the following path:
32-
33- ```
34- <extensions-dir>/<publisher>/<extension name>/<version>/
35- ```
36-
37- For example:
38-
39- ```
40- extensions
41- |-- ms-python
42- | `-- python
43- | `-- 2022.14.0
44- | |-- [Content_Types].xml
45- | |-- extension
46- | |-- extension.vsixmanifest
47- | `-- ms-python.python-2022.14.0.vsix
48- `-- vscodevim
49- `-- vim
50- `-- 1.23.2
51- |-- [Content_Types].xml
52- |-- extension
53- |-- extension.vsixmanifest
54- `-- vscodevim.vim-1.23.2.vsix
55- ```
56-
5729## Usage in code-server
5830
5931```
@@ -72,31 +44,38 @@ or both the `X-Forwarded-Host` and `X-Forwarded-Proto` headers.
7244The marketplace does not support being hosted behind a base path; it must be
7345proxied at the root of your domain.
7446
75- ## Getting extensions
47+ ## Adding extensions
48+
49+ Extensions can be added to the marketplace by file or URL. The extensions
50+ directory does not need to be created beforehand.
51+
52+ ```
53+ ./code-marketplace add extension.vsix --extensions-dir ./extensions
54+ ./code-marketplace add https://domain.tld/extension.vsix --extensions-dir ./extensions
55+ ```
56+
57+ Extensions listed as dependencies must also be added.
58+
59+ If the extension is part of an extension pack the other extensions in the pack
60+ can also be added but doing so is optional.
7661
7762If an extension is open source you can get it from one of three locations:
7863
79641 . GitHub releases (if the extension publishes releases to GitHub).
80652 . Open VSX (if the extension is published to Open VSX).
81663 . Building from source.
8267
83- For example to download the Python extension from Open VSX:
68+ For example to add the Python extension from Open VSX:
8469
8570```
86- mkdir -p extensions/ms-python/python/2022.14.0
87- wget https://open-vsx.org/api/ms-python/python/2022.14.0/file/ms-python.python-2022.14.0.vsix
88- unzip ms-python.python-2022.14.0.vsix -d extensions/ms-python/python/2022.14.0
89- mv ms-python.python-2022.14.0.vsix extensions/ms-python/python/2022.14.0
71+ ./code-marketplace add https://open-vsx.org/api/ms-python/python/2022.14.0/file/ms-python.python-2022.14.0.vsix --extensions-dir ./extensions
9072```
9173
92- Make sure to both extract the contents * and* copy/move the ` .vsix ` file.
93-
94- If an extension has dependencies those must be added as well. An extension's
95- dependencies can be found in the extension's ` package.json ` under
96- ` extensionDependencies ` .
74+ Or the Vim extension from GitHub:
9775
98- Extensions under ` extensionPack ` in the extension's ` package.json ` can be added
99- as well although doing so is not required.
76+ ```
77+ ./code-marketplace add https://github.com/VSCodeVim/Vim/releases/download/v1.24.1/vim-1.24.1.vsix --extensions-dir ./extensions
78+ ```
10079
10180## Development
10281
0 commit comments