fauxbase 0.5.8 → 0.5.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +3 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +3 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1590,10 +1590,12 @@ var HttpDriver = class {
|
|
|
1590
1590
|
const params = new URLSearchParams(options.query);
|
|
1591
1591
|
url += `?${params.toString()}`;
|
|
1592
1592
|
}
|
|
1593
|
-
|
|
1593
|
+
const raw = await this._fetch(url, {
|
|
1594
1594
|
method: options?.method ?? (options?.body !== void 0 ? "POST" : "GET"),
|
|
1595
1595
|
body: options?.body !== void 0 ? JSON.stringify(options.body) : void 0
|
|
1596
1596
|
});
|
|
1597
|
+
const parsed = this.preset.response.single(raw);
|
|
1598
|
+
return parsed.data ?? raw;
|
|
1597
1599
|
}
|
|
1598
1600
|
// Seed methods are no-ops for HTTP — backend owns data
|
|
1599
1601
|
seed() {
|