@24i/smartapps-bigscreen-rnv-build-engine 0.0.2-alpha.1349 → 0.0.2-alpha.1351

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 (48) hide show
  1. package/dist/src/index.js +2 -5
  2. package/dist/src/resolvers/resolveDeployLocations.js +20 -4
  3. package/dist/src/resolvers/resolveGenericRnvConfig.js +5 -8
  4. package/dist/src/scripts/release/deployToAppCenter.js +21 -5
  5. package/dist/src/scripts/release/githubRelease.js +23 -7
  6. package/dist/src/scripts/release/sentryRelease.js +20 -4
  7. package/dist/src/scripts/utils/cmdUtils.js +8 -8
  8. package/dist/src/scripts/utils/fsUtils.js +26 -7
  9. package/dist/src/scripts/utils/gitUtils.js +52 -32
  10. package/dist/src/scripts/utils/index.js +24 -9
  11. package/dist/src/scripts/utils/stringUtils.js +3 -3
  12. package/dist/src/sdks/sdk-tizen/index.js +46 -30
  13. package/dist/src/sdks/sdk-webos/index.js +25 -9
  14. package/dist/src/sdks/sdkUtils.js +4 -4
  15. package/dist/src/tasks/deploy/aswS3/aws.js +20 -4
  16. package/dist/src/tasks/deploy/aswS3/deployS3.js +5 -8
  17. package/dist/src/tasks/deploy/hbbtv/deployHbbtv.js +5 -8
  18. package/dist/src/tasks/task.rnv.build.js +22 -6
  19. package/dist/src/tasks/task.rnv.hooks.run.js +20 -4
  20. package/dist/src/tasks/task.rnv.start.js +20 -4
  21. package/dist/src/utils/zipBuildsByPlatforms.js +20 -4
  22. package/dist/templates/platforms/_shared/template.js +2 -1
  23. package/dist/templates/platforms/_shared/webpack.base.js +35 -20
  24. package/dist/templates/platforms/entone/webpack.config.dev.js +23 -3
  25. package/dist/templates/platforms/entone/webpack.config.prod.js +23 -3
  26. package/dist/templates/platforms/hbbtv/webpack.config.dev.js +23 -3
  27. package/dist/templates/platforms/hbbtv/webpack.config.prod.js +23 -3
  28. package/dist/templates/platforms/tizen/webpack.config.dev.js +23 -3
  29. package/dist/templates/platforms/tizen/webpack.config.prod.js +23 -3
  30. package/dist/templates/platforms/webos/webpack.config.dev.js +23 -3
  31. package/dist/templates/platforms/webos/webpack.config.prod.js +23 -3
  32. package/dist/templates/platforms/webtv/webpack.config.dev.js +23 -3
  33. package/dist/templates/platforms/webtv/webpack.config.prod.js +23 -3
  34. package/dist/types/src/scripts/utils/index.d.ts +4 -5
  35. package/dist/types/src/types/c.d.ts +4 -0
  36. package/dist/types/templates/platforms/_shared/template.d.ts +1 -1
  37. package/dist/types/templates/platforms/_shared/webpack.base.d.ts +80 -1
  38. package/dist/types/templates/platforms/entone/webpack.config.dev.d.ts +2 -2
  39. package/dist/types/templates/platforms/entone/webpack.config.prod.d.ts +2 -2
  40. package/dist/types/templates/platforms/hbbtv/webpack.config.dev.d.ts +2 -2
  41. package/dist/types/templates/platforms/hbbtv/webpack.config.prod.d.ts +2 -2
  42. package/dist/types/templates/platforms/tizen/webpack.config.dev.d.ts +2 -2
  43. package/dist/types/templates/platforms/tizen/webpack.config.prod.d.ts +2 -2
  44. package/dist/types/templates/platforms/webos/webpack.config.dev.d.ts +2 -2
  45. package/dist/types/templates/platforms/webos/webpack.config.prod.d.ts +2 -2
  46. package/dist/types/templates/platforms/webtv/webpack.config.dev.d.ts +2 -2
  47. package/dist/types/templates/platforms/webtv/webpack.config.prod.d.ts +2 -2
  48. package/package.json +5 -3
