@jetthai/cuora 1.1.455-dev.0 → 1.1.455-dev.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.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,15 @@
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.455-dev.2](https://github.com/jetthai/cuora-module/compare/v1.1.455-dev.1...v1.1.455-dev.2) (2026-08-06)
6
+
7
+ ### [1.1.455-dev.1](https://github.com/jetthai/cuora-module/compare/v1.1.455-dev.0...v1.1.455-dev.1) (2026-08-04)
8
+
9
+
10
+ ### Bug Fixes
11
+
12
+ * **user_sign_up:** 明確輸入判定改用 !== undefined,修復三層解析成為死碼 ([770450e](https://github.com/jetthai/cuora-module/commit/770450e6065d42d497504d2f8630c6740ec1e7c4))
13
+
5
14
  ### [1.1.455-dev.0](https://github.com/jetthai/cuora-module/compare/v1.1.455...v1.1.455-dev.0) (2026-08-04)
6
15
 
7
16
  ### [1.1.454-dev.0](https://github.com/jetthai/cuora-module/compare/v1.1.453...v1.1.454-dev.0) (2026-07-29)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jetthai/cuora",
3
- "version": "1.1.455-dev.0",
3
+ "version": "1.1.455-dev.2",
4
4
  "description": "",
5
5
  "main": "./src/index.js",
6
6
  "type": "module",
@@ -130,9 +130,9 @@ export default {
130
130
  method: 'get',
131
131
  params: { appSecret },
132
132
  }),
133
- getProgressDetail: ({ appSecret }) => ({
133
+ getProgressDetail: ({ appSecret, locale }) => ({
134
134
  url: 'activities/progress-details',
135
135
  method: 'get',
136
- params: { appSecret },
136
+ params: { appSecret, locale },
137
137
  }),
138
138
  }
@@ -192,11 +192,13 @@ export default function (request) {
192
192
  const { signUpData, deviceTokenEnable } = context
193
193
  const dt = deviceTokenEnable ? await request.config.getDt?.() : undefined
194
194
 
195
- // 宿主明確帶入的 affiliateCode(註冊表單的代理碼欄位)優先於網址/儲存這類環境值;
196
- // 以 key 是否存在判定而非真假值——使用者刻意清空送出的空字串也是明確決定,
197
- // 用 `||` 會讓它退回三層解析,把剛清掉的舊代理碼從網址撿回來
195
+ // 宿主明確帶入的 affiliateCode(註冊表單的代理碼欄位)優先於網址/儲存這類環境值。
196
+ // 判定用 `!== undefined` 而非 hasOwnProperty:上面的 setSignUpId/Phone/Email 是以解構寫入
197
+ // signUpData,宿主沒帶時 key 仍然存在(值為 undefined),hasOwnProperty 會恆為 true、
198
+ // 讓三層解析變成死碼。也不能用 `||`,否則使用者刻意清空送出的空字串會被吃掉、
199
+ // 退回三層解析把剛清掉的舊代理碼從網址撿回來。
198
200
  const { affiliateCode: explicitAffiliateCode, ...signUpRest } = signUpData || {}
199
- const hasExplicitAc = !!signUpData && Object.prototype.hasOwnProperty.call(signUpData, 'affiliateCode')
201
+ const hasExplicitAc = explicitAffiliateCode !== undefined
200
202
  const acRead = readParamFromLocation(AC_KEYS)
201
203
  const affiliateCode = hasExplicitAc ? normalize(explicitAffiliateCode) : acRead.value
202
204
  const messages = {