queuebear 0.1.8 → 0.1.9

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.
Files changed (2) hide show
  1. package/README.md +17 -37
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -493,33 +493,34 @@ The signing secret is available in your QueueBear project settings. When configu
493
493
 
494
494
  ## Local Development
495
495
 
496
- When developing locally, your webhook endpoints run on `localhost` which isn't accessible from QueueBear's servers. Use a tunnel service to expose your local server.
496
+ When developing locally, your webhook endpoints run on `localhost` which isn't accessible from QueueBear's servers. Use [Tunnelmole](https://tunnelmole.com) to expose your local server - it's free and requires no signup.
497
497
 
498
- ### Using ngrok (Recommended)
498
+ ### Installing Tunnelmole
499
499
 
500
- [ngrok](https://ngrok.com) provides stable URLs and a built-in request inspector.
501
-
502
- **1. Install and authenticate:**
500
+ **Linux, macOS, Windows WSL:**
503
501
 
504
502
  ```bash
505
- # Install
506
- brew install ngrok # or download from ngrok.com/download
503
+ curl -O https://install.tunnelmole.com/t357g/install && sudo bash install
504
+ ```
507
505
 
508
- # Authenticate (free account required)
509
- ngrok config add-authtoken YOUR_AUTH_TOKEN
506
+ **Node.js (all platforms, requires Node 16+):**
507
+
508
+ ```bash
509
+ npm install -g tunnelmole
510
510
  ```
511
511
 
512
- **2. Start the tunnel:**
512
+ ### Starting a Tunnel
513
513
 
514
514
  ```bash
515
- ngrok http 3000
515
+ tmole 3000
516
+ # Output: https://xxxx.tunnelmole.com is forwarding to localhost:3000
516
517
  ```
517
518
 
518
- **3. Use the forwarding URL:**
519
+ ### Using the Tunnel URL
519
520
 
520
521
  ```typescript
521
- // Use ngrok URL instead of localhost
522
- await qb.messages.publish("https://abc123.ngrok.io/api/webhooks", {
522
+ // Use tunnelmole URL instead of localhost
523
+ await qb.messages.publish("https://xxxx.tunnelmole.com/api/webhooks", {
523
524
  event: "user.created",
524
525
  userId: "123"
525
526
  });
@@ -527,37 +528,16 @@ await qb.messages.publish("https://abc123.ngrok.io/api/webhooks", {
527
528
  // Works for workflows too
528
529
  await qb.workflows.trigger(
529
530
  "onboarding",
530
- "https://abc123.ngrok.io/api/workflows/onboarding",
531
+ "https://xxxx.tunnelmole.com/api/workflows/onboarding",
531
532
  { userId: "123" }
532
533
  );
533
534
  ```
534
535
 
535
- **Debugging:** ngrok provides a web inspector at `http://localhost:4040` to view requests, responses, and replay failed deliveries.
536
-
537
- ### Using localtunnel
538
-
539
- [localtunnel](https://localtunnel.me) is free and requires no signup.
540
-
541
- ```bash
542
- npx localtunnel --port 3000
543
- # Output: your url is: https://good-months-leave.loca.lt
544
- ```
545
-
546
- **Note:** localtunnel shows a reminder page on first visit. Bypass it by adding a header:
547
-
548
- ```typescript
549
- await qb.messages.publish(
550
- "https://good-months-leave.loca.lt/api/webhooks",
551
- { event: "test" },
552
- { headers: { "bypass-tunnel-reminder": "true" } }
553
- );
554
- ```
555
-
556
536
  ### Tips
557
537
 
558
538
  - Store your tunnel URL in `.env` for easy switching between local and production
559
539
  - Both `callbackUrl` and `failureCallbackUrl` need public URLs for local testing
560
- - ngrok URLs change on restart (stable URLs require a paid plan)
540
+ - Tunnel URLs change on restart
561
541
 
562
542
  ---
563
543
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "queuebear",
3
- "version": "0.1.8",
3
+ "version": "0.1.9",
4
4
  "description": "QueueBear SDK for message queues, scheduled jobs, and durable workflows",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",