We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent beb835c commit 3954cf3Copy full SHA for 3954cf3
package.json
@@ -12,7 +12,7 @@
12
},
13
"main": "./lib/lib.js",
14
"types": "./lib/lib.d.ts",
15
- "bin": "./lib/index.js",
+ "bin": "./lib/cloudflared.js",
16
"scripts": {
17
"test": "jest --coverage",
18
"dev": "tsup --watch",
src/cloudflared.ts
@@ -0,0 +1,4 @@
1
+#!/usr/bin/env node
2
+import { main } from "./index.js";
3
+
4
+main();
src/index.ts
@@ -2,9 +2,7 @@ import fs from "node:fs";
import { spawn } from "node:child_process";
import { bin, install } from "./lib.js";
5
-main();
6
-
7
-async function main() {
+export async function main(): Promise<void> {
8
const args = process.argv.slice(2);
9
10
if (args[0] === "bin") {
0 commit comments