@24i/smartapps-bigscreen-rnv-build-engine 0.0.2-alpha.1331 → 0.0.2-alpha.1332

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.
Files changed (73) hide show
  1. package/dist/src/constants/buildSchemes.js +3 -3
  2. package/dist/src/constants/index.js +3 -10
  3. package/dist/src/constants/platforms.js +3 -3
  4. package/dist/src/index.js +29 -31
  5. package/dist/src/resolvers/index.js +10 -17
  6. package/dist/src/resolvers/resolveBaseUrl.js +14 -15
  7. package/dist/src/resolvers/resolveBuildVersion.js +16 -17
  8. package/dist/src/resolvers/resolveBuildVersionOffset.js +12 -12
  9. package/dist/src/resolvers/resolveDeployLocations.js +44 -56
  10. package/dist/src/resolvers/resolveGenericRnvConfig.js +18 -30
  11. package/dist/src/resolvers/resolveHbbtvDeployConfig.js +4 -4
  12. package/dist/src/resolvers/resolveHbbtvDeployUrl.js +7 -7
  13. package/dist/src/resolvers/resolveHbbtvRemoteBuildDirRelativePath.js +12 -12
  14. package/dist/src/resolvers/resolveZippedPlatformBuildsRelativeFilePath.js +11 -11
  15. package/dist/src/scripts/buildAllWithScheme.js +14 -14
  16. package/dist/src/scripts/gitReleaser/afterVersionBump.js +10 -10
  17. package/dist/src/scripts/gitReleaser/beforeVersionBump.js +7 -7
  18. package/dist/src/scripts/gitReleaser/checkReleaseNotes.js +9 -9
  19. package/dist/src/scripts/gitReleaser/pushRelease.js +17 -17
  20. package/dist/src/scripts/gitReleaser/pushReleaseCandidate.js +4 -4
  21. package/dist/src/scripts/gitReleaser/pushReleaseNotes.js +16 -16
  22. package/dist/src/scripts/release/deleteSourceMaps.js +6 -6
  23. package/dist/src/scripts/release/deployToAppCenter.js +37 -38
  24. package/dist/src/scripts/release/githubRelease.js +60 -64
  25. package/dist/src/scripts/release/notifySlack/makePayload.js +44 -48
  26. package/dist/src/scripts/release/notifySlack/notifySlack.js +10 -10
  27. package/dist/src/scripts/release/notifySlack/slackBlockKitBuilder.js +25 -28
  28. package/dist/src/scripts/release/sentryRelease.js +34 -34
  29. package/dist/src/scripts/release/urlsMarkdown.js +23 -25
  30. package/dist/src/scripts/releaseAllWithScheme.js +26 -26
  31. package/dist/src/scripts/utils/cmdUtils.js +9 -9
  32. package/dist/src/scripts/utils/fsUtils.js +7 -7
  33. package/dist/src/scripts/utils/gitUtils.js +50 -50
  34. package/dist/src/scripts/utils/index.js +8 -8
  35. package/dist/src/scripts/utils/stringUtils.js +2 -5
  36. package/dist/src/sdks/index.js +15 -54
  37. package/dist/src/sdks/sdk-tizen/index.js +154 -254
  38. package/dist/src/sdks/sdk-webos/index.js +136 -231
  39. package/dist/src/sdks/sdk-webpack/index.js +20 -69
  40. package/dist/src/sdks/sdkUtils.js +14 -59
  41. package/dist/src/tasks/deploy/aswS3/aws.js +9 -9
  42. package/dist/src/tasks/deploy/aswS3/deployS3.js +44 -83
  43. package/dist/src/tasks/deploy/hbbtv/deployHbbtv.js +70 -139
  44. package/dist/src/tasks/engineTasks.js +10 -10
  45. package/dist/src/tasks/task.rnv.build.js +75 -132
  46. package/dist/src/tasks/task.rnv.configure.js +39 -88
  47. package/dist/src/tasks/task.rnv.configureSoft.js +22 -75
  48. package/dist/src/tasks/task.rnv.deploy.js +28 -78
  49. package/dist/src/tasks/task.rnv.hooks.run.js +42 -92
  50. package/dist/src/tasks/task.rnv.package.js +18 -61
  51. package/dist/src/tasks/task.rnv.project.configure.js +80 -183
  52. package/dist/src/tasks/task.rnv.start.js +42 -87
  53. package/dist/src/types/c.js +1 -1
  54. package/dist/src/types/index.js +1 -1
  55. package/dist/src/utils/forEachSupportedPlatformFlavour.js +12 -12
  56. package/dist/src/utils/replaceRelevantStringsInConfig/index.js +2 -9
  57. package/dist/src/utils/replaceRelevantStringsInConfig/replaceRelevantStringsInConfig.js +10 -11
  58. package/dist/src/utils/replaceRelevantStringsInConfig/replaceTemplateString.js +23 -29
  59. package/dist/src/utils/zipBuildsByPlatforms.js +25 -25
  60. package/dist/templates/platforms/_shared/template.js +56 -41
  61. package/dist/templates/platforms/_shared/webpack.base.js +119 -139
  62. package/dist/templates/platforms/entone/webpack.config.dev.js +27 -22
  63. package/dist/templates/platforms/entone/webpack.config.prod.js +21 -20
  64. package/dist/templates/platforms/hbbtv/webpack.config.dev.js +42 -24
  65. package/dist/templates/platforms/hbbtv/webpack.config.prod.js +36 -22
  66. package/dist/templates/platforms/tizen/webpack.config.dev.js +28 -22
  67. package/dist/templates/platforms/tizen/webpack.config.prod.js +21 -20
  68. package/dist/templates/platforms/webos/webpack.config.dev.js +31 -24
  69. package/dist/templates/platforms/webos/webpack.config.prod.js +23 -22
  70. package/dist/templates/platforms/webtv/webpack.config.dev.js +27 -22
  71. package/dist/templates/platforms/webtv/webpack.config.prod.js +21 -20
  72. package/dist/types/src/scripts/release/notifySlack/makePayload.d.ts +9 -3
  73. package/package.json +2 -2
