rostc 1.0.0 → 1.0.2

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/cli.js +15 -1
  2. package/package.json +3 -3
package/cli.js CHANGED
@@ -1,10 +1,24 @@
1
1
  #!/usr/bin/env node
2
2
 
3
3
  const WebSocket = require('ws');
4
- const chalk = require('chalk');
5
4
  const http = require('http');
6
5
  const { randomBytes } = require('crypto');
7
6
 
7
+ // Chalk v5+ fix
8
+ let chalk;
9
+ try {
10
+ chalk = require('chalk');
11
+ } catch (e) {
12
+ // Fallback if chalk fails
13
+ chalk = {
14
+ cyan: (t) => t,
15
+ green: (t) => t,
16
+ gray: (t) => t,
17
+ red: (t) => t,
18
+ yellow: (t) => t
19
+ };
20
+ }
21
+
8
22
  // YOUR WORKER URL FROM DEPLOYMENT
9
23
  const WORKER_URL = 'https://rostc.roygichira084.workers.dev';
10
24
 
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "rostc",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
4
4
  "description": "4-minute localhost tunnel",
5
5
  "bin": {
6
6
  "rostc": "./cli.js"
7
7
  },
8
8
  "dependencies": {
9
- "ws": "^8.14.0",
10
- "chalk": "^4.1.2"
9
+ "chalk": "^4.1.2",
10
+ "ws": "^8.14.0"
11
11
  }
12
12
  }