@hapico/cli 0.0.20 → 0.0.21

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/bin/index.js CHANGED
@@ -371,7 +371,7 @@ class RoomState {
371
371
  return this.isConnected;
372
372
  }
373
373
  }
374
- commander_1.program.version("0.0.20").description("Hapico CLI for project management");
374
+ commander_1.program.version("0.0.21").description("Hapico CLI for project management");
375
375
  commander_1.program
376
376
  .command("clone <id>")
377
377
  .description("Clone a project by ID")
@@ -434,7 +434,8 @@ commander_1.program
434
434
  commander_1.program
435
435
  .command("dev")
436
436
  .description("Start the project in development mode")
437
- .action(() => {
437
+ .option('--zversion <version>', 'Zalo version for QR code', '75')
438
+ .action((options) => {
438
439
  var _a;
439
440
  const { accessToken } = getStoredToken();
440
441
  if (!accessToken) {
@@ -557,8 +558,9 @@ commander_1.program
557
558
  return;
558
559
  }
559
560
  const projectType = project.data.type || "view";
561
+ const zversion = options.zversion || '75';
560
562
  if (projectType === "zalominiapp") {
561
- qrcode_terminal_1.default.generate(`https://zalo.me/s/3218692650896662017/player/${projectId}?env=TESTING&version=75`, { small: true }, (qrcode) => {
563
+ qrcode_terminal_1.default.generate(`https://zalo.me/s/3218692650896662017/player/${projectId}?env=TESTING&version=${zversion}`, { small: true }, (qrcode) => {
562
564
  console.log(chalk_1.default.cyan("📱 Scan this QR code to connect to the project:"));
563
565
  console.log(qrcode);
564
566
  });
package/dist/index.js CHANGED
@@ -371,7 +371,7 @@ class RoomState {
371
371
  return this.isConnected;
372
372
  }
373
373
  }
374
- commander_1.program.version("0.0.20").description("Hapico CLI for project management");
374
+ commander_1.program.version("0.0.21").description("Hapico CLI for project management");
375
375
  commander_1.program
376
376
  .command("clone <id>")
377
377
  .description("Clone a project by ID")
@@ -434,7 +434,8 @@ commander_1.program
434
434
  commander_1.program
435
435
  .command("dev")
436
436
  .description("Start the project in development mode")
437
- .action(() => {
437
+ .option('--zversion <version>', 'Zalo version for QR code', '75')
438
+ .action((options) => {
438
439
  var _a;
439
440
  const { accessToken } = getStoredToken();
440
441
  if (!accessToken) {
@@ -557,8 +558,9 @@ commander_1.program
557
558
  return;
558
559
  }
559
560
  const projectType = project.data.type || "view";
561
+ const zversion = options.zversion || '75';
560
562
  if (projectType === "zalominiapp") {
561
- qrcode_terminal_1.default.generate(`https://zalo.me/s/3218692650896662017/player/${projectId}?env=TESTING&version=75`, { small: true }, (qrcode) => {
563
+ qrcode_terminal_1.default.generate(`https://zalo.me/s/3218692650896662017/player/${projectId}?env=TESTING&version=${zversion}`, { small: true }, (qrcode) => {
562
564
  console.log(chalk_1.default.cyan("📱 Scan this QR code to connect to the project:"));
563
565
  console.log(qrcode);
564
566
  });
package/index.ts CHANGED
@@ -447,7 +447,7 @@ class RoomState {
447
447
  }
448
448
  }
449
449
 
450
- program.version("0.0.20").description("Hapico CLI for project management");
450
+ program.version("0.0.21").description("Hapico CLI for project management");
451
451
 
452
452
  program
453
453
  .command("clone <id>")
@@ -541,7 +541,8 @@ program
541
541
  program
542
542
  .command("dev")
543
543
  .description("Start the project in development mode")
544
- .action(() => {
544
+ .option('--zversion <version>', 'Zalo version for QR code', '75')
545
+ .action((options) => {
545
546
  const { accessToken } = getStoredToken();
546
547
  if (!accessToken) {
547
548
  console.error(
@@ -704,10 +705,11 @@ program
704
705
  }
705
706
 
706
707
  const projectType = project.data.type || "view";
708
+ const zversion = options.zversion || '75';
707
709
 
708
710
  if (projectType === "zalominiapp") {
709
711
  QRCode.generate(
710
- `https://zalo.me/s/3218692650896662017/player/${projectId}?env=TESTING&version=75`,
712
+ `https://zalo.me/s/3218692650896662017/player/${projectId}?env=TESTING&version=${zversion}`,
711
713
  { small: true },
712
714
  (qrcode) => {
713
715
  console.log(
@@ -1488,4 +1490,4 @@ ${file.content}
1488
1490
  console.log(chalk.green(`✓ File list saved to ${outputFile}`));
1489
1491
  });
1490
1492
 
1491
- program.parse(process.argv);
1493
+ program.parse(process.argv);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hapico/cli",
3
- "version": "0.0.20",
3
+ "version": "0.0.21",
4
4
  "description": "A simple CLI tool for project management",
5
5
  "main": "index.js",
6
6
  "bin": {