@ywfe/fe-tools 1.0.2-beta.7 → 1.0.2-beta.9

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 CHANGED
@@ -1,3 +1 @@
1
- export { default as userInputToJson } from './userInputToJson'
2
1
  export { default as request } from './request'
3
- export { default as JSON2String } from './JSON2String'
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "private": false,
3
3
  "name": "@ywfe/fe-tools",
4
- "version": "1.0.2-beta.7",
4
+ "version": "1.0.2-beta.9",
5
5
  "description": "工具函数库",
6
6
  "main": "lib/ywfe-tools.esm.js",
7
7
  "module": "lib/ywfe-tools.esm.js",
@@ -21,7 +21,6 @@
21
21
  },
22
22
  "license": "MIT",
23
23
  "dependencies": {
24
- "@ywfe/utils": "^0.10.74",
25
24
  "crypto-js": "^4.0.0",
26
25
  "ramda": "^0.27.1",
27
26
  "strtok3": "^6.3.0",
@@ -29,4 +28,4 @@
29
28
  "uuid": "^8.3.2"
30
29
  },
31
30
  "gitHead": "795058c747c80a3a69f6904dccffb53c42acfcc7"
32
- }
31
+ }
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:string)=> {
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/tsconfig.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "compilerOptions": {
3
- "rootDir": "./src",
3
+ "rootDir": "./",
4
4
  "outDir": "./lib",
5
5
  /* Basic Options */
6
6
  "target": "es2017",
package/JSON2String.ts DELETED
@@ -1,13 +0,0 @@
1
- interface userInput {
2
- data?: object;
3
- }
4
- function JSON2String({ input }) {
5
- const { data = {} } = input;
6
- try {
7
- return "```json" + JSON.stringify(data) + "json```";
8
- } catch (error) {
9
- return "```json" + JSON.stringify({}) + "json```";
10
- }
11
- }
12
-
13
- export default JSON2String
@@ -1,18 +0,0 @@
1
- // Ctrl-S保存代码 测试
2
- interface userInput {
3
- userInput?:string,
4
- rules?:string,
5
- }
6
- async function userInputToJson({input}:{input:userInput}){
7
- //const {userInput, rules} = input
8
- console.log('cesh',input)
9
- //@ts-ignore
10
- const res = await feTools.request({
11
- input:{
12
- url:"https://fc-typechat.ywwl.com/userInputToJson",
13
- method:"GET"
14
- }
15
- })
16
- return res
17
- }
18
- export default userInputToJson