mirror of
https://github.com/Microsoft/vscode
synced 2024-08-28 05:19:39 +00:00
parent
42443181e4
commit
ac5ed16ece
|
@ -32,7 +32,6 @@ const extensions = [
|
|||
'typescript',
|
||||
'php',
|
||||
'javascript',
|
||||
'package-json',
|
||||
'css',
|
||||
'html',
|
||||
'git',
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
"name": "npm",
|
||||
"publisher": "vscode",
|
||||
"displayName": "%displayName%",
|
||||
"description": "%description%",
|
||||
"description": "%description%",
|
||||
"version": "0.0.1",
|
||||
"engines": {
|
||||
"vscode": "0.10.x"
|
||||
|
@ -16,6 +16,8 @@
|
|||
"watch": "gulp watch-extension:npm"
|
||||
},
|
||||
"dependencies": {
|
||||
"jsonc-parser": "^1.0.0",
|
||||
"request-light": "^0.2.2",
|
||||
"vscode-nls": "^3.2.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
@ -23,7 +25,8 @@
|
|||
},
|
||||
"main": "./out/main",
|
||||
"activationEvents": [
|
||||
"onCommand:workbench.action.tasks.runTask"
|
||||
"onCommand:workbench.action.tasks.runTask",
|
||||
"onLanguage:json"
|
||||
],
|
||||
"contributes": {
|
||||
"configuration": {
|
||||
|
@ -59,6 +62,16 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"jsonValidation": [
|
||||
{
|
||||
"fileMatch": "package.json",
|
||||
"url": "https://schemastore.azurewebsites.net/schemas/json/package.json"
|
||||
},
|
||||
{
|
||||
"fileMatch": "bower.json",
|
||||
"url": "https://schemastore.azurewebsites.net/schemas/json/bower.json"
|
||||
}
|
||||
],
|
||||
"taskDefinitions": [
|
||||
{
|
||||
"type": "npm",
|
||||
|
|
|
@ -6,14 +6,17 @@
|
|||
|
||||
import * as path from 'path';
|
||||
import * as fs from 'fs';
|
||||
import * as httpRequest from 'request-light';
|
||||
import * as vscode from 'vscode';
|
||||
import * as nls from 'vscode-nls';
|
||||
const localize = nls.loadMessageBundle();
|
||||
|
||||
import { addJSONProviders } from './features/jsonContributions';
|
||||
|
||||
type AutoDetect = 'on' | 'off';
|
||||
let taskProvider: vscode.Disposable | undefined;
|
||||
|
||||
export function activate(_context: vscode.ExtensionContext): void {
|
||||
export function activate(context: vscode.ExtensionContext): void {
|
||||
if (!vscode.workspace.workspaceFolders) {
|
||||
return;
|
||||
}
|
||||
|
@ -26,6 +29,15 @@ export function activate(_context: vscode.ExtensionContext): void {
|
|||
return undefined;
|
||||
}
|
||||
});
|
||||
configureHttpRequest();
|
||||
vscode.workspace.onDidChangeConfiguration(() => configureHttpRequest());
|
||||
|
||||
context.subscriptions.push(addJSONProviders(httpRequest.xhr));
|
||||
}
|
||||
|
||||
function configureHttpRequest() {
|
||||
const httpSettings = vscode.workspace.getConfiguration('http');
|
||||
httpRequest.configure(httpSettings.get<string>('proxy', ''), httpSettings.get<boolean>('proxyStrictSSL', true));
|
||||
}
|
||||
|
||||
export function deactivate(): void {
|
||||
|
|
|
@ -6,6 +6,68 @@
|
|||
version "7.0.43"
|
||||
resolved "https://registry.yarnpkg.com/@types/node/-/node-7.0.43.tgz#a187e08495a075f200ca946079c914e1a5fe962c"
|
||||
|
||||
agent-base@4, agent-base@^4.1.0:
|
||||
version "4.2.0"
|
||||
resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-4.2.0.tgz#9838b5c3392b962bad031e6a4c5e1024abec45ce"
|
||||
dependencies:
|
||||
es6-promisify "^5.0.0"
|
||||
|
||||
debug@2:
|
||||
version "2.6.9"
|
||||
resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f"
|
||||
dependencies:
|
||||
ms "2.0.0"
|
||||
|
||||
debug@^3.1.0:
|
||||
version "3.1.0"
|
||||
resolved "https://registry.yarnpkg.com/debug/-/debug-3.1.0.tgz#5bb5a0672628b64149566ba16819e61518c67261"
|
||||
dependencies:
|
||||
ms "2.0.0"
|
||||
|
||||
es6-promise@^4.0.3:
|
||||
version "4.2.4"
|
||||
resolved "https://registry.yarnpkg.com/es6-promise/-/es6-promise-4.2.4.tgz#dc4221c2b16518760bd8c39a52d8f356fc00ed29"
|
||||
|
||||
es6-promisify@^5.0.0:
|
||||
version "5.0.0"
|
||||
resolved "https://registry.yarnpkg.com/es6-promisify/-/es6-promisify-5.0.0.tgz#5109d62f3e56ea967c4b63505aef08291c8a5203"
|
||||
dependencies:
|
||||
es6-promise "^4.0.3"
|
||||
|
||||
http-proxy-agent@2.0.0:
|
||||
version "2.0.0"
|
||||
resolved "https://registry.yarnpkg.com/http-proxy-agent/-/http-proxy-agent-2.0.0.tgz#46482a2f0523a4d6082551709f469cb3e4a85ff4"
|
||||
dependencies:
|
||||
agent-base "4"
|
||||
debug "2"
|
||||
|
||||
https-proxy-agent@2.1.1:
|
||||
version "2.1.1"
|
||||
resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-2.1.1.tgz#a7ce4382a1ba8266ee848578778122d491260fd9"
|
||||
dependencies:
|
||||
agent-base "^4.1.0"
|
||||
debug "^3.1.0"
|
||||
|
||||
jsonc-parser@^1.0.0:
|
||||
version "1.0.1"
|
||||
resolved "https://registry.yarnpkg.com/jsonc-parser/-/jsonc-parser-1.0.1.tgz#7f8f296414e6e7c4a33b9e4914fc8c47e4421675"
|
||||
|
||||
ms@2.0.0:
|
||||
version "2.0.0"
|
||||
resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8"
|
||||
|
||||
request-light@^0.2.2:
|
||||
version "0.2.2"
|
||||
resolved "https://registry.yarnpkg.com/request-light/-/request-light-0.2.2.tgz#53e48af32ad1514e45221ea5ece5ce782720f712"
|
||||
dependencies:
|
||||
http-proxy-agent "2.0.0"
|
||||
https-proxy-agent "2.1.1"
|
||||
vscode-nls "^2.0.2"
|
||||
|
||||
vscode-nls@^2.0.2:
|
||||
version "2.0.2"
|
||||
resolved "https://registry.yarnpkg.com/vscode-nls/-/vscode-nls-2.0.2.tgz#808522380844b8ad153499af5c3b03921aea02da"
|
||||
|
||||
vscode-nls@^3.2.1:
|
||||
version "3.2.1"
|
||||
resolved "https://registry.yarnpkg.com/vscode-nls/-/vscode-nls-3.2.1.tgz#b1f3e04e8a94a715d5a7bcbc8339c51e6d74ca51"
|
||||
|
|
|
@ -1,3 +0,0 @@
|
|||
test/**
|
||||
src/**/*.ts
|
||||
tsconfig.json
|
|
@ -1,38 +0,0 @@
|
|||
{
|
||||
"name": "package-json",
|
||||
"displayName": "%displayName%",
|
||||
"description": "%description%",
|
||||
"version": "0.1.0",
|
||||
"publisher": "vscode",
|
||||
"engines": {
|
||||
"vscode": "0.10.x"
|
||||
},
|
||||
"activationEvents": [
|
||||
"onLanguage:json"
|
||||
],
|
||||
"main": "./out/javascriptMain",
|
||||
"dependencies": {
|
||||
"jsonc-parser": "^1.0.0",
|
||||
"request-light": "^0.2.2",
|
||||
"vscode-nls": "^3.2.1"
|
||||
},
|
||||
"scripts": {
|
||||
"compile": "gulp compile-extension:package-json",
|
||||
"watch": "gulp watch-extension:package-json"
|
||||
},
|
||||
"contributes": {
|
||||
"jsonValidation": [
|
||||
{
|
||||
"fileMatch": "package.json",
|
||||
"url": "https://schemastore.azurewebsites.net/schemas/json/package.json"
|
||||
},
|
||||
{
|
||||
"fileMatch": "bower.json",
|
||||
"url": "https://schemastore.azurewebsites.net/schemas/json/bower.json"
|
||||
}
|
||||
]
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "8.0.33"
|
||||
}
|
||||
}
|
|
@ -1,4 +0,0 @@
|
|||
{
|
||||
"displayName": "Package.json Support",
|
||||
"description": "Adds package.json editing features."
|
||||
}
|
|
@ -1,23 +0,0 @@
|
|||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
'use strict';
|
||||
|
||||
import { addJSONProviders } from './features/jsonContributions';
|
||||
import * as httpRequest from 'request-light';
|
||||
|
||||
import { ExtensionContext, workspace } from 'vscode';
|
||||
|
||||
export function activate(context: ExtensionContext): any {
|
||||
configureHttpRequest();
|
||||
workspace.onDidChangeConfiguration(() => configureHttpRequest());
|
||||
|
||||
context.subscriptions.push(addJSONProviders(httpRequest.xhr));
|
||||
}
|
||||
|
||||
function configureHttpRequest() {
|
||||
const httpSettings = workspace.getConfiguration('http');
|
||||
httpRequest.configure(httpSettings.get<string>('proxy', ''), httpSettings.get<boolean>('proxyStrictSSL', true));
|
||||
}
|
7
extensions/package-json/src/typings/ref.d.ts
vendored
7
extensions/package-json/src/typings/ref.d.ts
vendored
|
@ -1,7 +0,0 @@
|
|||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
/// <reference path='../../../../src/vs/vscode.d.ts'/>
|
||||
/// <reference types='@types/node'/>
|
|
@ -1,18 +0,0 @@
|
|||
{
|
||||
"compilerOptions": {
|
||||
"target": "es5",
|
||||
"module": "commonjs",
|
||||
"outDir": "./out",
|
||||
"lib": [
|
||||
"es2015"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitReturns": true,
|
||||
"noUnusedLocals": true,
|
||||
"noUnusedParameters": true,
|
||||
"strict": true
|
||||
},
|
||||
"include": [
|
||||
"src/**/*"
|
||||
]
|
||||
}
|
|
@ -1,73 +0,0 @@
|
|||
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
|
||||
# yarn lockfile v1
|
||||
|
||||
|
||||
"@types/node@8.0.33":
|
||||
version "8.0.33"
|
||||
resolved "https://registry.yarnpkg.com/@types/node/-/node-8.0.33.tgz#1126e94374014e54478092830704f6ea89df04cd"
|
||||
|
||||
agent-base@4, agent-base@^4.1.0:
|
||||
version "4.2.0"
|
||||
resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-4.2.0.tgz#9838b5c3392b962bad031e6a4c5e1024abec45ce"
|
||||
dependencies:
|
||||
es6-promisify "^5.0.0"
|
||||
|
||||
debug@2:
|
||||
version "2.6.9"
|
||||
resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f"
|
||||
dependencies:
|
||||
ms "2.0.0"
|
||||
|
||||
debug@^3.1.0:
|
||||
version "3.1.0"
|
||||
resolved "https://registry.yarnpkg.com/debug/-/debug-3.1.0.tgz#5bb5a0672628b64149566ba16819e61518c67261"
|
||||
dependencies:
|
||||
ms "2.0.0"
|
||||
|
||||
es6-promise@^4.0.3:
|
||||
version "4.2.4"
|
||||
resolved "https://registry.yarnpkg.com/es6-promise/-/es6-promise-4.2.4.tgz#dc4221c2b16518760bd8c39a52d8f356fc00ed29"
|
||||
|
||||
es6-promisify@^5.0.0:
|
||||
version "5.0.0"
|
||||
resolved "https://registry.yarnpkg.com/es6-promisify/-/es6-promisify-5.0.0.tgz#5109d62f3e56ea967c4b63505aef08291c8a5203"
|
||||
dependencies:
|
||||
es6-promise "^4.0.3"
|
||||
|
||||
http-proxy-agent@2.0.0:
|
||||
version "2.0.0"
|
||||
resolved "https://registry.yarnpkg.com/http-proxy-agent/-/http-proxy-agent-2.0.0.tgz#46482a2f0523a4d6082551709f469cb3e4a85ff4"
|
||||
dependencies:
|
||||
agent-base "4"
|
||||
debug "2"
|
||||
|
||||
https-proxy-agent@2.1.1:
|
||||
version "2.1.1"
|
||||
resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-2.1.1.tgz#a7ce4382a1ba8266ee848578778122d491260fd9"
|
||||
dependencies:
|
||||
agent-base "^4.1.0"
|
||||
debug "^3.1.0"
|
||||
|
||||
jsonc-parser@^1.0.0:
|
||||
version "1.0.1"
|
||||
resolved "https://registry.yarnpkg.com/jsonc-parser/-/jsonc-parser-1.0.1.tgz#7f8f296414e6e7c4a33b9e4914fc8c47e4421675"
|
||||
|
||||
ms@2.0.0:
|
||||
version "2.0.0"
|
||||
resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8"
|
||||
|
||||
request-light@^0.2.2:
|
||||
version "0.2.2"
|
||||
resolved "https://registry.yarnpkg.com/request-light/-/request-light-0.2.2.tgz#53e48af32ad1514e45221ea5ece5ce782720f712"
|
||||
dependencies:
|
||||
http-proxy-agent "2.0.0"
|
||||
https-proxy-agent "2.1.1"
|
||||
vscode-nls "^2.0.2"
|
||||
|
||||
vscode-nls@^2.0.2:
|
||||
version "2.0.2"
|
||||
resolved "https://registry.yarnpkg.com/vscode-nls/-/vscode-nls-2.0.2.tgz#808522380844b8ad153499af5c3b03921aea02da"
|
||||
|
||||
vscode-nls@^3.2.1:
|
||||
version "3.2.1"
|
||||
resolved "https://registry.yarnpkg.com/vscode-nls/-/vscode-nls-3.2.1.tgz#b1f3e04e8a94a715d5a7bcbc8339c51e6d74ca51"
|
Loading…
Reference in a new issue