@@ -1,12 +1,28 @@
1
1
  "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
5
+ }) : (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ o[k2] = m[k];
8
+ }));
9
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
10
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
11
+ }) : function(o, v) {
12
+ o["default"] = v;
13
+ });
14
+ var __importStar = (this && this.__importStar) || function (mod) {
15
+ if (mod && mod.__esModule) return mod;
16
+ var result = {};
17
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
18
+ __setModuleDefault(result, mod);
19
+ return result;
4
20
  };
5
21
  Object.defineProperty(exports, "__esModule", { value: true });
6
22
  exports.handleWebosSdk = exports.configureWebOSProject = exports.buildWebOSProject = exports.runWebOS = void 0;
7
- const fs_1 = __importDefault(require("fs"));
8
- const path_1 = __importDefault(require("path"));
9
- const semver_1 = __importDefault(require("semver"));
23
+ const fs = __importStar(require("fs"));
24
+ const path = __importStar(require("path"));
25
+ const semver = __importStar(require("semver"));
10
26
  const os_1 = require("os");
11
27
  const rnv_1 = require("rnv");
12
28
  const installer_1 = require("rnv/dist/core/sdkManager/installer");
@@ -71,7 +87,7 @@ const buildWebOSProject = async (c) => {
71
87
  await buildCoreWebpackProject(c);
72
88
  if (!c.program.hosted) {
73
89
  const tDir = getPlatformProjectDir(c);
74
- const tOut = path_1.default.join(getPlatformBuildDir(c), 'output');
90
+ const tOut = path.join(getPlatformBuildDir(c), 'output');
75
91
  await execCLI(c, CLI_WEBOS_ARES_PACKAGE, `-o ${tOut} ${tDir} -n`);
76
92
  logSuccess(`Your IPK package is located in ${chalk().cyan(tOut)} .`);
77
93
  }
@@ -92,7 +108,7 @@ const configureProject = async (c) => {
92
108
  },
93
109
  {
94
110
  pattern: '{{APP_VERSION}}',
95
- override: semver_1.default.coerce(getAppVersion(c, platform)),
111
+ override: semver.coerce(getAppVersion(c, platform)),
96
112
  },
97
113
  {
98
114
  pattern: '{{APP_DESCRIPTION}}',
@@ -112,7 +128,7 @@ const configureProject = async (c) => {
112
128
  },
113
129
  ];
114
130
  addSystemInjects(c, injects);
115
- writeCleanFile(path_1.default.join(getTemplateProjectDir(c), configFile), path_1.default.join(getPlatformProjectDir(c), configFile), injects, null, c);
131
+ writeCleanFile(path.join(getTemplateProjectDir(c), configFile), path.join(getPlatformProjectDir(c), configFile), injects, null, c);
116
132
  return true;
117
133
  };
