@opentapd/tplugin-cli 0.21.0-beta.5 → 0.32.0

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/Readme.ex.md ADDED
@@ -0,0 +1,13 @@
1
+ # TAPD 托管命令行
2
+
3
+
4
+ ```bash
5
+ tplugin-cli logout
6
+
7
+ tplugin-cli login
8
+
9
+ ```
10
+
11
+ [快速入门](https://o.tapd.tencent.com/document/plugin-doc/introduction/getting-started.html)
12
+
13
+ ### 欢迎反馈
package/Readme.oa.md ADDED
@@ -0,0 +1,23 @@
1
+ # TAPD 托管命令行
2
+
3
+
4
+ ## IDC 网络的使用
5
+
6
+ ### 怎看自己是不是IDC网络
7
+
8
+ 查看这个[链接](https://iwiki.woa.com/tencent/static/iwiki-editor-pro/dist/preview.html?space=&page=1227785302&id=131410&name=6997554869969258912(1).MP4&size=1160018&language=zh)
9
+
10
+ ### 如果是 IDC 网路怎么办
11
+
12
+ ```bash
13
+ export TPLUGIN_ENV='idc'
14
+
15
+ tplugin-cli logout
16
+
17
+ tplugin-cli login
18
+
19
+ ```
20
+
21
+ [快速入门](https://o.tapd.woa.com/document/plugin-doc/introduction/getting-started.html)
22
+
23
+ ### 欢迎反馈
package/config.js ADDED
@@ -0,0 +1,93 @@
1
+ const env = process.env.TPLUGIN_ENV ? process.env.TPLUGIN_ENV : 'oa';
2
+
3
+ const proApiHostConfigMap = {
4
+ test: 'http://wolf.woa.com/tapdapi',
5
+ extest: 'http://apiv2.wolfex.woa.com',
6
+ cloudtest: 'http://apiv2.wolfcloud.woa.com',
7
+ ex: 'https://apiv2.tapd.tencent.com',
8
+ oa: 'http://apiv2.tapd.woa.com',
9
+ idc: 'http://oss.apiv2.tapd.woa.com',
10
+ cloud: 'https://api.tapd.cn',
11
+ };
12
+ const websocketHostConfigMap = {
13
+ test: 'ws://proxifer.wolf.woa.com/proxy',
14
+ extest: 'ws://proxifer.wolf.woa.com/proxy',
15
+ cloudtest: 'ws://proxifer.wolfcloud.woa.com/proxy',
16
+ ex: 'wss://proxifer.tapd.tencent.com/proxy',
17
+ oa: 'ws://proxifer.tapd.woa.com/proxy',
18
+ idc: 'ws://proxifer.tapd.woa.com/proxy',
19
+ cloud: 'wss://proxifer.tapd.cn/proxy',
20
+ };
21
+ const tapdHostConfigMap = {
22
+ test: 'https://wolf.woa.com',
23
+ extest: 'https://wolfex.woa.com',
24
+ cloudtest: 'https://wolfcloud.woa.com',
25
+ ex: 'https://tapd.tencent.com',
26
+ oa: 'https://tapd.woa.com',
27
+ idc: 'https://tapd.woa.com',
28
+ cloud: 'https://www.tapd.cn',
29
+ };
30
+ const openHostConfigMap = {
31
+ test: 'http://o.wolf.woa.com',
32
+ extest: 'http://o.wolf.woa.com',
33
+ cloudtest: 'http://o.wolfcloud.woa.com',
34
+ ex: 'https://o.tapd.tencent.com',
35
+ oa: 'https://o.tapd.woa.com',
36
+ idc: 'https://o.tapd.woa.com',
37
+ cloud: 'https://open.tapd.cn',
38
+ };
39
+ const upgradeWebsocketHostConfigMap = {
40
+ test: 'ws://upgrader.devops.tiger.oa.com',
41
+ extest: 'ws://upgrader.devops.tiger.oa.com',
42
+ cloudtest: 'ws://upgrader.wolfcloud.woa.com',
43
+ ex: 'wss://upgrader.tapd.tencent.com',
44
+ oa: 'wss://upgrader.tapd.woa.com',
45
+ idc: 'wss://upgrader.tapd.woa.com',
46
+ cloud: 'wss://upgrader.tapd.cn',
47
+ };
48
+ const pluginEnvConfigMap = {
49
+ test: 'oa',
50
+ extest: 'ex',
51
+ ex: 'ex',
52
+ cloudtest: 'cloud',
53
+ cloud: 'cloud',
54
+ oa: 'oa',
55
+ idc: 'oa',
56
+ };
57
+
58
+ const npmRegistry = {
59
+ test: 'https://mirrors.tencent.com/npm/',
60
+ oa: 'https://mirrors.tencent.com/npm/',
61
+ idc: 'https://mirrors.tencent.com/npm/',
62
+ };
63
+
64
+ const pipBaseURL = {
65
+ test: 'https://mirrors.tencent.com/repository/pypi/tencent_pypi/simple',
66
+ oa: 'https://mirrors.tencent.com/repository/pypi/tencent_pypi/simple',
67
+ idc: 'https://mirrors.tencent.com/repository/pypi/tencent_pypi/simple',
68
+ };
69
+
70
+ const pipExtraURL = {
71
+ test: 'https://mirrors.tencent.com/pypi/simple/',
72
+ oa: 'https://mirrors.tencent.com/pypi/simple/',
73
+ idc: 'https://mirrors.tencent.com/pypi/simple/',
74
+ };
75
+
76
+ // 地址配置
77
+ module.exports = {
78
+ tapd: {
79
+ openHost: openHostConfigMap[env], // 开放平台地址
80
+ tapdHost: tapdHostConfigMap[env], // TAPD平台地址
81
+ websocketHost: websocketHostConfigMap[env], // Socket地址
82
+ apiHost: proApiHostConfigMap[env], // API地址
83
+ upgradeWebsocketHost: upgradeWebsocketHostConfigMap[env], // 热更新代理地址
84
+ pluginEnv: pluginEnvConfigMap[env], // 插件环境
85
+ },
86
+ npm: {
87
+ registry: npmRegistry[env],
88
+ },
89
+ pip: {
90
+ baseURL: pipBaseURL[env],
91
+ extralURL: pipExtraURL[env],
92
+ },
93
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opentapd/tplugin-cli",
3
- "version": "0.21.0-beta.5",
3
+ "version": "0.32.0",
4
4
  "description": "tplugin-cli",
5
5
  "bin": {
6
6
  "tplugin-cli": "index.js"
@@ -8,11 +8,15 @@
8
8
  "scripts": {
9
9
  "test": "jest",
10
10
  "lint": "eslint --fix --ext .js ./lib ./util",
11
- "prepare": "husky install",
11
+ "build": "node scripts/generate.publish.config.js",
12
12
  "run-ex-test": "TPLUGIN_ENV=extest node index.js",
13
13
  "run-ex": "TPLUGIN_ENV=ex node index.js",
14
14
  "run-oa": "node index.js",
15
- "run-idc": "TPLUGIN_ENV=idc node index.js"
15
+ "run-idc": "TPLUGIN_ENV=idc node index.js",
16
+ "ex_replace_package_name": "node ../../scripts/replace-package-name/main.js @tapd",
17
+ "replace_package_name": "node ../../scripts/replace-package-name/main.js @opentapd",
18
+ "ex_replace_package_json": "node ../../scripts/replace-tencent-in-package-json/main.js @tapd",
19
+ "replace_package_json": "node ../../scripts/replace-tencent-in-package-json/main.js @opentapd"
16
20
  },
17
21
  "lint-staged": {
18
22
  "**/*.(js)": [
@@ -22,7 +26,7 @@
22
26
  "author": "",
23
27
  "license": "ISC",
24
28
  "dependencies": {
25
- "@tencent/tplugin-core": "npm:@opentapd/tplugin-core@^1.3.0",
29
+ "@opentapd/tplugin-core": "^1.20.0",
26
30
  "address": "^1.2.2",
27
31
  "archiver": "^5.3.1",
28
32
  "axios": "^0.21.1",
@@ -56,6 +60,7 @@
56
60
  "devDependencies": {
57
61
  "@babel/core": "^7.15.0",
58
62
  "eslint": "^7.32.0",
63
+ "eslint-config-tencent": "^1.0.4",
59
64
  "husky": "^7.0.2",
60
65
  "jest": "^29.5.0",
61
66
  "lint-staged": "^11.1.2",
@@ -73,7 +78,6 @@
73
78
  "engines": {
74
79
  "node": ">=14.13.0"
75
80
  },
76
- "npm": {
77
- "alias": "@tencent/tplugin-cli"
78
- }
79
- }
81
+ "main": "index.js",
82
+ "gitHead": "ab5e24afa610b939faaa98595a9fd282175ee1b9"
83
+ }
package/util/tapd.js CHANGED
@@ -5,7 +5,7 @@
5
5
  * tapd sdk import
6
6
  */
7
7
 
8
- const Sdk = require('@tencent/tapd-node-sdk');
8
+ const Sdk = require('@opentapd/tapd-node-sdk');
9
9
  const Session = require('./session');
10
10
  const session = new Session();
11
11
  const accessToken = session.token();
File without changes