🦄 refactor(阅读代码): package.json增加注释

master
yetao 4 weeks ago
parent 94ce9f8e65
commit 065ca84b6d

@ -1,315 +1,465 @@
{
//
"name": "vscode-sshfs",
// VSCode
"displayName": "SSH FS",
//
"description": "File system, terminal and task provider using SSH",
//
"publisher": "Kelvin",
//
"version": "1.26.1",
// VSCode
"engines": {
"vscode": "^1.49.0"
},
// "Other"
"categories": [
"Other"
],
//
"activationEvents": [
// 访 SSH
"onFileSystem:ssh",
// 访 SSH
"onFileSystemAccess:ssh",
// SSH FS
"onView:sshfs-configs",
// SSH FS
"onView:sshfs-connections",
// sshfs.new
"onCommand:sshfs.new",
// sshfs.add
"onCommand:sshfs.add",
// sshfs.disconnect
"onCommand:sshfs.disconnect",
// sshfs.disconnectAll
"onCommand:sshfs.disconnectAll",
// sshfs.terminal
"onCommand:sshfs.terminal",
// sshfs.focusTerminal
"onCommand:sshfs.focusTerminal",
// sshfs.closeTerminal
"onCommand:sshfs.closeTerminal",
// sshfs.configure
"onCommand:sshfs.configure",
// sshfs.reload
"onCommand:sshfs.reload",
// sshfs.settings
"onCommand:sshfs.settings",
// sshfs.refresh
"onCommand:sshfs.refresh"
],
//
"main": "./dist/extension.js",
//
"homepage": "https://github.com/SchoofsKelvin/vscode-sshfs",
//
"author": {
//
"name": "Kelvin Schoofs",
//
"email": "schoofs.kelvin@gmail.com",
// GitHub
"url": "https://github.com/SchoofsKelvin"
},
//
"repository": {
// git
"type": "git",
// URL
"url": "https://github.com/SchoofsKelvin/vscode-sshfs"
},
// Bug
"bugs": {
// Bug URL
"url": "https://github.com/SchoofsKelvin/vscode-sshfs/issues"
},
//
"license": "GPL-3.0",
//
"icon": "resources/Logo.png",
// VSCode
"keywords": [
//
"remote",
// 使 SSH
"ssh",
// 使 SSH SSHFS
"sshfs",
//
"sync",
//
"filesystem",
//
"terminal",
// SFTP
"sftp",
// SCP
"scp"
],
//
"badges": [
// GitHub
{
"url": "https://img.shields.io/github/v/release/SchoofsKelvin/vscode-sshfs?include_prereleases&label=GitHub%20version",
"href": "https://github.com/SchoofsKelvin/vscode-sshfs/releases",
"description": "Releases on GitHub"
},
// Open VSX Open VSX
{
"url": "https://img.shields.io/open-vsx/v/Kelvin/vscode-sshfs?label=Open%20VSX",
"href": "https://open-vsx.org/extension/Kelvin/vscode-sshfs",
"description": "Open VSX Registry"
},
// Visual Studio Marketplace Visual Studio Marketplace
{
"url": "https://img.shields.io/visual-studio-marketplace/v/Kelvin.vscode-sshfs?label=VS%20Marketplace&logo=sdf",
"href": "https://marketplace.visualstudio.com/items?itemName=Kelvin.vscode-sshfs",
"description": "Visual Studio Marketplace"
},
// Visual Studio Marketplace Visual Studio Marketplace
{
"url": "https://img.shields.io/visual-studio-marketplace/i/Kelvin.vscode-sshfs?label=Installs",
"href": "https://marketplace.visualstudio.com/items?itemName=Kelvin.vscode-sshfs",
"description": "Unique installs using Visual Studio Marketplace"
}
],
//
"sponsor": {
// URL
"url": "https://github.com/sponsors/SchoofsKelvin"
},
// VSCode
"contributes": {
//
"views": {
// sshfs
"sshfs": [
{
//
"id": "sshfs-configs",
//
"name": "Configurations",
//
"contextualTitle": "SSH FS - Configurations",
//
"icon": "resources/icon.svg",
//
"visibility": "visible"
},
{
//
"id": "sshfs-connections",
//
"name": "Connections",
//
"contextualTitle": "SSH FS - Connections",
//
"icon": "resources/icon.svg",
//
"visibility": "visible"
}
]
},
// VSCode
"viewsContainers": {
// sshfs
"activitybar": [
{
//
"id": "sshfs",
//
"title": "SSH FS",
//
"icon": "resources/icon.svg"
}
]
},
// VSCode SSH FS
"commands": [
{
//
"command": "sshfs.new",
//
"title": "Create a SSH FS configuration",
//
"category": "SSH FS",
// 使 VSCode
"icon": "$(new-file)"
},
{
//
"command": "sshfs.add",
//
"title": "Add as Workspace folder",
//
"category": "SSH FS",
// 使 VSCode
"icon": "$(new-folder)"
},
{
//
"command": "sshfs.disconnect",
//
"title": "Disconnect",
//
"category": "SSH FS",
// 使 VSCode
"icon": "$(debug-disconnect)"
},
{
//
"command": "sshfs.disconnectAll",
//
"title": "Disconnect all",
//
"category": "SSH FS",
// 使 VSCode
"icon": "$(debug-disconnect)"
},
{
//
"command": "sshfs.terminal",
//
"title": "Open remote SSH terminal",
//
"category": "SSH FS",
// 使 VSCode
"icon": "$(terminal)"
},
{
//
"command": "sshfs.configure",
//
"title": "Edit configuration",
//
"category": "SSH FS",
// 使 VSCode
"icon": "$(settings-gear)"
},
{
//
"command": "sshfs.reload",
//
"title": "Reload configurations",
//
"category": "SSH FS",
// 使 VSCode
"icon": "$(refresh)"
},
{
//
"command": "sshfs.settings",
//
"title": "Open settings and edit configurations",
//
"category": "SSH FS",
// 使 VSCode
"icon": "$(settings)"
},
{
//
"command": "sshfs.refresh",
//
"title": "Refresh",
//
"category": "SSH FS",
// 使 VSCode
"icon": "$(refresh)"
},
{
//
"command": "sshfs.focusTerminal",
//
"title": "Focus terminal",
//
"category": "SSH FS",
// 使 VSCode
"icon": "$(eye)"
},
{
//
"command": "sshfs.closeTerminal",
//
"title": "Close terminal",
//
"category": "SSH FS",
// 使 VSCode
"icon": "$(close)"
}
],
// menus
"menus": {
// commandPalette
"commandPalette": [
// sshfs.new SSH FS 1
{
"command": "sshfs.new",
"group": "SSH FS@1"
},
// sshfs.add SSH FS 2
{
"command": "sshfs.add",
"group": "SSH FS@2"
},
// sshfs.disconnect SSH FS 3
{
"command": "sshfs.disconnect",
"group": "SSH FS@3"
},
// sshfs.terminal SSH FS 4
{
"command": "sshfs.terminal",
"group": "SSH FS@4"
},
// sshfs.configure SSH FS 5
{
"command": "sshfs.configure",
"group": "SSH FS@5"
},
// sshfs.reload SSH FS 6
{
"command": "sshfs.reload",
"group": "SSH FS@6"
},
// sshfs.disconnectAll SSH FS 7
{
"command": "sshfs.disconnectAll",
"group": "SSH FS@7"
},
// sshfs.settings SSH FS 8
{
"command": "sshfs.settings",
"group": "SSH FS@8"
},
// sshfs.focusTerminal
{
"command": "sshfs.focusTerminal",
"when": "false"
},
// sshfs.closeTerminal
{
"command": "sshfs.closeTerminal",
"when": "false"
},
// sshfs.refresh
{
"command": "sshfs.refresh",
"when": "false"
}
],
// view/title
"view/title": [
// sshfs.refresh 'sshfs-configs' 'sshfs-connections' 1
{
"command": "sshfs.refresh",
"when": "view == 'sshfs-configs' || view == 'sshfs-connections'",
"group": "navigation@1"
},
// sshfs.new 'sshfs-configs' 2
{
"command": "sshfs.new",
"when": "view == 'sshfs-configs'",
"group": "navigation@2"
},
// sshfs.add 'sshfs-connections' 2
{
"command": "sshfs.add",
"when": "view == 'sshfs-connections'",
"group": "navigation@2"
},
// sshfs.disconnectAll 'sshfs-connections' 3
{
"command": "sshfs.disconnectAll",
"when": "view == 'sshfs-connections'",
"group": "navigation@3"
},
// sshfs.settings 'sshfs-configs' 'sshfs-connections' 100
{
"command": "sshfs.settings",
"when": "view == 'sshfs-configs' || view == 'sshfs-connections'",
"group": "navigation@100"
}
],
//
"view/item/context": [
// 'sshfs-configs' 'config' ''
{
"command": "sshfs.add",
"when": "view == 'sshfs-configs' && viewItem == config",
"group": "inline@1"
},
// 'sshfs-configs' 'config' ''
{
"command": "sshfs.terminal",
"when": "view == 'sshfs-configs' && viewItem == config",
"group": "inline@2"
},
// 'sshfs-configs' 'config' ''
{
"command": "sshfs.configure",
"when": "view == 'sshfs-configs' && viewItem == config",
"group": "inline@3"
},
// 'sshfs-configs' 'config' ''
{
"command": "sshfs.disconnect",
"when": "view == 'sshfs-configs' && viewItem == config",
"group": "inline@4"
},
// 'sshfs-connections' 'connection' ''
{
"command": "sshfs.terminal",
"when": "view == 'sshfs-connections' && viewItem == connection",
"group": "inline@1"
},
// 'sshfs-connections' 'connection' ''
{
"command": "sshfs.disconnect",
"when": "view == 'sshfs-connections' && viewItem == connection",
"group": "inline@2"
},
// 'sshfs-connections' 'terminal' ''
{
"command": "sshfs.closeTerminal",
"when": "view == 'sshfs-connections' && viewItem == terminal",
"group": "inline@1"
}
],
//
"explorer/context": [
// sshfs.terminal ssh 30
{
"command": "sshfs.terminal",
"when": "explorerResourceIsFolder && resourceScheme == ssh",
"group": "navigation@30"
}
],
//
"statusBar/remoteIndicator": [
// sshfs.add remote_11_ssh_sshfs 1
{
"command": "sshfs.add",
"group": "remote_11_ssh_sshfs@1"
},
// sshfs.terminal remote_11_ssh_sshfs 2
{
"command": "sshfs.terminal",
"group": "remote_11_ssh_sshfs@2"
},
// sshfs.settings remote_11_ssh_sshfs 3
{
"command": "sshfs.settings",
"group": "remote_11_ssh_sshfs@3"
},
// sshfs.disconnect remote_11_ssh_sshfs 4 sshfs.openConnections 0
{
"command": "sshfs.disconnect",
"group": "remote_11_ssh_sshfs@4",
"when": "sshfs.openConnections > 0"
},
// sshfs.disconnectAll remote_11_ssh_sshfs 5 sshfs.openConnections 0
{
"command": "sshfs.disconnectAll",
"group": "remote_11_ssh_sshfs@5",
@ -317,99 +467,166 @@
}
]
},
//
"configuration": {
//
"title": "SSH FS Configuration",
//
"properties": {
// sshfs.configpaths SSH FS
"sshfs.configpaths": {
//
"title": "A list of file locations to load SSH FS configurations from",
//
"description": "Location of JSON files to load configs from",
//
"type": "array",
//
"items": "string",
//
"default": []
},
// sshfs.configs SSH FS
"sshfs.configs": {
//
"title": "A list of SSH FS configurations",
//
"description": "Use the Settings UI to edit configurations (run command SSH FS: Open settings and edit configurations)",
// Markdown
"markdownDescription": "Use the Settings UI to edit configurations *(run command `SSH FS: Open settings and edit configurations`)*",
//
"type": "array",
//
"items": "object",
//
"default": [
{
//
"root": "/tmp",
//
"host": "localhost",
//
"port": 22,
//
"username": "root",
//
"password": "CorrectHorseBatteryStaple"
}
]
},
// sshfs.flags /
"sshfs.flags": {
//
"title": "List of special flags to enable/disable certain fixes/features",
//
"description": "Flags are usually used for issues or beta testing. Flags can disappear/change anytime!",
//
"type": "array",
//
"items": "string",
//
"default": []
}
}
},
// SSH
"taskDefinitions": [
{
//
"type": "ssh-shell",
//
"properties": {
// SSH
"host": {
//
"type": "string",
//
"description": "The configuration (name) to run this task on"
},
//
"command": {
//
"type": "string",
//
"description": "The command to run on the server"
},
//
"workingDirectory": {
//
"type": "string",
//
"description": "The working directory (relative to the config-defined root) to run the command in"
}
},
//
"required": [
//
"host",
//
"command"
]
}
],
// SSH
"resourceLabelFormatters": [
{
// ssh
"scheme": "ssh",
//
"formatting": {
// 使
"label": "${scheme}://${authority}/${path}",
// /
"separator": "/",
// ~ false
"tildify": false,
// true
"stripPathStartingSeparator": true,
// SSH FS
"workspaceSuffix": "SSH FS"
}
}
],
// viewsWelcome
"viewsWelcome": [
// sshfs-configs
{
//
"view": "sshfs-configs",
//
"contents": "No configurations created yet"
},
// sshfs-connections
{
//
"view": "sshfs-connections",
//
"contents": "Not connected to anything"
}
]
},
//
"capabilities": {
//
"virtualWorkspaces": true,
//
"untrustedWorkspaces": {
//
"supported": true
}
},
//
"scripts": {
//
"vscode:prepublish": "yarn workspaces foreach -tvip -j 2 run build",
//
"build": "webpack --mode production",
//
"compile": "webpack --mode development",
//
"watch": "webpack --mode development --watch"
},
//
"devDependencies": {
"@types/node": "^12.7.12",
"@types/request": "^2.48.1",
@ -426,6 +643,7 @@
"webpack": "^5.76.3",
"webpack-cli": "^5.0.1"
},
//
"dependencies": {
"common": "workspace:*",
"event-stream": "^4.0.1",
@ -435,13 +653,18 @@
"ssh2": "^1.11.0",
"winreg": "^1.2.4"
},
//
"resolutions": {
"cpu-features": "npm:@favware/skip-dependency@1.1.3",
"ssh2@^1.11.0": "patch:ssh2@npm%3A1.11.0#./.yarn/patches/ssh2-npm-1.11.0-convertSha1.patch"
},
//
"workspaces": [
// common
"./common",
// webview
"./webview"
],
// 使
"packageManager": "yarn@3.5.0"
}

Loading…
Cancel
Save