GithubHelp home page GithubHelp logo

vscode-dts's Introduction

vscode-dts

CLI utility for downloading vscode.d.ts and vscode.proposed.d.ts

Usage

 ~ > npx vscode-dts
vscode-dts: CLI utility for downloading vscode.d.ts and vscode.proposed.<proposal>.d.ts

Usage:
  - npx vscode-dts dev                          Download vscode.proposaled.<proposal>.d.ts files
  - npx vscode-dts dev <git-tag | git-branch>   Download vscode.proposaled.<proposal>.d.ts files from git tag/branch of microsoft/vscode
  - npx vscode-dts <git-tag | git-branch>       Download vscode.d.ts from git tag/branch of microsoft/vscode
  - npx vscode-dts <git-tag | git-branch> -f    Download vscode.d.ts and remove conflicting types in node_modules/@types/vscode
  - npx vscode-dts                              Print Help
  - npx vscode-dts -h                           Print Help
  - npx vscode-dts --help                       Print Help

License

MIT

Contributing

This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com.

When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.

vscode-dts's People

Contributors

changqing-jing avatar connor4312 avatar dependabot[bot] avatar jrieken avatar microsoft-github-policy-service[bot] avatar microsoftopensource avatar msftgits avatar octref avatar roblourens avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

vscode-dts's Issues

[FR] Proxy Support

When running vscode-dts dev, I got the following:

Downloading vscode.proposed.d.ts
To:   D:\vscode-extension-samples\inline-completions\vscode.proposed.d.ts
From: https://raw.githubusercontent.com/microsoft/vscode/master/src/vs/vscode.proposed.d.ts
node:events:371
      throw er; // Unhandled 'error' event
      ^

Error: getaddrinfo ENOENT raw.githubusercontent.com
    at GetAddrInfoReqWrap.onlookup [as oncomplete] (node:dns:69:26)
Emitted 'error' event on ClientRequest instance at:
    at TLSSocket.socketErrorListener (node:_http_client:447:9)
    at TLSSocket.emit (node:events:394:28)
    at emitErrorNT (node:internal/streams/destroy:193:8)
    at emitErrorCloseNT (node:internal/streams/destroy:158:3)
    at processTicksAndRejections (node:internal/process/task_queues:83:21) {
  errno: -4058,
  code: 'ENOENT',
  syscall: 'getaddrinfo',
  hostname: 'raw.githubusercontent.com'
}

Basically saying https://raw.githubusercontent.com/microsoft/vscode/master/src/vs/vscode.proposed.d.ts can't be accessed.

Can vscode-dts add proxy support?

yarn install fails bind proxy

Same error as vscode-cpptools/issues/10631, it's said that the problem has been solved by Update vscode/dts #11047, but the bug still exists.

error log

yarn install --proxy=http://127.0.0.1:7890
yarn install v1.22.19
[1/5] Validating package.json...
warning [email protected]: The engine "vscode" appears to be invalid.
[2/5] Resolving packages...
success Already up-to-date.
$ npx vscode-dts dev && npx vscode-dts main
Downloading vscode.proposed.terminalDataWriteEvent.d.ts
To:   /home/wang/Documents/vmm/vscode-cpptools/Extension/vscode.proposed.terminalDataWriteEvent.d.ts
From: https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.terminalDataWriteEvent.d.ts
Read more about proposed API at: https://code.visualstudio.com/api/advanced-topics/using-proposed-api
node:events:492
      throw er; // Unhandled 'error' event
      ^

AggregateError
    at internalConnectMultiple (node:net:1114:18)
    at afterConnectMultiple (node:net:1667:5)
Emitted 'error' event on ClientRequest instance at:
    at TLSSocket.socketErrorListener (node:_http_client:495:9)
    at TLSSocket.emit (node:events:514:28)
    at emitErrorNT (node:internal/streams/destroy:151:8)
    at emitErrorCloseNT (node:internal/streams/destroy:116:3)
    at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
  code: 'ECONNREFUSED',
  [errors]: [
    Error: connect ECONNREFUSED 0.0.0.0:443
        at createConnectionError (node:net:1634:14)
        at afterConnectMultiple (node:net:1664:40) {
      errno: -111,
      code: 'ECONNREFUSED',
      syscall: 'connect',
      address: '0.0.0.0',
      port: 443
    },
    Error: connect ECONNREFUSED :::443
        at createConnectionError (node:net:1634:14)
        at afterConnectMultiple (node:net:1664:40) {
      errno: -111,
      code: 'ECONNREFUSED',
      syscall: 'connect',
      address: '::',
      port: 443
    }
  ]
}

