node-cnb 1.2.8 → 1.2.9

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/CHANGELOG.md CHANGED
@@ -2,6 +2,8 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
4
 
5
+ ### [1.2.9](https://cnb.cool/cnb/sdk/node-cnb/compare/v1.2.8...v1.2.9) (2025-02-12)
6
+
5
7
  ### [1.2.8](https://cnb.cool/cnb/sdk/node-cnb/compare/v1.2.7...v1.2.8) (2025-02-12)
6
8
 
7
9
 
@@ -0,0 +1,23 @@
1
+ # 原理
2
+
3
+ cnb 会编译出 open api 的 [swagger json](https://api.cnb.cool/swagger.json),并生成 api 页面。
4
+
5
+ 本仓库依据 swagger json 编译生成对应的 typescript 代码。
6
+
7
+ # 命令
8
+
9
+ ```shell
10
+ # 依据 swagger json 生成 types.d.ts 和 client.d.ts 并编译 ts 到 dist 目录
11
+ npm run build
12
+
13
+ # 更新 package.json 的 version,打 tag 并 push 到仓库
14
+ npm run release
15
+ ```
16
+
17
+ # 开发
18
+
19
+ 1. 更新 swagger json
20
+ 1. 修改 build.js
21
+ 1. 修改 src/index.ts
22
+
23
+ 改完后调试需手动执行下 `npm run build`
package/LICENSE ADDED
@@ -0,0 +1,20 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2024-present, cnb.cool
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining
6
+ a copy of this software and associated documentation files (the “Software”),
7
+ to deal in the Software without restriction, including without limitation
8
+ the rights to use, copy, modify, merge, publish, distribute, sublicense,
9
+ and/or sell copies of the Software, and to permit persons to whom
10
+ the Software is furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be
13
+ included in all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS
16
+ OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
18
+ THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
19
+ WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,8 @@
1
+ # 介绍
2
+
3
+ ![badge](https://cnb.cool/cnb/sdk/node-cnb/-/badge/git/1876ef5f/ci/pipeline-as-code)
4
+ ![badge](https://cnb.cool/cnb/sdk/node-cnb/-/badge/git/1876ef5f/ci/status/tag_push)
5
+
1
6
  node-cnb 是一个用于访问 [CNB API](https://api.cnb.cool/) 的 node 编写的 SDK。
2
7
 
3
8
  # 安装
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "node-cnb",
3
- "version": "1.2.8",
3
+ "version": "1.2.9",
4
4
  "description": "node sdk for cnb open api",
5
5
  "main": "dist/index.js",
6
6
  "typings": "./src/index.d.ts",
package/.cnb.yml DELETED
@@ -1,31 +0,0 @@
1
- .install: &install
2
- - name: build cache image
3
- type: docker:cache
4
- options:
5
- dockerfile: cache.dockerfile
6
- by:
7
- - package.json
8
- - package-lock.json
9
- exports:
10
- name: DOCKER_CACHE_IMAGE_NAME
11
- - name: copy node_modules
12
- image: $DOCKER_CACHE_IMAGE_NAME
13
- commands:
14
- - cp -r "$NODE_PATH" ./node_modules
15
- - name: build
16
- image: $DOCKER_CACHE_IMAGE_NAME
17
- script: npm run build
18
- $:
19
- tag_push:
20
- - stages:
21
- - *install
22
- - name: npm publish
23
- image: tencentcom/npm
24
- imports: https://cnb.cool/folger/folger-secret/-/blob/main/npm_secret.yml
25
- settings:
26
- username: $NPM_USER
27
- token: $NPM_TOKEN
28
- email: $NPM_EMAIL
29
- folder: ./
30
- fail_on_version_conflict: true
31
-