+
Skip to content
This repository was archived by the owner on Aug 31, 2023. It is now read-only.

feat(npm): hook *Conent APIs to WASM bindings #3097

Merged
merged 12 commits into from
Aug 24, 2022
Merged

Conversation

ematipico
Copy link
Contributor

Summary

Part of #3073

In this PR the Node.js API are hooked to the WASM bindings.

This PR only focuses on hooking the *Content APIs. The file system APIs are left out on purpose. For the being also custom configuration left out on purpose, and will be implemented as part of a different PR.

Things that are relevant for the review:

  • error handling is left out on purpose until I understand how to handle errors coming from the workspace;
  • this PR focuses only on the happy path
  • all methods of the Workspace of the WASM bindings are synchronous, but there were made asynchronous ( with await) because it would allow us to easily swap backend in the future without too many problems.
  • I changed the release target of @rometools/backend-jsonrpc to es2020 because we don't need to support old syntax. This has also the benefit that the emitted code is easier to debug
  • there's an issue with emitted types; for now I turned off the error with @ts-expect-error. Once fixed, we can remove the suppression

Test Plan

I updated the tests we had with real expected output

@ematipico ematipico requested a review from a team August 23, 2022 11:03
@ematipico ematipico added the A-Runtime Work around runtime label Aug 23, 2022
@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Aug 23, 2022

Deploying with  Cloudflare Pages  Cloudflare Pages

Latest commit: 9a7ec82
Status: ✅  Deploy successful!
Preview URL: https://4adc94da.tools-8rn.pages.dev
Branch Preview URL: https://feature-api-integration.tools-8rn.pages.dev

View logs

@ematipico ematipico requested a review from MichaReiser August 23, 2022 14:27
@ematipico ematipico requested a review from MichaReiser August 24, 2022 07:28
@ematipico ematipico force-pushed the feature/api-integration branch from 6b637bf to 9a7ec82 Compare August 24, 2022 13:10
@ematipico ematipico merged commit 74fea0a into main Aug 24, 2022
@ematipico ematipico deleted the feature/api-integration branch August 24, 2022 13:57
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A-Runtime Work around runtime
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载