@24i/smartapps-bigscreen-rnv-build-engine 0.8.5 → 0.8.6-alpha.1394

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/src/index.js CHANGED
@@ -51,26 +51,32 @@ exports.default = {
51
51
  [constants_1.Platforms.ENTONE]: {
52
52
  extenstions: generateEngineExtensions(['entone']),
53
53
  defaultPort: 8094,
54
+ isWebHosted: true,
54
55
  },
55
56
  [constants_1.Platforms.HBBTV]: {
56
57
  extenstions: generateEngineExtensions(['hbbtv.tv']),
57
58
  defaultPort: 8095,
59
+ isWebHosted: true,
58
60
  },
59
61
  [constants_1.Platforms.SAPHI]: {
60
62
  extenstions: generateEngineExtensions(['saphi.tv']),
61
63
  defaultPort: 8096,
64
+ isWebHosted: true,
62
65
  },
63
66
  [constants_1.Platforms.TIZEN]: {
64
67
  extenstions: generateEngineExtensions(['tizen.tv']),
65
68
  defaultPort: 8087,
69
+ isWebHosted: true,
66
70
  },
67
71
  [constants_1.Platforms.WEBOS]: {
68
72
  extenstions: generateEngineExtensions(['webos.tv']),
69
73
  defaultPort: 8088,
74
+ isWebHosted: true,
70
75
  },
71
76
  [constants_1.Platforms.WEBTV]: {
72
77
  extenstions: generateEngineExtensions(['webtv']),
73
78
  defaultPort: 8080,
79
+ isWebHosted: true,
74
80
  },
75
81
  },
76
82
  };
@@ -1,12 +1,12 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- const strict_1 = require("assert/strict");
3
+ const assert_1 = require("assert");
4
4
  const resolvers_1 = require("../../resolvers");
5
5
  const gitUtils_1 = require("../utils/gitUtils");
6
6
  const c = resolvers_1.getBaseConfig();
7
7
  const { branchNames, commitTitles } = c.buildConfig.common.git;
8
- strict_1.ok(branchNames.dev);
9
- strict_1.ok(branchNames.rc);
10
- strict_1.ok(commitTitles.versionBump);
8
+ assert_1.ok(branchNames.dev);
9
+ assert_1.ok(branchNames.rc);
10
+ assert_1.ok(commitTitles.versionBump);
11
11
  gitUtils_1.assertCurrentBranch(branchNames.dev);
12
12
  gitUtils_1.assertEmptyStatusList();
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.checkReleaseNotes = void 0;
4
- const strict_1 = require("assert/strict");
4
+ const assert_1 = require("assert");
5
5
  const utils_1 = require("../utils");