118
134
  const configureWebOSProject = async (c) => {
@@ -135,7 +151,7 @@ const handleWebosSdk = async (c) => {
135
151
  const installPath = `${os_1.homedir()}/webOS_TV_SDK`;
136
152
  const rnvSdkKey = 'WEBOS_SDK';
137
153
  if (!WEBOS_SDK) {
138
- if (fs_1.default.existsSync(installPath)) {
154
+ if (fs.existsSync(installPath)) {
139
155
  await sdkUtils_1.registerSdkPath(c, rnvSdkKey, installPath);
140
156
  }
141
157
  const sdkInstalledToPath = await sdkUtils_1.installSdk(WEBOS_SDK_INSTALLER_URL, installPath);
@@ -1,16 +1,16 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.installSdk = exports.registerSdkPath = void 0;
4
- const { FileUtils } = require('rnv');
5
- const { sdkInstaller } = require('@24i/smartapps-bigscreen-sdk-installer');
4
+ const rnv_1 = require("rnv");
5
+ const smartapps_bigscreen_sdk_installer_1 = require("@24i/smartapps-bigscreen-sdk-installer");
6
6
  const registerSdkPath = async (c, sdkKey, sdkValue) => {
7
7
  const rnvWorkspaceConfigPath = c.paths.workspace.config;
8
8
  const customObjectToMerge = { sdks: { [sdkKey]: sdkValue } };
9
- FileUtils.updateObjectSync(rnvWorkspaceConfigPath, customObjectToMerge);
9
+ rnv_1.FileUtils.updateObjectSync(rnvWorkspaceConfigPath, customObjectToMerge);
10
10
  Object.assign(c.buildConfig, customObjectToMerge);
11
11
  };
12
12
  exports.registerSdkPath = registerSdkPath;
13
- const installSdk = async (installerUrl, installPath) => sdkInstaller({
13
+ const installSdk = async (installerUrl, installPath) => smartapps_bigscreen_sdk_installer_1.sdkInstaller({
14
14
  zipPath: installerUrl,
15
15
  installPath,
16
16
  enableLogs: true,
@@ -1,13 +1,29 @@
1
1
  "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
5
+ }) : (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ o[k2] = m[k];
8
+ }));
9
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
10
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
11
+ }) : function(o, v) {
12
+ o["default"] = v;
13
+ });
14
+ var __importStar = (this && this.__importStar) || function (mod) {
15
+ if (mod && mod.__esModule) return mod;
16
+ var result = {};
17
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
18
+ __setModuleDefault(result, mod);
19
+ return result;
4
20
  };
5
21
  Object.defineProperty(exports, "__esModule", { value: true });
6
22
  exports.rm = exports.cp = void 0;
7
23
  const child_process_1 = require("child_process");
8
- const fs_1 = __importDefault(require("fs"));
24
+ const fs = __importStar(require("fs"));
9
25
  const runCmdSync = (cmd) => child_process_1.execSync(cmd, { stdio: 'inherit' });
10
- const isDir = (path) => fs_1.default.existsSync(path) && fs_1.default.lstatSync(path).isDirectory();
26
+ const isDir = (path) => fs.existsSync(path) && fs.lstatSync(path).isDirectory();
11
27
  const cp = (source, destination) => {
12
28
  let cmd = `aws s3 cp ${source} s3://${destination} --acl public-read`;
13
29
  if (isDir(source)) {
@@ -18,28 +18,25 @@ var __importStar = (this && this.__importStar) || function (mod) {
18
18
  __setModuleDefault(result, mod);
19
19
  return result;
20
20
  };
21
- var __importDefault = (this && this.__importDefault) || function (mod) {
22
- return (mod && mod.__esModule) ? mod : { "default": mod };
23
- };
24
21
  Object.defineProperty(exports, "__esModule", { value: true });
25
22
  exports.deployToS3 = void 0;
26
- const path_1 = __importDefault(require("path"));
27
- const fs_1 = __importDefault(require("fs"));
23
+ const path = __importStar(require("path"));
24
+ const fs = __importStar(require("fs"));
28
25
  const rnv_1 = require("rnv");
29
- const constants_1 = require("../../../constants");
30
26
  const aws = __importStar(require("./aws"));
27
+ const constants_1 = require("../../../constants");
31
28
  const resolvers_1 = require("../../../resolvers");
32
29
  const { getConfigProp } = rnv_1.Common;
33
30
  const uploadPackage = (c, sourcePath, uploadPath) => {
34
31
  const packageOutputDirPath = `${sourcePath}/output`;
35
- const outputFilenameList = fs_1.default.readdirSync(packageOutputDirPath);
32
+ const outputFilenameList = fs.readdirSync(packageOutputDirPath);
36
33
  const packageFileName = outputFilenameList[0];
37
34
  const packageLocalPath = `"${packageOutputDirPath}/${packageFileName}"`;
38
35
  const packageRemotePath = `"${uploadPath}/build/${packageFileName}"`;
39
36
  aws.cp(packageLocalPath, packageRemotePath);
40
37
  };
41
38
  const uploadPublicDir = (sourcePath, uploadPath) => {
42
- const publicDirLocalPath = path_1.default.join(sourcePath, 'project', 'public');
39
+ const publicDirLocalPath = path.join(sourcePath, 'project', 'public');
43
40
  const publicDirRemotePath = `${uploadPath}/public`;
44
41
  aws.cp(publicDirLocalPath, publicDirRemotePath);
45
42
  };
@@ -18,20 +18,17 @@ var __importStar = (this && this.__importStar) || function (mod) {
18
18
  __setModuleDefault(result, mod);
19
19
  return result;
20
20
  };
21
- var __importDefault = (this && this.__importDefault) || function (mod) {
22
- return (mod && mod.__esModule) ? mod : { "default": mod };
23
- };
24
21
  Object.defineProperty(exports, "__esModule", { value: true });
25
22
  exports.deployHbbTV = void 0;
26
- const path_1 = __importDefault(require("path"));
27
- const fs_1 = __importDefault(require("fs"));
23
+ const path = __importStar(require("path"));
24
+ const fs = __importStar(require("fs"));
28
25
  const nodessh = __importStar(require("node-ssh"));
29
26
  const constants_1 = require("../../../constants");
30
27
  const resolvers_1 = require("../../../resolvers");
31
28
  const getSshKeyAbsolutePath = (c, sshKeyRelativePath) => {
32
29
  if (!sshKeyRelativePath)
33
30
  return '';
34
- return path_1.default.join(c.paths.project.dir, sshKeyRelativePath);
31
+ return path.join(c.paths.project.dir, sshKeyRelativePath);
35
32
  };
36
33
  const makeSshConnection = async (c) => {
37
34
  const { host, username, privateKeyRelativePath } = resolvers_1.resolveHbbtvDeployConfig();
@@ -46,12 +43,12 @@ const makeSshConnection = async (c) => {
46
43
  };
47
44
  const getBuildPackageFileName = (c) => {
48
45
  const packageOutputDirPath = `${c.runtime.appDir}/output`;
49
- const outputFilenameList = fs_1.default.readdirSync(packageOutputDirPath);
46
+ const outputFilenameList = fs.readdirSync(packageOutputDirPath);
50
47
  return outputFilenameList[0];
51
48
  };
52
49
  const getLocalBuildPackagePath = (c) => {
53
50
  const fileName = getBuildPackageFileName(c);
54
- return path_1.default.join(c.runtime.appDir, 'output', fileName);
51
+ return path.join(c.runtime.appDir, 'output', fileName);
55
52
  };
56
53
  const resolveRemotePaths = (c) => {
57
54
  const remoteBuildDirRelativePath = resolvers_1.resolveHbbtvRemoteBuildDirRelativePath(c);
@@ -1,11 +1,27 @@
1
1
  "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
5
+ }) : (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ o[k2] = m[k];
8
+ }));
9
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
10
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
11
+ }) : function(o, v) {
12
+ o["default"] = v;
13
+ });
14
+ var __importStar = (this && this.__importStar) || function (mod) {
15
+ if (mod && mod.__esModule) return mod;
16
+ var result = {};
17
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
18
+ __setModuleDefault(result, mod);
19
+ return result;
4
20
  };
