apaas-oapi-client 0.1.0 → 0.1.1

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.
@@ -0,0 +1,39 @@
1
+ name: Node.js CI & Publish
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+
7
+ jobs:
8
+ build-test-publish:
9
+ runs-on: ubuntu-latest
10
+
11
+ strategy:
12
+ matrix:
13
+ node-version: [22.x]
14
+
15
+ steps:
16
+ - uses: actions/checkout@v3
17
+
18
+ - name: Use Node.js ${{ matrix.node-version }}
19
+ uses: actions/setup-node@v3
20
+ with:
21
+ node-version: ${{ matrix.node-version }}
22
+ registry-url: 'https://registry.npmjs.org/'
23
+
24
+ - name: Install dependencies
25
+ run: npm install
26
+
27
+ - name: Build
28
+ run: npm run build
29
+
30
+ - name: Run Tests
31
+ run: npm test
32
+
33
+ - name: Debug npm token
34
+ run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc && cat ~/.npmrc
35
+
36
+ - name: Publish to npm
37
+ run: npm publish --access public
38
+ env:
39
+ NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
package/CHANGELOG.md ADDED
@@ -0,0 +1,19 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project will be documented in this file.
4
+
5
+ ## [0.1.0] - 2025-06-30
6
+ ### Added
7
+ - 🎉 初始化 aPaaS OpenAPI Node.js SDK
8
+ - ✅ 获取 accessToken
9
+ - ✅ records 查询(支持分页迭代)
10
+ - ✅ record 单条查询
11
+ - ✅ record 单条更新、批量更新
12
+ - ✅ record 单条删除、批量删除
13
+ - ✅ 内置 Bottleneck 限流器
14
+ - ✅ 自定义日志等级
15
+
16
+ ---
17
+
18
+ ## [Unreleased]
19
+ - ✨ 新功能开发中...
package/README.md CHANGED
@@ -0,0 +1,27 @@
1
+ # apaas-oapi-client
2
+
3
+ [![npm version](https://img.shields.io/npm/v/apaas-oapi-client.svg)](https://www.npmjs.com/package/apaas-oapi-client)
4
+ [![license](https://img.shields.io/npm/l/apaas-oapi-client.svg)](LICENSE)
5
+
6
+ 🚀 **aPaaS OpenAPI Node.js 客户端 SDK**
7
+
8
+ 封装 aPaaS 平台 RESTful API 的 Node.js SDK,简化接口调用,内置限流与 token 缓存功能。
9
+
10
+ ---
11
+
12
+ ## ✨ **功能特性**
13
+
14
+ - ✅ 获取 accessToken
15
+ - ✅ records 查询(支持分页迭代)
16
+ - ✅ record 单条查询
17
+ - ✅ record 单条更新、批量更新
18
+ - ✅ record 单条删除、批量删除
19
+ - ✅ 内置 Bottleneck 限流器
20
+ - ✅ 自定义日志等级
21
+
22
+ ---
23
+
24
+ ## 📦 **安装**
25
+
26
+ ```bash
27
+ npm install apaas-oapi-client
package/package.json CHANGED
@@ -1,8 +1,9 @@
1
1
  {
2
2
  "name": "apaas-oapi-client",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "exports": {
5
- "./node-sdk": "./dist/index.js"
5
+ "./node-sdk": "./dist/index.js",
6
+ ".": "./dist/index.js"
6
7
  },
7
8
  "main": "dist/index.js",
8
9
  "types": "dist/index.d.ts",