@@ -1,24 +1,19 @@
1
1
  "use strict";
2
- var __spreadArray = (this && this.__spreadArray) || function (to, from) {
3
- for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
4
- to[j] = from[i];
5
- return to;
6
- };
7
- exports.__esModule = true;
2
+ Object.defineProperty(exports, "__esModule", { value: true });
8
3
  exports.makeDistributionPayload = exports.makeReleaseCandidatePayload = exports.makeDevelopmentPayload = void 0;
9
- var slackBlockKitBuilder_1 = require("./slackBlockKitBuilder");
10
- var resolvers_1 = require("../../../resolvers");
11
- var getVersionsObject = function (c) {
12
- var _a = (resolvers_1.resolveDeployLocations(c) || {}).versions, versions = _a === void 0 ? [] : _a;
4
+ const slackBlockKitBuilder_1 = require("./slackBlockKitBuilder");
5
+ const resolvers_1 = require("../../../resolvers");
6
+ const getVersionsObject = (c) => {
7
+ const { versions = [] } = resolvers_1.resolveDeployLocations(c) || {};
13
8
  return versions;
14
9
  };
15
- var getVersion = function (c) { return Object.keys(getVersionsObject(c))[0] || ''; };
16
- var getPlatformsObject = function (c) {
17
- var version = getVersion(c);
18
- var _a = (getVersionsObject(c)[version] || {}).platforms, platforms = _a === void 0 ? {} : _a;
10
+ const getVersion = (c) => Object.keys(getVersionsObject(c))[0] || '';
11
+ const getPlatformsObject = (c) => {
12
+ const version = getVersion(c);
13
+ const { platforms = {} } = getVersionsObject(c)[version] || {};
19
14
  return platforms;
20
15
  };
21
- var getCommonAppName = function (c) {
16
+ const getCommonAppName = (c) => {
22
17
  try {
23
18
  return c.buildConfig.common.appName;
24
19
  }
@@ -26,67 +21,68 @@ var getCommonAppName = function (c) {
26
21
  return '';
27
22
  }
28
23
  };
29
- var makeFlavoursMarkdown = function (platformName, entries) { return entries
30
- .map(function (_a) {
31
- var flavour = _a[0], flavourData = _a[1];
32
- var indexUrl = flavourData.indexUrl, packageUrl = flavourData.packageUrl;
33
- return "- *" + flavour + "* [<" + packageUrl + "|Download>] [<" + indexUrl + "|Open deployed index.html>]";
24
+ const makeFlavoursMarkdown = (platformName, entries) => entries
25
+ .map(([flavour, flavourData]) => {
26
+ const { indexUrl, packageUrl } = flavourData;
27
+ return `- *${flavour}* [<${packageUrl}|Download>] [<${indexUrl}|Open deployed index.html>]`;
34
28
  })
35
- .join('\n'); };
36
- var makePackagePayload = function (c, platformName) {
37
- var platformData = getPlatformsObject(c)[platformName];
38
- var flavoursEntries = Object.entries(platformData);
29
+ .join('\n');
30
+ const makePackagePayload = (c, platformName) => {
31
+ const platformData = getPlatformsObject(c)[platformName];
32
+ const flavoursEntries = Object.entries(platformData);
39
33
  return [
40
34
  slackBlockKitBuilder_1.Divider.plain(),
41
- slackBlockKitBuilder_1.Context.mrkdwns(["Platform: *" + platformName + "*"]),
35
+ slackBlockKitBuilder_1.Context.mrkdwns([`Platform: *${platformName}*`]),
42
36
  slackBlockKitBuilder_1.Context.mrkdwns([makeFlavoursMarkdown(platformName, flavoursEntries)]),
43
37
  ];
44
38
  };
45
- var makePackagesPayload = function (c) {
46
- var platformList = Object.keys(getPlatformsObject(c));
39
+ const makePackagesPayload = (c) => {
40
+ const platformList = Object.keys(getPlatformsObject(c));
47
41
  return platformList
48
- .map(function (platformName) { return makePackagePayload(c, platformName); })
42
+ .map((platformName) => makePackagePayload(c, platformName))
49
43
  .flat();
50
44
  };
51
- var makeHeaderPayload = function (c, _a) {
52
- var _b = _a.title, title = _b === void 0 ? '' : _b, buttons = _a.buttons;
53
- var _c = buttons || {}, travisBuild = _c.travisBuild, gitHubRelease = _c.gitHubRelease;
54
- var _d = c.buildConfig.common.git || {}, owner = _d.owner, repo = _d.repo;
55
- var version = getVersion(c);
45
+ const makeHeaderPayload = (c, { title = '', buttons }) => {
46
+ const { travisBuild, gitHubRelease } = buttons || {};
47
+ const { owner, repo } = c.buildConfig.common.git || {};
48
+ const version = getVersion(c);
56
49
  return [
57
50
  slackBlockKitBuilder_1.Divider.plain(),
58
51
  slackBlockKitBuilder_1.Section.mrkdwn(title),
59
- slackBlockKitBuilder_1.Context.mrkdwns(["Version: *" + version + "*"]),
52
+ slackBlockKitBuilder_1.Context.mrkdwns([`Version: *${version}*`]),
60
53
  slackBlockKitBuilder_1.Actions.buttons([
61
54
  travisBuild ? {
62
55
  text: 'View Travis Build Log',
63
- url: process.env.TRAVIS_BUILD_WEB_URL || "https://travis-ci.com/github/" + owner + "/" + repo + "/branches"
56
+ url: process.env.TRAVIS_BUILD_WEB_URL || `https://travis-ci.com/github/${owner}/${repo}/branches`,
64
57
  } : null,
65
58
  gitHubRelease ? {
66
59
  text: 'View GitHub Release',
67
- url: "https://github.com/" + owner + "/" + repo + "/releases/tag/" + version
60
+ url: `https://github.com/${owner}/${repo}/releases/tag/${version}`,
68
61
  } : null,
69
62
  ].filter(Boolean)),
70
63
  ];
71
64
  };
72
- var makePayload = function (c, title, buttons) { return ({
73
- blocks: __spreadArray(__spreadArray([], makeHeaderPayload(c, { title: title, buttons: buttons })), makePackagesPayload(c))
74
- }); };
75
- var makeDevelopmentPayload = function (c) {
76
- var title = "There are new *development* builds for *" + getCommonAppName(c) + "* app!";
77
- var buttons = { travisBuild: true };
65
+ const makePayload = (c, title, buttons) => ({
66
+ blocks: [
67
+ ...makeHeaderPayload(c, { title, buttons }),
68
+ ...makePackagesPayload(c),
69
+ ],
70
+ });
71
+ const makeDevelopmentPayload = (c) => {
72
+ const title = `There are new *development* builds for *${getCommonAppName(c)}* app!`;
73
+ const buttons = { travisBuild: true };
78
74
  return makePayload(c, title, buttons);
79
75
  };
80
76
  exports.makeDevelopmentPayload = makeDevelopmentPayload;
81
- var makeReleaseCandidatePayload = function (c) {
82
- var title = "There are new *release candidate* builds for *" + getCommonAppName(c) + "* app!";
83
- var buttons = { travisBuild: true };
77
+ const makeReleaseCandidatePayload = (c) => {
78
+ const title = `There are new *release candidate* builds for *${getCommonAppName(c)}* app!`;
79
+ const buttons = { travisBuild: true };
84
80
  return makePayload(c, title, buttons);
85
81
  };
86
82
  exports.makeReleaseCandidatePayload = makeReleaseCandidatePayload;
87
- var makeDistributionPayload = function (c) {
88
- var title = "There are new *distribution* builds for *" + getCommonAppName(c) + "* app!";
89
- var buttons = { travisBuild: true, gitHubRelease: true };
83
+ const makeDistributionPayload = (c) => {
84
+ const title = `There are new *distribution* builds for *${getCommonAppName(c)}* app!`;
85
+ const buttons = { travisBuild: true, gitHubRelease: true };
90
86
  return makePayload(c, title, buttons);
91
87
  };
92
88
  exports.makeDistributionPayload = makeDistributionPayload;
@@ -18,12 +18,12 @@ var __importStar = (this && this.__importStar) || function (mod) {
18
18
  __setModuleDefault(result, mod);
19
19
  return result;
20
20
  };
21
- exports.__esModule = true;
21
+ Object.defineProperty(exports, "__esModule", { value: true });
22
22
  exports.notifySlack = void 0;
23
- var child_process_1 = require("child_process");
24
- var payload = __importStar(require("./makePayload"));
25
- var getPayload = function (c) {
26
- var releaseType = c.runtime.scheme;
23
+ const child_process_1 = require("child_process");
24
+ const payload = __importStar(require("./makePayload"));
25
+ const getPayload = (c) => {
26
+ const releaseType = c.runtime.scheme;
27
27
  switch (releaseType) {
28
28
  case 'dev:latest': return payload.makeDevelopmentPayload(c);
29
29
  case 'rc:latest': return payload.makeReleaseCandidatePayload(c);
@@ -31,12 +31,12 @@ var getPayload = function (c) {
31
31
  default: throw new Error('Notify Slack: unsupported or undefined release type! Did you pass it as an argument?');
32
32
  }
33
33
  };
34
- var notifySlack = function (c) {
34
+ const notifySlack = (c) => {
35
35
  var _a, _b, _c, _d;
36
- var contentType = '"Content-type: application/json"';
37
- var data = "--data '" + JSON.stringify(getPayload(c)) + "'";
38
- var webHookUrl = ((_d = (_c = (_b = (_a = c.buildConfig) === null || _a === void 0 ? void 0 : _a.common) === null || _b === void 0 ? void 0 : _b.deploy) === null || _c === void 0 ? void 0 : _c.slack) === null || _d === void 0 ? void 0 : _d.webhookUrl) || '';
39
- var cmd = "curl -X POST -H " + contentType + " " + data + " " + webHookUrl;
36
+ const contentType = '"Content-type: application/json"';
37
+ const data = `--data '${JSON.stringify(getPayload(c))}'`;
38
+ const webHookUrl = ((_d = (_c = (_b = (_a = c.buildConfig) === null || _a === void 0 ? void 0 : _a.common) === null || _b === void 0 ? void 0 : _b.deploy) === null || _c === void 0 ? void 0 : _c.slack) === null || _d === void 0 ? void 0 : _d.webhookUrl) || '';
39
+ const cmd = `curl -X POST -H ${contentType} ${data} ${webHookUrl}`;
40
40
  child_process_1.execSync(cmd, { stdio: 'inherit' });
41
41
  };
42
42
  exports.notifySlack = notifySlack;
@@ -1,42 +1,39 @@
1
1
  "use strict";
2
- exports.__esModule = true;
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.Context = exports.Divider = exports.Actions = exports.Section = void 0;
4
- var mrkdwn = function (text) { return ({ type: 'mrkdwn', text: text }); };
5
- var plainText = function (text) { return ({
4
+ const mrkdwn = (text) => ({ type: 'mrkdwn', text });
5
+ const plainText = (text) => ({
6
6
  type: 'plain_text',
7
- text: text,
8
- emoji: true
9
- }); };
10
- var buttonWithUrl = function (_a) {
11
- var text = _a.text, url = _a.url;
12
- return ({
13
- type: 'button',
14
- text: plainText(text),
15
- url: url
16
- });
17
- };
18
- var Section = {
19
- mrkdwn: function (text) { return ({
7
+ text,
8
+ emoji: true,
9
+ });
10
+ const buttonWithUrl = ({ text, url }) => ({
11
+ type: 'button',
12
+ text: plainText(text),
13
+ url,
14
+ });
15
+ const Section = {
16
+ mrkdwn: (text) => ({
20
17
  type: 'section',
21
- text: mrkdwn(text)
22
- }); }
18
+ text: mrkdwn(text),
19
+ }),
23
20
  };
24
21
  exports.Section = Section;
25
- var Actions = {
26
- buttons: function (btnsData) { return ({
22
+ const Actions = {
23
+ buttons: (btnsData) => ({
27
24
  type: 'actions',
28
- elements: btnsData.map(buttonWithUrl)
29
- }); }
25
+ elements: btnsData.map(buttonWithUrl),
26
+ }),
30
27
  };
31
28
  exports.Actions = Actions;
32
- var Divider = {
33
- plain: function () { return ({ type: 'divider' }); }
29
+ const Divider = {
30
+ plain: () => ({ type: 'divider' }),
34
31
  };
35
32
  exports.Divider = Divider;
36
- var Context = {
37
- mrkdwns: function (texts) { return ({
33
+ const Context = {
34
+ mrkdwns: (texts) => ({
38
35
  type: 'context',
39
- elements: texts.map(mrkdwn)
40
- }); }
36
+ elements: texts.map(mrkdwn),
37
+ }),
41
38
  };
42
39
  exports.Context = Context;
@@ -2,68 +2,68 @@
2
2
  var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
- exports.__esModule = true;
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.sentryRelease = void 0;
7
- var child_process_1 = require("child_process");
8
- var fs_1 = __importDefault(require("fs"));
9
- var constants_1 = require("../../constants");
10
- var UNSUPPORTED_PLATFORMS = [constants_1.Platforms.WEBTV];
11
- var executeSync = function (cmd) { return child_process_1.execSync(cmd, { stdio: 'inherit' }); };
12
- var createNewRelease = function (version) {
13
- executeSync("sentry-cli releases new " + version);
7
+ const child_process_1 = require("child_process");
8
+ const fs_1 = __importDefault(require("fs"));
9
+ const constants_1 = require("../../constants");
10
+ const UNSUPPORTED_PLATFORMS = [constants_1.Platforms.WEBTV];
11
+ const executeSync = (cmd) => child_process_1.execSync(cmd, { stdio: 'inherit' });
12
+ const createNewRelease = (version) => {
13
+ executeSync(`sentry-cli releases new ${version}`);
14
14
  };
15
- var uploadSourceMaps = function (params) {
16
- var version = params.version, sourceMapsPath = params.sourceMapsPath, urlPrefix = params.urlPrefix;
15
+ const uploadSourceMaps = (params) => {
16
+ const { version, sourceMapsPath, urlPrefix } = params;
17
17
  executeSync('sentry-cli releases '
18
- + ("files " + version + " ")
19
- + ("upload-sourcemaps " + sourceMapsPath + " ")
20
- + ("--url-prefix \"~/" + urlPrefix + "\" ")
18
+ + `files ${version} `
19
+ + `upload-sourcemaps ${sourceMapsPath} `
20
+ + `--url-prefix "~/${urlPrefix}" `
21
21
  + '--rewrite --validate');
22
22
  };
23
- var setReleaseCommits = function (version) {
23
+ const setReleaseCommits = (version) => {
24
24
  try {
25
- executeSync("sentry-cli releases set-commits " + version + " --auto --log-level=debug");
25
+ executeSync(`sentry-cli releases set-commits ${version} --auto --log-level=debug`);
26
26
  }
27
27
  catch (error) {
28
28
  console.log('Sentry release commits failed: ', error);
29
29
  }
30
30
  };
31
- var finalizeRelease = function (version) {
32
- executeSync("sentry-cli releases finalize " + version);
31
+ const finalizeRelease = (version) => {
32
+ executeSync(`sentry-cli releases finalize ${version}`);
33
33
  };
34
- var processPlatform = function (c, platform, version) {
34
+ const processPlatform = (c, platform, version) => {
35
35
  var _a;
36
- var processFlavour = function (flavour) {
37
- var platformBuildsDir = c.buildConfig.paths.platformBuildsDir;
38
- var mapsPath = platformBuildsDir + "/" + flavour + "_" + platform + "-public/public/content/js";
39
- var urlPrefix = "builds/" + platform + "/" + flavour + "/dist/" + version + "/public/content/js/";
40
- if (!fs_1["default"].existsSync(mapsPath))
36
+ const processFlavour = (flavour) => {
37
+ const { platformBuildsDir } = c.buildConfig.paths;
38
+ const mapsPath = `${platformBuildsDir}/${flavour}_${platform}-public/public/content/js`;
39
+ const urlPrefix = `builds/${platform}/${flavour}/dist/${version}/public/content/js/`;
40
+ if (!fs_1.default.existsSync(mapsPath))
41
41
  return;
42
- console.log("Uploading " + flavour + "_" + platform + " sourcemaps to Sentry...");
43
- uploadSourceMaps({ version: version, sourceMapsPath: mapsPath, urlPrefix: urlPrefix });
42
+ console.log(`Uploading ${flavour}_${platform} sourcemaps to Sentry...`);
43
+ uploadSourceMaps({ version, sourceMapsPath: mapsPath, urlPrefix });
44
44
  };
45
- var _b = (((_a = c.buildConfig.platforms[platform]) === null || _a === void 0 ? void 0 : _a.deploy) || {}).supportedFlavours, supportedFlavours = _b === void 0 ? [] : _b;
45
+ const { supportedFlavours = [] } = ((_a = c.buildConfig.platforms[platform]) === null || _a === void 0 ? void 0 : _a.deploy) || {};
46
46
  supportedFlavours.forEach(processFlavour);
47
47
  };
48
- var isSentryProjectConfigured = function () {
48
+ const isSentryProjectConfigured = () => {
49
49
  var _a;
50
- var cmd = child_process_1.execSync('sentry-cli info --config-status-json');
51
- var sentryConfig = JSON.parse(cmd.toString()) || {};
50
+ const cmd = child_process_1.execSync('sentry-cli info --config-status-json');
51
+ const sentryConfig = JSON.parse(cmd.toString()) || {};
52
52
  return !!((_a = sentryConfig.config) === null || _a === void 0 ? void 0 : _a.project);
53
53
  };
54
- var sentryRelease = function (c) {
54
+ const sentryRelease = (c) => {
55
55
  var _a;
56
56
  if (!isSentryProjectConfigured()) {
57
57
  console.log('Project is not defined...');
58
58
  return;
59
59
  }
60
- var version = "v" + ((_a = c.buildConfig.common) === null || _a === void 0 ? void 0 : _a.packageVersion);
60
+ const version = `v${(_a = c.buildConfig.common) === null || _a === void 0 ? void 0 : _a.packageVersion}`;
61
61
  if (!version)
62
62
  return;
63
- var _b = (c.buildConfig.defaults || {}).supportedPlatforms, supportedPlatforms = _b === void 0 ? [] : _b;
64
- var supportedPlatformsBySentry = supportedPlatforms.filter(function (platform) { return !UNSUPPORTED_PLATFORMS.includes(platform); });
63
+ const { supportedPlatforms = [] } = c.buildConfig.defaults || {};
64
+ const supportedPlatformsBySentry = supportedPlatforms.filter((platform) => !UNSUPPORTED_PLATFORMS.includes(platform));
65
65
  createNewRelease(version);
66
- supportedPlatformsBySentry.forEach(function (platform) { return processPlatform(c, platform, version); });
66
+ supportedPlatformsBySentry.forEach((platform) => processPlatform(c, platform, version));
67
67
  setReleaseCommits(version);
68
68
  finalizeRelease(version);
69
69
  console.log('Source Maps uploaded...');
@@ -1,19 +1,18 @@
1
1
  "use strict";
2
- exports.__esModule = true;
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getUrlsMarkdown = void 0;
4
- var constants_1 = require("../../constants");
5
- var resolvers_1 = require("../../resolvers");
6
- var newLine = '\r\n';
7
- var getDataToProceed = function (c, customPlatformList) {
8
- if (customPlatformList === void 0) { customPlatformList = []; }
9
- var locations = resolvers_1.resolveDeployLocations(c);
10
- var versions = locations.versions;
11
- var platforms = versions[Object.keys(versions)[0]].platforms;
4
+ const constants_1 = require("../../constants");
5
+ const resolvers_1 = require("../../resolvers");
6
+ const newLine = '\r\n';
7
+ const getDataToProceed = (c, customPlatformList = []) => {
8
+ const locations = resolvers_1.resolveDeployLocations(c);
9
+ const { versions } = locations;
10
+ const { platforms } = versions[Object.keys(versions)[0]];
12
11
  if (!customPlatformList.length)
13
12
  return platforms;
14
- var outputData = {};
15
- var addToOutputIfPlatformHasData = function (platformName) {
16
- var platformData = platforms[platformName];
13
+ const outputData = {};
14
+ const addToOutputIfPlatformHasData = (platformName) => {
15
+ const platformData = platforms[platformName];
17
16
  if (platformData) {
18
17
  outputData[platformName] = platformData;
19
18
  }
@@ -21,7 +20,7 @@ var getDataToProceed = function (c, customPlatformList) {
21
20
  customPlatformList.forEach(addToOutputIfPlatformHasData);
22
21
  return outputData;
23
22
  };
24
- var beautifyPlatformName = function (platformName) {
23
+ const beautifyPlatformName = (platformName) => {
25
24
  switch (platformName.toLowerCase()) {
26
25
  case constants_1.Platforms.ENTONE: return 'Entone';
27
26
  case constants_1.Platforms.HBBTV: return 'HbbTV';
@@ -31,28 +30,27 @@ var beautifyPlatformName = function (platformName) {
31
30
  default: return platformName;
32
31
  }
33
32
  };
34
- var getPlatformOutput = function (data, platformName) {
33
+ const getPlatformOutput = (data, platformName) => {
35
34
  if (platformName === constants_1.Platforms.TIZEN || platformName === constants_1.Platforms.WEBOS) {
36
35
  return '';
37
36
  }
38
- var platformData = data[platformName];
39
- var output = "**" + beautifyPlatformName(platformName) + "**" + newLine;
40
- var processPlatformEntry = function (_a) {
41
- var flavour = _a[0], flavourData = _a[1];
42
- var indexUrl = flavourData.indexUrl;
43
- output += "* [" + flavour + "](" + indexUrl + ")" + newLine;
37
+ const platformData = data[platformName];
38
+ let output = `**${beautifyPlatformName(platformName)}**${newLine}`;
39
+ const processPlatformEntry = ([flavour, flavourData]) => {
40
+ const { indexUrl } = flavourData;
41
+ output += `* [${flavour}](${indexUrl})${newLine}`;
44
42
  };
45
43
  Object.entries(platformData).forEach(processPlatformEntry);
46
44
  return output;
47
45
  };
48
- var getUrlsMarkdown = function (c, customPlatformList) {
49
- var dataToProceed = getDataToProceed(c, customPlatformList);
50
- var markdownWithoutHeader = Object.keys(dataToProceed)
51
- .map(function (platformName) { return getPlatformOutput(dataToProceed, platformName); })
46
+ const getUrlsMarkdown = (c, customPlatformList) => {
47
+ const dataToProceed = getDataToProceed(c, customPlatformList);
48
+ const markdownWithoutHeader = Object.keys(dataToProceed)
49
+ .map((platformName) => getPlatformOutput(dataToProceed, platformName))
52
50
  .filter(Boolean)
53
51
  .join(newLine);
54
52
  if (markdownWithoutHeader.length) {
55
- var urlHeader = newLine + "## URL" + newLine;
53
+ const urlHeader = `${newLine}## URL${newLine}`;
56
54
  return urlHeader + markdownWithoutHeader;
57
55
  }
58
56
  return '';
@@ -1,39 +1,39 @@
1
1
  "use strict";
2
- exports.__esModule = true;
3
- var child_process_1 = require("child_process");
4
- var forEachSupportedPlatformFlavour_1 = require("../utils/forEachSupportedPlatformFlavour");
5
- var resolvers_1 = require("../resolvers");
6
- var zipBuildsByPlatforms_1 = require("../utils/zipBuildsByPlatforms");
7
- var deleteSourceMaps_1 = require("./release/deleteSourceMaps");
8
- var deployToAppCenter_1 = require("./release/deployToAppCenter");
9
- var githubRelease_1 = require("./release/githubRelease");
10
- var notifySlack_1 = require("./release/notifySlack/notifySlack");
11
- var sentryRelease_1 = require("./release/sentryRelease");
12
- var deployTask = function (options) {
13
- var scheme = options.scheme, platform = options.platform, flavour = options.flavour;
14
- var cmd = "npx rnv deploy -s " + scheme + " -p " + platform + " -c " + flavour + " --ci --only";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const child_process_1 = require("child_process");
4
+ const forEachSupportedPlatformFlavour_1 = require("../utils/forEachSupportedPlatformFlavour");
5
+ const resolvers_1 = require("../resolvers");
6
+ const zipBuildsByPlatforms_1 = require("../utils/zipBuildsByPlatforms");
7
+ const deleteSourceMaps_1 = require("./release/deleteSourceMaps");
8
+ const deployToAppCenter_1 = require("./release/deployToAppCenter");
9
+ const githubRelease_1 = require("./release/githubRelease");
10
+ const notifySlack_1 = require("./release/notifySlack/notifySlack");
11
+ const sentryRelease_1 = require("./release/sentryRelease");
12
+ const deployTask = (options) => {
13
+ const { scheme, platform, flavour } = options;
14
+ const cmd = `npx rnv deploy -s ${scheme} -p ${platform} -c ${flavour} --ci --only`;
15
15
  child_process_1.execSync(cmd, { stdio: 'inherit' });
16
16
  };
17
- var deployBuilds = function (c) {
17
+ const deployBuilds = (c) => {
18
18
  console.log('Deploying the builds...');
19
19
  forEachSupportedPlatformFlavour_1.forEachSupportedPlatformFlavour(c, deployTask);
20
20
  return true;
21
21
  };
22
- var doLatestDevelopmentRelease = function (c) {
22
+ const doLatestDevelopmentRelease = (c) => {
23
23
  console.log('doLatestDevelopmentRelease');
24
24
  return deployBuilds(c);
25
25
  };
26
- var doLatestReleaseCandidateRelease = function (c) {
26
+ const doLatestReleaseCandidateRelease = (c) => {
27
27
  console.log('doLatestReleaseCandidateRelease');
28
28
  deployBuilds(c);
29
29
  notifySlack_1.notifySlack(c);
30
30
  return true;
31
31
  };
32
- var doLatestRelease = function (c) {
32
+ const doLatestRelease = (c) => {
33
33
  console.log('doLatestRelease');
34
34
  return deployBuilds(c);
35
35
  };
36
- var doDistributionRelease = function (c) {
36
+ const doDistributionRelease = (c) => {
37
37
  console.log('doDistributionRelease');
38
38
  zipBuildsByPlatforms_1.zipBuildsByPlatforms(c);
39
39
  deployBuilds(c);
@@ -44,12 +44,12 @@ var doDistributionRelease = function (c) {
44
44
  notifySlack_1.notifySlack(c);
45
45
  return true;
46
46
  };
47
- var releaseAllWithScheme = function () {
48
- var scheme = process.argv[2];
47
+ const releaseAllWithScheme = () => {
48
+ const scheme = process.argv[2];
49
49
  if (!scheme) {
50
50
  throw new Error('No scheme name to use found! Please use rnv scheme name as a param.');
51
51
  }
52
- var c = resolvers_1.getBaseConfig();
52
+ const c = resolvers_1.getBaseConfig();
53
53
  c.runtime.scheme = scheme;
54
54
  switch (scheme) {
55
55
  case 'dev:latest':
@@ -67,12 +67,12 @@ var releaseAllWithScheme = function () {
67
67
  default:
68
68
  throw new Error('Unsupported scheme to release!');
69
69
  }
70
- var spacing = 4;
70
+ const spacing = 4;
71
71
  console.log(JSON.stringify(resolvers_1.resolveDeployLocations(c), null, spacing));
72
72
  return true;
73
73
  };
74
- var startTimestamp = Date.now();
74
+ const startTimestamp = Date.now();
75
75
  releaseAllWithScheme();
76
- var msPerSecond = 1000;
77
- var scriptTotalTimeInSeconds = Math.ceil((Date.now() - startTimestamp) / msPerSecond);
78
- console.log("buildAllWithScheme: done in " + scriptTotalTimeInSeconds + " second(s)!");
76
+ const msPerSecond = 1000;
77
+ const scriptTotalTimeInSeconds = Math.ceil((Date.now() - startTimestamp) / msPerSecond);
78
+ console.log(`buildAllWithScheme: done in ${scriptTotalTimeInSeconds} second(s)!`);
@@ -1,12 +1,12 @@
1
1
  "use strict";
2
- var execSync = require('child_process').execSync;
3
- var cmdSync = function (command, options) { return execSync(command, options); };
4
- var cmdSyncInheritOut = function (command) { return cmdSync(command, { stdio: 'inherit' }); };
5
- var cmdSyncPipeOut = function (command) { return cmdSync(command, { stdio: 'pipe' }); };
6
- var cmdSyncTrimOut = function (command) { return cmdSync(command).toString().trim(); };
2
+ const { execSync } = require('child_process');
3
+ const cmdSync = (command, options) => execSync(command, options);
4
+ const cmdSyncInheritOut = (command) => cmdSync(command, { stdio: 'inherit' });
5
+ const cmdSyncPipeOut = (command) => cmdSync(command, { stdio: 'pipe' });
6
+ const cmdSyncTrimOut = (command) => cmdSync(command).toString().trim();
7
7
  module.exports = {
8
- cmdSync: cmdSync,
9
- cmdSyncInheritOut: cmdSyncInheritOut,
10
- cmdSyncPipeOut: cmdSyncPipeOut,
11
- cmdSyncTrimOut: cmdSyncTrimOut
8
+ cmdSync,
9
+ cmdSyncInheritOut,
10
+ cmdSyncPipeOut,
11
+ cmdSyncTrimOut,
12
12
  };
@@ -1,12 +1,12 @@
1
1
  "use strict";
2
- var fs = require('fs');
3
- var ok = require('assert').strict.ok;
4
- var getFileContentAsString = function (filePath) { return fs.readFileSync(filePath).toString(); };
5
- var assertPath = function (path) {
6
- var errorMsg = "File or path " + path + " does not exist!";
2
+ const fs = require('fs');
3
+ const { ok } = require('assert').strict;
4
+ const getFileContentAsString = (filePath) => fs.readFileSync(filePath).toString();
5
+ const assertPath = (path) => {
6
+ const errorMsg = `File or path ${path} does not exist!`;
7
7
  ok(fs.existsSync(path), errorMsg);
8
8
  };
9
9
  module.exports = {
10
- getFileContentAsString: getFileContentAsString,
11
- assertPath: assertPath
10
+ getFileContentAsString,
11
+ assertPath,
12
12
  };