chargebee 3.11.0 → 3.12.0-beta.1

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
@@ -1,3 +1,10 @@
1
+ ### v3.12.0-beta.1 (2025-07-23)
2
+ * * *
3
+
4
+ ### Bug Fixes:
5
+ * Resolved a module dependency issue that was causing runtime failures in the Edge environment.
6
+
7
+
1
8
  ### v3.11.0 (2025-07-18)
2
9
  * * *
3
10
 
@@ -11,7 +11,7 @@ exports.Environment = {
11
11
  hostSuffix: '.chargebee.com',
12
12
  apiPath: '/api/v2',
13
13
  timeout: DEFAULT_TIME_OUT,
14
- clientVersion: 'v3.11.0',
14
+ clientVersion: 'v3.12.0-beta.1',
15
15
  port: DEFAULT_PORT,
16
16
  timemachineWaitInMillis: DEFAULT_TIME_MACHINE_WAIT,
17
17
  exportWaitInMillis: DEFAULT_EXPORT_WAIT,
package/cjs/util.js CHANGED
@@ -230,19 +230,10 @@ function log(env, { level = 'INFO', message = '', context = {}, functionName = '
230
230
  const logLine = `[${timestamp}] [${level.toUpperCase()}] [${service}] ${functionName} - ${message}${metaString ? ` (${metaString})` : ''}`;
231
231
  console.debug(logLine);
232
232
  }
233
- const crypto_1 = require("crypto");
234
233
  function generateUUIDv4() {
235
- const bytes = (0, crypto_1.randomBytes)(16);
236
- // Set version to 4 (UUIDv4)
237
- bytes[6] = (bytes[6] & 0x0f) | 0x40;
238
- // Set variant to 10xxxxxx
239
- bytes[8] = (bytes[8] & 0x3f) | 0x80;
240
- const hex = bytes.toString('hex');
241
- return [
242
- hex.slice(0, 8),
243
- hex.slice(8, 12),
244
- hex.slice(12, 16),
245
- hex.slice(16, 20),
246
- hex.slice(20),
247
- ].join('-');
234
+ return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, (c) => {
235
+ const r = (Math.random() * 16) | 0;
236
+ const v = c === 'x' ? r : (r & 0x3) | 0x8;
237
+ return v.toString(16);
238
+ });
248
239
  }
@@ -8,7 +8,7 @@ export const Environment = {
8
8
  hostSuffix: '.chargebee.com',
9
9
  apiPath: '/api/v2',
10
10
  timeout: DEFAULT_TIME_OUT,
11
- clientVersion: 'v3.11.0',
11
+ clientVersion: 'v3.12.0-beta.1',
12
12
  port: DEFAULT_PORT,
13
13
  timemachineWaitInMillis: DEFAULT_TIME_MACHINE_WAIT,
14
14
  exportWaitInMillis: DEFAULT_EXPORT_WAIT,
package/esm/util.js CHANGED
@@ -212,19 +212,10 @@ export function log(env, { level = 'INFO', message = '', context = {}, functionN
212
212
  const logLine = `[${timestamp}] [${level.toUpperCase()}] [${service}] ${functionName} - ${message}${metaString ? ` (${metaString})` : ''}`;
213
213
  console.debug(logLine);
214
214
  }
215
- import { randomBytes } from 'crypto';
216
215
  export function generateUUIDv4() {
217
- const bytes = randomBytes(16);
218
- // Set version to 4 (UUIDv4)
219
- bytes[6] = (bytes[6] & 0x0f) | 0x40;
220
- // Set variant to 10xxxxxx
221
- bytes[8] = (bytes[8] & 0x3f) | 0x80;
222
- const hex = bytes.toString('hex');
223
- return [
224
- hex.slice(0, 8),
225
- hex.slice(8, 12),
226
- hex.slice(12, 16),
227
- hex.slice(16, 20),
228
- hex.slice(20),
229
- ].join('-');
216
+ return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, (c) => {
217
+ const r = (Math.random() * 16) | 0;
218
+ const v = c === 'x' ? r : (r & 0x3) | 0x8;
219
+ return v.toString(16);
220
+ });
230
221
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "chargebee",
3
- "version": "3.11.0",
3
+ "version": "3.12.0-beta.1",
4
4
  "description": "A library for integrating with Chargebee.",
5
5
  "scripts": {
6
6
  "prepack": "npm install && npm run build",
@@ -36,6 +36,10 @@
36
36
  },
37
37
  "exports": {
38
38
  "types": "./types/index.d.ts",
39
+ "browser": {
40
+ "import": "./esm/chargebee.esm.worker.js",
41
+ "require": "./cjs/chargebee.cjs.worker.js"
42
+ },
39
43
  "worker": {
40
44
  "import": "./esm/chargebee.esm.worker.js",
41
45
  "require": "./cjs/chargebee.cjs.worker.js"