5
21
  Object.defineProperty(exports, "__esModule", { value: true });
6
22
  exports.customRnvBuildTask = void 0;
7
23
  const child_process_1 = require("child_process");
8
- const fs_1 = __importDefault(require("fs"));
24
+ const fs = __importStar(require("fs"));
9
25
  const rnv_1 = require("rnv");
10
26
  const common_1 = require("rnv/dist/core/common");
11
27
  const constants_1 = require("../constants");
@@ -67,15 +83,15 @@ const makeZipOutput = (c) => {
67
83
  };
68
84
  const renameOutput = (c) => {
69
85
  const packageOutputDirPath = `${c.runtime.appDir}/output`;
70
- if (!fs_1.default.existsSync(packageOutputDirPath))
86
+ if (!fs.existsSync(packageOutputDirPath))
71
87
  return;
72
- const outputFilenameList = fs_1.default.readdirSync(packageOutputDirPath);
88
+ const outputFilenameList = fs.readdirSync(packageOutputDirPath);
73
89
  const packageFileName = outputFilenameList[0];
74
90
  const newFilename = makeBuildName(c);
75
91
  if (newFilename) {
76
92
  const oldPath = `${packageOutputDirPath}/${packageFileName}`;
77
93
  const newPath = `${packageOutputDirPath}/${newFilename}`;
78
- fs_1.default.renameSync(oldPath, newPath);
94
+ fs.renameSync(oldPath, newPath);
79
95
  }
80
96
  };
