@tetherto/wdk-worklet-bundler 1.0.0-beta.2 → 1.0.0-beta.3

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/dist/cli.js CHANGED
@@ -53,7 +53,7 @@ var require_package = __commonJS({
53
53
  "package.json"(exports2, module2) {
54
54
  module2.exports = {
55
55
  name: "@tetherto/wdk-worklet-bundler",
56
- version: "1.0.0-beta.2",
56
+ version: "1.0.0-beta.3",
57
57
  description: "CLI tool for generating WDK worklet bundles",
58
58
  main: "./dist/index.js",
59
59
  types: "./dist/index.d.ts",
@@ -668,7 +668,10 @@ async function generateEntryPoint(config, outputDir) {
668
668
  // DO NOT EDIT MANUALLY
669
669
 
670
670
  require('bare-node-runtime/global');
671
- const { globalAgent } = require('bare-http1')
671
+ const { globalAgent: http1Agent } = require('bare-http1')
672
+ const { globalAgent: httpsAgent } = require('bare-https')
673
+
674
+ const agents = [http1Agent, httpsAgent]
672
675
 
673
676
  // Handle unhandled promise rejections and exceptions
674
677
  if (typeof Bare !== 'undefined' && Bare.on) {
@@ -679,12 +682,16 @@ if (typeof Bare !== 'undefined' && Bare.on) {
679
682
  console.error('Uncaught exception in worklet:', error);
680
683
  })
681
684
  Bare.on('suspend', () => {
682
- globalAgent.suspend()
683
- console.log('Fetching in worklet suspended', globalAgent.suspended)
685
+ agents.forEach((globalAgent) => {
686
+ globalAgent.suspend()
687
+ console.log('Fetching in worklet suspended', globalAgent.suspended)
688
+ })
684
689
  })
685
690
  Bare.on('resume', () => {
686
- globalAgent.resume()
687
- console.log('Fetching in worklet resumed', globalAgent.resumed)
691
+ agents.forEach((globalAgent) => {
692
+ globalAgent.resume()
693
+ console.log('Fetching in worklet resumed', globalAgent.resumed)
694
+ })
688
695
  })
689
696
  }
690
697
 
package/dist/index.js CHANGED
@@ -481,7 +481,10 @@ async function generateEntryPoint(config, outputDir) {
481
481
  // DO NOT EDIT MANUALLY
482
482
 
483
483
  require('bare-node-runtime/global');
484
- const { globalAgent } = require('bare-http1')
484
+ const { globalAgent: http1Agent } = require('bare-http1')
485
+ const { globalAgent: httpsAgent } = require('bare-https')
486
+
487
+ const agents = [http1Agent, httpsAgent]
485
488
 
486
489
  // Handle unhandled promise rejections and exceptions
487
490
  if (typeof Bare !== 'undefined' && Bare.on) {
@@ -492,12 +495,16 @@ if (typeof Bare !== 'undefined' && Bare.on) {
492
495
  console.error('Uncaught exception in worklet:', error);
493
496
  })
494
497
  Bare.on('suspend', () => {
495
- globalAgent.suspend()
496
- console.log('Fetching in worklet suspended', globalAgent.suspended)
498
+ agents.forEach((globalAgent) => {
499
+ globalAgent.suspend()
500
+ console.log('Fetching in worklet suspended', globalAgent.suspended)
501
+ })
497
502
  })
498
503
  Bare.on('resume', () => {
499
- globalAgent.resume()
500
- console.log('Fetching in worklet resumed', globalAgent.resumed)
504
+ agents.forEach((globalAgent) => {
505
+ globalAgent.resume()
506
+ console.log('Fetching in worklet resumed', globalAgent.resumed)
507
+ })
501
508
  })
502
509
  }
503
510
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tetherto/wdk-worklet-bundler",
3
- "version": "1.0.0-beta.2",
3
+ "version": "1.0.0-beta.3",
4
4
  "description": "CLI tool for generating WDK worklet bundles",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",