@24i/smartapps-bigscreen-rnv-build-engine 0.0.2-alpha.1350 → 0.0.2-alpha.1352

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 +5 -6
  8. package/dist/src/scripts/utils/fsUtils.js +25 -10
  9. package/dist/src/scripts/utils/gitUtils.js +35 -20
  10. package/dist/src/scripts/utils/stringUtils.js +3 -3
  11. package/dist/src/sdks/sdk-tizen/index.js +33 -17
  12. package/dist/src/sdks/sdk-webos/index.js +25 -9
  13. package/dist/src/tasks/deploy/aswS3/aws.js +20 -4
  14. package/dist/src/tasks/deploy/aswS3/deployS3.js +5 -8
  15. package/dist/src/tasks/deploy/hbbtv/deployHbbtv.js +5 -8
  16. package/dist/src/tasks/task.rnv.build.js +22 -6
  17. package/dist/src/tasks/task.rnv.hooks.run.js +20 -4
  18. package/dist/src/tasks/task.rnv.start.js +20 -4
  19. package/dist/src/utils/zipBuildsByPlatforms.js +20 -4
  20. package/dist/templates/platforms/_shared/template.js +2 -1
  21. package/dist/templates/platforms/_shared/webpack.base.js +56 -41
  22. package/dist/templates/platforms/entone/webpack.config.dev.js +24 -8
  23. package/dist/templates/platforms/entone/webpack.config.prod.js +24 -8
  24. package/dist/templates/platforms/hbbtv/webpack.config.dev.js +23 -7
  25. package/dist/templates/platforms/hbbtv/webpack.config.prod.js +23 -7
  26. package/dist/templates/platforms/tizen/webpack.config.dev.js +24 -8
  27. package/dist/templates/platforms/tizen/webpack.config.prod.js +24 -8
  28. package/dist/templates/platforms/webos/webpack.config.dev.js +24 -8
  29. package/dist/templates/platforms/webos/webpack.config.prod.js +24 -8
  30. package/dist/templates/platforms/webtv/webpack.config.dev.js +24 -8
  31. package/dist/templates/platforms/webtv/webpack.config.prod.js +24 -8
  32. package/dist/types/src/scripts/utils/cmdUtils.d.ts +4 -1
  33. package/dist/types/src/scripts/utils/fsUtils.d.ts +2 -1
  34. package/dist/types/src/scripts/utils/gitUtils.d.ts +14 -1
  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 -1
  39. package/dist/types/templates/platforms/entone/webpack.config.prod.d.ts +2 -1
  40. package/dist/types/templates/platforms/hbbtv/webpack.config.dev.d.ts +2 -1
  41. package/dist/types/templates/platforms/hbbtv/webpack.config.prod.d.ts +2 -1
  42. package/dist/types/templates/platforms/tizen/webpack.config.dev.d.ts +2 -1
  43. package/dist/types/templates/platforms/tizen/webpack.config.prod.d.ts +2 -1
  44. package/dist/types/templates/platforms/webos/webpack.config.dev.d.ts +2 -1
  45. package/dist/types/templates/platforms/webos/webpack.config.prod.d.ts +2 -1
  46. package/dist/types/templates/platforms/webtv/webpack.config.dev.d.ts +2 -1
  47. package/dist/types/templates/platforms/webtv/webpack.config.prod.d.ts +2 -1
  48. package/package.json +5 -3
@@ -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_1 = __importDefault(require("path"));
8
- const mini_css_extract_plugin_1 = __importDefault(require("mini-css-extract-plugin"));
9
- const filemanager_webpack_plugin_1 = __importDefault(require("filemanager-webpack-plugin"));
10
- const fork_ts_checker_webpack_plugin_1 = __importDefault(require("fork-ts-checker-webpack-plugin"));
11
- const webpack_1 = __importDefault(require("webpack"));
12
- const html_webpack_plugin_1 = __importDefault(require("html-webpack-plugin"));
13
- const html_webpack_harddisk_plugin_1 = __importDefault(require("html-webpack-harddisk-plugin"));
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 webpack = __importStar(require("webpack"));
28
+ const HtmlWebpackPlugin = __importStar(require("html-webpack-plugin"));
29
+ const HtmlWebpackHarddiskPlugin = __importStar(require("html-webpack-harddisk-plugin"));
14
30
  const webpack_bundle_analyzer_1 = require("webpack-bundle-analyzer");
15
31
  const smartapps_bigscreen_rnv_build_engine_1 = require("@24i/smartapps-bigscreen-rnv-build-engine");
