@youcan/cli-kit 2.3.3 → 2.4.0

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.
@@ -4,7 +4,7 @@ export declare class Cloudflared {
4
4
  private readonly output;
5
5
  constructor();
6
6
  tunnel(port: number, host?: string): Promise<void>;
7
- install(): Promise<void>;
7
+ private install;
8
8
  private composeTunnelingCommand;
9
9
  private exec;
10
10
  getUrl(): string | null;
@@ -164,6 +164,7 @@ class Cloudflared {
164
164
  this.system = { platform, arch };
165
165
  }
166
166
  async tunnel(port, host = 'localhost') {
167
+ await this.install();
167
168
  const { bin, args } = this.composeTunnelingCommand(port, host);
168
169
  this.exec(bin, args);
169
170
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@youcan/cli-kit",
3
3
  "type": "module",
4
- "version": "2.3.3",
4
+ "version": "2.4.0",
5
5
  "description": "Utilities for the YouCan CLI",
6
6
  "author": "YouCan <contact@youcan.shop> (https://youcan.shop)",
7
7
  "license": "MIT",
@@ -61,7 +61,6 @@
61
61
  "build": "shx rm -rf dist && tsc --noEmit && rollup --config rollup.config.js",
62
62
  "dev": "shx rm -rf dist && rollup --config rollup.config.js --watch",
63
63
  "release": "pnpm publish --access public",
64
- "type-check": "tsc --noEmit",
65
- "postinstall": "node -e \"import('fs').then(fs => { if (fs.existsSync('./dist/scripts/install-cloudflared.js')) import('./dist/scripts/install-cloudflared.js'); });\""
64
+ "type-check": "tsc --noEmit"
66
65
  }
67
66
  }
@@ -1 +0,0 @@
1
- export {};
@@ -1,25 +0,0 @@
1
- import 'change-case';
2
- import '../node/cli.js';
3
- import 'conf';
4
- import 'env-paths';
5
- import '../node/filesystem.js';
6
- import 'formdata-node';
7
- import 'formdata-node/file-from-path';
8
- import 'simple-git';
9
- import 'execa';
10
- import 'find-process';
11
- import 'get-port';
12
- import 'tcp-port-used';
13
- import 'node-fetch';
14
- import 'ramda';
15
- import 'kleur';
16
- import 'dayjs';
17
- import { Cloudflared } from '../services/cloudflared.js';
18
- import '../ui/components/DevOutput.js';
19
- import 'react';
20
- import 'ink';
21
-
22
- const cloudflared = new Cloudflared();
23
- console.log('Installing Cloudflared...');
24
- await cloudflared.install();
25
- console.log('Successfully Installed Cloudflared');