Conversation
Pulled the socket API event types and some class organization
concepts from the `typescript` branch.
Added auto-generated API documentation and a CI workflow to
deploy it to Github Pages. Also wrote several guides.
Breaking Changes:
* Flattened the endpoint method structure on `ScreepsAPI`
* Almost every endpoint method has been renamed
* Changed type of `ScreepsAPI.rateLimits` to `RateLimitTracker`
* Renamed `ScreepsAPI` to `ScreepsHttpClient`
Features:
* Exported `ScreepsSocketClient` (formerly `Socket`) and many other
types
* `ConfigManager` is now exported as `ScreepsConfigManager`
* `ScreepsConfigManager` now checks for config files in the default
value of `$XDG_CONFIG_HOME` if it is not defined (Linux/*BSD only)
* `ScreepsConfigManager` now checks `$HOME/Library/Application Support`
for config files on macOS.
* Added `screepsapi:config` debug namespace for `ScreepsConfigManager`
Docs:
* Added `typedoc` dev dependency to generate documentation from
docblocks
* Added more docblocks
* Moved guides from `docs/` to `guides/`
* Wrote several new guides
* Migrated code from README and examples/ to v2
* TypeScript example scripts can still be run from the command line:
```sh
yarn exec tsx examples/file-name.ts
```
Chores:
* Added a Github Actions workflow to generate and deploy docs to Github
Pages
* Fixed error in `handleMessage()` when rawData is a `Buffer`
This allows consumers to use them as values as well as types.
Contributor
Author
|
I've created a test PR on my fork to allow for a preview of the generated API docs (and to test the doc generation/deployment CI workflow). |
Contributor
Author
|
TODO:
|
Open
This file contains hidden or 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
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.
Pulled the socket API event types and some class organization concepts from the
typescriptbranch.Added auto-generated API documentation and a CI workflow to deploy it to Github Pages. Also wrote several guides.
Breaking Changes:
ScreepsAPIScreepsAPItoScreepsHttpClientFeatures:
ConfigManageris now exported asScreepsConfigManagerSocketis now exported asScreepsSocketClientScreepsConfigManagernow checks for config files in the default value of$XDG_CONFIG_HOMEif it is not defined (Linux/*BSD only)ScreepsConfigManagernow checks$HOME/Library/Application Supportfor config files on macOS.screepsapi:configdebug namespace forScreepsConfigManagerScreepsHttpClient.setServer()(which was removed in the initial TypeScript migration)Docs:
typedocdev dependency to generate documentation from docblocksdocs/toguides/docs/is now the output directory for Typedoc and has been added to.gitignoreexamples/terminal-client.tsscriptyarn exec tsx examples/file-name.tsChores:
Apinamespace:src/common/src/http