@jetthai/cuora 1.1.400-dev-9 → 1.1.400-dev-12

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,12 @@
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.400-dev-12](https://github.com/jetthai/cuora-module/compare/v1.1.400-dev-11...v1.1.400-dev-12) (2025-12-18)
6
+
7
+ ### [1.1.400-dev-11](https://github.com/jetthai/cuora-module/compare/v1.1.400-dev-10...v1.1.400-dev-11) (2025-12-18)
8
+
9
+ ### [1.1.400-dev-10](https://github.com/jetthai/cuora-module/compare/v1.1.400-dev-9...v1.1.400-dev-10) (2025-12-18)
10
+
5
11
  ### [1.1.400-dev-9](https://github.com/jetthai/cuora-module/compare/v1.1.400-dev-8...v1.1.400-dev-9) (2025-12-17)
6
12
 
7
13
  ### [1.1.400-dev-8](https://github.com/jetthai/cuora-module/compare/v1.1.400-dev-7...v1.1.400-dev-8) (2025-12-16)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jetthai/cuora",
3
- "version": "1.1.400-dev-9",
3
+ "version": "1.1.400-dev-12",
4
4
  "description": "",
5
5
  "main": "./src/index.js",
6
6
  "type": "module",
@@ -465,10 +465,7 @@ export default function (request) {
465
465
  referralObj.channel = storage.get('channel') || defaultChannel || channel
466
466
  referralObj.subchannel = storage.get('subchannel') || defaultSubchannel || subchannel
467
467
 
468
- // OZE 先使用 v2 測試 ,等待確認沒問題後,所有站點再統一用 v2
469
- // 但 OZE ZALO 仍維持 v1
470
- const fullURL = ['OZE'].includes(clientId) && provider !== 'zalo' ? request.config.fullURL.replace('/v1/', '/v2/') : request.config.fullURL
471
-
468
+ const fullURL = request.config.fullURL
472
469
  const redirectURL = urljoin(
473
470
  fullURL,
474
471
  'login?' +
@@ -1,7 +1,6 @@
1
1
  import pickBy from 'lodash/pickBy.js'
2
2
  import storage from '../util/storage.js'
3
3
 
4
- // const pickBy = require('lodash/pickBy')
5
4
  const supportVersion2List = [
6
5
  // 04-09 Update
7
6
  'game/play',
@@ -281,30 +280,7 @@ export default class Request {
281
280
  _createConfig(req, cancelToken) {
282
281
  const { method, url, params, isPublic, isFormData, headers } = req
283
282
  let fullURL = this.config.fullURL
284
- let urlName = url
285
- // 有些API會將參數(/?)直接帶在URL上,所以要將參數排除
286
- const cleanUrl = url.split('?')[0]
287
-
288
- const isV2Supported = supportVersion2List.some((supportedUrl) => {
289
- // 如果包含動態參數(:parameter),則使用模式匹配
290
- if (supportedUrl.includes(':')) {
291
- const pattern = supportedUrl.replace(/:[^/]+/g, '[^/]+')
292
- const regex = new RegExp(`^${pattern}$`)
293
- return regex.test(cleanUrl)
294
- }
295
- return supportedUrl === cleanUrl
296
- })
297
-
298
- // 目前全站都支援V2,若有需要限制為V1的站點可以填入,此段等轉換全部完成之後就可以移除了
299
- const supportV2Toggle = [''].includes(this.config?.clientId)
300
-
301
- if (isV2Supported && !supportV2Toggle) {
302
- fullURL = fullURL.replace('/v1/', '/v2/')
303
- urlName = this._convertUrlToKebabCase(url)
304
- // console.log(`*[DEV_ONLY]V2`, 'url:', urlName)
305
- } else {
306
- // console.log(`*[DEV_ONLY]V2-不支援:`, 'url:', urlName)
307
- }
283
+ let urlName = this._convertUrlToKebabCase(url)
308
284
 
309
285
  if (isFormData) {
310
286
  return {