scripting-cli 1.1.10 → 1.1.11

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/index.js CHANGED
@@ -8,6 +8,9 @@ const yargs_1 = __importDefault(require("yargs/yargs"));
8
8
  const helpers_1 = require("yargs/helpers");
9
9
  const start_server_1 = require("./start_server");
10
10
  (0, yargs_1.default)((0, helpers_1.hideBin)(process.argv))
11
+ .parserConfiguration({
12
+ "boolean-negation": false
13
+ })
11
14
  .command('start', 'Start the scripting-cli server', (yargs) => {
12
15
  return yargs
13
16
  .options({
@@ -25,7 +28,6 @@ const start_server_1 = require("./start_server");
25
28
  .options({
26
29
  "no-auto-open": {
27
30
  type: "boolean",
28
- default: true,
29
31
  describe: "Do not open the index.tsx/widget.tsx file automatically",
30
32
  },
31
33
  })
@@ -40,10 +42,12 @@ const start_server_1 = require("./start_server");
40
42
  noAutoOpen: argv['no-auto-open'],
41
43
  });
42
44
  })
45
+ .showHelpOnFail(true)
43
46
  .option('help', {
44
47
  alias: 'h',
45
48
  describe: 'Show help',
46
49
  })
50
+ .demandCommand()
47
51
  .parse();
48
52
  // if (require.main === module) {
49
53
  // startServer();
@@ -19,7 +19,7 @@ const server = http_1.default.createServer(app);
19
19
  const io = new socket_io_1.Server(server);
20
20
  const bonjour = (0, bonjour_1.default)();
21
21
  function startServer({ port, noAutoOpen }) {
22
- console.log("port", port, "noAutoOpen", noAutoOpen);
22
+ // console.log("port", port, "noAutoOpen", noAutoOpen);
23
23
  const PORT = port ?? 3000;
24
24
  (0, http_router_1.initHttpRouter)(app);
25
25
  io.on('connection', (socket) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "scripting-cli",
3
- "version": "1.1.10",
3
+ "version": "1.1.11",
4
4
  "description": "This plugin integrates the desktop editor synchronization feature of the Scripting app.",
5
5
  "main": "dist/index.js",
6
6
  "bin": {
package/src/index.ts CHANGED
@@ -5,6 +5,9 @@ import { hideBin } from 'yargs/helpers';
5
5
  import { startServer } from './start_server';
6
6
 
7
7
  yargs(hideBin(process.argv))
8
+ .parserConfiguration({
9
+ "boolean-negation": false
10
+ })
8
11
  .command('start', 'Start the scripting-cli server', (yargs) => {
9
12
  return yargs
10
13
  .options({
@@ -22,7 +25,6 @@ yargs(hideBin(process.argv))
22
25
  .options({
23
26
  "no-auto-open": {
24
27
  type: "boolean",
25
- default: true,
26
28
  describe: "Do not open the index.tsx/widget.tsx file automatically",
27
29
  },
28
30
  })
@@ -34,13 +36,15 @@ yargs(hideBin(process.argv))
34
36
  }, (argv) => {
35
37
  startServer({
36
38
  port: argv.port,
37
- noAutoOpen: argv['no-auto-open'],
39
+ noAutoOpen: argv['no-auto-open'] as any,
38
40
  });
39
41
  })
42
+ .showHelpOnFail(true)
40
43
  .option('help', {
41
44
  alias: 'h',
42
45
  describe: 'Show help',
43
46
  })
47
+ .demandCommand()
44
48
  .parse();
45
49
 
46
50
 
@@ -20,7 +20,7 @@ export function startServer({ port, noAutoOpen }: {
20
20
  noAutoOpen: boolean | undefined
21
21
  }) {
22
22
 
23
- console.log("port", port, "noAutoOpen", noAutoOpen);
23
+ // console.log("port", port, "noAutoOpen", noAutoOpen);
24
24
 
25
25
  const PORT = port ?? 3000;
26
26