New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/issue 214 add show command #215

Merged
merged 13 commits into from Nov 20, 2017

Conversation

Projects
None yet
3 participants
@raix
Contributor

raix commented Nov 16, 2017

This pr. contains the initial proposal for a “show” extension metadata command

Usage:

$ vsce show <extensionId>

# or as json

$ vsce show <extensionId> --json

image
image

raix added some commits Nov 16, 2017

Add "getExtension" to store
It will grab an available `pat` and query extensio gallary (ro)
Add show command
Initial version of show command

Usage:
```bash
$ vsce show gitlens.eamodio

# or as json

$ vsce show gitlens.eamodio --json
```
@msftclas

This comment has been minimized.

Show comment
Hide comment
@msftclas

msftclas Nov 16, 2017

CLA assistant check
All CLA requirements met.

msftclas commented Nov 16, 2017

CLA assistant check
All CLA requirements met.

@joaomoreno joaomoreno added this to the Backlog milestone Nov 17, 2017

@joaomoreno joaomoreno self-requested a review Nov 17, 2017

@joaomoreno joaomoreno self-assigned this Nov 17, 2017

@joaomoreno

Overall looks good.

Though it doesn't work for me:

image

Show outdated Hide outdated src/main.ts
Show outdated Hide outdated src/show.ts
Show outdated Hide outdated src/show.ts

raix added some commits Nov 17, 2017

rename to "extensionid"
* naming consistency "extensionUniqIdentifier" -> "extensionid"
* Make extensionid parser more readable
Handle "Invalid Resource" error
This can happen if access token is invalid/has expired.

The solution added in this commit:
* Try each available token until success or all failed.

Not ideal but we require a PAT since we access `_apis/gallery` and not `_apis/public/gallery/extensionquery`
@joaomoreno

This comment has been minimized.

Show comment
Hide comment
@joaomoreno

joaomoreno Nov 17, 2017

Member

@raix Got the same vso-node-api@6.1.2-preview dependency. Hmmm.

Member

joaomoreno commented Nov 17, 2017

@raix Got the same vso-node-api@6.1.2-preview dependency. Hmmm.

@raix

This comment has been minimized.

Show comment
Hide comment
@raix

raix Nov 17, 2017

Contributor

@joaomoreno I've added error handler for the "Invalid Resource" error with the current constraints, would be nice if the public api was available in vso-node-api.

Contributor

raix commented Nov 17, 2017

@joaomoreno I've added error handler for the "Invalid Resource" error with the current constraints, would be nice if the public api was available in vso-node-api.

@joaomoreno

This comment has been minimized.

Show comment
Hide comment
@joaomoreno

joaomoreno Nov 17, 2017

Member

Yup, that was it! I had an old access token. Interesting, I wonder if we can get this to work without depending on login.

Love those unicode stars! ★ ★ ★ ★ ★

Member

joaomoreno commented Nov 17, 2017

Yup, that was it! I had an old access token. Interesting, I wonder if we can get this to work without depending on login.

Love those unicode stars! ★ ★ ★ ★ ★

@raix

This comment has been minimized.

Show comment
Hide comment
@raix

raix Nov 17, 2017

Contributor

We could just make a post call directly to the public api v3.preview

Contributor

raix commented Nov 17, 2017

We could just make a post call directly to the public api v3.preview

raix added some commits Nov 17, 2017

Use public gallery api
* add minimal `PublicGalleryAPI`
* no PAT requirements
Remove extension ID from details
It will deprecate in the future + not that useful
@raix

This comment has been minimized.

Show comment
Hide comment
@raix

raix Nov 17, 2017

Contributor

@joaomoreno I've added PublicGalleryAPI this doesn't require a pat, let me know what you think

(one could ague that it belongs in vso-node-api)

Contributor

raix commented Nov 17, 2017

@joaomoreno I've added PublicGalleryAPI this doesn't require a pat, let me know what you think

(one could ague that it belongs in vso-node-api)

@raix raix changed the title from WIP: Feature/issue 214 add show command to Feature/issue 214 add show command Nov 18, 2017

@joaomoreno joaomoreno merged commit bf162ac into Microsoft:master Nov 20, 2017

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
@joaomoreno

This comment has been minimized.

Show comment
Hide comment
@joaomoreno

joaomoreno Nov 20, 2017

Member

Great stuff. Thanks! 🍻

Member

joaomoreno commented Nov 20, 2017

Great stuff. Thanks! 🍻

@joaomoreno

This comment has been minimized.

Show comment
Hide comment
@joaomoreno

joaomoreno Nov 20, 2017

Member

@modigrv Is there any way we can use the vso-node-api in an unauthenticated way? I've tried passing a no-op AuthHandler to the WebApi but the extension query request eventually fails while getting versioning data.

Member

joaomoreno commented Nov 20, 2017

@modigrv Is there any way we can use the vso-node-api in an unauthenticated way? I've tried passing a no-op AuthHandler to the WebApi but the extension query request eventually fails while getting versioning data.

@raix

This comment has been minimized.

Show comment
Hide comment
@raix

raix Nov 20, 2017

Contributor

( Currently using the public /_apis/public the /gallery/extensionquery - similar to whats done in vs code)

Contributor

raix commented Nov 20, 2017

( Currently using the public /_apis/public the /gallery/extensionquery - similar to whats done in vs code)

@joaomoreno joaomoreno referenced this pull request Dec 4, 2017

Closed

Test: VSCE show command #39586

3 of 3 tasks complete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment