fix(compiler): route the generated api object through the real buildApiRequest
Root-cause fix for the fix-round-1 review: the inlined query/body assembly in __wrnexusCallApi was a third, unguarded copy of buildApiRequest's rules. Restore the import of buildApiRequest from @wrnexus/core in the generated module and delete the inline copy. The four api-block-ssr.test.ts tests (and three in compiler.test.ts) that dynamically import a generated module from an OS tmpdir were failing against a stale globally-installed @wrnexus/core (v0.8.8, predates buildApiRequest) because that tmpdir has no node_modules of its own and bare-specifier resolution walked out of the workspace. Fixed at the source: symlink the workspace @wrnexus/core into each tmpdir root before the dynamic import, the same way every in-repo package already resolves it.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
// WRN editor extension source hash: ae7dab4aff1ce30f0d01fa0b9172651e526408916351862e2644a85c25df03ac
|
||||
// WRN editor extension source hash: 52dfa294ba556cb26807ce112cc6826a690aa4a80721520d0c39bd7cfd8aa33e
|
||||
// WRN editor extension generator hash: 456d1d614e44e5fb1f19b784176c09cf2ade9b64ef73a17934c2698150b62728
|
||||
"use strict";
|
||||
var __commonJS = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
|
||||
|
||||
Reference in New Issue
Block a user