@wiztivi/dana-cli 0.0.1-beta-9 → 0.0.1-beta-10

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.
@@ -78,8 +78,7 @@ if [ -n "$BASH_VERSION" ]; then
78
78
  opts="$custom_opts $item_view_opts $margin_opts"
79
79
  COMPREPLY=($(compgen -W "$opts" -- "$cur"))
80
80
  ;;
81
-
82
- auth)
81
+ auth)
83
82
  if [[ $COMP_CWORD -eq 2 ]]; then
84
83
  opts="$login_sub $logout_sub $status_sub"
85
84
  else
@@ -87,7 +86,6 @@ if [ -n "$BASH_VERSION" ]; then
87
86
  fi
88
87
  COMPREPLY=($(compgen -W "$opts" -- "$cur"))
89
88
  ;;
90
-
91
89
  *)
92
90
  COMPREPLY=()
93
91
  ;;
@@ -141,12 +139,12 @@ elif [ -n "$ZSH_VERSION" ]; then
141
139
  compadd -- ${=custom_opts} ${=item_view_opts} ${=margin_opts}
142
140
  ;;
143
141
  auth)
144
- if (( CURRENT == 3 )); then
145
- compadd -- ${=login_sub} ${=logout_sub} ${=status_sub}
146
- else
147
- compadd -- ${=org_opts}
148
- fi
149
- ;;
142
+ if (( CURRENT == 3 )); then
143
+ compadd -- ${=login_sub} ${=logout_sub} ${=status_sub}
144
+ else
145
+ compadd -- ${=org_opts}
146
+ fi
147
+ ;;
150
148
  esac
151
149
  }
152
150
 
