@24i/smartapps-bigscreen-rnv-build-engine 0.14.3 → 0.14.4-alpha.1895
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/src/__tests__/sdks/sdk-utils/sdk-installer/services/download.spec.js +1 -1
- package/dist/src/scripts/release/notifySlack/generateWebhoook.js +2 -3
- package/dist/src/scripts/release/notifySlack/makePayload.js +1 -8
- package/dist/src/scripts/utils/gitUtils.js +2 -2
- package/dist/src/sdks/sdk-utils/sdk-installer/sdkInstaller.js +2 -4
- package/dist/src/sdks/sdk-utils/sdk-installer/services/download.js +6 -4
- package/dist/src/sdks/sdk-webpack/sdkWebpack.js +1 -1
- package/dist/src/sdks/sdk-xbox/sdkXbox.js +2 -3
- package/dist/src/tasks/engineTasks.js +2 -0
- package/dist/src/tasks/task.rnv.configure.js +1 -2
- package/dist/src/tasks/task.rnv.platform.configure.js +38 -0
- package/dist/src/utils/mergeSvgAndPngIcons.js +6 -2
- package/dist/templates/platforms/_shared/webpack.config.dev.js +6 -0
- package/dist/templates/platforms/_shared/webpack.config.prod.js +6 -0
- package/dist/templates/platforms/_shared/webpack.extend.js +8 -0
- package/dist/templates/platforms/_shared/webpackConfigAdapter.js +102 -0
- package/dist/templates/platforms/_shared/webpackPlatformProps.js +8 -0
- package/dist/templates/platforms/hbbtv/webpackPlatformProps.js +24 -0
- package/dist/templates/platforms/webos/webpackPlatformProps.js +8 -0
- package/fixDependency.js +1 -2
- package/package.json +3 -2
- package/dist/templates/platforms/entone/webpack.config.dev.js +0 -63
- package/dist/templates/platforms/entone/webpack.config.prod.js +0 -58
- package/dist/templates/platforms/hbbtv/webpack.config.dev.js +0 -80
- package/dist/templates/platforms/hbbtv/webpack.config.prod.js +0 -75
- package/dist/templates/platforms/kreatv/webpack.config.dev.js +0 -63
- package/dist/templates/platforms/kreatv/webpack.config.prod.js +0 -58
- package/dist/templates/platforms/saphi/webpack.config.dev.js +0 -63
- package/dist/templates/platforms/saphi/webpack.config.prod.js +0 -58
- package/dist/templates/platforms/tizen/webpack.config.dev.js +0 -64
- package/dist/templates/platforms/tizen/webpack.config.prod.js +0 -58
- package/dist/templates/platforms/webos/webpack.config.dev.js +0 -65
- package/dist/templates/platforms/webos/webpack.config.prod.js +0 -58
- package/dist/templates/platforms/webtv/webpack.config.dev.js +0 -63
- package/dist/templates/platforms/webtv/webpack.config.prod.js +0 -58
- package/dist/templates/platforms/xbox/webpack.config.dev.js +0 -64
- package/dist/templates/platforms/xbox/webpack.config.prod.js +0 -58
- /package/dist/templates/platforms/tizen/{project/.project → .project} +0 -0
- /package/dist/templates/platforms/tizen/{project/.tproject → .tproject} +0 -0
- /package/dist/templates/platforms/tizen/{project/config.xml → config.xml} +0 -0
|
@@ -49,7 +49,7 @@ describe('SDK Installer - Downloader', () => {
|
|
|
49
49
|
it('throws an error when URL has unsupported protocol', async () => {
|
|
50
50
|
await expect(async () => {
|
|
51
51
|
await (0, services_1.download)('ftp://file.zip', saveFilePath);
|
|
52
|
-
}).rejects.toThrow(new Error('ftp
|
|
52
|
+
}).rejects.toThrow(new Error('ftp protocol is not supported'));
|
|
53
53
|
});
|
|
54
54
|
});
|
|
55
55
|
describe('Handling response errors', () => {
|
|
@@ -20,7 +20,6 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
20
20
|
};
|
|
21
21
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
22
|
const https = __importStar(require("https"));
|
|
23
|
-
const querystring = __importStar(require("querystring"));
|
|
24
23
|
const path = __importStar(require("path"));
|
|
25
24
|
const fs = __importStar(require("fs"));
|
|
26
25
|
const replaceWebhookUrl = (newWebhookUrl, channelName) => {
|
|
@@ -39,8 +38,8 @@ const postRequestCallback = (receivedData) => {
|
|
|
39
38
|
console.log(`\nGenerated slack webhook: ${url}`);
|
|
40
39
|
replaceWebhookUrl(url, channel);
|
|
41
40
|
};
|
|
42
|
-
const { redirect_uri, client_id, client_secret, code } = process.env;
|
|
43
|
-
const formData =
|
|
41
|
+
const { redirect_uri = '', client_id = '', client_secret = '', code = '' } = process.env;
|
|
42
|
+
const formData = new URLSearchParams({ redirect_uri, client_id, client_secret, code }).toString();
|
|
44
43
|
const requestOptions = {
|
|
45
44
|
hostname: 'slack.com',
|
|
46
45
|
path: '/api/oauth.v2.access',
|
|
@@ -10,14 +10,7 @@ const getPlatformsObject = (c) => {
|
|
|
10
10
|
const { platforms = {} } = getVersionsObject(c)[version] || {};
|
|
11
11
|
return platforms;
|
|
12
12
|
};
|
|
13
|
-
const getCommonAppName = (c) =>
|
|
14
|
-
try {
|
|
15
|
-
return c.buildConfig.common.appName;
|
|
16
|
-
}
|
|
17
|
-
catch (error) {
|
|
18
|
-
return '';
|
|
19
|
-
}
|
|
20
|
-
};
|
|
13
|
+
const getCommonAppName = (c) => c.buildConfig.common.appName || '';
|
|
21
14
|
const makeFlavoursMarkdown = (platformName, entries) => entries
|
|
22
15
|
.map(([flavour, flavourData]) => {
|
|
23
16
|
const { indexUrl, packageUrl } = flavourData;
|
|
@@ -50,12 +50,12 @@ const checkout = (branchName) => (0, cmdUtils_1.cmdSyncPipeOut)(`git checkout ${
|
|
|
50
50
|
exports.checkout = checkout;
|
|
51
51
|
const createBranch = (branchName) => (0, cmdUtils_1.cmdSyncPipeOut)(`git branch ${branchName}`);
|
|
52
52
|
exports.createBranch = createBranch;
|
|
53
|
-
const commit = (commitMessage, noVerify) => {
|
|
53
|
+
const commit = (commitMessage, noVerify = false) => {
|
|
54
54
|
const maybeNoVerifyParam = noVerify ? '--no-verify' : '';
|
|
55
55
|
return (0, cmdUtils_1.cmdSyncPipeOut)(`git commit -m "${commitMessage}" ${maybeNoVerifyParam}`.trimEnd());
|
|
56
56
|
};
|
|
57
57
|
exports.commit = commit;
|
|
58
|
-
const push = (branchName, noVerify) => {
|
|
58
|
+
const push = (branchName, noVerify = false) => {
|
|
59
59
|
const maybeNoVerifyParam = noVerify ? '--no-verify' : '';
|
|
60
60
|
const cmd = `git push --set-upstream origin ${branchName} ${maybeNoVerifyParam}`.trimEnd();
|
|
61
61
|
return (0, cmdUtils_1.cmdSyncPipeOut)(cmd);
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.sdkInstaller = void 0;
|
|
4
4
|
const path_1 = require("path");
|
|
5
|
-
const url_1 = require("url");
|
|
6
5
|
const services_1 = require("./services");
|
|
7
6
|
const log = (message) => process.stdout.write(message);
|
|
8
7
|
const noLog = () => false;
|
|
@@ -11,11 +10,10 @@ const sdkInstaller = async (remoteZipPath, installToPath, enableLogs = false) =>
|
|
|
11
10
|
const pathsToDelete = [];
|
|
12
11
|
let usedInstallPath;
|
|
13
12
|
try {
|
|
14
|
-
|
|
15
|
-
const parsedZipUrl = (0, url_1.parse)(remoteZipPath);
|
|
16
|
-
if (!parsedZipUrl.protocol) {
|
|
13
|
+
if (!remoteZipPath.startsWith('http://') && !remoteZipPath.startsWith('https://')) {
|
|
17
14
|
throw new Error('Installation from local packages is not supported yet.');
|
|
18
15
|
}
|
|
16
|
+
const parsedZipPath = (0, path_1.parse)(remoteZipPath);
|
|
19
17
|
logger('Downloading...');
|
|
20
18
|
const downloadedFilePath = `${process.cwd()}/${parsedZipPath.base}`;
|
|
21
19
|
pathsToDelete.push(downloadedFilePath);
|
|
@@ -22,7 +22,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
22
22
|
exports.download = void 0;
|
|
23
23
|
const fs = __importStar(require("fs"));
|
|
24
24
|
const path = __importStar(require("path"));
|
|
25
|
-
const url = __importStar(require("url"));
|
|
26
25
|
const http = __importStar(require("http"));
|
|
27
26
|
const https = __importStar(require("https"));
|
|
28
27
|
const createDirPathIfDoesntExist = async (dirPath) => {
|
|
@@ -31,10 +30,13 @@ const createDirPathIfDoesntExist = async (dirPath) => {
|
|
|
31
30
|
}
|
|
32
31
|
};
|
|
33
32
|
const getNetworkProtocolAdapter = (requestedUrl) => {
|
|
34
|
-
const
|
|
33
|
+
const [protocol, rest] = requestedUrl.split('://');
|
|
34
|
+
if (!rest) {
|
|
35
|
+
throw new Error('unknown protocol');
|
|
36
|
+
}
|
|
35
37
|
switch (protocol) {
|
|
36
|
-
case 'http
|
|
37
|
-
case 'https
|
|
38
|
+
case 'http': return http;
|
|
39
|
+
case 'https': return https;
|
|
38
40
|
default: throw new Error(`${protocol} protocol is not supported`);
|
|
39
41
|
}
|
|
40
42
|
};
|
|
@@ -17,7 +17,7 @@ const configureWebProject = async (c) => {
|
|
|
17
17
|
return;
|
|
18
18
|
await copyAssetsFolder(c, platform);
|
|
19
19
|
await (0, sdk_webpack_1.configureCoreWebProject)(c);
|
|
20
|
-
copyBuildsFolder(c, platform);
|
|
20
|
+
await copyBuildsFolder(c, platform);
|
|
21
21
|
};
|
|
22
22
|
exports.configureWebProject = configureWebProject;
|
|
23
23
|
const deployWeb = () => {
|
|
@@ -89,8 +89,7 @@ const readContent = (c, path) => {
|
|
|
89
89
|
let content = [];
|
|
90
90
|
try {
|
|
91
91
|
const res = (0, fs_1.readdirSync)(srcDirectory, { withFileTypes: true });
|
|
92
|
-
|
|
93
|
-
const file = res[i];
|
|
92
|
+
res.forEach((file) => {
|
|
94
93
|
const fileNameWithPath = `${path}/${file.name}`;
|
|
95
94
|
if (file.isDirectory()) {
|
|
96
95
|
const subdirectoryContent = readContent(c, fileNameWithPath);
|
|
@@ -99,7 +98,7 @@ const readContent = (c, path) => {
|
|
|
99
98
|
else {
|
|
100
99
|
content.push(fileNameWithPath);
|
|
101
100
|
}
|
|
102
|
-
}
|
|
101
|
+
});
|
|
103
102
|
}
|
|
104
103
|
catch (err) {
|
|
105
104
|
throw new Error('Failed to parse project content');
|
|
@@ -9,6 +9,7 @@ const task_rnv_hooks_run_1 = require("./task.rnv.hooks.run");
|
|
|
9
9
|
const task_rnv_package_1 = require("./task.rnv.package");
|
|
10
10
|
const task_rnv_start_1 = require("./task.rnv.start");
|
|
11
11
|
const task_rnv_project_configure_1 = require("./task.rnv.project.configure");
|
|
12
|
+
const task_rnv_platform_configure_1 = require("./task.rnv.platform.configure");
|
|
12
13
|
const engineTaskList = [
|
|
13
14
|
task_rnv_build_1.customRnvBuildTask,
|
|
14
15
|
task_rnv_configure_1.customRnvConfigureTask,
|
|
@@ -16,6 +17,7 @@ const engineTaskList = [
|
|
|
16
17
|
task_rnv_deploy_1.customRnvDeployTask,
|
|
17
18
|
task_rnv_hooks_run_1.customRnvHooksRunTask,
|
|
18
19
|
task_rnv_package_1.customRnvPackageTask,
|
|
20
|
+
task_rnv_platform_configure_1.customRnvPlatformConfigureTask,
|
|
19
21
|
task_rnv_project_configure_1.customRnvProjectConfigureTask,
|
|
20
22
|
task_rnv_start_1.customRnvStartTask,
|
|
21
23
|
];
|
|
@@ -5,7 +5,7 @@ const rnv_1 = require("rnv");
|
|
|
5
5
|
const generateIcons_1 = require("../scripts/utils/generateIcons");
|
|
6
6
|
const constants_1 = require("../constants");
|
|
7
7
|
const sdks_1 = require("../sdks");
|
|
8
|
-
const { logErrorPlatform
|
|
8
|
+
const { logErrorPlatform } = rnv_1.PlatformManager;
|
|
9
9
|
const { logTask } = rnv_1.Logger;
|
|
10
10
|
const { TASK_PLATFORM_CONFIGURE, TASK_CONFIGURE, PARAMS } = rnv_1.Constants;
|
|
11
11
|
const { configureWebProject } = sdks_1.SDKWebpack;
|
|
@@ -15,7 +15,6 @@ const { executeTask } = rnv_1.TaskManager;
|
|
|
15
15
|
const configureFn = async (c, parentTask, originTask) => {
|
|
16
16
|
logTask('taskRnvConfigure');
|
|
17
17
|
await executeTask(c, TASK_PLATFORM_CONFIGURE, TASK_CONFIGURE, originTask);
|
|
18
|
-
await copySharedPlatforms(c);
|
|
19
18
|
await (0, generateIcons_1.generateIcons)(c);
|
|
20
19
|
if (c.program.only && !!parentTask)
|
|
21
20
|
return true;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.customRnvPlatformConfigureTask = void 0;
|
|
4
|
+
const rnv_1 = require("rnv");
|
|
5
|
+
const schemeParser_1 = require("rnv/dist/core/configManager/schemeParser");
|
|
6
|
+
const packageParser_1 = require("rnv/dist/core/configManager/packageParser");
|
|
7
|
+
const { TASK_PLATFORM_CONFIGURE, TASK_PROJECT_CONFIGURE, TASK_INSTALL, PARAMS } = rnv_1.Constants;
|
|
8
|
+
const taskRnvPlatformConfigure = async (c, parentTask, originTask) => {
|
|
9
|
+
rnv_1.Logger.logTask('taskRnvPlatformConfigure', '');
|
|
10
|
+
await rnv_1.TaskManager.executeTask(c, TASK_PROJECT_CONFIGURE, TASK_PLATFORM_CONFIGURE, originTask);
|
|
11
|
+
await rnv_1.PlatformManager.isPlatformSupported(c);
|
|
12
|
+
await (0, schemeParser_1.isBuildSchemeSupported)(c);
|
|
13
|
+
await rnv_1.SDKManager.Installer.checkSdk(c);
|
|
14
|
+
await rnv_1.RuntimeManager.configureRuntimeDefaults(c);
|
|
15
|
+
if (c.program.only && !!parentTask)
|
|
16
|
+
return true;
|
|
17
|
+
await rnv_1.TaskManager.executeTask(c, TASK_INSTALL, TASK_PLATFORM_CONFIGURE, originTask);
|
|
18
|
+
const hasBuild = rnv_1.FileUtils.fsExistsSync(c.paths.project.builds.dir);
|
|
19
|
+
rnv_1.Logger.logTask('', `taskRnvPlatformConfigure hasBuildFolderPresent:${hasBuild}`);
|
|
20
|
+
if ((c.program.reset || c.program.resetHard) && !c.runtime.disableReset) {
|
|
21
|
+
const resetParam = rnv_1.Logger.chalk().white(c.program.reset ? '-r' : '-R');
|
|
22
|
+
const appFolder = rnv_1.Logger.chalk().white(rnv_1.Common.getAppFolder(c, true));
|
|
23
|
+
rnv_1.Logger.logInfo(`You passed ${resetParam} argument. "${appFolder}" CLEANING DONE`);
|
|
24
|
+
await rnv_1.PlatformManager.cleanPlatformBuild(c, c.platform);
|
|
25
|
+
}
|
|
26
|
+
await rnv_1.PlatformManager.copySharedPlatforms(c);
|
|
27
|
+
await rnv_1.PlatformManager.createPlatformBuild(c, c.platform);
|
|
28
|
+
await (0, packageParser_1.injectPlatformDependencies)(c);
|
|
29
|
+
return true;
|
|
30
|
+
};
|
|
31
|
+
const customRnvPlatformConfigureTask = {
|
|
32
|
+
description: '',
|
|
33
|
+
fn: taskRnvPlatformConfigure,
|
|
34
|
+
task: 'platform configure',
|
|
35
|
+
params: PARAMS.withBase(),
|
|
36
|
+
platforms: [],
|
|
37
|
+
};
|
|
38
|
+
exports.customRnvPlatformConfigureTask = customRnvPlatformConfigureTask;
|
|
@@ -9,8 +9,12 @@ const path_1 = __importDefault(require("path"));
|
|
|
9
9
|
const child_process_1 = require("child_process");
|
|
10
10
|
const mergeJsonObjects = (svgJsonObject, pngJsonObject) => {
|
|
11
11
|
const merged = {};
|
|
12
|
-
Object
|
|
13
|
-
|
|
12
|
+
Object
|
|
13
|
+
.entries(svgJsonObject)
|
|
14
|
+
.forEach(([key]) => { merged[key] = ''; });
|
|
15
|
+
Object
|
|
16
|
+
.entries(pngJsonObject)
|
|
17
|
+
.forEach(([key]) => { merged[key] = ''; });
|
|
14
18
|
return merged;
|
|
15
19
|
};
|
|
16
20
|
const mergeSvgAndPngIcons = (c) => {
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const webpackPlatformProps_1 = require("./webpackPlatformProps");
|
|
4
|
+
const webpackConfigAdapter_1 = require("./webpackConfigAdapter");
|
|
5
|
+
const webpackConfig = (0, webpackConfigAdapter_1.generateWebpackDevConfig)(webpackPlatformProps_1.webpackPlatformProps);
|
|
6
|
+
exports.default = webpackConfig;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const webpackPlatformProps_1 = require("./webpackPlatformProps");
|
|
4
|
+
const webpackConfigAdapter_1 = require("./webpackConfigAdapter");
|
|
5
|
+
const webpackConfig = (0, webpackConfigAdapter_1.generateWebpackProdConfig)(webpackPlatformProps_1.webpackPlatformProps);
|
|
6
|
+
exports.default = webpackConfig;
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
"use strict";
|
|
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
|
+
exports.generateWebpackProdConfig = exports.generateWebpackDevConfig = void 0;
|
|
23
|
+
const webpack_base_1 = require("./webpack.base");
|
|
24
|
+
const Extend = __importStar(require("./webpack.extend"));
|
|
25
|
+
const withReplacedViewportWidthConfig = (config) => {
|
|
26
|
+
const { metaTags } = config;
|
|
27
|
+
if (metaTags) {
|
|
28
|
+
config.metaTags = metaTags.replace('<meta name="viewport" content="width={{APP_WIDTH}}', `<meta name="viewport" content="width=${Extend.resolution.width}`);
|
|
29
|
+
}
|
|
30
|
+
return config;
|
|
31
|
+
};
|
|
32
|
+
const withCurrentDirConfig = (config) => ({
|
|
33
|
+
...config,
|
|
34
|
+
currentDir: __dirname,
|
|
35
|
+
});
|
|
36
|
+
const withCommonConfig = (config) => {
|
|
37
|
+
const configWithReplacedViewportWidth = withReplacedViewportWidthConfig(config);
|
|
38
|
+
return {
|
|
39
|
+
...withCurrentDirConfig(configWithReplacedViewportWidth),
|
|
40
|
+
...Extend,
|
|
41
|
+
};
|
|
42
|
+
};
|
|
43
|
+
const withDevInputConfig = (config) => ({
|
|
44
|
+
...config,
|
|
45
|
+
environment: 'development',
|
|
46
|
+
devServerHost: '0.0.0.0',
|
|
47
|
+
enableHotReload: true,
|
|
48
|
+
buildFolder: 'public',
|
|
49
|
+
});
|
|
50
|
+
const withProdInputConfig = (config) => ({
|
|
51
|
+
...config,
|
|
52
|
+
environment: 'production',
|
|
53
|
+
});
|
|
54
|
+
const makeCommonOutput = (config, C) => ({
|
|
55
|
+
entry: C.entry,
|
|
56
|
+
devServer: C.devServer,
|
|
57
|
+
output: C.output,
|
|
58
|
+
module: {
|
|
59
|
+
rules: [
|
|
60
|
+
C.Rules.babel,
|
|
61
|
+
C.Rules.css,
|
|
62
|
+
C.Rules.image,
|
|
63
|
+
C.Rules.fonts,
|
|
64
|
+
C.Rules.sourcemap,
|
|
65
|
+
].filter(Boolean),
|
|
66
|
+
},
|
|
67
|
+
plugins: [
|
|
68
|
+
C.Plugins.forkTsChecker,
|
|
69
|
+
C.Plugins.webpack,
|
|
70
|
+
C.Plugins.html,
|
|
71
|
+
C.Plugins.harddisk,
|
|
72
|
+
C.Plugins.css,
|
|
73
|
+
C.Plugins.fileManager,
|
|
74
|
+
].filter(Boolean),
|
|
75
|
+
resolve: {
|
|
76
|
+
symlinks: true,
|
|
77
|
+
extensions: C.extensions,
|
|
78
|
+
alias: C.aliases,
|
|
79
|
+
},
|
|
80
|
+
...config.extend || {},
|
|
81
|
+
});
|
|
82
|
+
const generateWebpackDevConfig = (webpackPlatformProps) => {
|
|
83
|
+
const config = withCommonConfig(webpackPlatformProps);
|
|
84
|
+
const devInputConfig = withDevInputConfig(config);
|
|
85
|
+
const C = (0, webpack_base_1.generateConfig)(devInputConfig);
|
|
86
|
+
return {
|
|
87
|
+
...makeCommonOutput(devInputConfig, C),
|
|
88
|
+
optimization: {
|
|
89
|
+
minimize: false,
|
|
90
|
+
},
|
|
91
|
+
};
|
|
92
|
+
};
|
|
93
|
+
exports.generateWebpackDevConfig = generateWebpackDevConfig;
|
|
94
|
+
const generateWebpackProdConfig = (webpackPlatformProps) => {
|
|
95
|
+
const config = withCommonConfig(webpackPlatformProps);
|
|
96
|
+
const prodInputConfig = withProdInputConfig(config);
|
|
97
|
+
const C = (0, webpack_base_1.generateConfig)(prodInputConfig);
|
|
98
|
+
return {
|
|
99
|
+
...makeCommonOutput(prodInputConfig, C),
|
|
100
|
+
};
|
|
101
|
+
};
|
|
102
|
+
exports.generateWebpackProdConfig = generateWebpackProdConfig;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.webpackPlatformProps = void 0;
|
|
4
|
+
const objStyle = 'style="position: absolute; left: 0; top: 0; width: 0; height: 0;"';
|
|
5
|
+
exports.webpackPlatformProps = {
|
|
6
|
+
docType: `
|
|
7
|
+
<?xml version="1.0" encoding="UTF-8" ?>
|
|
8
|
+
<!DOCTYPE html PUBLIC "-//HbbTV//1.1.1//EN" "http://www.hbbtv.org/dtd/HbbTV-1.1.1.dtd">
|
|
9
|
+
`,
|
|
10
|
+
htmlTag: '<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">',
|
|
11
|
+
metaTags: `
|
|
12
|
+
<meta http-equiv="content-type" content="application/vnd.hbbtv.xhtml+xml" charset="UTF-8" />
|
|
13
|
+
<meta http-equiv="cache-control" content="max-age=0" />
|
|
14
|
+
<meta http-equiv="cache-control" content="no-cache" />
|
|
15
|
+
<meta http-equiv="expires" content="0" />
|
|
16
|
+
<meta http-equiv="expires" content="Tue, 01 Jan 1980 1:00:00 GMT" />
|
|
17
|
+
<meta http-equiv="pragma" content="no-cache" />
|
|
18
|
+
`,
|
|
19
|
+
bodyPrepend: [
|
|
20
|
+
`<object id="oipfCap" type="application/oipfCapabilities" ${objStyle}></object>`,
|
|
21
|
+
`<object id="oipfAppMan" type="application/oipfApplicationManager" ${objStyle}></object>`,
|
|
22
|
+
`<object id="oipfConfig" type="application/oipfConfiguration" ${objStyle}></object>`,
|
|
23
|
+
],
|
|
24
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.webpackPlatformProps = void 0;
|
|
4
|
+
exports.webpackPlatformProps = {
|
|
5
|
+
metaTags: `
|
|
6
|
+
<meta name="viewport" content="width={{APP_WIDTH}}, initial-scale=1, shrink-to-fit=no" />
|
|
7
|
+
`,
|
|
8
|
+
};
|
package/fixDependency.js
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
/* eslint-disable */
|
|
2
2
|
|
|
3
|
-
const process = require('process');
|
|
4
3
|
const fs = require('fs').promises;
|
|
5
4
|
|
|
6
5
|
const main = async (deleteDependencies) => {
|
|
7
6
|
console.log("Fix dependencies")
|
|
8
7
|
if (deleteDependencies === undefined) return;
|
|
9
|
-
for (dependency of deleteDependencies) {
|
|
8
|
+
for (const dependency of deleteDependencies) {
|
|
10
9
|
const packageLockFilePath = `${dependency.path}`;
|
|
11
10
|
console.log(packageLockFilePath);
|
|
12
11
|
try {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@24i/smartapps-bigscreen-rnv-build-engine",
|
|
3
|
-
"version": "0.14.
|
|
3
|
+
"version": "0.14.4-alpha.1895+7f34dc17",
|
|
4
4
|
"description": "Package with build engine for SmartApps BIGscreen projects...",
|
|
5
5
|
"main": "dist/src/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -49,6 +49,7 @@
|
|
|
49
49
|
"@24i/smartapps-bigscreen-device": "*",
|
|
50
50
|
"@rnv/sdk-webpack": "0.35.0-alpha.2",
|
|
51
51
|
"assign-deep": "^1.0.1",
|
|
52
|
+
"better-opn": "1.0.0",
|
|
52
53
|
"core-js": "3.15.2",
|
|
53
54
|
"coveralls": "3.1.1",
|
|
54
55
|
"css-hot-loader": "1.4.4",
|
|
@@ -80,7 +81,7 @@
|
|
|
80
81
|
"keywords": [],
|
|
81
82
|
"author": "24i",
|
|
82
83
|
"license": "ISC",
|
|
83
|
-
"gitHead": "
|
|
84
|
+
"gitHead": "7f34dc1712ac6e9c9e68ffe7516da1702e6a5190",
|
|
84
85
|
"dependencies": {
|
|
85
86
|
"xml2js": "^0.4.23"
|
|
86
87
|
}
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
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 webpack_base_1 = require("./webpack.base");
|
|
23
|
-
const Extend = __importStar(require("./webpack.extend"));
|
|
24
|
-
const config = {
|
|
25
|
-
currentDir: __dirname,
|
|
26
|
-
metaTags: `<meta name="viewport" content="width=${Extend.resolution.width}, user-scalable=no" />`,
|
|
27
|
-
environment: 'development',
|
|
28
|
-
devServerHost: '0.0.0.0',
|
|
29
|
-
...Extend,
|
|
30
|
-
};
|
|
31
|
-
const C = (0, webpack_base_1.generateConfig)(config);
|
|
32
|
-
const plugins = [
|
|
33
|
-
C.Plugins.forkTsChecker,
|
|
34
|
-
C.Plugins.webpack,
|
|
35
|
-
C.Plugins.html,
|
|
36
|
-
C.Plugins.harddisk,
|
|
37
|
-
C.Plugins.css,
|
|
38
|
-
C.Plugins.fileManager,
|
|
39
|
-
];
|
|
40
|
-
exports.default = {
|
|
41
|
-
entry: C.entry,
|
|
42
|
-
devServer: C.devServer,
|
|
43
|
-
output: C.output,
|
|
44
|
-
optimization: {
|
|
45
|
-
minimize: false,
|
|
46
|
-
},
|
|
47
|
-
module: {
|
|
48
|
-
rules: [
|
|
49
|
-
C.Rules.babel,
|
|
50
|
-
C.Rules.css,
|
|
51
|
-
C.Rules.image,
|
|
52
|
-
C.Rules.fonts,
|
|
53
|
-
C.Rules.sourcemap,
|
|
54
|
-
].filter(Boolean),
|
|
55
|
-
},
|
|
56
|
-
plugins: plugins.filter(Boolean),
|
|
57
|
-
resolve: {
|
|
58
|
-
symlinks: true,
|
|
59
|
-
extensions: C.extensions,
|
|
60
|
-
alias: C.aliases,
|
|
61
|
-
},
|
|
62
|
-
...config.extend || {},
|
|
63
|
-
};
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
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 webpack_base_1 = require("./webpack.base");
|
|
23
|
-
const Extend = __importStar(require("./webpack.extend"));
|
|
24
|
-
const config = {
|
|
25
|
-
currentDir: __dirname,
|
|
26
|
-
metaTags: `<meta name="viewport" content="width=${Extend.resolution.width}, user-scalable=no" />`,
|
|
27
|
-
environment: 'production',
|
|
28
|
-
...Extend,
|
|
29
|
-
};
|
|
30
|
-
const C = (0, webpack_base_1.generateConfig)(config);
|
|
31
|
-
const plugins = [
|
|
32
|
-
C.Plugins.forkTsChecker,
|
|
33
|
-
C.Plugins.webpack,
|
|
34
|
-
C.Plugins.html,
|
|
35
|
-
C.Plugins.harddisk,
|
|
36
|
-
C.Plugins.css,
|
|
37
|
-
C.Plugins.fileManager,
|
|
38
|
-
];
|
|
39
|
-
exports.default = {
|
|
40
|
-
entry: C.entry,
|
|
41
|
-
output: C.output,
|
|
42
|
-
module: {
|
|
43
|
-
rules: [
|
|
44
|
-
C.Rules.babel,
|
|
45
|
-
C.Rules.css,
|
|
46
|
-
C.Rules.image,
|
|
47
|
-
C.Rules.fonts,
|
|
48
|
-
C.Rules.sourcemap,
|
|
49
|
-
].filter(Boolean),
|
|
50
|
-
},
|
|
51
|
-
plugins: plugins.filter(Boolean),
|
|
52
|
-
resolve: {
|
|
53
|
-
symlinks: true,
|
|
54
|
-
extensions: C.extensions,
|
|
55
|
-
alias: C.aliases,
|
|
56
|
-
},
|
|
57
|
-
...config.extend || {},
|
|
58
|
-
};
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
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 webpack_base_1 = require("./webpack.base");
|
|
23
|
-
const Extend = __importStar(require("./webpack.extend"));
|
|
24
|
-
const config = {
|
|
25
|
-
currentDir: __dirname,
|
|
26
|
-
docType: `
|
|
27
|
-
<?xml version="1.0" encoding="UTF-8" ?>
|
|
28
|
-
<!DOCTYPE html PUBLIC "-//HbbTV//1.1.1//EN" "http://www.hbbtv.org/dtd/HbbTV-1.1.1.dtd">
|
|
29
|
-
`,
|
|
30
|
-
htmlTag: '<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">',
|
|
31
|
-
metaTags: `
|
|
32
|
-
<meta http-equiv="content-type" content="application/vnd.hbbtv.xhtml+xml" charset="UTF-8" />
|
|
33
|
-
<meta http-equiv="cache-control" content="max-age=0" />
|
|
34
|
-
<meta http-equiv="cache-control" content="no-cache" />
|
|
35
|
-
<meta http-equiv="expires" content="0" />
|
|
36
|
-
<meta http-equiv="expires" content="Tue, 01 Jan 1980 1:00:00 GMT" />
|
|
37
|
-
<meta http-equiv="pragma" content="no-cache" />
|
|
38
|
-
`,
|
|
39
|
-
environment: 'development',
|
|
40
|
-
devServerHost: '0.0.0.0',
|
|
41
|
-
bodyPrepend: [
|
|
42
|
-
'<object id="oipfCap" type="application/oipfCapabilities" style="position: absolute; left: 0; top: 0; width: 0; height: 0;"></object>',
|
|
43
|
-
'<object id="oipfAppMan" type="application/oipfApplicationManager" style="position: absolute; left: 0; top: 0; width: 0; height: 0;"></object>',
|
|
44
|
-
'<object id="oipfConfig" type="application/oipfConfiguration" style="position: absolute; left: 0; top: 0; width: 0; height: 0;"></object>',
|
|
45
|
-
],
|
|
46
|
-
...Extend,
|
|
47
|
-
};
|
|
48
|
-
const C = (0, webpack_base_1.generateConfig)(config);
|
|
49
|
-
const plugins = [
|
|
50
|
-
C.Plugins.forkTsChecker,
|
|
51
|
-
C.Plugins.webpack,
|
|
52
|
-
C.Plugins.html,
|
|
53
|
-
C.Plugins.harddisk,
|
|
54
|
-
C.Plugins.css,
|
|
55
|
-
C.Plugins.fileManager,
|
|
56
|
-
];
|
|
57
|
-
exports.default = {
|
|
58
|
-
entry: C.entry,
|
|
59
|
-
devServer: C.devServer,
|
|
60
|
-
output: C.output,
|
|
61
|
-
optimization: {
|
|
62
|
-
minimize: false,
|
|
63
|
-
},
|
|
64
|
-
module: {
|
|
65
|
-
rules: [
|
|
66
|
-
C.Rules.babel,
|
|
67
|
-
C.Rules.css,
|
|
68
|
-
C.Rules.image,
|
|
69
|
-
C.Rules.fonts,
|
|
70
|
-
C.Rules.sourcemap,
|
|
71
|
-
].filter(Boolean),
|
|
72
|
-
},
|
|
73
|
-
plugins: plugins.filter(Boolean),
|
|
74
|
-
resolve: {
|
|
75
|
-
symlinks: true,
|
|
76
|
-
extensions: C.extensions,
|
|
77
|
-
alias: C.aliases,
|
|
78
|
-
},
|
|
79
|
-
...config.extend || {},
|
|
80
|
-
};
|