@ywfe/fe-tools 1.2.1-beta.0 → 1.2.1-beta.10
Sign up to get free protection for your applications and to get access to all the features.
- package/lib/userInputToJson.d.ts +1 -1
- package/lib/ywfe-tools.cjs +21 -8
- package/lib/ywfe-tools.cjs.map +1 -1
- package/lib/ywfe-tools.esm.js +21 -8
- package/lib/ywfe-tools.esm.js.map +1 -1
- package/package.json +1 -2
- package/rollup.config.js +1 -4
- package/userInputToJson.ts +19 -11
package/lib/ywfe-tools.esm.js
CHANGED
@@ -8755,16 +8755,29 @@ function request(_a) {
|
|
8755
8755
|
|
8756
8756
|
function userInputToJson(_a) {
|
8757
8757
|
return __awaiter(this, arguments, void 0, function (_b) {
|
8758
|
+
var res, result;
|
8758
8759
|
var input = _b.input;
|
8759
8760
|
return __generator(this, function (_c) {
|
8760
|
-
|
8761
|
-
|
8762
|
-
|
8763
|
-
|
8764
|
-
|
8765
|
-
|
8766
|
-
|
8767
|
-
|
8761
|
+
switch (_c.label) {
|
8762
|
+
case 0:
|
8763
|
+
console.log("input", input);
|
8764
|
+
return [4 /*yield*/, request({
|
8765
|
+
input: {
|
8766
|
+
url: "https://fc-typechat.ywwl.com/userInputToJson",
|
8767
|
+
method: "GET",
|
8768
|
+
params: input,
|
8769
|
+
},
|
8770
|
+
})];
|
8771
|
+
case 1:
|
8772
|
+
res = _c.sent();
|
8773
|
+
if (res.success) {
|
8774
|
+
result = res.data;
|
8775
|
+
return [2 /*return*/, result.success ? result.data : result];
|
8776
|
+
}
|
8777
|
+
else {
|
8778
|
+
return [2 /*return*/, res.success ? res.data : res];
|
8779
|
+
}
|
8780
|
+
}
|
8768
8781
|
});
|
8769
8782
|
});
|
8770
8783
|
}
|