81
97
  const buildFn = async (c, parentTask, originTask) => {
@@ -1,10 +1,26 @@
1
1
  "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
5
+ }) : (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ o[k2] = m[k];
8
+ }));
9
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
10
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
11
+ }) : function(o, v) {
12
+ o["default"] = v;
13
+ });
14
+ var __importStar = (this && this.__importStar) || function (mod) {
15
+ if (mod && mod.__esModule) return mod;
16
+ var result = {};
17
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
18
+ __setModuleDefault(result, mod);
19
+ return result;
4
20
  };
5
21
  Object.defineProperty(exports, "__esModule", { value: true });
6
22
  exports.customRnvHooksRunTask = void 0;
7
- const inquirer_1 = __importDefault(require("inquirer"));
23
+ const inquirer = __importStar(require("inquirer"));
8
24
  const logger_1 = require("rnv/dist/core/systemManager/logger");
9
25
  const buildHooks_1 = require("rnv/dist/core/projectManager/buildHooks");
10
26
  const taskManager_1 = require("rnv/dist/core/taskManager");
@@ -33,7 +49,7 @@ const hooksRunFn = async (c, parentTask, originTask) => {
33
49
  }
34
50
  if (showHookList) {
35
51
  const hooksList = Object.keys(c.buildHooks);
36
- const { selectedHook } = await inquirer_1.default.prompt({
52
+ const { selectedHook } = await inquirer.prompt({
37
53
  name: 'selectedHook',
38
54
  type: 'list',
39
55
  message: 'Pick an available hook:',
@@ -1,10 +1,26 @@
1
1
  "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
5
+ }) : (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ o[k2] = m[k];
8
+ }));
9
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
10
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
11
+ }) : function(o, v) {
12
+ o["default"] = v;
13
+ });
14
+ var __importStar = (this && this.__importStar) || function (mod) {
15
+ if (mod && mod.__esModule) return mod;
16
+ var result = {};
17
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
18
+ __setModuleDefault(result, mod);
19
+ return result;
4
20
  };
5
21
  Object.defineProperty(exports, "__esModule", { value: true });
6
22
  exports.customRnvStartTask = void 0;
7
- const better_opn_1 = __importDefault(require("better-opn"));
23
+ const open = __importStar(require("better-opn"));
8
24
  const rnv_1 = require("rnv");
9
25
  const constants_1 = require("../constants");
10
26
  const { getConfigProp } = rnv_1.Common;
@@ -23,7 +39,7 @@ const startFn = async (c, parentTask, originTask) => {
23
39
  }
24
40
  if (hosted) {
25
41
  waitForWebpack(c)
26
- .then(() => better_opn_1.default(`http://${c.runtime.localhost}:${port}/`))
42
+ .then(() => open(`http://${c.runtime.localhost}:${port}/`))
27
43
  .catch(logError);
28
44
  }
29
45
  const bundleAssets = getConfigProp(c, c.platform, 'bundleAssets');
@@ -1,13 +1,29 @@
1
1
  "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