@@ -63,7 +63,6 @@ const addDevice = async () => {
63
63
  prompts.intro(`Add device(s) to ${path_1.default.basename(node_process_1.default.cwd())} !`);
64
64
  const data = {};
65
65
  try {
66
- CliHelper_1.default.checkGitStatus();
67
66
  data.directory = "./";
68
67
  data.awsConfig = CliHelper_1.default.getAwsConfig();
69
68
  const { availableDevices, unavailableDevices } = await UserInputGetter_1.default.getAvailableDevices();
@@ -75,6 +74,10 @@ const addDevice = async () => {
75
74
  if (filteredAvailableDevices.length) {
76
75
  data.selectedDevices = await ScriptHelper_1.default.promptSelectDevices(filteredAvailableDevices);
77
76
  }
77
+ if (!data.selectedDevices?.length) {
78
+ prompts.outro(translation_1.default["command.device.no_selection"]);
79
+ return Promise.resolve();
80
+ }
78
81
  data.config = await UserInputGetter_1.default.getDevicesConfig(data);
79
82
  }
80
83
  catch (e) {
@@ -14,7 +14,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
14
14
  return (mod && mod.__esModule) ? mod : { "default": mod };
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- const CliHelper_1 = __importDefault(require("../helpers/CliHelper"));
18
17
  const componentConst_1 = require("../const/componentConst");
19
18
  const createComponent_1 = __importDefault(require("./createComponent"));
20
19
  const node_process_1 = __importDefault(require("node:process"));
@@ -24,7 +23,6 @@ const fs_1 = require("fs");
24
23
  const ComponentConfig_1 = __importDefault(require("../configs/ComponentConfig"));
25
24
  const defaultConfig_1 = require("../const/defaultConfig");
26
25
  const addMenu = async (name, options) => {
27
- CliHelper_1.default.checkGitStatus();
28
26
  const data = { ...options };
29
27
  if (name) {
30
28
  data.name = name;
@@ -35,7 +33,7 @@ const addMenu = async (name, options) => {
35
33
  };
36
34
  const componentList = [menuConfig];
37
35
  if (!data.custom) {
38
- componentList.push({ type: componentConst_1.BUTTON_VIEW, name: data.itemView ?? defaultConfig_1.MENU_DEFAULT_CONFIG.itemView });
36
+ componentList.push({ type: componentConst_1.BUTTON_ITEM_VIEW, name: data.itemView ?? defaultConfig_1.MENU_DEFAULT_CONFIG.itemView });
39
37
  }
40
38
  (0, createComponent_1.default)(componentList);
41
39
  if (!data.custom) {
@@ -14,7 +14,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
14
14
  return (mod && mod.__esModule) ? mod : { "default": mod };
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- const CliHelper_1 = __importDefault(require("../helpers/CliHelper"));
18
17
  const componentConst_1 = require("../const/componentConst");
19
18
  const createComponent_1 = __importDefault(require("./createComponent"));
20
19
  const node_process_1 = __importDefault(require("node:process"));
@@ -24,7 +23,6 @@ const fs_1 = require("fs");
24
23
  const ComponentConfig_1 = __importDefault(require("../configs/ComponentConfig"));
25
24
  const defaultConfig_1 = require("../const/defaultConfig");
26
25
  const addRail = async (name, options) => {
27
- CliHelper_1.default.checkGitStatus();
28
26
  const data = { ...options };
29
27
  if (name) {
30
28
  data.name = name;
@@ -1,2 +1,5 @@
1
- declare const addScreen: (name?: string) => void;
1
+ interface CommandOptions {
2
+ screenType?: string;
3
+ }
4
+ declare const addScreen: (name?: string, options?: CommandOptions) => Promise<void>;
2
5
  export default addScreen;
@@ -10,19 +10,62 @@
10
10
  * This software MAY NOT be used, modified or rewritten without prior written permission from Wiztivi.
11
11
  *
12
12
  */
13
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
14
+ if (k2 === undefined) k2 = k;
15
+ var desc = Object.getOwnPropertyDescriptor(m, k);
16
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
17
+ desc = { enumerable: true, get: function() { return m[k]; } };
18
+ }
19
+ Object.defineProperty(o, k2, desc);
20
+ }) : (function(o, m, k, k2) {
21
+ if (k2 === undefined) k2 = k;
22
+ o[k2] = m[k];
23
+ }));
24
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
25
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
26
+ }) : function(o, v) {
27
+ o["default"] = v;
28
+ });
29
+ var __importStar = (this && this.__importStar) || (function () {
30
+ var ownKeys = function(o) {
31
+ ownKeys = Object.getOwnPropertyNames || function (o) {
32
+ var ar = [];
33
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
34
+ return ar;
35
+ };
36
+ return ownKeys(o);
37
+ };
38
+ return function (mod) {
39
+ if (mod && mod.__esModule) return mod;
40
+ var result = {};
41
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
42
+ __setModuleDefault(result, mod);
43
+ return result;
44
+ };
45
+ })();
13
46
  var __importDefault = (this && this.__importDefault) || function (mod) {
14
47
  return (mod && mod.__esModule) ? mod : { "default": mod };
15
48
  };
16
49
  Object.defineProperty(exports, "__esModule", { value: true });
17
- const CliHelper_1 = __importDefault(require("../helpers/CliHelper"));
18
50
  const componentConst_1 = require("../const/componentConst");
19
51
  const createComponent_1 = __importDefault(require("./createComponent"));
20
- const addScreen = (name) => {
21
- CliHelper_1.default.checkGitStatus();
22
- const data = {
23
- name: name ?? "Mock",
24
- type: componentConst_1.SCREEN,
25
- };
26
- (0, createComponent_1.default)([data]);
52
+ const add_menu_1 = __importDefault(require("./add-menu"));
53
+ const add_scrollView_1 = __importDefault(require("./add-scrollView"));
54
+ const prompts = __importStar(require("@clack/prompts"));
55
+ const addScreen = async (name, options) => {
56
+ try {
57
+ const data = {
58
+ name: name ?? "Mock",
59
+ type: options?.screenType ?? componentConst_1.SCREEN,
60
+ };
61
+ if (options?.screenType === componentConst_1.VOD_SCREEN) {
62
+ await (0, add_menu_1.default)(componentConst_1.VOD_SCREEN, {});
63
+ await (0, add_scrollView_1.default)(componentConst_1.VOD_SCREEN, {});
64
+ }
65
+ (0, createComponent_1.default)([data]);
66
+ }
67
+ catch {
68
+ prompts.log.info("Error creating screen");
69
+ }
27
70
  };
28
71
  exports.default = addScreen;
@@ -3,7 +3,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- const CliHelper_1 = __importDefault(require("../helpers/CliHelper"));
7
6
  const componentConst_1 = require("../const/componentConst");
8
7
  const createComponent_1 = __importDefault(require("./createComponent"));
9
8
  const node_process_1 = __importDefault(require("node:process"));
@@ -13,7 +12,6 @@ const fs_1 = require("fs");
13
12
  const defaultConfig_1 = require("../const/defaultConfig");
14
13
  const ComponentConfig_1 = __importDefault(require("../configs/ComponentConfig"));
15
14
  const addScrollView = async (name, options) => {
16
- CliHelper_1.default.checkGitStatus();
17
15
  const data = { ...options };
18
16
  if (name) {
19
17
  data.name = name;
@@ -40,20 +40,22 @@ const prompts = __importStar(require("@clack/prompts"));
40
40
  const jsonwebtoken_1 = __importDefault(require("jsonwebtoken"));
41
41
  const picocolors_1 = __importDefault(require("picocolors"));
42
42
  const CredentialsHelper_1 = require("../../helpers/CredentialsHelper");
43
+ const translation_1 = __importDefault(require("../../translation/translation"));
43
44
  const status = () => {
44
45
  const credentials = CredentialsHelper_1.CredentialsHelper.get();
45
46
  if (!credentials) {
46
- prompts.log.error("You're not logged in. Please run dana auth login command");
47
+ prompts.log.error(`${translation_1.default["login.error.not_logged"]} ${translation_1.default["login.info.please_login"]}`);
47
48
  return;
48
49
  }
49
50
  const id_token = credentials.dana.id_token;
50
51
  const { given_name, family_name, email, exp } = jsonwebtoken_1.default.decode(id_token);
51
52
  const expiration = exp && new Date(exp * 1000);
52
53
  if (expiration && new Date() > expiration) {
53
- prompts.log.error("Your token has expired, Pease run dana auth login command");
54
+ prompts.log.error(`${translation_1.default["login.info.token_expired"]} ${translation_1.default["login.info.please_login"]}`);
54
55
  return;
55
56
  }
56
57
  const expStr = expiration ? `\nToken expires on ${expiration.toUTCString()}` : "";
57
- prompts.log.success(`You're currently logged in to Dana ${picocolors_1.default.bold(credentials.org)} as ${picocolors_1.default.bold(given_name + " " + family_name)} (${email})${expStr}`);
58
+ prompts.log.success(`${translation_1.default["login.info.logged"]} ${picocolors_1.default.bold(credentials.org)}: ${picocolors_1.default.bold(given_name + " " + family_name)} (${email})${expStr}
59
+ `);
58
60
  };
59
61
  exports.default = status;
@@ -6,7 +6,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  const commander_1 = require("commander");
7
7
  const add_device_1 = __importDefault(require("../add-device"));
8
8
  const translation_1 = __importDefault(require("../../translation/translation"));
9
+ const authHook_1 = require("../hooks/authHook");
9
10
  const addDeviceDefinition = () => {
10
- return new commander_1.Command("add-device").description(translation_1.default["command.device.description"]).action(add_device_1.default);
11
+ return new commander_1.Command("add-device")
12
+ .description(translation_1.default["command.device.description"])
13
+ .hook("preAction", authHook_1.authHook)
14
+ .action(add_device_1.default);
11
15
  };
12
16
  exports.default = addDeviceDefinition;
@@ -11,6 +11,7 @@ const addScreenDefinition = () => {
11
11
  command
12
12
  .description(translation_1.default["command.screen.description"])
13
13
  .argument("[name]", translation_1.default["command.component.name"])
14
+ .option("-s, --screenType [screenType]", translation_1.default["command.screen.option.type"])
14
15
  .action(add_screen_1.default);
15
16
  return command;
16
17
  };
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  const commander_1 = require("commander");
7
7
  const createApp_1 = __importDefault(require("../createApp"));
8
8
  const translation_1 = __importDefault(require("../../translation/translation"));
9
+ const authHook_1 = require("../hooks/authHook");
9
10
  const createAppDefinition = () => {
10
11
  const command = new commander_1.Command("create-app");
11
12
  command
@@ -16,6 +17,7 @@ const createAppDefinition = () => {
16
17
  .option("-d, --devices", translation_1.default["command.create_app.devices"])
17
18
  .option("-p, --profile <awsProfile>", translation_1.default["command.create_app.aws_profile"])
18
19
  .option("-r, --repository <awsRepository>", translation_1.default["command.create_app.aws_repository"])
20
+ .hook("preAction", authHook_1.authHook)
19
21
  .action(createApp_1.default);
20
22
  return command;
21
23
  };
@@ -0,0 +1 @@
1
+ export declare const authHook: () => void;
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ /*
3
+ * Copyright (c) 2014-2025 Wiztivi - contact@wiztivi.com
4
+ * All Rights Reserved
5
+ *
6
+ * All information contained herein is proprietary and confidential.
7
+ * Dissemination of this information or reproduction of this file or material, via any medium is strictly forbidden unless
8
+ * prior written permission is obtained from Wiztivi.
9
+ * No warranty, explicit or implicit, provided.
10
+ * This software MAY NOT be used, modified or rewritten without prior written permission from Wiztivi.
11
+ *
12
+ */
13
+ var __importDefault = (this && this.__importDefault) || function (mod) {
14
+ return (mod && mod.__esModule) ? mod : { "default": mod };
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ exports.authHook = void 0;
18
+ const status_1 = __importDefault(require("../auth/status"));
19
+ const authHook = () => (0, status_1.default)();
20
+ exports.authHook = authHook;
@@ -3,5 +3,6 @@ export declare const RAIL = "wtvRailListView";
3
3
  export declare const TILE_VIEW = "tileView";
4
4
  export declare const SCROLL_VIEW = "scrollView";
5
5
  export declare const SCROLL_ITEM = "scrollItemView";
6
- export declare const BUTTON_VIEW = "ButtonView";
6
+ export declare const BUTTON_ITEM_VIEW = "ButtonItemView";
7
7
  export declare const SCREEN = "screen";
8
+ export declare const VOD_SCREEN = "vod";
@@ -11,11 +11,12 @@
11
11
  *
12
12
  */
13
13
  Object.defineProperty(exports, "__esModule", { value: true });
14
- exports.SCREEN = exports.BUTTON_VIEW = exports.SCROLL_ITEM = exports.SCROLL_VIEW = exports.TILE_VIEW = exports.RAIL = exports.MENU = void 0;
14
+ exports.VOD_SCREEN = exports.SCREEN = exports.BUTTON_ITEM_VIEW = exports.SCROLL_ITEM = exports.SCROLL_VIEW = exports.TILE_VIEW = exports.RAIL = exports.MENU = void 0;
15
15
  exports.MENU = "wtvMenuListView";
16
16
  exports.RAIL = "wtvRailListView";
17
17
  exports.TILE_VIEW = "tileView";
18
18
  exports.SCROLL_VIEW = "scrollView";
19
19
  exports.SCROLL_ITEM = "scrollItemView";
20
- exports.BUTTON_VIEW = "ButtonView";
20
+ exports.BUTTON_ITEM_VIEW = "ButtonItemView";
21
21
  exports.SCREEN = "screen";
22
+ exports.VOD_SCREEN = "vod";
@@ -14,7 +14,7 @@ exports.RAIL_DEFAULT_CONFIG = {
14
14
  exports.MENU_DEFAULT_CONFIG = {
15
15
  name: "mockMenu",
16
16
  itemMargin: 20,
17
- itemView: "Button",
17
+ itemView: "ButtonItem",
18
18
  direction: "horizontal",
19
19
  addMock: true,
20
20
  type: componentConst_1.MENU,
@@ -1,5 +1,4 @@
1
1
  export declare const APP_CREATION_ERROR = 1;
2
- export declare const GIT_ERROR = 2;
3
2
  export declare const COMPONENT_ERROR = 3;
4
3
  export declare const CANCEL = 4;
5
4
  export declare const DEVICE_ERROR = 5;
@@ -1,8 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.SETUP_ERROR = exports.COMMAND_ERROR = exports.LOGIN_ERROR = exports.DEVICE_ERROR = exports.CANCEL = exports.COMPONENT_ERROR = exports.GIT_ERROR = exports.APP_CREATION_ERROR = void 0;
3
+ exports.SETUP_ERROR = exports.COMMAND_ERROR = exports.LOGIN_ERROR = exports.DEVICE_ERROR = exports.CANCEL = exports.COMPONENT_ERROR = exports.APP_CREATION_ERROR = void 0;
4
4
  exports.APP_CREATION_ERROR = 1;
5
- exports.GIT_ERROR = 2;
6
5
  exports.COMPONENT_ERROR = 3;
7
6
  exports.CANCEL = 4;
8
7
  exports.DEVICE_ERROR = 5;
@@ -78,8 +78,7 @@ if [ -n "$BASH_VERSION" ]; then
78
78
  opts="$custom_opts $item_view_opts $margin_opts"
79
79
  COMPREPLY=($(compgen -W "$opts" -- "$cur"))
80
80
  ;;
81
-
82
- auth)
81
+ auth)
83
82
  if [[ $COMP_CWORD -eq 2 ]]; then
84
83
  opts="$login_sub $logout_sub $status_sub"
85
84
  else
@@ -87,7 +86,6 @@ if [ -n "$BASH_VERSION" ]; then
87
86
  fi
88
87
  COMPREPLY=($(compgen -W "$opts" -- "$cur"))
89
88
  ;;
90
-
91
89
  *)
92
90
  COMPREPLY=()
93
91
  ;;
@@ -141,12 +139,12 @@ elif [ -n "$ZSH_VERSION" ]; then
141
139
  compadd -- ${=custom_opts} ${=item_view_opts} ${=margin_opts}
142
140
  ;;
143
141
  auth)
144
- if (( CURRENT == 3 )); then
145
- compadd -- ${=login_sub} ${=logout_sub} ${=status_sub}
146
- else
147
- compadd -- ${=org_opts}
148
- fi
149
- ;;
142
+ if (( CURRENT == 3 )); then
143
+ compadd -- ${=login_sub} ${=logout_sub} ${=status_sub}
144
+ else
145
+ compadd -- ${=org_opts}
146
+ fi
147
+ ;;
150
148
  esac
151
149
  }
152
150
 
@@ -11,9 +11,5 @@ declare const CliHelper: {
11
11
  * We use script so we can get renderers for smartTv
12
12
  */
13
13
  readonly getInstalledDevices: (directory: string) => string[];
14
- /**
15
- * Check git status before proceeding
16
- */
17
- readonly checkGitStatus: () => void;
18
14
  };
19
15
  export default CliHelper;
@@ -1,37 +1,4 @@
1
1
  "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || (function () {
19
- var ownKeys = function(o) {
20
- ownKeys = Object.getOwnPropertyNames || function (o) {
21
- var ar = [];
22
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
- return ar;
24
- };
25
- return ownKeys(o);
26
- };
27
- return function (mod) {
28
- if (mod && mod.__esModule) return mod;
29
- var result = {};
30
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
- __setModuleDefault(result, mod);
32
- return result;
33
- };
34
- })();
35
2
  var __importDefault = (this && this.__importDefault) || function (mod) {
36
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
37
4
  };
@@ -39,10 +6,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
39
6
  const child_process_1 = require("child_process");
40
7
  const fs_1 = require("fs");
41
8
  const path_1 = __importDefault(require("path"));
42
- const prompts = __importStar(require("@clack/prompts"));
43
- const translation_1 = __importDefault(require("../translation/translation"));
44
- const node_process_1 = __importDefault(require("node:process"));
45
- const exitCodeConst_1 = require("../const/exitCodeConst");
46
9
  const CliHelper = class {
47
10
  static getAwsConfig = () => {
48
11
  let awsConfig;
@@ -82,20 +45,5 @@ const CliHelper = class {
82
45
  }
83
46
  return installedDevices;
84
47
  };
85
- /**
86
- * Check git status before proceeding
87
- */
88
- static checkGitStatus = () => {
89
- try {
90
- const result = (0, child_process_1.execSync)("git status --porcelain", { encoding: "utf8" });
91
- if (result.trim()) {
92
- throw new Error("Failed to check GitStatus");
93
- }
94
- }
95
- catch {
96
- prompts.log.error(translation_1.default["helper.git.status.error"]);
97
- node_process_1.default.exit(exitCodeConst_1.GIT_ERROR);
98
- }
99
- };
100
48
  };
101
49
  exports.default = CliHelper;
@@ -84,7 +84,10 @@ const ComponentHelper = class {
84
84
  case componentConst_1.SCROLL_ITEM:
85
85
  return `${uppercaseName}ScrollItemView.js`;
86
86
  case componentConst_1.SCREEN:
87
+ case componentConst_1.VOD_SCREEN:
87
88
  return `${uppercaseName}Screen.js`;
89
+ case componentConst_1.BUTTON_ITEM_VIEW:
90
+ return `${uppercaseName}View.js`;
88
91
  default:
89
92
  return `${uppercaseName}.js`;
90
93
  }
@@ -51,7 +51,6 @@ const prompts = __importStar(require("@clack/prompts"));
51
51
  const picocolors_1 = __importDefault(require("picocolors"));
52
52
  const child_process_1 = require("child_process");
53
53
  const translation_1 = __importDefault(require("../../translation/translation"));
54
- const fs_1 = require("fs");
55
54
  const exitCodeConst_1 = require("../../const/exitCodeConst");
56
55
  class SetupChecker {
57
56
  static checkSetup = async () => {
@@ -91,7 +90,7 @@ class SetupChecker {
91
90
  * @returns {Promise}
92
91
  */
93
92
  static async validateNodeVersion() {
94
- const minimalNodeVersion = parseInt((0, fs_1.readFileSync)(".nvmrc", "utf8").trim(), 10);
93
+ const minimalNodeVersion = parseInt(process.version.substring(1, process.version.length));
95
94
  const currentVersion = parseInt(process.version.slice(1).split(".")[0], 10);
96
95
  return currentVersion >= minimalNodeVersion
97
96
  ? Promise.resolve("Node version ok !")
@@ -10,6 +10,7 @@
10
10
  "command.rail.option.direction": "Navigation direction. Default: horizontal",
11
11
  "command.rail.option.cyclic": "True if cyclic. Default: false",
12
12
  "command.device.description": "Add device(s) to your Dana app",
13
+ "command.device.no_selection": "Nothing selected or no device available. Exit",
13
14
  "help.custom.devices": "Use the CLI to add the following devices:",
14
15
  "help.custom.commands": "Add devices and built-in components to your DANA app:",
15
16
  "help.option.title": "Available command options:",
@@ -42,7 +43,7 @@
42
43
  "node.error": "Node version should be >=",
43
44
  "setup.ok": "Configuration ok",
44
45
  "setup.ko": "Prerequisite not met",
45
- "device.unavailable": "Enhance your experience by adding device(s):",
46
+ "device.unavailable": "Enhance your experience by adding device(s) to your subscription:",
46
47
  "device.selection": "Press space key to select additional device(s).",
47
48
  "renderer.selection": "Select AT LEAST one renderer for",
48
49
  "input.name": "What is your project's name ?",
@@ -52,5 +53,9 @@
52
53
  "error.common.start.message": "An error occurred",
53
54
  "command.completion.description": "Install shell completion (bash or zsh)",
54
55
  "command.completion.argument": "Shell. Bash or zsh",
55
- "command.completion.success": "Completion installed to "
56
+ "command.completion.success": "Completion installed to ",
57
+ "login.info.token_expired": "Your token has expired.",
58
+ "login.info.please_login": "Please run dana auth login command",
59
+ "login.error.not_logged": "You're not logged in.",
60
+ "login.info.logged": "You're currently logged in to Dana"
56
61
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wiztivi/dana-cli",
3
- "version": "0.0.1-beta-9",
3
+ "version": "0.0.1-beta-10",
4
4
  "description": "Dana create app CLI",
5
5
  "main": "dist/index.js",
6
6
  "bin": {