Skip to content

Commit b1e1d89

Browse files
committed
tips options demo
1 parent 9f88cba commit b1e1d89

File tree

8 files changed

+252
-47
lines changed

8 files changed

+252
-47
lines changed

.github/.DS_Store

8 KB
Binary file not shown.

.github/workflows/pr-check.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: pr-check
2+
on:
3+
pull_request:
4+
paths:
5+
- '**.yml'
6+
- 'src/**'
7+
- 'config/**'
8+
permissions: write-all
9+
10+
jobs:
11+
pr-check:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Checkout
15+
uses: actions/checkout@v3
16+
- run: echo "ok"
17+
- name: Install Node.js
18+
uses: actions/setup-node@v3
19+
with:
20+
node-version: 16.x
21+
- name: Install the vsce npm package
22+
run: |
23+
npm install
24+
npm install -g vsce
25+
- name: Run headless test
26+
uses: coactions/setup-xvfb@v1
27+
if: runner.os == 'Linux'
28+
with:
29+
run: xvfb-run -a npm test
30+
- name: Run test
31+
run: npm test
32+
if: runner.os != 'Linux'

.vscode/launch.json

Lines changed: 46 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -3,35 +3,51 @@
33
// Hover to view descriptions of existing attributes.
44
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
55
{
6-
"version": "0.2.0",
7-
"configurations": [
8-
{
9-
"name": "Run Extension",
10-
"type": "extensionHost",
11-
"request": "launch",
12-
"args": [
13-
"--extensionDevelopmentPath=${workspaceFolder}"
14-
],
15-
"outFiles": [
16-
"${workspaceFolder}/out/**/*.js"
17-
],
18-
"preLaunchTask": "${defaultBuildTask}",
19-
"env": {
6+
"version": "0.2.0",
7+
"configurations": [
8+
{
9+
"name": "Run Extension",
10+
"type": "extensionHost",
11+
"request": "launch",
12+
"args": [
13+
"--extensionDevelopmentPath=${workspaceFolder}"
14+
],
15+
"outFiles": [
16+
"${workspaceFolder}/out/**/*.js"
17+
],
18+
"preLaunchTask": "${defaultBuildTask}",
19+
"env": {
2020
"DEBUG": "true" // <---- EXAMPLE ENVIRONMENT VARIABLE
2121
}
22-
},
23-
{
24-
"name": "Extension Tests",
25-
"type": "extensionHost",
26-
"request": "launch",
27-
"args": [
28-
"--extensionDevelopmentPath=${workspaceFolder}",
29-
"--extensionTestsPath=${workspaceFolder}/out/test/suite/index"
30-
],
31-
"outFiles": [
32-
"${workspaceFolder}/out/test/**/*.js"
33-
],
34-
"preLaunchTask": "${defaultBuildTask}"
35-
}
36-
]
37-
}
22+
},
23+
{
24+
"name": "Debug Extension",
25+
"type": "extensionHost",
26+
"request": "launch",
27+
"args": [
28+
"--extensionDevelopmentPath=${workspaceFolder}"
29+
],
30+
"outFiles": [
31+
"${workspaceFolder}/out/**/*.js"
32+
],
33+
"preLaunchTask": "compile_build",
34+
"env": {
35+
"DEBUG": "true"
36+
},
37+
"sourceMaps": true
38+
},
39+
{
40+
"name": "Extension Tests",
41+
"type": "extensionHost",
42+
"request": "launch",
43+
"args": [
44+
"--extensionDevelopmentPath=${workspaceFolder}",
45+
"--extensionTestsPath=${workspaceFolder}/out/test/suite/index"
46+
],
47+
"outFiles": [
48+
"${workspaceFolder}/out/test/**/*.js"
49+
],
50+
"preLaunchTask": "${defaultBuildTask}"
51+
}
52+
]
53+
}

.vscode/tasks.json

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,20 @@
1515
"kind": "build",
1616
"isDefault": true
1717
}
18+
},
19+
{
20+
"label": "compile_build",
21+
"type": "npm",
22+
"script": "esbuild-watch",
23+
"problemMatcher": "$tsc-watch",
24+
"isBackground": true,
25+
"presentation": {
26+
"reveal": "never"
27+
},
28+
"group": {
29+
"kind": "build",
30+
"isDefault": true
31+
}
1832
}
1933
]
2034
}

config/tips/tiat-resources.json

