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

Sign up to get free protection for your applications and to get access to all the features.
package/index.ts CHANGED
@@ -1,3 +1 @@
1
1
  export { default as request } from './request'
2
- export { default as userInputToJson } from './userInputToJson'
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.8",
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",
@@ -11,7 +11,6 @@
11
11
  "build": "NODE_ENV=production rollup -c",
12
12
  "build:type": "tsc -p ./tsconfig.type.json",
13
13
  "publish:npm": "npm publish --access public",
14
- "prepublish": "npm run build",
15
14
  "test": "jest --coverage"
16
15
  },
17
16
  "repository": "ywfe",
@@ -22,7 +21,6 @@
22
21
  },
23
22
  "license": "MIT",
24
23
  "dependencies": {
25
- "@ywfe/utils": "^0.10.74",
26
24
  "crypto-js": "^4.0.0",
27
25
  "ramda": "^0.27.1",
28
26
  "strtok3": "^6.3.0",
@@ -30,4 +28,4 @@
30
28
  "uuid": "^8.3.2"
31
29
  },
32
30
  "gitHead": "795058c747c80a3a69f6904dccffb53c42acfcc7"
33
- }
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