-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
24f2cb7
commit 90f5f65
Showing
5 changed files
with
162 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
out/ | ||
node_modules/ |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
{ | ||
"name": "vscode-nuget-installer-api", | ||
"version": "0.0.0", | ||
"description": "Contracts for VS Code Nuget Installer", | ||
"main": "out/index.js", | ||
"types": "out/index.d.ts", | ||
"scripts": { | ||
"build": "tsc" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/kavod-io/vscode-nuget-installer-api.git" | ||
}, | ||
"author": "Ross Knudsen", | ||
"license": "MIT", | ||
"bugs": { | ||
"url": "https://github.com/kavod-io/vscode-nuget-installer-api/issues" | ||
}, | ||
"homepage": "https://github.com/kavod-io/vscode-nuget-installer-api#readme", | ||
"devDependencies": { | ||
"@types/vscode": "^1.75.0", | ||
"typescript": "^5.4.3" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
/** | ||
* This is a definition for a Nuget source. These are defined in the extension settings. | ||
*/ | ||
export interface PackageSource { | ||
name: string; | ||
|
||
/** | ||
* Service Index URL e.g. https://api.nuget.org/v3/index.json | ||
*/ | ||
url: string; | ||
|
||
credentials: Credentials | null; | ||
} | ||
|
||
export interface Credentials { | ||
username: string; | ||
password: string; | ||
} | ||
|
||
export type Message = | ||
| SetProjectsMessage | ||
| SetSourcesMessage | ||
| AddCompleteMessage | ||
| RemoveCompleteMessage; | ||
|
||
export interface SetProjectsMessage { | ||
command: "setProjects"; | ||
payload: Project[]; | ||
commandId: string; | ||
} | ||
|
||
export interface SetSourcesMessage { | ||
command: "setSources"; | ||
payload: PackageSource[]; | ||
commandId: string; | ||
} | ||
|
||
export interface AddCompleteMessage { | ||
command: "addCompleted"; | ||
commandId: string; | ||
} | ||
|
||
export interface RemoveCompleteMessage { | ||
command: "removeCompleted"; | ||
commandId: string; | ||
} | ||
|
||
export interface Project { | ||
path: string; | ||
projectName: string; | ||
packages: ProjectPackage[]; | ||
} | ||
|
||
export interface ProjectPackage { | ||
id: string; | ||
version: string; | ||
} | ||
|
||
export type Command = | ||
| GetProjectCommand | ||
| GetSourcesCommand | ||
| AddPackagesCommand | ||
| RemovePackagesCommand; | ||
|
||
export interface GetProjectCommand { | ||
command: "getProjects"; | ||
commandId: string; | ||
} | ||
|
||
export interface GetSourcesCommand { | ||
command: "getSources"; | ||
commandId: string; | ||
} | ||
|
||
export interface AddPackagesCommand { | ||
command: "add"; | ||
commandId: string; | ||
source: string; | ||
projects: Project[]; | ||
packageId: string; | ||
version: string; | ||
} | ||
|
||
export interface RemovePackagesCommand { | ||
command: "remove"; | ||
commandId: string; | ||
projects: Project[]; | ||
packageId: string; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"compilerOptions": { | ||
"target": "es2015", | ||
"module": "commonjs", | ||
"outDir": "out", | ||
"declaration": true | ||
}, | ||
"include": [ | ||
"src/index.ts" | ||
] | ||
} |