-
Notifications
You must be signed in to change notification settings - Fork 0
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
Download binaries #4
base: master
Are you sure you want to change the base?
Conversation
2.0.0 released! I'm updating the binaries once again! |
I also removed the arch folders from the binaries, because 2.0.0 has support for both x64 and x86. |
The plugin will now download the latest binary on installation, but a release tag can also be specified to install another version. Documentation is not implemented for version handling. |
TypeScript documentation implemented. (TSDoc) |
|
Ready 2b merged! |
Even more ready to be merged! |
Installing a release of the openapi generatorSettings version of grpc-gateway/protoc-gen-openapi to # PowerShell
$env:RELEASETAG="v1.15.0"
npm install -D @accility/protoc-tools
# CMD
set RELEASETAG="v1.15.0"
npm install -D @accility/protoc-tools
# Unix
RELEASETAG="v1.15.0" npm install -D @accility/protoc-tools |
No support for |
The description of this GitHub repository should be changed from "Convert .proto files to OpenAPI v2 (swagger) files" to "Convert .proto files to OpenAPI v2 and v3 (swagger) files". '.proto' could also be changed to 'protocol buffers' |
|
||
if (!latest) | ||
throw new Error('Latest binary was not found. Install the latest binary or specify a custom binary path.') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What if I provide the binPath then?
|
||
if (exists) | ||
return binpath | ||
else { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unnecessary 'else'
* | ||
* @param tag Optional release tag. E.g. `v1.15.0` | ||
*/ | ||
export async function downloadAsync(tag?: string) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Declare return type.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
export async function downloadAsync(tag?: string) { | |
export async function downloadAsync(tag?: string): Promise<{ bin: Buffer, tag: string, exe: boolean }> { |
*/ | ||
export function installAsync(bin: Buffer, tag: string, exe: string): Promise<string> | ||
export function installAsync(bin: { bin: Buffer, tag: string, exe: boolean }): Promise<string> | ||
export function installAsync(...args: any[]) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why don't we just provide one install method (the async version preferably)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For synchronous function. Often used by CLI's.
|
||
return new Promise<string>((resolve, reject) => { | ||
|
||
fs.access(path.join(__dirname, '../../bin'), (err) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can't we use utils.promisify
on the fs-methods instead?
Co-authored-by: Martin Skogevall <martin.skogevall@accility.se>
Co-authored-by: Martin Skogevall <martin.skogevall@accility.se>
Co-authored-by: Martin Skogevall <martin.skogevall@accility.se>
Co-authored-by: Martin Skogevall <martin.skogevall@accility.se>
Update all binaries to v2.0.0-beta.5.