wgt-node-utils 0.0.26 → 0.0.28

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.
@@ -1 +1,15 @@
1
+ /*!
2
+ * mime-db
3
+ * Copyright(c) 2014 Jonathan Ong
4
+ * Copyright(c) 2015-2022 Douglas Christopher Wilson
5
+ * MIT Licensed
6
+ */
7
+
8
+ /*!
9
+ * mime-types
10
+ * Copyright(c) 2014 Jonathan Ong
11
+ * Copyright(c) 2015 Douglas Christopher Wilson
12
+ * MIT Licensed
13
+ */
14
+
1
15
  /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wgt-node-utils",
3
- "version": "0.0.26",
3
+ "version": "0.0.28",
4
4
  "description": "WGT工具类包",
5
5
  "main": "dist/bundle.js",
6
6
  "scripts": {
package/src/index.js CHANGED
@@ -21,6 +21,7 @@ class wgtNodeUtils {
21
21
  } else {
22
22
  console.error('Lark客户端初始化失败:未提供appId或appSecret');
23
23
  }
24
+ this.testAxios()
24
25
  }
25
26
 
26
27
  // 获取系统信息
@@ -44,6 +45,16 @@ class wgtNodeUtils {
44
45
  };
45
46
  }
46
47
 
48
+ testAxios = () => {
49
+ axios.get('https://jsonplaceholder.typicode.com/posts')
50
+ .then(response => {
51
+ console.log('Node.js response:', response.data);
52
+ })
53
+ .catch(error => {
54
+ console.error('Node.js error:', error);
55
+ });
56
+ }
57
+
47
58
  /***
48
59
  * @headers 设备header 信息
49
60
  *
package/webpack.config.js CHANGED
@@ -9,6 +9,7 @@ module.exports = {
9
9
  // 根据运行环境设置全局对象,确保 Node.js 使用 global,浏览器使用 self 或 window
10
10
  globalObject: 'typeof self !== "undefined" ? self : global',
11
11
  },
12
+ target: 'node',
12
13
  module: {
13
14
  rules: [
14
15
  {