Tracking issue for JavaScript API
@losfair is already working on this.
Since Jul 24, 2022.
- Dominant language
- Rust
- Stars
- 1.9k
- Forks
- 56
- PR merge metrics
- No merged PRs in 30d
Description
The entire TypeScript API definition is published as the [blueboat-types](https://www.npmjs.com/package/blueboat-types) package. This issue tracks the API surface on a high level:
## Tier 1
Tier 1 APIs are stable interfaces exposed by Blueboat. Incompatible changes require a semver major.
- Standard JavaScript features supported by V8
- A subset of the Web platform API
- [x] `fetch()`, `Request` and `Response` objects
- [x] `TextEncoder`, `TextDecoder`
- [ ] Timers
- [x] `setTimeout`, `clearTimeout`
- [ ] `setInterval`, `clearInterval`
- [x] `URL`, `URLSearchParams`
- [x] `crypto.getRandomValues`
- [x] `crypto.randomUUID`
- [ ] `crypto.subtle` (`NativeCrypto` can be used instead)
- [ ] `console`
- [x] `console.log()`
- [x] `console.warn()`
- [x] `console.error()`
- Request router
- [x] The `Router` object
- Cryptography extensions
- [x] Ed25519 and X25519: `NativeCrypto.Ed25519`, `NativeCrypto.X25519`
- [x] JWT signing and verification: `NativeCrypto.JWT`
- [x] Hashing: `NativeCrypto.digest`
- [x] Constant time comparison: `NativeCrypto.constantTimeEq`
- [ ] AEAD: `NativeCrypto.AEAD`
- [x] AES128-GCM-SIV: `NativeCrypto.AEAD.{aes128GcmSivEncrypt,aes128GcmSivDecrypt}`
- [ ] HMAC: `NativeCrypto.HMAC`
- [x] HMAC-SHA256: `NativeCrypto.HMAC.hmacSha256`
- Template API
- [x] [Tera](https://github.com/Keats/tera) template rendering: `Template.render()`
- Encoding and decoding
- [x] `Codec.hexencode()`, `Codec.hexdecode()`
- [x] `Codec.b64encode()`, `Codec.b64decode()`
- Embedded datasets
- [x] MIME type guessing: `Dataset.Mime.guessByExt()`
- Text utilities
- [x] YAML serialization and deserialization: `TextUtil.Yaml.parse()`, `TextUtil.Yaml.stringify()`
- [x] Markdown rendering: `TextUtil.Markdown.renderToHtml()`
- Data compression
- [ ] Zstd
- [x] Block compression: `Compress.Zstd.blockCompress`
- [x] Block decompression: `Compress.Zstd.blockDecompress`
## Tier 2
Tier 2 APIs are experimental - incompatible changes can be made within a major version.
- Graphics API
- [x] Canvas (`Graphics.Canvas`)
- [x] Layout constraint solver based on Z3 (`Graphics.Layout`)
- Background tasks
- [x] `Background.atMostOnce()`
- [ ] `Background.atLeastOnce()`
- [ ] `Background.delayed()`
- Data validation
- [x] JSON Type Definition validation: `Validation.JTD`
- Native API to external services
- [x] MySQL client
- [x] Apple Push Notification Service (APNS) client
- [ ] AWS
- [x] v4 request signing: `ExternalService.AWS.sign`
- [x] Presigned URL: `ExternalService.AWS.getPresignedUrl`
- [ ] GitHub
- [x] [octokit.js](https://github.com/octokit/octokit.js) exported at `ExternalService.GitHub`
- DOM API
- [x] XML: `TextUtil.DOM.HTML`
- [x] HTML: `TextUtil.DOM.XML`
- Distributed system primitives
- Key-value store
- [x] KV.Namespace
- Message queue
- [x] `App.pubsub`
- [x] Client-side API: `/_blueboat/events`
- Encoding and decoding
- [x] `multipart/form-data` parser: `Codec.Multipart.decode`
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.