asterisk-voice-sdk 0.0.1 → 0.0.2

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.
Files changed (2) hide show
  1. package/README.md +5 -45
  2. package/package.json +9 -7
package/README.md CHANGED
@@ -5,18 +5,19 @@ SDK SIP cấp cao cho Asterisk/FreePBX trên React Native (wrapper `react-native
5
5
  ## Cài đặt
6
6
 
7
7
  ```bash
8
- npm i asterisk-voice-sdk
8
+ npm i asterisk-voice-sdk react-native-pjsip
9
9
  ```
10
10
 
11
11
  ## Peer dependencies
12
12
 
13
13
  - `react` (>= 18)
14
14
  - `react-native` (>= 0.73)
15
-
16
- ## Dependencies (tự được cài kèm)
17
-
18
15
  - `react-native-pjsip` (>= 2.7.0)
19
16
 
17
+ ### Lưu ý Windows
18
+
19
+ `react-native-pjsip` có thể chạy script `bash` khi cài. Trên Windows bạn nên cài bằng **Git Bash** hoặc đảm bảo máy có `bash` trong PATH (Git for Windows/WSL).
20
+
20
21
  ## Ví dụ sử dụng
21
22
 
22
23
  ```ts
@@ -39,44 +40,3 @@ await client.register({
39
40
 
40
41
  const callId = await client.startCall('1001');
41
42
  // await client.hangup(callId);
42
- ```
43
-
44
- ## Build SDK & publish lên npm
45
-
46
- ### Build (ra `dist/`)
47
-
48
- ```bash
49
- cd "E:\VTS VOICE\packages\asterisk-voice-sdk"
50
- npm run build
51
- ```
52
-
53
- ### Kiểm tra gói trước khi publish (khuyến nghị)
54
-
55
- ```bash
56
- cd "E:\VTS VOICE\packages\asterisk-voice-sdk"
57
- npm pack --dry-run
58
- ```
59
-
60
- ### Tăng version
61
-
62
- ```bash
63
- cd "E:\VTS VOICE\packages\asterisk-voice-sdk"
64
- npm version patch
65
- # hoặc: npm version minor
66
- # hoặc: npm version major
67
- ```
68
-
69
- ### Publish
70
-
71
- ```bash
72
- cd "E:\VTS VOICE\packages\asterisk-voice-sdk"
73
- npm login
74
- npm publish --access public
75
- ```
76
-
77
- Nếu package là private (hoặc org của bạn mặc định private) thì dùng:
78
-
79
- ```bash
80
- npm publish
81
- ```
82
-
package/package.json CHANGED
@@ -1,10 +1,14 @@
1
1
  {
2
2
  "name": "asterisk-voice-sdk",
3
- "version": "0.0.1",
3
+ "version": "0.0.2",
4
4
  "description": "SDK SIP cấp cao cho Asterisk/FreePBX trên React Native (wrapper react-native-pjsip)",
5
5
  "license": "MIT",
6
6
  "author": "hoanbv",
7
- "keywords": ["asterisk", "voip", "sdk"],
7
+ "keywords": [
8
+ "asterisk",
9
+ "voip",
10
+ "sdk"
11
+ ],
8
12
  "publishConfig": {
9
13
  "access": "public"
10
14
  },
@@ -20,12 +24,10 @@
20
24
  "prepublishOnly": "npm run build",
21
25
  "typecheck": "tsc -p tsconfig.json --noEmit"
22
26
  },
23
- "dependencies": {
24
- "react-native-pjsip": ">=2.7.0"
25
- },
26
27
  "peerDependencies": {
27
28
  "react": ">=18",
28
- "react-native": ">=0.73"
29
+ "react-native": ">=0.73",
30
+ "react-native-pjsip": ">=2.7.0"
29
31
  },
30
32
  "devDependencies": {
31
33
  "@types/node": "^22.13.0",
@@ -33,4 +35,4 @@
33
35
  "react-native": "0.85.1",
34
36
  "typescript": "^5.8.3"
35
37
  }
36
- }
38
+ }