@sygna/bridge-util 2.0.2 → 2.0.4

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.
@@ -1,27 +1,35 @@
1
1
  name: Build and Deploy
2
+
2
3
  on:
3
4
  push:
4
5
  branches:
5
6
  - master
7
+ - feat/* # ← 加上你原本就有的 feat 分支
8
+
9
+ permissions:
10
+ id-token: write
11
+ contents: read
6
12
 
7
13
  jobs:
8
- install-and-test:
14
+ publish: # ← 改名更清楚(可選)
9
15
  runs-on: ubuntu-latest
10
16
  steps:
11
- - uses: actions/checkout@v2
12
- - name: Use Node.js
13
- uses: actions/setup-node@v1
17
+ - uses: actions/checkout@v4
18
+
19
+ - name: Setup Node.js
20
+ uses: actions/setup-node@v4
14
21
  with:
15
- node-version: '12.12.0'
16
- registry-url: https://registry.npmjs.org/
22
+ node-version: '22' # ← 升級到最新 LTS
23
+ registry-url: 'https://registry.npmjs.org/'
24
+
25
+ - name: Upgrade npm to latest (required for Trusted Publishing)
26
+ run: npm install -g npm@latest
27
+
17
28
  - name: Install dependencies
18
- run: |
19
- npm install
29
+ run: npm ci # ← 更乾淨
30
+
20
31
  - name: Test with jest
21
- run: |
22
- npm run test
32
+ run: npm test
33
+
23
34
  - name: Publish
24
- run: |
25
- npm publish
26
- env:
27
- NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
35
+ run: npm publish --access public --provenance # ← 加上 provenance
package/README.md CHANGED
@@ -18,7 +18,7 @@ During the communication of VASPs, there are some private information that must
18
18
 
19
19
  We're using [IVMS101 (interVASP Messaging Standard)](https://intervasp.org/) as our private information format.
20
20
 
21
- We also provide [IVMS101 Typescript Utility](https://github.com/CoolBitX-Technology/sygna-bridge-ivms-utils/tree/master/typescript) to construct data payload.
21
+ We also provide [IVMS101 Typescript Utility](https://github.com/sygnaio/sygna-bridge-ivms-utils/tree/master/typescript) to construct data payload.
22
22
 
23
23
  ```javascript
24
24
  const sensitive_data = {
package/package.json CHANGED
@@ -1,6 +1,9 @@
1
1
  {
2
2
  "name": "@sygna/bridge-util",
3
- "version": "2.0.2",
3
+ "version": "2.0.4",
4
+ "publishConfig": {
5
+ "access": "public"
6
+ },
4
7
  "description": "JavaScript library to interact with Sygna Bridge Server.",
5
8
  "main": "index.js",
6
9
  "scripts": {
@@ -8,9 +11,9 @@
8
11
  },
9
12
  "repository": {
10
13
  "type": "git",
11
- "url": "https://github.com/CoolBitX-Technology/sygna-bridge-util"
14
+ "url": "git+https://github.com/sygnaio/sygna-bridge-util.git"
12
15
  },
13
- "author": "kunming@coolbitx.com",
16
+ "author": "sygna.tech@coolbitx.com",
14
17
  "license": "MIT",
15
18
  "dependencies": {
16
19
  "ajv": "^6.12.0",