@ywfe/fe-tools 1.2.1-beta.7 → 1.2.1-beta.8
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/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/lib/ywfe-tools.esm.js
CHANGED
|
@@ -58,6 +58,35 @@ typeof SuppressedError === "function" ? SuppressedError : function (error, suppr
|
|
|
58
58
|
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
59
59
|
};
|
|
60
60
|
|
|
61
|
+
function userInputToJson(_a) {
|
|
62
|
+
return __awaiter(this, arguments, void 0, function (_b) {
|
|
63
|
+
var res, result;
|
|
64
|
+
var input = _b.input;
|
|
65
|
+
return __generator(this, function (_c) {
|
|
66
|
+
switch (_c.label) {
|
|
67
|
+
case 0:
|
|
68
|
+
console.log("input", input);
|
|
69
|
+
return [4 /*yield*/, request({
|
|
70
|
+
input: {
|
|
71
|
+
url: "https://fc-typechat.ywwl.com/userInputToJson",
|
|
72
|
+
method: "GET",
|
|
73
|
+
params: input,
|
|
74
|
+
},
|
|
75
|
+
})];
|
|
76
|
+
case 1:
|
|
77
|
+
res = _c.sent();
|
|
78
|
+
if (res.success) {
|
|
79
|
+
result = res.data;
|
|
80
|
+
return [2 /*return*/, result.success ? result.data : result];
|
|
81
|
+
}
|
|
82
|
+
else {
|
|
83
|
+
return [2 /*return*/, res.success ? res.data : res];
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
});
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
|
|
61
90
|
function getAugmentedNamespace(n) {
|
|
62
91
|
if (n.__esModule) return n;
|
|
63
92
|
var f = n.default;
|
|
@@ -8753,27 +8782,5 @@ function request(_a) {
|
|
|
8753
8782
|
});
|
|
8754
8783
|
}
|
|
8755
8784
|
|
|
8756
|
-
function userInputToJson(_a) {
|
|
8757
|
-
return __awaiter(this, arguments, void 0, function (_b) {
|
|
8758
|
-
var res;
|
|
8759
|
-
var input = _b.input;
|
|
8760
|
-
return __generator(this, function (_c) {
|
|
8761
|
-
switch (_c.label) {
|
|
8762
|
-
case 0:
|
|
8763
|
-
input.userInput, input.rules;
|
|
8764
|
-
return [4 /*yield*/, request({
|
|
8765
|
-
input: {
|
|
8766
|
-
url: "https://fc-typechat.ywwl.com/userInputToJson",
|
|
8767
|
-
method: "GET"
|
|
8768
|
-
}
|
|
8769
|
-
})];
|
|
8770
|
-
case 1:
|
|
8771
|
-
res = _c.sent();
|
|
8772
|
-
return [2 /*return*/, res];
|
|
8773
|
-
}
|
|
8774
|
-
});
|
|
8775
|
-
});
|
|
8776
|
-
}
|
|
8777
|
-
|
|
8778
8785
|
export { request, userInputToJson };
|
|
8779
8786
|
//# sourceMappingURL=ywfe-tools.esm.js.map
|