32
+ const ForkTsCheckerWebpackPlugin = require('fork-ts-checker-webpack-plugin');
16
33
  const getAnimationType = (isAnimated = false) => (isAnimated ? 'animated' : 'basic');
17
34
  const generateFlavourJSExtensions = ({ resolution: { height }, animated, extensions }) => {
18
35
  const flavouredExtensions = [];
@@ -39,12 +56,12 @@ const getResolutionString = ({ resolution: { height, width } }) => (height && wi
39
56
  const includeRtlFiles = ({ shouldIncludeRtlFiles }) => (content, { resourcePath }) => {
40
57
  if (!shouldIncludeRtlFiles)
41
58
  return content;
42
- const fileName = path_1.default.basename(resourcePath);
43
- const filePath = path_1.default.dirname(resourcePath);
59
+ const fileName = path.basename(resourcePath);
60
+ const filePath = path.dirname(resourcePath);
44
61
  if (fileName.indexOf('.styles.') === -1)
45
62
  return content;
46
- const rtlFile = path_1.default.resolve(filePath, 'rtl.scss');
47
- if (fs_1.default.existsSync(rtlFile)) {
63
+ const rtlFile = path.resolve(filePath, 'rtl.scss');
64
+ if (fs.existsSync(rtlFile)) {
48
65
  return `${content}\n@import './rtl';`;
49
66
  }
50
67
  return content;
@@ -52,17 +69,17 @@ const includeRtlFiles = ({ shouldIncludeRtlFiles }) => (content, { resourcePath
52
69
  const appRuntimeCfgName = 'appRuntimeConfig.json';
53
70
  const getAppRuntimeConfigPath = (baseUrl = '', isBuildHosted = false) => {
54
71
  const isBuildHostedAndHasBaseUrl = isBuildHosted && !!baseUrl;
55
- const relativePath = path_1.default.join(isBuildHostedAndHasBaseUrl ? './public' : '', 'content', appRuntimeCfgName);
72
+ const relativePath = path.join(isBuildHostedAndHasBaseUrl ? './public' : '', 'content', appRuntimeCfgName);
56
73
  return isBuildHostedAndHasBaseUrl
57
74
  ? `${baseUrl}/${relativePath}`
58
75
  : relativePath;
59
76
  };
60
77
  function generateConfig(config) {
61
- const projectDir = path_1.default.resolve(config.currentDir, '../../');
62
- const platformBuildsDir = path_1.default.resolve(config.currentDir, '../');
63
- const appBuildDir = path_1.default.resolve(config.currentDir);
64
- const appBuildEngineProjectDir = path_1.default.resolve(config.currentDir, config.buildFolder);
65
- const appBuildEngineProjectPublicDir = path_1.default.resolve(appBuildEngineProjectDir, 'public');
78
+ const projectDir = path.resolve(config.currentDir, '../../');
79
+ const platformBuildsDir = path.resolve(config.currentDir, '../');
80
+ const appBuildDir = path.resolve(config.currentDir);
81
+ const appBuildEngineProjectDir = path.resolve(config.currentDir, config.buildFolder);
82
+ const appBuildEngineProjectPublicDir = path.resolve(appBuildEngineProjectDir, 'public');
66
83
  const platformSchemeAppIdObj = {
67
84
  platform: config.platform,
68
85
  scheme: config.scheme,
@@ -81,7 +98,7 @@ function generateConfig(config) {
81
98
  const rules = {};
82
99
  rules.babel = {
83
100
  test: /\.[tj]sx?$/,
84
- include: modulePaths.map((v) => path_1.default.resolve(projectDir, v)),
101
+ include: modulePaths.map((v) => path.resolve(projectDir, v)),
85
102
  use: [
86
103
  {
87
104
  loader: 'ts-loader',
@@ -96,7 +113,7 @@ function generateConfig(config) {
96
113
  test: /\.s?css$/,
97
114
  use: [
98
115
  isDevServer ? 'css-hot-loader' : null,
99
- mini_css_extract_plugin_1.default.loader,
116
+ MiniCssExtractPlugin.loader,
100
117
  'css-loader',
101
118
  {
102
119
  loader: 'sass-loader',
@@ -149,19 +166,19 @@ function generateConfig(config) {
149
166
  aliases[key] = config.moduleAliases[key];
150
167
  }
151
168
  else {
152
- aliases[key] = path_1.default.resolve(projectDir, config.moduleAliases[key].projectPath);
169
+ aliases[key] = path.resolve(projectDir, config.moduleAliases[key].projectPath);
153
170
  }
154
171
  });
155
172
  }
156
173
  const plugins = {};
157
- plugins.forkTsChecker = new fork_ts_checker_webpack_plugin_1.default({
174
+ plugins.forkTsChecker = new ForkTsCheckerWebpackPlugin({
158
175
  typescript: {
159
176
  enabled: true,
160
177
  memoryLimit: 4096,
161
178
  },
162
179
  });
163
180
  const appRuntimeConfigPath = getAppRuntimeConfigPath(baseUrl, isBuildHosted);
164
- plugins.webpack = new webpack_1.default.DefinePlugin({
181
+ plugins.webpack = new webpack.DefinePlugin({
165
182
  WEBPACK_INJECTION_APP_CONFIG_ID: JSON.stringify(config.appConfigId || ''),
166
183
  WEBPACK_INJECTION_APP_CREATED: JSON.stringify(new Date().toISOString()),
167
184
  WEBPACK_INJECTION_APP_RESOLUTION: JSON.stringify(getResolutionString(config)),
@@ -170,10 +187,10 @@ function generateConfig(config) {
170
187
  WEBPACK_INJECTION_APP_PLATFORM: JSON.stringify(PLATFORM || ''),
171
188
  WEBPACK_INJECTION_APP_RUNTIME_CONFIG_PATH: JSON.stringify(appRuntimeConfigPath),
172
189
  });
173
- plugins.html = new html_webpack_plugin_1.default({
190
+ plugins.html = new HtmlWebpackPlugin({
174
191
  alwaysWriteToDisk: true,
175
- filename: path_1.default.resolve(appBuildEngineProjectPublicDir, './index.html'),
176
- template: path_1.default.resolve(appBuildDir, './template.js'),
192
+ filename: path.resolve(appBuildEngineProjectPublicDir, './index.html'),
193
+ template: path.resolve(appBuildDir, './template.js'),
177
194
  minify: false,
178
195
  templateParameters: {
179
196
  ...config,
@@ -185,13 +202,13 @@ function generateConfig(config) {
185
202
  },
186
203
  xhtml: PLATFORM === smartapps_bigscreen_rnv_build_engine_1.Constants.Platforms.HBBTV,
187
204
  });
188
- plugins.harddisk = new html_webpack_harddisk_plugin_1.default();
205
+ plugins.harddisk = new HtmlWebpackHarddiskPlugin();
189
206
  plugins.analyzer = new webpack_bundle_analyzer_1.BundleAnalyzerPlugin();
190
- plugins.css = new mini_css_extract_plugin_1.default({
207
+ plugins.css = new MiniCssExtractPlugin({
191
208
  filename: 'content/css/[name].css',
192
209
  });
193
- const copiedDirWithPublicContentPath = path_1.default.join(appBuildDir, `../${path_1.default.parse(appBuildDir).name}-public`);
194
- plugins.fileManager = new filemanager_webpack_plugin_1.default({
210
+ const copiedDirWithPublicContentPath = path.join(appBuildDir, `../${path.parse(appBuildDir).name}-public`);
211
+ plugins.fileManager = new FileManagerPlugin({
195
212
  events: {
196
213
  onStart: [
197
214
  {
@@ -204,8 +221,8 @@ function generateConfig(config) {
204
221
  isDevServer ? {
205
222
  move: [
206
223
  {
207
- source: path_1.default.join(appBuildDir, 'project', 'public', 'content', appRuntimeCfgName),
208
- destination: path_1.default.join(appBuildEngineProjectPublicDir, 'content', appRuntimeCfgName),
224
+ source: path.join(appBuildDir, 'project', 'public', 'content', appRuntimeCfgName),
225
+ destination: path.join(appBuildEngineProjectPublicDir, 'content', appRuntimeCfgName),
209
226
  },
210
227
  ],
211
228
  } : null,
@@ -213,11 +230,11 @@ function generateConfig(config) {
213
230
  copy: [
214
231
  {
215
232
  source: appBuildEngineProjectPublicDir,
216
- destination: path_1.default.join(copiedDirWithPublicContentPath, 'project', 'public'),
233
+ destination: path.join(copiedDirWithPublicContentPath, 'project', 'public'),
217
234
  },
218
235
  ],
219
236
  delete: [
220
- path_1.default.join(appBuildEngineProjectPublicDir, 'content'),
237
+ path.join(appBuildEngineProjectPublicDir, 'content'),
221
238
  ],
222
239
  } : null,
223
240
  ].filter(Boolean),
@@ -236,8 +253,8 @@ function generateConfig(config) {
236
253
  host: devServerHost,
237
254
  };
238
255
  const entry = {
239
- polyfill: path_1.default.resolve(projectDir, 'polyfill/index.ts'),
240
- bundle: path_1.default.resolve(projectDir, `${config.entryFile}.js`),
256
+ polyfill: path.resolve(projectDir, 'polyfill/index.ts'),
257
+ bundle: path.resolve(projectDir, `${config.entryFile}.js`),
241
258
  };
242
259
  return {
243
260
  Rules: rules,
@@ -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,19 +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 webpack_base_1 = __importDefault(require("./webpack.base"));
7
- const webpack_extend_1 = __importDefault(require("./webpack.extend"));
22
+ const Configs = __importStar(require("./webpack.base"));
23
+ const Extend = __importStar(require("./webpack.extend"));
8
24
  const config = {
9
25
  currentDir: __dirname,
10
- metaTags: { viewport: `content="width=${webpack_extend_1.default.resolution.width}, user-scalable=no"` },
26
+ metaTags: { viewport: `content="width=${Extend.resolution.width}, user-scalable=no"` },
11
27
  environment: 'development',
12
28
  customScripts: [],
13
29
  devServerHost: '0.0.0.0',
14
- ...webpack_extend_1.default,
30
+ ...Extend,
15
31
  };
16
- const C = webpack_base_1.default.generateConfig(config);
32
+ const C = Configs.generateConfig(config);
17
33
  const plugins = [
18
34
  C.Plugins.forkTsChecker,
19
35
  C.Plugins.webpack,
@@ -24,7 +40,7 @@ const plugins = [
24
40
  ];
25
41
  if (config.analyzer)
26
42
  plugins.push(C.Plugins.analyzer);
27
- module.exports = {
43
+ exports.default = {
28
44
  entry: C.entry,
29
45
  devServer: C.devServer,
30
46
  output: C.output,
@@ -1,17 +1,33 @@
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 webpack_base_1 = __importDefault(require("./webpack.base"));
7
- const webpack_extend_1 = __importDefault(require("./webpack.extend"));
22
+ const Configs = __importStar(require("./webpack.base"));
23
+ const Extend = __importStar(require("./webpack.extend"));
8
24
  const config = {
9
25
  currentDir: __dirname,
10
- metaTags: { viewport: `content="width=${webpack_extend_1.default.resolution.width}, user-scalable=no"` },
26
+ metaTags: { viewport: `content="width=${Extend.resolution.width}, user-scalable=no"` },
11
27
  environment: 'production',
12
- ...webpack_extend_1.default,
28
+ ...Extend,
13
29
  };
14
- const C = webpack_base_1.default.generateConfig(config);
30
+ const C = Configs.generateConfig(config);
15
31
  const plugins = [
16
32
  C.Plugins.forkTsChecker,
17
33
  C.Plugins.webpack,
@@ -22,7 +38,7 @@ const plugins = [
22
38
  ];
23
39
  if (config.analyzer)
24
40
  plugins.push(C.Plugins.analyzer);
25
- module.exports = {
41
+ exports.default = {
26
42
  entry: C.entry,
27
43
  output: C.output,
28
44
  module: {
@@ -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
- const webpack_base_1 = __importDefault(require("./webpack.base"));
7
- const webpack_extend_1 = __importDefault(require("./webpack.extend"));
22
+ const Configs = __importStar(require("./webpack.base"));
23
+ const Extend = __importStar(require("./webpack.extend"));
8
24
  const config = {
9
25
  currentDir: __dirname,
10
26
  docType: `
@@ -28,9 +44,9 @@ const config = {
28
44
  '<object id="oipfAppMan" type="application/oipfApplicationManager" style="position: absolute; left: 0; top: 0; width: 0; height: 0;"></object>',
29
45
  '<object id="oipfConfig" type="application/oipfConfiguration" style="position: absolute; left: 0; top: 0; width: 0; height: 0;"></object>',
30
46
  ].join('\n '),
31
- ...webpack_extend_1.default,
47
+ ...Extend,
32
48
  };
33
- const C = webpack_base_1.default.generateConfig(config);
49
+ const C = Configs.generateConfig(config);
34
50
  const plugins = [
35
51
  C.Plugins.forkTsChecker,
36
52
  C.Plugins.webpack,
@@ -41,7 +57,7 @@ const plugins = [
41
57
  ];
42
58
  if (config.analyzer)
43
59
  plugins.push(C.Plugins.analyzer);
44
- module.exports = {
60
+ exports.default = {
45
61
  entry: C.entry,
46
62
  devServer: C.devServer,
47
63
  output: C.output,