@jolibox/implement 1.2.9-beta.9 → 1.3.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.
@@ -1,9 +1,9 @@
1
1
  Invoking: npm run clean && npm run build:esm && tsc
2
2
 
3
- > @jolibox/implement@1.2.9-beta.9 clean
3
+ > @jolibox/implement@1.3.0 clean
4
4
  > rimraf ./dist
5
5
 
6
6
 
7
- > @jolibox/implement@1.2.9-beta.9 build:esm
7
+ > @jolibox/implement@1.3.0 build:esm
8
8
  > BUILD_VERSION=$(node -p "require('./package.json').version") node esbuild.config.js --format=esm
9
9
 
package/package.json CHANGED
@@ -1,15 +1,15 @@
1
1
  {
2
2
  "name": "@jolibox/implement",
3
3
  "description": "This project is Jolibox JS-SDk implement for Native && H5",
4
- "version": "1.2.9-beta.9",
4
+ "version": "1.3.0",
5
5
  "main": "dist/index.js",
6
6
  "typings": "dist/index.d.ts",
7
7
  "license": "MIT",
8
8
  "dependencies": {
9
- "@jolibox/common": "1.2.9-beta.9",
10
- "@jolibox/types": "1.2.9-beta.9",
11
- "@jolibox/native-bridge": "1.2.9-beta.9",
12
- "@jolibox/ads": "1.2.9-beta.9",
9
+ "@jolibox/common": "1.3.0",
10
+ "@jolibox/types": "1.3.0",
11
+ "@jolibox/native-bridge": "1.3.0",
12
+ "@jolibox/ads": "1.3.0",
13
13
  "localforage": "1.10.0",
14
14
  "@jolibox/ui": "1.0.0",
15
15
  "web-vitals": "4.2.4"
@@ -97,7 +97,6 @@ export const createCommonSubscriptionHandler = (
97
97
  handleSubFailed?.(params);
98
98
  return false;
99
99
  } finally {
100
- // do not clear cache for unlockoptions
101
100
  // unlockOptionsHandler.clearCache();
102
101
  }
103
102
  };
@@ -110,22 +110,21 @@ commands.registerCommand('PaymentSDK.subscribe', subscribe);
110
110
  commands.registerCommand('PaymentSDK.flushSubInfoCache', flushSubInfoCache);
111
111
 
112
112
  registerCanIUse('payment.purchaseGem', {
113
- version: '1.2.3'
113
+ version: '1.2.9'
114
114
  });
115
115
 
116
116
  registerCanIUse('payment.getGemProducts', {
117
- version: '1.2.3'
117
+ version: '1.2.9'
118
118
  });
119
119
 
120
- // for test, correct version is 1.3.0
121
120
  registerCanIUse('payment.getSubscriptionPlans', {
122
- version: '1.2.5'
121
+ version: '1.2.9'
123
122
  });
124
123
 
125
124
  registerCanIUse('payment.subscribe', {
126
- version: '1.2.5'
125
+ version: '1.2.9'
127
126
  });
128
127
 
129
128
  registerCanIUse('payment.flushSubInfoCache', {
130
- version: '1.2.5'
129
+ version: '1.2.9'
131
130
  });
@@ -51,7 +51,7 @@ class PaymentRequestAdapter
51
51
  {
52
52
  // applyNative 的缓存
53
53
  private static nativePriceCache = new Map<string, { [appStoreProductId: string]: { price: string } }>();
54
- private static readonly NATIVE_PRICE_CACHE_DURATION = 1 * 24 * 60 * 60 * 1000; // 1 day
54
+ private static readonly NATIVE_PRICE_CACHE_DURATION = 10 * 60 * 1000; // 10 minutes
55
55
  private static nativePriceCacheTimestamp = new Map<string, number>();
56
56
 
57
57
  async execute(endpoint: string, _options?: PaymentRequest): Promise<PaymentResponse> {