@tinyweb_dev/oe-meeting-react 0.1.0

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,116 @@
1
+ # Release npm — `@tinyweb_dev/oe-meeting-react`
2
+
3
+ Workflow [`release_npm.yml`](../../../../.github/workflows/release_npm.yml) build,
4
+ typecheck, test, kiểm tra tarball và publish React SDK lên npm.
5
+
6
+ ## Chuẩn bị một lần
7
+
8
+ ### 1. Kiểm tra npm organization
9
+
10
+ Tài khoản phát hành phải có quyền publish package public trong scope
11
+ `@tinyweb_dev`.
12
+
13
+ ### 2. Tạo npm access token
14
+
15
+ Tạo automation/granular access token trên npm với quyền read/write package
16
+ `@tinyweb_dev/oe-meeting-react`.
17
+
18
+ ### 3. Thêm GitHub Actions secret
19
+
20
+ Trong repository `tinyweb-01/oe-meeting`, mở:
21
+
22
+ ```text
23
+ Settings → Secrets and variables → Actions → New repository secret
24
+ ```
25
+
26
+ Tạo secret:
27
+
28
+ ```text
29
+ Name: NPM_TOKEN
30
+ Value: <npm-access-token>
31
+ ```
32
+
33
+ Không ghi token vào source, workflow, log hoặc file `.npmrc` trong repository.
34
+
35
+ ## Kiểm thử pipeline không publish
36
+
37
+ Mở GitHub Actions → `release_npm` → Run workflow và giữ:
38
+
39
+ ```text
40
+ dry_run = true
41
+ ```
42
+
43
+ Workflow sẽ chạy đầy đủ build, typecheck, test, `npm pack` và
44
+ `npm publish --dry-run`; không upload package.
45
+
46
+ Có thể kiểm tra tương đương ở local:
47
+
48
+ ```bash
49
+ cd src/sdk
50
+ npm ci
51
+ npm run build --workspace @tinyweb_dev/oe-meeting-react
52
+ npm run typecheck --workspace @tinyweb_dev/oe-meeting-react
53
+ npm run test --workspace @tinyweb_dev/oe-meeting-react
54
+ cd react
55
+ npm pack --dry-run
56
+ npm publish --access public --dry-run
57
+ ```
58
+
59
+ ## Phát hành bằng tag
60
+
61
+ ### 1. Cập nhật version
62
+
63
+ Từ repository root:
64
+
65
+ ```bash
66
+ npm version 0.1.1 --workspace @tinyweb_dev/oe-meeting-react --no-git-tag-version
67
+ ```
68
+
69
+ Lệnh cập nhật version package và workspace lockfile. Review, commit và merge vào
70
+ branch phát hành trước khi tạo tag.
71
+
72
+ ### 2. Tạo tag đúng convention
73
+
74
+ Tag bắt buộc có dạng:
75
+
76
+ ```text
77
+ oe-meeting-react-v<package-version>
78
+ ```
79
+
80
+ Ví dụ package version `0.1.1`:
81
+
82
+ ```bash
83
+ git tag oe-meeting-react-v0.1.1
84
+ git push origin oe-meeting-react-v0.1.1
85
+ ```
86
+
87
+ Workflow từ chối release nếu tag không khớp chính xác version trong
88
+ `src/sdk/react/package.json`.
89
+
90
+ ### 3. Xác nhận kết quả
91
+
92
+ Kiểm tra workflow summary và package:
93
+
94
+ ```text
95
+ https://www.npmjs.com/package/@tinyweb_dev/oe-meeting-react
96
+ ```
97
+
98
+ Nếu cùng version đã tồn tại trên npm, workflow bỏ qua publish để rerun an toàn.
99
+ Npm không cho phép ghi đè một version đã publish; cần tăng version để phát hành
100
+ bản mới.
101
+
102
+ ## Phát hành thủ công
103
+
104
+ `workflow_dispatch` hỗ trợ chọn `dry_run = false`. Chỉ dùng khi cần phát hành từ
105
+ một commit/ref đã review và package version chưa tồn tại trên npm. Luồng tag vẫn
106
+ là cách phát hành chuẩn vì tạo dấu mốc release rõ ràng trong Git.
107
+
108
+ ## Troubleshooting
109
+
110
+ | Lỗi | Nguyên nhân thường gặp | Cách xử lý |
111
+ |---|---|---|
112
+ | `ENEEDAUTH` / `E401` | Thiếu, hết hạn hoặc sai `NPM_TOKEN` | Tạo token mới và cập nhật GitHub secret. |
113
+ | `E403` | Token không có quyền scope/package hoặc npm yêu cầu 2FA policy khác | Kiểm tra quyền granular token và organization. |
114
+ | Tag không khớp version | Tag và `package.json` khác nhau | Tăng version, commit rồi tạo tag đúng convention. |
115
+ | Version đã tồn tại | Npm không cho overwrite | Tăng patch/minor/major version. |
116
+ | Build/typecheck/test fail | Source chưa đạt release gate | Fix lỗi; không bỏ qua gate publish. |
package/package.json ADDED
@@ -0,0 +1,66 @@
1
+ {
2
+ "name": "@tinyweb_dev/oe-meeting-react",
3
+ "version": "0.1.0",
4
+ "description": "React SDK to embed OE Meeting rooms via iframe and postMessage",
5
+ "publishConfig": {
6
+ "access": "public"
7
+ },
8
+ "type": "module",
9
+ "main": "./dist/index.cjs",
10
+ "module": "./dist/index.js",
11
+ "types": "./dist/index.d.ts",
12
+ "exports": {
13
+ ".": {
14
+ "types": "./dist/index.d.ts",
15
+ "import": "./dist/index.js",
16
+ "require": "./dist/index.cjs"
17
+ }
18
+ },
19
+ "files": [
20
+ "dist",
21
+ "README.md",
22
+ "INTEGRATION.md",
23
+ "docs"
24
+ ],
25
+ "scripts": {
26
+ "build": "tsup",
27
+ "dev": "tsup --watch",
28
+ "test": "vitest run",
29
+ "typecheck": "tsc --noEmit"
30
+ },
31
+ "peerDependencies": {
32
+ "react": ">=17",
33
+ "react-dom": ">=17"
34
+ },
35
+ "devDependencies": {
36
+ "@types/react": "^18.3.3",
37
+ "@types/react-dom": "^18.3.0",
38
+ "react": "^18.3.1",
39
+ "react-dom": "^18.3.1",
40
+ "tsup": "^8.2.4",
41
+ "typescript": "^5.5.4",
42
+ "vitest": "^2.0.5"
43
+ },
44
+ "sideEffects": false,
45
+ "license": "MIT",
46
+ "repository": {
47
+ "type": "git",
48
+ "url": "git+https://github.com/tinyweb-01/oe-meeting.git",
49
+ "directory": "src/sdk/react"
50
+ },
51
+ "homepage": "https://github.com/tinyweb-01/oe-meeting/tree/prod/src/sdk/react#readme",
52
+ "bugs": {
53
+ "url": "https://github.com/tinyweb-01/oe-meeting/issues"
54
+ },
55
+ "engines": {
56
+ "node": ">=18"
57
+ },
58
+ "keywords": [
59
+ "oe-meeting",
60
+ "video-conference",
61
+ "embed",
62
+ "react",
63
+ "iframe",
64
+ "lms"
65
+ ]
66
+ }