@ywfe/fe-tools 1.2.1-beta.0 → 1.2.1-beta.1
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/lib/userInputToJson.d.ts +1 -1
- package/lib/ywfe-tools.cjs +14 -8
- package/lib/ywfe-tools.cjs.map +1 -1
- package/lib/ywfe-tools.esm.js +14 -8
- package/lib/ywfe-tools.esm.js.map +1 -1
- package/package.json +1 -1
- package/request.ts +1 -1
- package/userInputToJson.ts +8 -7
package/package.json
CHANGED
package/request.ts
CHANGED
@@ -17,7 +17,7 @@ async function request({input}:{input:RequestOptions}){
|
|
17
17
|
const env = '{{env}}';
|
18
18
|
return basePathMap.get(env);
|
19
19
|
};
|
20
|
-
const isValidURL = (url
|
20
|
+
const isValidURL = (url)=> {
|
21
21
|
var pattern = new RegExp(
|
22
22
|
'^(https?:\\/\\/)?' + // protocol
|
23
23
|
'((([a-z\\d]([a-z\\d-]*[a-z\\d])*)\\.)+[a-z]{2,}|' + // domain name
|
package/userInputToJson.ts
CHANGED
@@ -5,12 +5,13 @@ interface userInput {
|
|
5
5
|
}
|
6
6
|
async function userInputToJson({input}:{input:userInput}){
|
7
7
|
const {userInput, rules} = input
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
8
|
+
//@ts-ignore
|
9
|
+
const res = await feTools.request({
|
10
|
+
input:{
|
11
|
+
url:"https://fc-typechat.ywwl.com/userInputToJson",
|
12
|
+
method:"GET"
|
13
|
+
}
|
14
|
+
})
|
15
|
+
return res;
|
15
16
|
}
|
16
17
|
export default userInputToJson
|