@autometa/http 1.4.13 → 1.4.15
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/.turbo/turbo-lint$colon$fix.log +4 -0
- package/.turbo/turbo-prettify.log +5 -0
- package/.turbo/turbo-test.log +137 -0
- package/CHANGELOG.md +12 -0
- package/README.md +1 -1
- package/dist/esm/index.js +2 -2
- package/dist/esm/index.js.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/package.json +13 -13
- package/src/axios-client.ts +2 -2
- package/src/default-schema.spec.ts +1 -1
- package/src/default-schema.ts +2 -3
- package/src/http-client.ts +3 -3
- package/src/http-request.spec.ts +18 -18
- package/src/http.spec.ts +4 -4
- package/src/http.ts +2 -3
- package/src/index.ts +5 -5
- package/src/node_modules/.vitest/deps/_metadata.json +8 -0
- package/src/node_modules/.vitest/deps/package.json +3 -0
- package/src/node_modules/.vitest/results.json +1 -0
- package/src/request-meta.config.spec.ts +1 -1
- package/src/request-meta.config.ts +1 -1
- package/src/schema.map.ts +1 -1
- package/src/transform-response.ts +3 -3
- package/tsup.config.ts +1 -1
package/src/schema.map.ts
CHANGED
|
@@ -31,13 +31,13 @@ export function transformResponse(
|
|
|
31
31
|
if (allowPlainText) {
|
|
32
32
|
return data;
|
|
33
33
|
}
|
|
34
|
-
|
|
35
|
-
const response = highlight(
|
|
34
|
+
const dataStr = typeof data === "string" ? data : JSON.stringify(data);
|
|
35
|
+
const response = highlight(dataStr, { language: "html" });
|
|
36
36
|
const message = [
|
|
37
37
|
`Could not parse a response as json, and this request was not configured to allow plain text responses.`,
|
|
38
38
|
`To allow plain text responses, use the 'allowPlainText' method on the HTTP client.`,
|
|
39
39
|
"",
|
|
40
|
-
response
|
|
40
|
+
response,
|
|
41
41
|
];
|
|
42
42
|
throw new AutomationError(message.join("\n"));
|
|
43
43
|
}
|
package/tsup.config.ts
CHANGED
|
@@ -4,7 +4,7 @@ export default defineConfig({
|
|
|
4
4
|
clean: true, // clean up the dist folder
|
|
5
5
|
format: ["cjs", "esm"], // generate cjs and esm files
|
|
6
6
|
dts: true,
|
|
7
|
-
sourcemap:true, // generate sourcemaps
|
|
7
|
+
sourcemap: true, // generate sourcemaps
|
|
8
8
|
skipNodeModulesBundle: true,
|
|
9
9
|
entryPoints: ["src/index.ts"],
|
|
10
10
|
target: "es2020",
|