2024-06-03
This commit is contained in:
		
							
								
								
									
										98
									
								
								_-Review/code-marketplace.md
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										98
									
								
								_-Review/code-marketplace.md
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,98 @@ | ||||
| --- | ||||
| type: "topic" | ||||
| created: "2024-01-14T02:18:21.719Z" | ||||
| updated: "2024-01-16T22:39:43.760Z" | ||||
| --- | ||||
|  | ||||
| # code-marketplace | ||||
|  | ||||
| ```PowerShell | ||||
| # https://github.com/coder/code-marketplace | ||||
| mkdir D:\go-lang\code-marketplace\extensions | ||||
| nssm install code-marketplace | ||||
| ``` | ||||
|  | ||||
| ```yaml | ||||
| Application Tab: | ||||
|   Path: D:\go-lang\code-marketplace\code-marketplace-windows-amd64.exe | ||||
|   Startup directory: D:\go-lang\code-marketplace | ||||
|   Arguments: server --extensions-dir ./extensions | ||||
| ``` | ||||
|  | ||||
| ```bash | ||||
| D: | ||||
| cd "D:\go-lang\code-marketplace" | ||||
| code-marketplace-windows-amd64.exe  --extensions-dir ./extensions add "C:\Users\phares\Downloads\dheovani.svg-viewer-1.0.2.vsix" | ||||
| code-marketplace-windows-amd64.exe  --extensions-dir ./extensions add "L:\Git\YO-VSCode\type-script-helper\type-script-helper-1.5.1.vsix" | ||||
| ``` | ||||
|  | ||||
| ```bash | ||||
| L: | ||||
| cd "L:\Git\code-marketplace" | ||||
| go run ./cmd/marketplace/main.go server --extensions-dir ./extensions | ||||
| ``` | ||||
|  | ||||
| ```bash | ||||
| curl 'https://localhost/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 | ||||
| "https://localhost/assets/vscodevim/vim/1.24.1" | ||||
| "https://localhost/assets/IFX/type-script-helper/1.5.1" | ||||
| "https://localhost/files/IFX/type-script-helper/1.5.1" | ||||
| ``` | ||||
|  | ||||
| ```json # product.json | ||||
| 	"extensionsGallery": { | ||||
| 		"serviceUrl": "https://code-marketplace/api", | ||||
| 		"itemUrl": "https://code-marketplace/item", | ||||
|         "resourceUrlTemplate": "https://code-marketplace/files/{publisher}/{name}/{version}/{path}" | ||||
| 	}, | ||||
| ``` | ||||
|  | ||||
| ```json # product.json | ||||
| 	"linkProtectionTrustedDomains": [ | ||||
| 		"https://code-marketplace" | ||||
| 	], | ||||
| ``` | ||||
|  | ||||
| - [codium](https://code-marketplace/api/publishers/IFX/vsextensions/type-script-helper/1.5.1/vspackage) | ||||
| - [actual](https://code-marketplace/files/IFX/type-script-helper/1.5.1/IFX.type-script-helper-1.5.1.vsix) | ||||
|  | ||||
| - [Using-Open-VSX-in-VS-Code](https://github.com/eclipse/openvsx/wiki/Using-Open-VSX-in-VS-Code) | ||||
| - [using-extensions-in-compiled-vscode](https://stackoverflow.com/questions/44057402/using-extensions-in-compiled-vscode) | ||||
|  | ||||
| ```json | ||||
| [ | ||||
|   { | ||||
|     "_id": "0147389a-4d28-47df-a84d-937d1f15a411", | ||||
|     "colId": "history", | ||||
|     "containerId": "", | ||||
|     "name": "https://code-marketplace/api/extensionquery", | ||||
|     "url": "https://code-marketplace/api/extensionquery", | ||||
|     "method": "POST", | ||||
|     "sortNum": 0, | ||||
|     "created": "2023-09-30T19:41:35.995Z", | ||||
|     "modified": "2023-09-30T19:52:38.850Z", | ||||
|     "headers": [ | ||||
|       { | ||||
|         "name": "Accept", | ||||
|         "value": "application/json;api-version=3.0-preview.1" | ||||
|       }, | ||||
|       { | ||||
|         "name": "Content-Type", | ||||
|         "value": "application/json" | ||||
|       }, | ||||
|       { | ||||
|         "name": "User-Agent", | ||||
|         "value": "Thunder Client (https://www.thunderclient.com)", | ||||
|         "isDisabled": true | ||||
|       } | ||||
|     ], | ||||
|     "params": [], | ||||
|     "body": { | ||||
|       "type": "json", | ||||
|       "raw": "{\"filters\":[{\"criteria\":[{\"filterType\":8,\"value\":\"Microsoft.VisualStudio.Code\"}],\"pageSize\":1}],\"flags\":439}", | ||||
|       "form": [] | ||||
|     }, | ||||
|     "tests": [] | ||||
|   } | ||||
| ] | ||||
| ``` | ||||
		Reference in New Issue
	
	Block a user