Lines changed: 53 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14981,7 +14981,12 @@
1498114981
},
1498214982
{
1498314983
"name": "allocate_public_ip",
14984-
"description": "- (Optional, Bool, ForceNew) Associate a public IP address with an instance in a VPC or Classic. Boolean value, Default is false."
14984+
"description": "- (Optional, Bool, ForceNew) Associate a public IP address with an instance in a VPC or Classic. Boolean value, Default is false.",
14985+
"default": false,
14986+
"options": [
14987+
true,
14988+
false
14989+
]
1498514990
},
1498614991
{
1498714992
"name": "bandwidth_package_id",
@@ -15005,7 +15010,12 @@
1500515010
},
1500615011
{
1500715012
"name": "disable_api_termination",
15008-
"description": "- (Optional, Bool) Whether the termination protection is enabled. Default is false. If set true, which means that this instance can not be deleted by an API action."
15013+
"description": "- (Optional, Bool) Whether the termination protection is enabled. Default is false. If set true, which means that this instance can not be deleted by an API action.",
15014+
"default": false,
15015+
"options": [
15016+
true,
15017+
false
15018+
]
1500915019
},
1501015020
{
1501115021
"name": "disable_monitor_service",
@@ -15029,11 +15039,24 @@
1502915039
},
1503015040
{
1503115041
"name": "instance_charge_type_prepaid_renew_flag",
15032-
"description": "- (Optional, String) Auto renewal flag. Valid values: NOTIFY_AND_AUTO_RENEW: notify upon expiration and renew automatically, NOTIFY_AND_MANUAL_RENEW: notify upon expiration but do not renew automatically, DISABLE_NOTIFY_AND_MANUAL_RENEW: neither notify upon expiration nor renew automatically. Default value: NOTIFY_AND_MANUAL_RENEW. If this parameter is specified as NOTIFY_AND_AUTO_RENEW, the instance will be automatically renewed on a monthly basis if the account balance is sufficient. NOTE: it only works when instance_charge_type is set to PREPAID."
15042+
"description": "- (Optional, String) Auto renewal flag. Valid values: NOTIFY_AND_AUTO_RENEW: notify upon expiration and renew automatically, NOTIFY_AND_MANUAL_RENEW: notify upon expiration but do not renew automatically, DISABLE_NOTIFY_AND_MANUAL_RENEW: neither notify upon expiration nor renew automatically. Default value: NOTIFY_AND_MANUAL_RENEW. If this parameter is specified as NOTIFY_AND_AUTO_RENEW, the instance will be automatically renewed on a monthly basis if the account balance is sufficient. NOTE: it only works when instance_charge_type is set to PREPAID.",
15043+
"default": "NOTIFY_AND_MANUAL_RENEW",
15044+
"options": [
15045+
"NOTIFY_AND_AUTO_RENEW",
15046+
"NOTIFY_AND_MANUAL_RENEW",
15047+
"DISABLE_NOTIFY_AND_MANUAL_RENEW"
15048+
]
1503315049
},
1503415050
{
1503515051
"name": "instance_charge_type",
15036-
"description": "- (Optional, String) The charge type of instance. Valid values are PREPAID, POSTPAID_BY_HOUR, SPOTPAID and CDHPAID. The default is POSTPAID_BY_HOUR. Note: TencentCloud International only supports POSTPAID_BY_HOUR and CDHPAID. PREPAID instance may not allow to delete before expired. SPOTPAID instance must set spot_instance_type and spot_max_price at the same time. CDHPAID instance must set cdh_instance_type and cdh_host_id."
15052+
"description": "- (Optional, String) The charge type of instance. Valid values are PREPAID, POSTPAID_BY_HOUR, SPOTPAID and CDHPAID. The default is POSTPAID_BY_HOUR. Note: TencentCloud International only supports POSTPAID_BY_HOUR and CDHPAID. PREPAID instance may not allow to delete before expired. SPOTPAID instance must set spot_instance_type and spot_max_price at the same time. CDHPAID instance must set cdh_instance_type and cdh_host_id.",
15053+
"default": "POSTPAID_BY_HOUR",
15054+
"options": [
15055+
"PREPAID",
15056+
"POSTPAID_BY_HOUR",
15057+
"SPOTPAID",
15058+
"CDHPAID"
15059+
]
1503715060
},
1503815061
{
1503915062
"name": "instance_count",
@@ -15049,7 +15072,14 @@
1504915072
},
1505015073
{
1505115074
"name": "internet_charge_type",
15052-
"description": "- (Optional, String) Internet charge type of the instance, Valid values are BANDWIDTH_PREPAID, TRAFFIC_POSTPAID_BY_HOUR, BANDWIDTH_POSTPAID_BY_HOUR and BANDWIDTH_PACKAGE. If not set, internet charge type are consistent with the cvm charge type by default. This value takes NO Effect when changing and does not need to be set when allocate_public_ip is false."
15075+
"description": "- (Optional, String) Internet charge type of the instance, Valid values are BANDWIDTH_PREPAID, TRAFFIC_POSTPAID_BY_HOUR, BANDWIDTH_POSTPAID_BY_HOUR and BANDWIDTH_PACKAGE. If not set, internet charge type are consistent with the cvm charge type by default. This value takes NO Effect when changing and does not need to be set when allocate_public_ip is false.",
15076+
"default": "",
15077+
"options": [
15078+
"BANDWIDTH_PREPAID",
15079+
"TRAFFIC_POSTPAID_BY_HOUR",
15080+
"BANDWIDTH_POSTPAID_BY_HOUR",
15081+
"BANDWIDTH_PACKAGE"
15082+
]
1505315083
},
1505415084
{
1505515085
"name": "internet_max_bandwidth_out",
@@ -15105,7 +15135,12 @@
1510515135
},
1510615136
{
1510715137
"name": "stopped_mode",
15108-
"description": "- (Optional, String) Billing method of a pay-as-you-go instance after shutdown. Available values: KEEP_CHARGING,STOP_CHARGING. Default KEEP_CHARGING."
15138+
"description": "- (Optional, String) Billing method of a pay-as-you-go instance after shutdown. Available values: KEEP_CHARGING,STOP_CHARGING. Default KEEP_CHARGING.",
15139+
"default": "KEEP_CHARGING",
15140+
"options": [
15141+
"KEEP_CHARGING",
15142+
"STOP_CHARGING"
15143+
]
1510915144
},
1511015145
{
1511115146
"name": "subnet_id",
@@ -15121,7 +15156,18 @@
1512115156
},
1512215157
{
1512315158
"name": "system_disk_type",
15124-
"description": "- (Optional, String) System disk type. For more information on limits of system disk types, see Storage Overview. Valid values: LOCAL_BASIC: local disk, LOCAL_SSD: local SSD disk, CLOUD_BASIC: cloud disk, CLOUD_SSD: cloud SSD disk, CLOUD_PREMIUM: Premium Cloud Storage, CLOUD_BSSD: Basic SSD, CLOUD_HSSD: Enhanced SSD, CLOUD_TSSD: Tremendous SSD. NOTE: If modified, the instance may force stop."
15159+
"description": "- (Optional, String) System disk type. For more information on limits of system disk types, see Storage Overview. Valid values: LOCAL_BASIC: local disk, LOCAL_SSD: local SSD disk, CLOUD_BASIC: cloud disk, CLOUD_SSD: cloud SSD disk, CLOUD_PREMIUM: Premium Cloud Storage, CLOUD_BSSD: Basic SSD, CLOUD_HSSD: Enhanced SSD, CLOUD_TSSD: Tremendous SSD. NOTE: If modified, the instance may force stop.",
15160+
"default": "",
15161+
"options": [
15162+
"LOCAL_BASIC",
15163+
"LOCAL_SSD",
15164+
"CLOUD_BASIC",
15165+
"CLOUD_SSD",
15166+
"CLOUD_PREMIUM",
15167+
"CLOUD_BSSD",
15168+
"CLOUD_HSSD",
15169+
"CLOUD_TSSD"
15170+
]
1512515171
},
1512615172
{
1512715173
"name": "tags",

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@
240240
"pretest": "npm run compile && npm run lint",
241241
"lint": "eslint src --ext ts",
242242
"test": "npm run compile",
243-
"vscode:prepublish": "npm run esbuild-base -- --minify",
243+
"vscode:prepublish": "npm run esbuild-base -- --sourcemap",
244244
"esbuild-base": "esbuild ./src/extension.ts --bundle --outfile=out/main.js --external:vscode --format=cjs --platform=node",
245245
"esbuild": "npm run esbuild-base -- --sourcemap",
246246
"esbuild-watch": "npm run esbuild-base -- --sourcemap --watch",

0 commit comments

Comments
 (0)