5
+ }) : (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ o[k2] = m[k];
8
+ }));
9
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
10
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
11
+ }) : function(o, v) {
12
+ o["default"] = v;
13
+ });
14
+ var __importStar = (this && this.__importStar) || function (mod) {
15
+ if (mod && mod.__esModule) return mod;
16
+ var result = {};
17
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
18
+ __setModuleDefault(result, mod);
19
+ return result;
4
20
  };
5
21
  Object.defineProperty(exports, "__esModule", { value: true });
6
22
  exports.zipBuildsByPlatforms = void 0;
7
23
  const fs_1 = require("fs");
8
24
  const path_1 = require("path");
9
25
  const child_process_1 = require("child_process");
10
- const glob_1 = __importDefault(require("glob"));
26
+ const glob = __importStar(require("glob"));
11
27
  const constants_1 = require("../constants");
12
28
  const resolvers_1 = require("../resolvers");
13
29
  const zipDir = (dir, outputFile) => child_process_1.execSync(`zip ${outputFile} -0 -j ${dir}/*`);
@@ -22,7 +38,7 @@ const getPlatformBuildsPaths = (c, platformName) => {
22
38
  const { platformBuildsDir } = c.buildConfig.paths;
23
39
  const outputGlob = `${platformBuildsDir}/**/output`;
24
40
  const platformBuildsGlob = `${outputGlob}/*.${getPlatformBuildFileExtension(platformName)}`;
25
- const buildsPathsCandidates = glob_1.default.sync(platformBuildsGlob);
41
+ const buildsPathsCandidates = glob.sync(platformBuildsGlob);
26
42
  return buildsPathsCandidates.filter((path) => path.includes(platformName));
27
43
  };
