@ywfe/fe-tools 1.2.1-beta.7 → 1.2.1-beta.8
Sign up to get free protection for your applications and to get access to all the features.
- package/index.ts +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/ywfe-tools.cjs +29 -22
- package/lib/ywfe-tools.cjs.map +1 -1
- package/lib/ywfe-tools.esm.js +29 -22
- package/lib/ywfe-tools.esm.js.map +1 -1
- package/package.json +1 -1
- package/userInputToJson.ts +18 -11
package/index.ts
CHANGED
package/lib/index.d.ts
CHANGED
package/lib/ywfe-tools.cjs
CHANGED
@@ -60,6 +60,35 @@ typeof SuppressedError === "function" ? SuppressedError : function (error, suppr
|
|
60
60
|
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
61
61
|
};
|
62
62
|
|
63
|
+
function userInputToJson(_a) {
|
64
|
+
return __awaiter(this, arguments, void 0, function (_b) {
|
65
|
+
var res, result;
|
66
|
+
var input = _b.input;
|
67
|
+
return __generator(this, function (_c) {
|
68
|
+
switch (_c.label) {
|
69
|
+
case 0:
|
70
|
+
console.log("input", input);
|
71
|
+
return [4 /*yield*/, request({
|
72
|
+
input: {
|
73
|
+
url: "https://fc-typechat.ywwl.com/userInputToJson",
|
74
|
+
method: "GET",
|
75
|
+
params: input,
|
76
|
+
},
|
77
|
+
})];
|
78
|
+
case 1:
|
79
|
+
res = _c.sent();
|
80
|
+
if (res.success) {
|
81
|
+
result = res.data;
|
82
|
+
return [2 /*return*/, result.success ? result.data : result];
|
83
|
+
}
|
84
|
+
else {
|
85
|
+
return [2 /*return*/, res.success ? res.data : res];
|
86
|
+
}
|
87
|
+
}
|
88
|
+
});
|
89
|
+
});
|
90
|
+
}
|
91
|
+
|
63
92
|
function getAugmentedNamespace(n) {
|
64
93
|
if (n.__esModule) return n;
|
65
94
|
var f = n.default;
|
@@ -8755,28 +8784,6 @@ function request(_a) {
|
|
8755
8784
|
});
|
8756
8785
|
}
|
8757
8786
|
|
8758
|
-
function userInputToJson(_a) {
|
8759
|
-
return __awaiter(this, arguments, void 0, function (_b) {
|
8760
|
-
var res;
|
8761
|
-
var input = _b.input;
|
8762
|
-
return __generator(this, function (_c) {
|
8763
|
-
switch (_c.label) {
|
8764
|
-
case 0:
|
8765
|
-
input.userInput, input.rules;
|
8766
|
-
return [4 /*yield*/, request({
|
8767
|
-
input: {
|
8768
|
-
url: "https://fc-typechat.ywwl.com/userInputToJson",
|
8769
|
-
method: "GET"
|
8770
|
-
}
|
8771
|
-
})];
|
8772
|
-
case 1:
|
8773
|
-
res = _c.sent();
|
8774
|
-
return [2 /*return*/, res];
|
8775
|
-
}
|
8776
|
-
});
|
8777
|
-
});
|
8778
|
-
}
|
8779
|
-
|
8780
8787
|
exports.request = request;
|
8781
8788
|
exports.userInputToJson = userInputToJson;
|
8782
8789
|
//# sourceMappingURL=ywfe-tools.cjs.map
|