Skip to content

refactor(wasm): use internal/api instead of local DTOs - #546

Merged
zeroshade merged 2 commits into
refactor/internal-apifrom
refactor/wasm-internal-api
Nov 4, 2026
Merged

zeroshade merged 2 commits into
refactor/internal-apifrom
refactor/wasm-internal-api

Conversation

@zeroshade

Copy link
Copy Markdown
Member

The WASM bindings drop their local DTOs and call internal/api, so they share one implementation with the C API. npm install(name, location, { allowUnsigned }) exposes the signature opt-out.

Stacked on #545.

@zeroshade
zeroshade added this pull request to stack #550 October 28, 2026 22:46
@zeroshade
zeroshade force-pushed the refactor/wasm-internal-api branch from 88cba98 to 2c80d9d Compare October 28, 2026 22:51
@zeroshade
zeroshade force-pushed the refactor/wasm-internal-api branch from 2c80d9d to 4174c86 Compare October 28, 2026 23:29
@zeroshade
zeroshade force-pushed the refactor/wasm-internal-api branch from 4174c86 to fa62564 Compare October 29, 2026 17:07
@zeroshade
zeroshade force-pushed the refactor/wasm-internal-api branch from fa62564 to 580ca34 Compare November 3, 2026 18:21
@zeroshade
zeroshade marked this pull request as ready for review November 3, 2026 19:27
Comment thread wasm/api_js.go Resolved
@zeroshade
zeroshade force-pushed the refactor/wasm-internal-api branch from 25e9b23 to 81c60fd Compare November 4, 2026 15:23
zeroshade added a commit that referenced this pull request Nov 4, 2026
Every dbc.Client in the wasm build gets its own fetch-backed http.Client
from newFetchClient, and nothing on that path reads the deprecated
dbc.DefaultClient. Keep the http.DefaultClient override: the auth package
calls it directly for token refresh and license fetch, and Go's own
network is disabled under Node js/wasm. Per review on #546.
@zeroshade
zeroshade force-pushed the refactor/wasm-internal-api branch from c56b725 to cf825f0 Compare November 4, 2026 17:22
@amoeba

amoeba commented Nov 4, 2026

Copy link
Copy Markdown
Member

I had Opus 5.5 do a review across my manual reviews and it caught that there's no test for disabling signature verification here. Can we check?

Every dbc.Client in the wasm build gets its own fetch-backed http.Client
from newFetchClient, and nothing on that path reads the deprecated
dbc.DefaultClient. Keep the http.DefaultClient override: the auth package
calls it directly for token refresh and license fetch, and Go's own
network is disabled under Node js/wasm. Per review on #546.
@zeroshade

Copy link
Copy Markdown
Member Author

Same gap as on 545, answered in #545 (comment): TestInstallAllowUnsigned (8ce0374) checks that the zero InstallOptions refuses an unsigned driver and AllowUnsigned: true installs it. 546 inherits it through the restack, and the wasm allowUnsigned option goes through the same api.Install.

@zeroshade
zeroshade merged commit cc6085e into main Nov 4, 2026
20 of 30 checks passed
@zeroshade
zeroshade deleted the refactor/wasm-internal-api branch November 4, 2026 20:11
zeroshade added a commit that referenced this pull request Nov 4, 2026
`capi/` builds as a Go `c-archive` exposing 13 functions: an opaque
`dbc_client` configured with ADBC-style key/value options, and a single
`dbc_list` result type read with `dbc_list_get`/`dbc_list_info`
(`DBC_FIELD_*` ids). `libdbc.h` is generated by cgo from
`capi/exports.go`; there is no hand-written header.

Stacked on #546.

This branch was previously deployed

1 inactive deployment
snapshot — afd2dab2 Deployed Nov 4, 2026 by zeroshade via snapshot #1198
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants