@genapi/pipeline 3.3.0 → 3.4.0
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.mjs +4 -2
- package/package.json +2 -2
package/dist/index.mjs
CHANGED
|
@@ -203,11 +203,13 @@ function formatTypescript(code) {
|
|
|
203
203
|
import got from "got";
|
|
204
204
|
async function original(configRead) {
|
|
205
205
|
if (configRead.inputs.uri)
|
|
206
|
-
configRead.source = await got
|
|
206
|
+
configRead.source = await got({ url: configRead.inputs.uri, responseType: "json" }).json();
|
|
207
|
+
if (configRead.inputs.http)
|
|
208
|
+
configRead.source = await got({ ...configRead.inputs.http, responseType: "json" }).json();
|
|
207
209
|
if (configRead.inputs.json)
|
|
208
210
|
configRead.source = await readJsonSource(configRead.inputs.json);
|
|
209
211
|
if (!configRead.source)
|
|
210
|
-
throw new Error("
|
|
212
|
+
throw new Error("No source found, please check your input config.");
|
|
211
213
|
if (!configRead.source.schemes?.length) {
|
|
212
214
|
const schemes = [];
|
|
213
215
|
if (configRead.inputs.uri?.startsWith("https://"))
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@genapi/pipeline",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "3.
|
|
4
|
+
"version": "3.4.0",
|
|
5
5
|
"author": "Hairyf <wwu710632@gmail.com>",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"homepage": "https://github.com/hairyf/genapi#readme",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"prettier": "^2.8.4",
|
|
27
27
|
"ts-factory-extra": "^0.0.5",
|
|
28
28
|
"typescript": "^5.0.0",
|
|
29
|
-
"@genapi/shared": "3.
|
|
29
|
+
"@genapi/shared": "3.4.0"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
32
|
"@types/fs-extra": "^11.0.1"
|