28
44
  const processPlatform = (c, platformName) => {
@@ -1,4 +1,5 @@
1
1
  "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
2
3
  const DEFAULT_CONFIG = {
3
4
  isDebug: false,
4
5
  isTestVersion: false,
@@ -76,4 +77,4 @@ ${htmlTag}
76
77
  </html>
77
78
  `);
78
79
  };
79
- module.exports = htmlTemp;
80
+ exports.default = htmlTemp;
@@ -1,18 +1,35 @@
1
1
  "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
5
+ }) : (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ o[k2] = m[k];
8
+ }));
9
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
10
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
11
+ }) : function(o, v) {
12
+ o["default"] = v;
13
+ });
14
+ var __importStar = (this && this.__importStar) || function (mod) {
15
+ if (mod && mod.__esModule) return mod;
16
+ var result = {};
17
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
18
+ __setModuleDefault(result, mod);
19
+ return result;
4
20
  };
5
21
  Object.defineProperty(exports, "__esModule", { value: true });
6
- const fs_1 = __importDefault(require("fs"));
7
- const path = require('path');
8
- const MiniCssExtractPlugin = require('mini-css-extract-plugin');
9
- const FileManagerPlugin = require('filemanager-webpack-plugin');
10
- const ForkTsCheckerWebpackPlugin = require('fork-ts-checker-webpack-plugin');
11
- const webpack = require('webpack');
12
- const HtmlWebpackPlugin = require('html-webpack-plugin');
13
- const HtmlWebpackHarddiskPlugin = require('html-webpack-harddisk-plugin');
14
- const { BundleAnalyzerPlugin } = require('webpack-bundle-analyzer');
15
- const { Resolvers, Constants } = require('@24i/smartapps-bigscreen-rnv-build-engine');
22
+ exports.generateConfig = void 0;
23
+ const fs = __importStar(require("fs"));
24
+ const path = __importStar(require("path"));
25
+ const MiniCssExtractPlugin = __importStar(require("mini-css-extract-plugin"));
26
+ const FileManagerPlugin = __importStar(require("filemanager-webpack-plugin"));
27
+ const ForkTsCheckerWebpackPlugin = __importStar(require("fork-ts-checker-webpack-plugin"));
28
+ const webpack = __importStar(require("webpack"));
29
+ const HtmlWebpackPlugin = __importStar(require("html-webpack-plugin"));
30
+ const HtmlWebpackHarddiskPlugin = __importStar(require("html-webpack-harddisk-plugin"));
31
+ const webpack_bundle_analyzer_1 = require("webpack-bundle-analyzer");
32
+ const smartapps_bigscreen_rnv_build_engine_1 = require("@24i/smartapps-bigscreen-rnv-build-engine");
16
33
  const getAnimationType = (isAnimated = false) => (isAnimated ? 'animated' : 'basic');
17
34
  const generateFlavourJSExtensions = ({ resolution: { height }, animated, extensions }) => {
18
35
  const flavouredExtensions = [];
@@ -44,7 +61,7 @@ const includeRtlFiles = ({ shouldIncludeRtlFiles }) => (content, { resourcePath
44
61
  if (fileName.indexOf('.styles.') === -1)
45
62
  return content;
46
63
  const rtlFile = path.resolve(filePath, 'rtl.scss');
47
- if (fs_1.default.existsSync(rtlFile)) {
64
+ if (fs.existsSync(rtlFile)) {
48
65
  return `${content}\n@import './rtl';`;
49
66
  }
50
67
  return content;
@@ -68,8 +85,8 @@ function generateConfig(config) {
68
85
  scheme: config.scheme,
69
86
  appConfigId: config.appConfigId,
70
87
  };
71
- const buildVersion = Resolvers.resolveBuildVersion(platformSchemeAppIdObj);
72
- const baseUrl = Resolvers.resolveBaseUrl(platformSchemeAppIdObj);
88
+ const buildVersion = smartapps_bigscreen_rnv_build_engine_1.Resolvers.resolveBuildVersion(platformSchemeAppIdObj);
89
+ const baseUrl = smartapps_bigscreen_rnv_build_engine_1.Resolvers.resolveBaseUrl(platformSchemeAppIdObj);
73
90
  const devServerHost = config.devServerHost || '0.0.0.0';
74
91
  const isDevServer = appBuildEngineProjectDir.endsWith('/server');
75
92
  const { PLATFORM } = process.env;
@@ -183,10 +200,10 @@ function generateConfig(config) {
183
200
  environment: config.environment,
184
201
  baseUrl,
185
202
  },
186
- xhtml: PLATFORM === Constants.Platforms.HBBTV,
203
+ xhtml: PLATFORM === smartapps_bigscreen_rnv_build_engine_1.Constants.Platforms.HBBTV,
187
204
  });
188
205
  plugins.harddisk = new HtmlWebpackHarddiskPlugin();
189
- plugins.analyzer = new BundleAnalyzerPlugin();
206
+ plugins.analyzer = new webpack_bundle_analyzer_1.BundleAnalyzerPlugin();
190
207
  plugins.css = new MiniCssExtractPlugin({
191
208
  filename: 'content/css/[name].css',
192
209
  });
@@ -252,6 +269,4 @@ function generateConfig(config) {
252
269
  appBuildDir,
253
270
  };
254
271
  }
255
- module.exports = {
256
- generateConfig,
257
- };
272
+ exports.generateConfig = generateConfig;
@@ -1,6 +1,26 @@
1
1
  "use strict";
2
- const Configs = require('./webpack.base');
3
- const Extend = require('./webpack.extend');
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
5
+ }) : (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ o[k2] = m[k];
8
+ }));
9
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
10
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
11
+ }) : function(o, v) {
12
+ o["default"] = v;
13
+ });
14
+ var __importStar = (this && this.__importStar) || function (mod) {
15
+ if (mod && mod.__esModule) return mod;
16
+ var result = {};
17
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
18
+ __setModuleDefault(result, mod);
19
+ return result;
20
+ };
21
+ Object.defineProperty(exports, "__esModule", { value: true });
22
+ const Configs = __importStar(require("./webpack.base"));
23
+ const Extend = __importStar(require("./webpack.extend"));
4
24
  const config = {
5
25
  currentDir: __dirname,
6
26
  metaTags: { viewport: `content="width=${Extend.resolution.width}, user-scalable=no"` },
@@ -20,7 +40,7 @@ const plugins = [
20
40
  ];
21
41
  if (config.analyzer)
22
42
  plugins.push(C.Plugins.analyzer);
23
- module.exports = {
43
+ exports.default = {
24
44
  entry: C.entry,
25
45
  devServer: C.devServer,
26
46
  output: C.output,
@@ -1,6 +1,26 @@
1
1
  "use strict";
2
- const Configs = require('./webpack.base');
3
- const Extend = require('./webpack.extend');
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
5
+ }) : (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ o[k2] = m[k];
8
+ }));
9
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
10
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
11
+ }) : function(o, v) {
12
+ o["default"] = v;
13
+ });
14
+ var __importStar = (this && this.__importStar) || function (mod) {
15
+ if (mod && mod.__esModule) return mod;
16
+ var result = {};
17
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
18
+ __setModuleDefault(result, mod);
19
+ return result;
20
+ };
21
+ Object.defineProperty(exports, "__esModule", { value: true });
22
+ const Configs = __importStar(require("./webpack.base"));
23
+ const Extend = __importStar(require("./webpack.extend"));
4
24
  const config = {
5
25
  currentDir: __dirname,
6
26
  metaTags: { viewport: `content="width=${Extend.resolution.width}, user-scalable=no"` },
@@ -18,7 +38,7 @@ const plugins = [
18
38
  ];
19
39
  if (config.analyzer)
20
40
  plugins.push(C.Plugins.analyzer);
21
- module.exports = {
41
+ exports.default = {
22
42
  entry: C.entry,
23
43
  output: C.output,
24
44
  module: {
@@ -1,6 +1,26 @@
1
1
  "use strict";
2
- const Configs = require('./webpack.base');
3
- const Extend = require('./webpack.extend');
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
5
+ }) : (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ o[k2] = m[k];
8
+ }));
9
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
10
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
11
+ }) : function(o, v) {
12
+ o["default"] = v;
13
+ });
14
+ var __importStar = (this && this.__importStar) || function (mod) {
15
+ if (mod && mod.__esModule) return mod;
16
+ var result = {};
17
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
18
+ __setModuleDefault(result, mod);
19
+ return result;
20
+ };
21
+ Object.defineProperty(exports, "__esModule", { value: true });
22
+ const Configs = __importStar(require("./webpack.base"));
23
+ const Extend = __importStar(require("./webpack.extend"));
4
24
  const config = {
5
25
  currentDir: __dirname,
6
26
  docType: `
@@ -37,7 +57,7 @@ const plugins = [
37
57
  ];
38
58
  if (config.analyzer)
39
59
  plugins.push(C.Plugins.analyzer);
40
- module.exports = {
60
+ exports.default = {
41
61
  entry: C.entry,
42
62
  devServer: C.devServer,
43
63
  output: C.output,
@@ -1,6 +1,26 @@
1
1
  "use strict";
2
- const Configs = require('./webpack.base');
3
- const Extend = require('./webpack.extend');
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
5
+ }) : (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ o[k2] = m[k];
8
+ }));
9
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
10
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
11
+ }) : function(o, v) {
12
+ o["default"] = v;
13
+ });
14
+ var __importStar = (this && this.__importStar) || function (mod) {
15
+ if (mod && mod.__esModule) return mod;
16
+ var result = {};
17
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
18
+ __setModuleDefault(result, mod);
19
+ return result;
20
+ };
21
+ Object.defineProperty(exports, "__esModule", { value: true });
22
+ const Configs = __importStar(require("./webpack.base"));
23
+ const Extend = __importStar(require("./webpack.extend"));
4
24
  const config = {
5
25
  currentDir: __dirname,
6
26
  docType: `
@@ -35,7 +55,7 @@ const plugins = [
35
55
  ];
36
56
  if (config.analyzer)
37
57
  plugins.push(C.Plugins.analyzer);
38
- module.exports = {
58
+ exports.default = {
39
59
  entry: C.entry,
40
60
  output: C.output,
41
61
  module: {