jointhis.proxy 0.2.2 → 0.2.4

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.d.ts CHANGED
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- export declare const version = "0.2.1";
2
+ export declare const version = "0.2.2";
package/dist/cli.js CHANGED
@@ -7,7 +7,7 @@ import UI from './ui.js';
7
7
  import fs from 'node:fs';
8
8
  import { Spawn } from 'ink-spawn';
9
9
  import { exec } from 'node:child_process';
10
- export const version = `0.2.1`;
10
+ export const version = `0.2.2`;
11
11
  // Get backend executable
12
12
  fs.open('./rtun-linux-amd64', 'r', (err, fd) => {
13
13
  if (err) {
@@ -97,8 +97,8 @@ if (cli.flags.udp ||
97
97
  console.log('Unable to write configuration file.');
98
98
  process.exit(1);
99
99
  }
100
+ render(React.createElement(Spawn, { maxOutputLines: 4, runningText: "", command: "./rtun-linux-amd64", args: ['-f ./rtun.yml'], shell: true }));
100
101
  });
101
- render(React.createElement(Spawn, { maxOutputLines: 4, runningText: "", command: "./rtun-linux-amd64", args: ['-f ./rtun.yml'], shell: true }));
102
102
  }
103
103
  else {
104
104
  // Start automated guide-through
package/dist/main.js CHANGED
@@ -11,6 +11,7 @@ export default function Main({ view }) {
11
11
  const [sub, Setsub] = useState('');
12
12
  const [service, Setservice] = useState('');
13
13
  const [fetchSuccess, Setsuccess] = useState(false);
14
+ const [downloaded, Setdownloaded] = useState(false);
14
15
  const services = [
15
16
  {
16
17
  label: 'MC',
@@ -27,7 +28,7 @@ export default function Main({ view }) {
27
28
  ];
28
29
  const handleSelect = (item) => {
29
30
  Setservice(item.value);
30
- getConfig(key, item.value);
31
+ getConfig(key, item.value, Setdownloaded);
31
32
  };
32
33
  switch (view) {
33
34
  case '1': {
@@ -39,6 +40,10 @@ export default function Main({ view }) {
39
40
  React.createElement(Text, null, "Select a service:"),
40
41
  React.createElement(SelectInput, { onSelect: handleSelect, items: services }),
41
42
  React.createElement(Text, null, "For custom, use the CLI flags.")),
43
+ React.createElement(Step, { canProceed: downloaded },
44
+ React.createElement(Text, null, downloaded
45
+ ? 'Press enter to continue.'
46
+ : 'Please wait until everything is set up.')),
42
47
  React.createElement(Step, { name: "last" },
43
48
  React.createElement(Spawn, { maxOutputLines: 4, runningText: "", command: "./rtun-linux-amd64", args: ['-f ./rtun.yml'], shell: true }),
44
49
  React.createElement(Box, { marginTop: 1 },
@@ -52,7 +57,7 @@ export default function Main({ view }) {
52
57
  }
53
58
  }
54
59
  }
55
- async function getConfig(token, service) {
60
+ async function getConfig(token, service, Setdownloaded) {
56
61
  var tcp;
57
62
  var udp;
58
63
  if (service == '1') {
@@ -84,5 +89,8 @@ async function getConfig(token, service) {
84
89
  console.log('Unable to write configuration file.');
85
90
  process.exit(1);
86
91
  }
92
+ else if (!err) {
93
+ Setdownloaded(true);
94
+ }
87
95
  });
88
96
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jointhis.proxy",
3
- "version": "0.2.2",
3
+ "version": "0.2.4",
4
4
  "license": "MIT",
5
5
  "bin": "dist/cli.js",
6
6
  "type": "module",