@@ -5,8 +5,8 @@ Marketplace for use in editors like
5
5
[ code-server] ( https://github.com/cdr/code-server ) .
6
6
7
7
This 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.
10
10
11
11
## Deployment
12
12
@@ -26,34 +26,6 @@ reject connecting to the API.
26
26
The ` /healthz ` endpoint can be used to determine if the marketplace is ready to
27
27
receive requests.
28
28
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
-
57
29
## Usage in code-server
58
30
59
31
```
@@ -72,31 +44,38 @@ or both the `X-Forwarded-Host` and `X-Forwarded-Proto` headers.
72
44
The marketplace does not support being hosted behind a base path; it must be
73
45
proxied at the root of your domain.
74
46
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.
76
61
77
62
If an extension is open source you can get it from one of three locations:
78
63
79
64
1 . GitHub releases (if the extension publishes releases to GitHub).
80
65
2 . Open VSX (if the extension is published to Open VSX).
81
66
3 . Building from source.
82
67
83
- For example to download the Python extension from Open VSX:
68
+ For example to add the Python extension from Open VSX:
84
69
85
70
```
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
90
72
```
91
73
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:
97
75
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
+ ```
100
79
101
80
## Development
102
81
0 commit comments