@@ -24,7 +24,7 @@ The binary can be downloaded from GitHub releases. For example here is a way to
24
24
download the latest release using ` wget ` . Replace ` $os ` and ` $arch ` with your
25
25
operating system and architecture.
26
26
27
- ```
27
+ ``` console
28
28
wget https://github.com/coder/code-marketplace/releases/latest/download/code-marketplace-$os-$arch -O ./code-marketplace
29
29
chmod +x ./code-marketplace
30
30
```
@@ -33,7 +33,7 @@ chmod +x ./code-marketplace
33
33
34
34
The marketplace server can be ran using the ` server ` sub-command.
35
35
36
- ```
36
+ ``` console
37
37
./code-marketplace server --extensions-dir ./extensions
38
38
```
39
39
@@ -52,7 +52,7 @@ headers are used to generate absolute URIs to extension assets in API responses.
52
52
One way to test this is to make a query and check one of the URIs in the
53
53
response:
54
54
55
- ```
55
+ ``` console
56
56
$ curl ' https://example.com/api/extensionquery' -H ' Accept: application/json;api-version=3.0-preview.1' --compressed -H ' Content-Type: application/json' --data-raw ' {"filters":[{"criteria":[{"filterType":8,"value":"Microsoft.VisualStudio.Code"}],"pageSize":1}],"flags":439}' | jq .results[0].extensions[0].versions[0].assetUri
57
57
"https://example.com/assets/vscodevim/vim/1.24.1"
58
58
```
@@ -70,7 +70,7 @@ receive requests.
70
70
Extensions can be added to the marketplace by file or URL. The extensions
71
71
directory does not need to be created beforehand.
72
72
73
- ```
73
+ ``` console
74
74
./code-marketplace add extension.vsix --extensions-dir ./extensions
75
75
./code-marketplace add https://domain.tld/extension.vsix --extensions-dir ./extensions
76
76
```
@@ -87,13 +87,13 @@ If an extension is open source you can get it from one of three locations:
87
87
88
88
For example to add the Python extension from Open VSX:
89
89
90
- ```
90
+ ``` console
91
91
./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
92
92
```
93
93
94
94
Or the Vim extension from GitHub:
95
95
96
- ```
96
+ ``` console
97
97
./code-marketplace add https://github.com/VSCodeVim/Vim/releases/download/v1.24.1/vim-1.24.1.vsix --extensions-dir ./extensions
98
98
```
99
99
@@ -102,14 +102,14 @@ Or the Vim extension from GitHub:
102
102
Extensions can be removed from the marketplace by ID and version (or use ` --all `
103
103
to remove all versions).
104
104
105
- ```
105
+ ``` console
106
106
./code-marketplace remove ms-python.python-2022.14.0 --extensions-dir ./extensions
107
107
./code-marketplace remove ms-python.python --all --extensions-dir ./extensions
108
108
```
109
109
110
110
## Usage in code-server
111
111
112
- ```
112
+ ``` console
113
113
export EXTENSIONS_GALLERY='{"serviceUrl":"https://<domain>/api", "itemUrl":"https://<domain>/item", "resourceUrlTemplate": "https://<domain>/files/{publisher}/{name}/{version}/{path}"}'
114
114
code-server
115
115
```
@@ -119,7 +119,7 @@ marketplace is running behind an https URL.
119
119
120
120
## Development
121
121
122
- ```
122
+ ``` console
123
123
make test
124
124
mkdir -p extensions
125
125
go run ./cmd/marketplace/main.go server --extensions-dir ./extensions
@@ -149,4 +149,3 @@ update the changelog as part of your PR.
149
149
## Planned work
150
150
151
151
- jFrog integration for file storage.
152
- - Helm chart for deployment.
0 commit comments