6
6
  const checkReleaseNotes = (c) => {
7
7
  const { relativePath, requiredRows = [] } = c.buildConfig.common.releaseNotes;
@@ -9,7 +9,7 @@ const checkReleaseNotes = (c) => {
9
9
  const fileContent = utils_1.fsUtils.getFileContentAsString(relativePath);
10
10
  const assertFileContentRow = (expectedRowContent) => {
11
11
  const errorMsg = `${relativePath} should contain following row: "${expectedRowContent}"`;
12
- strict_1.ok(fileContent.includes(expectedRowContent), errorMsg);
12
+ assert_1.ok(fileContent.includes(expectedRowContent), errorMsg);
13
13
  };
14
14
  requiredRows.forEach(assertFileContentRow);
15
15
  };
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- const strict_1 = require("assert/strict");
3
+ const assert_1 = require("assert");
4
4
  const resolvers_1 = require("../../resolvers");
5
5
  const utils_1 = require("../utils");
6
6
  const checkReleaseNotes_1 = require("./checkReleaseNotes");
@@ -9,17 +9,17 @@ const { branchNames, pullRequestTitles } = c.buildConfig.common.git || {};
9
9
  const rcBranchName = branchNames.rc;
10
10
  const distBranchName = branchNames.dist;
11
11
  const devBranchName = branchNames.dev;
12
- strict_1.ok(rcBranchName);
13
- strict_1.ok(distBranchName);
14
- strict_1.ok(devBranchName);
12
+ assert_1.ok(rcBranchName);
13
+ assert_1.ok(distBranchName);
14
+ assert_1.ok(devBranchName);
15
15
  utils_1.gitUtils.assertCurrentBranch(rcBranchName);
16
16
  utils_1.gitUtils.assertEmptyStatusList();
17
17
  utils_1.gitUtils.assertRemoteBranch(rcBranchName);
18
18
  utils_1.gitUtils.assertRemoteBranch(distBranchName);
19
19
  const distributionPrTitle = pullRequestTitles.rcToDist;
20
20
  const developmentPrTitle = pullRequestTitles.rcToDev;
21
- strict_1.ok(distributionPrTitle);
22
- strict_1.ok(developmentPrTitle);
21
+ assert_1.ok(distributionPrTitle);
22
+ assert_1.ok(developmentPrTitle);
23
23
  utils_1.gitUtils.pull();
24
24
  checkReleaseNotes_1.checkReleaseNotes(c);
25
25
  console.log(`Creating Pull Request from ${rcBranchName} branch to ${distBranchName} branch...`);
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- const strict_1 = require("assert/strict");
3
+ const assert_1 = require("assert");
4
4
  const resolvers_1 = require("../../resolvers");
5
5
  const utils_1 = require("../utils");
6
6
  const checkReleaseNotes_1 = require("./checkReleaseNotes");
@@ -11,10 +11,10 @@ const rcBranchName = branchNames.rc;
11
11
  const releaseNotesBranchName = branchNames.rcReleaseNotes;
12
12
  const commitTitle = commitTitles.rcReleaseNotes;
13
13
  const prTitle = pullRequestTitles.releaseNotesToRc;
14
- strict_1.ok(relativePath);
15
- strict_1.ok(releaseNotesBranchName);
16
- strict_1.ok(commitTitle);
17
- strict_1.ok(prTitle);
14
+ assert_1.ok(relativePath);
15
+ assert_1.ok(releaseNotesBranchName);
16
+ assert_1.ok(commitTitle);
17
+ assert_1.ok(prTitle);
18
18
  utils_1.gitUtils.assertCurrentBranch(rcBranchName);
19
19
  utils_1.gitUtils.assertRemoteBranch(rcBranchName);
20
20
  checkReleaseNotes_1.checkReleaseNotes(c);
@@ -25,7 +25,7 @@ if (changedFilesCount === 0) {
25
25
  console.log('Skipping making a commit, if needed, please continue on your own (manually).');
26
26
  }
27
27
  else {
28
- strict_1.ok(changedFilesCount === 1, `Only ${relativePath} should contain changes!`);
28
+ assert_1.ok(changedFilesCount === 1, `Only ${relativePath} should contain changes!`);
29
29
  utils_1.gitUtils.createBranch(releaseNotesBranchName);
30
30
  utils_1.gitUtils.checkout(releaseNotesBranchName);
31
31
  utils_1.gitUtils.add([relativePath]);
@@ -22,7 +22,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
22
22
  exports.githubRelease = void 0;
23
23
  const child_process_1 = require("child_process");
24
24
  const fs = __importStar(require("fs"));
25
- const strict_1 = require("assert/strict");
25
+ const assert_1 = require("assert");
26
26
  const path_1 = require("path");
27
27
  const resolvers_1 = require("../../resolvers");
28
28
  const urlsMarkdown_1 = require("./urlsMarkdown");
@@ -58,7 +58,7 @@ const deleteFileIfExists = (filePath) => {
58
58
  };
59
59
  const makeGitHubReleaseNotes = (c) => {
60
60
  const releaseNotesPath = getReleaseNotesPath(c);
61
- strict_1.ok(releaseNotesPath, 'The path to the file with release notes is missing!');
61
+ assert_1.ok(releaseNotesPath, 'The path to the file with release notes is missing!');
62
62
  deleteFileIfExists(githubReleaseNotesPath);
63
63
  child_process_1.execSync(`sed '1d;2d' ${releaseNotesPath} >> ${githubReleaseNotesPath}`);
64
64
  const textToAppend = urlsMarkdown_1.getUrlsMarkdown(c);
@@ -67,11 +67,11 @@ const makeGitHubReleaseNotes = (c) => {
67
67
  const createRelease = (c) => {
68
68
  const { packageVersion, git } = c.buildConfig.common;
69
69
  const versionLabel = `v${packageVersion}`;
70
- strict_1.ok(token, 'process.env.GITHUB_TOKEN is not set!');
71
- strict_1.ok(targetCommit, 'process.env.TRAVIS_COMMIT is not set!');
72
- strict_1.ok(git.owner, 'Missing value for rnv config prop: common.git.owner');
73
- strict_1.ok(git.repo, 'Missing value for rnv config prop: common.git.repo');
74
- strict_1.ok(packageVersion);
70
+ assert_1.ok(token, 'process.env.GITHUB_TOKEN is not set!');
71
+ assert_1.ok(targetCommit, 'process.env.TRAVIS_COMMIT is not set!');
72
+ assert_1.ok(git.owner, 'Missing value for rnv config prop: common.git.owner');
73
+ assert_1.ok(git.repo, 'Missing value for rnv config prop: common.git.repo');
74
+ assert_1.ok(packageVersion);
75
75
  makeGitHubReleaseNotes(c);
76
76
  const releaseNotesContent = fs.readFileSync(githubReleaseNotesPath).toString();
77
77
  const data = {
@@ -119,7 +119,7 @@ const uploadZipWithPlatformBuilds = (c, platformName, githubUploadUrl) => {
119
119
  const githubRelease = (c) => {
120
120
  const releaseResponse = createRelease(c) || {};
121
121
  const uploadUrl = releaseResponse.upload_url;
122
- strict_1.ok(uploadUrl, 'Missing "upload_url" in release response!');
122
+ assert_1.ok(uploadUrl, 'Missing "upload_url" in release response!');
123
123
  c.buildConfig.defaults.supportedPlatforms.forEach((platformName) => {
124
124
  uploadZipWithPlatformBuilds(c, platformName, uploadUrl);
125
125
  });
@@ -21,11 +21,11 @@ var __importStar = (this && this.__importStar) || function (mod) {
21
21
  Object.defineProperty(exports, "__esModule", { value: true });
22
22
  exports.assertPath = exports.getFileContentAsString = void 0;
23
23
  const fs = __importStar(require("fs"));
24
- const strict_1 = require("assert/strict");
24
+ const assert_1 = require("assert");
25
25
  const getFileContentAsString = (filePath) => fs.readFileSync(filePath).toString();
26
26
  exports.getFileContentAsString = getFileContentAsString;
27
27
  const assertPath = (path) => {
28
28
  const errorMsg = `File or path ${path} does not exist!`;
29
- strict_1.ok(fs.existsSync(path), errorMsg);
29
+ assert_1.ok(fs.existsSync(path), errorMsg);
30
30
  };
31
31
  exports.assertPath = assertPath;
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.assertRemoteBranch = exports.assertCurrentBranch = exports.assertEmptyStatusList = exports.push = exports.commit = exports.createBranch = exports.checkout = exports.add = exports.addAll = exports.pull = exports.remoteBranchExists = exports.pullRequest = exports.getCurrentBranchName = exports.statusList = void 0;
4
- const strict_1 = require("assert/strict");
4
+ const assert_1 = require("assert");
5
5
  const cmdUtils_1 = require("./cmdUtils");
6
6
  const stringUtils_1 = require("./stringUtils");
7
7
  const statusList = () => {
@@ -25,7 +25,7 @@ const pullRequest = (fromBranch, toBranch, prTitle) => {
25
25
  const errorMsg = `${cmdTool} is not installed! See ${installDocUrl}\n`;
26
26
  try {
27
27
  const toolPath = cmdUtils_1.cmdSyncTrimOut(`${cmdTool} --version`);
28
- strict_1.ok(toolPath, errorMsg);
28
+ assert_1.ok(toolPath, errorMsg);
29
29
  }
30
30
  catch (error) {
31
31
  throw new Error(errorMsg);
@@ -62,17 +62,17 @@ const push = (branchName, noVerify) => {
62
62
  };
63
63
  exports.push = push;
64
64
  const assertEmptyStatusList = () => {
65
- strict_1.ok(statusList().length === 0, 'An empty GIT stage is expected!');
65
+ assert_1.ok(statusList().length === 0, 'An empty GIT stage is expected!');
66
66
  };
67
67
  exports.assertEmptyStatusList = assertEmptyStatusList;
68
68
  const assertCurrentBranch = (expectedBranchName) => {
69
69
  const currentGitBranchName = getCurrentBranchName();
70
70
  const errorMsg = `The ${expectedBranchName} branch is expected to be active, not "${currentGitBranchName}"`;
71
- strict_1.ok(currentGitBranchName === expectedBranchName, errorMsg);
71
+ assert_1.ok(currentGitBranchName === expectedBranchName, errorMsg);
72
72
  };
73
73
  exports.assertCurrentBranch = assertCurrentBranch;
74
74
  const assertRemoteBranch = (expectedBranchName) => {
75
75
  const errorMsg = `Remote branch ${expectedBranchName} does not exist!`;
76
- strict_1.ok(remoteBranchExists(expectedBranchName), errorMsg);
76
+ assert_1.ok(remoteBranchExists(expectedBranchName), errorMsg);
77
77
  };
78
78
  exports.assertRemoteBranch = assertRemoteBranch;
@@ -22,13 +22,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
22
22
  exports.handleWebosSdk = exports.configureWebOSProject = exports.buildWebOSProject = exports.runWebOS = void 0;
23
23
  const fs = __importStar(require("fs"));
24
24
  const path = __importStar(require("path"));
25
- const semver = __importStar(require("semver"));
26
25
  const os_1 = require("os");
27
26
  const rnv_1 = require("rnv");
28
27
  const sdkUtils_1 = require("../sdkUtils");
29
28
  const { writeCleanFile } = rnv_1.FileUtils;
30
29
  const { execCLI } = rnv_1.Exec;
31
- const { getPlatformProjectDir, getTemplateProjectDir, getPlatformBuildDir, getAppVersion, getAppTitle, getAppId, getAppDescription, getConfigProp, checkPortInUse, confirmActiveBundler, addSystemInjects, } = rnv_1.Common;
30
+ const { getPlatformProjectDir, getTemplateProjectDir, getPlatformBuildDir, getConfigProp, checkPortInUse, confirmActiveBundler, } = rnv_1.Common;
32
31
  const { buildCoreWebpackProject, runWebpackServer, configureCoreWebProject, waitForWebpack, } = rnv_1.WebpackUtils;
33
32
  const { isPlatformActive } = rnv_1.PlatformManager;
34
33
  const { chalk, logTask, logInfo, logSuccess, logError } = rnv_1.Logger;
@@ -94,40 +93,14 @@ const buildWebOSProject = async (c) => {
94
93
  exports.buildWebOSProject = buildWebOSProject;
95
94
  const configureProject = async (c) => {
96
95
  logTask('configureProject');
97
- const { platform } = c;
98
96
  const configFile = 'appinfo.json';
99
- const injects = [
100
- {
101
- pattern: '{{APPLICATION_ID}}',
102
- override: getAppId(c, platform).toLowerCase(),
103
- },
104
- {
105
- pattern: '{{APP_TITLE}}',
106
- override: getAppTitle(c, platform),
107
- },
108
- {
109
- pattern: '{{APP_VERSION}}',
110
- override: semver.coerce(getAppVersion(c, platform)),
111
- },
112
- {
113
- pattern: '{{APP_DESCRIPTION}}',
114
- override: getAppDescription(c, platform),
115
- },
116
- {
117
- pattern: '{{APP_BG_COLOR}}',
118
- override: getConfigProp(c, platform, 'bgColor', '#fff'),
119
- },
120
- {
121
- pattern: '{{APP_ICON_COLOR}}',
122
- override: getConfigProp(c, platform, 'iconColor', '#000'),
123
- },
124
- {
125
- pattern: '{{APP_VENDOR}}',
126
- override: getConfigProp(c, platform, 'vendor', '24i'),
127
- },
128
- ];
129
- addSystemInjects(c, injects);
130
- writeCleanFile(path.join(getTemplateProjectDir(c), configFile), path.join(getPlatformProjectDir(c), configFile), injects, null, c);
97
+ const configFileSource = path.join(getTemplateProjectDir(c), configFile);
98
+ const configFileDest = path.join(getPlatformProjectDir(c), configFile);
99
+ writeCleanFile(configFileSource, configFileDest, [], null, c);
100
+ let fileContent = fs.readFileSync(configFileDest).toString();
101
+ fileContent = fileContent.replace(/"true"/g, 'true');
102
+ fileContent = fileContent.replace(/"false"/g, 'false');
103
+ fs.writeFileSync(configFileDest, fileContent);
131
104
  return true;
132
105
  };
133
106
  const configureWebOSProject = async (c) => {
@@ -139,7 +112,7 @@ const configureWebOSProject = async (c) => {
139
112
  await copyAssetsFolder(c, platform);
140
113
  await configureCoreWebProject(c);
141
114
  await configureProject(c);
142
- copyBuildsFolder(c, platform);
115
+ await copyBuildsFolder(c, platform);
143
116
  };
144
117
  exports.configureWebOSProject = configureWebOSProject;
145
118
  const sdkInstallerUUrl = 'https://s3.amazonaws.com/tools.nxg-bigscreen.24imedia.com/sdks/webos/ares_webos_builder_v1.10.4_multiplatform.zip';
@@ -1,12 +1,19 @@
1
1
  {
2
- "vendor": "24i",
3
- "largeIcon": "app_icon_130x130.png",
4
2
  "icon": "app_icon_80x80.png",
5
- "main": "public/index.html",
6
3
  "id": "{{configProps.id}}",
4
+ "largeIcon": "app_icon_130x130.png",
5
+ "main": "public/index.html",
6
+ "splashBackground": "splash_background_1920x1080.png",
7
7
  "title": "{{configProps.title}}",
8
8
  "type": "web",
9
- "resolution": "{{configProps.webpackConfig.resolution.width}}x{{configProps.webpackConfig.resolution.height}}",
9
+ "vendor": "{{configProps.author.name}}",
10
+ "version": "{{configProps.packageVersion}}",
11
+ "appDescription": "{{configProps.description}}",
12
+ "bgColor": "{{configProps.backgroundColor}}",
13
+ "bgImage": "{{configProps.appinfo.bgImage}}",
10
14
  "disableBackHistoryAPI": true,
11
- "version": "{{APP_VERSION}}"
15
+ "handlesRelaunch": "{{configProps.appinfo.handlesRelaunch}}",
16
+ "iconColor": "{{configProps.appinfo.iconColor}}",
17
+ "resolution": "{{configProps.webpackConfig.resolution.width}}x{{configProps.webpackConfig.resolution.height}}",
18
+ "transparent": "{{configProps.appinfo.transparent}}"
12
19
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@24i/smartapps-bigscreen-rnv-build-engine",
3
- "version": "0.8.5",
3
+ "version": "0.8.6-alpha.1394+0fca2ad5",
4
4
  "description": "Package with build engine for SmartApps BIGscreen projects...",
5
5
  "main": "dist/src/index.js",
6
6
  "scripts": {
@@ -61,5 +61,5 @@
61
61
  "keywords": [],
62
62
  "author": "24i",
63
63
  "license": "ISC",
64
- "gitHead": "d7a6600d9d06a70defedf4be6e2a5648a620c9ca"
64
+ "gitHead": "0fca2ad5a9cc12107cb5c33ccbe1fdb1340d1704"
65
65
  }