@jetthai/cuora 1.1.437 β†’ 1.1.438

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.1.438](https://github.com/jetthai/cuora-module/compare/v1.1.437...v1.1.438) (2026-05-18)
6
+
5
7
  ### [1.1.437](https://github.com/jetthai/cuora-module/compare/v1.1.436...v1.1.437) (2026-05-15)
6
8
 
7
9
  ### [1.1.436](https://github.com/jetthai/cuora-module/compare/v1.1.435...v1.1.436) (2026-05-15)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jetthai/cuora",
3
- "version": "1.1.437",
3
+ "version": "1.1.438",
4
4
  "description": "",
5
5
  "main": "./src/index.js",
6
6
  "type": "module",
@@ -0,0 +1,85 @@
1
+ # JT-1776243420: Third-Party Register Carry Phone / Email Payload
2
+
3
+ ## Key Changes
4
+
5
+ 1. Extended third-party redirect payload assembly to read `tp_phone`, `tp_countryCode`, and `tp_email` from storage.
6
+ 2. Preserved existing affiliate code / nickname behavior and appended new fields only when values are valid.
7
+ 3. Cleans the temporary third-party storage keys after composing the redirect query.
8
+
9
+ ---
10
+
11
+ ## Key Findings
12
+
13
+ ### Strengths
14
+
15
+ 1. The change is tightly scoped to the third-party auth redirect builder in `src/machine/auth.js:477-520`.
16
+ 2. Existing affiliate code and nickname logic remains unchanged while phone / email are additive only.
17
+ 3. Temporary keys are removed after payload composition, reducing leakage into later unrelated auth flows.
18
+
19
+ ---
20
+
21
+ ### Behavior Observed
22
+
23
+ 1. Static review confirms `phone`, `countryCode`, and `email` are appended only when storage values are not `undefined` / `null`.
24
+ 2. Channel and subchannel fallback logic stays intact after the new fields are added.
25
+ 3. No unrelated file changes were present in this repo for the review scope.
26
+
27
+ ---
28
+
29
+ ## πŸ”§ Change Type
30
+
31
+ - [ ] πŸ› Bug fix
32
+ - [x] ✨ New feature
33
+ - [ ] πŸ’„ Style
34
+ - [ ] ♻️ Refactor
35
+ - [ ] ⚑ Performance
36
+ - [ ] πŸ”§ Chore
37
+
38
+ ---
39
+
40
+ ## πŸ“± Impact Scope
41
+
42
+ - Third-party register / login redirect query assembly in cuora shared auth machine.
43
+ - Downstream PWA clients that store `tp_phone`, `tp_countryCode`, and `tp_email` before `LOGIN_3PARTY`.
44
+
45
+ ---
46
+
47
+ ## Test Completion Status
48
+
49
+ | Item | Validation Tested | Status |
50
+ | -------------------------- | --------------------------------------------------------------------- | ------- |
51
+ | Diff hygiene | `git diff --check` in `cuora-module` | PASS |
52
+ | Shared auth payload review | Reviewed `src/machine/auth.js:477-520` against ticket intent | PASS |
53
+ | Runtime redirect execution | Not run in this repo directly; validated through client repos instead | NOT RUN |
54
+
55
+ ---
56
+
57
+ ## πŸ“‹ Spec Validation (Aligned with review-playbook)
58
+
59
+ | Spec Item | Evidence (File/Line/Result) | Status |
60
+ | ------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | ------ |
61
+ | Third-party flow can carry phone when client stored it | `src/machine/auth.js:479-520` reads `tp_phone` / `tp_countryCode` and appends them to `referralObj` | PASS |
62
+ | Third-party flow can carry email when client stored it | `src/machine/auth.js:481-520` reads `tp_email` and appends it to `referralObj` | PASS |
63
+ | Affiliate code and nickname keep original logic | `src/machine/auth.js:477-500` keeps `ac` / `nick_name` handling unchanged | PASS |
64
+ | Temporary third-party data does not leak into later unrelated flows | `src/machine/auth.js:518-520` removes the temporary storage keys after composing the redirect URL | PASS |
65
+
66
+ ---
67
+
68
+ ## πŸ“‹ Standards Checklist (Summary)
69
+
70
+ | Category | Result | Notes |
71
+ | ---------------------- | ------- | --------------------------------------------------------------------------- |
72
+ | Memory Safety | PASS | Simple storage reads and object assembly only. |
73
+ | Rendering Performance | PASS | No rendering code touched. |
74
+ | Network Requests | PASS | Existing redirect flow only; no extra requests added. |
75
+ | Bundle Optimization | PASS | No new imports or heavy logic added. |
76
+ | Code Quality | PASS | Scope is narrow and branch contains only the required file change. |
77
+ | Vue / Nuxt Standards | NOT RUN | Shared module; not a Vue / Nuxt surface. |
78
+ | SSR Security Standards | PASS | Query parameters are assembled from existing client-side storage path only. |
79
+ | Project Conventions | PASS | Matches existing storage-guard pattern used for affiliate / nickname. |
80
+
81
+ ## Conclusion
82
+
83
+ This repo’s shared auth-machine change matches the ticket intent and is internally consistent. Runtime behavior was not executed in `cuora-module` directly, but both client repos now pass the new storage keys into this shared payload path.
84
+
85
+ **Overall Result:** PASS (PARTIAL)
@@ -476,6 +476,9 @@ export default function (request) {
476
476
 
477
477
  const affiliateCode = storage.get('ac')
478
478
  const nickname = storage.get('nk')
479
+ const phone = storage.get('tp_phone')
480
+ const countryCode = storage.get('tp_countryCode')
481
+ const email = storage.get('tp_email')
479
482
  const messages = {
480
483
  url: window.location.href,
481
484
  channelOrders: [
@@ -498,9 +501,25 @@ export default function (request) {
498
501
  referralObj.nick_name = nickname
499
502
  }
500
503
 
504
+ if (![undefined, 'undefined', null, 'null'].includes(phone)) {
505
+ referralObj.phone = phone
506
+ }
507
+
508
+ if (![undefined, 'undefined', null, 'null'].includes(countryCode)) {
509
+ referralObj.countryCode = countryCode
510
+ }
511
+
512
+ if (![undefined, 'undefined', null, 'null'].includes(email)) {
513
+ referralObj.email = email
514
+ }
515
+
501
516
  referralObj.channel = storage.get('channel') || defaultChannel || channel
502
517
  referralObj.subchannel = storage.get('subchannel') || defaultSubchannel || subchannel
503
518
 
519
+ storage.remove('tp_phone')
520
+ storage.remove('tp_countryCode')
521
+ storage.remove('tp_email')
522
+
504
523
  const fullURL = request.config.fullURL
505
524
 
506
525
  const redirectURL = urljoin(