Node.js v20.8.0
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.

### Environment

Environment

  • OS and Version: Linux ubuntu16-vm 5.19.0-35-generic #36~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Fri Feb 17 15:17:25 UTC 2 x86_64 x86_64 x86_64 GNU/Linux
  • VS Code Version: Arbitrary
  • C/C++ Extension Version: Commit: 350c1c38904c5678856964978451523c518fec0c
  • If using SSH remote, specify OS of remote machine:

Bug Summary and Steps to Reproduce

Bug Summary: On a laptop behind http proxy, yarn install fails at step postinstall

Steps to reproduce:

git clone https://github.com/Microsoft/vscode-cpptools.git
cd vscode-cpptools/Extension
export https_proxy=http://my_proxy:port
yarn install --proxy http://my_proxy:port

Expected behavior:
Install success

Configuration and Logs

yarn install --proxy=http://127.0.0.1:8080
yarn install v1.22.19
[1/5] Validating package.json...
warning [email protected]: The engine "vscode" appears to be invalid.
[2/5] Resolving packages...
[3/5] Fetching packages...
info There appears to be trouble with your network connection. Retrying...
info There appears to be trouble with your network connection. Retrying...
info There appears to be trouble with your network connection. Retrying...
info There appears to be trouble with your network connection. Retrying...
info There appears to be trouble with your network connection. Retrying...
warning @vscode/[email protected]: The engine "vscode" appears to be invalid.
warning [email protected]: The engine "vscode" appears to be invalid.
warning [email protected]: The engine "vscode" appears to be invalid.
warning [email protected]: The engine "vscode" appears to be invalid.
[4/5] Linking dependencies...
warning "@vscode/extension-telemetry > @microsoft/1ds-core-js > @microsoft/[email protected]" has unmet peer dependency "tslib@*".
[5/5] Building fresh packages...
$ npm run download-api

> [email protected] download-api
> vscode-dts dev

Downloading vscode.proposed.terminalDataWriteEvent.d.ts
To:   /home/jcq/workspace/vscode-cpptools/Extension/vscode.proposed.terminalDataWriteEvent.d.ts
From: https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.terminalDataWriteEvent.d.ts
Read more about proposed API at: https://code.visualstudio.com/api/advanced-topics/using-proposed-api
node:events:491
      throw er; // Unhandled 'error' event
      ^

Error: getaddrinfo ENOTFOUND raw.githubusercontent.com
    at GetAddrInfoReqWrap.onlookup [as oncomplete] (node:dns:109:26)
Emitted 'error' event on ClientRequest instance at:
    at TLSSocket.socketErrorListener (node:_http_client:494:9)
    at TLSSocket.emit (node:events:513:28)
    at emitErrorNT (node:internal/streams/destroy:157:8)
    at emitErrorCloseNT (node:internal/streams/destroy:122:3)
    at processTicksAndRejections (node:internal/process/task_queues:83:21) {
  errno: -3008,
  code: 'ENOTFOUND',
  syscall: 'getaddrinfo',
  hostname: 'raw.githubusercontent.com'
}


### Other Extensions

_No response_

### Additional context

This problem is caused by vscode-dts creates directly https request to `https://raw.githubusercontent.com` and doesn't use proxy setting in environment.

A pull request is already created to vscode-dts to solve this problem. Could some maintainer review this PR?
https://github.com/microsoft/vscode-dts/pull/14

_Originally posted by @Changqing-JING in https://github.com/microsoft/vscode-cpptools/issues/10631_

Support downloading "dev" for a certain release

I'd like to be able to say vscode-dts dev 1.36 to make sure I get a proposed .dts which is compatible with my vscode.d.ts. The one from master is not guaranteed to be compatible with the vscode.d.ts from a release. This is probably mainly just useful for people like me who are actually shipping an extension that uses proposed, not just using those APIs for development.

Add note about @types/vscode?

Should the readme include a note that @types/vscode now exists and is probably the preferred route if you do not need the insiders proposed .d.ts files?

Failed to get

vscode-dts dev

Downloading vscode.proposed.inlineCompletions.d.ts
To: C:\Users\alexa\Documents\projects\code-clippy-vscode\vscode.proposed.inlineCompletions.d.ts
From: https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.inlineCompletions.d.ts
Read more about proposed API at: https://code.visualstudio.com/api/advanced-topics/using-proposed-api
Failed to get https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.inlineCompletions.d.ts

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.