@wiztivi/dana-cli 0.0.10 → 0.0.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.
@@ -9,19 +9,8 @@ interface AndroidDevice {
9
9
  interface AndroidConfig {
10
10
  device: AndroidDevice;
11
11
  }
12
- interface TizenDevice {
13
- type?: string;
14
- profileName?: string;
15
- icon: string;
16
- application: {
17
- requiredVersion: string;
18
- package: string;
19
- id: string;
20
- };
21
- }
22
12
  interface TizenConf {
23
13
  renderers: string[];
24
- device: TizenDevice;
25
14
  }
26
15
  interface WebosConf {
27
16
  device: WebosDevice;
@@ -35,4 +24,4 @@ interface WebosDevice {
35
24
  largeIcon: string;
36
25
  disableBackHistoryAPI: boolean;
37
26
  }
38
- export { AndroidDevice, AndroidConfig, TizenConf, TizenDevice, WebosConf, WebosDevice };
27
+ export { AndroidDevice, AndroidConfig, TizenConf, WebosConf, WebosDevice };
@@ -13,11 +13,6 @@ import fs from "node:fs";
13
13
  import path from "node:path";
14
14
  import DeviceConfig from "./deviceConfig.js";
15
15
  import { LIGHTNING } from "../../../common/const/deviceConst.js";
16
- import * as prompts from "@clack/prompts";
17
- import colors from "picocolors";
18
- import addDeviceHelper from "../helper/addDeviceHelper.js";
19
- import { validAppVersion, validInputLength } from "../../../common/helpers/InputValidator.js";
20
- import { clean } from "semver-ts";
21
16
  const TizenConfig = class extends DeviceConfig {
22
17
  static appConfig = {
23
18
  css: {
@@ -25,7 +20,7 @@ const TizenConfig = class extends DeviceConfig {
25
20
  mixins: ["default", "tizen"],
26
21
  base: {
27
22
  name: "Tizen",
28
- vendors: ["@dana/engine-html5", "@dana/renderer-css", "@dana/vendor-tizen"],
23
+ vendors: ["@dana/renderer-css"],
29
24
  },
30
25
  },
31
26
  },
@@ -34,47 +29,20 @@ const TizenConfig = class extends DeviceConfig {
34
29
  mixins: ["default", "tizen"],
35
30
  base: {
36
31
  name: "Tizen",
37
- vendors: ["@dana/engine-html5", "@dana/renderer-lightning-html5", "@dana/vendor-tizen"],
32
+ vendors: ["@dana/renderer-lightning-html5"],
38
33
  },
39
34
  },
40
35
  },
41
36
  };
42
37
  static getConfig = async () => {
43
- prompts.log.info(colors.bold("Let's configure Tizen !"));
44
- const applicationConfig = await prompts.group({
45
- requiredVersion: async () => {
46
- const requiredVersion = await addDeviceHelper.promptTextFactory({
47
- promptMessage: "What is the application requiredVersion ?",
48
- validationFunction: (value) => validAppVersion(value),
49
- placeholder: "1.0.0",
50
- initialValue: "1.0.0",
51
- });
52
- return clean(requiredVersion);
53
- },
54
- package: async () => addDeviceHelper.promptTextFactory({
55
- errorMessage: "Package name is required !",
56
- promptMessage: "What is the package name ? Should be unique.",
57
- validationFunction: (value) => validInputLength(value, "Package name is required !"),
58
- }),
59
- id: async () => addDeviceHelper.promptTextFactory({
60
- errorMessage: "Package id is required !",
61
- promptMessage: "What is the package id ?",
62
- validationFunction: (value) => validInputLength(value, "Package id is required !"),
63
- }),
64
- });
65
- return {
38
+ return Promise.resolve({
66
39
  renderers: [LIGHTNING],
67
- device: {
68
- icon: await addDeviceHelper.getAppIcon(),
69
- application: { ...applicationConfig },
70
- },
71
- };
40
+ });
72
41
  };
73
42
  static setConfig = ({ directory, config }) => {
74
43
  const filePath = path.join(directory, "profiles", "app.config.tizen.json");
75
44
  let jsonData = JSON.parse(fs.readFileSync(filePath).toString());
76
45
  jsonData = this.updateProfileJsonWithRenderers(jsonData, config.renderers);
77
- jsonData.tizen.device = { ...jsonData.tizen.device, ...config.device };
78
46
  fs.writeFileSync(filePath, JSON.stringify(jsonData, null, 4));
79
47
  return Promise.resolve("Tizen configuration done");
80
48
  };
@@ -1,3 +1,3 @@
1
1
  declare const REGISTRY_KEY = "@dana:registry";
2
- declare const DEFAULT_IMAGE_URL = "images/1080p/components/logo/dana.png";
2
+ declare const DEFAULT_IMAGE_URL = "images/dana.png";
3
3
  export { REGISTRY_KEY, DEFAULT_IMAGE_URL };
@@ -10,5 +10,5 @@
10
10
  *
11
11
  */
12
12
  const REGISTRY_KEY = "@dana:registry";
13
- const DEFAULT_IMAGE_URL = "images/1080p/components/logo/dana.png";
13
+ const DEFAULT_IMAGE_URL = "images/dana.png";
14
14
  export { REGISTRY_KEY, DEFAULT_IMAGE_URL };
@@ -90,6 +90,9 @@ const CreateAppHelper = class {
90
90
  prompts.log.message(`${commandLine} start`);
91
91
  for (const device of data.selectedDevices) {
92
92
  prompts.log.info(colors.bold(`For ${device}: `));
93
+ if (device === deviceConst.TIZEN) {
94
+ prompts.log.warn(`You MUST update app.config.tizen.json with your own parameters`);
95
+ }
93
96
  const deviceConfig = data.config[device];
94
97
  if (deviceConfig?.renderers) {
95
98
  for (const renderer of deviceConfig.renderers) {
@@ -23,6 +23,9 @@ const BASIC_DEPENDENCIES = [
23
23
  "@dana/engine-nodejs",
24
24
  "@dana/vendor-components",
25
25
  "@wiztivi/dana-templates",
26
+ "@dana/core",
27
+ "@dana/renderer-lightning",
28
+ "@dana/engine-html5",
26
29
  ];
27
30
  //Devices included by default in subscription
28
31
  const BASIC_SETUP = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wiztivi/dana-cli",
3
- "version": "0.0.10",
3
+ "version": "0.0.11",
4
4
  "description": "Dana create app CLI",
5
5
  "type": "module",
6
6
  "exports": "./dist/index.js",
@@ -28,7 +28,7 @@
28
28
  "dependencies": {
29
29
  "@aws-sdk/client-codeartifact": "^3.859.0",
30
30
  "@clack/prompts": "0.10.0",
31
- "@wiztivi/dana-templates": "^0.0.10",
31
+ "@wiztivi/dana-templates": "^0.0.11",
32
32
  "child_process": "1.0.x",
33
33
  "command-exists": "1.2.9",
34
34
  "commander": "11.1.x",