@guojinpeng/dsh-cost-meter 0.1.3 → 0.1.5
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.md +15 -21
- package/README.zh-CN.md +14 -21
- package/dist/client.js +748 -722
- package/dist/index.js +130 -112
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -21,16 +21,8 @@ dsh plugin --profile web add -w @guojinpeng/dsh-cost-meter
|
|
|
21
21
|
Replace `web` with your profile name.
|
|
22
22
|
If you used the old unscoped package, disable it before you install this package.
|
|
23
23
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
Run this command in the download directory:
|
|
27
|
-
|
|
28
|
-
```powershell
|
|
29
|
-
dsh plugin --profile web add -w ./guojinpeng-dsh-cost-meter.tgz
|
|
30
|
-
```
|
|
31
|
-
|
|
32
|
-
Restart DSH.
|
|
33
|
-
Keep the downloaded file at the installation path.
|
|
24
|
+
Install published versions from npm. npm provides the built package.
|
|
25
|
+
GitHub contains the source code and release notes.
|
|
34
26
|
|
|
35
27
|
## Features
|
|
36
28
|
|
|
@@ -84,15 +76,16 @@ npm pack
|
|
|
84
76
|
```
|
|
85
77
|
|
|
86
78
|
`npm pack` also runs the build. It creates `guojinpeng-dsh-cost-meter-<version>.tgz`.
|
|
87
|
-
Install the generated file in your DSH profile. For version 0.1.
|
|
79
|
+
Install the generated file in your DSH profile. For version 0.1.5:
|
|
88
80
|
|
|
89
81
|
```powershell
|
|
90
|
-
dsh plugin --profile web add -w ./guojinpeng-dsh-cost-meter-0.1.
|
|
82
|
+
dsh plugin --profile web add -w ./guojinpeng-dsh-cost-meter-0.1.5.tgz
|
|
91
83
|
```
|
|
92
84
|
|
|
93
85
|
Restart DSH and check the plugin. Repeat the build, package and install steps after changes.
|
|
94
86
|
Tests use the global DSH installation. Set `DSH_RUNTIME_ROOT` to the DSH package directory if its location is different.
|
|
95
87
|
Commit source files and `pnpm-lock.yaml`. Do not commit generated files or local configuration.
|
|
88
|
+
See [the module guide](docs/architecture.md) for source boundaries and verification commands.
|
|
96
89
|
|
|
97
90
|
## Publish To npm
|
|
98
91
|
|
|
@@ -116,12 +109,12 @@ npm test
|
|
|
116
109
|
npm run pack:release
|
|
117
110
|
```
|
|
118
111
|
|
|
119
|
-
Check the package file list. `pack:release` creates the versioned
|
|
120
|
-
|
|
121
|
-
|
|
112
|
+
Check the package file list. `pack:release` runs `npm pack` and creates the versioned
|
|
113
|
+
npm tarball. Commit and push the version change. Then publish that tarball.
|
|
114
|
+
For example, replace `<version>` with the new version number:
|
|
122
115
|
|
|
123
116
|
```powershell
|
|
124
|
-
npm publish ./guojinpeng-dsh-cost-meter
|
|
117
|
+
npm publish ./guojinpeng-dsh-cost-meter-<version>.tgz --access public --registry=https://registry.npmjs.org/
|
|
125
118
|
npm view @guojinpeng/dsh-cost-meter version --registry=https://registry.npmjs.org/
|
|
126
119
|
```
|
|
127
120
|
|
|
@@ -130,13 +123,14 @@ Each package version can be published only once.
|
|
|
130
123
|
After npm publication succeeds, create the matching Git tag and GitHub Release:
|
|
131
124
|
|
|
132
125
|
```powershell
|
|
133
|
-
git tag
|
|
134
|
-
git push origin
|
|
135
|
-
gh release create
|
|
126
|
+
git tag v<version>
|
|
127
|
+
git push origin v<version>
|
|
128
|
+
gh release create v<version> --verify-tag --title "<version>" --generate-notes --latest
|
|
136
129
|
```
|
|
137
130
|
|
|
138
|
-
|
|
139
|
-
|
|
131
|
+
Replace `<version>` before you run these commands. GitHub Releases contain release
|
|
132
|
+
notes; uploading a tarball is optional. npm hosts the installation package.
|
|
133
|
+
The plugin catalog links the npm package through its `repository` field.
|
|
140
134
|
|
|
141
135
|
Users can then install the package:
|
|
142
136
|
|
package/README.zh-CN.md
CHANGED
|
@@ -21,16 +21,8 @@ dsh plugin --profile web add -w @guojinpeng/dsh-cost-meter
|
|
|
21
21
|
将 `web` 替换为你使用的 profile 名称。
|
|
22
22
|
如果已安装旧版无 scope 的插件,请先禁用旧版,再安装此插件。
|
|
23
23
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
下载 scoped 安装包。在下载目录执行:
|
|
27
|
-
|
|
28
|
-
```powershell
|
|
29
|
-
dsh plugin --profile web add -w ./guojinpeng-dsh-cost-meter.tgz
|
|
30
|
-
```
|
|
31
|
-
|
|
32
|
-
安装后重启 DSH。
|
|
33
|
-
请保留下载的安装包,不要改变其安装路径。
|
|
24
|
+
通过 npm 安装已发布版本,npm 提供构建后的安装包。
|
|
25
|
+
GitHub 用于保存源码和发布说明。
|
|
34
26
|
|
|
35
27
|
## 功能
|
|
36
28
|
|
|
@@ -84,15 +76,16 @@ npm pack
|
|
|
84
76
|
```
|
|
85
77
|
|
|
86
78
|
`npm pack` 也会执行构建,生成 `guojinpeng-dsh-cost-meter-<版本号>.tgz`。
|
|
87
|
-
将生成的文件安装到你的 DSH profile。以 0.1.
|
|
79
|
+
将生成的文件安装到你的 DSH profile。以 0.1.5 为例:
|
|
88
80
|
|
|
89
81
|
```powershell
|
|
90
|
-
dsh plugin --profile web add -w ./guojinpeng-dsh-cost-meter-0.1.
|
|
82
|
+
dsh plugin --profile web add -w ./guojinpeng-dsh-cost-meter-0.1.5.tgz
|
|
91
83
|
```
|
|
92
84
|
|
|
93
85
|
重启 DSH,检查插件。每次修改后,重新构建、打包并安装。
|
|
94
86
|
测试使用全局安装的 DSH。如果安装位置不同,将 `DSH_RUNTIME_ROOT` 设置为 DSH 包目录。
|
|
95
87
|
提交源码和 `pnpm-lock.yaml`。不要提交生成文件或本地配置。
|
|
88
|
+
模块职责、依赖边界和验证命令见[模块维护说明](docs/architecture.md)。
|
|
96
89
|
|
|
97
90
|
## 发布到 npm
|
|
98
91
|
|
|
@@ -116,12 +109,12 @@ npm test
|
|
|
116
109
|
npm run pack:release
|
|
117
110
|
```
|
|
118
111
|
|
|
119
|
-
检查安装包的文件列表。`pack:release`
|
|
120
|
-
|
|
121
|
-
|
|
112
|
+
检查安装包的文件列表。`pack:release` 执行 `npm pack`,生成带版本号的 npm 安装包。
|
|
113
|
+
提交并推送版本变更,然后发布该安装包。
|
|
114
|
+
执行前,将 `<version>` 替换为本次的新版本号:
|
|
122
115
|
|
|
123
116
|
```powershell
|
|
124
|
-
npm publish ./guojinpeng-dsh-cost-meter
|
|
117
|
+
npm publish ./guojinpeng-dsh-cost-meter-<version>.tgz --access public --registry=https://registry.npmjs.org/
|
|
125
118
|
npm view @guojinpeng/dsh-cost-meter version --registry=https://registry.npmjs.org/
|
|
126
119
|
```
|
|
127
120
|
|
|
@@ -130,13 +123,13 @@ npm view @guojinpeng/dsh-cost-meter version --registry=https://registry.npmjs.or
|
|
|
130
123
|
npm 发布成功后,创建对应的 Git 标签和 GitHub Release:
|
|
131
124
|
|
|
132
125
|
```powershell
|
|
133
|
-
git tag
|
|
134
|
-
git push origin
|
|
135
|
-
gh release create
|
|
126
|
+
git tag v<version>
|
|
127
|
+
git push origin v<version>
|
|
128
|
+
gh release create v<version> --verify-tag --title "<version>" --generate-notes --latest
|
|
136
129
|
```
|
|
137
130
|
|
|
138
|
-
|
|
139
|
-
|
|
131
|
+
执行前替换 `<version>`。GitHub Release 用于发布说明,无需上传安装包。
|
|
132
|
+
npm 托管安装包,插件市场通过 npm 包的 `repository` 字段关联仓库。
|
|
140
133
|
|
|
141
134
|
发布后,用户可执行以下命令安装:
|
|
142
135
|
|