forked from webrpc/webrpc
-
Notifications
You must be signed in to change notification settings - Fork 1
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
webrpc update from head #11
Open
kipply
wants to merge
188
commits into
cohere-ai:master
Choose a base branch
from
webrpc:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
TSLint has been the recommended linter in the past but now TSLint is deprecated and ESLint is taking over its duties. from https://code.visualstudio.com/api/advanced-topics/tslint-eslint-migration
|
Remove binary file from the source code
* Exploring Templates functions API * Implement "dict", "set" and "get" dictionary funcs for templates This will help us define type mapping in templates * Re-add some v0.6.0 functions for now * Refactor dict function, so we can pass it down to sub-templates * Add type helper funcmaps * Implement isBaseType function * Bring back some obsolete functions to keep generators v0.6.0 working * make diff * Fix the tests for now * Fix go.mod after git cherry-pick * Pass variables to templates via CLI -Flags, add error/fatal funcmaps * Remove gofmt/goimports for now * Implement printfStderr and exit funcs * Move VERSION to gen/ package, expose it as {{.WebrpcGenVersion}} * Expose {{.WebrpcTarget}} and {{.WebrpcGenCLI}} * Remove generator specific tests Each generator repo should be testing the schema/output on its own * Improve and document the template variables * Support old -client, -server and -pkg flags * Remove bunch of golang-specific funcmaps * Fix tests * Remove go-specific funcmaps for method inputs/outputs/arguments * Resolve rebase * Print "custom" target in case of local dir * Remove more go-specific funcmaps; rename "first" to "coalesce" * Gen: Remove all Go-spefific funcmaps/code * Remove last go-specific funcmaps * README: Table of generators * Remove "indent" and rename "stderrPrintf" * webrpc-gen: Return early when writing to stdout * webrpc-gen: Print fatal errors to stderr Otherwise the errors potentially ended up in the generated output file. * Execute "main" template as the required generator entrypoint * Add documentation about generator templates * Generator docs: Document schema object and add TOC * Document template functions * Implement minVersion function * Markdown: Escape column character in a table row * Document requiring webrpc-gen version from templates * Improve error message by naming the template after its target * Collect flags in its own function * Implement "default" function * Add "in" function, remove "str" function and gofmt * Implement ternary, split, first, last functions * Remove JavaScript-specific template functions * Finalize template functions for webrpc schema types * Remove last generic or TS-specific template functions * Update template functions docs * Update README & examples with new webrpc-gen targets * Bring back goimport/gofmt for golang targets * PR feedback: Use Go 1.16+ * webrpc-gen CLI: Use v0.7.0 as an example target * Use os.WriteFile() instead of ioutil.WriteFile() * Improve isGolangTarget() so it works with local templates too * webrpc-gen -fmt=false: disable automatic code formatting * Lowercase all template option CLI flags, print target -help * Lowercase all generator options, update docs * Regenerate examples: Apply new DO NOT EDIT comment
This allows external tools like https://github.com/golang-cz/go2webrpc to build full webrpc schema.
* Upgrade golang-basics example to chi v4 * Create Go module for golang-basic example
This proves #74 is not caused by TypeScript generator
The latest github.com/webrpc/[email protected] now fixes #74, #104 and #105. See https://github.com/webrpc/gen-golang/releases/tag/v0.7.4 webrpc/gen-golang@7e1449e
…le) (#285) * Update to [email protected] * Update dependencies (compatible with Go 1.19) go get -u [email protected] ./... * Regenerate examples * make dep-upgrade-all: Require Go 1.19 for now * Update to [email protected]
* Update to [email protected] * Regenerate tests/examples
update gitfs dependencies using fork
* don't convert type to string * enum type * Support enum in map * update tests * move enum to another struct, add example
add tests for new enum methods
Bumps [ws](https://github.com/websockets/ws) from 5.2.2 to 5.2.4. - [Release notes](https://github.com/websockets/ws/releases) - [Commits](websockets/ws@5.2.2...5.2.4) --- updated-dependencies: - dependency-name: ws dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
https://goreleaser.com/deprecations/#-rm-dist ``` --rm-dist has been deprecated in favor of --clean. ``` This will fix the GoReleaser pipeline in master.
* Update to [email protected] go get github.com/webrpc/[email protected] * Fix hello-webrpc example
* parse annotations for service methods * add annotations to schema * on deprecate hook when some of the endpoints been deprecated * regenerate examples * use request in deprecate hook * finish annotation parsing * report deprecated endpoint onRequest * handle same annotation types separated by comma * return error OnRequest * renerate with latest gen-golang tmpl * sort imports * regenerate examples * remove unused annotations from test case * regenerate examples with latest gen-golang * use latest gen-golang * regenerate using latest gen-golang * add test for deprecated user endpoint * add onError hook to tests * enable parsing annotation with multiple values * regenerate using latest gen-golang
This reverts commit 6e8be5b.
* implement service filtering and apply in golang-basics example * filter out methods with specific annotation * transform services to map internally * match annotation key and value or just annotation type * remove redundant whitespace trimming
improve annotation parser
* add template version and template target to template vars * regenerate tests * add code gen header to schema * rename fields on schema tmpl
* render schema hash if schema version in ridl is empty * version format - go dependency like
* update gen-golang to v0.16.0 * update gen-typescript to v0.15.0 * regenerate all examples using latest tmpl versions
* Update examples - add Webrpc header to CORS * Expose Webrpc header to CORS clients
* gen-golang v0.16.0 -> v0.16.1 * examples * tests
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.